Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- data/conda_envs/evalclaw/include/X11/DECkeysym.hAdded+65
- data/conda_envs/evalclaw/include/X11/HPkeysym.hAdded+164
- data/conda_envs/evalclaw/include/X11/ImUtil.hAdded+30
- data/conda_envs/evalclaw/include/X11/Sunkeysym.hAdded+106
- data/conda_envs/evalclaw/include/X11/X.hAdded+717
- data/conda_envs/evalclaw/include/X11/XF86keysym.hAdded+487
- data/conda_envs/evalclaw/include/X11/XKBlib.hAdded+1149
- data/conda_envs/evalclaw/include/X11/XWDFile.hAdded+113
- data/conda_envs/evalclaw/include/X11/Xalloca.hAdded+121
- data/conda_envs/evalclaw/include/X11/Xarch.hAdded+94
- data/conda_envs/evalclaw/include/X11/Xatom.hAdded+79
- data/conda_envs/evalclaw/include/X11/Xauth.hAdded+181
- data/conda_envs/evalclaw/include/X11/Xcms.hAdded+815
- data/conda_envs/evalclaw/include/X11/Xdefs.hAdded+108
- data/conda_envs/evalclaw/include/X11/Xdmcp.hAdded+226
- data/conda_envs/evalclaw/include/X11/Xfuncproto.hAdded+216
- data/conda_envs/evalclaw/include/X11/Xfuncs.hAdded+69
- data/conda_envs/evalclaw/include/X11/Xlib-xcb.hAdded+20
- data/conda_envs/evalclaw/include/X11/Xlib.hAdded
- data/conda_envs/evalclaw/include/X11/XlibConf.hAdded+38
- data/conda_envs/evalclaw/include/X11/Xlibint.hAdded+1444
- data/conda_envs/evalclaw/include/X11/Xlocale.hAdded+37
- data/conda_envs/evalclaw/include/X11/Xmd.hAdded+146
- data/conda_envs/evalclaw/include/X11/Xos.hAdded+148
- data/conda_envs/evalclaw/include/X11/Xos_r.hAdded+1095
- data/conda_envs/evalclaw/include/X11/Xosdefs.hAdded+116
- data/conda_envs/evalclaw/include/X11/Xpoll.hAdded+230
- data/conda_envs/evalclaw/include/X11/Xproto.hAdded+2157
- data/conda_envs/evalclaw/include/X11/Xprotostr.hAdded+77
- data/conda_envs/evalclaw/include/X11/Xregion.hAdded+190
- data/conda_envs/evalclaw/include/X11/Xresource.hAdded+358
- data/conda_envs/evalclaw/include/X11/Xthreads.hAdded+314
- data/conda_envs/evalclaw/include/X11/Xutil.hAdded+838
- data/conda_envs/evalclaw/include/X11/Xw32defs.hAdded+79
- data/conda_envs/evalclaw/include/X11/Xwindows.hAdded+117
- data/conda_envs/evalclaw/include/X11/Xwinsock.hAdded+80
- data/conda_envs/evalclaw/include/X11/ap_keysym.hAdded+51
- data/conda_envs/evalclaw/include/X11/cursorfont.hAdded+111
- data/conda_envs/evalclaw/include/X11/dri/xf86dri.hAdded+65
- data/conda_envs/evalclaw/include/X11/dri/xf86driproto.hAdded+342
- data/conda_envs/evalclaw/include/X11/dri/xf86dristr.hAdded+3
- data/conda_envs/evalclaw/include/X11/extensions/XKB.hAdded+786
- data/conda_envs/evalclaw/include/X11/extensions/XKBproto.hAdded+1282
- data/conda_envs/evalclaw/include/X11/extensions/XResproto.hAdded+227
- data/conda_envs/evalclaw/include/X11/extensions/Xv.hAdded+128
- data/conda_envs/evalclaw/include/X11/extensions/XvMCproto.hAdded+226
- data/conda_envs/evalclaw/include/X11/extensions/bigreqsproto.hAdded+67
- data/conda_envs/evalclaw/include/X11/extensions/composite.hAdded+71
- data/conda_envs/evalclaw/include/X11/extensions/damageproto.hAdded+158
- data/conda_envs/evalclaw/include/X11/extensions/dbe.hAdded+57
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465/***********************************************************
Copyright 1988, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting 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.
******************************************************************/
/* * DEC private keysyms * (29th bit set) */
/* two-key compose sequence initiators, chosen to map to Latin1 characters */
#define DXK_ring_accent 0x1000feb0#define DXK_circumflex_accent 0x1000fe5e#define DXK_cedilla_accent 0x1000fe2c#define DXK_acute_accent 0x1000fe27#define DXK_grave_accent 0x1000fe60#define DXK_tilde 0x1000fe7e#define DXK_diaeresis 0x1000fe22
/* special keysym for LK2** "Remove" key on editing keypad */
#define DXK_Remove 0x1000ff00 /* Remove */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164/*
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OROTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shallnot be used in advertising or otherwise to promote the sale, use orother dealings in this Software without prior written authorizationfrom The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting documentation, and that the names of Hewlett Packardor 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.
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARDTO THIS SOFTWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE. Hewlett-Packard shall not be liable for errorscontained herein or direct, indirect, special, incidental orconsequential damages in connection with the furnishing,performance, or use of this material.
*/
#ifndef _HPKEYSYM_H
#define _HPKEYSYM_H
#define hpXK_ClearLine 0x1000ff6f#define hpXK_InsertLine 0x1000ff70#define hpXK_DeleteLine 0x1000ff71#define hpXK_InsertChar 0x1000ff72#define hpXK_DeleteChar 0x1000ff73#define hpXK_BackTab 0x1000ff74#define hpXK_KP_BackTab 0x1000ff75#define hpXK_Modelock1 0x1000ff48#define hpXK_Modelock2 0x1000ff49#define hpXK_Reset 0x1000ff6c#define hpXK_System 0x1000ff6d#define hpXK_User 0x1000ff6e#define hpXK_mute_acute 0x100000a8#define hpXK_mute_grave 0x100000a9#define hpXK_mute_asciicircum 0x100000aa#define hpXK_mute_diaeresis 0x100000ab#define hpXK_mute_asciitilde 0x100000ac#define hpXK_lira 0x100000af#define hpXK_guilder 0x100000be#define hpXK_Ydiaeresis 0x100000ee#define hpXK_IO 0x100000ee /* deprecated alias for hpYdiaeresis */#define hpXK_longminus 0x100000f6#define hpXK_block 0x100000fc
#ifndef _OSF_Keysyms#define _OSF_Keysyms
#define osfXK_Copy 0x1004ff02#define osfXK_Cut 0x1004ff03#define osfXK_Paste 0x1004ff04#define osfXK_BackTab 0x1004ff07#define osfXK_BackSpace 0x1004ff08#define osfXK_Clear 0x1004ff0b#define osfXK_Escape 0x1004ff1b#define osfXK_AddMode 0x1004ff31#define osfXK_PrimaryPaste 0x1004ff32#define osfXK_QuickPaste 0x1004ff33#define osfXK_PageLeft 0x1004ff40#define osfXK_PageUp 0x1004ff41#define osfXK_PageDown 0x1004ff42#define osfXK_PageRight 0x1004ff43#define osfXK_Activate 0x1004ff44#define osfXK_MenuBar 0x1004ff45#define osfXK_Left 0x1004ff51#define osfXK_Up 0x1004ff52#define osfXK_Right 0x1004ff53#define osfXK_Down 0x1004ff54#define osfXK_EndLine 0x1004ff57#define osfXK_BeginLine 0x1004ff58#define osfXK_EndData 0x1004ff59#define osfXK_BeginData 0x1004ff5a#define osfXK_PrevMenu 0x1004ff5b#define osfXK_NextMenu 0x1004ff5c#define osfXK_PrevField 0x1004ff5d#define osfXK_NextField 0x1004ff5e#define osfXK_Select 0x1004ff60#define osfXK_Insert 0x1004ff63#define osfXK_Undo 0x1004ff65#define osfXK_Menu 0x1004ff67#define osfXK_Cancel 0x1004ff69#define osfXK_Help 0x1004ff6a#define osfXK_SelectAll 0x1004ff71#define osfXK_DeselectAll 0x1004ff72#define osfXK_Reselect 0x1004ff73#define osfXK_Extend 0x1004ff74#define osfXK_Restore 0x1004ff78#define osfXK_Delete 0x1004ffff
#endif /* _OSF_Keysyms */
/************************************************************** * The use of the following macros is deprecated. * They are listed below only for backwards compatibility. */#define XK_Reset 0x1000ff6c /* deprecated alias for hpReset */#define XK_System 0x1000ff6d /* deprecated alias for hpSystem */#define XK_User 0x1000ff6e /* deprecated alias for hpUser */#define XK_ClearLine 0x1000ff6f /* deprecated alias for hpClearLine */#define XK_InsertLine 0x1000ff70 /* deprecated alias for hpInsertLine */#define XK_DeleteLine 0x1000ff71 /* deprecated alias for hpDeleteLine */#define XK_InsertChar 0x1000ff72 /* deprecated alias for hpInsertChar */#define XK_DeleteChar 0x1000ff73 /* deprecated alias for hpDeleteChar */#define XK_BackTab 0x1000ff74 /* deprecated alias for hpBackTab */#define XK_KP_BackTab 0x1000ff75 /* deprecated alias for hpKP_BackTab */#define XK_Ext16bit_L 0x1000ff76 /* deprecated */#define XK_Ext16bit_R 0x1000ff77 /* deprecated */#define XK_mute_acute 0x100000a8 /* deprecated alias for hpmute_acute */#define XK_mute_grave 0x100000a9 /* deprecated alias for hpmute_grave */#define XK_mute_asciicircum 0x100000aa /* deprecated alias for hpmute_asciicircum */#define XK_mute_diaeresis 0x100000ab /* deprecated alias for hpmute_diaeresis */#define XK_mute_asciitilde 0x100000ac /* deprecated alias for hpmute_asciitilde */#define XK_lira 0x100000af /* deprecated alias for hplira */#define XK_guilder 0x100000be /* deprecated alias for hpguilder */#ifndef XK_Ydiaeresis#define XK_Ydiaeresis 0x100000ee /* deprecated */#endif#define XK_IO 0x100000ee /* deprecated alias for hpYdiaeresis */#define XK_longminus 0x100000f6 /* deprecated alias for hplongminus */#define XK_block 0x100000fc /* deprecated alias for hpblock */
#endif /* _HPKEYSYM_H */123456789101112131415161718192021222324252627282930
#ifndef _X11_IMUTIL_H_#define _X11_IMUTIL_H_
extern int_XGetScanlinePad( Display *dpy, int depth);
extern int_XGetBitsPerPixel( Display *dpy, int depth);
extern int_XSetImage( XImage *srcimg, XImage *dstimg, int x, int y);
extern int_XReverse_Bytes( unsigned char *bpt, int nb);extern void_XInitImageFuncPtrs( XImage *image);
#endif /* _X11_IMUTIL_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106/* * Copyright (c) 1991, Oracle and/or its affiliates. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. *//************************************************************
Copyright 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
***********************************************************/
/* * Floating Accent */
#define SunXK_FA_Grave 0x1005ff00#define SunXK_FA_Circum 0x1005ff01#define SunXK_FA_Tilde 0x1005ff02#define SunXK_FA_Acute 0x1005ff03#define SunXK_FA_Diaeresis 0x1005ff04#define SunXK_FA_Cedilla 0x1005ff05
/* * Miscellaneous Functions */
#define SunXK_F36 0x1005ff10 /* Labeled F11 */#define SunXK_F37 0x1005ff11 /* Labeled F12 */
#define SunXK_Sys_Req 0x1005ff60#define SunXK_Print_Screen 0x0000ff61 /* Same as XK_Print */
/* * International & Multi-Key Character Composition */
#define SunXK_Compose 0x0000ff20 /* Same as XK_Multi_key */#define SunXK_AltGraph 0x0000ff7e /* Same as XK_Mode_switch */
/* * Cursor Control */
#define SunXK_PageUp 0x0000ff55 /* Same as XK_Prior */#define SunXK_PageDown 0x0000ff56 /* Same as XK_Next */
/* * Open Look Functions */
#define SunXK_Undo 0x0000ff65 /* Same as XK_Undo */#define SunXK_Again 0x0000ff66 /* Same as XK_Redo */#define SunXK_Find 0x0000ff68 /* Same as XK_Find */#define SunXK_Stop 0x0000ff69 /* Same as XK_Cancel */#define SunXK_Props 0x1005ff70#define SunXK_Front 0x1005ff71#define SunXK_Copy 0x1005ff72#define SunXK_Open 0x1005ff73#define SunXK_Paste 0x1005ff74#define SunXK_Cut 0x1005ff75
#define SunXK_PowerSwitch 0x1005ff76#define SunXK_AudioLowerVolume 0x1005ff77#define SunXK_AudioMute 0x1005ff78#define SunXK_AudioRaiseVolume 0x1005ff79#define SunXK_VideoDegauss 0x1005ff7a#define SunXK_VideoLowerBrightness 0x1005ff7b#define SunXK_VideoRaiseBrightness 0x1005ff7c#define SunXK_PowerSwitchShift 0x1005ff7d123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717/* Definitions for the X window system likely to be used by applications */
#ifndef X_H#define X_H
/***********************************************************
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting 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.
******************************************************************/
#define X_PROTOCOL 11 /* current protocol version */#define X_PROTOCOL_REVISION 0 /* current minor version */
/* Resources */
/* * _XSERVER64 must ONLY be defined when compiling X server sources on * systems where unsigned long is not 32 bits, must NOT be used in * client or library code. */#ifndef _XSERVER64# ifndef _XTYPEDEF_XID# define _XTYPEDEF_XIDtypedef unsigned long XID;# endif# ifndef _XTYPEDEF_MASK# define _XTYPEDEF_MASKtypedef unsigned long Mask;# endif# ifndef _XTYPEDEF_ATOM# define _XTYPEDEF_ATOMtypedef unsigned long Atom; /* Also in Xdefs.h */# endiftypedef unsigned long VisualID;typedef unsigned long Time;#else# include <X11/Xmd.h># ifndef _XTYPEDEF_XID# define _XTYPEDEF_XIDtypedef CARD32 XID;# endif# ifndef _XTYPEDEF_MASK# define _XTYPEDEF_MASKtypedef CARD32 Mask;# endif# ifndef _XTYPEDEF_ATOM# define _XTYPEDEF_ATOMtypedef CARD32 Atom;# endiftypedef CARD32 VisualID;typedef CARD32 Time;#endif
typedef XID Window;typedef XID Drawable;#ifndef _XTYPEDEF_FONT# define _XTYPEDEF_FONTtypedef XID Font;#endiftypedef XID Pixmap;typedef XID Cursor;typedef XID Colormap;typedef XID GContext;typedef XID KeySym;
typedef unsigned char KeyCode;
/***************************************************************** * RESERVED RESOURCE AND CONSTANT DEFINITIONS *****************************************************************/
#ifndef None#define None 0L /* universal null resource or null atom */#endif
#define ParentRelative 1L /* background pixmap in CreateWindow and ChangeWindowAttributes */
#define CopyFromParent 0L /* border pixmap in CreateWindow and ChangeWindowAttributes special VisualID and special window class passed to CreateWindow */
#define PointerWindow 0L /* destination window in SendEvent */#define InputFocus 1L /* destination window in SendEvent */
#define PointerRoot 1L /* focus window in SetInputFocus */
#define AnyPropertyType 0L /* special Atom, passed to GetProperty */
#define AnyKey 0L /* special Key Code, passed to GrabKey */
#define AnyButton 0L /* special Button Code, passed to GrabButton */
#define AllTemporary 0L /* special Resource ID passed to KillClient */
#define CurrentTime 0L /* special Time */
#define NoSymbol 0L /* special KeySym */
/***************************************************************** * EVENT DEFINITIONS *****************************************************************/
/* Input Event Masks. Used as event-mask window attribute and as arguments to Grab requests. Not to be confused with event names. */
#define NoEventMask 0L#define KeyPressMask (1L<<0)#define KeyReleaseMask (1L<<1)#define ButtonPressMask (1L<<2)#define ButtonReleaseMask (1L<<3)#define EnterWindowMask (1L<<4)#define LeaveWindowMask (1L<<5)#define PointerMotionMask (1L<<6)#define PointerMotionHintMask (1L<<7)#define Button1MotionMask (1L<<8)#define Button2MotionMask (1L<<9)#define Button3MotionMask (1L<<10)#define Button4MotionMask (1L<<11)#define Button5MotionMask (1L<<12)#define ButtonMotionMask (1L<<13)#define KeymapStateMask (1L<<14)#define ExposureMask (1L<<15)#define VisibilityChangeMask (1L<<16)#define StructureNotifyMask (1L<<17)#define ResizeRedirectMask (1L<<18)#define SubstructureNotifyMask (1L<<19)#define SubstructureRedirectMask (1L<<20)#define FocusChangeMask (1L<<21)#define PropertyChangeMask (1L<<22)#define ColormapChangeMask (1L<<23)#define OwnerGrabButtonMask (1L<<24)
/* Event names. Used in "type" field in XEvent structures. Not to beconfused with event masks above. They start from 2 because 0 and 1are reserved in the protocol for errors and replies. */
#define KeyPress 2#define KeyRelease 3#define ButtonPress 4#define ButtonRelease 5#define MotionNotify 6#define EnterNotify 7#define LeaveNotify 8#define FocusIn 9#define FocusOut 10#define KeymapNotify 11#define Expose 12#define GraphicsExpose 13#define NoExpose 14#define VisibilityNotify 15#define CreateNotify 16#define DestroyNotify 17#define UnmapNotify 18#define MapNotify 19#define MapRequest 20#define ReparentNotify 21#define ConfigureNotify 22#define ConfigureRequest 23#define GravityNotify 24#define ResizeRequest 25#define CirculateNotify 26#define CirculateRequest 27#define PropertyNotify 28#define SelectionClear 29#define SelectionRequest 30#define SelectionNotify 31#define ColormapNotify 32#define ClientMessage 33#define MappingNotify 34#define GenericEvent 35#define LASTEvent 36 /* must be bigger than any event # */
/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer, state in various key-, mouse-, and button-related events. */
#define ShiftMask (1<<0)#define LockMask (1<<1)#define ControlMask (1<<2)#define Mod1Mask (1<<3)#define Mod2Mask (1<<4)#define Mod3Mask (1<<5)#define Mod4Mask (1<<6)#define Mod5Mask (1<<7)
/* modifier names. Used to build a SetModifierMapping request or to read a GetModifierMapping request. These correspond to the masks defined above. */#define ShiftMapIndex 0#define LockMapIndex 1#define ControlMapIndex 2#define Mod1MapIndex 3#define Mod2MapIndex 4#define Mod3MapIndex 5#define Mod4MapIndex 6#define Mod5MapIndex 7
/* button masks. Used in same manner as Key masks above. Not to be confused with button names below. */
#define Button1Mask (1<<8)#define Button2Mask (1<<9)#define Button3Mask (1<<10)#define Button4Mask (1<<11)#define Button5Mask (1<<12)
#define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
/* button names. Used as arguments to GrabButton and as detail in ButtonPress and ButtonRelease events. Not to be confused with button masks above. Note that 0 is already defined above as "AnyButton". */
#define Button1 1#define Button2 2#define Button3 3#define Button4 4#define Button5 5
/* Notify modes */
#define NotifyNormal 0#define NotifyGrab 1#define NotifyUngrab 2#define NotifyWhileGrabbed 3
#define NotifyHint 1 /* for MotionNotify events */
/* Notify detail */
#define NotifyAncestor 0#define NotifyVirtual 1#define NotifyInferior 2#define NotifyNonlinear 3#define NotifyNonlinearVirtual 4#define NotifyPointer 5#define NotifyPointerRoot 6#define NotifyDetailNone 7
/* Visibility notify */
#define VisibilityUnobscured 0#define VisibilityPartiallyObscured 1#define VisibilityFullyObscured 2
/* Circulation request */
#define PlaceOnTop 0#define PlaceOnBottom 1
/* protocol families */
#define FamilyInternet 0 /* IPv4 */#define FamilyDECnet 1#define FamilyChaos 2#define FamilyInternet6 6 /* IPv6 */
/* authentication families not tied to a specific protocol */#define FamilyServerInterpreted 5
/* Property notification */
#define PropertyNewValue 0#define PropertyDelete 1
/* Color Map notification */
#define ColormapUninstalled 0#define ColormapInstalled 1
/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */
#define GrabModeSync 0#define GrabModeAsync 1
/* GrabPointer, GrabKeyboard reply status */
#define GrabSuccess 0#define AlreadyGrabbed 1#define GrabInvalidTime 2#define GrabNotViewable 3#define GrabFrozen 4
/* AllowEvents modes */
#define AsyncPointer 0#define SyncPointer 1#define ReplayPointer 2#define AsyncKeyboard 3#define SyncKeyboard 4#define ReplayKeyboard 5#define AsyncBoth 6#define SyncBoth 7
/* Used in SetInputFocus, GetInputFocus */
#define RevertToNone (int)None#define RevertToPointerRoot (int)PointerRoot#define RevertToParent 2
/***************************************************************** * ERROR CODES *****************************************************************/
#define Success 0 /* everything's okay */#define BadRequest 1 /* bad request code */#define BadValue 2 /* int parameter out of range */#define BadWindow 3 /* parameter not a Window */#define BadPixmap 4 /* parameter not a Pixmap */#define BadAtom 5 /* parameter not an Atom */#define BadCursor 6 /* parameter not a Cursor */#define BadFont 7 /* parameter not a Font */#define BadMatch 8 /* parameter mismatch */#define BadDrawable 9 /* parameter not a Pixmap or Window */#define BadAccess 10 /* depending on context: - key/button already grabbed - attempt to free an illegal cmap entry - attempt to store into a read-only color map entry. - attempt to modify the access control list from other than the local host. */#define BadAlloc 11 /* insufficient resources */#define BadColor 12 /* no such colormap */#define BadGC 13 /* parameter not a GC */#define BadIDChoice 14 /* choice not in range or already used */#define BadName 15 /* font or color name doesn't exist */#define BadLength 16 /* Request length incorrect */#define BadImplementation 17 /* server is defective */
#define FirstExtensionError 128#define LastExtensionError 255
/***************************************************************** * WINDOW DEFINITIONS *****************************************************************/
/* Window classes used by CreateWindow *//* Note that CopyFromParent is already defined as 0 above */
#define InputOutput 1#define InputOnly 2
/* Window attributes for CreateWindow and ChangeWindowAttributes */
#define CWBackPixmap (1L<<0)#define CWBackPixel (1L<<1)#define CWBorderPixmap (1L<<2)#define CWBorderPixel (1L<<3)#define CWBitGravity (1L<<4)#define CWWinGravity (1L<<5)#define CWBackingStore (1L<<6)#define CWBackingPlanes (1L<<7)#define CWBackingPixel (1L<<8)#define CWOverrideRedirect (1L<<9)#define CWSaveUnder (1L<<10)#define CWEventMask (1L<<11)#define CWDontPropagate (1L<<12)#define CWColormap (1L<<13)#define CWCursor (1L<<14)
/* ConfigureWindow structure */
#define CWX (1<<0)#define CWY (1<<1)#define CWWidth (1<<2)#define CWHeight (1<<3)#define CWBorderWidth (1<<4)#define CWSibling (1<<5)#define CWStackMode (1<<6)
/* Bit Gravity */
#define ForgetGravity 0#define NorthWestGravity 1#define NorthGravity 2#define NorthEastGravity 3#define WestGravity 4#define CenterGravity 5#define EastGravity 6#define SouthWestGravity 7#define SouthGravity 8#define SouthEastGravity 9#define StaticGravity 10
/* Window gravity + bit gravity above */
#define UnmapGravity 0
/* Used in CreateWindow for backing-store hint */
#define NotUseful 0#define WhenMapped 1#define Always 2
/* Used in GetWindowAttributes reply */
#define IsUnmapped 0#define IsUnviewable 1#define IsViewable 2
/* Used in ChangeSaveSet */
#define SetModeInsert 0#define SetModeDelete 1
/* Used in ChangeCloseDownMode */
#define DestroyAll 0#define RetainPermanent 1#define RetainTemporary 2
/* Window stacking method (in configureWindow) */
#define Above 0#define Below 1#define TopIf 2#define BottomIf 3#define Opposite 4
/* Circulation direction */
#define RaiseLowest 0#define LowerHighest 1
/* Property modes */
#define PropModeReplace 0#define PropModePrepend 1#define PropModeAppend 2
/***************************************************************** * GRAPHICS DEFINITIONS *****************************************************************/
/* graphics functions, as in GC.alu */
#define GXclear 0x0 /* 0 */#define GXand 0x1 /* src AND dst */#define GXandReverse 0x2 /* src AND NOT dst */#define GXcopy 0x3 /* src */#define GXandInverted 0x4 /* NOT src AND dst */#define GXnoop 0x5 /* dst */#define GXxor 0x6 /* src XOR dst */#define GXor 0x7 /* src OR dst */#define GXnor 0x8 /* NOT src AND NOT dst */#define GXequiv 0x9 /* NOT src XOR dst */#define GXinvert 0xa /* NOT dst */#define GXorReverse 0xb /* src OR NOT dst */#define GXcopyInverted 0xc /* NOT src */#define GXorInverted 0xd /* NOT src OR dst */#define GXnand 0xe /* NOT src OR NOT dst */#define GXset 0xf /* 1 */
/* LineStyle */
#define LineSolid 0#define LineOnOffDash 1#define LineDoubleDash 2
/* capStyle */
#define CapNotLast 0#define CapButt 1#define CapRound 2#define CapProjecting 3
/* joinStyle */
#define JoinMiter 0#define JoinRound 1#define JoinBevel 2
/* fillStyle */
#define FillSolid 0#define FillTiled 1#define FillStippled 2#define FillOpaqueStippled 3
/* fillRule */
#define EvenOddRule 0#define WindingRule 1
/* subwindow mode */
#define ClipByChildren 0#define IncludeInferiors 1
/* SetClipRectangles ordering */
#define Unsorted 0#define YSorted 1#define YXSorted 2#define YXBanded 3
/* CoordinateMode for drawing routines */
#define CoordModeOrigin 0 /* relative to the origin */#define CoordModePrevious 1 /* relative to previous point */
/* Polygon shapes */
#define Complex 0 /* paths may intersect */#define Nonconvex 1 /* no paths intersect, but not convex */#define Convex 2 /* wholly convex */
/* Arc modes for PolyFillArc */
#define ArcChord 0 /* join endpoints of arc */#define ArcPieSlice 1 /* join endpoints to center of arc */
/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into GC.stateChanges */
#define GCFunction (1L<<0)#define GCPlaneMask (1L<<1)#define GCForeground (1L<<2)#define GCBackground (1L<<3)#define GCLineWidth (1L<<4)#define GCLineStyle (1L<<5)#define GCCapStyle (1L<<6)#define GCJoinStyle (1L<<7)#define GCFillStyle (1L<<8)#define GCFillRule (1L<<9)#define GCTile (1L<<10)#define GCStipple (1L<<11)#define GCTileStipXOrigin (1L<<12)#define GCTileStipYOrigin (1L<<13)#define GCFont (1L<<14)#define GCSubwindowMode (1L<<15)#define GCGraphicsExposures (1L<<16)#define GCClipXOrigin (1L<<17)#define GCClipYOrigin (1L<<18)#define GCClipMask (1L<<19)#define GCDashOffset (1L<<20)#define GCDashList (1L<<21)#define GCArcMode (1L<<22)
#define GCLastBit 22/***************************************************************** * FONTS *****************************************************************/
/* used in QueryFont -- draw direction */
#define FontLeftToRight 0#define FontRightToLeft 1
#define FontChange 255
/***************************************************************** * IMAGING *****************************************************************/
/* ImageFormat -- PutImage, GetImage */
#define XYBitmap 0 /* depth 1, XYFormat */#define XYPixmap 1 /* depth == drawable depth */#define ZPixmap 2 /* depth == drawable depth */
/***************************************************************** * COLOR MAP STUFF *****************************************************************/
/* For CreateColormap */
#define AllocNone 0 /* create map with no entries */#define AllocAll 1 /* allocate entire map writeable */
/* Flags used in StoreNamedColor, StoreColors */
#define DoRed (1<<0)#define DoGreen (1<<1)#define DoBlue (1<<2)
/***************************************************************** * CURSOR STUFF *****************************************************************/
/* QueryBestSize Class */
#define CursorShape 0 /* largest size that can be displayed */#define TileShape 1 /* size tiled fastest */#define StippleShape 2 /* size stippled fastest */
/***************************************************************** * KEYBOARD/POINTER STUFF *****************************************************************/
#define AutoRepeatModeOff 0#define AutoRepeatModeOn 1#define AutoRepeatModeDefault 2
#define LedModeOff 0#define LedModeOn 1
/* masks for ChangeKeyboardControl */
#define KBKeyClickPercent (1L<<0)#define KBBellPercent (1L<<1)#define KBBellPitch (1L<<2)#define KBBellDuration (1L<<3)#define KBLed (1L<<4)#define KBLedMode (1L<<5)#define KBKey (1L<<6)#define KBAutoRepeatMode (1L<<7)
#define MappingSuccess 0#define MappingBusy 1#define MappingFailed 2
#define MappingModifier 0#define MappingKeyboard 1#define MappingPointer 2
/***************************************************************** * SCREEN SAVER STUFF *****************************************************************/
#define DontPreferBlanking 0#define PreferBlanking 1#define DefaultBlanking 2
#define DisableScreenSaver 0#define DisableScreenInterval 0
#define DontAllowExposures 0#define AllowExposures 1#define DefaultExposures 2
/* for ForceScreenSaver */
#define ScreenSaverReset 0#define ScreenSaverActive 1
/***************************************************************** * HOSTS AND CONNECTIONS *****************************************************************/
/* for ChangeHosts */
#define HostInsert 0#define HostDelete 1
/* for ChangeAccessControl */
#define EnableAccess 1#define DisableAccess 0
/* Display classes used in opening the connection * Note that the statically allocated ones are even numbered and the * dynamically changeable ones are odd numbered */
#define StaticGray 0#define GrayScale 1#define StaticColor 2#define PseudoColor 3#define TrueColor 4#define DirectColor 5
/* Byte order used in imageByteOrder and bitmapBitOrder */
#define LSBFirst 0#define MSBFirst 1
#endif /* X_H */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487/* * XFree86 vendor specific keysyms. * * The XFree86 keysym range is 0x10080001 - 0x1008ffff. * * The XF86 set of keysyms is a catch-all set of defines for keysyms found * on various multimedia keyboards. Originally specific to XFree86 they have * been been adopted over time and are considered a "standard" part of X * keysym definitions. * XFree86 never properly commented these keysyms, so we have done our * best to explain the semantic meaning of these keys. * * XFree86 has removed their mail archives of the period, that might have * shed more light on some of these definitions. Until/unless we resurrect * these archives, these are from memory and usage. */
/* * ModeLock * * This one is old, and not really used any more since XKB offers this * functionality. */
#define XF86XK_ModeLock 0x1008ff01 /* Mode Switch Lock */
/* Backlight controls. */#define XF86XK_MonBrightnessUp 0x1008ff02 /* Monitor/panel brightness */#define XF86XK_MonBrightnessDown 0x1008ff03 /* Monitor/panel brightness */#define XF86XK_KbdLightOnOff 0x1008ff04 /* Keyboards may be lit */#define XF86XK_KbdBrightnessUp 0x1008ff05 /* Keyboards may be lit */#define XF86XK_KbdBrightnessDown 0x1008ff06 /* Keyboards may be lit */#define XF86XK_MonBrightnessCycle 0x1008ff07 /* Monitor/panel brightness */
/* * Keys found on some "Internet" keyboards. */#define XF86XK_Standby 0x1008ff10 /* System into standby mode */#define XF86XK_AudioLowerVolume 0x1008ff11 /* Volume control down */#define XF86XK_AudioMute 0x1008ff12 /* Mute sound from the system */#define XF86XK_AudioRaiseVolume 0x1008ff13 /* Volume control up */#define XF86XK_AudioPlay 0x1008ff14 /* Start playing of audio > */#define XF86XK_AudioStop 0x1008ff15 /* Stop playing audio */#define XF86XK_AudioPrev 0x1008ff16 /* Previous track */#define XF86XK_AudioNext 0x1008ff17 /* Next track */#define XF86XK_HomePage 0x1008ff18 /* Display user's home page */#define XF86XK_Mail 0x1008ff19 /* Invoke user's mail program */#define XF86XK_Start 0x1008ff1a /* Start application */#define XF86XK_Search 0x1008ff1b /* Search */#define XF86XK_AudioRecord 0x1008ff1c /* Record audio application */
/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */#define XF86XK_Calculator 0x1008ff1d /* Invoke calculator program */#define XF86XK_Memo 0x1008ff1e /* Invoke Memo taking program */#define XF86XK_ToDoList 0x1008ff1f /* Invoke To Do List program */#define XF86XK_Calendar 0x1008ff20 /* Invoke Calendar program */#define XF86XK_PowerDown 0x1008ff21 /* Deep sleep the system */#define XF86XK_ContrastAdjust 0x1008ff22 /* Adjust screen contrast */#define XF86XK_RockerUp 0x1008ff23 /* Rocker switches exist up */#define XF86XK_RockerDown 0x1008ff24 /* and down */#define XF86XK_RockerEnter 0x1008ff25 /* and let you press them */
/* Some more "Internet" keyboard symbols */#define XF86XK_Back 0x1008ff26 /* Like back on a browser */#define XF86XK_Forward 0x1008ff27 /* Like forward on a browser */#define XF86XK_Stop 0x1008ff28 /* Stop current operation */#define XF86XK_Refresh 0x1008ff29 /* Refresh the page */#define XF86XK_PowerOff 0x1008ff2a /* Power off system entirely */#define XF86XK_WakeUp 0x1008ff2b /* Wake up system from sleep */#define XF86XK_Eject 0x1008ff2c /* Eject device (e.g. DVD) */#define XF86XK_ScreenSaver 0x1008ff2d /* Invoke screensaver */#define XF86XK_WWW 0x1008ff2e /* Invoke web browser */#define XF86XK_Sleep 0x1008ff2f /* Put system to sleep */#define XF86XK_Favorites 0x1008ff30 /* Show favorite locations */#define XF86XK_AudioPause 0x1008ff31 /* Pause audio playing */#define XF86XK_AudioMedia 0x1008ff32 /* Launch media collection app */#define XF86XK_MyComputer 0x1008ff33 /* Display "My Computer" window */#define XF86XK_VendorHome 0x1008ff34 /* Display vendor home web site */#define XF86XK_LightBulb 0x1008ff35 /* Light bulb keys exist */#define XF86XK_Shop 0x1008ff36 /* Display shopping web site */#define XF86XK_History 0x1008ff37 /* Show history of web surfing */#define XF86XK_OpenURL 0x1008ff38 /* Open selected URL */#define XF86XK_AddFavorite 0x1008ff39 /* Add URL to favorites list */#define XF86XK_HotLinks 0x1008ff3a /* Show "hot" links */#define XF86XK_BrightnessAdjust 0x1008ff3b /* Invoke brightness adj. UI */#define XF86XK_Finance 0x1008ff3c /* Display financial site */#define XF86XK_Community 0x1008ff3d /* Display user's community */#define XF86XK_AudioRewind 0x1008ff3e /* "rewind" audio track */#define XF86XK_BackForward 0x1008ff3f /* ??? */#define XF86XK_Launch0 0x1008ff40 /* Launch Application */#define XF86XK_Launch1 0x1008ff41 /* Launch Application */#define XF86XK_Launch2 0x1008ff42 /* Launch Application */#define XF86XK_Launch3 0x1008ff43 /* Launch Application */#define XF86XK_Launch4 0x1008ff44 /* Launch Application */#define XF86XK_Launch5 0x1008ff45 /* Launch Application */#define XF86XK_Launch6 0x1008ff46 /* Launch Application */#define XF86XK_Launch7 0x1008ff47 /* Launch Application */#define XF86XK_Launch8 0x1008ff48 /* Launch Application */#define XF86XK_Launch9 0x1008ff49 /* Launch Application */#define XF86XK_LaunchA 0x1008ff4a /* Launch Application */#define XF86XK_LaunchB 0x1008ff4b /* Launch Application */#define XF86XK_LaunchC 0x1008ff4c /* Launch Application */#define XF86XK_LaunchD 0x1008ff4d /* Launch Application */#define XF86XK_LaunchE 0x1008ff4e /* Launch Application */#define XF86XK_LaunchF 0x1008ff4f /* Launch Application */
#define XF86XK_ApplicationLeft 0x1008ff50 /* switch to application, left */#define XF86XK_ApplicationRight 0x1008ff51 /* switch to application, right*/#define XF86XK_Book 0x1008ff52 /* Launch bookreader */#define XF86XK_CD 0x1008ff53 /* Launch CD/DVD player */#define XF86XK_Calculater 0x1008ff54 /* Launch Calculater */#define XF86XK_Clear 0x1008ff55 /* Clear window, screen */#define XF86XK_Close 0x1008ff56 /* Close window */#define XF86XK_Copy 0x1008ff57 /* Copy selection */#define XF86XK_Cut 0x1008ff58 /* Cut selection */#define XF86XK_Display 0x1008ff59 /* Output switch key */#define XF86XK_DOS 0x1008ff5a /* Launch DOS (emulation) */#define XF86XK_Documents 0x1008ff5b /* Open documents window */#define XF86XK_Excel 0x1008ff5c /* Launch spread sheet */#define XF86XK_Explorer 0x1008ff5d /* Launch file explorer */#define XF86XK_Game 0x1008ff5e /* Launch game */#define XF86XK_Go 0x1008ff5f /* Go to URL */#define XF86XK_iTouch 0x1008ff60 /* Logitech iTouch- don't use */#define XF86XK_LogOff 0x1008ff61 /* Log off system */#define XF86XK_Market 0x1008ff62 /* ?? */#define XF86XK_Meeting 0x1008ff63 /* enter meeting in calendar */#define XF86XK_MenuKB 0x1008ff65 /* distinguish keyboard from PB */#define XF86XK_MenuPB 0x1008ff66 /* distinguish PB from keyboard */#define XF86XK_MySites 0x1008ff67 /* Favourites */#define XF86XK_New 0x1008ff68 /* New (folder, document... */#define XF86XK_News 0x1008ff69 /* News */#define XF86XK_OfficeHome 0x1008ff6a /* Office home (old Staroffice)*/#define XF86XK_Open 0x1008ff6b /* Open */#define XF86XK_Option 0x1008ff6c /* ?? */#define XF86XK_Paste 0x1008ff6d /* Paste */#define XF86XK_Phone 0x1008ff6e /* Launch phone; dial number */#define XF86XK_Q 0x1008ff70 /* Compaq's Q - don't use */#define XF86XK_Reply 0x1008ff72 /* Reply e.g., mail */#define XF86XK_Reload 0x1008ff73 /* Reload web page, file, etc. */#define XF86XK_RotateWindows 0x1008ff74 /* Rotate windows e.g. xrandr */#define XF86XK_RotationPB 0x1008ff75 /* don't use */#define XF86XK_RotationKB 0x1008ff76 /* don't use */#define XF86XK_Save 0x1008ff77 /* Save (file, document, state */#define XF86XK_ScrollUp 0x1008ff78 /* Scroll window/contents up */#define XF86XK_ScrollDown 0x1008ff79 /* Scrool window/contentd down */#define XF86XK_ScrollClick 0x1008ff7a /* Use XKB mousekeys instead */#define XF86XK_Send 0x1008ff7b /* Send mail, file, object */#define XF86XK_Spell 0x1008ff7c /* Spell checker */#define XF86XK_SplitScreen 0x1008ff7d /* Split window or screen */#define XF86XK_Support 0x1008ff7e /* Get support (??) */#define XF86XK_TaskPane 0x1008ff7f /* Show tasks */#define XF86XK_Terminal 0x1008ff80 /* Launch terminal emulator */#define XF86XK_Tools 0x1008ff81 /* toolbox of desktop/app. */#define XF86XK_Travel 0x1008ff82 /* ?? */#define XF86XK_UserPB 0x1008ff84 /* ?? */#define XF86XK_User1KB 0x1008ff85 /* ?? */#define XF86XK_User2KB 0x1008ff86 /* ?? */#define XF86XK_Video 0x1008ff87 /* Launch video player */#define XF86XK_WheelButton 0x1008ff88 /* button from a mouse wheel */#define XF86XK_Word 0x1008ff89 /* Launch word processor */#define XF86XK_Xfer 0x1008ff8a#define XF86XK_ZoomIn 0x1008ff8b /* zoom in view, map, etc. */#define XF86XK_ZoomOut 0x1008ff8c /* zoom out view, map, etc. */
#define XF86XK_Away 0x1008ff8d /* mark yourself as away */#define XF86XK_Messenger 0x1008ff8e /* as in instant messaging */#define XF86XK_WebCam 0x1008ff8f /* Launch web camera app. */#define XF86XK_MailForward 0x1008ff90 /* Forward in mail */#define XF86XK_Pictures 0x1008ff91 /* Show pictures */#define XF86XK_Music 0x1008ff92 /* Launch music application */
#define XF86XK_Battery 0x1008ff93 /* Display battery information */#define XF86XK_Bluetooth 0x1008ff94 /* Enable/disable Bluetooth */#define XF86XK_WLAN 0x1008ff95 /* Enable/disable WLAN */#define XF86XK_UWB 0x1008ff96 /* Enable/disable UWB */
#define XF86XK_AudioForward 0x1008ff97 /* fast-forward audio track */#define XF86XK_AudioRepeat 0x1008ff98 /* toggle repeat mode */#define XF86XK_AudioRandomPlay 0x1008ff99 /* toggle shuffle mode */#define XF86XK_Subtitle 0x1008ff9a /* cycle through subtitle */#define XF86XK_AudioCycleTrack 0x1008ff9b /* cycle through audio tracks */#define XF86XK_CycleAngle 0x1008ff9c /* cycle through angles */#define XF86XK_FrameBack 0x1008ff9d /* video: go one frame back */#define XF86XK_FrameForward 0x1008ff9e /* video: go one frame forward */#define XF86XK_Time 0x1008ff9f /* display, or shows an entry for time seeking */#define XF86XK_Select 0x1008ffa0 /* Select button on joypads and remotes */#define XF86XK_View 0x1008ffa1 /* Show a view options/properties */#define XF86XK_TopMenu 0x1008ffa2 /* Go to a top-level menu in a video */
#define XF86XK_Red 0x1008ffa3 /* Red button */#define XF86XK_Green 0x1008ffa4 /* Green button */#define XF86XK_Yellow 0x1008ffa5 /* Yellow button */#define XF86XK_Blue 0x1008ffa6 /* Blue button */
#define XF86XK_Suspend 0x1008ffa7 /* Sleep to RAM */#define XF86XK_Hibernate 0x1008ffa8 /* Sleep to disk */#define XF86XK_TouchpadToggle 0x1008ffa9 /* Toggle between touchpad/trackstick */#define XF86XK_TouchpadOn 0x1008ffb0 /* The touchpad got switched on */#define XF86XK_TouchpadOff 0x1008ffb1 /* The touchpad got switched off */
#define XF86XK_AudioMicMute 0x1008ffb2 /* Mute the Mic from the system */
#define XF86XK_Keyboard 0x1008ffb3 /* User defined keyboard related action */
#define XF86XK_WWAN 0x1008ffb4 /* Toggle WWAN (LTE, UMTS, etc.) radio */#define XF86XK_RFKill 0x1008ffb5 /* Toggle radios on/off */
#define XF86XK_AudioPreset 0x1008ffb6 /* Select equalizer preset, e.g. theatre-mode */
#define XF86XK_RotationLockToggle 0x1008ffb7 /* Toggle screen rotation lock on/off */
#define XF86XK_FullScreen 0x1008ffb8 /* Toggle fullscreen */
/* Keys for special action keys (hot keys) *//* Virtual terminals on some operating systems */#define XF86XK_Switch_VT_1 0x1008fe01#define XF86XK_Switch_VT_2 0x1008fe02#define XF86XK_Switch_VT_3 0x1008fe03#define XF86XK_Switch_VT_4 0x1008fe04#define XF86XK_Switch_VT_5 0x1008fe05#define XF86XK_Switch_VT_6 0x1008fe06#define XF86XK_Switch_VT_7 0x1008fe07#define XF86XK_Switch_VT_8 0x1008fe08#define XF86XK_Switch_VT_9 0x1008fe09#define XF86XK_Switch_VT_10 0x1008fe0a#define XF86XK_Switch_VT_11 0x1008fe0b#define XF86XK_Switch_VT_12 0x1008fe0c
#define XF86XK_Ungrab 0x1008fe20 /* force ungrab */#define XF86XK_ClearGrab 0x1008fe21 /* kill application with grab */#define XF86XK_Next_VMode 0x1008fe22 /* next video mode available */#define XF86XK_Prev_VMode 0x1008fe23 /* prev. video mode available */#define XF86XK_LogWindowTree 0x1008fe24 /* print window tree to log */#define XF86XK_LogGrabInfo 0x1008fe25 /* print all active grabs to log */
/* * Reserved range for evdev symbols: 0x10081000-0x10081FFF * * Key syms within this range must match the Linux kernel * input-event-codes.h file in the format: * XF86XK_CamelCaseKernelName _EVDEVK(kernel value) * For example, the kernel * #define KEY_MACRO_RECORD_START 0x2b0 * effectively ends up as: * #define XF86XK_MacroRecordStart 0x100812b0 * * For historical reasons, some keysyms within the reserved range will be * missing, most notably all "normal" keys that are mapped through default * XKB layouts (e.g. KEY_Q). * * CamelCasing is done with a human control as last authority, e.g. see VOD * instead of Vod for the Video on Demand key. * * The format for #defines is strict: * * #define XF86XK_FOO<tab...>_EVDEVK(0xABC)<tab><tab> |* kver KEY_FOO *| * * Where * - alignment by tabs * - the _EVDEVK macro must be used * - the hex code must be in uppercase hex * - the kernel version (kver) is in the form v5.10 * - kver and key name are within a slash-star comment (a pipe is used in * this example for technical reasons) * These #defines are parsed by scripts. Do not stray from the given format. * * Where the evdev keycode is mapped to a different symbol, please add a * comment line starting with Use: but otherwise the same format, e.g. * Use: XF86XK_RotationLockToggle _EVDEVK(0x231) v4.16 KEY_ROTATE_LOCK_TOGGLE * */#define _EVDEVK(_v) (0x10081000 + _v)/* Use: XF86XK_Eject _EVDEVK(0x0a2) KEY_EJECTCLOSECD *//* Use: XF86XK_New _EVDEVK(0x0b5) v2.6.14 KEY_NEW *//* Use: XK_Redo _EVDEVK(0x0b6) v2.6.14 KEY_REDO *//* KEY_DASHBOARD has been mapped to LaunchB in xkeyboard-config since 2011 *//* Use: XF86XK_LaunchB _EVDEVK(0x0cc) v2.6.28 KEY_DASHBOARD *//* Use: XF86XK_Display _EVDEVK(0x0e3) v2.6.12 KEY_SWITCHVIDEOMODE *//* Use: XF86XK_KbdLightOnOff _EVDEVK(0x0e4) v2.6.12 KEY_KBDILLUMTOGGLE *//* Use: XF86XK_KbdBrightnessDown _EVDEVK(0x0e5) v2.6.12 KEY_KBDILLUMDOWN *//* Use: XF86XK_KbdBrightnessUp _EVDEVK(0x0e6) v2.6.12 KEY_KBDILLUMUP *//* Use: XF86XK_Send _EVDEVK(0x0e7) v2.6.14 KEY_SEND *//* Use: XF86XK_Reply _EVDEVK(0x0e8) v2.6.14 KEY_REPLY *//* Use: XF86XK_MailForward _EVDEVK(0x0e9) v2.6.14 KEY_FORWARDMAIL *//* Use: XF86XK_Save _EVDEVK(0x0ea) v2.6.14 KEY_SAVE *//* Use: XF86XK_Documents _EVDEVK(0x0eb) v2.6.14 KEY_DOCUMENTS *//* Use: XF86XK_Battery _EVDEVK(0x0ec) v2.6.17 KEY_BATTERY *//* Use: XF86XK_Bluetooth _EVDEVK(0x0ed) v2.6.19 KEY_BLUETOOTH *//* Use: XF86XK_WLAN _EVDEVK(0x0ee) v2.6.19 KEY_WLAN *//* Use: XF86XK_UWB _EVDEVK(0x0ef) v2.6.24 KEY_UWB *//* Use: XF86XK_Next_VMode _EVDEVK(0x0f1) v2.6.23 KEY_VIDEO_NEXT *//* Use: XF86XK_Prev_VMode _EVDEVK(0x0f2) v2.6.23 KEY_VIDEO_PREV *//* Use: XF86XK_MonBrightnessCycle _EVDEVK(0x0f3) v2.6.23 KEY_BRIGHTNESS_CYCLE */#define XF86XK_BrightnessAuto _EVDEVK(0x0f4) /* v3.16 KEY_BRIGHTNESS_AUTO */#define XF86XK_DisplayOff _EVDEVK(0x0f5) /* v2.6.23 KEY_DISPLAY_OFF *//* Use: XF86XK_WWAN _EVDEVK(0x0f6) v3.13 KEY_WWAN *//* Use: XF86XK_RFKill _EVDEVK(0x0f7) v2.6.33 KEY_RFKILL *//* Use: XF86XK_AudioMicMute _EVDEVK(0x0f8) v3.1 KEY_MICMUTE */#define XF86XK_Info _EVDEVK(0x166) /* KEY_INFO *//* Use: XF86XK_CycleAngle _EVDEVK(0x173) KEY_ANGLE *//* Use: XF86XK_FullScreen _EVDEVK(0x174) v5.1 KEY_FULL_SCREEN */#define XF86XK_AspectRatio _EVDEVK(0x177) /* v5.1 KEY_ASPECT_RATIO */#define XF86XK_DVD _EVDEVK(0x185) /* KEY_DVD */#define XF86XK_Audio _EVDEVK(0x188) /* KEY_AUDIO *//* Use: XF86XK_Video _EVDEVK(0x189) KEY_VIDEO *//* Use: XF86XK_Calendar _EVDEVK(0x18d) KEY_CALENDAR */#define XF86XK_ChannelUp _EVDEVK(0x192) /* KEY_CHANNELUP */#define XF86XK_ChannelDown _EVDEVK(0x193) /* KEY_CHANNELDOWN *//* Use: XF86XK_AudioRandomPlay _EVDEVK(0x19a) KEY_SHUFFLE */#define XF86XK_Break _EVDEVK(0x19b) /* KEY_BREAK */#define XF86XK_VideoPhone _EVDEVK(0x1a0) /* v2.6.20 KEY_VIDEOPHONE *//* Use: XF86XK_Game _EVDEVK(0x1a1) v2.6.20 KEY_GAMES *//* Use: XF86XK_ZoomIn _EVDEVK(0x1a2) v2.6.20 KEY_ZOOMIN *//* Use: XF86XK_ZoomOut _EVDEVK(0x1a3) v2.6.20 KEY_ZOOMOUT */#define XF86XK_ZoomReset _EVDEVK(0x1a4) /* v2.6.20 KEY_ZOOMRESET *//* Use: XF86XK_Word _EVDEVK(0x1a5) v2.6.20 KEY_WORDPROCESSOR */#define XF86XK_Editor _EVDEVK(0x1a6) /* v2.6.20 KEY_EDITOR *//* Use: XF86XK_Excel _EVDEVK(0x1a7) v2.6.20 KEY_SPREADSHEET */#define XF86XK_GraphicsEditor _EVDEVK(0x1a8) /* v2.6.20 KEY_GRAPHICSEDITOR */#define XF86XK_Presentation _EVDEVK(0x1a9) /* v2.6.20 KEY_PRESENTATION */#define XF86XK_Database _EVDEVK(0x1aa) /* v2.6.20 KEY_DATABASE *//* Use: XF86XK_News _EVDEVK(0x1ab) v2.6.20 KEY_NEWS */#define XF86XK_Voicemail _EVDEVK(0x1ac) /* v2.6.20 KEY_VOICEMAIL */#define XF86XK_Addressbook _EVDEVK(0x1ad) /* v2.6.20 KEY_ADDRESSBOOK *//* Use: XF86XK_Messenger _EVDEVK(0x1ae) v2.6.20 KEY_MESSENGER */#define XF86XK_DisplayToggle _EVDEVK(0x1af) /* v2.6.20 KEY_DISPLAYTOGGLE */#define XF86XK_SpellCheck _EVDEVK(0x1b0) /* v2.6.24 KEY_SPELLCHECK *//* Use: XF86XK_LogOff _EVDEVK(0x1b1) v2.6.24 KEY_LOGOFF *//* Use: XK_dollar _EVDEVK(0x1b2) v2.6.24 KEY_DOLLAR *//* Use: XK_EuroSign _EVDEVK(0x1b3) v2.6.24 KEY_EURO *//* Use: XF86XK_FrameBack _EVDEVK(0x1b4) v2.6.24 KEY_FRAMEBACK *//* Use: XF86XK_FrameForward _EVDEVK(0x1b5) v2.6.24 KEY_FRAMEFORWARD */#define XF86XK_ContextMenu _EVDEVK(0x1b6) /* v2.6.24 KEY_CONTEXT_MENU */#define XF86XK_MediaRepeat _EVDEVK(0x1b7) /* v2.6.26 KEY_MEDIA_REPEAT */#define XF86XK_10ChannelsUp _EVDEVK(0x1b8) /* v2.6.38 KEY_10CHANNELSUP */#define XF86XK_10ChannelsDown _EVDEVK(0x1b9) /* v2.6.38 KEY_10CHANNELSDOWN */#define XF86XK_Images _EVDEVK(0x1ba) /* v2.6.39 KEY_IMAGES */#define XF86XK_NotificationCenter _EVDEVK(0x1bc) /* v5.10 KEY_NOTIFICATION_CENTER */#define XF86XK_PickupPhone _EVDEVK(0x1bd) /* v5.10 KEY_PICKUP_PHONE */#define XF86XK_HangupPhone _EVDEVK(0x1be) /* v5.10 KEY_HANGUP_PHONE */#define XF86XK_Fn _EVDEVK(0x1d0) /* KEY_FN */#define XF86XK_Fn_Esc _EVDEVK(0x1d1) /* KEY_FN_ESC */#define XF86XK_FnRightShift _EVDEVK(0x1e5) /* v5.10 KEY_FN_RIGHT_SHIFT *//* Use: XK_braille_dot_1 _EVDEVK(0x1f1) v2.6.17 KEY_BRL_DOT1 *//* Use: XK_braille_dot_2 _EVDEVK(0x1f2) v2.6.17 KEY_BRL_DOT2 *//* Use: XK_braille_dot_3 _EVDEVK(0x1f3) v2.6.17 KEY_BRL_DOT3 *//* Use: XK_braille_dot_4 _EVDEVK(0x1f4) v2.6.17 KEY_BRL_DOT4 *//* Use: XK_braille_dot_5 _EVDEVK(0x1f5) v2.6.17 KEY_BRL_DOT5 *//* Use: XK_braille_dot_6 _EVDEVK(0x1f6) v2.6.17 KEY_BRL_DOT6 *//* Use: XK_braille_dot_7 _EVDEVK(0x1f7) v2.6.17 KEY_BRL_DOT7 *//* Use: XK_braille_dot_8 _EVDEVK(0x1f8) v2.6.17 KEY_BRL_DOT8 *//* Use: XK_braille_dot_9 _EVDEVK(0x1f9) v2.6.23 KEY_BRL_DOT9 *//* Use: XK_braille_dot_1 _EVDEVK(0x1fa) v2.6.23 KEY_BRL_DOT10 */#define XF86XK_Numeric0 _EVDEVK(0x200) /* v2.6.28 KEY_NUMERIC_0 */#define XF86XK_Numeric1 _EVDEVK(0x201) /* v2.6.28 KEY_NUMERIC_1 */#define XF86XK_Numeric2 _EVDEVK(0x202) /* v2.6.28 KEY_NUMERIC_2 */#define XF86XK_Numeric3 _EVDEVK(0x203) /* v2.6.28 KEY_NUMERIC_3 */#define XF86XK_Numeric4 _EVDEVK(0x204) /* v2.6.28 KEY_NUMERIC_4 */#define XF86XK_Numeric5 _EVDEVK(0x205) /* v2.6.28 KEY_NUMERIC_5 */#define XF86XK_Numeric6 _EVDEVK(0x206) /* v2.6.28 KEY_NUMERIC_6 */#define XF86XK_Numeric7 _EVDEVK(0x207) /* v2.6.28 KEY_NUMERIC_7 */#define XF86XK_Numeric8 _EVDEVK(0x208) /* v2.6.28 KEY_NUMERIC_8 */#define XF86XK_Numeric9 _EVDEVK(0x209) /* v2.6.28 KEY_NUMERIC_9 */#define XF86XK_NumericStar _EVDEVK(0x20a) /* v2.6.28 KEY_NUMERIC_STAR */#define XF86XK_NumericPound _EVDEVK(0x20b) /* v2.6.28 KEY_NUMERIC_POUND */#define XF86XK_NumericA _EVDEVK(0x20c) /* v4.1 KEY_NUMERIC_A */#define XF86XK_NumericB _EVDEVK(0x20d) /* v4.1 KEY_NUMERIC_B */#define XF86XK_NumericC _EVDEVK(0x20e) /* v4.1 KEY_NUMERIC_C */#define XF86XK_NumericD _EVDEVK(0x20f) /* v4.1 KEY_NUMERIC_D */#define XF86XK_CameraFocus _EVDEVK(0x210) /* v2.6.33 KEY_CAMERA_FOCUS */#define XF86XK_WPSButton _EVDEVK(0x211) /* v2.6.34 KEY_WPS_BUTTON *//* Use: XF86XK_TouchpadToggle _EVDEVK(0x212) v2.6.37 KEY_TOUCHPAD_TOGGLE *//* Use: XF86XK_TouchpadOn _EVDEVK(0x213) v2.6.37 KEY_TOUCHPAD_ON *//* Use: XF86XK_TouchpadOff _EVDEVK(0x214) v2.6.37 KEY_TOUCHPAD_OFF */#define XF86XK_CameraZoomIn _EVDEVK(0x215) /* v2.6.39 KEY_CAMERA_ZOOMIN */#define XF86XK_CameraZoomOut _EVDEVK(0x216) /* v2.6.39 KEY_CAMERA_ZOOMOUT */#define XF86XK_CameraUp _EVDEVK(0x217) /* v2.6.39 KEY_CAMERA_UP */#define XF86XK_CameraDown _EVDEVK(0x218) /* v2.6.39 KEY_CAMERA_DOWN */#define XF86XK_CameraLeft _EVDEVK(0x219) /* v2.6.39 KEY_CAMERA_LEFT */#define XF86XK_CameraRight _EVDEVK(0x21a) /* v2.6.39 KEY_CAMERA_RIGHT */#define XF86XK_AttendantOn _EVDEVK(0x21b) /* v3.10 KEY_ATTENDANT_ON */#define XF86XK_AttendantOff _EVDEVK(0x21c) /* v3.10 KEY_ATTENDANT_OFF */#define XF86XK_AttendantToggle _EVDEVK(0x21d) /* v3.10 KEY_ATTENDANT_TOGGLE */#define XF86XK_LightsToggle _EVDEVK(0x21e) /* v3.10 KEY_LIGHTS_TOGGLE */#define XF86XK_ALSToggle _EVDEVK(0x230) /* v3.13 KEY_ALS_TOGGLE *//* Use: XF86XK_RotationLockToggle _EVDEVK(0x231) v4.16 KEY_ROTATE_LOCK_TOGGLE */#define XF86XK_Buttonconfig _EVDEVK(0x240) /* v3.16 KEY_BUTTONCONFIG */#define XF86XK_Taskmanager _EVDEVK(0x241) /* v3.16 KEY_TASKMANAGER */#define XF86XK_Journal _EVDEVK(0x242) /* v3.16 KEY_JOURNAL */#define XF86XK_ControlPanel _EVDEVK(0x243) /* v3.16 KEY_CONTROLPANEL */#define XF86XK_AppSelect _EVDEVK(0x244) /* v3.16 KEY_APPSELECT */#define XF86XK_Screensaver _EVDEVK(0x245) /* v3.16 KEY_SCREENSAVER */#define XF86XK_VoiceCommand _EVDEVK(0x246) /* v3.16 KEY_VOICECOMMAND */#define XF86XK_Assistant _EVDEVK(0x247) /* v4.13 KEY_ASSISTANT *//* Use: XK_ISO_Next_Group _EVDEVK(0x248) v5.2 KEY_KBD_LAYOUT_NEXT */#define XF86XK_EmojiPicker _EVDEVK(0x249) /* v5.13 KEY_EMOJI_PICKER */#define XF86XK_Dictate _EVDEVK(0x24a) /* v5.17 KEY_DICTATE */#define XF86XK_CameraAccessEnable _EVDEVK(0x24b) /* v6.2 KEY_CAMERA_ACCESS_ENABLE */#define XF86XK_CameraAccessDisable _EVDEVK(0x24c) /* v6.2 KEY_CAMERA_ACCESS_DISABLE */#define XF86XK_CameraAccessToggle _EVDEVK(0x24d) /* v6.2 KEY_CAMERA_ACCESS_TOGGLE */#define XF86XK_BrightnessMin _EVDEVK(0x250) /* v3.16 KEY_BRIGHTNESS_MIN */#define XF86XK_BrightnessMax _EVDEVK(0x251) /* v3.16 KEY_BRIGHTNESS_MAX */#define XF86XK_KbdInputAssistPrev _EVDEVK(0x260) /* v3.18 KEY_KBDINPUTASSIST_PREV */#define XF86XK_KbdInputAssistNext _EVDEVK(0x261) /* v3.18 KEY_KBDINPUTASSIST_NEXT */#define XF86XK_KbdInputAssistPrevgroup _EVDEVK(0x262) /* v3.18 KEY_KBDINPUTASSIST_PREVGROUP */#define XF86XK_KbdInputAssistNextgroup _EVDEVK(0x263) /* v3.18 KEY_KBDINPUTASSIST_NEXTGROUP */#define XF86XK_KbdInputAssistAccept _EVDEVK(0x264) /* v3.18 KEY_KBDINPUTASSIST_ACCEPT */#define XF86XK_KbdInputAssistCancel _EVDEVK(0x265) /* v3.18 KEY_KBDINPUTASSIST_CANCEL */#define XF86XK_RightUp _EVDEVK(0x266) /* v4.7 KEY_RIGHT_UP */#define XF86XK_RightDown _EVDEVK(0x267) /* v4.7 KEY_RIGHT_DOWN */#define XF86XK_LeftUp _EVDEVK(0x268) /* v4.7 KEY_LEFT_UP */#define XF86XK_LeftDown _EVDEVK(0x269) /* v4.7 KEY_LEFT_DOWN */#define XF86XK_RootMenu _EVDEVK(0x26a) /* v4.7 KEY_ROOT_MENU */#define XF86XK_MediaTopMenu _EVDEVK(0x26b) /* v4.7 KEY_MEDIA_TOP_MENU */#define XF86XK_Numeric11 _EVDEVK(0x26c) /* v4.7 KEY_NUMERIC_11 */#define XF86XK_Numeric12 _EVDEVK(0x26d) /* v4.7 KEY_NUMERIC_12 */#define XF86XK_AudioDesc _EVDEVK(0x26e) /* v4.7 KEY_AUDIO_DESC */#define XF86XK_3DMode _EVDEVK(0x26f) /* v4.7 KEY_3D_MODE */#define XF86XK_NextFavorite _EVDEVK(0x270) /* v4.7 KEY_NEXT_FAVORITE */#define XF86XK_StopRecord _EVDEVK(0x271) /* v4.7 KEY_STOP_RECORD */#define XF86XK_PauseRecord _EVDEVK(0x272) /* v4.7 KEY_PAUSE_RECORD */#define XF86XK_VOD _EVDEVK(0x273) /* v4.7 KEY_VOD */#define XF86XK_Unmute _EVDEVK(0x274) /* v4.7 KEY_UNMUTE */#define XF86XK_FastReverse _EVDEVK(0x275) /* v4.7 KEY_FASTREVERSE */#define XF86XK_SlowReverse _EVDEVK(0x276) /* v4.7 KEY_SLOWREVERSE */#define XF86XK_Data _EVDEVK(0x277) /* v4.7 KEY_DATA */#define XF86XK_OnScreenKeyboard _EVDEVK(0x278) /* v4.12 KEY_ONSCREEN_KEYBOARD */#define XF86XK_PrivacyScreenToggle _EVDEVK(0x279) /* v5.5 KEY_PRIVACY_SCREEN_TOGGLE */#define XF86XK_SelectiveScreenshot _EVDEVK(0x27a) /* v5.6 KEY_SELECTIVE_SCREENSHOT */#define XF86XK_NextElement _EVDEVK(0x27b) /* v5.18 KEY_NEXT_ELEMENT */#define XF86XK_PreviousElement _EVDEVK(0x27c) /* v5.18 KEY_PREVIOUS_ELEMENT */#define XF86XK_AutopilotEngageToggle _EVDEVK(0x27d) /* v5.18 KEY_AUTOPILOT_ENGAGE_TOGGLE */#define XF86XK_MarkWaypoint _EVDEVK(0x27e) /* v5.18 KEY_MARK_WAYPOINT */#define XF86XK_Sos _EVDEVK(0x27f) /* v5.18 KEY_SOS */#define XF86XK_NavChart _EVDEVK(0x280) /* v5.18 KEY_NAV_CHART */#define XF86XK_FishingChart _EVDEVK(0x281) /* v5.18 KEY_FISHING_CHART */#define XF86XK_SingleRangeRadar _EVDEVK(0x282) /* v5.18 KEY_SINGLE_RANGE_RADAR */#define XF86XK_DualRangeRadar _EVDEVK(0x283) /* v5.18 KEY_DUAL_RANGE_RADAR */#define XF86XK_RadarOverlay _EVDEVK(0x284) /* v5.18 KEY_RADAR_OVERLAY */#define XF86XK_TraditionalSonar _EVDEVK(0x285) /* v5.18 KEY_TRADITIONAL_SONAR */#define XF86XK_ClearvuSonar _EVDEVK(0x286) /* v5.18 KEY_CLEARVU_SONAR */#define XF86XK_SidevuSonar _EVDEVK(0x287) /* v5.18 KEY_SIDEVU_SONAR */#define XF86XK_NavInfo _EVDEVK(0x288) /* v5.18 KEY_NAV_INFO *//* Use: XF86XK_BrightnessAdjust _EVDEVK(0x289) v5.18 KEY_BRIGHTNESS_MENU */#define XF86XK_Macro1 _EVDEVK(0x290) /* v5.5 KEY_MACRO1 */#define XF86XK_Macro2 _EVDEVK(0x291) /* v5.5 KEY_MACRO2 */#define XF86XK_Macro3 _EVDEVK(0x292) /* v5.5 KEY_MACRO3 */#define XF86XK_Macro4 _EVDEVK(0x293) /* v5.5 KEY_MACRO4 */#define XF86XK_Macro5 _EVDEVK(0x294) /* v5.5 KEY_MACRO5 */#define XF86XK_Macro6 _EVDEVK(0x295) /* v5.5 KEY_MACRO6 */#define XF86XK_Macro7 _EVDEVK(0x296) /* v5.5 KEY_MACRO7 */#define XF86XK_Macro8 _EVDEVK(0x297) /* v5.5 KEY_MACRO8 */#define XF86XK_Macro9 _EVDEVK(0x298) /* v5.5 KEY_MACRO9 */#define XF86XK_Macro10 _EVDEVK(0x299) /* v5.5 KEY_MACRO10 */#define XF86XK_Macro11 _EVDEVK(0x29a) /* v5.5 KEY_MACRO11 */#define XF86XK_Macro12 _EVDEVK(0x29b) /* v5.5 KEY_MACRO12 */#define XF86XK_Macro13 _EVDEVK(0x29c) /* v5.5 KEY_MACRO13 */#define XF86XK_Macro14 _EVDEVK(0x29d) /* v5.5 KEY_MACRO14 */#define XF86XK_Macro15 _EVDEVK(0x29e) /* v5.5 KEY_MACRO15 */#define XF86XK_Macro16 _EVDEVK(0x29f) /* v5.5 KEY_MACRO16 */#define XF86XK_Macro17 _EVDEVK(0x2a0) /* v5.5 KEY_MACRO17 */#define XF86XK_Macro18 _EVDEVK(0x2a1) /* v5.5 KEY_MACRO18 */#define XF86XK_Macro19 _EVDEVK(0x2a2) /* v5.5 KEY_MACRO19 */#define XF86XK_Macro20 _EVDEVK(0x2a3) /* v5.5 KEY_MACRO20 */#define XF86XK_Macro21 _EVDEVK(0x2a4) /* v5.5 KEY_MACRO21 */#define XF86XK_Macro22 _EVDEVK(0x2a5) /* v5.5 KEY_MACRO22 */#define XF86XK_Macro23 _EVDEVK(0x2a6) /* v5.5 KEY_MACRO23 */#define XF86XK_Macro24 _EVDEVK(0x2a7) /* v5.5 KEY_MACRO24 */#define XF86XK_Macro25 _EVDEVK(0x2a8) /* v5.5 KEY_MACRO25 */#define XF86XK_Macro26 _EVDEVK(0x2a9) /* v5.5 KEY_MACRO26 */#define XF86XK_Macro27 _EVDEVK(0x2aa) /* v5.5 KEY_MACRO27 */#define XF86XK_Macro28 _EVDEVK(0x2ab) /* v5.5 KEY_MACRO28 */#define XF86XK_Macro29 _EVDEVK(0x2ac) /* v5.5 KEY_MACRO29 */#define XF86XK_Macro30 _EVDEVK(0x2ad) /* v5.5 KEY_MACRO30 */#define XF86XK_MacroRecordStart _EVDEVK(0x2b0) /* v5.5 KEY_MACRO_RECORD_START */#define XF86XK_MacroRecordStop _EVDEVK(0x2b1) /* v5.5 KEY_MACRO_RECORD_STOP */#define XF86XK_MacroPresetCycle _EVDEVK(0x2b2) /* v5.5 KEY_MACRO_PRESET_CYCLE */#define XF86XK_MacroPreset1 _EVDEVK(0x2b3) /* v5.5 KEY_MACRO_PRESET1 */#define XF86XK_MacroPreset2 _EVDEVK(0x2b4) /* v5.5 KEY_MACRO_PRESET2 */#define XF86XK_MacroPreset3 _EVDEVK(0x2b5) /* v5.5 KEY_MACRO_PRESET3 */#define XF86XK_KbdLcdMenu1 _EVDEVK(0x2b8) /* v5.5 KEY_KBD_LCD_MENU1 */#define XF86XK_KbdLcdMenu2 _EVDEVK(0x2b9) /* v5.5 KEY_KBD_LCD_MENU2 */#define XF86XK_KbdLcdMenu3 _EVDEVK(0x2ba) /* v5.5 KEY_KBD_LCD_MENU3 */#define XF86XK_KbdLcdMenu4 _EVDEVK(0x2bb) /* v5.5 KEY_KBD_LCD_MENU4 */#define XF86XK_KbdLcdMenu5 _EVDEVK(0x2bc) /* v5.5 KEY_KBD_LCD_MENU5 */#undef _EVDEVK123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149/************************************************************Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute thissoftware and its documentation for any purpose and withoutfee is hereby granted, provided that the above copyrightnotice appear in all copies and that both that copyrightnotice and this permission notice appear in supportingdocumentation, and that the name of Silicon Graphics not beused in advertising or publicity pertaining to distributionof the software without specific prior written permission.Silicon Graphics makes no representation about the suitabilityof this software for any purpose. It is provided "as is"without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THISSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITYAND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICONGRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIALDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCEOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITHTHE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#ifndef _X11_XKBLIB_H_#define _X11_XKBLIB_H_
#include <X11/Xlib.h>#include <X11/extensions/XKBstr.h>
typedef struct _XkbAnyEvent { int type; /* XkbAnyEvent */ unsigned long serial; /* # of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XKB event minor code */ unsigned int device; /* device ID */} XkbAnyEvent;
typedef struct _XkbNewKeyboardNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbNewKeyboardNotify */ int device; /* device ID */ int old_device; /* device ID of previous keyboard */ int min_key_code; /* minimum key code */ int max_key_code; /* maximum key code */ int old_min_key_code;/* min key code of previous kbd */ int old_max_key_code;/* max key code of previous kbd */ unsigned int changed; /* changed aspects of the keyboard */ char req_major; /* major and minor opcode of req */ char req_minor; /* that caused change, if applicable */} XkbNewKeyboardNotifyEvent;
typedef struct _XkbMapNotifyEvent { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbMapNotify */ int device; /* device ID */ unsigned int changed; /* fields which have been changed */ unsigned int flags; /* reserved */ int first_type; /* first changed key type */ int num_types; /* number of changed key types */ KeyCode min_key_code; KeyCode max_key_code; KeyCode first_key_sym; KeyCode first_key_act; KeyCode first_key_behavior; KeyCode first_key_explicit; KeyCode first_modmap_key; KeyCode first_vmodmap_key; int num_key_syms; int num_key_acts; int num_key_behaviors; int num_key_explicit; int num_modmap_keys; int num_vmodmap_keys; unsigned int vmods; /* mask of changed virtual mods */} XkbMapNotifyEvent;
typedef struct _XkbStateNotifyEvent { int type; /* XkbAnyEvent */ unsigned long serial; /* # of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbStateNotify */ int device; /* device ID */ unsigned int changed; /* mask of changed state components */ int group; /* keyboard group */ int base_group; /* base keyboard group */ int latched_group; /* latched keyboard group */ int locked_group; /* locked keyboard group */ unsigned int mods; /* modifier state */ unsigned int base_mods; /* base modifier state */ unsigned int latched_mods; /* latched modifiers */ unsigned int locked_mods; /* locked modifiers */ int compat_state; /* compatibility state */ unsigned char grab_mods; /* mods used for grabs */ unsigned char compat_grab_mods;/* grab mods for non-XKB clients */ unsigned char lookup_mods; /* mods sent to clients */ unsigned char compat_lookup_mods; /* mods sent to non-XKB clients */ int ptr_buttons; /* pointer button state */ KeyCode keycode; /* keycode that caused the change */ char event_type; /* KeyPress or KeyRelease */ char req_major; /* Major opcode of request */ char req_minor; /* Minor opcode of request */} XkbStateNotifyEvent;
typedef struct _XkbControlsNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbControlsNotify */ int device; /* device ID */ unsigned int changed_ctrls; /* controls with changed sub-values */ unsigned int enabled_ctrls; /* controls currently enabled */ unsigned int enabled_ctrl_changes;/* controls just {en,dis}abled */ int num_groups; /* total groups on keyboard */ KeyCode keycode; /* key that caused change or 0 */ char event_type; /* type of event that caused change */ char req_major; /* if keycode==0, major and minor */ char req_minor; /* opcode of req that caused change */} XkbControlsNotifyEvent;
typedef struct _XkbIndicatorNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbIndicatorNotify */ int device; /* device ID */ unsigned int changed; /* indicators with new state or map */ unsigned int state; /* current state of all indicators */} XkbIndicatorNotifyEvent;
typedef struct _XkbNamesNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbNamesNotify */ int device; /* device ID */ unsigned int changed; /* names that have changed */ int first_type; /* first key type with new name */ int num_types; /* number of key types with new names */ int first_lvl; /* first key type new new level names */ int num_lvls; /* # of key types w/new level names */ int num_aliases; /* total number of key aliases*/ int num_radio_groups;/* total number of radio groups */ unsigned int changed_vmods; /* virtual modifiers with new names */ unsigned int changed_groups; /* groups with new names */ unsigned int changed_indicators;/* indicators with new names */ int first_key; /* first key with new name */ int num_keys; /* number of keys with new names */} XkbNamesNotifyEvent;
typedef struct _XkbCompatMapNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbCompatMapNotify */ int device; /* device ID */ unsigned int changed_groups; /* groups with new compat maps */ int first_si; /* first new symbol interp */ int num_si; /* number of new symbol interps */ int num_total_si; /* total # of symbol interps */} XkbCompatMapNotifyEvent;
typedef struct _XkbBellNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbBellNotify */ int device; /* device ID */ int percent; /* requested volume as a % of maximum */ int pitch; /* requested pitch in Hz */ int duration; /* requested duration in useconds */ int bell_class; /* (input extension) feedback class */ int bell_id; /* (input extension) ID of feedback */ Atom name; /* "name" of requested bell */ Window window; /* window associated with event */ Bool event_only; /* "event only" requested */} XkbBellNotifyEvent;
typedef struct _XkbActionMessage { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbActionMessage */ int device; /* device ID */ KeyCode keycode; /* key that generated the event */ Bool press; /* true if act caused by key press */ Bool key_event_follows;/* true if key event also generated */ int group; /* effective group */ unsigned int mods; /* effective mods */ char message[XkbActionMessageLength+1]; /* message -- leave space for NUL */} XkbActionMessageEvent;
typedef struct _XkbAccessXNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbAccessXNotify */ int device; /* device ID */ int detail; /* XkbAXN_* */ int keycode; /* key of event */ int sk_delay; /* current slow keys delay */ int debounce_delay; /* current debounce delay */} XkbAccessXNotifyEvent;
typedef struct _XkbExtensionDeviceNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbExtensionDeviceNotify */ int device; /* device ID */ unsigned int reason; /* reason for the event */ unsigned int supported; /* mask of supported features */ unsigned int unsupported; /* mask of unsupported features */ /* that some app tried to use */ int first_btn; /* first button that changed */ int num_btns; /* range of buttons changed */ unsigned int leds_defined; /* indicators with names or maps */ unsigned int led_state; /* current state of the indicators */ int led_class; /* feedback class for led changes */ int led_id; /* feedback id for led changes */} XkbExtensionDeviceNotifyEvent;
typedef union _XkbEvent { int type; XkbAnyEvent any; XkbNewKeyboardNotifyEvent new_kbd; XkbMapNotifyEvent map; XkbStateNotifyEvent state; XkbControlsNotifyEvent ctrls; XkbIndicatorNotifyEvent indicators; XkbNamesNotifyEvent names; XkbCompatMapNotifyEvent compat; XkbBellNotifyEvent bell; XkbActionMessageEvent message; XkbAccessXNotifyEvent accessx; XkbExtensionDeviceNotifyEvent device; XEvent core;} XkbEvent;
typedef struct _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr;
/* XkbOpenDisplay error codes */#define XkbOD_Success 0#define XkbOD_BadLibraryVersion 1#define XkbOD_ConnectionRefused 2#define XkbOD_NonXkbServer 3#define XkbOD_BadServerVersion 4
/* Values for XlibFlags */#define XkbLC_ForceLatin1Lookup (1<<0)#define XkbLC_ConsumeLookupMods (1<<1)#define XkbLC_AlwaysConsumeShiftAndLock (1<<2)#define XkbLC_IgnoreNewKeyboards (1<<3)#define XkbLC_ControlFallback (1<<4)#define XkbLC_ConsumeKeysOnComposeFail (1<<29)#define XkbLC_ComposeLED (1<<30)#define XkbLC_BeepOnComposeFail (1<<31)
#define XkbLC_AllComposeControls (0xc0000000)#define XkbLC_AllControls (0xc000001f)
_XFUNCPROTOBEGIN
extern Bool XkbIgnoreExtension( Bool /* ignore */);
extern Display *XkbOpenDisplay( _Xconst char * /* name */, int * /* ev_rtrn */, int * /* err_rtrn */, int * /* major_rtrn */, int * /* minor_rtrn */, int * /* reason */);
extern Bool XkbQueryExtension( Display * /* dpy */, int * /* opcodeReturn */, int * /* eventBaseReturn */, int * /* errorBaseReturn */, int * /* majorRtrn */, int * /* minorRtrn */);
extern Bool XkbUseExtension( Display * /* dpy */, int * /* major_rtrn */, int * /* minor_rtrn */);
extern Bool XkbLibraryVersion( int * /* libMajorRtrn */, int * /* libMinorRtrn */);
extern unsigned int XkbSetXlibControls( Display* /* dpy */, unsigned int /* affect */, unsigned int /* values */);
extern unsigned int XkbGetXlibControls( Display* /* dpy */);
extern unsigned int XkbXlibControlsImplemented(void);
typedef Atom (*XkbInternAtomFunc)( Display * /* dpy */, _Xconst char * /* name */, Bool /* only_if_exists */);
typedef char * (*XkbGetAtomNameFunc)( Display * /* dpy */, Atom /* atom */);
extern void XkbSetAtomFuncs( XkbInternAtomFunc /* getAtom */, XkbGetAtomNameFunc /* getName */);
extern KeySym XkbKeycodeToKeysym( Display * /* dpy */,#if NeedWidePrototypes unsigned int /* kc */,#else KeyCode /* kc */,#endif int /* group */, int /* level */);
extern unsigned int XkbKeysymToModifiers( Display * /* dpy */, KeySym /* ks */);
extern Bool XkbLookupKeySym( Display * /* dpy */, KeyCode /* keycode */, unsigned int /* modifiers */, unsigned int * /* modifiers_return */, KeySym * /* keysym_return */);
extern int XkbLookupKeyBinding( Display * /* dpy */, KeySym /* sym_rtrn */, unsigned int /* mods */, char * /* buffer */, int /* nbytes */, int * /* extra_rtrn */);
extern Bool XkbTranslateKeyCode( XkbDescPtr /* xkb */, KeyCode /* keycode */, unsigned int /* modifiers */, unsigned int * /* modifiers_return */, KeySym * /* keysym_return */);
extern int XkbTranslateKeySym( Display * /* dpy */, KeySym * /* sym_return */, unsigned int /* modifiers */, char * /* buffer */, int /* nbytes */, int * /* extra_rtrn */);
extern Bool XkbSetAutoRepeatRate( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* delay */, unsigned int /* interval */);
extern Bool XkbGetAutoRepeatRate( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int * /* delayRtrn */, unsigned int * /* intervalRtrn */);
extern Bool XkbChangeEnabledControls( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affect */, unsigned int /* values */);
extern Bool XkbDeviceBell( Display * /* dpy */, Window /* win */, int /* deviceSpec */, int /* bellClass */, int /* bellID */, int /* percent */, Atom /* name */);
extern Bool XkbForceDeviceBell( Display * /* dpy */, int /* deviceSpec */, int /* bellClass */, int /* bellID */, int /* percent */);
extern Bool XkbDeviceBellEvent( Display * /* dpy */, Window /* win */, int /* deviceSpec */, int /* bellClass */, int /* bellID */, int /* percent */, Atom /* name */);
extern Bool XkbBell( Display * /* dpy */, Window /* win */, int /* percent */, Atom /* name */);
extern Bool XkbForceBell( Display * /* dpy */, int /* percent */);
extern Bool XkbBellEvent( Display * /* dpy */, Window /* win */, int /* percent */, Atom /* name */);
extern Bool XkbSelectEvents( Display * /* dpy */, unsigned int /* deviceID */, unsigned int /* affect */, unsigned int /* values */);
extern Bool XkbSelectEventDetails( Display * /* dpy */, unsigned int /* deviceID */, unsigned int /* eventType */, unsigned long /* affect */, unsigned long /* details */);
extern void XkbNoteMapChanges( XkbMapChangesPtr /* old */, XkbMapNotifyEvent * /* new */, unsigned int /* wanted */);
extern void XkbNoteNameChanges( XkbNameChangesPtr /* old */, XkbNamesNotifyEvent * /* new */, unsigned int /* wanted */);
extern Status XkbGetIndicatorState( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int * /* pStateRtrn */);
extern Status XkbGetDeviceIndicatorState( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */, unsigned int * /* pStateRtrn */);
extern Status XkbGetIndicatorMap( Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */);
extern Bool XkbSetIndicatorMap( Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */);
#define XkbNoteIndicatorMapChanges(o,n,w) \ ((o)->map_changes|=((n)->map_changes&(w)))#define XkbNoteIndicatorStateChanges(o,n,w)\ ((o)->state_changes|=((n)->state_changes&(w)))#define XkbGetIndicatorMapChanges(d,x,c) \ (XkbGetIndicatorMap((d),(c)->map_changes,x))#define XkbChangeIndicatorMaps(d,x,c) \ (XkbSetIndicatorMap((d),(c)->map_changes,x))
extern Bool XkbGetNamedIndicator( Display * /* dpy */, Atom /* name */, int * /* pNdxRtrn */, Bool * /* pStateRtrn */, XkbIndicatorMapPtr /* pMapRtrn */, Bool * /* pRealRtrn */);
extern Bool XkbGetNamedDeviceIndicator( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */, Atom /* name */, int * /* pNdxRtrn */, Bool * /* pStateRtrn */, XkbIndicatorMapPtr /* pMapRtrn */, Bool * /* pRealRtrn */);
extern Bool XkbSetNamedIndicator( Display * /* dpy */, Atom /* name */, Bool /* changeState */, Bool /* state */, Bool /* createNewMap */, XkbIndicatorMapPtr /* pMap */);
extern Bool XkbSetNamedDeviceIndicator( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */, Atom /* name */, Bool /* changeState */, Bool /* state */, Bool /* createNewMap */, XkbIndicatorMapPtr /* pMap */);
extern Bool XkbLockModifiers( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affect */, unsigned int /* values */);
extern Bool XkbLatchModifiers( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affect */, unsigned int /* values */);
extern Bool XkbLockGroup( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* group */);
extern Bool XkbLatchGroup( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* group */);
extern Bool XkbSetServerInternalMods( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affectReal */, unsigned int /* realValues */, unsigned int /* affectVirtual */, unsigned int /* virtualValues */);
extern Bool XkbSetIgnoreLockMods( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affectReal */, unsigned int /* realValues */, unsigned int /* affectVirtual */, unsigned int /* virtualValues */);
extern Bool XkbVirtualModsToReal( XkbDescPtr /* xkb */, unsigned int /* virtual_mask */, unsigned int * /* mask_rtrn */);
extern Bool XkbComputeEffectiveMap( XkbDescPtr /* xkb */, XkbKeyTypePtr /* type */, unsigned char * /* map_rtrn */);
extern Status XkbInitCanonicalKeyTypes( XkbDescPtr /* xkb */, unsigned int /* which */, int /* keypadVMod */);
extern XkbDescPtr XkbAllocKeyboard( void);
extern void XkbFreeKeyboard( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeDesc */);
extern Status XkbAllocClientMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nTypes */);
extern Status XkbAllocServerMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nActions */);
extern void XkbFreeClientMap( XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */);
extern void XkbFreeServerMap( XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */);
extern XkbKeyTypePtr XkbAddKeyType( XkbDescPtr /* xkb */, Atom /* name */, int /* map_count */, Bool /* want_preserve */, int /* num_lvls */);
extern Status XkbAllocIndicatorMaps( XkbDescPtr /* xkb */);
extern void XkbFreeIndicatorMaps( XkbDescPtr /* xkb */);
extern XkbDescPtr XkbGetMap( Display * /* dpy */, unsigned int /* which */, unsigned int /* deviceSpec */);
extern Status XkbGetUpdatedMap( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */);
extern Status XkbGetMapChanges( Display * /* dpy */, XkbDescPtr /* xkb */, XkbMapChangesPtr /* changes */);
extern Status XkbRefreshKeyboardMapping( XkbMapNotifyEvent * /* event */);
extern Status XkbGetKeyTypes( Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */);
extern Status XkbGetKeySyms( Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */);
extern Status XkbGetKeyActions( Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */);
extern Status XkbGetKeyBehaviors( Display * /* dpy */, unsigned int /* firstKey */, unsigned int /* nKeys */, XkbDescPtr /* desc */);
extern Status XkbGetVirtualMods( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */);
extern Status XkbGetKeyExplicitComponents( Display * /* dpy */, unsigned int /* firstKey */, unsigned int /* nKeys */, XkbDescPtr /* desc */);
extern Status XkbGetKeyModifierMap( Display * /* dpy */, unsigned int /* firstKey */, unsigned int /* nKeys */, XkbDescPtr /* desc */);
extern Status XkbGetKeyVirtualModMap( Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */);
extern Status XkbAllocControls( XkbDescPtr /* xkb */, unsigned int /* which*/);
extern void XkbFreeControls( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */);
extern Status XkbGetControls( Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */);
extern Bool XkbSetControls( Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */);
extern void XkbNoteControlsChanges( XkbControlsChangesPtr /* old */, XkbControlsNotifyEvent * /* new */, unsigned int /* wanted */);
#define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x)#define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x)
extern Status XkbAllocCompatMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nInterpret */);
extern void XkbFreeCompatMap( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */);
extern Status XkbGetCompatMap( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* xkb */);
extern Bool XkbSetCompatMap( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* xkb */, Bool /* updateActions */);
extern XkbSymInterpretPtr XkbAddSymInterpret( XkbDescPtr /* xkb */, XkbSymInterpretPtr /* si */, Bool /* updateMap */, XkbChangesPtr /* changes */);
extern Status XkbAllocNames( XkbDescPtr /* xkb */, unsigned int /* which */, int /* nTotalRG */, int /* nTotalAliases */);
extern Status XkbGetNames( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */);
extern Bool XkbSetNames( Display * /* dpy */, unsigned int /* which */, unsigned int /* firstType */, unsigned int /* nTypes */, XkbDescPtr /* desc */);
extern Bool XkbChangeNames( Display * /* dpy */, XkbDescPtr /* xkb */, XkbNameChangesPtr /* changes */);
extern void XkbFreeNames( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */);
extern Status XkbGetState( Display * /* dpy */, unsigned int /* deviceSpec */, XkbStatePtr /* rtrnState */);
extern Bool XkbSetMap( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */);
extern Bool XkbChangeMap( Display* /* dpy */, XkbDescPtr /* desc */, XkbMapChangesPtr /* changes */);
extern Bool XkbSetDetectableAutoRepeat( Display * /* dpy */, Bool /* detectable */, Bool * /* supported */);
extern Bool XkbGetDetectableAutoRepeat( Display * /* dpy */, Bool * /* supported */);
extern Bool XkbSetAutoResetControls( Display * /* dpy */, unsigned int /* changes */, unsigned int * /* auto_ctrls */, unsigned int * /* auto_values */);
extern Bool XkbGetAutoResetControls( Display * /* dpy */, unsigned int * /* auto_ctrls */, unsigned int * /* auto_ctrl_values */);
extern Bool XkbSetPerClientControls( Display * /* dpy */, unsigned int /* change */, unsigned int * /* values */);
extern Bool XkbGetPerClientControls( Display * /* dpy */, unsigned int * /* ctrls */);
extern Status XkbCopyKeyType( XkbKeyTypePtr /* from */, XkbKeyTypePtr /* into */);
extern Status XkbCopyKeyTypes( XkbKeyTypePtr /* from */, XkbKeyTypePtr /* into */, int /* num_types */);
extern Status XkbResizeKeyType( XkbDescPtr /* xkb */, int /* type_ndx */, int /* map_count */, Bool /* want_preserve */, int /* new_num_lvls */);
extern KeySym *XkbResizeKeySyms( XkbDescPtr /* desc */, int /* forKey */, int /* symsNeeded */);
extern XkbAction *XkbResizeKeyActions( XkbDescPtr /* desc */, int /* forKey */, int /* actsNeeded */);
extern Status XkbChangeTypesOfKey( XkbDescPtr /* xkb */, int /* key */, int /* num_groups */, unsigned int /* groups */, int * /* newTypes */, XkbMapChangesPtr /* pChanges */);
extern Status XkbChangeKeycodeRange( XkbDescPtr /* xkb */, int /* minKC */, int /* maxKC */, XkbChangesPtr /* changes */);
/***====================================================================***/
extern XkbComponentListPtr XkbListComponents( Display * /* dpy */, unsigned int /* deviceSpec */, XkbComponentNamesPtr /* ptrns */, int * /* max_inout */);
extern void XkbFreeComponentList( XkbComponentListPtr /* list */);
extern XkbDescPtr XkbGetKeyboard( Display * /* dpy */, unsigned int /* which */, unsigned int /* deviceSpec */);
extern XkbDescPtr XkbGetKeyboardByName( Display * /* dpy */, unsigned int /* deviceSpec */, XkbComponentNamesPtr /* names */, unsigned int /* want */, unsigned int /* need */, Bool /* load */);
/***====================================================================***/
extern int XkbKeyTypesForCoreSymbols( /* returns # of groups */ XkbDescPtr /* xkb */, /* keyboard device */ int /* map_width */, /* width of core KeySym array */ KeySym * /* core_syms */, /* always mapWidth symbols */ unsigned int /* protected */, /* explicit key types */ int * /* types_inout */, /* always four type indices */ KeySym * /* xkb_syms_rtrn */ /* must have enough space */);
extern Bool XkbApplyCompatMapToKey( /* False only on error */ XkbDescPtr /* xkb */, /* keymap to be edited */ KeyCode /* key */, /* key to be updated */ XkbChangesPtr /* changes */ /* resulting changes to map */);
extern Bool XkbUpdateMapFromCore( /* False only on error */ XkbDescPtr /* xkb */, /* XKB keyboard to be edited */ KeyCode /* first_key */, /* first changed key */ int /* num_keys */, /* number of changed keys */ int /* map_width */, /* width of core keymap */ KeySym * /* core_keysyms */, /* symbols from core keymap */ XkbChangesPtr /* changes */ /* resulting changes */);
/***====================================================================***/
extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo( XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass */, unsigned int /* ledId */);
extern Status XkbResizeDeviceButtonActions( XkbDeviceInfoPtr /* devi */, unsigned int /* newTotal */);
extern XkbDeviceInfoPtr XkbAllocDeviceInfo( unsigned int /* deviceSpec */, unsigned int /* nButtons */, unsigned int /* szLeds */);
extern void XkbFreeDeviceInfo( XkbDeviceInfoPtr /* devi */, unsigned int /* which */, Bool /* freeDevI */);
extern void XkbNoteDeviceChanges( XkbDeviceChangesPtr /* old */, XkbExtensionDeviceNotifyEvent * /* new */, unsigned int /* wanted */);
extern XkbDeviceInfoPtr XkbGetDeviceInfo( Display * /* dpy */, unsigned int /* which */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */);
extern Status XkbGetDeviceInfoChanges( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, XkbDeviceChangesPtr /* changes */);
extern Status XkbGetDeviceButtonActions( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, Bool /* all */, unsigned int /* first */, unsigned int /* nBtns */);
extern Status XkbGetDeviceLedInfo( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass (class, XIDflt, XIAll) */, unsigned int /* ledId (id, XIDflt, XIAll) */, unsigned int /* which (XkbXI_Indicator{Names,Map}Mask */);
extern Bool XkbSetDeviceInfo( Display * /* dpy */, unsigned int /* which */, XkbDeviceInfoPtr /* devi */);
extern Bool XkbChangeDeviceInfo( Display* /* dpy */, XkbDeviceInfoPtr /* desc */, XkbDeviceChangesPtr /* changes */);
extern Bool XkbSetDeviceLedInfo( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass */, unsigned int /* ledID */, unsigned int /* which */);
extern Bool XkbSetDeviceButtonActions( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, unsigned int /* first */, unsigned int /* nBtns */);
/***====================================================================***/
extern char XkbToControl( char /* c */);
/***====================================================================***/
extern Bool XkbSetDebuggingFlags( Display * /* dpy */, unsigned int /* mask */, unsigned int /* flags */, char * /* msg */, unsigned int /* ctrls_mask */, unsigned int /* ctrls */, unsigned int * /* rtrn_flags */, unsigned int * /* rtrn_ctrls */);
extern Bool XkbApplyVirtualModChanges( XkbDescPtr /* xkb */, unsigned int /* changed */, XkbChangesPtr /* changes */);
extern Bool XkbUpdateActionVirtualMods( XkbDescPtr /* xkb */, XkbAction * /* act */, unsigned int /* changed */);
extern void XkbUpdateKeyTypeVirtualMods( XkbDescPtr /* xkb */, XkbKeyTypePtr /* type */, unsigned int /* changed */, XkbChangesPtr /* changes */);
_XFUNCPROTOEND
#endif /* _X11_XKBLIB_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113/*
Copyright 1985, 1986, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
*/
/* * XWDFile.h MIT Project Athena, X Window system window raster * image dumper, dump file format header file. * * Author: Tony Della Fera, DEC * 27-Jun-85 * * Modifier: William F. Wyatt, SAO * 18-Nov-86 - version 6 for saving/restoring color maps */
#ifndef XWDFILE_H#define XWDFILE_H
#include <X11/Xmd.h>
#define XWD_FILE_VERSION 7#define sz_XWDheader 100#define sz_XWDColor 12
typedef CARD32 xwdval; /* for old broken programs */
/* Values in the file are most significant byte first. */
typedef struct _xwd_file_header { /* header_size = SIZEOF(XWDheader) + length of null-terminated * window name. */ CARD32 header_size;
CARD32 file_version; /* = XWD_FILE_VERSION above */ CARD32 pixmap_format; /* ZPixmap or XYPixmap */ CARD32 pixmap_depth; /* Pixmap depth */ CARD32 pixmap_width; /* Pixmap width */ CARD32 pixmap_height; /* Pixmap height */ CARD32 xoffset; /* Bitmap x offset, normally 0 */ CARD32 byte_order; /* of image data: MSBFirst, LSBFirst */
/* bitmap_unit applies to bitmaps (depth 1 format XY) only. * It is the number of bits that each scanline is padded to. */ CARD32 bitmap_unit;
CARD32 bitmap_bit_order; /* bitmaps only: MSBFirst, LSBFirst */
/* bitmap_pad applies to pixmaps (non-bitmaps) only. * It is the number of bits that each scanline is padded to. */ CARD32 bitmap_pad;
CARD32 bits_per_pixel; /* Bits per pixel */
/* bytes_per_line is pixmap_width padded to bitmap_unit (bitmaps) * or bitmap_pad (pixmaps). It is the delta (in bytes) to get * to the same x position on an adjacent row. */ CARD32 bytes_per_line; CARD32 visual_class; /* Class of colormap */ CARD32 red_mask; /* Z red mask */ CARD32 green_mask; /* Z green mask */ CARD32 blue_mask; /* Z blue mask */ CARD32 bits_per_rgb; /* Log2 of distinct color values */ CARD32 colormap_entries; /* Number of entries in colormap; not used? */ CARD32 ncolors; /* Number of XWDColor structures */ CARD32 window_width; /* Window width */ CARD32 window_height; /* Window height */ CARD32 window_x; /* Window upper left X coordinate */ CARD32 window_y; /* Window upper left Y coordinate */ CARD32 window_bdrwidth; /* Window border width */} XWDFileHeader;
/* Null-terminated window name follows the above structure. */
/* Next comes XWDColor structures, at offset XWDFileHeader.header_size in * the file. XWDFileHeader.ncolors tells how many XWDColor structures * there are. */
typedef struct { CARD32 pixel; CARD16 red; CARD16 green; CARD16 blue; CARD8 flags; CARD8 pad;} XWDColor;
/* Last comes the image data in the format described by XWDFileHeader. */
#endif /* XWDFILE_H */
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121/*
Copyright 1995, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
The above copyright notice and this permission notice shall beincluded in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OROTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shallnot be used in advertising or otherwise to promote the sale, use orother dealings in this Software without prior written authorizationfrom The Open Group.
*//* * The purpose of this header is to define the macros ALLOCATE_LOCAL and * DEALLOCATE_LOCAL appropriately for the platform being compiled on. * These macros are used to make fast, function-local memory allocations. * Their characteristics are as follows: * * void *ALLOCATE_LOCAL(size_t size) * Returns a pointer to size bytes of memory, or NULL if the allocation * failed. The memory must be freed with DEALLOCATE_LOCAL before the * function that made the allocation returns. You should not ask for * large blocks of memory with this function, since on many platforms * the memory comes from the stack, which may have limited size. * * void DEALLOCATE_LOCAL(void *) * Frees the memory allocated by ALLOCATE_LOCAL. Omission of this * step may be harmless on some platforms, but will result in * memory leaks or worse on others. * * Before including this file, you should define two macros, * ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK, that have the * same characteristics as ALLOCATE_LOCAL and DEALLOCATE_LOCAL. The * header uses the fallbacks if it doesn't know a "better" way to define * ALLOCATE_LOCAL and DEALLOCATE_LOCAL. Typical usage would be: * * #define ALLOCATE_LOCAL_FALLBACK(_size) malloc(_size) * #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free(_ptr) * #include "Xalloca.h" */
#ifndef XALLOCA_H#define XALLOCA_H 1
#ifndef INCLUDE_ALLOCA_H/* Need to add more here to match Imake *.cf's */# if defined(HAVE_ALLOCA_H) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)# define INCLUDE_ALLOCA_H# endif#endif
#ifdef INCLUDE_ALLOCA_H# include <alloca.h>#endif
#ifndef NO_ALLOCA/* * os-dependent definition of local allocation and deallocation * If you want something other than (DE)ALLOCATE_LOCAL_FALLBACK * for ALLOCATE/DEALLOCATE_LOCAL then you add that in here. */
# ifdef __GNUC__# ifndef alloca# define alloca __builtin_alloca# endif /* !alloca */# define ALLOCATE_LOCAL(size) alloca((size_t)(size))# else /* ! __GNUC__ */
/* * warning: old mips alloca (pre 2.10) is unusable, new one is built in * Test is easy, the new one is named __builtin_alloca and comes * from alloca.h which #defines alloca. */# if defined(__sun) || defined(alloca)/* * Some System V boxes extract alloca.o from /lib/libPW.a; if you * decide that you don't want to use alloca, you might want to fix it here. *//* alloca might be a macro taking one arg (hi, Sun!), so give it one. */# if !defined(__cplusplus)# define __Xnullarg /* as nothing */ extern void *alloca(__Xnullarg);# endif# define ALLOCATE_LOCAL(size) alloca((size_t)(size))# endif /* who does alloca */# endif /* __GNUC__ */
#endif /* NO_ALLOCA */
#if !defined(ALLOCATE_LOCAL)# if defined(ALLOCATE_LOCAL_FALLBACK) && defined(DEALLOCATE_LOCAL_FALLBACK)# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK(_size)# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK(_ptr)# else /* no fallbacks supplied; error */# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined!# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined!# endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */#else# if !defined(DEALLOCATE_LOCAL)# define DEALLOCATE_LOCAL(_ptr) do {} while(0)# endif#endif /* defined(ALLOCATE_LOCAL) */
#endif /* XALLOCA_H */12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394#ifndef _XARCH_H_# define _XARCH_H_
/* * Copyright 1997 Metro Link Incorporated * * All Rights Reserved * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the names of the above listed copyright holder(s) * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holder(s) make(s) no representations about the suitability of * this software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY * 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 THIS SOFTWARE. */
/* * Determine the machine's byte order. */
/* See if it is set in the imake config first */# ifdef X_BYTE_ORDER
# define X_BIG_ENDIAN 4321# define X_LITTLE_ENDIAN 1234
# else
# if defined(SVR4) || defined(__SVR4)# include <sys/types.h># include <sys/byteorder.h># elif defined(CSRG_BASED)# if defined(__NetBSD__) || defined(__OpenBSD__)# include <sys/types.h># endif# include <machine/endian.h># elif defined(linux)# if defined __STRICT_ANSI__# undef __STRICT_ANSI__# include <endian.h># define __STRICT_ANSI__# else# include <endian.h># endif/* 'endian.h' might have been included before 'Xarch.h' */# if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)# define LITTLE_ENDIAN __LITTLE_ENDIAN# endif# if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)# define BIG_ENDIAN __BIG_ENDIAN# endif# if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN)# define PDP_ENDIAN __PDP_ENDIAN# endif# if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)# define BYTE_ORDER __BYTE_ORDER# endif# endif
# ifndef BYTE_ORDER# define LITTLE_ENDIAN 1234# define BIG_ENDIAN 4321
# if defined(__sun) && defined(__SVR4)# include <sys/isa_defs.h># ifdef _LITTLE_ENDIAN# define BYTE_ORDER LITTLE_ENDIAN# endif# ifdef _BIG_ENDIAN# define BYTE_ORDER BIG_ENDIAN# endif# endif /* sun */# endif /* BYTE_ORDER */
# define X_BYTE_ORDER BYTE_ORDER# define X_BIG_ENDIAN BIG_ENDIAN# define X_LITTLE_ENDIAN LITTLE_ENDIAN
# endif /* not in imake config */
#endif /* _XARCH_H_ */12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879#ifndef XATOM_H#define XATOM_H 1
/* THIS IS A GENERATED FILE * * Do not change! Changing this file implies a protocol change! */
#define XA_PRIMARY ((Atom) 1)#define XA_SECONDARY ((Atom) 2)#define XA_ARC ((Atom) 3)#define XA_ATOM ((Atom) 4)#define XA_BITMAP ((Atom) 5)#define XA_CARDINAL ((Atom) 6)#define XA_COLORMAP ((Atom) 7)#define XA_CURSOR ((Atom) 8)#define XA_CUT_BUFFER0 ((Atom) 9)#define XA_CUT_BUFFER1 ((Atom) 10)#define XA_CUT_BUFFER2 ((Atom) 11)#define XA_CUT_BUFFER3 ((Atom) 12)#define XA_CUT_BUFFER4 ((Atom) 13)#define XA_CUT_BUFFER5 ((Atom) 14)#define XA_CUT_BUFFER6 ((Atom) 15)#define XA_CUT_BUFFER7 ((Atom) 16)#define XA_DRAWABLE ((Atom) 17)#define XA_FONT ((Atom) 18)#define XA_INTEGER ((Atom) 19)#define XA_PIXMAP ((Atom) 20)#define XA_POINT ((Atom) 21)#define XA_RECTANGLE ((Atom) 22)#define XA_RESOURCE_MANAGER ((Atom) 23)#define XA_RGB_COLOR_MAP ((Atom) 24)#define XA_RGB_BEST_MAP ((Atom) 25)#define XA_RGB_BLUE_MAP ((Atom) 26)#define XA_RGB_DEFAULT_MAP ((Atom) 27)#define XA_RGB_GRAY_MAP ((Atom) 28)#define XA_RGB_GREEN_MAP ((Atom) 29)#define XA_RGB_RED_MAP ((Atom) 30)#define XA_STRING ((Atom) 31)#define XA_VISUALID ((Atom) 32)#define XA_WINDOW ((Atom) 33)#define XA_WM_COMMAND ((Atom) 34)#define XA_WM_HINTS ((Atom) 35)#define XA_WM_CLIENT_MACHINE ((Atom) 36)#define XA_WM_ICON_NAME ((Atom) 37)#define XA_WM_ICON_SIZE ((Atom) 38)#define XA_WM_NAME ((Atom) 39)#define XA_WM_NORMAL_HINTS ((Atom) 40)#define XA_WM_SIZE_HINTS ((Atom) 41)#define XA_WM_ZOOM_HINTS ((Atom) 42)#define XA_MIN_SPACE ((Atom) 43)#define XA_NORM_SPACE ((Atom) 44)#define XA_MAX_SPACE ((Atom) 45)#define XA_END_SPACE ((Atom) 46)#define XA_SUPERSCRIPT_X ((Atom) 47)#define XA_SUPERSCRIPT_Y ((Atom) 48)#define XA_SUBSCRIPT_X ((Atom) 49)#define XA_SUBSCRIPT_Y ((Atom) 50)#define XA_UNDERLINE_POSITION ((Atom) 51)#define XA_UNDERLINE_THICKNESS ((Atom) 52)#define XA_STRIKEOUT_ASCENT ((Atom) 53)#define XA_STRIKEOUT_DESCENT ((Atom) 54)#define XA_ITALIC_ANGLE ((Atom) 55)#define XA_X_HEIGHT ((Atom) 56)#define XA_QUAD_WIDTH ((Atom) 57)#define XA_WEIGHT ((Atom) 58)#define XA_POINT_SIZE ((Atom) 59)#define XA_RESOLUTION ((Atom) 60)#define XA_COPYRIGHT ((Atom) 61)#define XA_NOTICE ((Atom) 62)#define XA_FONT_NAME ((Atom) 63)#define XA_FAMILY_NAME ((Atom) 64)#define XA_FULL_NAME ((Atom) 65)#define XA_CAP_HEIGHT ((Atom) 66)#define XA_WM_CLASS ((Atom) 67)#define XA_WM_TRANSIENT_FOR ((Atom) 68)
#define XA_LAST_PREDEFINED ((Atom) 68)#endif /* XATOM_H */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181/*
Copyright 1988, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
*/
#ifndef _Xauth_h#define _Xauth_h
/* struct xauth is full of implicit padding to properly align the pointers after the length fields. We can't clean that up without breaking ABI, so tell clang not to bother complaining about it. */#ifdef __clang__#pragma clang diagnostic push#pragma clang diagnostic ignored "-Wpadded"#endif
typedef struct xauth { unsigned short family; unsigned short address_length; char *address; unsigned short number_length; char *number; unsigned short name_length; char *name; unsigned short data_length; char *data;} Xauth;
#ifdef __clang__#pragma clang diagnostic pop#endif
#ifndef _XAUTH_STRUCT_ONLY
# include <X11/Xfuncproto.h># include <X11/Xfuncs.h>
# include <stdio.h>
# define FamilyLocal (256) /* not part of X standard (i.e. X.h) */# define FamilyWild (65535)# define FamilyNetname (254) /* not part of X standard */# define FamilyKrb5Principal (253) /* Kerberos 5 principal name */# define FamilyLocalHost (252) /* for local non-net authentication */
_XFUNCPROTOBEGIN
#ifndef __has_attribute# define __has_attribute(x) 0 /* Compatibility with older compilers */#endif
#if __has_attribute(access)# define XAU_ACCESS_ATTRIBUTE(X) __attribute__((access X))#else# define XAU_ACCESS_ATTRIBUTE(X)#endif
#if __has_attribute(malloc)# if defined(__clang__) || (defined(__GNUC__) && __GNUC__ < 11)/* Clang or gcc do not support the optional deallocator argument */# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc))# else# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc X))# endif#else# define XAU_MALLOC_ATTRIBUTE(X)#endif
char *XauFileName(void);
void XauDisposeAuth(Xauth* /* auth */);
XAU_MALLOC_ATTRIBUTE((XauDisposeAuth, 1))Xauth *XauReadAuth(FILE* /* auth_file */);
XAU_ACCESS_ATTRIBUTE((read_only, 1)) /* file_name */int XauLockAuth(_Xconst char* /* file_name */,int /* retries */,int /* timeout */,long /* dead */);
XAU_ACCESS_ATTRIBUTE((read_only, 1)) /* file_name */int XauUnlockAuth(_Xconst char* /* file_name */);
XAU_ACCESS_ATTRIBUTE((read_only, 2)) /* auth */int XauWriteAuth(FILE* /* auth_file */,Xauth* /* auth */);
XAU_ACCESS_ATTRIBUTE((read_only, 3, 2)) /* address */XAU_ACCESS_ATTRIBUTE((read_only, 5, 4)) /* number */XAU_ACCESS_ATTRIBUTE((read_only, 7, 6)) /* name */Xauth *XauGetAuthByAddr(#if NeedWidePrototypesunsigned int /* family */,unsigned int /* address_length */,#elseunsigned short /* family */,unsigned short /* address_length */,#endif_Xconst char* /* address */,#if NeedWidePrototypesunsigned int /* number_length */,#elseunsigned short /* number_length */,#endif_Xconst char* /* number */,#if NeedWidePrototypesunsigned int /* name_length */,#elseunsigned short /* name_length */,#endif_Xconst char* /* name */);
XAU_ACCESS_ATTRIBUTE((read_only, 3, 2)) /* address */XAU_ACCESS_ATTRIBUTE((read_only, 5, 4)) /* number */XAU_ACCESS_ATTRIBUTE((read_only, 7, 6)) /* type_names */XAU_ACCESS_ATTRIBUTE((read_only, 8, 6)) /* type_lengths */Xauth *XauGetBestAuthByAddr(#if NeedWidePrototypesunsigned int /* family */,unsigned int /* address_length */,#elseunsigned short /* family */,unsigned short /* address_length */,#endif_Xconst char* /* address */,#if NeedWidePrototypesunsigned int /* number_length */,#elseunsigned short /* number_length */,#endif_Xconst char* /* number */,int /* types_length */,char** /* type_names */,_Xconst int* /* type_lengths */);
_XFUNCPROTOEND
/* Return values from XauLockAuth */
# define LOCK_SUCCESS 0 /* lock succeeded */# define LOCK_ERROR 1 /* lock unexpectedly failed, check errno */# define LOCK_TIMEOUT 2 /* lock failed, timeouts expired */
#endif /* _XAUTH_STRUCT_ONLY */
#endif /* _Xauth_h */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
/* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this * software and its documentation for any purpose and without fee, provided * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 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 THE PERFORMANCE OF THIS SOFTWARE. * * * DESCRIPTION * Public include file for X Color Management System */#ifndef _X11_XCMS_H_#define _X11_XCMS_H_
#include <X11/Xlib.h>
/* The Xcms structs are full of implicit padding to properly align members. We can't clean that up without breaking ABI, so tell clang not to bother complaining about it. */#ifdef __clang__#pragma clang diagnostic push#pragma clang diagnostic ignored "-Wpadded"#endif
/* * XCMS Status Values */#define XcmsFailure 0#define XcmsSuccess 1#define XcmsSuccessWithCompression 2
/* * Color Space Format ID's * Color Space ID's are of XcmsColorFormat type. * * bit 31 * 0 == Device-Independent * 1 == Device-Dependent * * bit 30: * 0 == Registered with X Consortium * 1 == Unregistered */#define XcmsUndefinedFormat (XcmsColorFormat)0x00000000#define XcmsCIEXYZFormat (XcmsColorFormat)0x00000001#define XcmsCIEuvYFormat (XcmsColorFormat)0x00000002#define XcmsCIExyYFormat (XcmsColorFormat)0x00000003#define XcmsCIELabFormat (XcmsColorFormat)0x00000004#define XcmsCIELuvFormat (XcmsColorFormat)0x00000005#define XcmsTekHVCFormat (XcmsColorFormat)0x00000006#define XcmsRGBFormat (XcmsColorFormat)0x80000000#define XcmsRGBiFormat (XcmsColorFormat)0x80000001
/* * State of XcmsPerScrnInfo */#define XcmsInitNone 0x00 /* no initialization attempted */#define XcmsInitSuccess 0x01 /* initialization successful */#define XcmsInitFailure 0xff /* failure, use defaults */
#define DisplayOfCCC(ccc) ((ccc)->dpy)#define ScreenNumberOfCCC(ccc) ((ccc)->screenNumber)#define VisualOfCCC(ccc) ((ccc)->visual)#define ClientWhitePointOfCCC(ccc) (&(ccc)->clientWhitePt)#define ScreenWhitePointOfCCC(ccc) (&(ccc)->pPerScrnInfo->screenWhitePt)#define FunctionSetOfCCC(ccc) ((ccc)->pPerScrnInfo->functionSet)
typedef unsigned long XcmsColorFormat; /* Color Space Format ID */
typedef double XcmsFloat;
/* * Device RGB */typedef struct { unsigned short red; /* scaled from 0x0000 to 0xffff */ unsigned short green; /* scaled from 0x0000 to 0xffff */ unsigned short blue; /* scaled from 0x0000 to 0xffff */} XcmsRGB;
/* * RGB Intensity */typedef struct { XcmsFloat red; /* 0.0 - 1.0 */ XcmsFloat green; /* 0.0 - 1.0 */ XcmsFloat blue; /* 0.0 - 1.0 */} XcmsRGBi;
/* * CIE XYZ */typedef struct { XcmsFloat X; XcmsFloat Y; XcmsFloat Z;} XcmsCIEXYZ;
/* * CIE u'v'Y */typedef struct { XcmsFloat u_prime; /* 0.0 - 1.0 */ XcmsFloat v_prime; /* 0.0 - 1.0 */ XcmsFloat Y; /* 0.0 - 1.0 */} XcmsCIEuvY;
/* * CIE xyY */typedef struct { XcmsFloat x; /* 0.0 - 1.0 */ XcmsFloat y; /* 0.0 - 1.0 */ XcmsFloat Y; /* 0.0 - 1.0 */} XcmsCIExyY;
/* * CIE L*a*b* */typedef struct { XcmsFloat L_star; /* 0.0 - 100.0 */ XcmsFloat a_star; XcmsFloat b_star;} XcmsCIELab;
/* * CIE L*u*v* */typedef struct { XcmsFloat L_star; /* 0.0 - 100.0 */ XcmsFloat u_star; XcmsFloat v_star;} XcmsCIELuv;
/* * TekHVC */typedef struct { XcmsFloat H; /* 0.0 - 360.0 */ XcmsFloat V; /* 0.0 - 100.0 */ XcmsFloat C; /* 0.0 - 100.0 */} XcmsTekHVC;
/* * PAD */typedef struct { XcmsFloat pad0; XcmsFloat pad1; XcmsFloat pad2; XcmsFloat pad3;} XcmsPad;
/* * XCMS Color Structure */typedef struct { union { XcmsRGB RGB; XcmsRGBi RGBi; XcmsCIEXYZ CIEXYZ; XcmsCIEuvY CIEuvY; XcmsCIExyY CIExyY; XcmsCIELab CIELab; XcmsCIELuv CIELuv; XcmsTekHVC TekHVC; XcmsPad Pad; } spec; /* the color specification */ unsigned long pixel; /* pixel value (as needed) */ XcmsColorFormat format; /* the specification format */} XcmsColor;
/* * XCMS Per Screen related data */
typedef struct _XcmsPerScrnInfo { XcmsColor screenWhitePt; /* Screen White point */ XPointer functionSet; /* pointer to Screen Color Characterization */ /* Function Set structure */ XPointer screenData; /* pointer to corresponding Screen Color*/ /* Characterization Data */ unsigned char state; /* XcmsInitNone, XcmsInitSuccess, XcmsInitFailure */ char pad[3];} XcmsPerScrnInfo;
typedef struct _XcmsCCC *XcmsCCC;
typedef Status (*XcmsCompressionProc)( /* Gamut Compression Proc */ XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
typedef Status (*XcmsWhiteAdjustProc)( /* White Point Adjust Proc */ XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, XcmsColorFormat /* target_format */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */);
/* * XCMS Color Conversion Context */typedef struct _XcmsCCC { Display *dpy; /* X Display */ int screenNumber; /* X screen number */ Visual *visual; /* X Visual */ XcmsColor clientWhitePt; /* Client White Point */ XcmsCompressionProc gamutCompProc; /* Gamut Compression Function */ XPointer gamutCompClientData; /* Gamut Comp Func Client Data */ XcmsWhiteAdjustProc whitePtAdjProc; /* White Point Adjustment Function */ XPointer whitePtAdjClientData; /* White Pt Adj Func Client Data */ XcmsPerScrnInfo *pPerScrnInfo; /* pointer to per screen information */ /* associated with the above display */ /* screenNumber */} XcmsCCCRec;
typedef Status (*XcmsScreenInitProc)( /* Screen Initialization Proc */ Display* /* dpy */, int /* screen_number */, XcmsPerScrnInfo* /* screen_info */);
typedef void (*XcmsScreenFreeProc)( XPointer /* screenData */);
/* * Function List Pointer -- pointer to an array of function pointers. * The end of list is indicated by a NULL pointer. *//* * XXX: The use of the XcmsConversionProc type is broken. The * device-independent colour conversion code uses it as:
typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, XcmsColor *, unsigned int);
* while the device-dependent code uses it as:
typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, unsigned int, Bool *);
* Until this is reworked, it's probably best to leave it unprotoized. * The code works regardless. */typedef Status (*XcmsDDConversionProc)( /* using device-dependent version */ XcmsCCC /* ccc */, XcmsColor* /* pcolors_in_out */, unsigned int /* ncolors */, Bool* /* pCompressed */ );
typedef Status (*XcmsDIConversionProc)( /* using device-independent version */ XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* pcolors_in_out */, unsigned int /* ncolors */ );
typedef XcmsDIConversionProc XcmsConversionProc;typedef XcmsConversionProc *XcmsFuncListPtr;
typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */ char* /* color_string */, XcmsColor* /* color_return */);
/* * Color Space -- per Color Space related data (Device-Independent * or Device-Dependent) */typedef struct _XcmsColorSpace { const char *prefix; /* Prefix of string format. */ XcmsColorFormat id; /* Format ID number. */ XcmsParseStringProc parseString; /* String format parsing function */ XcmsFuncListPtr to_CIEXYZ; /* Pointer to an array of function */ /* pointers such that when the */ /* functions are executed in sequence */ /* will convert a XcmsColor structure */ /* from this color space to CIEXYZ */ /* space. */ XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function */ /* pointers such that when the */ /* functions are executed in sequence */ /* will convert a XcmsColor structure */ /* from CIEXYZ space to this color */ /* space. */ int inverse_flag; /* If 1, indicates that for 0 <= i < n */ /* where n is the number of function */ /* pointers in the lists to_CIEXYZ */ /* and from_CIEXYZ; for each function */ /* to_CIEXYZ[i] its inverse function */ /* is from_CIEXYZ[n - i]. */
} XcmsColorSpace;
/* * Screen Color Characterization Function Set -- per device class * color space conversion functions. */typedef struct _XcmsFunctionSet { XcmsColorSpace **DDColorSpaces; /* Pointer to an array of pointers to */ /* Device-DEPENDENT color spaces */ /* understood by this SCCFuncSet. */ XcmsScreenInitProc screenInitProc; /* Screen initialization function that */ /* reads Screen Color Characterization*/ /* Data off properties on the screen's*/ /* root window. */ XcmsScreenFreeProc screenFreeProc; /* Function that frees the SCCData */ /* structures. */} XcmsFunctionSet;
_XFUNCPROTOBEGIN
extern Status XcmsAddColorSpace ( XcmsColorSpace* /* pColorSpace */);
extern Status XcmsAddFunctionSet ( XcmsFunctionSet* /* functionSet */);
extern Status XcmsAllocColor ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* color_in_out */, XcmsColorFormat /* result_format */);
extern Status XcmsAllocNamedColor ( Display* /* dpy */, Colormap /* colormap */, _Xconst char* /* color_string */, XcmsColor* /* color_scrn_return */, XcmsColor* /* color_exact_return */, XcmsColorFormat /* result_format */);
extern XcmsCCC XcmsCCCOfColormap ( Display* /* dpy */, Colormap /* colormap */);
extern Status XcmsCIELabClipab( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
extern Status XcmsCIELabClipL( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
extern Status XcmsCIELabClipLab( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
extern Status XcmsCIELabQueryMaxC ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* L_star */, XcmsColor* /* color_return */);
extern Status XcmsCIELabQueryMaxL ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */);
extern Status XcmsCIELabQueryMaxLC ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsColor* /* color_return */);
extern Status XcmsCIELabQueryMinL ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */);
extern Status XcmsCIELabToCIEXYZ ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern Status XcmsCIELabWhiteShiftColors( XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, XcmsColorFormat /* target_format */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */);
extern Status XcmsCIELuvClipL( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
extern Status XcmsCIELuvClipLuv( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
extern Status XcmsCIELuvClipuv( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
extern Status XcmsCIELuvQueryMaxC ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* L_star */, XcmsColor* /* color_return */);
extern Status XcmsCIELuvQueryMaxL ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */);
extern Status XcmsCIELuvQueryMaxLC ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsColor* /* color_return */);
extern Status XcmsCIELuvQueryMinL ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */);
extern Status XcmsCIELuvToCIEuvY ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern Status XcmsCIELuvWhiteShiftColors( XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, XcmsColorFormat /* target_format */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */);
extern Status XcmsCIEXYZToCIELab ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern Status XcmsCIEXYZToCIEuvY ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern Status XcmsCIEXYZToCIExyY ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern Status XcmsCIEXYZToRGBi ( XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */);
extern Status XcmsCIEuvYToCIELuv ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern Status XcmsCIEuvYToCIEXYZ ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern Status XcmsCIEuvYToTekHVC ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern Status XcmsCIExyYToCIEXYZ ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern XcmsColor *XcmsClientWhitePointOfCCC ( XcmsCCC /* ccc */);
extern Status XcmsConvertColors ( XcmsCCC /* ccc */, XcmsColor* /* colorArry_in_out */, unsigned int /* nColors */, XcmsColorFormat /* targetFormat */, Bool* /* compArry_return */);
extern XcmsCCC XcmsCreateCCC ( Display* /* dpy */, int /* screenNumber */, Visual* /* visual */, XcmsColor* /* clientWhitePt */, XcmsCompressionProc /* gamutCompProc */, XPointer /* gamutCompClientData */, XcmsWhiteAdjustProc /* whitePtAdjProc */, XPointer /* whitePtAdjClientData */);
extern XcmsCCC XcmsDefaultCCC ( Display* /* dpy */, int /* screenNumber */);
extern Display *XcmsDisplayOfCCC ( XcmsCCC /* ccc */);
extern XcmsColorFormat XcmsFormatOfPrefix ( char* /* prefix */);
extern void XcmsFreeCCC ( XcmsCCC /* ccc */);
extern Status XcmsLookupColor ( Display* /* dpy */, Colormap /* colormap */, _Xconst char* /* color_string */, XcmsColor* /* pColor_exact_in_out */, XcmsColor* /* pColor_scrn_in_out */, XcmsColorFormat /* result_format */);
extern char *XcmsPrefixOfFormat ( XcmsColorFormat /* id */);
extern Status XcmsQueryBlack ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */);
extern Status XcmsQueryBlue ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */);
extern Status XcmsQueryColor ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* pColor_in_out */, XcmsColorFormat /* result_format */);
extern Status XcmsQueryColors ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* colorArry_in_out */, unsigned int /* nColors */, XcmsColorFormat /* result_format */);
extern Status XcmsQueryGreen ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */);
extern Status XcmsQueryRed ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */);
extern Status XcmsQueryWhite ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */);
extern Status XcmsRGBiToCIEXYZ ( XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */);
extern Status XcmsRGBiToRGB ( XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */);
extern Status XcmsRGBToRGBi ( XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */);
extern int XcmsScreenNumberOfCCC ( XcmsCCC /* ccc */);
extern XcmsColor *XcmsScreenWhitePointOfCCC ( XcmsCCC /* ccc */);
extern XcmsCCC XcmsSetCCCOfColormap( Display* /* dpy */, Colormap /* colormap */, XcmsCCC /* ccc */);
extern XcmsCompressionProc XcmsSetCompressionProc ( XcmsCCC /* ccc */, XcmsCompressionProc /* compression_proc */, XPointer /* client_data */);
extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc ( XcmsCCC /* ccc */, XcmsWhiteAdjustProc /* white_adjust_proc */, XPointer /* client_data */);
extern Status XcmsSetWhitePoint ( XcmsCCC /* ccc */, XcmsColor* /* color */);
extern Status XcmsStoreColor ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* pColor_in */);
extern Status XcmsStoreColors ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* colorArry_in */, unsigned int /* nColors */, Bool* /* compArry_return */);
extern Status XcmsTekHVCClipC( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
extern Status XcmsTekHVCClipV( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
extern Status XcmsTekHVCClipVC( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */);
extern Status XcmsTekHVCQueryMaxC ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsFloat /* value */, XcmsColor* /* color_return */);
extern Status XcmsTekHVCQueryMaxV ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsFloat /* chroma */, XcmsColor* /* color_return */);
extern Status XcmsTekHVCQueryMaxVC ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsColor* /* color_return */);
extern Status XcmsTekHVCQueryMaxVSamples ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsColor* /* colors_return */, unsigned int /* nsamples */);
extern Status XcmsTekHVCQueryMinV ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsFloat /* chroma */, XcmsColor* /* color_return */);
extern Status XcmsTekHVCToCIEuvY ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */);
extern Status XcmsTekHVCWhiteShiftColors( XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, XcmsColorFormat /* target_format */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */);
extern Visual *XcmsVisualOfCCC ( XcmsCCC /* ccc */);
#ifdef __clang__#pragma clang diagnostic pop#endif
_XFUNCPROTOEND
#endif /* _X11_XCMS_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108/***********************************************************
Copyright (c) 1999 The XFree86 Project Inc.
All Rights Reserved.
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 THEOPEN GROUP 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 XFree86 ProjectInc. shall not be used in advertising or otherwise to promote thesale, use or other dealings in this Software without prior writtenauthorization from The XFree86 Project Inc..
*/
/** ** Types definitions shared between server and clients **/
#ifndef _XDEFS_H#define _XDEFS_H
#ifdef _XSERVER64#include <X11/Xmd.h>#endif
#ifndef _XTYPEDEF_ATOM# define _XTYPEDEF_ATOM# ifndef _XSERVER64typedef unsigned long Atom;# elsetypedef CARD32 Atom;# endif#endif
#ifndef Bool# ifndef _XTYPEDEF_BOOL# define _XTYPEDEF_BOOLtypedef int Bool;# endif#endif
#ifndef _XTYPEDEF_POINTER# define _XTYPEDEF_POINTERtypedef void *pointer;#endif
#ifndef _XTYPEDEF_CLIENTPTRtypedef struct _Client *ClientPtr;# define _XTYPEDEF_CLIENTPTR#endif
#ifndef _XTYPEDEF_XID# define _XTYPEDEF_XID# ifndef _XSERVER64typedef unsigned long XID;# elsetypedef CARD32 XID;# endif#endif
#ifndef _XTYPEDEF_MASK# define _XTYPEDEF_MASK# ifndef _XSERVER64typedef unsigned long Mask;# elsetypedef CARD32 Mask;# endif#endif
#ifndef _XTYPEDEF_FONTPTR# define _XTYPEDEF_FONTPTRtypedef struct _Font *FontPtr; /* also in fonts/include/font.h */#endif
#ifndef _XTYPEDEF_FONT# define _XTYPEDEF_FONTtypedef XID Font;#endif
#ifndef _XTYPEDEF_FSID# ifndef _XSERVER64typedef unsigned long FSID;# elsetypedef CARD32 FSID;# endif#endif
typedef FSID AccContext;
/* OS independent time value XXX Should probably go in Xos.h */typedef struct timeval **OSTimePtr;
typedef void (* BlockHandlerProcPtr)(void * /* blockData */, OSTimePtr /* pTimeout */, void * /* pReadmask */);
#endif123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226/* * Copyright 1989 Network Computing Devices, Inc., Mountain View, California. * * Permission 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 that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of N.C.D. not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. N.C.D. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * */
#ifndef _XDMCP_H_#define _XDMCP_H_
#include <X11/Xmd.h>
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
#define XDM_PROTOCOL_VERSION 1#define XDM_UDP_PORT 177
/* IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned * multicast addresses for XDMCP, where X in the prefix may be replaced * by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local, * 5 for Site-Local, and so on. We set the default here to the Link-Local * version to most closely match the old IPv4 subnet broadcast behavior. * Both xdm and X -query allow specifying a different address if a different * scope is defined. */#define XDM_DEFAULT_MCAST_ADDR6 "ff02:0:0:0:0:0:0:12b"
#define XDM_MAX_MSGLEN 8192#define XDM_MIN_RTX 2#define XDM_MAX_RTX 32#define XDM_RTX_LIMIT 7#define XDM_KA_RTX_LIMIT 4#define XDM_DEF_DORMANCY (3 * 60) /* 3 minutes */#define XDM_MAX_DORMANCY (24 * 60 * 60) /* 24 hours */
typedef enum { BROADCAST_QUERY = 1, QUERY, INDIRECT_QUERY, FORWARD_QUERY, WILLING, UNWILLING, REQUEST, ACCEPT, DECLINE, MANAGE, REFUSE, FAILED, KEEPALIVE, ALIVE} xdmOpCode;
typedef enum { XDM_QUERY, XDM_BROADCAST, XDM_INDIRECT, XDM_COLLECT_QUERY, XDM_COLLECT_BROADCAST_QUERY, XDM_COLLECT_INDIRECT_QUERY, XDM_START_CONNECTION, XDM_AWAIT_REQUEST_RESPONSE, XDM_AWAIT_MANAGE_RESPONSE, XDM_MANAGE, XDM_RUN_SESSION, XDM_OFF, XDM_AWAIT_USER_INPUT, XDM_KEEPALIVE, XDM_AWAIT_ALIVE_RESPONSE,#if defined(IPv6) && defined(AF_INET6) XDM_MULTICAST, XDM_COLLECT_MULTICAST_QUERY,#endif XDM_KEEP_ME_LAST} xdmcp_states;
#ifdef NOTDEF/* table of hosts */
#define XDM_MAX_STR_LEN 21#define XDM_MAX_HOSTS 20struct xdm_host_table { struct sockaddr_in sockaddr; char name[XDM_MAX_STR_LEN]; char status[XDM_MAX_STR_LEN];};#endif /* NOTDEF */
typedef CARD8 *CARD8Ptr;typedef CARD16 *CARD16Ptr;typedef CARD32 *CARD32Ptr;
typedef struct _ARRAY8 { CARD16 length; CARD8Ptr data;} ARRAY8, *ARRAY8Ptr;
typedef struct _ARRAY16 { CARD8 length; CARD16Ptr data;} ARRAY16, *ARRAY16Ptr;
typedef struct _ARRAY32 { CARD8 length; CARD32Ptr data;} ARRAY32, *ARRAY32Ptr;
typedef struct _ARRAYofARRAY8 { CARD8 length; ARRAY8Ptr data;} ARRAYofARRAY8, *ARRAYofARRAY8Ptr;
typedef struct _XdmcpHeader { CARD16 version, opcode, length;} XdmcpHeader, *XdmcpHeaderPtr;
typedef struct _XdmcpBuffer { BYTE *data; int size; /* size of buffer pointed by to data */ int pointer; /* current index into data */ int count; /* bytes read from network into data */} XdmcpBuffer, *XdmcpBufferPtr;
typedef struct _XdmAuthKey { BYTE data[8];} XdmAuthKeyRec, *XdmAuthKeyPtr;
/* implementation-independent network address structure. Equiv to sockaddr* for sockets. */
typedef char *XdmcpNetaddr;
#ifndef __has_attribute# define __has_attribute(x) 0 /* Compatibility with older compilers */#endif
#if __has_attribute(access)# define XDM_ACCESS_ATTRIBUTE(X) __attribute__((access X))#else# define XDM_ACCESS_ATTRIBUTE(X)#endif
XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((read_only, 2))extern int XdmcpWriteARRAY16(XdmcpBufferPtr buffer, const ARRAY16Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((read_only, 2))extern int XdmcpWriteARRAY32(XdmcpBufferPtr buffer, const ARRAY32Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((read_only, 2))extern int XdmcpWriteARRAY8(XdmcpBufferPtr buffer, const ARRAY8Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((read_only, 2))extern int XdmcpWriteARRAYofARRAY8(XdmcpBufferPtr buffer, const ARRAYofARRAY8Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1))extern int XdmcpWriteCARD16(XdmcpBufferPtr buffer, unsigned value);XDM_ACCESS_ATTRIBUTE((read_write, 1))extern int XdmcpWriteCARD32(XdmcpBufferPtr buffer, unsigned value);XDM_ACCESS_ATTRIBUTE((read_write, 1))extern int XdmcpWriteCARD8(XdmcpBufferPtr buffer, unsigned value);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((read_only, 2))extern int XdmcpWriteHeader(XdmcpBufferPtr buffer, const XdmcpHeaderPtr header);
XDM_ACCESS_ATTRIBUTE((read_only, 2))extern int XdmcpFlush(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr to, int tolen);
XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((write_only, 2))extern int XdmcpReadARRAY16(XdmcpBufferPtr buffer, ARRAY16Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((write_only, 2))extern int XdmcpReadARRAY32(XdmcpBufferPtr buffer, ARRAY32Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((write_only, 2))extern int XdmcpReadARRAY8(XdmcpBufferPtr buffer, ARRAY8Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((write_only, 2))extern int XdmcpReadARRAYofARRAY8(XdmcpBufferPtr buffer, ARRAYofARRAY8Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((write_only, 2))extern int XdmcpReadCARD16(XdmcpBufferPtr buffer, CARD16Ptr valuep);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((write_only, 2))extern int XdmcpReadCARD32(XdmcpBufferPtr buffer, CARD32Ptr valuep);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((write_only, 2))extern int XdmcpReadCARD8(XdmcpBufferPtr buffer, CARD8Ptr valuep);XDM_ACCESS_ATTRIBUTE((read_write, 1)) XDM_ACCESS_ATTRIBUTE((write_only, 2))extern int XdmcpReadHeader(XdmcpBufferPtr buffer, XdmcpHeaderPtr header);
XDM_ACCESS_ATTRIBUTE((read_write, 2))extern int XdmcpFill(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr from, int *fromlen);
XDM_ACCESS_ATTRIBUTE((read_only, 1))extern int XdmcpReadRemaining(const XdmcpBufferPtr buffer);
XDM_ACCESS_ATTRIBUTE((read_write, 1))extern void XdmcpDisposeARRAY8(ARRAY8Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1))extern void XdmcpDisposeARRAY16(ARRAY16Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1))extern void XdmcpDisposeARRAY32(ARRAY32Ptr array);XDM_ACCESS_ATTRIBUTE((read_write, 1))extern void XdmcpDisposeARRAYofARRAY8(ARRAYofARRAY8Ptr array);
XDM_ACCESS_ATTRIBUTE((read_only, 1)) XDM_ACCESS_ATTRIBUTE((write_only, 2))extern int XdmcpCopyARRAY8(const ARRAY8Ptr src, ARRAY8Ptr dst);
XDM_ACCESS_ATTRIBUTE((read_only, 1)) XDM_ACCESS_ATTRIBUTE((read_only, 2))extern int XdmcpARRAY8Equal(const ARRAY8Ptr array1, const ARRAY8Ptr array2);
XDM_ACCESS_ATTRIBUTE((write_only, 1))extern void XdmcpGenerateKey (XdmAuthKeyPtr key);extern void XdmcpIncrementKey (XdmAuthKeyPtr key);extern void XdmcpDecrementKey (XdmAuthKeyPtr key);#ifdef HASXDMAUTHextern void XdmcpWrap(unsigned char *input, unsigned char *wrapper, unsigned char *output, int bytes);extern void XdmcpUnwrap(unsigned char *input, unsigned char *wrapper, unsigned char *output, int bytes);#endif
#ifndef TRUE#define TRUE 1#define FALSE 0#endif
XDM_ACCESS_ATTRIBUTE((read_only, 1)) XDM_ACCESS_ATTRIBUTE((read_only, 2))extern int XdmcpCompareKeys (const XdmAuthKeyPtr a, const XdmAuthKeyPtr b);
XDM_ACCESS_ATTRIBUTE((write_only, 1))extern int XdmcpAllocARRAY16 (ARRAY16Ptr array, int length);XDM_ACCESS_ATTRIBUTE((write_only, 1))extern int XdmcpAllocARRAY32 (ARRAY32Ptr array, int length);XDM_ACCESS_ATTRIBUTE((write_only, 1))extern int XdmcpAllocARRAY8 (ARRAY8Ptr array, int length);XDM_ACCESS_ATTRIBUTE((write_only, 1))extern int XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length);
XDM_ACCESS_ATTRIBUTE((read_write, 1))extern int XdmcpReallocARRAY16 (ARRAY16Ptr array, int length);XDM_ACCESS_ATTRIBUTE((read_write, 1))extern int XdmcpReallocARRAY32 (ARRAY32Ptr array, int length);XDM_ACCESS_ATTRIBUTE((read_write, 1))extern int XdmcpReallocARRAY8 (ARRAY8Ptr array, int length);XDM_ACCESS_ATTRIBUTE((read_write, 1))extern int XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length);
_XFUNCPROTOEND
#endif /* _XDMCP_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216/* *Copyright 1989, 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group. * */
/* Definitions to make function prototypes manageable */
#ifndef _XFUNCPROTO_H_#define _XFUNCPROTO_H_
#ifndef NeedFunctionPrototypes#define NeedFunctionPrototypes 1#endif /* NeedFunctionPrototypes */
#ifndef NeedVarargsPrototypes#define NeedVarargsPrototypes 1#endif /* NeedVarargsPrototypes */
#if NeedFunctionPrototypes
#ifndef NeedNestedPrototypes#define NeedNestedPrototypes 1#endif /* NeedNestedPrototypes */
#ifndef _Xconst#define _Xconst const#endif /* _Xconst */
/* Function prototype configuration (see configure for more info) */#if !defined(NARROWPROTO) && \ (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__))#define NARROWPROTO#endif#ifndef FUNCPROTO#define FUNCPROTO 15#endif
#ifndef NeedWidePrototypes#ifdef NARROWPROTO#define NeedWidePrototypes 0#else#define NeedWidePrototypes 1 /* default to make interropt. easier */#endif#endif /* NeedWidePrototypes */
#endif /* NeedFunctionPrototypes */
#ifndef _XFUNCPROTOBEGIN#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */#define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */#define _XFUNCPROTOEND }#else#define _XFUNCPROTOBEGIN#define _XFUNCPROTOEND#endif#endif /* _XFUNCPROTOBEGIN */
/* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute */#ifndef __has_attribute# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */#endif#ifndef __has_feature# define __has_feature(x) 0 /* Compatibility with non-clang compilers. */#endif#ifndef __has_extension# define __has_extension(x) 0 /* Compatibility with non-clang compilers. */#endif
/* Added in X11R6.9, so available in any version of modular xproto */#if __has_attribute(__sentinel__) || (defined(__GNUC__) && (__GNUC__ >= 4))# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))#else# define _X_SENTINEL(x)#endif /* GNUC >= 4 */
/* Added in X11R6.9, so available in any version of modular xproto */#if (__has_attribute(visibility) || (defined(__GNUC__) && (__GNUC__ >= 4))) \ && !defined(__CYGWIN__) && !defined(__MINGW32__)# define _X_EXPORT __attribute__((visibility("default")))# define _X_HIDDEN __attribute__((visibility("hidden")))# define _X_INTERNAL __attribute__((visibility("internal")))#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)# define _X_EXPORT __global# define _X_HIDDEN __hidden# define _X_INTERNAL __hidden#else /* not gcc >= 4 and not Sun Studio >= 8 */# define _X_EXPORT# define _X_HIDDEN# define _X_INTERNAL#endif /* GNUC >= 4 */
/* Branch prediction hints for individual conditionals *//* requires xproto >= 7.0.9 */#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)# define _X_LIKELY(x) __builtin_expect(!!(x), 1)# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)#else /* not gcc >= 3.3 */# define _X_LIKELY(x) (x)# define _X_UNLIKELY(x) (x)#endif
/* Bulk branch prediction hints via marking error path functions as "cold" *//* requires xproto >= 7.0.25 */#if __has_attribute(__cold__) || \ (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)) /* 4.3+ */# define _X_COLD __attribute__((__cold__))#else# define _X_COLD /* nothing */#endif
/* Added in X11R6.9, so available in any version of modular xproto */#if __has_attribute(deprecated) \ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)) \ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5130))# define _X_DEPRECATED __attribute__((deprecated))#else /* not gcc >= 3.1 */# define _X_DEPRECATED#endif
/* requires xproto >= 7.0.30 */#if __has_extension(attribute_deprecated_with_message) || \ (defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))# define _X_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg)))#else# define _X_DEPRECATED_MSG(_msg) _X_DEPRECATED#endif
/* requires xproto >= 7.0.17 */#if __has_attribute(noreturn) \ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))# define _X_NORETURN __attribute((noreturn))#else# define _X_NORETURN#endif /* GNUC */
/* Added in X11R6.9, so available in any version of modular xproto */#if __has_attribute(__format__) \ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))#else /* not gcc >= 2.3 */# define _X_ATTRIBUTE_PRINTF(x,y)#endif
/* requires xproto >= 7.0.22 */#if __has_attribute(__unused__) \ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)#define _X_UNUSED __attribute__((__unused__))#else#define _X_UNUSED /* */#endif
/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers *//* requires xproto >= 7.0.9 (introduced in 7.0.8 but didn't support all compilers until 7.0.9) */#if defined(inline) /* assume autoconf set it correctly */ || \ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \ (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))# define _X_INLINE inline#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */# define _X_INLINE __inline__#else# define _X_INLINE#endif
/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers *//* requires xproto >= 7.0.21 */#ifndef _X_RESTRICT_KYWD# if defined(restrict) /* assume autoconf set it correctly */ || \ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ \ && !defined(__cplusplus)) /* Workaround g++ issue on Solaris */# define _X_RESTRICT_KYWD restrict# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */# define _X_RESTRICT_KYWD __restrict__# else# define _X_RESTRICT_KYWD# endif#endif
/* requires xproto >= 7.0.30 */#if __has_attribute(no_sanitize_thread)# define _X_NOTSAN __attribute__((no_sanitize_thread))#else# define _X_NOTSAN#endif
/* Mark a char array/pointer as not containing a NUL-terminated string *//* requires xproto >= 7.0.33 */#if __has_attribute(nonstring)# define _X_NONSTRING __attribute__((nonstring))#else# define _X_NONSTRING#endif
#endif /* _XFUNCPROTO_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869/* *Copyright 1990, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group. * */
#ifndef _XFUNCS_H_# define _XFUNCS_H_
# include <X11/Xosdefs.h>
/* the old Xfuncs.h, for pre-R6 */# if !(defined(XFree86LOADER) && defined(IN_MODULE))
# ifdef X_USEBFUNCSvoid bcopy();void bzero();int bcmp();# else# if defined(SYSV) && !defined(__SCO__) && !defined(__sun) && !defined(__UNIXWARE__) && !defined(_AIX)# include <memory.h>void bcopy();# define bzero(b,len) memset(b, 0, len)# define bcmp(b1,b2,len) memcmp(b1, b2, len)# else# include <string.h># if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)# include <strings.h># endif# define _XFUNCS_H_INCLUDED_STRING_H# endif# endif /* X_USEBFUNCS */
/* the new Xfuncs.h */
/* the ANSI C way */# ifndef _XFUNCS_H_INCLUDED_STRING_H# include <string.h># endif# undef bzero# define bzero(b,len) memset(b,0,len)
# if defined WIN32 && defined __MINGW32__# define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))# endif
# endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
#endif /* _XFUNCS_H_ */1234567891011121314151617181920/* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett * This file is licensed under the MIT license. See the file COPYING. */
#ifndef _X11_XLIB_XCB_H_#define _X11_XLIB_XCB_H_
#include <xcb/xcb.h>#include <X11/Xlib.h>#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
xcb_connection_t *XGetXCBConnection(Display *dpy);
enum XEventQueueOwner { XlibOwnsEventQueue = 0, XCBOwnsEventQueue };void XSetEventQueueOwner(Display *dpy, enum XEventQueueOwner owner);
_XFUNCPROTOEND
#endif /* _X11_XLIB_XCB_H_ */1234567891011121314151617181920212223242526272829303132333435363738/* include/X11/XlibConf.h. Generated from XlibConf.h.in by configure. *//* * Copyright © 2005 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY 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 THIS SOFTWARE. */
#ifndef _XLIBCONF_H_#define _XLIBCONF_H_/* * This header file exports defines necessary to correctly * use Xlibint.h both inside Xlib and by external libraries * such as extensions. */
/* Threading support? */#define XTHREADS 1
/* Use multi-threaded libc functions? */#define XUSE_MTSAFE_API 1
#endif /* _XLIBCONF_H_ */1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444
/*
Copyright 1984, 1985, 1987, 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OROTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shallnot be used in advertising or otherwise to promote the sale, use orother dealings in this Software without prior written authorizationfrom The Open Group.
*/
#ifndef _X11_XLIBINT_H_#define _X11_XLIBINT_H_ 1
/* * Xlibint.h - Header definition and support file for the internal * support routines used by the C subroutine interface * library (Xlib) to the X Window System. * * Warning, there be dragons here.... */
#include <stdint.h>#include <X11/Xlib.h>#include <X11/Xproto.h> /* to declare xEvent */#include <X11/XlibConf.h> /* for configured options like XTHREADS */
#ifdef XTHREADS#include <X11/Xthreads.h>#endif
/* The Xlib structs are full of implicit padding to properly align members. We can't clean that up without breaking ABI, so tell clang not to bother complaining about it. */#ifdef __clang__#pragma clang diagnostic push#pragma clang diagnostic ignored "-Wpadded"#endif
#ifdef WIN32#define _XFlush _XFlushIt#endif
struct _XGC{ XExtData *ext_data; /* hook for extension to hang data */ GContext gid; /* protocol ID for graphics context */ Bool rects; /* boolean: TRUE if clipmask is list of rectangles */ Bool dashes; /* boolean: TRUE if dash-list is really a list */ unsigned long dirty;/* cache dirty bits */ XGCValues values; /* shadow structure of values */};
struct _XDisplay{ XExtData *ext_data; /* hook for extension to hang data */ struct _XFreeFuncs *free_funcs; /* internal free functions */ int fd; /* Network socket. */ int conn_checker; /* ugly thing used by _XEventsQueued */ int proto_major_version;/* maj. version of server's X protocol */ int proto_minor_version;/* minor version of server's X protocol */ char *vendor; /* vendor of the server hardware */ XID resource_base; /* resource ID base */ XID resource_mask; /* resource ID mask bits */ XID resource_id; /* allocator current ID */ int resource_shift; /* allocator shift to correct bits */ XID (*resource_alloc)( /* allocator function */ struct _XDisplay* ); int byte_order; /* screen byte order, LSBFirst, MSBFirst */ int bitmap_unit; /* padding and data requirements */ int bitmap_pad; /* padding requirements on bitmaps */ int bitmap_bit_order; /* LeastSignificant or MostSignificant */ int nformats; /* number of pixmap formats in list */ ScreenFormat *pixmap_format; /* pixmap format list */ int vnumber; /* Xlib's X protocol version number. */ int release; /* release of the server */ struct _XSQEvent *head, *tail; /* Input event queue. */ int qlen; /* Length of input event queue */ unsigned long last_request_read; /* seq number of last event read */ unsigned long request; /* sequence number of last request. */ char *last_req; /* beginning of last request, or dummy */ char *buffer; /* Output buffer starting address. */ char *bufptr; /* Output buffer index pointer. */ char *bufmax; /* Output buffer maximum+1 address. */ unsigned max_request_size; /* maximum number 32 bit words in request*/ struct _XrmHashBucketRec *db; int (*synchandler)( /* Synchronization handler */ struct _XDisplay* ); char *display_name; /* "host:display" string used on this connect*/ int default_screen; /* default screen for operations */ int nscreens; /* number of screens on this server*/ Screen *screens; /* pointer to list of screens */ unsigned long motion_buffer; /* size of motion buffer */ volatile unsigned long flags; /* internal connection flags */ int min_keycode; /* minimum defined keycode */ int max_keycode; /* maximum defined keycode */ KeySym *keysyms; /* This server's keysyms */ XModifierKeymap *modifiermap; /* This server's modifier keymap */ int keysyms_per_keycode;/* number of rows */ char *xdefaults; /* contents of defaults from server */ char *scratch_buffer; /* place to hang scratch buffer */ unsigned long scratch_length; /* length of scratch buffer */ int ext_number; /* extension number on this display */ struct _XExten *ext_procs; /* extensions initialized on this display */ /* * the following can be fixed size, as the protocol defines how * much address space is available. * While this could be done using the extension vector, there * may be MANY events processed, so a search through the extension * list to find the right procedure for each event might be * expensive if many extensions are being used. */ Bool (*event_vec[128])( /* vector for wire to event */ Display * /* dpy */, XEvent * /* re */, xEvent * /* event */ ); Status (*wire_vec[128])( /* vector for event to wire */ Display * /* dpy */, XEvent * /* re */, xEvent * /* event */ ); KeySym lock_meaning; /* for XLookupString */ struct _XLockInfo *lock; /* multi-thread state, display lock */ struct _XInternalAsync *async_handlers; /* for internal async */ unsigned long bigreq_size; /* max size of big requests */ struct _XLockPtrs *lock_fns; /* pointers to threads functions */ void (*idlist_alloc)( /* XID list allocator function */ Display * /* dpy */, XID * /* ids */, int /* count */ ); /* things above this line should not move, for binary compatibility */ struct _XKeytrans *key_bindings; /* for XLookupString */ Font cursor_font; /* for XCreateFontCursor */ struct _XDisplayAtoms *atoms; /* for XInternAtom */ unsigned int mode_switch; /* keyboard group modifiers */ unsigned int num_lock; /* keyboard numlock modifiers */ struct _XContextDB *context_db; /* context database */ Bool (**error_vec)( /* vector for wire to error */ Display * /* display */, XErrorEvent * /* he */, xError * /* we */ ); /* * Xcms information */ struct { XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */ XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */ XPointer perVisualIntensityMaps; /* linked list of XcmsIntensityMap */ } cms; struct _XIMFilter *im_filters; struct _XSQEvent *qfree; /* unallocated event queue elements */ unsigned long next_event_serial_num; /* inserted into next queue elt */ struct _XExten *flushes; /* Flush hooks */ struct _XConnectionInfo *im_fd_info; /* _XRegisterInternalConnection */ int im_fd_length; /* number of im_fd_info */ struct _XConnWatchInfo *conn_watchers; /* XAddConnectionWatch */ int watcher_count; /* number of conn_watchers */ XPointer filedes; /* struct pollfd cache for _XWaitForReadable */ int (*savedsynchandler)( /* user synchandler when Xlib usurps */ Display * /* dpy */ ); XID resource_max; /* allocator max ID */ int xcmisc_opcode; /* major opcode for XC-MISC */ struct _XkbInfoRec *xkb_info; /* XKB info */ struct _XtransConnInfo *trans_conn; /* transport connection object */ struct _X11XCBPrivate *xcb; /* XCB glue private data */
/* Generic event cookie handling */ unsigned int next_cookie; /* next event cookie */ /* vector for wire to generic event, index is (extension - 128) */ Bool (*generic_event_vec[128])( Display * /* dpy */, XGenericEventCookie * /* Xlib event */, xEvent * /* wire event */); /* vector for event copy, index is (extension - 128) */ Bool (*generic_event_copy_vec[128])( Display * /* dpy */, XGenericEventCookie * /* in */, XGenericEventCookie * /* out*/); void *cookiejar; /* cookie events returned but not claimed */#ifndef LONG64 unsigned long last_request_read_upper32bit; unsigned long request_upper32bit;#endif
struct _XErrorThreadInfo *error_threads;
XIOErrorExitHandler exit_handler; void *exit_handler_data; CARD32 in_ifevent;#ifdef XTHREADS xthread_t ifevent_thread;#endif};
#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
/* * access "last_request_read" and "request" with 64bit * warning: the value argument of the SET-macros must not * have any side-effects because it may get called twice. */#ifndef LONG64/* accessors for 32-bit unsigned long */
#define X_DPY_GET_REQUEST(dpy) \ ( \ ((uint64_t)(((struct _XDisplay*)dpy)->request)) \ + (((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) << 32) \ )
#define X_DPY_SET_REQUEST(dpy, value) \ ( \ (((struct _XDisplay*)dpy)->request = \ (value) & 0xFFFFFFFFUL), \ (((struct _XDisplay*)dpy)->request_upper32bit = \ ((uint64_t)(value)) >> 32), \ (void)0 /* don't use the result */ \ )
#define X_DPY_GET_LAST_REQUEST_READ(dpy) \ ( \ ((uint64_t)(((struct _XDisplay*)dpy)->last_request_read)) \ + ( \ ((uint64_t)( \ ((struct _XDisplay*)dpy)->last_request_read_upper32bit \ )) << 32 \ ) \ )
#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \ ( \ (((struct _XDisplay*)dpy)->last_request_read = \ (value) & 0xFFFFFFFFUL), \ (((struct _XDisplay*)dpy)->last_request_read_upper32bit = \ ((uint64_t)(value)) >> 32), \ (void)0 /* don't use the result */ \ )
/* * widen a 32-bit sequence number to a 64 sequence number. * This macro makes the following assumptions: * - ulseq refers to a sequence that has already been sent * - ulseq means the most recent possible sequence number * with these lower 32 bits. * * The following optimization is used: * The comparison result is taken a 0 or 1 to avoid a branch. */#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) \ ( \ ((uint64_t)ulseq) \ + \ (( \ ((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) \ - (uint64_t)( \ (ulseq) > (((struct _XDisplay*)dpy)->request) \ ) \ ) << 32) \ )
#define X_DPY_REQUEST_INCREMENT(dpy) \ ( \ ((struct _XDisplay*)dpy)->request++, \ ( \ (((struct _XDisplay*)dpy)->request == 0) ? ( \ ((struct _XDisplay*)dpy)->request_upper32bit++ \ ) : 0 \ ), \ (void)0 /* don't use the result */ \ )
#define X_DPY_REQUEST_DECREMENT(dpy) \ ( \ ( \ (((struct _XDisplay*)dpy)->request == 0) ? (\ ((struct _XDisplay*)dpy)->request--, /* wrap */ \ ((struct _XDisplay*)dpy)->request_upper32bit-- \ ) : ( \ ((struct _XDisplay*)dpy)->request-- \ ) \ ), \ (void)0 /* don't use the result */ \ )
#else/* accessors for 64-bit unsigned long */#define X_DPY_GET_REQUEST(dpy) \ (((struct _XDisplay*)dpy)->request)#define X_DPY_SET_REQUEST(dpy, value) \ ((struct _XDisplay*)dpy)->request = (value)
#define X_DPY_GET_LAST_REQUEST_READ(dpy) \ (((struct _XDisplay*)dpy)->last_request_read)#define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \ ((struct _XDisplay*)dpy)->last_request_read = (value)
#define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) ulseq
#define X_DPY_REQUEST_INCREMENT(dpy) ((struct _XDisplay*)dpy)->request++#define X_DPY_REQUEST_DECREMENT(dpy) ((struct _XDisplay*)dpy)->request--#endif
#ifndef _XEVENT_/* * _QEvent datatype for use in input queueing. */typedef struct _XSQEvent{ struct _XSQEvent *next; XEvent event; unsigned long qserial_num; /* so multi-threaded code can find new ones */} _XQEvent;#endif
#include <X11/Xproto.h>#include <errno.h>#define _XBCOPYFUNC _Xbcopy#include <X11/Xfuncs.h>#include <X11/Xosdefs.h>
/* Utek leaves kernel macros around in include files (bleah) */#ifdef dirty#undef dirty#endif
#include <stdlib.h>#include <string.h>
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
/* * The following definitions can be used for locking requests in multi-threaded * address spaces. */#ifdef XTHREADS/* Author: Stephen Gildea, MIT X Consortium * * declarations for C Threads locking */
typedef struct _LockInfoRec *LockInfoPtr;
/* interfaces for locking.c */struct _XLockPtrs { /* used by all, including extensions; do not move */ void (*lock_display)( Display *dpy#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char *file , int line#endif ); void (*unlock_display)( Display *dpy#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char *file , int line#endif );};
#if defined(WIN32) && !defined(_XLIBINT_)#define _XCreateMutex_fn (*_XCreateMutex_fn_p)#define _XFreeMutex_fn (*_XFreeMutex_fn_p)#define _XLockMutex_fn (*_XLockMutex_fn_p)#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p)#define _Xglobal_lock (*_Xglobal_lock_p)#endif
/* in XlibInt.c */extern void (*_XCreateMutex_fn)( LockInfoPtr /* lock */);extern void (*_XFreeMutex_fn)( LockInfoPtr /* lock */);extern void (*_XLockMutex_fn)( LockInfoPtr /* lock */#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ , int /* line */#endif);extern void (*_XUnlockMutex_fn)( LockInfoPtr /* lock */#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ , int /* line */#endif);
extern LockInfoPtr _Xglobal_lock;
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__)#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)((d),__FILE__,__LINE__)#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock,__FILE__,__LINE__)#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock,__FILE__,__LINE__)#else/* used everywhere, so must be fast if not using threads */#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)(d)#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)(d)#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock)#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock)#endif#define _XCreateMutex(lock) if (_XCreateMutex_fn) (*_XCreateMutex_fn)(lock)#define _XFreeMutex(lock) if (_XFreeMutex_fn) (*_XFreeMutex_fn)(lock)
#else /* XTHREADS */#define LockDisplay(dis)#define _XLockMutex(lock)#define _XUnlockMutex(lock)#define UnlockDisplay(dis)#define _XCreateMutex(lock)#define _XFreeMutex(lock)#endif
#define Xfree(ptr) free((ptr))
/* * Note that some machines do not return a valid pointer for malloc(0), in * which case we provide an alternate under the control of the * define MALLOC_0_RETURNS_NULL. This is necessary because some * Xlib code expects malloc(0) to return a valid pointer to storage. */#if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__)
# define Xmalloc(size) malloc((size_t)((size) == 0 ? 1 : (size)))# define Xrealloc(ptr, size) realloc((ptr), (size_t)((size) == 0 ? 1 : (size)))# define Xcalloc(nelem, elsize) calloc((size_t)((nelem) == 0 ? 1 : (nelem)), (size_t)(elsize))
#else
# define Xmalloc(size) malloc((size_t)(size))# define Xrealloc(ptr, size) realloc((ptr), (size_t)(size))# define Xcalloc(nelem, elsize) calloc((size_t)(nelem), (size_t)(elsize))
#endif
#include <stddef.h>
#define LOCKED 1#define UNLOCKED 0
#ifndef BUFSIZE#define BUFSIZE 2048 /* X output buffer size. */#endif#ifndef PTSPERBATCH#define PTSPERBATCH 1024 /* point batching */#endif#ifndef WLNSPERBATCH#define WLNSPERBATCH 50 /* wide line batching */#endif#ifndef ZLNSPERBATCH#define ZLNSPERBATCH 1024 /* thin line batching */#endif#ifndef WRCTSPERBATCH#define WRCTSPERBATCH 10 /* wide line rectangle batching */#endif#ifndef ZRCTSPERBATCH#define ZRCTSPERBATCH 256 /* thin line rectangle batching */#endif#ifndef FRCTSPERBATCH#define FRCTSPERBATCH 256 /* filled rectangle batching */#endif#ifndef FARCSPERBATCH#define FARCSPERBATCH 256 /* filled arc batching */#endif#ifndef CURSORFONT#define CURSORFONT "cursor" /* standard cursor fonts */#endif
/* * Display flags */#define XlibDisplayIOError (1L << 0)#define XlibDisplayClosing (1L << 1)#define XlibDisplayNoXkb (1L << 2)#define XlibDisplayPrivSync (1L << 3)#define XlibDisplayProcConni (1L << 4) /* in _XProcessInternalConnection */#define XlibDisplayReadEvents (1L << 5) /* in _XReadEvents */#define XlibDisplayReply (1L << 5) /* in _XReply */#define XlibDisplayWriting (1L << 6) /* in _XFlushInt, _XSend */#define XlibDisplayDfltRMDB (1L << 7) /* mark if RM db from XGetDefault */
/* * X Protocol packetizing macros. */
/* Leftover from CRAY support - was defined empty on all non-Cray systems */#define WORD64ALIGN
/** * Return a len-sized request buffer for the request type. This function may * flush the output queue. * * @param dpy The display connection * @param type The request type * @param len Length of the request in bytes * * @returns A pointer to the request buffer with a few default values * initialized. */extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
/* GetReqSized is the same as GetReq but allows the caller to specify the * size in bytes. 'sz' must be a multiple of 4! */
#define GetReqSized(name, sz, req) \ req = (x##name##Req *) _XGetRequest(dpy, X_##name, sz)
/* * GetReq - Get the next available X request packet in the buffer and * return it. * * "name" is the name of the request, e.g. CreatePixmap, OpenFont, etc. * "req" is the name of the request pointer. * */
#define GetReq(name, req) \ GetReqSized(name, SIZEOF(x##name##Req), req)
/* GetReqExtra is the same as GetReq, but allocates "n" additional bytes after the request. "n" must be a multiple of 4! */
#define GetReqExtra(name, n, req) \ GetReqSized(name, SIZEOF(x##name##Req) + n, req)
/* * GetResReq is for those requests that have a resource ID * (Window, Pixmap, GContext, etc.) as their single argument. * "rid" is the name of the resource. */
#define GetResReq(name, rid, req) \ req = (xResourceReq *) _XGetRequest(dpy, X_##name, SIZEOF(xResourceReq)); \ if (req) req->id = (rid)
/* * GetEmptyReq is for those requests that have no arguments * at all. */
#define GetEmptyReq(name, req) \ req = (xReq *) _XGetRequest(dpy, X_##name, SIZEOF(xReq))
/* * MakeBigReq sets the CARD16 "req->length" to 0 and inserts a new CARD32 * length, after req->length, before the data in the request. The new length * includes the "n" extra 32-bit words. * * Do not use MakeBigReq if there is no data already in the request. * req->length must already be >= 2. */#ifdef LONG64#define MakeBigReq(req,n) \ { \ CARD64 _BRdat; \ CARD32 _BRlen = (CARD32) (req->length - 1); \ req->length = 0; \ _BRdat = ((CARD32 *)req)[_BRlen]; \ memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) << 2); \ ((CARD32 *)req)[1] = _BRlen + (CARD32) (n) + 2; \ Data32(dpy, &_BRdat, 4); \ }#else#define MakeBigReq(req,n) \ { \ CARD32 _BRdat; \ CARD32 _BRlen = req->length - 1; \ req->length = 0; \ _BRdat = ((CARD32 *)req)[_BRlen]; \ memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) << 2); \ ((CARD32 *)req)[1] = _BRlen + (CARD32) (n) + 2; \ Data32(dpy, &_BRdat, 4); \ }#endif
/* * SetReqLen increases the count of 32-bit words in the request by "n", * or by "badlen" if "n" is too large. * * Do not use SetReqLen if "req" does not already have data after the * xReq header. req->length must already be >= 2. */#ifndef __clang_analyzer__#define SetReqLen(req,n,badlen) \ if ((req->length + n) > (unsigned)65535) { \ if (dpy->bigreq_size) { \ MakeBigReq(req,n) \ } else { \ n = badlen; \ req->length = (CARD16) (req->length + n); \ } \ } else \ req->length = (CARD16) (req->length + n)#else#define SetReqLen(req,n,badlen) \ req->length += n#endif
#define SyncHandle() \ if (dpy->synchandler) (*dpy->synchandler)(dpy)
extern void _XFlushGCCache(Display *dpy, GC gc);#define FlushGC(dpy, gc) \ if ((gc)->dirty) _XFlushGCCache((dpy), (gc))/* * Data - Place data in the buffer and pad the end to provide * 32 bit word alignment. Transmit if the buffer fills. * * "dpy" is a pointer to a Display. * "data" is a pointer to a data buffer. * "len" is the length of the data buffer. */#ifndef DataRoutineIsProcedure#define Data(dpy, data, len) do {\ if (dpy->bufptr + (len) <= dpy->bufmax) {\ memcpy(dpy->bufptr, data, (size_t)(len));\ dpy->bufptr += ((size_t)((len) + 3) & (size_t)~3);\ } else\ _XSend(dpy, (_Xconst char*)(data), (long)(len));\} while (0)#endif /* DataRoutineIsProcedure */
/* Allocate bytes from the buffer. No padding is done, so if * the length is not a multiple of 4, the caller must be * careful to leave the buffer aligned after sending the * current request. * * "type" is the type of the pointer being assigned to. * "ptr" is the pointer being assigned to. * "n" is the number of bytes to allocate. * * Example: * xTextElt *elt; * BufAlloc (xTextElt *, elt, nbytes) */
#define BufAlloc(type, ptr, n) do { \ if (dpy->bufptr + (n) > dpy->bufmax) \ _XFlush (dpy); \ ptr = (type) dpy->bufptr; \ memset(ptr, '\0', (size_t)(n)); \ dpy->bufptr += (n); \} while (0)
#define Data16(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len))#define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))#define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))#ifdef LONG64#define Data32(dpy, data, len) _XData32(dpy, (_Xconst long *)(data), (unsigned)(len))extern int _XData32( Display *dpy, _Xconst long *data, unsigned len);extern void _XRead32( Display *dpy, long *data, long len);#else#define Data32(dpy, data, len) Data((dpy), (_Xconst char *)(data), (long)(len))#define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))#endif
#define PackData16(dpy,data,len) Data16 (dpy, data, len)#define PackData32(dpy,data,len) Data32 (dpy, data, len)
/* Xlib manual is bogus */#define PackData(dpy,data,len) PackData16 (dpy, data, len)
#define min(a,b) (((a) < (b)) ? (a) : (b))#define max(a,b) (((a) > (b)) ? (a) : (b))
#define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \ (((cs)->rbearing|(cs)->lbearing| \ (cs)->ascent|(cs)->descent) == 0))
/* * CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit * character. If the character is in the column and exists, then return the * appropriate metrics (note that fonts with common per-character metrics will * return min_bounds). If none of these hold true, try again with the default * char. */#define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \do { \ cs = def; \ if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \ if (fs->per_char == NULL) { \ cs = &fs->min_bounds; \ } else { \ cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \ if (CI_NONEXISTCHAR(cs)) cs = def; \ } \ } \} while (0)
#define CI_GET_DEFAULT_INFO_1D(fs,cs) \ CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs)
/* * CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and * column. This is used for fonts that have more than row zero. */#define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \do { \ cs = def; \ if (row >= fs->min_byte1 && row <= fs->max_byte1 && \ col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \ if (fs->per_char == NULL) { \ cs = &fs->min_bounds; \ } else { \ cs = &fs->per_char[((row - fs->min_byte1) * \ (fs->max_char_or_byte2 - \ fs->min_char_or_byte2 + 1)) + \ (col - fs->min_char_or_byte2)]; \ if (CI_NONEXISTCHAR(cs)) cs = def; \ } \ } \} while (0)
#define CI_GET_DEFAULT_INFO_2D(fs,cs) \do { \ unsigned int r = (fs->default_char >> 8); \ unsigned int c = (fs->default_char & 0xff); \ CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \} while (0)
/* srcvar must be a variable for large architecture version */#define OneDataCard32(dpy,dstaddr,srcvar) \ do { *(CARD32 *)(dstaddr) = (srcvar); } while (0)
typedef struct _XInternalAsync { struct _XInternalAsync *next; /* * handler arguments: * rep is the generic reply that caused this handler * to be invoked. It must also be passed to _XGetAsyncReply. * buf and len are opaque values that must be passed to * _XGetAsyncReply or _XGetAsyncData. * data is the closure stored in this struct. * The handler returns True iff it handled this reply. */ Bool (*handler)( Display* /* dpy */, xReply* /* rep */, char* /* buf */, int /* len */, XPointer /* data */ ); XPointer data;} _XAsyncHandler;
/* * This struct is part of the ABI and is defined by value * in user-code. This means that we cannot make * the sequence-numbers 64bit. */typedef struct _XAsyncEState { unsigned long min_sequence_number; unsigned long max_sequence_number; unsigned char error_code; unsigned char major_opcode; unsigned short minor_opcode; unsigned char last_error_received; int error_count;} _XAsyncErrorState;
extern void _XDeqAsyncHandler(Display *dpy, _XAsyncHandler *handler);#define DeqAsyncHandler(dpy,handler) do { \ if (dpy->async_handlers == (handler)) \ dpy->async_handlers = (handler)->next; \ else \ _XDeqAsyncHandler(dpy, handler); \ } while (0)
typedef void (*FreeFuncType) ( Display* /* display */);
typedef int (*FreeModmapType) ( XModifierKeymap* /* modmap */);
/* * This structure is private to the library. */typedef struct _XFreeFuncs { FreeFuncType atoms; /* _XFreeAtomTable */ FreeModmapType modifiermap; /* XFreeModifiermap */ FreeFuncType key_bindings; /* _XFreeKeyBindings */ FreeFuncType context_db; /* _XFreeContextDB */ FreeFuncType defaultCCCs; /* _XcmsFreeDefaultCCCs */ FreeFuncType clientCmaps; /* _XcmsFreeClientCmaps */ FreeFuncType intensityMaps; /* _XcmsFreeIntensityMaps */ FreeFuncType im_filters; /* _XFreeIMFilters */ FreeFuncType xkb; /* _XkbFreeInfo */} _XFreeFuncRec;
/* types for InitExt.c */typedef int (*CreateGCType) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */);
typedef int (*CopyGCType)( Display* /* display */, GC /* gc */, XExtCodes* /* codes */);
typedef int (*FlushGCType) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */);
typedef int (*FreeGCType) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */);
typedef int (*CreateFontType) ( Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */);
typedef int (*FreeFontType) ( Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */);
typedef int (*CloseDisplayType) ( Display* /* display */, XExtCodes* /* codes */);
typedef int (*ErrorType) ( Display* /* display */, xError* /* err */, XExtCodes* /* codes */, int* /* ret_code */);
typedef char* (*ErrorStringType) ( Display* /* display */, int /* code */, XExtCodes* /* codes */, char* /* buffer */, int /* nbytes */);
typedef void (*PrintErrorType)( Display* /* display */, XErrorEvent* /* ev */, void* /* fp */);
typedef void (*BeforeFlushType)( Display* /* display */, XExtCodes* /* codes */, _Xconst char* /* data */, long /* len */);
/* * This structure is private to the library. */typedef struct _XExten { /* private to extension mechanism */ struct _XExten *next; /* next in list */ XExtCodes codes; /* public information, all extension told */ CreateGCType create_GC; /* routine to call when GC created */ CopyGCType copy_GC; /* routine to call when GC copied */ FlushGCType flush_GC; /* routine to call when GC flushed */ FreeGCType free_GC; /* routine to call when GC freed */ CreateFontType create_Font; /* routine to call when Font created */ FreeFontType free_Font; /* routine to call when Font freed */ CloseDisplayType close_display; /* routine to call when connection closed */ ErrorType error; /* who to call when an error occurs */ ErrorStringType error_string; /* routine to supply error string */ char *name; /* name of this extension */ PrintErrorType error_values; /* routine to supply error values */ BeforeFlushType before_flush; /* routine to call when sending data */ struct _XExten *next_flush; /* next in list of those with flushes */} _XExtension;
/* extension hooks */
#ifdef DataRoutineIsProcedureextern void Data(Display *dpy, char *data, long len);#endifextern int _XError( Display* /* dpy */, xError* /* rep */);extern int _XIOError( Display* /* dpy */);extern int (*_XIOErrorFunction)( Display* /* dpy */);extern int (*_XErrorFunction)( Display* /* dpy */, XErrorEvent* /* error_event */);extern void _XEatData( Display* /* dpy */, unsigned long /* n */) _X_COLD;extern void _XEatDataWords( Display* /* dpy */, unsigned long /* n */) _X_COLD;#if defined(__SUNPRO_C) /* Studio compiler alternative to "cold" attribute */# pragma rarely_called(_XEatData, _XEatDataWords)#endifextern char *_XAllocScratch( Display* /* dpy */, unsigned long /* nbytes */);extern char *_XAllocTemp( Display* /* dpy */, unsigned long /* nbytes */);extern void _XFreeTemp( Display* /* dpy */, char* /* buf */, unsigned long /* nbytes */);extern Visual *_XVIDtoVisual( Display* /* dpy */, VisualID /* id */);extern unsigned long _XSetLastRequestRead( Display* /* dpy */, xGenericReply* /* rep */);extern int _XGetHostname( char* /* buf */, int /* maxlen */);extern Screen *_XScreenOfWindow( Display* /* dpy */, Window /* w */);extern Bool _XAsyncErrorHandler( Display* /* dpy */, xReply* /* rep */, char* /* buf */, int /* len */, XPointer /* data */);extern char *_XGetAsyncReply( Display* /* dpy */, char* /* replbuf */, xReply* /* rep */, char* /* buf */, int /* len */, int /* extra */, Bool /* discard */);extern void _XGetAsyncData( Display* /* dpy */, char * /* data */, char * /* buf */, int /* len */, int /* skip */, int /* datalen */, int /* discardtotal */);extern void _XFlush( Display* /* dpy */);extern int _XEventsQueued( Display* /* dpy */, int /* mode */);extern void _XReadEvents( Display* /* dpy */);extern int _XRead( Display* /* dpy */, char* /* data */, long /* size */);extern void _XReadPad( Display* /* dpy */, char* /* data */, long /* size */);extern void _XSend( Display* /* dpy */, _Xconst char* /* data */, long /* size */);extern Status _XReply( Display* /* dpy */, xReply* /* rep */, int /* extra */, Bool /* discard */);extern void _XEnq( Display* /* dpy */, xEvent* /* event */);extern void _XDeq( Display* /* dpy */, _XQEvent* /* prev */, _XQEvent* /* qelt */);
extern Bool _XUnknownWireEvent( Display* /* dpy */, XEvent* /* re */, xEvent* /* event */);
extern Bool _XUnknownWireEventCookie( Display* /* dpy */, XGenericEventCookie* /* re */, xEvent* /* event */);
extern Bool _XUnknownCopyEventCookie( Display* /* dpy */, XGenericEventCookie* /* in */, XGenericEventCookie* /* out */);
extern Status _XUnknownNativeEvent( Display* /* dpy */, XEvent* /* re */, xEvent* /* event */);
extern Bool _XWireToEvent(Display *dpy, XEvent *re, xEvent *event);extern Bool _XDefaultWireError(Display *display, XErrorEvent *he, xError *we);extern Bool _XPollfdCacheInit(Display *dpy);extern void _XPollfdCacheAdd(Display *dpy, int fd);extern void _XPollfdCacheDel(Display *dpy, int fd);extern XID _XAllocID(Display *dpy);extern void _XAllocIDs(Display *dpy, XID *ids, int count);
extern int _XFreeExtData( XExtData* /* extension */);
extern int (*XESetCreateGC( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ) /* proc */))( Display*, GC, XExtCodes*);
extern int (*XESetCopyGC( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ) /* proc */))( Display*, GC, XExtCodes*);
extern int (*XESetFlushGC( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ) /* proc */))( Display*, GC, XExtCodes*);
extern int (*XESetFreeGC( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ) /* proc */))( Display*, GC, XExtCodes*);
extern int (*XESetCreateFont( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ ) /* proc */))( Display*, XFontStruct*, XExtCodes*);
extern int (*XESetFreeFont( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ ) /* proc */))( Display*, XFontStruct*, XExtCodes*);
extern int (*XESetCloseDisplay( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, XExtCodes* /* codes */ ) /* proc */))( Display*, XExtCodes*);
extern int (*XESetError( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, xError* /* err */, XExtCodes* /* codes */, int* /* ret_code */ ) /* proc */))( Display*, xError*, XExtCodes*, int*);
extern char* (*XESetErrorString( Display* /* display */, int /* extension */, char* (*) ( Display* /* display */, int /* code */, XExtCodes* /* codes */, char* /* buffer */, int /* nbytes */ ) /* proc */))( Display*, int, XExtCodes*, char*, int);
extern void (*XESetPrintErrorValues ( Display* /* display */, int /* extension */, void (*)( Display* /* display */, XErrorEvent* /* ev */, void* /* fp */ ) /* proc */))( Display*, XErrorEvent*, void*);
extern Bool (*XESetWireToEvent( Display* /* display */, int /* event_number */, Bool (*) ( Display* /* display */, XEvent* /* re */, xEvent* /* event */ ) /* proc */))( Display*, XEvent*, xEvent*);
extern Bool (*XESetWireToEventCookie( Display* /* display */, int /* extension */, Bool (*) ( Display* /* display */, XGenericEventCookie* /* re */, xEvent* /* event */ ) /* proc */))( Display*, XGenericEventCookie*, xEvent*);
extern Bool (*XESetCopyEventCookie( Display* /* display */, int /* extension */, Bool (*) ( Display* /* display */, XGenericEventCookie* /* in */, XGenericEventCookie* /* out */ ) /* proc */))( Display*, XGenericEventCookie*, XGenericEventCookie*);
extern Status (*XESetEventToWire( Display* /* display */, int /* event_number */, Status (*) ( Display* /* display */, XEvent* /* re */, xEvent* /* event */ ) /* proc */))( Display*, XEvent*, xEvent*);
extern Bool (*XESetWireToError( Display* /* display */, int /* error_number */, Bool (*) ( Display* /* display */, XErrorEvent* /* he */, xError* /* we */ ) /* proc */))( Display*, XErrorEvent*, xError*);
extern void (*XESetBeforeFlush( Display* /* display */, int /* error_number */, void (*) ( Display* /* display */, XExtCodes* /* codes */, _Xconst char* /* data */, long /* len */ ) /* proc */))( Display*, XExtCodes*, _Xconst char*, long);
/* internal connections for IMs */
typedef void (*_XInternalConnectionProc)( Display* /* dpy */, int /* fd */, XPointer /* call_data */);
extern Status _XRegisterInternalConnection( Display* /* dpy */, int /* fd */, _XInternalConnectionProc /* callback */, XPointer /* call_data */);
extern void _XUnregisterInternalConnection( Display* /* dpy */, int /* fd */);
extern void _XProcessInternalConnection( Display* /* dpy */, struct _XConnectionInfo* /* conn_info */);
/* Display structure has pointers to these */
struct _XConnectionInfo { /* info from _XRegisterInternalConnection */ int fd; _XInternalConnectionProc read_callback; XPointer call_data; XPointer *watch_data; /* set/used by XConnectionWatchProc */ struct _XConnectionInfo *next;};
struct _XConnWatchInfo { /* info from XAddConnectionWatch */ XConnectionWatchProc fn; XPointer client_data; struct _XConnWatchInfo *next;};
extern int _XTextHeight( XFontStruct* /* font_struct */, _Xconst char* /* string */, int /* count */);
extern int _XTextHeight16( XFontStruct* /* font_struct */, _Xconst XChar2b* /* string */, int /* count */);
#if defined(WIN32)
extern int _XOpenFile( _Xconst char* /* path */, int /* flags */);
extern int _XOpenFileMode( _Xconst char* /* path */, int /* flags */, mode_t /* mode */);
extern void* _XFopenFile( _Xconst char* /* path */, _Xconst char* /* mode */);
extern int _XAccessFile( _Xconst char* /* path */);#else#define _XOpenFile(path,flags) open(path,flags)#define _XOpenFileMode(path,flags,mode) open(path,flags,mode)#define _XFopenFile(path,mode) fopen(path,mode)#endif
/* EvToWire.c */extern Status _XEventToWire(Display *dpy, XEvent *re, xEvent *event);
extern int _XF86LoadQueryLocaleFont( Display* /* dpy */, _Xconst char* /* name*/, XFontStruct** /* xfp*/, Font* /* fidp */);
extern void _XProcessWindowAttributes ( Display *dpy, xChangeWindowAttributesReq *req, unsigned long valuemask, XSetWindowAttributes *attributes);
extern int _XDefaultError( Display *dpy, XErrorEvent *event);
extern int _XDefaultIOError( Display *dpy);
extern void _XDefaultIOErrorExit( Display *dpy, void *user_data);
extern void _XSetClipRectangles ( Display *dpy, GC gc, int clip_x_origin, int clip_y_origin, XRectangle *rectangles, int n, int ordering);
Status _XGetWindowAttributes( Display *dpy, Window w, XWindowAttributes *attr);
int _XPutBackEvent ( Display *dpy, XEvent *event);
extern Bool _XIsEventCookie( Display *dpy, XEvent *ev);
extern void _XFreeEventCookies( Display *dpy);
extern void _XStoreEventCookie( Display *dpy, XEvent *ev);
extern Bool _XFetchEventCookie( Display *dpy, XGenericEventCookie *ev);
extern Bool _XCopyEventCookie( Display *dpy, XGenericEventCookie *in, XGenericEventCookie *out);
/* lcFile.c */
extern void xlocaledir( char *buf, int buf_len);
#ifdef __clang__#pragma clang diagnostic pop#endif
_XFUNCPROTOEND
#endif /* _X11_XLIBINT_H_ */12345678910111213141516171819202122232425262728293031323334353637/*
Copyright 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OROTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shallnot be used in advertising or otherwise to promote the sale, use orother dealings in this Software without prior written authorizationfrom The Open Group.
*/
#ifndef _X11_XLOCALE_H_#define _X11_XLOCALE_H_
#include <X11/Xfuncproto.h>#include <X11/Xosdefs.h>
#include <locale.h>
#endif /* _X11_XLOCALE_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146/***********************************************************
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting 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.
******************************************************************/#ifndef XMD_H# define XMD_H 1/* * Xmd.h: MACHINE DEPENDENT DECLARATIONS. */
/* * Special per-machine configuration flags. */# if defined(__sun) && defined(__SVR4)# include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */# endif
#if defined(__SIZEOF_LONG__)# if __SIZEOF_LONG__ == 8# define LONG64 /* 32/64-bit architecture */# endif# elif defined (_LP64) || defined(__LP64__) || \ defined(__alpha) || defined(__alpha__) || \ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \ defined(__s390x__) || \ defined(__amd64__) || defined(amd64) || \ defined(__powerpc64__)# if !defined(__ILP32__) /* amd64-x32 is 32bit */# define LONG64 /* 32/64-bit architecture */# endif /* !__ILP32__ */# endif
/* * Definition of macro used to set constants for size of network structures; * machines with preprocessors that can't handle all of the sz_ symbols * can define this macro to be sizeof(x) if and only if their compiler doesn't * pad out structures (esp. the xTextElt structure which contains only two * one-byte fields). Network structures should always define sz_symbols. * * The sz_ prefix is used instead of something more descriptive so that the * symbols are no more than 32 characters long (which causes problems for some * compilers and preprocessors). * * The extra indirection is to get macro arguments to expand correctly before * the concatenation, rather than afterward. */# define _SIZEOF(x) sz_##x# define SIZEOF(x) _SIZEOF(x)
/* * Bitfield suffixes for the protocol structure elements, if you * need them. Note that bitfields are not guaranteed to be signed * (or even unsigned) according to ANSI C. */# define B32 /* bitfield not needed on architectures with native 32-bit type */# define B16 /* bitfield not needed on architectures with native 16-bit type */# ifdef LONG64typedef long INT64;typedef int INT32;# elsetypedef long INT32;# endiftypedef short INT16;
typedef signed char INT8;
# ifdef LONG64typedef unsigned long CARD64;typedef unsigned int CARD32;# elsetypedef unsigned long long CARD64;typedef unsigned long CARD32;# endiftypedef unsigned short CARD16;typedef unsigned char CARD8;
typedef CARD32 BITS32;typedef CARD16 BITS16;
typedef CARD8 BYTE;typedef CARD8 BOOL;
/* * was definitions for sign-extending bitfields on architectures without * native types smaller than 64-bit, now just backwards compatibility */# define cvtINT8toInt(val) (val)# define cvtINT16toInt(val) (val)# define cvtINT32toInt(val) (val)# define cvtINT8toShort(val) (val)# define cvtINT16toShort(val) (val)# define cvtINT32toShort(val) (val)# define cvtINT8toLong(val) (val)# define cvtINT16toLong(val) (val)# define cvtINT32toLong(val) (val)
/* * this version should leave result of type (t *), but that should only be * used when not in MUSTCOPY */# define NEXTPTR(p,t) (((t *)(p)) + 1)
#endif /* XMD_H */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148/* *Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group. * * The X Window System is a Trademark of The Open Group. * */
/* This is a collection of things to try and minimize system dependencies * in a "significant" number of source files. */
#ifndef _XOS_H_# define _XOS_H_
# include <X11/Xosdefs.h>
/* * Get major data types (esp. caddr_t) */
# include <sys/types.h>
# if defined(__SCO__) || defined(__UNIXWARE__)# include <stdint.h># endif
/* * Just about everyone needs the strings routines. We provide both forms here, * index/rindex and strchr/strrchr, so any systems that don't provide them all * need to have #defines here. * * These macros are defined this way, rather than, e.g.: * #defined index(s,c) strchr(s,c) * because someone might be using them as function pointers, and such * a change would break compatibility for anyone who's relying on them * being the way they currently are. So we're stuck with them this way, * which can be really inconvenient. :-( */
# include <string.h># if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)# include <strings.h># else# ifndef index# define index(s,c) (strchr((s),(c)))# endif# ifndef rindex# define rindex(s,c) (strrchr((s),(c)))# endif# endif
/* * Get open(2) constants */# if defined(X_NOT_POSIX)# include <fcntl.h># if defined(USL) || defined(__i386__) && (defined(SYSV) || defined(SVR4))# include <unistd.h># endif# ifdef WIN32# include <X11/Xw32defs.h># else# include <sys/file.h># endif# else /* X_NOT_POSIX */# include <fcntl.h># include <unistd.h># endif /* X_NOT_POSIX else */
/* * Get struct timeval and struct tm */
# if defined(_POSIX_SOURCE) && defined(SVR4)/* need to omit _POSIX_SOURCE in order to get what we want in SVR4 */# undef _POSIX_SOURCE# include <sys/time.h># define _POSIX_SOURCE# elif defined(WIN32)# include <time.h># if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL)struct timeval { long tv_sec; /* seconds */ long tv_usec; /* and microseconds */};# define _TIMEVAL_DEFINED# endif# include <sys/timeb.h># define gettimeofday(t) \{ \ struct _timeb _gtodtmp; \ _ftime (&_gtodtmp); \ (t)->tv_sec = _gtodtmp.time; \ (t)->tv_usec = _gtodtmp.millitm * 1000; \}# else# include <sys/time.h># include <time.h># endif /* defined(_POSIX_SOURCE) && defined(SVR4) */
/* define X_GETTIMEOFDAY macro, a portable gettimeofday() */# if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */# define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)# else# if defined(SVR4) || defined(__SVR4) || defined(WIN32)# define X_GETTIMEOFDAY(t) gettimeofday(t)# else# define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)# endif# endif /* XPG4 else */
# ifdef __GNU__# define PATH_MAX 4096# define MAXPATHLEN 4096# define OPEN_MAX 256 /* We define a reasonable limit. */# endif
/* use POSIX name for signal */# if defined(X_NOT_POSIX) && defined(SYSV) && !defined(SIGCHLD)# define SIGCHLD SIGCLD# endif
# include <X11/Xarch.h>
#endif /* _XOS_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095/*Copyright 1996, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.*/
/* * Various and sundry Thread-Safe functions used by X11, Motif, and CDE. * * Use this file in MT-safe code where you would have included * <dirent.h> for readdir() * <grp.h> for getgrgid() or getgrnam() * <netdb.h> for gethostbyname(), gethostbyaddr(), or getservbyname() * <pwd.h> for getpwnam() or getpwuid() * <string.h> for strtok() * <time.h> for asctime(), ctime(), localtime(), or gmtime() * <unistd.h> for getlogin() or ttyname() * or their thread-safe analogs. * * If you are on a platform that defines XTHREADS but does not have * MT-safe system API (e.g. UnixWare) you must define _Xos_processLock * and _Xos_processUnlock macros before including this header. * * For convenience XOS_USE_XLIB_LOCKING or XOS_USE_XT_LOCKING may be defined * to obtain either Xlib-only or Xt-based versions of these macros. These * macros won't result in truly thread-safe calls, but they are better than * nothing. If you do not want locking in this situation define * XOS_USE_NO_LOCKING. * * NOTE: On systems lacking appropriate _r functions Gethostbyname(), * Gethostbyaddr(), and Getservbyname() do NOT copy the host or * protocol lists! * * NOTE: On systems lacking appropriate _r functions Getgrgid() and * Getgrnam() do NOT copy the list of group members! * * This header is nominally intended to simplify porting X11, Motif, and * CDE; it may be useful to other people too. The structure below is * complicated, mostly because P1003.1c (the IEEE POSIX Threads spec) * went through lots of drafts, and some vendors shipped systems based * on draft API that were changed later. Unfortunately POSIX did not * provide a feature-test macro for distinguishing each of the drafts. */
/* * This header has several parts. Search for "Effective prototypes" * to locate the beginning of a section. */
/* This header can be included multiple times with different defines! */#ifndef _XOS_R_H_# define _XOS_R_H_
# include <X11/Xos.h># include <X11/Xfuncs.h>
# ifndef X_NOT_POSIX# ifdef _POSIX_SOURCE# include <limits.h># else# define _POSIX_SOURCE# include <limits.h># undef _POSIX_SOURCE# endif# ifndef LINE_MAX# define X_LINE_MAX 2048# else# define X_LINE_MAX LINE_MAX# endif# endif#endif /* _XOS_R_H */
#ifndef WIN32
#ifdef __cplusplusextern "C" {#endif
# if defined(XOS_USE_XLIB_LOCKING)# ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */typedef struct _LockInfoRec *LockInfoPtr;extern LockInfoPtr _Xglobal_lock;# endif# ifndef _Xos_isThreadInitialized# define _Xos_isThreadInitialized (_Xglobal_lock)# endif# if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)# ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */# include <X11/Xfuncproto.h> /* for NeedFunctionPrototypes */extern void (*_XLockMutex_fn)(# if NeedFunctionPrototypes LockInfoPtr /* lock */, char * /* file */, int /* line */# endif);extern void (*_XUnlockMutex_fn)(# if NeedFunctionPrototypes LockInfoPtr /* lock */, char * /* file */, int /* line */# endif);# endif# ifndef _Xos_processLock# define _Xos_processLock \ (_XLockMutex_fn ? (*_XLockMutex_fn)(_Xglobal_lock,__FILE__,__LINE__) : 0)# endif# ifndef _Xos_processUnlock# define _Xos_processUnlock \ (_XUnlockMutex_fn ? (*_XUnlockMutex_fn)(_Xglobal_lock,__FILE__,__LINE__) : 0)# endif# else# ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */# include <X11/Xfuncproto.h> /* for NeedFunctionPrototypes */extern void (*_XLockMutex_fn)(# if NeedFunctionPrototypes LockInfoPtr /* lock */# endif);extern void (*_XUnlockMutex_fn)(# if NeedFunctionPrototypes LockInfoPtr /* lock */# endif);# endif# ifndef _Xos_processLock# define _Xos_processLock \ (_XLockMutex_fn ? ((*_XLockMutex_fn)(_Xglobal_lock), 0) : 0)# endif# ifndef _Xos_processUnlock# define _Xos_processUnlock \ (_XUnlockMutex_fn ? ((*_XUnlockMutex_fn)(_Xglobal_lock), 0) : 0)# endif# endif# elif defined(XOS_USE_XT_LOCKING)# ifndef _XtThreadsI_hextern void (*_XtProcessLock)(void);# endif# ifndef _XtintrinsicP_h# include <X11/Xfuncproto.h> /* for NeedFunctionPrototypes */extern void XtProcessLock(# if NeedFunctionPrototypes void# endif);extern void XtProcessUnlock(# if NeedFunctionPrototypes void# endif);# endif# ifndef _Xos_isThreadInitialized# define _Xos_isThreadInitialized _XtProcessLock# endif# ifndef _Xos_processLock# define _Xos_processLock XtProcessLock()# endif# ifndef _Xos_processUnlock# define _Xos_processUnlock XtProcessUnlock()# endif# elif defined(XOS_USE_NO_LOCKING)# ifndef _Xos_isThreadInitialized# define _Xos_isThreadInitialized 0# endif# ifndef _Xos_processLock# define _Xos_processLock 0# endif# ifndef _Xos_processUnlock# define _Xos_processUnlock 0# endif# endif
#endif /* !defined WIN32 */
/* * Solaris defines the POSIX thread-safe feature test macro, but * uses the older SVR4 thread-safe functions unless the POSIX ones * are specifically requested. Fix the feature test macro. */#if defined(__sun) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && \ (_POSIX_C_SOURCE - 0 < 199506L) && !defined(_POSIX_PTHREAD_SEMANTICS)# undef _POSIX_THREAD_SAFE_FUNCTIONS#endif
/***** <pwd.h> wrappers *****/
/* * Effective prototypes for <pwd.h> wrappers: * * #define X_INCLUDE_PWD_H * #define XOS_USE_..._LOCKING * #include <X11/Xos_r.h> * * typedef ... _Xgetpwparams; * * struct passwd* _XGetpwnam(const char *name, _Xgetpwparams); * struct passwd* _XGetpwuid(uid_t uid, _Xgetpwparams); */
#if defined(X_INCLUDE_PWD_H) && !defined(_XOS_INCLUDED_PWD_H)# include <pwd.h># if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_PWDAPI)# define XOS_USE_MTSAFE_PWDAPI 1# endif#endif
#undef X_NEEDS_PWPARAMS#if !defined(X_INCLUDE_PWD_H) || defined(_XOS_INCLUDED_PWD_H)/* Do nothing */
#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)/* Use regular, unsafe API. */# if defined(X_NOT_POSIX) && !defined(__i386__) && !defined(SYSV)extern struct passwd *getpwuid(), *getpwnam();# endiftypedef int _Xgetpwparams; /* dummy */# define _XGetpwuid(u,p) getpwuid((u))# define _XGetpwnam(u,p) getpwnam((u))
#elif !defined(XOS_USE_MTSAFE_PWDAPI) || defined(XNO_MTSAFE_PWDAPI)/* UnixWare 2.0, or other systems with thread support but no _r API. */# define X_NEEDS_PWPARAMStypedef struct { struct passwd pws; char pwbuf[1024]; struct passwd* pwp; size_t len;} _Xgetpwparams;
/* * NetBSD and FreeBSD, at least, are missing several of the unixware passwd * fields. */
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ defined(__APPLE__) || defined(__DragonFly__)static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p){ memcpy(&(p).pws, (p).pwp, sizeof(struct passwd));
(p).pws.pw_name = (p).pwbuf; (p).len = strlen((p).pwp->pw_name); strcpy((p).pws.pw_name, (p).pwp->pw_name);
(p).pws.pw_passwd = (p).pws.pw_name + (p).len + 1; (p).len = strlen((p).pwp->pw_passwd); strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd);
(p).pws.pw_class = (p).pws.pw_passwd + (p).len + 1; (p).len = strlen((p).pwp->pw_class); strcpy((p).pws.pw_class, (p).pwp->pw_class);
(p).pws.pw_gecos = (p).pws.pw_class + (p).len + 1; (p).len = strlen((p).pwp->pw_gecos); strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos);
(p).pws.pw_dir = (p).pws.pw_gecos + (p).len + 1; (p).len = strlen((p).pwp->pw_dir); strcpy((p).pws.pw_dir, (p).pwp->pw_dir);
(p).pws.pw_shell = (p).pws.pw_dir + (p).len + 1; (p).len = strlen((p).pwp->pw_shell); strcpy((p).pws.pw_shell, (p).pwp->pw_shell);
(p).pwp = &(p).pws;}
#else# define _Xpw_copyPasswd(p) \ (memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)), \ ((p).pws.pw_name = (p).pwbuf), \ ((p).len = strlen((p).pwp->pw_name)), \ strcpy((p).pws.pw_name, (p).pwp->pw_name), \ ((p).pws.pw_passwd = (p).pws.pw_name + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_passwd)), \ strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd), \ ((p).pws.pw_age = (p).pws.pw_passwd + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_age)), \ strcpy((p).pws.pw_age, (p).pwp->pw_age), \ ((p).pws.pw_comment = (p).pws.pw_age + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_comment)), \ strcpy((p).pws.pw_comment, (p).pwp->pw_comment), \ ((p).pws.pw_gecos = (p).pws.pw_comment + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_gecos)), \ strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos), \ ((p).pws.pw_dir = (p).pws.pw_comment + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_dir)), \ strcpy((p).pws.pw_dir, (p).pwp->pw_dir), \ ((p).pws.pw_shell = (p).pws.pw_dir + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_shell)), \ strcpy((p).pws.pw_shell, (p).pwp->pw_shell), \ ((p).pwp = &(p).pws), \ 0 )#endif# define _XGetpwuid(u,p) \( (_Xos_processLock), \ (((p).pwp = getpwuid((u))) ? _Xpw_copyPasswd(p), 0 : 0), \ (_Xos_processUnlock), \ (p).pwp )# define _XGetpwnam(u,p) \( (_Xos_processLock), \ (((p).pwp = getpwnam((u))) ? _Xpw_copyPasswd(p), 0 : 0), \ (_Xos_processUnlock), \ (p).pwp )
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__)# define X_NEEDS_PWPARAMStypedef struct { struct passwd pws; char pwbuf[X_LINE_MAX];} _Xgetpwparams;# if defined(_POSIX_REENTRANT_FUNCTIONS) || !defined(SVR4)# define _XGetpwuid(u,p) \((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws)# define _XGetpwnam(u,p) \((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws)# else /* SVR4 */# define _XGetpwuid(u,p) \((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == NULL) ? NULL : &(p).pws)# define _XGetpwnam(u,p) \((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == NULL) ? NULL : &(p).pws)# endif /* SVR4 */
#else /* _POSIX_THREAD_SAFE_FUNCTIONS */# define X_NEEDS_PWPARAMStypedef struct { struct passwd pws; char pwbuf[X_LINE_MAX]; struct passwd* pwp;} _Xgetpwparams;typedef int _Xgetpwret;# define _XGetpwuid(u,p) \((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf),&(p).pwp) == 0) ? \ (p).pwp : NULL)# define _XGetpwnam(u,p) \((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf),&(p).pwp) == 0) ? \ (p).pwp : NULL)#endif /* X_INCLUDE_PWD_H */
#if defined(X_INCLUDE_PWD_H) && !defined(_XOS_INCLUDED_PWD_H)# define _XOS_INCLUDED_PWD_H#endif
/***** <netdb.h> wrappers *****/
/* * Effective prototypes for <netdb.h> wrappers: * * NOTE: On systems lacking the appropriate _r functions Gethostbyname(), * Gethostbyaddr(), and Getservbyname() do NOT copy the host or * protocol lists! * * #define X_INCLUDE_NETDB_H * #define XOS_USE_..._LOCKING * #include <X11/Xos_r.h> * * typedef ... _Xgethostbynameparams; * typedef ... _Xgetservbynameparams; * * struct hostent* _XGethostbyname(const char* name,_Xgethostbynameparams); * struct hostent* _XGethostbyaddr(const char* addr, int len, int type, * _Xgethostbynameparams); * struct servent* _XGetservbyname(const char* name, const char* proto, * _Xgetservbynameparams); */
#undef XTHREADS_NEEDS_BYNAMEPARAMS#if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H) \ && !defined(WIN32)# include <netdb.h># if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_NETDBAPI)# define XOS_USE_MTSAFE_NETDBAPI 1# endif#endif
#if !defined(X_INCLUDE_NETDB_H) || defined(_XOS_INCLUDED_NETDB_H)/* Do nothing. */
#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)/* Use regular, unsafe API. */typedef int _Xgethostbynameparams; /* dummy */typedef int _Xgetservbynameparams; /* dummy */# define _XGethostbyname(h,hp) gethostbyname((h))# define _XGethostbyaddr(a,al,t,hp) gethostbyaddr((a),(al),(t))# define _XGetservbyname(s,p,sp) getservbyname((s),(p))
#elif !defined(XOS_USE_MTSAFE_NETDBAPI) || defined(XNO_MTSAFE_NETDBAPI)/* WARNING: The h_addr_list and s_aliases values are *not* copied! */
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)#include <sys/param.h>#endif
typedef struct { struct hostent hent; char h_name[MAXHOSTNAMELEN]; struct hostent *hptr;} _Xgethostbynameparams;typedef struct { struct servent sent; char s_name[255]; char s_proto[255]; struct servent *sptr;} _Xgetservbynameparams;
# define XTHREADS_NEEDS_BYNAMEPARAMS
# define _Xg_copyHostent(hp) \ (memcpy(&(hp).hent, (hp).hptr, sizeof(struct hostent)), \ strcpy((hp).h_name, (hp).hptr->h_name), \ ((hp).hent.h_name = (hp).h_name), \ ((hp).hptr = &(hp).hent), \ 0 )# define _Xg_copyServent(sp) \ (memcpy(&(sp).sent, (sp).sptr, sizeof(struct servent)), \ strcpy((sp).s_name, (sp).sptr->s_name), \ ((sp).sent.s_name = (sp).s_name), \ strcpy((sp).s_proto, (sp).sptr->s_proto), \ ((sp).sent.s_proto = (sp).s_proto), \ ((sp).sptr = &(sp).sent), \ 0 )# define _XGethostbyname(h,hp) \ ((_Xos_processLock), \ (((hp).hptr = gethostbyname((h))) ? _Xg_copyHostent(hp) : 0), \ (_Xos_processUnlock), \ (hp).hptr )# define _XGethostbyaddr(a,al,t,hp) \ ((_Xos_processLock), \ (((hp).hptr = gethostbyaddr((a),(al),(t))) ? _Xg_copyHostent(hp) : 0), \ (_Xos_processUnlock), \ (hp).hptr )# define _XGetservbyname(s,p,sp) \ ((_Xos_processLock), \ (((sp).sptr = getservbyname((s),(p))) ? _Xg_copyServent(sp) : 0), \ (_Xos_processUnlock), \ (sp).sptr )
#elif defined(XUSE_NETDB_R_API)/* * POSIX does not specify _r equivalents for <netdb.h> API, but some * vendors provide them anyway. Use them only when explicitly asked. */# ifdef _POSIX_REENTRANT_FUNCTIONS# ifndef _POSIX_THREAD_SAFE_FUNCTIONS# endif# endif# ifdef _POSIX_THREAD_SAFE_FUNCTIONS# define X_POSIX_THREAD_SAFE_FUNCTIONS 1# endif
# define XTHREADS_NEEDS_BYNAMEPARAMS
# ifndef X_POSIX_THREAD_SAFE_FUNCTIONStypedef struct { struct hostent hent; char hbuf[X_LINE_MAX]; int herr;} _Xgethostbynameparams;typedef struct { struct servent sent; char sbuf[X_LINE_MAX];} _Xgetservbynameparams;# define _XGethostbyname(h,hp) \ gethostbyname_r((h),&(hp).hent,(hp).hbuf,sizeof((hp).hbuf),&(hp).herr)# define _XGethostbyaddr(a,al,t,hp) \ gethostbyaddr_r((a),(al),(t),&(hp).hent,(hp).hbuf,sizeof((hp).hbuf),&(hp).herr)# define _XGetservbyname(s,p,sp) \ getservbyname_r((s),(p),&(sp).sent,(sp).sbuf,sizeof((sp).sbuf))# elsetypedef struct { struct hostent hent; struct hostent_data hdata;} _Xgethostbynameparams;typedef struct { struct servent sent; struct servent_data sdata;} _Xgetservbynameparams;# define _XGethostbyname(h,hp) \ (bzero((char*)&(hp).hdata,sizeof((hp).hdata)), \ ((gethostbyname_r((h),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent))# define _XGethostbyaddr(a,al,t,hp) \ (bzero((char*)&(hp).hdata,sizeof((hp).hdata)), \ ((gethostbyaddr_r((a),(al),(t),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent))# define _XGetservbyname(s,p,sp) \ (bzero((char*)&(sp).sdata,sizeof((sp).sdata)), \ ((getservbyname_r((s),(p),&(sp).sent,&(sp).sdata) == -1) ? NULL : &(sp).sent) )# endif# ifdef X_POSIX_THREAD_SAFE_FUNCTIONS# undef X_POSIX_THREAD_SAFE_FUNCTIONS# endif
#else/* The regular API is assumed to be MT-safe under POSIX. */typedef int _Xgethostbynameparams; /* dummy */typedef int _Xgetservbynameparams; /* dummy */# define _XGethostbyname(h,hp) gethostbyname((h))# define _XGethostbyaddr(a,al,t,hp) gethostbyaddr((a),(al),(t))# define _XGetservbyname(s,p,sp) getservbyname((s),(p))#endif /* X_INCLUDE_NETDB_H */
#if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H)# define _XOS_INCLUDED_NETDB_H#endif
/***** <dirent.h> wrappers *****/
/* * Effective prototypes for <dirent.h> wrappers: * * #define X_INCLUDE_DIRENT_H * #define XOS_USE_..._LOCKING * #include <X11/Xos_r.h> * * typedef ... _Xreaddirparams; * * struct dirent *_XReaddir(DIR *dir_pointer, _Xreaddirparams); */
#if defined(X_INCLUDE_DIRENT_H) && !defined(_XOS_INCLUDED_DIRENT_H)# include <sys/types.h># if !defined(X_NOT_POSIX) || defined(SYSV)# include <dirent.h># else# include <sys/dir.h># ifndef dirent# define dirent direct# endif# endif# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_DIRENTAPI)# define XOS_USE_MTSAFE_DIRENTAPI 1# endif#endif
#if !defined(X_INCLUDE_DIRENT_H) || defined(_XOS_INCLUDED_DIRENT_H)/* Do nothing. */
#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)/* Use regular, unsafe API. */typedef int _Xreaddirparams; /* dummy */# define _XReaddir(d,p) readdir(d)
#elif !defined(XOS_USE_MTSAFE_DIRENTAPI) || defined(XNO_MTSAFE_DIRENTAPI)/* Systems with thread support but no _r API. */typedef struct { struct dirent *result; struct dirent dir_entry;# ifdef _POSIX_PATH_MAX char buf[_POSIX_PATH_MAX];# elif defined(NAME_MAX) char buf[NAME_MAX];# else char buf[255];# endif} _Xreaddirparams;
# define _XReaddir(d,p) \ ( (_Xos_processLock), \ (((p).result = readdir((d))) ? \ (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \ ((p).result = &(p).dir_entry), 0) : \ 0), \ (_Xos_processUnlock), \ (p).result )
#elsetypedef struct { struct dirent *result; struct dirent dir_entry;# ifdef _POSIX_PATH_MAX char buf[_POSIX_PATH_MAX];# elif defined(NAME_MAX) char buf[NAME_MAX];# else char buf[255];# endif} _Xreaddirparams;
# if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(__APPLE__)/* POSIX final API, returns (int)0 on success. */# define _XReaddir(d,p) \ (readdir_r((d), &((p).dir_entry), &((p).result)) ? NULL : (p).result)# elif defined(_POSIX_REENTRANT_FUNCTIONS)/* POSIX draft API, returns (int)0 on success. */# define _XReaddir(d,p) \ (readdir_r((d),&((p).dir_entry)) ? NULL : &((p).dir_entry))# elif defined(SVR4)/* Pre-POSIX API, returns non-NULL on success. */# define _XReaddir(d,p) (readdir_r((d), &(p).dir_entry))# else/* We have no idea what is going on. Fake it all using process locks. */# define _XReaddir(d,p) \ ( (_Xos_processLock), \ (((p).result = readdir((d))) ? \ (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \ ((p).result = &(p).dir_entry), 0) : \ 0), \ (_Xos_processUnlock), \ (p).result )# endif#endif /* X_INCLUDE_DIRENT_H */
#if defined(X_INCLUDE_DIRENT_H) && !defined(_XOS_INCLUDED_DIRENT_H)# define _XOS_INCLUDED_DIRENT_H#endif
/***** <unistd.h> wrappers *****/
/* * Effective prototypes for <unistd.h> wrappers: * * #define X_INCLUDE_UNISTD_H * #define XOS_USE_..._LOCKING * #include <X11/Xos_r.h> * * typedef ... _Xgetloginparams; * typedef ... _Xttynameparams; * * char *_XGetlogin(_Xgetloginparams); * char *_XTtyname(int, _Xttynameparams); */
#if defined(X_INCLUDE_UNISTD_H) && !defined(_XOS_INCLUDED_UNISTD_H)/* <unistd.h> already included by <X11/Xos.h> */# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_UNISTDAPI)# define XOS_USE_MTSAFE_UNISTDAPI 1# endif#endif
#if !defined(X_INCLUDE_UNISTD_H) || defined(_XOS_INCLUDED_UNISTD_H)/* Do nothing. */
#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)/* Use regular, unsafe API. */typedef int _Xgetloginparams; /* dummy */typedef int _Xttynameparams; /* dummy */# define _XGetlogin(p) getlogin()# define _XTtyname(f) ttyname((f))
#elif !defined(XOS_USE_MTSAFE_UNISTDAPI) || defined(XNO_MTSAFE_UNISTDAPI)/* Systems with thread support but no _r API. */typedef struct { char *result;# if defined(MAXLOGNAME) char buf[MAXLOGNAME];# elif defined(LOGIN_NAME_MAX) char buf[LOGIN_NAME_MAX];# else char buf[64];# endif} _Xgetloginparams;typedef struct { char *result;# ifdef TTY_NAME_MAX char buf[TTY_NAME_MAX];# elif defined(_POSIX_TTY_NAME_MAX) char buf[_POSIX_TTY_NAME_MAX];# elif defined(_POSIX_PATH_MAX) char buf[_POSIX_PATH_MAX];# else char buf[256];# endif} _Xttynameparams;
# define _XGetlogin(p) \ ( (_Xos_processLock), \ (((p).result = getlogin()) ? \ (strncpy((p).buf, (p).result, sizeof((p).buf)), \ ((p).buf[sizeof((p).buf)-1] = '\0'), \ ((p).result = (p).buf), 0) : 0), \ (_Xos_processUnlock), \ (p).result )#define _XTtyname(f,p) \ ( (_Xos_processLock), \ (((p).result = ttyname(f)) ? \ (strncpy((p).buf, (p).result, sizeof((p).buf)), \ ((p).buf[sizeof((p).buf)-1] = '\0'), \ ((p).result = (p).buf), 0) : 0), \ (_Xos_processUnlock), \ (p).result )
#elif defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_POSIX_REENTRANT_FUNCTIONS)/* POSIX API. * * extern int getlogin_r(char *, size_t); * extern int ttyname_r(int, char *, size_t); */typedef struct {# if defined(MAXLOGNAME) char buf[MAXLOGNAME];# elif defined(LOGIN_NAME_MAX) char buf[LOGIN_NAME_MAX];# else char buf[64];# endif} _Xgetloginparams;typedef struct {# ifdef TTY_NAME_MAX char buf[TTY_NAME_MAX];# elif defined(_POSIX_TTY_NAME_MAX) char buf[_POSIX_TTY_NAME_MAX];# elif defined(_POSIX_PATH_MAX) char buf[_POSIX_PATH_MAX];# else char buf[256];# endif} _Xttynameparams;
# define _XGetlogin(p) (getlogin_r((p).buf, sizeof((p).buf)) ? NULL : (p).buf)# define _XTtyname(f,p) \ (ttyname_r((f), (p).buf, sizeof((p).buf)) ? NULL : (p).buf)
#else/* Pre-POSIX API. * * extern char *getlogin_r(char *, size_t); * extern char *ttyname_r(int, char *, size_t); */typedef struct {# if defined(MAXLOGNAME) char buf[MAXLOGNAME];# elif defined(LOGIN_NAME_MAX) char buf[LOGIN_NAME_MAX];# else char buf[64];# endif} _Xgetloginparams;typedef struct {# ifdef TTY_NAME_MAX char buf[TTY_NAME_MAX];# elif defined(_POSIX_TTY_NAME_MAX) char buf[_POSIX_TTY_NAME_MAX];# elif defined(_POSIX_PATH_MAX) char buf[_POSIX_PATH_MAX];# else char buf[256];# endif} _Xttynameparams;
# define _XGetlogin(p) getlogin_r((p).buf, sizeof((p).buf))# define _XTtyname(f,p) ttyname_r((f), (p).buf, sizeof((p).buf))#endif /* X_INCLUDE_UNISTD_H */
#if defined(X_INCLUDE_UNISTD_H) && !defined(_XOS_INCLUDED_UNISTD_H)# define _XOS_INCLUDED_UNISTD_H#endif
/***** <string.h> wrappers *****/
/* * Effective prototypes for <string.h> wrappers: * * #define X_INCLUDE_STRING_H * #define XOS_USE_..._LOCKING * #include <X11/Xos_r.h> * * typedef ... _Xstrtokparams; * * char *_XStrtok(char *, const char*, _Xstrtokparams); */
#if defined(X_INCLUDE_STRING_H) && !defined(_XOS_INCLUDED_STRING_H)/* <string.h> has already been included by <X11/Xos.h> */# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_STRINGAPI)# define XOS_USE_MTSAFE_STRINGAPI 1# endif#endif
#if !defined(X_INCLUDE_STRING_H) || defined(_XOS_INCLUDED_STRING_H)/* Do nothing. */
#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)/* Use regular, unsafe API. */typedef int _Xstrtokparams; /* dummy */# define _XStrtok(s1,s2,p) \ ( p = 0, (void)p, strtok((s1),(s2)) )
#elif !defined(XOS_USE_MTSAFE_STRINGAPI) || defined(XNO_MTSAFE_STRINGAPI)/* Systems with thread support but no _r API. */typedef char *_Xstrtokparams;# define _XStrtok(s1,s2,p) \ ( (_Xos_processLock), \ ((p) = strtok((s1),(s2))), \ (_Xos_processUnlock), \ (p) )
#else/* POSIX or pre-POSIX API. */typedef char * _Xstrtokparams;# define _XStrtok(s1,s2,p) strtok_r((s1),(s2),&(p))#endif /* X_INCLUDE_STRING_H */
/***** <time.h> wrappers *****/
/* * Effective prototypes for <time.h> wrappers: * * #define X_INCLUDE_TIME_H * #define XOS_USE_..._LOCKING * #include <X11/Xos_r.h> * * typedef ... _Xatimeparams; * typedef ... _Xctimeparams; * typedef ... _Xgtimeparams; * typedef ... _Xltimeparams; * * char *_XAsctime(const struct tm *, _Xatimeparams); * char *_XCtime(const time_t *, _Xctimeparams); * struct tm *_XGmtime(const time_t *, _Xgtimeparams); * struct tm *_XLocaltime(const time_t *, _Xltimeparams); */
#if defined(X_INCLUDE_TIME_H) && !defined(_XOS_INCLUDED_TIME_H)# include <time.h># if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_TIMEAPI)# define XOS_USE_MTSAFE_TIMEAPI 1# endif#endif
#if !defined(X_INCLUDE_TIME_H) || defined(_XOS_INCLUDED_TIME_H)/* Do nothing. */
#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)/* Use regular, unsafe API. */typedef int _Xatimeparams; /* dummy */# define _XAsctime(t,p) asctime((t))typedef int _Xctimeparams; /* dummy */# define _XCtime(t,p) ctime((t))typedef int _Xgtimeparams; /* dummy */# define _XGmtime(t,p) gmtime((t))typedef int _Xltimeparams; /* dummy */# define _XLocaltime(t,p) localtime((t))
#elif !defined(XOS_USE_MTSAFE_TIMEAPI) || defined(XNO_MTSAFE_TIMEAPI)/* Systems with thread support but no _r API. */typedef struct {# ifdef TIMELEN char buf[TIMELEN];# else char buf[26];# endif char *result;} _Xctimeparams, _Xatimeparams;typedef struct { struct tm buf; struct tm *result;} _Xgtimeparams, _Xltimeparams;# define _XAsctime(t,p) \ ( (_Xos_processLock), \ (((p).result = asctime((t))) ? \ (strncpy((p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \ 0), \ (_Xos_processUnlock), \ (p).result )# define _XCtime(t,p) \ ( (_Xos_processLock), \ (((p).result = ctime((t))) ? \ (strncpy((p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \ 0), \ (_Xos_processUnlock), \ (p).result )# define _XGmtime(t,p) \ ( (_Xos_processLock), \ (((p).result = gmtime(t)) ? \ (memcpy(&(p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \ 0), \ (_Xos_processUnlock), \ (p).result )# define _XLocaltime(t,p) \ ( (_Xos_processLock), \ (((p).result = localtime(t)) ? \ (memcpy(&(p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \ 0), \ (_Xos_processUnlock), \ (p).result )
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(hpV4)/* Returns (int)0 on success. * * extern int asctime_r(const struct tm *timeptr, char *buffer, int buflen); * extern int ctime_r(const time_t *timer, char *buffer, int buflen); * extern int gmtime_r(const time_t *timer, struct tm *result); * extern int localtime_r(const time_t *timer, struct tm *result); */# ifdef TIMELENtypedef char _Xatimeparams[TIMELEN];typedef char _Xctimeparams[TIMELEN];# elsetypedef char _Xatimeparams[26];typedef char _Xctimeparams[26];# endiftypedef struct tm _Xgtimeparams;typedef struct tm _Xltimeparams;# define _XAsctime(t,p) (asctime_r((t),(p),sizeof((p))) ? NULL : (p))# define _XCtime(t,p) (ctime_r((t),(p),sizeof((p))) ? NULL : (p))# define _XGmtime(t,p) (gmtime_r((t),&(p)) ? NULL : &(p))# define _XLocaltime(t,p) (localtime_r((t),&(p)) ? NULL : &(p))
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(__sun)/* Returns NULL on failure. Solaris 2.5 * * extern char *asctime_r(const struct tm *tm,char *buf, int buflen); * extern char *ctime_r(const time_t *clock, char *buf, int buflen); * extern struct tm *gmtime_r(const time_t *clock, struct tm *res); * extern struct tm *localtime_r(const time_t *clock, struct tm *res); */# ifdef TIMELENtypedef char _Xatimeparams[TIMELEN];typedef char _Xctimeparams[TIMELEN];# elsetypedef char _Xatimeparams[26];typedef char _Xctimeparams[26];# endiftypedef struct tm _Xgtimeparams;typedef struct tm _Xltimeparams;# define _XAsctime(t,p) asctime_r((t),(p),sizeof((p)))# define _XCtime(t,p) ctime_r((t),(p),sizeof((p)))# define _XGmtime(t,p) gmtime_r((t),&(p))# define _XLocaltime(t,p) localtime_r((t),&(p))
#else /* defined(_POSIX_THREAD_SAFE_FUNCTIONS) *//* POSIX final API. * extern char *asctime_r(const struct tm *timeptr, char *buffer); * extern char *ctime_r(const time_t *timer, char *buffer); * extern struct tm *gmtime_r(const time_t *timer, struct tm *result); * extern struct tm *localtime_r(const time_t *timer, struct tm *result); */# ifdef TIMELENtypedef char _Xatimeparams[TIMELEN];typedef char _Xctimeparams[TIMELEN];# elsetypedef char _Xatimeparams[26];typedef char _Xctimeparams[26];# endiftypedef struct tm _Xgtimeparams;typedef struct tm _Xltimeparams;# define _XAsctime(t,p) asctime_r((t),(p))# define _XCtime(t,p) ctime_r((t),(p))# define _XGmtime(t,p) gmtime_r((t),&(p))# define _XLocaltime(t,p) localtime_r((t),&(p))#endif /* X_INCLUDE_TIME_H */
#if defined(X_INCLUDE_TIME_H) && !defined(_XOS_INCLUDED_TIME_H)# define _XOS_INCLUDED_TIME_H#endif
/***** <grp.h> wrappers *****/
/* * Effective prototypes for <grp.h> wrappers: * * NOTE: On systems lacking appropriate _r functions Getgrgid() and * Getgrnam() do NOT copy the list of group members! * * Remember that fgetgrent(), setgrent(), getgrent(), and endgrent() * are not included in POSIX. * * #define X_INCLUDE_GRP_H * #define XOS_USE_..._LOCKING * #include <X11/Xos_r.h> * * typedef ... _Xgetgrparams; * * struct group *_XGetgrgid(gid_t, _Xgetgrparams); * struct group *_XGetgrnam(const char *, _Xgetgrparams); */
#if defined(X_INCLUDE_GRP_H) && !defined(_XOS_INCLUDED_GRP_H)# include <grp.h># if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_GRPAPI)# define XOS_USE_MTSAFE_GRPAPI 1# endif#endif
#if !defined(X_INCLUDE_GRP_H) || defined(_XOS_INCLUDED_GRP_H)/* Do nothing. */
#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)/* Use regular, unsafe API. */typedef int _Xgetgrparams; /* dummy */#define _XGetgrgid(g,p) getgrgid((g))#define _XGetgrnam(n,p) getgrnam((n))
#elif !defined(XOS_USE_MTSAFE_GRPAPI) || defined(XNO_MTSAFE_GRPAPI)/* Systems with thread support but no _r API. UnixWare 2.0. */typedef struct { struct group grp; char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */ struct group *pgrp; size_t len;} _Xgetgrparams;#ifdef SVR4/* Copy the gr_passwd field too. */# define _Xgrp_copyGroup(p) \ ( memcpy(&(p).grp, (p).pgrp, sizeof(struct group)), \ ((p).grp.gr_name = (p).buf), \ ((p).len = strlen((p).pgrp->gr_name)), \ strcpy((p).grp.gr_name, (p).pgrp->gr_name), \ ((p).grp.gr_passwd = (p).grp.gr_name + (p).len + 1), \ ((p).pgrp = &(p).grp), \ 0 )#else# define _Xgrp_copyGroup(p) \ ( memcpy(&(p).grp, (p).pgrp, sizeof(struct group)), \ ((p).grp.gr_name = (p).buf), \ strcpy((p).grp.gr_name, (p).pgrp->gr_name), \ ((p).pgrp = &(p).grp), \ 0 )#endif#define _XGetgrgid(g,p) \ ( (_Xos_processLock), \ (((p).pgrp = getgrgid((g))) ? _Xgrp_copyGroup(p) : 0), \ (_Xos_processUnlock), \ (p).pgrp )#define _XGetgrnam(n,p) \ ( (_Xos_processLock), \ (((p).pgrp = getgrnam((n))) ? _Xgrp_copyGroup(p) : 0), \ (_Xos_processUnlock), \ (p).pgrp )
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(__sun)/* Non-POSIX API. Solaris. * * extern struct group *getgrgid_r(gid_t, struct group *, char *, int); * extern struct group *getgrnam_r(const char *, struct group *, char *, int); */typedef struct { struct group grp; char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */} _Xgetgrparams;#define _XGetgrgid(g,p) getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf))#define _XGetgrnam(n,p) getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf))
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS)/* Non-POSIX API. * extern int getgrgid_r(gid_t, struct group *, char *, int); * extern int getgrnam_r(const char *, struct group *, char *, int); */typedef struct { struct group grp; char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */} _Xgetgrparams;#define _XGetgrgid(g,p) \ ((getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf)) ? NULL : &(p).grp))#define _XGetgrnam(n,p) \ ((getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf)) ? NULL : &(p).grp))
#else/* POSIX final API. * * int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); * int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); */typedef struct { struct group grp; char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */ struct group *result;} _Xgetgrparams;
#define _XGetgrgid(g,p) \ ((getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf), &(p).result) ? \ NULL : (p).result))#define _XGetgrnam(n,p) \ ((getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf), &(p).result) ? \ NULL : (p).result))#endif
#if defined(X_INCLUDE_GRP_H) && !defined(_XOS_INCLUDED_GRP_H)# define _XOS_INCLUDED_GRP_H#endif
#ifdef __cplusplus} /* Close scope of 'extern "C"' declaration which encloses file. */#endif123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116/* * O/S-dependent (mis)feature macro definitions *Copyright 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group. */
#ifndef _XOSDEFS_H_# define _XOSDEFS_H_
/* * X_NOT_POSIX means does not have POSIX header files. Lack of this * symbol does NOT mean that the POSIX environment is the default. * You may still have to define _POSIX_SOURCE to get it. */
# ifdef _SCO_DS# ifndef __SCO__# define __SCO__# endif# endif
# ifdef __i386__# ifdef SYSV# if !defined(__SCO__) && \ !defined(__UNIXWARE__) && !defined(__sun)# if !defined(_POSIX_SOURCE)# define X_NOT_POSIX# endif# endif# endif# endif
# ifdef __sun/* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4 * This check allows non-Imake configured programs to build correctly. */# if defined(__SVR4) && !defined(SVR4)# define SVR4 1# endif# ifdef SVR4/* define this to whatever it needs to be */# define X_POSIX_C_SOURCE 199300L# endif# endif
# ifdef WIN32# ifndef _POSIX_# define X_NOT_POSIX# endif# endif
# ifdef __APPLE__# define NULL_NOT_ZERO
/* Defining any of these will sanitize the namespace to JUST want is defined by * that particular standard. If that happens, we don't get some expected * prototypes, typedefs, etc (like fd_mask). We can define _DARWIN_C_SOURCE to * loosen our belts a tad. */# if defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE)# ifndef _DARWIN_C_SOURCE# define _DARWIN_C_SOURCE# endif# endif
# endif
# ifdef __GNU__# ifndef PATH_MAX# define PATH_MAX 4096# endif# ifndef MAXPATHLEN# define MAXPATHLEN 4096# endif# endif
# if defined(__SCO__) || defined(__UNIXWARE__)# ifndef PATH_MAX# define PATH_MAX 1024# endif# ifndef MAXPATHLEN# define MAXPATHLEN 1024# endif# endif
# if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \ || defined(__APPLE__) || defined(__DragonFly__)# ifndef CSRG_BASED# define CSRG_BASED# endif# endif
#endif /* _XOSDEFS_H_ */
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230/*
Copyright 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OROTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shallnot be used in advertising or otherwise to promote the sale, use orother dealings in this Software without prior written authorizationfrom The Open Group.
*/
/* * Copyright © 2005 Daniel Stone * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Daniel Stone not be used in advertising * or publicity pertaining to distribution of the software without specific, * written prior permission. Daniel Stone makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * DANIEL STONE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL * DANIEL STONE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR * ANY 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 THIS SOFTWARE.*/
#ifndef _XPOLL_H_#define _XPOLL_H_
#if !defined(WIN32) || defined(__CYGWIN__)
#ifndef USE_POLL
#include <X11/Xos.h>
#include <sys/select.h> /* Get the FD_* macros. */
#include <X11/Xmd.h>
#ifdef CSRG_BASED#include <sys/param.h># if BSD < 199103typedef long fd_mask;# endif#endif
#if defined(FD_SETSIZE) && FD_SETSIZE < 512# define XFD_SETSIZE FD_SETSIZE#else# define XFD_SETSIZE 512# ifndef FD_SETSIZE# define FD_SETSIZE XFD_SETSIZE# endif#endif
#ifndef NBBY#define NBBY 8 /* number of bits in a byte */#endif
#ifndef NFDBITS#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */#endif
#ifndef howmany#define howmany(x,y) (((x)+((y)-1))/(y))#endif
#if defined(BSD) && BSD < 198911 typedef struct fd_set { fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];} fd_set;#endif
# define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
#define __X_FDS_BITS __fds_bits
#ifndef __FDS_BITS# define __FDS_BITS(p) ((p)->__X_FDS_BITS)#endif
#define __XFDS_BITS(p, n) (__FDS_BITS(p))[n]
#ifndef FD_SET#define FD_SET(n, p) (__XFDS_BITS(p, ((n)/NFDBITS)) |= ((fd_mask)1 << ((n) % NFDBITS)))#endif#ifndef FD_CLR#define FD_CLR(n, p) (__XFDS_BITS((p), ((n)/NFDBITS)) &= ~((fd_mask)1 << ((n) % NFDBITS)))#endif#ifndef FD_ISSET#define FD_ISSET(n, p) ((__XFDS_BITS((p), ((n)/NFDBITS))) & ((fd_mask)1 << ((n) % NFDBITS)))#endif#ifndef FD_ZERO#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))#endif
/* * The howmany(FD_SETSIZE, NFDBITS) computes the number of elements in the * array. before accessing an element in the array we check it exists. * If it does not exist then the compiler discards the code to access it. */#define XFD_ANYSET(p) \ ((howmany(FD_SETSIZE, NFDBITS) > 0 && (__XFDS_BITS(p, 0))) || \ (howmany(FD_SETSIZE, NFDBITS) > 1 && (__XFDS_BITS(p, 1))) || \ (howmany(FD_SETSIZE, NFDBITS) > 2 && (__XFDS_BITS(p, 2))) || \ (howmany(FD_SETSIZE, NFDBITS) > 3 && (__XFDS_BITS(p, 3))) || \ (howmany(FD_SETSIZE, NFDBITS) > 4 && (__XFDS_BITS(p, 4))) || \ (howmany(FD_SETSIZE, NFDBITS) > 5 && (__XFDS_BITS(p, 5))) || \ (howmany(FD_SETSIZE, NFDBITS) > 6 && (__XFDS_BITS(p, 6))) || \ (howmany(FD_SETSIZE, NFDBITS) > 7 && (__XFDS_BITS(p, 7))) || \ (howmany(FD_SETSIZE, NFDBITS) > 8 && (__XFDS_BITS(p, 8))) || \ (howmany(FD_SETSIZE, NFDBITS) > 9 && (__XFDS_BITS(p, 9))) || \ (howmany(FD_SETSIZE, NFDBITS) > 10 && (__XFDS_BITS(p, 10))) || \ (howmany(FD_SETSIZE, NFDBITS) > 11 && (__XFDS_BITS(p, 11))) || \ (howmany(FD_SETSIZE, NFDBITS) > 12 && (__XFDS_BITS(p, 12))) || \ (howmany(FD_SETSIZE, NFDBITS) > 13 && (__XFDS_BITS(p, 13))) || \ (howmany(FD_SETSIZE, NFDBITS) > 14 && (__XFDS_BITS(p, 14))) || \ (howmany(FD_SETSIZE, NFDBITS) > 15 && (__XFDS_BITS(p, 15))))
#define XFD_COPYSET(src,dst) { \ int __i__; \ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \ __XFDS_BITS((dst), __i__) = __XFDS_BITS((src), __i__); \ }#define XFD_ANDSET(dst,b1,b2) { \ int __i__; \ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \ __XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) & (__XFDS_BITS((b2), __i__))); \ }#define XFD_ORSET(dst,b1,b2) { \ int __i__; \ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \ __XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) | (__XFDS_BITS((b2), __i__))); \ } #define XFD_UNSET(dst,b1) { \ int __i__; \ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \ __XFDS_BITS((dst), __i__) &= ~(__XFDS_BITS((b1), __i__)); \ }
#else /* USE_POLL */#include <sys/poll.h>#endif /* USE_POLL */
#else /* WIN32 */
#define XFD_SETSIZE 512#ifndef FD_SETSIZE#define FD_SETSIZE XFD_SETSIZE#endif#include <X11/Xwinsock.h>
#define Select(n,r,w,e,t) select(0,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
#define XFD_SETCOUNT(p) (((fd_set FAR *)(p))->fd_count)#define XFD_FD(p,i) (((fd_set FAR *)(p))->fd_array[i])#define XFD_ANYSET(p) XFD_SETCOUNT(p)
#define XFD_COPYSET(src,dst) { \ u_int __i; \ FD_ZERO(dst); \ for (__i = 0; __i < XFD_SETCOUNT(src) ; __i++) { \ XFD_FD(dst,__i) = XFD_FD(src,__i); \ } \ XFD_SETCOUNT(dst) = XFD_SETCOUNT(src); \}
#define XFD_ANDSET(dst,b1,b2) { \ u_int __i; \ FD_ZERO(dst); \ for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \ if (FD_ISSET(XFD_FD(b1,__i), b2)) \ FD_SET(XFD_FD(b1,__i), dst); \ } \}
#define XFD_ORSET(dst,b1,b2) { \ u_int __i; \ if (dst != b1) XFD_COPYSET(b1,dst); \ for (__i = 0; __i < XFD_SETCOUNT(b2) ; __i++) { \ if (!FD_ISSET(XFD_FD(b2,__i), dst)) \ FD_SET(XFD_FD(b2,__i), dst); \ } \}
/* this one is really sub-optimal */#define XFD_UNSET(dst,b1) { \ u_int __i; \ for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \ FD_CLR(XFD_FD(b1,__i), dst); \ } \}
/* we have to pay the price of having an array here, unlike with bitmasks calling twice FD_SET with the same fd is not transparent, so be careful */#undef FD_SET#define FD_SET(fd,set) do { \ if (XFD_SETCOUNT(set) < FD_SETSIZE && !FD_ISSET(fd,set)) \ XFD_FD(set,XFD_SETCOUNT(set)++)=(fd); \} while(0)
#define getdtablesize() FD_SETSIZE
#endif /* WIN32 */
#endif /* _XPOLL_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157/* 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 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting 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 0
typedef CARD16 KeyButMask;
/***************** Connection setup structures. See Chapter 8: Connection Setup of the X Window System Protocol specification for details.*****************/
/* Client initiates handshake with this data, followed by the strings * for the auth protocol & data. */typedef struct { CARD8 byteOrder; BYTE pad; CARD16 majorVersion, minorVersion; CARD16 nbytesAuthProto; /* Authorization protocol */ CARD16 nbytesAuthString; /* Authorization string */ CARD16 pad2;} xConnClientPrefix;
/* Server response to xConnClientPrefix. * * If success == Success, this is followed by xConnSetup and * numRoots xWindowRoot structs. * * If success == Failure, this is followed by a reason string. * * The protocol also defines a case of success == Authenticate, but * that doesn't seem to have ever been implemented by the X Consortium. */typedef struct { CARD8 success; BYTE lengthReason; /*num bytes in string following if failure */ CARD16 majorVersion, minorVersion; CARD16 length; /* 1/4 additional bytes in setup info */} xConnSetupPrefix;
typedef struct { CARD32 release; CARD32 ridBase, ridMask; CARD32 motionBufferSize; CARD16 nbytesVendor; /* number of bytes in vendor string */ CARD16 maxRequestSize; 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;} xConnSetup;
typedef struct { CARD8 depth; CARD8 bitsPerPixel; CARD8 scanLinePad; CARD8 pad1; CARD32 pad2;} xPixmapFormat;
/* window root */
typedef struct { CARD8 depth; CARD8 pad1; CARD16 nVisuals; /* number of xVisualType structures following */ CARD32 pad2; } xDepth;
typedef struct { VisualID visualID;#if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class;#else CARD8 class;#endif CARD8 bitsPerRGB; CARD16 colormapEntries; CARD32 redMask, greenMask, blueMask; CARD32 pad; } xVisualType;
typedef struct { Window windowId; Colormap defaultColormap; CARD32 whitePixel, blackPixel; CARD32 currentInputMask; CARD16 pixWidth, pixHeight; CARD16 mmWidth, mmHeight; CARD16 minInstalledMaps, maxInstalledMaps; VisualID rootVisualID; 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; INT16 x, y;} xTimecoord;
typedef struct { CARD8 family; BYTE pad; CARD16 length;} xHostEntry;
typedef struct { INT16 leftSideBearing, rightSideBearing, characterWidth, ascent, descent; CARD16 attributes;} xCharInfo;
typedef struct { Atom name; CARD32 value;} 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; CARD16 red, green, blue; CARD8 flags; /* DoRed, DoGreen, DoBlue booleans */ CARD8 pad;} xColorItem;
typedef struct { CARD16 red, green, blue, pad;} 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; /* of last request received by server */ CARD32 length; /* 4 byte quantities beyond size of GenericReply */ CARD32 data00; CARD32 data01; CARD32 data02; CARD32 data03; CARD32 data04; CARD32 data05; } xGenericReply;
/* Individual reply formats. */
typedef struct { BYTE type; /* X_Reply */ CARD8 backingStore; CARD16 sequenceNumber; CARD32 length; /* NOT 0; this is an extra-large reply */ VisualID visualID;#if defined(__cplusplus) || defined(c_plusplus) CARD16 c_class;#else CARD16 class;#endif CARD8 bitGravity; CARD8 winGravity; CARD32 backingBitPlanes; CARD32 backingPixel; BOOL saveUnder; BOOL mapInstalled; CARD8 mapState; BOOL override; Colormap colormap; CARD32 allEventMasks; CARD32 yourEventMask; CARD16 doNotPropagateMask; CARD16 pad; } xGetWindowAttributesReply;
typedef struct { BYTE type; /* X_Reply */ CARD8 depth; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window root; INT16 x, y; CARD16 width, height; CARD16 borderWidth; CARD16 pad1; CARD32 pad2; CARD32 pad3; } xGetGeometryReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; Window root, parent; CARD16 nChildren; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xQueryTreeReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ Atom atom; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xInternAtomReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* of additional bytes */ CARD16 nameLength; /* # of characters in name */ CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGetAtomNameReply;
typedef struct { BYTE type; /* X_Reply */ CARD8 format; CARD16 sequenceNumber; CARD32 length; /* of additional bytes */ Atom propertyType; CARD32 bytesAfter; CARD32 nItems; /* # of 8, 16, or 32-bit entities in reply */ CARD32 pad1; CARD32 pad2; CARD32 pad3; } xGetPropertyReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nProperties; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListPropertiesReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window owner; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetSelectionOwnerReply;
typedef struct { BYTE type; /* X_Reply */ BYTE status; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGrabPointerReply;
typedef xGrabPointerReply xGrabKeyboardReply;
typedef struct { BYTE type; /* X_Reply */ BOOL sameScreen; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window root, child; INT16 rootX, rootY, winX, winY; CARD16 mask; CARD16 pad1; CARD32 pad; } xQueryPointerReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 nEvents; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetMotionEventsReply;
typedef struct { BYTE type; /* X_Reply */ BOOL sameScreen; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window child; INT16 dstX, dstY; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xTranslateCoordsReply;
typedef struct { BYTE type; /* X_Reply */ CARD8 revertTo; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window focus; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xGetInputFocusReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 2, NOT 0; this is an extra-large reply */ BYTE map[32]; } xQueryKeymapReply;
/* Warning: this MUST match (up to component renaming) xListFontsWithInfoReply */typedef struct _xQueryFontReply { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* definitely > 0, even if "nCharInfos" is 0 */ xCharInfo minBounds; CARD32 walign1; xCharInfo maxBounds; CARD32 walign2; CARD16 minCharOrByte2, maxCharOrByte2; CARD16 defaultChar; CARD16 nFontProps; /* followed by this many xFontProp structures */ CARD8 drawDirection; CARD8 minByte1, maxByte1; BOOL allCharsExist; INT16 fontAscent, fontDescent; CARD32 nCharInfos; /* followed by this many xCharInfo structures */} xQueryFontReply;
typedef struct { BYTE type; /* X_Reply */ CARD8 drawDirection; CARD16 sequenceNumber; CARD32 length; /* 0 */ INT16 fontAscent, fontDescent; INT16 overallAscent, overallDescent; INT32 overallWidth, overallLeft, overallRight; CARD32 pad; } xQueryTextExtentsReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nFonts; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListFontsReply;
/* Warning: this MUST match (up to component renaming) xQueryFontReply */typedef struct { BYTE type; /* X_Reply */ CARD8 nameLength; /* 0 indicates end-of-reply-sequence */ CARD16 sequenceNumber; CARD32 length; /* definitely > 0, even if "nameLength" is 0 */ xCharInfo minBounds; CARD32 walign1; xCharInfo maxBounds; CARD32 walign2; CARD16 minCharOrByte2, maxCharOrByte2; CARD16 defaultChar; CARD16 nFontProps; /* followed by this many xFontProp structures */ CARD8 drawDirection; CARD8 minByte1, maxByte1; BOOL allCharsExist; INT16 fontAscent, fontDescent; CARD32 nReplies; /* hint as to how many more replies might be coming */} xListFontsWithInfoReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nPaths; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGetFontPathReply;
typedef struct { BYTE type; /* X_Reply */ CARD8 depth; CARD16 sequenceNumber; CARD32 length; VisualID visual; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGetImageReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nColormaps; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListInstalledColormapsReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 red, green, blue; CARD16 pad2; CARD32 pixel; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xAllocColorReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD32 pixel; CARD16 exactRed, exactGreen, exactBlue; CARD16 screenRed, screenGreen, screenBlue; CARD32 pad2; CARD32 pad3; } xAllocNamedColorReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nPixels, nMasks; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xAllocColorCellsReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nPixels; CARD16 pad2; CARD32 redMask, greenMask, blueMask; CARD32 pad3; CARD32 pad4; } xAllocColorPlanesReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nColors; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xQueryColorsReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 exactRed, exactGreen, exactBlue; CARD16 screenRed, screenGreen, screenBlue; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xLookupColorReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 width, height; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xQueryBestSizeReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ BOOL present; CARD8 major_opcode; CARD8 first_event; CARD8 first_error; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xQueryExtensionReply;
typedef struct { BYTE type; /* X_Reply */ CARD8 nExtensions; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListExtensionsReply;
typedef struct { BYTE type; /* X_Reply */ CARD8 success; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xSetMappingReply;typedef xSetMappingReply xSetPointerMappingReply;typedef xSetMappingReply xSetModifierMappingReply;
typedef struct { BYTE type; /* X_Reply */ CARD8 nElts; /* how many elements does the map have */ CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGetPointerMappingReply;
typedef struct { BYTE type; CARD8 keySymsPerKeyCode; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7;} xGetKeyboardMappingReply;
typedef struct { BYTE type; CARD8 numKeyPerModifier; CARD16 sequenceNumber; CARD32 length; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6;} xGetModifierMappingReply;
typedef struct { BYTE type; /* X_Reply */ BOOL globalAutoRepeat; CARD16 sequenceNumber; CARD32 length; /* 5 */ CARD32 ledMask; CARD8 keyClickPercent, bellPercent; CARD16 bellPitch, bellDuration; CARD16 pad; BYTE map[32]; /* bit masks start here */ } xGetKeyboardControlReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 accelNumerator, accelDenominator; CARD16 threshold; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetPointerControlReply;
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 timeout, interval; BOOL preferBlanking; BOOL allowExposures; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetScreenSaverReply;
typedef struct { BYTE type; /* X_Reply */ BOOL enabled; CARD16 sequenceNumber; CARD32 length; CARD16 nHosts; CARD16 pad1; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListHostsReply;
/***************************************************************** * Xerror * All errors are 32 bytes *****************************************************************/
typedef struct { BYTE type; /* X_Error */ BYTE errorCode; CARD16 sequenceNumber; /* the nth request from this client */ CARD32 resourceID; CARD16 minorCode; CARD8 majorCode; BYTE pad1; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7;} xError;
/***************************************************************** * xEvent * All events are 32 bytes *****************************************************************/
typedef struct _xEvent { union { struct { BYTE type; BYTE detail; CARD16 sequenceNumber; } u; struct { CARD32 pad00; Time time; Window root, event, child; INT16 rootX, rootY, eventX, eventY; KeyButMask state; BOOL sameScreen; BYTE pad1; } keyButtonPointer; struct { CARD32 pad00; Time time; Window root, event, child; INT16 rootX, rootY, eventX, eventY; KeyButMask state; BYTE mode; /* really XMode */ BYTE flags; /* sameScreen and focus booleans, packed together */#define ELFlagFocus (1<<0)#define ELFlagSameScreen (1<<1) } enterLeave; struct { CARD32 pad00; Window window; BYTE mode; /* really XMode */ BYTE pad1, pad2, pad3; } focus; struct { CARD32 pad00; Window window; CARD16 x, y, width, height; CARD16 count; CARD16 pad2; } expose; struct { CARD32 pad00; Drawable drawable; CARD16 x, y, width, height; CARD16 minorEvent; CARD16 count; BYTE majorEvent; BYTE pad1, pad2, pad3; } graphicsExposure; struct { CARD32 pad00; Drawable drawable; CARD16 minorEvent; BYTE majorEvent; BYTE bpad; } noExposure; struct { CARD32 pad00; Window window; CARD8 state; BYTE pad1, pad2, pad3; } visibility; struct { CARD32 pad00; Window parent, window; INT16 x, y; CARD16 width, height, borderWidth; BOOL override; BYTE bpad; } createNotify;/* * The event fields in the structures for DestroyNotify, UnmapNotify, * MapNotify, ReparentNotify, ConfigureNotify, CirculateNotify, GravityNotify, * must be at the same offset because server internal code is depending upon * this to patch up the events before they are delivered. * Also note that MapRequest, ConfigureRequest and CirculateRequest have * the same offset for the event window. */ struct { CARD32 pad00; Window event, window; } destroyNotify; struct { CARD32 pad00; Window event, window; BOOL fromConfigure; BYTE pad1, pad2, pad3; } unmapNotify; struct { CARD32 pad00; Window event, window; BOOL override; BYTE pad1, pad2, pad3; } mapNotify; struct { CARD32 pad00; Window parent, window; } mapRequest; struct { CARD32 pad00; Window event, window, parent; INT16 x, y; BOOL override; BYTE pad1, pad2, pad3; } reparent; struct { CARD32 pad00; Window event, window, aboveSibling; INT16 x, y; CARD16 width, height, borderWidth; BOOL override; BYTE bpad; } configureNotify; struct { CARD32 pad00; Window parent, window, sibling; INT16 x, y; CARD16 width, height, borderWidth; CARD16 valueMask; CARD32 pad1; } configureRequest; struct { CARD32 pad00; Window event, window; INT16 x, y; CARD32 pad1, pad2, pad3, pad4; } gravity; struct { CARD32 pad00; Window window; CARD16 width, height; } resizeRequest; struct {/* The event field in the circulate record is really the parent when this is used as a CirculateRequest instead of a CirculateNotify */ CARD32 pad00; Window event, window, parent; BYTE place; /* Top or Bottom */ BYTE pad1, pad2, pad3; } circulate; struct { CARD32 pad00; Window window; Atom atom; Time time; BYTE state; /* NewValue or Deleted */ BYTE pad1; CARD16 pad2; } property; struct { CARD32 pad00; Time time; Window window; Atom atom; } selectionClear; struct { CARD32 pad00; Time time; Window owner, requestor; Atom selection, target, property; } selectionRequest; struct { CARD32 pad00; Time time; Window requestor; Atom selection, target, property; } selectionNotify; struct { CARD32 pad00; Window window; Colormap colormap;#if defined(__cplusplus) || defined(c_plusplus) BOOL c_new;#else BOOL new;#endif BYTE state; /* Installed or UnInstalled */ BYTE pad1, pad2; } colormap; struct { CARD32 pad00; CARD8 request; KeyCode firstKeyCode; CARD8 count; BYTE pad1; } mappingNotify; struct { CARD32 pad00; Window window; union { struct { Atom type; INT32 longs0; INT32 longs1; INT32 longs2; INT32 longs3; INT32 longs4; } l; struct { Atom type; INT16 shorts0; INT16 shorts1; INT16 shorts2; INT16 shorts3; INT16 shorts4; INT16 shorts5; INT16 shorts6; INT16 shorts7; INT16 shorts8; INT16 shorts9; } s; struct { Atom type; INT8 bytes[20]; } b; } u; } clientMessage; } u;} xEvent;
/********************************************************* * * Generic event * * Those events are not part of the core protocol spec and can be used by * various extensions. * type is always GenericEvent * extension is the minor opcode of the extension the event belongs to. * evtype is the actual event type, unique __per extension__. * * GenericEvents can be longer than 32 bytes, with the length field * specifying the number of 4 byte blocks after the first 32 bytes. * * */typedef struct{ BYTE type; CARD8 extension; CARD16 sequenceNumber; CARD32 length; CARD16 evtype; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7;} xGenericEvent;
/* KeymapNotify events are not included in the above union because they are different from all other events: they do not have a "detail" or "sequenceNumber", so there is room for a 248-bit key mask. */
typedef struct { BYTE type; BYTE map[31]; } xKeymapEvent;
#define XEventSize (sizeof(xEvent))
/* XReply is the union of all the replies above whose "fixed part"fits in 32 bytes. It does NOT include GetWindowAttributesReply,QueryFontReply, QueryKeymapReply, or GetKeyboardControlReplyListFontsWithInfoReply */
typedef union { xGenericReply generic; xGetGeometryReply geom; xQueryTreeReply tree; xInternAtomReply atom; xGetAtomNameReply atomName; xGetPropertyReply property; xListPropertiesReply listProperties; xGetSelectionOwnerReply selection; xGrabPointerReply grabPointer; xGrabKeyboardReply grabKeyboard; xQueryPointerReply pointer; xGetMotionEventsReply motionEvents; xTranslateCoordsReply coords; xGetInputFocusReply inputFocus; xQueryTextExtentsReply textExtents; xListFontsReply fonts; xGetFontPathReply fontPath; xGetImageReply image; xListInstalledColormapsReply colormaps; xAllocColorReply allocColor; xAllocNamedColorReply allocNamedColor; xAllocColorCellsReply colorCells; xAllocColorPlanesReply colorPlanes; xQueryColorsReply colors; xLookupColorReply lookupColor; xQueryBestSizeReply bestSize; xQueryExtensionReply extension; xListExtensionsReply extensions; xSetModifierMappingReply setModifierMapping; xGetModifierMappingReply getModifierMapping; xSetPointerMappingReply setPointerMapping; xGetKeyboardMappingReply getKeyboardMapping; xGetPointerMappingReply getPointerMapping; xGetPointerControlReply pointerControl; xGetScreenSaverReply screenSaver; xListHostsReply hosts; xError error; xEvent event;} xReply;
/***************************************************************** * REQUESTS *****************************************************************/
/* Request structure */
typedef struct _xReq { CARD8 reqType; CARD8 data; /* meaning depends on request type */ CARD16 length; /* length in 4 bytes quantities of whole request, including this header */} xReq;
/***************************************************************** * structures that follow request. *****************************************************************/
/* ResourceReq is used for any request which has a resource ID (or Atom or Time) as its one and only argument. */
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD32 id; /* a Window, Drawable, Font, GContext, Pixmap, etc. */ } xResourceReq;
typedef struct { CARD8 reqType; CARD8 depth; CARD16 length; Window wid, parent; INT16 x, y; CARD16 width, height, borderWidth;#if defined(__cplusplus) || defined(c_plusplus) CARD16 c_class;#else CARD16 class;#endif VisualID visual; CARD32 mask;} xCreateWindowReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window; CARD32 valueMask;} xChangeWindowAttributesReq;
typedef struct { CARD8 reqType; BYTE mode; CARD16 length; Window window;} xChangeSaveSetReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window, parent; INT16 x, y;} xReparentWindowReq;
typedef struct { CARD8 reqType; CARD8 pad; CARD16 length; Window window; CARD16 mask; CARD16 pad2;} xConfigureWindowReq;
typedef struct { CARD8 reqType; CARD8 direction; CARD16 length; Window window;} xCirculateWindowReq;
typedef struct { /* followed by padded string */ CARD8 reqType; BOOL onlyIfExists; CARD16 length; CARD16 nbytes; /* number of bytes in string */ CARD16 pad;} xInternAtomReq;
typedef struct { CARD8 reqType; CARD8 mode; CARD16 length; Window window; Atom property, type; CARD8 format; BYTE pad[3]; CARD32 nUnits; /* length of stuff following, depends on format */} xChangePropertyReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window; Atom property;} xDeletePropertyReq;
typedef struct { CARD8 reqType;#if defined(__cplusplus) || defined(c_plusplus) BOOL c_delete;#else BOOL delete;#endif CARD16 length; Window window; Atom property, type; CARD32 longOffset; CARD32 longLength;} xGetPropertyReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window; Atom selection; Time time;} xSetSelectionOwnerReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window requestor; Atom selection, target, property; Time time; } xConvertSelectionReq;
typedef struct { CARD8 reqType; BOOL propagate; CARD16 length; Window destination; CARD32 eventMask; xEvent event;} xSendEventReq;
typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length; Window grabWindow; CARD16 eventMask; BYTE pointerMode, keyboardMode; Window confineTo; Cursor cursor; Time time;} xGrabPointerReq;
typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length; Window grabWindow; CARD16 eventMask; BYTE pointerMode, keyboardMode; Window confineTo; Cursor cursor; CARD8 button; BYTE pad; CARD16 modifiers;} xGrabButtonReq;
typedef struct { CARD8 reqType; CARD8 button; CARD16 length; Window grabWindow; CARD16 modifiers; CARD16 pad;} xUngrabButtonReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Cursor cursor; Time time; CARD16 eventMask; CARD16 pad2;} xChangeActivePointerGrabReq;
typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length; Window grabWindow; Time time; BYTE pointerMode, keyboardMode; CARD16 pad;} xGrabKeyboardReq;
typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length; Window grabWindow; CARD16 modifiers; CARD8 key; BYTE pointerMode, keyboardMode; BYTE pad1, pad2, pad3;} xGrabKeyReq;
typedef struct { CARD8 reqType; CARD8 key; CARD16 length; Window grabWindow; CARD16 modifiers; CARD16 pad;} xUngrabKeyReq;
typedef struct { CARD8 reqType; CARD8 mode; CARD16 length; Time time;} xAllowEventsReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window; Time start, stop;} xGetMotionEventsReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window srcWid, dstWid; INT16 srcX, srcY;} xTranslateCoordsReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window srcWid, dstWid; INT16 srcX, srcY; CARD16 srcWidth, srcHeight; INT16 dstX, dstY;} xWarpPointerReq;
typedef struct { CARD8 reqType; CARD8 revertTo; CARD16 length; Window focus; Time time;} xSetInputFocusReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Font fid; CARD16 nbytes; BYTE pad1, pad2; /* string follows on word boundary */} xOpenFontReq;
typedef struct { CARD8 reqType; BOOL oddLength; CARD16 length; Font fid; } xQueryTextExtentsReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD16 maxNames; CARD16 nbytes; /* followed immediately by string bytes */} xListFontsReq;
typedef xListFontsReq xListFontsWithInfoReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD16 nFonts; BYTE pad1, pad2; /* LISTofSTRING8 follows on word boundary */} xSetFontPathReq;
typedef struct { CARD8 reqType; CARD8 depth; CARD16 length; Pixmap pid; Drawable drawable; CARD16 width, height;} xCreatePixmapReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; GContext gc; Drawable drawable; CARD32 mask;} xCreateGCReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; GContext gc; CARD32 mask;} xChangeGCReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; GContext srcGC, dstGC; CARD32 mask;} xCopyGCReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; GContext gc; CARD16 dashOffset; CARD16 nDashes; /* length LISTofCARD8 of values following */} xSetDashesReq;
typedef struct { CARD8 reqType; BYTE ordering; CARD16 length; GContext gc; INT16 xOrigin, yOrigin;} xSetClipRectanglesReq;
typedef struct { CARD8 reqType; BOOL exposures; CARD16 length; Window window; INT16 x, y; CARD16 width, height;} xClearAreaReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Drawable srcDrawable, dstDrawable; GContext gc; INT16 srcX, srcY, dstX, dstY; CARD16 width, height;} xCopyAreaReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Drawable srcDrawable, dstDrawable; GContext gc; INT16 srcX, srcY, dstX, dstY; CARD16 width, height; CARD32 bitPlane;} xCopyPlaneReq;
typedef struct { CARD8 reqType; BYTE coordMode; CARD16 length; Drawable drawable; GContext gc;} xPolyPointReq;
typedef xPolyPointReq xPolyLineReq; /* same request structure */
/* The following used for PolySegment, PolyRectangle, PolyArc, PolyFillRectangle, PolyFillArc */
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Drawable drawable; GContext gc;} xPolySegmentReq;
typedef xPolySegmentReq xPolyArcReq;typedef xPolySegmentReq xPolyRectangleReq;typedef xPolySegmentReq xPolyFillRectangleReq;typedef xPolySegmentReq xPolyFillArcReq;
typedef struct _FillPolyReq { CARD8 reqType; BYTE pad; CARD16 length; Drawable drawable; GContext gc; BYTE shape; BYTE coordMode; CARD16 pad1;} xFillPolyReq;
typedef struct _PutImageReq { CARD8 reqType; CARD8 format; CARD16 length; Drawable drawable; GContext gc; CARD16 width, height; INT16 dstX, dstY; CARD8 leftPad; CARD8 depth; CARD16 pad;} xPutImageReq;
typedef struct { CARD8 reqType; CARD8 format; CARD16 length; Drawable drawable; INT16 x, y; CARD16 width, height; CARD32 planeMask;} xGetImageReq;
/* the following used by PolyText8 and PolyText16 */
typedef struct { CARD8 reqType; CARD8 pad; CARD16 length; Drawable drawable; GContext gc; INT16 x, y; /* items (xTextElt) start after struct */} xPolyTextReq;
typedef xPolyTextReq xPolyText8Req;typedef xPolyTextReq xPolyText16Req;
typedef struct { CARD8 reqType; BYTE nChars; CARD16 length; Drawable drawable; GContext gc; INT16 x, y;} xImageTextReq;
typedef xImageTextReq xImageText8Req;typedef xImageTextReq xImageText16Req;
typedef struct { CARD8 reqType; BYTE alloc; CARD16 length; Colormap mid; Window window; VisualID visual;} xCreateColormapReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap mid; Colormap srcCmap;} xCopyColormapAndFreeReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; CARD16 red, green, blue; CARD16 pad2;} xAllocColorReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; CARD16 nbytes; /* followed by structure */ BYTE pad1, pad2;} xAllocNamedColorReq;
typedef struct { CARD8 reqType; BOOL contiguous; CARD16 length; Colormap cmap; CARD16 colors, planes;} xAllocColorCellsReq;
typedef struct { CARD8 reqType; BOOL contiguous; CARD16 length; Colormap cmap; CARD16 colors, red, green, blue;} xAllocColorPlanesReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; CARD32 planeMask;} xFreeColorsReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap;} xStoreColorsReq;
typedef struct { CARD8 reqType; CARD8 flags; /* DoRed, DoGreen, DoBlue, as in xColorItem */ CARD16 length; Colormap cmap; CARD32 pixel; CARD16 nbytes; /* number of name string bytes following structure */ BYTE pad1, pad2; } xStoreNamedColorReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap;} xQueryColorsReq;
typedef struct { /* followed by string of length len */ CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; CARD16 nbytes; /* number of string bytes following structure*/ BYTE pad1, pad2;} xLookupColorReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Cursor cid; Pixmap source, mask; CARD16 foreRed, foreGreen, foreBlue; CARD16 backRed, backGreen, backBlue; CARD16 x, y;} xCreateCursorReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Cursor cid; Font source, mask; CARD16 sourceChar, maskChar; CARD16 foreRed, foreGreen, foreBlue; CARD16 backRed, backGreen, backBlue;} xCreateGlyphCursorReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Cursor cursor; CARD16 foreRed, foreGreen, foreBlue; CARD16 backRed, backGreen, backBlue;} xRecolorCursorReq;
typedef struct { CARD8 reqType;#if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class;#else CARD8 class;#endif CARD16 length; Drawable drawable; CARD16 width, height;} xQueryBestSizeReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD16 nbytes; /* number of string bytes following structure */ BYTE pad1, pad2;} xQueryExtensionReq;
typedef struct { CARD8 reqType; CARD8 numKeyPerModifier; CARD16 length;} xSetModifierMappingReq;
typedef struct { CARD8 reqType; CARD8 nElts; /* how many elements in the map */ CARD16 length;} xSetPointerMappingReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; KeyCode firstKeyCode; CARD8 count; CARD16 pad1;} xGetKeyboardMappingReq;
typedef struct { CARD8 reqType; CARD8 keyCodes; CARD16 length; KeyCode firstKeyCode; CARD8 keySymsPerKeyCode; CARD16 pad1;} xChangeKeyboardMappingReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD32 mask;} xChangeKeyboardControlReq;
typedef struct { CARD8 reqType; INT8 percent; /* -100 to 100 */ CARD16 length;} xBellReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; INT16 accelNum, accelDenum; INT16 threshold; BOOL doAccel, doThresh;} xChangePointerControlReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; INT16 timeout, interval; BYTE preferBlank, allowExpose; CARD16 pad2;} xSetScreenSaverReq;
typedef struct { CARD8 reqType; BYTE mode; CARD16 length; CARD8 hostFamily; BYTE pad; CARD16 hostLength;} xChangeHostsReq;
typedef struct { CARD8 reqType; BYTE pad; CARD16 length; } xListHostsReq;
typedef struct { CARD8 reqType; BYTE mode; CARD16 length; } xChangeModeReq;
typedef xChangeModeReq xSetAccessControlReq;typedef xChangeModeReq xSetCloseDownModeReq;typedef xChangeModeReq xForceScreenSaverReq;
typedef struct { /* followed by LIST of ATOM */ CARD8 reqType; BYTE pad; CARD16 length; Window window; CARD16 nAtoms; INT16 nPositions; } xRotatePropertiesReq;
/* Reply codes */
#define X_Reply 1 /* Normal reply */#define X_Error 0 /* Error */
/* Request codes */
#define X_CreateWindow 1#define X_ChangeWindowAttributes 2#define X_GetWindowAttributes 3#define X_DestroyWindow 4#define X_DestroySubwindows 5#define X_ChangeSaveSet 6#define X_ReparentWindow 7#define X_MapWindow 8#define X_MapSubwindows 9#define X_UnmapWindow 10#define X_UnmapSubwindows 11#define X_ConfigureWindow 12#define X_CirculateWindow 13#define X_GetGeometry 14#define X_QueryTree 15#define X_InternAtom 16#define X_GetAtomName 17#define X_ChangeProperty 18#define X_DeleteProperty 19#define X_GetProperty 20#define X_ListProperties 21#define X_SetSelectionOwner 22#define X_GetSelectionOwner 23#define X_ConvertSelection 24#define X_SendEvent 25#define X_GrabPointer 26#define X_UngrabPointer 27#define X_GrabButton 28#define X_UngrabButton 29#define X_ChangeActivePointerGrab 30#define X_GrabKeyboard 31#define X_UngrabKeyboard 32#define X_GrabKey 33#define X_UngrabKey 34#define X_AllowEvents 35#define X_GrabServer 36#define X_UngrabServer 37#define X_QueryPointer 38#define X_GetMotionEvents 39#define X_TranslateCoords 40#define X_WarpPointer 41#define X_SetInputFocus 42#define X_GetInputFocus 43#define X_QueryKeymap 44#define X_OpenFont 45#define X_CloseFont 46#define X_QueryFont 47#define X_QueryTextExtents 48#define X_ListFonts 49#define X_ListFontsWithInfo 50#define X_SetFontPath 51#define X_GetFontPath 52#define X_CreatePixmap 53#define X_FreePixmap 54#define X_CreateGC 55#define X_ChangeGC 56#define X_CopyGC 57#define X_SetDashes 58#define X_SetClipRectangles 59#define X_FreeGC 60#define X_ClearArea 61#define X_CopyArea 62#define X_CopyPlane 63#define X_PolyPoint 64#define X_PolyLine 65#define X_PolySegment 66#define X_PolyRectangle 67#define X_PolyArc 68#define X_FillPoly 69#define X_PolyFillRectangle 70#define X_PolyFillArc 71#define X_PutImage 72#define X_GetImage 73#define X_PolyText8 74#define X_PolyText16 75#define X_ImageText8 76#define X_ImageText16 77#define X_CreateColormap 78#define X_FreeColormap 79#define X_CopyColormapAndFree 80#define X_InstallColormap 81#define X_UninstallColormap 82#define X_ListInstalledColormaps 83#define X_AllocColor 84#define X_AllocNamedColor 85#define X_AllocColorCells 86#define X_AllocColorPlanes 87#define X_FreeColors 88#define X_StoreColors 89#define X_StoreNamedColor 90#define X_QueryColors 91#define X_LookupColor 92#define X_CreateCursor 93#define X_CreateGlyphCursor 94#define X_FreeCursor 95#define X_RecolorCursor 96#define X_QueryBestSize 97#define X_QueryExtension 98#define X_ListExtensions 99#define X_ChangeKeyboardMapping 100#define X_GetKeyboardMapping 101#define X_ChangeKeyboardControl 102#define X_GetKeyboardControl 103#define X_Bell 104#define X_ChangePointerControl 105#define X_GetPointerControl 106#define X_SetScreenSaver 107#define X_GetScreenSaver 108#define X_ChangeHosts 109#define X_ListHosts 110#define X_SetAccessControl 111#define X_SetCloseDownMode 112#define X_KillClient 113#define X_RotateProperties 114#define X_ForceScreenSaver 115#define X_SetPointerMapping 116#define X_GetPointerMapping 117#define X_SetModifierMapping 118#define X_GetModifierMapping 119#define X_NoOperation 127
/* restore these definitions back to the typedefs in X.h */#undef Window#undef Drawable#undef Font#undef Pixmap#undef Cursor#undef Colormap#undef GContext#undef Atom#undef VisualID#undef Time#undef KeyCode#undef KeySym
#endif /* XPROTO_H */1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677#ifndef XPROTOSTRUCTS_H#define XPROTOSTRUCTS_H
/***********************************************************
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting 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>
/* Used by PolySegment */
typedef struct _xSegment { INT16 x1, y1, x2, y2;} xSegment;
/* POINT */
typedef struct _xPoint { INT16 x, y;} xPoint;
typedef struct _xRectangle { INT16 x, y; CARD16 width, height;} xRectangle;
/* ARC */
typedef struct _xArc { INT16 x, y; CARD16 width, height; INT16 angle1, angle2;} xArc;
#endif /* XPROTOSTRUCTS_H */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190/************************************************************************
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting 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.
************************************************************************/
#ifndef _X11_XREGION_H_#define _X11_XREGION_H_
typedef struct { short x1, x2, y1, y2;} Box, BOX, BoxRec, *BoxPtr;
typedef struct { short x, y, width, height;}RECTANGLE, RectangleRec, *RectanglePtr;
#define TRUE 1#define FALSE 0#define MAXSHORT 32767#define MINSHORT -MAXSHORT#ifndef MAX#define MAX(a,b) (((a) > (b)) ? (a) : (b))#endif#ifndef MIN#define MIN(a,b) (((a) < (b)) ? (a) : (b))#endif
/* * clip region */
typedef struct _XRegion { long size; long numRects; BOX *rects; BOX extents;} REGION;
/* Xutil.h contains the declaration: * typedef struct _XRegion *Region; */
/* 1 if two BOXs overlap. * 0 if two BOXs do not overlap. * Remember, x2 and y2 are not in the region */#define EXTENTCHECK(r1, r2) \ ((r1)->x2 > (r2)->x1 && \ (r1)->x1 < (r2)->x2 && \ (r1)->y2 > (r2)->y1 && \ (r1)->y1 < (r2)->y2)
/* * update region extents */#define EXTENTS(r,idRect){\ if((r)->x1 < (idRect)->extents.x1)\ (idRect)->extents.x1 = (r)->x1;\ if((r)->y1 < (idRect)->extents.y1)\ (idRect)->extents.y1 = (r)->y1;\ if((r)->x2 > (idRect)->extents.x2)\ (idRect)->extents.x2 = (r)->x2;\ if((r)->y2 > (idRect)->extents.y2)\ (idRect)->extents.y2 = (r)->y2;\ }
/* * Check to see if there is enough memory in the present region. */#define MEMCHECK(reg, rect, firstrect){\ if ((reg)->numRects >= ((reg)->size - 1)){\ BoxPtr tmpRect = Xrealloc ((firstrect), \ (2 * (sizeof(BOX)) * ((reg)->size))); \ if (tmpRect == NULL) \ return(0);\ (firstrect) = tmpRect; \ (reg)->size *= 2;\ (rect) = &(firstrect)[(reg)->numRects];\ }\ }
/* this routine checks to see if the previous rectangle is the same * or subsumes the new rectangle to add. */
#define CHECK_PREVIOUS(Reg, R, Rx1, Ry1, Rx2, Ry2)\ (!(((Reg)->numRects > 0)&&\ ((R-1)->y1 == (Ry1)) &&\ ((R-1)->y2 == (Ry2)) &&\ ((R-1)->x1 <= (Rx1)) &&\ ((R-1)->x2 >= (Rx2))))
/* add a rectangle to the given Region */#define ADDRECT(reg, r, rx1, ry1, rx2, ry2){\ if (((rx1) < (rx2)) && ((ry1) < (ry2)) &&\ CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\ (r)->x1 = (rx1);\ (r)->y1 = (ry1);\ (r)->x2 = (rx2);\ (r)->y2 = (ry2);\ EXTENTS((r), (reg));\ (reg)->numRects++;\ (r)++;\ }\ }
/* add a rectangle to the given Region */#define ADDRECTNOX(reg, r, rx1, ry1, rx2, ry2){\ if ((rx1 < rx2) && (ry1 < ry2) &&\ CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\ (r)->x1 = (rx1);\ (r)->y1 = (ry1);\ (r)->x2 = (rx2);\ (r)->y2 = (ry2);\ (reg)->numRects++;\ (r)++;\ }\ }
#define EMPTY_REGION(pReg) pReg->numRects = 0
#define REGION_NOT_EMPTY(pReg) pReg->numRects
#define INBOX(r, x, y) \ ( ( ((r).x2 > x)) && \ ( ((r).x1 <= x)) && \ ( ((r).y2 > y)) && \ ( ((r).y1 <= y)) )
/* * number of points to buffer before sending them off * to scanlines() : Must be an even number */#define NUMPTSTOBUFFER 200
/* * used to allocate buffers for points and link * the buffers together */typedef struct _POINTBLOCK { XPoint pts[NUMPTSTOBUFFER]; struct _POINTBLOCK *next;} POINTBLOCK;
#endif /* _X11_XREGION_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
/***********************************************************
Copyright 1987, 1988, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting 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.
******************************************************************/
#ifndef _X11_XRESOURCE_H_#define _X11_XRESOURCE_H_
#ifndef _XP_PRINT_SERVER_#include <X11/Xlib.h>#endif
/**************************************************************** **************************************************************** *** *** *** *** *** X Resource Manager Intrinsics *** *** *** *** *** **************************************************************** ****************************************************************/
_XFUNCPROTOBEGIN
/**************************************************************** * * Memory Management * ****************************************************************/
extern char *Xpermalloc( unsigned int /* size */);
/**************************************************************** * * Quark Management * ****************************************************************/
typedef int XrmQuark, *XrmQuarkList;#define NULLQUARK ((XrmQuark) 0)
typedef char *XrmString;#define NULLSTRING ((XrmString) 0)
/* find quark for string, create new quark if none already exists */extern XrmQuark XrmStringToQuark( _Xconst char* /* string */);
extern XrmQuark XrmPermStringToQuark( _Xconst char* /* string */);
/* find string for quark */extern XrmString XrmQuarkToString( XrmQuark /* quark */);
extern XrmQuark XrmUniqueQuark( void);
#define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0)
/**************************************************************** * * Conversion of Strings to Lists * ****************************************************************/
typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
extern void XrmStringToQuarkList( _Xconst char* /* string */, XrmQuarkList /* quarks_return */);
extern void XrmStringToBindingQuarkList( _Xconst char* /* string */, XrmBindingList /* bindings_return */, XrmQuarkList /* quarks_return */);
/**************************************************************** * * Name and Class lists. * ****************************************************************/
typedef XrmQuark XrmName;typedef XrmQuarkList XrmNameList;#define XrmNameToString(name) XrmQuarkToString(name)#define XrmStringToName(string) XrmStringToQuark(string)#define XrmStringToNameList(str, name) XrmStringToQuarkList(str, name)
typedef XrmQuark XrmClass;typedef XrmQuarkList XrmClassList;#define XrmClassToString(c_class) XrmQuarkToString(c_class)#define XrmStringToClass(c_class) XrmStringToQuark(c_class)#define XrmStringToClassList(str,c_class) XrmStringToQuarkList(str, c_class)
/**************************************************************** * * Resource Representation Types and Values * ****************************************************************/
typedef XrmQuark XrmRepresentation;#define XrmStringToRepresentation(string) XrmStringToQuark(string)#define XrmRepresentationToString(type) XrmQuarkToString(type)
typedef struct { unsigned int size; XPointer addr;} XrmValue, *XrmValuePtr;
/**************************************************************** * * Resource Manager Functions * ****************************************************************/
typedef struct _XrmHashBucketRec *XrmHashBucket;typedef XrmHashBucket *XrmHashTable;typedef XrmHashTable XrmSearchList[];typedef struct _XrmHashBucketRec *XrmDatabase;
extern void XrmDestroyDatabase( XrmDatabase /* database */);
extern void XrmQPutResource( XrmDatabase* /* database */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, XrmRepresentation /* type */, XrmValue* /* value */);
extern void XrmPutResource( XrmDatabase* /* database */, _Xconst char* /* specifier */, _Xconst char* /* type */, XrmValue* /* value */);
extern void XrmQPutStringResource( XrmDatabase* /* database */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, _Xconst char* /* value */);
extern void XrmPutStringResource( XrmDatabase* /* database */, _Xconst char* /* specifier */, _Xconst char* /* value */);
extern void XrmPutLineResource( XrmDatabase* /* database */, _Xconst char* /* line */);
extern Bool XrmQGetResource( XrmDatabase /* database */, XrmNameList /* quark_name */, XrmClassList /* quark_class */, XrmRepresentation* /* quark_type_return */, XrmValue* /* value_return */);
extern Bool XrmGetResource( XrmDatabase /* database */, _Xconst char* /* str_name */, _Xconst char* /* str_class */, char** /* str_type_return */, XrmValue* /* value_return */);
extern Bool XrmQGetSearchList( XrmDatabase /* database */, XrmNameList /* names */, XrmClassList /* classes */, XrmSearchList /* list_return */, int /* list_length */);
extern Bool XrmQGetSearchResource( XrmSearchList /* list */, XrmName /* name */, XrmClass /* class */, XrmRepresentation* /* type_return */, XrmValue* /* value_return */);
/**************************************************************** * * Resource Database Management * ****************************************************************/
#ifndef _XP_PRINT_SERVER_
extern void XrmSetDatabase( Display* /* display */, XrmDatabase /* database */);
extern XrmDatabase XrmGetDatabase( Display* /* display */);
#endif /* !_XP_PRINT_SERVER_ */
extern XrmDatabase XrmGetFileDatabase( _Xconst char* /* filename */);
extern Status XrmCombineFileDatabase( _Xconst char* /* filename */, XrmDatabase* /* target */, Bool /* override */);
extern XrmDatabase XrmGetStringDatabase( _Xconst char* /* data */ /* null terminated string */);
extern void XrmPutFileDatabase( XrmDatabase /* database */, _Xconst char* /* filename */);
extern void XrmMergeDatabases( XrmDatabase /* source_db */, XrmDatabase* /* target_db */);
extern void XrmCombineDatabase( XrmDatabase /* source_db */, XrmDatabase* /* target_db */, Bool /* override */);
#define XrmEnumAllLevels 0#define XrmEnumOneLevel 1
extern Bool XrmEnumerateDatabase( XrmDatabase /* db */, XrmNameList /* name_prefix */, XrmClassList /* class_prefix */, int /* mode */, Bool (*)( XrmDatabase* /* db */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, XrmRepresentation* /* type */, XrmValue* /* value */, XPointer /* closure */ ) /* proc */, XPointer /* closure */);
extern const char *XrmLocaleOfDatabase( XrmDatabase /* database */);
/**************************************************************** * * Command line option mapping to resource entries * ****************************************************************/
typedef enum { XrmoptionNoArg, /* Value is specified in OptionDescRec.value */ XrmoptionIsArg, /* Value is the option string itself */ XrmoptionStickyArg, /* Value is characters immediately following option */ XrmoptionSepArg, /* Value is next argument in argv */ XrmoptionResArg, /* Resource and value in next argument in argv */ XrmoptionSkipArg, /* Ignore this option and the next argument in argv */ XrmoptionSkipLine, /* Ignore this option and the rest of argv */ XrmoptionSkipNArgs /* Ignore this option and the next OptionDescRes.value arguments in argv */} XrmOptionKind;
typedef struct { char *option; /* Option abbreviation in argv */ char *specifier; /* Resource specifier */ XrmOptionKind argKind; /* Which style of option it is */ XPointer value; /* Value to provide if XrmoptionNoArg */} XrmOptionDescRec, *XrmOptionDescList;
extern void XrmParseCommand( XrmDatabase* /* database */, XrmOptionDescList /* table */, int /* table_count */, _Xconst char* /* name */, int* /* argc_in_out */, char** /* argv_in_out */);
_XFUNCPROTOEND
#endif /* _X11_XRESOURCE_H_ *//* DON'T ADD STUFF AFTER THIS #endif */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314/* *Copyright 1993, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group. * * */
#ifndef _XTHREADS_H_# define _XTHREADS_H_
/* Redefine these to XtMalloc/XtFree or whatever you want before including * this header file. */# ifndef xmalloc# define xmalloc malloc# endif# ifndef xfree# define xfree free# endif
# ifdef CTHREADS# include <cthreads.h>typedef cthread_t xthread_t;typedef struct condition xcondition_rec;typedef struct mutex xmutex_rec;# define xthread_init() cthread_init()# define xthread_self cthread_self# define xthread_fork(func,closure) cthread_fork(func,closure)# define xthread_yield() cthread_yield()# define xthread_exit(v) cthread_exit(v)# define xthread_set_name(t,str) cthread_set_name(t,str)# define xmutex_init(m) mutex_init(m)# define xmutex_clear(m) mutex_clear(m)# define xmutex_lock(m) mutex_lock(m)# define xmutex_unlock(m) mutex_unlock(m)# define xmutex_set_name(m,str) mutex_set_name(m,str)# define xcondition_init(cv) condition_init(cv)# define xcondition_clear(cv) condition_clear(cv)# define xcondition_wait(cv,m) condition_wait(cv,m)# define xcondition_signal(cv) condition_signal(cv)# define xcondition_broadcast(cv) condition_broadcast(cv)# define xcondition_set_name(cv,str) condition_set_name(cv,str)# else /* !CTHREADS */# if defined(SVR4)# include <thread.h># include <synch.h>typedef thread_t xthread_t;typedef thread_key_t xthread_key_t;typedef cond_t xcondition_rec;typedef mutex_t xmutex_rec;# if defined(__UNIXWARE__)extern xthread_t (*_x11_thr_self)();# define xthread_self (_x11_thr_self)# else# define xthread_self thr_self# endif# define xthread_fork(func,closure) thr_create(NULL,0,func,closure,THR_NEW_LWP|THR_DETACHED,NULL)# define xthread_yield() thr_yield()# define xthread_exit(v) thr_exit(v)# define xthread_key_create(kp,d) thr_keycreate(kp,d)# ifdef __sun# define xthread_key_delete(k) 0# else# define xthread_key_delete(k) thr_keydelete(k)# endif# define xthread_set_specific(k,v) thr_setspecific(k,v)# define xthread_get_specific(k,vp) thr_getspecific(k,vp)# define xmutex_init(m) mutex_init(m,USYNC_THREAD,0)# define xmutex_clear(m) mutex_destroy(m)# define xmutex_lock(m) mutex_lock(m)# define xmutex_unlock(m) mutex_unlock(m)# define xcondition_init(cv) cond_init(cv,USYNC_THREAD,0)# define xcondition_clear(cv) cond_destroy(cv)# define xcondition_wait(cv,m) cond_wait(cv,m)# define xcondition_signal(cv) cond_signal(cv)# define xcondition_broadcast(cv) cond_broadcast(cv)# else /* !SVR4 */# ifdef WIN32# include <X11/Xwindows.h>typedef DWORD xthread_t;typedef DWORD xthread_key_t;struct _xthread_waiter { HANDLE sem; struct _xthread_waiter *next;};typedef struct { CRITICAL_SECTION cs; struct _xthread_waiter *waiters;} xcondition_rec;typedef CRITICAL_SECTION xmutex_rec;extern void _Xthread_init(void);# define xthread_init() _Xthread_init()# define xthread_self GetCurrentThreadId# define xthread_fork(func,closure) { \ DWORD _tmptid; \ CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, (LPVOID)closure, 0, \ &_tmptid); \}# define xthread_yield() Sleep(0)# define xthread_exit(v) ExitThread((DWORD)(v))# define xthread_key_create(kp,d) *(kp) = TlsAlloc()# define xthread_key_delete(k) TlsFree(k)# define xthread_set_specific(k,v) TlsSetValue(k,v)# define xthread_get_specific(k,vp) TlsGetValue(k)# define xmutex_init(m) InitializeCriticalSection(m)# define xmutex_clear(m) DeleteCriticalSection(m)# define _XMUTEX_NESTS# define xmutex_lock(m) EnterCriticalSection(m)# define xmutex_unlock(m) LeaveCriticalSection(m)# define xcondition_init(cv) { \ InitializeCriticalSection(&(cv)->cs); \ (cv)->waiters = NULL; \}# define xcondition_clear(cv) DeleteCriticalSection(&(cv)->cs)extern struct _xthread_waiter *_Xthread_waiter();# define xcondition_wait(cv,m) { \ struct _xthread_waiter *_tmpthr = _Xthread_waiter(); \ EnterCriticalSection(&(cv)->cs); \ _tmpthr->next = (cv)->waiters; \ (cv)->waiters = _tmpthr; \ LeaveCriticalSection(&(cv)->cs); \ LeaveCriticalSection(m); \ WaitForSingleObject(_tmpthr->sem, INFINITE); \ EnterCriticalSection(m); \}# define xcondition_signal(cv) { \ EnterCriticalSection(&(cv)->cs); \ if ((cv)->waiters) { \ ReleaseSemaphore((cv)->waiters->sem, 1, NULL); \ (cv)->waiters = (cv)->waiters->next; \ } \ LeaveCriticalSection(&(cv)->cs); \}# define xcondition_broadcast(cv) { \ struct _xthread_waiter *_tmpthr; \ EnterCriticalSection(&(cv)->cs); \ for (_tmpthr = (cv)->waiters; _tmpthr; _tmpthr = _tmpthr->next) \ ReleaseSemaphore(_tmpthr->sem, 1, NULL); \ (cv)->waiters = NULL; \ LeaveCriticalSection(&(cv)->cs); \}# else /* !WIN32 */# ifdef USE_TIS_SUPPORT/* * TIS support is intended for thread safe libraries. * This should not be used for general client programming. */# include <tis.h>typedef pthread_t xthread_t;typedef pthread_key_t xthread_key_t;typedef pthread_cond_t xcondition_rec;typedef pthread_mutex_t xmutex_rec;# define xthread_self tis_self# define xthread_fork(func,closure) { pthread_t _tmpxthr; \ pthread_create(&_tmpxthr,NULL,func,closure); }# define xthread_yield() pthread_yield_np()# define xthread_exit(v) pthread_exit(v)# define xthread_key_create(kp,d) tis_key_create(kp,d)# define xthread_key_delete(k) tis_key_delete(k)# define xthread_set_specific(k,v) tis_setspecific(k,v)# define xthread_get_specific(k,vp) *(vp) = tis_getspecific(k)# define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER# define xmutex_init(m) tis_mutex_init(m)# define xmutex_clear(m) tis_mutex_destroy(m)# define xmutex_lock(m) tis_mutex_lock(m)# define xmutex_unlock(m) tis_mutex_unlock(m)# define xcondition_init(c) tis_cond_init(c)# define xcondition_clear(c) tis_cond_destroy(c)# define xcondition_wait(c,m) tis_cond_wait(c,m)# define xcondition_signal(c) tis_cond_signal(c)# define xcondition_broadcast(c) tis_cond_broadcast(c)# else# ifdef USE_NBSD_THREADLIB/* * NetBSD threadlib support is intended for thread safe libraries. * This should not be used for general client programming. */# include <threadlib.h>typedef thr_t xthread_t;typedef thread_key_t xthread_key_t;typedef cond_t xcondition_rec;typedef mutex_t xmutex_rec;# define xthread_self thr_self# define xthread_fork(func,closure) { thr_t _tmpxthr; \ /* XXX Create it detached? --thorpej */ \ thr_create(&_tmpxthr,NULL,func,closure); }# define xthread_yield() thr_yield()# define xthread_exit(v) thr_exit(v)# define xthread_key_create(kp,d) thr_keycreate(kp,d)# define xthread_key_delete(k) thr_keydelete(k)# define xthread_set_specific(k,v) thr_setspecific(k,v)# define xthread_get_specific(k,vp) *(vp) = thr_getspecific(k)# define XMUTEX_INITIALIZER MUTEX_INITIALIZER# define xmutex_init(m) mutex_init(m, 0)# define xmutex_clear(m) mutex_destroy(m)# define xmutex_lock(m) mutex_lock(m)# define xmutex_unlock(m) mutex_unlock(m)# define xcondition_init(c) cond_init(c, 0, 0)# define xcondition_clear(c) cond_destroy(c)# define xcondition_wait(c,m) cond_wait(c,m)# define xcondition_signal(c) cond_signal(c)# define xcondition_broadcast(c) cond_broadcast(c)# else# include <pthread.h>typedef pthread_t xthread_t;typedef pthread_key_t xthread_key_t;typedef pthread_cond_t xcondition_rec;typedef pthread_mutex_t xmutex_rec;# define xthread_self pthread_self# define xthread_yield() pthread_yield()# define xthread_exit(v) pthread_exit(v)# define xthread_set_specific(k,v) pthread_setspecific(k,v)# define xmutex_clear(m) pthread_mutex_destroy(m)# define xmutex_lock(m) pthread_mutex_lock(m)# define xmutex_unlock(m) pthread_mutex_unlock(m)# ifndef XPRE_STANDARD_API# define xthread_key_create(kp,d) pthread_key_create(kp,d)# define xthread_key_delete(k) pthread_key_delete(k)# define xthread_get_specific(k,vp) *(vp) = pthread_getspecific(k)# define xthread_fork(func,closure) { pthread_t _tmpxthr; \ pthread_create(&_tmpxthr,NULL,func,closure); }# define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER# define xmutex_init(m) pthread_mutex_init(m, NULL)# define xcondition_init(c) pthread_cond_init(c, NULL)# else /* XPRE_STANDARD_API */# define xthread_key_create(kp,d) pthread_keycreate(kp,d)# define xthread_key_delete(k) 0# define xthread_get_specific(k,vp) pthread_getspecific(k,vp)# define xthread_fork(func,closure) { pthread_t _tmpxthr; \ pthread_create(&_tmpxthr,pthread_attr_default,func,closure); }# define xmutex_init(m) pthread_mutex_init(m, pthread_mutexattr_default)# define xcondition_init(c) pthread_cond_init(c, pthread_condattr_default)# endif /* XPRE_STANDARD_API */# define xcondition_clear(c) pthread_cond_destroy(c)# define xcondition_wait(c,m) pthread_cond_wait(c,m)# define xcondition_signal(c) pthread_cond_signal(c)# define xcondition_broadcast(c) pthread_cond_broadcast(c)# if defined(_DECTHREADS_)static xthread_t _X_no_thread_id;# define xthread_have_id(id) !pthread_equal(id, _X_no_thread_id)# define xthread_clear_id(id) id = _X_no_thread_id# define xthread_equal(id1,id2) pthread_equal(id1, id2)# endif /* _DECTHREADS_ */# if defined(__linux__)# define xthread_have_id(id) !pthread_equal(id, 0)# define xthread_clear_id(id) id = 0# define xthread_equal(id1,id2) pthread_equal(id1, id2)# endif /* linux */# if defined(_CMA_VENDOR_) && defined(_CMA__IBM) && (_CMA_VENDOR_ == _CMA__IBM)# ifdef DEBUG /* too much of a hack to enable normally *//* see also cma__obj_set_name() */# define xmutex_set_name(m,str) ((char**)(m)->field1)[5] = (str)# define xcondition_set_name(cv,str) ((char**)(cv)->field1)[5] = (str)# endif /* DEBUG */# endif /* _CMA_VENDOR_ == _CMA__IBM */# endif /* USE_NBSD_THREADLIB */# endif /* USE_TIS_SUPPORT */# endif /* WIN32 */# endif /* SVR4 */# endif /* CTHREADS */typedef xcondition_rec *xcondition_t;typedef xmutex_rec *xmutex_t;# ifndef xcondition_malloc# define xcondition_malloc() (xcondition_t)xmalloc(sizeof(xcondition_rec))# endif# ifndef xcondition_free# define xcondition_free(c) xfree((char *)c)# endif# ifndef xmutex_malloc# define xmutex_malloc() (xmutex_t)xmalloc(sizeof(xmutex_rec))# endif# ifndef xmutex_free# define xmutex_free(m) xfree((char *)m)# endif# ifndef xthread_have_id# define xthread_have_id(id) id# endif# ifndef xthread_clear_id# define xthread_clear_id(id) id = 0# endif# ifndef xthread_equal# define xthread_equal(id1,id2) ((id1) == (id2))# endif/* aids understood by some debuggers */# ifndef xthread_set_name# define xthread_set_name(t,str)# endif# ifndef xmutex_set_name# define xmutex_set_name(m,str)# endif# ifndef xcondition_set_name# define xcondition_set_name(cv,str)# endif
#endif /* _XTHREADS_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
/***********************************************************
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting 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.
******************************************************************/
#ifndef _X11_XUTIL_H_#define _X11_XUTIL_H_
/* You must include <X11/Xlib.h> before including this file */#include <X11/Xlib.h>#include <X11/keysym.h>
/* The Xlib structs are full of implicit padding to properly align members. We can't clean that up without breaking ABI, so tell clang not to bother complaining about it. */#ifdef __clang__#pragma clang diagnostic push#pragma clang diagnostic ignored "-Wpadded"#endif
/* * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding * value (x, y, width, height) was found in the parsed string. */#define NoValue 0x0000#define XValue 0x0001#define YValue 0x0002#define WidthValue 0x0004#define HeightValue 0x0008#define AllValues 0x000F#define XNegative 0x0010#define YNegative 0x0020
/* * new version containing base_width, base_height, and win_gravity fields; * used with WM_NORMAL_HINTS. */typedef struct { long flags; /* marks which fields in this structure are defined */ int x, y; /* obsolete for new window mgrs, but clients */ int width, height; /* should set so old wm's don't mess up */ int min_width, min_height; int max_width, max_height; int width_inc, height_inc; struct { int x; /* numerator */ int y; /* denominator */ } min_aspect, max_aspect; int base_width, base_height; /* added by ICCCM version 1 */ int win_gravity; /* added by ICCCM version 1 */} XSizeHints;
/* * The next block of definitions are for window manager properties that * clients and applications use for communication. */
/* flags argument in size hints */#define USPosition (1L << 0) /* user specified x, y */#define USSize (1L << 1) /* user specified width, height */
#define PPosition (1L << 2) /* program specified position */#define PSize (1L << 3) /* program specified size */#define PMinSize (1L << 4) /* program specified minimum size */#define PMaxSize (1L << 5) /* program specified maximum size */#define PResizeInc (1L << 6) /* program specified resize increments */#define PAspect (1L << 7) /* program specified min and max aspect ratios */#define PBaseSize (1L << 8) /* program specified base for incrementing */#define PWinGravity (1L << 9) /* program specified window gravity */
/* obsolete */#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
typedef struct { long flags; /* marks which fields in this structure are defined */ Bool input; /* does this application rely on the window manager to get keyboard input? */ int initial_state; /* see below */ Pixmap icon_pixmap; /* pixmap to be used as icon */ Window icon_window; /* window to be used as icon */ int icon_x, icon_y; /* initial position of icon */ Pixmap icon_mask; /* icon mask bitmap */ XID window_group; /* id of related window group */ /* this structure may be extended in the future */} XWMHints;
/* definition for flags of XWMHints */
#define InputHint (1L << 0)#define StateHint (1L << 1)#define IconPixmapHint (1L << 2)#define IconWindowHint (1L << 3)#define IconPositionHint (1L << 4)#define IconMaskHint (1L << 5)#define WindowGroupHint (1L << 6)#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \IconPositionHint|IconMaskHint|WindowGroupHint)#define XUrgencyHint (1L << 8)
/* definitions for initial window state */#define WithdrawnState 0 /* for windows that are not mapped */#define NormalState 1 /* most applications want to start this way */#define IconicState 3 /* application wants to start as an icon */
/* * Obsolete states no longer defined by ICCCM */#define DontCareState 0 /* don't know or care */#define ZoomState 2 /* application wants to start zoomed */#define InactiveState 4 /* application believes it is seldom used; */ /* some wm's may put it on inactive menu */
/* * new structure for manipulating TEXT properties; used with WM_NAME, * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND. */typedef struct { unsigned char *value; /* same as Property routines */ Atom encoding; /* prop type */ int format; /* prop data format: 8, 16, or 32 */ unsigned long nitems; /* number of data items in value */} XTextProperty;
#define XNoMemory -1#define XLocaleNotSupported -2#define XConverterNotFound -3
typedef enum { XStringStyle, /* STRING */ XCompoundTextStyle, /* COMPOUND_TEXT */ XTextStyle, /* text in owner's encoding (current locale)*/ XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */ /* The following is an XFree86 extension, introduced in November 2000 */ XUTF8StringStyle /* UTF8_STRING */} XICCEncodingStyle;
typedef struct { int min_width, min_height; int max_width, max_height; int width_inc, height_inc;} XIconSize;
typedef struct { char *res_name; char *res_class;} XClassHint;
#ifdef XUTIL_DEFINE_FUNCTIONSextern int XDestroyImage( XImage *ximage);extern unsigned long XGetPixel( XImage *ximage, int x, int y);extern int XPutPixel( XImage *ximage, int x, int y, unsigned long pixel);extern XImage *XSubImage( XImage *ximage, int x, int y, unsigned int width, unsigned int height);extern int XAddPixel( XImage *ximage, long value);#else/* * These macros are used to give some sugar to the image routines so that * naive people are more comfortable with them. */#define XDestroyImage(ximage) \ ((*((ximage)->f.destroy_image))((ximage)))#define XGetPixel(ximage, x, y) \ ((*((ximage)->f.get_pixel))((ximage), (x), (y)))#define XPutPixel(ximage, x, y, pixel) \ ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))#define XSubImage(ximage, x, y, width, height) \ ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))#define XAddPixel(ximage, value) \ ((*((ximage)->f.add_pixel))((ximage), (value)))#endif
/* * Compose sequence status structure, used in calling XLookupString. */typedef struct _XComposeStatus { XPointer compose_ptr; /* state table pointer */ int chars_matched; /* match state */} XComposeStatus;
/* * Keysym macros, used on Keysyms to test for classes of symbols */#define IsKeypadKey(keysym) \ (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))
#define IsPrivateKeypadKey(keysym) \ (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
#define IsCursorKey(keysym) \ (((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select))
#define IsPFKey(keysym) \ (((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4))
#define IsFunctionKey(keysym) \ (((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35))
#define IsMiscFunctionKey(keysym) \ (((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break))
#ifdef XK_XKB_KEYS#define IsModifierKey(keysym) \ ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \ || (((KeySym)(keysym) >= XK_ISO_Lock) && \ ((KeySym)(keysym) <= XK_ISO_Level5_Lock)) \ || ((KeySym)(keysym) == XK_Mode_switch) \ || ((KeySym)(keysym) == XK_Num_Lock))#else#define IsModifierKey(keysym) \ ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \ || ((KeySym)(keysym) == XK_Mode_switch) \ || ((KeySym)(keysym) == XK_Num_Lock))#endif/* * opaque reference to Region data type */typedef struct _XRegion *Region;
/* Return values from XRectInRegion() */
#define RectangleOut 0#define RectangleIn 1#define RectanglePart 2
/* * Information used by the visual utility routines to find desired visual * type from the many visuals a display may support. */
typedef struct { Visual *visual; VisualID visualid; int screen; int depth;#if defined(__cplusplus) || defined(c_plusplus) int c_class; /* C++ */#else int class;#endif unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; int colormap_size; int bits_per_rgb;} XVisualInfo;
#define VisualNoMask 0x0#define VisualIDMask 0x1#define VisualScreenMask 0x2#define VisualDepthMask 0x4#define VisualClassMask 0x8#define VisualRedMaskMask 0x10#define VisualGreenMaskMask 0x20#define VisualBlueMaskMask 0x40#define VisualColormapSizeMask 0x80#define VisualBitsPerRGBMask 0x100#define VisualAllMask 0x1FF
/* * This defines a window manager property that clients may use to * share standard color maps of type RGB_COLOR_MAP: */typedef struct { Colormap colormap; unsigned long red_max; unsigned long red_mult; unsigned long green_max; unsigned long green_mult; unsigned long blue_max; unsigned long blue_mult; unsigned long base_pixel; VisualID visualid; /* added by ICCCM version 1 */ XID killid; /* added by ICCCM version 1 */} XStandardColormap;
#define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */
/* * return codes for XReadBitmapFile and XWriteBitmapFile */#define BitmapSuccess 0#define BitmapOpenFailed 1#define BitmapFileInvalid 2#define BitmapNoMemory 3
/**************************************************************** * * Context Management * ****************************************************************/
/* Associative lookup table return codes */
#define XCSUCCESS 0 /* No error. */#define XCNOMEM 1 /* Out of memory */#define XCNOENT 2 /* No entry in table */
typedef int XContext;
#define XUniqueContext() ((XContext) XrmUniqueQuark())#define XStringToContext(string) ((XContext) XrmStringToQuark(string))
_XFUNCPROTOBEGIN
/* The following declarations are alphabetized. */
extern XClassHint *XAllocClassHint ( void);
extern XIconSize *XAllocIconSize ( void);
extern XSizeHints *XAllocSizeHints ( void);
extern XStandardColormap *XAllocStandardColormap ( void);
extern XWMHints *XAllocWMHints ( void);
extern int XClipBox( Region /* r */, XRectangle* /* rect_return */);
extern Region XCreateRegion( void);
extern const char *XDefaultString (void);
extern int XDeleteContext( Display* /* display */, XID /* rid */, XContext /* context */);
extern int XDestroyRegion( Region /* r */);
extern Bool XEmptyRegion( Region /* r */);
extern Bool XEqualRegion( Region /* r1 */, Region /* r2 */);
extern int XFindContext( Display* /* display */, XID /* rid */, XContext /* context */, XPointer* /* data_return */);
extern Status XGetClassHint( Display* /* display */, Window /* w */, XClassHint* /* class_hints_return */);
extern Status XGetIconSizes( Display* /* display */, Window /* w */, XIconSize** /* size_list_return */, int* /* count_return */);
extern Status XGetNormalHints( Display* /* display */, Window /* w */, XSizeHints* /* hints_return */);
extern Status XGetRGBColormaps( Display* /* display */, Window /* w */, XStandardColormap** /* stdcmap_return */, int* /* count_return */, Atom /* property */);
extern Status XGetSizeHints( Display* /* display */, Window /* w */, XSizeHints* /* hints_return */, Atom /* property */);
extern Status XGetStandardColormap( Display* /* display */, Window /* w */, XStandardColormap* /* colormap_return */, Atom /* property */);
extern Status XGetTextProperty( Display* /* display */, Window /* window */, XTextProperty* /* text_prop_return */, Atom /* property */);
extern XVisualInfo *XGetVisualInfo( Display* /* display */, long /* vinfo_mask */, XVisualInfo* /* vinfo_template */, int* /* nitems_return */);
extern Status XGetWMClientMachine( Display* /* display */, Window /* w */, XTextProperty* /* text_prop_return */);
extern XWMHints *XGetWMHints( Display* /* display */, Window /* w */);
extern Status XGetWMIconName( Display* /* display */, Window /* w */, XTextProperty* /* text_prop_return */);
extern Status XGetWMName( Display* /* display */, Window /* w */, XTextProperty* /* text_prop_return */);
extern Status XGetWMNormalHints( Display* /* display */, Window /* w */, XSizeHints* /* hints_return */, long* /* supplied_return */);
extern Status XGetWMSizeHints( Display* /* display */, Window /* w */, XSizeHints* /* hints_return */, long* /* supplied_return */, Atom /* property */);
extern Status XGetZoomHints( Display* /* display */, Window /* w */, XSizeHints* /* zhints_return */);
extern int XIntersectRegion( Region /* sra */, Region /* srb */, Region /* dr_return */);
extern void XConvertCase( KeySym /* sym */, KeySym* /* lower */, KeySym* /* upper */);
extern int XLookupString( XKeyEvent* /* event_struct */, char* /* buffer_return */, int /* bytes_buffer */, KeySym* /* keysym_return */, XComposeStatus* /* status_in_out */);
extern Status XMatchVisualInfo( Display* /* display */, int /* screen */, int /* depth */, int /* class */, XVisualInfo* /* vinfo_return */);
extern int XOffsetRegion( Region /* r */, int /* dx */, int /* dy */);
extern Bool XPointInRegion( Region /* r */, int /* x */, int /* y */);
extern Region XPolygonRegion( XPoint* /* points */, int /* n */, int /* fill_rule */);
extern int XRectInRegion( Region /* r */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */);
extern int XSaveContext( Display* /* display */, XID /* rid */, XContext /* context */, _Xconst char* /* data */);
extern int XSetClassHint( Display* /* display */, Window /* w */, XClassHint* /* class_hints */);
extern int XSetIconSizes( Display* /* display */, Window /* w */, XIconSize* /* size_list */, int /* count */);
extern int XSetNormalHints( Display* /* display */, Window /* w */, XSizeHints* /* hints */);
extern void XSetRGBColormaps( Display* /* display */, Window /* w */, XStandardColormap* /* stdcmaps */, int /* count */, Atom /* property */);
extern int XSetSizeHints( Display* /* display */, Window /* w */, XSizeHints* /* hints */, Atom /* property */);
extern int XSetStandardProperties( Display* /* display */, Window /* w */, _Xconst char* /* window_name */, _Xconst char* /* icon_name */, Pixmap /* icon_pixmap */, char** /* argv */, int /* argc */, XSizeHints* /* hints */);
extern void XSetTextProperty( Display* /* display */, Window /* w */, XTextProperty* /* text_prop */, Atom /* property */);
extern void XSetWMClientMachine( Display* /* display */, Window /* w */, XTextProperty* /* text_prop */);
extern int XSetWMHints( Display* /* display */, Window /* w */, XWMHints* /* wm_hints */);
extern void XSetWMIconName( Display* /* display */, Window /* w */, XTextProperty* /* text_prop */);
extern void XSetWMName( Display* /* display */, Window /* w */, XTextProperty* /* text_prop */);
extern void XSetWMNormalHints( Display* /* display */, Window /* w */, XSizeHints* /* hints */);
extern void XSetWMProperties( Display* /* display */, Window /* w */, XTextProperty* /* window_name */, XTextProperty* /* icon_name */, char** /* argv */, int /* argc */, XSizeHints* /* normal_hints */, XWMHints* /* wm_hints */, XClassHint* /* class_hints */);
extern void XmbSetWMProperties( Display* /* display */, Window /* w */, _Xconst char* /* window_name */, _Xconst char* /* icon_name */, char** /* argv */, int /* argc */, XSizeHints* /* normal_hints */, XWMHints* /* wm_hints */, XClassHint* /* class_hints */);
extern void Xutf8SetWMProperties( Display* /* display */, Window /* w */, _Xconst char* /* window_name */, _Xconst char* /* icon_name */, char** /* argv */, int /* argc */, XSizeHints* /* normal_hints */, XWMHints* /* wm_hints */, XClassHint* /* class_hints */);
extern void XSetWMSizeHints( Display* /* display */, Window /* w */, XSizeHints* /* hints */, Atom /* property */);
extern int XSetRegion( Display* /* display */, GC /* gc */, Region /* r */);
extern void XSetStandardColormap( Display* /* display */, Window /* w */, XStandardColormap* /* colormap */, Atom /* property */);
extern int XSetZoomHints( Display* /* display */, Window /* w */, XSizeHints* /* zhints */);
extern int XShrinkRegion( Region /* r */, int /* dx */, int /* dy */);
extern Status XStringListToTextProperty( char** /* list */, int /* count */, XTextProperty* /* text_prop_return */);
extern int XSubtractRegion( Region /* sra */, Region /* srb */, Region /* dr_return */);
extern int XmbTextListToTextProperty( Display* display, char** list, int count, XICCEncodingStyle style, XTextProperty* text_prop_return);
extern int XwcTextListToTextProperty( Display* display, wchar_t** list, int count, XICCEncodingStyle style, XTextProperty* text_prop_return);
extern int Xutf8TextListToTextProperty( Display* display, char** list, int count, XICCEncodingStyle style, XTextProperty* text_prop_return);
extern void XwcFreeStringList( wchar_t** list);
extern Status XTextPropertyToStringList( XTextProperty* /* text_prop */, char*** /* list_return */, int* /* count_return */);
extern int XmbTextPropertyToTextList( Display* display, const XTextProperty* text_prop, char*** list_return, int* count_return);
extern int XwcTextPropertyToTextList( Display* display, const XTextProperty* text_prop, wchar_t*** list_return, int* count_return);
extern int Xutf8TextPropertyToTextList( Display* display, const XTextProperty* text_prop, char*** list_return, int* count_return);
extern int XUnionRectWithRegion( XRectangle* /* rectangle */, Region /* src_region */, Region /* dest_region_return */);
extern int XUnionRegion( Region /* sra */, Region /* srb */, Region /* dr_return */);
extern int XWMGeometry( Display* /* display */, int /* screen_number */, _Xconst char* /* user_geometry */, _Xconst char* /* default_geometry */, unsigned int /* border_width */, XSizeHints* /* hints */, int* /* x_return */, int* /* y_return */, int* /* width_return */, int* /* height_return */, int* /* gravity_return */);
extern int XXorRegion( Region /* sra */, Region /* srb */, Region /* dr_return */);
#ifdef __clang__#pragma clang diagnostic pop#endif
_XFUNCPROTOEND
#endif /* _X11_XUTIL_H_ */12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879#ifndef _XW32DEFS_H# define _XW32DEFS_H
# ifdef __GNUC__ /* mingw is more close to unix than msvc */# if !defined(__daddr_t_defined)typedef char *caddr_t;# endif# define lstat stat
# elsetypedef char *caddr_t;
# define access _access# define alloca _alloca# define chdir _chdir# define chmod _chmod# define close _close# define creat _creat# define dup _dup# define dup2 _dup2# define environ _environ# define execl _execl# define execle _execle# define execlp _execlp# define execlpe _execlpe# define execv _execv# define execve _execve# define execvp _execvp# define execvpe _execvpe# define fdopen _fdopen# define fileno _fileno# define fstat _fstat# define getcwd _getcwd# define getpid _getpid# define hypot _hypot# define isascii __isascii# define isatty _isatty# define lseek _lseek# define mkdir _mkdir# define mktemp _mktemp# define open _open# define putenv _putenv# define read _read# define rmdir _rmdir# define sleep(x) Sleep((x) * 1000)# define stat _stat# define sys_errlist _sys_errlist# define sys_nerr _sys_nerr# define umask _umask# define unlink _unlink# define write _write# define random rand# define srandom srand
# define O_RDONLY _O_RDONLY# define O_WRONLY _O_WRONLY# define O_RDWR _O_RDWR# define O_APPEND _O_APPEND# define O_CREAT _O_CREAT# define O_TRUNC _O_TRUNC# define O_EXCL _O_EXCL# define O_TEXT _O_TEXT# define O_BINARY _O_BINARY# define O_RAW _O_BINARY
# define S_IFMT _S_IFMT# define S_IFDIR _S_IFDIR# define S_IFCHR _S_IFCHR# define S_IFREG _S_IFREG# define S_IREAD _S_IREAD# define S_IWRITE _S_IWRITE# define S_IEXEC _S_IEXEC
# define F_OK 0# define X_OK 1# define W_OK 2# define R_OK 4# endif /* __GNUC__ */#endif123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117/*
Copyright 1996, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENTSHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGSIN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shallnot be used in advertising or otherwise to promote the sale, use orother dealings in this Software without prior written authorization fromThe Open Group.
*/
/* * This header file has the sole purpose of allowing the inclusion of * windows.h without getting any name conflicts with X headers code, by * renaming or disabling the conflicting definitions from windows.h */
/* * Mingw.org versions of the Windows API headers actually avoid * making the conflicting definitions if XFree86Server is defined, so we * need to remember if that was defined and undefine it during including * windows.h (so the conflicting definitions get wrapped correctly), and * then redefine it afterwards. (This was never the correct thing to * do as it's no help at all to X11 clients which also need to use the * Win32 API) */#undef _XFree86Server#ifdef XFree86Server# define _XFree86Server# undef XFree86Server#endif
/* * There doesn't seem to be a good way to wrap the min/max macros from * windows.h, so we simply avoid defining them completely, allowing any * pre-existing definition to stand. * */#define NOMINMAX
/* * mingw-w64 headers define BOOL as a typedef, protecting against macros * mingw.org headers define BOOL in terms of WINBOOL * ... so try to come up with something which works with both :-) */#define _NO_BOOL_TYPEDEF#define BOOL WINBOOL#define INT32 wINT32#ifdef __x86_64__#define INT64 wINT64#define LONG64 wLONG64#endif#undef Status#define Status wStatus#define ATOM wATOM#define BYTE wBYTE#define FreeResource wFreeResource#pragma push_macro ("ControlMask")#undef ControlMask#include <windows.h>#undef NOMINMAX#undef Status#define Status int#undef BYTE#undef BOOL#undef INT32#undef INT64#undef LONG64#undef ATOM#undef FreeResource#pragma pop_macro ("ControlMask")#undef CreateWindowA
/* * Older version of this header used to name the windows API bool type wBOOL, * rather than more standard name WINBOOL */#define wBOOL WINBOOL
#ifdef RESOURCE_H# undef RT_FONT# undef RT_CURSOR# define RT_FONT ((RESTYPE)4)# define RT_CURSOR ((RESTYPE)5)#endif
#ifndef __CYGWIN__#define sleep(x) Sleep((x) * 1000)#endif
#if defined(WIN32) && (!defined(PATH_MAX) || PATH_MAX < 1024)# undef PATH_MAX# define PATH_MAX 1024#endif
#ifdef _XFree86Server# define XFree86Server# undef _XFree86Server#endif
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980/*
Copyright 1996, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENTSHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGSIN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shallnot be used in advertising or otherwise to promote the sale, use orother dealings in this Software without prior written authorization fromThe Open Group.
*/
/* * This header file has for sole purpose to allow to include winsock.h * without getting any name conflicts with our code. * Conflicts come from the fact that including winsock.h actually pulls * in the whole Windows API... */
#undef _XFree86Server#ifdef XFree86Server# define _XFree86Server# undef XFree86Server#endif
/* * mingw-w64 headers define BOOL as a typedef, protecting against macros * mingw.org headers define BOOL in terms of WINBOOL * ... so try to come up with something which works with both :-) */#define _NO_BOOL_TYPEDEF#define BOOL WINBOOL#define INT32 wINT32#undef Status#define Status wStatus#define ATOM wATOM#define BYTE wBYTE#define FreeResource wFreeResource#pragma push_macro ("ControlMask")#undef ControlMask#include <winsock2.h>#undef Status#define Status int#undef BYTE#undef BOOL#undef INT32#undef ATOM#undef FreeResource#pragma pop_macro ("ControlMask")#undef CreateWindowA#undef RT_FONT#undef RT_CURSOR
/* * Older version of this header used to name the windows API bool type wBOOL, * rather than more standard name WINBOOL */#define wBOOL WINBOOL
#ifdef _XFree86Server# define XFree86Server# undef _XFree86Server#endif
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051/******************************************************************Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts.Copyright 1989 by Hewlett-Packard Company.
All Rights Reserved
Permission to use, duplicate, change, and distribute this software andits documentation for any purpose and without fee is granted, providedthat the above copyright notice appear in such copy and that thiscopyright notice appear in all supporting documentation, and that thenames of Apollo Computer Inc., the Hewlett-Packard Company, or the XConsortium not be used in advertising or publicity pertaining todistribution of the software without written prior permission.
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARDTO THIS SOFTWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE. Hewlett-Packard shall not be liable for errorscontained herein or direct, indirect, special, incidental orconsequential damages in connection with the furnishing,performance, or use of this material.
This software is not subject to any license of the AmericanTelephone and Telegraph Company or of the Regents of theUniversity of California.******************************************************************/
#define apXK_LineDel 0x1000FF00#define apXK_CharDel 0x1000FF01#define apXK_Copy 0x1000FF02#define apXK_Cut 0x1000FF03#define apXK_Paste 0x1000FF04#define apXK_Move 0x1000FF05#define apXK_Grow 0x1000FF06#define apXK_Cmd 0x1000FF07#define apXK_Shell 0x1000FF08#define apXK_LeftBar 0x1000FF09#define apXK_RightBar 0x1000FF0A#define apXK_LeftBox 0x1000FF0B#define apXK_RightBox 0x1000FF0C#define apXK_UpBox 0x1000FF0D#define apXK_DownBox 0x1000FF0E#define apXK_Pop 0x1000FF0F#define apXK_Read 0x1000FF10#define apXK_Edit 0x1000FF11#define apXK_Save 0x1000FF12#define apXK_Exit 0x1000FF13#define apXK_Repeat 0x1000FF14
#define apXK_KP_parenleft 0x1000FFA8#define apXK_KP_parenright 0x1000FFA9123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111/*
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OROTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shallnot be used in advertising or otherwise to promote the sale, use orother dealings in this Software without prior written authorizationfrom The Open Group.
*/
#ifndef _X11_CURSORFONT_H_#define _X11_CURSORFONT_H_
#define XC_num_glyphs 154#define XC_X_cursor 0#define XC_arrow 2#define XC_based_arrow_down 4#define XC_based_arrow_up 6#define XC_boat 8#define XC_bogosity 10#define XC_bottom_left_corner 12#define XC_bottom_right_corner 14#define XC_bottom_side 16#define XC_bottom_tee 18#define XC_box_spiral 20#define XC_center_ptr 22#define XC_circle 24#define XC_clock 26#define XC_coffee_mug 28#define XC_cross 30#define XC_cross_reverse 32#define XC_crosshair 34#define XC_diamond_cross 36#define XC_dot 38#define XC_dotbox 40#define XC_double_arrow 42#define XC_draft_large 44#define XC_draft_small 46#define XC_draped_box 48#define XC_exchange 50#define XC_fleur 52#define XC_gobbler 54#define XC_gumby 56#define XC_hand1 58#define XC_hand2 60#define XC_heart 62#define XC_icon 64#define XC_iron_cross 66#define XC_left_ptr 68#define XC_left_side 70#define XC_left_tee 72#define XC_leftbutton 74#define XC_ll_angle 76#define XC_lr_angle 78#define XC_man 80#define XC_middlebutton 82#define XC_mouse 84#define XC_pencil 86#define XC_pirate 88#define XC_plus 90#define XC_question_arrow 92#define XC_right_ptr 94#define XC_right_side 96#define XC_right_tee 98#define XC_rightbutton 100#define XC_rtl_logo 102#define XC_sailboat 104#define XC_sb_down_arrow 106#define XC_sb_h_double_arrow 108#define XC_sb_left_arrow 110#define XC_sb_right_arrow 112#define XC_sb_up_arrow 114#define XC_sb_v_double_arrow 116#define XC_shuttle 118#define XC_sizing 120#define XC_spider 122#define XC_spraycan 124#define XC_star 126#define XC_target 128#define XC_tcross 130#define XC_top_left_arrow 132#define XC_top_left_corner 134#define XC_top_right_corner 136#define XC_top_side 138#define XC_top_tee 140#define XC_trek 142#define XC_ul_angle 144#define XC_umbrella 146#define XC_ur_angle 148#define XC_watch 150#define XC_xterm 152
#endif /* _X11_CURSORFONT_H_ */1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.Copyright 2000 VA Linux Systems, Inc.All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining acopy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, includingwithout limitation the rights to use, copy, modify, merge, publish,distribute, sub license, and/or sell copies of the Software, and topermit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice (including thenext paragraph) shall be included in all copies or substantial portionsof the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FORANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THESOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/** * \file xf86dri.h * Protocol numbers and function prototypes for DRI X protocol. * * \author Kevin E. Martin <martin@valinux.com> * \author Jens Owen <jens@tungstengraphics.com> * \author Rickard E. (Rik) Faith <faith@valinux.com> */
#ifndef _XF86DRI_H_#define _XF86DRI_H_
#include <xf86drm.h>
#define X_XF86DRIQueryVersion 0#define X_XF86DRIQueryDirectRenderingCapable 1#define X_XF86DRIOpenConnection 2#define X_XF86DRICloseConnection 3#define X_XF86DRIGetClientDriverName 4#define X_XF86DRICreateContext 5#define X_XF86DRIDestroyContext 6#define X_XF86DRICreateDrawable 7#define X_XF86DRIDestroyDrawable 8#define X_XF86DRIGetDrawableInfo 9#define X_XF86DRIGetDeviceInfo 10#define X_XF86DRIAuthConnection 11#define X_XF86DRIOpenFullScreen 12 /* Deprecated */#define X_XF86DRICloseFullScreen 13 /* Deprecated */
#define XF86DRINumberEvents 0
#define XF86DRIClientNotLocal 0#define XF86DRIOperationNotSupported 1#define XF86DRINumberErrors (XF86DRIOperationNotSupported + 1)
#endif /* _XF86DRI_H_ */
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.Copyright 2000 VA Linux Systems, Inc.All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining acopy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, includingwithout limitation the rights to use, copy, modify, merge, publish,distribute, sub license, and/or sell copies of the Software, and topermit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice (including thenext paragraph) shall be included in all copies or substantial portionsof the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FORANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THESOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/* * Authors: * Kevin E. Martin <martin@valinux.com> * Jens Owen <jens@tungstengraphics.com> * Rickard E. (Rik) Faith <faith@valinux.com> * */
#ifndef _XF86DRISTR_H_#define _XF86DRISTR_H_
#include "xf86dri.h"
#define XF86DRINAME "XFree86-DRI"
/* The DRI version number. This was originally set to be the same of the * XFree86 version number. However, this version is really independent of * the XFree86 version. * * Version History: * 4.0.0: Original * 4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02 * 4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02 */#define XF86DRI_MAJOR_VERSION 4#define XF86DRI_MINOR_VERSION 1#define XF86DRI_PATCH_VERSION 0
typedef struct _XF86DRIQueryVersion { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIQueryVersion */ CARD16 length;} xXF86DRIQueryVersionReq;#define sz_xXF86DRIQueryVersionReq 4
typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of DRI protocol */ CARD16 minorVersion; /* minor version of DRI protocol */ CARD32 patchVersion; /* patch version of DRI protocol */ CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6;} xXF86DRIQueryVersionReply;#define sz_xXF86DRIQueryVersionReply 32
typedef struct _XF86DRIQueryDirectRenderingCapable { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */ CARD16 length; CARD32 screen;} xXF86DRIQueryDirectRenderingCapableReq;#define sz_xXF86DRIQueryDirectRenderingCapableReq 8
typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; BOOL isCapable; BOOL pad2; BOOL pad3; BOOL pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; CARD32 pad8; CARD32 pad9;} xXF86DRIQueryDirectRenderingCapableReply;#define sz_xXF86DRIQueryDirectRenderingCapableReply 32
typedef struct _XF86DRIOpenConnection { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIOpenConnection */ CARD16 length; CARD32 screen;} xXF86DRIOpenConnectionReq;#define sz_xXF86DRIOpenConnectionReq 8
typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 hSAREALow; CARD32 hSAREAHigh; CARD32 busIdStringLength; CARD32 pad6; CARD32 pad7; CARD32 pad8;} xXF86DRIOpenConnectionReply;#define sz_xXF86DRIOpenConnectionReply 32
typedef struct _XF86DRIAuthConnection { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICloseConnection */ CARD16 length; CARD32 screen; CARD32 magic;} xXF86DRIAuthConnectionReq;#define sz_xXF86DRIAuthConnectionReq 12
typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 authenticated; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6;} xXF86DRIAuthConnectionReply;#define zx_xXF86DRIAuthConnectionReply 32
typedef struct _XF86DRICloseConnection { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICloseConnection */ CARD16 length; CARD32 screen;} xXF86DRICloseConnectionReq;#define sz_xXF86DRICloseConnectionReq 8
typedef struct _XF86DRIGetClientDriverName { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIGetClientDriverName */ CARD16 length; CARD32 screen;} xXF86DRIGetClientDriverNameReq;#define sz_xXF86DRIGetClientDriverNameReq 8
typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 ddxDriverMajorVersion; CARD32 ddxDriverMinorVersion; CARD32 ddxDriverPatchVersion; CARD32 clientDriverNameLength; CARD32 pad5; CARD32 pad6;} xXF86DRIGetClientDriverNameReply;#define sz_xXF86DRIGetClientDriverNameReply 32
typedef struct _XF86DRICreateContext { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICreateContext */ CARD16 length; CARD32 screen; CARD32 visual; CARD32 context;} xXF86DRICreateContextReq;#define sz_xXF86DRICreateContextReq 16
typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 hHWContext; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6;} xXF86DRICreateContextReply;#define sz_xXF86DRICreateContextReply 32
typedef struct _XF86DRIDestroyContext { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIDestroyContext */ CARD16 length; CARD32 screen; CARD32 context;} xXF86DRIDestroyContextReq;#define sz_xXF86DRIDestroyContextReq 12
typedef struct _XF86DRICreateDrawable { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICreateDrawable */ CARD16 length; CARD32 screen; CARD32 drawable;} xXF86DRICreateDrawableReq;#define sz_xXF86DRICreateDrawableReq 12
typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 hHWDrawable; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6;} xXF86DRICreateDrawableReply;#define sz_xXF86DRICreateDrawableReply 32
typedef struct _XF86DRIDestroyDrawable { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIDestroyDrawable */ CARD16 length; CARD32 screen; CARD32 drawable;} xXF86DRIDestroyDrawableReq;#define sz_xXF86DRIDestroyDrawableReq 12
typedef struct _XF86DRIGetDrawableInfo { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIGetDrawableInfo */ CARD16 length; CARD32 screen; CARD32 drawable;} xXF86DRIGetDrawableInfoReq;#define sz_xXF86DRIGetDrawableInfoReq 12
typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 drawableTableIndex; CARD32 drawableTableStamp; INT16 drawableX; INT16 drawableY; INT16 drawableWidth; INT16 drawableHeight; CARD32 numClipRects; INT16 backX; INT16 backY; CARD32 numBackClipRects;} xXF86DRIGetDrawableInfoReply;
#define sz_xXF86DRIGetDrawableInfoReply 36
typedef struct _XF86DRIGetDeviceInfo { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIGetDeviceInfo */ CARD16 length; CARD32 screen;} xXF86DRIGetDeviceInfoReq;#define sz_xXF86DRIGetDeviceInfoReq 8
typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 hFrameBufferLow; CARD32 hFrameBufferHigh; CARD32 framebufferOrigin; CARD32 framebufferSize; CARD32 framebufferStride; CARD32 devPrivateSize;} xXF86DRIGetDeviceInfoReply;#define sz_xXF86DRIGetDeviceInfoReply 32
typedef struct _XF86DRIOpenFullScreen { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIOpenFullScreen */ CARD16 length; CARD32 screen; CARD32 drawable;} xXF86DRIOpenFullScreenReq;#define sz_xXF86DRIOpenFullScreenReq 12
typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 isFullScreen; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6;} xXF86DRIOpenFullScreenReply;#define sz_xXF86DRIOpenFullScreenReply 32
typedef struct _XF86DRICloseFullScreen { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICloseFullScreen */ CARD16 length; CARD32 screen; CARD32 drawable;} xXF86DRICloseFullScreenReq;#define sz_xXF86DRICloseFullScreenReq 12
typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7;} xXF86DRICloseFullScreenReply;#define sz_xXF86DRICloseFullScreenReply 32
#endif /* _XF86DRISTR_H_ */123#warning "xf86dristr.h is obsolete and may be removed in the future."#warning "include <X11/dri/xf86driproto.h> for the protocol defines."#include <X11/dri/xf86driproto.h>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786/************************************************************Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute thissoftware and its documentation for any purpose and withoutfee is hereby granted, provided that the above copyrightnotice appear in all copies and that both that copyrightnotice and this permission notice appear in supportingdocumentation, and that the name of Silicon Graphics not beused in advertising or publicity pertaining to distributionof the software without specific prior written permission.Silicon Graphics makes no representation about the suitabilityof this software for any purpose. It is provided "as is"without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THISSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITYAND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICONGRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIALDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCEOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITHTHE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#ifndef _XKB_H_#define _XKB_H_
/* * XKB request codes, used in: * - xkbReqType field of all requests * - requestMinor field of some events */#define X_kbUseExtension 0#define X_kbSelectEvents 1#define X_kbBell 3#define X_kbGetState 4#define X_kbLatchLockState 5#define X_kbGetControls 6#define X_kbSetControls 7#define X_kbGetMap 8#define X_kbSetMap 9#define X_kbGetCompatMap 10#define X_kbSetCompatMap 11#define X_kbGetIndicatorState 12#define X_kbGetIndicatorMap 13#define X_kbSetIndicatorMap 14#define X_kbGetNamedIndicator 15#define X_kbSetNamedIndicator 16#define X_kbGetNames 17#define X_kbSetNames 18#define X_kbGetGeometry 19#define X_kbSetGeometry 20#define X_kbPerClientFlags 21#define X_kbListComponents 22#define X_kbGetKbdByName 23#define X_kbGetDeviceInfo 24#define X_kbSetDeviceInfo 25#define X_kbSetDebuggingFlags 101
/* * In the X sense, XKB reports only one event. * The type field of all XKB events is XkbEventCode */#define XkbEventCode 0#define XkbNumberEvents (XkbEventCode+1)
/* * XKB has a minor event code so it can use one X event code for * multiple purposes. * - reported in the xkbType field of all XKB events. * - XkbSelectEventDetails: Indicates the event for which event details * are being changed */#define XkbNewKeyboardNotify 0#define XkbMapNotify 1#define XkbStateNotify 2#define XkbControlsNotify 3#define XkbIndicatorStateNotify 4#define XkbIndicatorMapNotify 5#define XkbNamesNotify 6#define XkbCompatMapNotify 7#define XkbBellNotify 8#define XkbActionMessage 9#define XkbAccessXNotify 10#define XkbExtensionDeviceNotify 11
/* * Event Mask: * - XkbSelectEvents: Specifies event interest. */#define XkbNewKeyboardNotifyMask (1L << 0)#define XkbMapNotifyMask (1L << 1)#define XkbStateNotifyMask (1L << 2)#define XkbControlsNotifyMask (1L << 3)#define XkbIndicatorStateNotifyMask (1L << 4)#define XkbIndicatorMapNotifyMask (1L << 5)#define XkbNamesNotifyMask (1L << 6)#define XkbCompatMapNotifyMask (1L << 7)#define XkbBellNotifyMask (1L << 8)#define XkbActionMessageMask (1L << 9)#define XkbAccessXNotifyMask (1L << 10)#define XkbExtensionDeviceNotifyMask (1L << 11)#define XkbAllEventsMask (0xFFF)
/* * NewKeyboardNotify event details: */#define XkbNKN_KeycodesMask (1L << 0)#define XkbNKN_GeometryMask (1L << 1)#define XkbNKN_DeviceIDMask (1L << 2)#define XkbAllNewKeyboardEventsMask (0x7)
/* * AccessXNotify event types: * - The 'what' field of AccessXNotify events reports the * reason that the event was generated. */#define XkbAXN_SKPress 0#define XkbAXN_SKAccept 1#define XkbAXN_SKReject 2#define XkbAXN_SKRelease 3#define XkbAXN_BKAccept 4#define XkbAXN_BKReject 5#define XkbAXN_AXKWarning 6
/* * AccessXNotify details: * - Used as an event detail mask to limit the conditions under which * AccessXNotify events are reported */#define XkbAXN_SKPressMask (1L << 0)#define XkbAXN_SKAcceptMask (1L << 1)#define XkbAXN_SKRejectMask (1L << 2)#define XkbAXN_SKReleaseMask (1L << 3)#define XkbAXN_BKAcceptMask (1L << 4)#define XkbAXN_BKRejectMask (1L << 5)#define XkbAXN_AXKWarningMask (1L << 6)#define XkbAllAccessXEventsMask (0x7f)
/* * Miscellaneous event details: * - event detail masks for assorted events that don't really * have any details. */#define XkbAllStateEventsMask XkbAllStateComponentsMask#define XkbAllMapEventsMask XkbAllMapComponentsMask#define XkbAllControlEventsMask XkbAllControlsMask#define XkbAllIndicatorEventsMask XkbAllIndicatorsMask#define XkbAllNameEventsMask XkbAllNamesMask#define XkbAllCompatMapEventsMask XkbAllCompatMask#define XkbAllBellEventsMask (1L << 0)#define XkbAllActionMessagesMask (1L << 0)
/* * XKB reports one error: BadKeyboard * A further reason for the error is encoded into to most significant * byte of the resourceID for the error: * XkbErr_BadDevice - the device in question was not found * XkbErr_BadClass - the device was found but it doesn't belong to * the appropriate class. * XkbErr_BadId - the device was found and belongs to the right * class, but not feedback with a matching id was * found. * The low byte of the resourceID for this error contains the device * id, class specifier or feedback id that failed. */#define XkbKeyboard 0#define XkbNumberErrors 1
#define XkbErr_BadDevice 0xff#define XkbErr_BadClass 0xfe#define XkbErr_BadId 0xfd
/* * Keyboard Components Mask: * - Specifies the components that follow a GetKeyboardByNameReply */#define XkbClientMapMask (1L << 0)#define XkbServerMapMask (1L << 1)#define XkbCompatMapMask (1L << 2)#define XkbIndicatorMapMask (1L << 3)#define XkbNamesMask (1L << 4)#define XkbGeometryMask (1L << 5)#define XkbControlsMask (1L << 6)#define XkbAllComponentsMask (0x7f)
/* * State detail mask: * - The 'changed' field of StateNotify events reports which of * the keyboard state components have changed. * - Used as an event detail mask to limit the conditions under * which StateNotify events are reported. */#define XkbModifierStateMask (1L << 0)#define XkbModifierBaseMask (1L << 1)#define XkbModifierLatchMask (1L << 2)#define XkbModifierLockMask (1L << 3)#define XkbGroupStateMask (1L << 4)#define XkbGroupBaseMask (1L << 5)#define XkbGroupLatchMask (1L << 6)#define XkbGroupLockMask (1L << 7)#define XkbCompatStateMask (1L << 8)#define XkbGrabModsMask (1L << 9)#define XkbCompatGrabModsMask (1L << 10)#define XkbLookupModsMask (1L << 11)#define XkbCompatLookupModsMask (1L << 12)#define XkbPointerButtonMask (1L << 13)#define XkbAllStateComponentsMask (0x3fff)
/* * Controls detail masks: * The controls specified in XkbAllControlsMask: * - The 'changed' field of ControlsNotify events reports which of * the keyboard controls have changed. * - The 'changeControls' field of the SetControls request specifies * the controls for which values are to be changed. * - Used as an event detail mask to limit the conditions under * which ControlsNotify events are reported. * * The controls specified in the XkbAllBooleanCtrlsMask: * - The 'enabledControls' field of ControlsNotify events reports the * current status of the boolean controls. * - The 'enabledControlsChanges' field of ControlsNotify events reports * any boolean controls that have been turned on or off. * - The 'affectEnabledControls' and 'enabledControls' fields of the * kbSetControls request change the set of enabled controls. * - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of * an XkbControlsRec specify the controls to be changed if the keyboard * times out and the values to which they should be changed. * - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags * request specifies the specify the controls to be reset when the * client exits and the values to which they should be reset. * - The 'ctrls' field of an indicator map specifies the controls * that drive the indicator. * - Specifies the boolean controls affected by the SetControls and * LockControls key actions. */#define XkbRepeatKeysMask (1L << 0)#define XkbSlowKeysMask (1L << 1)#define XkbBounceKeysMask (1L << 2)#define XkbStickyKeysMask (1L << 3)#define XkbMouseKeysMask (1L << 4)#define XkbMouseKeysAccelMask (1L << 5)#define XkbAccessXKeysMask (1L << 6)#define XkbAccessXTimeoutMask (1L << 7)#define XkbAccessXFeedbackMask (1L << 8)#define XkbAudibleBellMask (1L << 9)#define XkbOverlay1Mask (1L << 10)#define XkbOverlay2Mask (1L << 11)#define XkbIgnoreGroupLockMask (1L << 12)#define XkbGroupsWrapMask (1L << 27)#define XkbInternalModsMask (1L << 28)#define XkbIgnoreLockModsMask (1L << 29)#define XkbPerKeyRepeatMask (1L << 30)#define XkbControlsEnabledMask (1L << 31)
#define XkbAccessXOptionsMask (XkbStickyKeysMask|XkbAccessXFeedbackMask)
#define XkbAllBooleanCtrlsMask (0x00001FFF)#define XkbAllControlsMask (0xF8001FFF)#define XkbAllControlEventsMask XkbAllControlsMask
/* * AccessX Options Mask * - The 'accessXOptions' field of an XkbControlsRec specifies the * AccessX options that are currently in effect. * - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues' * fields of an XkbControlsRec specify the Access X options to be * changed if the keyboard times out and the values to which they * should be changed. */#define XkbAX_SKPressFBMask (1L << 0)#define XkbAX_SKAcceptFBMask (1L << 1)#define XkbAX_FeatureFBMask (1L << 2)#define XkbAX_SlowWarnFBMask (1L << 3)#define XkbAX_IndicatorFBMask (1L << 4)#define XkbAX_StickyKeysFBMask (1L << 5)#define XkbAX_TwoKeysMask (1L << 6)#define XkbAX_LatchToLockMask (1L << 7)#define XkbAX_SKReleaseFBMask (1L << 8)#define XkbAX_SKRejectFBMask (1L << 9)#define XkbAX_BKRejectFBMask (1L << 10)#define XkbAX_DumbBellFBMask (1L << 11)#define XkbAX_FBOptionsMask (0xF3F)#define XkbAX_SKOptionsMask (0x0C0)#define XkbAX_AllOptionsMask (0xFFF)
/* * XkbUseCoreKbd is used to specify the core keyboard without having * to look up its X input extension identifier. * XkbUseCorePtr is used to specify the core pointer without having * to look up its X input extension identifier. * XkbDfltXIClass is used to specify "don't care" any place that the * XKB protocol is looking for an X Input Extension * device class. * XkbDfltXIId is used to specify "don't care" any place that the * XKB protocol is looking for an X Input Extension * feedback identifier. * XkbAllXIClasses is used to get information about all device indicators, * whether they're part of the indicator feedback class * or the keyboard feedback class. * XkbAllXIIds is used to get information about all device indicator * feedbacks without having to list them. * XkbXINone is used to indicate that no class or id has been specified. * XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs * XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells * XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device * XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class * XkbExplicitXIId(c) True if 'i' explicitly specifies a device id * XkbSingleXIClass(c) True if 'c' specifies exactly one device class, * including the default. * XkbSingleXIId(i) True if 'i' specifies exactly one device * identifier, including the default. */#define XkbUseCoreKbd 0x0100#define XkbUseCorePtr 0x0200#define XkbDfltXIClass 0x0300#define XkbDfltXIId 0x0400#define XkbAllXIClasses 0x0500#define XkbAllXIIds 0x0600#define XkbXINone 0xff00
#define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||\ ((c)==LedFeedbackClass)||\ ((c)==XkbDfltXIClass)||\ ((c)==XkbAllXIClasses))#define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||\ ((c)==BellFeedbackClass)||\ ((c)==XkbDfltXIClass)||\ ((c)==XkbAllXIClasses))#define XkbExplicitXIDevice(c) (((c)&(~0xff))==0)#define XkbExplicitXIClass(c) (((c)&(~0xff))==0)#define XkbExplicitXIId(c) (((c)&(~0xff))==0)#define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass))#define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId))
#define XkbNoModifier 0xff#define XkbNoShiftLevel 0xff#define XkbNoShape 0xff#define XkbNoIndicator 0xff
#define XkbNoModifierMask 0#define XkbAllModifiersMask 0xff#define XkbAllVirtualModsMask 0xffff
#define XkbNumKbdGroups 4#define XkbMaxKbdGroup (XkbNumKbdGroups-1)
#define XkbMaxMouseKeysBtn 4
/* * Group Index and Mask: * - Indices into the kt_index array of a key type. * - Mask specifies types to be changed for XkbChangeTypesOfKey */#define XkbGroup1Index 0#define XkbGroup2Index 1#define XkbGroup3Index 2#define XkbGroup4Index 3#define XkbAnyGroup 254#define XkbAllGroups 255
#define XkbGroup1Mask (1<<0)#define XkbGroup2Mask (1<<1)#define XkbGroup3Mask (1<<2)#define XkbGroup4Mask (1<<3)#define XkbAnyGroupMask (1<<7)#define XkbAllGroupsMask (0xf)
/* * BuildCoreState: Given a keyboard group and a modifier state, * construct the value to be reported an event. * GroupForCoreState: Given the state reported in an event, * determine the keyboard group. * IsLegalGroup: Returns TRUE if 'g' is a valid group index. */#define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff))#define XkbGroupForCoreState(s) (((s)>>13)&0x3)#define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups))
/* * GroupsWrap values: * - The 'groupsWrap' field of an XkbControlsRec specifies the * treatment of out of range groups. * - Bits 6 and 7 of the group info field of a key symbol map * specify the interpretation of out of range groups for the * corresponding key. */#define XkbWrapIntoRange (0x00)#define XkbClampIntoRange (0x40)#define XkbRedirectIntoRange (0x80)
/* * Action flags: Reported in the 'flags' field of most key actions. * Interpretation depends on the type of the action; not all actions * accept all flags. * * Option Used for Actions * ------ ---------------- * ClearLocks SetMods, LatchMods, SetGroup, LatchGroup * LatchToLock SetMods, LatchMods, SetGroup, LatchGroup * LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn * LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn * UseModMapMods SetMods, LatchMods, LockMods, ISOLock * GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock * UseDfltButton PtrBtn, LockPtrBtn * NoAcceleration MovePtr * MoveAbsoluteX MovePtr * MoveAbsoluteY MovePtr * ISODfltIsGroup ISOLock * ISONoAffectMods ISOLock * ISONoAffectGroup ISOLock * ISONoAffectPtr ISOLock * ISONoAffectCtrls ISOLock * MessageOnPress ActionMessage * MessageOnRelease ActionMessage * MessageGenKeyEvent ActionMessage * AffectDfltBtn SetPtrDflt * DfltBtnAbsolute SetPtrDflt * SwitchApplication SwitchScreen * SwitchAbsolute SwitchScreen */
#define XkbSA_ClearLocks (1L << 0)#define XkbSA_LatchToLock (1L << 1)
#define XkbSA_LockNoLock (1L << 0)#define XkbSA_LockNoUnlock (1L << 1)
#define XkbSA_UseModMapMods (1L << 2)
#define XkbSA_GroupAbsolute (1L << 2)#define XkbSA_UseDfltButton 0
#define XkbSA_NoAcceleration (1L << 0)#define XkbSA_MoveAbsoluteX (1L << 1)#define XkbSA_MoveAbsoluteY (1L << 2)
#define XkbSA_ISODfltIsGroup (1L << 7)#define XkbSA_ISONoAffectMods (1L << 6)#define XkbSA_ISONoAffectGroup (1L << 5)#define XkbSA_ISONoAffectPtr (1L << 4)#define XkbSA_ISONoAffectCtrls (1L << 3)#define XkbSA_ISOAffectMask (0x78)
#define XkbSA_MessageOnPress (1L << 0)#define XkbSA_MessageOnRelease (1L << 1)#define XkbSA_MessageGenKeyEvent (1L << 2)
#define XkbSA_AffectDfltBtn 1#define XkbSA_DfltBtnAbsolute (1L << 2)
#define XkbSA_SwitchApplication (1L << 0)#define XkbSA_SwitchAbsolute (1L << 2)
/* * The following values apply to the SA_DeviceValuator * action only. Valuator operations specify the action * to be taken. Values specified in the action are * multiplied by 2^scale before they are applied. */#define XkbSA_IgnoreVal (0x00)#define XkbSA_SetValMin (0x10)#define XkbSA_SetValCenter (0x20)#define XkbSA_SetValMax (0x30)#define XkbSA_SetValRelative (0x40)#define XkbSA_SetValAbsolute (0x50)#define XkbSA_ValOpMask (0x70)#define XkbSA_ValScaleMask (0x07)#define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask)#define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask)
/* * Action types: specifies the type of a key action. Reported in the * type field of all key actions. */#define XkbSA_NoAction 0x00#define XkbSA_SetMods 0x01#define XkbSA_LatchMods 0x02#define XkbSA_LockMods 0x03#define XkbSA_SetGroup 0x04#define XkbSA_LatchGroup 0x05#define XkbSA_LockGroup 0x06#define XkbSA_MovePtr 0x07#define XkbSA_PtrBtn 0x08#define XkbSA_LockPtrBtn 0x09#define XkbSA_SetPtrDflt 0x0a#define XkbSA_ISOLock 0x0b#define XkbSA_Terminate 0x0c#define XkbSA_SwitchScreen 0x0d#define XkbSA_SetControls 0x0e#define XkbSA_LockControls 0x0f#define XkbSA_ActionMessage 0x10#define XkbSA_RedirectKey 0x11#define XkbSA_DeviceBtn 0x12#define XkbSA_LockDeviceBtn 0x13#define XkbSA_DeviceValuator 0x14#define XkbSA_LastAction XkbSA_DeviceValuator#define XkbSA_NumActions (XkbSA_LastAction+1)
#define XkbSA_XFree86Private 0x86
/* * Specifies the key actions that clear latched groups or modifiers. */#define XkbSA_BreakLatch \ ((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\ (1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\ (1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\ (1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn))
/* * Macros to classify key actions */#define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods))#define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup))#define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt))
/* * Key Behavior Qualifier: * KB_Permanent indicates that the behavior describes an unalterable * characteristic of the keyboard, not an XKB software-simulation of * the listed behavior. * Key Behavior Types: * Specifies the behavior of the underlying key. */#define XkbKB_Permanent 0x80#define XkbKB_OpMask 0x7f
#define XkbKB_Default 0x00#define XkbKB_Lock 0x01#define XkbKB_RadioGroup 0x02#define XkbKB_Overlay1 0x03#define XkbKB_Overlay2 0x04
#define XkbKB_RGAllowNone 0x80
/* * Various macros which describe the range of legal keycodes. */#define XkbMinLegalKeyCode 8#define XkbMaxLegalKeyCode 255#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1)#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)/* Seems kinda silly to check that an unsigned char is <= 255... */#define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode)
/* * Assorted constants and limits. */#define XkbNumModifiers 8#define XkbNumVirtualMods 16#define XkbNumIndicators 32#define XkbAllIndicatorsMask (0xffffffff)#define XkbMaxRadioGroups 32#define XkbAllRadioGroupsMask (0xffffffff)#define XkbMaxShiftLevel 63#define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups)#define XkbRGMaxMembers 12#define XkbActionMessageLength 6#define XkbKeyNameLength 4#define XkbMaxRedirectCount 8
#define XkbGeomPtsPerMM 10#define XkbGeomMaxColors 32#define XkbGeomMaxLabelColors 3#define XkbGeomMaxPriority 255
/* * Key Type index and mask for the four standard key types. */#define XkbOneLevelIndex 0#define XkbTwoLevelIndex 1#define XkbAlphabeticIndex 2#define XkbKeypadIndex 3#define XkbLastRequiredType XkbKeypadIndex#define XkbNumRequiredTypes (XkbLastRequiredType+1)#define XkbMaxKeyTypes 255
#define XkbOneLevelMask (1<<0)#define XkbTwoLevelMask (1<<1)#define XkbAlphabeticMask (1<<2)#define XkbKeypadMask (1<<3)#define XkbAllRequiredTypes (0xf)
#define XkbShiftLevel(n) ((n)-1)#define XkbShiftLevelMask(n) (1<<((n)-1))
/* * Extension name and version information */#define XkbName "XKEYBOARD"#define XkbMajorVersion 1#define XkbMinorVersion 0
/* * Explicit map components: * - Used in the 'explicit' field of an XkbServerMap. Specifies * the keyboard components that should _not_ be updated automatically * in response to core protocol keyboard mapping requests. */#define XkbExplicitKeyTypesMask (0x0f)#define XkbExplicitKeyType1Mask (1<<0)#define XkbExplicitKeyType2Mask (1<<1)#define XkbExplicitKeyType3Mask (1<<2)#define XkbExplicitKeyType4Mask (1<<3)#define XkbExplicitInterpretMask (1<<4)#define XkbExplicitAutoRepeatMask (1<<5)#define XkbExplicitBehaviorMask (1<<6)#define XkbExplicitVModMapMask (1<<7)#define XkbAllExplicitMask (0xff)
/* * Map components masks: * Those in AllMapComponentsMask: * - Specifies the individual fields to be loaded or changed for the * GetMap and SetMap requests. * Those in ClientInfoMask: * - Specifies the components to be allocated by XkbAllocClientMap. * Those in ServerInfoMask: * - Specifies the components to be allocated by XkbAllocServerMap. */#define XkbKeyTypesMask (1<<0)#define XkbKeySymsMask (1<<1)#define XkbModifierMapMask (1<<2)#define XkbExplicitComponentsMask (1<<3)#define XkbKeyActionsMask (1<<4)#define XkbKeyBehaviorsMask (1<<5)#define XkbVirtualModsMask (1<<6)#define XkbVirtualModMapMask (1<<7)
#define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask)#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask)#define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask)
/* * Symbol interpretations flags: * - Used in the flags field of a symbol interpretation */#define XkbSI_AutoRepeat (1<<0)#define XkbSI_LockingKey (1<<1)
/* * Symbol interpretations match specification: * - Used in the match field of a symbol interpretation to specify * the conditions under which an interpretation is used. */#define XkbSI_LevelOneOnly (0x80)#define XkbSI_OpMask (0x7f)#define XkbSI_NoneOf (0)#define XkbSI_AnyOfOrNone (1)#define XkbSI_AnyOf (2)#define XkbSI_AllOf (3)#define XkbSI_Exactly (4)
/* * Indicator map flags: * - Used in the flags field of an indicator map to indicate the * conditions under which and indicator can be changed and the * effects of changing the indicator. */#define XkbIM_NoExplicit (1L << 7)#define XkbIM_NoAutomatic (1L << 6)#define XkbIM_LEDDrivesKB (1L << 5)
/* * Indicator map component specifications: * - Used by the 'which_groups' and 'which_mods' fields of an indicator * map to specify which keyboard components should be used to drive * the indicator. */#define XkbIM_UseBase (1L << 0)#define XkbIM_UseLatched (1L << 1)#define XkbIM_UseLocked (1L << 2)#define XkbIM_UseEffective (1L << 3)#define XkbIM_UseCompat (1L << 4)
#define XkbIM_UseNone 0#define XkbIM_UseAnyGroup (XkbIM_UseBase|XkbIM_UseLatched|XkbIM_UseLocked\ |XkbIM_UseEffective)#define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat)
/* * Compatibility Map Components: * - Specifies the components to be allocated in XkbAllocCompatMap. */#define XkbSymInterpMask (1<<0)#define XkbGroupCompatMask (1<<1)#define XkbAllCompatMask (0x3)
/* * Names component mask: * - Specifies the names to be loaded or changed for the GetNames and * SetNames requests. * - Specifies the names that have changed in a NamesNotify event. * - Specifies the names components to be allocated by XkbAllocNames. */#define XkbKeycodesNameMask (1<<0)#define XkbGeometryNameMask (1<<1)#define XkbSymbolsNameMask (1<<2)#define XkbPhysSymbolsNameMask (1<<3)#define XkbTypesNameMask (1<<4)#define XkbCompatNameMask (1<<5)#define XkbKeyTypeNamesMask (1<<6)#define XkbKTLevelNamesMask (1<<7)#define XkbIndicatorNamesMask (1<<8)#define XkbKeyNamesMask (1<<9)#define XkbKeyAliasesMask (1<<10)#define XkbVirtualModNamesMask (1<<11)#define XkbGroupNamesMask (1<<12)#define XkbRGNamesMask (1<<13)#define XkbComponentNamesMask (0x3f)#define XkbAllNamesMask (0x3fff)
/* * GetByName components: * - Specifies desired or necessary components to GetKbdByName request. * - Reports the components that were found in a GetKbdByNameReply */#define XkbGBN_TypesMask (1L << 0)#define XkbGBN_CompatMapMask (1L << 1)#define XkbGBN_ClientSymbolsMask (1L << 2)#define XkbGBN_ServerSymbolsMask (1L << 3)#define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask)#define XkbGBN_IndicatorMapMask (1L << 4)#define XkbGBN_KeyNamesMask (1L << 5)#define XkbGBN_GeometryMask (1L << 6)#define XkbGBN_OtherNamesMask (1L << 7)#define XkbGBN_AllComponentsMask (0xff)
/* * ListComponents flags */#define XkbLC_Hidden (1L << 0)#define XkbLC_Default (1L << 1)#define XkbLC_Partial (1L << 2)
#define XkbLC_AlphanumericKeys (1L << 8)#define XkbLC_ModifierKeys (1L << 9)#define XkbLC_KeypadKeys (1L << 10)#define XkbLC_FunctionKeys (1L << 11)#define XkbLC_AlternateGroup (1L << 12)
/* * X Input Extension Interactions * - Specifies the possible interactions between XKB and the X input * extension * - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo) * XKB information about an extension device. * - Reports the list of supported optional features in the reply to * XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event. * XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify * events to indicate an attempt to use an unsupported feature. */#define XkbXI_KeyboardsMask (1L << 0)#define XkbXI_ButtonActionsMask (1L << 1)#define XkbXI_IndicatorNamesMask (1L << 2)#define XkbXI_IndicatorMapsMask (1L << 3)#define XkbXI_IndicatorStateMask (1L << 4)#define XkbXI_UnsupportedFeatureMask (1L << 15)#define XkbXI_AllFeaturesMask (0x001f)#define XkbXI_AllDeviceFeaturesMask (0x001e)
#define XkbXI_IndicatorsMask (0x001c)#define XkbAllExtensionDeviceEventsMask (0x801f)
/* * Per-Client Flags: * - Specifies flags to be changed by the PerClientFlags request. */#define XkbPCF_DetectableAutoRepeatMask (1L << 0)#define XkbPCF_GrabsUseXKBStateMask (1L << 1)#define XkbPCF_AutoResetControlsMask (1L << 2)#define XkbPCF_LookupStateWhenGrabbed (1L << 3)#define XkbPCF_SendEventUsesXKBState (1L << 4)#define XkbPCF_AllFlagsMask (0x1F)
/* * Debugging flags and controls */#define XkbDF_DisableLocks (1<<0)
#endif /* _XKB_H_ */1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282/************************************************************Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute thissoftware and its documentation for any purpose and withoutfee is hereby granted, provided that the above copyrightnotice appear in all copies and that both that copyrightnotice and this permission notice appear in supportingdocumentation, and that the name of Silicon Graphics not beused in advertising or publicity pertaining to distributionof the software without specific prior written permission.Silicon Graphics makes no representation about the suitabilityof this software for any purpose. It is provided "as is"without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THISSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITYAND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICONGRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIALDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCEOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITHTHE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#ifndef _XKBPROTO_H_#define _XKBPROTO_H_
#include <X11/Xmd.h>#include <X11/Xfuncproto.h>#include <X11/extensions/XKB.h>
#define Window CARD32#define Atom CARD32#define Time CARD32#define KeyCode CARD8#define KeySym CARD32
#define XkbPaddedSize(n) ((((unsigned int)(n)+3) >> 2) << 2)
typedef struct _xkbUseExtension { CARD8 reqType; CARD8 xkbReqType; /* always X_KBUseExtension */ CARD16 length; CARD16 wantedMajor; CARD16 wantedMinor;} xkbUseExtensionReq;#define sz_xkbUseExtensionReq 8
typedef struct _xkbUseExtensionReply { BYTE type; /* X_Reply */ BOOL supported; CARD16 sequenceNumber; CARD32 length; CARD16 serverMajor; CARD16 serverMinor; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5;} xkbUseExtensionReply;#define sz_xkbUseExtensionReply 32
typedef struct _xkbSelectEvents { CARD8 reqType; CARD8 xkbReqType; /* X_KBSelectEvents */ CARD16 length; CARD16 deviceSpec; CARD16 affectWhich; CARD16 clear; CARD16 selectAll; CARD16 affectMap; CARD16 map;} xkbSelectEventsReq;#define sz_xkbSelectEventsReq 16
typedef struct _xkbBell { CARD8 reqType; CARD8 xkbReqType; /* X_KBBell */ CARD16 length; CARD16 deviceSpec; CARD16 bellClass; CARD16 bellID; INT8 percent; BOOL forceSound; BOOL eventOnly; CARD8 pad1; INT16 pitch; INT16 duration; CARD16 pad2; Atom name; Window window;} xkbBellReq;#define sz_xkbBellReq 28
typedef struct _xkbGetState { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetState */ CARD16 length; CARD16 deviceSpec; CARD16 pad;} xkbGetStateReq;#define sz_xkbGetStateReq 8
typedef struct _xkbGetStateReply { BYTE type; BYTE deviceID; CARD16 sequenceNumber; CARD32 length; CARD8 mods; CARD8 baseMods; CARD8 latchedMods; CARD8 lockedMods; CARD8 group; CARD8 lockedGroup; INT16 baseGroup; INT16 latchedGroup; CARD8 compatState; CARD8 grabMods; CARD8 compatGrabMods; CARD8 lookupMods; CARD8 compatLookupMods; CARD8 pad1; CARD16 ptrBtnState; CARD16 pad2; CARD32 pad3;} xkbGetStateReply;#define sz_xkbGetStateReply 32
typedef struct _xkbLatchLockState { CARD8 reqType; CARD8 xkbReqType; /* always X_KBLatchLockState */ CARD16 length; CARD16 deviceSpec; CARD8 affectModLocks; CARD8 modLocks; BOOL lockGroup; CARD8 groupLock; CARD8 affectModLatches; CARD8 modLatches; CARD8 pad; BOOL latchGroup; INT16 groupLatch;} xkbLatchLockStateReq;#define sz_xkbLatchLockStateReq 16
typedef struct _xkbGetControls { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetControls */ CARD16 length; CARD16 deviceSpec; CARD16 pad;} xkbGetControlsReq;#define sz_xkbGetControlsReq 8
typedef struct _xkbGetControlsReply { BYTE type; /* X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD8 mkDfltBtn; CARD8 numGroups; CARD8 groupsWrap; CARD8 internalMods; CARD8 ignoreLockMods; CARD8 internalRealMods; CARD8 ignoreLockRealMods; CARD8 pad1; CARD16 internalVMods; CARD16 ignoreLockVMods; CARD16 repeatDelay; CARD16 repeatInterval; CARD16 slowKeysDelay; CARD16 debounceDelay; CARD16 mkDelay; CARD16 mkInterval; CARD16 mkTimeToMax; CARD16 mkMaxSpeed; INT16 mkCurve; CARD16 axOptions; CARD16 axTimeout; CARD16 axtOptsMask; CARD16 axtOptsValues; CARD16 pad2; CARD32 axtCtrlsMask; CARD32 axtCtrlsValues; CARD32 enabledCtrls; BYTE perKeyRepeat[XkbPerKeyBitArraySize];} xkbGetControlsReply;#define sz_xkbGetControlsReply 92
typedef struct _xkbSetControls { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetControls */ CARD16 length; CARD16 deviceSpec; CARD8 affectInternalMods; CARD8 internalMods; CARD8 affectIgnoreLockMods; CARD8 ignoreLockMods; CARD16 affectInternalVMods; CARD16 internalVMods; CARD16 affectIgnoreLockVMods; CARD16 ignoreLockVMods; CARD8 mkDfltBtn; CARD8 groupsWrap; CARD16 axOptions; CARD16 pad1; CARD32 affectEnabledCtrls; CARD32 enabledCtrls; CARD32 changeCtrls; CARD16 repeatDelay; CARD16 repeatInterval; CARD16 slowKeysDelay; CARD16 debounceDelay; CARD16 mkDelay; CARD16 mkInterval; CARD16 mkTimeToMax; CARD16 mkMaxSpeed; INT16 mkCurve; CARD16 axTimeout; CARD32 axtCtrlsMask; CARD32 axtCtrlsValues; CARD16 axtOptsMask; CARD16 axtOptsValues; BYTE perKeyRepeat[XkbPerKeyBitArraySize];} xkbSetControlsReq;#define sz_xkbSetControlsReq 100
typedef struct _xkbKTMapEntryWireDesc { BOOL active; CARD8 mask; CARD8 level; CARD8 realMods; CARD16 virtualMods; CARD16 pad;} xkbKTMapEntryWireDesc;#define sz_xkbKTMapEntryWireDesc 8
typedef struct _xkbKTSetMapEntryWireDesc { CARD8 level; CARD8 realMods; CARD16 virtualMods;} xkbKTSetMapEntryWireDesc;#define sz_xkbKTSetMapEntryWireDesc 4
typedef struct _xkbModsWireDesc { CARD8 mask; /* GetMap only */ CARD8 realMods; CARD16 virtualMods;} xkbModsWireDesc;#define sz_xkbModsWireDesc 4
typedef struct _xkbKeyTypeWireDesc { CARD8 mask; CARD8 realMods; CARD16 virtualMods; CARD8 numLevels; CARD8 nMapEntries; BOOL preserve; CARD8 pad;} xkbKeyTypeWireDesc;#define sz_xkbKeyTypeWireDesc 8
typedef struct _xkbSymMapWireDesc { CARD8 ktIndex[XkbNumKbdGroups]; CARD8 groupInfo; CARD8 width; CARD16 nSyms;} xkbSymMapWireDesc;#define sz_xkbSymMapWireDesc 8
typedef struct _xkbVModMapWireDesc { KeyCode key; CARD8 pad; CARD16 vmods;} xkbVModMapWireDesc;#define sz_xkbVModMapWireDesc 4
typedef struct _xkbBehaviorWireDesc { CARD8 key; CARD8 type; CARD8 data; CARD8 pad;} xkbBehaviorWireDesc;#define sz_xkbBehaviorWireDesc 4
typedef struct _xkbActionWireDesc { CARD8 type; CARD8 data[7];} xkbActionWireDesc;#define sz_xkbActionWireDesc 8
typedef struct _xkbGetMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetMap */ CARD16 length; CARD16 deviceSpec; CARD16 full; CARD16 partial; CARD8 firstType; CARD8 nTypes; KeyCode firstKeySym; CARD8 nKeySyms; KeyCode firstKeyAct; CARD8 nKeyActs; KeyCode firstKeyBehavior; CARD8 nKeyBehaviors; CARD16 virtualMods; KeyCode firstKeyExplicit; CARD8 nKeyExplicit; KeyCode firstModMapKey; CARD8 nModMapKeys; KeyCode firstVModMapKey; CARD8 nVModMapKeys; CARD16 pad1;} xkbGetMapReq;#define sz_xkbGetMapReq 28
typedef struct _xkbGetMapReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD16 pad1; KeyCode minKeyCode; KeyCode maxKeyCode; CARD16 present; CARD8 firstType; CARD8 nTypes; CARD8 totalTypes; KeyCode firstKeySym; CARD16 totalSyms; CARD8 nKeySyms; KeyCode firstKeyAct; CARD16 totalActs; CARD8 nKeyActs; KeyCode firstKeyBehavior; CARD8 nKeyBehaviors; CARD8 totalKeyBehaviors; KeyCode firstKeyExplicit; CARD8 nKeyExplicit; CARD8 totalKeyExplicit; KeyCode firstModMapKey; CARD8 nModMapKeys; CARD8 totalModMapKeys; KeyCode firstVModMapKey; CARD8 nVModMapKeys; CARD8 totalVModMapKeys; CARD8 pad2; CARD16 virtualMods;} xkbGetMapReply;#define sz_xkbGetMapReply 40
#define XkbSetMapResizeTypes (1L<<0)#define XkbSetMapRecomputeActions (1L<<1)#define XkbSetMapAllFlags (0x3)
typedef struct _xkbSetMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetMap */ CARD16 length; CARD16 deviceSpec; CARD16 present; CARD16 flags; KeyCode minKeyCode; KeyCode maxKeyCode; CARD8 firstType; CARD8 nTypes; KeyCode firstKeySym; CARD8 nKeySyms; CARD16 totalSyms; KeyCode firstKeyAct; CARD8 nKeyActs; CARD16 totalActs; KeyCode firstKeyBehavior; CARD8 nKeyBehaviors; CARD8 totalKeyBehaviors; KeyCode firstKeyExplicit; CARD8 nKeyExplicit; CARD8 totalKeyExplicit; KeyCode firstModMapKey; CARD8 nModMapKeys; CARD8 totalModMapKeys; KeyCode firstVModMapKey; CARD8 nVModMapKeys; CARD8 totalVModMapKeys; CARD16 virtualMods;} xkbSetMapReq;#define sz_xkbSetMapReq 36
typedef struct _xkbSymInterpretWireDesc { CARD32 sym; CARD8 mods; CARD8 match; CARD8 virtualMod; CARD8 flags; xkbActionWireDesc act;} xkbSymInterpretWireDesc;#define sz_xkbSymInterpretWireDesc 16
typedef struct _xkbGetCompatMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetCompatMap */ CARD16 length; CARD16 deviceSpec; CARD8 groups; BOOL getAllSI; CARD16 firstSI; CARD16 nSI;} xkbGetCompatMapReq;#define sz_xkbGetCompatMapReq 12
typedef struct _xkbGetCompatMapReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD8 groups; CARD8 pad1; CARD16 firstSI; CARD16 nSI; CARD16 nTotalSI; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5;} xkbGetCompatMapReply;#define sz_xkbGetCompatMapReply 32
typedef struct _xkbSetCompatMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetCompatMap */ CARD16 length; CARD16 deviceSpec; CARD8 pad1; BOOL recomputeActions; BOOL truncateSI; CARD8 groups; CARD16 firstSI; CARD16 nSI; CARD16 pad2;} xkbSetCompatMapReq;#define sz_xkbSetCompatMapReq 16
typedef struct _xkbGetIndicatorState { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetIndicatorState */ CARD16 length; CARD16 deviceSpec; CARD16 pad1;} xkbGetIndicatorStateReq;#define sz_xkbGetIndicatorStateReq 8
typedef struct _xkbGetIndicatorStateReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD32 state; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5;} xkbGetIndicatorStateReply;#define sz_xkbGetIndicatorStateReply 32
typedef struct _xkbGetIndicatorMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetIndicatorMap */ CARD16 length; CARD16 deviceSpec; CARD16 pad; CARD32 which;} xkbGetIndicatorMapReq;#define sz_xkbGetIndicatorMapReq 12
typedef struct _xkbGetIndicatorMapReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD32 which; CARD32 realIndicators; CARD8 nIndicators; CARD8 pad1; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5;} xkbGetIndicatorMapReply;#define sz_xkbGetIndicatorMapReply 32
typedef struct _xkbIndicatorMapWireDesc { CARD8 flags; CARD8 whichGroups; CARD8 groups; CARD8 whichMods; CARD8 mods; CARD8 realMods; CARD16 virtualMods; CARD32 ctrls;} xkbIndicatorMapWireDesc;#define sz_xkbIndicatorMapWireDesc 12
typedef struct _xkbSetIndicatorMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetIndicatorMap */ CARD16 length; CARD16 deviceSpec; CARD16 pad1; CARD32 which;} xkbSetIndicatorMapReq;#define sz_xkbSetIndicatorMapReq 12
typedef struct _xkbGetNamedIndicator { CARD8 reqType; CARD8 xkbReqType; /* X_KBGetNamedIndicator */ CARD16 length; CARD16 deviceSpec; CARD16 ledClass; CARD16 ledID; CARD16 pad1; Atom indicator;} xkbGetNamedIndicatorReq;#define sz_xkbGetNamedIndicatorReq 16
typedef struct _xkbGetNamedIndicatorReply { BYTE type; BYTE deviceID; CARD16 sequenceNumber; CARD32 length; Atom indicator; BOOL found; BOOL on; BOOL realIndicator; CARD8 ndx; CARD8 flags; CARD8 whichGroups; CARD8 groups; CARD8 whichMods; CARD8 mods; CARD8 realMods; CARD16 virtualMods; CARD32 ctrls; BOOL supported; CARD8 pad1; CARD16 pad2;} xkbGetNamedIndicatorReply;#define sz_xkbGetNamedIndicatorReply 32
typedef struct _xkbSetNamedIndicator { CARD8 reqType; CARD8 xkbReqType; /* X_KBSetNamedIndicator */ CARD16 length; CARD16 deviceSpec; CARD16 ledClass; CARD16 ledID; CARD16 pad1; Atom indicator; BOOL setState; BOOL on; BOOL setMap; BOOL createMap; CARD8 pad2; CARD8 flags; CARD8 whichGroups; CARD8 groups; CARD8 whichMods; CARD8 realMods; CARD16 virtualMods; CARD32 ctrls;} xkbSetNamedIndicatorReq;#define sz_xkbSetNamedIndicatorReq 32
typedef struct _xkbGetNames { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetNames */ CARD16 length; CARD16 deviceSpec; CARD16 pad; CARD32 which;} xkbGetNamesReq;#define sz_xkbGetNamesReq 12
typedef struct _xkbGetNamesReply { BYTE type; BYTE deviceID; CARD16 sequenceNumber; CARD32 length; CARD32 which; KeyCode minKeyCode; KeyCode maxKeyCode; CARD8 nTypes; CARD8 groupNames; CARD16 virtualMods; KeyCode firstKey; CARD8 nKeys; CARD32 indicators; CARD8 nRadioGroups; CARD8 nKeyAliases; CARD16 nKTLevels; CARD32 pad3;} xkbGetNamesReply;#define sz_xkbGetNamesReply 32
typedef struct _xkbSetNames { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetNames */ CARD16 length; CARD16 deviceSpec; CARD16 virtualMods; CARD32 which; CARD8 firstType; CARD8 nTypes; CARD8 firstKTLevel; CARD8 nKTLevels; CARD32 indicators; CARD8 groupNames; CARD8 nRadioGroups; KeyCode firstKey; CARD8 nKeys; CARD8 nKeyAliases; CARD8 pad1; CARD16 totalKTLevelNames;} xkbSetNamesReq;#define sz_xkbSetNamesReq 28
typedef struct _xkbPointWireDesc { INT16 x; INT16 y;} xkbPointWireDesc;#define sz_xkbPointWireDesc 4
typedef struct _xkbOutlineWireDesc { CARD8 nPoints; CARD8 cornerRadius; CARD16 pad;} xkbOutlineWireDesc;#define sz_xkbOutlineWireDesc 4
typedef struct _xkbShapeWireDesc { Atom name; CARD8 nOutlines; CARD8 primaryNdx; CARD8 approxNdx; CARD8 pad;} xkbShapeWireDesc;#define sz_xkbShapeWireDesc 8
typedef struct _xkbSectionWireDesc { Atom name; INT16 top; INT16 left; CARD16 width; CARD16 height; INT16 angle; CARD8 priority; CARD8 nRows; CARD8 nDoodads; CARD8 nOverlays; CARD16 pad;} xkbSectionWireDesc;#define sz_xkbSectionWireDesc 20
typedef struct _xkbRowWireDesc { INT16 top; INT16 left; CARD8 nKeys; BOOL vertical; CARD16 pad;} xkbRowWireDesc;#define sz_xkbRowWireDesc 8
typedef struct _xkbKeyWireDesc { CARD8 name[XkbKeyNameLength] _X_NONSTRING; INT16 gap; CARD8 shapeNdx; CARD8 colorNdx;} xkbKeyWireDesc;#define sz_xkbKeyWireDesc 8
typedef struct _xkbOverlayWireDesc { Atom name; CARD8 nRows; CARD8 pad1; CARD16 pad2;} xkbOverlayWireDesc;#define sz_xkbOverlayWireDesc 8
typedef struct _xkbOverlayRowWireDesc { CARD8 rowUnder; CARD8 nKeys; CARD16 pad1;} xkbOverlayRowWireDesc;#define sz_xkbOverlayRowWireDesc 4
typedef struct _xkbOverlayKeyWireDesc { CARD8 over[XkbKeyNameLength] _X_NONSTRING; CARD8 under[XkbKeyNameLength] _X_NONSTRING;} xkbOverlayKeyWireDesc;#define sz_xkbOverlayKeyWireDesc 8
typedef struct _xkbShapeDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD8 colorNdx; CARD8 shapeNdx; CARD16 pad1; CARD32 pad2;} xkbShapeDoodadWireDesc;#define sz_xkbShapeDoodadWireDesc 20
typedef struct _xkbTextDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD16 width; CARD16 height; CARD8 colorNdx; CARD8 pad1; CARD16 pad2;} xkbTextDoodadWireDesc;#define sz_xkbTextDoodadWireDesc 20
typedef struct _xkbIndicatorDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD8 shapeNdx; CARD8 onColorNdx; CARD8 offColorNdx; CARD8 pad1; CARD32 pad2;} xkbIndicatorDoodadWireDesc;#define sz_xkbIndicatorDoodadWireDesc 20
typedef struct _xkbLogoDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD8 colorNdx; CARD8 shapeNdx; CARD16 pad1; CARD32 pad2;} xkbLogoDoodadWireDesc;#define sz_xkbLogoDoodadWireDesc 20
typedef struct _xkbAnyDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD32 pad2; CARD32 pad3;} xkbAnyDoodadWireDesc;#define sz_xkbAnyDoodadWireDesc 20
typedef union _xkbDoodadWireDesc { xkbAnyDoodadWireDesc any; xkbShapeDoodadWireDesc shape; xkbTextDoodadWireDesc text; xkbIndicatorDoodadWireDesc indicator; xkbLogoDoodadWireDesc logo;} xkbDoodadWireDesc;#define sz_xkbDoodadWireDesc 20
typedef struct _xkbGetGeometry { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetGeometry */ CARD16 length; CARD16 deviceSpec; CARD16 pad; Atom name;} xkbGetGeometryReq;#define sz_xkbGetGeometryReq 12
typedef struct _xkbGetGeometryReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; Atom name; BOOL found; CARD8 pad; CARD16 widthMM; CARD16 heightMM; CARD16 nProperties; CARD16 nColors; CARD16 nShapes; CARD16 nSections; CARD16 nDoodads; CARD16 nKeyAliases; CARD8 baseColorNdx; CARD8 labelColorNdx;} xkbGetGeometryReply;#define sz_xkbGetGeometryReply 32
typedef struct _xkbSetGeometry { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetGeometry */ CARD16 length; CARD16 deviceSpec; CARD8 nShapes; CARD8 nSections; Atom name; CARD16 widthMM; CARD16 heightMM; CARD16 nProperties; CARD16 nColors; CARD16 nDoodads; CARD16 nKeyAliases; CARD8 baseColorNdx; CARD8 labelColorNdx; CARD16 pad;} xkbSetGeometryReq;#define sz_xkbSetGeometryReq 28
typedef struct _xkbPerClientFlags { CARD8 reqType; CARD8 xkbReqType;/* always X_KBPerClientFlags */ CARD16 length; CARD16 deviceSpec; CARD16 pad1; CARD32 change; CARD32 value; CARD32 ctrlsToChange; CARD32 autoCtrls; CARD32 autoCtrlValues;} xkbPerClientFlagsReq;#define sz_xkbPerClientFlagsReq 28
typedef struct _xkbPerClientFlagsReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD32 supported; CARD32 value; CARD32 autoCtrls; CARD32 autoCtrlValues; CARD32 pad1; CARD32 pad2;} xkbPerClientFlagsReply;#define sz_xkbPerClientFlagsReply 32
typedef struct _xkbListComponents { CARD8 reqType; CARD8 xkbReqType; /* always X_KBListComponents */ CARD16 length; CARD16 deviceSpec; CARD16 maxNames;} xkbListComponentsReq;#define sz_xkbListComponentsReq 8
typedef struct _xkbListComponentsReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD16 nKeymaps; CARD16 nKeycodes; CARD16 nTypes; CARD16 nCompatMaps; CARD16 nSymbols; CARD16 nGeometries; CARD16 extra; CARD16 pad1; CARD32 pad2; CARD32 pad3;} xkbListComponentsReply;#define sz_xkbListComponentsReply 32
typedef struct _xkbGetKbdByName { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetKbdByName */ CARD16 length; CARD16 deviceSpec; CARD16 need; /* combination of XkbGBN_* */ CARD16 want; /* combination of XkbGBN_* */ BOOL load; CARD8 pad;} xkbGetKbdByNameReq;#define sz_xkbGetKbdByNameReq 12
typedef struct _xkbGetKbdByNameReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; KeyCode minKeyCode; KeyCode maxKeyCode; BOOL loaded; BOOL newKeyboard; CARD16 found; /* combination of XkbGBN_* */ CARD16 reported; /* combination of XkbAllComponents */ CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4;} xkbGetKbdByNameReply;#define sz_xkbGetKbdByNameReply 32
typedef struct _xkbDeviceLedsWireDesc { CARD16 ledClass; CARD16 ledID; CARD32 namesPresent; CARD32 mapsPresent; CARD32 physIndicators; CARD32 state;} xkbDeviceLedsWireDesc;#define sz_xkbDeviceLedsWireDesc 20
typedef struct _xkbGetDeviceInfo { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetDeviceInfo */ CARD16 length; CARD16 deviceSpec; CARD16 wanted; BOOL allBtns; CARD8 firstBtn; CARD8 nBtns; CARD8 pad; CARD16 ledClass; CARD16 ledID;} xkbGetDeviceInfoReq;#define sz_xkbGetDeviceInfoReq 16
typedef struct _xkbGetDeviceInfoReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD16 present; CARD16 supported; CARD16 unsupported; CARD16 nDeviceLedFBs; CARD8 firstBtnWanted; CARD8 nBtnsWanted; CARD8 firstBtnRtrn; CARD8 nBtnsRtrn; CARD8 totalBtns; BOOL hasOwnState; CARD16 dfltKbdFB; CARD16 dfltLedFB; CARD16 pad; Atom devType;} xkbGetDeviceInfoReply;#define sz_xkbGetDeviceInfoReply 32
typedef struct _xkbSetDeviceInfo { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetDeviceInfo */ CARD16 length; CARD16 deviceSpec; CARD8 firstBtn; CARD8 nBtns; CARD16 change; CARD16 nDeviceLedFBs;} xkbSetDeviceInfoReq;#define sz_xkbSetDeviceInfoReq 12
typedef struct _xkbSetDebuggingFlags { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetDebuggingFlags */ CARD16 length; CARD16 msgLength; CARD16 pad; CARD32 affectFlags; CARD32 flags; CARD32 affectCtrls; CARD32 ctrls;} xkbSetDebuggingFlagsReq;#define sz_xkbSetDebuggingFlagsReq 24
typedef struct _xkbSetDebuggingFlagsReply { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 currentFlags; CARD32 currentCtrls; CARD32 supportedFlags; CARD32 supportedCtrls; CARD32 pad1; CARD32 pad2;} xkbSetDebuggingFlagsReply;#define sz_xkbSetDebuggingFlagsReply 32
/* * X KEYBOARD EXTENSION EVENT STRUCTURES */
typedef struct _xkbAnyEvent { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 pad1; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7;} xkbAnyEvent;#define sz_xkbAnyEvent 32
typedef struct _xkbNewKeyboardNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 oldDeviceID; KeyCode minKeyCode; KeyCode maxKeyCode; KeyCode oldMinKeyCode; KeyCode oldMaxKeyCode; CARD8 requestMajor; CARD8 requestMinor; CARD16 changed; CARD8 detail; CARD8 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4;} xkbNewKeyboardNotify;#define sz_xkbNewKeyboardNotify 32
typedef struct _xkbMapNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 ptrBtnActions; CARD16 changed; KeyCode minKeyCode; KeyCode maxKeyCode; CARD8 firstType; CARD8 nTypes; KeyCode firstKeySym; CARD8 nKeySyms; KeyCode firstKeyAct; CARD8 nKeyActs; KeyCode firstKeyBehavior; CARD8 nKeyBehaviors; KeyCode firstKeyExplicit; CARD8 nKeyExplicit; KeyCode firstModMapKey; CARD8 nModMapKeys; KeyCode firstVModMapKey; CARD8 nVModMapKeys; CARD16 virtualMods; CARD16 pad1;} xkbMapNotify;#define sz_xkbMapNotify 32
typedef struct _xkbStateNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 mods; CARD8 baseMods; CARD8 latchedMods; CARD8 lockedMods; CARD8 group; INT16 baseGroup; INT16 latchedGroup; CARD8 lockedGroup; CARD8 compatState; CARD8 grabMods; CARD8 compatGrabMods; CARD8 lookupMods; CARD8 compatLookupMods; CARD16 ptrBtnState; CARD16 changed; KeyCode keycode; CARD8 eventType; CARD8 requestMajor; CARD8 requestMinor;} xkbStateNotify;#define sz_xkbStateNotify 32
typedef struct _xkbControlsNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 numGroups; CARD16 pad1; CARD32 changedControls; CARD32 enabledControls; CARD32 enabledControlChanges; KeyCode keycode; CARD8 eventType; CARD8 requestMajor; CARD8 requestMinor; CARD32 pad2;} xkbControlsNotify;#define sz_xkbControlsNotify 32
typedef struct _xkbIndicatorNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 pad1; CARD16 pad2; CARD32 state; CARD32 changed; CARD32 pad3; CARD32 pad4; CARD32 pad5;} xkbIndicatorNotify;#define sz_xkbIndicatorNotify 32
typedef struct _xkbNamesNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 pad1; CARD16 changed; CARD8 firstType; CARD8 nTypes; CARD8 firstLevelName; CARD8 nLevelNames; CARD8 pad2; CARD8 nRadioGroups; CARD8 nAliases; CARD8 changedGroupNames; CARD16 changedVirtualMods; CARD8 firstKey; CARD8 nKeys; CARD32 changedIndicators; CARD32 pad3;} xkbNamesNotify;#define sz_xkbNamesNotify 32
typedef struct _xkbCompatMapNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 changedGroups; CARD16 firstSI; CARD16 nSI; CARD16 nTotalSI; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4;} xkbCompatMapNotify;#define sz_xkbCompatMapNotify 32
typedef struct _xkbBellNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 bellClass; CARD8 bellID; CARD8 percent; CARD16 pitch; CARD16 duration; Atom name; Window window; BOOL eventOnly; CARD8 pad1; CARD16 pad2; CARD32 pad3;} xkbBellNotify;#define sz_xkbBellNotify 32
typedef struct _xkbActionMessage { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; KeyCode keycode; BOOL press; BOOL keyEventFollows; CARD8 mods; CARD8 group; CARD8 message[8]; CARD16 pad1; CARD32 pad2; CARD32 pad3;} xkbActionMessage;#define sz_xkbActionMessage 32
typedef struct _xkbAccessXNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; KeyCode keycode; CARD16 detail; CARD16 slowKeysDelay; CARD16 debounceDelay; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4;} xkbAccessXNotify;#define sz_xkbAccessXNotify 32
typedef struct _xkbExtensionDeviceNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 pad1; CARD16 reason; CARD16 ledClass; CARD16 ledID; CARD32 ledsDefined; CARD32 ledState; CARD8 firstBtn; CARD8 nBtns; CARD16 supported; CARD16 unsupported; CARD16 pad3;} xkbExtensionDeviceNotify;#define sz_xkbExtensionDeviceNotify 32
typedef struct _xkbEvent { union { xkbAnyEvent any; xkbNewKeyboardNotify new_kbd; xkbMapNotify map; xkbStateNotify state; xkbControlsNotify ctrls; xkbIndicatorNotify indicators; xkbNamesNotify names; xkbCompatMapNotify compat; xkbBellNotify bell; xkbActionMessage message; xkbAccessXNotify accessx; xkbExtensionDeviceNotify device; } u;} xkbEvent;#define sz_xkbEvent 32
#undef Window#undef Atom#undef Time#undef KeyCode#undef KeySym
#endif /* _XKBPROTO_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227/* Copyright (c) 2002 XFree86 Inc*/
#ifndef _XRESPROTO_H#define _XRESPROTO_H
#define XRES_MAJOR_VERSION 1#define XRES_MINOR_VERSION 2
#define XRES_NAME "X-Resource"
/* v1.0 */#define X_XResQueryVersion 0#define X_XResQueryClients 1#define X_XResQueryClientResources 2#define X_XResQueryClientPixmapBytes 3
/* Version 1.1 has been accidentally released from the version *//* control and while it doesn't have differences to version 1.0, the *//* next version is labeled 1.2 in order to remove the risk of confusion. */
/* v1.2 */#define X_XResQueryClientIds 4#define X_XResQueryResourceBytes 5
typedef struct { CARD32 resource_base; CARD32 resource_mask;} xXResClient;#define sz_xXResClient 8
typedef struct { CARD32 resource_type; CARD32 count;} xXResType;#define sz_xXResType 8
/* XResQueryVersion */
typedef struct _XResQueryVersion { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD8 client_major; CARD8 client_minor; CARD16 unused;} xXResQueryVersionReq;#define sz_xXResQueryVersionReq 8
typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD16 server_major; CARD16 server_minor; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6;} xXResQueryVersionReply;#define sz_xXResQueryVersionReply 32
/* XResQueryClients */
typedef struct _XResQueryClients { CARD8 reqType; CARD8 XResReqType; CARD16 length;} xXResQueryClientsReq;#define sz_xXResQueryClientsReq 4
typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 num_clients; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6;} xXResQueryClientsReply;#define sz_xXResQueryClientsReply 32
/* XResQueryClientResources */
typedef struct _XResQueryClientResources { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD32 xid;} xXResQueryClientResourcesReq;#define sz_xXResQueryClientResourcesReq 8
typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 num_types; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6;} xXResQueryClientResourcesReply;#define sz_xXResQueryClientResourcesReply 32
/* XResQueryClientPixmapBytes */
typedef struct _XResQueryClientPixmapBytes { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD32 xid;} xXResQueryClientPixmapBytesReq;#define sz_xXResQueryClientPixmapBytesReq 8
typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 bytes; CARD32 bytes_overflow; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5;} xXResQueryClientPixmapBytesReply;#define sz_xXResQueryClientPixmapBytesReply 32
/* v1.2 XResQueryClientIds */
#define X_XResClientXIDMask 0x01#define X_XResLocalClientPIDMask 0x02
typedef struct _XResClientIdSpec { CARD32 client; CARD32 mask;} xXResClientIdSpec;#define sz_xXResClientIdSpec 8
typedef struct _XResClientIdValue { xXResClientIdSpec spec; CARD32 length; // followed by length CARD32s} xXResClientIdValue;#define sz_xResClientIdValue (sz_xXResClientIdSpec + 4)
typedef struct _XResQueryClientIds { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD32 numSpecs; // followed by numSpecs times XResClientIdSpec} xXResQueryClientIdsReq;#define sz_xXResQueryClientIdsReq 8
typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 numIds; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; // followed by numIds times XResClientIdValue} xXResQueryClientIdsReply;#define sz_xXResQueryClientIdsReply 32
/* v1.2 XResQueryResourceBytes */
typedef struct _XResResourceIdSpec { CARD32 resource; CARD32 type;} xXResResourceIdSpec;#define sz_xXResResourceIdSpec 8
typedef struct _XResQueryResourceBytes { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD32 client; CARD32 numSpecs; // followed by numSpecs times XResResourceIdSpec} xXResQueryResourceBytesReq;#define sz_xXResQueryResourceBytesReq 12
typedef struct _XResResourceSizeSpec { xXResResourceIdSpec spec; CARD32 bytes; CARD32 refCount; CARD32 useCount;} xXResResourceSizeSpec;#define sz_xXResResourceSizeSpec (sz_xXResResourceIdSpec + 12)
typedef struct _XResResourceSizeValue { xXResResourceSizeSpec size; CARD32 numCrossReferences; // followed by numCrossReferences times XResResourceSizeSpec} xXResResourceSizeValue;#define sz_xXResResourceSizeValue (sz_xXResResourceSizeSpec + 4)
typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 numSizes; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; // followed by numSizes times XResResourceSizeValue} xXResQueryResourceBytesReply;#define sz_xXResQueryResourceBytesReply 32
#endif /* _XRESPROTO_H */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128/***********************************************************Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and itsdocumentation 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 insupporting documentation, and that the names of Digital or MIT 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.
******************************************************************/
#ifndef XV_H#define XV_H/*** File:**** Xv.h --- Xv shared library and server header file**** Author:**** David Carver (Digital Workstation Engineering/Project Athena)**** Revisions:**** 05.15.91 Carver** - version 2.0 upgrade**** 01.24.91 Carver** - version 1.4 upgrade***/
#include <X11/X.h>
#define XvName "XVideo"#define XvVersion 2#define XvRevision 2
/* Symbols */
typedef XID XvPortID;typedef XID XvEncodingID;
#define XvNone 0
#define XvInput 0#define XvOutput 1
#define XvInputMask (1<<XvInput)#define XvOutputMask (1<<XvOutput)#define XvVideoMask 0x00000004#define XvStillMask 0x00000008#define XvImageMask 0x00000010
/* These two are not client viewable */#define XvPixmapMask 0x00010000#define XvWindowMask 0x00020000
#define XvGettable 0x01#define XvSettable 0x02
#define XvRGB 0#define XvYUV 1
#define XvPacked 0#define XvPlanar 1
#define XvTopToBottom 0#define XvBottomToTop 1
/* Events */
#define XvVideoNotify 0#define XvPortNotify 1#define XvNumEvents 2
/* Video Notify Reasons */
#define XvStarted 0#define XvStopped 1#define XvBusy 2#define XvPreempted 3#define XvHardError 4#define XvLastReason 4
#define XvNumReasons (XvLastReason + 1)
#define XvStartedMask (1<<XvStarted)#define XvStoppedMask (1<<XvStopped)#define XvBusyMask (1<<XvBusy)#define XvPreemptedMask (1<<XvPreempted)#define XvHardErrorMask (1<<XvHardError)
#define XvAnyReasonMask ((1<<XvNumReasons) - 1)#define XvNoReasonMask 0
/* Errors */
#define XvBadPort 0#define XvBadEncoding 1#define XvBadControl 2#define XvNumErrors 3
/* Status */
#define XvBadExtension 1#define XvAlreadyGrabbed 2#define XvInvalidTime 3#define XvBadReply 4#define XvBadAlloc 5
#endif /* XV_H */
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226#ifndef _XVMCPROTO_H_#define _XVMCPROTO_H_
#define xvmc_QueryVersion 0#define xvmc_ListSurfaceTypes 1#define xvmc_CreateContext 2#define xvmc_DestroyContext 3#define xvmc_CreateSurface 4#define xvmc_DestroySurface 5#define xvmc_CreateSubpicture 6#define xvmc_DestroySubpicture 7#define xvmc_ListSubpictureTypes 8#define xvmc_GetDRInfo 9#define xvmc_LastRequest xvmc_GetDRInfo
#define xvmcNumRequest (xvmc_LastRequest + 1)
typedef struct { CARD32 surface_type_id; CARD16 chroma_format; CARD16 pad0; CARD16 max_width; CARD16 max_height; CARD16 subpicture_max_width; CARD16 subpicture_max_height; CARD32 mc_type; CARD32 flags;} xvmcSurfaceInfo;#define sz_xvmcSurfaceInfo 24
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length;} xvmcQueryVersionReq;#define sz_xvmcQueryVersionReq 4
typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 major; CARD32 minor; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7;} xvmcQueryVersionReply;#define sz_xvmcQueryVersionReply 32
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 port;} xvmcListSurfaceTypesReq;#define sz_xvmcListSurfaceTypesReq 8
typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 num; CARD32 padl3; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7;} xvmcListSurfaceTypesReply;#define sz_xvmcListSurfaceTypesReply 32
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 context_id; CARD32 port; CARD32 surface_type_id; CARD16 width; CARD16 height; CARD32 flags;} xvmcCreateContextReq;#define sz_xvmcCreateContextReq 24
typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD16 width_actual; CARD16 height_actual; CARD32 flags_return; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7;} xvmcCreateContextReply;#define sz_xvmcCreateContextReply 32
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 context_id;} xvmcDestroyContextReq;#define sz_xvmcDestroyContextReq 8
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 surface_id; CARD32 context_id;} xvmcCreateSurfaceReq;#define sz_xvmcCreateSurfaceReq 12
typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 padl2; CARD32 padl3; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7;} xvmcCreateSurfaceReply;#define sz_xvmcCreateSurfaceReply 32
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 surface_id;} xvmcDestroySurfaceReq;#define sz_xvmcDestroySurfaceReq 8
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 subpicture_id; CARD32 context_id; CARD32 xvimage_id; CARD16 width; CARD16 height;} xvmcCreateSubpictureReq;#define sz_xvmcCreateSubpictureReq 20
typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD16 width_actual; CARD16 height_actual; CARD16 num_palette_entries; CARD16 entry_bytes; CARD8 component_order[4]; CARD32 padl5; CARD32 padl6; CARD32 padl7;} xvmcCreateSubpictureReply;#define sz_xvmcCreateSubpictureReply 32
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 subpicture_id;} xvmcDestroySubpictureReq;#define sz_xvmcDestroySubpictureReq 8
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 port; CARD32 surface_type_id;} xvmcListSubpictureTypesReq;#define sz_xvmcListSubpictureTypesReq 12
typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 num; CARD32 padl2; CARD32 padl3; CARD32 padl4; CARD32 padl5; CARD32 padl6;} xvmcListSubpictureTypesReply;#define sz_xvmcListSubpictureTypesReply 32
typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 port; CARD32 shmKey; CARD32 magic;} xvmcGetDRInfoReq;#define sz_xvmcGetDRInfoReq 16
typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 major; CARD32 minor; CARD32 patchLevel; CARD32 nameLen; CARD32 busIDLen; CARD32 isLocal;} xvmcGetDRInfoReply;#define sz_xvmcGetDRInfoReply 32
#endif12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667/*
Copyright 1992, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation.
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 THEOPEN GROUP 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 Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.
*/
#ifndef _BIGREQSPROTO_H_#define _BIGREQSPROTO_H_
#define X_BigReqEnable 0
#define XBigReqNumberEvents 0
#define XBigReqNumberErrors 0
#define XBigReqExtensionName "BIG-REQUESTS"
typedef struct { CARD8 reqType; /* always XBigReqCode */ CARD8 brReqType; /* always X_BigReqEnable */ CARD16 length;} xBigReqEnableReq;#define sz_xBigReqEnableReq 4
typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 max_request_size; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5;} xBigReqEnableReply;#define sz_xBigReqEnableReply 32
typedef struct { CARD8 reqType; CARD8 data; CARD16 zero; CARD32 length;} xBigReq;
#endif /* _BIGREQSPROTO_H_ */1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071/* * Copyright (c) 2006, Oracle and/or its affiliates. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. *//* * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY 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 THIS SOFTWARE. */
#ifndef _COMPOSITE_H_#define _COMPOSITE_H_
#include <X11/extensions/xfixeswire.h>
#define COMPOSITE_NAME "Composite"#define COMPOSITE_MAJOR 0#define COMPOSITE_MINOR 4
#define CompositeRedirectAutomatic 0#define CompositeRedirectManual 1
#define X_CompositeQueryVersion 0#define X_CompositeRedirectWindow 1#define X_CompositeRedirectSubwindows 2#define X_CompositeUnredirectWindow 3#define X_CompositeUnredirectSubwindows 4#define X_CompositeCreateRegionFromBorderClip 5#define X_CompositeNameWindowPixmap 6#define X_CompositeGetOverlayWindow 7#define X_CompositeReleaseOverlayWindow 8
#define CompositeNumberRequests (X_CompositeReleaseOverlayWindow + 1)
#define CompositeNumberEvents 0
#endif /* _COMPOSITE_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158/* * Copyright © 2003 Keith Packard * Copyright © 2007 Eric Anholt * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY 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 THIS SOFTWARE. */
#ifndef _DAMAGEPROTO_H_#define _DAMAGEPROTO_H_
#include <X11/Xmd.h>#include <X11/extensions/xfixesproto.h>#include <X11/extensions/damagewire.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 Picture CARD32#define Region CARD32#define Damage CARD32
/************** Version 0 ******************/
typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length;} xDamageReq;
/* * requests and replies */
typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; CARD32 majorVersion; CARD32 minorVersion;} xDamageQueryVersionReq;
#define sz_xDamageQueryVersionReq 12
typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5;} xDamageQueryVersionReply;
#define sz_xDamageQueryVersionReply 32
typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; Damage damage; Drawable drawable; CARD8 level; CARD8 pad1; CARD16 pad2;} xDamageCreateReq;
#define sz_xDamageCreateReq 16
typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; Damage damage;} xDamageDestroyReq;
#define sz_xDamageDestroyReq 8
typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; Damage damage; Region repair; Region parts;} xDamageSubtractReq;
#define sz_xDamageSubtractReq 16
typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; Drawable drawable; Region region;} xDamageAddReq;
#define sz_xDamageAddReq 12
/* Events */
#define DamageNotifyMore 0x80
typedef struct { CARD8 type; CARD8 level; CARD16 sequenceNumber; Drawable drawable; Damage damage; Time timestamp; xRectangle area; xRectangle geometry;} xDamageNotifyEvent;
#undef Damage#undef Region#undef Picture#undef Window#undef Drawable#undef Font#undef Pixmap#undef Cursor#undef Colormap#undef GContext#undef Atom#undef VisualID#undef Time#undef KeyCode#undef KeySym
#endif /* _DAMAGEPROTO_H_ */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657/****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the name of the Hewlett-Packard * Company shall not be used in advertising or otherwise to promote the * sale, use or other dealings in this Software without prior written * authorization from the Hewlett-Packard Company. * * Header file for Xlib-related DBE * *****************************************************************************/
#ifndef DBE_H#define DBE_H
/* Values for swap_action field of XdbeSwapInfo structure */#define XdbeUndefined 0#define XdbeBackground 1#define XdbeUntouched 2#define XdbeCopied 3
/* Errors */#define XdbeBadBuffer 0
#define DBE_PROTOCOL_NAME "DOUBLE-BUFFER"
/* Current version numbers */#define DBE_MAJOR_VERSION 1#define DBE_MINOR_VERSION 0
/* Used when adding extension; also used in Xdbe macros */#define DbeNumberEvents 0#define DbeBadBuffer 0#define DbeNumberErrors (DbeBadBuffer + 1)
#endif /* DBE_H */
data/conda_envs/evalclaw/include/X11/DECkeysym.hAdded+65
data/conda_envs/evalclaw/include/X11/HPkeysym.hAdded+164
data/conda_envs/evalclaw/include/X11/ImUtil.hAdded+30
data/conda_envs/evalclaw/include/X11/Sunkeysym.hAdded+106
data/conda_envs/evalclaw/include/X11/X.hAdded+717
data/conda_envs/evalclaw/include/X11/XF86keysym.hAdded+487
data/conda_envs/evalclaw/include/X11/XKBlib.hAdded+1149
data/conda_envs/evalclaw/include/X11/XWDFile.hAdded+113
data/conda_envs/evalclaw/include/X11/Xalloca.hAdded+121
data/conda_envs/evalclaw/include/X11/Xarch.hAdded+94
data/conda_envs/evalclaw/include/X11/Xatom.hAdded+79
data/conda_envs/evalclaw/include/X11/Xauth.hAdded+181
data/conda_envs/evalclaw/include/X11/Xcms.hAdded+815
data/conda_envs/evalclaw/include/X11/Xdefs.hAdded+108
data/conda_envs/evalclaw/include/X11/Xdmcp.hAdded+226
data/conda_envs/evalclaw/include/X11/Xfuncproto.hAdded+216
data/conda_envs/evalclaw/include/X11/Xfuncs.hAdded+69
data/conda_envs/evalclaw/include/X11/Xlib-xcb.hAdded+20
data/conda_envs/evalclaw/include/X11/Xlib.hAdded
data/conda_envs/evalclaw/include/X11/XlibConf.hAdded+38
data/conda_envs/evalclaw/include/X11/Xlibint.hAdded+1444
data/conda_envs/evalclaw/include/X11/Xlocale.hAdded+37
data/conda_envs/evalclaw/include/X11/Xmd.hAdded+146
data/conda_envs/evalclaw/include/X11/Xos.hAdded+148
data/conda_envs/evalclaw/include/X11/Xos_r.hAdded+1095
data/conda_envs/evalclaw/include/X11/Xosdefs.hAdded+116
data/conda_envs/evalclaw/include/X11/Xpoll.hAdded+230
data/conda_envs/evalclaw/include/X11/Xproto.hAdded+2157
data/conda_envs/evalclaw/include/X11/Xprotostr.hAdded+77
data/conda_envs/evalclaw/include/X11/Xregion.hAdded+190
data/conda_envs/evalclaw/include/X11/Xresource.hAdded+358
data/conda_envs/evalclaw/include/X11/Xthreads.hAdded+314
data/conda_envs/evalclaw/include/X11/Xutil.hAdded+838
data/conda_envs/evalclaw/include/X11/Xw32defs.hAdded+79
data/conda_envs/evalclaw/include/X11/Xwindows.hAdded+117
data/conda_envs/evalclaw/include/X11/Xwinsock.hAdded+80
data/conda_envs/evalclaw/include/X11/ap_keysym.hAdded+51
data/conda_envs/evalclaw/include/X11/cursorfont.hAdded+111
data/conda_envs/evalclaw/include/X11/dri/xf86dri.hAdded+65
data/conda_envs/evalclaw/include/X11/dri/xf86driproto.hAdded+342
data/conda_envs/evalclaw/include/X11/dri/xf86dristr.hAdded+3
data/conda_envs/evalclaw/include/X11/extensions/XKB.hAdded+786
data/conda_envs/evalclaw/include/X11/extensions/XKBproto.hAdded+1282
data/conda_envs/evalclaw/include/X11/extensions/XResproto.hAdded+227
data/conda_envs/evalclaw/include/X11/extensions/Xv.hAdded+128
data/conda_envs/evalclaw/include/X11/extensions/XvMCproto.hAdded+226
data/conda_envs/evalclaw/include/X11/extensions/bigreqsproto.hAdded+67
data/conda_envs/evalclaw/include/X11/extensions/composite.hAdded+71
data/conda_envs/evalclaw/include/X11/extensions/damageproto.hAdded+158
data/conda_envs/evalclaw/include/X11/extensions/dbe.hAdded+57