home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / lib / site / Tk / X11 / Xlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-10  |  100.2 KB  |  4,312 lines

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