summaryrefslogtreecommitdiffstats
path: root/client/red_client.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-10-01 20:01:47 +0200
committerHans de Goede <hdegoede@redhat.com>2010-10-01 20:01:47 +0200
commita2d645ffe3fa23e8c57950987c93c0fe8822238b (patch)
tree76621a76bdc10c4dd86c91300c98870859ada29a /client/red_client.h
parentc6e9c52a2a588fa11f516e96f3ba5fea3cd67274 (diff)
downloadspice-a2d645ffe3fa23e8c57950987c93c0fe8822238b.tar.gz
spice-a2d645ffe3fa23e8c57950987c93c0fe8822238b.tar.xz
spice-a2d645ffe3fa23e8c57950987c93c0fe8822238b.zip
Change VD_AGENT_CLIPBOARD_GRAB to an array of types
A clipboard owner can indicate that it can supply the data the clipboard owns in multiple formats, so make the data passed with a VD_AGENT_CLIPBOARD_GRAB message an array of types rather then a single type.
Diffstat (limited to 'client/red_client.h')
-rw-r--r--client/red_client.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/client/red_client.h b/client/red_client.h
index 3ccb8e32..2cfce494 100644
--- a/client/red_client.h
+++ b/client/red_client.h
@@ -146,11 +146,22 @@ public:
class ClipboardGrabEvent : public Event {
public:
- ClipboardGrabEvent(uint32_t type) : _type (type) {}
+ ClipboardGrabEvent(uint32_t *types, uint32_t type_count)
+ {
+ _types = new uint32_t [type_count];
+ memcpy(_types, types, type_count * sizeof(uint32_t));
+ _type_count = type_count;
+ }
+ ~ClipboardGrabEvent()
+ {
+ delete[] _types;
+ }
+
virtual void response(AbstractProcessLoop& events_loop);
private:
- uint32_t _type;
+ uint32_t *_types;
+ uint32_t _type_count;
};
class ClipboardRequestEvent : public Event {
@@ -207,7 +218,7 @@ public:
PixmapCache& get_pixmap_cache() {return _pixmap_cache;}
uint64_t get_pixmap_cache_size() { return _pixmap_cache_size;}
void on_display_mode_change();
- void on_clipboard_grab(uint32_t type);
+ void on_clipboard_grab(uint32_t *types, uint32_t type_count);
void on_clipboard_request(uint32_t type);
void on_clipboard_notify(uint32_t type, uint8_t* data, int32_t size);