summaryrefslogtreecommitdiff
path: root/XResproto.h
diff options
context:
space:
mode:
authorErkki Seppälä <erkki.seppala@vincit.fi>2010-11-30 14:12:58 +0200
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-05-24 15:02:21 -0700
commitb2629d78ae8acfbfc449f6b0e973716975d4e8d7 (patch)
tree0e46a0350e84f46e000be3a3138aa5e1cc697c7f /XResproto.h
parent1eb1d726921493db463b9b790bf25532fdc43287 (diff)
Protocol records for XRes v1.2
Incorporates comments from the list. Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'XResproto.h')
-rw-r--r--XResproto.h100
1 files changed, 99 insertions, 1 deletions
diff --git a/XResproto.h b/XResproto.h
index 9c2abd4..d7e20b1 100644
--- a/XResproto.h
+++ b/XResproto.h
@@ -6,15 +6,24 @@
#define _XRESPROTO_H
#define XRES_MAJOR_VERSION 1
-#define XRES_MINOR_VERSION 0
+#define XRES_MINOR_VERSION 2
#define XRES_NAME "X-Resource"
+/* v1.0 */
#define X_XResQueryVersion 0
#define X_XResQueryClients 1
#define X_XResQueryClientResources 2
#define X_XResQueryClientPixmapBytes 3
+/* Version 1.1 has been accidentally released from the version */
+/* control and while it doesn't have differences to version 1.0, the */
+/* next version is labeled 1.2 in order to remove the risk of confusion. */
+
+/* v1.2 */
+#define X_XResQueryClientIds 4
+#define X_XResQueryResourceBytes 5
+
typedef struct {
CARD32 resource_base;
CARD32 resource_mask;
@@ -125,5 +134,94 @@ typedef struct {
} xXResQueryClientPixmapBytesReply;
#define sz_xXResQueryClientPixmapBytesReply 32
+/* v1.2 XResQueryClientIds */
+
+#define X_XResClientXIDMask 0x01
+#define X_XResLocalClientPIDMask 0x02
+
+typedef struct _XResClientIdSpec {
+ CARD32 client B32;
+ CARD32 mask B32;
+} xXResClientIdSpec;
+#define sz_xXResClientIdSpec 8
+
+typedef struct _XResClientIdValue {
+ xXResClientIdSpec spec;
+ CARD32 length B32;
+ // followed by length CARD32s
+} xXResClientIdValue;
+#define sz_xResClientIdValue (sz_xXResClientIdSpec + 4)
+
+typedef struct _XResQueryClientIds {
+ CARD8 reqType;
+ CARD8 XResReqType;
+ CARD16 length B16;
+ CARD32 numSpecs B32;
+ // followed by numSpecs times XResClientIdSpec
+} xXResQueryClientIdsReq;
+#define sz_xXResQueryClientIdsReq 8
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 numIds B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ // followed by numIds times XResClientIdValue
+} xXResQueryClientIdsReply;
+#define sz_xXResQueryClientIdsReply 32
+
+/* v1.2 XResQueryResourceBytes */
+
+typedef struct _XResResourceIdSpec {
+ CARD32 resource;
+ CARD32 type;
+} xXResResourceIdSpec;
+#define sz_xXResResourceIdSpec 8
+
+typedef struct _XResQueryResourceBytes {
+ CARD8 reqType;
+ CARD8 XResReqType;
+ CARD16 length B16;
+ CARD32 client B32;
+ CARD32 numSpecs B32;
+ // followed by numSpecs times XResResourceIdSpec
+} xXResQueryResourceBytesReq;
+#define sz_xXResQueryResourceBytesReq 12
+
+typedef struct _XResResourceSizeSpec {
+ xXResResourceIdSpec spec;
+ CARD32 bytes B32;
+ CARD32 refCount B32;
+ CARD32 useCount B32;
+} xXResResourceSizeSpec;
+#define sz_xXResResourceSizeSpec (sz_xXResResourceIdSpec + 12)
+
+typedef struct _XResResourceSizeValue {
+ xXResResourceSizeSpec size;
+ CARD32 numCrossReferences B32;
+ // followed by numCrossReferences times XResResourceSizeSpec
+} xXResResourceSizeValue;
+#define sz_xXResResourceSizeValue (sz_xXResResourceSizeSpec + 4)
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 numSizes B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ // followed by numSizes times XResResourceSizeValue
+} xXResQueryResourceBytesReply;
+#define sz_xXResQueryResourceBytesReply 32
#endif /* _XRESPROTO_H */