home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / ImageMagick-4.0.6.tar.gz / ImageMagick-4.0.6.tar / ImageMagick-4.0.6 / xlib / X11 / Xlib.h < prev    next >
C/C++ Source or Header  |  1996-12-05  |  109KB  |  4,670 lines

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