1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:37:36 +00:00

WindowServer+LibGUI: Store a "data type" with the clipboard content

This will allow us to distinguish between different types of data
stored on the clipboard.
This commit is contained in:
Andreas Kling 2019-09-14 09:19:05 +02:00
parent 9d2c4d223a
commit c543ee5c5b
10 changed files with 94 additions and 15 deletions

View file

@ -504,19 +504,22 @@ private:
class WSAPISetClipboardContentsRequest final : public WSAPIClientRequest {
public:
explicit WSAPISetClipboardContentsRequest(int client_id, int shared_buffer_id, int size)
explicit WSAPISetClipboardContentsRequest(int client_id, int shared_buffer_id, int size, const String& data_type)
: WSAPIClientRequest(WSEvent::APISetClipboardContentsRequest, client_id)
, m_shared_buffer_id(shared_buffer_id)
, m_size(size)
, m_data_type(data_type)
{
}
int shared_buffer_id() const { return m_shared_buffer_id; }
int size() const { return m_size; }
const String& data_type() const { return m_data_type; }
private:
int m_shared_buffer_id { 0 };
int m_size { 0 };
String m_data_type;
};
class WSAPIGetClipboardContentsRequest final : public WSAPIClientRequest {