[RFC][PATCH 2/5] XResource extension v1.2 implementation of XResQueryClientIds
Erkki Seppälä
erkki.seppala at vincit.fi
Fri Dec 3 02:44:51 PST 2010
From: Erkki Seppala <erkki.seppala at vincit.fi>
Reviewed-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
---
XResproto.h | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 90 insertions(+), 0 deletions(-)
diff --git a/XResproto.h b/XResproto.h
index 9c2abd4..883af13 100644
--- a/XResproto.h
+++ b/XResproto.h
@@ -10,11 +10,16 @@
#define XRES_NAME "X-Resource"
+/* v1.0 */
#define X_XResQueryVersion 0
#define X_XResQueryClients 1
#define X_XResQueryClientResources 2
#define X_XResQueryClientPixmapBytes 3
+/* v1.2 */
+#define X_XResQueryClientIds 4
+#define X_XResQueryResourceBytes 5
+
typedef struct {
CARD32 resource_base;
CARD32 resource_mask;
@@ -125,5 +130,90 @@ 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;
+ CARD32 pad2 B32;
+ // followed by numSizes times XResResourceSizeValue
+} xXResQueryResourceBytesReply;
+#define sz_xXResQueryResourceBytesReply 32
#endif /* _XRESPROTO_H */
--
1.7.0.4
More information about the xorg-devel
mailing list