home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsisode80_tar.Z / vmsisode80_tar / sockit / gccinclude / x11 / xproto.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-24  |  50.3 KB  |  1,985 lines

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