mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol
synced 2025-12-26 22:55:30 +00:00
protocol: add clipboard selection capability
Add a new capability VD_AGENT_CAP_CLIPBOARD_SELECTION. When both client and servers have this capability, the VDAgentClipboard* messages MUST be prepended with a uint8_t indicating which clipboard selection to operate + 3 bytes stuffing for alignment that could be used for future capabilities or extensions. A few clipboard selection are defined according to X11/Gtk scheme: - VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD: the default clipboard, implemented by most OS to deal with explicit Copy/Paste operations. - VD_AGENT_CLIPBOARD_SELECTION_PRIMARY: the PRIMARY clipboard, used for mouse selections. - VD_AGENT_CLIPBOARD_SELECTION_SECONDARY: the SECONDARY clipboard. See also: http://www.freedesktop.org/wiki/Specifications/ClipboardsWiki https://bugs.freedesktop.org/show_bug.cgi?id=34833
This commit is contained in:
parent
0386da3be4
commit
6eabd3f5fb
@ -125,6 +125,10 @@ enum {
|
||||
};
|
||||
|
||||
typedef struct SPICE_ATTR_PACKED VDAgentClipboard {
|
||||
#if 0 /* VD_AGENT_CAP_CLIPBOARD_SELECTION */
|
||||
uint8_t selection;
|
||||
uint8_t __reserved[sizeof(uint32_t) - 1 * sizeof(uint8_t)];
|
||||
#endif
|
||||
uint32_t type;
|
||||
uint8_t data[0];
|
||||
} VDAgentClipboard;
|
||||
@ -139,13 +143,28 @@ enum {
|
||||
};
|
||||
|
||||
typedef struct SPICE_ATTR_PACKED VDAgentClipboardGrab {
|
||||
#if 0 /* VD_AGENT_CAP_CLIPBOARD_SELECTION */
|
||||
uint8_t selection;
|
||||
uint8_t __reserved[sizeof(uint32_t) - 1 * sizeof(uint8_t)];
|
||||
#endif
|
||||
uint32_t types[0];
|
||||
} VDAgentClipboardGrab;
|
||||
|
||||
typedef struct SPICE_ATTR_PACKED VDAgentClipboardRequest {
|
||||
#if 0 /* VD_AGENT_CAP_CLIPBOARD_SELECTION */
|
||||
uint8_t selection;
|
||||
uint8_t __reserved[sizeof(uint32_t) - 1 * sizeof(uint8_t)];
|
||||
#endif
|
||||
uint32_t type;
|
||||
} VDAgentClipboardRequest;
|
||||
|
||||
typedef struct SPICE_ATTR_PACKED VDAgentClipboardRelease {
|
||||
#if 0 /* VD_AGENT_CAP_CLIPBOARD_SELECTION */
|
||||
uint8_t selection;
|
||||
uint8_t __reserved[sizeof(uint32_t) - 1 * sizeof(uint8_t)];
|
||||
#endif
|
||||
} VDAgentClipboardRelease;
|
||||
|
||||
enum {
|
||||
VD_AGENT_CAP_MOUSE_STATE = 0,
|
||||
VD_AGENT_CAP_MONITORS_CONFIG,
|
||||
@ -153,9 +172,16 @@ enum {
|
||||
VD_AGENT_CAP_CLIPBOARD,
|
||||
VD_AGENT_CAP_DISPLAY_CONFIG,
|
||||
VD_AGENT_CAP_CLIPBOARD_BY_DEMAND,
|
||||
VD_AGENT_CAP_CLIPBOARD_SELECTION,
|
||||
VD_AGENT_END_CAP,
|
||||
};
|
||||
|
||||
enum {
|
||||
VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD = 0,
|
||||
VD_AGENT_CLIPBOARD_SELECTION_PRIMARY,
|
||||
VD_AGENT_CLIPBOARD_SELECTION_SECONDARY,
|
||||
};
|
||||
|
||||
typedef struct SPICE_ATTR_PACKED VDAgentAnnounceCapabilities {
|
||||
uint32_t request;
|
||||
uint32_t caps[0];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user