]> git.sesse.net Git - rdpsrv/blob - Xserver/include/Xproto.h
Support RDP5 logon packets.
[rdpsrv] / Xserver / include / Xproto.h
1 /*
2  *      $XConsortium: Xproto.h /main/21 1996/03/20 15:27:51 mor $
3  */
4
5 /* Definitions for the X window system used by server and c bindings */
6
7 /*
8  * This packet-construction scheme makes the following assumptions:
9  *
10  * 1. The compiler is able
11  * to generate code which addresses one- and two-byte quantities.
12  * In the worst case, this would be done with bit-fields.  If bit-fields
13  * are used it may be necessary to reorder the request fields in this file,
14  * depending on the order in which the machine assigns bit fields to
15  * machine words.  There may also be a problem with sign extension,
16  * as K+R specify that bitfields are always unsigned.
17  *
18  * 2. 2- and 4-byte fields in packet structures must be ordered by hand
19  * such that they are naturally-aligned, so that no compiler will ever
20  * insert padding bytes.
21  *
22  * 3. All packets are hand-padded to a multiple of 4 bytes, for
23  * the same reason.
24  */
25
26 #ifndef XPROTO_H
27 #define XPROTO_H
28
29 /***********************************************************
30
31 Copyright (c) 1987  X Consortium
32
33 Permission is hereby granted, free of charge, to any person obtaining a copy
34 of this software and associated documentation files (the "Software"), to deal
35 in the Software without restriction, including without limitation the rights
36 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37 copies of the Software, and to permit persons to whom the Software is
38 furnished to do so, subject to the following conditions:
39
40 The above copyright notice and this permission notice shall be included in
41 all copies or substantial portions of the Software.
42
43 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
46 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
47 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
48 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49
50 Except as contained in this notice, the name of the X Consortium shall not be
51 used in advertising or otherwise to promote the sale, use or other dealings
52 in this Software without prior written authorization from the X Consortium.
53
54
55 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
56
57                         All Rights Reserved
58
59 Permission to use, copy, modify, and distribute this software and its 
60 documentation for any purpose and without fee is hereby granted, 
61 provided that the above copyright notice appear in all copies and that
62 both that copyright notice and this permission notice appear in 
63 supporting documentation, and that the name of Digital not be
64 used in advertising or publicity pertaining to distribution of the
65 software without specific, written prior permission.  
66
67 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
68 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
69 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
70 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
71 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
72 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
73 SOFTWARE.
74
75 ******************************************************************/
76
77 #include <X11/Xmd.h>
78 #include <X11/Xprotostr.h>
79
80 /*
81  * Define constants for the sizes of the network packets.  The sz_ prefix is
82  * used instead of something more descriptive so that the symbols are no more
83  * than 32 characters in length (which causes problems for some compilers).
84  */
85 #define sz_xSegment 8
86 #define sz_xPoint 4
87 #define sz_xRectangle 8
88 #define sz_xArc 12
89 #define sz_xConnClientPrefix 12
90 #define sz_xConnSetupPrefix 8
91 #define sz_xConnSetup 32
92 #define sz_xPixmapFormat 8
93 #define sz_xDepth 8
94 #define sz_xVisualType 24
95 #define sz_xWindowRoot 40
96 #define sz_xTimecoord 8
97 #define sz_xHostEntry 4
98 #define sz_xCharInfo 12
99 #define sz_xFontProp 8
100 #define sz_xTextElt 2
101 #define sz_xColorItem 12
102 #define sz_xrgb 8
103 #define sz_xGenericReply 32
104 #define sz_xGetWindowAttributesReply 44
105 #define sz_xGetGeometryReply 32
106 #define sz_xQueryTreeReply 32
107 #define sz_xInternAtomReply 32
108 #define sz_xGetAtomNameReply 32
109 #define sz_xGetPropertyReply 32
110 #define sz_xListPropertiesReply 32
111 #define sz_xGetSelectionOwnerReply 32
112 #define sz_xGrabPointerReply 32
113 #define sz_xQueryPointerReply 32
114 #define sz_xGetMotionEventsReply 32
115 #define sz_xTranslateCoordsReply 32
116 #define sz_xGetInputFocusReply 32
117 #define sz_xQueryKeymapReply 40
118 #define sz_xQueryFontReply 60
119 #define sz_xQueryTextExtentsReply 32
120 #define sz_xListFontsReply 32
121 #define sz_xGetFontPathReply 32
122 #define sz_xGetImageReply 32
123 #define sz_xListInstalledColormapsReply 32
124 #define sz_xAllocColorReply 32
125 #define sz_xAllocNamedColorReply 32
126 #define sz_xAllocColorCellsReply 32
127 #define sz_xAllocColorPlanesReply 32
128 #define sz_xQueryColorsReply 32
129 #define sz_xLookupColorReply 32
130 #define sz_xQueryBestSizeReply 32
131 #define sz_xQueryExtensionReply 32
132 #define sz_xListExtensionsReply 32
133 #define sz_xSetMappingReply 32
134 #define sz_xGetKeyboardControlReply 52
135 #define sz_xGetPointerControlReply 32
136 #define sz_xGetScreenSaverReply 32
137 #define sz_xListHostsReply 32
138 #define sz_xSetModifierMappingReply 32
139 #define sz_xError 32
140 #define sz_xEvent 32
141 #define sz_xKeymapEvent 32
142 #define sz_xReq 4
143 #define sz_xResourceReq 8
144 #define sz_xCreateWindowReq 32
145 #define sz_xChangeWindowAttributesReq 12
146 #define sz_xChangeSaveSetReq 8
147 #define sz_xReparentWindowReq 16
148 #define sz_xConfigureWindowReq 12
149 #define sz_xCirculateWindowReq 8
150 #define sz_xInternAtomReq 8
151 #define sz_xChangePropertyReq 24
152 #define sz_xDeletePropertyReq 12
153 #define sz_xGetPropertyReq 24
154 #define sz_xSetSelectionOwnerReq 16
155 #define sz_xConvertSelectionReq 24
156 #define sz_xSendEventReq 44
157 #define sz_xGrabPointerReq 24
158 #define sz_xGrabButtonReq 24
159 #define sz_xUngrabButtonReq 12
160 #define sz_xChangeActivePointerGrabReq 16
161 #define sz_xGrabKeyboardReq 16
162 #define sz_xGrabKeyReq 16
163 #define sz_xUngrabKeyReq 12
164 #define sz_xAllowEventsReq 8
165 #define sz_xGetMotionEventsReq 16
166 #define sz_xTranslateCoordsReq 16
167 #define sz_xWarpPointerReq 24
168 #define sz_xSetInputFocusReq 12
169 #define sz_xOpenFontReq 12
170 #define sz_xQueryTextExtentsReq 8
171 #define sz_xListFontsReq 8
172 #define sz_xSetFontPathReq 8
173 #define sz_xCreatePixmapReq 16
174 #define sz_xCreateGCReq 16
175 #define sz_xChangeGCReq 12
176 #define sz_xCopyGCReq 16
177 #define sz_xSetDashesReq 12
178 #define sz_xSetClipRectanglesReq 12
179 #define sz_xCopyAreaReq 28
180 #define sz_xCopyPlaneReq 32
181 #define sz_xPolyPointReq 12
182 #define sz_xPolySegmentReq 12
183 #define sz_xFillPolyReq 16
184 #define sz_xPutImageReq 24
185 #define sz_xGetImageReq 20
186 #define sz_xPolyTextReq 16
187 #define sz_xImageTextReq 16
188 #define sz_xCreateColormapReq 16
189 #define sz_xCopyColormapAndFreeReq 12
190 #define sz_xAllocColorReq 16
191 #define sz_xAllocNamedColorReq 12
192 #define sz_xAllocColorCellsReq 12
193 #define sz_xAllocColorPlanesReq 16
194 #define sz_xFreeColorsReq 12
195 #define sz_xStoreColorsReq 8
196 #define sz_xStoreNamedColorReq 16
197 #define sz_xQueryColorsReq 8
198 #define sz_xLookupColorReq 12
199 #define sz_xCreateCursorReq 32
200 #define sz_xCreateGlyphCursorReq 32
201 #define sz_xRecolorCursorReq 20
202 #define sz_xQueryBestSizeReq 12
203 #define sz_xQueryExtensionReq 8
204 #define sz_xChangeKeyboardControlReq 8
205 #define sz_xBellReq 4
206 #define sz_xChangePointerControlReq 12
207 #define sz_xSetScreenSaverReq 12
208 #define sz_xChangeHostsReq 8
209 #define sz_xListHostsReq 4
210 #define sz_xChangeModeReq 4
211 #define sz_xRotatePropertiesReq 12
212 #define sz_xReply 32
213 #define sz_xGrabKeyboardReply 32
214 #define sz_xListFontsWithInfoReply 60
215 #define sz_xSetPointerMappingReply 32
216 #define sz_xGetKeyboardMappingReply 32
217 #define sz_xGetPointerMappingReply 32
218 #define sz_xGetModifierMappingReply 32
219 #define sz_xListFontsWithInfoReq 8
220 #define sz_xPolyLineReq 12
221 #define sz_xPolyArcReq 12
222 #define sz_xPolyRectangleReq 12
223 #define sz_xPolyFillRectangleReq 12
224 #define sz_xPolyFillArcReq 12
225 #define sz_xPolyText8Req 16
226 #define sz_xPolyText16Req 16
227 #define sz_xImageText8Req 16
228 #define sz_xImageText16Req 16
229 #define sz_xSetPointerMappingReq 4
230 #define sz_xForceScreenSaverReq 4
231 #define sz_xSetCloseDownModeReq 4
232 #define sz_xClearAreaReq 16
233 #define sz_xSetAccessControlReq 4
234 #define sz_xGetKeyboardMappingReq 8
235 #define sz_xSetModifierMappingReq 4
236 #define sz_xPropIconSize 24
237 #define sz_xChangeKeyboardMappingReq 8
238
239
240 /* For the purpose of the structure definitions in this file,
241 we must redefine the following types in terms of Xmd.h's types, which may
242 include bit fields.  All of these are #undef'd at the end of this file,
243 restoring the definitions in X.h.  */
244
245 #define Window CARD32
246 #define Drawable CARD32
247 #define Font CARD32
248 #define Pixmap CARD32
249 #define Cursor CARD32
250 #define Colormap CARD32
251 #define GContext CARD32
252 #define Atom CARD32
253 #define VisualID CARD32
254 #define Time CARD32
255 #define KeyCode CARD8
256 #define KeySym CARD32
257
258 #define X_TCP_PORT 6000     /* add display number */
259
260 #define xTrue        1
261 #define xFalse       0
262
263
264 typedef CARD16 KeyButMask;
265
266 /***************** 
267    connection setup structure.  This is followed by
268    numRoots xWindowRoot structs.
269 *****************/
270
271 typedef struct {
272     CARD8       byteOrder;
273     BYTE        pad;
274     CARD16      majorVersion B16, minorVersion B16;
275     CARD16      nbytesAuthProto B16;    /* Authorization protocol */
276     CARD16      nbytesAuthString B16;   /* Authorization string */
277     CARD16      pad2 B16;
278 } xConnClientPrefix;
279
280 typedef struct {
281     CARD8          success;
282     BYTE           lengthReason; /*num bytes in string following if failure */
283     CARD16         majorVersion B16, 
284                    minorVersion B16;
285     CARD16         length B16;  /* 1/4 additional bytes in setup info */
286 } xConnSetupPrefix;
287
288
289 typedef struct {
290     CARD32         release B32;
291     CARD32         ridBase B32, 
292                    ridMask B32;
293     CARD32         motionBufferSize B32;
294     CARD16         nbytesVendor B16;  /* number of bytes in vendor string */
295     CARD16         maxRequestSize B16;
296     CARD8          numRoots;          /* number of roots structs to follow */
297     CARD8          numFormats;        /* number of pixmap formats */
298     CARD8          imageByteOrder;        /* LSBFirst, MSBFirst */
299     CARD8          bitmapBitOrder;        /* LeastSignificant, MostSign...*/
300     CARD8          bitmapScanlineUnit,     /* 8, 16, 32 */
301                    bitmapScanlinePad;     /* 8, 16, 32 */
302     KeyCode        minKeyCode, maxKeyCode;
303     CARD32         pad2 B32;
304 } xConnSetup;
305
306 typedef struct {
307     CARD8          depth;
308     CARD8          bitsPerPixel;
309     CARD8          scanLinePad;
310     CARD8          pad1;
311     CARD32         pad2 B32;
312 } xPixmapFormat;
313
314 /* window root */
315
316 typedef struct {
317     CARD8       depth;
318     CARD8       pad1;
319     CARD16      nVisuals B16;  /* number of xVisualType structures following */
320     CARD32      pad2 B32;
321     } xDepth;
322
323 typedef struct {
324     VisualID visualID B32;
325 #if defined(__cplusplus) || defined(c_plusplus)
326     CARD8 c_class;
327 #else
328     CARD8 class;
329 #endif
330     CARD8 bitsPerRGB;
331     CARD16 colormapEntries B16;
332     CARD32 redMask B32, greenMask B32, blueMask B32;
333     CARD32 pad B32;
334     } xVisualType;
335
336 typedef struct {
337     Window         windowId B32;
338     Colormap       defaultColormap B32;
339     CARD32         whitePixel B32, blackPixel B32;
340     CARD32         currentInputMask B32;   
341     CARD16         pixWidth B16, pixHeight B16;
342     CARD16         mmWidth B16, mmHeight B16;
343     CARD16         minInstalledMaps B16, maxInstalledMaps B16;
344     VisualID       rootVisualID B32;
345     CARD8          backingStore;
346     BOOL           saveUnders;
347     CARD8          rootDepth;
348     CARD8          nDepths;  /* number of xDepth structures following */
349 } xWindowRoot;
350 \f
351
352 /*****************************************************************
353  * Structure Defns
354  *   Structures needed for replies 
355  *****************************************************************/
356
357 /* Used in GetMotionEvents */
358
359 typedef struct {
360     CARD32 time B32;
361     INT16 x B16, y B16;
362 } xTimecoord;
363
364 typedef struct {
365     CARD8 family;
366     BYTE pad;
367     CARD16 length B16;
368 } xHostEntry;
369
370 typedef struct {
371     INT16 leftSideBearing B16,
372           rightSideBearing B16,
373           characterWidth B16,
374           ascent B16,
375           descent B16;
376     CARD16 attributes B16;
377 } xCharInfo;
378
379 typedef struct {
380     Atom name B32;
381     CARD32 value B32;
382 } xFontProp;
383
384 /*
385  * non-aligned big-endian font ID follows this struct
386  */
387 typedef struct {           /* followed by string */
388     CARD8 len;  /* number of *characters* in string, or FontChange (255)
389                    for font change, or 0 if just delta given */
390     INT8 delta;
391 } xTextElt;
392
393
394 typedef struct {        
395     CARD32 pixel B32;
396     CARD16 red B16, green B16, blue B16;
397     CARD8 flags;  /* DoRed, DoGreen, DoBlue booleans */
398     CARD8 pad;
399 } xColorItem;
400
401
402 typedef struct {
403     CARD16 red B16, green B16, blue B16, pad B16;
404 } xrgb;
405
406 typedef CARD8 KEYCODE;
407 \f
408
409 /*****************
410  * XRep:
411  *    meant to be 32 byte quantity 
412  *****************/
413
414 /* GenericReply is the common format of all replies.  The "data" items
415    are specific to each individual reply type. */
416
417 typedef struct {        
418     BYTE type;              /* X_Reply */
419     BYTE data1;             /* depends on reply type */
420     CARD16 sequenceNumber B16;  /* of last request received by server */
421     CARD32 length B32;      /* 4 byte quantities beyond size of GenericReply */
422     CARD32 data00 B32;
423     CARD32 data01 B32;
424     CARD32 data02 B32;
425     CARD32 data03 B32;
426     CARD32 data04 B32;
427     CARD32 data05 B32;
428     } xGenericReply;
429
430 /* Individual reply formats. */
431
432 typedef struct {
433     BYTE type;  /* X_Reply */
434     CARD8 backingStore;
435     CARD16 sequenceNumber B16;
436     CARD32 length B32;  /* NOT 0; this is an extra-large reply */
437     VisualID visualID B32;
438 #if defined(__cplusplus) || defined(c_plusplus)
439     CARD16 c_class B16;
440 #else
441     CARD16 class B16;
442 #endif
443     CARD8 bitGravity;
444     CARD8 winGravity;
445     CARD32 backingBitPlanes B32;
446     CARD32 backingPixel B32;
447     BOOL saveUnder;
448     BOOL mapInstalled;
449     CARD8 mapState;
450     BOOL override;
451     Colormap colormap B32;
452     CARD32 allEventMasks B32;
453     CARD32 yourEventMask B32;
454     CARD16 doNotPropagateMask B16;
455     CARD16 pad B16;
456     } xGetWindowAttributesReply;
457
458 typedef struct {
459     BYTE type;   /* X_Reply */
460     CARD8 depth;
461     CARD16 sequenceNumber B16;
462     CARD32 length B32;  /* 0 */
463     Window root B32;
464     INT16 x B16, y B16;
465     CARD16 width B16, height B16;
466     CARD16 borderWidth B16;
467     CARD16 pad1 B16;
468     CARD32 pad2 B32;
469     CARD32 pad3 B32;
470     } xGetGeometryReply;
471
472 typedef struct {
473     BYTE type;  /* X_Reply */
474     BYTE pad1;
475     CARD16 sequenceNumber B16;
476     CARD32 length B32;
477     Window root B32, parent B32;
478     CARD16 nChildren B16;
479     CARD16 pad2 B16;
480     CARD32 pad3 B32;
481     CARD32 pad4 B32;
482     CARD32 pad5 B32;
483     } xQueryTreeReply;
484
485 typedef struct {
486     BYTE type;  /* X_Reply */
487     BYTE pad1;
488     CARD16 sequenceNumber B16;
489     CARD32 length B32; /* 0 */
490     Atom atom B32;
491     CARD32 pad2 B32;
492     CARD32 pad3 B32;
493     CARD32 pad4 B32;
494     CARD32 pad5 B32;
495     CARD32 pad6 B32;
496     } xInternAtomReply;
497
498 typedef struct {
499     BYTE type;  /* X_Reply */
500     BYTE pad1;
501     CARD16 sequenceNumber B16;
502     CARD32 length B32;  /* of additional bytes */
503     CARD16 nameLength B16;  /* # of characters in name */
504     CARD16 pad2 B16;
505     CARD32 pad3 B32;
506     CARD32 pad4 B32;
507     CARD32 pad5 B32;
508     CARD32 pad6 B32;
509     CARD32 pad7 B32;
510     } xGetAtomNameReply;
511
512 typedef struct {
513     BYTE type;  /* X_Reply */
514     CARD8 format;
515     CARD16 sequenceNumber B16;
516     CARD32 length B32; /* of additional bytes */
517     Atom propertyType B32;
518     CARD32 bytesAfter B32;
519     CARD32 nItems B32; /* # of 8, 16, or 32-bit entities in reply */
520     CARD32 pad1 B32;
521     CARD32 pad2 B32;
522     CARD32 pad3 B32;
523     } xGetPropertyReply;
524
525 typedef struct {
526     BYTE type;  /* X_Reply */
527     BYTE pad1;
528     CARD16 sequenceNumber B16;
529     CARD32 length B32;
530     CARD16 nProperties B16;
531     CARD16 pad2 B16;
532     CARD32 pad3 B32;
533     CARD32 pad4 B32;
534     CARD32 pad5 B32;
535     CARD32 pad6 B32;
536     CARD32 pad7 B32;
537     } xListPropertiesReply;
538
539 typedef struct {
540     BYTE type;  /* X_Reply */
541     BYTE pad1;
542     CARD16 sequenceNumber B16;
543     CARD32 length B32;  /* 0 */
544     Window owner B32;
545     CARD32 pad2 B32;
546     CARD32 pad3 B32;
547     CARD32 pad4 B32;
548     CARD32 pad5 B32;
549     CARD32 pad6 B32;
550     } xGetSelectionOwnerReply;
551
552 typedef struct {
553     BYTE type;  /* X_Reply */
554     BYTE status;
555     CARD16 sequenceNumber B16;
556     CARD32 length B32;  /* 0 */
557     CARD32 pad1 B32;
558     CARD32 pad2 B32;
559     CARD32 pad3 B32;
560     CARD32 pad4 B32;
561     CARD32 pad5 B32;
562     CARD32 pad6 B32;
563     } xGrabPointerReply;
564
565 typedef xGrabPointerReply xGrabKeyboardReply;
566
567 typedef struct {
568     BYTE type;  /* X_Reply */
569     BOOL sameScreen;
570     CARD16 sequenceNumber B16;
571     CARD32 length B32;  /* 0 */
572     Window root B32, child B32;
573     INT16 rootX B16, rootY B16, winX B16, winY B16;
574     CARD16 mask B16;
575     CARD16 pad1 B16;
576     CARD32 pad B32;
577     } xQueryPointerReply;
578
579 typedef struct {
580     BYTE type;  /* X_Reply */
581     BYTE pad1;
582     CARD16 sequenceNumber B16;
583     CARD32 length B32;
584     CARD32 nEvents B32;
585     CARD32 pad2 B32;
586     CARD32 pad3 B32;
587     CARD32 pad4 B32;
588     CARD32 pad5 B32;
589     CARD32 pad6 B32;
590     } xGetMotionEventsReply;
591
592 typedef struct {
593     BYTE type;  /* X_Reply */
594     BOOL sameScreen;
595     CARD16 sequenceNumber B16;
596     CARD32 length B32; /* 0 */
597     Window child B32;
598     INT16 dstX B16, dstY B16;
599     CARD32 pad2 B32;
600     CARD32 pad3 B32;
601     CARD32 pad4 B32;
602     CARD32 pad5 B32;
603     } xTranslateCoordsReply;
604
605 typedef struct {
606     BYTE type;  /* X_Reply */
607     CARD8 revertTo;
608     CARD16 sequenceNumber B16;
609     CARD32 length B32;  /* 0 */
610     Window focus B32;
611     CARD32 pad1 B32;
612     CARD32 pad2 B32;
613     CARD32 pad3 B32;
614     CARD32 pad4 B32;
615     CARD32 pad5 B32;
616     } xGetInputFocusReply;
617
618 typedef struct {
619     BYTE type;  /* X_Reply */
620     BYTE pad1;
621     CARD16 sequenceNumber B16;
622     CARD32 length B32;  /* 2, NOT 0; this is an extra-large reply */
623     BYTE map[32];
624     } xQueryKeymapReply;
625
626 /* Warning: this MUST match (up to component renaming) xListFontsWithInfoReply */
627 typedef struct _xQueryFontReply {
628     BYTE type;  /* X_Reply */
629     BYTE pad1;
630     CARD16 sequenceNumber B16;
631     CARD32 length B32;  /* definitely > 0, even if "nCharInfos" is 0 */
632     xCharInfo minBounds; 
633 #ifndef WORD64
634     CARD32 walign1 B32;
635 #endif
636     xCharInfo maxBounds; 
637 #ifndef WORD64
638     CARD32 walign2 B32;
639 #endif
640     CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
641     CARD16 defaultChar B16;
642     CARD16 nFontProps B16;  /* followed by this many xFontProp structures */
643     CARD8 drawDirection;
644     CARD8 minByte1, maxByte1;
645     BOOL allCharsExist;
646     INT16 fontAscent B16, fontDescent B16;
647     CARD32 nCharInfos B32; /* followed by this many xCharInfo structures */
648 } xQueryFontReply;
649
650 typedef struct {
651     BYTE type;  /* X_Reply */
652     CARD8 drawDirection;
653     CARD16 sequenceNumber B16;
654     CARD32 length B32;  /* 0 */
655     INT16 fontAscent B16, fontDescent B16;
656     INT16 overallAscent B16, overallDescent B16;
657     INT32 overallWidth B32, overallLeft B32, overallRight B32;
658     CARD32 pad B32;
659     } xQueryTextExtentsReply;
660
661 typedef struct {
662     BYTE type;  /* X_Reply */
663     BYTE pad1;
664     CARD16 sequenceNumber B16;
665     CARD32 length B32;
666     CARD16 nFonts B16;
667     CARD16 pad2 B16;
668     CARD32 pad3 B32;
669     CARD32 pad4 B32;
670     CARD32 pad5 B32;
671     CARD32 pad6 B32;
672     CARD32 pad7 B32;
673     } xListFontsReply;
674
675 /* Warning: this MUST match (up to component renaming) xQueryFontReply */
676 typedef struct {
677     BYTE type;  /* X_Reply */
678     CARD8 nameLength;  /* 0 indicates end-of-reply-sequence */
679     CARD16 sequenceNumber B16;
680     CARD32 length B32;  /* definitely > 0, even if "nameLength" is 0 */
681     xCharInfo minBounds; 
682 #ifndef WORD64
683     CARD32 walign1 B32;
684 #endif
685     xCharInfo maxBounds; 
686 #ifndef WORD64
687     CARD32 walign2 B32;
688 #endif
689     CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
690     CARD16 defaultChar B16;
691     CARD16 nFontProps B16;  /* followed by this many xFontProp structures */
692     CARD8 drawDirection;
693     CARD8 minByte1, maxByte1;
694     BOOL allCharsExist;
695     INT16 fontAscent B16, fontDescent B16;
696     CARD32 nReplies B32;   /* hint as to how many more replies might be coming */
697 } xListFontsWithInfoReply;
698
699 typedef struct {
700     BYTE type;  /* X_Reply */
701     BYTE pad1;
702     CARD16 sequenceNumber B16;
703     CARD32 length B32;
704     CARD16 nPaths B16;
705     CARD16 pad2 B16;
706     CARD32 pad3 B32;
707     CARD32 pad4 B32;
708     CARD32 pad5 B32;
709     CARD32 pad6 B32;
710     CARD32 pad7 B32;
711     } xGetFontPathReply;
712
713 typedef struct {
714     BYTE type;  /* X_Reply */
715     CARD8 depth;
716     CARD16 sequenceNumber B16;
717     CARD32 length B32;
718     VisualID visual B32;
719     CARD32 pad3 B32;
720     CARD32 pad4 B32;
721     CARD32 pad5 B32;
722     CARD32 pad6 B32;
723     CARD32 pad7 B32;
724     } xGetImageReply;
725
726 typedef struct {
727     BYTE type;  /* X_Reply */
728     BYTE pad1;
729     CARD16 sequenceNumber B16;
730     CARD32 length B32;
731     CARD16 nColormaps B16;
732     CARD16 pad2 B16;
733     CARD32 pad3 B32;
734     CARD32 pad4 B32;
735     CARD32 pad5 B32;
736     CARD32 pad6 B32;
737     CARD32 pad7 B32;
738     } xListInstalledColormapsReply;
739
740 typedef struct {
741     BYTE type; /* X_Reply */
742     BYTE pad1;
743     CARD16 sequenceNumber B16;
744     CARD32 length B32;   /* 0 */
745     CARD16 red B16, green B16, blue B16;
746     CARD16 pad2 B16;
747     CARD32 pixel B32;
748     CARD32 pad3 B32;
749     CARD32 pad4 B32;
750     CARD32 pad5 B32;
751     } xAllocColorReply;
752
753 typedef struct {
754     BYTE type; /* X_Reply */
755     BYTE pad1;
756     CARD16 sequenceNumber B16;
757     CARD32 length B32;  /* 0 */
758     CARD32 pixel B32;
759     CARD16 exactRed B16, exactGreen B16, exactBlue B16;
760     CARD16 screenRed B16, screenGreen B16, screenBlue B16;
761     CARD32 pad2 B32;
762     CARD32 pad3 B32;
763     } xAllocNamedColorReply;
764
765 typedef struct {
766     BYTE type;  /* X_Reply */
767     BYTE pad1;
768     CARD16 sequenceNumber B16;
769     CARD32 length B32;
770     CARD16 nPixels B16, nMasks B16;
771     CARD32 pad3 B32;
772     CARD32 pad4 B32;
773     CARD32 pad5 B32;
774     CARD32 pad6 B32;
775     CARD32 pad7 B32;
776     } xAllocColorCellsReply;
777
778 typedef struct {
779     BYTE type; /* X_Reply */
780     BYTE pad1;
781     CARD16 sequenceNumber B16;
782     CARD32 length B32;
783     CARD16 nPixels B16;
784     CARD16 pad2 B16;
785     CARD32 redMask B32, greenMask B32, blueMask B32;
786     CARD32 pad3 B32;
787     CARD32 pad4 B32;
788     } xAllocColorPlanesReply;
789
790 typedef struct {
791     BYTE type; /* X_Reply */
792     BYTE pad1;
793     CARD16 sequenceNumber B16;
794     CARD32 length B32;
795     CARD16 nColors B16;
796     CARD16 pad2 B16;
797     CARD32 pad3 B32;
798     CARD32 pad4 B32;
799     CARD32 pad5 B32;
800     CARD32 pad6 B32;
801     CARD32 pad7 B32;
802     } xQueryColorsReply;
803
804 typedef struct {
805     BYTE type;  /* X_Reply */
806     BYTE pad1;
807     CARD16 sequenceNumber B16;
808     CARD32 length B32;  /* 0 */
809     CARD16 exactRed B16, exactGreen B16, exactBlue B16;
810     CARD16 screenRed B16, screenGreen B16, screenBlue B16;
811     CARD32 pad3 B32;
812     CARD32 pad4 B32;
813     CARD32 pad5 B32;
814     } xLookupColorReply;
815
816 typedef struct {
817     BYTE type;  /* X_Reply */
818     BYTE pad1;
819     CARD16 sequenceNumber B16;
820     CARD32 length B32;  /* 0 */
821     CARD16 width B16, height B16;
822     CARD32 pad3 B32;
823     CARD32 pad4 B32;
824     CARD32 pad5 B32;
825     CARD32 pad6 B32;
826     CARD32 pad7 B32;
827     } xQueryBestSizeReply;
828
829 typedef struct {
830     BYTE type;  /* X_Reply */
831     BYTE pad1;
832     CARD16 sequenceNumber B16;
833     CARD32 length B32; /* 0 */
834     BOOL  present;
835     CARD8 major_opcode;
836     CARD8 first_event;
837     CARD8 first_error;
838     CARD32 pad3 B32;
839     CARD32 pad4 B32;
840     CARD32 pad5 B32;
841     CARD32 pad6 B32;
842     CARD32 pad7 B32;
843     } xQueryExtensionReply;
844
845 typedef struct {
846     BYTE type;  /* X_Reply */
847     CARD8 nExtensions;
848     CARD16 sequenceNumber B16;
849     CARD32 length B32;
850     CARD32 pad2 B32;
851     CARD32 pad3 B32;
852     CARD32 pad4 B32;
853     CARD32 pad5 B32;
854     CARD32 pad6 B32;
855     CARD32 pad7 B32;
856     } xListExtensionsReply;
857
858
859 typedef struct {
860     BYTE   type;  /* X_Reply */
861     CARD8  success;
862     CARD16 sequenceNumber B16;
863     CARD32 length B32;
864     CARD32 pad2 B32;
865     CARD32 pad3 B32;
866     CARD32 pad4 B32;
867     CARD32 pad5 B32;
868     CARD32 pad6 B32;
869     CARD32 pad7 B32;
870     } xSetMappingReply;
871 typedef xSetMappingReply xSetPointerMappingReply;
872 typedef xSetMappingReply xSetModifierMappingReply;
873
874 typedef struct {
875     BYTE type;  /* X_Reply */
876     CARD8 nElts;  /* how many elements does the map have */
877     CARD16 sequenceNumber B16;
878     CARD32 length B32;
879     CARD32 pad2 B32;
880     CARD32 pad3 B32;
881     CARD32 pad4 B32;
882     CARD32 pad5 B32;
883     CARD32 pad6 B32;
884     CARD32 pad7 B32;
885     } xGetPointerMappingReply;
886
887 typedef struct {
888     BYTE type;
889     CARD8 keySymsPerKeyCode;
890     CARD16 sequenceNumber B16;
891     CARD32 length B32;
892     CARD32 pad2 B32;
893     CARD32 pad3 B32;
894     CARD32 pad4 B32;
895     CARD32 pad5 B32;
896     CARD32 pad6 B32;
897     CARD32 pad7 B32;
898 } xGetKeyboardMappingReply;    
899
900 typedef struct {
901     BYTE type;
902     CARD8 numKeyPerModifier;
903     CARD16 sequenceNumber B16;
904     CARD32 length B32;
905     CARD32 pad1 B32;
906     CARD32 pad2 B32;
907     CARD32 pad3 B32;
908     CARD32 pad4 B32;
909     CARD32 pad5 B32;
910     CARD32 pad6 B32;
911 } xGetModifierMappingReply;
912
913 typedef struct {
914     BYTE type;  /* X_Reply */
915     BOOL globalAutoRepeat;
916     CARD16 sequenceNumber B16;
917     CARD32 length B32;  /* 5 */
918     CARD32 ledMask B32;
919     CARD8 keyClickPercent, bellPercent;
920     CARD16 bellPitch B16, bellDuration B16;
921     CARD16 pad B16;
922     BYTE map[32];  /* bit masks start here */
923     } xGetKeyboardControlReply;
924
925 typedef struct {
926     BYTE type;  /* X_Reply */
927     BYTE pad1;
928     CARD16 sequenceNumber B16;
929     CARD32 length B32;  /* 0 */
930     CARD16 accelNumerator B16, accelDenominator B16;
931     CARD16 threshold B16;
932     CARD16 pad2 B16;
933     CARD32 pad3 B32;
934     CARD32 pad4 B32;
935     CARD32 pad5 B32;
936     CARD32 pad6 B32;
937     } xGetPointerControlReply;
938
939 typedef struct {
940     BYTE type;  /* X_Reply */
941     BYTE pad1;
942     CARD16 sequenceNumber B16;
943     CARD32 length B32;  /* 0 */
944     CARD16 timeout B16, interval B16;
945     BOOL preferBlanking;
946     BOOL allowExposures;
947     CARD16 pad2 B16;
948     CARD32 pad3 B32;
949     CARD32 pad4 B32;
950     CARD32 pad5 B32;
951     CARD32 pad6 B32;
952     } xGetScreenSaverReply;
953
954 typedef struct {
955     BYTE type;  /* X_Reply */
956     BOOL enabled;
957     CARD16 sequenceNumber B16;
958     CARD32 length B32;
959     CARD16 nHosts B16;
960     CARD16 pad1 B16;
961     CARD32 pad3 B32;
962     CARD32 pad4 B32;
963     CARD32 pad5 B32;
964     CARD32 pad6 B32;
965     CARD32 pad7 B32;
966     } xListHostsReply;
967
968 \f
969
970
971 /*****************************************************************
972  * Xerror
973  *    All errors  are 32 bytes 
974  *****************************************************************/
975
976 typedef struct {
977     BYTE type;                  /* X_Error */
978     BYTE errorCode;
979     CARD16 sequenceNumber B16;       /* the nth request from this client */
980     CARD32 resourceID B32;
981     CARD16 minorCode B16;
982     CARD8 majorCode;
983     BYTE pad1;
984     CARD32 pad3 B32;
985     CARD32 pad4 B32;
986     CARD32 pad5 B32;
987     CARD32 pad6 B32;
988     CARD32 pad7 B32;
989 } xError;
990
991 /*****************************************************************
992  * xEvent
993  *    All events are 32 bytes
994  *****************************************************************/
995
996 typedef struct _xEvent {
997     union {
998         struct {
999             BYTE type;
1000             BYTE detail;
1001             CARD16 sequenceNumber B16;
1002             } u;
1003         struct {
1004             CARD32 pad00 B32;
1005             Time time B32;
1006             Window root B32, event B32, child B32;
1007             INT16 rootX B16, rootY B16, eventX B16, eventY B16;
1008             KeyButMask state B16;
1009             BOOL sameScreen;            
1010             BYTE pad1;
1011         } keyButtonPointer;
1012         struct {
1013             CARD32 pad00 B32;
1014             Time time B32;
1015             Window root B32, event B32, child B32;
1016             INT16 rootX B16, rootY B16, eventX B16, eventY B16;
1017             KeyButMask state B16;
1018             BYTE mode;                  /* really XMode */
1019             BYTE flags;         /* sameScreen and focus booleans, packed together */
1020 #define ELFlagFocus        (1<<0)
1021 #define ELFlagSameScreen   (1<<1)
1022         } enterLeave;
1023         struct {
1024             CARD32 pad00 B32;
1025             Window window B32;
1026             BYTE mode;                  /* really XMode */
1027             BYTE pad1, pad2, pad3;
1028         } focus;
1029         struct {
1030             CARD32 pad00 B32;
1031             Window window B32;
1032             CARD16 x B16, y B16, width B16, height B16;
1033             CARD16 count B16;
1034             CARD16 pad2 B16;
1035         } expose;
1036         struct {
1037             CARD32 pad00 B32;
1038             Drawable drawable B32;
1039             CARD16 x B16, y B16, width B16, height B16;
1040             CARD16 minorEvent B16;
1041             CARD16 count B16;
1042             BYTE majorEvent;
1043             BYTE pad1, pad2, pad3;
1044         } graphicsExposure;
1045         struct {
1046             CARD32 pad00 B32;
1047             Drawable drawable B32;
1048             CARD16 minorEvent B16;
1049             BYTE majorEvent;
1050             BYTE bpad;
1051         } noExposure;
1052         struct {
1053             CARD32 pad00 B32;
1054             Window window B32;
1055             CARD8 state;
1056             BYTE pad1, pad2, pad3;
1057         } visibility;
1058         struct {
1059             CARD32 pad00 B32;
1060             Window parent B32, window B32;
1061             INT16 x B16, y B16;
1062             CARD16 width B16, height B16, borderWidth B16;
1063             BOOL override;
1064             BYTE bpad;
1065         } createNotify;
1066 /*
1067  * The event feilds in the structures for DestroyNotify, UnmapNotify,
1068  * MapNotify, ReparentNotify, ConfigureNotify, CirclulateNotify, GravityNotify,
1069  * must be at the same offset because server internal code is depending upon
1070  * this to patch up the events before they are delivered.
1071  * Also note that MapRequest, ConfigureRequest and CirculateRequest have
1072  * the same offset for the event window.
1073  */
1074         struct {
1075             CARD32 pad00 B32;
1076             Window event B32, window B32;
1077         } destroyNotify;
1078         struct {
1079             CARD32 pad00 B32;
1080             Window event B32, window B32;
1081             BOOL fromConfigure;
1082             BYTE pad1, pad2, pad3;
1083         } unmapNotify;
1084         struct {
1085             CARD32 pad00 B32;
1086             Window event B32, window B32;
1087             BOOL override;
1088             BYTE pad1, pad2, pad3;
1089         } mapNotify;
1090         struct {
1091             CARD32 pad00 B32;
1092             Window parent B32, window B32;
1093         } mapRequest;
1094         struct {
1095             CARD32 pad00 B32;
1096             Window event B32, window B32, parent B32;
1097             INT16 x B16, y B16;
1098             BOOL override;
1099             BYTE pad1, pad2, pad3;
1100         } reparent;
1101         struct {
1102             CARD32 pad00 B32;
1103             Window event B32, window B32, aboveSibling B32;
1104             INT16 x B16, y B16;
1105             CARD16 width B16, height B16, borderWidth B16;
1106             BOOL override;              
1107             BYTE bpad;
1108         } configureNotify;
1109         struct {
1110             CARD32 pad00 B32;
1111             Window parent B32, window B32, sibling B32;
1112             INT16 x B16, y B16;
1113             CARD16 width B16, height B16, borderWidth B16;
1114             CARD16 valueMask B16;
1115             CARD32 pad1 B32;
1116         } configureRequest;
1117         struct {
1118             CARD32 pad00 B32;
1119             Window event B32, window B32;
1120             INT16 x B16, y B16;
1121             CARD32 pad1 B32, pad2 B32, pad3 B32, pad4 B32;
1122         } gravity;
1123         struct {
1124             CARD32 pad00 B32;
1125             Window window B32;
1126             CARD16 width B16, height B16;
1127         } resizeRequest;
1128         struct {
1129 /* The event field in the circulate record is really the parent when this
1130    is used as a CirculateRequest insteaad of a CircluateNotify */
1131             CARD32 pad00 B32;
1132             Window event B32, window B32, parent B32;
1133             BYTE place;                 /* Top or Bottom */
1134             BYTE pad1, pad2, pad3;
1135         } circulate;
1136         struct {
1137             CARD32 pad00 B32;
1138             Window window B32;
1139             Atom atom B32;
1140             Time time B32;
1141             BYTE state;                 /* NewValue or Deleted */
1142             BYTE pad1;
1143             CARD16 pad2 B16;
1144         } property;
1145         struct {
1146             CARD32 pad00 B32;
1147             Time time B32;     
1148             Window window B32;
1149             Atom atom B32;
1150         } selectionClear;
1151         struct {
1152             CARD32 pad00 B32;
1153             Time time B32;    
1154             Window owner B32, requestor B32;
1155             Atom selection B32, target B32, property B32;
1156         } selectionRequest;
1157         struct {
1158             CARD32 pad00 B32;
1159             Time time B32;   
1160             Window requestor B32;
1161             Atom selection B32, target B32, property B32;
1162         } selectionNotify;
1163         struct {
1164             CARD32 pad00 B32;
1165             Window window B32;
1166             Colormap colormap B32;
1167 #if defined(__cplusplus) || defined(c_plusplus)
1168             BOOL c_new;
1169 #else
1170             BOOL new;
1171 #endif
1172             BYTE state;                 /* Installed or UnInstalled */
1173             BYTE pad1, pad2;
1174         } colormap;
1175         struct {
1176             CARD32 pad00 B32;
1177             CARD8 request;
1178             KeyCode firstKeyCode;
1179             CARD8 count;
1180             BYTE pad1;
1181         } mappingNotify;
1182         struct {
1183             CARD32 pad00 B32;
1184             Window window B32;
1185             union {
1186                 struct {
1187                     Atom type B32;
1188                     INT32 longs0 B32;
1189                     INT32 longs1 B32;
1190                     INT32 longs2 B32;
1191                     INT32 longs3 B32;
1192                     INT32 longs4 B32;
1193                 } l;
1194                 struct {
1195                     Atom type B32;
1196                     INT16 shorts0 B16;
1197                     INT16 shorts1 B16;
1198                     INT16 shorts2 B16;
1199                     INT16 shorts3 B16;
1200                     INT16 shorts4 B16;
1201                     INT16 shorts5 B16;
1202                     INT16 shorts6 B16;
1203                     INT16 shorts7 B16;
1204                     INT16 shorts8 B16;
1205                     INT16 shorts9 B16;
1206                 } s;
1207                 struct {
1208                     Atom type B32;
1209                     INT8 bytes[20];
1210                 } b;
1211             } u; 
1212         } clientMessage;
1213     } u;
1214 } xEvent;
1215
1216 /* KeymapNotify events are not included in the above union because they
1217    are different from all other events: they do not have a "detail"
1218    or "sequenceNumber", so there is room for a 248-bit key mask. */
1219
1220 typedef struct {
1221     BYTE type;
1222     BYTE map[31];
1223     } xKeymapEvent;
1224
1225 #define XEventSize (sizeof(xEvent))
1226
1227 /* XReply is the union of all the replies above whose "fixed part"
1228 fits in 32 bytes.  It does NOT include GetWindowAttributesReply,
1229 QueryFontReply, QueryKeymapReply, or GetKeyboardControlReply 
1230 ListFontsWithInfoReply */
1231
1232 typedef union {
1233     xGenericReply generic;
1234     xGetGeometryReply geom;
1235     xQueryTreeReply tree;
1236     xInternAtomReply atom;
1237     xGetAtomNameReply atomName;
1238     xGetPropertyReply property;
1239     xListPropertiesReply listProperties;
1240     xGetSelectionOwnerReply selection;
1241     xGrabPointerReply grabPointer;
1242     xGrabKeyboardReply grabKeyboard;
1243     xQueryPointerReply pointer;
1244     xGetMotionEventsReply motionEvents;
1245     xTranslateCoordsReply coords;
1246     xGetInputFocusReply inputFocus;
1247     xQueryTextExtentsReply textExtents;
1248     xListFontsReply fonts;
1249     xGetFontPathReply fontPath;
1250     xGetImageReply image;
1251     xListInstalledColormapsReply colormaps;
1252     xAllocColorReply allocColor;
1253     xAllocNamedColorReply allocNamedColor;
1254     xAllocColorCellsReply colorCells;
1255     xAllocColorPlanesReply colorPlanes;
1256     xQueryColorsReply colors;
1257     xLookupColorReply lookupColor;
1258     xQueryBestSizeReply bestSize;
1259     xQueryExtensionReply extension;
1260     xListExtensionsReply extensions;
1261     xSetModifierMappingReply setModifierMapping;
1262     xGetModifierMappingReply getModifierMapping;
1263     xSetPointerMappingReply setPointerMapping;
1264     xGetKeyboardMappingReply getKeyboardMapping;
1265     xGetPointerMappingReply getPointerMapping;
1266     xGetPointerControlReply pointerControl;
1267     xGetScreenSaverReply screenSaver;
1268     xListHostsReply hosts;
1269     xError error;
1270     xEvent event;
1271 } xReply;
1272
1273 \f
1274
1275 /*****************************************************************
1276  * REQUESTS
1277  *****************************************************************/
1278
1279
1280 /* Request structure */
1281
1282 typedef struct _xReq {
1283         CARD8 reqType;
1284         CARD8 data;            /* meaning depends on request type */
1285         CARD16 length B16;         /* length in 4 bytes quantities 
1286                                   of whole request, including this header */
1287 } xReq;
1288
1289 /*****************************************************************
1290  *  structures that follow request. 
1291  *****************************************************************/
1292
1293 /* ResourceReq is used for any request which has a resource ID 
1294    (or Atom or Time) as its one and only argument.  */
1295
1296 typedef struct {
1297     CARD8 reqType;
1298     BYTE pad;
1299     CARD16 length B16;
1300     CARD32 id B32;  /* a Window, Drawable, Font, GContext, Pixmap, etc. */
1301     } xResourceReq;
1302
1303 typedef struct {
1304     CARD8 reqType;
1305     CARD8 depth;
1306     CARD16 length B16;
1307     Window wid B32, parent B32;
1308     INT16 x B16, y B16;
1309     CARD16 width B16, height B16, borderWidth B16;  
1310 #if defined(__cplusplus) || defined(c_plusplus)
1311     CARD16 c_class B16;
1312 #else
1313     CARD16 class B16;
1314 #endif
1315     VisualID visual B32;
1316     CARD32 mask B32;
1317 } xCreateWindowReq;
1318
1319 typedef struct {
1320     CARD8 reqType;
1321     BYTE pad;
1322     CARD16 length B16;
1323     Window window B32;
1324     CARD32 valueMask B32; 
1325 } xChangeWindowAttributesReq;
1326
1327 typedef struct {
1328     CARD8 reqType;
1329     BYTE mode;
1330     CARD16 length B16;
1331     Window window B32;
1332 } xChangeSaveSetReq;
1333
1334 typedef struct {
1335     CARD8 reqType;
1336     BYTE pad;
1337     CARD16 length B16;
1338     Window window B32, parent B32;
1339     INT16 x B16, y B16;
1340 } xReparentWindowReq;
1341
1342 typedef struct {
1343     CARD8 reqType;
1344     CARD8 pad;
1345     CARD16 length B16;
1346     Window window B32;
1347     CARD16 mask B16;
1348     CARD16 pad2 B16;
1349 } xConfigureWindowReq;
1350
1351 typedef struct {
1352     CARD8 reqType;
1353     CARD8 direction;
1354     CARD16 length B16;
1355     Window window B32;
1356 } xCirculateWindowReq;
1357
1358 typedef struct {    /* followed by padded string */
1359     CARD8 reqType;
1360     BOOL onlyIfExists;
1361     CARD16 length B16;
1362     CARD16 nbytes  B16;    /* number of bytes in string */
1363     CARD16 pad B16;
1364 } xInternAtomReq;
1365
1366 typedef struct {
1367     CARD8 reqType;
1368     CARD8 mode;
1369     CARD16 length B16;
1370     Window window B32;
1371     Atom property B32, type B32;
1372     CARD8 format;
1373     BYTE pad[3];
1374     CARD32 nUnits B32;     /* length of stuff following, depends on format */
1375 } xChangePropertyReq;
1376
1377 typedef struct {
1378     CARD8 reqType;
1379     BYTE pad;
1380     CARD16 length B16;
1381     Window window B32;
1382     Atom property B32;
1383 } xDeletePropertyReq;
1384
1385 typedef struct {
1386     CARD8 reqType;
1387 #if defined(__cplusplus) || defined(c_plusplus)
1388     BOOL c_delete;
1389 #else
1390     BOOL delete;
1391 #endif
1392     CARD16 length B16;
1393     Window window B32;
1394     Atom property B32, type B32;
1395     CARD32 longOffset B32;
1396     CARD32 longLength B32;
1397 } xGetPropertyReq;
1398  
1399 typedef struct {
1400     CARD8 reqType;
1401     BYTE pad;
1402     CARD16 length B16;
1403     Window window B32;
1404     Atom selection B32;
1405     Time time B32;
1406 } xSetSelectionOwnerReq;
1407
1408 typedef struct {
1409     CARD8 reqType;
1410     BYTE pad;
1411     CARD16 length B16;
1412     Window requestor B32;
1413     Atom selection B32, target B32, property B32;
1414     Time time B32;
1415     } xConvertSelectionReq;
1416
1417 typedef struct {
1418     CARD8 reqType;
1419     BOOL propagate;
1420     CARD16 length B16;
1421     Window destination B32;
1422     CARD32 eventMask B32;
1423 #ifdef WORD64
1424     /* the structure should have been quad-aligned */
1425     BYTE eventdata[SIZEOF(xEvent)];
1426 #else
1427     xEvent event;
1428 #endif /* WORD64 */
1429 } xSendEventReq;
1430
1431 typedef struct {
1432     CARD8 reqType;
1433     BOOL ownerEvents;
1434     CARD16 length B16;
1435     Window grabWindow B32;
1436     CARD16 eventMask B16;
1437     BYTE pointerMode, keyboardMode;
1438     Window confineTo B32;
1439     Cursor cursor B32;
1440     Time time B32;
1441 } xGrabPointerReq;
1442
1443 typedef struct {
1444     CARD8 reqType;
1445     BOOL ownerEvents;
1446     CARD16 length B16;
1447     Window grabWindow B32;
1448     CARD16 eventMask B16;
1449     BYTE pointerMode, keyboardMode;
1450     Window confineTo B32;
1451     Cursor cursor B32;
1452     CARD8 button;
1453     BYTE pad;
1454     CARD16 modifiers B16;
1455 } xGrabButtonReq;
1456
1457 typedef struct {
1458     CARD8 reqType;
1459     CARD8 button;
1460     CARD16 length B16;
1461     Window grabWindow B32;
1462     CARD16 modifiers B16;
1463     CARD16 pad B16;
1464 } xUngrabButtonReq;
1465
1466 typedef struct {
1467     CARD8 reqType;
1468     BYTE pad;
1469     CARD16 length B16;
1470     Cursor cursor B32;
1471     Time time B32;
1472     CARD16 eventMask B16;
1473     CARD16 pad2 B16;
1474 } xChangeActivePointerGrabReq;
1475
1476 typedef struct {
1477     CARD8 reqType;
1478     BOOL ownerEvents;
1479     CARD16 length B16;
1480     Window grabWindow B32;
1481     Time time B32;
1482     BYTE pointerMode, keyboardMode;  
1483     CARD16 pad B16;
1484 } xGrabKeyboardReq;
1485
1486 typedef struct {
1487     CARD8 reqType;
1488     BOOL ownerEvents;
1489     CARD16 length B16;
1490     Window grabWindow B32;
1491     CARD16 modifiers B16;
1492     CARD8 key;
1493     BYTE pointerMode, keyboardMode;  
1494     BYTE pad1, pad2, pad3;
1495 } xGrabKeyReq;
1496
1497 typedef struct {
1498     CARD8 reqType;
1499     CARD8 key;
1500     CARD16 length B16;
1501     Window grabWindow B32;
1502     CARD16 modifiers B16;
1503     CARD16 pad B16;
1504 } xUngrabKeyReq;
1505
1506 typedef struct {
1507     CARD8 reqType;
1508     CARD8 mode;
1509     CARD16 length B16;
1510     Time time B32;
1511 } xAllowEventsReq;
1512
1513 typedef struct {
1514     CARD8 reqType;
1515     BYTE pad;
1516     CARD16 length B16;
1517     Window window B32;
1518     Time start B32, stop B32;
1519 } xGetMotionEventsReq;
1520
1521 typedef struct {
1522     CARD8 reqType;
1523     BYTE pad;
1524     CARD16 length B16;
1525     Window srcWid B32, dstWid B32;
1526     INT16 srcX B16, srcY B16;
1527 } xTranslateCoordsReq;
1528
1529 typedef struct {
1530     CARD8 reqType;
1531     BYTE pad;
1532     CARD16 length B16;
1533     Window srcWid B32, dstWid B32;
1534     INT16 srcX B16, srcY B16;
1535     CARD16 srcWidth B16, srcHeight B16;
1536     INT16 dstX B16, dstY B16;
1537 } xWarpPointerReq;
1538
1539 typedef struct {
1540     CARD8 reqType;
1541     CARD8 revertTo;
1542     CARD16 length B16;
1543     Window focus B32;
1544     Time time B32;
1545 } xSetInputFocusReq;
1546
1547 typedef struct {
1548     CARD8 reqType;
1549     BYTE pad;
1550     CARD16 length B16;
1551     Font fid B32;
1552     CARD16 nbytes B16;
1553     BYTE pad1, pad2;    /* string follows on word boundary */
1554 } xOpenFontReq;
1555
1556 typedef struct {
1557     CARD8 reqType;
1558     BOOL oddLength;
1559     CARD16 length B16;
1560     Font fid B32;
1561     } xQueryTextExtentsReq;
1562
1563 typedef struct {
1564     CARD8 reqType;
1565     BYTE pad;
1566     CARD16 length B16;
1567     CARD16 maxNames B16;
1568     CARD16 nbytes B16;  /* followed immediately by string bytes */
1569 } xListFontsReq;
1570
1571 typedef xListFontsReq xListFontsWithInfoReq;
1572
1573 typedef struct {
1574     CARD8 reqType;
1575     BYTE pad;
1576     CARD16 length B16;
1577     CARD16 nFonts B16;
1578     BYTE pad1, pad2;    /* LISTofSTRING8 follows on word boundary */
1579 } xSetFontPathReq;
1580
1581 typedef struct {
1582     CARD8 reqType;
1583     CARD8 depth;
1584     CARD16 length B16;
1585     Pixmap pid B32;
1586     Drawable drawable B32;
1587     CARD16 width B16, height B16;
1588 } xCreatePixmapReq;
1589
1590 typedef struct {
1591     CARD8 reqType;
1592     BYTE pad;
1593     CARD16 length B16;
1594     GContext gc B32;
1595     Drawable drawable B32;
1596     CARD32 mask B32;
1597 } xCreateGCReq;
1598
1599 typedef struct {
1600     CARD8 reqType;
1601     BYTE pad;
1602     CARD16 length B16;
1603     GContext gc B32;
1604     CARD32 mask B32;
1605 } xChangeGCReq;    
1606
1607 typedef struct {
1608     CARD8 reqType;
1609     BYTE pad;
1610     CARD16 length B16;
1611     GContext srcGC B32, dstGC B32;
1612     CARD32 mask B32;
1613 } xCopyGCReq;    
1614
1615 typedef struct {
1616     CARD8 reqType;
1617     BYTE pad;
1618     CARD16 length B16;
1619     GContext gc B32;
1620     CARD16 dashOffset B16;
1621     CARD16 nDashes B16;        /* length LISTofCARD8 of values following */
1622 } xSetDashesReq;    
1623
1624 typedef struct {
1625     CARD8 reqType;
1626     BYTE ordering;
1627     CARD16 length B16;
1628     GContext gc B32;
1629     INT16 xOrigin B16, yOrigin B16;
1630 } xSetClipRectanglesReq;    
1631
1632 typedef struct {
1633     CARD8 reqType;
1634     BOOL exposures;
1635     CARD16 length B16;
1636     Window window B32;
1637     INT16 x B16, y B16;
1638     CARD16 width B16, height B16;
1639 } xClearAreaReq;
1640
1641 typedef struct {
1642     CARD8 reqType;
1643     BYTE pad;
1644     CARD16 length B16;
1645     Drawable srcDrawable B32, dstDrawable B32;
1646     GContext gc B32;
1647     INT16 srcX B16, srcY B16, dstX B16, dstY B16;
1648     CARD16 width B16, height B16;
1649 } xCopyAreaReq;    
1650
1651 typedef struct {
1652     CARD8 reqType;
1653     BYTE pad;
1654     CARD16 length B16;
1655     Drawable srcDrawable B32, dstDrawable B32;
1656     GContext gc B32;
1657     INT16 srcX B16, srcY B16, dstX B16, dstY B16;
1658     CARD16 width B16, height B16;
1659     CARD32 bitPlane B32;
1660 } xCopyPlaneReq;    
1661
1662 typedef struct {
1663     CARD8 reqType;
1664     BYTE coordMode;
1665     CARD16 length B16;
1666     Drawable drawable B32;
1667     GContext gc B32;
1668 } xPolyPointReq;    
1669
1670 typedef xPolyPointReq xPolyLineReq;  /* same request structure */
1671
1672 /* The following used for PolySegment, PolyRectangle, PolyArc, PolyFillRectangle, PolyFillArc */
1673
1674 typedef struct {
1675     CARD8 reqType;
1676     BYTE pad;
1677     CARD16 length B16;
1678     Drawable drawable B32;
1679     GContext gc B32;
1680 } xPolySegmentReq;    
1681
1682 typedef xPolySegmentReq xPolyArcReq;
1683 typedef xPolySegmentReq xPolyRectangleReq;
1684 typedef xPolySegmentReq xPolyFillRectangleReq;
1685 typedef xPolySegmentReq xPolyFillArcReq;
1686
1687 typedef struct _FillPolyReq {
1688     CARD8 reqType;
1689     BYTE pad;
1690     CARD16 length B16;
1691     Drawable drawable B32;
1692     GContext gc B32;
1693     BYTE shape;
1694     BYTE coordMode;
1695     CARD16 pad1 B16;
1696 } xFillPolyReq;    
1697
1698
1699 typedef struct _PutImageReq {
1700     CARD8 reqType;
1701     CARD8 format;
1702     CARD16 length B16;
1703     Drawable drawable B32;
1704     GContext gc B32;
1705     CARD16 width B16, height B16;
1706     INT16 dstX B16, dstY B16;
1707     CARD8 leftPad;
1708     CARD8 depth;
1709     CARD16 pad B16;
1710 } xPutImageReq;    
1711
1712 typedef struct {
1713     CARD8 reqType;
1714     CARD8 format;
1715     CARD16 length B16;
1716     Drawable drawable B32;
1717     INT16 x B16, y B16;
1718     CARD16 width B16, height B16;
1719     CARD32 planeMask B32;
1720 } xGetImageReq;    
1721
1722 /* the folloiwng used by PolyText8 and PolyText16 */
1723
1724 typedef struct {
1725     CARD8 reqType;
1726     CARD8 pad;
1727     CARD16 length B16;
1728     Drawable drawable B32;
1729     GContext gc B32;
1730     INT16 x B16, y B16;         /* items (xTextElt) start after struct */
1731 } xPolyTextReq;    
1732
1733 typedef xPolyTextReq xPolyText8Req;
1734 typedef xPolyTextReq xPolyText16Req;
1735
1736 typedef struct {
1737     CARD8 reqType;
1738     BYTE nChars;
1739     CARD16 length B16;
1740     Drawable drawable B32;
1741     GContext gc B32;
1742     INT16 x B16, y B16;
1743 } xImageTextReq;    
1744
1745 typedef xImageTextReq xImageText8Req;
1746 typedef xImageTextReq xImageText16Req;
1747
1748 typedef struct {
1749     CARD8 reqType;
1750     BYTE alloc;
1751     CARD16 length B16;
1752     Colormap mid B32;
1753     Window window B32;
1754     VisualID visual B32;
1755 } xCreateColormapReq;    
1756
1757 typedef struct {
1758     CARD8 reqType;
1759     BYTE pad;
1760     CARD16 length B16;
1761     Colormap mid B32;
1762     Colormap srcCmap B32;
1763 } xCopyColormapAndFreeReq;    
1764
1765 typedef struct {
1766     CARD8 reqType;
1767     BYTE pad;
1768     CARD16 length B16;
1769     Colormap cmap B32;
1770     CARD16 red B16, green B16, blue B16;
1771     CARD16 pad2 B16;
1772 } xAllocColorReq;    
1773
1774 typedef struct {
1775     CARD8 reqType;
1776     BYTE pad;
1777     CARD16 length B16;
1778     Colormap cmap B32;
1779     CARD16 nbytes B16;  /* followed by structure */
1780     BYTE pad1, pad2;
1781 } xAllocNamedColorReq;    
1782
1783 typedef struct {
1784     CARD8 reqType;
1785     BOOL contiguous;
1786     CARD16 length B16;
1787     Colormap cmap B32;
1788     CARD16 colors B16, planes B16;
1789 } xAllocColorCellsReq;    
1790
1791 typedef struct {
1792     CARD8 reqType;
1793     BOOL contiguous;
1794     CARD16 length B16;
1795     Colormap cmap B32;
1796     CARD16 colors B16, red B16, green B16, blue B16;
1797 } xAllocColorPlanesReq;    
1798
1799 typedef struct {
1800     CARD8 reqType;
1801     BYTE pad;
1802     CARD16 length B16;
1803     Colormap cmap B32;
1804     CARD32 planeMask B32;
1805 } xFreeColorsReq;    
1806
1807 typedef struct {
1808     CARD8 reqType;
1809     BYTE pad;
1810     CARD16 length B16;
1811     Colormap cmap B32;
1812 } xStoreColorsReq;    
1813
1814 typedef struct {
1815     CARD8 reqType;
1816     CARD8 flags;   /* DoRed, DoGreen, DoBlue, as in xColorItem */
1817     CARD16 length B16;
1818     Colormap cmap B32;
1819     CARD32 pixel B32;
1820     CARD16 nbytes B16;  /* number of name string bytes following structure */
1821     BYTE pad1, pad2;
1822     } xStoreNamedColorReq;
1823
1824 typedef struct {
1825     CARD8 reqType;
1826     BYTE pad;
1827     CARD16 length B16;
1828     Colormap cmap B32;
1829 } xQueryColorsReq;    
1830
1831 typedef struct {    /* followed  by string of length len */
1832     CARD8 reqType;
1833     BYTE pad;
1834     CARD16 length B16;
1835     Colormap cmap B32;
1836     CARD16 nbytes B16;  /* number of string bytes following structure*/
1837     BYTE pad1, pad2;
1838 } xLookupColorReq;    
1839
1840 typedef struct {
1841     CARD8 reqType;
1842     BYTE pad;
1843     CARD16 length B16;
1844     Cursor cid B32;
1845     Pixmap source B32, mask B32;
1846     CARD16 foreRed B16, foreGreen B16, foreBlue B16;
1847     CARD16 backRed B16, backGreen B16, backBlue B16;
1848     CARD16 x B16, y B16;
1849 } xCreateCursorReq;    
1850
1851 typedef struct {
1852     CARD8 reqType;
1853     BYTE pad;
1854     CARD16 length B16;
1855     Cursor cid B32;
1856     Font source B32, mask B32;
1857     CARD16 sourceChar B16, maskChar B16;
1858     CARD16 foreRed B16, foreGreen B16, foreBlue B16;
1859     CARD16 backRed B16, backGreen B16, backBlue B16;
1860 } xCreateGlyphCursorReq;    
1861
1862 typedef struct {
1863     CARD8 reqType;
1864     BYTE pad;
1865     CARD16 length B16;
1866     Cursor cursor B32;
1867     CARD16 foreRed B16, foreGreen B16, foreBlue B16;
1868     CARD16 backRed B16, backGreen B16, backBlue B16;
1869 } xRecolorCursorReq;    
1870
1871 typedef struct {
1872     CARD8 reqType;
1873 #if defined(__cplusplus) || defined(c_plusplus)
1874     CARD8 c_class;
1875 #else
1876     CARD8 class;
1877 #endif
1878     CARD16 length B16;
1879     Drawable drawable B32;
1880     CARD16 width B16, height B16;
1881 } xQueryBestSizeReq;    
1882
1883 typedef struct {
1884     CARD8 reqType;
1885     BYTE pad;
1886     CARD16 length B16;
1887     CARD16 nbytes B16;  /* number of string bytes following structure */
1888     BYTE pad1, pad2;
1889 } xQueryExtensionReq;
1890
1891 typedef struct {
1892     CARD8   reqType;
1893     CARD8   numKeyPerModifier;
1894     CARD16  length B16;
1895 } xSetModifierMappingReq;
1896
1897 typedef struct {
1898     CARD8 reqType;
1899     CARD8 nElts;  /* how many elements in the map */
1900     CARD16 length B16;
1901 } xSetPointerMappingReq;
1902
1903 typedef struct {
1904     CARD8 reqType;
1905     BYTE pad;
1906     CARD16 length B16;
1907     KeyCode firstKeyCode;
1908     CARD8 count;
1909     CARD16 pad1 B16;
1910 } xGetKeyboardMappingReq;    
1911
1912 typedef struct {
1913     CARD8 reqType;
1914     CARD8 keyCodes;
1915     CARD16 length B16;
1916     KeyCode firstKeyCode;
1917     CARD8 keySymsPerKeyCode;
1918     CARD16 pad1 B16;
1919 } xChangeKeyboardMappingReq;
1920
1921 typedef struct {
1922     CARD8 reqType;
1923     BYTE pad;
1924     CARD16 length B16;
1925     CARD32 mask B32;
1926 } xChangeKeyboardControlReq;    
1927
1928 typedef struct {
1929     CARD8 reqType;
1930     INT8 percent;  /* -100 to 100 */
1931     CARD16 length B16;
1932 } xBellReq;    
1933
1934 typedef struct {
1935     CARD8 reqType;
1936     BYTE pad;
1937     CARD16 length B16;
1938     INT16 accelNum B16, accelDenum B16;
1939     INT16 threshold B16;             
1940     BOOL doAccel, doThresh;
1941 } xChangePointerControlReq;    
1942
1943 typedef struct {
1944     CARD8 reqType;
1945     BYTE pad;
1946     CARD16 length B16;
1947     INT16 timeout B16, interval B16;
1948     BYTE preferBlank, allowExpose;  
1949     CARD16 pad2 B16;
1950 } xSetScreenSaverReq;    
1951
1952 typedef struct {
1953     CARD8 reqType;
1954     BYTE mode;
1955     CARD16 length B16;
1956     CARD8 hostFamily;
1957     BYTE pad;
1958     CARD16 hostLength B16;
1959 } xChangeHostsReq;    
1960
1961 typedef struct {
1962     CARD8 reqType;
1963     BYTE pad;
1964     CARD16 length B16;
1965     } xListHostsReq;
1966
1967 typedef struct {
1968     CARD8 reqType;
1969     BYTE mode;
1970     CARD16 length B16;
1971     } xChangeModeReq;
1972
1973 typedef xChangeModeReq xSetAccessControlReq;
1974 typedef xChangeModeReq xSetCloseDownModeReq;
1975 typedef xChangeModeReq xForceScreenSaverReq;
1976
1977 typedef struct { /* followed by LIST of ATOM */
1978     CARD8 reqType;
1979     BYTE pad;
1980     CARD16 length B16;
1981     Window window B32;
1982     CARD16 nAtoms B16;
1983     INT16 nPositions B16;
1984     } xRotatePropertiesReq;
1985     
1986 \f
1987
1988 /* Reply codes */
1989
1990 #define X_Reply         1               /* Normal reply */
1991 #define X_Error         0               /* Error */
1992
1993 /* Request codes */
1994
1995 #define X_CreateWindow                  1              
1996 #define X_ChangeWindowAttributes        2        
1997 #define X_GetWindowAttributes           3     
1998 #define X_DestroyWindow                 4
1999 #define X_DestroySubwindows             5   
2000 #define X_ChangeSaveSet                 6
2001 #define X_ReparentWindow                7
2002 #define X_MapWindow                     8
2003 #define X_MapSubwindows                 9
2004 #define X_UnmapWindow                  10
2005 #define X_UnmapSubwindows              11  
2006 #define X_ConfigureWindow              12  
2007 #define X_CirculateWindow              13  
2008 #define X_GetGeometry                  14
2009 #define X_QueryTree                    15
2010 #define X_InternAtom                   16
2011 #define X_GetAtomName                  17
2012 #define X_ChangeProperty               18 
2013 #define X_DeleteProperty               19 
2014 #define X_GetProperty                  20
2015 #define X_ListProperties               21 
2016 #define X_SetSelectionOwner            22    
2017 #define X_GetSelectionOwner            23    
2018 #define X_ConvertSelection             24   
2019 #define X_SendEvent                    25
2020 #define X_GrabPointer                  26
2021 #define X_UngrabPointer                27
2022 #define X_GrabButton                   28
2023 #define X_UngrabButton                 29
2024 #define X_ChangeActivePointerGrab      30          
2025 #define X_GrabKeyboard                 31
2026 #define X_UngrabKeyboard               32 
2027 #define X_GrabKey                      33
2028 #define X_UngrabKey                    34
2029 #define X_AllowEvents                  35       
2030 #define X_GrabServer                   36      
2031 #define X_UngrabServer                 37        
2032 #define X_QueryPointer                 38        
2033 #define X_GetMotionEvents              39           
2034 #define X_TranslateCoords              40                
2035 #define X_WarpPointer                  41       
2036 #define X_SetInputFocus                42         
2037 #define X_GetInputFocus                43         
2038 #define X_QueryKeymap                  44       
2039 #define X_OpenFont                     45    
2040 #define X_CloseFont                    46     
2041 #define X_QueryFont                    47
2042 #define X_QueryTextExtents             48     
2043 #define X_ListFonts                    49  
2044 #define X_ListFontsWithInfo            50 
2045 #define X_SetFontPath                  51 
2046 #define X_GetFontPath                  52 
2047 #define X_CreatePixmap                 53        
2048 #define X_FreePixmap                   54      
2049 #define X_CreateGC                     55    
2050 #define X_ChangeGC                     56    
2051 #define X_CopyGC                       57  
2052 #define X_SetDashes                    58     
2053 #define X_SetClipRectangles            59             
2054 #define X_FreeGC                       60  
2055 #define X_ClearArea                    61             
2056 #define X_CopyArea                     62    
2057 #define X_CopyPlane                    63     
2058 #define X_PolyPoint                    64     
2059 #define X_PolyLine                     65    
2060 #define X_PolySegment                  66       
2061 #define X_PolyRectangle                67         
2062 #define X_PolyArc                      68   
2063 #define X_FillPoly                     69    
2064 #define X_PolyFillRectangle            70             
2065 #define X_PolyFillArc                  71       
2066 #define X_PutImage                     72    
2067 #define X_GetImage                     73 
2068 #define X_PolyText8                    74     
2069 #define X_PolyText16                   75      
2070 #define X_ImageText8                   76      
2071 #define X_ImageText16                  77       
2072 #define X_CreateColormap               78          
2073 #define X_FreeColormap                 79        
2074 #define X_CopyColormapAndFree          80               
2075 #define X_InstallColormap              81           
2076 #define X_UninstallColormap            82             
2077 #define X_ListInstalledColormaps       83                  
2078 #define X_AllocColor                   84      
2079 #define X_AllocNamedColor              85           
2080 #define X_AllocColorCells              86           
2081 #define X_AllocColorPlanes             87            
2082 #define X_FreeColors                   88      
2083 #define X_StoreColors                  89       
2084 #define X_StoreNamedColor              90           
2085 #define X_QueryColors                  91       
2086 #define X_LookupColor                  92       
2087 #define X_CreateCursor                 93        
2088 #define X_CreateGlyphCursor            94             
2089 #define X_FreeCursor                   95      
2090 #define X_RecolorCursor                96         
2091 #define X_QueryBestSize                97         
2092 #define X_QueryExtension               98          
2093 #define X_ListExtensions               99          
2094 #define X_ChangeKeyboardMapping        100
2095 #define X_GetKeyboardMapping           101
2096 #define X_ChangeKeyboardControl        102                
2097 #define X_GetKeyboardControl           103             
2098 #define X_Bell                         104
2099 #define X_ChangePointerControl         105
2100 #define X_GetPointerControl            106
2101 #define X_SetScreenSaver               107          
2102 #define X_GetScreenSaver               108          
2103 #define X_ChangeHosts                  109       
2104 #define X_ListHosts                    110     
2105 #define X_SetAccessControl             111               
2106 #define X_SetCloseDownMode             112
2107 #define X_KillClient                   113 
2108 #define X_RotateProperties             114
2109 #define X_ForceScreenSaver             115
2110 #define X_SetPointerMapping            116
2111 #define X_GetPointerMapping            117
2112 #define X_SetModifierMapping           118
2113 #define X_GetModifierMapping           119
2114 #define X_NoOperation                  127
2115
2116 /* restore these definitions back to the typedefs in X.h */
2117 #undef Window
2118 #undef Drawable
2119 #undef Font
2120 #undef Pixmap
2121 #undef Cursor
2122 #undef Colormap
2123 #undef GContext
2124 #undef Atom
2125 #undef VisualID
2126 #undef Time
2127 #undef KeyCode
2128 #undef KeySym
2129
2130 #endif /* XPROTO_H */