[comp.sources.misc] v05i003: lwf

lee@uhccux.uhcc.Hawaii.Edu (Greg Lee ) (10/22/88)

Posting-number: Volume 5, Issue 3
Submitted-by: "Greg Lee " <lee@uhccux.uhcc.Hawaii.Edu>
Archive-name: lwf/Part3

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 3 (of 3)."
# Contents:  Xproto.h
# Wrapped by lee@uhccux on Wed Oct 19 17:12:34 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Xproto.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Xproto.h'\"
else
echo shar: Extracting \"'Xproto.h'\" \(49611 characters\)
sed "s/^X//" >'Xproto.h' <<'END_OF_FILE'
X/*
X *	$Header: Xproto.h,v 1.74 88/01/30 17:48:56 rws Exp $
X */
X
X/* Definitions for the X window system used by server and c bindings */
X
X/*
X * This packet-construction scheme makes the following assumptions:
X *
X * 1. The compiler is able
X * to generate code which addresses one- and two-byte quantities.
X * In the worst case, this would be done with bit-fields.  If bit-fields
X * are used it may be necessary to reorder the request fields in this file,
X * depending on the order in which the machine assigns bit fields to
X * machine words.  There may also be a problem with sign extension,
X * as K+R specify that bitfields are always unsigned.
X *
X * 2. 2- and 4-byte fields in packet structures must be ordered by hand
X * such that they are naturally-aligned, so that no compiler will ever
X * insert padding bytes.
X *
X * 3. All packets are hand-padded to a multiple of 4 bytes, for
X * the same reason.
X */
X
X#ifndef XPROTO_H
X#define XPROTO_H
X
X/***********************************************************
XCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
Xand the Massachusetts Institute of Technology, Cambridge, Massachusetts.
X
X                        All Rights Reserved
X
XPermission to use, copy, modify, and distribute this software and its 
Xdocumentation for any purpose and without fee is hereby granted, 
Xprovided that the above copyright notice appear in all copies and that
Xboth that copyright notice and this permission notice appear in 
Xsupporting documentation, and that the names of Digital or MIT not be
Xused in advertising or publicity pertaining to distribution of the
Xsoftware without specific, written prior permission.  
X
XDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
XALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
XDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
XANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
XWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
XARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
XSOFTWARE.
X
X******************************************************************/
X
X#include "Xmd.h"  
X#include "Xprotostr.h"
X
X/* For the purpose of the structure definitions in this file,
Xwe must redefine the following types in terms of Xmd.h's types, which may
Xinclude bit fields.  All of these are #undef'd at the end of this file,
Xrestoring the definitions in X.h.  */
X
X#define Window CARD32
X#define Drawable CARD32
X#define Font CARD32
X#define Pixmap CARD32
X#define Cursor CARD32
X#define Colormap CARD32
X#define GContext CARD32
X#define Atom CARD32
X#define VisualID CARD32
X#define Time CARD32
X#define KeyCode CARD8
X#define KeySym CARD32
X
X#define X_TCP_PORT 6000     /* add display number */
X
X#define xTrue        1
X#define xFalse       0
X
X
Xtypedef CARD16 KeyButMask;
X
X/***************** 
X   connection setup structure.  This is followed by
X   numRoots xWindowRoot structs.
X*****************/
X
Xtypedef struct {
X    CARD8	byteOrder;
X    BYTE	pad;
X    CARD16	majorVersion B16, minorVersion B16;
X    CARD16	nbytesAuthProto B16;	/* Authorization protocol */
X    CARD16	nbytesAuthString B16;	/* Authorization string */
X    CARD16	pad2;
X} xConnClientPrefix;
X
Xtypedef struct {
X    BOOL           success;
X    BYTE           lengthReason; /*num bytes in string following if failure */
X    CARD16         majorVersion B16, 
X                   minorVersion B16;
X    CARD16         length B16;  /* 1/4 additional bytes in setup info */
X} xConnSetupPrefix;
X
X
Xtypedef struct {
X    CARD32         release B32;
X    CARD32         ridBase B32, 
X                   ridMask B32;
X    CARD32         motionBufferSize B32;
X    CARD16         nbytesVendor B16;  /* number of bytes in vendor string */
X    CARD16         maxRequestSize B16;
X    CARD8          numRoots;          /* number of roots structs to follow */
X    CARD8          numFormats;        /* number of pixmap formats */
X    CARD8          imageByteOrder;        /* LSBFirst, MSBFirst */
X    CARD8          bitmapBitOrder;        /* LeastSignificant, MostSign...*/
X    CARD8          bitmapScanlineUnit,     /* 8, 16, 32 */
X                   bitmapScanlinePad;     /* 8, 16, 32 */
X    KeyCode	   minKeyCode, maxKeyCode;
X    CARD32	   pad2 B32;
X} xConnSetup;
X
Xtypedef struct {
X    CARD8          depth;
X    CARD8          bitsPerPixel;
X    CARD8          scanLinePad;
X    CARD8          pad1;
X    CARD32	   pad2 B32;
X} xPixmapFormat;
X
X/* window root */
X
Xtypedef struct {
X    CARD8 	depth;
X    CARD8 	pad1;
X    CARD16	nVisuals B16;  /* number of xVisualType structures following */
X    CARD32	pad2 B32;
X    } xDepth;
X
Xtypedef struct {
X    VisualID visualID B32;
X    CARD8 class;
X    CARD8 bitsPerRGB;
X    CARD16 colormapEntries B16;
X    CARD32 redMask B32, greenMask B32, blueMask B32;
X    CARD32 pad B32;
X    } xVisualType;
X
Xtypedef struct {
X    Window         windowId B32;
X    Colormap       defaultColormap B32;
X    CARD32         whitePixel B32, blackPixel B32;
X    CARD32         currentInputMask B32;   
X    CARD16         pixWidth B16, pixHeight B16;
X    CARD16         mmWidth B16, mmHeight B16;
X    CARD16         minInstalledMaps B16, maxInstalledMaps B16;
X    VisualID       rootVisualID B32;
X    CARD8          backingStore;
X    BOOL           saveUnders;
X    CARD8          rootDepth;
X    CARD8          nDepths;  /* number of xDepth structures following */
X} xWindowRoot;
X
X
X/*****************************************************************
X * Structure Defns
X *   Structures needed for replies 
X *****************************************************************/
X
X/* Used in GetMotionEvents */
X
Xtypedef struct {
X    CARD32 time B32;
X    CARD16 x B16, y B16;
X} xTimecoord;
X
Xtypedef struct {
X    CARD8 family;
X    BYTE pad;
X    CARD16 length B16;
X} xHostEntry;
X
Xtypedef struct {
X    INT16 leftSideBearing B16,
X	  rightSideBearing B16,
X	  characterWidth B16,
X	  ascent B16,
X	  descent B16;
X    CARD16 attributes B16;
X} xCharInfo;
X
Xtypedef struct {
X    Atom name B32;
X    CARD32 value B32;
X} xFontProp;
X
X/*
X * non-aligned big-endian font ID follows this struct
X */
Xtypedef struct {           /* followed by string */
X    CARD8 len;	/* number of *characters* in string, or FontChange (255)
X		   for font change, or 0 if just delta given */
X    INT8 delta;
X} xTextElt;
X
X
Xtypedef struct {        
X    CARD32 pixel B32;
X    CARD16 red B16, green B16, blue B16;
X    CARD8 flags;  /* DoRed, DoGreen, DoBlue booleans */
X    CARD8 pad;
X} xColorItem;
X
X
Xtypedef struct {
X    CARD16 red B16, green B16, blue B16, pad B16;
X} xrgb;
X
Xtypedef CARD8 KEYCODE;
X
X
X/*****************
X * XRep:
X *    meant to be 32 byte quantity 
X *****************/
X
X#ifdef NEED_REPLIES
X
X/* GenericReply is the common format of all replies.  The "data" items
X   are specific to each individual reply type. */
X
Xtypedef struct {	
X    BYTE type;              /* X_Reply */
X    BYTE data1;             /* depends on reply type */
X    CARD16 sequenceNumber B16;  /* of last request received by server */
X    CARD32 length B32;      /* 4 byte quantities beyond size of GenericReply */
X    CARD32 data00 B32;
X    CARD32 data01 B32;
X    CARD32 data02 B32;
X    CARD32 data03 B32;
X    CARD32 data04 B32;
X    CARD32 data05 B32;
X    } xGenericReply;
X
X/* Individual reply formats. */
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    CARD8 backingStore;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;	/* NOT 0; this is an extra-large reply */
X    VisualID visualID B32;
X    CARD16 class B16;
X    CARD8 bitGravity;
X    CARD8 winGravity;
X    CARD32 backingBitPlanes B32;
X    CARD32 backingPixel B32;
X    BOOL saveUnder;
X    BOOL mapInstalled;
X    CARD8 mapState;
X    BOOL override;
X    Colormap colormap B32;
X    CARD32 allEventMasks B32;
X    CARD32 yourEventMask B32;
X    CARD16 doNotPropagateMask B16;
X    CARD16 pad B16;
X    } xGetWindowAttributesReply;
X
Xtypedef struct {
X    BYTE type;   /* X_Reply */
X    CARD8 depth;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    Window root B32;
X    INT16 x B16, y B16;
X    CARD16 width B16, height B16;
X    CARD16 borderWidth B16;
X    CARD16 pad1 B16;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    } xGetGeometryReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    Window root B32, parent B32;
X    CARD16 nChildren B16;
X    CARD16 pad2 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    } xQueryTreeReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32; /* 0 */
X    Atom atom B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    } xInternAtomReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* of additional bytes */
X    CARD16 nameLength B16;  /* # of characters in name */
X    CARD16 pad2 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xGetAtomNameReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    CARD8 format;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32; /* of additional bytes */
X    Atom propertyType B32;
X    CARD32 bytesAfter B32;
X    CARD32 nItems B32; /* # of 8, 16, or 32-bit entities in reply */
X    CARD32 pad1 B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    } xGetPropertyReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD16 nProperties B16;
X    CARD16 pad2 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xListPropertiesReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    Window owner B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    } xGetSelectionOwnerReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE status;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    CARD32 pad1 B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    } xGrabPointerReply;
X
Xtypedef xGrabPointerReply xGrabKeyboardReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BOOL sameScreen;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    Window root B32, child B32;
X    INT16 rootX B16, rootY B16, winX B16, winY B16;
X    CARD16 mask B16;
X    CARD16 pad1 B16;
X    CARD32 pad B32;
X    } xQueryPointerReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD32 nEvents B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    } xGetMotionEventsReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BOOL sameScreen;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32; /* 0 */
X    Window child B32;
X    INT16 dstX B16, dstY B16;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    } xTranslateCoordsReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    CARD8 revertTo;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    Window focus B32;
X    CARD32 pad1 B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    } xGetInputFocusReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 2, NOT 0; this is an extra-large reply */
X    BYTE map[32];
X    } xQueryKeymapReply;
X
X/* Warning: this MUST match (up to component renaming) xListFontsWithInfoReply */
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* definitely > 0, even if "nCharInfos" is 0 */
X    xCharInfo minBounds; 
X#ifndef WORD64
X    CARD32 walign1 B32;
X#endif
X    xCharInfo maxBounds; 
X#ifndef WORD64
X    CARD32 walign2 B32;
X#endif
X    CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
X    CARD16 defaultChar B16;
X    CARD16 nFontProps B16;  /* followed by this many xFontProp structures */
X    CARD8 drawDirection;
X    CARD8 minByte1, maxByte1;
X    BOOL allCharsExist;
X    INT16 fontAscent B16, fontDescent B16;
X    CARD32 nCharInfos B32; /* followed by this many xCharInfo structures */
X} xQueryFontReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    CARD8 drawDirection;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    INT16 fontAscent B16, fontDescent B16;
X    INT16 overallAscent B16, overallDescent B16;
X    INT32 overallWidth B32, overallLeft B32, overallRight B32;
X    CARD32 pad B32;
X    } xQueryTextExtentsReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD16 nFonts B16;
X    CARD16 pad2 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xListFontsReply;
X
X/* Warning: this MUST match (up to component renaming) xQueryFontReply */
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    CARD8 nameLength;  /* 0 indicates end-of-reply-sequence */
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* definitely > 0, even if "nameLength" is 0 */
X    xCharInfo minBounds; 
X#ifndef WORD64
X    CARD32 walign1 B32;
X#endif
X    xCharInfo maxBounds; 
X#ifndef WORD64
X    CARD32 walign2 B32;
X#endif
X    CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
X    CARD16 defaultChar B16;
X    CARD16 nFontProps B16;  /* followed by this many xFontProp structures */
X    CARD8 drawDirection;
X    CARD8 minByte1, maxByte1;
X    BOOL allCharsExist;
X    INT16 fontAscent B16, fontDescent B16;
X    CARD32 nReplies B32;   /* hint as to how many more replies might be coming */
X} xListFontsWithInfoReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD16 nPaths B16;
X    CARD16 pad2 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xGetFontPathReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    CARD8 depth;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    VisualID visual B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xGetImageReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD16 nColormaps B16;
X    CARD16 pad2 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xListInstalledColormapsReply;
X
Xtypedef struct {
X    BYTE type; /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;   /* 0 */
X    CARD16 red B16, green B16, blue B16;
X    CARD16 pad2 B16;
X    CARD32 pixel B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    } xAllocColorReply;
X
Xtypedef struct {
X    BYTE type; /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    CARD32 pixel B32;
X    CARD16 exactRed B16, exactGreen B16, exactBlue B16;
X    CARD16 screenRed B16, screenGreen B16, screenBlue B16;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    } xAllocNamedColorReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD16 nPixels B16, nMasks B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xAllocColorCellsReply;
X
Xtypedef struct {
X    BYTE type; /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD16 nPixels B16;
X    CARD16 pad2 B16;
X    CARD32 redMask B16, greenMask B16, blueMask B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    } xAllocColorPlanesReply;
X
Xtypedef struct {
X    BYTE type; /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD16 nColors B16;
X    CARD16 pad2 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xQueryColorsReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    CARD16 exactRed B16, exactGreen B16, exactBlue B16;
X    CARD16 screenRed B16, screenGreen B16, screenBlue B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    } xLookupColorReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    CARD16 width B16, height B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xQueryBestSizeReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32; /* 0 */
X    BOOL  present;
X    CARD8 major_opcode;
X    CARD8 first_event;
X    CARD8 first_error;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xQueryExtensionReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    CARD8 nExtensions;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xListExtensionsReply;
X
X
Xtypedef struct {
X    BYTE   type;  /* X_Reply */
X    CARD8  success;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xSetMappingReply;
Xtypedef xSetMappingReply xSetPointerMappingReply;
Xtypedef xSetMappingReply xSetModifierMappingReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    CARD8 nElts;  /* how many elements does the map have */
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xGetPointerMappingReply;
X
Xtypedef struct {
X    BYTE type;
X    CARD8 keySymsPerKeyCode;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X} xGetKeyboardMappingReply;    
X
Xtypedef struct {
X    BYTE type;
X    CARD8 numKeyPerModifier;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD32 pad1 B32;
X    CARD32 pad2 B32;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X} xGetModifierMappingReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BOOL globalAutoRepeat;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 5 */
X    CARD32 ledMask B32;
X    CARD8 keyClickPercent, bellPercent;
X    CARD16 bellPitch B16, bellDuration B16;
X    CARD16 pad B16;
X    BYTE map[32];  /* bit masks start here */
X    } xGetKeyboardControlReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    CARD16 accelNumerator B16, accelDenominator B16;
X    CARD16 threshold B16;
X    CARD16 pad2 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    } xGetPointerControlReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BYTE pad1;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;  /* 0 */
X    CARD16 timeout B16, interval B16;
X    BOOL preferBlanking;
X    BOOL allowExposures;
X    CARD16 pad2 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    } xGetScreenSaverReply;
X
Xtypedef struct {
X    BYTE type;  /* X_Reply */
X    BOOL enabled;
X    CARD16 sequenceNumber B16;
X    CARD32 length B32;
X    CARD16 nHosts B16;
X    CARD16 pad1 B16;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X    } xListHostsReply;
X
X#endif /* NEED_REPLIES */
X
X
X
X
X/*****************************************************************
X * Xerror
X *    All errors  are 32 bytes 
X *****************************************************************/
X
Xtypedef struct {
X    BYTE type;                  /* X_Error */
X    BYTE errorCode;
X    CARD16 sequenceNumber B16;       /* the nth request from this client */
X    CARD32 resourceID B32;
X    CARD16 minorCode B16;
X    CARD8 majorCode;
X    BYTE pad1;
X    CARD32 pad3 B32;
X    CARD32 pad4 B32;
X    CARD32 pad5 B32;
X    CARD32 pad6 B32;
X    CARD32 pad7 B32;
X} xError;
X
X/*****************************************************************
X * xEvent
X *    All events are 32 bytes
X *****************************************************************/
X
X#ifdef NEED_EVENTS                /* this hack is necessary because
X				     the symbol table in the library
X				     is too big to link */
X
Xtypedef struct {
X    union {
X	struct {
X	    BYTE type;
X	    BYTE detail;
X	    CARD16 sequenceNumber B16;
X	    } u;
X	struct {
X            CARD32 pad00 B32;
X	    Time time B32;
X	    Window root B32, event B32, child B32;
X	    INT16 rootX B16, rootY B16, eventX B16, eventY B16;
X	    KeyButMask state B16;
X	    BOOL sameScreen;		
X	    BYTE pad1;
X	} keyButtonPointer;
X	struct {
X            CARD32 pad00 B32;
X            Time time B32;
X	    Window root B32, event B32, child B32;
X	    INT16 rootX B16, rootY B16, eventX B16, eventY B16;
X	    KeyButMask state B16;
X	    BYTE mode; 			/* really XMode */
X	    BYTE flags;		/* sameScreen and focus booleans, packed together */
X#define ELFlagFocus        (1<<0)
X#define ELFlagSameScreen   (1<<1)
X	} enterLeave;
X	struct {
X            CARD32 pad00 B32;
X	    Window window B32;
X	    BYTE mode; 			/* really XMode */
X	    BYTE pad1, pad2, pad3;
X	} focus;
X	struct {
X            CARD32 pad00 B32;
X	    Window window B32;
X	    CARD16 x B16, y B16, width B16, height B16;
X	    CARD16 count B16;
X	    CARD16 pad2 B16;
X	} expose;
X	struct {
X            CARD32 pad00 B32;
X	    Drawable drawable B32;
X	    CARD16 x B16, y B16, width B16, height B16;
X	    CARD16 minorEvent B16;
X	    CARD16 count B16;
X	    BYTE majorEvent;
X	    BYTE pad1, pad2, pad3;
X	} graphicsExposure;
X	struct {
X            CARD32 pad00 B32;
X	    Drawable drawable B32;
X	    CARD16 minorEvent B16;
X	    BYTE majorEvent;
X	    BYTE bpad;
X	} noExposure;
X	struct {
X            CARD32 pad00 B32;
X	    Window window B32;
X	    CARD8 state;
X	    BYTE pad1, pad2, pad3;
X	} visibility;
X	struct {
X            CARD32 pad00 B32;
X	    Window parent B32, window B32;
X	    INT16 x B16, y B16;
X	    CARD16 width B16, height B16, borderWidth B16;
X	    BOOL override;
X	    BYTE bpad;
X        } createNotify;
X/*
X * The event feilds in the structures for DestroyNotify, UnmapNotify,
X * MapNotify, ReparentNotify, ConfigureNotify, CirclulateNotify, GravityNotify,
X * must be at the same offset because server internal code is depending upon
X * this to patch up the events before they are delivered.
X * Also note that MapRequest, ConfigureRequest and CirculateRequest have
X * the same offset for the event window.
X */
X	struct {
X            CARD32 pad00 B32;
X	    Window event B32, window B32;
X	} destroyNotify;
X	struct {
X            CARD32 pad00 B32;
X	    Window event B32, window B32;
X	    BOOL fromConfigure;
X	    BYTE pad1, pad2, pad3;
X        } unmapNotify;
X	struct {
X            CARD32 pad00 B32;
X	    Window event B32, window B32;
X	    BOOL override;
X	    BYTE pad1, pad2, pad3;
X        } mapNotify;
X	struct {
X            CARD32 pad00 B32;
X	    Window parent B32, window B32;
X        } mapRequest;
X	struct {
X            CARD32 pad00 B32;
X	    Window event B32, window B32, parent B32;
X	    INT16 x B16, y B16;
X	    BOOL override;
X	    BYTE pad1, pad2, pad3;
X	} reparent;
X	struct {
X            CARD32 pad00 B32;
X	    Window event B32, window B32, aboveSibling B32;
X	    INT16 x B16, y B16;
X	    CARD16 width B16, height B16, borderWidth B16;
X	    BOOL override;		
X	    BYTE bpad;
X	} configureNotify;
X	struct {
X            CARD32 pad00 B32;
X	    Window parent B32, window B32, sibling B32;
X	    INT16 x B16, y B16;
X	    CARD16 width B16, height B16, borderWidth B16;
X	    CARD16 valueMask B16;
X	    CARD32 pad1 B32;
X	} configureRequest;
X	struct {
X            CARD32 pad00 B32;
X	    Window event B32, window B32;
X	    INT16 x B16, y B16;
X	    CARD32 pad1, pad2, pad3, pad4;
X	} gravity;
X	struct {
X            CARD32 pad00 B32;
X	    Window window B32;
X	    CARD16 width B16, height B16;
X	} resizeRequest;
X	struct {
X/* The event field in the circulate record is really the parent when this
X   is used as a CirculateRequest insteaad of a CircluateNotify */
X            CARD32 pad00 B32;
X	    Window event B32, window B32, parent B32;
X	    BYTE place;			/* Top or Bottom */
X	    BYTE pad1, pad2, pad3;
X	} circulate;
X	struct {
X            CARD32 pad00 B32;
X	    Window window B32;
X	    Atom atom B32;
X	    Time time B32;
X	    BYTE state;			/* NewValue or Deleted */
X	    BYTE pad1;
X	    CARD16 pad2 B16;
X	} property;
X	struct {
X            CARD32 pad00 B32;
X            Time time B32;     
X	    Window window B32;
X	    Atom atom B32;
X	} selectionClear;
X	struct {
X            CARD32 pad00 B32;
X            Time time B32;    
X	    Window owner B32, requestor B32;
X	    Atom selection B32, target B32, property B32;
X	} selectionRequest;
X	struct {
X            CARD32 pad00 B32;
X            Time time B32;   
X	    Window requestor B32;
X	    Atom selection B32, target B32, property B32;
X	} selectionNotify;
X	struct {
X            CARD32 pad00 B32;
X	    Window window B32;
X	    Colormap colormap B32;
X	    BOOL new;		
X	    BYTE state;			/* Installed or UnInstalled */
X	    BYTE pad1, pad2;
X	} colormap;
X	struct {
X	    CARD32 pad00 B32;
X	    CARD8 request;
X	    KeyCode firstKeyCode;
X	    CARD8 count;
X	    BYTE pad1;
X	} mappingNotify;
X	struct {
X            CARD32 pad00 B32;
X	    Window window B32;
X	    union {
X		struct {
X		    Atom type B32;
X		    INT32 longs0 B32;
X		    INT32 longs1 B32;
X		    INT32 longs2 B32;
X		    INT32 longs3 B32;
X		    INT32 longs4 B32;
X		} l;
X		struct {
X		    Atom type B32;
X		    INT16 shorts0 B16;
X		    INT16 shorts1 B16;
X		    INT16 shorts2 B16;
X		    INT16 shorts3 B16;
X		    INT16 shorts4 B16;
X		    INT16 shorts5 B16;
X		    INT16 shorts6 B16;
X		    INT16 shorts7 B16;
X		    INT16 shorts8 B16;
X		    INT16 shorts9 B16;
X		} s;
X		struct {
X		    Atom type B32;
X		    INT8 bytes[20];
X		} b;
X	    } u; 
X	} clientMessage;
X    } u;
X} xEvent;
X
X/* KeymapNotify events are not included in the above union because they
X   are different from all other events: they do not have a "detail"
X   or "sequenceNumber", so there is room for a 248-bit key mask. */
X
Xtypedef struct {
X    BYTE type;
X    BYTE map[31];
X    } xKeymapEvent;
X
X#endif /* NEED_EVENTS */
X
X#define XEventSize (sizeof(xEvent))
X
X/* XReply is the union of all the replies above whose "fixed part"
Xfits in 32 bytes.  It does NOT include GetWindowAttributesReply,
XQueryFontReply, QueryKeymapReply, or GetKeyboardControlReply 
XListFontsWithInfoReply */
X
X#ifdef NEED_REPLIES
X
Xtypedef union {
X    xGenericReply generic;
X    xGetGeometryReply geom;
X    xQueryTreeReply tree;
X    xInternAtomReply atom;
X    xGetAtomNameReply atomName;
X    xGetPropertyReply property;
X    xListPropertiesReply listProperties;
X    xGetSelectionOwnerReply selection;
X    xGrabPointerReply grabPointer;
X    xGrabKeyboardReply grabKeyboard;
X    xQueryPointerReply pointer;
X    xGetMotionEventsReply motionEvents;
X    xTranslateCoordsReply coords;
X    xGetInputFocusReply inputFocus;
X    xQueryTextExtentsReply textExtents;
X    xListFontsReply fonts;
X    xGetFontPathReply fontPath;
X    xGetImageReply image;
X    xListInstalledColormapsReply colormaps;
X    xAllocColorReply allocColor;
X    xAllocNamedColorReply allocNamedColor;
X    xAllocColorCellsReply colorCells;
X    xAllocColorPlanesReply colorPlanes;
X    xQueryColorsReply colors;
X    xLookupColorReply lookupColor;
X    xQueryBestSizeReply bestSize;
X    xQueryExtensionReply extension;
X    xListExtensionsReply extensions;
X    xSetModifierMappingReply setModifierMapping;
X    xGetModifierMappingReply getModifierMapping;
X    xSetPointerMappingReply setPointerMapping;
X    xGetKeyboardMappingReply getKeyboardMapping;
X    xGetPointerMappingReply getPointerMapping;
X    xGetPointerControlReply pointerControl;
X    xGetScreenSaverReply screenSaver;
X    xListHostsReply hosts;
X    xError error;
X#ifdef NEED_EVENTS
X    xEvent event;
X#endif /* NEED_EVENTS */
X} xReply;
X
X#endif /* NEED_REPLIES */
X
X
X
X/*****************************************************************
X * REQUESTS
X *****************************************************************/
X
X
X/* Request structure */
X
Xtypedef struct {
X	CARD8 reqType;
X	CARD8 data;            /* meaning depends on request type */
X	CARD16 length B16;         /* length in 4 bytes quantities 
X				  of whole request, including this header */
X} xReq;
X
X/*****************************************************************
X *  structures that follow request. 
X *****************************************************************/
X
X/* ResourceReq is used for any request which has a resource ID 
X   (or Atom or Time) as its one and only argument.  */
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    CARD32 id B32;  /* a Window, Drawable, Font, GContext, Pixmap, etc. */
X    } xResourceReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 depth;
X    CARD16 length B16;
X    Window wid B32, parent B32;
X    INT16 x B16, y B16;
X    CARD16 width B16, height B16, borderWidth B16;  
X    CARD16 class B16;
X    VisualID visual B32;
X    CARD32 mask B32;
X} xCreateWindowReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Window window B32;
X    CARD32 valueMask B32; 
X} xChangeWindowAttributesReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE mode;
X    CARD16 length B16;
X    Window window B32;
X} xChangeSaveSetReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Window window B32, parent B32;
X    INT16 x B16, y B16;
X} xReparentWindowReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 pad;
X    CARD16 length B16;
X    Window window B32;
X    CARD16 mask B16;
X    CARD16 pad2 B16;
X} xConfigureWindowReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 direction;
X    CARD16 length B16;
X    Window window B32;
X} xCirculateWindowReq;
X
Xtypedef struct {    /* followed by padded string */
X    CARD8 reqType;
X    BOOL onlyIfExists;
X    CARD16 length B16;
X    CARD16 nbytes  B16;    /* number of bytes in string */
X    CARD16 pad B16;
X} xInternAtomReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 mode;
X    CARD16 length B16;
X    Window window B32;
X    Atom property B32, type B32;
X    CARD8 format;
X    BYTE pad[3];
X    CARD32 nUnits B32;     /* length of stuff following, depends on format */
X} xChangePropertyReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Window window B32;
X    Atom property B32;
X} xDeletePropertyReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL delete;
X    CARD16 length B16;
X    Window window B32;
X    Atom property B32, type B32;
X    CARD32 longOffset B32;
X    CARD32 longLength B32;
X} xGetPropertyReq;
X 
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Window window B32;
X    Atom selection B32;
X    Time time B32;
X} xSetSelectionOwnerReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Window requestor B32;
X    Atom selection B32, target B32, property B32;
X    Time time B32;
X    } xConvertSelectionReq;
X
X#ifdef NEED_EVENTS
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL propagate;
X    CARD16 length B16;
X    Window destination B32;
X    CARD32 eventMask B32;
X    xEvent event;
X} xSendEventReq;
X
X#endif /* NEED_EVENTS */
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL ownerEvents;
X    CARD16 length B16;
X    Window grabWindow B32;
X    CARD16 eventMask B16;
X    BYTE pointerMode, keyboardMode;
X    Window confineTo B32;
X    Cursor cursor B32;
X    Time time B32;
X} xGrabPointerReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL ownerEvents;
X    CARD16 length B16;
X    Window grabWindow B32;
X    CARD16 eventMask B16;
X    BYTE pointerMode, keyboardMode;
X    Window confineTo B32;
X    Cursor cursor B32;
X    CARD8 button;
X    BYTE pad;
X    CARD16 modifiers B16;
X} xGrabButtonReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 button;
X    CARD16 length B16;
X    Window grabWindow B32;
X    CARD16 modifiers B16;
X    CARD16 pad B16;
X} xUngrabButtonReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Cursor cursor B32;
X    Time time B32;
X    CARD16 eventMask B16;
X    CARD16 pad2 B16;
X} xChangeActivePointerGrabReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL ownerEvents;
X    CARD16 length B16;
X    Window grabWindow B32;
X    Time time B32;
X    BYTE pointerMode, keyboardMode;  
X    CARD16 pad B16;
X} xGrabKeyboardReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL ownerEvents;
X    CARD16 length B16;
X    Window grabWindow B32;
X    CARD16 modifiers B16;
X    CARD8 key;
X    BYTE pointerMode, keyboardMode;  
X    BYTE pad1, pad2, pad3;
X} xGrabKeyReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 key;
X    CARD16 length B16;
X    Window grabWindow B32;
X    CARD16 modifiers B16;
X    CARD16 pad B16;
X} xUngrabKeyReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 mode;
X    CARD16 length B16;
X    Time time B32;
X} xAllowEventsReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Window window B32;
X    Time start B32, stop B32;
X} xGetMotionEventsReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Window srcWid B32, dstWid B32;
X    INT16 srcX B16, srcY B16;
X} xTranslateCoordsReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Window srcWid B32, dstWid B32;
X    INT16 srcX B16, srcY B16;
X    CARD16 srcWidth B16, srcHeight B16;
X    INT16 dstX B16, dstY B16;
X} xWarpPointerReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 revertTo;
X    CARD16 length B16;
X    Window focus B32;
X    Time time B32;
X} xSetInputFocusReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Font fid B32;
X    CARD16 nbytes B16;
X    BYTE pad1, pad2;	/* string follows on word boundary */
X} xOpenFontReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL oddLength;
X    CARD16 length B16;
X    Font fid B32;
X    } xQueryTextExtentsReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    CARD16 maxNames B16;
X    CARD16 nbytes B16;  /* followed immediately by string bytes */
X} xListFontsReq;
X
Xtypedef xListFontsReq xListFontsWithInfoReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    CARD16 nFonts B16;
X    BYTE pad1, pad2;	/* LISTofSTRING8 follows on word boundary */
X} xSetFontPathReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 depth;
X    CARD16 length B16;
X    Pixmap pid B32;
X    Drawable drawable B32;
X    CARD16 width B16, height B16;
X} xCreatePixmapReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    GContext gc B32;
X    Drawable drawable B32;
X    CARD32 mask B32;
X} xCreateGCReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    GContext gc B32;
X    CARD32 mask B32;
X} xChangeGCReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    GContext srcGC B32, dstGC B32;
X    CARD32 mask B32;
X} xCopyGCReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    GContext gc B32;
X    CARD16 dashOffset B16;
X    CARD16 nDashes B16;        /* length LISTofCARD8 of values following */
X} xSetDashesReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE ordering;
X    CARD16 length B16;
X    GContext gc B32;
X    INT16 xOrigin B16, yOrigin B16;
X} xSetClipRectanglesReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL exposures;
X    CARD16 length B16;
X    Window window B32;
X    INT16 x B16, y B16;
X    CARD16 width B16, height B16;
X} xClearAreaReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Drawable srcDrawable B32, dstDrawable B32;
X    GContext gc B32;
X    INT16 srcX B16, srcY B16, dstX B16, dstY B16;
X    CARD16 width B16, height B16;
X} xCopyAreaReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Drawable srcDrawable B32, dstDrawable B32;
X    GContext gc B32;
X    INT16 srcX B16, srcY B16, dstX B16, dstY B16;
X    CARD16 width B16, height B16;
X    CARD32 bitPlane B32;
X} xCopyPlaneReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE coordMode;
X    CARD16 length B16;
X    Drawable drawable B32;
X    GContext gc B32;
X} xPolyPointReq;    
X
Xtypedef xPolyPointReq xPolyLineReq;  /* same request structure */
X
X/* The following used for PolySegment, PolyRectangle, PolyArc, PolyFillRectangle, PolyFillArc */
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Drawable drawable B32;
X    GContext gc B32;
X} xPolySegmentReq;    
X
Xtypedef xPolySegmentReq xPolyArcReq;
Xtypedef xPolySegmentReq xPolyRectangleReq;
Xtypedef xPolySegmentReq xPolyFillRectangleReq;
Xtypedef xPolySegmentReq xPolyFillArcReq;
X
Xtypedef struct _FillPolyReq {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Drawable drawable B32;
X    GContext gc B32;
X    BYTE shape;
X    BYTE coordMode;
X    CARD16 pad1 B16;
X} xFillPolyReq;    
X
X
Xtypedef struct _PutImageReq {
X    CARD8 reqType;
X    CARD8 format;
X    CARD16 length B16;
X    Drawable drawable B32;
X    GContext gc B32;
X    CARD16 width B16, height B16;
X    INT16 dstX B16, dstY B16;
X    CARD8 leftPad;
X    CARD8 depth;
X    CARD16 pad B16;
X} xPutImageReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 format;
X    CARD16 length B16;
X    Drawable drawable B32;
X    INT16 x B16, y B16;
X    CARD16 width B16, height B16;
X    CARD32 planeMask B32;
X} xGetImageReq;    
X
X/* the folloiwng used by PolyText8 and PolyText16 */
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 pad;
X    CARD16 length B16;
X    Drawable drawable B32;
X    GContext gc B32;
X    INT16 x B16, y B16;		/* items (xTextElt) start after struct */
X} xPolyTextReq;    
X
Xtypedef xPolyTextReq xPolyText8Req;
Xtypedef xPolyTextReq xPolyText16Req;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE nChars;
X    CARD16 length B16;
X    Drawable drawable B32;
X    GContext gc B32;
X    INT16 x B16, y B16;
X} xImageTextReq;    
X
Xtypedef xImageTextReq xImageText8Req;
Xtypedef xImageTextReq xImageText16Req;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE alloc;
X    CARD16 length B16;
X    Colormap mid B32;
X    Window window B32;
X    VisualID visual B32;
X} xCreateColormapReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Colormap mid B32;
X    Colormap srcCmap B32;
X} xCopyColormapAndFreeReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Colormap cmap B32;
X    CARD16 red B16, green B16, blue B16;
X    CARD16 pad2 B16;
X} xAllocColorReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Colormap cmap B32;
X    CARD16 nbytes B16;  /* followed by structure */
X    BYTE pad1, pad2;
X} xAllocNamedColorReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL contiguous;
X    CARD16 length B16;
X    Colormap cmap B32;
X    CARD16 colors B16, planes B16;
X} xAllocColorCellsReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BOOL contiguous;
X    CARD16 length B16;
X    Colormap cmap B32;
X    CARD16 colors B16, red B16, green B16, blue B16;
X} xAllocColorPlanesReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Colormap cmap B32;
X    CARD32 planeMask B32;
X} xFreeColorsReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Colormap cmap B32;
X} xStoreColorsReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 flags;   /* DoRed, DoGreen, DoBlue, as in xColorItem */
X    CARD16 length B16;
X    Colormap cmap B32;
X    CARD32 pixel B32;
X    CARD16 nbytes B16;  /* number of name string bytes following structure */
X    BYTE pad1, pad2;
X    } xStoreNamedColorReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Colormap cmap B32;
X} xQueryColorsReq;    
X
Xtypedef struct {    /* followed  by string of length len */
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Colormap cmap B32;
X    CARD16 nbytes B16;  /* number of string bytes following structure*/
X    BYTE pad1, pad2;
X} xLookupColorReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Cursor cid B32;
X    Pixmap source B32, mask B32;
X    CARD16 foreRed B16, foreGreen B16, foreBlue B16;
X    CARD16 backRed B16, backGreen B16, backBlue B16;
X    CARD16 x B16, y B16;
X} xCreateCursorReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Cursor cid B32;
X    Font source B32, mask B32;
X    CARD16 sourceChar B16, maskChar B16;
X    CARD16 foreRed B16, foreGreen B16, foreBlue B16;
X    CARD16 backRed B16, backGreen B16, backBlue B16;
X} xCreateGlyphCursorReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Cursor cursor B32;
X    CARD16 foreRed B16, foreGreen B16, foreBlue B16;
X    CARD16 backRed B16, backGreen B16, backBlue B16;
X} xRecolorCursorReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 class;
X    CARD16 length B16;
X    Drawable drawable B32;
X    CARD16 width B16, height B16;
X} xQueryBestSizeReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    CARD16 nbytes B16;  /* number of string bytes following structure */
X    BYTE pad1, pad2;
X} xQueryExtensionReq;
X
Xtypedef struct {
X    CARD8   reqType;
X    CARD8   numKeyPerModifier;
X    CARD16  length B16;
X} xSetModifierMappingReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 nElts;  /* how many elements in the map */
X    CARD16 length B16;
X} xSetPointerMappingReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    KeyCode firstKeyCode;
X    CARD8 count;
X    CARD16 pad1 B16;
X} xGetKeyboardMappingReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    CARD8 keyCodes;
X    CARD16 length B16;
X    KeyCode firstKeyCode;
X    CARD8 keySymsPerKeyCode;
X    CARD16 pad1 B16;
X} xChangeKeyboardMappingReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    CARD32 mask B32;
X} xChangeKeyboardControlReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    INT8 percent;  /* -100 to 100 */
X    CARD16 length B16;
X} xBellReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    INT16 accelNum B16, accelDenum B16;
X    INT16 threshold B16;             
X    BOOL doAccel, doThresh;
X} xChangePointerControlReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    INT16 timeout B16, interval B16;
X    BYTE preferBlank, allowExpose;  
X    CARD16 pad2 B16;
X} xSetScreenSaverReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE mode;
X    CARD16 length B16;
X    CARD8 hostFamily;
X    BYTE pad;
X    CARD16 hostLength B16;
X} xChangeHostsReq;    
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    } xListHostsReq;
X
Xtypedef struct {
X    CARD8 reqType;
X    BYTE mode;
X    CARD16 length B16;
X    } xChangeModeReq;
X
Xtypedef xChangeModeReq xSetAccessControlReq;
Xtypedef xChangeModeReq xSetCloseDownModeReq;
Xtypedef xChangeModeReq xForceScreenSaverReq;
X
Xtypedef struct { /* followed by LIST of ATOM */
X    CARD8 reqType;
X    BYTE pad;
X    CARD16 length B16;
X    Window window B32;
X    CARD16 nAtoms B16;
X    INT16 nPositions B16;
X    } xRotatePropertiesReq;
X    
X
X
X/* Reply codes */
X
X#define X_Reply		1		/* Normal reply */
X#define X_Error		0		/* Error */
X
X/* Request codes */
X
X#define X_CreateWindow                  1              
X#define X_ChangeWindowAttributes        2        
X#define X_GetWindowAttributes           3     
X#define X_DestroyWindow                 4
X#define X_DestroySubwindows             5   
X#define X_ChangeSaveSet                 6
X#define X_ReparentWindow                7
X#define X_MapWindow                     8
X#define X_MapSubwindows                 9
X#define X_UnmapWindow                  10
X#define X_UnmapSubwindows              11  
X#define X_ConfigureWindow              12  
X#define X_CirculateWindow              13  
X#define X_GetGeometry                  14
X#define X_QueryTree                    15
X#define X_InternAtom                   16
X#define X_GetAtomName                  17
X#define X_ChangeProperty               18 
X#define X_DeleteProperty               19 
X#define X_GetProperty                  20
X#define X_ListProperties               21 
X#define X_SetSelectionOwner            22    
X#define X_GetSelectionOwner            23    
X#define X_ConvertSelection             24   
X#define X_SendEvent                    25
X#define X_GrabPointer                  26
X#define X_UngrabPointer                27
X#define X_GrabButton                   28
X#define X_UngrabButton                 29
X#define X_ChangeActivePointerGrab      30          
X#define X_GrabKeyboard                 31
X#define X_UngrabKeyboard               32 
X#define X_GrabKey                      33
X#define X_UngrabKey                    34
X#define X_AllowEvents                  35       
X#define X_GrabServer                   36      
X#define X_UngrabServer                 37        
X#define X_QueryPointer                 38        
X#define X_GetMotionEvents              39           
X#define X_TranslateCoords              40                
X#define X_WarpPointer                  41       
X#define X_SetInputFocus                42         
X#define X_GetInputFocus                43         
X#define X_QueryKeymap                  44       
X#define X_OpenFont                     45    
X#define X_CloseFont                    46     
X#define X_QueryFont                    47
X#define X_QueryTextExtents             48     
X#define X_ListFonts                    49  
X#define X_ListFontsWithInfo    	       50 
X#define X_SetFontPath                  51 
X#define X_GetFontPath                  52 
X#define X_CreatePixmap                 53        
X#define X_FreePixmap                   54      
X#define X_CreateGC                     55    
X#define X_ChangeGC                     56    
X#define X_CopyGC                       57  
X#define X_SetDashes                    58     
X#define X_SetClipRectangles            59             
X#define X_FreeGC                       60  
X#define X_ClearArea                    61             
X#define X_CopyArea                     62    
X#define X_CopyPlane                    63     
X#define X_PolyPoint                    64     
X#define X_PolyLine                     65    
X#define X_PolySegment                  66       
X#define X_PolyRectangle                67         
X#define X_PolyArc                      68   
X#define X_FillPoly                     69    
X#define X_PolyFillRectangle            70             
X#define X_PolyFillArc                  71       
X#define X_PutImage                     72    
X#define X_GetImage                     73 
X#define X_PolyText8                    74     
X#define X_PolyText16                   75      
X#define X_ImageText8                   76      
X#define X_ImageText16                  77       
X#define X_CreateColormap               78          
X#define X_FreeColormap                 79        
X#define X_CopyColormapAndFree          80               
X#define X_InstallColormap              81           
X#define X_UninstallColormap            82             
X#define X_ListInstalledColormaps       83                  
X#define X_AllocColor                   84      
X#define X_AllocNamedColor              85           
X#define X_AllocColorCells              86           
X#define X_AllocColorPlanes             87            
X#define X_FreeColors                   88      
X#define X_StoreColors                  89       
X#define X_StoreNamedColor              90           
X#define X_QueryColors                  91       
X#define X_LookupColor                  92       
X#define X_CreateCursor                 93        
X#define X_CreateGlyphCursor            94             
X#define X_FreeCursor                   95      
X#define X_RecolorCursor                96         
X#define X_QueryBestSize                97         
X#define X_QueryExtension               98          
X#define X_ListExtensions               99          
X#define X_ChangeKeyboardMapping        100
X#define X_GetKeyboardMapping           101
X#define X_ChangeKeyboardControl        102                
X#define X_GetKeyboardControl           103             
X#define X_Bell                         104
X#define X_ChangePointerControl         105
X#define X_GetPointerControl            106
X#define X_SetScreenSaver               107          
X#define X_GetScreenSaver               108          
X#define X_ChangeHosts                  109       
X#define X_ListHosts                    110     
X#define X_SetAccessControl             111               
X#define X_SetCloseDownMode             112
X#define X_KillClient                   113 
X#define X_RotateProperties	       114
X#define X_ForceScreenSaver	       115
X#define X_SetPointerMapping            116
X#define X_GetPointerMapping            117
X#define X_SetModifierMapping	       118
X#define X_GetModifierMapping	       119
X#define X_NoOperation                  127
X
X/* restore these definitions back to the typedefs in X.h */
X#undef Window
X#undef Drawable
X#undef Font
X#undef Pixmap
X#undef Cursor
X#undef Colormap
X#undef GContext
X#undef Atom
X#undef VisualID
X#undef Time
X#undef KeyCode
X#undef KeySym
X
X#endif /* XPROTO_H */
X
END_OF_FILE
if test 49611 -ne `wc -c <'Xproto.h'`; then
    echo shar: \"'Xproto.h'\" unpacked with wrong size!
fi
# end of 'Xproto.h'
fi
echo shar: End of archive 3 \(of 3\).
cp /dev/null ark3isdone
MISSING=""
for I in 1 2 3 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 3 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0

-- 
         -- Greg, lee@uhccux.uhcc.hawaii.edu