diff options
author | Arnon Gilboa <agilboa@redhat.com> | 2010-10-04 16:45:15 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2010-10-04 16:48:27 +0200 |
commit | 5fdd0ba6650919dcfd7740c041ad7d2b9c4560ab (patch) | |
tree | c390e22779a99eb0d70cb059d352c30a3ebf07f9 | |
parent | 57872d78876f230750aeb8bc5eed070722c3f486 (diff) | |
download | spice-protocol-5fdd0ba6650919dcfd7740c041ad7d2b9c4560ab.tar.gz spice-protocol-5fdd0ba6650919dcfd7740c041ad7d2b9c4560ab.tar.xz spice-protocol-5fdd0ba6650919dcfd7740c041ad7d2b9c4560ab.zip |
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.
-rw-r--r-- | spice/vd_agent.h | 13 |
1 files changed, 12 insertions, 1 deletions
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, |