2 Copyright (c) 2002 XFree86 Inc
8 #define XRES_MAJOR_VERSION 1
9 #define XRES_MINOR_VERSION 2
11 #define XRES_NAME "X-Resource"
14 #define X_XResQueryVersion 0
15 #define X_XResQueryClients 1
16 #define X_XResQueryClientResources 2
17 #define X_XResQueryClientPixmapBytes 3
19 /* Version 1.1 has been accidentally released from the version */
20 /* control and while it doesn't have differences to version 1.0, the */
21 /* next version is labeled 1.2 in order to remove the risk of confusion. */
24 #define X_XResQueryClientIds 4
25 #define X_XResQueryResourceBytes 5
31 #define sz_xXResClient 8
37 #define sz_xXResType 8
39 /* XResQueryVersion */
41 typedef struct _XResQueryVersion {
48 } xXResQueryVersionReq;
49 #define sz_xXResQueryVersionReq 8
54 CARD16 sequenceNumber B16;
56 CARD16 server_major B16;
57 CARD16 server_minor B16;
63 } xXResQueryVersionReply;
64 #define sz_xXResQueryVersionReply 32
66 /* XResQueryClients */
68 typedef struct _XResQueryClients {
72 } xXResQueryClientsReq;
73 #define sz_xXResQueryClientsReq 4
78 CARD16 sequenceNumber B16;
80 CARD32 num_clients B32;
86 } xXResQueryClientsReply;
87 #define sz_xXResQueryClientsReply 32
89 /* XResQueryClientResources */
91 typedef struct _XResQueryClientResources {
96 } xXResQueryClientResourcesReq;
97 #define sz_xXResQueryClientResourcesReq 8
102 CARD16 sequenceNumber B16;
104 CARD32 num_types B32;
110 } xXResQueryClientResourcesReply;
111 #define sz_xXResQueryClientResourcesReply 32
113 /* XResQueryClientPixmapBytes */
115 typedef struct _XResQueryClientPixmapBytes {
120 } xXResQueryClientPixmapBytesReq;
121 #define sz_xXResQueryClientPixmapBytesReq 8
126 CARD16 sequenceNumber B16;
129 CARD32 bytes_overflow B32;
134 } xXResQueryClientPixmapBytesReply;
135 #define sz_xXResQueryClientPixmapBytesReply 32
137 /* v1.2 XResQueryClientIds */
139 #define X_XResClientXIDMask 0x01
140 #define X_XResLocalClientPIDMask 0x02
142 typedef struct _XResClientIdSpec {
146 #define sz_xXResClientIdSpec 8
148 typedef struct _XResClientIdValue {
149 xXResClientIdSpec spec;
151 // followed by length CARD32s
152 } xXResClientIdValue;
153 #define sz_xResClientIdValue (sz_xXResClientIdSpec + 4)
155 typedef struct _XResQueryClientIds {
160 // followed by numSpecs times XResClientIdSpec
161 } xXResQueryClientIdsReq;
162 #define sz_xXResQueryClientIdsReq 8
167 CARD16 sequenceNumber B16;
175 // followed by numIds times XResClientIdValue
176 } xXResQueryClientIdsReply;
177 #define sz_xXResQueryClientIdsReply 32
179 /* v1.2 XResQueryResourceBytes */
181 typedef struct _XResResourceIdSpec {
184 } xXResResourceIdSpec;
185 #define sz_xXResResourceIdSpec 8
187 typedef struct _XResQueryResourceBytes {
193 // followed by numSpecs times XResResourceIdSpec
194 } xXResQueryResourceBytesReq;
195 #define sz_xXResQueryResourceBytesReq 12
197 typedef struct _XResResourceSizeSpec {
198 xXResResourceIdSpec spec;
202 } xXResResourceSizeSpec;
203 #define sz_xXResResourceSizeSpec (sz_xXResResourceIdSpec + 12)
205 typedef struct _XResResourceSizeValue {
206 xXResResourceSizeSpec size;
207 CARD32 numCrossReferences B32;
208 // followed by numCrossReferences times XResResourceSizeSpec
209 } xXResResourceSizeValue;
210 #define sz_xXResResourceSizeValue (sz_xXResResourceSizeSpec + 4)
215 CARD16 sequenceNumber B16;
223 // followed by numSizes times XResResourceSizeValue
224 } xXResQueryResourceBytesReply;
225 #define sz_xXResQueryResourceBytesReply 32
227 #endif /* _XRESPROTO_H */