diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-05-26 14:52:46 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-06-14 15:42:29 +0200 |
commit | d58376dc575ebbd8eecc7a6963b94886d43bff18 (patch) | |
tree | e0396194e874dea9d72d04ef893445088d56b3f1 /spice | |
parent | ed14a2ab2e3b84f7b81eb9bf0aa1df9dd734157d (diff) |
Add some types needed by the demarshalling work
Diffstat (limited to 'spice')
-rw-r--r-- | spice/draw.h | 10 | ||||
-rw-r--r-- | spice/protocol.h | 12 | ||||
-rw-r--r-- | spice/qxl_dev.h | 10 |
3 files changed, 28 insertions, 4 deletions
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 { |