home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / anim / players / mpeg_src.lha / amiga / include / X11 / Xlib.h < prev    next >
C/C++ Source or Header  |  1992-12-08  |  102KB  |  4,310 lines

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