From d58376dc575ebbd8eecc7a6963b94886d43bff18 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 26 May 2010 14:52:46 +0200 Subject: Add some types needed by the demarshalling work --- spice/draw.h | 10 ++++++++++ spice/protocol.h | 12 ++++++++++++ spice/qxl_dev.h | 10 ++++++---- 3 files changed, 28 insertions(+), 4 deletions(-) (limited to 'spice') diff --git a/spice/draw.h b/spice/draw.h index 1cf59c8..36d5246 100644 --- a/spice/draw.h +++ b/spice/draw.h @@ -81,12 +81,22 @@ typedef struct SPICE_ATTR_PACKED SpicePathSeg { uint8_t data[0]; } SpicePathSeg; +typedef struct SPICE_ATTR_PACKED SpicePath { + uint32_t size; + uint8_t segments[0]; +} SpicePath; + enum SpiceClipType { SPICE_CLIP_TYPE_NONE, SPICE_CLIP_TYPE_RECTS, SPICE_CLIP_TYPE_PATH, }; +typedef struct SPICE_ATTR_PACKED SpiceClipRects { + uint32_t num_rects; + SpiceRect rects[0]; +} SpiceClipRects; + typedef struct SPICE_ATTR_PACKED SpiceClip { uint32_t type; SPICE_ADDRESS data; diff --git a/spice/protocol.h b/spice/protocol.h index 2de5848..a89716c 100644 --- a/spice/protocol.h +++ b/spice/protocol.h @@ -122,6 +122,14 @@ typedef struct SPICE_ATTR_PACKED SpiceSubMessageList { uint32_t sub_messages[0]; //offsets to SpicedSubMessage } SpiceSubMessageList; +typedef struct SPICE_ATTR_PACKED SpiceMsgData { + uint32_t data_size; + uint8_t data[0]; +} SpiceMsgData; + +typedef struct SPICE_ATTR_PACKED SpiceMsgEmpty { +} SpiceMsgEmpty; + enum { SPICE_MSG_MIGRATE = 1, SPICE_MSG_MIGRATE_DATA, @@ -263,6 +271,10 @@ typedef struct SPICE_ATTR_PACKED SpiceMsgSetAck { uint32_t window; } SpiceMsgSetAck; +typedef struct SPICE_ATTR_PACKED SpiceMsgcAckSync { + uint32_t generation; +} SpiceMsgcAckSync; + typedef struct SPICE_ATTR_PACKED SpiceWaitForChannel { uint8_t channel_type; uint8_t channel_id; diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h index 6182953..693348f 100644 --- a/spice/qxl_dev.h +++ b/spice/qxl_dev.h @@ -410,6 +410,11 @@ typedef struct SPICE_ATTR_PACKED QXLImageID { uint32_t unique; } QXLImageID; +typedef union { + QXLImageID id; + uint64_t value; +} QXLImageIDUnion; + enum { QXL_IMAGE_CACHE = (1 << 0), QXL_IMAGE_HIGH_BITS_SET = (1 << 1), @@ -422,10 +427,7 @@ enum { }; #define QXL_SET_IMAGE_ID(image, _group, _unique) { \ - uint64_t* id_ptr = &(image)->descriptor.id; \ - QXLImageID *image_id = (QXLImageID *)id_ptr; \ - image_id->group = _group; \ - image_id->unique = _unique; \ + (image)->descriptor.id = (((uint64_t)_unique) << 32) | _group; \ } typedef struct SPICE_ATTR_PACKED QXLImage { -- cgit