⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xproto.h

📁 远程桌面连接工具
💻 H
📖 第 1 页 / 共 4 页
字号:
/* *	$XConsortium: Xproto.h /main/21 1996/03/20 15:27:51 mor $ *//* Definitions for the X window system used by server and c bindings *//* * This packet-construction scheme makes the following assumptions: * * 1. The compiler is able * to generate code which addresses one- and two-byte quantities. * In the worst case, this would be done with bit-fields.  If bit-fields * are used it may be necessary to reorder the request fields in this file, * depending on the order in which the machine assigns bit fields to * machine words.  There may also be a problem with sign extension, * as K+R specify that bitfields are always unsigned. * * 2. 2- and 4-byte fields in packet structures must be ordered by hand * such that they are naturally-aligned, so that no compiler will ever * insert padding bytes. * * 3. All packets are hand-padded to a multiple of 4 bytes, for * the same reason. */#ifndef XPROTO_H#define XPROTO_H/***********************************************************Copyright (c) 1987  X ConsortiumPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THEX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER INAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Except as contained in this notice, the name of the X Consortium shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from the X Consortium.Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.                        All Rights ReservedPermission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and thatboth that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not beused in advertising or publicity pertaining to distribution of thesoftware without specific, written prior permission.  DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDINGALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALLDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ORANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THISSOFTWARE.******************************************************************/#include <X11/Xmd.h>#include <X11/Xprotostr.h>/* * Define constants for the sizes of the network packets.  The sz_ prefix is * used instead of something more descriptive so that the symbols are no more * than 32 characters in length (which causes problems for some compilers). */#define sz_xSegment 8#define sz_xPoint 4#define sz_xRectangle 8#define sz_xArc 12#define sz_xConnClientPrefix 12#define sz_xConnSetupPrefix 8#define sz_xConnSetup 32#define sz_xPixmapFormat 8#define sz_xDepth 8#define sz_xVisualType 24#define sz_xWindowRoot 40#define sz_xTimecoord 8#define sz_xHostEntry 4#define sz_xCharInfo 12#define sz_xFontProp 8#define sz_xTextElt 2#define sz_xColorItem 12#define sz_xrgb 8#define sz_xGenericReply 32#define sz_xGetWindowAttributesReply 44#define sz_xGetGeometryReply 32#define sz_xQueryTreeReply 32#define sz_xInternAtomReply 32#define sz_xGetAtomNameReply 32#define sz_xGetPropertyReply 32#define sz_xListPropertiesReply 32#define sz_xGetSelectionOwnerReply 32#define sz_xGrabPointerReply 32#define sz_xQueryPointerReply 32#define sz_xGetMotionEventsReply 32#define sz_xTranslateCoordsReply 32#define sz_xGetInputFocusReply 32#define sz_xQueryKeymapReply 40#define sz_xQueryFontReply 60#define sz_xQueryTextExtentsReply 32#define sz_xListFontsReply 32#define sz_xGetFontPathReply 32#define sz_xGetImageReply 32#define sz_xListInstalledColormapsReply 32#define sz_xAllocColorReply 32#define sz_xAllocNamedColorReply 32#define sz_xAllocColorCellsReply 32#define sz_xAllocColorPlanesReply 32#define sz_xQueryColorsReply 32#define sz_xLookupColorReply 32#define sz_xQueryBestSizeReply 32#define sz_xQueryExtensionReply 32#define sz_xListExtensionsReply 32#define sz_xSetMappingReply 32#define sz_xGetKeyboardControlReply 52#define sz_xGetPointerControlReply 32#define sz_xGetScreenSaverReply 32#define sz_xListHostsReply 32#define sz_xSetModifierMappingReply 32#define sz_xError 32#define sz_xEvent 32#define sz_xKeymapEvent 32#define sz_xReq 4#define sz_xResourceReq 8#define sz_xCreateWindowReq 32#define sz_xChangeWindowAttributesReq 12#define sz_xChangeSaveSetReq 8#define sz_xReparentWindowReq 16#define sz_xConfigureWindowReq 12#define sz_xCirculateWindowReq 8#define sz_xInternAtomReq 8#define sz_xChangePropertyReq 24#define sz_xDeletePropertyReq 12#define sz_xGetPropertyReq 24#define sz_xSetSelectionOwnerReq 16#define sz_xConvertSelectionReq 24#define sz_xSendEventReq 44#define sz_xGrabPointerReq 24#define sz_xGrabButtonReq 24#define sz_xUngrabButtonReq 12#define sz_xChangeActivePointerGrabReq 16#define sz_xGrabKeyboardReq 16#define sz_xGrabKeyReq 16#define sz_xUngrabKeyReq 12#define sz_xAllowEventsReq 8#define sz_xGetMotionEventsReq 16#define sz_xTranslateCoordsReq 16#define sz_xWarpPointerReq 24#define sz_xSetInputFocusReq 12#define sz_xOpenFontReq 12#define sz_xQueryTextExtentsReq 8#define sz_xListFontsReq 8#define sz_xSetFontPathReq 8#define sz_xCreatePixmapReq 16#define sz_xCreateGCReq 16#define sz_xChangeGCReq 12#define sz_xCopyGCReq 16#define sz_xSetDashesReq 12#define sz_xSetClipRectanglesReq 12#define sz_xCopyAreaReq 28#define sz_xCopyPlaneReq 32#define sz_xPolyPointReq 12#define sz_xPolySegmentReq 12#define sz_xFillPolyReq 16#define sz_xPutImageReq 24#define sz_xGetImageReq 20#define sz_xPolyTextReq 16#define sz_xImageTextReq 16#define sz_xCreateColormapReq 16#define sz_xCopyColormapAndFreeReq 12#define sz_xAllocColorReq 16#define sz_xAllocNamedColorReq 12#define sz_xAllocColorCellsReq 12#define sz_xAllocColorPlanesReq 16#define sz_xFreeColorsReq 12#define sz_xStoreColorsReq 8#define sz_xStoreNamedColorReq 16#define sz_xQueryColorsReq 8#define sz_xLookupColorReq 12#define sz_xCreateCursorReq 32#define sz_xCreateGlyphCursorReq 32#define sz_xRecolorCursorReq 20#define sz_xQueryBestSizeReq 12#define sz_xQueryExtensionReq 8#define sz_xChangeKeyboardControlReq 8#define sz_xBellReq 4#define sz_xChangePointerControlReq 12#define sz_xSetScreenSaverReq 12#define sz_xChangeHostsReq 8#define sz_xListHostsReq 4#define sz_xChangeModeReq 4#define sz_xRotatePropertiesReq 12#define sz_xReply 32#define sz_xGrabKeyboardReply 32#define sz_xListFontsWithInfoReply 60#define sz_xSetPointerMappingReply 32#define sz_xGetKeyboardMappingReply 32#define sz_xGetPointerMappingReply 32#define sz_xGetModifierMappingReply 32#define sz_xListFontsWithInfoReq 8#define sz_xPolyLineReq 12#define sz_xPolyArcReq 12#define sz_xPolyRectangleReq 12#define sz_xPolyFillRectangleReq 12#define sz_xPolyFillArcReq 12#define sz_xPolyText8Req 16#define sz_xPolyText16Req 16#define sz_xImageText8Req 16#define sz_xImageText16Req 16#define sz_xSetPointerMappingReq 4#define sz_xForceScreenSaverReq 4#define sz_xSetCloseDownModeReq 4#define sz_xClearAreaReq 16#define sz_xSetAccessControlReq 4#define sz_xGetKeyboardMappingReq 8#define sz_xSetModifierMappingReq 4#define sz_xPropIconSize 24#define sz_xChangeKeyboardMappingReq 8/* For the purpose of the structure definitions in this file,we must redefine the following types in terms of Xmd.h's types, which mayinclude bit fields.  All of these are #undef'd at the end of this file,restoring the definitions in X.h.  */#define Window CARD32#define Drawable CARD32#define Font CARD32#define Pixmap CARD32#define Cursor CARD32#define Colormap CARD32#define GContext CARD32#define Atom CARD32#define VisualID CARD32#define Time CARD32#define KeyCode CARD8#define KeySym CARD32#define X_TCP_PORT 6000     /* add display number */#define xTrue        1#define xFalse       0typedef CARD16 KeyButMask;/*****************    connection setup structure.  This is followed by   numRoots xWindowRoot structs.*****************/typedef struct {    CARD8	byteOrder;    BYTE	pad;    CARD16	majorVersion B16, minorVersion B16;    CARD16	nbytesAuthProto B16;	/* Authorization protocol */    CARD16	nbytesAuthString B16;	/* Authorization string */    CARD16	pad2 B16;} xConnClientPrefix;typedef struct {    CARD8          success;    BYTE           lengthReason; /*num bytes in string following if failure */    CARD16         majorVersion B16,                    minorVersion B16;    CARD16         length B16;  /* 1/4 additional bytes in setup info */} xConnSetupPrefix;typedef struct {    CARD32         release B32;    CARD32         ridBase B32,                    ridMask B32;    CARD32         motionBufferSize B32;    CARD16         nbytesVendor B16;  /* number of bytes in vendor string */    CARD16         maxRequestSize B16;    CARD8          numRoots;          /* number of roots structs to follow */    CARD8          numFormats;        /* number of pixmap formats */    CARD8          imageByteOrder;        /* LSBFirst, MSBFirst */    CARD8          bitmapBitOrder;        /* LeastSignificant, MostSign...*/    CARD8          bitmapScanlineUnit,     /* 8, 16, 32 */                   bitmapScanlinePad;     /* 8, 16, 32 */    KeyCode	   minKeyCode, maxKeyCode;    CARD32	   pad2 B32;} xConnSetup;typedef struct {    CARD8          depth;    CARD8          bitsPerPixel;    CARD8          scanLinePad;    CARD8          pad1;    CARD32	   pad2 B32;} xPixmapFormat;/* window root */typedef struct {    CARD8 	depth;    CARD8 	pad1;    CARD16	nVisuals B16;  /* number of xVisualType structures following */    CARD32	pad2 B32;    } xDepth;typedef struct {    VisualID visualID B32;#if defined(__cplusplus) || defined(c_plusplus)    CARD8 c_class;#else    CARD8 class;#endif    CARD8 bitsPerRGB;    CARD16 colormapEntries B16;    CARD32 redMask B32, greenMask B32, blueMask B32;    CARD32 pad B32;    } xVisualType;typedef struct {    Window         windowId B32;    Colormap       defaultColormap B32;    CARD32         whitePixel B32, blackPixel B32;    CARD32         currentInputMask B32;       CARD16         pixWidth B16, pixHeight B16;    CARD16         mmWidth B16, mmHeight B16;    CARD16         minInstalledMaps B16, maxInstalledMaps B16;    VisualID       rootVisualID B32;    CARD8          backingStore;    BOOL           saveUnders;    CARD8          rootDepth;    CARD8          nDepths;  /* number of xDepth structures following */} xWindowRoot;/***************************************************************** * Structure Defns *   Structures needed for replies  *****************************************************************//* Used in GetMotionEvents */typedef struct {    CARD32 time B32;    INT16 x B16, y B16;} xTimecoord;typedef struct {    CARD8 family;    BYTE pad;    CARD16 length B16;} xHostEntry;typedef struct {    INT16 leftSideBearing B16,	  rightSideBearing B16,	  characterWidth B16,	  ascent B16,	  descent B16;    CARD16 attributes B16;} xCharInfo;typedef struct {    Atom name B32;    CARD32 value B32;} xFontProp;/* * non-aligned big-endian font ID follows this struct */typedef struct {           /* followed by string */    CARD8 len;	/* number of *characters* in string, or FontChange (255)		   for font change, or 0 if just delta given */    INT8 delta;} xTextElt;typedef struct {            CARD32 pixel B32;    CARD16 red B16, green B16, blue B16;    CARD8 flags;  /* DoRed, DoGreen, DoBlue booleans */    CARD8 pad;} xColorItem;typedef struct {    CARD16 red B16, green B16, blue B16, pad B16;} xrgb;typedef CARD8 KEYCODE;/***************** * XRep: *    meant to be 32 byte quantity  *****************//* GenericReply is the common format of all replies.  The "data" items   are specific to each individual reply type. */typedef struct {	    BYTE type;              /* X_Reply */    BYTE data1;             /* depends on reply type */    CARD16 sequenceNumber B16;  /* of last request received by server */    CARD32 length B32;      /* 4 byte quantities beyond size of GenericReply */    CARD32 data00 B32;    CARD32 data01 B32;    CARD32 data02 B32;    CARD32 data03 B32;    CARD32 data04 B32;    CARD32 data05 B32;    } xGenericReply;/* Individual reply formats. */typedef struct {    BYTE type;  /* X_Reply */    CARD8 backingStore;    CARD16 sequenceNumber B16;    CARD32 length B32;	/* NOT 0; this is an extra-large reply */    VisualID visualID B32;#if defined(__cplusplus) || defined(c_plusplus)    CARD16 c_class B16;#else    CARD16 class B16;#endif    CARD8 bitGravity;    CARD8 winGravity;    CARD32 backingBitPlanes B32;    CARD32 backingPixel B32;    BOOL saveUnder;    BOOL mapInstalled;    CARD8 mapState;    BOOL override;    Colormap colormap B32;    CARD32 allEventMasks B32;    CARD32 yourEventMask B32;    CARD16 doNotPropagateMask B16;    CARD16 pad B16;    } xGetWindowAttributesReply;typedef struct {    BYTE type;   /* X_Reply */    CARD8 depth;    CARD16 sequenceNumber B16;    CARD32 length B32;  /* 0 */    Window root B32;    INT16 x B16, y B16;    CARD16 width B16, height B16;    CARD16 borderWidth B16;    CARD16 pad1 B16;    CARD32 pad2 B32;    CARD32 pad3 B32;    } xGetGeometryReply;typedef struct {    BYTE type;  /* X_Reply */    BYTE pad1;    CARD16 sequenceNumber B16;    CARD32 length B32;    Window root B32, parent B32;    CARD16 nChildren B16;    CARD16 pad2 B16;    CARD32 pad3 B32;    CARD32 pad4 B32;    CARD32 pad5 B32;    } xQueryTreeReply;typedef struct {    BYTE type;  /* X_Reply */    BYTE pad1;    CARD16 sequenceNumber B16;    CARD32 length B32; /* 0 */    Atom atom B32;    CARD32 pad2 B32;    CARD32 pad3 B32;    CARD32 pad4 B32;    CARD32 pad5 B32;    CARD32 pad6 B32;    } xInternAtomReply;typedef struct {    BYTE type;  /* X_Reply */    BYTE pad1;    CARD16 sequenceNumber B16;    CARD32 length B32;  /* of additional bytes */    CARD16 nameLength B16;  /* # of characters in name */    CARD16 pad2 B16;    CARD32 pad3 B32;    CARD32 pad4 B32;    CARD32 pad5 B32;    CARD32 pad6 B32;    CARD32 pad7 B32;    } xGetAtomNameReply;typedef struct {    BYTE type;  /* X_Reply */    CARD8 format;    CARD16 sequenceNumber B16;    CARD32 length B32; /* of additional bytes */    Atom propertyType B32;    CARD32 bytesAfter B32;    CARD32 nItems B32; /* # of 8, 16, or 32-bit entities in reply */    CARD32 pad1 B32;    CARD32 pad2 B32;    CARD32 pad3 B32;    } xGetPropertyReply;typedef struct {    BYTE type;  /* X_Reply */    BYTE pad1;    CARD16 sequenceNumber B16;    CARD32 length B32;    CARD16 nProperties B16;    CARD16 pad2 B16;    CARD32 pad3 B32;    CARD32 pad4 B32;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -