117ca54c3Smrg/* Definitions for the X window system likely to be used by applications */ 217ca54c3Smrg 317ca54c3Smrg#ifndef X_H 417ca54c3Smrg#define X_H 517ca54c3Smrg 617ca54c3Smrg/*********************************************************** 717ca54c3Smrg 817ca54c3SmrgCopyright 1987, 1998 The Open Group 917ca54c3Smrg 1017ca54c3SmrgPermission to use, copy, modify, distribute, and sell this software and its 1117ca54c3Smrgdocumentation for any purpose is hereby granted without fee, provided that 1217ca54c3Smrgthe above copyright notice appear in all copies and that both that 1317ca54c3Smrgcopyright notice and this permission notice appear in supporting 1417ca54c3Smrgdocumentation. 1517ca54c3Smrg 1617ca54c3SmrgThe above copyright notice and this permission notice shall be included in 1717ca54c3Smrgall copies or substantial portions of the Software. 1817ca54c3Smrg 1917ca54c3SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2017ca54c3SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2117ca54c3SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2217ca54c3SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 2317ca54c3SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2417ca54c3SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2517ca54c3Smrg 2617ca54c3SmrgExcept as contained in this notice, the name of The Open Group shall not be 2717ca54c3Smrgused in advertising or otherwise to promote the sale, use or other dealings 2817ca54c3Smrgin this Software without prior written authorization from The Open Group. 2917ca54c3Smrg 3017ca54c3Smrg 3117ca54c3SmrgCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 3217ca54c3Smrg 3317ca54c3Smrg All Rights Reserved 3417ca54c3Smrg 35ea1d6981SmrgPermission to use, copy, modify, and distribute this software and its 36ea1d6981Smrgdocumentation for any purpose and without fee is hereby granted, 3717ca54c3Smrgprovided that the above copyright notice appear in all copies and that 38ea1d6981Smrgboth that copyright notice and this permission notice appear in 3917ca54c3Smrgsupporting documentation, and that the name of Digital not be 4017ca54c3Smrgused in advertising or publicity pertaining to distribution of the 41ea1d6981Smrgsoftware without specific, written prior permission. 4217ca54c3Smrg 4317ca54c3SmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 4417ca54c3SmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 4517ca54c3SmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 4617ca54c3SmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 4717ca54c3SmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 4817ca54c3SmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 4917ca54c3SmrgSOFTWARE. 5017ca54c3Smrg 5117ca54c3Smrg******************************************************************/ 5217ca54c3Smrg 5317ca54c3Smrg#define X_PROTOCOL 11 /* current protocol version */ 5417ca54c3Smrg#define X_PROTOCOL_REVISION 0 /* current minor version */ 5517ca54c3Smrg 5617ca54c3Smrg/* Resources */ 5717ca54c3Smrg 5817ca54c3Smrg/* 5917ca54c3Smrg * _XSERVER64 must ONLY be defined when compiling X server sources on 6017ca54c3Smrg * systems where unsigned long is not 32 bits, must NOT be used in 6117ca54c3Smrg * client or library code. 6217ca54c3Smrg */ 6317ca54c3Smrg#ifndef _XSERVER64 6417ca54c3Smrg# ifndef _XTYPEDEF_XID 6517ca54c3Smrg# define _XTYPEDEF_XID 6617ca54c3Smrgtypedef unsigned long XID; 6717ca54c3Smrg# endif 6817ca54c3Smrg# ifndef _XTYPEDEF_MASK 6917ca54c3Smrg# define _XTYPEDEF_MASK 7017ca54c3Smrgtypedef unsigned long Mask; 7117ca54c3Smrg# endif 7217ca54c3Smrg# ifndef _XTYPEDEF_ATOM 7317ca54c3Smrg# define _XTYPEDEF_ATOM 7417ca54c3Smrgtypedef unsigned long Atom; /* Also in Xdefs.h */ 7517ca54c3Smrg# endif 7617ca54c3Smrgtypedef unsigned long VisualID; 7717ca54c3Smrgtypedef unsigned long Time; 7817ca54c3Smrg#else 7917ca54c3Smrg# include <X11/Xmd.h> 8017ca54c3Smrg# ifndef _XTYPEDEF_XID 8117ca54c3Smrg# define _XTYPEDEF_XID 8217ca54c3Smrgtypedef CARD32 XID; 8317ca54c3Smrg# endif 8417ca54c3Smrg# ifndef _XTYPEDEF_MASK 8517ca54c3Smrg# define _XTYPEDEF_MASK 8617ca54c3Smrgtypedef CARD32 Mask; 8717ca54c3Smrg# endif 8817ca54c3Smrg# ifndef _XTYPEDEF_ATOM 8917ca54c3Smrg# define _XTYPEDEF_ATOM 9017ca54c3Smrgtypedef CARD32 Atom; 9117ca54c3Smrg# endif 9217ca54c3Smrgtypedef CARD32 VisualID; 9317ca54c3Smrgtypedef CARD32 Time; 9417ca54c3Smrg#endif 9517ca54c3Smrg 9617ca54c3Smrgtypedef XID Window; 9717ca54c3Smrgtypedef XID Drawable; 9817ca54c3Smrg#ifndef _XTYPEDEF_FONT 9917ca54c3Smrg# define _XTYPEDEF_FONT 10017ca54c3Smrgtypedef XID Font; 10117ca54c3Smrg#endif 10217ca54c3Smrgtypedef XID Pixmap; 10317ca54c3Smrgtypedef XID Cursor; 10417ca54c3Smrgtypedef XID Colormap; 10517ca54c3Smrgtypedef XID GContext; 10617ca54c3Smrgtypedef XID KeySym; 10717ca54c3Smrg 10817ca54c3Smrgtypedef unsigned char KeyCode; 10917ca54c3Smrg 11017ca54c3Smrg/***************************************************************** 11117ca54c3Smrg * RESERVED RESOURCE AND CONSTANT DEFINITIONS 11217ca54c3Smrg *****************************************************************/ 11317ca54c3Smrg 11417ca54c3Smrg#ifndef None 11517ca54c3Smrg#define None 0L /* universal null resource or null atom */ 11617ca54c3Smrg#endif 11717ca54c3Smrg 11817ca54c3Smrg#define ParentRelative 1L /* background pixmap in CreateWindow 11917ca54c3Smrg and ChangeWindowAttributes */ 12017ca54c3Smrg 12117ca54c3Smrg#define CopyFromParent 0L /* border pixmap in CreateWindow 12217ca54c3Smrg and ChangeWindowAttributes 12317ca54c3Smrg special VisualID and special window 12417ca54c3Smrg class passed to CreateWindow */ 12517ca54c3Smrg 12617ca54c3Smrg#define PointerWindow 0L /* destination window in SendEvent */ 12717ca54c3Smrg#define InputFocus 1L /* destination window in SendEvent */ 12817ca54c3Smrg 12917ca54c3Smrg#define PointerRoot 1L /* focus window in SetInputFocus */ 13017ca54c3Smrg 13117ca54c3Smrg#define AnyPropertyType 0L /* special Atom, passed to GetProperty */ 13217ca54c3Smrg 13317ca54c3Smrg#define AnyKey 0L /* special Key Code, passed to GrabKey */ 13417ca54c3Smrg 13517ca54c3Smrg#define AnyButton 0L /* special Button Code, passed to GrabButton */ 13617ca54c3Smrg 13717ca54c3Smrg#define AllTemporary 0L /* special Resource ID passed to KillClient */ 13817ca54c3Smrg 13917ca54c3Smrg#define CurrentTime 0L /* special Time */ 14017ca54c3Smrg 14117ca54c3Smrg#define NoSymbol 0L /* special KeySym */ 14217ca54c3Smrg 143ea1d6981Smrg/***************************************************************** 144ea1d6981Smrg * EVENT DEFINITIONS 14517ca54c3Smrg *****************************************************************/ 14617ca54c3Smrg 14717ca54c3Smrg/* Input Event Masks. Used as event-mask window attribute and as arguments 14817ca54c3Smrg to Grab requests. Not to be confused with event names. */ 14917ca54c3Smrg 15017ca54c3Smrg#define NoEventMask 0L 151ea1d6981Smrg#define KeyPressMask (1L<<0) 152ea1d6981Smrg#define KeyReleaseMask (1L<<1) 153ea1d6981Smrg#define ButtonPressMask (1L<<2) 154ea1d6981Smrg#define ButtonReleaseMask (1L<<3) 155ea1d6981Smrg#define EnterWindowMask (1L<<4) 156ea1d6981Smrg#define LeaveWindowMask (1L<<5) 157ea1d6981Smrg#define PointerMotionMask (1L<<6) 158ea1d6981Smrg#define PointerMotionHintMask (1L<<7) 159ea1d6981Smrg#define Button1MotionMask (1L<<8) 160ea1d6981Smrg#define Button2MotionMask (1L<<9) 161ea1d6981Smrg#define Button3MotionMask (1L<<10) 162ea1d6981Smrg#define Button4MotionMask (1L<<11) 163ea1d6981Smrg#define Button5MotionMask (1L<<12) 164ea1d6981Smrg#define ButtonMotionMask (1L<<13) 16517ca54c3Smrg#define KeymapStateMask (1L<<14) 166ea1d6981Smrg#define ExposureMask (1L<<15) 167ea1d6981Smrg#define VisibilityChangeMask (1L<<16) 168ea1d6981Smrg#define StructureNotifyMask (1L<<17) 169ea1d6981Smrg#define ResizeRedirectMask (1L<<18) 170ea1d6981Smrg#define SubstructureNotifyMask (1L<<19) 171ea1d6981Smrg#define SubstructureRedirectMask (1L<<20) 172ea1d6981Smrg#define FocusChangeMask (1L<<21) 173ea1d6981Smrg#define PropertyChangeMask (1L<<22) 174ea1d6981Smrg#define ColormapChangeMask (1L<<23) 175ea1d6981Smrg#define OwnerGrabButtonMask (1L<<24) 17617ca54c3Smrg 17717ca54c3Smrg/* Event names. Used in "type" field in XEvent structures. Not to be 17817ca54c3Smrgconfused with event masks above. They start from 2 because 0 and 1 17917ca54c3Smrgare reserved in the protocol for errors and replies. */ 18017ca54c3Smrg 18117ca54c3Smrg#define KeyPress 2 18217ca54c3Smrg#define KeyRelease 3 18317ca54c3Smrg#define ButtonPress 4 18417ca54c3Smrg#define ButtonRelease 5 18517ca54c3Smrg#define MotionNotify 6 18617ca54c3Smrg#define EnterNotify 7 18717ca54c3Smrg#define LeaveNotify 8 18817ca54c3Smrg#define FocusIn 9 18917ca54c3Smrg#define FocusOut 10 19017ca54c3Smrg#define KeymapNotify 11 19117ca54c3Smrg#define Expose 12 19217ca54c3Smrg#define GraphicsExpose 13 19317ca54c3Smrg#define NoExpose 14 19417ca54c3Smrg#define VisibilityNotify 15 19517ca54c3Smrg#define CreateNotify 16 19617ca54c3Smrg#define DestroyNotify 17 19717ca54c3Smrg#define UnmapNotify 18 19817ca54c3Smrg#define MapNotify 19 19917ca54c3Smrg#define MapRequest 20 20017ca54c3Smrg#define ReparentNotify 21 20117ca54c3Smrg#define ConfigureNotify 22 20217ca54c3Smrg#define ConfigureRequest 23 20317ca54c3Smrg#define GravityNotify 24 20417ca54c3Smrg#define ResizeRequest 25 20517ca54c3Smrg#define CirculateNotify 26 20617ca54c3Smrg#define CirculateRequest 27 20717ca54c3Smrg#define PropertyNotify 28 20817ca54c3Smrg#define SelectionClear 29 20917ca54c3Smrg#define SelectionRequest 30 21017ca54c3Smrg#define SelectionNotify 31 21117ca54c3Smrg#define ColormapNotify 32 21217ca54c3Smrg#define ClientMessage 33 21317ca54c3Smrg#define MappingNotify 34 21417ca54c3Smrg#define GenericEvent 35 21517ca54c3Smrg#define LASTEvent 36 /* must be bigger than any event # */ 21617ca54c3Smrg 21717ca54c3Smrg 21817ca54c3Smrg/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer, 21917ca54c3Smrg state in various key-, mouse-, and button-related events. */ 22017ca54c3Smrg 22117ca54c3Smrg#define ShiftMask (1<<0) 22217ca54c3Smrg#define LockMask (1<<1) 22317ca54c3Smrg#define ControlMask (1<<2) 22417ca54c3Smrg#define Mod1Mask (1<<3) 22517ca54c3Smrg#define Mod2Mask (1<<4) 22617ca54c3Smrg#define Mod3Mask (1<<5) 22717ca54c3Smrg#define Mod4Mask (1<<6) 22817ca54c3Smrg#define Mod5Mask (1<<7) 22917ca54c3Smrg 23017ca54c3Smrg/* modifier names. Used to build a SetModifierMapping request or 23117ca54c3Smrg to read a GetModifierMapping request. These correspond to the 23217ca54c3Smrg masks defined above. */ 23317ca54c3Smrg#define ShiftMapIndex 0 23417ca54c3Smrg#define LockMapIndex 1 23517ca54c3Smrg#define ControlMapIndex 2 23617ca54c3Smrg#define Mod1MapIndex 3 23717ca54c3Smrg#define Mod2MapIndex 4 23817ca54c3Smrg#define Mod3MapIndex 5 23917ca54c3Smrg#define Mod4MapIndex 6 24017ca54c3Smrg#define Mod5MapIndex 7 24117ca54c3Smrg 24217ca54c3Smrg 24317ca54c3Smrg/* button masks. Used in same manner as Key masks above. Not to be confused 24417ca54c3Smrg with button names below. */ 24517ca54c3Smrg 24617ca54c3Smrg#define Button1Mask (1<<8) 24717ca54c3Smrg#define Button2Mask (1<<9) 24817ca54c3Smrg#define Button3Mask (1<<10) 24917ca54c3Smrg#define Button4Mask (1<<11) 25017ca54c3Smrg#define Button5Mask (1<<12) 25117ca54c3Smrg 25217ca54c3Smrg#define AnyModifier (1<<15) /* used in GrabButton, GrabKey */ 25317ca54c3Smrg 25417ca54c3Smrg 25517ca54c3Smrg/* button names. Used as arguments to GrabButton and as detail in ButtonPress 25617ca54c3Smrg and ButtonRelease events. Not to be confused with button masks above. 25717ca54c3Smrg Note that 0 is already defined above as "AnyButton". */ 25817ca54c3Smrg 25917ca54c3Smrg#define Button1 1 26017ca54c3Smrg#define Button2 2 26117ca54c3Smrg#define Button3 3 26217ca54c3Smrg#define Button4 4 26317ca54c3Smrg#define Button5 5 26417ca54c3Smrg 26517ca54c3Smrg/* Notify modes */ 26617ca54c3Smrg 26717ca54c3Smrg#define NotifyNormal 0 26817ca54c3Smrg#define NotifyGrab 1 26917ca54c3Smrg#define NotifyUngrab 2 27017ca54c3Smrg#define NotifyWhileGrabbed 3 27117ca54c3Smrg 27217ca54c3Smrg#define NotifyHint 1 /* for MotionNotify events */ 273ea1d6981Smrg 27417ca54c3Smrg/* Notify detail */ 27517ca54c3Smrg 27617ca54c3Smrg#define NotifyAncestor 0 27717ca54c3Smrg#define NotifyVirtual 1 27817ca54c3Smrg#define NotifyInferior 2 27917ca54c3Smrg#define NotifyNonlinear 3 28017ca54c3Smrg#define NotifyNonlinearVirtual 4 28117ca54c3Smrg#define NotifyPointer 5 28217ca54c3Smrg#define NotifyPointerRoot 6 28317ca54c3Smrg#define NotifyDetailNone 7 28417ca54c3Smrg 28517ca54c3Smrg/* Visibility notify */ 28617ca54c3Smrg 28717ca54c3Smrg#define VisibilityUnobscured 0 28817ca54c3Smrg#define VisibilityPartiallyObscured 1 28917ca54c3Smrg#define VisibilityFullyObscured 2 29017ca54c3Smrg 29117ca54c3Smrg/* Circulation request */ 29217ca54c3Smrg 29317ca54c3Smrg#define PlaceOnTop 0 29417ca54c3Smrg#define PlaceOnBottom 1 29517ca54c3Smrg 29617ca54c3Smrg/* protocol families */ 29717ca54c3Smrg 29817ca54c3Smrg#define FamilyInternet 0 /* IPv4 */ 29917ca54c3Smrg#define FamilyDECnet 1 30017ca54c3Smrg#define FamilyChaos 2 30117ca54c3Smrg#define FamilyInternet6 6 /* IPv6 */ 30217ca54c3Smrg 30317ca54c3Smrg/* authentication families not tied to a specific protocol */ 30417ca54c3Smrg#define FamilyServerInterpreted 5 30517ca54c3Smrg 30617ca54c3Smrg/* Property notification */ 30717ca54c3Smrg 30817ca54c3Smrg#define PropertyNewValue 0 30917ca54c3Smrg#define PropertyDelete 1 31017ca54c3Smrg 31117ca54c3Smrg/* Color Map notification */ 31217ca54c3Smrg 31317ca54c3Smrg#define ColormapUninstalled 0 31417ca54c3Smrg#define ColormapInstalled 1 31517ca54c3Smrg 31617ca54c3Smrg/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */ 31717ca54c3Smrg 31817ca54c3Smrg#define GrabModeSync 0 31917ca54c3Smrg#define GrabModeAsync 1 32017ca54c3Smrg 32117ca54c3Smrg/* GrabPointer, GrabKeyboard reply status */ 32217ca54c3Smrg 32317ca54c3Smrg#define GrabSuccess 0 32417ca54c3Smrg#define AlreadyGrabbed 1 32517ca54c3Smrg#define GrabInvalidTime 2 32617ca54c3Smrg#define GrabNotViewable 3 32717ca54c3Smrg#define GrabFrozen 4 32817ca54c3Smrg 32917ca54c3Smrg/* AllowEvents modes */ 33017ca54c3Smrg 33117ca54c3Smrg#define AsyncPointer 0 33217ca54c3Smrg#define SyncPointer 1 33317ca54c3Smrg#define ReplayPointer 2 33417ca54c3Smrg#define AsyncKeyboard 3 33517ca54c3Smrg#define SyncKeyboard 4 33617ca54c3Smrg#define ReplayKeyboard 5 33717ca54c3Smrg#define AsyncBoth 6 33817ca54c3Smrg#define SyncBoth 7 33917ca54c3Smrg 34017ca54c3Smrg/* Used in SetInputFocus, GetInputFocus */ 34117ca54c3Smrg 34217ca54c3Smrg#define RevertToNone (int)None 34317ca54c3Smrg#define RevertToPointerRoot (int)PointerRoot 34417ca54c3Smrg#define RevertToParent 2 34517ca54c3Smrg 34617ca54c3Smrg/***************************************************************** 347ea1d6981Smrg * ERROR CODES 34817ca54c3Smrg *****************************************************************/ 34917ca54c3Smrg 35017ca54c3Smrg#define Success 0 /* everything's okay */ 35117ca54c3Smrg#define BadRequest 1 /* bad request code */ 35217ca54c3Smrg#define BadValue 2 /* int parameter out of range */ 35317ca54c3Smrg#define BadWindow 3 /* parameter not a Window */ 35417ca54c3Smrg#define BadPixmap 4 /* parameter not a Pixmap */ 35517ca54c3Smrg#define BadAtom 5 /* parameter not an Atom */ 35617ca54c3Smrg#define BadCursor 6 /* parameter not a Cursor */ 35717ca54c3Smrg#define BadFont 7 /* parameter not a Font */ 35817ca54c3Smrg#define BadMatch 8 /* parameter mismatch */ 35917ca54c3Smrg#define BadDrawable 9 /* parameter not a Pixmap or Window */ 36017ca54c3Smrg#define BadAccess 10 /* depending on context: 36117ca54c3Smrg - key/button already grabbed 362ea1d6981Smrg - attempt to free an illegal 363ea1d6981Smrg cmap entry 364ea1d6981Smrg - attempt to store into a read-only 36517ca54c3Smrg color map entry. 36617ca54c3Smrg - attempt to modify the access control 36717ca54c3Smrg list from other than the local host. 36817ca54c3Smrg */ 36917ca54c3Smrg#define BadAlloc 11 /* insufficient resources */ 37017ca54c3Smrg#define BadColor 12 /* no such colormap */ 37117ca54c3Smrg#define BadGC 13 /* parameter not a GC */ 37217ca54c3Smrg#define BadIDChoice 14 /* choice not in range or already used */ 37317ca54c3Smrg#define BadName 15 /* font or color name doesn't exist */ 37417ca54c3Smrg#define BadLength 16 /* Request length incorrect */ 37517ca54c3Smrg#define BadImplementation 17 /* server is defective */ 37617ca54c3Smrg 37717ca54c3Smrg#define FirstExtensionError 128 37817ca54c3Smrg#define LastExtensionError 255 37917ca54c3Smrg 38017ca54c3Smrg/***************************************************************** 381ea1d6981Smrg * WINDOW DEFINITIONS 38217ca54c3Smrg *****************************************************************/ 38317ca54c3Smrg 38417ca54c3Smrg/* Window classes used by CreateWindow */ 38517ca54c3Smrg/* Note that CopyFromParent is already defined as 0 above */ 38617ca54c3Smrg 38717ca54c3Smrg#define InputOutput 1 38817ca54c3Smrg#define InputOnly 2 38917ca54c3Smrg 39017ca54c3Smrg/* Window attributes for CreateWindow and ChangeWindowAttributes */ 39117ca54c3Smrg 39217ca54c3Smrg#define CWBackPixmap (1L<<0) 39317ca54c3Smrg#define CWBackPixel (1L<<1) 39417ca54c3Smrg#define CWBorderPixmap (1L<<2) 39517ca54c3Smrg#define CWBorderPixel (1L<<3) 39617ca54c3Smrg#define CWBitGravity (1L<<4) 39717ca54c3Smrg#define CWWinGravity (1L<<5) 39817ca54c3Smrg#define CWBackingStore (1L<<6) 39917ca54c3Smrg#define CWBackingPlanes (1L<<7) 40017ca54c3Smrg#define CWBackingPixel (1L<<8) 40117ca54c3Smrg#define CWOverrideRedirect (1L<<9) 40217ca54c3Smrg#define CWSaveUnder (1L<<10) 40317ca54c3Smrg#define CWEventMask (1L<<11) 40417ca54c3Smrg#define CWDontPropagate (1L<<12) 40517ca54c3Smrg#define CWColormap (1L<<13) 40617ca54c3Smrg#define CWCursor (1L<<14) 40717ca54c3Smrg 40817ca54c3Smrg/* ConfigureWindow structure */ 40917ca54c3Smrg 41017ca54c3Smrg#define CWX (1<<0) 41117ca54c3Smrg#define CWY (1<<1) 41217ca54c3Smrg#define CWWidth (1<<2) 41317ca54c3Smrg#define CWHeight (1<<3) 41417ca54c3Smrg#define CWBorderWidth (1<<4) 41517ca54c3Smrg#define CWSibling (1<<5) 41617ca54c3Smrg#define CWStackMode (1<<6) 41717ca54c3Smrg 41817ca54c3Smrg 41917ca54c3Smrg/* Bit Gravity */ 42017ca54c3Smrg 42117ca54c3Smrg#define ForgetGravity 0 42217ca54c3Smrg#define NorthWestGravity 1 42317ca54c3Smrg#define NorthGravity 2 42417ca54c3Smrg#define NorthEastGravity 3 42517ca54c3Smrg#define WestGravity 4 42617ca54c3Smrg#define CenterGravity 5 42717ca54c3Smrg#define EastGravity 6 42817ca54c3Smrg#define SouthWestGravity 7 42917ca54c3Smrg#define SouthGravity 8 43017ca54c3Smrg#define SouthEastGravity 9 43117ca54c3Smrg#define StaticGravity 10 43217ca54c3Smrg 43317ca54c3Smrg/* Window gravity + bit gravity above */ 43417ca54c3Smrg 43517ca54c3Smrg#define UnmapGravity 0 43617ca54c3Smrg 43717ca54c3Smrg/* Used in CreateWindow for backing-store hint */ 43817ca54c3Smrg 43917ca54c3Smrg#define NotUseful 0 44017ca54c3Smrg#define WhenMapped 1 44117ca54c3Smrg#define Always 2 44217ca54c3Smrg 44317ca54c3Smrg/* Used in GetWindowAttributes reply */ 44417ca54c3Smrg 44517ca54c3Smrg#define IsUnmapped 0 44617ca54c3Smrg#define IsUnviewable 1 44717ca54c3Smrg#define IsViewable 2 44817ca54c3Smrg 44917ca54c3Smrg/* Used in ChangeSaveSet */ 45017ca54c3Smrg 45117ca54c3Smrg#define SetModeInsert 0 45217ca54c3Smrg#define SetModeDelete 1 45317ca54c3Smrg 45417ca54c3Smrg/* Used in ChangeCloseDownMode */ 45517ca54c3Smrg 45617ca54c3Smrg#define DestroyAll 0 45717ca54c3Smrg#define RetainPermanent 1 45817ca54c3Smrg#define RetainTemporary 2 45917ca54c3Smrg 46017ca54c3Smrg/* Window stacking method (in configureWindow) */ 46117ca54c3Smrg 46217ca54c3Smrg#define Above 0 46317ca54c3Smrg#define Below 1 46417ca54c3Smrg#define TopIf 2 46517ca54c3Smrg#define BottomIf 3 46617ca54c3Smrg#define Opposite 4 46717ca54c3Smrg 46817ca54c3Smrg/* Circulation direction */ 46917ca54c3Smrg 47017ca54c3Smrg#define RaiseLowest 0 47117ca54c3Smrg#define LowerHighest 1 47217ca54c3Smrg 47317ca54c3Smrg/* Property modes */ 47417ca54c3Smrg 47517ca54c3Smrg#define PropModeReplace 0 47617ca54c3Smrg#define PropModePrepend 1 47717ca54c3Smrg#define PropModeAppend 2 47817ca54c3Smrg 47917ca54c3Smrg/***************************************************************** 48017ca54c3Smrg * GRAPHICS DEFINITIONS 48117ca54c3Smrg *****************************************************************/ 48217ca54c3Smrg 48317ca54c3Smrg/* graphics functions, as in GC.alu */ 48417ca54c3Smrg 48517ca54c3Smrg#define GXclear 0x0 /* 0 */ 48617ca54c3Smrg#define GXand 0x1 /* src AND dst */ 48717ca54c3Smrg#define GXandReverse 0x2 /* src AND NOT dst */ 48817ca54c3Smrg#define GXcopy 0x3 /* src */ 48917ca54c3Smrg#define GXandInverted 0x4 /* NOT src AND dst */ 49017ca54c3Smrg#define GXnoop 0x5 /* dst */ 49117ca54c3Smrg#define GXxor 0x6 /* src XOR dst */ 49217ca54c3Smrg#define GXor 0x7 /* src OR dst */ 49317ca54c3Smrg#define GXnor 0x8 /* NOT src AND NOT dst */ 49417ca54c3Smrg#define GXequiv 0x9 /* NOT src XOR dst */ 49517ca54c3Smrg#define GXinvert 0xa /* NOT dst */ 49617ca54c3Smrg#define GXorReverse 0xb /* src OR NOT dst */ 49717ca54c3Smrg#define GXcopyInverted 0xc /* NOT src */ 49817ca54c3Smrg#define GXorInverted 0xd /* NOT src OR dst */ 49917ca54c3Smrg#define GXnand 0xe /* NOT src OR NOT dst */ 50017ca54c3Smrg#define GXset 0xf /* 1 */ 50117ca54c3Smrg 50217ca54c3Smrg/* LineStyle */ 50317ca54c3Smrg 50417ca54c3Smrg#define LineSolid 0 50517ca54c3Smrg#define LineOnOffDash 1 50617ca54c3Smrg#define LineDoubleDash 2 50717ca54c3Smrg 50817ca54c3Smrg/* capStyle */ 50917ca54c3Smrg 51017ca54c3Smrg#define CapNotLast 0 51117ca54c3Smrg#define CapButt 1 51217ca54c3Smrg#define CapRound 2 51317ca54c3Smrg#define CapProjecting 3 51417ca54c3Smrg 51517ca54c3Smrg/* joinStyle */ 51617ca54c3Smrg 51717ca54c3Smrg#define JoinMiter 0 51817ca54c3Smrg#define JoinRound 1 51917ca54c3Smrg#define JoinBevel 2 52017ca54c3Smrg 52117ca54c3Smrg/* fillStyle */ 52217ca54c3Smrg 52317ca54c3Smrg#define FillSolid 0 52417ca54c3Smrg#define FillTiled 1 52517ca54c3Smrg#define FillStippled 2 52617ca54c3Smrg#define FillOpaqueStippled 3 52717ca54c3Smrg 52817ca54c3Smrg/* fillRule */ 52917ca54c3Smrg 53017ca54c3Smrg#define EvenOddRule 0 53117ca54c3Smrg#define WindingRule 1 53217ca54c3Smrg 53317ca54c3Smrg/* subwindow mode */ 53417ca54c3Smrg 53517ca54c3Smrg#define ClipByChildren 0 53617ca54c3Smrg#define IncludeInferiors 1 53717ca54c3Smrg 53817ca54c3Smrg/* SetClipRectangles ordering */ 53917ca54c3Smrg 54017ca54c3Smrg#define Unsorted 0 54117ca54c3Smrg#define YSorted 1 54217ca54c3Smrg#define YXSorted 2 54317ca54c3Smrg#define YXBanded 3 54417ca54c3Smrg 54517ca54c3Smrg/* CoordinateMode for drawing routines */ 54617ca54c3Smrg 54717ca54c3Smrg#define CoordModeOrigin 0 /* relative to the origin */ 54817ca54c3Smrg#define CoordModePrevious 1 /* relative to previous point */ 54917ca54c3Smrg 55017ca54c3Smrg/* Polygon shapes */ 55117ca54c3Smrg 55217ca54c3Smrg#define Complex 0 /* paths may intersect */ 55317ca54c3Smrg#define Nonconvex 1 /* no paths intersect, but not convex */ 55417ca54c3Smrg#define Convex 2 /* wholly convex */ 55517ca54c3Smrg 55617ca54c3Smrg/* Arc modes for PolyFillArc */ 55717ca54c3Smrg 55817ca54c3Smrg#define ArcChord 0 /* join endpoints of arc */ 55917ca54c3Smrg#define ArcPieSlice 1 /* join endpoints to center of arc */ 56017ca54c3Smrg 56117ca54c3Smrg/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into 56217ca54c3Smrg GC.stateChanges */ 56317ca54c3Smrg 56417ca54c3Smrg#define GCFunction (1L<<0) 56517ca54c3Smrg#define GCPlaneMask (1L<<1) 56617ca54c3Smrg#define GCForeground (1L<<2) 56717ca54c3Smrg#define GCBackground (1L<<3) 56817ca54c3Smrg#define GCLineWidth (1L<<4) 56917ca54c3Smrg#define GCLineStyle (1L<<5) 57017ca54c3Smrg#define GCCapStyle (1L<<6) 57117ca54c3Smrg#define GCJoinStyle (1L<<7) 57217ca54c3Smrg#define GCFillStyle (1L<<8) 573ea1d6981Smrg#define GCFillRule (1L<<9) 57417ca54c3Smrg#define GCTile (1L<<10) 57517ca54c3Smrg#define GCStipple (1L<<11) 57617ca54c3Smrg#define GCTileStipXOrigin (1L<<12) 57717ca54c3Smrg#define GCTileStipYOrigin (1L<<13) 57817ca54c3Smrg#define GCFont (1L<<14) 57917ca54c3Smrg#define GCSubwindowMode (1L<<15) 58017ca54c3Smrg#define GCGraphicsExposures (1L<<16) 58117ca54c3Smrg#define GCClipXOrigin (1L<<17) 58217ca54c3Smrg#define GCClipYOrigin (1L<<18) 58317ca54c3Smrg#define GCClipMask (1L<<19) 58417ca54c3Smrg#define GCDashOffset (1L<<20) 58517ca54c3Smrg#define GCDashList (1L<<21) 58617ca54c3Smrg#define GCArcMode (1L<<22) 58717ca54c3Smrg 58817ca54c3Smrg#define GCLastBit 22 58917ca54c3Smrg/***************************************************************** 590ea1d6981Smrg * FONTS 59117ca54c3Smrg *****************************************************************/ 59217ca54c3Smrg 59317ca54c3Smrg/* used in QueryFont -- draw direction */ 59417ca54c3Smrg 59517ca54c3Smrg#define FontLeftToRight 0 59617ca54c3Smrg#define FontRightToLeft 1 59717ca54c3Smrg 59817ca54c3Smrg#define FontChange 255 59917ca54c3Smrg 60017ca54c3Smrg/***************************************************************** 601ea1d6981Smrg * IMAGING 60217ca54c3Smrg *****************************************************************/ 60317ca54c3Smrg 60417ca54c3Smrg/* ImageFormat -- PutImage, GetImage */ 60517ca54c3Smrg 60617ca54c3Smrg#define XYBitmap 0 /* depth 1, XYFormat */ 60717ca54c3Smrg#define XYPixmap 1 /* depth == drawable depth */ 60817ca54c3Smrg#define ZPixmap 2 /* depth == drawable depth */ 60917ca54c3Smrg 61017ca54c3Smrg/***************************************************************** 611ea1d6981Smrg * COLOR MAP STUFF 61217ca54c3Smrg *****************************************************************/ 61317ca54c3Smrg 61417ca54c3Smrg/* For CreateColormap */ 61517ca54c3Smrg 61617ca54c3Smrg#define AllocNone 0 /* create map with no entries */ 61717ca54c3Smrg#define AllocAll 1 /* allocate entire map writeable */ 61817ca54c3Smrg 61917ca54c3Smrg 62017ca54c3Smrg/* Flags used in StoreNamedColor, StoreColors */ 62117ca54c3Smrg 62217ca54c3Smrg#define DoRed (1<<0) 62317ca54c3Smrg#define DoGreen (1<<1) 62417ca54c3Smrg#define DoBlue (1<<2) 62517ca54c3Smrg 62617ca54c3Smrg/***************************************************************** 62717ca54c3Smrg * CURSOR STUFF 62817ca54c3Smrg *****************************************************************/ 62917ca54c3Smrg 63017ca54c3Smrg/* QueryBestSize Class */ 63117ca54c3Smrg 63217ca54c3Smrg#define CursorShape 0 /* largest size that can be displayed */ 63317ca54c3Smrg#define TileShape 1 /* size tiled fastest */ 63417ca54c3Smrg#define StippleShape 2 /* size stippled fastest */ 63517ca54c3Smrg 636ea1d6981Smrg/***************************************************************** 63717ca54c3Smrg * KEYBOARD/POINTER STUFF 63817ca54c3Smrg *****************************************************************/ 63917ca54c3Smrg 64017ca54c3Smrg#define AutoRepeatModeOff 0 64117ca54c3Smrg#define AutoRepeatModeOn 1 64217ca54c3Smrg#define AutoRepeatModeDefault 2 64317ca54c3Smrg 64417ca54c3Smrg#define LedModeOff 0 64517ca54c3Smrg#define LedModeOn 1 64617ca54c3Smrg 64717ca54c3Smrg/* masks for ChangeKeyboardControl */ 64817ca54c3Smrg 64917ca54c3Smrg#define KBKeyClickPercent (1L<<0) 65017ca54c3Smrg#define KBBellPercent (1L<<1) 65117ca54c3Smrg#define KBBellPitch (1L<<2) 65217ca54c3Smrg#define KBBellDuration (1L<<3) 65317ca54c3Smrg#define KBLed (1L<<4) 65417ca54c3Smrg#define KBLedMode (1L<<5) 65517ca54c3Smrg#define KBKey (1L<<6) 65617ca54c3Smrg#define KBAutoRepeatMode (1L<<7) 65717ca54c3Smrg 65817ca54c3Smrg#define MappingSuccess 0 65917ca54c3Smrg#define MappingBusy 1 66017ca54c3Smrg#define MappingFailed 2 66117ca54c3Smrg 66217ca54c3Smrg#define MappingModifier 0 66317ca54c3Smrg#define MappingKeyboard 1 66417ca54c3Smrg#define MappingPointer 2 66517ca54c3Smrg 66617ca54c3Smrg/***************************************************************** 667ea1d6981Smrg * SCREEN SAVER STUFF 66817ca54c3Smrg *****************************************************************/ 66917ca54c3Smrg 67017ca54c3Smrg#define DontPreferBlanking 0 67117ca54c3Smrg#define PreferBlanking 1 67217ca54c3Smrg#define DefaultBlanking 2 67317ca54c3Smrg 67417ca54c3Smrg#define DisableScreenSaver 0 67517ca54c3Smrg#define DisableScreenInterval 0 67617ca54c3Smrg 67717ca54c3Smrg#define DontAllowExposures 0 67817ca54c3Smrg#define AllowExposures 1 67917ca54c3Smrg#define DefaultExposures 2 68017ca54c3Smrg 68117ca54c3Smrg/* for ForceScreenSaver */ 68217ca54c3Smrg 68317ca54c3Smrg#define ScreenSaverReset 0 68417ca54c3Smrg#define ScreenSaverActive 1 68517ca54c3Smrg 68617ca54c3Smrg/***************************************************************** 68717ca54c3Smrg * HOSTS AND CONNECTIONS 68817ca54c3Smrg *****************************************************************/ 68917ca54c3Smrg 69017ca54c3Smrg/* for ChangeHosts */ 69117ca54c3Smrg 69217ca54c3Smrg#define HostInsert 0 69317ca54c3Smrg#define HostDelete 1 69417ca54c3Smrg 69517ca54c3Smrg/* for ChangeAccessControl */ 69617ca54c3Smrg 697ea1d6981Smrg#define EnableAccess 1 69817ca54c3Smrg#define DisableAccess 0 69917ca54c3Smrg 700ea1d6981Smrg/* Display classes used in opening the connection 70117ca54c3Smrg * Note that the statically allocated ones are even numbered and the 70217ca54c3Smrg * dynamically changeable ones are odd numbered */ 70317ca54c3Smrg 70417ca54c3Smrg#define StaticGray 0 70517ca54c3Smrg#define GrayScale 1 70617ca54c3Smrg#define StaticColor 2 70717ca54c3Smrg#define PseudoColor 3 70817ca54c3Smrg#define TrueColor 4 70917ca54c3Smrg#define DirectColor 5 71017ca54c3Smrg 71117ca54c3Smrg 71217ca54c3Smrg/* Byte order used in imageByteOrder and bitmapBitOrder */ 71317ca54c3Smrg 71417ca54c3Smrg#define LSBFirst 0 71517ca54c3Smrg#define MSBFirst 1 71617ca54c3Smrg 71717ca54c3Smrg#endif /* X_H */ 718