3
* Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
7
* Permission is hereby granted, free of charge, to any person obtaining
8
* a copy of this software and associated documentation files (the
9
* "Software"), to deal in the Software without restriction, including
10
* without limitation on the rights to use, copy, modify, merge,
11
* publish, distribute, sublicense, and/or sell copies of the Software,
12
* and to permit persons to whom the Software is furnished to do so,
13
* subject to the following conditions:
15
* The above copyright notice and this permission notice (including the
16
* next paragraph) shall be included in all copies or substantial
17
* portions of the Software.
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
* NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
23
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
24
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
* Rickard E. (Rik) Faith <faith@redhat.com>
36
* This file describes the structures necessary to implement the wire
37
* protocol for the DMX protocol extension. It should be included only
38
* in files that implement the client-side (or server-side) part of the
39
* protocol (i.e., client-side applications should \b not include this
45
#define DMX_EXTENSION_NAME "DMX"
46
#define DMX_EXTENSION_MAJOR 2
47
#define DMX_EXTENSION_MINOR 2
48
#define DMX_EXTENSION_PATCH 20040604
50
/* These values must be larger than LastExtensionError.
51
The values in dmxext.h and dmxproto.h *MUST* match. */
52
#define DMX_BAD_XINERAMA 1001
53
#define DMX_BAD_VALUE 1002
55
#define X_DMXQueryVersion 0
56
#define X_DMXGetScreenCount 1
57
#define X_DMXGetScreenInformationDEPRECATED 2
58
#define X_DMXGetWindowAttributes 3
59
#define X_DMXGetInputCount 4
60
#define X_DMXGetInputAttributes 5
61
#define X_DMXForceWindowCreationDEPRECATED 6
62
#define X_DMXReconfigureScreenDEPRECATED 7
64
#define X_DMXForceWindowCreation 9
65
#define X_DMXGetScreenAttributes 10
66
#define X_DMXChangeScreensAttributes 11
67
#define X_DMXAddScreen 12
68
#define X_DMXRemoveScreen 13
69
#define X_DMXGetDesktopAttributes 14
70
#define X_DMXChangeDesktopAttributes 15
71
#define X_DMXAddInput 16
72
#define X_DMXRemoveInput 17
74
/** Wire-level description of DMXQueryVersion protocol request. */
76
CARD8 reqType; /* dmxcode */
77
CARD8 dmxReqType; /* X_DMXQueryVersion */
79
} xDMXQueryVersionReq;
80
#define sz_xDMXQueryVersionReq 4
82
/** Wire-level description of DMXQueryVersion protocol reply. */
84
BYTE type; /* X_Reply */
86
CARD16 sequenceNumber B16;
88
CARD32 majorVersion B32;
89
CARD32 minorVersion B32;
90
CARD32 patchVersion B32;
94
} xDMXQueryVersionReply;
95
#define sz_xDMXQueryVersionReply 32
97
/** Wire-level description of DMXSync protocol request. */
99
CARD8 reqType; /* DMXCode */
100
CARD8 dmxReqType; /* X_DMXSync */
103
#define sz_xDMXSyncReq 4
105
/** Wire-level description of DMXSync protocol reply. */
107
BYTE type; /* X_Reply */
109
CARD16 sequenceNumber B16;
118
#define sz_xDMXSyncReply 32
120
/** Wire-level description of DMXForceWindowCreation protocol request. */
122
CARD8 reqType; /* DMXCode */
123
CARD8 dmxReqType; /* X_DMXForceWindowCreation */
126
} xDMXForceWindowCreationReq;
127
#define sz_xDMXForceWindowCreationReq 8
129
/** Wire-level description of DMXForceWindowCreation protocol reply. */
131
BYTE type; /* X_Reply */
133
CARD16 sequenceNumber B16;
141
} xDMXForceWindowCreationReply;
142
#define sz_xDMXForceWindowCreationReply 32
144
/** Wire-level description of DMXGetScreenCount protocol request. */
146
CARD8 reqType; /* DMXCode */
147
CARD8 dmxReqType; /* X_DMXGetScreenCount */
149
} xDMXGetScreenCountReq;
150
#define sz_xDMXGetScreenCountReq 4
152
/** Wire-level description of DMXGetScreenCount protocol reply. */
154
BYTE type; /* X_Reply */
156
CARD16 sequenceNumber B16;
158
CARD32 screenCount B32;
164
} xDMXGetScreenCountReply;
165
#define sz_xDMXGetScreenCountReply 32
167
/** Wire-level description of DMXGetScreenAttributes protocol request. */
169
CARD8 reqType; /* DMXCode */
170
CARD8 dmxReqType; /* X_DMXGetScreenAttributes */
172
CARD32 physicalScreen B32;
173
} xDMXGetScreenAttributesReq;
174
#define sz_xDMXGetScreenAttributesReq 8
176
/** Wire-level description of DMXGetScreenAttributes protocol reply. */
178
BYTE type; /* X_Reply */
180
CARD16 sequenceNumber B16;
182
CARD32 displayNameLength B32;
183
CARD32 logicalScreen B32;
185
CARD16 screenWindowWidth B16;
186
CARD16 screenWindowHeight B16;
187
INT16 screenWindowXoffset B16;
188
INT16 screenWindowYoffset B16;
190
CARD16 rootWindowWidth B16;
191
CARD16 rootWindowHeight B16;
192
INT16 rootWindowXoffset B16;
193
INT16 rootWindowYoffset B16;
194
INT16 rootWindowXorigin B16;
195
INT16 rootWindowYorigin B16;
196
} xDMXGetScreenAttributesReply;
197
#define sz_xDMXGetScreenAttributesReply 36
199
/** Wire-level description of DMXChangeScreensAttributes protocol request. */
201
CARD8 reqType; /* DMXCode */
202
CARD8 dmxReqType; /* X_DMXChangeScreensAttributes */
204
CARD32 screenCount B32;
205
CARD32 maskCount B32;
206
} xDMXChangeScreensAttributesReq;
207
#define sz_xDMXChangeScreensAttributesReq 12
209
/** Wire-level description of DMXChangeScreensAttributes protocol reply. */
211
BYTE type; /* X_Reply */
213
CARD16 sequenceNumber B16;
216
CARD32 errorScreen B32;
221
} xDMXChangeScreensAttributesReply;
222
#define sz_xDMXChangeScreensAttributesReply 32
224
/** Wire-level description of DMXAddScreen protocol request. */
226
CARD8 reqType; /* DMXCode */
227
CARD8 dmxReqType; /* X_DMXAddScreen */
229
CARD32 displayNameLength B32;
230
CARD32 physicalScreen B32;
231
CARD32 valueMask B32;
233
#define sz_xDMXAddScreenReq 16
235
/** Wire-level description of DMXAddScreen protocol reply. */
237
BYTE type; /* X_Reply */
239
CARD16 sequenceNumber B16;
242
CARD32 physicalScreen B32;
247
} xDMXAddScreenReply;
248
#define sz_xDMXAddScreenReply 32
250
/** Wire-level description of DMXRemoveScreen protocol request. */
252
CARD8 reqType; /* DMXCode */
253
CARD8 dmxReqType; /* X_DMXRemoveScreen */
255
CARD32 physicalScreen B32;
256
} xDMXRemoveScreenReq;
257
#define sz_xDMXRemoveScreenReq 8
259
/** Wire-level description of DMXRemoveScreen protocol reply. */
261
BYTE type; /* X_Reply */
263
CARD16 sequenceNumber B16;
271
} xDMXRemoveScreenReply;
272
#define sz_xDMXRemoveScreenReply 32
274
/** Wire-level description of DMXGetWindowAttributes protocol request. */
276
CARD8 reqType; /* DMXCode */
277
CARD8 dmxReqType; /* X_DMXGetWindowAttributes */
280
} xDMXGetWindowAttributesReq;
281
#define sz_xDMXGetWindowAttributesReq 8
283
/** Wire-level description of DMXGetWindowAttributes protocol reply. */
285
BYTE type; /* X_Reply */
287
CARD16 sequenceNumber B16;
289
CARD32 screenCount B32;
295
} xDMXGetWindowAttributesReply;
296
#define sz_xDMXGetWindowAttributesReply 32
298
/** Wire-level description of DMXGetDesktopAttributes protocol request. */
300
CARD8 reqType; /* DMXCode */
301
CARD8 dmxReqType; /* X_DMXGetDesktopAttributes */
303
} xDMXGetDesktopAttributesReq;
304
#define sz_xDMXGetDesktopAttributesReq 4
306
/** Wire-level description of DMXGetDesktopAttributes protocol reply. */
308
BYTE type; /* X_Reply */
310
CARD16 sequenceNumber B16;
320
} xDMXGetDesktopAttributesReply;
321
#define sz_xDMXGetDesktopAttributesReply 32
323
/** Wire-level description of DMXChangeDesktopAttributes protocol request. */
325
CARD8 reqType; /* DMXCode */
326
CARD8 dmxReqType; /* X_DMXChangeDesktopAttributes */
328
CARD32 valueMask B32;
329
} xDMXChangeDesktopAttributesReq;
330
#define sz_xDMXChangeDesktopAttributesReq 8
332
/** Wire-level description of DMXChangeDesktopAttributes protocol reply. */
334
BYTE type; /* X_Reply */
336
CARD16 sequenceNumber B16;
344
} xDMXChangeDesktopAttributesReply;
345
#define sz_xDMXChangeDesktopAttributesReply 32
347
/** Wire-level description of DMXGetInputCount protocol request. */
349
CARD8 reqType; /* DMXCode */
350
CARD8 dmxReqType; /* X_DMXGetInputCount */
352
} xDMXGetInputCountReq;
353
#define sz_xDMXGetInputCountReq 4
355
/** Wire-level description of DMXGetInputCount protocol reply. */
357
BYTE type; /* X_Reply */
359
CARD16 sequenceNumber B16;
361
CARD32 inputCount B32;
367
} xDMXGetInputCountReply;
368
#define sz_xDMXGetInputCountReply 32
370
/** Wire-level description of DMXGetInputAttributes protocol request. */
372
CARD8 reqType; /* DMXCode */
373
CARD8 dmxReqType; /* X_DMXGetInputAttributes */
376
} xDMXGetInputAttributesReq;
377
#define sz_xDMXGetInputAttributesReq 8
379
/** Wire-level description of DMXGetInputAttributes protocol reply. */
381
BYTE type; /* X_Reply */
383
CARD16 sequenceNumber B16;
385
CARD32 inputType B32;
386
CARD32 physicalScreen B32;
387
CARD32 physicalId B32;
388
CARD32 nameLength B32;
394
} xDMXGetInputAttributesReply;
395
#define sz_xDMXGetInputAttributesReply 32
397
/** Wire-level description of DMXAddInput protocol request. */
399
CARD8 reqType; /* DMXCode */
400
CARD8 dmxReqType; /* X_DMXAddInput */
402
CARD32 displayNameLength B32;
405
#define sz_xDMXAddInputReq 12
407
/** Wire-level description of DMXAddInput protocol reply. */
409
BYTE type; /* X_Reply */
411
CARD16 sequenceNumber B16;
414
CARD32 physicalId B32;
420
#define sz_xDMXAddInputReply 32
422
/** Wire-level description of DMXRemoveInput protocol request. */
424
CARD8 reqType; /* DMXCode */
425
CARD8 dmxReqType; /* X_DMXRemoveInput */
427
CARD32 physicalId B32;
428
} xDMXRemoveInputReq;
429
#define sz_xDMXRemoveInputReq 8
431
/** Wire-level description of DMXRemoveInput protocol reply. */
435
CARD16 sequenceNumber B16;
443
} xDMXRemoveInputReply;
444
#define sz_xDMXRemoveInputReply 32