summaryrefslogtreecommitdiffstats
path: root/client/platform.h
diff options
context:
space:
mode:
authorArnon Gilboa <agilboa@redhat.com>2010-10-01 16:06:10 +0200
committerHans de Goede <hdegoede@redhat.com>2010-10-01 16:06:10 +0200
commitc909198eca202f1a2424ce739c541a740dd61281 (patch)
treee7d47f0b137fcb987ca298616bbaf083df6feb97 /client/platform.h
parent6a26992410c6bc8824e047e8a844a90d5fae46c1 (diff)
downloadspice-c909198eca202f1a2424ce739c541a740dd61281.tar.gz
spice-c909198eca202f1a2424ce739c541a740dd61281.tar.xz
spice-c909198eca202f1a2424ce739c541a740dd61281.zip
client: support clipboard/selection-owner model (v2)
-includes most of Hans' review fixes (up to the SelectionRequest comment [4]) & X11 wips sent by Hans (10x!) -use the VD_AGENT_CLIPBOARD_* types in the platform code -add ifs for VD_AGENT_CAP_CLIPBOARD_BY_DEMAND in both sides -support the GRAB/REQUEST/DATA/RELEASE verbs in both ways -pasting clipboard data is now "only-by-demand" from both sides (client and agent), whose behavior is symmetric -client and agent don't read or send the contents of the clipboard unnecessarily (e.g. copy, internal paste, repeating paste, focus change) -set client as clipboard listener instead of application -add atexit(cleanup) in win platform linux: -instead of clipboard atom selection instead of XA_PRIMARY -enable USE_XRANDR_1_2 and support clipboard in MultyMonScreen -send utf8 with no null termination, remove ++size -add xfixes in configure.ac & Makefile.am windows: -bonus: support image cut & paste, currently only on windows not done yet: -clipboards formats are still uint32_t, not mime types stores as strings -platform_win is still used, not the root window -not replaced the ugly windows CF_DIB in agent/winclient
Diffstat (limited to 'client/platform.h')
-rw-r--r--client/platform.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/client/platform.h b/client/platform.h
index 6288380a..47278893 100644
--- a/client/platform.h
+++ b/client/platform.h
@@ -121,13 +121,10 @@ public:
class ClipboardListener;
static void set_clipboard_listener(ClipboardListener* listener);
- enum {
- CLIPBOARD_UTF8_TEXT = 1,
- };
-
+ static bool set_clipboard_owner(uint32_t type);
static bool set_clipboard_data(uint32_t type, const uint8_t* data, int32_t size);
- static bool get_clipboard_data(uint32_t type, uint8_t* data, int32_t size);
- static int32_t get_clipboard_data_size(uint32_t type);
+ static bool request_clipboard_notification(uint32_t type);
+ static void release_clipboard();
};
class Platform::EventListener {
@@ -141,7 +138,9 @@ public:
class Platform::ClipboardListener {
public:
virtual ~ClipboardListener() {}
- virtual void on_clipboard_change() = 0;
+ virtual void on_clipboard_grab(uint32_t type) = 0;
+ virtual void on_clipboard_request(uint32_t type) = 0;
+ virtual void on_clipboard_notify(uint32_t type, uint8_t* data, int32_t size) = 0;
};
class Platform::RecordClient {