Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:33

0001 /*
0002 
0003 Copyright 1985, 1986, 1987, 1991, 1998  The Open Group
0004 
0005 Permission to use, copy, modify, distribute, and sell this software and its
0006 documentation for any purpose is hereby granted without fee, provided that
0007 the above copyright notice appear in all copies and that both that
0008 copyright notice and this permission notice appear in supporting
0009 documentation.
0010 
0011 The above copyright notice and this permission notice shall be included in
0012 all copies or substantial portions of the Software.
0013 
0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0017 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020 
0021 Except as contained in this notice, the name of The Open Group shall not be
0022 used in advertising or otherwise to promote the sale, use or other dealings
0023 in this Software without prior written authorization from The Open Group.
0024 
0025 */
0026 
0027 
0028 /*
0029  *  Xlib.h - Header definition and support file for the C subroutine
0030  *  interface library (Xlib) to the X Window System Protocol (V11).
0031  *  Structures and symbols starting with "_" are private to the library.
0032  */
0033 #ifndef _X11_XLIB_H_
0034 #define _X11_XLIB_H_
0035 
0036 #define XlibSpecificationRelease 6
0037 
0038 #include <sys/types.h>
0039 
0040 #if defined(__SCO__) || defined(__UNIXWARE__)
0041 #include <stdint.h>
0042 #endif
0043 
0044 #include <X11/X.h>
0045 
0046 /* applications should not depend on these two headers being included! */
0047 #include <X11/Xfuncproto.h>
0048 #include <X11/Xosdefs.h>
0049 
0050 #ifndef X_WCHAR
0051 #include <stddef.h>
0052 #else
0053 /* replace this with #include or typedef appropriate for your system */
0054 typedef unsigned long wchar_t;
0055 #endif
0056 
0057 
0058 extern int
0059 _Xmblen(
0060     char *str,
0061     int len
0062     );
0063 
0064 /* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in
0065    November 2000. Its presence is indicated through the following macro. */
0066 #define X_HAVE_UTF8_STRING 1
0067 
0068 /* The Xlib structs are full of implicit padding to properly align members.
0069    We can't clean that up without breaking ABI, so tell clang not to bother
0070    complaining about it. */
0071 #ifdef __clang__
0072 #pragma clang diagnostic push
0073 #pragma clang diagnostic ignored "-Wpadded"
0074 #endif
0075 
0076 typedef char *XPointer;
0077 
0078 #define Bool int
0079 #define Status int
0080 #define True 1
0081 #define False 0
0082 
0083 #define QueuedAlready 0
0084 #define QueuedAfterReading 1
0085 #define QueuedAfterFlush 2
0086 
0087 #define ConnectionNumber(dpy)   (((_XPrivDisplay)(dpy))->fd)
0088 #define RootWindow(dpy, scr)    (ScreenOfDisplay(dpy,scr)->root)
0089 #define DefaultScreen(dpy)  (((_XPrivDisplay)(dpy))->default_screen)
0090 #define DefaultRootWindow(dpy)  (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
0091 #define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
0092 #define DefaultGC(dpy, scr)     (ScreenOfDisplay(dpy,scr)->default_gc)
0093 #define BlackPixel(dpy, scr)    (ScreenOfDisplay(dpy,scr)->black_pixel)
0094 #define WhitePixel(dpy, scr)    (ScreenOfDisplay(dpy,scr)->white_pixel)
0095 #define AllPlanes       ((unsigned long)~0L)
0096 #define QLength(dpy)        (((_XPrivDisplay)(dpy))->qlen)
0097 #define DisplayWidth(dpy, scr)  (ScreenOfDisplay(dpy,scr)->width)
0098 #define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
0099 #define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
0100 #define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
0101 #define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
0102 #define DisplayCells(dpy, scr)  (DefaultVisual(dpy,scr)->map_entries)
0103 #define ScreenCount(dpy)    (((_XPrivDisplay)(dpy))->nscreens)
0104 #define ServerVendor(dpy)   (((_XPrivDisplay)(dpy))->vendor)
0105 #define ProtocolVersion(dpy)    (((_XPrivDisplay)(dpy))->proto_major_version)
0106 #define ProtocolRevision(dpy)   (((_XPrivDisplay)(dpy))->proto_minor_version)
0107 #define VendorRelease(dpy)  (((_XPrivDisplay)(dpy))->release)
0108 #define DisplayString(dpy)  (((_XPrivDisplay)(dpy))->display_name)
0109 #define DefaultDepth(dpy, scr)  (ScreenOfDisplay(dpy,scr)->root_depth)
0110 #define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
0111 #define BitmapUnit(dpy)     (((_XPrivDisplay)(dpy))->bitmap_unit)
0112 #define BitmapBitOrder(dpy)     (((_XPrivDisplay)(dpy))->bitmap_bit_order)
0113 #define BitmapPad(dpy)      (((_XPrivDisplay)(dpy))->bitmap_pad)
0114 #define ImageByteOrder(dpy)     (((_XPrivDisplay)(dpy))->byte_order)
0115 #define NextRequest(dpy)    (((_XPrivDisplay)(dpy))->request + 1)
0116 #define LastKnownRequestProcessed(dpy)  (((_XPrivDisplay)(dpy))->last_request_read)
0117 
0118 /* macros for screen oriented applications (toolkit) */
0119 #define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)(dpy))->screens[scr])
0120 #define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
0121 #define DisplayOfScreen(s)  ((s)->display)
0122 #define RootWindowOfScreen(s)   ((s)->root)
0123 #define BlackPixelOfScreen(s)   ((s)->black_pixel)
0124 #define WhitePixelOfScreen(s)   ((s)->white_pixel)
0125 #define DefaultColormapOfScreen(s)((s)->cmap)
0126 #define DefaultDepthOfScreen(s) ((s)->root_depth)
0127 #define DefaultGCOfScreen(s)    ((s)->default_gc)
0128 #define DefaultVisualOfScreen(s)((s)->root_visual)
0129 #define WidthOfScreen(s)    ((s)->width)
0130 #define HeightOfScreen(s)   ((s)->height)
0131 #define WidthMMOfScreen(s)  ((s)->mwidth)
0132 #define HeightMMOfScreen(s) ((s)->mheight)
0133 #define PlanesOfScreen(s)   ((s)->root_depth)
0134 #define CellsOfScreen(s)    (DefaultVisualOfScreen((s))->map_entries)
0135 #define MinCmapsOfScreen(s) ((s)->min_maps)
0136 #define MaxCmapsOfScreen(s) ((s)->max_maps)
0137 #define DoesSaveUnders(s)   ((s)->save_unders)
0138 #define DoesBackingStore(s) ((s)->backing_store)
0139 #define EventMaskOfScreen(s)    ((s)->root_input_mask)
0140 
0141 /*
0142  * Extensions need a way to hang private data on some structures.
0143  */
0144 typedef struct _XExtData {
0145     int number;     /* number returned by XRegisterExtension */
0146     struct _XExtData *next; /* next item on list of data for structure */
0147     int (*free_private)(    /* called to free private storage */
0148     struct _XExtData *extension
0149     );
0150     XPointer private_data;  /* data private to this extension. */
0151 } XExtData;
0152 
0153 /*
0154  * This file contains structures used by the extension mechanism.
0155  */
0156 typedef struct {        /* public to extension, cannot be changed */
0157     int extension;      /* extension number */
0158     int major_opcode;   /* major op-code assigned by server */
0159     int first_event;    /* first event number for the extension */
0160     int first_error;    /* first error number for the extension */
0161 } XExtCodes;
0162 
0163 /*
0164  * Data structure for retrieving info about pixmap formats.
0165  */
0166 
0167 typedef struct {
0168     int depth;
0169     int bits_per_pixel;
0170     int scanline_pad;
0171 } XPixmapFormatValues;
0172 
0173 
0174 /*
0175  * Data structure for setting graphics context.
0176  */
0177 typedef struct {
0178     int function;       /* logical operation */
0179     unsigned long plane_mask;/* plane mask */
0180     unsigned long foreground;/* foreground pixel */
0181     unsigned long background;/* background pixel */
0182     int line_width;     /* line width */
0183     int line_style;     /* LineSolid, LineOnOffDash, LineDoubleDash */
0184     int cap_style;      /* CapNotLast, CapButt,
0185                    CapRound, CapProjecting */
0186     int join_style;     /* JoinMiter, JoinRound, JoinBevel */
0187     int fill_style;     /* FillSolid, FillTiled,
0188                    FillStippled, FillOpaqueStippled */
0189     int fill_rule;      /* EvenOddRule, WindingRule */
0190     int arc_mode;       /* ArcChord, ArcPieSlice */
0191     Pixmap tile;        /* tile pixmap for tiling operations */
0192     Pixmap stipple;     /* stipple 1 plane pixmap for stippling */
0193     int ts_x_origin;    /* offset for tile or stipple operations */
0194     int ts_y_origin;
0195         Font font;          /* default text font for text operations */
0196     int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
0197     Bool graphics_exposures;/* boolean, should exposures be generated */
0198     int clip_x_origin;  /* origin for clipping */
0199     int clip_y_origin;
0200     Pixmap clip_mask;   /* bitmap clipping; other calls for rects */
0201     int dash_offset;    /* patterned/dashed line information */
0202     char dashes;
0203 } XGCValues;
0204 
0205 /*
0206  * Graphics context.  The contents of this structure are implementation
0207  * dependent.  A GC should be treated as opaque by application code.
0208  */
0209 
0210 typedef struct _XGC
0211 #ifdef XLIB_ILLEGAL_ACCESS
0212 {
0213     XExtData *ext_data; /* hook for extension to hang data */
0214     GContext gid;   /* protocol ID for graphics context */
0215     /* there is more to this structure, but it is private to Xlib */
0216 }
0217 #endif
0218 *GC;
0219 
0220 /*
0221  * Visual structure; contains information about colormapping possible.
0222  */
0223 typedef struct {
0224     XExtData *ext_data; /* hook for extension to hang data */
0225     VisualID visualid;  /* visual id of this visual */
0226 #if defined(__cplusplus) || defined(c_plusplus)
0227     int c_class;        /* C++ class of screen (monochrome, etc.) */
0228 #else
0229     int class;      /* class of screen (monochrome, etc.) */
0230 #endif
0231     unsigned long red_mask, green_mask, blue_mask;  /* mask values */
0232     int bits_per_rgb;   /* log base 2 of distinct color values */
0233     int map_entries;    /* color map entries */
0234 } Visual;
0235 
0236 /*
0237  * Depth structure; contains information for each possible depth.
0238  */
0239 typedef struct {
0240     int depth;      /* this depth (Z) of the depth */
0241     int nvisuals;       /* number of Visual types at this depth */
0242     Visual *visuals;    /* list of visuals possible at this depth */
0243 } Depth;
0244 
0245 /*
0246  * Information about the screen.  The contents of this structure are
0247  * implementation dependent.  A Screen should be treated as opaque
0248  * by application code.
0249  */
0250 
0251 struct _XDisplay;       /* Forward declare before use for C++ */
0252 
0253 typedef struct {
0254     XExtData *ext_data; /* hook for extension to hang data */
0255     struct _XDisplay *display;/* back pointer to display structure */
0256     Window root;        /* Root window id. */
0257     int width, height;  /* width and height of screen */
0258     int mwidth, mheight;    /* width and height of  in millimeters */
0259     int ndepths;        /* number of depths possible */
0260     Depth *depths;      /* list of allowable depths on the screen */
0261     int root_depth;     /* bits per pixel */
0262     Visual *root_visual;    /* root visual */
0263     GC default_gc;      /* GC for the root root visual */
0264     Colormap cmap;      /* default color map */
0265     unsigned long white_pixel;
0266     unsigned long black_pixel;  /* White and Black pixel values */
0267     int max_maps, min_maps; /* max and min color maps */
0268     int backing_store;  /* Never, WhenMapped, Always */
0269     Bool save_unders;
0270     long root_input_mask;   /* initial root input mask */
0271 } Screen;
0272 
0273 /*
0274  * Format structure; describes ZFormat data the screen will understand.
0275  */
0276 typedef struct {
0277     XExtData *ext_data; /* hook for extension to hang data */
0278     int depth;      /* depth of this image format */
0279     int bits_per_pixel; /* bits/pixel at this depth */
0280     int scanline_pad;   /* scanline must padded to this multiple */
0281 } ScreenFormat;
0282 
0283 /*
0284  * Data structure for setting window attributes.
0285  */
0286 typedef struct {
0287     Pixmap background_pixmap;   /* background or None or ParentRelative */
0288     unsigned long background_pixel; /* background pixel */
0289     Pixmap border_pixmap;   /* border of the window */
0290     unsigned long border_pixel; /* border pixel value */
0291     int bit_gravity;        /* one of bit gravity values */
0292     int win_gravity;        /* one of the window gravity values */
0293     int backing_store;      /* NotUseful, WhenMapped, Always */
0294     unsigned long backing_planes;/* planes to be preserved if possible */
0295     unsigned long backing_pixel;/* value to use in restoring planes */
0296     Bool save_under;        /* should bits under be saved? (popups) */
0297     long event_mask;        /* set of events that should be saved */
0298     long do_not_propagate_mask; /* set of events that should not propagate */
0299     Bool override_redirect; /* boolean value for override-redirect */
0300     Colormap colormap;      /* color map to be associated with window */
0301     Cursor cursor;      /* cursor to be displayed (or None) */
0302 } XSetWindowAttributes;
0303 
0304 typedef struct {
0305     int x, y;           /* location of window */
0306     int width, height;      /* width and height of window */
0307     int border_width;       /* border width of window */
0308     int depth;              /* depth of window */
0309     Visual *visual;     /* the associated visual structure */
0310     Window root;            /* root of screen containing window */
0311 #if defined(__cplusplus) || defined(c_plusplus)
0312     int c_class;        /* C++ InputOutput, InputOnly*/
0313 #else
0314     int class;          /* InputOutput, InputOnly*/
0315 #endif
0316     int bit_gravity;        /* one of bit gravity values */
0317     int win_gravity;        /* one of the window gravity values */
0318     int backing_store;      /* NotUseful, WhenMapped, Always */
0319     unsigned long backing_planes;/* planes to be preserved if possible */
0320     unsigned long backing_pixel;/* value to be used when restoring planes */
0321     Bool save_under;        /* boolean, should bits under be saved? */
0322     Colormap colormap;      /* color map to be associated with window */
0323     Bool map_installed;     /* boolean, is color map currently installed*/
0324     int map_state;      /* IsUnmapped, IsUnviewable, IsViewable */
0325     long all_event_masks;   /* set of events all people have interest in*/
0326     long your_event_mask;   /* my event mask */
0327     long do_not_propagate_mask; /* set of events that should not propagate */
0328     Bool override_redirect; /* boolean value for override-redirect */
0329     Screen *screen;     /* back pointer to correct screen */
0330 } XWindowAttributes;
0331 
0332 /*
0333  * Data structure for host setting; getting routines.
0334  *
0335  */
0336 
0337 typedef struct {
0338     int family;     /* for example FamilyInternet */
0339     int length;     /* length of address, in bytes */
0340     char *address;      /* pointer to where to find the bytes */
0341 } XHostAddress;
0342 
0343 /*
0344  * Data structure for ServerFamilyInterpreted addresses in host routines
0345  */
0346 typedef struct {
0347     int typelength;     /* length of type string, in bytes */
0348     int valuelength;    /* length of value string, in bytes */
0349     char *type;     /* pointer to where to find the type string */
0350     char *value;        /* pointer to where to find the address */
0351 } XServerInterpretedAddress;
0352 
0353 /*
0354  * Data structure for "image" data, used by image manipulation routines.
0355  */
0356 typedef struct _XImage {
0357     int width, height;      /* size of image */
0358     int xoffset;        /* number of pixels offset in X direction */
0359     int format;         /* XYBitmap, XYPixmap, ZPixmap */
0360     char *data;         /* pointer to image data */
0361     int byte_order;     /* data byte order, LSBFirst, MSBFirst */
0362     int bitmap_unit;        /* quant. of scanline 8, 16, 32 */
0363     int bitmap_bit_order;   /* LSBFirst, MSBFirst */
0364     int bitmap_pad;     /* 8, 16, 32 either XY or ZPixmap */
0365     int depth;          /* depth of image */
0366     int bytes_per_line;     /* accelerator to next line */
0367     int bits_per_pixel;     /* bits per pixel (ZPixmap) */
0368     unsigned long red_mask; /* bits in z arrangement */
0369     unsigned long green_mask;
0370     unsigned long blue_mask;
0371     XPointer obdata;        /* hook for the object routines to hang on */
0372     struct funcs {      /* image manipulation routines */
0373     struct _XImage *(*create_image)(
0374         struct _XDisplay* /* display */,
0375         Visual*     /* visual */,
0376         unsigned int    /* depth */,
0377         int     /* format */,
0378         int     /* offset */,
0379         char*       /* data */,
0380         unsigned int    /* width */,
0381         unsigned int    /* height */,
0382         int     /* bitmap_pad */,
0383         int     /* bytes_per_line */);
0384     int (*destroy_image)        (struct _XImage *);
0385     unsigned long (*get_pixel)  (struct _XImage *, int, int);
0386     int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
0387     struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
0388     int (*add_pixel)            (struct _XImage *, long);
0389     } f;
0390 } XImage;
0391 
0392 /*
0393  * Data structure for XReconfigureWindow
0394  */
0395 typedef struct {
0396     int x, y;
0397     int width, height;
0398     int border_width;
0399     Window sibling;
0400     int stack_mode;
0401 } XWindowChanges;
0402 
0403 /*
0404  * Data structure used by color operations
0405  */
0406 typedef struct {
0407     unsigned long pixel;
0408     unsigned short red, green, blue;
0409     char flags;  /* do_red, do_green, do_blue */
0410     char pad;
0411 } XColor;
0412 
0413 /*
0414  * Data structures for graphics operations.  On most machines, these are
0415  * congruent with the wire protocol structures, so reformatting the data
0416  * can be avoided on these architectures.
0417  */
0418 typedef struct {
0419     short x1, y1, x2, y2;
0420 } XSegment;
0421 
0422 typedef struct {
0423     short x, y;
0424 } XPoint;
0425 
0426 typedef struct {
0427     short x, y;
0428     unsigned short width, height;
0429 } XRectangle;
0430 
0431 typedef struct {
0432     short x, y;
0433     unsigned short width, height;
0434     short angle1, angle2;
0435 } XArc;
0436 
0437 
0438 /* Data structure for XChangeKeyboardControl */
0439 
0440 typedef struct {
0441         int key_click_percent;
0442         int bell_percent;
0443         int bell_pitch;
0444         int bell_duration;
0445         int led;
0446         int led_mode;
0447         int key;
0448         int auto_repeat_mode;   /* On, Off, Default */
0449 } XKeyboardControl;
0450 
0451 /* Data structure for XGetKeyboardControl */
0452 
0453 typedef struct {
0454         int key_click_percent;
0455     int bell_percent;
0456     unsigned int bell_pitch, bell_duration;
0457     unsigned long led_mask;
0458     int global_auto_repeat;
0459     char auto_repeats[32];
0460 } XKeyboardState;
0461 
0462 /* Data structure for XGetMotionEvents.  */
0463 
0464 typedef struct {
0465         Time time;
0466     short x, y;
0467 } XTimeCoord;
0468 
0469 /* Data structure for X{Set,Get}ModifierMapping */
0470 
0471 typedef struct {
0472     int max_keypermod;  /* The server's max # of keys per modifier */
0473     KeyCode *modifiermap;   /* An 8 by max_keypermod array of modifiers */
0474 } XModifierKeymap;
0475 
0476 
0477 /*
0478  * Display datatype maintaining display specific data.
0479  * The contents of this structure are implementation dependent.
0480  * A Display should be treated as opaque by application code.
0481  */
0482 #ifndef XLIB_ILLEGAL_ACCESS
0483 typedef struct _XDisplay Display;
0484 #endif
0485 
0486 struct _XPrivate;       /* Forward declare before use for C++ */
0487 struct _XrmHashBucketRec;
0488 
0489 typedef struct
0490 #ifdef XLIB_ILLEGAL_ACCESS
0491 _XDisplay
0492 #endif
0493 {
0494     XExtData *ext_data; /* hook for extension to hang data */
0495     struct _XPrivate *private1;
0496     int fd;         /* Network socket. */
0497     int private2;
0498     int proto_major_version;/* major version of server's X protocol */
0499     int proto_minor_version;/* minor version of servers X protocol */
0500     char *vendor;       /* vendor of the server hardware */
0501         XID private3;
0502     XID private4;
0503     XID private5;
0504     int private6;
0505     XID (*resource_alloc)(  /* allocator function */
0506         struct _XDisplay*
0507     );
0508     int byte_order;     /* screen byte order, LSBFirst, MSBFirst */
0509     int bitmap_unit;    /* padding and data requirements */
0510     int bitmap_pad;     /* padding requirements on bitmaps */
0511     int bitmap_bit_order;   /* LeastSignificant or MostSignificant */
0512     int nformats;       /* number of pixmap formats in list */
0513     ScreenFormat *pixmap_format;    /* pixmap format list */
0514     int private8;
0515     int release;        /* release of the server */
0516     struct _XPrivate *private9, *private10;
0517     int qlen;       /* Length of input event queue */
0518     unsigned long last_request_read; /* seq number of last event read */
0519     unsigned long request;  /* sequence number of last request. */
0520     XPointer private11;
0521     XPointer private12;
0522     XPointer private13;
0523     XPointer private14;
0524     unsigned max_request_size; /* maximum number 32 bit words in request*/
0525     struct _XrmHashBucketRec *db;
0526     int (*private15)(
0527         struct _XDisplay*
0528         );
0529     char *display_name; /* "host:display" string used on this connect*/
0530     int default_screen; /* default screen for operations */
0531     int nscreens;       /* number of screens on this server*/
0532     Screen *screens;    /* pointer to list of screens */
0533     unsigned long motion_buffer;    /* size of motion buffer */
0534     unsigned long private16;
0535     int min_keycode;    /* minimum defined keycode */
0536     int max_keycode;    /* maximum defined keycode */
0537     XPointer private17;
0538     XPointer private18;
0539     int private19;
0540     char *xdefaults;    /* contents of defaults from server */
0541     /* there is more to this structure, but it is private to Xlib */
0542 }
0543 #ifdef XLIB_ILLEGAL_ACCESS
0544 Display,
0545 #endif
0546 *_XPrivDisplay;
0547 
0548 #undef _XEVENT_
0549 #ifndef _XEVENT_
0550 /*
0551  * Definitions of specific events.
0552  */
0553 typedef struct {
0554     int type;       /* of event */
0555     unsigned long serial;   /* # of last request processed by server */
0556     Bool send_event;    /* true if this came from a SendEvent request */
0557     Display *display;   /* Display the event was read from */
0558     Window window;          /* "event" window it is reported relative to */
0559     Window root;            /* root window that the event occurred on */
0560     Window subwindow;   /* child window */
0561     Time time;      /* milliseconds */
0562     int x, y;       /* pointer x, y coordinates in event window */
0563     int x_root, y_root; /* coordinates relative to root */
0564     unsigned int state; /* key or button mask */
0565     unsigned int keycode;   /* detail */
0566     Bool same_screen;   /* same screen flag */
0567 } XKeyEvent;
0568 typedef XKeyEvent XKeyPressedEvent;
0569 typedef XKeyEvent XKeyReleasedEvent;
0570 
0571 typedef struct {
0572     int type;       /* of event */
0573     unsigned long serial;   /* # of last request processed by server */
0574     Bool send_event;    /* true if this came from a SendEvent request */
0575     Display *display;   /* Display the event was read from */
0576     Window window;          /* "event" window it is reported relative to */
0577     Window root;            /* root window that the event occurred on */
0578     Window subwindow;   /* child window */
0579     Time time;      /* milliseconds */
0580     int x, y;       /* pointer x, y coordinates in event window */
0581     int x_root, y_root; /* coordinates relative to root */
0582     unsigned int state; /* key or button mask */
0583     unsigned int button;    /* detail */
0584     Bool same_screen;   /* same screen flag */
0585 } XButtonEvent;
0586 typedef XButtonEvent XButtonPressedEvent;
0587 typedef XButtonEvent XButtonReleasedEvent;
0588 
0589 typedef struct {
0590     int type;       /* of event */
0591     unsigned long serial;   /* # of last request processed by server */
0592     Bool send_event;    /* true if this came from a SendEvent request */
0593     Display *display;   /* Display the event was read from */
0594     Window window;          /* "event" window reported relative to */
0595     Window root;            /* root window that the event occurred on */
0596     Window subwindow;   /* child window */
0597     Time time;      /* milliseconds */
0598     int x, y;       /* pointer x, y coordinates in event window */
0599     int x_root, y_root; /* coordinates relative to root */
0600     unsigned int state; /* key or button mask */
0601     char is_hint;       /* detail */
0602     Bool same_screen;   /* same screen flag */
0603 } XMotionEvent;
0604 typedef XMotionEvent XPointerMovedEvent;
0605 
0606 typedef struct {
0607     int type;       /* of event */
0608     unsigned long serial;   /* # of last request processed by server */
0609     Bool send_event;    /* true if this came from a SendEvent request */
0610     Display *display;   /* Display the event was read from */
0611     Window window;          /* "event" window reported relative to */
0612     Window root;            /* root window that the event occurred on */
0613     Window subwindow;   /* child window */
0614     Time time;      /* milliseconds */
0615     int x, y;       /* pointer x, y coordinates in event window */
0616     int x_root, y_root; /* coordinates relative to root */
0617     int mode;       /* NotifyNormal, NotifyGrab, NotifyUngrab */
0618     int detail;
0619     /*
0620      * NotifyAncestor, NotifyVirtual, NotifyInferior,
0621      * NotifyNonlinear,NotifyNonlinearVirtual
0622      */
0623     Bool same_screen;   /* same screen flag */
0624     Bool focus;     /* boolean focus */
0625     unsigned int state; /* key or button mask */
0626 } XCrossingEvent;
0627 typedef XCrossingEvent XEnterWindowEvent;
0628 typedef XCrossingEvent XLeaveWindowEvent;
0629 
0630 typedef struct {
0631     int type;       /* FocusIn or FocusOut */
0632     unsigned long serial;   /* # of last request processed by server */
0633     Bool send_event;    /* true if this came from a SendEvent request */
0634     Display *display;   /* Display the event was read from */
0635     Window window;      /* window of event */
0636     int mode;       /* NotifyNormal, NotifyWhileGrabbed,
0637                    NotifyGrab, NotifyUngrab */
0638     int detail;
0639     /*
0640      * NotifyAncestor, NotifyVirtual, NotifyInferior,
0641      * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
0642      * NotifyPointerRoot, NotifyDetailNone
0643      */
0644 } XFocusChangeEvent;
0645 typedef XFocusChangeEvent XFocusInEvent;
0646 typedef XFocusChangeEvent XFocusOutEvent;
0647 
0648 /* generated on EnterWindow and FocusIn  when KeyMapState selected */
0649 typedef struct {
0650     int type;
0651     unsigned long serial;   /* # of last request processed by server */
0652     Bool send_event;    /* true if this came from a SendEvent request */
0653     Display *display;   /* Display the event was read from */
0654     Window window;
0655     char key_vector[32];
0656 } XKeymapEvent;
0657 
0658 typedef struct {
0659     int type;
0660     unsigned long serial;   /* # of last request processed by server */
0661     Bool send_event;    /* true if this came from a SendEvent request */
0662     Display *display;   /* Display the event was read from */
0663     Window window;
0664     int x, y;
0665     int width, height;
0666     int count;      /* if non-zero, at least this many more */
0667 } XExposeEvent;
0668 
0669 typedef struct {
0670     int type;
0671     unsigned long serial;   /* # of last request processed by server */
0672     Bool send_event;    /* true if this came from a SendEvent request */
0673     Display *display;   /* Display the event was read from */
0674     Drawable drawable;
0675     int x, y;
0676     int width, height;
0677     int count;      /* if non-zero, at least this many more */
0678     int major_code;     /* core is CopyArea or CopyPlane */
0679     int minor_code;     /* not defined in the core */
0680 } XGraphicsExposeEvent;
0681 
0682 typedef struct {
0683     int type;
0684     unsigned long serial;   /* # of last request processed by server */
0685     Bool send_event;    /* true if this came from a SendEvent request */
0686     Display *display;   /* Display the event was read from */
0687     Drawable drawable;
0688     int major_code;     /* core is CopyArea or CopyPlane */
0689     int minor_code;     /* not defined in the core */
0690 } XNoExposeEvent;
0691 
0692 typedef struct {
0693     int type;
0694     unsigned long serial;   /* # of last request processed by server */
0695     Bool send_event;    /* true if this came from a SendEvent request */
0696     Display *display;   /* Display the event was read from */
0697     Window window;
0698     int state;      /* Visibility state */
0699 } XVisibilityEvent;
0700 
0701 typedef struct {
0702     int type;
0703     unsigned long serial;   /* # of last request processed by server */
0704     Bool send_event;    /* true if this came from a SendEvent request */
0705     Display *display;   /* Display the event was read from */
0706     Window parent;      /* parent of the window */
0707     Window window;      /* window id of window created */
0708     int x, y;       /* window location */
0709     int width, height;  /* size of window */
0710     int border_width;   /* border width */
0711     Bool override_redirect; /* creation should be overridden */
0712 } XCreateWindowEvent;
0713 
0714 typedef struct {
0715     int type;
0716     unsigned long serial;   /* # of last request processed by server */
0717     Bool send_event;    /* true if this came from a SendEvent request */
0718     Display *display;   /* Display the event was read from */
0719     Window event;
0720     Window window;
0721 } XDestroyWindowEvent;
0722 
0723 typedef struct {
0724     int type;
0725     unsigned long serial;   /* # of last request processed by server */
0726     Bool send_event;    /* true if this came from a SendEvent request */
0727     Display *display;   /* Display the event was read from */
0728     Window event;
0729     Window window;
0730     Bool from_configure;
0731 } XUnmapEvent;
0732 
0733 typedef struct {
0734     int type;
0735     unsigned long serial;   /* # of last request processed by server */
0736     Bool send_event;    /* true if this came from a SendEvent request */
0737     Display *display;   /* Display the event was read from */
0738     Window event;
0739     Window window;
0740     Bool override_redirect; /* boolean, is override set... */
0741 } XMapEvent;
0742 
0743 typedef struct {
0744     int type;
0745     unsigned long serial;   /* # of last request processed by server */
0746     Bool send_event;    /* true if this came from a SendEvent request */
0747     Display *display;   /* Display the event was read from */
0748     Window parent;
0749     Window window;
0750 } XMapRequestEvent;
0751 
0752 typedef struct {
0753     int type;
0754     unsigned long serial;   /* # of last request processed by server */
0755     Bool send_event;    /* true if this came from a SendEvent request */
0756     Display *display;   /* Display the event was read from */
0757     Window event;
0758     Window window;
0759     Window parent;
0760     int x, y;
0761     Bool override_redirect;
0762 } XReparentEvent;
0763 
0764 typedef struct {
0765     int type;
0766     unsigned long serial;   /* # of last request processed by server */
0767     Bool send_event;    /* true if this came from a SendEvent request */
0768     Display *display;   /* Display the event was read from */
0769     Window event;
0770     Window window;
0771     int x, y;
0772     int width, height;
0773     int border_width;
0774     Window above;
0775     Bool override_redirect;
0776 } XConfigureEvent;
0777 
0778 typedef struct {
0779     int type;
0780     unsigned long serial;   /* # of last request processed by server */
0781     Bool send_event;    /* true if this came from a SendEvent request */
0782     Display *display;   /* Display the event was read from */
0783     Window event;
0784     Window window;
0785     int x, y;
0786 } XGravityEvent;
0787 
0788 typedef struct {
0789     int type;
0790     unsigned long serial;   /* # of last request processed by server */
0791     Bool send_event;    /* true if this came from a SendEvent request */
0792     Display *display;   /* Display the event was read from */
0793     Window window;
0794     int width, height;
0795 } XResizeRequestEvent;
0796 
0797 typedef struct {
0798     int type;
0799     unsigned long serial;   /* # of last request processed by server */
0800     Bool send_event;    /* true if this came from a SendEvent request */
0801     Display *display;   /* Display the event was read from */
0802     Window parent;
0803     Window window;
0804     int x, y;
0805     int width, height;
0806     int border_width;
0807     Window above;
0808     int detail;     /* Above, Below, TopIf, BottomIf, Opposite */
0809     unsigned long value_mask;
0810 } XConfigureRequestEvent;
0811 
0812 typedef struct {
0813     int type;
0814     unsigned long serial;   /* # of last request processed by server */
0815     Bool send_event;    /* true if this came from a SendEvent request */
0816     Display *display;   /* Display the event was read from */
0817     Window event;
0818     Window window;
0819     int place;      /* PlaceOnTop, PlaceOnBottom */
0820 } XCirculateEvent;
0821 
0822 typedef struct {
0823     int type;
0824     unsigned long serial;   /* # of last request processed by server */
0825     Bool send_event;    /* true if this came from a SendEvent request */
0826     Display *display;   /* Display the event was read from */
0827     Window parent;
0828     Window window;
0829     int place;      /* PlaceOnTop, PlaceOnBottom */
0830 } XCirculateRequestEvent;
0831 
0832 typedef struct {
0833     int type;
0834     unsigned long serial;   /* # of last request processed by server */
0835     Bool send_event;    /* true if this came from a SendEvent request */
0836     Display *display;   /* Display the event was read from */
0837     Window window;
0838     Atom atom;
0839     Time time;
0840     int state;      /* NewValue, Deleted */
0841 } XPropertyEvent;
0842 
0843 typedef struct {
0844     int type;
0845     unsigned long serial;   /* # of last request processed by server */
0846     Bool send_event;    /* true if this came from a SendEvent request */
0847     Display *display;   /* Display the event was read from */
0848     Window window;
0849     Atom selection;
0850     Time time;
0851 } XSelectionClearEvent;
0852 
0853 typedef struct {
0854     int type;
0855     unsigned long serial;   /* # of last request processed by server */
0856     Bool send_event;    /* true if this came from a SendEvent request */
0857     Display *display;   /* Display the event was read from */
0858     Window owner;
0859     Window requestor;
0860     Atom selection;
0861     Atom target;
0862     Atom property;
0863     Time time;
0864 } XSelectionRequestEvent;
0865 
0866 typedef struct {
0867     int type;
0868     unsigned long serial;   /* # of last request processed by server */
0869     Bool send_event;    /* true if this came from a SendEvent request */
0870     Display *display;   /* Display the event was read from */
0871     Window requestor;
0872     Atom selection;
0873     Atom target;
0874     Atom property;      /* ATOM or None */
0875     Time time;
0876 } XSelectionEvent;
0877 
0878 typedef struct {
0879     int type;
0880     unsigned long serial;   /* # of last request processed by server */
0881     Bool send_event;    /* true if this came from a SendEvent request */
0882     Display *display;   /* Display the event was read from */
0883     Window window;
0884     Colormap colormap;  /* COLORMAP or None */
0885 #if defined(__cplusplus) || defined(c_plusplus)
0886     Bool c_new;     /* C++ */
0887 #else
0888     Bool new;
0889 #endif
0890     int state;      /* ColormapInstalled, ColormapUninstalled */
0891 } XColormapEvent;
0892 
0893 typedef struct {
0894     int type;
0895     unsigned long serial;   /* # of last request processed by server */
0896     Bool send_event;    /* true if this came from a SendEvent request */
0897     Display *display;   /* Display the event was read from */
0898     Window window;
0899     Atom message_type;
0900     int format;
0901     union {
0902         char b[20];
0903         short s[10];
0904         long l[5];
0905         } data;
0906 } XClientMessageEvent;
0907 
0908 typedef struct {
0909     int type;
0910     unsigned long serial;   /* # of last request processed by server */
0911     Bool send_event;    /* true if this came from a SendEvent request */
0912     Display *display;   /* Display the event was read from */
0913     Window window;      /* unused */
0914     int request;        /* one of MappingModifier, MappingKeyboard,
0915                    MappingPointer */
0916     int first_keycode;  /* first keycode */
0917     int count;      /* defines range of change w. first_keycode*/
0918 } XMappingEvent;
0919 
0920 typedef struct {
0921     int type;
0922     Display *display;   /* Display the event was read from */
0923     XID resourceid;     /* resource id */
0924     unsigned long serial;   /* serial number of failed request */
0925     unsigned char error_code;   /* error code of failed request */
0926     unsigned char request_code; /* Major op-code of failed request */
0927     unsigned char minor_code;   /* Minor op-code of failed request */
0928 } XErrorEvent;
0929 
0930 typedef struct {
0931     int type;
0932     unsigned long serial;   /* # of last request processed by server */
0933     Bool send_event;    /* true if this came from a SendEvent request */
0934     Display *display;/* Display the event was read from */
0935     Window window;  /* window on which event was requested in event mask */
0936 } XAnyEvent;
0937 
0938 
0939 /***************************************************************
0940  *
0941  * GenericEvent.  This event is the standard event for all newer extensions.
0942  */
0943 
0944 typedef struct
0945     {
0946     int            type;         /* of event. Always GenericEvent */
0947     unsigned long  serial;       /* # of last request processed */
0948     Bool           send_event;   /* true if from SendEvent request */
0949     Display        *display;     /* Display the event was read from */
0950     int            extension;    /* major opcode of extension that caused the event */
0951     int            evtype;       /* actual event type. */
0952     } XGenericEvent;
0953 
0954 typedef struct {
0955     int            type;         /* of event. Always GenericEvent */
0956     unsigned long  serial;       /* # of last request processed */
0957     Bool           send_event;   /* true if from SendEvent request */
0958     Display        *display;     /* Display the event was read from */
0959     int            extension;    /* major opcode of extension that caused the event */
0960     int            evtype;       /* actual event type. */
0961     unsigned int   cookie;
0962     void           *data;
0963 } XGenericEventCookie;
0964 
0965 /*
0966  * this union is defined so Xlib can always use the same sized
0967  * event structure internally, to avoid memory fragmentation.
0968  */
0969 typedef union _XEvent {
0970         int type;       /* must not be changed; first element */
0971     XAnyEvent xany;
0972     XKeyEvent xkey;
0973     XButtonEvent xbutton;
0974     XMotionEvent xmotion;
0975     XCrossingEvent xcrossing;
0976     XFocusChangeEvent xfocus;
0977     XExposeEvent xexpose;
0978     XGraphicsExposeEvent xgraphicsexpose;
0979     XNoExposeEvent xnoexpose;
0980     XVisibilityEvent xvisibility;
0981     XCreateWindowEvent xcreatewindow;
0982     XDestroyWindowEvent xdestroywindow;
0983     XUnmapEvent xunmap;
0984     XMapEvent xmap;
0985     XMapRequestEvent xmaprequest;
0986     XReparentEvent xreparent;
0987     XConfigureEvent xconfigure;
0988     XGravityEvent xgravity;
0989     XResizeRequestEvent xresizerequest;
0990     XConfigureRequestEvent xconfigurerequest;
0991     XCirculateEvent xcirculate;
0992     XCirculateRequestEvent xcirculaterequest;
0993     XPropertyEvent xproperty;
0994     XSelectionClearEvent xselectionclear;
0995     XSelectionRequestEvent xselectionrequest;
0996     XSelectionEvent xselection;
0997     XColormapEvent xcolormap;
0998     XClientMessageEvent xclient;
0999     XMappingEvent xmapping;
1000     XErrorEvent xerror;
1001     XKeymapEvent xkeymap;
1002     XGenericEvent xgeneric;
1003     XGenericEventCookie xcookie;
1004     long pad[24];
1005 } XEvent;
1006 #endif
1007 
1008 #define XAllocID(dpy) ((*((_XPrivDisplay)(dpy))->resource_alloc)((dpy)))
1009 
1010 /*
1011  * per character font metric information.
1012  */
1013 typedef struct {
1014     short   lbearing;   /* origin to left edge of raster */
1015     short   rbearing;   /* origin to right edge of raster */
1016     short   width;      /* advance to next char's origin */
1017     short   ascent;     /* baseline to top edge of raster */
1018     short   descent;    /* baseline to bottom edge of raster */
1019     unsigned short attributes;  /* per char flags (not predefined) */
1020 } XCharStruct;
1021 
1022 /*
1023  * To allow arbitrary information with fonts, there are additional properties
1024  * returned.
1025  */
1026 typedef struct {
1027     Atom name;
1028     unsigned long card32;
1029 } XFontProp;
1030 
1031 typedef struct {
1032     XExtData    *ext_data;  /* hook for extension to hang data */
1033     Font        fid;            /* Font id for this font */
1034     unsigned    direction;  /* hint about direction the font is painted */
1035     unsigned    min_char_or_byte2;/* first character */
1036     unsigned    max_char_or_byte2;/* last character */
1037     unsigned    min_byte1;  /* first row that exists */
1038     unsigned    max_byte1;  /* last row that exists */
1039     Bool    all_chars_exist;/* flag if all characters have non-zero size*/
1040     unsigned    default_char;   /* char to print for undefined character */
1041     int         n_properties;   /* how many properties there are */
1042     XFontProp   *properties;    /* pointer to array of additional properties*/
1043     XCharStruct min_bounds; /* minimum bounds over all existing char*/
1044     XCharStruct max_bounds; /* maximum bounds over all existing char*/
1045     XCharStruct *per_char;  /* first_char to last_char information */
1046     int     ascent;     /* log. extent above baseline for spacing */
1047     int     descent;    /* log. descent below baseline for spacing */
1048 } XFontStruct;
1049 
1050 /*
1051  * PolyText routines take these as arguments.
1052  */
1053 typedef struct {
1054     char *chars;        /* pointer to string */
1055     int nchars;         /* number of characters */
1056     int delta;          /* delta between strings */
1057     Font font;          /* font to print it in, None don't change */
1058 } XTextItem;
1059 
1060 typedef struct {        /* normal 16 bit characters are two bytes */
1061     unsigned char byte1;
1062     unsigned char byte2;
1063 } XChar2b;
1064 
1065 typedef struct {
1066     XChar2b *chars;     /* two byte characters */
1067     int nchars;         /* number of characters */
1068     int delta;          /* delta between strings */
1069     Font font;          /* font to print it in, None don't change */
1070 } XTextItem16;
1071 
1072 
1073 typedef union { Display *display;
1074         GC gc;
1075         Visual *visual;
1076         Screen *screen;
1077         ScreenFormat *pixmap_format;
1078         XFontStruct *font; } XEDataObject;
1079 
1080 typedef struct {
1081     XRectangle      max_ink_extent;
1082     XRectangle      max_logical_extent;
1083 } XFontSetExtents;
1084 
1085 /* unused:
1086 typedef void (*XOMProc)();
1087  */
1088 
1089 typedef struct _XOM *XOM;
1090 typedef struct _XOC *XOC, *XFontSet;
1091 
1092 typedef struct {
1093     char           *chars;
1094     int             nchars;
1095     int             delta;
1096     XFontSet        font_set;
1097 } XmbTextItem;
1098 
1099 typedef struct {
1100     wchar_t        *chars;
1101     int             nchars;
1102     int             delta;
1103     XFontSet        font_set;
1104 } XwcTextItem;
1105 
1106 #define XNRequiredCharSet "requiredCharSet"
1107 #define XNQueryOrientation "queryOrientation"
1108 #define XNBaseFontName "baseFontName"
1109 #define XNOMAutomatic "omAutomatic"
1110 #define XNMissingCharSet "missingCharSet"
1111 #define XNDefaultString "defaultString"
1112 #define XNOrientation "orientation"
1113 #define XNDirectionalDependentDrawing "directionalDependentDrawing"
1114 #define XNContextualDrawing "contextualDrawing"
1115 #define XNFontInfo "fontInfo"
1116 
1117 typedef struct {
1118     int charset_count;
1119     char **charset_list;
1120 } XOMCharSetList;
1121 
1122 typedef enum {
1123     XOMOrientation_LTR_TTB,
1124     XOMOrientation_RTL_TTB,
1125     XOMOrientation_TTB_LTR,
1126     XOMOrientation_TTB_RTL,
1127     XOMOrientation_Context
1128 } XOrientation;
1129 
1130 typedef struct {
1131     int num_orientation;
1132     XOrientation *orientation;  /* Input Text description */
1133 } XOMOrientation;
1134 
1135 typedef struct {
1136     int num_font;
1137     XFontStruct **font_struct_list;
1138     char **font_name_list;
1139 } XOMFontInfo;
1140 
1141 typedef struct _XIM *XIM;
1142 typedef struct _XIC *XIC;
1143 
1144 typedef void (*XIMProc)(
1145     XIM,
1146     XPointer,
1147     XPointer
1148 );
1149 
1150 typedef Bool (*XICProc)(
1151     XIC,
1152     XPointer,
1153     XPointer
1154 );
1155 
1156 typedef void (*XIDProc)(
1157     Display*,
1158     XPointer,
1159     XPointer
1160 );
1161 
1162 typedef unsigned long XIMStyle;
1163 
1164 typedef struct {
1165     unsigned short count_styles;
1166     XIMStyle *supported_styles;
1167 } XIMStyles;
1168 
1169 #define XIMPreeditArea      0x0001L
1170 #define XIMPreeditCallbacks 0x0002L
1171 #define XIMPreeditPosition  0x0004L
1172 #define XIMPreeditNothing   0x0008L
1173 #define XIMPreeditNone      0x0010L
1174 #define XIMStatusArea       0x0100L
1175 #define XIMStatusCallbacks  0x0200L
1176 #define XIMStatusNothing    0x0400L
1177 #define XIMStatusNone       0x0800L
1178 
1179 #define XNVaNestedList "XNVaNestedList"
1180 #define XNQueryInputStyle "queryInputStyle"
1181 #define XNClientWindow "clientWindow"
1182 #define XNInputStyle "inputStyle"
1183 #define XNFocusWindow "focusWindow"
1184 #define XNResourceName "resourceName"
1185 #define XNResourceClass "resourceClass"
1186 #define XNGeometryCallback "geometryCallback"
1187 #define XNDestroyCallback "destroyCallback"
1188 #define XNFilterEvents "filterEvents"
1189 #define XNPreeditStartCallback "preeditStartCallback"
1190 #define XNPreeditDoneCallback "preeditDoneCallback"
1191 #define XNPreeditDrawCallback "preeditDrawCallback"
1192 #define XNPreeditCaretCallback "preeditCaretCallback"
1193 #define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1194 #define XNPreeditAttributes "preeditAttributes"
1195 #define XNStatusStartCallback "statusStartCallback"
1196 #define XNStatusDoneCallback "statusDoneCallback"
1197 #define XNStatusDrawCallback "statusDrawCallback"
1198 #define XNStatusAttributes "statusAttributes"
1199 #define XNArea "area"
1200 #define XNAreaNeeded "areaNeeded"
1201 #define XNSpotLocation "spotLocation"
1202 #define XNColormap "colorMap"
1203 #define XNStdColormap "stdColorMap"
1204 #define XNForeground "foreground"
1205 #define XNBackground "background"
1206 #define XNBackgroundPixmap "backgroundPixmap"
1207 #define XNFontSet "fontSet"
1208 #define XNLineSpace "lineSpace"
1209 #define XNCursor "cursor"
1210 
1211 #define XNQueryIMValuesList "queryIMValuesList"
1212 #define XNQueryICValuesList "queryICValuesList"
1213 #define XNVisiblePosition "visiblePosition"
1214 #define XNR6PreeditCallback "r6PreeditCallback"
1215 #define XNStringConversionCallback "stringConversionCallback"
1216 #define XNStringConversion "stringConversion"
1217 #define XNResetState "resetState"
1218 #define XNHotKey "hotKey"
1219 #define XNHotKeyState "hotKeyState"
1220 #define XNPreeditState "preeditState"
1221 #define XNSeparatorofNestedList "separatorofNestedList"
1222 
1223 #define XBufferOverflow     -1
1224 #define XLookupNone     1
1225 #define XLookupChars        2
1226 #define XLookupKeySym       3
1227 #define XLookupBoth     4
1228 
1229 typedef void *XVaNestedList;
1230 
1231 typedef struct {
1232     XPointer client_data;
1233     XIMProc callback;
1234 } XIMCallback;
1235 
1236 typedef struct {
1237     XPointer client_data;
1238     XICProc callback;
1239 } XICCallback;
1240 
1241 typedef unsigned long XIMFeedback;
1242 
1243 #define XIMReverse      1L
1244 #define XIMUnderline        (1L<<1)
1245 #define XIMHighlight        (1L<<2)
1246 #define XIMPrimary      (1L<<5)
1247 #define XIMSecondary        (1L<<6)
1248 #define XIMTertiary     (1L<<7)
1249 #define XIMVisibleToForward     (1L<<8)
1250 #define XIMVisibleToBackword    (1L<<9)
1251 #define XIMVisibleToCenter  (1L<<10)
1252 
1253 typedef struct _XIMText {
1254     unsigned short length;
1255     XIMFeedback *feedback;
1256     Bool encoding_is_wchar;
1257     union {
1258     char *multi_byte;
1259     wchar_t *wide_char;
1260     } string;
1261 } XIMText;
1262 
1263 typedef unsigned long    XIMPreeditState;
1264 
1265 #define XIMPreeditUnKnown   0L
1266 #define XIMPreeditEnable    1L
1267 #define XIMPreeditDisable   (1L<<1)
1268 
1269 typedef struct  _XIMPreeditStateNotifyCallbackStruct {
1270     XIMPreeditState state;
1271 } XIMPreeditStateNotifyCallbackStruct;
1272 
1273 typedef unsigned long    XIMResetState;
1274 
1275 #define XIMInitialState     1L
1276 #define XIMPreserveState    (1L<<1)
1277 
1278 typedef unsigned long XIMStringConversionFeedback;
1279 
1280 #define XIMStringConversionLeftEdge (0x00000001)
1281 #define XIMStringConversionRightEdge    (0x00000002)
1282 #define XIMStringConversionTopEdge  (0x00000004)
1283 #define XIMStringConversionBottomEdge   (0x00000008)
1284 #define XIMStringConversionConcealed    (0x00000010)
1285 #define XIMStringConversionWrapped  (0x00000020)
1286 
1287 typedef struct _XIMStringConversionText {
1288     unsigned short length;
1289     XIMStringConversionFeedback *feedback;
1290     Bool encoding_is_wchar;
1291     union {
1292     char *mbs;
1293     wchar_t *wcs;
1294     } string;
1295 } XIMStringConversionText;
1296 
1297 typedef unsigned short  XIMStringConversionPosition;
1298 
1299 typedef unsigned short  XIMStringConversionType;
1300 
1301 #define XIMStringConversionBuffer   (0x0001)
1302 #define XIMStringConversionLine     (0x0002)
1303 #define XIMStringConversionWord     (0x0003)
1304 #define XIMStringConversionChar     (0x0004)
1305 
1306 typedef unsigned short  XIMStringConversionOperation;
1307 
1308 #define XIMStringConversionSubstitution (0x0001)
1309 #define XIMStringConversionRetrieval    (0x0002)
1310 
1311 typedef enum {
1312     XIMForwardChar, XIMBackwardChar,
1313     XIMForwardWord, XIMBackwardWord,
1314     XIMCaretUp, XIMCaretDown,
1315     XIMNextLine, XIMPreviousLine,
1316     XIMLineStart, XIMLineEnd,
1317     XIMAbsolutePosition,
1318     XIMDontChange
1319 } XIMCaretDirection;
1320 
1321 typedef struct _XIMStringConversionCallbackStruct {
1322     XIMStringConversionPosition position;
1323     XIMCaretDirection direction;
1324     XIMStringConversionOperation operation;
1325     unsigned short factor;
1326     XIMStringConversionText *text;
1327 } XIMStringConversionCallbackStruct;
1328 
1329 typedef struct _XIMPreeditDrawCallbackStruct {
1330     int caret;      /* Cursor offset within pre-edit string */
1331     int chg_first;  /* Starting change position */
1332     int chg_length; /* Length of the change in character count */
1333     XIMText *text;
1334 } XIMPreeditDrawCallbackStruct;
1335 
1336 typedef enum {
1337     XIMIsInvisible, /* Disable caret feedback */
1338     XIMIsPrimary,   /* UI defined caret feedback */
1339     XIMIsSecondary  /* UI defined caret feedback */
1340 } XIMCaretStyle;
1341 
1342 typedef struct _XIMPreeditCaretCallbackStruct {
1343     int position;        /* Caret offset within pre-edit string */
1344     XIMCaretDirection direction; /* Caret moves direction */
1345     XIMCaretStyle style;     /* Feedback of the caret */
1346 } XIMPreeditCaretCallbackStruct;
1347 
1348 typedef enum {
1349     XIMTextType,
1350     XIMBitmapType
1351 } XIMStatusDataType;
1352 
1353 typedef struct _XIMStatusDrawCallbackStruct {
1354     XIMStatusDataType type;
1355     union {
1356     XIMText *text;
1357     Pixmap  bitmap;
1358     } data;
1359 } XIMStatusDrawCallbackStruct;
1360 
1361 typedef struct _XIMHotKeyTrigger {
1362     KeySym   keysym;
1363     int      modifier;
1364     int      modifier_mask;
1365 } XIMHotKeyTrigger;
1366 
1367 typedef struct _XIMHotKeyTriggers {
1368     int          num_hot_key;
1369     XIMHotKeyTrigger    *key;
1370 } XIMHotKeyTriggers;
1371 
1372 typedef unsigned long    XIMHotKeyState;
1373 
1374 #define XIMHotKeyStateON    (0x0001L)
1375 #define XIMHotKeyStateOFF   (0x0002L)
1376 
1377 typedef struct {
1378     unsigned short count_values;
1379     char **supported_values;
1380 } XIMValuesList;
1381 
1382 _XFUNCPROTOBEGIN
1383 
1384 #if defined(WIN32) && !defined(_XLIBINT_)
1385 #define _Xdebug (*_Xdebug_p)
1386 #endif
1387 
1388 extern int _Xdebug;
1389 
1390 extern XFontStruct *XLoadQueryFont(
1391     Display*        /* display */,
1392     _Xconst char*   /* name */
1393 );
1394 
1395 extern XFontStruct *XQueryFont(
1396     Display*        /* display */,
1397     XID         /* font_ID */
1398 );
1399 
1400 
1401 extern XTimeCoord *XGetMotionEvents(
1402     Display*        /* display */,
1403     Window      /* w */,
1404     Time        /* start */,
1405     Time        /* stop */,
1406     int*        /* nevents_return */
1407 );
1408 
1409 extern XModifierKeymap *XDeleteModifiermapEntry(
1410     XModifierKeymap*    /* modmap */,
1411 #if NeedWidePrototypes
1412     unsigned int    /* keycode_entry */,
1413 #else
1414     KeyCode     /* keycode_entry */,
1415 #endif
1416     int         /* modifier */
1417 );
1418 
1419 extern XModifierKeymap  *XGetModifierMapping(
1420     Display*        /* display */
1421 );
1422 
1423 extern XModifierKeymap  *XInsertModifiermapEntry(
1424     XModifierKeymap*    /* modmap */,
1425 #if NeedWidePrototypes
1426     unsigned int    /* keycode_entry */,
1427 #else
1428     KeyCode     /* keycode_entry */,
1429 #endif
1430     int         /* modifier */
1431 );
1432 
1433 extern XModifierKeymap *XNewModifiermap(
1434     int         /* max_keys_per_mod */
1435 );
1436 
1437 extern XImage *XCreateImage(
1438     Display*        /* display */,
1439     Visual*     /* visual */,
1440     unsigned int    /* depth */,
1441     int         /* format */,
1442     int         /* offset */,
1443     char*       /* data */,
1444     unsigned int    /* width */,
1445     unsigned int    /* height */,
1446     int         /* bitmap_pad */,
1447     int         /* bytes_per_line */
1448 );
1449 extern Status XInitImage(
1450     XImage*     /* image */
1451 );
1452 extern XImage *XGetImage(
1453     Display*        /* display */,
1454     Drawable        /* d */,
1455     int         /* x */,
1456     int         /* y */,
1457     unsigned int    /* width */,
1458     unsigned int    /* height */,
1459     unsigned long   /* plane_mask */,
1460     int         /* format */
1461 );
1462 extern XImage *XGetSubImage(
1463     Display*        /* display */,
1464     Drawable        /* d */,
1465     int         /* x */,
1466     int         /* y */,
1467     unsigned int    /* width */,
1468     unsigned int    /* height */,
1469     unsigned long   /* plane_mask */,
1470     int         /* format */,
1471     XImage*     /* dest_image */,
1472     int         /* dest_x */,
1473     int         /* dest_y */
1474 );
1475 
1476 /*
1477  * X function declarations.
1478  */
1479 extern Display *XOpenDisplay(
1480     _Xconst char*   /* display_name */
1481 );
1482 
1483 extern void XrmInitialize(
1484     void
1485 );
1486 
1487 extern char *XFetchBytes(
1488     Display*        /* display */,
1489     int*        /* nbytes_return */
1490 );
1491 extern char *XFetchBuffer(
1492     Display*        /* display */,
1493     int*        /* nbytes_return */,
1494     int         /* buffer */
1495 );
1496 extern char *XGetAtomName(
1497     Display*        /* display */,
1498     Atom        /* atom */
1499 );
1500 extern Status XGetAtomNames(
1501     Display*        /* dpy */,
1502     Atom*       /* atoms */,
1503     int         /* count */,
1504     char**      /* names_return */
1505 );
1506 extern char *XGetDefault(
1507     Display*        /* display */,
1508     _Xconst char*   /* program */,
1509     _Xconst char*   /* option */
1510 );
1511 extern char *XDisplayName(
1512     _Xconst char*   /* string */
1513 );
1514 extern char *XKeysymToString(
1515     KeySym      /* keysym */
1516 );
1517 
1518 extern int (*XSynchronize(
1519     Display*        /* display */,
1520     Bool        /* onoff */
1521 ))(
1522     Display*        /* display */
1523 );
1524 extern int (*XSetAfterFunction(
1525     Display*        /* display */,
1526     int (*) (
1527          Display*   /* display */
1528             )       /* procedure */
1529 ))(
1530     Display*        /* display */
1531 );
1532 extern Atom XInternAtom(
1533     Display*        /* display */,
1534     _Xconst char*   /* atom_name */,
1535     Bool        /* only_if_exists */
1536 );
1537 extern Status XInternAtoms(
1538     Display*        /* dpy */,
1539     char**      /* names */,
1540     int         /* count */,
1541     Bool        /* onlyIfExists */,
1542     Atom*       /* atoms_return */
1543 );
1544 extern Colormap XCopyColormapAndFree(
1545     Display*        /* display */,
1546     Colormap        /* colormap */
1547 );
1548 extern Colormap XCreateColormap(
1549     Display*        /* display */,
1550     Window      /* w */,
1551     Visual*     /* visual */,
1552     int         /* alloc */
1553 );
1554 extern Cursor XCreatePixmapCursor(
1555     Display*        /* display */,
1556     Pixmap      /* source */,
1557     Pixmap      /* mask */,
1558     XColor*     /* foreground_color */,
1559     XColor*     /* background_color */,
1560     unsigned int    /* x */,
1561     unsigned int    /* y */
1562 );
1563 extern Cursor XCreateGlyphCursor(
1564     Display*        /* display */,
1565     Font        /* source_font */,
1566     Font        /* mask_font */,
1567     unsigned int    /* source_char */,
1568     unsigned int    /* mask_char */,
1569     XColor _Xconst *    /* foreground_color */,
1570     XColor _Xconst *    /* background_color */
1571 );
1572 extern Cursor XCreateFontCursor(
1573     Display*        /* display */,
1574     unsigned int    /* shape */
1575 );
1576 extern Font XLoadFont(
1577     Display*        /* display */,
1578     _Xconst char*   /* name */
1579 );
1580 extern GC XCreateGC(
1581     Display*        /* display */,
1582     Drawable        /* d */,
1583     unsigned long   /* valuemask */,
1584     XGCValues*      /* values */
1585 );
1586 extern GContext XGContextFromGC(
1587     GC          /* gc */
1588 );
1589 extern void XFlushGC(
1590     Display*        /* display */,
1591     GC          /* gc */
1592 );
1593 extern Pixmap XCreatePixmap(
1594     Display*        /* display */,
1595     Drawable        /* d */,
1596     unsigned int    /* width */,
1597     unsigned int    /* height */,
1598     unsigned int    /* depth */
1599 );
1600 extern Pixmap XCreateBitmapFromData(
1601     Display*        /* display */,
1602     Drawable        /* d */,
1603     _Xconst char*   /* data */,
1604     unsigned int    /* width */,
1605     unsigned int    /* height */
1606 );
1607 extern Pixmap XCreatePixmapFromBitmapData(
1608     Display*        /* display */,
1609     Drawable        /* d */,
1610     char*       /* data */,
1611     unsigned int    /* width */,
1612     unsigned int    /* height */,
1613     unsigned long   /* fg */,
1614     unsigned long   /* bg */,
1615     unsigned int    /* depth */
1616 );
1617 extern Window XCreateSimpleWindow(
1618     Display*        /* display */,
1619     Window      /* parent */,
1620     int         /* x */,
1621     int         /* y */,
1622     unsigned int    /* width */,
1623     unsigned int    /* height */,
1624     unsigned int    /* border_width */,
1625     unsigned long   /* border */,
1626     unsigned long   /* background */
1627 );
1628 extern Window XGetSelectionOwner(
1629     Display*        /* display */,
1630     Atom        /* selection */
1631 );
1632 extern Window XCreateWindow(
1633     Display*        /* display */,
1634     Window      /* parent */,
1635     int         /* x */,
1636     int         /* y */,
1637     unsigned int    /* width */,
1638     unsigned int    /* height */,
1639     unsigned int    /* border_width */,
1640     int         /* depth */,
1641     unsigned int    /* class */,
1642     Visual*     /* visual */,
1643     unsigned long   /* valuemask */,
1644     XSetWindowAttributes*   /* attributes */
1645 );
1646 extern Colormap *XListInstalledColormaps(
1647     Display*        /* display */,
1648     Window      /* w */,
1649     int*        /* num_return */
1650 );
1651 extern char **XListFonts(
1652     Display*        /* display */,
1653     _Xconst char*   /* pattern */,
1654     int         /* maxnames */,
1655     int*        /* actual_count_return */
1656 );
1657 extern char **XListFontsWithInfo(
1658     Display*        /* display */,
1659     _Xconst char*   /* pattern */,
1660     int         /* maxnames */,
1661     int*        /* count_return */,
1662     XFontStruct**   /* info_return */
1663 );
1664 extern char **XGetFontPath(
1665     Display*        /* display */,
1666     int*        /* npaths_return */
1667 );
1668 extern char **XListExtensions(
1669     Display*        /* display */,
1670     int*        /* nextensions_return */
1671 );
1672 extern Atom *XListProperties(
1673     Display*        /* display */,
1674     Window      /* w */,
1675     int*        /* num_prop_return */
1676 );
1677 extern XHostAddress *XListHosts(
1678     Display*        /* display */,
1679     int*        /* nhosts_return */,
1680     Bool*       /* state_return */
1681 );
1682 _X_DEPRECATED
1683 extern KeySym XKeycodeToKeysym(
1684     Display*        /* display */,
1685 #if NeedWidePrototypes
1686     unsigned int    /* keycode */,
1687 #else
1688     KeyCode     /* keycode */,
1689 #endif
1690     int         /* index */
1691 );
1692 extern KeySym XLookupKeysym(
1693     XKeyEvent*      /* key_event */,
1694     int         /* index */
1695 );
1696 extern KeySym *XGetKeyboardMapping(
1697     Display*        /* display */,
1698 #if NeedWidePrototypes
1699     unsigned int    /* first_keycode */,
1700 #else
1701     KeyCode     /* first_keycode */,
1702 #endif
1703     int         /* keycode_count */,
1704     int*        /* keysyms_per_keycode_return */
1705 );
1706 extern KeySym XStringToKeysym(
1707     _Xconst char*   /* string */
1708 );
1709 extern long XMaxRequestSize(
1710     Display*        /* display */
1711 );
1712 extern long XExtendedMaxRequestSize(
1713     Display*        /* display */
1714 );
1715 extern char *XResourceManagerString(
1716     Display*        /* display */
1717 );
1718 extern char *XScreenResourceString(
1719     Screen*     /* screen */
1720 );
1721 extern unsigned long XDisplayMotionBufferSize(
1722     Display*        /* display */
1723 );
1724 extern VisualID XVisualIDFromVisual(
1725     Visual*     /* visual */
1726 );
1727 
1728 /* multithread routines */
1729 
1730 extern Status XInitThreads(
1731     void
1732 );
1733 
1734 extern Status XFreeThreads(
1735     void
1736 );
1737 
1738 extern void XLockDisplay(
1739     Display*        /* display */
1740 );
1741 
1742 extern void XUnlockDisplay(
1743     Display*        /* display */
1744 );
1745 
1746 /* routines for dealing with extensions */
1747 
1748 extern XExtCodes *XInitExtension(
1749     Display*        /* display */,
1750     _Xconst char*   /* name */
1751 );
1752 
1753 extern XExtCodes *XAddExtension(
1754     Display*        /* display */
1755 );
1756 extern XExtData *XFindOnExtensionList(
1757     XExtData**      /* structure */,
1758     int         /* number */
1759 );
1760 extern XExtData **XEHeadOfExtensionList(
1761     XEDataObject    /* object */
1762 );
1763 
1764 /* these are routines for which there are also macros */
1765 extern Window XRootWindow(
1766     Display*        /* display */,
1767     int         /* screen_number */
1768 );
1769 extern Window XDefaultRootWindow(
1770     Display*        /* display */
1771 );
1772 extern Window XRootWindowOfScreen(
1773     Screen*     /* screen */
1774 );
1775 extern Visual *XDefaultVisual(
1776     Display*        /* display */,
1777     int         /* screen_number */
1778 );
1779 extern Visual *XDefaultVisualOfScreen(
1780     Screen*     /* screen */
1781 );
1782 extern GC XDefaultGC(
1783     Display*        /* display */,
1784     int         /* screen_number */
1785 );
1786 extern GC XDefaultGCOfScreen(
1787     Screen*     /* screen */
1788 );
1789 extern unsigned long XBlackPixel(
1790     Display*        /* display */,
1791     int         /* screen_number */
1792 );
1793 extern unsigned long XWhitePixel(
1794     Display*        /* display */,
1795     int         /* screen_number */
1796 );
1797 extern unsigned long XAllPlanes(
1798     void
1799 );
1800 extern unsigned long XBlackPixelOfScreen(
1801     Screen*     /* screen */
1802 );
1803 extern unsigned long XWhitePixelOfScreen(
1804     Screen*     /* screen */
1805 );
1806 extern unsigned long XNextRequest(
1807     Display*        /* display */
1808 );
1809 extern unsigned long XLastKnownRequestProcessed(
1810     Display*        /* display */
1811 );
1812 extern char *XServerVendor(
1813     Display*        /* display */
1814 );
1815 extern char *XDisplayString(
1816     Display*        /* display */
1817 );
1818 extern Colormap XDefaultColormap(
1819     Display*        /* display */,
1820     int         /* screen_number */
1821 );
1822 extern Colormap XDefaultColormapOfScreen(
1823     Screen*     /* screen */
1824 );
1825 extern Display *XDisplayOfScreen(
1826     Screen*     /* screen */
1827 );
1828 extern Screen *XScreenOfDisplay(
1829     Display*        /* display */,
1830     int         /* screen_number */
1831 );
1832 extern Screen *XDefaultScreenOfDisplay(
1833     Display*        /* display */
1834 );
1835 extern long XEventMaskOfScreen(
1836     Screen*     /* screen */
1837 );
1838 
1839 extern int XScreenNumberOfScreen(
1840     Screen*     /* screen */
1841 );
1842 
1843 typedef int (*XErrorHandler) (      /* WARNING, this type not in Xlib spec */
1844     Display*        /* display */,
1845     XErrorEvent*    /* error_event */
1846 );
1847 
1848 extern XErrorHandler XSetErrorHandler (
1849     XErrorHandler   /* handler */
1850 );
1851 
1852 
1853 typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
1854     Display*        /* display */
1855 );
1856 
1857 extern XIOErrorHandler XSetIOErrorHandler (
1858     XIOErrorHandler /* handler */
1859 );
1860 
1861 typedef void (*XIOErrorExitHandler) ( /* WARNING, this type not in Xlib spec */
1862     Display*,       /* display */
1863     void*       /* user_data */
1864 );
1865 
1866 extern void XSetIOErrorExitHandler (
1867     Display*,           /* display */
1868     XIOErrorExitHandler,    /* handler */
1869     void*           /* user_data */
1870 );
1871 
1872 extern XPixmapFormatValues *XListPixmapFormats(
1873     Display*        /* display */,
1874     int*        /* count_return */
1875 );
1876 extern int *XListDepths(
1877     Display*        /* display */,
1878     int         /* screen_number */,
1879     int*        /* count_return */
1880 );
1881 
1882 /* ICCCM routines for things that don't require special include files; */
1883 /* other declarations are given in Xutil.h                             */
1884 extern Status XReconfigureWMWindow(
1885     Display*        /* display */,
1886     Window      /* w */,
1887     int         /* screen_number */,
1888     unsigned int    /* mask */,
1889     XWindowChanges* /* changes */
1890 );
1891 
1892 extern Status XGetWMProtocols(
1893     Display*        /* display */,
1894     Window      /* w */,
1895     Atom**      /* protocols_return */,
1896     int*        /* count_return */
1897 );
1898 extern Status XSetWMProtocols(
1899     Display*        /* display */,
1900     Window      /* w */,
1901     Atom*       /* protocols */,
1902     int         /* count */
1903 );
1904 extern Status XIconifyWindow(
1905     Display*        /* display */,
1906     Window      /* w */,
1907     int         /* screen_number */
1908 );
1909 extern Status XWithdrawWindow(
1910     Display*        /* display */,
1911     Window      /* w */,
1912     int         /* screen_number */
1913 );
1914 extern Status XGetCommand(
1915     Display*        /* display */,
1916     Window      /* w */,
1917     char***     /* argv_return */,
1918     int*        /* argc_return */
1919 );
1920 extern Status XGetWMColormapWindows(
1921     Display*        /* display */,
1922     Window      /* w */,
1923     Window**        /* windows_return */,
1924     int*        /* count_return */
1925 );
1926 extern Status XSetWMColormapWindows(
1927     Display*        /* display */,
1928     Window      /* w */,
1929     Window*     /* colormap_windows */,
1930     int         /* count */
1931 );
1932 extern void XFreeStringList(
1933     char**      /* list */
1934 );
1935 extern int XSetTransientForHint(
1936     Display*        /* display */,
1937     Window      /* w */,
1938     Window      /* prop_window */
1939 );
1940 
1941 /* The following are given in alphabetical order */
1942 
1943 extern int XActivateScreenSaver(
1944     Display*        /* display */
1945 );
1946 
1947 extern int XAddHost(
1948     Display*        /* display */,
1949     XHostAddress*   /* host */
1950 );
1951 
1952 extern int XAddHosts(
1953     Display*        /* display */,
1954     XHostAddress*   /* hosts */,
1955     int         /* num_hosts */
1956 );
1957 
1958 extern int XAddToExtensionList(
1959     struct _XExtData**  /* structure */,
1960     XExtData*       /* ext_data */
1961 );
1962 
1963 extern int XAddToSaveSet(
1964     Display*        /* display */,
1965     Window      /* w */
1966 );
1967 
1968 extern Status XAllocColor(
1969     Display*        /* display */,
1970     Colormap        /* colormap */,
1971     XColor*     /* screen_in_out */
1972 );
1973 
1974 extern Status XAllocColorCells(
1975     Display*        /* display */,
1976     Colormap        /* colormap */,
1977     Bool            /* contig */,
1978     unsigned long*  /* plane_masks_return */,
1979     unsigned int    /* nplanes */,
1980     unsigned long*  /* pixels_return */,
1981     unsigned int    /* npixels */
1982 );
1983 
1984 extern Status XAllocColorPlanes(
1985     Display*        /* display */,
1986     Colormap        /* colormap */,
1987     Bool        /* contig */,
1988     unsigned long*  /* pixels_return */,
1989     int         /* ncolors */,
1990     int         /* nreds */,
1991     int         /* ngreens */,
1992     int         /* nblues */,
1993     unsigned long*  /* rmask_return */,
1994     unsigned long*  /* gmask_return */,
1995     unsigned long*  /* bmask_return */
1996 );
1997 
1998 extern Status XAllocNamedColor(
1999     Display*        /* display */,
2000     Colormap        /* colormap */,
2001     _Xconst char*   /* color_name */,
2002     XColor*     /* screen_def_return */,
2003     XColor*     /* exact_def_return */
2004 );
2005 
2006 extern int XAllowEvents(
2007     Display*        /* display */,
2008     int         /* event_mode */,
2009     Time        /* time */
2010 );
2011 
2012 extern int XAutoRepeatOff(
2013     Display*        /* display */
2014 );
2015 
2016 extern int XAutoRepeatOn(
2017     Display*        /* display */
2018 );
2019 
2020 extern int XBell(
2021     Display*        /* display */,
2022     int         /* percent */
2023 );
2024 
2025 extern int XBitmapBitOrder(
2026     Display*        /* display */
2027 );
2028 
2029 extern int XBitmapPad(
2030     Display*        /* display */
2031 );
2032 
2033 extern int XBitmapUnit(
2034     Display*        /* display */
2035 );
2036 
2037 extern int XCellsOfScreen(
2038     Screen*     /* screen */
2039 );
2040 
2041 extern int XChangeActivePointerGrab(
2042     Display*        /* display */,
2043     unsigned int    /* event_mask */,
2044     Cursor      /* cursor */,
2045     Time        /* time */
2046 );
2047 
2048 extern int XChangeGC(
2049     Display*        /* display */,
2050     GC          /* gc */,
2051     unsigned long   /* valuemask */,
2052     XGCValues*      /* values */
2053 );
2054 
2055 extern int XChangeKeyboardControl(
2056     Display*        /* display */,
2057     unsigned long   /* value_mask */,
2058     XKeyboardControl*   /* values */
2059 );
2060 
2061 extern int XChangeKeyboardMapping(
2062     Display*        /* display */,
2063     int         /* first_keycode */,
2064     int         /* keysyms_per_keycode */,
2065     KeySym*     /* keysyms */,
2066     int         /* num_codes */
2067 );
2068 
2069 extern int XChangePointerControl(
2070     Display*        /* display */,
2071     Bool        /* do_accel */,
2072     Bool        /* do_threshold */,
2073     int         /* accel_numerator */,
2074     int         /* accel_denominator */,
2075     int         /* threshold */
2076 );
2077 
2078 extern int XChangeProperty(
2079     Display*        /* display */,
2080     Window      /* w */,
2081     Atom        /* property */,
2082     Atom        /* type */,
2083     int         /* format */,
2084     int         /* mode */,
2085     _Xconst unsigned char*  /* data */,
2086     int         /* nelements */
2087 );
2088 
2089 extern int XChangeSaveSet(
2090     Display*        /* display */,
2091     Window      /* w */,
2092     int         /* change_mode */
2093 );
2094 
2095 extern int XChangeWindowAttributes(
2096     Display*        /* display */,
2097     Window      /* w */,
2098     unsigned long   /* valuemask */,
2099     XSetWindowAttributes* /* attributes */
2100 );
2101 
2102 extern Bool XCheckIfEvent(
2103     Display*        /* display */,
2104     XEvent*     /* event_return */,
2105     Bool (*) (
2106            Display*         /* display */,
2107                XEvent*          /* event */,
2108                XPointer         /* arg */
2109              )      /* predicate */,
2110     XPointer        /* arg */
2111 );
2112 
2113 extern Bool XCheckMaskEvent(
2114     Display*        /* display */,
2115     long        /* event_mask */,
2116     XEvent*     /* event_return */
2117 );
2118 
2119 extern Bool XCheckTypedEvent(
2120     Display*        /* display */,
2121     int         /* event_type */,
2122     XEvent*     /* event_return */
2123 );
2124 
2125 extern Bool XCheckTypedWindowEvent(
2126     Display*        /* display */,
2127     Window      /* w */,
2128     int         /* event_type */,
2129     XEvent*     /* event_return */
2130 );
2131 
2132 extern Bool XCheckWindowEvent(
2133     Display*        /* display */,
2134     Window      /* w */,
2135     long        /* event_mask */,
2136     XEvent*     /* event_return */
2137 );
2138 
2139 extern int XCirculateSubwindows(
2140     Display*        /* display */,
2141     Window      /* w */,
2142     int         /* direction */
2143 );
2144 
2145 extern int XCirculateSubwindowsDown(
2146     Display*        /* display */,
2147     Window      /* w */
2148 );
2149 
2150 extern int XCirculateSubwindowsUp(
2151     Display*        /* display */,
2152     Window      /* w */
2153 );
2154 
2155 extern int XClearArea(
2156     Display*        /* display */,
2157     Window      /* w */,
2158     int         /* x */,
2159     int         /* y */,
2160     unsigned int    /* width */,
2161     unsigned int    /* height */,
2162     Bool        /* exposures */
2163 );
2164 
2165 extern int XClearWindow(
2166     Display*        /* display */,
2167     Window      /* w */
2168 );
2169 
2170 extern int XCloseDisplay(
2171     Display*        /* display */
2172 );
2173 
2174 extern int XConfigureWindow(
2175     Display*        /* display */,
2176     Window      /* w */,
2177     unsigned int    /* value_mask */,
2178     XWindowChanges* /* values */
2179 );
2180 
2181 extern int XConnectionNumber(
2182     Display*        /* display */
2183 );
2184 
2185 extern int XConvertSelection(
2186     Display*        /* display */,
2187     Atom        /* selection */,
2188     Atom        /* target */,
2189     Atom        /* property */,
2190     Window      /* requestor */,
2191     Time        /* time */
2192 );
2193 
2194 extern int XCopyArea(
2195     Display*        /* display */,
2196     Drawable        /* src */,
2197     Drawable        /* dest */,
2198     GC          /* gc */,
2199     int         /* src_x */,
2200     int         /* src_y */,
2201     unsigned int    /* width */,
2202     unsigned int    /* height */,
2203     int         /* dest_x */,
2204     int         /* dest_y */
2205 );
2206 
2207 extern int XCopyGC(
2208     Display*        /* display */,
2209     GC          /* src */,
2210     unsigned long   /* valuemask */,
2211     GC          /* dest */
2212 );
2213 
2214 extern int XCopyPlane(
2215     Display*        /* display */,
2216     Drawable        /* src */,
2217     Drawable        /* dest */,
2218     GC          /* gc */,
2219     int         /* src_x */,
2220     int         /* src_y */,
2221     unsigned int    /* width */,
2222     unsigned int    /* height */,
2223     int         /* dest_x */,
2224     int         /* dest_y */,
2225     unsigned long   /* plane */
2226 );
2227 
2228 extern int XDefaultDepth(
2229     Display*        /* display */,
2230     int         /* screen_number */
2231 );
2232 
2233 extern int XDefaultDepthOfScreen(
2234     Screen*     /* screen */
2235 );
2236 
2237 extern int XDefaultScreen(
2238     Display*        /* display */
2239 );
2240 
2241 extern int XDefineCursor(
2242     Display*        /* display */,
2243     Window      /* w */,
2244     Cursor      /* cursor */
2245 );
2246 
2247 extern int XDeleteProperty(
2248     Display*        /* display */,
2249     Window      /* w */,
2250     Atom        /* property */
2251 );
2252 
2253 extern int XDestroyWindow(
2254     Display*        /* display */,
2255     Window      /* w */
2256 );
2257 
2258 extern int XDestroySubwindows(
2259     Display*        /* display */,
2260     Window      /* w */
2261 );
2262 
2263 extern int XDoesBackingStore(
2264     Screen*     /* screen */
2265 );
2266 
2267 extern Bool XDoesSaveUnders(
2268     Screen*     /* screen */
2269 );
2270 
2271 extern int XDisableAccessControl(
2272     Display*        /* display */
2273 );
2274 
2275 
2276 extern int XDisplayCells(
2277     Display*        /* display */,
2278     int         /* screen_number */
2279 );
2280 
2281 extern int XDisplayHeight(
2282     Display*        /* display */,
2283     int         /* screen_number */
2284 );
2285 
2286 extern int XDisplayHeightMM(
2287     Display*        /* display */,
2288     int         /* screen_number */
2289 );
2290 
2291 extern int XDisplayKeycodes(
2292     Display*        /* display */,
2293     int*        /* min_keycodes_return */,
2294     int*        /* max_keycodes_return */
2295 );
2296 
2297 extern int XDisplayPlanes(
2298     Display*        /* display */,
2299     int         /* screen_number */
2300 );
2301 
2302 extern int XDisplayWidth(
2303     Display*        /* display */,
2304     int         /* screen_number */
2305 );
2306 
2307 extern int XDisplayWidthMM(
2308     Display*        /* display */,
2309     int         /* screen_number */
2310 );
2311 
2312 extern int XDrawArc(
2313     Display*        /* display */,
2314     Drawable        /* d */,
2315     GC          /* gc */,
2316     int         /* x */,
2317     int         /* y */,
2318     unsigned int    /* width */,
2319     unsigned int    /* height */,
2320     int         /* angle1 */,
2321     int         /* angle2 */
2322 );
2323 
2324 extern int XDrawArcs(
2325     Display*        /* display */,
2326     Drawable        /* d */,
2327     GC          /* gc */,
2328     XArc*       /* arcs */,
2329     int         /* narcs */
2330 );
2331 
2332 extern int XDrawImageString(
2333     Display*        /* display */,
2334     Drawable        /* d */,
2335     GC          /* gc */,
2336     int         /* x */,
2337     int         /* y */,
2338     _Xconst char*   /* string */,
2339     int         /* length */
2340 );
2341 
2342 extern int XDrawImageString16(
2343     Display*        /* display */,
2344     Drawable        /* d */,
2345     GC          /* gc */,
2346     int         /* x */,
2347     int         /* y */,
2348     _Xconst XChar2b*    /* string */,
2349     int         /* length */
2350 );
2351 
2352 extern int XDrawLine(
2353     Display*        /* display */,
2354     Drawable        /* d */,
2355     GC          /* gc */,
2356     int         /* x1 */,
2357     int         /* y1 */,
2358     int         /* x2 */,
2359     int         /* y2 */
2360 );
2361 
2362 extern int XDrawLines(
2363     Display*        /* display */,
2364     Drawable        /* d */,
2365     GC          /* gc */,
2366     XPoint*     /* points */,
2367     int         /* npoints */,
2368     int         /* mode */
2369 );
2370 
2371 extern int XDrawPoint(
2372     Display*        /* display */,
2373     Drawable        /* d */,
2374     GC          /* gc */,
2375     int         /* x */,
2376     int         /* y */
2377 );
2378 
2379 extern int XDrawPoints(
2380     Display*        /* display */,
2381     Drawable        /* d */,
2382     GC          /* gc */,
2383     XPoint*     /* points */,
2384     int         /* npoints */,
2385     int         /* mode */
2386 );
2387 
2388 extern int XDrawRectangle(
2389     Display*        /* display */,
2390     Drawable        /* d */,
2391     GC          /* gc */,
2392     int         /* x */,
2393     int         /* y */,
2394     unsigned int    /* width */,
2395     unsigned int    /* height */
2396 );
2397 
2398 extern int XDrawRectangles(
2399     Display*        /* display */,
2400     Drawable        /* d */,
2401     GC          /* gc */,
2402     XRectangle*     /* rectangles */,
2403     int         /* nrectangles */
2404 );
2405 
2406 extern int XDrawSegments(
2407     Display*        /* display */,
2408     Drawable        /* d */,
2409     GC          /* gc */,
2410     XSegment*       /* segments */,
2411     int         /* nsegments */
2412 );
2413 
2414 extern int XDrawString(
2415     Display*        /* display */,
2416     Drawable        /* d */,
2417     GC          /* gc */,
2418     int         /* x */,
2419     int         /* y */,
2420     _Xconst char*   /* string */,
2421     int         /* length */
2422 );
2423 
2424 extern int XDrawString16(
2425     Display*        /* display */,
2426     Drawable        /* d */,
2427     GC          /* gc */,
2428     int         /* x */,
2429     int         /* y */,
2430     _Xconst XChar2b*    /* string */,
2431     int         /* length */
2432 );
2433 
2434 extern int XDrawText(
2435     Display*        /* display */,
2436     Drawable        /* d */,
2437     GC          /* gc */,
2438     int         /* x */,
2439     int         /* y */,
2440     XTextItem*      /* items */,
2441     int         /* nitems */
2442 );
2443 
2444 extern int XDrawText16(
2445     Display*        /* display */,
2446     Drawable        /* d */,
2447     GC          /* gc */,
2448     int         /* x */,
2449     int         /* y */,
2450     XTextItem16*    /* items */,
2451     int         /* nitems */
2452 );
2453 
2454 extern int XEnableAccessControl(
2455     Display*        /* display */
2456 );
2457 
2458 extern int XEventsQueued(
2459     Display*        /* display */,
2460     int         /* mode */
2461 );
2462 
2463 extern Status XFetchName(
2464     Display*        /* display */,
2465     Window      /* w */,
2466     char**      /* window_name_return */
2467 );
2468 
2469 extern int XFillArc(
2470     Display*        /* display */,
2471     Drawable        /* d */,
2472     GC          /* gc */,
2473     int         /* x */,
2474     int         /* y */,
2475     unsigned int    /* width */,
2476     unsigned int    /* height */,
2477     int         /* angle1 */,
2478     int         /* angle2 */
2479 );
2480 
2481 extern int XFillArcs(
2482     Display*        /* display */,
2483     Drawable        /* d */,
2484     GC          /* gc */,
2485     XArc*       /* arcs */,
2486     int         /* narcs */
2487 );
2488 
2489 extern int XFillPolygon(
2490     Display*        /* display */,
2491     Drawable        /* d */,
2492     GC          /* gc */,
2493     XPoint*     /* points */,
2494     int         /* npoints */,
2495     int         /* shape */,
2496     int         /* mode */
2497 );
2498 
2499 extern int XFillRectangle(
2500     Display*        /* display */,
2501     Drawable        /* d */,
2502     GC          /* gc */,
2503     int         /* x */,
2504     int         /* y */,
2505     unsigned int    /* width */,
2506     unsigned int    /* height */
2507 );
2508 
2509 extern int XFillRectangles(
2510     Display*        /* display */,
2511     Drawable        /* d */,
2512     GC          /* gc */,
2513     XRectangle*     /* rectangles */,
2514     int         /* nrectangles */
2515 );
2516 
2517 extern int XFlush(
2518     Display*        /* display */
2519 );
2520 
2521 extern int XForceScreenSaver(
2522     Display*        /* display */,
2523     int         /* mode */
2524 );
2525 
2526 extern int XFree(
2527     void*       /* data */
2528 );
2529 
2530 extern int XFreeColormap(
2531     Display*        /* display */,
2532     Colormap        /* colormap */
2533 );
2534 
2535 extern int XFreeColors(
2536     Display*        /* display */,
2537     Colormap        /* colormap */,
2538     unsigned long*  /* pixels */,
2539     int         /* npixels */,
2540     unsigned long   /* planes */
2541 );
2542 
2543 extern int XFreeCursor(
2544     Display*        /* display */,
2545     Cursor      /* cursor */
2546 );
2547 
2548 extern int XFreeExtensionList(
2549     char**      /* list */
2550 );
2551 
2552 extern int XFreeFont(
2553     Display*        /* display */,
2554     XFontStruct*    /* font_struct */
2555 );
2556 
2557 extern int XFreeFontInfo(
2558     char**      /* names */,
2559     XFontStruct*    /* free_info */,
2560     int         /* actual_count */
2561 );
2562 
2563 extern int XFreeFontNames(
2564     char**      /* list */
2565 );
2566 
2567 extern int XFreeFontPath(
2568     char**      /* list */
2569 );
2570 
2571 extern int XFreeGC(
2572     Display*        /* display */,
2573     GC          /* gc */
2574 );
2575 
2576 extern int XFreeModifiermap(
2577     XModifierKeymap*    /* modmap */
2578 );
2579 
2580 extern int XFreePixmap(
2581     Display*        /* display */,
2582     Pixmap      /* pixmap */
2583 );
2584 
2585 extern int XGeometry(
2586     Display*        /* display */,
2587     int         /* screen */,
2588     _Xconst char*   /* position */,
2589     _Xconst char*   /* default_position */,
2590     unsigned int    /* bwidth */,
2591     unsigned int    /* fwidth */,
2592     unsigned int    /* fheight */,
2593     int         /* xadder */,
2594     int         /* yadder */,
2595     int*        /* x_return */,
2596     int*        /* y_return */,
2597     int*        /* width_return */,
2598     int*        /* height_return */
2599 );
2600 
2601 extern int XGetErrorDatabaseText(
2602     Display*        /* display */,
2603     _Xconst char*   /* name */,
2604     _Xconst char*   /* message */,
2605     _Xconst char*   /* default_string */,
2606     char*       /* buffer_return */,
2607     int         /* length */
2608 );
2609 
2610 extern int XGetErrorText(
2611     Display*        /* display */,
2612     int         /* code */,
2613     char*       /* buffer_return */,
2614     int         /* length */
2615 );
2616 
2617 extern Bool XGetFontProperty(
2618     XFontStruct*    /* font_struct */,
2619     Atom        /* atom */,
2620     unsigned long*  /* value_return */
2621 );
2622 
2623 extern Status XGetGCValues(
2624     Display*        /* display */,
2625     GC          /* gc */,
2626     unsigned long   /* valuemask */,
2627     XGCValues*      /* values_return */
2628 );
2629 
2630 extern Status XGetGeometry(
2631     Display*        /* display */,
2632     Drawable        /* d */,
2633     Window*     /* root_return */,
2634     int*        /* x_return */,
2635     int*        /* y_return */,
2636     unsigned int*   /* width_return */,
2637     unsigned int*   /* height_return */,
2638     unsigned int*   /* border_width_return */,
2639     unsigned int*   /* depth_return */
2640 );
2641 
2642 extern Status XGetIconName(
2643     Display*        /* display */,
2644     Window      /* w */,
2645     char**      /* icon_name_return */
2646 );
2647 
2648 extern int XGetInputFocus(
2649     Display*        /* display */,
2650     Window*     /* focus_return */,
2651     int*        /* revert_to_return */
2652 );
2653 
2654 extern int XGetKeyboardControl(
2655     Display*        /* display */,
2656     XKeyboardState* /* values_return */
2657 );
2658 
2659 extern int XGetPointerControl(
2660     Display*        /* display */,
2661     int*        /* accel_numerator_return */,
2662     int*        /* accel_denominator_return */,
2663     int*        /* threshold_return */
2664 );
2665 
2666 extern int XGetPointerMapping(
2667     Display*        /* display */,
2668     unsigned char*  /* map_return */,
2669     int         /* nmap */
2670 );
2671 
2672 extern int XGetScreenSaver(
2673     Display*        /* display */,
2674     int*        /* timeout_return */,
2675     int*        /* interval_return */,
2676     int*        /* prefer_blanking_return */,
2677     int*        /* allow_exposures_return */
2678 );
2679 
2680 extern Status XGetTransientForHint(
2681     Display*        /* display */,
2682     Window      /* w */,
2683     Window*     /* prop_window_return */
2684 );
2685 
2686 extern int XGetWindowProperty(
2687     Display*        /* display */,
2688     Window      /* w */,
2689     Atom        /* property */,
2690     long        /* long_offset */,
2691     long        /* long_length */,
2692     Bool        /* delete */,
2693     Atom        /* req_type */,
2694     Atom*       /* actual_type_return */,
2695     int*        /* actual_format_return */,
2696     unsigned long*  /* nitems_return */,
2697     unsigned long*  /* bytes_after_return */,
2698     unsigned char** /* prop_return */
2699 );
2700 
2701 extern Status XGetWindowAttributes(
2702     Display*        /* display */,
2703     Window      /* w */,
2704     XWindowAttributes*  /* window_attributes_return */
2705 );
2706 
2707 extern int XGrabButton(
2708     Display*        /* display */,
2709     unsigned int    /* button */,
2710     unsigned int    /* modifiers */,
2711     Window      /* grab_window */,
2712     Bool        /* owner_events */,
2713     unsigned int    /* event_mask */,
2714     int         /* pointer_mode */,
2715     int         /* keyboard_mode */,
2716     Window      /* confine_to */,
2717     Cursor      /* cursor */
2718 );
2719 
2720 extern int XGrabKey(
2721     Display*        /* display */,
2722     int         /* keycode */,
2723     unsigned int    /* modifiers */,
2724     Window      /* grab_window */,
2725     Bool        /* owner_events */,
2726     int         /* pointer_mode */,
2727     int         /* keyboard_mode */
2728 );
2729 
2730 extern int XGrabKeyboard(
2731     Display*        /* display */,
2732     Window      /* grab_window */,
2733     Bool        /* owner_events */,
2734     int         /* pointer_mode */,
2735     int         /* keyboard_mode */,
2736     Time        /* time */
2737 );
2738 
2739 extern int XGrabPointer(
2740     Display*        /* display */,
2741     Window      /* grab_window */,
2742     Bool        /* owner_events */,
2743     unsigned int    /* event_mask */,
2744     int         /* pointer_mode */,
2745     int         /* keyboard_mode */,
2746     Window      /* confine_to */,
2747     Cursor      /* cursor */,
2748     Time        /* time */
2749 );
2750 
2751 extern int XGrabServer(
2752     Display*        /* display */
2753 );
2754 
2755 extern int XHeightMMOfScreen(
2756     Screen*     /* screen */
2757 );
2758 
2759 extern int XHeightOfScreen(
2760     Screen*     /* screen */
2761 );
2762 
2763 extern int XIfEvent(
2764     Display*        /* display */,
2765     XEvent*     /* event_return */,
2766     Bool (*) (
2767            Display*         /* display */,
2768                XEvent*          /* event */,
2769                XPointer         /* arg */
2770              )      /* predicate */,
2771     XPointer        /* arg */
2772 );
2773 
2774 extern int XImageByteOrder(
2775     Display*        /* display */
2776 );
2777 
2778 extern int XInstallColormap(
2779     Display*        /* display */,
2780     Colormap        /* colormap */
2781 );
2782 
2783 extern KeyCode XKeysymToKeycode(
2784     Display*        /* display */,
2785     KeySym      /* keysym */
2786 );
2787 
2788 extern int XKillClient(
2789     Display*        /* display */,
2790     XID         /* resource */
2791 );
2792 
2793 extern Status XLookupColor(
2794     Display*        /* display */,
2795     Colormap        /* colormap */,
2796     _Xconst char*   /* color_name */,
2797     XColor*     /* exact_def_return */,
2798     XColor*     /* screen_def_return */
2799 );
2800 
2801 extern int XLowerWindow(
2802     Display*        /* display */,
2803     Window      /* w */
2804 );
2805 
2806 extern int XMapRaised(
2807     Display*        /* display */,
2808     Window      /* w */
2809 );
2810 
2811 extern int XMapSubwindows(
2812     Display*        /* display */,
2813     Window      /* w */
2814 );
2815 
2816 extern int XMapWindow(
2817     Display*        /* display */,
2818     Window      /* w */
2819 );
2820 
2821 extern int XMaskEvent(
2822     Display*        /* display */,
2823     long        /* event_mask */,
2824     XEvent*     /* event_return */
2825 );
2826 
2827 extern int XMaxCmapsOfScreen(
2828     Screen*     /* screen */
2829 );
2830 
2831 extern int XMinCmapsOfScreen(
2832     Screen*     /* screen */
2833 );
2834 
2835 extern int XMoveResizeWindow(
2836     Display*        /* display */,
2837     Window      /* w */,
2838     int         /* x */,
2839     int         /* y */,
2840     unsigned int    /* width */,
2841     unsigned int    /* height */
2842 );
2843 
2844 extern int XMoveWindow(
2845     Display*        /* display */,
2846     Window      /* w */,
2847     int         /* x */,
2848     int         /* y */
2849 );
2850 
2851 extern int XNextEvent(
2852     Display*        /* display */,
2853     XEvent*     /* event_return */
2854 );
2855 
2856 extern int XNoOp(
2857     Display*        /* display */
2858 );
2859 
2860 extern Status XParseColor(
2861     Display*        /* display */,
2862     Colormap        /* colormap */,
2863     _Xconst char*   /* spec */,
2864     XColor*     /* exact_def_return */
2865 );
2866 
2867 extern int XParseGeometry(
2868     _Xconst char*   /* parsestring */,
2869     int*        /* x_return */,
2870     int*        /* y_return */,
2871     unsigned int*   /* width_return */,
2872     unsigned int*   /* height_return */
2873 );
2874 
2875 extern int XPeekEvent(
2876     Display*        /* display */,
2877     XEvent*     /* event_return */
2878 );
2879 
2880 extern int XPeekIfEvent(
2881     Display*        /* display */,
2882     XEvent*     /* event_return */,
2883     Bool (*) (
2884            Display*     /* display */,
2885                XEvent*      /* event */,
2886                XPointer     /* arg */
2887              )      /* predicate */,
2888     XPointer        /* arg */
2889 );
2890 
2891 extern int XPending(
2892     Display*        /* display */
2893 );
2894 
2895 extern int XPlanesOfScreen(
2896     Screen*     /* screen */
2897 );
2898 
2899 extern int XProtocolRevision(
2900     Display*        /* display */
2901 );
2902 
2903 extern int XProtocolVersion(
2904     Display*        /* display */
2905 );
2906 
2907 
2908 extern int XPutBackEvent(
2909     Display*        /* display */,
2910     XEvent*     /* event */
2911 );
2912 
2913 extern int XPutImage(
2914     Display*        /* display */,
2915     Drawable        /* d */,
2916     GC          /* gc */,
2917     XImage*     /* image */,
2918     int         /* src_x */,
2919     int         /* src_y */,
2920     int         /* dest_x */,
2921     int         /* dest_y */,
2922     unsigned int    /* width */,
2923     unsigned int    /* height */
2924 );
2925 
2926 extern int XQLength(
2927     Display*        /* display */
2928 );
2929 
2930 extern Status XQueryBestCursor(
2931     Display*        /* display */,
2932     Drawable        /* d */,
2933     unsigned int        /* width */,
2934     unsigned int    /* height */,
2935     unsigned int*   /* width_return */,
2936     unsigned int*   /* height_return */
2937 );
2938 
2939 extern Status XQueryBestSize(
2940     Display*        /* display */,
2941     int         /* class */,
2942     Drawable        /* which_screen */,
2943     unsigned int    /* width */,
2944     unsigned int    /* height */,
2945     unsigned int*   /* width_return */,
2946     unsigned int*   /* height_return */
2947 );
2948 
2949 extern Status XQueryBestStipple(
2950     Display*        /* display */,
2951     Drawable        /* which_screen */,
2952     unsigned int    /* width */,
2953     unsigned int    /* height */,
2954     unsigned int*   /* width_return */,
2955     unsigned int*   /* height_return */
2956 );
2957 
2958 extern Status XQueryBestTile(
2959     Display*        /* display */,
2960     Drawable        /* which_screen */,
2961     unsigned int    /* width */,
2962     unsigned int    /* height */,
2963     unsigned int*   /* width_return */,
2964     unsigned int*   /* height_return */
2965 );
2966 
2967 extern int XQueryColor(
2968     Display*        /* display */,
2969     Colormap        /* colormap */,
2970     XColor*     /* def_in_out */
2971 );
2972 
2973 extern int XQueryColors(
2974     Display*        /* display */,
2975     Colormap        /* colormap */,
2976     XColor*     /* defs_in_out */,
2977     int         /* ncolors */
2978 );
2979 
2980 extern Bool XQueryExtension(
2981     Display*        /* display */,
2982     _Xconst char*   /* name */,
2983     int*        /* major_opcode_return */,
2984     int*        /* first_event_return */,
2985     int*        /* first_error_return */
2986 );
2987 
2988 extern int XQueryKeymap(
2989     Display*        /* display */,
2990     char [32]       /* keys_return */
2991 );
2992 
2993 extern Bool XQueryPointer(
2994     Display*        /* display */,
2995     Window      /* w */,
2996     Window*     /* root_return */,
2997     Window*     /* child_return */,
2998     int*        /* root_x_return */,
2999     int*        /* root_y_return */,
3000     int*        /* win_x_return */,
3001     int*        /* win_y_return */,
3002     unsigned int*       /* mask_return */
3003 );
3004 
3005 extern int XQueryTextExtents(
3006     Display*        /* display */,
3007     XID         /* font_ID */,
3008     _Xconst char*   /* string */,
3009     int         /* nchars */,
3010     int*        /* direction_return */,
3011     int*        /* font_ascent_return */,
3012     int*        /* font_descent_return */,
3013     XCharStruct*    /* overall_return */
3014 );
3015 
3016 extern int XQueryTextExtents16(
3017     Display*        /* display */,
3018     XID         /* font_ID */,
3019     _Xconst XChar2b*    /* string */,
3020     int         /* nchars */,
3021     int*        /* direction_return */,
3022     int*        /* font_ascent_return */,
3023     int*        /* font_descent_return */,
3024     XCharStruct*    /* overall_return */
3025 );
3026 
3027 extern Status XQueryTree(
3028     Display*        /* display */,
3029     Window      /* w */,
3030     Window*     /* root_return */,
3031     Window*     /* parent_return */,
3032     Window**        /* children_return */,
3033     unsigned int*   /* nchildren_return */
3034 );
3035 
3036 extern int XRaiseWindow(
3037     Display*        /* display */,
3038     Window      /* w */
3039 );
3040 
3041 extern int XReadBitmapFile(
3042     Display*        /* display */,
3043     Drawable        /* d */,
3044     _Xconst char*   /* filename */,
3045     unsigned int*   /* width_return */,
3046     unsigned int*   /* height_return */,
3047     Pixmap*     /* bitmap_return */,
3048     int*        /* x_hot_return */,
3049     int*        /* y_hot_return */
3050 );
3051 
3052 extern int XReadBitmapFileData(
3053     _Xconst char*   /* filename */,
3054     unsigned int*   /* width_return */,
3055     unsigned int*   /* height_return */,
3056     unsigned char** /* data_return */,
3057     int*        /* x_hot_return */,
3058     int*        /* y_hot_return */
3059 );
3060 
3061 extern int XRebindKeysym(
3062     Display*        /* display */,
3063     KeySym      /* keysym */,
3064     KeySym*     /* list */,
3065     int         /* mod_count */,
3066     _Xconst unsigned char*  /* string */,
3067     int         /* bytes_string */
3068 );
3069 
3070 extern int XRecolorCursor(
3071     Display*        /* display */,
3072     Cursor      /* cursor */,
3073     XColor*     /* foreground_color */,
3074     XColor*     /* background_color */
3075 );
3076 
3077 extern int XRefreshKeyboardMapping(
3078     XMappingEvent*  /* event_map */
3079 );
3080 
3081 extern int XRemoveFromSaveSet(
3082     Display*        /* display */,
3083     Window      /* w */
3084 );
3085 
3086 extern int XRemoveHost(
3087     Display*        /* display */,
3088     XHostAddress*   /* host */
3089 );
3090 
3091 extern int XRemoveHosts(
3092     Display*        /* display */,
3093     XHostAddress*   /* hosts */,
3094     int         /* num_hosts */
3095 );
3096 
3097 extern int XReparentWindow(
3098     Display*        /* display */,
3099     Window      /* w */,
3100     Window      /* parent */,
3101     int         /* x */,
3102     int         /* y */
3103 );
3104 
3105 extern int XResetScreenSaver(
3106     Display*        /* display */
3107 );
3108 
3109 extern int XResizeWindow(
3110     Display*        /* display */,
3111     Window      /* w */,
3112     unsigned int    /* width */,
3113     unsigned int    /* height */
3114 );
3115 
3116 extern int XRestackWindows(
3117     Display*        /* display */,
3118     Window*     /* windows */,
3119     int         /* nwindows */
3120 );
3121 
3122 extern int XRotateBuffers(
3123     Display*        /* display */,
3124     int         /* rotate */
3125 );
3126 
3127 extern int XRotateWindowProperties(
3128     Display*        /* display */,
3129     Window      /* w */,
3130     Atom*       /* properties */,
3131     int         /* num_prop */,
3132     int         /* npositions */
3133 );
3134 
3135 extern int XScreenCount(
3136     Display*        /* display */
3137 );
3138 
3139 extern int XSelectInput(
3140     Display*        /* display */,
3141     Window      /* w */,
3142     long        /* event_mask */
3143 );
3144 
3145 extern Status XSendEvent(
3146     Display*        /* display */,
3147     Window      /* w */,
3148     Bool        /* propagate */,
3149     long        /* event_mask */,
3150     XEvent*     /* event_send */
3151 );
3152 
3153 extern int XSetAccessControl(
3154     Display*        /* display */,
3155     int         /* mode */
3156 );
3157 
3158 extern int XSetArcMode(
3159     Display*        /* display */,
3160     GC          /* gc */,
3161     int         /* arc_mode */
3162 );
3163 
3164 extern int XSetBackground(
3165     Display*        /* display */,
3166     GC          /* gc */,
3167     unsigned long   /* background */
3168 );
3169 
3170 extern int XSetClipMask(
3171     Display*        /* display */,
3172     GC          /* gc */,
3173     Pixmap      /* pixmap */
3174 );
3175 
3176 extern int XSetClipOrigin(
3177     Display*        /* display */,
3178     GC          /* gc */,
3179     int         /* clip_x_origin */,
3180     int         /* clip_y_origin */
3181 );
3182 
3183 extern int XSetClipRectangles(
3184     Display*        /* display */,
3185     GC          /* gc */,
3186     int         /* clip_x_origin */,
3187     int         /* clip_y_origin */,
3188     XRectangle*     /* rectangles */,
3189     int         /* n */,
3190     int         /* ordering */
3191 );
3192 
3193 extern int XSetCloseDownMode(
3194     Display*        /* display */,
3195     int         /* close_mode */
3196 );
3197 
3198 extern int XSetCommand(
3199     Display*        /* display */,
3200     Window      /* w */,
3201     char**      /* argv */,
3202     int         /* argc */
3203 );
3204 
3205 extern int XSetDashes(
3206     Display*        /* display */,
3207     GC          /* gc */,
3208     int         /* dash_offset */,
3209     _Xconst char*   /* dash_list */,
3210     int         /* n */
3211 );
3212 
3213 extern int XSetFillRule(
3214     Display*        /* display */,
3215     GC          /* gc */,
3216     int         /* fill_rule */
3217 );
3218 
3219 extern int XSetFillStyle(
3220     Display*        /* display */,
3221     GC          /* gc */,
3222     int         /* fill_style */
3223 );
3224 
3225 extern int XSetFont(
3226     Display*        /* display */,
3227     GC          /* gc */,
3228     Font        /* font */
3229 );
3230 
3231 extern int XSetFontPath(
3232     Display*        /* display */,
3233     char**      /* directories */,
3234     int         /* ndirs */
3235 );
3236 
3237 extern int XSetForeground(
3238     Display*        /* display */,
3239     GC          /* gc */,
3240     unsigned long   /* foreground */
3241 );
3242 
3243 extern int XSetFunction(
3244     Display*        /* display */,
3245     GC          /* gc */,
3246     int         /* function */
3247 );
3248 
3249 extern int XSetGraphicsExposures(
3250     Display*        /* display */,
3251     GC          /* gc */,
3252     Bool        /* graphics_exposures */
3253 );
3254 
3255 extern int XSetIconName(
3256     Display*        /* display */,
3257     Window      /* w */,
3258     _Xconst char*   /* icon_name */
3259 );
3260 
3261 extern int XSetInputFocus(
3262     Display*        /* display */,
3263     Window      /* focus */,
3264     int         /* revert_to */,
3265     Time        /* time */
3266 );
3267 
3268 extern int XSetLineAttributes(
3269     Display*        /* display */,
3270     GC          /* gc */,
3271     unsigned int    /* line_width */,
3272     int         /* line_style */,
3273     int         /* cap_style */,
3274     int         /* join_style */
3275 );
3276 
3277 extern int XSetModifierMapping(
3278     Display*        /* display */,
3279     XModifierKeymap*    /* modmap */
3280 );
3281 
3282 extern int XSetPlaneMask(
3283     Display*        /* display */,
3284     GC          /* gc */,
3285     unsigned long   /* plane_mask */
3286 );
3287 
3288 extern int XSetPointerMapping(
3289     Display*        /* display */,
3290     _Xconst unsigned char*  /* map */,
3291     int         /* nmap */
3292 );
3293 
3294 extern int XSetScreenSaver(
3295     Display*        /* display */,
3296     int         /* timeout */,
3297     int         /* interval */,
3298     int         /* prefer_blanking */,
3299     int         /* allow_exposures */
3300 );
3301 
3302 extern int XSetSelectionOwner(
3303     Display*        /* display */,
3304     Atom            /* selection */,
3305     Window      /* owner */,
3306     Time        /* time */
3307 );
3308 
3309 extern int XSetState(
3310     Display*        /* display */,
3311     GC          /* gc */,
3312     unsigned long   /* foreground */,
3313     unsigned long   /* background */,
3314     int         /* function */,
3315     unsigned long   /* plane_mask */
3316 );
3317 
3318 extern int XSetStipple(
3319     Display*        /* display */,
3320     GC          /* gc */,
3321     Pixmap      /* stipple */
3322 );
3323 
3324 extern int XSetSubwindowMode(
3325     Display*        /* display */,
3326     GC          /* gc */,
3327     int         /* subwindow_mode */
3328 );
3329 
3330 extern int XSetTSOrigin(
3331     Display*        /* display */,
3332     GC          /* gc */,
3333     int         /* ts_x_origin */,
3334     int         /* ts_y_origin */
3335 );
3336 
3337 extern int XSetTile(
3338     Display*        /* display */,
3339     GC          /* gc */,
3340     Pixmap      /* tile */
3341 );
3342 
3343 extern int XSetWindowBackground(
3344     Display*        /* display */,
3345     Window      /* w */,
3346     unsigned long   /* background_pixel */
3347 );
3348 
3349 extern int XSetWindowBackgroundPixmap(
3350     Display*        /* display */,
3351     Window      /* w */,
3352     Pixmap      /* background_pixmap */
3353 );
3354 
3355 extern int XSetWindowBorder(
3356     Display*        /* display */,
3357     Window      /* w */,
3358     unsigned long   /* border_pixel */
3359 );
3360 
3361 extern int XSetWindowBorderPixmap(
3362     Display*        /* display */,
3363     Window      /* w */,
3364     Pixmap      /* border_pixmap */
3365 );
3366 
3367 extern int XSetWindowBorderWidth(
3368     Display*        /* display */,
3369     Window      /* w */,
3370     unsigned int    /* width */
3371 );
3372 
3373 extern int XSetWindowColormap(
3374     Display*        /* display */,
3375     Window      /* w */,
3376     Colormap        /* colormap */
3377 );
3378 
3379 extern int XStoreBuffer(
3380     Display*        /* display */,
3381     _Xconst char*   /* bytes */,
3382     int         /* nbytes */,
3383     int         /* buffer */
3384 );
3385 
3386 extern int XStoreBytes(
3387     Display*        /* display */,
3388     _Xconst char*   /* bytes */,
3389     int         /* nbytes */
3390 );
3391 
3392 extern int XStoreColor(
3393     Display*        /* display */,
3394     Colormap        /* colormap */,
3395     XColor*     /* color */
3396 );
3397 
3398 extern int XStoreColors(
3399     Display*        /* display */,
3400     Colormap        /* colormap */,
3401     XColor*     /* color */,
3402     int         /* ncolors */
3403 );
3404 
3405 extern int XStoreName(
3406     Display*        /* display */,
3407     Window      /* w */,
3408     _Xconst char*   /* window_name */
3409 );
3410 
3411 extern int XStoreNamedColor(
3412     Display*        /* display */,
3413     Colormap        /* colormap */,
3414     _Xconst char*   /* color */,
3415     unsigned long   /* pixel */,
3416     int         /* flags */
3417 );
3418 
3419 extern int XSync(
3420     Display*        /* display */,
3421     Bool        /* discard */
3422 );
3423 
3424 extern int XTextExtents(
3425     XFontStruct*    /* font_struct */,
3426     _Xconst char*   /* string */,
3427     int         /* nchars */,
3428     int*        /* direction_return */,
3429     int*        /* font_ascent_return */,
3430     int*        /* font_descent_return */,
3431     XCharStruct*    /* overall_return */
3432 );
3433 
3434 extern int XTextExtents16(
3435     XFontStruct*    /* font_struct */,
3436     _Xconst XChar2b*    /* string */,
3437     int         /* nchars */,
3438     int*        /* direction_return */,
3439     int*        /* font_ascent_return */,
3440     int*        /* font_descent_return */,
3441     XCharStruct*    /* overall_return */
3442 );
3443 
3444 extern int XTextWidth(
3445     XFontStruct*    /* font_struct */,
3446     _Xconst char*   /* string */,
3447     int         /* count */
3448 );
3449 
3450 extern int XTextWidth16(
3451     XFontStruct*    /* font_struct */,
3452     _Xconst XChar2b*    /* string */,
3453     int         /* count */
3454 );
3455 
3456 extern Bool XTranslateCoordinates(
3457     Display*        /* display */,
3458     Window      /* src_w */,
3459     Window      /* dest_w */,
3460     int         /* src_x */,
3461     int         /* src_y */,
3462     int*        /* dest_x_return */,
3463     int*        /* dest_y_return */,
3464     Window*     /* child_return */
3465 );
3466 
3467 extern int XUndefineCursor(
3468     Display*        /* display */,
3469     Window      /* w */
3470 );
3471 
3472 extern int XUngrabButton(
3473     Display*        /* display */,
3474     unsigned int    /* button */,
3475     unsigned int    /* modifiers */,
3476     Window      /* grab_window */
3477 );
3478 
3479 extern int XUngrabKey(
3480     Display*        /* display */,
3481     int         /* keycode */,
3482     unsigned int    /* modifiers */,
3483     Window      /* grab_window */
3484 );
3485 
3486 extern int XUngrabKeyboard(
3487     Display*        /* display */,
3488     Time        /* time */
3489 );
3490 
3491 extern int XUngrabPointer(
3492     Display*        /* display */,
3493     Time        /* time */
3494 );
3495 
3496 extern int XUngrabServer(
3497     Display*        /* display */
3498 );
3499 
3500 extern int XUninstallColormap(
3501     Display*        /* display */,
3502     Colormap        /* colormap */
3503 );
3504 
3505 extern int XUnloadFont(
3506     Display*        /* display */,
3507     Font        /* font */
3508 );
3509 
3510 extern int XUnmapSubwindows(
3511     Display*        /* display */,
3512     Window      /* w */
3513 );
3514 
3515 extern int XUnmapWindow(
3516     Display*        /* display */,
3517     Window      /* w */
3518 );
3519 
3520 extern int XVendorRelease(
3521     Display*        /* display */
3522 );
3523 
3524 extern int XWarpPointer(
3525     Display*        /* display */,
3526     Window      /* src_w */,
3527     Window      /* dest_w */,
3528     int         /* src_x */,
3529     int         /* src_y */,
3530     unsigned int    /* src_width */,
3531     unsigned int    /* src_height */,
3532     int         /* dest_x */,
3533     int         /* dest_y */
3534 );
3535 
3536 extern int XWidthMMOfScreen(
3537     Screen*     /* screen */
3538 );
3539 
3540 extern int XWidthOfScreen(
3541     Screen*     /* screen */
3542 );
3543 
3544 extern int XWindowEvent(
3545     Display*        /* display */,
3546     Window      /* w */,
3547     long        /* event_mask */,
3548     XEvent*     /* event_return */
3549 );
3550 
3551 extern int XWriteBitmapFile(
3552     Display*        /* display */,
3553     _Xconst char*   /* filename */,
3554     Pixmap      /* bitmap */,
3555     unsigned int    /* width */,
3556     unsigned int    /* height */,
3557     int         /* x_hot */,
3558     int         /* y_hot */
3559 );
3560 
3561 extern Bool XSupportsLocale (void);
3562 
3563 extern char *XSetLocaleModifiers(
3564     const char*     /* modifier_list */
3565 );
3566 
3567 extern XOM XOpenOM(
3568     Display*            /* display */,
3569     struct _XrmHashBucketRec*   /* rdb */,
3570     _Xconst char*       /* res_name */,
3571     _Xconst char*       /* res_class */
3572 );
3573 
3574 extern Status XCloseOM(
3575     XOM         /* om */
3576 );
3577 
3578 extern char *XSetOMValues(
3579     XOM         /* om */,
3580     ...
3581 ) _X_SENTINEL(0);
3582 
3583 extern char *XGetOMValues(
3584     XOM         /* om */,
3585     ...
3586 ) _X_SENTINEL(0);
3587 
3588 extern Display *XDisplayOfOM(
3589     XOM         /* om */
3590 );
3591 
3592 extern char *XLocaleOfOM(
3593     XOM         /* om */
3594 );
3595 
3596 extern XOC XCreateOC(
3597     XOM         /* om */,
3598     ...
3599 ) _X_SENTINEL(0);
3600 
3601 extern void XDestroyOC(
3602     XOC         /* oc */
3603 );
3604 
3605 extern XOM XOMOfOC(
3606     XOC         /* oc */
3607 );
3608 
3609 extern char *XSetOCValues(
3610     XOC         /* oc */,
3611     ...
3612 ) _X_SENTINEL(0);
3613 
3614 extern char *XGetOCValues(
3615     XOC         /* oc */,
3616     ...
3617 ) _X_SENTINEL(0);
3618 
3619 extern XFontSet XCreateFontSet(
3620     Display*        /* display */,
3621     _Xconst char*   /* base_font_name_list */,
3622     char***     /* missing_charset_list */,
3623     int*        /* missing_charset_count */,
3624     char**      /* def_string */
3625 );
3626 
3627 extern void XFreeFontSet(
3628     Display*        /* display */,
3629     XFontSet        /* font_set */
3630 );
3631 
3632 extern int XFontsOfFontSet(
3633     XFontSet        /* font_set */,
3634     XFontStruct***  /* font_struct_list */,
3635     char***     /* font_name_list */
3636 );
3637 
3638 extern char *XBaseFontNameListOfFontSet(
3639     XFontSet        /* font_set */
3640 );
3641 
3642 extern char *XLocaleOfFontSet(
3643     XFontSet        /* font_set */
3644 );
3645 
3646 extern Bool XContextDependentDrawing(
3647     XFontSet        /* font_set */
3648 );
3649 
3650 extern Bool XDirectionalDependentDrawing(
3651     XFontSet        /* font_set */
3652 );
3653 
3654 extern Bool XContextualDrawing(
3655     XFontSet        /* font_set */
3656 );
3657 
3658 extern XFontSetExtents *XExtentsOfFontSet(
3659     XFontSet        /* font_set */
3660 );
3661 
3662 extern int XmbTextEscapement(
3663     XFontSet        /* font_set */,
3664     _Xconst char*   /* text */,
3665     int         /* bytes_text */
3666 );
3667 
3668 extern int XwcTextEscapement(
3669     XFontSet        /* font_set */,
3670     _Xconst wchar_t*    /* text */,
3671     int         /* num_wchars */
3672 );
3673 
3674 extern int Xutf8TextEscapement(
3675     XFontSet        /* font_set */,
3676     _Xconst char*   /* text */,
3677     int         /* bytes_text */
3678 );
3679 
3680 extern int XmbTextExtents(
3681     XFontSet        /* font_set */,
3682     _Xconst char*   /* text */,
3683     int         /* bytes_text */,
3684     XRectangle*     /* overall_ink_return */,
3685     XRectangle*     /* overall_logical_return */
3686 );
3687 
3688 extern int XwcTextExtents(
3689     XFontSet        /* font_set */,
3690     _Xconst wchar_t*    /* text */,
3691     int         /* num_wchars */,
3692     XRectangle*     /* overall_ink_return */,
3693     XRectangle*     /* overall_logical_return */
3694 );
3695 
3696 extern int Xutf8TextExtents(
3697     XFontSet        /* font_set */,
3698     _Xconst char*   /* text */,
3699     int         /* bytes_text */,
3700     XRectangle*     /* overall_ink_return */,
3701     XRectangle*     /* overall_logical_return */
3702 );
3703 
3704 extern Status XmbTextPerCharExtents(
3705     XFontSet        /* font_set */,
3706     _Xconst char*   /* text */,
3707     int         /* bytes_text */,
3708     XRectangle*     /* ink_extents_buffer */,
3709     XRectangle*     /* logical_extents_buffer */,
3710     int         /* buffer_size */,
3711     int*        /* num_chars */,
3712     XRectangle*     /* overall_ink_return */,
3713     XRectangle*     /* overall_logical_return */
3714 );
3715 
3716 extern Status XwcTextPerCharExtents(
3717     XFontSet        /* font_set */,
3718     _Xconst wchar_t*    /* text */,
3719     int         /* num_wchars */,
3720     XRectangle*     /* ink_extents_buffer */,
3721     XRectangle*     /* logical_extents_buffer */,
3722     int         /* buffer_size */,
3723     int*        /* num_chars */,
3724     XRectangle*     /* overall_ink_return */,
3725     XRectangle*     /* overall_logical_return */
3726 );
3727 
3728 extern Status Xutf8TextPerCharExtents(
3729     XFontSet        /* font_set */,
3730     _Xconst char*   /* text */,
3731     int         /* bytes_text */,
3732     XRectangle*     /* ink_extents_buffer */,
3733     XRectangle*     /* logical_extents_buffer */,
3734     int         /* buffer_size */,
3735     int*        /* num_chars */,
3736     XRectangle*     /* overall_ink_return */,
3737     XRectangle*     /* overall_logical_return */
3738 );
3739 
3740 extern void XmbDrawText(
3741     Display*        /* display */,
3742     Drawable        /* d */,
3743     GC          /* gc */,
3744     int         /* x */,
3745     int         /* y */,
3746     XmbTextItem*    /* text_items */,
3747     int         /* nitems */
3748 );
3749 
3750 extern void XwcDrawText(
3751     Display*        /* display */,
3752     Drawable        /* d */,
3753     GC          /* gc */,
3754     int         /* x */,
3755     int         /* y */,
3756     XwcTextItem*    /* text_items */,
3757     int         /* nitems */
3758 );
3759 
3760 extern void Xutf8DrawText(
3761     Display*        /* display */,
3762     Drawable        /* d */,
3763     GC          /* gc */,
3764     int         /* x */,
3765     int         /* y */,
3766     XmbTextItem*    /* text_items */,
3767     int         /* nitems */
3768 );
3769 
3770 extern void XmbDrawString(
3771     Display*        /* display */,
3772     Drawable        /* d */,
3773     XFontSet        /* font_set */,
3774     GC          /* gc */,
3775     int         /* x */,
3776     int         /* y */,
3777     _Xconst char*   /* text */,
3778     int         /* bytes_text */
3779 );
3780 
3781 extern void XwcDrawString(
3782     Display*        /* display */,
3783     Drawable        /* d */,
3784     XFontSet        /* font_set */,
3785     GC          /* gc */,
3786     int         /* x */,
3787     int         /* y */,
3788     _Xconst wchar_t*    /* text */,
3789     int         /* num_wchars */
3790 );
3791 
3792 extern void Xutf8DrawString(
3793     Display*        /* display */,
3794     Drawable        /* d */,
3795     XFontSet        /* font_set */,
3796     GC          /* gc */,
3797     int         /* x */,
3798     int         /* y */,
3799     _Xconst char*   /* text */,
3800     int         /* bytes_text */
3801 );
3802 
3803 extern void XmbDrawImageString(
3804     Display*        /* display */,
3805     Drawable        /* d */,
3806     XFontSet        /* font_set */,
3807     GC          /* gc */,
3808     int         /* x */,
3809     int         /* y */,
3810     _Xconst char*   /* text */,
3811     int         /* bytes_text */
3812 );
3813 
3814 extern void XwcDrawImageString(
3815     Display*        /* display */,
3816     Drawable        /* d */,
3817     XFontSet        /* font_set */,
3818     GC          /* gc */,
3819     int         /* x */,
3820     int         /* y */,
3821     _Xconst wchar_t*    /* text */,
3822     int         /* num_wchars */
3823 );
3824 
3825 extern void Xutf8DrawImageString(
3826     Display*        /* display */,
3827     Drawable        /* d */,
3828     XFontSet        /* font_set */,
3829     GC          /* gc */,
3830     int         /* x */,
3831     int         /* y */,
3832     _Xconst char*   /* text */,
3833     int         /* bytes_text */
3834 );
3835 
3836 extern XIM XOpenIM(
3837     Display*            /* dpy */,
3838     struct _XrmHashBucketRec*   /* rdb */,
3839     char*           /* res_name */,
3840     char*           /* res_class */
3841 );
3842 
3843 extern Status XCloseIM(
3844     XIM /* im */
3845 );
3846 
3847 extern char *XGetIMValues(
3848     XIM /* im */, ...
3849 ) _X_SENTINEL(0);
3850 
3851 extern char *XSetIMValues(
3852     XIM /* im */, ...
3853 ) _X_SENTINEL(0);
3854 
3855 extern Display *XDisplayOfIM(
3856     XIM /* im */
3857 );
3858 
3859 extern char *XLocaleOfIM(
3860     XIM /* im*/
3861 );
3862 
3863 extern XIC XCreateIC(
3864     XIM /* im */, ...
3865 ) _X_SENTINEL(0);
3866 
3867 extern void XDestroyIC(
3868     XIC /* ic */
3869 );
3870 
3871 extern void XSetICFocus(
3872     XIC /* ic */
3873 );
3874 
3875 extern void XUnsetICFocus(
3876     XIC /* ic */
3877 );
3878 
3879 extern wchar_t *XwcResetIC(
3880     XIC /* ic */
3881 );
3882 
3883 extern char *XmbResetIC(
3884     XIC /* ic */
3885 );
3886 
3887 extern char *Xutf8ResetIC(
3888     XIC /* ic */
3889 );
3890 
3891 extern char *XSetICValues(
3892     XIC /* ic */, ...
3893 ) _X_SENTINEL(0);
3894 
3895 extern char *XGetICValues(
3896     XIC /* ic */, ...
3897 ) _X_SENTINEL(0);
3898 
3899 extern XIM XIMOfIC(
3900     XIC /* ic */
3901 );
3902 
3903 extern Bool XFilterEvent(
3904     XEvent* /* event */,
3905     Window  /* window */
3906 );
3907 
3908 extern int XmbLookupString(
3909     XIC         /* ic */,
3910     XKeyPressedEvent*   /* event */,
3911     char*       /* buffer_return */,
3912     int         /* bytes_buffer */,
3913     KeySym*     /* keysym_return */,
3914     Status*     /* status_return */
3915 );
3916 
3917 extern int XwcLookupString(
3918     XIC         /* ic */,
3919     XKeyPressedEvent*   /* event */,
3920     wchar_t*        /* buffer_return */,
3921     int         /* wchars_buffer */,
3922     KeySym*     /* keysym_return */,
3923     Status*     /* status_return */
3924 );
3925 
3926 extern int Xutf8LookupString(
3927     XIC         /* ic */,
3928     XKeyPressedEvent*   /* event */,
3929     char*       /* buffer_return */,
3930     int         /* bytes_buffer */,
3931     KeySym*     /* keysym_return */,
3932     Status*     /* status_return */
3933 );
3934 
3935 extern XVaNestedList XVaCreateNestedList(
3936     int /*unused*/, ...
3937 ) _X_SENTINEL(0);
3938 
3939 /* internal connections for IMs */
3940 
3941 extern Bool XRegisterIMInstantiateCallback(
3942     Display*            /* dpy */,
3943     struct _XrmHashBucketRec*   /* rdb */,
3944     char*           /* res_name */,
3945     char*           /* res_class */,
3946     XIDProc         /* callback */,
3947     XPointer            /* client_data */
3948 );
3949 
3950 extern Bool XUnregisterIMInstantiateCallback(
3951     Display*            /* dpy */,
3952     struct _XrmHashBucketRec*   /* rdb */,
3953     char*           /* res_name */,
3954     char*           /* res_class */,
3955     XIDProc         /* callback */,
3956     XPointer            /* client_data */
3957 );
3958 
3959 typedef void (*XConnectionWatchProc)(
3960     Display*            /* dpy */,
3961     XPointer            /* client_data */,
3962     int             /* fd */,
3963     Bool            /* opening */,   /* open or close flag */
3964     XPointer*           /* watch_data */ /* open sets, close uses */
3965 );
3966 
3967 
3968 extern Status XInternalConnectionNumbers(
3969     Display*            /* dpy */,
3970     int**           /* fd_return */,
3971     int*            /* count_return */
3972 );
3973 
3974 extern void XProcessInternalConnection(
3975     Display*            /* dpy */,
3976     int             /* fd */
3977 );
3978 
3979 extern Status XAddConnectionWatch(
3980     Display*            /* dpy */,
3981     XConnectionWatchProc    /* callback */,
3982     XPointer            /* client_data */
3983 );
3984 
3985 extern void XRemoveConnectionWatch(
3986     Display*            /* dpy */,
3987     XConnectionWatchProc    /* callback */,
3988     XPointer            /* client_data */
3989 );
3990 
3991 extern void XSetAuthorization(
3992     char *          /* name */,
3993     int             /* namelen */,
3994     char *          /* data */,
3995     int             /* datalen */
3996 );
3997 
3998 extern int _Xmbtowc(
3999     wchar_t *           /* wstr */,
4000     char *          /* str */,
4001     int             /* len */
4002 );
4003 
4004 extern int _Xwctomb(
4005     char *          /* str */,
4006     wchar_t         /* wc */
4007 );
4008 
4009 extern Bool XGetEventData(
4010     Display*            /* dpy */,
4011     XGenericEventCookie*    /* cookie*/
4012 );
4013 
4014 extern void XFreeEventData(
4015     Display*            /* dpy */,
4016     XGenericEventCookie*    /* cookie*/
4017 );
4018 
4019 #ifdef __clang__
4020 #pragma clang diagnostic pop
4021 #endif
4022 
4023 _XFUNCPROTOEND
4024 
4025 #endif /* _X11_XLIB_H_ */