home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / evbl0627.zip / everblue_20010627.zip / x11 / Xlib.h < prev    next >
C/C++ Source or Header  |  2001-05-21  |  118KB  |  4,784 lines

  1. /* $XConsortium: Xlib.h /main/119 1996/09/28 16:35:29 rws $ */
  2. /* $XFree86: xc/lib/X11/Xlib.h,v 3.10.2.2 1998/11/04 08:01:35 hohndel Exp $ */
  3. /* 
  4.  
  5. Copyright (c) 1985, 1986, 1987, 1991  X Consortium
  6.  
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13.  
  14. The above copyright notice and this permission notice shall be included in
  15. all copies or substantial portions of the Software.
  16.  
  17. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  20. X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  21. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23.  
  24. Except as contained in this notice, the name of the X Consortium shall not be
  25. used in advertising or otherwise to promote the sale, use or other dealings
  26. in this Software without prior written authorization from the X Consortium.
  27.  
  28. */
  29.  
  30.  
  31. /*
  32.  *    Xlib.h - Header definition and support file for the C subroutine
  33.  *    interface library (Xlib) to the X Window System Protocol (V11).
  34.  *    Structures and symbols starting with "_" are private to the library.
  35.  */
  36. #ifndef _XLIB_H_
  37. #define _XLIB_H_
  38.  
  39. #define XlibSpecificationRelease 6
  40.  
  41. #ifdef USG
  42. #ifndef __TYPES__
  43. #include <sys/types.h>            /* forgot to protect it... */
  44. #define __TYPES__
  45. #endif /* __TYPES__ */
  46. #else
  47. #if defined(_POSIX_SOURCE) && defined(MOTOROLA)
  48. #undef _POSIX_SOURCE
  49. #include <sys/types.h>
  50. #define _POSIX_SOURCE
  51. #else
  52. #include <sys/types.h>
  53. #endif
  54. #endif /* USG */
  55.  
  56. #include <X11/X.h>
  57.  
  58. /* applications should not depend on these two headers being included! */
  59. #include <X11/Xfuncproto.h>
  60. #include <X11/Xosdefs.h>
  61.  
  62. #ifndef X_WCHAR
  63. #ifdef X_NOT_STDC_ENV
  64. #ifndef SCO324
  65. #ifndef ISC
  66. #define X_WCHAR
  67. #endif
  68. #endif
  69. #endif
  70. #endif
  71.  
  72. #ifndef X_WCHAR
  73. #include <stddef.h>
  74. #else
  75. #ifdef __EMX__
  76. #include <stdlib.h>
  77. #else
  78. /* replace this with #include or typedef appropriate for your system */
  79. typedef unsigned long wchar_t;
  80. #endif
  81. #endif
  82.  
  83. #if defined(ISC) && defined(USE_XMBTOWC)
  84. #define wctomb(a,b)    _Xwctomb(a,b)
  85. #define mblen(a,b)    _Xmblen(a,b) 
  86. #ifndef USE_XWCHAR_STRING
  87. #define mbtowc(a,b,c)    _Xmbtowc(a,b,c)
  88. #endif
  89. #endif
  90.  
  91. typedef char *XPointer;
  92.  
  93. #define Bool int
  94. #define Status int
  95. #define True 1
  96. #define False 0
  97.  
  98. #define QueuedAlready 0
  99. #define QueuedAfterReading 1
  100. #define QueuedAfterFlush 2
  101.  
  102. #define ConnectionNumber(dpy)     (((_XPrivDisplay)dpy)->fd)
  103. #define RootWindow(dpy, scr)     (ScreenOfDisplay(dpy,scr)->root)
  104. #define DefaultScreen(dpy)     (((_XPrivDisplay)dpy)->default_screen)
  105. #define DefaultRootWindow(dpy)     (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
  106. #define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
  107. #define DefaultGC(dpy, scr)     (ScreenOfDisplay(dpy,scr)->default_gc)
  108. #define BlackPixel(dpy, scr)     (ScreenOfDisplay(dpy,scr)->black_pixel)
  109. #define WhitePixel(dpy, scr)     (ScreenOfDisplay(dpy,scr)->white_pixel)
  110. #define AllPlanes         ((unsigned long)~0L)
  111. #define QLength(dpy)         (((_XPrivDisplay)dpy)->qlen)
  112. #define DisplayWidth(dpy, scr)     (ScreenOfDisplay(dpy,scr)->width)
  113. #define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
  114. #define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
  115. #define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
  116. #define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
  117. #define DisplayCells(dpy, scr)     (DefaultVisual(dpy,scr)->map_entries)
  118. #define ScreenCount(dpy)     (((_XPrivDisplay)dpy)->nscreens)
  119. #define ServerVendor(dpy)     (((_XPrivDisplay)dpy)->vendor)
  120. #define ProtocolVersion(dpy)     (((_XPrivDisplay)dpy)->proto_major_version)
  121. #define ProtocolRevision(dpy)     (((_XPrivDisplay)dpy)->proto_minor_version)
  122. #define VendorRelease(dpy)     (((_XPrivDisplay)dpy)->release)
  123. #define DisplayString(dpy)     (((_XPrivDisplay)dpy)->display_name)
  124. #define DefaultDepth(dpy, scr)     (ScreenOfDisplay(dpy,scr)->root_depth)
  125. #define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
  126. #define BitmapUnit(dpy)     (((_XPrivDisplay)dpy)->bitmap_unit)
  127. #define BitmapBitOrder(dpy)     (((_XPrivDisplay)dpy)->bitmap_bit_order)
  128. #define BitmapPad(dpy)         (((_XPrivDisplay)dpy)->bitmap_pad)
  129. #define ImageByteOrder(dpy)     (((_XPrivDisplay)dpy)->byte_order)
  130. #ifdef CRAY /* unable to get WORD64 without pulling in other symbols */
  131. #define NextRequest(dpy)    XNextRequest(dpy)
  132. #else
  133. #define NextRequest(dpy)    (((_XPrivDisplay)dpy)->request + 1)
  134. #endif
  135. #define LastKnownRequestProcessed(dpy)    (((_XPrivDisplay)dpy)->last_request_read)
  136.  
  137. /* macros for screen oriented applications (toolkit) */
  138. #define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
  139. #define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
  140. #define DisplayOfScreen(s)    ((s)->display)
  141. #define RootWindowOfScreen(s)    ((s)->root)
  142. #define BlackPixelOfScreen(s)    ((s)->black_pixel)
  143. #define WhitePixelOfScreen(s)    ((s)->white_pixel)
  144. #define DefaultColormapOfScreen(s)((s)->cmap)
  145. #define DefaultDepthOfScreen(s)    ((s)->root_depth)
  146. #define DefaultGCOfScreen(s)    ((s)->default_gc)
  147. #define DefaultVisualOfScreen(s)((s)->root_visual)
  148. #define WidthOfScreen(s)    ((s)->width)
  149. #define HeightOfScreen(s)    ((s)->height)
  150. #define WidthMMOfScreen(s)    ((s)->mwidth)
  151. #define HeightMMOfScreen(s)    ((s)->mheight)
  152. #define PlanesOfScreen(s)    ((s)->root_depth)
  153. #define CellsOfScreen(s)    (DefaultVisualOfScreen((s))->map_entries)
  154. #define MinCmapsOfScreen(s)    ((s)->min_maps)
  155. #define MaxCmapsOfScreen(s)    ((s)->max_maps)
  156. #define DoesSaveUnders(s)    ((s)->save_unders)
  157. #define DoesBackingStore(s)    ((s)->backing_store)
  158. #define EventMaskOfScreen(s)    ((s)->root_input_mask)
  159.  
  160. /*
  161.  * Extensions need a way to hang private data on some structures.
  162.  */
  163. typedef struct _XExtData {
  164.     int number;        /* number returned by XRegisterExtension */
  165.     struct _XExtData *next;    /* next item on list of data for structure */
  166.     int (*free_private)(    /* called to free private storage */
  167. #if NeedFunctionPrototypes
  168.     struct _XExtData *extension
  169. #endif
  170.     );
  171.     XPointer private_data;    /* data private to this extension. */
  172. } XExtData;
  173.  
  174. /*
  175.  * This file contains structures used by the extension mechanism.
  176.  */
  177. typedef struct {        /* public to extension, cannot be changed */
  178.     int extension;        /* extension number */
  179.     int major_opcode;    /* major op-code assigned by server */
  180.     int first_event;    /* first event number for the extension */
  181.     int first_error;    /* first error number for the extension */
  182. } XExtCodes;
  183.  
  184. /*
  185.  * Data structure for retrieving info about pixmap formats.
  186.  */
  187.  
  188. typedef struct {
  189.     int depth;
  190.     int bits_per_pixel;
  191.     int scanline_pad;
  192. } XPixmapFormatValues;
  193.  
  194.  
  195. /*
  196.  * Data structure for setting graphics context.
  197.  */
  198. typedef struct {
  199.     int function;        /* logical operation */
  200.     unsigned long plane_mask;/* plane mask */
  201.     unsigned long foreground;/* foreground pixel */
  202.     unsigned long background;/* background pixel */
  203.     int line_width;        /* line width */
  204.     int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
  205.     int cap_style;          /* CapNotLast, CapButt, 
  206.                    CapRound, CapProjecting */
  207.     int join_style;         /* JoinMiter, JoinRound, JoinBevel */
  208.     int fill_style;         /* FillSolid, FillTiled, 
  209.                    FillStippled, FillOpaeueStippled */
  210.     int fill_rule;          /* EvenOddRule, WindingRule */
  211.     int arc_mode;        /* ArcChord, ArcPieSlice */
  212.     Pixmap tile;        /* tile pixmap for tiling operations */
  213.     Pixmap stipple;        /* stipple 1 plane pixmap for stipping */
  214.     int ts_x_origin;    /* offset for tile or stipple operations */
  215.     int ts_y_origin;
  216.         Font font;            /* default text font for text operations */
  217.     int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
  218.     Bool graphics_exposures;/* boolean, should exposures be generated */
  219.     int clip_x_origin;    /* origin for clipping */
  220.     int clip_y_origin;
  221.     Pixmap clip_mask;    /* bitmap clipping; other calls for rects */
  222.     int dash_offset;    /* patterned/dashed line information */
  223.     char dashes;
  224. } XGCValues;
  225.  
  226. /*
  227.  * Graphics context.  The contents of this structure are implementation
  228.  * dependent.  A GC should be treated as opaque by application code.
  229.  */
  230.  
  231. typedef struct _XGC
  232. #ifdef XLIB_ILLEGAL_ACCESS
  233. {
  234.     XExtData *ext_data;    /* hook for extension to hang data */
  235.     GContext gid;    /* protocol ID for graphics context */
  236.     Bool rects;        /* boolean: TRUE if clipmask is list of rectangles */
  237.     Bool dashes;    /* boolean: TRUE if dash-list is really a list */
  238.     unsigned long dirty;/* cache dirty bits */
  239.     XGCValues values;    /* shadow structure of values */
  240.     /* there is more to this structure, but it is private to Xlib */
  241. }
  242. #endif
  243. *GC;
  244.  
  245. /*
  246.  * Visual structure; contains information about colormapping possible.
  247.  */
  248. typedef struct {
  249.     XExtData *ext_data;    /* hook for extension to hang data */
  250.     VisualID visualid;    /* visual id of this visual */
  251. #if defined(__cplusplus) || defined(c_plusplus)
  252.     int c_class;        /* C++ class of screen (monochrome, etc.) */
  253. #else
  254.     int class;        /* class of screen (monochrome, etc.) */
  255. #endif
  256.     unsigned long red_mask, green_mask, blue_mask;    /* mask values */
  257.     int bits_per_rgb;    /* log base 2 of distinct color values */
  258.     int map_entries;    /* color map entries */
  259. } Visual;
  260.  
  261. /*
  262.  * Depth structure; contains information for each possible depth.
  263.  */    
  264. typedef struct {
  265.     int depth;        /* this depth (Z) of the depth */
  266.     int nvisuals;        /* number of Visual types at this depth */
  267.     Visual *visuals;    /* list of visuals possible at this depth */
  268. } Depth;
  269.  
  270. /*
  271.  * Information about the screen.  The contents of this structure are
  272.  * implementation dependent.  A Screen should be treated as opaque
  273.  * by application code.
  274.  */
  275.  
  276. struct _XDisplay;        /* Forward declare before use for C++ */
  277.  
  278. typedef struct {
  279.     XExtData *ext_data;    /* hook for extension to hang data */
  280.     struct _XDisplay *display;/* back pointer to display structure */
  281.     Window root;        /* Root window id. */
  282.     int width, height;    /* width and height of screen */
  283.     int mwidth, mheight;    /* width and height of  in millimeters */
  284.     int ndepths;        /* number of depths possible */
  285.     Depth *depths;        /* list of allowable depths on the screen */
  286.     int root_depth;        /* bits per pixel */
  287.     Visual *root_visual;    /* root visual */
  288.     GC default_gc;        /* GC for the root root visual */
  289.     Colormap cmap;        /* default color map */
  290.     unsigned long white_pixel;
  291.     unsigned long black_pixel;    /* White and Black pixel values */
  292.     int max_maps, min_maps;    /* max and min color maps */
  293.     int backing_store;    /* Never, WhenMapped, Always */
  294.     Bool save_unders;    
  295.     long root_input_mask;    /* initial root input mask */
  296. } Screen;
  297.  
  298. /*
  299.  * Format structure; describes ZFormat data the screen will understand.
  300.  */
  301. typedef struct {
  302.     XExtData *ext_data;    /* hook for extension to hang data */
  303.     int depth;        /* depth of this image format */
  304.     int bits_per_pixel;    /* bits/pixel at this depth */
  305.     int scanline_pad;    /* scanline must padded to this multiple */
  306. } ScreenFormat;
  307.  
  308. /*
  309.  * Data structure for setting window attributes.
  310.  */
  311. typedef struct {
  312.     Pixmap background_pixmap;    /* background or None or ParentRelative */
  313.     unsigned long background_pixel;    /* background pixel */
  314.     Pixmap border_pixmap;    /* border of the window */
  315.     unsigned long border_pixel;    /* border pixel value */
  316.     int bit_gravity;        /* one of bit gravity values */
  317.     int win_gravity;        /* one of the window gravity values */
  318.     int backing_store;        /* NotUseful, WhenMapped, Always */
  319.     unsigned long backing_planes;/* planes to be preseved if possible */
  320.     unsigned long backing_pixel;/* value to use in restoring planes */
  321.     Bool save_under;        /* should bits under be saved? (popups) */
  322.     long event_mask;        /* set of events that should be saved */
  323.     long do_not_propagate_mask;    /* set of events that should not propagate */
  324.     Bool override_redirect;    /* boolean value for override-redirect */
  325.     Colormap colormap;        /* color map to be associated with window */
  326.     Cursor cursor;        /* cursor to be displayed (or None) */
  327. } XSetWindowAttributes;
  328.  
  329. typedef struct {
  330.     int x, y;            /* location of window */
  331.     int width, height;        /* width and height of window */
  332.     int border_width;        /* border width of window */
  333.     int depth;              /* depth of window */
  334.     Visual *visual;        /* the associated visual structure */
  335.     Window root;            /* root of screen containing window */
  336. #if defined(__cplusplus) || defined(c_plusplus)
  337.     int c_class;        /* C++ InputOutput, InputOnly*/
  338. #else
  339.     int class;            /* InputOutput, InputOnly*/
  340. #endif
  341.     int bit_gravity;        /* one of bit gravity values */
  342.     int win_gravity;        /* one of the window gravity values */
  343.     int backing_store;        /* NotUseful, WhenMapped, Always */
  344.     unsigned long backing_planes;/* planes to be preserved if possible */
  345.     unsigned long backing_pixel;/* value to be used when restoring planes */
  346.     Bool save_under;        /* boolean, should bits under be saved? */
  347.     Colormap colormap;        /* color map to be associated with window */
  348.     Bool map_installed;        /* boolean, is color map currently installed*/
  349.     int map_state;        /* IsUnmapped, IsUnviewable, IsViewable */
  350.     long all_event_masks;    /* set of events all people have interest in*/
  351.     long your_event_mask;    /* my event mask */
  352.     long do_not_propagate_mask; /* set of events that should not propagate */
  353.     Bool override_redirect;    /* boolean value for override-redirect */
  354.     Screen *screen;        /* back pointer to correct screen */
  355. } XWindowAttributes;
  356.  
  357. /*
  358.  * Data structure for host setting; getting routines.
  359.  *
  360.  */
  361.  
  362. typedef struct {
  363.     int family;        /* for example FamilyInternet */
  364.     int length;        /* length of address, in bytes */
  365.     char *address;        /* pointer to where to find the bytes */
  366. } XHostAddress;
  367.  
  368. /*
  369.  * Data structure for "image" data, used by image manipulation routines.
  370.  */
  371. typedef struct _XImage {
  372.     int width, height;        /* size of image */
  373.     int xoffset;        /* number of pixels offset in X direction */
  374.     int format;            /* XYBitmap, XYPixmap, ZPixmap */
  375.     char *data;            /* pointer to image data */
  376.     int byte_order;        /* data byte order, LSBFirst, MSBFirst */
  377.     int bitmap_unit;        /* quant. of scanline 8, 16, 32 */
  378.     int bitmap_bit_order;    /* LSBFirst, MSBFirst */
  379.     int bitmap_pad;        /* 8, 16, 32 either XY or ZPixmap */
  380.     int depth;            /* depth of image */
  381.     int bytes_per_line;        /* accelarator to next line */
  382.     int bits_per_pixel;        /* bits per pixel (ZPixmap) */
  383.     unsigned long red_mask;    /* bits in z arrangment */
  384.     unsigned long green_mask;
  385.     unsigned long blue_mask;
  386.     XPointer obdata;        /* hook for the object routines to hang on */
  387.     struct funcs {        /* image manipulation routines */
  388. #if NeedFunctionPrototypes
  389.     struct _XImage *(*create_image)(
  390.         struct _XDisplay* /* display */,
  391.         Visual*        /* visual */,
  392.         unsigned int    /* depth */,
  393.         int        /* format */,
  394.         int        /* offset */,
  395.         char*        /* data */,
  396.         unsigned int    /* width */,
  397.         unsigned int    /* height */,
  398.         int        /* bitmap_pad */,
  399.         int        /* bytes_per_line */);
  400.     int (*destroy_image)        (struct _XImage *);
  401.     unsigned long (*get_pixel)  (struct _XImage *, int, int);
  402.     int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
  403.     struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
  404.     int (*add_pixel)            (struct _XImage *, long);
  405. #else
  406.     struct _XImage *(*create_image)();
  407.     int (*destroy_image)();
  408.     unsigned long (*get_pixel)();
  409.     int (*put_pixel)();
  410.     struct _XImage *(*sub_image)();
  411.     int (*add_pixel)();
  412. #endif
  413.     } f;
  414. } XImage;
  415.  
  416. /* 
  417.  * Data structure for XReconfigureWindow
  418.  */
  419. typedef struct {
  420.     int x, y;
  421.     int width, height;
  422.     int border_width;
  423.     Window sibling;
  424.     int stack_mode;
  425. } XWindowChanges;
  426.  
  427. /*
  428.  * Data structure used by color operations
  429.  */
  430. typedef struct {
  431.     unsigned long pixel;
  432.     unsigned short red, green, blue;
  433.     char flags;  /* do_red, do_green, do_blue */
  434.     char pad;
  435. } XColor;
  436.  
  437. /* 
  438.  * Data structures for graphics operations.  On most machines, these are
  439.  * congruent with the wire protocol structures, so reformatting the data
  440.  * can be avoided on these architectures.
  441.  */
  442. typedef struct {
  443.     short x1, y1, x2, y2;
  444. } XSegment;
  445.  
  446. typedef struct {
  447.     short x, y;
  448. } XPoint;
  449.     
  450. typedef struct {
  451.     short x, y;
  452.     unsigned short width, height;
  453. } XRectangle;
  454.     
  455. typedef struct {
  456.     short x, y;
  457.     unsigned short width, height;
  458.     short angle1, angle2;
  459. } XArc;
  460.  
  461.  
  462. /* Data structure for XChangeKeyboardControl */
  463.  
  464. typedef struct {
  465.         int key_click_percent;
  466.         int bell_percent;
  467.         int bell_pitch;
  468.         int bell_duration;
  469.         int led;
  470.         int led_mode;
  471.         int key;
  472.         int auto_repeat_mode;   /* On, Off, Default */
  473. } XKeyboardControl;
  474.  
  475. /* Data structure for XGetKeyboardControl */
  476.  
  477. typedef struct {
  478.         int key_click_percent;
  479.     int bell_percent;
  480.     unsigned int bell_pitch, bell_duration;
  481.     unsigned long led_mask;
  482.     int global_auto_repeat;
  483.     char auto_repeats[32];
  484. } XKeyboardState;
  485.  
  486. /* Data structure for XGetMotionEvents.  */
  487.  
  488. typedef struct {
  489.         Time time;
  490.     short x, y;
  491. } XTimeCoord;
  492.  
  493. /* Data structure for X{Set,Get}ModifierMapping */
  494.  
  495. typedef struct {
  496.      int max_keypermod;    /* The server's max # of keys per modifier */
  497.      KeyCode *modifiermap;    /* An 8 by max_keypermod array of modifiers */
  498. } XModifierKeymap;
  499.  
  500.  
  501. /*
  502.  * Display datatype maintaining display specific data.
  503.  * The contents of this structure are implementation dependent.
  504.  * A Display should be treated as opaque by application code.
  505.  */
  506. #ifndef XLIB_ILLEGAL_ACCESS
  507. typedef struct _XDisplay Display;
  508. #endif
  509.  
  510. struct _XPrivate;        /* Forward declare before use for C++ */
  511. struct _XrmHashBucketRec;
  512.  
  513. typedef struct 
  514. #ifdef XLIB_ILLEGAL_ACCESS
  515. _XDisplay
  516. #endif
  517. {
  518.     XExtData *ext_data;    /* hook for extension to hang data */
  519.     struct _XFreeFuncs *free_funcs; /* internal free functions */
  520.     int fd;            /* Network socket. */
  521.     int private2;        /* conn_checker */ /* ugly thing used by _XEventsQueued */
  522.     int proto_major_version;/* major version of server's X protocol */
  523.     int proto_minor_version;/* minor version of servers X protocol */
  524.     char *vendor;        /* vendor of the server hardware */
  525.         XID private3;        /* resource_base */    /* resource ID base */
  526.     XID private4;        /* resource_mask */    /* resource ID mask bits */
  527.     XID private5;        /* resource_id */    /* allocator current ID */
  528.     int private6;        /* resource_shift */    /* allocator shift to correct bits */
  529.     XID (*resource_alloc)(    /* allocator function */
  530. #if NeedFunctionPrototypes
  531.         struct _XDisplay*
  532. #endif
  533.     );
  534.     int byte_order;        /* screen byte order, LSBFirst, MSBFirst */
  535.     int bitmap_unit;    /* padding and data requirements */
  536.     int bitmap_pad;        /* padding requirements on bitmaps */
  537.     int bitmap_bit_order;    /* LeastSignificant or MostSignificant */
  538.     int nformats;        /* number of pixmap formats in list */
  539.     ScreenFormat *pixmap_format;    /* pixmap format list */
  540.     int private8;        /* vnumber */    /* Xlib's X protocol version number. */
  541.     int release;        /* release of the server */
  542.     struct _XPrivate *private9, *private10;    /* *head, *tail */    /* Input event queue. */
  543.     int qlen;        /* Length of input event queue */
  544.     unsigned long last_request_read; /* seq number of last event read */
  545.     unsigned long request;    /* sequence number of last request. */
  546.     XPointer private11;    /* *last_req */        /* beginning of last request, or dummy */
  547.     XPointer private12;    /* *buffer */        /* Output buffer starting address. */
  548.     XPointer private13;    /* *bufptr */        /* Output buffer index pointer. */
  549.     XPointer private14;    /* *bufmax */        /* Output buffer maximum+1 address. */
  550.     unsigned max_request_size; /* maximum number 32 bit words in request*/
  551.     struct _XrmHashBucketRec *db;
  552.     int (*synchandler)(
  553. #if NeedFunctionPrototypes
  554.         struct _XDisplay*
  555. #endif
  556.         );
  557.     char *display_name;    /* "host:display" string used on this connect*/
  558.     int default_screen;    /* default screen for operations */
  559.     int nscreens;        /* number of screens on this server*/
  560.     Screen *screens;    /* pointer to list of screens */
  561.     unsigned long motion_buffer;    /* size of motion buffer */
  562.     unsigned long flags;    /* internal connection flags */
  563.     int min_keycode;    /* minimum defined keycode */
  564.     int max_keycode;    /* maximum defined keycode */
  565.     KeySym *keysyms;
  566.     XModifierKeymap *modifiermap;
  567.     int keysyms_per_keycode;
  568.     char *xdefaults;    /* contents of defaults from server */
  569.     char *scratch_buffer;    /* place to hang scratch buffer */
  570.     unsigned long scratch_length;    /* length of scratch buffer */
  571.     int ext_number;        /* extension number on this display */
  572.     struct _XExten *ext_procs; /* extensions initialized on this display */
  573.     /* there is more to this structure, but it is private to Xlib */
  574.     Bool (*event_vec[128])();  /* vector for wire to event */
  575.     Status (*wire_vec[128])(); /* vector for event to wire */
  576.     KeySym lock_meaning;       /* for XLookupString */
  577.     struct _XLockInfo *lock;   /* multi-thread state, display lock */
  578.     struct _XInternalAsync *async_handlers; /* for internal async */
  579.     unsigned long bigreq_size; /* max size of big requests */
  580.     struct _XLockPtrs *lock_fns; /* pointers to threads functions */
  581.     void (*idlist_alloc)();       /* XID list allocator function */
  582.     /* things above this line should not move, for binary compatibility */
  583.     struct _XKeytrans *key_bindings; /* for XLookupString */
  584.     Font cursor_font;       /* for XCreateFontCursor */
  585.     struct _XDisplayAtoms *atoms; /* for XInternAtom */
  586.     unsigned int mode_switch;  /* keyboard group modifiers */
  587.     unsigned int num_lock;  /* keyboard numlock modifiers */
  588.     struct _XContextDB *context_db; /* context database */
  589.     Bool (**error_vec)();      /* vector for wire to error */
  590.     /*
  591.      * Xcms information
  592.      */
  593.     struct {
  594.        XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
  595.        XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
  596.        XPointer perVisualIntensityMaps;
  597.                   /* linked list of XcmsIntensityMap */
  598.     } cms;
  599.     struct _XIMFilter *im_filters;
  600.     struct _XSQEvent *qfree; /* unallocated event queue elements */
  601.     unsigned long next_event_serial_num; /* inserted into next queue elt */
  602.     struct _XExten *flushes; /* Flush hooks */
  603.     struct _XConnectionInfo *im_fd_info; /* _XRegisterInternalConnection */
  604.     int im_fd_length;    /* number of im_fd_info */
  605.     struct _XConnWatchInfo *conn_watchers; /* XAddConnectionWatch */
  606.     int watcher_count;    /* number of conn_watchers */
  607.     XPointer filedes;    /* struct pollfd cache for _XWaitForReadable */
  608.     int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
  609.     XID resource_max;    /* allocator max ID */
  610.     int xcmisc_opcode;    /* major opcode for XC-MISC */
  611.     struct _XkbInfoRec *xkb_info; /* XKB info */
  612.     struct _XtransConnInfo *trans_conn; /* transport connection object */
  613. }
  614. #ifdef XLIB_ILLEGAL_ACCESS
  615. Display, 
  616. #endif
  617. *_XPrivDisplay;
  618.  
  619. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  620. #undef _XEVENT_
  621. #endif
  622. #ifndef _XEVENT_
  623. /*
  624.  * Definitions of specific events.
  625.  */
  626. typedef struct {
  627.     int type;        /* of event */
  628.     unsigned long serial;    /* # of last request processed by server */
  629.     Bool send_event;    /* true if this came from a SendEvent request */
  630.     Display *display;    /* Display the event was read from */
  631.     Window window;            /* "event" window it is reported relative to */
  632.     Window root;            /* root window that the event occured on */
  633.     Window subwindow;    /* child window */
  634.     Time time;        /* milliseconds */
  635.     int x, y;        /* pointer x, y coordinates in event window */
  636.     int x_root, y_root;    /* coordinates relative to root */
  637.     unsigned int state;    /* key or button mask */
  638.     unsigned int keycode;    /* detail */
  639.     Bool same_screen;    /* same screen flag */
  640. } XKeyEvent;
  641. typedef XKeyEvent XKeyPressedEvent;
  642. typedef XKeyEvent XKeyReleasedEvent;
  643.  
  644. typedef struct {
  645.     int type;        /* of event */
  646.     unsigned long serial;    /* # of last request processed by server */
  647.     Bool send_event;    /* true if this came from a SendEvent request */
  648.     Display *display;    /* Display the event was read from */
  649.     Window window;            /* "event" window it is reported relative to */
  650.     Window root;            /* root window that the event occured on */
  651.     Window subwindow;    /* child window */
  652.     Time time;        /* milliseconds */
  653.     int x, y;        /* pointer x, y coordinates in event window */
  654.     int x_root, y_root;    /* coordinates relative to root */
  655.     unsigned int state;    /* key or button mask */
  656.     unsigned int button;    /* detail */
  657.     Bool same_screen;    /* same screen flag */
  658. } XButtonEvent;
  659. typedef XButtonEvent XButtonPressedEvent;
  660. typedef XButtonEvent XButtonReleasedEvent;
  661.  
  662. typedef struct {
  663.     int type;        /* of event */
  664.     unsigned long serial;    /* # of last request processed by server */
  665.     Bool send_event;    /* true if this came from a SendEvent request */
  666.     Display *display;    /* Display the event was read from */
  667.     Window window;            /* "event" window reported relative to */
  668.     Window root;            /* root window that the event occured on */
  669.     Window subwindow;    /* child window */
  670.     Time time;        /* milliseconds */
  671.     int x, y;        /* pointer x, y coordinates in event window */
  672.     int x_root, y_root;    /* coordinates relative to root */
  673.     unsigned int state;    /* key or button mask */
  674.     char is_hint;        /* detail */
  675.     Bool same_screen;    /* same screen flag */
  676. } XMotionEvent;
  677. typedef XMotionEvent XPointerMovedEvent;
  678.  
  679. typedef struct {
  680.     int type;        /* of event */
  681.     unsigned long serial;    /* # of last request processed by server */
  682.     Bool send_event;    /* true if this came from a SendEvent request */
  683.     Display *display;    /* Display the event was read from */
  684.     Window window;            /* "event" window reported relative to */
  685.     Window root;            /* root window that the event occured on */
  686.     Window subwindow;    /* child window */
  687.     Time time;        /* milliseconds */
  688.     int x, y;        /* pointer x, y coordinates in event window */
  689.     int x_root, y_root;    /* coordinates relative to root */
  690.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  691.     int detail;
  692.     /*
  693.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  694.      * NotifyNonlinear,NotifyNonlinearVirtual
  695.      */
  696.     Bool same_screen;    /* same screen flag */
  697.     Bool focus;        /* boolean focus */
  698.     unsigned int state;    /* key or button mask */
  699. } XCrossingEvent;
  700. typedef XCrossingEvent XEnterWindowEvent;
  701. typedef XCrossingEvent XLeaveWindowEvent;
  702.  
  703. typedef struct {
  704.     int type;        /* FocusIn or FocusOut */
  705.     unsigned long serial;    /* # of last request processed by server */
  706.     Bool send_event;    /* true if this came from a SendEvent request */
  707.     Display *display;    /* Display the event was read from */
  708.     Window window;        /* window of event */
  709.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  710.     int detail;
  711.     /*
  712.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  713.      * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
  714.      * NotifyPointerRoot, NotifyDetailNone 
  715.      */
  716. } XFocusChangeEvent;
  717. typedef XFocusChangeEvent XFocusInEvent;
  718. typedef XFocusChangeEvent XFocusOutEvent;
  719.  
  720. /* generated on EnterWindow and FocusIn  when KeyMapState selected */
  721. typedef struct {
  722.     int type;
  723.     unsigned long serial;    /* # of last request processed by server */
  724.     Bool send_event;    /* true if this came from a SendEvent request */
  725.     Display *display;    /* Display the event was read from */
  726.     Window window;
  727.     char key_vector[32];
  728. } XKeymapEvent;    
  729.  
  730. typedef struct {
  731.     int type;
  732.     unsigned long serial;    /* # of last request processed by server */
  733.     Bool send_event;    /* true if this came from a SendEvent request */
  734.     Display *display;    /* Display the event was read from */
  735.     Window window;
  736.     int x, y;
  737.     int width, height;
  738.     int count;        /* if non-zero, at least this many more */
  739. } XExposeEvent;
  740.  
  741. typedef struct {
  742.     int type;
  743.     unsigned long serial;    /* # of last request processed by server */
  744.     Bool send_event;    /* true if this came from a SendEvent request */
  745.     Display *display;    /* Display the event was read from */
  746.     Drawable drawable;
  747.     int x, y;
  748.     int width, height;
  749.     int count;        /* if non-zero, at least this many more */
  750.     int major_code;        /* core is CopyArea or CopyPlane */
  751.     int minor_code;        /* not defined in the core */
  752. } XGraphicsExposeEvent;
  753.  
  754. typedef struct {
  755.     int type;
  756.     unsigned long serial;    /* # of last request processed by server */
  757.     Bool send_event;    /* true if this came from a SendEvent request */
  758.     Display *display;    /* Display the event was read from */
  759.     Drawable drawable;
  760.     int major_code;        /* core is CopyArea or CopyPlane */
  761.     int minor_code;        /* not defined in the core */
  762. } XNoExposeEvent;
  763.  
  764. typedef struct {
  765.     int type;
  766.     unsigned long serial;    /* # of last request processed by server */
  767.     Bool send_event;    /* true if this came from a SendEvent request */
  768.     Display *display;    /* Display the event was read from */
  769.     Window window;
  770.     int state;        /* Visibility state */
  771. } XVisibilityEvent;
  772.  
  773. typedef struct {
  774.     int type;
  775.     unsigned long serial;    /* # of last request processed by server */
  776.     Bool send_event;    /* true if this came from a SendEvent request */
  777.     Display *display;    /* Display the event was read from */
  778.     Window parent;        /* parent of the window */
  779.     Window window;        /* window id of window created */
  780.     int x, y;        /* window location */
  781.     int width, height;    /* size of window */
  782.     int border_width;    /* border width */
  783.     Bool override_redirect;    /* creation should be overridden */
  784. } XCreateWindowEvent;
  785.  
  786. typedef struct {
  787.     int type;
  788.     unsigned long serial;    /* # of last request processed by server */
  789.     Bool send_event;    /* true if this came from a SendEvent request */
  790.     Display *display;    /* Display the event was read from */
  791.     Window event;
  792.     Window window;
  793. } XDestroyWindowEvent;
  794.  
  795. typedef struct {
  796.     int type;
  797.     unsigned long serial;    /* # of last request processed by server */
  798.     Bool send_event;    /* true if this came from a SendEvent request */
  799.     Display *display;    /* Display the event was read from */
  800.     Window event;
  801.     Window window;
  802.     Bool from_configure;
  803. } XUnmapEvent;
  804.  
  805. typedef struct {
  806.     int type;
  807.     unsigned long serial;    /* # of last request processed by server */
  808.     Bool send_event;    /* true if this came from a SendEvent request */
  809.     Display *display;    /* Display the event was read from */
  810.     Window event;
  811.     Window window;
  812.     Bool override_redirect;    /* boolean, is override set... */
  813. } XMapEvent;
  814.  
  815. typedef struct {
  816.     int type;
  817.     unsigned long serial;    /* # of last request processed by server */
  818.     Bool send_event;    /* true if this came from a SendEvent request */
  819.     Display *display;    /* Display the event was read from */
  820.     Window parent;
  821.     Window window;
  822. } XMapRequestEvent;
  823.  
  824. typedef struct {
  825.     int type;
  826.     unsigned long serial;    /* # of last request processed by server */
  827.     Bool send_event;    /* true if this came from a SendEvent request */
  828.     Display *display;    /* Display the event was read from */
  829.     Window event;
  830.     Window window;
  831.     Window parent;
  832.     int x, y;
  833.     Bool override_redirect;
  834. } XReparentEvent;
  835.  
  836. typedef struct {
  837.     int type;
  838.     unsigned long serial;    /* # of last request processed by server */
  839.     Bool send_event;    /* true if this came from a SendEvent request */
  840.     Display *display;    /* Display the event was read from */
  841.     Window event;
  842.     Window window;
  843.     int x, y;
  844.     int width, height;
  845.     int border_width;
  846.     Window above;
  847.     Bool override_redirect;
  848. } XConfigureEvent;
  849.  
  850. typedef struct {
  851.     int type;
  852.     unsigned long serial;    /* # of last request processed by server */
  853.     Bool send_event;    /* true if this came from a SendEvent request */
  854.     Display *display;    /* Display the event was read from */
  855.     Window event;
  856.     Window window;
  857.     int x, y;
  858. } XGravityEvent;
  859.  
  860. typedef struct {
  861.     int type;
  862.     unsigned long serial;    /* # of last request processed by server */
  863.     Bool send_event;    /* true if this came from a SendEvent request */
  864.     Display *display;    /* Display the event was read from */
  865.     Window window;
  866.     int width, height;
  867. } XResizeRequestEvent;
  868.  
  869. typedef struct {
  870.     int type;
  871.     unsigned long serial;    /* # of last request processed by server */
  872.     Bool send_event;    /* true if this came from a SendEvent request */
  873.     Display *display;    /* Display the event was read from */
  874.     Window parent;
  875.     Window window;
  876.     int x, y;
  877.     int width, height;
  878.     int border_width;
  879.     Window above;
  880.     int detail;        /* Above, Below, TopIf, BottomIf, Opposite */
  881.     unsigned long value_mask;
  882. } XConfigureRequestEvent;
  883.  
  884. typedef struct {
  885.     int type;
  886.     unsigned long serial;    /* # of last request processed by server */
  887.     Bool send_event;    /* true if this came from a SendEvent request */
  888.     Display *display;    /* Display the event was read from */
  889.     Window event;
  890.     Window window;
  891.     int place;        /* PlaceOnTop, PlaceOnBottom */
  892. } XCirculateEvent;
  893.  
  894. typedef struct {
  895.     int type;
  896.     unsigned long serial;    /* # of last request processed by server */
  897.     Bool send_event;    /* true if this came from a SendEvent request */
  898.     Display *display;    /* Display the event was read from */
  899.     Window parent;
  900.     Window window;
  901.     int place;        /* PlaceOnTop, PlaceOnBottom */
  902. } XCirculateRequestEvent;
  903.  
  904. typedef struct {
  905.     int type;
  906.     unsigned long serial;    /* # of last request processed by server */
  907.     Bool send_event;    /* true if this came from a SendEvent request */
  908.     Display *display;    /* Display the event was read from */
  909.     Window window;
  910.     Atom atom;
  911.     Time time;
  912.     int state;        /* NewValue, Deleted */
  913. } XPropertyEvent;
  914.  
  915. typedef struct {
  916.     int type;
  917.     unsigned long serial;    /* # of last request processed by server */
  918.     Bool send_event;    /* true if this came from a SendEvent request */
  919.     Display *display;    /* Display the event was read from */
  920.     Window window;
  921.     Atom selection;
  922.     Time time;
  923. } XSelectionClearEvent;
  924.  
  925. typedef struct {
  926.     int type;
  927.     unsigned long serial;    /* # of last request processed by server */
  928.     Bool send_event;    /* true if this came from a SendEvent request */
  929.     Display *display;    /* Display the event was read from */
  930.     Window owner;
  931.     Window requestor;
  932.     Atom selection;
  933.     Atom target;
  934.     Atom property;
  935.     Time time;
  936. } XSelectionRequestEvent;
  937.  
  938. typedef struct {
  939.     int type;
  940.     unsigned long serial;    /* # of last request processed by server */
  941.     Bool send_event;    /* true if this came from a SendEvent request */
  942.     Display *display;    /* Display the event was read from */
  943.     Window requestor;
  944.     Atom selection;
  945.     Atom target;
  946.     Atom property;        /* ATOM or None */
  947.     Time time;
  948. } XSelectionEvent;
  949.  
  950. typedef struct {
  951.     int type;
  952.     unsigned long serial;    /* # of last request processed by server */
  953.     Bool send_event;    /* true if this came from a SendEvent request */
  954.     Display *display;    /* Display the event was read from */
  955.     Window window;
  956.     Colormap colormap;    /* COLORMAP or None */
  957. #if defined(__cplusplus) || defined(c_plusplus)
  958.     Bool c_new;        /* C++ */
  959. #else
  960.     Bool new;
  961. #endif
  962.     int state;        /* ColormapInstalled, ColormapUninstalled */
  963. } XColormapEvent;
  964.  
  965. typedef struct {
  966.     int type;
  967.     unsigned long serial;    /* # of last request processed by server */
  968.     Bool send_event;    /* true if this came from a SendEvent request */
  969.     Display *display;    /* Display the event was read from */
  970.     Window window;
  971.     Atom message_type;
  972.     int format;
  973.     union {
  974.         char b[20];
  975.         short s[10];
  976.         long l[5];
  977.         } data;
  978. } XClientMessageEvent;
  979.  
  980. typedef struct {
  981.     int type;
  982.     unsigned long serial;    /* # of last request processed by server */
  983.     Bool send_event;    /* true if this came from a SendEvent request */
  984.     Display *display;    /* Display the event was read from */
  985.     Window window;        /* unused */
  986.     int request;        /* one of MappingModifier, MappingKeyboard,
  987.                    MappingPointer */
  988.     int first_keycode;    /* first keycode */
  989.     int count;        /* defines range of change w. first_keycode*/
  990. } XMappingEvent;
  991.  
  992. typedef struct {
  993.     int type;
  994.     Display *display;    /* Display the event was read from */
  995.     XID resourceid;        /* resource id */
  996.     unsigned long serial;    /* serial number of failed request */
  997.     unsigned char error_code;    /* error code of failed request */
  998.     unsigned char request_code;    /* Major op-code of failed request */
  999.     unsigned char minor_code;    /* Minor op-code of failed request */
  1000. } XErrorEvent;
  1001.  
  1002. typedef struct {
  1003.     int type;
  1004.     unsigned long serial;    /* # of last request processed by server */
  1005.     Bool send_event;    /* true if this came from a SendEvent request */
  1006.     Display *display;/* Display the event was read from */
  1007.     Window window;    /* window on which event was requested in event mask */
  1008. } XAnyEvent;
  1009.  
  1010. /*
  1011.  * this union is defined so Xlib can always use the same sized
  1012.  * event structure internally, to avoid memory fragmentation.
  1013.  */
  1014. typedef union _XEvent {
  1015.         int type;        /* must not be changed; first element */
  1016.     XAnyEvent xany;
  1017.     XKeyEvent xkey;
  1018.     XButtonEvent xbutton;
  1019.     XMotionEvent xmotion;
  1020.     XCrossingEvent xcrossing;
  1021.     XFocusChangeEvent xfocus;
  1022.     XExposeEvent xexpose;
  1023.     XGraphicsExposeEvent xgraphicsexpose;
  1024.     XNoExposeEvent xnoexpose;
  1025.     XVisibilityEvent xvisibility;
  1026.     XCreateWindowEvent xcreatewindow;
  1027.     XDestroyWindowEvent xdestroywindow;
  1028.     XUnmapEvent xunmap;
  1029.     XMapEvent xmap;
  1030.     XMapRequestEvent xmaprequest;
  1031.     XReparentEvent xreparent;
  1032.     XConfigureEvent xconfigure;
  1033.     XGravityEvent xgravity;
  1034.     XResizeRequestEvent xresizerequest;
  1035.     XConfigureRequestEvent xconfigurerequest;
  1036.     XCirculateEvent xcirculate;
  1037.     XCirculateRequestEvent xcirculaterequest;
  1038.     XPropertyEvent xproperty;
  1039.     XSelectionClearEvent xselectionclear;
  1040.     XSelectionRequestEvent xselectionrequest;
  1041.     XSelectionEvent xselection;
  1042.     XColormapEvent xcolormap;
  1043.     XClientMessageEvent xclient;
  1044.     XMappingEvent xmapping;
  1045.     XErrorEvent xerror;
  1046.     XKeymapEvent xkeymap;
  1047.     long pad[24];
  1048. } XEvent;
  1049. #endif
  1050.  
  1051. #define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))
  1052.  
  1053. /*
  1054.  * per character font metric information.
  1055.  */
  1056. typedef struct {
  1057.     short    lbearing;    /* origin to left edge of raster */
  1058.     short    rbearing;    /* origin to right edge of raster */
  1059.     short    width;        /* advance to next char's origin */
  1060.     short    ascent;        /* baseline to top edge of raster */
  1061.     short    descent;    /* baseline to bottom edge of raster */
  1062.     unsigned short attributes;    /* per char flags (not predefined) */
  1063. } XCharStruct;
  1064.  
  1065. /*
  1066.  * To allow arbitrary information with fonts, there are additional properties
  1067.  * returned.
  1068.  */
  1069. typedef struct {
  1070.     Atom name;
  1071.     unsigned long card32;
  1072. } XFontProp;
  1073.  
  1074. typedef struct {
  1075.     XExtData    *ext_data;    /* hook for extension to hang data */
  1076.     Font        fid;            /* Font id for this font */
  1077.     unsigned    direction;    /* hint about direction the font is painted */
  1078.     unsigned    min_char_or_byte2;/* first character */
  1079.     unsigned    max_char_or_byte2;/* last character */
  1080.     unsigned    min_byte1;    /* first row that exists */
  1081.     unsigned    max_byte1;    /* last row that exists */
  1082.     Bool    all_chars_exist;/* flag if all characters have non-zero size*/
  1083.     unsigned    default_char;    /* char to print for undefined character */
  1084.     int         n_properties;   /* how many properties there are */
  1085.     XFontProp    *properties;    /* pointer to array of additional properties*/
  1086.     XCharStruct    min_bounds;    /* minimum bounds over all existing char*/
  1087.     XCharStruct    max_bounds;    /* maximum bounds over all existing char*/
  1088.     XCharStruct    *per_char;    /* first_char to last_char information */
  1089.     int        ascent;        /* log. extent above baseline for spacing */
  1090.     int        descent;    /* log. descent below baseline for spacing */
  1091. } XFontStruct;
  1092.  
  1093. /*
  1094.  * PolyText routines take these as arguments.
  1095.  */
  1096. typedef struct {
  1097.     char *chars;        /* pointer to string */
  1098.     int nchars;            /* number of characters */
  1099.     int delta;            /* delta between strings */
  1100.     Font font;            /* font to print it in, None don't change */
  1101. } XTextItem;
  1102.  
  1103. typedef struct {        /* normal 16 bit characters are two bytes */
  1104.     unsigned char byte1;
  1105.     unsigned char byte2;
  1106. } XChar2b;
  1107.  
  1108. typedef struct {
  1109.     XChar2b *chars;        /* two byte characters */
  1110.     int nchars;            /* number of characters */
  1111.     int delta;            /* delta between strings */
  1112.     Font font;            /* font to print it in, None don't change */
  1113. } XTextItem16;
  1114.  
  1115.  
  1116. typedef union { Display *display;
  1117.         GC gc;
  1118.         Visual *visual;
  1119.         Screen *screen;
  1120.         ScreenFormat *pixmap_format;
  1121.         XFontStruct *font; } XEDataObject;
  1122.  
  1123. typedef struct {
  1124.     XRectangle      max_ink_extent;
  1125.     XRectangle      max_logical_extent;
  1126. } XFontSetExtents;
  1127.  
  1128. /* unused:
  1129. typedef void (*XOMProc)();
  1130.  */
  1131.  
  1132. typedef struct _XOM *XOM;
  1133. typedef struct _XOC *XOC, *XFontSet;
  1134.  
  1135. typedef struct {
  1136.     char           *chars;
  1137.     int             nchars;
  1138.     int             delta;
  1139.     XFontSet        font_set;
  1140. } XmbTextItem;
  1141.  
  1142. typedef struct {
  1143.     wchar_t        *chars;
  1144.     int             nchars;
  1145.     int             delta;
  1146.     XFontSet        font_set;
  1147. } XwcTextItem;
  1148.  
  1149. #define XNRequiredCharSet "requiredCharSet"
  1150. #define XNQueryOrientation "queryOrientation"
  1151. #define XNBaseFontName "baseFontName"
  1152. #define XNOMAutomatic "omAutomatic"
  1153. #define XNMissingCharSet "missingCharSet"
  1154. #define XNDefaultString "defaultString"
  1155. #define XNOrientation "orientation"
  1156. #define XNDirectionalDependentDrawing "directionalDependentDrawing"
  1157. #define XNContextualDrawing "contextualDrawing"
  1158. #define XNFontInfo "fontInfo"
  1159.  
  1160. typedef struct {
  1161.     int charset_count;
  1162.     char **charset_list;
  1163. } XOMCharSetList;
  1164.  
  1165. typedef enum {
  1166.     XOMOrientation_LTR_TTB,
  1167.     XOMOrientation_RTL_TTB,
  1168.     XOMOrientation_TTB_LTR,
  1169.     XOMOrientation_TTB_RTL,
  1170.     XOMOrientation_Context
  1171. } XOrientation;
  1172.  
  1173. typedef struct {
  1174.     int num_orientation;
  1175.     XOrientation *orientation;    /* Input Text description */
  1176. } XOMOrientation;
  1177.  
  1178. typedef struct {
  1179.     int num_font;
  1180.     XFontStruct **font_struct_list;
  1181.     char **font_name_list;
  1182. } XOMFontInfo;
  1183.  
  1184. typedef struct _XIM *XIM;
  1185. typedef struct _XIC *XIC;
  1186.  
  1187. typedef void (*XIMProc)(
  1188. #if NeedFunctionPrototypes
  1189.     XIM,
  1190.     XPointer,
  1191.     XPointer
  1192. #endif
  1193. );
  1194.  
  1195. typedef Bool (*XICProc)(
  1196. #if NeedFunctionPrototypes
  1197.     XIC,
  1198.     XPointer,
  1199.     XPointer
  1200. #endif
  1201. );
  1202.  
  1203. typedef void (*XIDProc)(
  1204. #if NeedFunctionPrototypes
  1205.     Display*,
  1206.     XPointer,
  1207.     XPointer
  1208. #endif
  1209. );
  1210.  
  1211. typedef unsigned long XIMStyle;
  1212.  
  1213. typedef struct {
  1214.     unsigned short count_styles;
  1215.     XIMStyle *supported_styles;
  1216. } XIMStyles;
  1217.  
  1218. #define XIMPreeditArea        0x0001L
  1219. #define XIMPreeditCallbacks    0x0002L
  1220. #define XIMPreeditPosition    0x0004L
  1221. #define XIMPreeditNothing    0x0008L
  1222. #define XIMPreeditNone        0x0010L
  1223. #define XIMStatusArea        0x0100L
  1224. #define XIMStatusCallbacks    0x0200L
  1225. #define XIMStatusNothing    0x0400L
  1226. #define XIMStatusNone        0x0800L
  1227.  
  1228. #define XNVaNestedList "XNVaNestedList"
  1229. #define XNQueryInputStyle "queryInputStyle"
  1230. #define XNClientWindow "clientWindow"
  1231. #define XNInputStyle "inputStyle"
  1232. #define XNFocusWindow "focusWindow"
  1233. #define XNResourceName "resourceName"
  1234. #define XNResourceClass "resourceClass"
  1235. #define XNGeometryCallback "geometryCallback"
  1236. #define XNDestroyCallback "destroyCallback"
  1237. #define XNFilterEvents "filterEvents"
  1238. #define XNPreeditStartCallback "preeditStartCallback"
  1239. #define XNPreeditDoneCallback "preeditDoneCallback"
  1240. #define XNPreeditDrawCallback "preeditDrawCallback"
  1241. #define XNPreeditCaretCallback "preeditCaretCallback"
  1242. #define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
  1243. #define XNPreeditAttributes "preeditAttributes"
  1244. #define XNStatusStartCallback "statusStartCallback"
  1245. #define XNStatusDoneCallback "statusDoneCallback"
  1246. #define XNStatusDrawCallback "statusDrawCallback"
  1247. #define XNStatusAttributes "statusAttributes"
  1248. #define XNArea "area"
  1249. #define XNAreaNeeded "areaNeeded"
  1250. #define XNSpotLocation "spotLocation"
  1251. #define XNColormap "colorMap"
  1252. #define XNStdColormap "stdColorMap"
  1253. #define XNForeground "foreground"
  1254. #define XNBackground "background"
  1255. #define XNBackgroundPixmap "backgroundPixmap"
  1256. #define XNFontSet "fontSet"
  1257. #define XNLineSpace "lineSpace"
  1258. #define XNCursor "cursor"
  1259.  
  1260. #define XNQueryIMValuesList "queryIMValuesList"
  1261. #define XNQueryICValuesList "queryICValuesList"
  1262. #define XNVisiblePosition "visiblePosition"
  1263. #define XNR6PreeditCallback "r6PreeditCallback"
  1264. #define XNStringConversionCallback "stringConversionCallback"
  1265. #define XNStringConversion "stringConversion"
  1266. #define XNResetState "resetState"
  1267. #define XNHotKey "hotKey"
  1268. #define XNHotKeyState "hotKeyState"
  1269. #define XNPreeditState "preeditState"
  1270. #define XNSeparatorofNestedList "separatorofNestedList"
  1271.  
  1272. #define XBufferOverflow        -1
  1273. #define XLookupNone        1
  1274. #define XLookupChars        2
  1275. #define XLookupKeySym        3
  1276. #define XLookupBoth        4
  1277.  
  1278. #if NeedFunctionPrototypes
  1279. typedef void *XVaNestedList;
  1280. #else
  1281. typedef XPointer XVaNestedList;
  1282. #endif
  1283.  
  1284. typedef struct {
  1285.     XPointer client_data;
  1286.     XIMProc callback;
  1287. } XIMCallback;
  1288.  
  1289. typedef struct {
  1290.     XPointer client_data;
  1291.     XICProc callback;
  1292. } XICCallback;
  1293.  
  1294. typedef unsigned long XIMFeedback;
  1295.  
  1296. #define XIMReverse        1L
  1297. #define XIMUnderline        (1L<<1) 
  1298. #define XIMHighlight        (1L<<2)
  1299. #define XIMPrimary         (1L<<5)
  1300. #define XIMSecondary        (1L<<6)
  1301. #define XIMTertiary         (1L<<7)
  1302. #define XIMVisibleToForward     (1L<<8)
  1303. #define XIMVisibleToBackword     (1L<<9)
  1304. #define XIMVisibleToCenter     (1L<<10)
  1305.  
  1306. typedef struct _XIMText {
  1307.     unsigned short length;
  1308.     XIMFeedback *feedback;
  1309.     Bool encoding_is_wchar; 
  1310.     union {
  1311.     char *multi_byte;
  1312.     wchar_t *wide_char;
  1313.     } string; 
  1314. } XIMText;
  1315.  
  1316. typedef    unsigned long     XIMPreeditState;
  1317.  
  1318. #define    XIMPreeditUnKnown    0L
  1319. #define    XIMPreeditEnable    1L
  1320. #define    XIMPreeditDisable    (1L<<1)
  1321.  
  1322. typedef    struct    _XIMPreeditStateNotifyCallbackStruct {
  1323.     XIMPreeditState state;
  1324. } XIMPreeditStateNotifyCallbackStruct;
  1325.  
  1326. typedef    unsigned long     XIMResetState;
  1327.  
  1328. #define    XIMInitialState        1L
  1329. #define    XIMPreserveState    (1L<<1)
  1330.  
  1331. typedef unsigned long XIMStringConversionFeedback;
  1332.  
  1333. #define    XIMStringConversionLeftEdge    (0x00000001)
  1334. #define    XIMStringConversionRightEdge    (0x00000002)
  1335. #define    XIMStringConversionTopEdge    (0x00000004)
  1336. #define    XIMStringConversionBottomEdge    (0x00000008)
  1337. #define    XIMStringConversionConcealed    (0x00000010)
  1338. #define    XIMStringConversionWrapped    (0x00000020)
  1339.  
  1340. typedef struct _XIMStringConversionText {
  1341.     unsigned short length;
  1342.     XIMStringConversionFeedback *feedback;
  1343.     Bool encoding_is_wchar; 
  1344.     union {
  1345.     char *mbs;
  1346.     wchar_t *wcs;
  1347.     } string; 
  1348. } XIMStringConversionText;
  1349.  
  1350. typedef    unsigned short    XIMStringConversionPosition;
  1351.  
  1352. typedef    unsigned short    XIMStringConversionType;
  1353.  
  1354. #define    XIMStringConversionBuffer    (0x0001)
  1355. #define    XIMStringConversionLine        (0x0002)
  1356. #define    XIMStringConversionWord        (0x0003)
  1357. #define    XIMStringConversionChar        (0x0004)
  1358.  
  1359. typedef    unsigned short    XIMStringConversionOperation;
  1360.  
  1361. #define    XIMStringConversionSubstitution    (0x0001)
  1362. #define    XIMStringConversionRetrival    (0x0002)
  1363.  
  1364. typedef enum {
  1365.     XIMForwardChar, XIMBackwardChar,
  1366.     XIMForwardWord, XIMBackwardWord,
  1367.     XIMCaretUp, XIMCaretDown,
  1368.     XIMNextLine, XIMPreviousLine,
  1369.     XIMLineStart, XIMLineEnd, 
  1370.     XIMAbsolutePosition,
  1371.     XIMDontChange
  1372. } XIMCaretDirection;
  1373.  
  1374. typedef struct _XIMStringConversionCallbackStruct {
  1375.     XIMStringConversionPosition position;
  1376.     XIMCaretDirection direction;
  1377.     XIMStringConversionOperation operation;
  1378.     unsigned short factor;
  1379.     XIMStringConversionText *text;
  1380. } XIMStringConversionCallbackStruct;
  1381.  
  1382. typedef struct _XIMPreeditDrawCallbackStruct {
  1383.     int caret;        /* Cursor offset within pre-edit string */
  1384.     int chg_first;    /* Starting change position */
  1385.     int chg_length;    /* Length of the change in character count */
  1386.     XIMText *text;
  1387. } XIMPreeditDrawCallbackStruct;
  1388.  
  1389. typedef enum {
  1390.     XIMIsInvisible,    /* Disable caret feedback */ 
  1391.     XIMIsPrimary,    /* UI defined caret feedback */
  1392.     XIMIsSecondary    /* UI defined caret feedback */
  1393. } XIMCaretStyle;
  1394.  
  1395. typedef struct _XIMPreeditCaretCallbackStruct {
  1396.     int position;         /* Caret offset within pre-edit string */
  1397.     XIMCaretDirection direction; /* Caret moves direction */
  1398.     XIMCaretStyle style;     /* Feedback of the caret */
  1399. } XIMPreeditCaretCallbackStruct;
  1400.  
  1401. typedef enum {
  1402.     XIMTextType,
  1403.     XIMBitmapType
  1404. } XIMStatusDataType;
  1405.     
  1406. typedef struct _XIMStatusDrawCallbackStruct {
  1407.     XIMStatusDataType type;
  1408.     union {
  1409.     XIMText *text;
  1410.     Pixmap  bitmap;
  1411.     } data;
  1412. } XIMStatusDrawCallbackStruct;
  1413.  
  1414. typedef struct _XIMHotKeyTrigger {
  1415.     KeySym     keysym;
  1416.     int         modifier;
  1417.     int         modifier_mask;
  1418. } XIMHotKeyTrigger;
  1419.  
  1420. typedef struct _XIMHotKeyTriggers {
  1421.     int             num_hot_key;
  1422.     XIMHotKeyTrigger    *key;
  1423. } XIMHotKeyTriggers;
  1424.  
  1425. typedef    unsigned long     XIMHotKeyState;
  1426.  
  1427. #define    XIMHotKeyStateON    (0x0001L)
  1428. #define    XIMHotKeyStateOFF    (0x0002L)
  1429.  
  1430. typedef struct {
  1431.     unsigned short count_values;
  1432.     char **supported_values;
  1433. } XIMValuesList;
  1434.  
  1435. _XFUNCPROTOBEGIN
  1436.  
  1437. #if defined(WIN32) && !defined(_XLIBINT_)
  1438. #define _Xdebug (*_Xdebug_p)
  1439. #endif
  1440.  
  1441. extern int _Xdebug;
  1442.  
  1443. extern XFontStruct *XLoadQueryFont(
  1444. #if NeedFunctionPrototypes
  1445.     Display*        /* display */,
  1446.     _Xconst char*    /* name */
  1447. #endif
  1448. );
  1449.  
  1450. extern XFontStruct *XQueryFont(
  1451. #if NeedFunctionPrototypes
  1452.     Display*        /* display */,
  1453.     XID            /* font_ID */
  1454. #endif
  1455. );
  1456.  
  1457.  
  1458. extern XTimeCoord *XGetMotionEvents(
  1459. #if NeedFunctionPrototypes
  1460.     Display*        /* display */,
  1461.     Window        /* w */,
  1462.     Time        /* start */,
  1463.     Time        /* stop */,
  1464.     int*        /* nevents_return */
  1465. #endif
  1466. );
  1467.  
  1468. extern XModifierKeymap *XDeleteModifiermapEntry(
  1469. #if NeedFunctionPrototypes
  1470.     XModifierKeymap*    /* modmap */,
  1471. #if NeedWidePrototypes
  1472.     unsigned int    /* keycode_entry */,
  1473. #else
  1474.     KeyCode        /* keycode_entry */,
  1475. #endif
  1476.     int            /* modifier */
  1477. #endif
  1478. );
  1479.  
  1480. extern XModifierKeymap    *XGetModifierMapping(
  1481. #if NeedFunctionPrototypes
  1482.     Display*        /* display */
  1483. #endif
  1484. );
  1485.  
  1486. extern XModifierKeymap    *XInsertModifiermapEntry(
  1487. #if NeedFunctionPrototypes
  1488.     XModifierKeymap*    /* modmap */,
  1489. #if NeedWidePrototypes
  1490.     unsigned int    /* keycode_entry */,
  1491. #else
  1492.     KeyCode        /* keycode_entry */,
  1493. #endif
  1494.     int            /* modifier */    
  1495. #endif
  1496. );
  1497.  
  1498. extern XModifierKeymap *XNewModifiermap(
  1499. #if NeedFunctionPrototypes
  1500.     int            /* max_keys_per_mod */
  1501. #endif
  1502. );
  1503.  
  1504. extern XImage *XCreateImage(
  1505. #if NeedFunctionPrototypes
  1506.     Display*        /* display */,
  1507.     Visual*        /* visual */,
  1508.     unsigned int    /* depth */,
  1509.     int            /* format */,
  1510.     int            /* offset */,
  1511.     char*        /* data */,
  1512.     unsigned int    /* width */,
  1513.     unsigned int    /* height */,
  1514.     int            /* bitmap_pad */,
  1515.     int            /* bytes_per_line */
  1516. #endif
  1517. );
  1518. extern Status XInitImage(
  1519. #if NeedFunctionPrototypes
  1520.     XImage*        /* image */
  1521. #endif
  1522. );
  1523. extern XImage *XGetImage(
  1524. #if NeedFunctionPrototypes
  1525.     Display*        /* display */,
  1526.     Drawable        /* d */,
  1527.     int            /* x */,
  1528.     int            /* y */,
  1529.     unsigned int    /* width */,
  1530.     unsigned int    /* height */,
  1531.     unsigned long    /* plane_mask */,
  1532.     int            /* format */
  1533. #endif
  1534. );
  1535. extern XImage *XGetSubImage(
  1536. #if NeedFunctionPrototypes
  1537.     Display*        /* display */,
  1538.     Drawable        /* d */,
  1539.     int            /* x */,
  1540.     int            /* y */,
  1541.     unsigned int    /* width */,
  1542.     unsigned int    /* height */,
  1543.     unsigned long    /* plane_mask */,
  1544.     int            /* format */,
  1545.     XImage*        /* dest_image */,
  1546.     int            /* dest_x */,
  1547.     int            /* dest_y */
  1548. #endif
  1549. );
  1550.  
  1551. /* 
  1552.  * X function declarations.
  1553.  */
  1554. extern Display *XOpenDisplay(
  1555. #if NeedFunctionPrototypes
  1556.     _Xconst char*    /* display_name */
  1557. #endif
  1558. );
  1559.  
  1560. extern void XrmInitialize(
  1561. #if NeedFunctionPrototypes
  1562.     void
  1563. #endif
  1564. );
  1565.  
  1566. extern char *XFetchBytes(
  1567. #if NeedFunctionPrototypes
  1568.     Display*        /* display */,
  1569.     int*        /* nbytes_return */
  1570. #endif
  1571. );
  1572. extern char *XFetchBuffer(
  1573. #if NeedFunctionPrototypes
  1574.     Display*        /* display */,
  1575.     int*        /* nbytes_return */,
  1576.     int            /* buffer */
  1577. #endif
  1578. );
  1579. extern char *XGetAtomName(
  1580. #if NeedFunctionPrototypes
  1581.     Display*        /* display */,
  1582.     Atom        /* atom */
  1583. #endif
  1584. );
  1585. extern Status XGetAtomNames(
  1586. #if NeedFunctionPrototypes
  1587.     Display*        /* dpy */,
  1588.     Atom*        /* atoms */,
  1589.     int            /* count */,
  1590.     char**        /* names_return */
  1591. #endif
  1592. );
  1593. extern char *XGetDefault(
  1594. #if NeedFunctionPrototypes
  1595.     Display*        /* display */,
  1596.     _Xconst char*    /* program */,
  1597.     _Xconst char*    /* option */          
  1598. #endif
  1599. );
  1600. extern char *XDisplayName(
  1601. #if NeedFunctionPrototypes
  1602.     _Xconst char*    /* string */
  1603. #endif
  1604. );
  1605. extern char *XKeysymToString(
  1606. #if NeedFunctionPrototypes
  1607.     KeySym        /* keysym */
  1608. #endif
  1609. );
  1610.  
  1611. extern int (*XSynchronize(
  1612. #if NeedFunctionPrototypes
  1613.     Display*        /* display */,
  1614.     Bool        /* onoff */
  1615. #endif
  1616. ))(
  1617. #if NeedNestedPrototypes
  1618.     Display*        /* display */
  1619. #endif
  1620. );
  1621. extern int (*XSetAfterFunction(
  1622. #if NeedFunctionPrototypes
  1623.     Display*        /* display */,
  1624.     int (*) (
  1625. #if NeedNestedPrototypes
  1626.          Display*    /* display */
  1627. #endif
  1628.             )        /* procedure */
  1629. #endif
  1630. ))(
  1631. #if NeedNestedPrototypes
  1632.     Display*        /* display */
  1633. #endif
  1634. );
  1635. extern Atom XInternAtom(
  1636. #if NeedFunctionPrototypes
  1637.     Display*        /* display */,
  1638.     _Xconst char*    /* atom_name */,
  1639.     Bool        /* only_if_exists */         
  1640. #endif
  1641. );
  1642. extern Status XInternAtoms(
  1643. #if NeedFunctionPrototypes
  1644.     Display*        /* dpy */,
  1645.     char**        /* names */,
  1646.     int            /* count */,
  1647.     Bool        /* onlyIfExists */,
  1648.     Atom*        /* atoms_return */
  1649. #endif
  1650. );
  1651. extern Colormap XCopyColormapAndFree(
  1652. #if NeedFunctionPrototypes
  1653.     Display*        /* display */,
  1654.     Colormap        /* colormap */
  1655. #endif
  1656. );
  1657. extern Colormap XCreateColormap(
  1658. #if NeedFunctionPrototypes
  1659.     Display*        /* display */,
  1660.     Window        /* w */,
  1661.     Visual*        /* visual */,
  1662.     int            /* alloc */             
  1663. #endif
  1664. );
  1665. extern Cursor XCreatePixmapCursor(
  1666. #if NeedFunctionPrototypes
  1667.     Display*        /* display */,
  1668.     Pixmap        /* source */,
  1669.     Pixmap        /* mask */,
  1670.     XColor*        /* foreground_color */,
  1671.     XColor*        /* background_color */,
  1672.     unsigned int    /* x */,
  1673.     unsigned int    /* y */               
  1674. #endif
  1675. );
  1676. extern Cursor XCreateGlyphCursor(
  1677. #if NeedFunctionPrototypes
  1678.     Display*        /* display */,
  1679.     Font        /* source_font */,
  1680.     Font        /* mask_font */,
  1681.     unsigned int    /* source_char */,
  1682.     unsigned int    /* mask_char */,
  1683.     XColor*        /* foreground_color */,
  1684.     XColor*        /* background_color */
  1685. #endif
  1686. );
  1687. extern Cursor XCreateFontCursor(
  1688. #if NeedFunctionPrototypes
  1689.     Display*        /* display */,
  1690.     unsigned int    /* shape */
  1691. #endif
  1692. );
  1693. extern Font XLoadFont(
  1694. #if NeedFunctionPrototypes
  1695.     Display*        /* display */,
  1696.     _Xconst char*    /* name */
  1697. #endif
  1698. );
  1699. extern GC XCreateGC(
  1700. #if NeedFunctionPrototypes
  1701.     Display*        /* display */,
  1702.     Drawable        /* d */,
  1703.     unsigned long    /* valuemask */,
  1704.     XGCValues*        /* values */
  1705. #endif
  1706. );
  1707. extern GContext XGContextFromGC(
  1708. #if NeedFunctionPrototypes
  1709.     GC            /* gc */
  1710. #endif
  1711. );
  1712. extern void XFlushGC(
  1713. #if NeedFunctionPrototypes
  1714.     Display*        /* display */,
  1715.     GC            /* gc */
  1716. #endif
  1717. );
  1718. extern Pixmap XCreatePixmap(
  1719. #if NeedFunctionPrototypes
  1720.     Display*        /* display */,
  1721.     Drawable        /* d */,
  1722.     unsigned int    /* width */,
  1723.     unsigned int    /* height */,
  1724.     unsigned int    /* depth */                
  1725. #endif
  1726. );
  1727. extern Pixmap XCreateBitmapFromData(
  1728. #if NeedFunctionPrototypes
  1729.     Display*        /* display */,
  1730.     Drawable        /* d */,
  1731.     _Xconst char*    /* data */,
  1732.     unsigned int    /* width */,
  1733.     unsigned int    /* height */
  1734. #endif
  1735. );
  1736. extern Pixmap XCreatePixmapFromBitmapData(
  1737. #if NeedFunctionPrototypes
  1738.     Display*        /* display */,
  1739.     Drawable        /* d */,
  1740.     char*        /* data */,
  1741.     unsigned int    /* width */,
  1742.     unsigned int    /* height */,
  1743.     unsigned long    /* fg */,
  1744.     unsigned long    /* bg */,
  1745.     unsigned int    /* depth */
  1746. #endif
  1747. );
  1748. extern Window XCreateSimpleWindow(
  1749. #if NeedFunctionPrototypes
  1750.     Display*        /* display */,
  1751.     Window        /* parent */,
  1752.     int            /* x */,
  1753.     int            /* y */,
  1754.     unsigned int    /* width */,
  1755.     unsigned int    /* height */,
  1756.     unsigned int    /* border_width */,
  1757.     unsigned long    /* border */,
  1758.     unsigned long    /* background */
  1759. #endif
  1760. );
  1761. extern Window XGetSelectionOwner(
  1762. #if NeedFunctionPrototypes
  1763.     Display*        /* display */,
  1764.     Atom        /* selection */
  1765. #endif
  1766. );
  1767. extern Window XCreateWindow(
  1768. #if NeedFunctionPrototypes
  1769.     Display*        /* display */,
  1770.     Window        /* parent */,
  1771.     int            /* x */,
  1772.     int            /* y */,
  1773.     unsigned int    /* width */,
  1774.     unsigned int    /* height */,
  1775.     unsigned int    /* border_width */,
  1776.     int            /* depth */,
  1777.     unsigned int    /* class */,
  1778.     Visual*        /* visual */,
  1779.     unsigned long    /* valuemask */,
  1780.     XSetWindowAttributes*    /* attributes */
  1781. #endif
  1782. ); 
  1783. extern Colormap *XListInstalledColormaps(
  1784. #if NeedFunctionPrototypes
  1785.     Display*        /* display */,
  1786.     Window        /* w */,
  1787.     int*        /* num_return */
  1788. #endif
  1789. );
  1790. extern char **XListFonts(
  1791. #if NeedFunctionPrototypes
  1792.     Display*        /* display */,
  1793.     _Xconst char*    /* pattern */,
  1794.     int            /* maxnames */,
  1795.     int*        /* actual_count_return */
  1796. #endif
  1797. );
  1798. extern char **XListFontsWithInfo(
  1799. #if NeedFunctionPrototypes
  1800.     Display*        /* display */,
  1801.     _Xconst char*    /* pattern */,
  1802.     int            /* maxnames */,
  1803.     int*        /* count_return */,
  1804.     XFontStruct**    /* info_return */
  1805. #endif
  1806. );
  1807. extern char **XGetFontPath(
  1808. #if NeedFunctionPrototypes
  1809.     Display*        /* display */,
  1810.     int*        /* npaths_return */
  1811. #endif
  1812. );
  1813. extern char **XListExtensions(
  1814. #if NeedFunctionPrototypes
  1815.     Display*        /* display */,
  1816.     int*        /* nextensions_return */
  1817. #endif
  1818. );
  1819. extern Atom *XListProperties(
  1820. #if NeedFunctionPrototypes
  1821.     Display*        /* display */,
  1822.     Window        /* w */,
  1823.     int*        /* num_prop_return */
  1824. #endif
  1825. );
  1826. extern XHostAddress *XListHosts(
  1827. #if NeedFunctionPrototypes
  1828.     Display*        /* display */,
  1829.     int*        /* nhosts_return */,
  1830.     Bool*        /* state_return */
  1831. #endif
  1832. );
  1833. extern KeySym XKeycodeToKeysym(
  1834. #if NeedFunctionPrototypes
  1835.     Display*        /* display */,
  1836. #if NeedWidePrototypes
  1837.     unsigned int    /* keycode */,
  1838. #else
  1839.     KeyCode        /* keycode */,
  1840. #endif
  1841.     int            /* index */
  1842. #endif
  1843. );
  1844. extern KeySym XLookupKeysym(
  1845. #if NeedFunctionPrototypes
  1846.     XKeyEvent*        /* key_event */,
  1847.     int            /* index */
  1848. #endif
  1849. );
  1850. extern KeySym *XGetKeyboardMapping(
  1851. #if NeedFunctionPrototypes
  1852.     Display*        /* display */,
  1853. #if NeedWidePrototypes
  1854.     unsigned int    /* first_keycode */,
  1855. #else
  1856.     KeyCode        /* first_keycode */,
  1857. #endif
  1858.     int            /* keycode_count */,
  1859.     int*        /* keysyms_per_keycode_return */
  1860. #endif
  1861. );
  1862. extern KeySym XStringToKeysym(
  1863. #if NeedFunctionPrototypes
  1864.     _Xconst char*    /* string */
  1865. #endif
  1866. );
  1867. extern long XMaxRequestSize(
  1868. #if NeedFunctionPrototypes
  1869.     Display*        /* display */
  1870. #endif
  1871. );
  1872. extern long XExtendedMaxRequestSize(
  1873. #if NeedFunctionPrototypes
  1874.     Display*        /* display */
  1875. #endif
  1876. );
  1877. extern char *XResourceManagerString(
  1878. #if NeedFunctionPrototypes
  1879.     Display*        /* display */
  1880. #endif
  1881. );
  1882. extern char *XScreenResourceString(
  1883. #if NeedFunctionPrototypes
  1884.     Screen*        /* screen */
  1885. #endif
  1886. );
  1887. extern unsigned long XDisplayMotionBufferSize(
  1888. #if NeedFunctionPrototypes
  1889.     Display*        /* display */
  1890. #endif
  1891. );
  1892. extern VisualID XVisualIDFromVisual(
  1893. #if NeedFunctionPrototypes
  1894.     Visual*        /* visual */
  1895. #endif
  1896. );
  1897.  
  1898. /* multithread routines */
  1899.  
  1900. extern Status XInitThreads(
  1901. #if NeedFunctionPrototypes
  1902.     void
  1903. #endif
  1904. );
  1905.  
  1906. extern void XLockDisplay(
  1907. #if NeedFunctionPrototypes
  1908.     Display*        /* display */
  1909. #endif
  1910. );
  1911.  
  1912. extern void XUnlockDisplay(
  1913. #if NeedFunctionPrototypes
  1914.     Display*        /* display */
  1915. #endif
  1916. );
  1917.  
  1918. /* routines for dealing with extensions */
  1919.  
  1920. extern XExtCodes *XInitExtension(
  1921. #if NeedFunctionPrototypes
  1922.     Display*        /* display */,
  1923.     _Xconst char*    /* name */
  1924. #endif
  1925. );
  1926.  
  1927. extern XExtCodes *XAddExtension(
  1928. #if NeedFunctionPrototypes
  1929.     Display*        /* display */
  1930. #endif
  1931. );
  1932. extern XExtData *XFindOnExtensionList(
  1933. #if NeedFunctionPrototypes
  1934.     XExtData**        /* structure */,
  1935.     int            /* number */
  1936. #endif
  1937. );
  1938. extern XExtData **XEHeadOfExtensionList(
  1939. #if NeedFunctionPrototypes
  1940.     XEDataObject    /* object */
  1941. #endif
  1942. );
  1943.  
  1944. /* these are routines for which there are also macros */
  1945. extern Window XRootWindow(
  1946. #if NeedFunctionPrototypes
  1947.     Display*        /* display */,
  1948.     int            /* screen_number */
  1949. #endif
  1950. );
  1951. extern Window XDefaultRootWindow(
  1952. #if NeedFunctionPrototypes
  1953.     Display*        /* display */
  1954. #endif
  1955. );
  1956. extern Window XRootWindowOfScreen(
  1957. #if NeedFunctionPrototypes
  1958.     Screen*        /* screen */
  1959. #endif
  1960. );
  1961. extern Visual *XDefaultVisual(
  1962. #if NeedFunctionPrototypes
  1963.     Display*        /* display */,
  1964.     int            /* screen_number */
  1965. #endif
  1966. );
  1967. extern Visual *XDefaultVisualOfScreen(
  1968. #if NeedFunctionPrototypes
  1969.     Screen*        /* screen */
  1970. #endif
  1971. );
  1972. extern GC XDefaultGC(
  1973. #if NeedFunctionPrototypes
  1974.     Display*        /* display */,
  1975.     int            /* screen_number */
  1976. #endif
  1977. );
  1978. extern GC XDefaultGCOfScreen(
  1979. #if NeedFunctionPrototypes
  1980.     Screen*        /* screen */
  1981. #endif
  1982. );
  1983. extern unsigned long XBlackPixel(
  1984. #if NeedFunctionPrototypes
  1985.     Display*        /* display */,
  1986.     int            /* screen_number */
  1987. #endif
  1988. );
  1989. extern unsigned long XWhitePixel(
  1990. #if NeedFunctionPrototypes
  1991.     Display*        /* display */,
  1992.     int            /* screen_number */
  1993. #endif
  1994. );
  1995. extern unsigned long XAllPlanes(
  1996. #if NeedFunctionPrototypes
  1997.     void
  1998. #endif
  1999. );
  2000. extern unsigned long XBlackPixelOfScreen(
  2001. #if NeedFunctionPrototypes
  2002.     Screen*        /* screen */
  2003. #endif
  2004. );
  2005. extern unsigned long XWhitePixelOfScreen(
  2006. #if NeedFunctionPrototypes
  2007.     Screen*        /* screen */
  2008. #endif
  2009. );
  2010. extern unsigned long XNextRequest(
  2011. #if NeedFunctionPrototypes
  2012.     Display*        /* display */
  2013. #endif
  2014. );
  2015. extern unsigned long XLastKnownRequestProcessed(
  2016. #if NeedFunctionPrototypes
  2017.     Display*        /* display */
  2018. #endif
  2019. );
  2020. extern char *XServerVendor(
  2021. #if NeedFunctionPrototypes
  2022.     Display*        /* display */
  2023. #endif
  2024. );
  2025. extern char *XDisplayString(
  2026. #if NeedFunctionPrototypes
  2027.     Display*        /* display */
  2028. #endif
  2029. );
  2030. extern Colormap XDefaultColormap(
  2031. #if NeedFunctionPrototypes
  2032.     Display*        /* display */,
  2033.     int            /* screen_number */
  2034. #endif
  2035. );
  2036. extern Colormap XDefaultColormapOfScreen(
  2037. #if NeedFunctionPrototypes
  2038.     Screen*        /* screen */
  2039. #endif
  2040. );
  2041. extern Display *XDisplayOfScreen(
  2042. #if NeedFunctionPrototypes
  2043.     Screen*        /* screen */
  2044. #endif
  2045. );
  2046. extern Screen *XScreenOfDisplay(
  2047. #if NeedFunctionPrototypes
  2048.     Display*        /* display */,
  2049.     int            /* screen_number */
  2050. #endif
  2051. );
  2052. extern Screen *XDefaultScreenOfDisplay(
  2053. #if NeedFunctionPrototypes
  2054.     Display*        /* display */
  2055. #endif
  2056. );
  2057. extern long XEventMaskOfScreen(
  2058. #if NeedFunctionPrototypes
  2059.     Screen*        /* screen */
  2060. #endif
  2061. );
  2062.  
  2063. extern int XScreenNumberOfScreen(
  2064. #if NeedFunctionPrototypes
  2065.     Screen*        /* screen */
  2066. #endif
  2067. );
  2068.  
  2069. typedef int (*XErrorHandler) (        /* WARNING, this type not in Xlib spec */
  2070. #if NeedFunctionPrototypes
  2071.     Display*        /* display */,
  2072.     XErrorEvent*    /* error_event */
  2073. #endif
  2074. );
  2075.  
  2076. extern XErrorHandler XSetErrorHandler (
  2077. #if NeedFunctionPrototypes
  2078.     XErrorHandler    /* handler */
  2079. #endif
  2080. );
  2081.  
  2082.  
  2083. typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
  2084. #if NeedFunctionPrototypes
  2085.     Display*        /* display */
  2086. #endif
  2087. );
  2088.  
  2089. extern XIOErrorHandler XSetIOErrorHandler (
  2090. #if NeedFunctionPrototypes
  2091.     XIOErrorHandler    /* handler */
  2092. #endif
  2093. );
  2094.  
  2095.  
  2096. extern XPixmapFormatValues *XListPixmapFormats(
  2097. #if NeedFunctionPrototypes
  2098.     Display*        /* display */,
  2099.     int*        /* count_return */
  2100. #endif
  2101. );
  2102. extern int *XListDepths(
  2103. #if NeedFunctionPrototypes
  2104.     Display*        /* display */,
  2105.     int            /* screen_number */,
  2106.     int*        /* count_return */
  2107. #endif
  2108. );
  2109.  
  2110. /* ICCCM routines for things that don't require special include files; */
  2111. /* other declarations are given in Xutil.h                             */
  2112. extern Status XReconfigureWMWindow(
  2113. #if NeedFunctionPrototypes
  2114.     Display*        /* display */,
  2115.     Window        /* w */,
  2116.     int            /* screen_number */,
  2117.     unsigned int    /* mask */,
  2118.     XWindowChanges*    /* changes */
  2119. #endif
  2120. );
  2121.  
  2122. extern Status XGetWMProtocols(
  2123. #if NeedFunctionPrototypes
  2124.     Display*        /* display */,
  2125.     Window        /* w */,
  2126.     Atom**        /* protocols_return */,
  2127.     int*        /* count_return */
  2128. #endif
  2129. );
  2130. extern Status XSetWMProtocols(
  2131. #if NeedFunctionPrototypes
  2132.     Display*        /* display */,
  2133.     Window        /* w */,
  2134.     Atom*        /* protocols */,
  2135.     int            /* count */
  2136. #endif
  2137. );
  2138. extern Status XIconifyWindow(
  2139. #if NeedFunctionPrototypes
  2140.     Display*        /* display */,
  2141.     Window        /* w */,
  2142.     int            /* screen_number */
  2143. #endif
  2144. );
  2145. extern Status XWithdrawWindow(
  2146. #if NeedFunctionPrototypes
  2147.     Display*        /* display */,
  2148.     Window        /* w */,
  2149.     int            /* screen_number */
  2150. #endif
  2151. );
  2152. extern Status XGetCommand(
  2153. #if NeedFunctionPrototypes
  2154.     Display*        /* display */,
  2155.     Window        /* w */,
  2156.     char***        /* argv_return */,
  2157.     int*        /* argc_return */
  2158. #endif
  2159. );
  2160. extern Status XGetWMColormapWindows(
  2161. #if NeedFunctionPrototypes
  2162.     Display*        /* display */,
  2163.     Window        /* w */,
  2164.     Window**        /* windows_return */,
  2165.     int*        /* count_return */
  2166. #endif
  2167. );
  2168. extern Status XSetWMColormapWindows(
  2169. #if NeedFunctionPrototypes
  2170.     Display*        /* display */,
  2171.     Window        /* w */,
  2172.     Window*        /* colormap_windows */,
  2173.     int            /* count */
  2174. #endif
  2175. );
  2176. extern void XFreeStringList(
  2177. #if NeedFunctionPrototypes
  2178.     char**        /* list */
  2179. #endif
  2180. );
  2181. extern int XSetTransientForHint(
  2182. #if NeedFunctionPrototypes
  2183.     Display*        /* display */,
  2184.     Window        /* w */,
  2185.     Window        /* prop_window */
  2186. #endif
  2187. );
  2188.  
  2189. /* The following are given in alphabetical order */
  2190.  
  2191. extern int XActivateScreenSaver(
  2192. #if NeedFunctionPrototypes
  2193.     Display*        /* display */
  2194. #endif
  2195. );
  2196.  
  2197. extern int XAddHost(
  2198. #if NeedFunctionPrototypes
  2199.     Display*        /* display */,
  2200.     XHostAddress*    /* host */
  2201. #endif
  2202. );
  2203.  
  2204. extern int XAddHosts(
  2205. #if NeedFunctionPrototypes
  2206.     Display*        /* display */,
  2207.     XHostAddress*    /* hosts */,
  2208.     int            /* num_hosts */    
  2209. #endif
  2210. );
  2211.  
  2212. extern int XAddToExtensionList(
  2213. #if NeedFunctionPrototypes
  2214.     struct _XExtData**    /* structure */,
  2215.     XExtData*        /* ext_data */
  2216. #endif
  2217. );
  2218.  
  2219. extern int XAddToSaveSet(
  2220. #if NeedFunctionPrototypes
  2221.     Display*        /* display */,
  2222.     Window        /* w */
  2223. #endif
  2224. );
  2225.  
  2226. extern Status XAllocColor(
  2227. #if NeedFunctionPrototypes
  2228.     Display*        /* display */,
  2229.     Colormap        /* colormap */,
  2230.     XColor*        /* screen_in_out */
  2231. #endif
  2232. );
  2233.  
  2234. extern Status XAllocColorCells(
  2235. #if NeedFunctionPrototypes
  2236.     Display*        /* display */,
  2237.     Colormap        /* colormap */,
  2238.     Bool            /* contig */,
  2239.     unsigned long*    /* plane_masks_return */,
  2240.     unsigned int    /* nplanes */,
  2241.     unsigned long*    /* pixels_return */,
  2242.     unsigned int     /* npixels */
  2243. #endif
  2244. );
  2245.  
  2246. extern Status XAllocColorPlanes(
  2247. #if NeedFunctionPrototypes
  2248.     Display*        /* display */,
  2249.     Colormap        /* colormap */,
  2250.     Bool        /* contig */,
  2251.     unsigned long*    /* pixels_return */,
  2252.     int            /* ncolors */,
  2253.     int            /* nreds */,
  2254.     int            /* ngreens */,
  2255.     int            /* nblues */,
  2256.     unsigned long*    /* rmask_return */,
  2257.     unsigned long*    /* gmask_return */,
  2258.     unsigned long*    /* bmask_return */
  2259. #endif
  2260. );
  2261.  
  2262. extern Status XAllocNamedColor(
  2263. #if NeedFunctionPrototypes
  2264.     Display*        /* display */,
  2265.     Colormap        /* colormap */,
  2266.     _Xconst char*    /* color_name */,
  2267.     XColor*        /* screen_def_return */,
  2268.     XColor*        /* exact_def_return */
  2269. #endif
  2270. );
  2271.  
  2272. extern int XAllowEvents(
  2273. #if NeedFunctionPrototypes
  2274.     Display*        /* display */,
  2275.     int            /* event_mode */,
  2276.     Time        /* time */
  2277. #endif
  2278. );
  2279.  
  2280. extern int XAutoRepeatOff(
  2281. #if NeedFunctionPrototypes
  2282.     Display*        /* display */
  2283. #endif
  2284. );
  2285.  
  2286. extern int XAutoRepeatOn(
  2287. #if NeedFunctionPrototypes
  2288.     Display*        /* display */
  2289. #endif
  2290. );
  2291.  
  2292. extern int XBell(
  2293. #if NeedFunctionPrototypes
  2294.     Display*        /* display */,
  2295.     int            /* percent */
  2296. #endif
  2297. );
  2298.  
  2299. extern int XBitmapBitOrder(
  2300. #if NeedFunctionPrototypes
  2301.     Display*        /* display */
  2302. #endif
  2303. );
  2304.  
  2305. extern int XBitmapPad(
  2306. #if NeedFunctionPrototypes
  2307.     Display*        /* display */
  2308. #endif
  2309. );
  2310.  
  2311. extern int XBitmapUnit(
  2312. #if NeedFunctionPrototypes
  2313.     Display*        /* display */
  2314. #endif
  2315. );
  2316.  
  2317. extern int XCellsOfScreen(
  2318. #if NeedFunctionPrototypes
  2319.     Screen*        /* screen */
  2320. #endif
  2321. );
  2322.  
  2323. extern int XChangeActivePointerGrab(
  2324. #if NeedFunctionPrototypes
  2325.     Display*        /* display */,
  2326.     unsigned int    /* event_mask */,
  2327.     Cursor        /* cursor */,
  2328.     Time        /* time */
  2329. #endif
  2330. );
  2331.  
  2332. extern int XChangeGC(
  2333. #if NeedFunctionPrototypes
  2334.     Display*        /* display */,
  2335.     GC            /* gc */,
  2336.     unsigned long    /* valuemask */,
  2337.     XGCValues*        /* values */
  2338. #endif
  2339. );
  2340.  
  2341. extern int XChangeKeyboardControl(
  2342. #if NeedFunctionPrototypes
  2343.     Display*        /* display */,
  2344.     unsigned long    /* value_mask */,
  2345.     XKeyboardControl*    /* values */
  2346. #endif
  2347. );
  2348.  
  2349. extern int XChangeKeyboardMapping(
  2350. #if NeedFunctionPrototypes
  2351.     Display*        /* display */,
  2352.     int            /* first_keycode */,
  2353.     int            /* keysyms_per_keycode */,
  2354.     KeySym*        /* keysyms */,
  2355.     int            /* num_codes */
  2356. #endif
  2357. );
  2358.  
  2359. extern int XChangePointerControl(
  2360. #if NeedFunctionPrototypes
  2361.     Display*        /* display */,
  2362.     Bool        /* do_accel */,
  2363.     Bool        /* do_threshold */,
  2364.     int            /* accel_numerator */,
  2365.     int            /* accel_denominator */,
  2366.     int            /* threshold */
  2367. #endif
  2368. );
  2369.  
  2370. extern int XChangeProperty(
  2371. #if NeedFunctionPrototypes
  2372.     Display*        /* display */,
  2373.     Window        /* w */,
  2374.     Atom        /* property */,
  2375.     Atom        /* type */,
  2376.     int            /* format */,
  2377.     int            /* mode */,
  2378.     _Xconst unsigned char*    /* data */,
  2379.     int            /* nelements */
  2380. #endif
  2381. );
  2382.  
  2383. extern int XChangeSaveSet(
  2384. #if NeedFunctionPrototypes
  2385.     Display*        /* display */,
  2386.     Window        /* w */,
  2387.     int            /* change_mode */
  2388. #endif
  2389. );
  2390.  
  2391. extern int XChangeWindowAttributes(
  2392. #if NeedFunctionPrototypes
  2393.     Display*        /* display */,
  2394.     Window        /* w */,
  2395.     unsigned long    /* valuemask */,
  2396.     XSetWindowAttributes* /* attributes */
  2397. #endif
  2398. );
  2399.  
  2400. extern Bool XCheckIfEvent(
  2401. #if NeedFunctionPrototypes
  2402.     Display*        /* display */,
  2403.     XEvent*        /* event_return */,
  2404.     Bool (*) (
  2405. #if NeedNestedPrototypes
  2406.            Display*            /* display */,
  2407.                XEvent*            /* event */,
  2408.                XPointer            /* arg */
  2409. #endif
  2410.              )        /* predicate */,
  2411.     XPointer        /* arg */
  2412. #endif
  2413. );
  2414.  
  2415. extern Bool XCheckMaskEvent(
  2416. #if NeedFunctionPrototypes
  2417.     Display*        /* display */,
  2418.     long        /* event_mask */,
  2419.     XEvent*        /* event_return */
  2420. #endif
  2421. );
  2422.  
  2423. extern Bool XCheckTypedEvent(
  2424. #if NeedFunctionPrototypes
  2425.     Display*        /* display */,
  2426.     int            /* event_type */,
  2427.     XEvent*        /* event_return */
  2428. #endif
  2429. );
  2430.  
  2431. extern Bool XCheckTypedWindowEvent(
  2432. #if NeedFunctionPrototypes
  2433.     Display*        /* display */,
  2434.     Window        /* w */,
  2435.     int            /* event_type */,
  2436.     XEvent*        /* event_return */
  2437. #endif
  2438. );
  2439.  
  2440. extern Bool XCheckWindowEvent(
  2441. #if NeedFunctionPrototypes
  2442.     Display*        /* display */,
  2443.     Window        /* w */,
  2444.     long        /* event_mask */,
  2445.     XEvent*        /* event_return */
  2446. #endif
  2447. );
  2448.  
  2449. extern int XCirculateSubwindows(
  2450. #if NeedFunctionPrototypes
  2451.     Display*        /* display */,
  2452.     Window        /* w */,
  2453.     int            /* direction */
  2454. #endif
  2455. );
  2456.  
  2457. extern int XCirculateSubwindowsDown(
  2458. #if NeedFunctionPrototypes
  2459.     Display*        /* display */,
  2460.     Window        /* w */
  2461. #endif
  2462. );
  2463.  
  2464. extern int XCirculateSubwindowsUp(
  2465. #if NeedFunctionPrototypes
  2466.     Display*        /* display */,
  2467.     Window        /* w */
  2468. #endif
  2469. );
  2470.  
  2471. extern int XClearArea(
  2472. #if NeedFunctionPrototypes
  2473.     Display*        /* display */,
  2474.     Window        /* w */,
  2475.     int            /* x */,
  2476.     int            /* y */,
  2477.     unsigned int    /* width */,
  2478.     unsigned int    /* height */,
  2479.     Bool        /* exposures */
  2480. #endif
  2481. );
  2482.  
  2483. extern int XClearWindow(
  2484. #if NeedFunctionPrototypes
  2485.     Display*        /* display */,
  2486.     Window        /* w */
  2487. #endif
  2488. );
  2489.  
  2490. extern int XCloseDisplay(
  2491. #if NeedFunctionPrototypes
  2492.     Display*        /* display */
  2493. #endif
  2494. );
  2495.  
  2496. extern int XConfigureWindow(
  2497. #if NeedFunctionPrototypes
  2498.     Display*        /* display */,
  2499.     Window        /* w */,
  2500.     unsigned int    /* value_mask */,
  2501.     XWindowChanges*    /* values */         
  2502. #endif
  2503. );
  2504.  
  2505. extern int XConnectionNumber(
  2506. #if NeedFunctionPrototypes
  2507.     Display*        /* display */
  2508. #endif
  2509. );
  2510.  
  2511. extern int XConvertSelection(
  2512. #if NeedFunctionPrototypes
  2513.     Display*        /* display */,
  2514.     Atom        /* selection */,
  2515.     Atom         /* target */,
  2516.     Atom        /* property */,
  2517.     Window        /* requestor */,
  2518.     Time        /* time */
  2519. #endif
  2520. );
  2521.  
  2522. extern int XCopyArea(
  2523. #if NeedFunctionPrototypes
  2524.     Display*        /* display */,
  2525.     Drawable        /* src */,
  2526.     Drawable        /* dest */,
  2527.     GC            /* gc */,
  2528.     int            /* src_x */,
  2529.     int            /* src_y */,
  2530.     unsigned int    /* width */,
  2531.     unsigned int    /* height */,
  2532.     int            /* dest_x */,
  2533.     int            /* dest_y */
  2534. #endif
  2535. );
  2536.  
  2537. extern int XCopyGC(
  2538. #if NeedFunctionPrototypes
  2539.     Display*        /* display */,
  2540.     GC            /* src */,
  2541.     unsigned long    /* valuemask */,
  2542.     GC            /* dest */
  2543. #endif
  2544. );
  2545.  
  2546. extern int XCopyPlane(
  2547. #if NeedFunctionPrototypes
  2548.     Display*        /* display */,
  2549.     Drawable        /* src */,
  2550.     Drawable        /* dest */,
  2551.     GC            /* gc */,
  2552.     int            /* src_x */,
  2553.     int            /* src_y */,
  2554.     unsigned int    /* width */,
  2555.     unsigned int    /* height */,
  2556.     int            /* dest_x */,
  2557.     int            /* dest_y */,
  2558.     unsigned long    /* plane */
  2559. #endif
  2560. );
  2561.  
  2562. extern int XDefaultDepth(
  2563. #if NeedFunctionPrototypes
  2564.     Display*        /* display */,
  2565.     int            /* screen_number */
  2566. #endif
  2567. );
  2568.  
  2569. extern int XDefaultDepthOfScreen(
  2570. #if NeedFunctionPrototypes
  2571.     Screen*        /* screen */
  2572. #endif
  2573. );
  2574.  
  2575. extern int XDefaultScreen(
  2576. #if NeedFunctionPrototypes
  2577.     Display*        /* display */
  2578. #endif
  2579. );
  2580.  
  2581. extern int XDefineCursor(
  2582. #if NeedFunctionPrototypes
  2583.     Display*        /* display */,
  2584.     Window        /* w */,
  2585.     Cursor        /* cursor */
  2586. #endif
  2587. );
  2588.  
  2589. extern int XDeleteProperty(
  2590. #if NeedFunctionPrototypes
  2591.     Display*        /* display */,
  2592.     Window        /* w */,
  2593.     Atom        /* property */
  2594. #endif
  2595. );
  2596.  
  2597. extern int XDestroyWindow(
  2598. #if NeedFunctionPrototypes
  2599.     Display*        /* display */,
  2600.     Window        /* w */
  2601. #endif
  2602. );
  2603.  
  2604. extern int XDestroySubwindows(
  2605. #if NeedFunctionPrototypes
  2606.     Display*        /* display */,
  2607.     Window        /* w */
  2608. #endif
  2609. );
  2610.  
  2611. extern int XDoesBackingStore(
  2612. #if NeedFunctionPrototypes
  2613.     Screen*        /* screen */    
  2614. #endif
  2615. );
  2616.  
  2617. extern Bool XDoesSaveUnders(
  2618. #if NeedFunctionPrototypes
  2619.     Screen*        /* screen */
  2620. #endif
  2621. );
  2622.  
  2623. extern int XDisableAccessControl(
  2624. #if NeedFunctionPrototypes
  2625.     Display*        /* display */
  2626. #endif
  2627. );
  2628.  
  2629.  
  2630. extern int XDisplayCells(
  2631. #if NeedFunctionPrototypes
  2632.     Display*        /* display */,
  2633.     int            /* screen_number */
  2634. #endif
  2635. );
  2636.  
  2637. extern int XDisplayHeight(
  2638. #if NeedFunctionPrototypes
  2639.     Display*        /* display */,
  2640.     int            /* screen_number */
  2641. #endif
  2642. );
  2643.  
  2644. extern int XDisplayHeightMM(
  2645. #if NeedFunctionPrototypes
  2646.     Display*        /* display */,
  2647.     int            /* screen_number */
  2648. #endif
  2649. );
  2650.  
  2651. extern int XDisplayKeycodes(
  2652. #if NeedFunctionPrototypes
  2653.     Display*        /* display */,
  2654.     int*        /* min_keycodes_return */,
  2655.     int*        /* max_keycodes_return */
  2656. #endif
  2657. );
  2658.  
  2659. extern int XDisplayPlanes(
  2660. #if NeedFunctionPrototypes
  2661.     Display*        /* display */,
  2662.     int            /* screen_number */
  2663. #endif
  2664. );
  2665.  
  2666. extern int XDisplayWidth(
  2667. #if NeedFunctionPrototypes
  2668.     Display*        /* display */,
  2669.     int            /* screen_number */
  2670. #endif
  2671. );
  2672.  
  2673. extern int XDisplayWidthMM(
  2674. #if NeedFunctionPrototypes
  2675.     Display*        /* display */,
  2676.     int            /* screen_number */
  2677. #endif
  2678. );
  2679.  
  2680. extern int XDrawArc(
  2681. #if NeedFunctionPrototypes
  2682.     Display*        /* display */,
  2683.     Drawable        /* d */,
  2684.     GC            /* gc */,
  2685.     int            /* x */,
  2686.     int            /* y */,
  2687.     unsigned int    /* width */,
  2688.     unsigned int    /* height */,
  2689.     int            /* angle1 */,
  2690.     int            /* angle2 */
  2691. #endif
  2692. );
  2693.  
  2694. extern int XDrawArcs(
  2695. #if NeedFunctionPrototypes
  2696.     Display*        /* display */,
  2697.     Drawable        /* d */,
  2698.     GC            /* gc */,
  2699.     XArc*        /* arcs */,
  2700.     int            /* narcs */
  2701. #endif
  2702. );
  2703.  
  2704. extern int XDrawImageString(
  2705. #if NeedFunctionPrototypes
  2706.     Display*        /* display */,
  2707.     Drawable        /* d */,
  2708.     GC            /* gc */,
  2709.     int            /* x */,
  2710.     int            /* y */,
  2711.     _Xconst char*    /* string */,
  2712.     int            /* length */
  2713. #endif
  2714. );
  2715.  
  2716. extern int XDrawImageString16(
  2717. #if NeedFunctionPrototypes
  2718.     Display*        /* display */,
  2719.     Drawable        /* d */,
  2720.     GC            /* gc */,
  2721.     int            /* x */,
  2722.     int            /* y */,
  2723.     _Xconst XChar2b*    /* string */,
  2724.     int            /* length */
  2725. #endif
  2726. );
  2727.  
  2728. extern int XDrawLine(
  2729. #if NeedFunctionPrototypes
  2730.     Display*        /* display */,
  2731.     Drawable        /* d */,
  2732.     GC            /* gc */,
  2733.     int            /* x1 */,
  2734.     int            /* x2 */,
  2735.     int            /* y1 */,
  2736.     int            /* y2 */
  2737. #endif
  2738. );
  2739.  
  2740. extern int XDrawLines(
  2741. #if NeedFunctionPrototypes
  2742.     Display*        /* display */,
  2743.     Drawable        /* d */,
  2744.     GC            /* gc */,
  2745.     XPoint*        /* points */,
  2746.     int            /* npoints */,
  2747.     int            /* mode */
  2748. #endif
  2749. );
  2750.  
  2751. extern int XDrawPoint(
  2752. #if NeedFunctionPrototypes
  2753.     Display*        /* display */,
  2754.     Drawable        /* d */,
  2755.     GC            /* gc */,
  2756.     int            /* x */,
  2757.     int            /* y */
  2758. #endif
  2759. );
  2760.  
  2761. extern int XDrawPoints(
  2762. #if NeedFunctionPrototypes
  2763.     Display*        /* display */,
  2764.     Drawable        /* d */,
  2765.     GC            /* gc */,
  2766.     XPoint*        /* points */,
  2767.     int            /* npoints */,
  2768.     int            /* mode */
  2769. #endif
  2770. );
  2771.  
  2772. extern int XDrawRectangle(
  2773. #if NeedFunctionPrototypes
  2774.     Display*        /* display */,
  2775.     Drawable        /* d */,
  2776.     GC            /* gc */,
  2777.     int            /* x */,
  2778.     int            /* y */,
  2779.     unsigned int    /* width */,
  2780.     unsigned int    /* height */
  2781. #endif
  2782. );
  2783.  
  2784. extern int XDrawRectangles(
  2785. #if NeedFunctionPrototypes
  2786.     Display*        /* display */,
  2787.     Drawable        /* d */,
  2788.     GC            /* gc */,
  2789.     XRectangle*        /* rectangles */,
  2790.     int            /* nrectangles */
  2791. #endif
  2792. );
  2793.  
  2794. extern int XDrawSegments(
  2795. #if NeedFunctionPrototypes
  2796.     Display*        /* display */,
  2797.     Drawable        /* d */,
  2798.     GC            /* gc */,
  2799.     XSegment*        /* segments */,
  2800.     int            /* nsegments */
  2801. #endif
  2802. );
  2803.  
  2804. extern int XDrawString(
  2805. #if NeedFunctionPrototypes
  2806.     Display*        /* display */,
  2807.     Drawable        /* d */,
  2808.     GC            /* gc */,
  2809.     int            /* x */,
  2810.     int            /* y */,
  2811.     _Xconst char*    /* string */,
  2812.     int            /* length */
  2813. #endif
  2814. );
  2815.  
  2816. extern int XDrawString16(
  2817. #if NeedFunctionPrototypes
  2818.     Display*        /* display */,
  2819.     Drawable        /* d */,
  2820.     GC            /* gc */,
  2821.     int            /* x */,
  2822.     int            /* y */,
  2823.     _Xconst XChar2b*    /* string */,
  2824.     int            /* length */
  2825. #endif
  2826. );
  2827.  
  2828. extern int XDrawText(
  2829. #if NeedFunctionPrototypes
  2830.     Display*        /* display */,
  2831.     Drawable        /* d */,
  2832.     GC            /* gc */,
  2833.     int            /* x */,
  2834.     int            /* y */,
  2835.     XTextItem*        /* items */,
  2836.     int            /* nitems */
  2837. #endif
  2838. );
  2839.  
  2840. extern int XDrawText16(
  2841. #if NeedFunctionPrototypes
  2842.     Display*        /* display */,
  2843.     Drawable        /* d */,
  2844.     GC            /* gc */,
  2845.     int            /* x */,
  2846.     int            /* y */,
  2847.     XTextItem16*    /* items */,
  2848.     int            /* nitems */
  2849. #endif
  2850. );
  2851.  
  2852. extern int XEnableAccessControl(
  2853. #if NeedFunctionPrototypes
  2854.     Display*        /* display */
  2855. #endif
  2856. );
  2857.  
  2858. extern int XEventsQueued(
  2859. #if NeedFunctionPrototypes
  2860.     Display*        /* display */,
  2861.     int            /* mode */
  2862. #endif
  2863. );
  2864.  
  2865. extern Status XFetchName(
  2866. #if NeedFunctionPrototypes
  2867.     Display*        /* display */,
  2868.     Window        /* w */,
  2869.     char**        /* window_name_return */
  2870. #endif
  2871. );
  2872.  
  2873. extern int XFillArc(
  2874. #if NeedFunctionPrototypes
  2875.     Display*        /* display */,
  2876.     Drawable        /* d */,
  2877.     GC            /* gc */,
  2878.     int            /* x */,
  2879.     int            /* y */,
  2880.     unsigned int    /* width */,
  2881.     unsigned int    /* height */,
  2882.     int            /* angle1 */,
  2883.     int            /* angle2 */
  2884. #endif
  2885. );
  2886.  
  2887. extern int XFillArcs(
  2888. #if NeedFunctionPrototypes
  2889.     Display*        /* display */,
  2890.     Drawable        /* d */,
  2891.     GC            /* gc */,
  2892.     XArc*        /* arcs */,
  2893.     int            /* narcs */
  2894. #endif
  2895. );
  2896.  
  2897. extern int XFillPolygon(
  2898. #if NeedFunctionPrototypes
  2899.     Display*        /* display */,
  2900.     Drawable        /* d */,
  2901.     GC            /* gc */,
  2902.     XPoint*        /* points */,
  2903.     int            /* npoints */,
  2904.     int            /* shape */,
  2905.     int            /* mode */
  2906. #endif
  2907. );
  2908.  
  2909. extern int XFillRectangle(
  2910. #if NeedFunctionPrototypes
  2911.     Display*        /* display */,
  2912.     Drawable        /* d */,
  2913.     GC            /* gc */,
  2914.     int            /* x */,
  2915.     int            /* y */,
  2916.     unsigned int    /* width */,
  2917.     unsigned int    /* height */
  2918. #endif
  2919. );
  2920.  
  2921. extern int XFillRectangles(
  2922. #if NeedFunctionPrototypes
  2923.     Display*        /* display */,
  2924.     Drawable        /* d */,
  2925.     GC            /* gc */,
  2926.     XRectangle*        /* rectangles */,
  2927.     int            /* nrectangles */
  2928. #endif
  2929. );
  2930.  
  2931. extern int XFlush(
  2932. #if NeedFunctionPrototypes
  2933.     Display*        /* display */
  2934. #endif
  2935. );
  2936.  
  2937. extern int XForceScreenSaver(
  2938. #if NeedFunctionPrototypes
  2939.     Display*        /* display */,
  2940.     int            /* mode */
  2941. #endif
  2942. );
  2943.  
  2944. extern int XFree(
  2945. #if NeedFunctionPrototypes
  2946.     void*        /* data */
  2947. #endif
  2948. );
  2949.  
  2950. extern int XFreeColormap(
  2951. #if NeedFunctionPrototypes
  2952.     Display*        /* display */,
  2953.     Colormap        /* colormap */
  2954. #endif
  2955. );
  2956.  
  2957. extern int XFreeColors(
  2958. #if NeedFunctionPrototypes
  2959.     Display*        /* display */,
  2960.     Colormap        /* colormap */,
  2961.     unsigned long*    /* pixels */,
  2962.     int            /* npixels */,
  2963.     unsigned long    /* planes */
  2964. #endif
  2965. );
  2966.  
  2967. extern int XFreeCursor(
  2968. #if NeedFunctionPrototypes
  2969.     Display*        /* display */,
  2970.     Cursor        /* cursor */
  2971. #endif
  2972. );
  2973.  
  2974. extern int XFreeExtensionList(
  2975. #if NeedFunctionPrototypes
  2976.     char**        /* list */    
  2977. #endif
  2978. );
  2979.  
  2980. extern int XFreeFont(
  2981. #if NeedFunctionPrototypes
  2982.     Display*        /* display */,
  2983.     XFontStruct*    /* font_struct */
  2984. #endif
  2985. );
  2986.  
  2987. extern int XFreeFontInfo(
  2988. #if NeedFunctionPrototypes
  2989.     char**        /* names */,
  2990.     XFontStruct*    /* free_info */,
  2991.     int            /* actual_count */
  2992. #endif
  2993. );
  2994.  
  2995. extern int XFreeFontNames(
  2996. #if NeedFunctionPrototypes
  2997.     char**        /* list */
  2998. #endif
  2999. );
  3000.  
  3001. extern int XFreeFontPath(
  3002. #if NeedFunctionPrototypes
  3003.     char**        /* list */
  3004. #endif
  3005. );
  3006.  
  3007. extern int XFreeGC(
  3008. #if NeedFunctionPrototypes
  3009.     Display*        /* display */,
  3010.     GC            /* gc */
  3011. #endif
  3012. );
  3013.  
  3014. extern int XFreeModifiermap(
  3015. #if NeedFunctionPrototypes
  3016.     XModifierKeymap*    /* modmap */
  3017. #endif
  3018. );
  3019.  
  3020. extern int XFreePixmap(
  3021. #if NeedFunctionPrototypes
  3022.     Display*        /* display */,
  3023.     Pixmap        /* pixmap */
  3024. #endif
  3025. );
  3026.  
  3027. extern int XGeometry(
  3028. #if NeedFunctionPrototypes
  3029.     Display*        /* display */,
  3030.     int            /* screen */,
  3031.     _Xconst char*    /* position */,
  3032.     _Xconst char*    /* default_position */,
  3033.     unsigned int    /* bwidth */,
  3034.     unsigned int    /* fwidth */,
  3035.     unsigned int    /* fheight */,
  3036.     int            /* xadder */,
  3037.     int            /* yadder */,
  3038.     int*        /* x_return */,
  3039.     int*        /* y_return */,
  3040.     int*        /* width_return */,
  3041.     int*        /* height_return */
  3042. #endif
  3043. );
  3044.  
  3045. extern int XGetErrorDatabaseText(
  3046. #if NeedFunctionPrototypes
  3047.     Display*        /* display */,
  3048.     _Xconst char*    /* name */,
  3049.     _Xconst char*    /* message */,
  3050.     _Xconst char*    /* default_string */,
  3051.     char*        /* buffer_return */,
  3052.     int            /* length */
  3053. #endif
  3054. );
  3055.  
  3056. extern int XGetErrorText(
  3057. #if NeedFunctionPrototypes
  3058.     Display*        /* display */,
  3059.     int            /* code */,
  3060.     char*        /* buffer_return */,
  3061.     int            /* length */
  3062. #endif
  3063. );
  3064.  
  3065. extern Bool XGetFontProperty(
  3066. #if NeedFunctionPrototypes
  3067.     XFontStruct*    /* font_struct */,
  3068.     Atom        /* atom */,
  3069.     unsigned long*    /* value_return */
  3070. #endif
  3071. );
  3072.  
  3073. extern Status XGetGCValues(
  3074. #if NeedFunctionPrototypes
  3075.     Display*        /* display */,
  3076.     GC            /* gc */,
  3077.     unsigned long    /* valuemask */,
  3078.     XGCValues*        /* values_return */
  3079. #endif
  3080. );
  3081.  
  3082. extern Status XGetGeometry(
  3083. #if NeedFunctionPrototypes
  3084.     Display*        /* display */,
  3085.     Drawable        /* d */,
  3086.     Window*        /* root_return */,
  3087.     int*        /* x_return */,
  3088.     int*        /* y_return */,
  3089.     unsigned int*    /* width_return */,
  3090.     unsigned int*    /* height_return */,
  3091.     unsigned int*    /* border_width_return */,
  3092.     unsigned int*    /* depth_return */
  3093. #endif
  3094. );
  3095.  
  3096. extern Status XGetIconName(
  3097. #if NeedFunctionPrototypes
  3098.     Display*        /* display */,
  3099.     Window        /* w */,
  3100.     char**        /* icon_name_return */
  3101. #endif
  3102. );
  3103.  
  3104. extern int XGetInputFocus(
  3105. #if NeedFunctionPrototypes
  3106.     Display*        /* display */,
  3107.     Window*        /* focus_return */,
  3108.     int*        /* revert_to_return */
  3109. #endif
  3110. );
  3111.  
  3112. extern int XGetKeyboardControl(
  3113. #if NeedFunctionPrototypes
  3114.     Display*        /* display */,
  3115.     XKeyboardState*    /* values_return */
  3116. #endif
  3117. );
  3118.  
  3119. extern int XGetPointerControl(
  3120. #if NeedFunctionPrototypes
  3121.     Display*        /* display */,
  3122.     int*        /* accel_numerator_return */,
  3123.     int*        /* accel_denominator_return */,
  3124.     int*        /* threshold_return */
  3125. #endif
  3126. );
  3127.  
  3128. extern int XGetPointerMapping(
  3129. #if NeedFunctionPrototypes
  3130.     Display*        /* display */,
  3131.     unsigned char*    /* map_return */,
  3132.     int            /* nmap */
  3133. #endif
  3134. );
  3135.  
  3136. extern int XGetScreenSaver(
  3137. #if NeedFunctionPrototypes
  3138.     Display*        /* display */,
  3139.     int*        /* timeout_return */,
  3140.     int*        /* interval_return */,
  3141.     int*        /* prefer_blanking_return */,
  3142.     int*        /* allow_exposures_return */
  3143. #endif
  3144. );
  3145.  
  3146. extern Status XGetTransientForHint(
  3147. #if NeedFunctionPrototypes
  3148.     Display*        /* display */,
  3149.     Window        /* w */,
  3150.     Window*        /* prop_window_return */
  3151. #endif
  3152. );
  3153.  
  3154. extern int XGetWindowProperty(
  3155. #if NeedFunctionPrototypes
  3156.     Display*        /* display */,
  3157.     Window        /* w */,
  3158.     Atom        /* property */,
  3159.     long        /* long_offset */,
  3160.     long        /* long_length */,
  3161.     Bool        /* delete */,
  3162.     Atom        /* req_type */,
  3163.     Atom*        /* actual_type_return */,
  3164.     int*        /* actual_format_return */,
  3165.     unsigned long*    /* nitems_return */,
  3166.     unsigned long*    /* bytes_after_return */,
  3167.     unsigned char**    /* prop_return */
  3168. #endif
  3169. );
  3170.  
  3171. extern Status XGetWindowAttributes(
  3172. #if NeedFunctionPrototypes
  3173.     Display*        /* display */,
  3174.     Window        /* w */,
  3175.     XWindowAttributes*    /* window_attributes_return */
  3176. #endif
  3177. );
  3178.  
  3179. extern int XGrabButton(
  3180. #if NeedFunctionPrototypes
  3181.     Display*        /* display */,
  3182.     unsigned int    /* button */,
  3183.     unsigned int    /* modifiers */,
  3184.     Window        /* grab_window */,
  3185.     Bool        /* owner_events */,
  3186.     unsigned int    /* event_mask */,
  3187.     int            /* pointer_mode */,
  3188.     int            /* keyboard_mode */,
  3189.     Window        /* confine_to */,
  3190.     Cursor        /* cursor */
  3191. #endif
  3192. );
  3193.  
  3194. extern int XGrabKey(
  3195. #if NeedFunctionPrototypes
  3196.     Display*        /* display */,
  3197.     int            /* keycode */,
  3198.     unsigned int    /* modifiers */,
  3199.     Window        /* grab_window */,
  3200.     Bool        /* owner_events */,
  3201.     int            /* pointer_mode */,
  3202.     int            /* keyboard_mode */
  3203. #endif
  3204. );
  3205.  
  3206. extern int XGrabKeyboard(
  3207. #if NeedFunctionPrototypes
  3208.     Display*        /* display */,
  3209.     Window        /* grab_window */,
  3210.     Bool        /* owner_events */,
  3211.     int            /* pointer_mode */,
  3212.     int            /* keyboard_mode */,
  3213.     Time        /* time */
  3214. #endif
  3215. );
  3216.  
  3217. extern int XGrabPointer(
  3218. #if NeedFunctionPrototypes
  3219.     Display*        /* display */,
  3220.     Window        /* grab_window */,
  3221.     Bool        /* owner_events */,
  3222.     unsigned int    /* event_mask */,
  3223.     int            /* pointer_mode */,
  3224.     int            /* keyboard_mode */,
  3225.     Window        /* confine_to */,
  3226.     Cursor        /* cursor */,
  3227.     Time        /* time */
  3228. #endif
  3229. );
  3230.  
  3231. extern int XGrabServer(
  3232. #if NeedFunctionPrototypes
  3233.     Display*        /* display */
  3234. #endif
  3235. );
  3236.  
  3237. extern int XHeightMMOfScreen(
  3238. #if NeedFunctionPrototypes
  3239.     Screen*        /* screen */
  3240. #endif
  3241. );
  3242.  
  3243. extern int XHeightOfScreen(
  3244. #if NeedFunctionPrototypes
  3245.     Screen*        /* screen */
  3246. #endif
  3247. );
  3248.  
  3249. extern int XIfEvent(
  3250. #if NeedFunctionPrototypes
  3251.     Display*        /* display */,
  3252.     XEvent*        /* event_return */,
  3253.     Bool (*) (
  3254. #if NeedNestedPrototypes
  3255.            Display*            /* display */,
  3256.                XEvent*            /* event */,
  3257.                XPointer            /* arg */
  3258. #endif
  3259.              )        /* predicate */,
  3260.     XPointer        /* arg */
  3261. #endif
  3262. );
  3263.  
  3264. extern int XImageByteOrder(
  3265. #if NeedFunctionPrototypes
  3266.     Display*        /* display */
  3267. #endif
  3268. );
  3269.  
  3270. extern int XInstallColormap(
  3271. #if NeedFunctionPrototypes
  3272.     Display*        /* display */,
  3273.     Colormap        /* colormap */
  3274. #endif
  3275. );
  3276.  
  3277. extern KeyCode XKeysymToKeycode(
  3278. #if NeedFunctionPrototypes
  3279.     Display*        /* display */,
  3280.     KeySym        /* keysym */
  3281. #endif
  3282. );
  3283.  
  3284. extern int XKillClient(
  3285. #if NeedFunctionPrototypes
  3286.     Display*        /* display */,
  3287.     XID            /* resource */
  3288. #endif
  3289. );
  3290.  
  3291. extern Status XLookupColor(
  3292. #if NeedFunctionPrototypes
  3293.     Display*        /* display */,
  3294.     Colormap        /* colormap */,
  3295.     _Xconst char*    /* color_name */,
  3296.     XColor*        /* exact_def_return */,
  3297.     XColor*        /* screen_def_return */
  3298. #endif
  3299. );
  3300.  
  3301. extern int XLowerWindow(
  3302. #if NeedFunctionPrototypes
  3303.     Display*        /* display */,
  3304.     Window        /* w */
  3305. #endif
  3306. );
  3307.  
  3308. extern int XMapRaised(
  3309. #if NeedFunctionPrototypes
  3310.     Display*        /* display */,
  3311.     Window        /* w */
  3312. #endif
  3313. );
  3314.  
  3315. extern int XMapSubwindows(
  3316. #if NeedFunctionPrototypes
  3317.     Display*        /* display */,
  3318.     Window        /* w */
  3319. #endif
  3320. );
  3321.  
  3322. extern int XMapWindow(
  3323. #if NeedFunctionPrototypes
  3324.     Display*        /* display */,
  3325.     Window        /* w */
  3326. #endif
  3327. );
  3328.  
  3329. extern int XMaskEvent(
  3330. #if NeedFunctionPrototypes
  3331.     Display*        /* display */,
  3332.     long        /* event_mask */,
  3333.     XEvent*        /* event_return */
  3334. #endif
  3335. );
  3336.  
  3337. extern int XMaxCmapsOfScreen(
  3338. #if NeedFunctionPrototypes
  3339.     Screen*        /* screen */
  3340. #endif
  3341. );
  3342.  
  3343. extern int XMinCmapsOfScreen(
  3344. #if NeedFunctionPrototypes
  3345.     Screen*        /* screen */
  3346. #endif
  3347. );
  3348.  
  3349. extern int XMoveResizeWindow(
  3350. #if NeedFunctionPrototypes
  3351.     Display*        /* display */,
  3352.     Window        /* w */,
  3353.     int            /* x */,
  3354.     int            /* y */,
  3355.     unsigned int    /* width */,
  3356.     unsigned int    /* height */
  3357. #endif
  3358. );
  3359.  
  3360. extern int XMoveWindow(
  3361. #if NeedFunctionPrototypes
  3362.     Display*        /* display */,
  3363.     Window        /* w */,
  3364.     int            /* x */,
  3365.     int            /* y */
  3366. #endif
  3367. );
  3368.  
  3369. extern int XNextEvent(
  3370. #if NeedFunctionPrototypes
  3371.     Display*        /* display */,
  3372.     XEvent*        /* event_return */
  3373. #endif
  3374. );
  3375.  
  3376. extern int XNoOp(
  3377. #if NeedFunctionPrototypes
  3378.     Display*        /* display */
  3379. #endif
  3380. );
  3381.  
  3382. extern Status XParseColor(
  3383. #if NeedFunctionPrototypes
  3384.     Display*        /* display */,
  3385.     Colormap        /* colormap */,
  3386.     _Xconst char*    /* spec */,
  3387.     XColor*        /* exact_def_return */
  3388. #endif
  3389. );
  3390.  
  3391. extern int XParseGeometry(
  3392. #if NeedFunctionPrototypes
  3393.     _Xconst char*    /* parsestring */,
  3394.     int*        /* x_return */,
  3395.     int*        /* y_return */,
  3396.     unsigned int*    /* width_return */,
  3397.     unsigned int*    /* height_return */
  3398. #endif
  3399. );
  3400.  
  3401. extern int XPeekEvent(
  3402. #if NeedFunctionPrototypes
  3403.     Display*        /* display */,
  3404.     XEvent*        /* event_return */
  3405. #endif
  3406. );
  3407.  
  3408. extern int XPeekIfEvent(
  3409. #if NeedFunctionPrototypes
  3410.     Display*        /* display */,
  3411.     XEvent*        /* event_return */,
  3412.     Bool (*) (
  3413. #if NeedNestedPrototypes
  3414.            Display*        /* display */,
  3415.                XEvent*        /* event */,
  3416.                XPointer        /* arg */
  3417. #endif
  3418.              )        /* predicate */,
  3419.     XPointer        /* arg */
  3420. #endif
  3421. );
  3422.  
  3423. extern int XPending(
  3424. #if NeedFunctionPrototypes
  3425.     Display*        /* display */
  3426. #endif
  3427. );
  3428.  
  3429. extern int XPlanesOfScreen(
  3430. #if NeedFunctionPrototypes
  3431.     Screen*        /* screen */
  3432.     
  3433. #endif
  3434. );
  3435.  
  3436. extern int XProtocolRevision(
  3437. #if NeedFunctionPrototypes
  3438.     Display*        /* display */
  3439. #endif
  3440. );
  3441.  
  3442. extern int XProtocolVersion(
  3443. #if NeedFunctionPrototypes
  3444.     Display*        /* display */
  3445. #endif
  3446. );
  3447.  
  3448.  
  3449. extern int XPutBackEvent(
  3450. #if NeedFunctionPrototypes
  3451.     Display*        /* display */,
  3452.     XEvent*        /* event */
  3453. #endif
  3454. );
  3455.  
  3456. extern int XPutImage(
  3457. #if NeedFunctionPrototypes
  3458.     Display*        /* display */,
  3459.     Drawable        /* d */,
  3460.     GC            /* gc */,
  3461.     XImage*        /* image */,
  3462.     int            /* src_x */,
  3463.     int            /* src_y */,
  3464.     int            /* dest_x */,
  3465.     int            /* dest_y */,
  3466.     unsigned int    /* width */,
  3467.     unsigned int    /* height */      
  3468. #endif
  3469. );
  3470.  
  3471. extern int XQLength(
  3472. #if NeedFunctionPrototypes
  3473.     Display*        /* display */
  3474. #endif
  3475. );
  3476.  
  3477. extern Status XQueryBestCursor(
  3478. #if NeedFunctionPrototypes
  3479.     Display*        /* display */,
  3480.     Drawable        /* d */,
  3481.     unsigned int        /* width */,
  3482.     unsigned int    /* height */,
  3483.     unsigned int*    /* width_return */,
  3484.     unsigned int*    /* height_return */
  3485. #endif
  3486. );
  3487.  
  3488. extern Status XQueryBestSize(
  3489. #if NeedFunctionPrototypes
  3490.     Display*        /* display */,
  3491.     int            /* class */,
  3492.     Drawable        /* which_screen */,
  3493.     unsigned int    /* width */,
  3494.     unsigned int    /* height */,
  3495.     unsigned int*    /* width_return */,
  3496.     unsigned int*    /* height_return */
  3497. #endif
  3498. );
  3499.  
  3500. extern Status XQueryBestStipple(
  3501. #if NeedFunctionPrototypes
  3502.     Display*        /* display */,
  3503.     Drawable        /* which_screen */,
  3504.     unsigned int    /* width */,
  3505.     unsigned int    /* height */,
  3506.     unsigned int*    /* width_return */,
  3507.     unsigned int*    /* height_return */
  3508. #endif
  3509. );
  3510.  
  3511. extern Status XQueryBestTile(
  3512. #if NeedFunctionPrototypes
  3513.     Display*        /* display */,
  3514.     Drawable        /* which_screen */,
  3515.     unsigned int    /* width */,
  3516.     unsigned int    /* height */,
  3517.     unsigned int*    /* width_return */,
  3518.     unsigned int*    /* height_return */
  3519. #endif
  3520. );
  3521.  
  3522. extern int XQueryColor(
  3523. #if NeedFunctionPrototypes
  3524.     Display*        /* display */,
  3525.     Colormap        /* colormap */,
  3526.     XColor*        /* def_in_out */
  3527. #endif
  3528. );
  3529.  
  3530. extern int XQueryColors(
  3531. #if NeedFunctionPrototypes
  3532.     Display*        /* display */,
  3533.     Colormap        /* colormap */,
  3534.     XColor*        /* defs_in_out */,
  3535.     int            /* ncolors */
  3536. #endif
  3537. );
  3538.  
  3539. extern Bool XQueryExtension(
  3540. #if NeedFunctionPrototypes
  3541.     Display*        /* display */,
  3542.     _Xconst char*    /* name */,
  3543.     int*        /* major_opcode_return */,
  3544.     int*        /* first_event_return */,
  3545.     int*        /* first_error_return */
  3546. #endif
  3547. );
  3548.  
  3549. extern int XQueryKeymap(
  3550. #if NeedFunctionPrototypes
  3551.     Display*        /* display */,
  3552.     char [32]        /* keys_return */
  3553. #endif
  3554. );
  3555.  
  3556. extern Bool XQueryPointer(
  3557. #if NeedFunctionPrototypes
  3558.     Display*        /* display */,
  3559.     Window        /* w */,
  3560.     Window*        /* root_return */,
  3561.     Window*        /* child_return */,
  3562.     int*        /* root_x_return */,
  3563.     int*        /* root_y_return */,
  3564.     int*        /* win_x_return */,
  3565.     int*        /* win_y_return */,
  3566.     unsigned int*       /* mask_return */
  3567. #endif
  3568. );
  3569.  
  3570. extern int XQueryTextExtents(
  3571. #if NeedFunctionPrototypes
  3572.     Display*        /* display */,
  3573.     XID            /* font_ID */,
  3574.     _Xconst char*    /* string */,
  3575.     int            /* nchars */,
  3576.     int*        /* direction_return */,
  3577.     int*        /* font_ascent_return */,
  3578.     int*        /* font_descent_return */,
  3579.     XCharStruct*    /* overall_return */    
  3580. #endif
  3581. );
  3582.  
  3583. extern int XQueryTextExtents16(
  3584. #if NeedFunctionPrototypes
  3585.     Display*        /* display */,
  3586.     XID            /* font_ID */,
  3587.     _Xconst XChar2b*    /* string */,
  3588.     int            /* nchars */,
  3589.     int*        /* direction_return */,
  3590.     int*        /* font_ascent_return */,
  3591.     int*        /* font_descent_return */,
  3592.     XCharStruct*    /* overall_return */
  3593. #endif
  3594. );
  3595.  
  3596. extern Status XQueryTree(
  3597. #if NeedFunctionPrototypes
  3598.     Display*        /* display */,
  3599.     Window        /* w */,
  3600.     Window*        /* root_return */,
  3601.     Window*        /* parent_return */,
  3602.     Window**        /* children_return */,
  3603.     unsigned int*    /* nchildren_return */
  3604. #endif
  3605. );
  3606.  
  3607. extern int XRaiseWindow(
  3608. #if NeedFunctionPrototypes
  3609.     Display*        /* display */,
  3610.     Window        /* w */
  3611. #endif
  3612. );
  3613.  
  3614. extern int XReadBitmapFile(
  3615. #if NeedFunctionPrototypes
  3616.     Display*        /* display */,
  3617.     Drawable         /* d */,
  3618.     _Xconst char*    /* filename */,
  3619.     unsigned int*    /* width_return */,
  3620.     unsigned int*    /* height_return */,
  3621.     Pixmap*        /* bitmap_return */,
  3622.     int*        /* x_hot_return */,
  3623.     int*        /* y_hot_return */
  3624. #endif
  3625. );
  3626.  
  3627. extern int XReadBitmapFileData(
  3628. #if NeedFunctionPrototypes
  3629.     _Xconst char*    /* filename */,
  3630.     unsigned int*    /* width_return */,
  3631.     unsigned int*    /* height_return */,
  3632.     unsigned char**    /* data_return */,
  3633.     int*        /* x_hot_return */,
  3634.     int*        /* y_hot_return */
  3635. #endif
  3636. );
  3637.  
  3638. extern int XRebindKeysym(
  3639. #if NeedFunctionPrototypes
  3640.     Display*        /* display */,
  3641.     KeySym        /* keysym */,
  3642.     KeySym*        /* list */,
  3643.     int            /* mod_count */,
  3644.     _Xconst unsigned char*    /* string */,
  3645.     int            /* bytes_string */
  3646. #endif
  3647. );
  3648.  
  3649. extern int XRecolorCursor(
  3650. #if NeedFunctionPrototypes
  3651.     Display*        /* display */,
  3652.     Cursor        /* cursor */,
  3653.     XColor*        /* foreground_color */,
  3654.     XColor*        /* background_color */
  3655. #endif
  3656. );
  3657.  
  3658. extern int XRefreshKeyboardMapping(
  3659. #if NeedFunctionPrototypes
  3660.     XMappingEvent*    /* event_map */    
  3661. #endif
  3662. );
  3663.  
  3664. extern int XRemoveFromSaveSet(
  3665. #if NeedFunctionPrototypes
  3666.     Display*        /* display */,
  3667.     Window        /* w */
  3668. #endif
  3669. );
  3670.  
  3671. extern int XRemoveHost(
  3672. #if NeedFunctionPrototypes
  3673.     Display*        /* display */,
  3674.     XHostAddress*    /* host */
  3675. #endif
  3676. );
  3677.  
  3678. extern int XRemoveHosts(
  3679. #if NeedFunctionPrototypes
  3680.     Display*        /* display */,
  3681.     XHostAddress*    /* hosts */,
  3682.     int            /* num_hosts */
  3683. #endif
  3684. );
  3685.  
  3686. extern int XReparentWindow(
  3687. #if NeedFunctionPrototypes
  3688.     Display*        /* display */,
  3689.     Window        /* w */,
  3690.     Window        /* parent */,
  3691.     int            /* x */,
  3692.     int            /* y */
  3693. #endif
  3694. );
  3695.  
  3696. extern int XResetScreenSaver(
  3697. #if NeedFunctionPrototypes
  3698.     Display*        /* display */
  3699. #endif
  3700. );
  3701.  
  3702. extern int XResizeWindow(
  3703. #if NeedFunctionPrototypes
  3704.     Display*        /* display */,
  3705.     Window        /* w */,
  3706.     unsigned int    /* width */,
  3707.     unsigned int    /* height */
  3708. #endif
  3709. );
  3710.  
  3711. extern int XRestackWindows(
  3712. #if NeedFunctionPrototypes
  3713.     Display*        /* display */,
  3714.     Window*        /* windows */,
  3715.     int            /* nwindows */
  3716. #endif
  3717. );
  3718.  
  3719. extern int XRotateBuffers(
  3720. #if NeedFunctionPrototypes
  3721.     Display*        /* display */,
  3722.     int            /* rotate */
  3723. #endif
  3724. );
  3725.  
  3726. extern int XRotateWindowProperties(
  3727. #if NeedFunctionPrototypes
  3728.     Display*        /* display */,
  3729.     Window        /* w */,
  3730.     Atom*        /* properties */,
  3731.     int            /* num_prop */,
  3732.     int            /* npositions */
  3733. #endif
  3734. );
  3735.  
  3736. extern int XScreenCount(
  3737. #if NeedFunctionPrototypes
  3738.     Display*        /* display */
  3739. #endif
  3740. );
  3741.  
  3742. extern int XSelectInput(
  3743. #if NeedFunctionPrototypes
  3744.     Display*        /* display */,
  3745.     Window        /* w */,
  3746.     long        /* event_mask */
  3747. #endif
  3748. );
  3749.  
  3750. extern Status XSendEvent(
  3751. #if NeedFunctionPrototypes
  3752.     Display*        /* display */,
  3753.     Window        /* w */,
  3754.     Bool        /* propagate */,
  3755.     long        /* event_mask */,
  3756.     XEvent*        /* event_send */
  3757. #endif
  3758. );
  3759.  
  3760. extern int XSetAccessControl(
  3761. #if NeedFunctionPrototypes
  3762.     Display*        /* display */,
  3763.     int            /* mode */
  3764. #endif
  3765. );
  3766.  
  3767. extern int XSetArcMode(
  3768. #if NeedFunctionPrototypes
  3769.     Display*        /* display */,
  3770.     GC            /* gc */,
  3771.     int            /* arc_mode */
  3772. #endif
  3773. );
  3774.  
  3775. extern int XSetBackground(
  3776. #if NeedFunctionPrototypes
  3777.     Display*        /* display */,
  3778.     GC            /* gc */,
  3779.     unsigned long    /* background */
  3780. #endif
  3781. );
  3782.  
  3783. extern int XSetClipMask(
  3784. #if NeedFunctionPrototypes
  3785.     Display*        /* display */,
  3786.     GC            /* gc */,
  3787.     Pixmap        /* pixmap */
  3788. #endif
  3789. );
  3790.  
  3791. extern int XSetClipOrigin(
  3792. #if NeedFunctionPrototypes
  3793.     Display*        /* display */,
  3794.     GC            /* gc */,
  3795.     int            /* clip_x_origin */,
  3796.     int            /* clip_y_origin */
  3797. #endif
  3798. );
  3799.  
  3800. extern int XSetClipRectangles(
  3801. #if NeedFunctionPrototypes
  3802.     Display*        /* display */,
  3803.     GC            /* gc */,
  3804.     int            /* clip_x_origin */,
  3805.     int            /* clip_y_origin */,
  3806.     XRectangle*        /* rectangles */,
  3807.     int            /* n */,
  3808.     int            /* ordering */
  3809. #endif
  3810. );
  3811.  
  3812. extern int XSetCloseDownMode(
  3813. #if NeedFunctionPrototypes
  3814.     Display*        /* display */,
  3815.     int            /* close_mode */
  3816. #endif
  3817. );
  3818.  
  3819. extern int XSetCommand(
  3820. #if NeedFunctionPrototypes
  3821.     Display*        /* display */,
  3822.     Window        /* w */,
  3823.     char**        /* argv */,
  3824.     int            /* argc */
  3825. #endif
  3826. );
  3827.  
  3828. extern int XSetDashes(
  3829. #if NeedFunctionPrototypes
  3830.     Display*        /* display */,
  3831.     GC            /* gc */,
  3832.     int            /* dash_offset */,
  3833.     _Xconst char*    /* dash_list */,
  3834.     int            /* n */
  3835. #endif
  3836. );
  3837.  
  3838. extern int XSetFillRule(
  3839. #if NeedFunctionPrototypes
  3840.     Display*        /* display */,
  3841.     GC            /* gc */,
  3842.     int            /* fill_rule */
  3843. #endif
  3844. );
  3845.  
  3846. extern int XSetFillStyle(
  3847. #if NeedFunctionPrototypes
  3848.     Display*        /* display */,
  3849.     GC            /* gc */,
  3850.     int            /* fill_style */
  3851. #endif
  3852. );
  3853.  
  3854. extern int XSetFont(
  3855. #if NeedFunctionPrototypes
  3856.     Display*        /* display */,
  3857.     GC            /* gc */,
  3858.     Font        /* font */
  3859. #endif
  3860. );
  3861.  
  3862. extern int XSetFontPath(
  3863. #if NeedFunctionPrototypes
  3864.     Display*        /* display */,
  3865.     char**        /* directories */,
  3866.     int            /* ndirs */         
  3867. #endif
  3868. );
  3869.  
  3870. extern int XSetForeground(
  3871. #if NeedFunctionPrototypes
  3872.     Display*        /* display */,
  3873.     GC            /* gc */,
  3874.     unsigned long    /* foreground */
  3875. #endif
  3876. );
  3877.  
  3878. extern int XSetFunction(
  3879. #if NeedFunctionPrototypes
  3880.     Display*        /* display */,
  3881.     GC            /* gc */,
  3882.     int            /* function */
  3883. #endif
  3884. );
  3885.  
  3886. extern int XSetGraphicsExposures(
  3887. #if NeedFunctionPrototypes
  3888.     Display*        /* display */,
  3889.     GC            /* gc */,
  3890.     Bool        /* graphics_exposures */
  3891. #endif
  3892. );
  3893.  
  3894. extern int XSetIconName(
  3895. #if NeedFunctionPrototypes
  3896.     Display*        /* display */,
  3897.     Window        /* w */,
  3898.     _Xconst char*    /* icon_name */
  3899. #endif
  3900. );
  3901.  
  3902. extern int XSetInputFocus(
  3903. #if NeedFunctionPrototypes
  3904.     Display*        /* display */,
  3905.     Window        /* focus */,
  3906.     int            /* revert_to */,
  3907.     Time        /* time */
  3908. #endif
  3909. );
  3910.  
  3911. extern int XSetLineAttributes(
  3912. #if NeedFunctionPrototypes
  3913.     Display*        /* display */,
  3914.     GC            /* gc */,
  3915.     unsigned int    /* line_width */,
  3916.     int            /* line_style */,
  3917.     int            /* cap_style */,
  3918.     int            /* join_style */
  3919. #endif
  3920. );
  3921.  
  3922. extern int XSetModifierMapping(
  3923. #if NeedFunctionPrototypes
  3924.     Display*        /* display */,
  3925.     XModifierKeymap*    /* modmap */
  3926. #endif
  3927. );
  3928.  
  3929. extern int XSetPlaneMask(
  3930. #if NeedFunctionPrototypes
  3931.     Display*        /* display */,
  3932.     GC            /* gc */,
  3933.     unsigned long    /* plane_mask */
  3934. #endif
  3935. );
  3936.  
  3937. extern int XSetPointerMapping(
  3938. #if NeedFunctionPrototypes
  3939.     Display*        /* display */,
  3940.     _Xconst unsigned char*    /* map */,
  3941.     int            /* nmap */
  3942. #endif
  3943. );
  3944.  
  3945. extern int XSetScreenSaver(
  3946. #if NeedFunctionPrototypes
  3947.     Display*        /* display */,
  3948.     int            /* timeout */,
  3949.     int            /* interval */,
  3950.     int            /* prefer_blanking */,
  3951.     int            /* allow_exposures */
  3952. #endif
  3953. );
  3954.  
  3955. extern int XSetSelectionOwner(
  3956. #if NeedFunctionPrototypes
  3957.     Display*        /* display */,
  3958.     Atom            /* selection */,
  3959.     Window        /* owner */,
  3960.     Time        /* time */
  3961. #endif
  3962. );
  3963.  
  3964. extern int XSetState(
  3965. #if NeedFunctionPrototypes
  3966.     Display*        /* display */,
  3967.     GC            /* gc */,
  3968.     unsigned long     /* foreground */,
  3969.     unsigned long    /* background */,
  3970.     int            /* function */,
  3971.     unsigned long    /* plane_mask */
  3972. #endif
  3973. );
  3974.  
  3975. extern int XSetStipple(
  3976. #if NeedFunctionPrototypes
  3977.     Display*        /* display */,
  3978.     GC            /* gc */,
  3979.     Pixmap        /* stipple */
  3980. #endif
  3981. );
  3982.  
  3983. extern int XSetSubwindowMode(
  3984. #if NeedFunctionPrototypes
  3985.     Display*        /* display */,
  3986.     GC            /* gc */,
  3987.     int            /* subwindow_mode */
  3988. #endif
  3989. );
  3990.  
  3991. extern int XSetTSOrigin(
  3992. #if NeedFunctionPrototypes
  3993.     Display*        /* display */,
  3994.     GC            /* gc */,
  3995.     int            /* ts_x_origin */,
  3996.     int            /* ts_y_origin */
  3997. #endif
  3998. );
  3999.  
  4000. extern int XSetTile(
  4001. #if NeedFunctionPrototypes
  4002.     Display*        /* display */,
  4003.     GC            /* gc */,
  4004.     Pixmap        /* tile */
  4005. #endif
  4006. );
  4007.  
  4008. extern int XSetWindowBackground(
  4009. #if NeedFunctionPrototypes
  4010.     Display*        /* display */,
  4011.     Window        /* w */,
  4012.     unsigned long    /* background_pixel */
  4013. #endif
  4014. );
  4015.  
  4016. extern int XSetWindowBackgroundPixmap(
  4017. #if NeedFunctionPrototypes
  4018.     Display*        /* display */,
  4019.     Window        /* w */,
  4020.     Pixmap        /* background_pixmap */
  4021. #endif
  4022. );
  4023.  
  4024. extern int XSetWindowBorder(
  4025. #if NeedFunctionPrototypes
  4026.     Display*        /* display */,
  4027.     Window        /* w */,
  4028.     unsigned long    /* border_pixel */
  4029. #endif
  4030. );
  4031.  
  4032. extern int XSetWindowBorderPixmap(
  4033. #if NeedFunctionPrototypes
  4034.     Display*        /* display */,
  4035.     Window        /* w */,
  4036.     Pixmap        /* border_pixmap */
  4037. #endif
  4038. );
  4039.  
  4040. extern int XSetWindowBorderWidth(
  4041. #if NeedFunctionPrototypes
  4042.     Display*        /* display */,
  4043.     Window        /* w */,
  4044.     unsigned int    /* width */
  4045. #endif
  4046. );
  4047.  
  4048. extern int XSetWindowColormap(
  4049. #if NeedFunctionPrototypes
  4050.     Display*        /* display */,
  4051.     Window        /* w */,
  4052.     Colormap        /* colormap */
  4053. #endif
  4054. );
  4055.  
  4056. extern int XStoreBuffer(
  4057. #if NeedFunctionPrototypes
  4058.     Display*        /* display */,
  4059.     _Xconst char*    /* bytes */,
  4060.     int            /* nbytes */,
  4061.     int            /* buffer */
  4062. #endif
  4063. );
  4064.  
  4065. extern int XStoreBytes(
  4066. #if NeedFunctionPrototypes
  4067.     Display*        /* display */,
  4068.     _Xconst char*    /* bytes */,
  4069.     int            /* nbytes */
  4070. #endif
  4071. );
  4072.  
  4073. extern int XStoreColor(
  4074. #if NeedFunctionPrototypes
  4075.     Display*        /* display */,
  4076.     Colormap        /* colormap */,
  4077.     XColor*        /* color */
  4078. #endif
  4079. );
  4080.  
  4081. extern int XStoreColors(
  4082. #if NeedFunctionPrototypes
  4083.     Display*        /* display */,
  4084.     Colormap        /* colormap */,
  4085.     XColor*        /* color */,
  4086.     int            /* ncolors */
  4087. #endif
  4088. );
  4089.  
  4090. extern int XStoreName(
  4091. #if NeedFunctionPrototypes
  4092.     Display*        /* display */,
  4093.     Window        /* w */,
  4094.     _Xconst char*    /* window_name */
  4095. #endif
  4096. );
  4097.  
  4098. extern int XStoreNamedColor(
  4099. #if NeedFunctionPrototypes
  4100.     Display*        /* display */,
  4101.     Colormap        /* colormap */,
  4102.     _Xconst char*    /* color */,
  4103.     unsigned long    /* pixel */,
  4104.     int            /* flags */
  4105. #endif
  4106. );
  4107.  
  4108. extern int XSync(
  4109. #if NeedFunctionPrototypes
  4110.     Display*        /* display */,
  4111.     Bool        /* discard */
  4112. #endif
  4113. );
  4114.  
  4115. extern int XTextExtents(
  4116. #if NeedFunctionPrototypes
  4117.     XFontStruct*    /* font_struct */,
  4118.     _Xconst char*    /* string */,
  4119.     int            /* nchars */,
  4120.     int*        /* direction_return */,
  4121.     int*        /* font_ascent_return */,
  4122.     int*        /* font_descent_return */,
  4123.     XCharStruct*    /* overall_return */
  4124. #endif
  4125. );
  4126.  
  4127. extern int XTextExtents16(
  4128. #if NeedFunctionPrototypes
  4129.     XFontStruct*    /* font_struct */,
  4130.     _Xconst XChar2b*    /* string */,
  4131.     int            /* nchars */,
  4132.     int*        /* direction_return */,
  4133.     int*        /* font_ascent_return */,
  4134.     int*        /* font_descent_return */,
  4135.     XCharStruct*    /* overall_return */
  4136. #endif
  4137. );
  4138.  
  4139. extern int XTextWidth(
  4140. #if NeedFunctionPrototypes
  4141.     XFontStruct*    /* font_struct */,
  4142.     _Xconst char*    /* string */,
  4143.     int            /* count */
  4144. #endif
  4145. );
  4146.  
  4147. extern int XTextWidth16(
  4148. #if NeedFunctionPrototypes
  4149.     XFontStruct*    /* font_struct */,
  4150.     _Xconst XChar2b*    /* string */,
  4151.     int            /* count */
  4152. #endif
  4153. );
  4154.  
  4155. extern Bool XTranslateCoordinates(
  4156. #if NeedFunctionPrototypes
  4157.     Display*        /* display */,
  4158.     Window        /* src_w */,
  4159.     Window        /* dest_w */,
  4160.     int            /* src_x */,
  4161.     int            /* src_y */,
  4162.     int*        /* dest_x_return */,
  4163.     int*        /* dest_y_return */,
  4164.     Window*        /* child_return */
  4165. #endif
  4166. );
  4167.  
  4168. extern int XUndefineCursor(
  4169. #if NeedFunctionPrototypes
  4170.     Display*        /* display */,
  4171.     Window        /* w */
  4172. #endif
  4173. );
  4174.  
  4175. extern int XUngrabButton(
  4176. #if NeedFunctionPrototypes
  4177.     Display*        /* display */,
  4178.     unsigned int    /* button */,
  4179.     unsigned int    /* modifiers */,
  4180.     Window        /* grab_window */
  4181. #endif
  4182. );
  4183.  
  4184. extern int XUngrabKey(
  4185. #if NeedFunctionPrototypes
  4186.     Display*        /* display */,
  4187.     int            /* keycode */,
  4188.     unsigned int    /* modifiers */,
  4189.     Window        /* grab_window */
  4190. #endif
  4191. );
  4192.  
  4193. extern int XUngrabKeyboard(
  4194. #if NeedFunctionPrototypes
  4195.     Display*        /* display */,
  4196.     Time        /* time */
  4197. #endif
  4198. );
  4199.  
  4200. extern int XUngrabPointer(
  4201. #if NeedFunctionPrototypes
  4202.     Display*        /* display */,
  4203.     Time        /* time */
  4204. #endif
  4205. );
  4206.  
  4207. extern int XUngrabServer(
  4208. #if NeedFunctionPrototypes
  4209.     Display*        /* display */
  4210. #endif
  4211. );
  4212.  
  4213. extern int XUninstallColormap(
  4214. #if NeedFunctionPrototypes
  4215.     Display*        /* display */,
  4216.     Colormap        /* colormap */
  4217. #endif
  4218. );
  4219.  
  4220. extern int XUnloadFont(
  4221. #if NeedFunctionPrototypes
  4222.     Display*        /* display */,
  4223.     Font        /* font */
  4224. #endif
  4225. );
  4226.  
  4227. extern int XUnmapSubwindows(
  4228. #if NeedFunctionPrototypes
  4229.     Display*        /* display */,
  4230.     Window        /* w */
  4231. #endif
  4232. );
  4233.  
  4234. extern int XUnmapWindow(
  4235. #if NeedFunctionPrototypes
  4236.     Display*        /* display */,
  4237.     Window        /* w */
  4238. #endif
  4239. );
  4240.  
  4241. extern int XVendorRelease(
  4242. #if NeedFunctionPrototypes
  4243.     Display*        /* display */
  4244. #endif
  4245. );
  4246.  
  4247. extern int XWarpPointer(
  4248. #if NeedFunctionPrototypes
  4249.     Display*        /* display */,
  4250.     Window        /* src_w */,
  4251.     Window        /* dest_w */,
  4252.     int            /* src_x */,
  4253.     int            /* src_y */,
  4254.     unsigned int    /* src_width */,
  4255.     unsigned int    /* src_height */,
  4256.     int            /* dest_x */,
  4257.     int            /* dest_y */         
  4258. #endif
  4259. );
  4260.  
  4261. extern int XWidthMMOfScreen(
  4262. #if NeedFunctionPrototypes
  4263.     Screen*        /* screen */
  4264. #endif
  4265. );
  4266.  
  4267. extern int XWidthOfScreen(
  4268. #if NeedFunctionPrototypes
  4269.     Screen*        /* screen */
  4270. #endif
  4271. );
  4272.  
  4273. extern int XWindowEvent(
  4274. #if NeedFunctionPrototypes
  4275.     Display*        /* display */,
  4276.     Window        /* w */,
  4277.     long        /* event_mask */,
  4278.     XEvent*        /* event_return */
  4279. #endif
  4280. );
  4281.  
  4282. extern int XWriteBitmapFile(
  4283. #if NeedFunctionPrototypes
  4284.     Display*        /* display */,
  4285.     _Xconst char*    /* filename */,
  4286.     Pixmap        /* bitmap */,
  4287.     unsigned int    /* width */,
  4288.     unsigned int    /* height */,
  4289.     int            /* x_hot */,
  4290.     int            /* y_hot */             
  4291. #endif
  4292. );
  4293.  
  4294. extern Bool XSupportsLocale(
  4295. #if NeedFunctionPrototypes
  4296.     void
  4297. #endif
  4298. );
  4299.  
  4300. extern char *XSetLocaleModifiers(
  4301. #if NeedFunctionPrototypes
  4302.     _Xconst char*    /* modifier_list */
  4303. #endif
  4304. );
  4305.  
  4306. extern XOM XOpenOM(
  4307. #if NeedFunctionPrototypes
  4308.     Display*            /* display */,
  4309.     struct _XrmHashBucketRec*    /* rdb */,
  4310.     _Xconst char*        /* res_name */,
  4311.     _Xconst char*        /* res_class */
  4312. #endif
  4313. );
  4314.  
  4315. extern Status XCloseOM(
  4316. #if NeedFunctionPrototypes
  4317.     XOM            /* om */
  4318. #endif
  4319. );
  4320.  
  4321. extern char *XSetOMValues(
  4322. #if NeedVarargsPrototypes
  4323.     XOM            /* om */,
  4324.     ...
  4325. #endif
  4326. );
  4327.  
  4328. extern char *XGetOMValues(
  4329. #if NeedVarargsPrototypes
  4330.     XOM            /* om */,
  4331.     ...
  4332. #endif
  4333. );
  4334.  
  4335. extern Display *XDisplayOfOM(
  4336. #if NeedFunctionPrototypes
  4337.     XOM            /* om */
  4338. #endif
  4339. );
  4340.  
  4341. extern char *XLocaleOfOM(
  4342. #if NeedFunctionPrototypes
  4343.     XOM            /* om */
  4344. #endif
  4345. );
  4346.  
  4347. extern XOC XCreateOC(
  4348. #if NeedVarargsPrototypes
  4349.     XOM            /* om */,
  4350.     ...
  4351. #endif
  4352. );
  4353.  
  4354. extern void XDestroyOC(
  4355. #if NeedFunctionPrototypes
  4356.     XOC            /* oc */
  4357. #endif
  4358. );
  4359.  
  4360. extern XOM XOMOfOC(
  4361. #if NeedFunctionPrototypes
  4362.     XOC            /* oc */
  4363. #endif
  4364. );
  4365.  
  4366. extern char *XSetOCValues(
  4367. #if NeedVarargsPrototypes
  4368.     XOC            /* oc */,
  4369.     ...
  4370. #endif
  4371. );
  4372.  
  4373. extern char *XGetOCValues(
  4374. #if NeedVarargsPrototypes
  4375.     XOC            /* oc */,
  4376.     ...
  4377. #endif
  4378. );
  4379.  
  4380. extern XFontSet XCreateFontSet(
  4381. #if NeedFunctionPrototypes
  4382.     Display*        /* display */,
  4383.     _Xconst char*    /* base_font_name_list */,
  4384.     char***        /* missing_charset_list */,
  4385.     int*        /* missing_charset_count */,
  4386.     char**        /* def_string */
  4387. #endif
  4388. );
  4389.  
  4390. extern void XFreeFontSet(
  4391. #if NeedFunctionPrototypes
  4392.     Display*        /* display */,
  4393.     XFontSet        /* font_set */
  4394. #endif
  4395. );
  4396.  
  4397. extern int XFontsOfFontSet(
  4398. #if NeedFunctionPrototypes
  4399.     XFontSet        /* font_set */,
  4400.     XFontStruct***    /* font_struct_list */,
  4401.     char***        /* font_name_list */
  4402. #endif
  4403. );
  4404.  
  4405. extern char *XBaseFontNameListOfFontSet(
  4406. #if NeedFunctionPrototypes
  4407.     XFontSet        /* font_set */
  4408. #endif
  4409. );
  4410.  
  4411. extern char *XLocaleOfFontSet(
  4412. #if NeedFunctionPrototypes
  4413.     XFontSet        /* font_set */
  4414. #endif
  4415. );
  4416.  
  4417. extern Bool XContextDependentDrawing(
  4418. #if NeedFunctionPrototypes
  4419.     XFontSet        /* font_set */
  4420. #endif
  4421. );
  4422.  
  4423. extern Bool XDirectionalDependentDrawing(
  4424. #if NeedFunctionPrototypes
  4425.     XFontSet        /* font_set */
  4426. #endif
  4427. );
  4428.  
  4429. extern Bool XContextualDrawing(
  4430. #if NeedFunctionPrototypes
  4431.     XFontSet        /* font_set */
  4432. #endif
  4433. );
  4434.  
  4435. extern XFontSetExtents *XExtentsOfFontSet(
  4436. #if NeedFunctionPrototypes
  4437.     XFontSet        /* font_set */
  4438. #endif
  4439. );
  4440.  
  4441. extern int XmbTextEscapement(
  4442. #if NeedFunctionPrototypes
  4443.     XFontSet        /* font_set */,
  4444.     _Xconst char*    /* text */,
  4445.     int            /* bytes_text */
  4446. #endif
  4447. );
  4448.  
  4449. extern int XwcTextEscapement(
  4450. #if NeedFunctionPrototypes
  4451.     XFontSet        /* font_set */,
  4452.     _Xconst wchar_t*    /* text */,
  4453.     int            /* num_wchars */
  4454. #endif
  4455. );
  4456.  
  4457. extern int XmbTextExtents(
  4458. #if NeedFunctionPrototypes
  4459.     XFontSet        /* font_set */,
  4460.     _Xconst char*    /* text */,
  4461.     int            /* bytes_text */,
  4462.     XRectangle*        /* overall_ink_return */,
  4463.     XRectangle*        /* overall_logical_return */
  4464. #endif
  4465. );
  4466.  
  4467. extern int XwcTextExtents(
  4468. #if NeedFunctionPrototypes
  4469.     XFontSet        /* font_set */,
  4470.     _Xconst wchar_t*    /* text */,
  4471.     int            /* num_wchars */,
  4472.     XRectangle*        /* overall_ink_return */,
  4473.     XRectangle*        /* overall_logical_return */
  4474. #endif
  4475. );
  4476.  
  4477. extern Status XmbTextPerCharExtents(
  4478. #if NeedFunctionPrototypes
  4479.     XFontSet        /* font_set */,
  4480.     _Xconst char*    /* text */,
  4481.     int            /* bytes_text */,
  4482.     XRectangle*        /* ink_extents_buffer */,
  4483.     XRectangle*        /* logical_extents_buffer */,
  4484.     int            /* buffer_size */,
  4485.     int*        /* num_chars */,
  4486.     XRectangle*        /* overall_ink_return */,
  4487.     XRectangle*        /* overall_logical_return */
  4488. #endif
  4489. );
  4490.  
  4491. extern Status XwcTextPerCharExtents(
  4492. #if NeedFunctionPrototypes
  4493.     XFontSet        /* font_set */,
  4494.     _Xconst wchar_t*    /* text */,
  4495.     int            /* num_wchars */,
  4496.     XRectangle*        /* ink_extents_buffer */,
  4497.     XRectangle*        /* logical_extents_buffer */,
  4498.     int            /* buffer_size */,
  4499.     int*        /* num_chars */,
  4500.     XRectangle*        /* overall_ink_return */,
  4501.     XRectangle*        /* overall_logical_return */
  4502. #endif
  4503. );
  4504.  
  4505. extern void XmbDrawText(
  4506. #if NeedFunctionPrototypes
  4507.     Display*        /* display */,
  4508.     Drawable        /* d */,
  4509.     GC            /* gc */,
  4510.     int            /* x */,
  4511.     int            /* y */,
  4512.     XmbTextItem*    /* text_items */,
  4513.     int            /* nitems */
  4514. #endif
  4515. );
  4516.  
  4517. extern void XwcDrawText(
  4518. #if NeedFunctionPrototypes
  4519.     Display*        /* display */,
  4520.     Drawable        /* d */,
  4521.     GC            /* gc */,
  4522.     int            /* x */,
  4523.     int            /* y */,
  4524.     XwcTextItem*    /* text_items */,
  4525.     int            /* nitems */
  4526. #endif
  4527. );
  4528.  
  4529. extern void XmbDrawString(
  4530. #if NeedFunctionPrototypes
  4531.     Display*        /* display */,
  4532.     Drawable        /* d */,
  4533.     XFontSet        /* font_set */,
  4534.     GC            /* gc */,
  4535.     int            /* x */,
  4536.     int            /* y */,
  4537.     _Xconst char*    /* text */,
  4538.     int            /* bytes_text */
  4539. #endif
  4540. );
  4541.  
  4542. extern void XwcDrawString(
  4543. #if NeedFunctionPrototypes
  4544.     Display*        /* display */,
  4545.     Drawable        /* d */,
  4546.     XFontSet        /* font_set */,
  4547.     GC            /* gc */,
  4548.     int            /* x */,
  4549.     int            /* y */,
  4550.     _Xconst wchar_t*    /* text */,
  4551.     int            /* num_wchars */
  4552. #endif
  4553. );
  4554.  
  4555. extern void XmbDrawImageString(
  4556. #if NeedFunctionPrototypes
  4557.     Display*        /* display */,
  4558.     Drawable        /* d */,
  4559.     XFontSet        /* font_set */,
  4560.     GC            /* gc */,
  4561.     int            /* x */,
  4562.     int            /* y */,
  4563.     _Xconst char*    /* text */,
  4564.     int            /* bytes_text */
  4565. #endif
  4566. );
  4567.  
  4568. extern void XwcDrawImageString(
  4569. #if NeedFunctionPrototypes
  4570.     Display*        /* display */,
  4571.     Drawable        /* d */,
  4572.     XFontSet        /* font_set */,
  4573.     GC            /* gc */,
  4574.     int            /* x */,
  4575.     int            /* y */,
  4576.     _Xconst wchar_t*    /* text */,
  4577.     int            /* num_wchars */
  4578. #endif
  4579. );
  4580.  
  4581. extern XIM XOpenIM(
  4582. #if NeedFunctionPrototypes
  4583.     Display*            /* dpy */,
  4584.     struct _XrmHashBucketRec*    /* rdb */,
  4585.     char*            /* res_name */,
  4586.     char*            /* res_class */
  4587. #endif
  4588. );
  4589.  
  4590. extern Status XCloseIM(
  4591. #if NeedFunctionPrototypes
  4592.     XIM /* im */
  4593. #endif
  4594. );
  4595.  
  4596. extern char *XGetIMValues(
  4597. #if NeedVarargsPrototypes
  4598.     XIM /* im */, ...
  4599. #endif
  4600. );
  4601.  
  4602. extern char *XSetIMValues(
  4603. #if NeedVarargsPrototypes
  4604.     XIM /* im */, ...
  4605. #endif
  4606. );
  4607.  
  4608. extern char *XSetIMValues(
  4609. #if NeedVarargsPrototypes
  4610.     XIM /* im */, ...
  4611. #endif
  4612. );
  4613.  
  4614. extern Display *XDisplayOfIM(
  4615. #if NeedFunctionPrototypes
  4616.     XIM /* im */
  4617. #endif
  4618. );
  4619.  
  4620. extern char *XLocaleOfIM(
  4621. #if NeedFunctionPrototypes
  4622.     XIM /* im*/
  4623. #endif
  4624. );
  4625.  
  4626. extern XIC XCreateIC(
  4627. #if NeedVarargsPrototypes
  4628.     XIM /* im */, ...
  4629. #endif
  4630. );
  4631.  
  4632. extern void XDestroyIC(
  4633. #if NeedFunctionPrototypes
  4634.     XIC /* ic */
  4635. #endif
  4636. );
  4637.  
  4638. extern void XSetICFocus(
  4639. #if NeedFunctionPrototypes
  4640.     XIC /* ic */
  4641. #endif
  4642. );
  4643.  
  4644. extern void XUnsetICFocus(
  4645. #if NeedFunctionPrototypes
  4646.     XIC /* ic */
  4647. #endif
  4648. );
  4649.  
  4650. extern wchar_t *XwcResetIC(
  4651. #if NeedFunctionPrototypes
  4652.     XIC /* ic */
  4653. #endif
  4654. );
  4655.  
  4656. extern char *XmbResetIC(
  4657. #if NeedFunctionPrototypes
  4658.     XIC /* ic */
  4659. #endif
  4660. );
  4661.  
  4662. extern char *XSetICValues(
  4663. #if NeedVarargsPrototypes
  4664.     XIC /* ic */, ...
  4665. #endif
  4666. );
  4667.  
  4668. extern char *XGetICValues(
  4669. #if NeedVarargsPrototypes
  4670.     XIC /* ic */, ...
  4671. #endif
  4672. );
  4673.  
  4674. extern XIM XIMOfIC(
  4675. #if NeedFunctionPrototypes
  4676.     XIC /* ic */
  4677. #endif
  4678. );
  4679.  
  4680. extern Bool XFilterEvent(
  4681. #if NeedFunctionPrototypes
  4682.     XEvent*    /* event */,
  4683.     Window    /* window */
  4684. #endif
  4685. );
  4686.  
  4687. extern int XmbLookupString(
  4688. #if NeedFunctionPrototypes
  4689.     XIC            /* ic */,
  4690.     XKeyPressedEvent*    /* event */,
  4691.     char*        /* buffer_return */,
  4692.     int            /* bytes_buffer */,
  4693.     KeySym*        /* keysym_return */,
  4694.     Status*        /* status_return */
  4695. #endif
  4696. );
  4697.  
  4698. extern int XwcLookupString(
  4699. #if NeedFunctionPrototypes
  4700.     XIC            /* ic */,
  4701.     XKeyPressedEvent*    /* event */,
  4702.     wchar_t*        /* buffer_return */,
  4703.     int            /* wchars_buffer */,
  4704.     KeySym*        /* keysym_return */,
  4705.     Status*        /* status_return */
  4706. #endif
  4707. );
  4708.  
  4709. extern XVaNestedList XVaCreateNestedList(
  4710. #if NeedVarargsPrototypes
  4711.     int /*unused*/, ...
  4712. #endif
  4713. );
  4714.  
  4715. /* internal connections for IMs */
  4716.  
  4717. extern Bool XRegisterIMInstantiateCallback(
  4718. #if NeedFunctionPrototypes
  4719.     Display*            /* dpy */,
  4720.     struct _XrmHashBucketRec*    /* rdb */,
  4721.     char*            /* res_name */,
  4722.     char*            /* res_class */,
  4723.     XIDProc            /* callback */,
  4724.     XPointer            /* client_data */
  4725. #endif
  4726. );
  4727.  
  4728. extern Bool XUnregisterIMInstantiateCallback(
  4729. #if NeedFunctionPrototypes
  4730.     Display*            /* dpy */,
  4731.     struct _XrmHashBucketRec*    /* rdb */,
  4732.     char*            /* res_name */,
  4733.     char*            /* res_class */,
  4734.     XIDProc            /* callback */,
  4735.     XPointer            /* client_data */
  4736. #endif
  4737. );
  4738.  
  4739. typedef void (*XConnectionWatchProc)(
  4740. #if NeedFunctionPrototypes
  4741.     Display*            /* dpy */,
  4742.     XPointer            /* client_data */,
  4743.     int                /* fd */,
  4744.     Bool            /* opening */,     /* open or close flag */
  4745.     XPointer*            /* watch_data */ /* open sets, close uses */
  4746. #endif
  4747. );
  4748.     
  4749.  
  4750. extern Status XInternalConnectionNumbers(
  4751. #if NeedFunctionPrototypes
  4752.     Display*            /* dpy */,
  4753.     int**            /* fd_return */,
  4754.     int*            /* count_return */
  4755. #endif
  4756. );
  4757.  
  4758. extern void XProcessInternalConnection(
  4759. #if NeedFunctionPrototypes
  4760.     Display*            /* dpy */,
  4761.     int                /* fd */
  4762. #endif
  4763. );
  4764.  
  4765. extern Status XAddConnectionWatch(
  4766. #if NeedFunctionPrototypes
  4767.     Display*            /* dpy */,
  4768.     XConnectionWatchProc    /* callback */,
  4769.     XPointer            /* client_data */
  4770. #endif
  4771. );
  4772.  
  4773. extern void XRemoveConnectionWatch(
  4774. #if NeedFunctionPrototypes
  4775.     Display*            /* dpy */,
  4776.     XConnectionWatchProc    /* callback */,
  4777.     XPointer            /* client_data */
  4778. #endif
  4779. );
  4780.  
  4781. _XFUNCPROTOEND
  4782.  
  4783. #endif /* _XLIB_H_ */
  4784.