home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / include / x11 / xlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-17  |  105.8 KB  |  4,648 lines

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