blob: 13b5cdbe1c75b2614656274fb5d2b3628423abf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
/*
Copyright (c) 2002 XFree86 Inc
*/
#ifndef _XRESPROTO_H
#define _XRESPROTO_H
#define XRES_MAJOR_VERSION 1
#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;
} xXResClient;
#define sz_xXResClient 8
typedef struct {
CARD32 resource_type;
CARD32 count;
} xXResType;
#define sz_xXResType 8
/* XResQueryVersion */
typedef struct _XResQueryVersion {
CARD8 reqType;
CARD8 XResReqType;
CARD16 length B16;
CARD8 client_major;
CARD8 client_minor;
CARD16 unused B16;
} xXResQueryVersionReq;
#define sz_xXResQueryVersionReq 8
typedef struct {
CARD8 type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 server_major B16;
CARD16 server_minor B16;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXResQueryVersionReply;
#define sz_xXResQueryVersionReply 32
/* XResQueryClients */
typedef struct _XResQueryClients {
CARD8 reqType;
CARD8 XResReqType;
CARD16 length B16;
} xXResQueryClientsReq;
#define sz_xXResQueryClientsReq 4
typedef struct {
CARD8 type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 num_clients B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXResQueryClientsReply;
#define sz_xXResQueryClientsReply 32
/* XResQueryClientResources */
typedef struct _XResQueryClientResources {
CARD8 reqType;
CARD8 XResReqType;
CARD16 length B16;
CARD32 xid B32;
} xXResQueryClientResourcesReq;
#define sz_xXResQueryClientResourcesReq 8
typedef struct {
CARD8 type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 num_types B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXResQueryClientResourcesReply;
#define sz_xXResQueryClientResourcesReply 32
/* XResQueryClientPixmapBytes */
typedef struct _XResQueryClientPixmapBytes {
CARD8 reqType;
CARD8 XResReqType;
CARD16 length B16;
CARD32 xid B32;
} xXResQueryClientPixmapBytesReq;
#define sz_xXResQueryClientPixmapBytesReq 8
typedef struct {
CARD8 type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 bytes B32;
CARD32 bytes_overflow B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} 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 */
|