2 * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation on the rights to use, copy, modify, merge,
10 * publish, distribute, sublicense, and/or sell copies of the Software,
11 * and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial
16 * portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
22 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * Rickard E. (Rik) Faith <faith@redhat.com>
35 * This file describes the structures necessary to implement the wire
36 * protocol for the DMX protocol extension. It should be included only
37 * in files that implement the client-side (or server-side) part of the
38 * protocol (i.e., client-side applications should \b not include this
44 #define DMX_EXTENSION_NAME "DMX"
45 #define DMX_EXTENSION_MAJOR 2
46 #define DMX_EXTENSION_MINOR 2
47 #define DMX_EXTENSION_PATCH 20040604
49 /* These values must be larger than LastExtensionError.
50 The values in dmxext.h and dmxproto.h *MUST* match. */
51 #define DMX_BAD_XINERAMA 1001
52 #define DMX_BAD_VALUE 1002
54 #define X_DMXQueryVersion 0
55 #define X_DMXGetScreenCount 1
56 #define X_DMXGetScreenInformationDEPRECATED 2
57 #define X_DMXGetWindowAttributes 3
58 #define X_DMXGetInputCount 4
59 #define X_DMXGetInputAttributes 5
60 #define X_DMXForceWindowCreationDEPRECATED 6
61 #define X_DMXReconfigureScreenDEPRECATED 7
63 #define X_DMXForceWindowCreation 9
64 #define X_DMXGetScreenAttributes 10
65 #define X_DMXChangeScreensAttributes 11
66 #define X_DMXAddScreen 12
67 #define X_DMXRemoveScreen 13
68 #define X_DMXGetDesktopAttributes 14
69 #define X_DMXChangeDesktopAttributes 15
70 #define X_DMXAddInput 16
71 #define X_DMXRemoveInput 17
73 /** Wire-level description of DMXQueryVersion protocol request. */
75 CARD8 reqType; /* dmxcode */
76 CARD8 dmxReqType; /* X_DMXQueryVersion */
78 } xDMXQueryVersionReq;
79 #define sz_xDMXQueryVersionReq 4
81 /** Wire-level description of DMXQueryVersion protocol reply. */
83 BYTE type; /* X_Reply */
85 CARD16 sequenceNumber B16;
87 CARD32 majorVersion B32;
88 CARD32 minorVersion B32;
89 CARD32 patchVersion B32;
93 } xDMXQueryVersionReply;
94 #define sz_xDMXQueryVersionReply 32
96 /** Wire-level description of DMXSync protocol request. */
98 CARD8 reqType; /* DMXCode */
99 CARD8 dmxReqType; /* X_DMXSync */
102 #define sz_xDMXSyncReq 4
104 /** Wire-level description of DMXSync protocol reply. */
106 BYTE type; /* X_Reply */
108 CARD16 sequenceNumber B16;
117 #define sz_xDMXSyncReply 32
119 /** Wire-level description of DMXForceWindowCreation protocol request. */
121 CARD8 reqType; /* DMXCode */
122 CARD8 dmxReqType; /* X_DMXForceWindowCreation */
125 } xDMXForceWindowCreationReq;
126 #define sz_xDMXForceWindowCreationReq 8
128 /** Wire-level description of DMXForceWindowCreation protocol reply. */
130 BYTE type; /* X_Reply */
132 CARD16 sequenceNumber B16;
140 } xDMXForceWindowCreationReply;
141 #define sz_xDMXForceWindowCreationReply 32
143 /** Wire-level description of DMXGetScreenCount protocol request. */
145 CARD8 reqType; /* DMXCode */
146 CARD8 dmxReqType; /* X_DMXGetScreenCount */
148 } xDMXGetScreenCountReq;
149 #define sz_xDMXGetScreenCountReq 4
151 /** Wire-level description of DMXGetScreenCount protocol reply. */
153 BYTE type; /* X_Reply */
155 CARD16 sequenceNumber B16;
157 CARD32 screenCount B32;
163 } xDMXGetScreenCountReply;
164 #define sz_xDMXGetScreenCountReply 32
166 /** Wire-level description of DMXGetScreenAttributes protocol request. */
168 CARD8 reqType; /* DMXCode */
169 CARD8 dmxReqType; /* X_DMXGetScreenAttributes */
171 CARD32 physicalScreen B32;
172 } xDMXGetScreenAttributesReq;
173 #define sz_xDMXGetScreenAttributesReq 8
175 /** Wire-level description of DMXGetScreenAttributes protocol reply. */
177 BYTE type; /* X_Reply */
179 CARD16 sequenceNumber B16;
181 CARD32 displayNameLength B32;
182 CARD32 logicalScreen B32;
184 CARD16 screenWindowWidth B16;
185 CARD16 screenWindowHeight B16;
186 INT16 screenWindowXoffset B16;
187 INT16 screenWindowYoffset B16;
189 CARD16 rootWindowWidth B16;
190 CARD16 rootWindowHeight B16;
191 INT16 rootWindowXoffset B16;
192 INT16 rootWindowYoffset B16;
193 INT16 rootWindowXorigin B16;
194 INT16 rootWindowYorigin B16;
195 } xDMXGetScreenAttributesReply;
196 #define sz_xDMXGetScreenAttributesReply 36
198 /** Wire-level description of DMXChangeScreensAttributes protocol request. */
200 CARD8 reqType; /* DMXCode */
201 CARD8 dmxReqType; /* X_DMXChangeScreensAttributes */
203 CARD32 screenCount B32;
204 CARD32 maskCount B32;
205 } xDMXChangeScreensAttributesReq;
206 #define sz_xDMXChangeScreensAttributesReq 12
208 /** Wire-level description of DMXChangeScreensAttributes protocol reply. */
210 BYTE type; /* X_Reply */
212 CARD16 sequenceNumber B16;
215 CARD32 errorScreen B32;
220 } xDMXChangeScreensAttributesReply;
221 #define sz_xDMXChangeScreensAttributesReply 32
223 /** Wire-level description of DMXAddScreen protocol request. */
225 CARD8 reqType; /* DMXCode */
226 CARD8 dmxReqType; /* X_DMXAddScreen */
228 CARD32 displayNameLength B32;
229 CARD32 physicalScreen B32;
230 CARD32 valueMask B32;
232 #define sz_xDMXAddScreenReq 16
234 /** Wire-level description of DMXAddScreen protocol reply. */
236 BYTE type; /* X_Reply */
238 CARD16 sequenceNumber B16;
241 CARD32 physicalScreen B32;
246 } xDMXAddScreenReply;
247 #define sz_xDMXAddScreenReply 32
249 /** Wire-level description of DMXRemoveScreen protocol request. */
251 CARD8 reqType; /* DMXCode */
252 CARD8 dmxReqType; /* X_DMXRemoveScreen */
254 CARD32 physicalScreen B32;
255 } xDMXRemoveScreenReq;
256 #define sz_xDMXRemoveScreenReq 8
258 /** Wire-level description of DMXRemoveScreen protocol reply. */
260 BYTE type; /* X_Reply */
262 CARD16 sequenceNumber B16;
270 } xDMXRemoveScreenReply;
271 #define sz_xDMXRemoveScreenReply 32
273 /** Wire-level description of DMXGetWindowAttributes protocol request. */
275 CARD8 reqType; /* DMXCode */
276 CARD8 dmxReqType; /* X_DMXGetWindowAttributes */
279 } xDMXGetWindowAttributesReq;
280 #define sz_xDMXGetWindowAttributesReq 8
282 /** Wire-level description of DMXGetWindowAttributes protocol reply. */
284 BYTE type; /* X_Reply */
286 CARD16 sequenceNumber B16;
288 CARD32 screenCount B32;
294 } xDMXGetWindowAttributesReply;
295 #define sz_xDMXGetWindowAttributesReply 32
297 /** Wire-level description of DMXGetDesktopAttributes protocol request. */
299 CARD8 reqType; /* DMXCode */
300 CARD8 dmxReqType; /* X_DMXGetDesktopAttributes */
302 } xDMXGetDesktopAttributesReq;
303 #define sz_xDMXGetDesktopAttributesReq 4
305 /** Wire-level description of DMXGetDesktopAttributes protocol reply. */
307 BYTE type; /* X_Reply */
309 CARD16 sequenceNumber B16;
319 } xDMXGetDesktopAttributesReply;
320 #define sz_xDMXGetDesktopAttributesReply 32
322 /** Wire-level description of DMXChangeDesktopAttributes protocol request. */
324 CARD8 reqType; /* DMXCode */
325 CARD8 dmxReqType; /* X_DMXChangeDesktopAttributes */
327 CARD32 valueMask B32;
328 } xDMXChangeDesktopAttributesReq;
329 #define sz_xDMXChangeDesktopAttributesReq 8
331 /** Wire-level description of DMXChangeDesktopAttributes protocol reply. */
333 BYTE type; /* X_Reply */
335 CARD16 sequenceNumber B16;
343 } xDMXChangeDesktopAttributesReply;
344 #define sz_xDMXChangeDesktopAttributesReply 32
346 /** Wire-level description of DMXGetInputCount protocol request. */
348 CARD8 reqType; /* DMXCode */
349 CARD8 dmxReqType; /* X_DMXGetInputCount */
351 } xDMXGetInputCountReq;
352 #define sz_xDMXGetInputCountReq 4
354 /** Wire-level description of DMXGetInputCount protocol reply. */
356 BYTE type; /* X_Reply */
358 CARD16 sequenceNumber B16;
360 CARD32 inputCount B32;
366 } xDMXGetInputCountReply;
367 #define sz_xDMXGetInputCountReply 32
369 /** Wire-level description of DMXGetInputAttributes protocol request. */
371 CARD8 reqType; /* DMXCode */
372 CARD8 dmxReqType; /* X_DMXGetInputAttributes */
375 } xDMXGetInputAttributesReq;
376 #define sz_xDMXGetInputAttributesReq 8
378 /** Wire-level description of DMXGetInputAttributes protocol reply. */
380 BYTE type; /* X_Reply */
382 CARD16 sequenceNumber B16;
384 CARD32 inputType B32;
385 CARD32 physicalScreen B32;
386 CARD32 physicalId B32;
387 CARD32 nameLength B32;
393 } xDMXGetInputAttributesReply;
394 #define sz_xDMXGetInputAttributesReply 32
396 /** Wire-level description of DMXAddInput protocol request. */
398 CARD8 reqType; /* DMXCode */
399 CARD8 dmxReqType; /* X_DMXAddInput */
401 CARD32 displayNameLength B32;
404 #define sz_xDMXAddInputReq 12
406 /** Wire-level description of DMXAddInput protocol reply. */
408 BYTE type; /* X_Reply */
410 CARD16 sequenceNumber B16;
413 CARD32 physicalId B32;
419 #define sz_xDMXAddInputReply 32
421 /** Wire-level description of DMXRemoveInput protocol request. */
423 CARD8 reqType; /* DMXCode */
424 CARD8 dmxReqType; /* X_DMXRemoveInput */
426 CARD32 physicalId B32;
427 } xDMXRemoveInputReq;
428 #define sz_xDMXRemoveInputReq 8
430 /** Wire-level description of DMXRemoveInput protocol reply. */
434 CARD16 sequenceNumber B16;
442 } xDMXRemoveInputReply;
443 #define sz_xDMXRemoveInputReply 32