[Spice-commits] 3 commits - spice/vd_agent.h

Hans de Goede jwrdegoede at kemper.freedesktop.org
Mon Oct 4 08:10:17 PDT 2010


 spice/vd_agent.h |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 55bdae1179dc9a53bb0726a03bb6977dc67dd3e2
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Oct 4 16:47:19 2010 +0200

    VD_AGENT_CLIPBOARD_GRAB takes a list of types rather then a single type
    
    This way the grabbing side can indicate when the clipboard owning app
    can provide the clipboard contents in multiple formats, ie plain text
    and html.
    
    Also drop the VD_AGENT_CLIPBOARD_BITMAP type until we have a clear
    cross platform definition of the contents to send for bitmap type
    clipboard data.

diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 4724b9a..8c09701 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -132,11 +132,10 @@ typedef struct SPICE_ATTR_PACKED VDAgentClipboard {
 enum {
     VD_AGENT_CLIPBOARD_NONE = 0,
     VD_AGENT_CLIPBOARD_UTF8_TEXT,
-    VD_AGENT_CLIPBOARD_BITMAP,
 };
 
 typedef struct SPICE_ATTR_PACKED VDAgentClipboardGrab {
-    uint32_t type;
+    uint32_t types[0];
 } VDAgentClipboardGrab;
 
 typedef struct SPICE_ATTR_PACKED VDAgentClipboardRequest {
commit 016cdb0b1dea0e76790a3b95b4bdb6ed3324f316
Author: Arnon Gilboa <agilboa at redhat.com>
Date:   Mon Oct 4 16:46:10 2010 +0200

    vd_agent: add VD_AGENT_CAP_CLIPBOARD_BY_DEMAND capability enum
    
    VD_AGENT_CLIPBOARD_NONE for unsupported clipboard types

diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 0da23aa..4724b9a 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -130,7 +130,8 @@ typedef struct SPICE_ATTR_PACKED VDAgentClipboard {
 } VDAgentClipboard;
 
 enum {
-    VD_AGENT_CLIPBOARD_UTF8_TEXT = 1,
+    VD_AGENT_CLIPBOARD_NONE = 0,
+    VD_AGENT_CLIPBOARD_UTF8_TEXT,
     VD_AGENT_CLIPBOARD_BITMAP,
 };
 
@@ -148,6 +149,7 @@ enum {
     VD_AGENT_CAP_REPLY,
     VD_AGENT_CAP_CLIPBOARD,
     VD_AGENT_CAP_DISPLAY_CONFIG,
+    VD_AGENT_CAP_CLIPBOARD_BY_DEMAND,
     VD_AGENT_END_CAP,
 };
 
commit 5fdd0ba6650919dcfd7740c041ad7d2b9c4560ab
Author: Arnon Gilboa <agilboa at redhat.com>
Date:   Mon Oct 4 16:45:15 2010 +0200

    vd_agent: add protocol messages for clipboard/selection-owner model
    
    -VD_AGENT_CLIPBOARD_GRAB(type) - tell the other side that an application in our side ("we") got ownership of the clipboard.
    -VD_AGENT_CLIPBOARD_REQUEST(type) - after we know the other side owns the clipboard (GRAB received), we notify the os we are the owner. when we are asked by the os/app for the clipboard data, we send this REQUEST msg to the other side.
    -VD_AGENT_CLIPBOARD(type, data) - the existing message for sending the clipboard, is now sent only in response to REQUEST.
    -VD_AGENT_CLIPBOARD_RELEASE - tell the other side that we are no longer the owner of the clipboard (e.g. the owner app was closed).
    
    this patch will be followed by agent & client patches handling the above messages.

diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 9e5adec..0da23aa 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -65,6 +65,9 @@ enum {
     VD_AGENT_CLIPBOARD,
     VD_AGENT_DISPLAY_CONFIG,
     VD_AGENT_ANNOUNCE_CAPABILITIES,
+    VD_AGENT_CLIPBOARD_GRAB,
+    VD_AGENT_CLIPBOARD_REQUEST,
+    VD_AGENT_CLIPBOARD_RELEASE,
     VD_AGENT_END_MESSAGE,
 };
 
@@ -121,7 +124,6 @@ enum {
     VD_AGENT_ERROR,
 };
 
-//FIXME: size required?
 typedef struct SPICE_ATTR_PACKED VDAgentClipboard {
     uint32_t type;
     uint8_t data[0];
@@ -129,8 +131,17 @@ typedef struct SPICE_ATTR_PACKED VDAgentClipboard {
 
 enum {
     VD_AGENT_CLIPBOARD_UTF8_TEXT = 1,
+    VD_AGENT_CLIPBOARD_BITMAP,
 };
 
+typedef struct SPICE_ATTR_PACKED VDAgentClipboardGrab {
+    uint32_t type;
+} VDAgentClipboardGrab;
+
+typedef struct SPICE_ATTR_PACKED VDAgentClipboardRequest {
+    uint32_t type;
+} VDAgentClipboardRequest;
+
 enum {
     VD_AGENT_CAP_MOUSE_STATE = 0,
     VD_AGENT_CAP_MONITORS_CONFIG,


More information about the Spice-commits mailing list