mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol
synced 2025-12-26 14:18:31 +00:00
Add support for setting cursor shape from guest
This allows to better support client mouse using streaming device Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
This commit is contained in:
parent
909da449e3
commit
a419692ea9
@ -85,6 +85,8 @@ typedef enum StreamMsgType {
|
||||
STREAM_TYPE_START_STOP,
|
||||
/* server notify errors to guest */
|
||||
STREAM_TYPE_NOTIFY_ERROR,
|
||||
/* guest cursor */
|
||||
STREAM_TYPE_CURSOR_SET,
|
||||
} StreamMsgType;
|
||||
|
||||
/* Generic extension capabilities.
|
||||
@ -164,4 +166,35 @@ typedef struct StreamMsgNotifyError {
|
||||
uint8_t msg[0];
|
||||
} StreamMsgNotifyError;
|
||||
|
||||
#define STREAM_MSG_CURSOR_SET_MAX_WIDTH 1024
|
||||
#define STREAM_MSG_CURSOR_SET_MAX_HEIGHT 1024
|
||||
|
||||
/* Guest cursor.
|
||||
* This message is sent by the guest to the host.
|
||||
*
|
||||
* States allowed: Streaming
|
||||
*/
|
||||
typedef struct StreamMsgCursorSet {
|
||||
/* basic cursor information */
|
||||
/* for security reasons width and height should
|
||||
* be limited to STREAM_MSG_CURSOR_SET_MAX_WIDTH and
|
||||
* STREAM_MSG_CURSOR_SET_MAX_HEIGHT */
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
uint16_t hot_spot_x;
|
||||
uint16_t hot_spot_y;
|
||||
/* Cursor type, as defined by SpiceCursorType.
|
||||
* Only ALPHA, COLOR24 and COLOR32 are allowed by this protocol
|
||||
*/
|
||||
uint8_t type;
|
||||
|
||||
uint8_t padding1[3];
|
||||
|
||||
/* cursor data.
|
||||
* Format and size depends on cursor_header type and size
|
||||
*/
|
||||
uint8_t data[0];
|
||||
} StreamMsgCursorSet;
|
||||
|
||||
|
||||
#endif /* SPICE_STREAM_DEVICE_H_ */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user