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