Xlib.h revision 0efe039a
161b2299dSmrg/*
21ab64890Smrg
31ab64890SmrgCopyright 1985, 1986, 1987, 1991, 1998  The Open Group
41ab64890Smrg
51ab64890SmrgPermission to use, copy, modify, distribute, and sell this software and its
61ab64890Smrgdocumentation for any purpose is hereby granted without fee, provided that
71ab64890Smrgthe above copyright notice appear in all copies and that both that
81ab64890Smrgcopyright notice and this permission notice appear in supporting
91ab64890Smrgdocumentation.
101ab64890Smrg
111ab64890SmrgThe above copyright notice and this permission notice shall be included in
121ab64890Smrgall copies or substantial portions of the Software.
131ab64890Smrg
141ab64890SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
151ab64890SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
161ab64890SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
171ab64890SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
181ab64890SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
191ab64890SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
201ab64890Smrg
211ab64890SmrgExcept as contained in this notice, the name of The Open Group shall not be
221ab64890Smrgused in advertising or otherwise to promote the sale, use or other dealings
231ab64890Smrgin this Software without prior written authorization from The Open Group.
241ab64890Smrg
251ab64890Smrg*/
261ab64890Smrg
271ab64890Smrg
281ab64890Smrg/*
291ab64890Smrg *	Xlib.h - Header definition and support file for the C subroutine
301ab64890Smrg *	interface library (Xlib) to the X Window System Protocol (V11).
311ab64890Smrg *	Structures and symbols starting with "_" are private to the library.
321ab64890Smrg */
33e9fcaa8aSmrg#ifndef _X11_XLIB_H_
34e9fcaa8aSmrg#define _X11_XLIB_H_
351ab64890Smrg
361ab64890Smrg#define XlibSpecificationRelease 6
371ab64890Smrg
381ab64890Smrg#include <sys/types.h>
391ab64890Smrg
401ab64890Smrg#if defined(__SCO__) || defined(__UNIXWARE__)
411ab64890Smrg#include <stdint.h>
421ab64890Smrg#endif
431ab64890Smrg
441ab64890Smrg#include <X11/X.h>
451ab64890Smrg
461ab64890Smrg/* applications should not depend on these two headers being included! */
471ab64890Smrg#include <X11/Xfuncproto.h>
481ab64890Smrg#include <X11/Xosdefs.h>
491ab64890Smrg
501ab64890Smrg#ifndef X_WCHAR
511ab64890Smrg#include <stddef.h>
521ab64890Smrg#else
531ab64890Smrg#ifdef __UNIXOS2__
541ab64890Smrg#include <stdlib.h>
551ab64890Smrg#else
561ab64890Smrg/* replace this with #include or typedef appropriate for your system */
571ab64890Smrgtypedef unsigned long wchar_t;
581ab64890Smrg#endif
591ab64890Smrg#endif
601ab64890Smrg
611ab64890Smrg
621ab64890Smrgextern int
631ab64890Smrg_Xmblen(
641ab64890Smrg    char *str,
651ab64890Smrg    int len
661ab64890Smrg    );
671ab64890Smrg
681ab64890Smrg/* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in
691ab64890Smrg   November 2000. Its presence is indicated through the following macro. */
701ab64890Smrg#define X_HAVE_UTF8_STRING 1
711ab64890Smrg
72eb411b4bSmrg/* The Xlib structs are full of implicit padding to properly align members.
73eb411b4bSmrg   We can't clean that up without breaking ABI, so tell clang not to bother
74eb411b4bSmrg   complaining about it. */
75eb411b4bSmrg#ifdef __clang__
76eb411b4bSmrg#pragma clang diagnostic push
77eb411b4bSmrg#pragma clang diagnostic ignored "-Wpadded"
78eb411b4bSmrg#endif
79eb411b4bSmrg
801ab64890Smrgtypedef char *XPointer;
811ab64890Smrg
821ab64890Smrg#define Bool int
831ab64890Smrg#define Status int
841ab64890Smrg#define True 1
851ab64890Smrg#define False 0
861ab64890Smrg
871ab64890Smrg#define QueuedAlready 0
881ab64890Smrg#define QueuedAfterReading 1
891ab64890Smrg#define QueuedAfterFlush 2
901ab64890Smrg
912d67cb4fSmrg#define ConnectionNumber(dpy) 	(((_XPrivDisplay)(dpy))->fd)
921ab64890Smrg#define RootWindow(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->root)
932d67cb4fSmrg#define DefaultScreen(dpy) 	(((_XPrivDisplay)(dpy))->default_screen)
941ab64890Smrg#define DefaultRootWindow(dpy) 	(ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
951ab64890Smrg#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
961ab64890Smrg#define DefaultGC(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->default_gc)
971ab64890Smrg#define BlackPixel(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->black_pixel)
981ab64890Smrg#define WhitePixel(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->white_pixel)
991ab64890Smrg#define AllPlanes 		((unsigned long)~0L)
1002d67cb4fSmrg#define QLength(dpy) 		(((_XPrivDisplay)(dpy))->qlen)
1011ab64890Smrg#define DisplayWidth(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->width)
1021ab64890Smrg#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
1031ab64890Smrg#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
1041ab64890Smrg#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
1051ab64890Smrg#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
1061ab64890Smrg#define DisplayCells(dpy, scr) 	(DefaultVisual(dpy,scr)->map_entries)
1072d67cb4fSmrg#define ScreenCount(dpy) 	(((_XPrivDisplay)(dpy))->nscreens)
1082d67cb4fSmrg#define ServerVendor(dpy) 	(((_XPrivDisplay)(dpy))->vendor)
1092d67cb4fSmrg#define ProtocolVersion(dpy) 	(((_XPrivDisplay)(dpy))->proto_major_version)
1102d67cb4fSmrg#define ProtocolRevision(dpy) 	(((_XPrivDisplay)(dpy))->proto_minor_version)
1112d67cb4fSmrg#define VendorRelease(dpy) 	(((_XPrivDisplay)(dpy))->release)
1122d67cb4fSmrg#define DisplayString(dpy) 	(((_XPrivDisplay)(dpy))->display_name)
1131ab64890Smrg#define DefaultDepth(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->root_depth)
1141ab64890Smrg#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
1152d67cb4fSmrg#define BitmapUnit(dpy) 	(((_XPrivDisplay)(dpy))->bitmap_unit)
1162d67cb4fSmrg#define BitmapBitOrder(dpy) 	(((_XPrivDisplay)(dpy))->bitmap_bit_order)
1172d67cb4fSmrg#define BitmapPad(dpy) 		(((_XPrivDisplay)(dpy))->bitmap_pad)
1182d67cb4fSmrg#define ImageByteOrder(dpy) 	(((_XPrivDisplay)(dpy))->byte_order)
1192d67cb4fSmrg#define NextRequest(dpy)	(((_XPrivDisplay)(dpy))->request + 1)
1202d67cb4fSmrg#define LastKnownRequestProcessed(dpy)	(((_XPrivDisplay)(dpy))->last_request_read)
1211ab64890Smrg
1221ab64890Smrg/* macros for screen oriented applications (toolkit) */
1232d67cb4fSmrg#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)(dpy))->screens[scr])
1241ab64890Smrg#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
1251ab64890Smrg#define DisplayOfScreen(s)	((s)->display)
1261ab64890Smrg#define RootWindowOfScreen(s)	((s)->root)
1271ab64890Smrg#define BlackPixelOfScreen(s)	((s)->black_pixel)
1281ab64890Smrg#define WhitePixelOfScreen(s)	((s)->white_pixel)
1291ab64890Smrg#define DefaultColormapOfScreen(s)((s)->cmap)
1301ab64890Smrg#define DefaultDepthOfScreen(s)	((s)->root_depth)
1311ab64890Smrg#define DefaultGCOfScreen(s)	((s)->default_gc)
1321ab64890Smrg#define DefaultVisualOfScreen(s)((s)->root_visual)
1331ab64890Smrg#define WidthOfScreen(s)	((s)->width)
1341ab64890Smrg#define HeightOfScreen(s)	((s)->height)
1351ab64890Smrg#define WidthMMOfScreen(s)	((s)->mwidth)
1361ab64890Smrg#define HeightMMOfScreen(s)	((s)->mheight)
1371ab64890Smrg#define PlanesOfScreen(s)	((s)->root_depth)
1381ab64890Smrg#define CellsOfScreen(s)	(DefaultVisualOfScreen((s))->map_entries)
1391ab64890Smrg#define MinCmapsOfScreen(s)	((s)->min_maps)
1401ab64890Smrg#define MaxCmapsOfScreen(s)	((s)->max_maps)
1411ab64890Smrg#define DoesSaveUnders(s)	((s)->save_unders)
1421ab64890Smrg#define DoesBackingStore(s)	((s)->backing_store)
1431ab64890Smrg#define EventMaskOfScreen(s)	((s)->root_input_mask)
1441ab64890Smrg
1451ab64890Smrg/*
1461ab64890Smrg * Extensions need a way to hang private data on some structures.
1471ab64890Smrg */
1481ab64890Smrgtypedef struct _XExtData {
1491ab64890Smrg	int number;		/* number returned by XRegisterExtension */
1501ab64890Smrg	struct _XExtData *next;	/* next item on list of data for structure */
1511ab64890Smrg	int (*free_private)(	/* called to free private storage */
1521ab64890Smrg	struct _XExtData *extension
1531ab64890Smrg	);
1541ab64890Smrg	XPointer private_data;	/* data private to this extension. */
1551ab64890Smrg} XExtData;
1561ab64890Smrg
1571ab64890Smrg/*
1581ab64890Smrg * This file contains structures used by the extension mechanism.
1591ab64890Smrg */
1601ab64890Smrgtypedef struct {		/* public to extension, cannot be changed */
1611ab64890Smrg	int extension;		/* extension number */
1621ab64890Smrg	int major_opcode;	/* major op-code assigned by server */
1631ab64890Smrg	int first_event;	/* first event number for the extension */
1641ab64890Smrg	int first_error;	/* first error number for the extension */
1651ab64890Smrg} XExtCodes;
1661ab64890Smrg
1671ab64890Smrg/*
1681ab64890Smrg * Data structure for retrieving info about pixmap formats.
1691ab64890Smrg */
1701ab64890Smrg
1711ab64890Smrgtypedef struct {
1721ab64890Smrg    int depth;
1731ab64890Smrg    int bits_per_pixel;
1741ab64890Smrg    int scanline_pad;
1751ab64890Smrg} XPixmapFormatValues;
1761ab64890Smrg
1771ab64890Smrg
1781ab64890Smrg/*
1791ab64890Smrg * Data structure for setting graphics context.
1801ab64890Smrg */
1811ab64890Smrgtypedef struct {
1821ab64890Smrg	int function;		/* logical operation */
1831ab64890Smrg	unsigned long plane_mask;/* plane mask */
1841ab64890Smrg	unsigned long foreground;/* foreground pixel */
1851ab64890Smrg	unsigned long background;/* background pixel */
1861ab64890Smrg	int line_width;		/* line width */
1871ab64890Smrg	int line_style;	 	/* LineSolid, LineOnOffDash, LineDoubleDash */
18861b2299dSmrg	int cap_style;	  	/* CapNotLast, CapButt,
1891ab64890Smrg				   CapRound, CapProjecting */
1901ab64890Smrg	int join_style;	 	/* JoinMiter, JoinRound, JoinBevel */
19161b2299dSmrg	int fill_style;	 	/* FillSolid, FillTiled,
192e9628295Smrg				   FillStippled, FillOpaqueStippled */
1931ab64890Smrg	int fill_rule;	  	/* EvenOddRule, WindingRule */
1941ab64890Smrg	int arc_mode;		/* ArcChord, ArcPieSlice */
1951ab64890Smrg	Pixmap tile;		/* tile pixmap for tiling operations */
196e9628295Smrg	Pixmap stipple;		/* stipple 1 plane pixmap for stippling */
1971ab64890Smrg	int ts_x_origin;	/* offset for tile or stipple operations */
1981ab64890Smrg	int ts_y_origin;
1991ab64890Smrg        Font font;	        /* default text font for text operations */
2001ab64890Smrg	int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
2011ab64890Smrg	Bool graphics_exposures;/* boolean, should exposures be generated */
2021ab64890Smrg	int clip_x_origin;	/* origin for clipping */
2031ab64890Smrg	int clip_y_origin;
2041ab64890Smrg	Pixmap clip_mask;	/* bitmap clipping; other calls for rects */
2051ab64890Smrg	int dash_offset;	/* patterned/dashed line information */
2061ab64890Smrg	char dashes;
2071ab64890Smrg} XGCValues;
2081ab64890Smrg
2091ab64890Smrg/*
2101ab64890Smrg * Graphics context.  The contents of this structure are implementation
2111ab64890Smrg * dependent.  A GC should be treated as opaque by application code.
2121ab64890Smrg */
2131ab64890Smrg
2141ab64890Smrgtypedef struct _XGC
2151ab64890Smrg#ifdef XLIB_ILLEGAL_ACCESS
2161ab64890Smrg{
2171ab64890Smrg    XExtData *ext_data;	/* hook for extension to hang data */
2181ab64890Smrg    GContext gid;	/* protocol ID for graphics context */
2191ab64890Smrg    /* there is more to this structure, but it is private to Xlib */
2201ab64890Smrg}
2211ab64890Smrg#endif
2221ab64890Smrg*GC;
2231ab64890Smrg
2241ab64890Smrg/*
2251ab64890Smrg * Visual structure; contains information about colormapping possible.
2261ab64890Smrg */
2271ab64890Smrgtypedef struct {
2281ab64890Smrg	XExtData *ext_data;	/* hook for extension to hang data */
2291ab64890Smrg	VisualID visualid;	/* visual id of this visual */
2301ab64890Smrg#if defined(__cplusplus) || defined(c_plusplus)
2311ab64890Smrg	int c_class;		/* C++ class of screen (monochrome, etc.) */
2321ab64890Smrg#else
2331ab64890Smrg	int class;		/* class of screen (monochrome, etc.) */
2341ab64890Smrg#endif
2351ab64890Smrg	unsigned long red_mask, green_mask, blue_mask;	/* mask values */
2361ab64890Smrg	int bits_per_rgb;	/* log base 2 of distinct color values */
2371ab64890Smrg	int map_entries;	/* color map entries */
2381ab64890Smrg} Visual;
2391ab64890Smrg
2401ab64890Smrg/*
2411ab64890Smrg * Depth structure; contains information for each possible depth.
24261b2299dSmrg */
2431ab64890Smrgtypedef struct {
2441ab64890Smrg	int depth;		/* this depth (Z) of the depth */
2451ab64890Smrg	int nvisuals;		/* number of Visual types at this depth */
2461ab64890Smrg	Visual *visuals;	/* list of visuals possible at this depth */
2471ab64890Smrg} Depth;
2481ab64890Smrg
2491ab64890Smrg/*
2501ab64890Smrg * Information about the screen.  The contents of this structure are
2511ab64890Smrg * implementation dependent.  A Screen should be treated as opaque
2521ab64890Smrg * by application code.
2531ab64890Smrg */
2541ab64890Smrg
2551ab64890Smrgstruct _XDisplay;		/* Forward declare before use for C++ */
2561ab64890Smrg
2571ab64890Smrgtypedef struct {
2581ab64890Smrg	XExtData *ext_data;	/* hook for extension to hang data */
2591ab64890Smrg	struct _XDisplay *display;/* back pointer to display structure */
2601ab64890Smrg	Window root;		/* Root window id. */
2611ab64890Smrg	int width, height;	/* width and height of screen */
2621ab64890Smrg	int mwidth, mheight;	/* width and height of  in millimeters */
2631ab64890Smrg	int ndepths;		/* number of depths possible */
2641ab64890Smrg	Depth *depths;		/* list of allowable depths on the screen */
2651ab64890Smrg	int root_depth;		/* bits per pixel */
2661ab64890Smrg	Visual *root_visual;	/* root visual */
2671ab64890Smrg	GC default_gc;		/* GC for the root root visual */
2681ab64890Smrg	Colormap cmap;		/* default color map */
2691ab64890Smrg	unsigned long white_pixel;
2701ab64890Smrg	unsigned long black_pixel;	/* White and Black pixel values */
2711ab64890Smrg	int max_maps, min_maps;	/* max and min color maps */
2721ab64890Smrg	int backing_store;	/* Never, WhenMapped, Always */
27361b2299dSmrg	Bool save_unders;
2741ab64890Smrg	long root_input_mask;	/* initial root input mask */
2751ab64890Smrg} Screen;
2761ab64890Smrg
2771ab64890Smrg/*
2781ab64890Smrg * Format structure; describes ZFormat data the screen will understand.
2791ab64890Smrg */
2801ab64890Smrgtypedef struct {
2811ab64890Smrg	XExtData *ext_data;	/* hook for extension to hang data */
2821ab64890Smrg	int depth;		/* depth of this image format */
2831ab64890Smrg	int bits_per_pixel;	/* bits/pixel at this depth */
2841ab64890Smrg	int scanline_pad;	/* scanline must padded to this multiple */
2851ab64890Smrg} ScreenFormat;
2861ab64890Smrg
2871ab64890Smrg/*
2881ab64890Smrg * Data structure for setting window attributes.
2891ab64890Smrg */
2901ab64890Smrgtypedef struct {
2911ab64890Smrg    Pixmap background_pixmap;	/* background or None or ParentRelative */
2921ab64890Smrg    unsigned long background_pixel;	/* background pixel */
2931ab64890Smrg    Pixmap border_pixmap;	/* border of the window */
2941ab64890Smrg    unsigned long border_pixel;	/* border pixel value */
2951ab64890Smrg    int bit_gravity;		/* one of bit gravity values */
2961ab64890Smrg    int win_gravity;		/* one of the window gravity values */
2971ab64890Smrg    int backing_store;		/* NotUseful, WhenMapped, Always */
2989c019ec5Smaya    unsigned long backing_planes;/* planes to be preserved if possible */
2991ab64890Smrg    unsigned long backing_pixel;/* value to use in restoring planes */
3001ab64890Smrg    Bool save_under;		/* should bits under be saved? (popups) */
3011ab64890Smrg    long event_mask;		/* set of events that should be saved */
3021ab64890Smrg    long do_not_propagate_mask;	/* set of events that should not propagate */
3031ab64890Smrg    Bool override_redirect;	/* boolean value for override-redirect */
3041ab64890Smrg    Colormap colormap;		/* color map to be associated with window */
3051ab64890Smrg    Cursor cursor;		/* cursor to be displayed (or None) */
3061ab64890Smrg} XSetWindowAttributes;
3071ab64890Smrg
3081ab64890Smrgtypedef struct {
3091ab64890Smrg    int x, y;			/* location of window */
3101ab64890Smrg    int width, height;		/* width and height of window */
3111ab64890Smrg    int border_width;		/* border width of window */
3121ab64890Smrg    int depth;          	/* depth of window */
3131ab64890Smrg    Visual *visual;		/* the associated visual structure */
3141ab64890Smrg    Window root;        	/* root of screen containing window */
3151ab64890Smrg#if defined(__cplusplus) || defined(c_plusplus)
3161ab64890Smrg    int c_class;		/* C++ InputOutput, InputOnly*/
3171ab64890Smrg#else
3181ab64890Smrg    int class;			/* InputOutput, InputOnly*/
3191ab64890Smrg#endif
3201ab64890Smrg    int bit_gravity;		/* one of bit gravity values */
3211ab64890Smrg    int win_gravity;		/* one of the window gravity values */
3221ab64890Smrg    int backing_store;		/* NotUseful, WhenMapped, Always */
3231ab64890Smrg    unsigned long backing_planes;/* planes to be preserved if possible */
3241ab64890Smrg    unsigned long backing_pixel;/* value to be used when restoring planes */
3251ab64890Smrg    Bool save_under;		/* boolean, should bits under be saved? */
3261ab64890Smrg    Colormap colormap;		/* color map to be associated with window */
3271ab64890Smrg    Bool map_installed;		/* boolean, is color map currently installed*/
3281ab64890Smrg    int map_state;		/* IsUnmapped, IsUnviewable, IsViewable */
3291ab64890Smrg    long all_event_masks;	/* set of events all people have interest in*/
3301ab64890Smrg    long your_event_mask;	/* my event mask */
3311ab64890Smrg    long do_not_propagate_mask; /* set of events that should not propagate */
3321ab64890Smrg    Bool override_redirect;	/* boolean value for override-redirect */
3331ab64890Smrg    Screen *screen;		/* back pointer to correct screen */
3341ab64890Smrg} XWindowAttributes;
3351ab64890Smrg
3361ab64890Smrg/*
3371ab64890Smrg * Data structure for host setting; getting routines.
3381ab64890Smrg *
3391ab64890Smrg */
3401ab64890Smrg
3411ab64890Smrgtypedef struct {
3421ab64890Smrg	int family;		/* for example FamilyInternet */
3431ab64890Smrg	int length;		/* length of address, in bytes */
3441ab64890Smrg	char *address;		/* pointer to where to find the bytes */
3451ab64890Smrg} XHostAddress;
3461ab64890Smrg
3471ab64890Smrg/*
3481ab64890Smrg * Data structure for ServerFamilyInterpreted addresses in host routines
3491ab64890Smrg */
3501ab64890Smrgtypedef struct {
3511ab64890Smrg	int typelength;		/* length of type string, in bytes */
3521ab64890Smrg	int valuelength;	/* length of value string, in bytes */
3531ab64890Smrg	char *type;		/* pointer to where to find the type string */
3541ab64890Smrg	char *value;		/* pointer to where to find the address */
3551ab64890Smrg} XServerInterpretedAddress;
3561ab64890Smrg
3571ab64890Smrg/*
3581ab64890Smrg * Data structure for "image" data, used by image manipulation routines.
3591ab64890Smrg */
3601ab64890Smrgtypedef struct _XImage {
3611ab64890Smrg    int width, height;		/* size of image */
3621ab64890Smrg    int xoffset;		/* number of pixels offset in X direction */
3631ab64890Smrg    int format;			/* XYBitmap, XYPixmap, ZPixmap */
3641ab64890Smrg    char *data;			/* pointer to image data */
3651ab64890Smrg    int byte_order;		/* data byte order, LSBFirst, MSBFirst */
3661ab64890Smrg    int bitmap_unit;		/* quant. of scanline 8, 16, 32 */
3671ab64890Smrg    int bitmap_bit_order;	/* LSBFirst, MSBFirst */
3681ab64890Smrg    int bitmap_pad;		/* 8, 16, 32 either XY or ZPixmap */
3691ab64890Smrg    int depth;			/* depth of image */
3709c927599Smrg    int bytes_per_line;		/* accelerator to next line */
3711ab64890Smrg    int bits_per_pixel;		/* bits per pixel (ZPixmap) */
3729c019ec5Smaya    unsigned long red_mask;	/* bits in z arrangement */
3731ab64890Smrg    unsigned long green_mask;
3741ab64890Smrg    unsigned long blue_mask;
3751ab64890Smrg    XPointer obdata;		/* hook for the object routines to hang on */
3761ab64890Smrg    struct funcs {		/* image manipulation routines */
3771ab64890Smrg	struct _XImage *(*create_image)(
3781ab64890Smrg		struct _XDisplay* /* display */,
3791ab64890Smrg		Visual*		/* visual */,
3801ab64890Smrg		unsigned int	/* depth */,
3811ab64890Smrg		int		/* format */,
3821ab64890Smrg		int		/* offset */,
3831ab64890Smrg		char*		/* data */,
3841ab64890Smrg		unsigned int	/* width */,
3851ab64890Smrg		unsigned int	/* height */,
3861ab64890Smrg		int		/* bitmap_pad */,
3871ab64890Smrg		int		/* bytes_per_line */);
3881ab64890Smrg	int (*destroy_image)        (struct _XImage *);
3891ab64890Smrg	unsigned long (*get_pixel)  (struct _XImage *, int, int);
3901ab64890Smrg	int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
3911ab64890Smrg	struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
3921ab64890Smrg	int (*add_pixel)            (struct _XImage *, long);
3931ab64890Smrg	} f;
3941ab64890Smrg} XImage;
3951ab64890Smrg
39661b2299dSmrg/*
3971ab64890Smrg * Data structure for XReconfigureWindow
3981ab64890Smrg */
3991ab64890Smrgtypedef struct {
4001ab64890Smrg    int x, y;
4011ab64890Smrg    int width, height;
4021ab64890Smrg    int border_width;
4031ab64890Smrg    Window sibling;
4041ab64890Smrg    int stack_mode;
4051ab64890Smrg} XWindowChanges;
4061ab64890Smrg
4071ab64890Smrg/*
4081ab64890Smrg * Data structure used by color operations
4091ab64890Smrg */
4101ab64890Smrgtypedef struct {
4111ab64890Smrg	unsigned long pixel;
4121ab64890Smrg	unsigned short red, green, blue;
4131ab64890Smrg	char flags;  /* do_red, do_green, do_blue */
4141ab64890Smrg	char pad;
4151ab64890Smrg} XColor;
4161ab64890Smrg
41761b2299dSmrg/*
4181ab64890Smrg * Data structures for graphics operations.  On most machines, these are
4191ab64890Smrg * congruent with the wire protocol structures, so reformatting the data
4201ab64890Smrg * can be avoided on these architectures.
4211ab64890Smrg */
4221ab64890Smrgtypedef struct {
4231ab64890Smrg    short x1, y1, x2, y2;
4241ab64890Smrg} XSegment;
4251ab64890Smrg
4261ab64890Smrgtypedef struct {
4271ab64890Smrg    short x, y;
4281ab64890Smrg} XPoint;
42961b2299dSmrg
4301ab64890Smrgtypedef struct {
4311ab64890Smrg    short x, y;
4321ab64890Smrg    unsigned short width, height;
4331ab64890Smrg} XRectangle;
43461b2299dSmrg
4351ab64890Smrgtypedef struct {
4361ab64890Smrg    short x, y;
4371ab64890Smrg    unsigned short width, height;
4381ab64890Smrg    short angle1, angle2;
4391ab64890Smrg} XArc;
4401ab64890Smrg
4411ab64890Smrg
4421ab64890Smrg/* Data structure for XChangeKeyboardControl */
4431ab64890Smrg
4441ab64890Smrgtypedef struct {
4451ab64890Smrg        int key_click_percent;
4461ab64890Smrg        int bell_percent;
4471ab64890Smrg        int bell_pitch;
4481ab64890Smrg        int bell_duration;
4491ab64890Smrg        int led;
4501ab64890Smrg        int led_mode;
4511ab64890Smrg        int key;
4521ab64890Smrg        int auto_repeat_mode;   /* On, Off, Default */
4531ab64890Smrg} XKeyboardControl;
4541ab64890Smrg
4551ab64890Smrg/* Data structure for XGetKeyboardControl */
4561ab64890Smrg
4571ab64890Smrgtypedef struct {
4581ab64890Smrg        int key_click_percent;
4591ab64890Smrg	int bell_percent;
4601ab64890Smrg	unsigned int bell_pitch, bell_duration;
4611ab64890Smrg	unsigned long led_mask;
4621ab64890Smrg	int global_auto_repeat;
4631ab64890Smrg	char auto_repeats[32];
4641ab64890Smrg} XKeyboardState;
4651ab64890Smrg
4661ab64890Smrg/* Data structure for XGetMotionEvents.  */
4671ab64890Smrg
4681ab64890Smrgtypedef struct {
4691ab64890Smrg        Time time;
4701ab64890Smrg	short x, y;
4711ab64890Smrg} XTimeCoord;
4721ab64890Smrg
4731ab64890Smrg/* Data structure for X{Set,Get}ModifierMapping */
4741ab64890Smrg
4751ab64890Smrgtypedef struct {
4761ab64890Smrg 	int max_keypermod;	/* The server's max # of keys per modifier */
4771ab64890Smrg 	KeyCode *modifiermap;	/* An 8 by max_keypermod array of modifiers */
4781ab64890Smrg} XModifierKeymap;
4791ab64890Smrg
4801ab64890Smrg
4811ab64890Smrg/*
4821ab64890Smrg * Display datatype maintaining display specific data.
4831ab64890Smrg * The contents of this structure are implementation dependent.
4841ab64890Smrg * A Display should be treated as opaque by application code.
4851ab64890Smrg */
4861ab64890Smrg#ifndef XLIB_ILLEGAL_ACCESS
4871ab64890Smrgtypedef struct _XDisplay Display;
4881ab64890Smrg#endif
4891ab64890Smrg
4901ab64890Smrgstruct _XPrivate;		/* Forward declare before use for C++ */
4911ab64890Smrgstruct _XrmHashBucketRec;
4921ab64890Smrg
49361b2299dSmrgtypedef struct
4941ab64890Smrg#ifdef XLIB_ILLEGAL_ACCESS
4951ab64890Smrg_XDisplay
4961ab64890Smrg#endif
4971ab64890Smrg{
4981ab64890Smrg	XExtData *ext_data;	/* hook for extension to hang data */
4991ab64890Smrg	struct _XPrivate *private1;
5001ab64890Smrg	int fd;			/* Network socket. */
5011ab64890Smrg	int private2;
5021ab64890Smrg	int proto_major_version;/* major version of server's X protocol */
5031ab64890Smrg	int proto_minor_version;/* minor version of servers X protocol */
5041ab64890Smrg	char *vendor;		/* vendor of the server hardware */
5051ab64890Smrg        XID private3;
5061ab64890Smrg	XID private4;
5071ab64890Smrg	XID private5;
5081ab64890Smrg	int private6;
5091ab64890Smrg	XID (*resource_alloc)(	/* allocator function */
5101ab64890Smrg		struct _XDisplay*
5111ab64890Smrg	);
5121ab64890Smrg	int byte_order;		/* screen byte order, LSBFirst, MSBFirst */
5131ab64890Smrg	int bitmap_unit;	/* padding and data requirements */
5141ab64890Smrg	int bitmap_pad;		/* padding requirements on bitmaps */
5151ab64890Smrg	int bitmap_bit_order;	/* LeastSignificant or MostSignificant */
5161ab64890Smrg	int nformats;		/* number of pixmap formats in list */
5171ab64890Smrg	ScreenFormat *pixmap_format;	/* pixmap format list */
5181ab64890Smrg	int private8;
5191ab64890Smrg	int release;		/* release of the server */
5201ab64890Smrg	struct _XPrivate *private9, *private10;
5211ab64890Smrg	int qlen;		/* Length of input event queue */
5221ab64890Smrg	unsigned long last_request_read; /* seq number of last event read */
5231ab64890Smrg	unsigned long request;	/* sequence number of last request. */
5241ab64890Smrg	XPointer private11;
5251ab64890Smrg	XPointer private12;
5261ab64890Smrg	XPointer private13;
5271ab64890Smrg	XPointer private14;
5281ab64890Smrg	unsigned max_request_size; /* maximum number 32 bit words in request*/
5291ab64890Smrg	struct _XrmHashBucketRec *db;
5301ab64890Smrg	int (*private15)(
5311ab64890Smrg		struct _XDisplay*
5321ab64890Smrg		);
5331ab64890Smrg	char *display_name;	/* "host:display" string used on this connect*/
5341ab64890Smrg	int default_screen;	/* default screen for operations */
5351ab64890Smrg	int nscreens;		/* number of screens on this server*/
5361ab64890Smrg	Screen *screens;	/* pointer to list of screens */
5371ab64890Smrg	unsigned long motion_buffer;	/* size of motion buffer */
5381ab64890Smrg	unsigned long private16;
5391ab64890Smrg	int min_keycode;	/* minimum defined keycode */
5401ab64890Smrg	int max_keycode;	/* maximum defined keycode */
5411ab64890Smrg	XPointer private17;
5421ab64890Smrg	XPointer private18;
5431ab64890Smrg	int private19;
5441ab64890Smrg	char *xdefaults;	/* contents of defaults from server */
5451ab64890Smrg	/* there is more to this structure, but it is private to Xlib */
5461ab64890Smrg}
5471ab64890Smrg#ifdef XLIB_ILLEGAL_ACCESS
54861b2299dSmrgDisplay,
5491ab64890Smrg#endif
5501ab64890Smrg*_XPrivDisplay;
5511ab64890Smrg
5521ab64890Smrg#undef _XEVENT_
5531ab64890Smrg#ifndef _XEVENT_
5541ab64890Smrg/*
5551ab64890Smrg * Definitions of specific events.
5561ab64890Smrg */
5571ab64890Smrgtypedef struct {
5581ab64890Smrg	int type;		/* of event */
5591ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
5601ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
5611ab64890Smrg	Display *display;	/* Display the event was read from */
5621ab64890Smrg	Window window;	        /* "event" window it is reported relative to */
5631ab64890Smrg	Window root;	        /* root window that the event occurred on */
5641ab64890Smrg	Window subwindow;	/* child window */
5651ab64890Smrg	Time time;		/* milliseconds */
5661ab64890Smrg	int x, y;		/* pointer x, y coordinates in event window */
5671ab64890Smrg	int x_root, y_root;	/* coordinates relative to root */
5681ab64890Smrg	unsigned int state;	/* key or button mask */
5691ab64890Smrg	unsigned int keycode;	/* detail */
5701ab64890Smrg	Bool same_screen;	/* same screen flag */
5711ab64890Smrg} XKeyEvent;
5721ab64890Smrgtypedef XKeyEvent XKeyPressedEvent;
5731ab64890Smrgtypedef XKeyEvent XKeyReleasedEvent;
5741ab64890Smrg
5751ab64890Smrgtypedef struct {
5761ab64890Smrg	int type;		/* of event */
5771ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
5781ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
5791ab64890Smrg	Display *display;	/* Display the event was read from */
5801ab64890Smrg	Window window;	        /* "event" window it is reported relative to */
5811ab64890Smrg	Window root;	        /* root window that the event occurred on */
5821ab64890Smrg	Window subwindow;	/* child window */
5831ab64890Smrg	Time time;		/* milliseconds */
5841ab64890Smrg	int x, y;		/* pointer x, y coordinates in event window */
5851ab64890Smrg	int x_root, y_root;	/* coordinates relative to root */
5861ab64890Smrg	unsigned int state;	/* key or button mask */
5871ab64890Smrg	unsigned int button;	/* detail */
5881ab64890Smrg	Bool same_screen;	/* same screen flag */
5891ab64890Smrg} XButtonEvent;
5901ab64890Smrgtypedef XButtonEvent XButtonPressedEvent;
5911ab64890Smrgtypedef XButtonEvent XButtonReleasedEvent;
5921ab64890Smrg
5931ab64890Smrgtypedef struct {
5941ab64890Smrg	int type;		/* of event */
5951ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
5961ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
5971ab64890Smrg	Display *display;	/* Display the event was read from */
5981ab64890Smrg	Window window;	        /* "event" window reported relative to */
5991ab64890Smrg	Window root;	        /* root window that the event occurred on */
6001ab64890Smrg	Window subwindow;	/* child window */
6011ab64890Smrg	Time time;		/* milliseconds */
6021ab64890Smrg	int x, y;		/* pointer x, y coordinates in event window */
6031ab64890Smrg	int x_root, y_root;	/* coordinates relative to root */
6041ab64890Smrg	unsigned int state;	/* key or button mask */
6051ab64890Smrg	char is_hint;		/* detail */
6061ab64890Smrg	Bool same_screen;	/* same screen flag */
6071ab64890Smrg} XMotionEvent;
6081ab64890Smrgtypedef XMotionEvent XPointerMovedEvent;
6091ab64890Smrg
6101ab64890Smrgtypedef struct {
6111ab64890Smrg	int type;		/* of event */
6121ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
6131ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
6141ab64890Smrg	Display *display;	/* Display the event was read from */
6151ab64890Smrg	Window window;	        /* "event" window reported relative to */
6161ab64890Smrg	Window root;	        /* root window that the event occurred on */
6171ab64890Smrg	Window subwindow;	/* child window */
6181ab64890Smrg	Time time;		/* milliseconds */
6191ab64890Smrg	int x, y;		/* pointer x, y coordinates in event window */
6201ab64890Smrg	int x_root, y_root;	/* coordinates relative to root */
6211ab64890Smrg	int mode;		/* NotifyNormal, NotifyGrab, NotifyUngrab */
6221ab64890Smrg	int detail;
6231ab64890Smrg	/*
62461b2299dSmrg	 * NotifyAncestor, NotifyVirtual, NotifyInferior,
6251ab64890Smrg	 * NotifyNonlinear,NotifyNonlinearVirtual
6261ab64890Smrg	 */
6271ab64890Smrg	Bool same_screen;	/* same screen flag */
6281ab64890Smrg	Bool focus;		/* boolean focus */
6291ab64890Smrg	unsigned int state;	/* key or button mask */
6301ab64890Smrg} XCrossingEvent;
6311ab64890Smrgtypedef XCrossingEvent XEnterWindowEvent;
6321ab64890Smrgtypedef XCrossingEvent XLeaveWindowEvent;
6331ab64890Smrg
6341ab64890Smrgtypedef struct {
6351ab64890Smrg	int type;		/* FocusIn or FocusOut */
6361ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
6371ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
6381ab64890Smrg	Display *display;	/* Display the event was read from */
6391ab64890Smrg	Window window;		/* window of event */
6401ab64890Smrg	int mode;		/* NotifyNormal, NotifyWhileGrabbed,
6411ab64890Smrg				   NotifyGrab, NotifyUngrab */
6421ab64890Smrg	int detail;
6431ab64890Smrg	/*
64461b2299dSmrg	 * NotifyAncestor, NotifyVirtual, NotifyInferior,
6451ab64890Smrg	 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
64661b2299dSmrg	 * NotifyPointerRoot, NotifyDetailNone
6471ab64890Smrg	 */
6481ab64890Smrg} XFocusChangeEvent;
6491ab64890Smrgtypedef XFocusChangeEvent XFocusInEvent;
6501ab64890Smrgtypedef XFocusChangeEvent XFocusOutEvent;
6511ab64890Smrg
6521ab64890Smrg/* generated on EnterWindow and FocusIn  when KeyMapState selected */
6531ab64890Smrgtypedef struct {
6541ab64890Smrg	int type;
6551ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
6561ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
6571ab64890Smrg	Display *display;	/* Display the event was read from */
6581ab64890Smrg	Window window;
6591ab64890Smrg	char key_vector[32];
66061b2299dSmrg} XKeymapEvent;
6611ab64890Smrg
6621ab64890Smrgtypedef struct {
6631ab64890Smrg	int type;
6641ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
6651ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
6661ab64890Smrg	Display *display;	/* Display the event was read from */
6671ab64890Smrg	Window window;
6681ab64890Smrg	int x, y;
6691ab64890Smrg	int width, height;
6701ab64890Smrg	int count;		/* if non-zero, at least this many more */
6711ab64890Smrg} XExposeEvent;
6721ab64890Smrg
6731ab64890Smrgtypedef struct {
6741ab64890Smrg	int type;
6751ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
6761ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
6771ab64890Smrg	Display *display;	/* Display the event was read from */
6781ab64890Smrg	Drawable drawable;
6791ab64890Smrg	int x, y;
6801ab64890Smrg	int width, height;
6811ab64890Smrg	int count;		/* if non-zero, at least this many more */
6821ab64890Smrg	int major_code;		/* core is CopyArea or CopyPlane */
6831ab64890Smrg	int minor_code;		/* not defined in the core */
6841ab64890Smrg} XGraphicsExposeEvent;
6851ab64890Smrg
6861ab64890Smrgtypedef struct {
6871ab64890Smrg	int type;
6881ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
6891ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
6901ab64890Smrg	Display *display;	/* Display the event was read from */
6911ab64890Smrg	Drawable drawable;
6921ab64890Smrg	int major_code;		/* core is CopyArea or CopyPlane */
6931ab64890Smrg	int minor_code;		/* not defined in the core */
6941ab64890Smrg} XNoExposeEvent;
6951ab64890Smrg
6961ab64890Smrgtypedef struct {
6971ab64890Smrg	int type;
6981ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
6991ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7001ab64890Smrg	Display *display;	/* Display the event was read from */
7011ab64890Smrg	Window window;
7021ab64890Smrg	int state;		/* Visibility state */
7031ab64890Smrg} XVisibilityEvent;
7041ab64890Smrg
7051ab64890Smrgtypedef struct {
7061ab64890Smrg	int type;
7071ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
7081ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7091ab64890Smrg	Display *display;	/* Display the event was read from */
7101ab64890Smrg	Window parent;		/* parent of the window */
7111ab64890Smrg	Window window;		/* window id of window created */
7121ab64890Smrg	int x, y;		/* window location */
7131ab64890Smrg	int width, height;	/* size of window */
7141ab64890Smrg	int border_width;	/* border width */
7151ab64890Smrg	Bool override_redirect;	/* creation should be overridden */
7161ab64890Smrg} XCreateWindowEvent;
7171ab64890Smrg
7181ab64890Smrgtypedef struct {
7191ab64890Smrg	int type;
7201ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
7211ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7221ab64890Smrg	Display *display;	/* Display the event was read from */
7231ab64890Smrg	Window event;
7241ab64890Smrg	Window window;
7251ab64890Smrg} XDestroyWindowEvent;
7261ab64890Smrg
7271ab64890Smrgtypedef struct {
7281ab64890Smrg	int type;
7291ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
7301ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7311ab64890Smrg	Display *display;	/* Display the event was read from */
7321ab64890Smrg	Window event;
7331ab64890Smrg	Window window;
7341ab64890Smrg	Bool from_configure;
7351ab64890Smrg} XUnmapEvent;
7361ab64890Smrg
7371ab64890Smrgtypedef struct {
7381ab64890Smrg	int type;
7391ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
7401ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7411ab64890Smrg	Display *display;	/* Display the event was read from */
7421ab64890Smrg	Window event;
7431ab64890Smrg	Window window;
7441ab64890Smrg	Bool override_redirect;	/* boolean, is override set... */
7451ab64890Smrg} XMapEvent;
7461ab64890Smrg
7471ab64890Smrgtypedef struct {
7481ab64890Smrg	int type;
7491ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
7501ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7511ab64890Smrg	Display *display;	/* Display the event was read from */
7521ab64890Smrg	Window parent;
7531ab64890Smrg	Window window;
7541ab64890Smrg} XMapRequestEvent;
7551ab64890Smrg
7561ab64890Smrgtypedef struct {
7571ab64890Smrg	int type;
7581ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
7591ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7601ab64890Smrg	Display *display;	/* Display the event was read from */
7611ab64890Smrg	Window event;
7621ab64890Smrg	Window window;
7631ab64890Smrg	Window parent;
7641ab64890Smrg	int x, y;
7651ab64890Smrg	Bool override_redirect;
7661ab64890Smrg} XReparentEvent;
7671ab64890Smrg
7681ab64890Smrgtypedef struct {
7691ab64890Smrg	int type;
7701ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
7711ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7721ab64890Smrg	Display *display;	/* Display the event was read from */
7731ab64890Smrg	Window event;
7741ab64890Smrg	Window window;
7751ab64890Smrg	int x, y;
7761ab64890Smrg	int width, height;
7771ab64890Smrg	int border_width;
7781ab64890Smrg	Window above;
7791ab64890Smrg	Bool override_redirect;
7801ab64890Smrg} XConfigureEvent;
7811ab64890Smrg
7821ab64890Smrgtypedef struct {
7831ab64890Smrg	int type;
7841ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
7851ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7861ab64890Smrg	Display *display;	/* Display the event was read from */
7871ab64890Smrg	Window event;
7881ab64890Smrg	Window window;
7891ab64890Smrg	int x, y;
7901ab64890Smrg} XGravityEvent;
7911ab64890Smrg
7921ab64890Smrgtypedef struct {
7931ab64890Smrg	int type;
7941ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
7951ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
7961ab64890Smrg	Display *display;	/* Display the event was read from */
7971ab64890Smrg	Window window;
7981ab64890Smrg	int width, height;
7991ab64890Smrg} XResizeRequestEvent;
8001ab64890Smrg
8011ab64890Smrgtypedef struct {
8021ab64890Smrg	int type;
8031ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
8041ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
8051ab64890Smrg	Display *display;	/* Display the event was read from */
8061ab64890Smrg	Window parent;
8071ab64890Smrg	Window window;
8081ab64890Smrg	int x, y;
8091ab64890Smrg	int width, height;
8101ab64890Smrg	int border_width;
8111ab64890Smrg	Window above;
8121ab64890Smrg	int detail;		/* Above, Below, TopIf, BottomIf, Opposite */
8131ab64890Smrg	unsigned long value_mask;
8141ab64890Smrg} XConfigureRequestEvent;
8151ab64890Smrg
8161ab64890Smrgtypedef struct {
8171ab64890Smrg	int type;
8181ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
8191ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
8201ab64890Smrg	Display *display;	/* Display the event was read from */
8211ab64890Smrg	Window event;
8221ab64890Smrg	Window window;
8231ab64890Smrg	int place;		/* PlaceOnTop, PlaceOnBottom */
8241ab64890Smrg} XCirculateEvent;
8251ab64890Smrg
8261ab64890Smrgtypedef struct {
8271ab64890Smrg	int type;
8281ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
8291ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
8301ab64890Smrg	Display *display;	/* Display the event was read from */
8311ab64890Smrg	Window parent;
8321ab64890Smrg	Window window;
8331ab64890Smrg	int place;		/* PlaceOnTop, PlaceOnBottom */
8341ab64890Smrg} XCirculateRequestEvent;
8351ab64890Smrg
8361ab64890Smrgtypedef struct {
8371ab64890Smrg	int type;
8381ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
8391ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
8401ab64890Smrg	Display *display;	/* Display the event was read from */
8411ab64890Smrg	Window window;
8421ab64890Smrg	Atom atom;
8431ab64890Smrg	Time time;
8441ab64890Smrg	int state;		/* NewValue, Deleted */
8451ab64890Smrg} XPropertyEvent;
8461ab64890Smrg
8471ab64890Smrgtypedef struct {
8481ab64890Smrg	int type;
8491ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
8501ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
8511ab64890Smrg	Display *display;	/* Display the event was read from */
8521ab64890Smrg	Window window;
8531ab64890Smrg	Atom selection;
8541ab64890Smrg	Time time;
8551ab64890Smrg} XSelectionClearEvent;
8561ab64890Smrg
8571ab64890Smrgtypedef struct {
8581ab64890Smrg	int type;
8591ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
8601ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
8611ab64890Smrg	Display *display;	/* Display the event was read from */
8621ab64890Smrg	Window owner;
8631ab64890Smrg	Window requestor;
8641ab64890Smrg	Atom selection;
8651ab64890Smrg	Atom target;
8661ab64890Smrg	Atom property;
8671ab64890Smrg	Time time;
8681ab64890Smrg} XSelectionRequestEvent;
8691ab64890Smrg
8701ab64890Smrgtypedef struct {
8711ab64890Smrg	int type;
8721ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
8731ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
8741ab64890Smrg	Display *display;	/* Display the event was read from */
8751ab64890Smrg	Window requestor;
8761ab64890Smrg	Atom selection;
8771ab64890Smrg	Atom target;
8781ab64890Smrg	Atom property;		/* ATOM or None */
8791ab64890Smrg	Time time;
8801ab64890Smrg} XSelectionEvent;
8811ab64890Smrg
8821ab64890Smrgtypedef struct {
8831ab64890Smrg	int type;
8841ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
8851ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
8861ab64890Smrg	Display *display;	/* Display the event was read from */
8871ab64890Smrg	Window window;
8881ab64890Smrg	Colormap colormap;	/* COLORMAP or None */
8891ab64890Smrg#if defined(__cplusplus) || defined(c_plusplus)
8901ab64890Smrg	Bool c_new;		/* C++ */
8911ab64890Smrg#else
8921ab64890Smrg	Bool new;
8931ab64890Smrg#endif
8941ab64890Smrg	int state;		/* ColormapInstalled, ColormapUninstalled */
8951ab64890Smrg} XColormapEvent;
8961ab64890Smrg
8971ab64890Smrgtypedef struct {
8981ab64890Smrg	int type;
8991ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
9001ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
9011ab64890Smrg	Display *display;	/* Display the event was read from */
9021ab64890Smrg	Window window;
9031ab64890Smrg	Atom message_type;
9041ab64890Smrg	int format;
9051ab64890Smrg	union {
9061ab64890Smrg		char b[20];
9071ab64890Smrg		short s[10];
9081ab64890Smrg		long l[5];
9091ab64890Smrg		} data;
9101ab64890Smrg} XClientMessageEvent;
9111ab64890Smrg
9121ab64890Smrgtypedef struct {
9131ab64890Smrg	int type;
9141ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
9151ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
9161ab64890Smrg	Display *display;	/* Display the event was read from */
9171ab64890Smrg	Window window;		/* unused */
9181ab64890Smrg	int request;		/* one of MappingModifier, MappingKeyboard,
9191ab64890Smrg				   MappingPointer */
9201ab64890Smrg	int first_keycode;	/* first keycode */
9211ab64890Smrg	int count;		/* defines range of change w. first_keycode*/
9221ab64890Smrg} XMappingEvent;
9231ab64890Smrg
9241ab64890Smrgtypedef struct {
9251ab64890Smrg	int type;
9261ab64890Smrg	Display *display;	/* Display the event was read from */
9271ab64890Smrg	XID resourceid;		/* resource id */
9281ab64890Smrg	unsigned long serial;	/* serial number of failed request */
9291ab64890Smrg	unsigned char error_code;	/* error code of failed request */
9301ab64890Smrg	unsigned char request_code;	/* Major op-code of failed request */
9311ab64890Smrg	unsigned char minor_code;	/* Minor op-code of failed request */
9321ab64890Smrg} XErrorEvent;
9331ab64890Smrg
9341ab64890Smrgtypedef struct {
9351ab64890Smrg	int type;
9361ab64890Smrg	unsigned long serial;	/* # of last request processed by server */
9371ab64890Smrg	Bool send_event;	/* true if this came from a SendEvent request */
9381ab64890Smrg	Display *display;/* Display the event was read from */
9391ab64890Smrg	Window window;	/* window on which event was requested in event mask */
9401ab64890Smrg} XAnyEvent;
9411ab64890Smrg
94261b2299dSmrg
94361b2299dSmrg/***************************************************************
94461b2299dSmrg *
94561b2299dSmrg * GenericEvent.  This event is the standard event for all newer extensions.
94661b2299dSmrg */
94761b2299dSmrg
94861b2299dSmrgtypedef struct
94961b2299dSmrg    {
95061b2299dSmrg    int            type;         /* of event. Always GenericEvent */
95161b2299dSmrg    unsigned long  serial;       /* # of last request processed */
95261b2299dSmrg    Bool           send_event;   /* true if from SendEvent request */
95361b2299dSmrg    Display        *display;     /* Display the event was read from */
95461b2299dSmrg    int            extension;    /* major opcode of extension that caused the event */
95561b2299dSmrg    int            evtype;       /* actual event type. */
95661b2299dSmrg    } XGenericEvent;
95761b2299dSmrg
958b4ee4795Smrgtypedef struct {
959b4ee4795Smrg    int            type;         /* of event. Always GenericEvent */
960b4ee4795Smrg    unsigned long  serial;       /* # of last request processed */
961b4ee4795Smrg    Bool           send_event;   /* true if from SendEvent request */
962b4ee4795Smrg    Display        *display;     /* Display the event was read from */
963b4ee4795Smrg    int            extension;    /* major opcode of extension that caused the event */
964b4ee4795Smrg    int            evtype;       /* actual event type. */
965b4ee4795Smrg    unsigned int   cookie;
966b4ee4795Smrg    void           *data;
967b4ee4795Smrg} XGenericEventCookie;
968b4ee4795Smrg
9691ab64890Smrg/*
9701ab64890Smrg * this union is defined so Xlib can always use the same sized
9711ab64890Smrg * event structure internally, to avoid memory fragmentation.
9721ab64890Smrg */
9731ab64890Smrgtypedef union _XEvent {
9741ab64890Smrg        int type;		/* must not be changed; first element */
9751ab64890Smrg	XAnyEvent xany;
9761ab64890Smrg	XKeyEvent xkey;
9771ab64890Smrg	XButtonEvent xbutton;
9781ab64890Smrg	XMotionEvent xmotion;
9791ab64890Smrg	XCrossingEvent xcrossing;
9801ab64890Smrg	XFocusChangeEvent xfocus;
9811ab64890Smrg	XExposeEvent xexpose;
9821ab64890Smrg	XGraphicsExposeEvent xgraphicsexpose;
9831ab64890Smrg	XNoExposeEvent xnoexpose;
9841ab64890Smrg	XVisibilityEvent xvisibility;
9851ab64890Smrg	XCreateWindowEvent xcreatewindow;
9861ab64890Smrg	XDestroyWindowEvent xdestroywindow;
9871ab64890Smrg	XUnmapEvent xunmap;
9881ab64890Smrg	XMapEvent xmap;
9891ab64890Smrg	XMapRequestEvent xmaprequest;
9901ab64890Smrg	XReparentEvent xreparent;
9911ab64890Smrg	XConfigureEvent xconfigure;
9921ab64890Smrg	XGravityEvent xgravity;
9931ab64890Smrg	XResizeRequestEvent xresizerequest;
9941ab64890Smrg	XConfigureRequestEvent xconfigurerequest;
9951ab64890Smrg	XCirculateEvent xcirculate;
9961ab64890Smrg	XCirculateRequestEvent xcirculaterequest;
9971ab64890Smrg	XPropertyEvent xproperty;
9981ab64890Smrg	XSelectionClearEvent xselectionclear;
9991ab64890Smrg	XSelectionRequestEvent xselectionrequest;
10001ab64890Smrg	XSelectionEvent xselection;
10011ab64890Smrg	XColormapEvent xcolormap;
10021ab64890Smrg	XClientMessageEvent xclient;
10031ab64890Smrg	XMappingEvent xmapping;
10041ab64890Smrg	XErrorEvent xerror;
10051ab64890Smrg	XKeymapEvent xkeymap;
1006b4ee4795Smrg	XGenericEvent xgeneric;
1007b4ee4795Smrg	XGenericEventCookie xcookie;
10081ab64890Smrg	long pad[24];
10091ab64890Smrg} XEvent;
10101ab64890Smrg#endif
10111ab64890Smrg
10122d67cb4fSmrg#define XAllocID(dpy) ((*((_XPrivDisplay)(dpy))->resource_alloc)((dpy)))
10131ab64890Smrg
10141ab64890Smrg/*
10151ab64890Smrg * per character font metric information.
10161ab64890Smrg */
10171ab64890Smrgtypedef struct {
10181ab64890Smrg    short	lbearing;	/* origin to left edge of raster */
10191ab64890Smrg    short	rbearing;	/* origin to right edge of raster */
10201ab64890Smrg    short	width;		/* advance to next char's origin */
10211ab64890Smrg    short	ascent;		/* baseline to top edge of raster */
10221ab64890Smrg    short	descent;	/* baseline to bottom edge of raster */
10231ab64890Smrg    unsigned short attributes;	/* per char flags (not predefined) */
10241ab64890Smrg} XCharStruct;
10251ab64890Smrg
10261ab64890Smrg/*
10271ab64890Smrg * To allow arbitrary information with fonts, there are additional properties
10281ab64890Smrg * returned.
10291ab64890Smrg */
10301ab64890Smrgtypedef struct {
10311ab64890Smrg    Atom name;
10321ab64890Smrg    unsigned long card32;
10331ab64890Smrg} XFontProp;
10341ab64890Smrg
10351ab64890Smrgtypedef struct {
10361ab64890Smrg    XExtData	*ext_data;	/* hook for extension to hang data */
10371ab64890Smrg    Font        fid;            /* Font id for this font */
10381ab64890Smrg    unsigned	direction;	/* hint about direction the font is painted */
10391ab64890Smrg    unsigned	min_char_or_byte2;/* first character */
10401ab64890Smrg    unsigned	max_char_or_byte2;/* last character */
10411ab64890Smrg    unsigned	min_byte1;	/* first row that exists */
10421ab64890Smrg    unsigned	max_byte1;	/* last row that exists */
10431ab64890Smrg    Bool	all_chars_exist;/* flag if all characters have non-zero size*/
10441ab64890Smrg    unsigned	default_char;	/* char to print for undefined character */
10451ab64890Smrg    int         n_properties;   /* how many properties there are */
10461ab64890Smrg    XFontProp	*properties;	/* pointer to array of additional properties*/
10471ab64890Smrg    XCharStruct	min_bounds;	/* minimum bounds over all existing char*/
10481ab64890Smrg    XCharStruct	max_bounds;	/* maximum bounds over all existing char*/
10491ab64890Smrg    XCharStruct	*per_char;	/* first_char to last_char information */
10501ab64890Smrg    int		ascent;		/* log. extent above baseline for spacing */
10511ab64890Smrg    int		descent;	/* log. descent below baseline for spacing */
10521ab64890Smrg} XFontStruct;
10531ab64890Smrg
10541ab64890Smrg/*
10551ab64890Smrg * PolyText routines take these as arguments.
10561ab64890Smrg */
10571ab64890Smrgtypedef struct {
10581ab64890Smrg    char *chars;		/* pointer to string */
10591ab64890Smrg    int nchars;			/* number of characters */
10601ab64890Smrg    int delta;			/* delta between strings */
10611ab64890Smrg    Font font;			/* font to print it in, None don't change */
10621ab64890Smrg} XTextItem;
10631ab64890Smrg
10641ab64890Smrgtypedef struct {		/* normal 16 bit characters are two bytes */
10651ab64890Smrg    unsigned char byte1;
10661ab64890Smrg    unsigned char byte2;
10671ab64890Smrg} XChar2b;
10681ab64890Smrg
10691ab64890Smrgtypedef struct {
10701ab64890Smrg    XChar2b *chars;		/* two byte characters */
10711ab64890Smrg    int nchars;			/* number of characters */
10721ab64890Smrg    int delta;			/* delta between strings */
10731ab64890Smrg    Font font;			/* font to print it in, None don't change */
10741ab64890Smrg} XTextItem16;
10751ab64890Smrg
10761ab64890Smrg
10771ab64890Smrgtypedef union { Display *display;
10781ab64890Smrg		GC gc;
10791ab64890Smrg		Visual *visual;
10801ab64890Smrg		Screen *screen;
10811ab64890Smrg		ScreenFormat *pixmap_format;
10821ab64890Smrg		XFontStruct *font; } XEDataObject;
10831ab64890Smrg
10841ab64890Smrgtypedef struct {
10851ab64890Smrg    XRectangle      max_ink_extent;
10861ab64890Smrg    XRectangle      max_logical_extent;
10871ab64890Smrg} XFontSetExtents;
10881ab64890Smrg
10891ab64890Smrg/* unused:
10901ab64890Smrgtypedef void (*XOMProc)();
10911ab64890Smrg */
10921ab64890Smrg
10931ab64890Smrgtypedef struct _XOM *XOM;
10941ab64890Smrgtypedef struct _XOC *XOC, *XFontSet;
10951ab64890Smrg
10961ab64890Smrgtypedef struct {
10971ab64890Smrg    char           *chars;
10981ab64890Smrg    int             nchars;
10991ab64890Smrg    int             delta;
11001ab64890Smrg    XFontSet        font_set;
11011ab64890Smrg} XmbTextItem;
11021ab64890Smrg
11031ab64890Smrgtypedef struct {
11041ab64890Smrg    wchar_t        *chars;
11051ab64890Smrg    int             nchars;
11061ab64890Smrg    int             delta;
11071ab64890Smrg    XFontSet        font_set;
11081ab64890Smrg} XwcTextItem;
11091ab64890Smrg
11101ab64890Smrg#define XNRequiredCharSet "requiredCharSet"
11111ab64890Smrg#define XNQueryOrientation "queryOrientation"
11121ab64890Smrg#define XNBaseFontName "baseFontName"
11131ab64890Smrg#define XNOMAutomatic "omAutomatic"
11141ab64890Smrg#define XNMissingCharSet "missingCharSet"
11151ab64890Smrg#define XNDefaultString "defaultString"
11161ab64890Smrg#define XNOrientation "orientation"
11171ab64890Smrg#define XNDirectionalDependentDrawing "directionalDependentDrawing"
11181ab64890Smrg#define XNContextualDrawing "contextualDrawing"
11191ab64890Smrg#define XNFontInfo "fontInfo"
11201ab64890Smrg
11211ab64890Smrgtypedef struct {
11221ab64890Smrg    int charset_count;
11231ab64890Smrg    char **charset_list;
11241ab64890Smrg} XOMCharSetList;
11251ab64890Smrg
11261ab64890Smrgtypedef enum {
11271ab64890Smrg    XOMOrientation_LTR_TTB,
11281ab64890Smrg    XOMOrientation_RTL_TTB,
11291ab64890Smrg    XOMOrientation_TTB_LTR,
11301ab64890Smrg    XOMOrientation_TTB_RTL,
11311ab64890Smrg    XOMOrientation_Context
11321ab64890Smrg} XOrientation;
11331ab64890Smrg
11341ab64890Smrgtypedef struct {
11351ab64890Smrg    int num_orientation;
11361ab64890Smrg    XOrientation *orientation;	/* Input Text description */
11371ab64890Smrg} XOMOrientation;
11381ab64890Smrg
11391ab64890Smrgtypedef struct {
11401ab64890Smrg    int num_font;
11411ab64890Smrg    XFontStruct **font_struct_list;
11421ab64890Smrg    char **font_name_list;
11431ab64890Smrg} XOMFontInfo;
11441ab64890Smrg
11451ab64890Smrgtypedef struct _XIM *XIM;
11461ab64890Smrgtypedef struct _XIC *XIC;
11471ab64890Smrg
11481ab64890Smrgtypedef void (*XIMProc)(
11491ab64890Smrg    XIM,
11501ab64890Smrg    XPointer,
11511ab64890Smrg    XPointer
11521ab64890Smrg);
11531ab64890Smrg
11541ab64890Smrgtypedef Bool (*XICProc)(
11551ab64890Smrg    XIC,
11561ab64890Smrg    XPointer,
11571ab64890Smrg    XPointer
11581ab64890Smrg);
11591ab64890Smrg
11601ab64890Smrgtypedef void (*XIDProc)(
11611ab64890Smrg    Display*,
11621ab64890Smrg    XPointer,
11631ab64890Smrg    XPointer
11641ab64890Smrg);
11651ab64890Smrg
11661ab64890Smrgtypedef unsigned long XIMStyle;
11671ab64890Smrg
11681ab64890Smrgtypedef struct {
11691ab64890Smrg    unsigned short count_styles;
11701ab64890Smrg    XIMStyle *supported_styles;
11711ab64890Smrg} XIMStyles;
11721ab64890Smrg
11731ab64890Smrg#define XIMPreeditArea		0x0001L
11741ab64890Smrg#define XIMPreeditCallbacks	0x0002L
11751ab64890Smrg#define XIMPreeditPosition	0x0004L
11761ab64890Smrg#define XIMPreeditNothing	0x0008L
11771ab64890Smrg#define XIMPreeditNone		0x0010L
11781ab64890Smrg#define XIMStatusArea		0x0100L
11791ab64890Smrg#define XIMStatusCallbacks	0x0200L
11801ab64890Smrg#define XIMStatusNothing	0x0400L
11811ab64890Smrg#define XIMStatusNone		0x0800L
11821ab64890Smrg
11831ab64890Smrg#define XNVaNestedList "XNVaNestedList"
11841ab64890Smrg#define XNQueryInputStyle "queryInputStyle"
11851ab64890Smrg#define XNClientWindow "clientWindow"
11861ab64890Smrg#define XNInputStyle "inputStyle"
11871ab64890Smrg#define XNFocusWindow "focusWindow"
11881ab64890Smrg#define XNResourceName "resourceName"
11891ab64890Smrg#define XNResourceClass "resourceClass"
11901ab64890Smrg#define XNGeometryCallback "geometryCallback"
11911ab64890Smrg#define XNDestroyCallback "destroyCallback"
11921ab64890Smrg#define XNFilterEvents "filterEvents"
11931ab64890Smrg#define XNPreeditStartCallback "preeditStartCallback"
11941ab64890Smrg#define XNPreeditDoneCallback "preeditDoneCallback"
11951ab64890Smrg#define XNPreeditDrawCallback "preeditDrawCallback"
11961ab64890Smrg#define XNPreeditCaretCallback "preeditCaretCallback"
11971ab64890Smrg#define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
11981ab64890Smrg#define XNPreeditAttributes "preeditAttributes"
11991ab64890Smrg#define XNStatusStartCallback "statusStartCallback"
12001ab64890Smrg#define XNStatusDoneCallback "statusDoneCallback"
12011ab64890Smrg#define XNStatusDrawCallback "statusDrawCallback"
12021ab64890Smrg#define XNStatusAttributes "statusAttributes"
12031ab64890Smrg#define XNArea "area"
12041ab64890Smrg#define XNAreaNeeded "areaNeeded"
12051ab64890Smrg#define XNSpotLocation "spotLocation"
12061ab64890Smrg#define XNColormap "colorMap"
12071ab64890Smrg#define XNStdColormap "stdColorMap"
12081ab64890Smrg#define XNForeground "foreground"
12091ab64890Smrg#define XNBackground "background"
12101ab64890Smrg#define XNBackgroundPixmap "backgroundPixmap"
12111ab64890Smrg#define XNFontSet "fontSet"
12121ab64890Smrg#define XNLineSpace "lineSpace"
12131ab64890Smrg#define XNCursor "cursor"
12141ab64890Smrg
12151ab64890Smrg#define XNQueryIMValuesList "queryIMValuesList"
12161ab64890Smrg#define XNQueryICValuesList "queryICValuesList"
12171ab64890Smrg#define XNVisiblePosition "visiblePosition"
12181ab64890Smrg#define XNR6PreeditCallback "r6PreeditCallback"
12191ab64890Smrg#define XNStringConversionCallback "stringConversionCallback"
12201ab64890Smrg#define XNStringConversion "stringConversion"
12211ab64890Smrg#define XNResetState "resetState"
12221ab64890Smrg#define XNHotKey "hotKey"
12231ab64890Smrg#define XNHotKeyState "hotKeyState"
12241ab64890Smrg#define XNPreeditState "preeditState"
12251ab64890Smrg#define XNSeparatorofNestedList "separatorofNestedList"
12261ab64890Smrg
12271ab64890Smrg#define XBufferOverflow		-1
12281ab64890Smrg#define XLookupNone		1
12291ab64890Smrg#define XLookupChars		2
12301ab64890Smrg#define XLookupKeySym		3
12311ab64890Smrg#define XLookupBoth		4
12321ab64890Smrg
12331ab64890Smrgtypedef void *XVaNestedList;
12341ab64890Smrg
12351ab64890Smrgtypedef struct {
12361ab64890Smrg    XPointer client_data;
12371ab64890Smrg    XIMProc callback;
12381ab64890Smrg} XIMCallback;
12391ab64890Smrg
12401ab64890Smrgtypedef struct {
12411ab64890Smrg    XPointer client_data;
12421ab64890Smrg    XICProc callback;
12431ab64890Smrg} XICCallback;
12441ab64890Smrg
12451ab64890Smrgtypedef unsigned long XIMFeedback;
12461ab64890Smrg
12471ab64890Smrg#define XIMReverse		1L
124861b2299dSmrg#define XIMUnderline		(1L<<1)
12491ab64890Smrg#define XIMHighlight		(1L<<2)
12501ab64890Smrg#define XIMPrimary	 	(1L<<5)
12511ab64890Smrg#define XIMSecondary		(1L<<6)
12521ab64890Smrg#define XIMTertiary	 	(1L<<7)
12531ab64890Smrg#define XIMVisibleToForward 	(1L<<8)
12541ab64890Smrg#define XIMVisibleToBackword 	(1L<<9)
12551ab64890Smrg#define XIMVisibleToCenter 	(1L<<10)
12561ab64890Smrg
12571ab64890Smrgtypedef struct _XIMText {
12581ab64890Smrg    unsigned short length;
12591ab64890Smrg    XIMFeedback *feedback;
126061b2299dSmrg    Bool encoding_is_wchar;
12611ab64890Smrg    union {
12621ab64890Smrg	char *multi_byte;
12631ab64890Smrg	wchar_t *wide_char;
126461b2299dSmrg    } string;
12651ab64890Smrg} XIMText;
12661ab64890Smrg
12671ab64890Smrgtypedef	unsigned long	 XIMPreeditState;
12681ab64890Smrg
12691ab64890Smrg#define	XIMPreeditUnKnown	0L
12701ab64890Smrg#define	XIMPreeditEnable	1L
12711ab64890Smrg#define	XIMPreeditDisable	(1L<<1)
12721ab64890Smrg
12731ab64890Smrgtypedef	struct	_XIMPreeditStateNotifyCallbackStruct {
12741ab64890Smrg    XIMPreeditState state;
12751ab64890Smrg} XIMPreeditStateNotifyCallbackStruct;
12761ab64890Smrg
12771ab64890Smrgtypedef	unsigned long	 XIMResetState;
12781ab64890Smrg
12791ab64890Smrg#define	XIMInitialState		1L
12801ab64890Smrg#define	XIMPreserveState	(1L<<1)
12811ab64890Smrg
12821ab64890Smrgtypedef unsigned long XIMStringConversionFeedback;
12831ab64890Smrg
12841ab64890Smrg#define	XIMStringConversionLeftEdge	(0x00000001)
12851ab64890Smrg#define	XIMStringConversionRightEdge	(0x00000002)
12861ab64890Smrg#define	XIMStringConversionTopEdge	(0x00000004)
12871ab64890Smrg#define	XIMStringConversionBottomEdge	(0x00000008)
12881ab64890Smrg#define	XIMStringConversionConcealed	(0x00000010)
12891ab64890Smrg#define	XIMStringConversionWrapped	(0x00000020)
12901ab64890Smrg
12911ab64890Smrgtypedef struct _XIMStringConversionText {
12921ab64890Smrg    unsigned short length;
12931ab64890Smrg    XIMStringConversionFeedback *feedback;
129461b2299dSmrg    Bool encoding_is_wchar;
12951ab64890Smrg    union {
12961ab64890Smrg	char *mbs;
12971ab64890Smrg	wchar_t *wcs;
129861b2299dSmrg    } string;
12991ab64890Smrg} XIMStringConversionText;
13001ab64890Smrg
13011ab64890Smrgtypedef	unsigned short	XIMStringConversionPosition;
13021ab64890Smrg
13031ab64890Smrgtypedef	unsigned short	XIMStringConversionType;
13041ab64890Smrg
13051ab64890Smrg#define	XIMStringConversionBuffer	(0x0001)
13061ab64890Smrg#define	XIMStringConversionLine		(0x0002)
13071ab64890Smrg#define	XIMStringConversionWord		(0x0003)
13081ab64890Smrg#define	XIMStringConversionChar		(0x0004)
13091ab64890Smrg
13101ab64890Smrgtypedef	unsigned short	XIMStringConversionOperation;
13111ab64890Smrg
13121ab64890Smrg#define	XIMStringConversionSubstitution	(0x0001)
13131ab64890Smrg#define	XIMStringConversionRetrieval	(0x0002)
13141ab64890Smrg
13151ab64890Smrgtypedef enum {
13161ab64890Smrg    XIMForwardChar, XIMBackwardChar,
13171ab64890Smrg    XIMForwardWord, XIMBackwardWord,
13181ab64890Smrg    XIMCaretUp, XIMCaretDown,
13191ab64890Smrg    XIMNextLine, XIMPreviousLine,
132061b2299dSmrg    XIMLineStart, XIMLineEnd,
13211ab64890Smrg    XIMAbsolutePosition,
13221ab64890Smrg    XIMDontChange
13231ab64890Smrg} XIMCaretDirection;
13241ab64890Smrg
13251ab64890Smrgtypedef struct _XIMStringConversionCallbackStruct {
13261ab64890Smrg    XIMStringConversionPosition position;
13271ab64890Smrg    XIMCaretDirection direction;
13281ab64890Smrg    XIMStringConversionOperation operation;
13291ab64890Smrg    unsigned short factor;
13301ab64890Smrg    XIMStringConversionText *text;
13311ab64890Smrg} XIMStringConversionCallbackStruct;
13321ab64890Smrg
13331ab64890Smrgtypedef struct _XIMPreeditDrawCallbackStruct {
13341ab64890Smrg    int caret;		/* Cursor offset within pre-edit string */
13351ab64890Smrg    int chg_first;	/* Starting change position */
13361ab64890Smrg    int chg_length;	/* Length of the change in character count */
13371ab64890Smrg    XIMText *text;
13381ab64890Smrg} XIMPreeditDrawCallbackStruct;
13391ab64890Smrg
13401ab64890Smrgtypedef enum {
134161b2299dSmrg    XIMIsInvisible,	/* Disable caret feedback */
13421ab64890Smrg    XIMIsPrimary,	/* UI defined caret feedback */
13431ab64890Smrg    XIMIsSecondary	/* UI defined caret feedback */
13441ab64890Smrg} XIMCaretStyle;
13451ab64890Smrg
13461ab64890Smrgtypedef struct _XIMPreeditCaretCallbackStruct {
13471ab64890Smrg    int position;		 /* Caret offset within pre-edit string */
13481ab64890Smrg    XIMCaretDirection direction; /* Caret moves direction */
13491ab64890Smrg    XIMCaretStyle style;	 /* Feedback of the caret */
13501ab64890Smrg} XIMPreeditCaretCallbackStruct;
13511ab64890Smrg
13521ab64890Smrgtypedef enum {
13531ab64890Smrg    XIMTextType,
13541ab64890Smrg    XIMBitmapType
13551ab64890Smrg} XIMStatusDataType;
135661b2299dSmrg
13571ab64890Smrgtypedef struct _XIMStatusDrawCallbackStruct {
13581ab64890Smrg    XIMStatusDataType type;
13591ab64890Smrg    union {
13601ab64890Smrg	XIMText *text;
13611ab64890Smrg	Pixmap  bitmap;
13621ab64890Smrg    } data;
13631ab64890Smrg} XIMStatusDrawCallbackStruct;
13641ab64890Smrg
13651ab64890Smrgtypedef struct _XIMHotKeyTrigger {
13661ab64890Smrg    KeySym	 keysym;
13671ab64890Smrg    int		 modifier;
13681ab64890Smrg    int		 modifier_mask;
13691ab64890Smrg} XIMHotKeyTrigger;
13701ab64890Smrg
13711ab64890Smrgtypedef struct _XIMHotKeyTriggers {
13721ab64890Smrg    int			 num_hot_key;
13731ab64890Smrg    XIMHotKeyTrigger	*key;
13741ab64890Smrg} XIMHotKeyTriggers;
13751ab64890Smrg
13761ab64890Smrgtypedef	unsigned long	 XIMHotKeyState;
13771ab64890Smrg
13781ab64890Smrg#define	XIMHotKeyStateON	(0x0001L)
13791ab64890Smrg#define	XIMHotKeyStateOFF	(0x0002L)
13801ab64890Smrg
13811ab64890Smrgtypedef struct {
13821ab64890Smrg    unsigned short count_values;
13831ab64890Smrg    char **supported_values;
13841ab64890Smrg} XIMValuesList;
13851ab64890Smrg
13861ab64890Smrg_XFUNCPROTOBEGIN
13871ab64890Smrg
13881ab64890Smrg#if defined(WIN32) && !defined(_XLIBINT_)
13891ab64890Smrg#define _Xdebug (*_Xdebug_p)
13901ab64890Smrg#endif
13911ab64890Smrg
13921ab64890Smrgextern int _Xdebug;
13931ab64890Smrg
13941ab64890Smrgextern XFontStruct *XLoadQueryFont(
13951ab64890Smrg    Display*		/* display */,
13961ab64890Smrg    _Xconst char*	/* name */
13971ab64890Smrg);
13981ab64890Smrg
13991ab64890Smrgextern XFontStruct *XQueryFont(
14001ab64890Smrg    Display*		/* display */,
14011ab64890Smrg    XID			/* font_ID */
14021ab64890Smrg);
14031ab64890Smrg
14041ab64890Smrg
14051ab64890Smrgextern XTimeCoord *XGetMotionEvents(
14061ab64890Smrg    Display*		/* display */,
14071ab64890Smrg    Window		/* w */,
14081ab64890Smrg    Time		/* start */,
14091ab64890Smrg    Time		/* stop */,
14101ab64890Smrg    int*		/* nevents_return */
14111ab64890Smrg);
14121ab64890Smrg
14131ab64890Smrgextern XModifierKeymap *XDeleteModifiermapEntry(
14141ab64890Smrg    XModifierKeymap*	/* modmap */,
14151ab64890Smrg#if NeedWidePrototypes
14161ab64890Smrg    unsigned int	/* keycode_entry */,
14171ab64890Smrg#else
14181ab64890Smrg    KeyCode		/* keycode_entry */,
14191ab64890Smrg#endif
14201ab64890Smrg    int			/* modifier */
14211ab64890Smrg);
14221ab64890Smrg
14231ab64890Smrgextern XModifierKeymap	*XGetModifierMapping(
14241ab64890Smrg    Display*		/* display */
14251ab64890Smrg);
14261ab64890Smrg
14271ab64890Smrgextern XModifierKeymap	*XInsertModifiermapEntry(
14281ab64890Smrg    XModifierKeymap*	/* modmap */,
14291ab64890Smrg#if NeedWidePrototypes
14301ab64890Smrg    unsigned int	/* keycode_entry */,
14311ab64890Smrg#else
14321ab64890Smrg    KeyCode		/* keycode_entry */,
14331ab64890Smrg#endif
143461b2299dSmrg    int			/* modifier */
14351ab64890Smrg);
14361ab64890Smrg
14371ab64890Smrgextern XModifierKeymap *XNewModifiermap(
14381ab64890Smrg    int			/* max_keys_per_mod */
14391ab64890Smrg);
14401ab64890Smrg
14411ab64890Smrgextern XImage *XCreateImage(
14421ab64890Smrg    Display*		/* display */,
14431ab64890Smrg    Visual*		/* visual */,
14441ab64890Smrg    unsigned int	/* depth */,
14451ab64890Smrg    int			/* format */,
14461ab64890Smrg    int			/* offset */,
14471ab64890Smrg    char*		/* data */,
14481ab64890Smrg    unsigned int	/* width */,
14491ab64890Smrg    unsigned int	/* height */,
14501ab64890Smrg    int			/* bitmap_pad */,
14511ab64890Smrg    int			/* bytes_per_line */
14521ab64890Smrg);
14531ab64890Smrgextern Status XInitImage(
14541ab64890Smrg    XImage*		/* image */
14551ab64890Smrg);
14561ab64890Smrgextern XImage *XGetImage(
14571ab64890Smrg    Display*		/* display */,
14581ab64890Smrg    Drawable		/* d */,
14591ab64890Smrg    int			/* x */,
14601ab64890Smrg    int			/* y */,
14611ab64890Smrg    unsigned int	/* width */,
14621ab64890Smrg    unsigned int	/* height */,
14631ab64890Smrg    unsigned long	/* plane_mask */,
14641ab64890Smrg    int			/* format */
14651ab64890Smrg);
14661ab64890Smrgextern XImage *XGetSubImage(
14671ab64890Smrg    Display*		/* display */,
14681ab64890Smrg    Drawable		/* d */,
14691ab64890Smrg    int			/* x */,
14701ab64890Smrg    int			/* y */,
14711ab64890Smrg    unsigned int	/* width */,
14721ab64890Smrg    unsigned int	/* height */,
14731ab64890Smrg    unsigned long	/* plane_mask */,
14741ab64890Smrg    int			/* format */,
14751ab64890Smrg    XImage*		/* dest_image */,
14761ab64890Smrg    int			/* dest_x */,
14771ab64890Smrg    int			/* dest_y */
14781ab64890Smrg);
14791ab64890Smrg
148061b2299dSmrg/*
14811ab64890Smrg * X function declarations.
14821ab64890Smrg */
14831ab64890Smrgextern Display *XOpenDisplay(
14841ab64890Smrg    _Xconst char*	/* display_name */
14851ab64890Smrg);
14861ab64890Smrg
14871ab64890Smrgextern void XrmInitialize(
14881ab64890Smrg    void
14891ab64890Smrg);
14901ab64890Smrg
14911ab64890Smrgextern char *XFetchBytes(
14921ab64890Smrg    Display*		/* display */,
14931ab64890Smrg    int*		/* nbytes_return */
14941ab64890Smrg);
14951ab64890Smrgextern char *XFetchBuffer(
14961ab64890Smrg    Display*		/* display */,
14971ab64890Smrg    int*		/* nbytes_return */,
14981ab64890Smrg    int			/* buffer */
14991ab64890Smrg);
15001ab64890Smrgextern char *XGetAtomName(
15011ab64890Smrg    Display*		/* display */,
15021ab64890Smrg    Atom		/* atom */
15031ab64890Smrg);
15041ab64890Smrgextern Status XGetAtomNames(
15051ab64890Smrg    Display*		/* dpy */,
15061ab64890Smrg    Atom*		/* atoms */,
15071ab64890Smrg    int			/* count */,
15081ab64890Smrg    char**		/* names_return */
15091ab64890Smrg);
15101ab64890Smrgextern char *XGetDefault(
15111ab64890Smrg    Display*		/* display */,
15121ab64890Smrg    _Xconst char*	/* program */,
151361b2299dSmrg    _Xconst char*	/* option */
15141ab64890Smrg);
15151ab64890Smrgextern char *XDisplayName(
15161ab64890Smrg    _Xconst char*	/* string */
15171ab64890Smrg);
15181ab64890Smrgextern char *XKeysymToString(
15191ab64890Smrg    KeySym		/* keysym */
15201ab64890Smrg);
15211ab64890Smrg
15221ab64890Smrgextern int (*XSynchronize(
15231ab64890Smrg    Display*		/* display */,
15241ab64890Smrg    Bool		/* onoff */
15251ab64890Smrg))(
15261ab64890Smrg    Display*		/* display */
15271ab64890Smrg);
15281ab64890Smrgextern int (*XSetAfterFunction(
15291ab64890Smrg    Display*		/* display */,
15301ab64890Smrg    int (*) (
15311ab64890Smrg	     Display*	/* display */
15321ab64890Smrg            )		/* procedure */
15331ab64890Smrg))(
15341ab64890Smrg    Display*		/* display */
15351ab64890Smrg);
15361ab64890Smrgextern Atom XInternAtom(
15371ab64890Smrg    Display*		/* display */,
15381ab64890Smrg    _Xconst char*	/* atom_name */,
153961b2299dSmrg    Bool		/* only_if_exists */
15401ab64890Smrg);
15411ab64890Smrgextern Status XInternAtoms(
15421ab64890Smrg    Display*		/* dpy */,
15431ab64890Smrg    char**		/* names */,
15441ab64890Smrg    int			/* count */,
15451ab64890Smrg    Bool		/* onlyIfExists */,
15461ab64890Smrg    Atom*		/* atoms_return */
15471ab64890Smrg);
15481ab64890Smrgextern Colormap XCopyColormapAndFree(
15491ab64890Smrg    Display*		/* display */,
15501ab64890Smrg    Colormap		/* colormap */
15511ab64890Smrg);
15521ab64890Smrgextern Colormap XCreateColormap(
15531ab64890Smrg    Display*		/* display */,
15541ab64890Smrg    Window		/* w */,
15551ab64890Smrg    Visual*		/* visual */,
155661b2299dSmrg    int			/* alloc */
15571ab64890Smrg);
15581ab64890Smrgextern Cursor XCreatePixmapCursor(
15591ab64890Smrg    Display*		/* display */,
15601ab64890Smrg    Pixmap		/* source */,
15611ab64890Smrg    Pixmap		/* mask */,
15621ab64890Smrg    XColor*		/* foreground_color */,
15631ab64890Smrg    XColor*		/* background_color */,
15641ab64890Smrg    unsigned int	/* x */,
156561b2299dSmrg    unsigned int	/* y */
15661ab64890Smrg);
15671ab64890Smrgextern Cursor XCreateGlyphCursor(
15681ab64890Smrg    Display*		/* display */,
15691ab64890Smrg    Font		/* source_font */,
15701ab64890Smrg    Font		/* mask_font */,
15711ab64890Smrg    unsigned int	/* source_char */,
15721ab64890Smrg    unsigned int	/* mask_char */,
15731ab64890Smrg    XColor _Xconst *	/* foreground_color */,
15741ab64890Smrg    XColor _Xconst *	/* background_color */
15751ab64890Smrg);
15761ab64890Smrgextern Cursor XCreateFontCursor(
15771ab64890Smrg    Display*		/* display */,
15781ab64890Smrg    unsigned int	/* shape */
15791ab64890Smrg);
15801ab64890Smrgextern Font XLoadFont(
15811ab64890Smrg    Display*		/* display */,
15821ab64890Smrg    _Xconst char*	/* name */
15831ab64890Smrg);
15841ab64890Smrgextern GC XCreateGC(
15851ab64890Smrg    Display*		/* display */,
15861ab64890Smrg    Drawable		/* d */,
15871ab64890Smrg    unsigned long	/* valuemask */,
15881ab64890Smrg    XGCValues*		/* values */
15891ab64890Smrg);
15901ab64890Smrgextern GContext XGContextFromGC(
15911ab64890Smrg    GC			/* gc */
15921ab64890Smrg);
15931ab64890Smrgextern void XFlushGC(
15941ab64890Smrg    Display*		/* display */,
15951ab64890Smrg    GC			/* gc */
15961ab64890Smrg);
15971ab64890Smrgextern Pixmap XCreatePixmap(
15981ab64890Smrg    Display*		/* display */,
15991ab64890Smrg    Drawable		/* d */,
16001ab64890Smrg    unsigned int	/* width */,
16011ab64890Smrg    unsigned int	/* height */,
160261b2299dSmrg    unsigned int	/* depth */
16031ab64890Smrg);
16041ab64890Smrgextern Pixmap XCreateBitmapFromData(
16051ab64890Smrg    Display*		/* display */,
16061ab64890Smrg    Drawable		/* d */,
16071ab64890Smrg    _Xconst char*	/* data */,
16081ab64890Smrg    unsigned int	/* width */,
16091ab64890Smrg    unsigned int	/* height */
16101ab64890Smrg);
16111ab64890Smrgextern Pixmap XCreatePixmapFromBitmapData(
16121ab64890Smrg    Display*		/* display */,
16131ab64890Smrg    Drawable		/* d */,
16141ab64890Smrg    char*		/* data */,
16151ab64890Smrg    unsigned int	/* width */,
16161ab64890Smrg    unsigned int	/* height */,
16171ab64890Smrg    unsigned long	/* fg */,
16181ab64890Smrg    unsigned long	/* bg */,
16191ab64890Smrg    unsigned int	/* depth */
16201ab64890Smrg);
16211ab64890Smrgextern Window XCreateSimpleWindow(
16221ab64890Smrg    Display*		/* display */,
16231ab64890Smrg    Window		/* parent */,
16241ab64890Smrg    int			/* x */,
16251ab64890Smrg    int			/* y */,
16261ab64890Smrg    unsigned int	/* width */,
16271ab64890Smrg    unsigned int	/* height */,
16281ab64890Smrg    unsigned int	/* border_width */,
16291ab64890Smrg    unsigned long	/* border */,
16301ab64890Smrg    unsigned long	/* background */
16311ab64890Smrg);
16321ab64890Smrgextern Window XGetSelectionOwner(
16331ab64890Smrg    Display*		/* display */,
16341ab64890Smrg    Atom		/* selection */
16351ab64890Smrg);
16361ab64890Smrgextern Window XCreateWindow(
16371ab64890Smrg    Display*		/* display */,
16381ab64890Smrg    Window		/* parent */,
16391ab64890Smrg    int			/* x */,
16401ab64890Smrg    int			/* y */,
16411ab64890Smrg    unsigned int	/* width */,
16421ab64890Smrg    unsigned int	/* height */,
16431ab64890Smrg    unsigned int	/* border_width */,
16441ab64890Smrg    int			/* depth */,
16451ab64890Smrg    unsigned int	/* class */,
16461ab64890Smrg    Visual*		/* visual */,
16471ab64890Smrg    unsigned long	/* valuemask */,
16481ab64890Smrg    XSetWindowAttributes*	/* attributes */
164961b2299dSmrg);
16501ab64890Smrgextern Colormap *XListInstalledColormaps(
16511ab64890Smrg    Display*		/* display */,
16521ab64890Smrg    Window		/* w */,
16531ab64890Smrg    int*		/* num_return */
16541ab64890Smrg);
16551ab64890Smrgextern char **XListFonts(
16561ab64890Smrg    Display*		/* display */,
16571ab64890Smrg    _Xconst char*	/* pattern */,
16581ab64890Smrg    int			/* maxnames */,
16591ab64890Smrg    int*		/* actual_count_return */
16601ab64890Smrg);
16611ab64890Smrgextern char **XListFontsWithInfo(
16621ab64890Smrg    Display*		/* display */,
16631ab64890Smrg    _Xconst char*	/* pattern */,
16641ab64890Smrg    int			/* maxnames */,
16651ab64890Smrg    int*		/* count_return */,
16661ab64890Smrg    XFontStruct**	/* info_return */
16671ab64890Smrg);
16681ab64890Smrgextern char **XGetFontPath(
16691ab64890Smrg    Display*		/* display */,
16701ab64890Smrg    int*		/* npaths_return */
16711ab64890Smrg);
16721ab64890Smrgextern char **XListExtensions(
16731ab64890Smrg    Display*		/* display */,
16741ab64890Smrg    int*		/* nextensions_return */
16751ab64890Smrg);
16761ab64890Smrgextern Atom *XListProperties(
16771ab64890Smrg    Display*		/* display */,
16781ab64890Smrg    Window		/* w */,
16791ab64890Smrg    int*		/* num_prop_return */
16801ab64890Smrg);
16811ab64890Smrgextern XHostAddress *XListHosts(
16821ab64890Smrg    Display*		/* display */,
16831ab64890Smrg    int*		/* nhosts_return */,
16841ab64890Smrg    Bool*		/* state_return */
16851ab64890Smrg);
1686eb411b4bSmrg_X_DEPRECATED
16871ab64890Smrgextern KeySym XKeycodeToKeysym(
16881ab64890Smrg    Display*		/* display */,
16891ab64890Smrg#if NeedWidePrototypes
16901ab64890Smrg    unsigned int	/* keycode */,
16911ab64890Smrg#else
16921ab64890Smrg    KeyCode		/* keycode */,
16931ab64890Smrg#endif
16941ab64890Smrg    int			/* index */
16951ab64890Smrg);
16961ab64890Smrgextern KeySym XLookupKeysym(
16971ab64890Smrg    XKeyEvent*		/* key_event */,
16981ab64890Smrg    int			/* index */
16991ab64890Smrg);
17001ab64890Smrgextern KeySym *XGetKeyboardMapping(
17011ab64890Smrg    Display*		/* display */,
17021ab64890Smrg#if NeedWidePrototypes
17031ab64890Smrg    unsigned int	/* first_keycode */,
17041ab64890Smrg#else
17051ab64890Smrg    KeyCode		/* first_keycode */,
17061ab64890Smrg#endif
17071ab64890Smrg    int			/* keycode_count */,
17081ab64890Smrg    int*		/* keysyms_per_keycode_return */
17091ab64890Smrg);
17101ab64890Smrgextern KeySym XStringToKeysym(
17111ab64890Smrg    _Xconst char*	/* string */
17121ab64890Smrg);
17131ab64890Smrgextern long XMaxRequestSize(
17141ab64890Smrg    Display*		/* display */
17151ab64890Smrg);
17161ab64890Smrgextern long XExtendedMaxRequestSize(
17171ab64890Smrg    Display*		/* display */
17181ab64890Smrg);
17191ab64890Smrgextern char *XResourceManagerString(
17201ab64890Smrg    Display*		/* display */
17211ab64890Smrg);
17221ab64890Smrgextern char *XScreenResourceString(
17231ab64890Smrg	Screen*		/* screen */
17241ab64890Smrg);
17251ab64890Smrgextern unsigned long XDisplayMotionBufferSize(
17261ab64890Smrg    Display*		/* display */
17271ab64890Smrg);
17281ab64890Smrgextern VisualID XVisualIDFromVisual(
17291ab64890Smrg    Visual*		/* visual */
17301ab64890Smrg);
17311ab64890Smrg
17321ab64890Smrg/* multithread routines */
17331ab64890Smrg
17341ab64890Smrgextern Status XInitThreads(
17351ab64890Smrg    void
17361ab64890Smrg);
17371ab64890Smrg
17380efe039aSmartinextern Status XFreeThreads(
17390efe039aSmartin    void
17400efe039aSmartin);
17410efe039aSmartin
17421ab64890Smrgextern void XLockDisplay(
17431ab64890Smrg    Display*		/* display */
17441ab64890Smrg);
17451ab64890Smrg
17461ab64890Smrgextern void XUnlockDisplay(
17471ab64890Smrg    Display*		/* display */
17481ab64890Smrg);
17491ab64890Smrg
17501ab64890Smrg/* routines for dealing with extensions */
17511ab64890Smrg
17521ab64890Smrgextern XExtCodes *XInitExtension(
17531ab64890Smrg    Display*		/* display */,
17541ab64890Smrg    _Xconst char*	/* name */
17551ab64890Smrg);
17561ab64890Smrg
17571ab64890Smrgextern XExtCodes *XAddExtension(
17581ab64890Smrg    Display*		/* display */
17591ab64890Smrg);
17601ab64890Smrgextern XExtData *XFindOnExtensionList(
17611ab64890Smrg    XExtData**		/* structure */,
17621ab64890Smrg    int			/* number */
17631ab64890Smrg);
17641ab64890Smrgextern XExtData **XEHeadOfExtensionList(
17651ab64890Smrg    XEDataObject	/* object */
17661ab64890Smrg);
17671ab64890Smrg
17681ab64890Smrg/* these are routines for which there are also macros */
17691ab64890Smrgextern Window XRootWindow(
17701ab64890Smrg    Display*		/* display */,
17711ab64890Smrg    int			/* screen_number */
17721ab64890Smrg);
17731ab64890Smrgextern Window XDefaultRootWindow(
17741ab64890Smrg    Display*		/* display */
17751ab64890Smrg);
17761ab64890Smrgextern Window XRootWindowOfScreen(
17771ab64890Smrg    Screen*		/* screen */
17781ab64890Smrg);
17791ab64890Smrgextern Visual *XDefaultVisual(
17801ab64890Smrg    Display*		/* display */,
17811ab64890Smrg    int			/* screen_number */
17821ab64890Smrg);
17831ab64890Smrgextern Visual *XDefaultVisualOfScreen(
17841ab64890Smrg    Screen*		/* screen */
17851ab64890Smrg);
17861ab64890Smrgextern GC XDefaultGC(
17871ab64890Smrg    Display*		/* display */,
17881ab64890Smrg    int			/* screen_number */
17891ab64890Smrg);
17901ab64890Smrgextern GC XDefaultGCOfScreen(
17911ab64890Smrg    Screen*		/* screen */
17921ab64890Smrg);
17931ab64890Smrgextern unsigned long XBlackPixel(
17941ab64890Smrg    Display*		/* display */,
17951ab64890Smrg    int			/* screen_number */
17961ab64890Smrg);
17971ab64890Smrgextern unsigned long XWhitePixel(
17981ab64890Smrg    Display*		/* display */,
17991ab64890Smrg    int			/* screen_number */
18001ab64890Smrg);
18011ab64890Smrgextern unsigned long XAllPlanes(
18021ab64890Smrg    void
18031ab64890Smrg);
18041ab64890Smrgextern unsigned long XBlackPixelOfScreen(
18051ab64890Smrg    Screen*		/* screen */
18061ab64890Smrg);
18071ab64890Smrgextern unsigned long XWhitePixelOfScreen(
18081ab64890Smrg    Screen*		/* screen */
18091ab64890Smrg);
18101ab64890Smrgextern unsigned long XNextRequest(
18111ab64890Smrg    Display*		/* display */
18121ab64890Smrg);
18131ab64890Smrgextern unsigned long XLastKnownRequestProcessed(
18141ab64890Smrg    Display*		/* display */
18151ab64890Smrg);
18161ab64890Smrgextern char *XServerVendor(
18171ab64890Smrg    Display*		/* display */
18181ab64890Smrg);
18191ab64890Smrgextern char *XDisplayString(
18201ab64890Smrg    Display*		/* display */
18211ab64890Smrg);
18221ab64890Smrgextern Colormap XDefaultColormap(
18231ab64890Smrg    Display*		/* display */,
18241ab64890Smrg    int			/* screen_number */
18251ab64890Smrg);
18261ab64890Smrgextern Colormap XDefaultColormapOfScreen(
18271ab64890Smrg    Screen*		/* screen */
18281ab64890Smrg);
18291ab64890Smrgextern Display *XDisplayOfScreen(
18301ab64890Smrg    Screen*		/* screen */
18311ab64890Smrg);
18321ab64890Smrgextern Screen *XScreenOfDisplay(
18331ab64890Smrg    Display*		/* display */,
18341ab64890Smrg    int			/* screen_number */
18351ab64890Smrg);
18361ab64890Smrgextern Screen *XDefaultScreenOfDisplay(
18371ab64890Smrg    Display*		/* display */
18381ab64890Smrg);
18391ab64890Smrgextern long XEventMaskOfScreen(
18401ab64890Smrg    Screen*		/* screen */
18411ab64890Smrg);
18421ab64890Smrg
18431ab64890Smrgextern int XScreenNumberOfScreen(
18441ab64890Smrg    Screen*		/* screen */
18451ab64890Smrg);
18461ab64890Smrg
18471ab64890Smrgtypedef int (*XErrorHandler) (	    /* WARNING, this type not in Xlib spec */
18481ab64890Smrg    Display*		/* display */,
18491ab64890Smrg    XErrorEvent*	/* error_event */
18501ab64890Smrg);
18511ab64890Smrg
18521ab64890Smrgextern XErrorHandler XSetErrorHandler (
18531ab64890Smrg    XErrorHandler	/* handler */
18541ab64890Smrg);
18551ab64890Smrg
18561ab64890Smrg
18571ab64890Smrgtypedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
18581ab64890Smrg    Display*		/* display */
18591ab64890Smrg);
18601ab64890Smrg
18611ab64890Smrgextern XIOErrorHandler XSetIOErrorHandler (
18621ab64890Smrg    XIOErrorHandler	/* handler */
18631ab64890Smrg);
18641ab64890Smrg
1865d4a3aaf4Smrgtypedef void (*XIOErrorExitHandler) ( /* WARNING, this type not in Xlib spec */
1866d4a3aaf4Smrg    Display*,		/* display */
1867d4a3aaf4Smrg    void*		/* user_data */
1868d4a3aaf4Smrg);
1869d4a3aaf4Smrg
1870d4a3aaf4Smrgextern void XSetIOErrorExitHandler (
1871d4a3aaf4Smrg    Display*,			/* display */
1872d4a3aaf4Smrg    XIOErrorExitHandler,	/* handler */
1873d4a3aaf4Smrg    void*			/* user_data */
1874d4a3aaf4Smrg);
18751ab64890Smrg
18761ab64890Smrgextern XPixmapFormatValues *XListPixmapFormats(
18771ab64890Smrg    Display*		/* display */,
18781ab64890Smrg    int*		/* count_return */
18791ab64890Smrg);
18801ab64890Smrgextern int *XListDepths(
18811ab64890Smrg    Display*		/* display */,
18821ab64890Smrg    int			/* screen_number */,
18831ab64890Smrg    int*		/* count_return */
18841ab64890Smrg);
18851ab64890Smrg
18861ab64890Smrg/* ICCCM routines for things that don't require special include files; */
18871ab64890Smrg/* other declarations are given in Xutil.h                             */
18881ab64890Smrgextern Status XReconfigureWMWindow(
18891ab64890Smrg    Display*		/* display */,
18901ab64890Smrg    Window		/* w */,
18911ab64890Smrg    int			/* screen_number */,
18921ab64890Smrg    unsigned int	/* mask */,
18931ab64890Smrg    XWindowChanges*	/* changes */
18941ab64890Smrg);
18951ab64890Smrg
18961ab64890Smrgextern Status XGetWMProtocols(
18971ab64890Smrg    Display*		/* display */,
18981ab64890Smrg    Window		/* w */,
18991ab64890Smrg    Atom**		/* protocols_return */,
19001ab64890Smrg    int*		/* count_return */
19011ab64890Smrg);
19021ab64890Smrgextern Status XSetWMProtocols(
19031ab64890Smrg    Display*		/* display */,
19041ab64890Smrg    Window		/* w */,
19051ab64890Smrg    Atom*		/* protocols */,
19061ab64890Smrg    int			/* count */
19071ab64890Smrg);
19081ab64890Smrgextern Status XIconifyWindow(
19091ab64890Smrg    Display*		/* display */,
19101ab64890Smrg    Window		/* w */,
19111ab64890Smrg    int			/* screen_number */
19121ab64890Smrg);
19131ab64890Smrgextern Status XWithdrawWindow(
19141ab64890Smrg    Display*		/* display */,
19151ab64890Smrg    Window		/* w */,
19161ab64890Smrg    int			/* screen_number */
19171ab64890Smrg);
19181ab64890Smrgextern Status XGetCommand(
19191ab64890Smrg    Display*		/* display */,
19201ab64890Smrg    Window		/* w */,
19211ab64890Smrg    char***		/* argv_return */,
19221ab64890Smrg    int*		/* argc_return */
19231ab64890Smrg);
19241ab64890Smrgextern Status XGetWMColormapWindows(
19251ab64890Smrg    Display*		/* display */,
19261ab64890Smrg    Window		/* w */,
19271ab64890Smrg    Window**		/* windows_return */,
19281ab64890Smrg    int*		/* count_return */
19291ab64890Smrg);
19301ab64890Smrgextern Status XSetWMColormapWindows(
19311ab64890Smrg    Display*		/* display */,
19321ab64890Smrg    Window		/* w */,
19331ab64890Smrg    Window*		/* colormap_windows */,
19341ab64890Smrg    int			/* count */
19351ab64890Smrg);
19361ab64890Smrgextern void XFreeStringList(
19371ab64890Smrg    char**		/* list */
19381ab64890Smrg);
19391ab64890Smrgextern int XSetTransientForHint(
19401ab64890Smrg    Display*		/* display */,
19411ab64890Smrg    Window		/* w */,
19421ab64890Smrg    Window		/* prop_window */
19431ab64890Smrg);
19441ab64890Smrg
19451ab64890Smrg/* The following are given in alphabetical order */
19461ab64890Smrg
19471ab64890Smrgextern int XActivateScreenSaver(
19481ab64890Smrg    Display*		/* display */
19491ab64890Smrg);
19501ab64890Smrg
19511ab64890Smrgextern int XAddHost(
19521ab64890Smrg    Display*		/* display */,
19531ab64890Smrg    XHostAddress*	/* host */
19541ab64890Smrg);
19551ab64890Smrg
19561ab64890Smrgextern int XAddHosts(
19571ab64890Smrg    Display*		/* display */,
19581ab64890Smrg    XHostAddress*	/* hosts */,
195961b2299dSmrg    int			/* num_hosts */
19601ab64890Smrg);
19611ab64890Smrg
19621ab64890Smrgextern int XAddToExtensionList(
19631ab64890Smrg    struct _XExtData**	/* structure */,
19641ab64890Smrg    XExtData*		/* ext_data */
19651ab64890Smrg);
19661ab64890Smrg
19671ab64890Smrgextern int XAddToSaveSet(
19681ab64890Smrg    Display*		/* display */,
19691ab64890Smrg    Window		/* w */
19701ab64890Smrg);
19711ab64890Smrg
19721ab64890Smrgextern Status XAllocColor(
19731ab64890Smrg    Display*		/* display */,
19741ab64890Smrg    Colormap		/* colormap */,
19751ab64890Smrg    XColor*		/* screen_in_out */
19761ab64890Smrg);
19771ab64890Smrg
19781ab64890Smrgextern Status XAllocColorCells(
19791ab64890Smrg    Display*		/* display */,
19801ab64890Smrg    Colormap		/* colormap */,
19811ab64890Smrg    Bool	        /* contig */,
19821ab64890Smrg    unsigned long*	/* plane_masks_return */,
19831ab64890Smrg    unsigned int	/* nplanes */,
19841ab64890Smrg    unsigned long*	/* pixels_return */,
19851ab64890Smrg    unsigned int 	/* npixels */
19861ab64890Smrg);
19871ab64890Smrg
19881ab64890Smrgextern Status XAllocColorPlanes(
19891ab64890Smrg    Display*		/* display */,
19901ab64890Smrg    Colormap		/* colormap */,
19911ab64890Smrg    Bool		/* contig */,
19921ab64890Smrg    unsigned long*	/* pixels_return */,
19931ab64890Smrg    int			/* ncolors */,
19941ab64890Smrg    int			/* nreds */,
19951ab64890Smrg    int			/* ngreens */,
19961ab64890Smrg    int			/* nblues */,
19971ab64890Smrg    unsigned long*	/* rmask_return */,
19981ab64890Smrg    unsigned long*	/* gmask_return */,
19991ab64890Smrg    unsigned long*	/* bmask_return */
20001ab64890Smrg);
20011ab64890Smrg
20021ab64890Smrgextern Status XAllocNamedColor(
20031ab64890Smrg    Display*		/* display */,
20041ab64890Smrg    Colormap		/* colormap */,
20051ab64890Smrg    _Xconst char*	/* color_name */,
20061ab64890Smrg    XColor*		/* screen_def_return */,
20071ab64890Smrg    XColor*		/* exact_def_return */
20081ab64890Smrg);
20091ab64890Smrg
20101ab64890Smrgextern int XAllowEvents(
20111ab64890Smrg    Display*		/* display */,
20121ab64890Smrg    int			/* event_mode */,
20131ab64890Smrg    Time		/* time */
20141ab64890Smrg);
20151ab64890Smrg
20161ab64890Smrgextern int XAutoRepeatOff(
20171ab64890Smrg    Display*		/* display */
20181ab64890Smrg);
20191ab64890Smrg
20201ab64890Smrgextern int XAutoRepeatOn(
20211ab64890Smrg    Display*		/* display */
20221ab64890Smrg);
20231ab64890Smrg
20241ab64890Smrgextern int XBell(
20251ab64890Smrg    Display*		/* display */,
20261ab64890Smrg    int			/* percent */
20271ab64890Smrg);
20281ab64890Smrg
20291ab64890Smrgextern int XBitmapBitOrder(
20301ab64890Smrg    Display*		/* display */
20311ab64890Smrg);
20321ab64890Smrg
20331ab64890Smrgextern int XBitmapPad(
20341ab64890Smrg    Display*		/* display */
20351ab64890Smrg);
20361ab64890Smrg
20371ab64890Smrgextern int XBitmapUnit(
20381ab64890Smrg    Display*		/* display */
20391ab64890Smrg);
20401ab64890Smrg
20411ab64890Smrgextern int XCellsOfScreen(
20421ab64890Smrg    Screen*		/* screen */
20431ab64890Smrg);
20441ab64890Smrg
20451ab64890Smrgextern int XChangeActivePointerGrab(
20461ab64890Smrg    Display*		/* display */,
20471ab64890Smrg    unsigned int	/* event_mask */,
20481ab64890Smrg    Cursor		/* cursor */,
20491ab64890Smrg    Time		/* time */
20501ab64890Smrg);
20511ab64890Smrg
20521ab64890Smrgextern int XChangeGC(
20531ab64890Smrg    Display*		/* display */,
20541ab64890Smrg    GC			/* gc */,
20551ab64890Smrg    unsigned long	/* valuemask */,
20561ab64890Smrg    XGCValues*		/* values */
20571ab64890Smrg);
20581ab64890Smrg
20591ab64890Smrgextern int XChangeKeyboardControl(
20601ab64890Smrg    Display*		/* display */,
20611ab64890Smrg    unsigned long	/* value_mask */,
20621ab64890Smrg    XKeyboardControl*	/* values */
20631ab64890Smrg);
20641ab64890Smrg
20651ab64890Smrgextern int XChangeKeyboardMapping(
20661ab64890Smrg    Display*		/* display */,
20671ab64890Smrg    int			/* first_keycode */,
20681ab64890Smrg    int			/* keysyms_per_keycode */,
20691ab64890Smrg    KeySym*		/* keysyms */,
20701ab64890Smrg    int			/* num_codes */
20711ab64890Smrg);
20721ab64890Smrg
20731ab64890Smrgextern int XChangePointerControl(
20741ab64890Smrg    Display*		/* display */,
20751ab64890Smrg    Bool		/* do_accel */,
20761ab64890Smrg    Bool		/* do_threshold */,
20771ab64890Smrg    int			/* accel_numerator */,
20781ab64890Smrg    int			/* accel_denominator */,
20791ab64890Smrg    int			/* threshold */
20801ab64890Smrg);
20811ab64890Smrg
20821ab64890Smrgextern int XChangeProperty(
20831ab64890Smrg    Display*		/* display */,
20841ab64890Smrg    Window		/* w */,
20851ab64890Smrg    Atom		/* property */,
20861ab64890Smrg    Atom		/* type */,
20871ab64890Smrg    int			/* format */,
20881ab64890Smrg    int			/* mode */,
20891ab64890Smrg    _Xconst unsigned char*	/* data */,
20901ab64890Smrg    int			/* nelements */
20911ab64890Smrg);
20921ab64890Smrg
20931ab64890Smrgextern int XChangeSaveSet(
20941ab64890Smrg    Display*		/* display */,
20951ab64890Smrg    Window		/* w */,
20961ab64890Smrg    int			/* change_mode */
20971ab64890Smrg);
20981ab64890Smrg
20991ab64890Smrgextern int XChangeWindowAttributes(
21001ab64890Smrg    Display*		/* display */,
21011ab64890Smrg    Window		/* w */,
21021ab64890Smrg    unsigned long	/* valuemask */,
21031ab64890Smrg    XSetWindowAttributes* /* attributes */
21041ab64890Smrg);
21051ab64890Smrg
21061ab64890Smrgextern Bool XCheckIfEvent(
21071ab64890Smrg    Display*		/* display */,
21081ab64890Smrg    XEvent*		/* event_return */,
21091ab64890Smrg    Bool (*) (
21101ab64890Smrg	       Display*			/* display */,
21111ab64890Smrg               XEvent*			/* event */,
21121ab64890Smrg               XPointer			/* arg */
21131ab64890Smrg             )		/* predicate */,
21141ab64890Smrg    XPointer		/* arg */
21151ab64890Smrg);
21161ab64890Smrg
21171ab64890Smrgextern Bool XCheckMaskEvent(
21181ab64890Smrg    Display*		/* display */,
21191ab64890Smrg    long		/* event_mask */,
21201ab64890Smrg    XEvent*		/* event_return */
21211ab64890Smrg);
21221ab64890Smrg
21231ab64890Smrgextern Bool XCheckTypedEvent(
21241ab64890Smrg    Display*		/* display */,
21251ab64890Smrg    int			/* event_type */,
21261ab64890Smrg    XEvent*		/* event_return */
21271ab64890Smrg);
21281ab64890Smrg
21291ab64890Smrgextern Bool XCheckTypedWindowEvent(
21301ab64890Smrg    Display*		/* display */,
21311ab64890Smrg    Window		/* w */,
21321ab64890Smrg    int			/* event_type */,
21331ab64890Smrg    XEvent*		/* event_return */
21341ab64890Smrg);
21351ab64890Smrg
21361ab64890Smrgextern Bool XCheckWindowEvent(
21371ab64890Smrg    Display*		/* display */,
21381ab64890Smrg    Window		/* w */,
21391ab64890Smrg    long		/* event_mask */,
21401ab64890Smrg    XEvent*		/* event_return */
21411ab64890Smrg);
21421ab64890Smrg
21431ab64890Smrgextern int XCirculateSubwindows(
21441ab64890Smrg    Display*		/* display */,
21451ab64890Smrg    Window		/* w */,
21461ab64890Smrg    int			/* direction */
21471ab64890Smrg);
21481ab64890Smrg
21491ab64890Smrgextern int XCirculateSubwindowsDown(
21501ab64890Smrg    Display*		/* display */,
21511ab64890Smrg    Window		/* w */
21521ab64890Smrg);
21531ab64890Smrg
21541ab64890Smrgextern int XCirculateSubwindowsUp(
21551ab64890Smrg    Display*		/* display */,
21561ab64890Smrg    Window		/* w */
21571ab64890Smrg);
21581ab64890Smrg
21591ab64890Smrgextern int XClearArea(
21601ab64890Smrg    Display*		/* display */,
21611ab64890Smrg    Window		/* w */,
21621ab64890Smrg    int			/* x */,
21631ab64890Smrg    int			/* y */,
21641ab64890Smrg    unsigned int	/* width */,
21651ab64890Smrg    unsigned int	/* height */,
21661ab64890Smrg    Bool		/* exposures */
21671ab64890Smrg);
21681ab64890Smrg
21691ab64890Smrgextern int XClearWindow(
21701ab64890Smrg    Display*		/* display */,
21711ab64890Smrg    Window		/* w */
21721ab64890Smrg);
21731ab64890Smrg
21741ab64890Smrgextern int XCloseDisplay(
21751ab64890Smrg    Display*		/* display */
21761ab64890Smrg);
21771ab64890Smrg
21781ab64890Smrgextern int XConfigureWindow(
21791ab64890Smrg    Display*		/* display */,
21801ab64890Smrg    Window		/* w */,
21811ab64890Smrg    unsigned int	/* value_mask */,
218261b2299dSmrg    XWindowChanges*	/* values */
21831ab64890Smrg);
21841ab64890Smrg
21851ab64890Smrgextern int XConnectionNumber(
21861ab64890Smrg    Display*		/* display */
21871ab64890Smrg);
21881ab64890Smrg
21891ab64890Smrgextern int XConvertSelection(
21901ab64890Smrg    Display*		/* display */,
21911ab64890Smrg    Atom		/* selection */,
21921ab64890Smrg    Atom 		/* target */,
21931ab64890Smrg    Atom		/* property */,
21941ab64890Smrg    Window		/* requestor */,
21951ab64890Smrg    Time		/* time */
21961ab64890Smrg);
21971ab64890Smrg
21981ab64890Smrgextern int XCopyArea(
21991ab64890Smrg    Display*		/* display */,
22001ab64890Smrg    Drawable		/* src */,
22011ab64890Smrg    Drawable		/* dest */,
22021ab64890Smrg    GC			/* gc */,
22031ab64890Smrg    int			/* src_x */,
22041ab64890Smrg    int			/* src_y */,
22051ab64890Smrg    unsigned int	/* width */,
22061ab64890Smrg    unsigned int	/* height */,
22071ab64890Smrg    int			/* dest_x */,
22081ab64890Smrg    int			/* dest_y */
22091ab64890Smrg);
22101ab64890Smrg
22111ab64890Smrgextern int XCopyGC(
22121ab64890Smrg    Display*		/* display */,
22131ab64890Smrg    GC			/* src */,
22141ab64890Smrg    unsigned long	/* valuemask */,
22151ab64890Smrg    GC			/* dest */
22161ab64890Smrg);
22171ab64890Smrg
22181ab64890Smrgextern int XCopyPlane(
22191ab64890Smrg    Display*		/* display */,
22201ab64890Smrg    Drawable		/* src */,
22211ab64890Smrg    Drawable		/* dest */,
22221ab64890Smrg    GC			/* gc */,
22231ab64890Smrg    int			/* src_x */,
22241ab64890Smrg    int			/* src_y */,
22251ab64890Smrg    unsigned int	/* width */,
22261ab64890Smrg    unsigned int	/* height */,
22271ab64890Smrg    int			/* dest_x */,
22281ab64890Smrg    int			/* dest_y */,
22291ab64890Smrg    unsigned long	/* plane */
22301ab64890Smrg);
22311ab64890Smrg
22321ab64890Smrgextern int XDefaultDepth(
22331ab64890Smrg    Display*		/* display */,
22341ab64890Smrg    int			/* screen_number */
22351ab64890Smrg);
22361ab64890Smrg
22371ab64890Smrgextern int XDefaultDepthOfScreen(
22381ab64890Smrg    Screen*		/* screen */
22391ab64890Smrg);
22401ab64890Smrg
22411ab64890Smrgextern int XDefaultScreen(
22421ab64890Smrg    Display*		/* display */
22431ab64890Smrg);
22441ab64890Smrg
22451ab64890Smrgextern int XDefineCursor(
22461ab64890Smrg    Display*		/* display */,
22471ab64890Smrg    Window		/* w */,
22481ab64890Smrg    Cursor		/* cursor */
22491ab64890Smrg);
22501ab64890Smrg
22511ab64890Smrgextern int XDeleteProperty(
22521ab64890Smrg    Display*		/* display */,
22531ab64890Smrg    Window		/* w */,
22541ab64890Smrg    Atom		/* property */
22551ab64890Smrg);
22561ab64890Smrg
22571ab64890Smrgextern int XDestroyWindow(
22581ab64890Smrg    Display*		/* display */,
22591ab64890Smrg    Window		/* w */
22601ab64890Smrg);
22611ab64890Smrg
22621ab64890Smrgextern int XDestroySubwindows(
22631ab64890Smrg    Display*		/* display */,
22641ab64890Smrg    Window		/* w */
22651ab64890Smrg);
22661ab64890Smrg
22671ab64890Smrgextern int XDoesBackingStore(
226861b2299dSmrg    Screen*		/* screen */
22691ab64890Smrg);
22701ab64890Smrg
22711ab64890Smrgextern Bool XDoesSaveUnders(
22721ab64890Smrg    Screen*		/* screen */
22731ab64890Smrg);
22741ab64890Smrg
22751ab64890Smrgextern int XDisableAccessControl(
22761ab64890Smrg    Display*		/* display */
22771ab64890Smrg);
22781ab64890Smrg
22791ab64890Smrg
22801ab64890Smrgextern int XDisplayCells(
22811ab64890Smrg    Display*		/* display */,
22821ab64890Smrg    int			/* screen_number */
22831ab64890Smrg);
22841ab64890Smrg
22851ab64890Smrgextern int XDisplayHeight(
22861ab64890Smrg    Display*		/* display */,
22871ab64890Smrg    int			/* screen_number */
22881ab64890Smrg);
22891ab64890Smrg
22901ab64890Smrgextern int XDisplayHeightMM(
22911ab64890Smrg    Display*		/* display */,
22921ab64890Smrg    int			/* screen_number */
22931ab64890Smrg);
22941ab64890Smrg
22951ab64890Smrgextern int XDisplayKeycodes(
22961ab64890Smrg    Display*		/* display */,
22971ab64890Smrg    int*		/* min_keycodes_return */,
22981ab64890Smrg    int*		/* max_keycodes_return */
22991ab64890Smrg);
23001ab64890Smrg
23011ab64890Smrgextern int XDisplayPlanes(
23021ab64890Smrg    Display*		/* display */,
23031ab64890Smrg    int			/* screen_number */
23041ab64890Smrg);
23051ab64890Smrg
23061ab64890Smrgextern int XDisplayWidth(
23071ab64890Smrg    Display*		/* display */,
23081ab64890Smrg    int			/* screen_number */
23091ab64890Smrg);
23101ab64890Smrg
23111ab64890Smrgextern int XDisplayWidthMM(
23121ab64890Smrg    Display*		/* display */,
23131ab64890Smrg    int			/* screen_number */
23141ab64890Smrg);
23151ab64890Smrg
23161ab64890Smrgextern int XDrawArc(
23171ab64890Smrg    Display*		/* display */,
23181ab64890Smrg    Drawable		/* d */,
23191ab64890Smrg    GC			/* gc */,
23201ab64890Smrg    int			/* x */,
23211ab64890Smrg    int			/* y */,
23221ab64890Smrg    unsigned int	/* width */,
23231ab64890Smrg    unsigned int	/* height */,
23241ab64890Smrg    int			/* angle1 */,
23251ab64890Smrg    int			/* angle2 */
23261ab64890Smrg);
23271ab64890Smrg
23281ab64890Smrgextern int XDrawArcs(
23291ab64890Smrg    Display*		/* display */,
23301ab64890Smrg    Drawable		/* d */,
23311ab64890Smrg    GC			/* gc */,
23321ab64890Smrg    XArc*		/* arcs */,
23331ab64890Smrg    int			/* narcs */
23341ab64890Smrg);
23351ab64890Smrg
23361ab64890Smrgextern int XDrawImageString(
23371ab64890Smrg    Display*		/* display */,
23381ab64890Smrg    Drawable		/* d */,
23391ab64890Smrg    GC			/* gc */,
23401ab64890Smrg    int			/* x */,
23411ab64890Smrg    int			/* y */,
23421ab64890Smrg    _Xconst char*	/* string */,
23431ab64890Smrg    int			/* length */
23441ab64890Smrg);
23451ab64890Smrg
23461ab64890Smrgextern int XDrawImageString16(
23471ab64890Smrg    Display*		/* display */,
23481ab64890Smrg    Drawable		/* d */,
23491ab64890Smrg    GC			/* gc */,
23501ab64890Smrg    int			/* x */,
23511ab64890Smrg    int			/* y */,
23521ab64890Smrg    _Xconst XChar2b*	/* string */,
23531ab64890Smrg    int			/* length */
23541ab64890Smrg);
23551ab64890Smrg
23561ab64890Smrgextern int XDrawLine(
23571ab64890Smrg    Display*		/* display */,
23581ab64890Smrg    Drawable		/* d */,
23591ab64890Smrg    GC			/* gc */,
23601ab64890Smrg    int			/* x1 */,
23611ab64890Smrg    int			/* y1 */,
23621ab64890Smrg    int			/* x2 */,
23631ab64890Smrg    int			/* y2 */
23641ab64890Smrg);
23651ab64890Smrg
23661ab64890Smrgextern int XDrawLines(
23671ab64890Smrg    Display*		/* display */,
23681ab64890Smrg    Drawable		/* d */,
23691ab64890Smrg    GC			/* gc */,
23701ab64890Smrg    XPoint*		/* points */,
23711ab64890Smrg    int			/* npoints */,
23721ab64890Smrg    int			/* mode */
23731ab64890Smrg);
23741ab64890Smrg
23751ab64890Smrgextern int XDrawPoint(
23761ab64890Smrg    Display*		/* display */,
23771ab64890Smrg    Drawable		/* d */,
23781ab64890Smrg    GC			/* gc */,
23791ab64890Smrg    int			/* x */,
23801ab64890Smrg    int			/* y */
23811ab64890Smrg);
23821ab64890Smrg
23831ab64890Smrgextern int XDrawPoints(
23841ab64890Smrg    Display*		/* display */,
23851ab64890Smrg    Drawable		/* d */,
23861ab64890Smrg    GC			/* gc */,
23871ab64890Smrg    XPoint*		/* points */,
23881ab64890Smrg    int			/* npoints */,
23891ab64890Smrg    int			/* mode */
23901ab64890Smrg);
23911ab64890Smrg
23921ab64890Smrgextern int XDrawRectangle(
23931ab64890Smrg    Display*		/* display */,
23941ab64890Smrg    Drawable		/* d */,
23951ab64890Smrg    GC			/* gc */,
23961ab64890Smrg    int			/* x */,
23971ab64890Smrg    int			/* y */,
23981ab64890Smrg    unsigned int	/* width */,
23991ab64890Smrg    unsigned int	/* height */
24001ab64890Smrg);
24011ab64890Smrg
24021ab64890Smrgextern int XDrawRectangles(
24031ab64890Smrg    Display*		/* display */,
24041ab64890Smrg    Drawable		/* d */,
24051ab64890Smrg    GC			/* gc */,
24061ab64890Smrg    XRectangle*		/* rectangles */,
24071ab64890Smrg    int			/* nrectangles */
24081ab64890Smrg);
24091ab64890Smrg
24101ab64890Smrgextern int XDrawSegments(
24111ab64890Smrg    Display*		/* display */,
24121ab64890Smrg    Drawable		/* d */,
24131ab64890Smrg    GC			/* gc */,
24141ab64890Smrg    XSegment*		/* segments */,
24151ab64890Smrg    int			/* nsegments */
24161ab64890Smrg);
24171ab64890Smrg
24181ab64890Smrgextern int XDrawString(
24191ab64890Smrg    Display*		/* display */,
24201ab64890Smrg    Drawable		/* d */,
24211ab64890Smrg    GC			/* gc */,
24221ab64890Smrg    int			/* x */,
24231ab64890Smrg    int			/* y */,
24241ab64890Smrg    _Xconst char*	/* string */,
24251ab64890Smrg    int			/* length */
24261ab64890Smrg);
24271ab64890Smrg
24281ab64890Smrgextern int XDrawString16(
24291ab64890Smrg    Display*		/* display */,
24301ab64890Smrg    Drawable		/* d */,
24311ab64890Smrg    GC			/* gc */,
24321ab64890Smrg    int			/* x */,
24331ab64890Smrg    int			/* y */,
24341ab64890Smrg    _Xconst XChar2b*	/* string */,
24351ab64890Smrg    int			/* length */
24361ab64890Smrg);
24371ab64890Smrg
24381ab64890Smrgextern int XDrawText(
24391ab64890Smrg    Display*		/* display */,
24401ab64890Smrg    Drawable		/* d */,
24411ab64890Smrg    GC			/* gc */,
24421ab64890Smrg    int			/* x */,
24431ab64890Smrg    int			/* y */,
24441ab64890Smrg    XTextItem*		/* items */,
24451ab64890Smrg    int			/* nitems */
24461ab64890Smrg);
24471ab64890Smrg
24481ab64890Smrgextern int XDrawText16(
24491ab64890Smrg    Display*		/* display */,
24501ab64890Smrg    Drawable		/* d */,
24511ab64890Smrg    GC			/* gc */,
24521ab64890Smrg    int			/* x */,
24531ab64890Smrg    int			/* y */,
24541ab64890Smrg    XTextItem16*	/* items */,
24551ab64890Smrg    int			/* nitems */
24561ab64890Smrg);
24571ab64890Smrg
24581ab64890Smrgextern int XEnableAccessControl(
24591ab64890Smrg    Display*		/* display */
24601ab64890Smrg);
24611ab64890Smrg
24621ab64890Smrgextern int XEventsQueued(
24631ab64890Smrg    Display*		/* display */,
24641ab64890Smrg    int			/* mode */
24651ab64890Smrg);
24661ab64890Smrg
24671ab64890Smrgextern Status XFetchName(
24681ab64890Smrg    Display*		/* display */,
24691ab64890Smrg    Window		/* w */,
24701ab64890Smrg    char**		/* window_name_return */
24711ab64890Smrg);
24721ab64890Smrg
24731ab64890Smrgextern int XFillArc(
24741ab64890Smrg    Display*		/* display */,
24751ab64890Smrg    Drawable		/* d */,
24761ab64890Smrg    GC			/* gc */,
24771ab64890Smrg    int			/* x */,
24781ab64890Smrg    int			/* y */,
24791ab64890Smrg    unsigned int	/* width */,
24801ab64890Smrg    unsigned int	/* height */,
24811ab64890Smrg    int			/* angle1 */,
24821ab64890Smrg    int			/* angle2 */
24831ab64890Smrg);
24841ab64890Smrg
24851ab64890Smrgextern int XFillArcs(
24861ab64890Smrg    Display*		/* display */,
24871ab64890Smrg    Drawable		/* d */,
24881ab64890Smrg    GC			/* gc */,
24891ab64890Smrg    XArc*		/* arcs */,
24901ab64890Smrg    int			/* narcs */
24911ab64890Smrg);
24921ab64890Smrg
24931ab64890Smrgextern int XFillPolygon(
24941ab64890Smrg    Display*		/* display */,
24951ab64890Smrg    Drawable		/* d */,
24961ab64890Smrg    GC			/* gc */,
24971ab64890Smrg    XPoint*		/* points */,
24981ab64890Smrg    int			/* npoints */,
24991ab64890Smrg    int			/* shape */,
25001ab64890Smrg    int			/* mode */
25011ab64890Smrg);
25021ab64890Smrg
25031ab64890Smrgextern int XFillRectangle(
25041ab64890Smrg    Display*		/* display */,
25051ab64890Smrg    Drawable		/* d */,
25061ab64890Smrg    GC			/* gc */,
25071ab64890Smrg    int			/* x */,
25081ab64890Smrg    int			/* y */,
25091ab64890Smrg    unsigned int	/* width */,
25101ab64890Smrg    unsigned int	/* height */
25111ab64890Smrg);
25121ab64890Smrg
25131ab64890Smrgextern int XFillRectangles(
25141ab64890Smrg    Display*		/* display */,
25151ab64890Smrg    Drawable		/* d */,
25161ab64890Smrg    GC			/* gc */,
25171ab64890Smrg    XRectangle*		/* rectangles */,
25181ab64890Smrg    int			/* nrectangles */
25191ab64890Smrg);
25201ab64890Smrg
25211ab64890Smrgextern int XFlush(
25221ab64890Smrg    Display*		/* display */
25231ab64890Smrg);
25241ab64890Smrg
25251ab64890Smrgextern int XForceScreenSaver(
25261ab64890Smrg    Display*		/* display */,
25271ab64890Smrg    int			/* mode */
25281ab64890Smrg);
25291ab64890Smrg
25301ab64890Smrgextern int XFree(
25311ab64890Smrg    void*		/* data */
25321ab64890Smrg);
25331ab64890Smrg
25341ab64890Smrgextern int XFreeColormap(
25351ab64890Smrg    Display*		/* display */,
25361ab64890Smrg    Colormap		/* colormap */
25371ab64890Smrg);
25381ab64890Smrg
25391ab64890Smrgextern int XFreeColors(
25401ab64890Smrg    Display*		/* display */,
25411ab64890Smrg    Colormap		/* colormap */,
25421ab64890Smrg    unsigned long*	/* pixels */,
25431ab64890Smrg    int			/* npixels */,
25441ab64890Smrg    unsigned long	/* planes */
25451ab64890Smrg);
25461ab64890Smrg
25471ab64890Smrgextern int XFreeCursor(
25481ab64890Smrg    Display*		/* display */,
25491ab64890Smrg    Cursor		/* cursor */
25501ab64890Smrg);
25511ab64890Smrg
25521ab64890Smrgextern int XFreeExtensionList(
255361b2299dSmrg    char**		/* list */
25541ab64890Smrg);
25551ab64890Smrg
25561ab64890Smrgextern int XFreeFont(
25571ab64890Smrg    Display*		/* display */,
25581ab64890Smrg    XFontStruct*	/* font_struct */
25591ab64890Smrg);
25601ab64890Smrg
25611ab64890Smrgextern int XFreeFontInfo(
25621ab64890Smrg    char**		/* names */,
25631ab64890Smrg    XFontStruct*	/* free_info */,
25641ab64890Smrg    int			/* actual_count */
25651ab64890Smrg);
25661ab64890Smrg
25671ab64890Smrgextern int XFreeFontNames(
25681ab64890Smrg    char**		/* list */
25691ab64890Smrg);
25701ab64890Smrg
25711ab64890Smrgextern int XFreeFontPath(
25721ab64890Smrg    char**		/* list */
25731ab64890Smrg);
25741ab64890Smrg
25751ab64890Smrgextern int XFreeGC(
25761ab64890Smrg    Display*		/* display */,
25771ab64890Smrg    GC			/* gc */
25781ab64890Smrg);
25791ab64890Smrg
25801ab64890Smrgextern int XFreeModifiermap(
25811ab64890Smrg    XModifierKeymap*	/* modmap */
25821ab64890Smrg);
25831ab64890Smrg
25841ab64890Smrgextern int XFreePixmap(
25851ab64890Smrg    Display*		/* display */,
25861ab64890Smrg    Pixmap		/* pixmap */
25871ab64890Smrg);
25881ab64890Smrg
25891ab64890Smrgextern int XGeometry(
25901ab64890Smrg    Display*		/* display */,
25911ab64890Smrg    int			/* screen */,
25921ab64890Smrg    _Xconst char*	/* position */,
25931ab64890Smrg    _Xconst char*	/* default_position */,
25941ab64890Smrg    unsigned int	/* bwidth */,
25951ab64890Smrg    unsigned int	/* fwidth */,
25961ab64890Smrg    unsigned int	/* fheight */,
25971ab64890Smrg    int			/* xadder */,
25981ab64890Smrg    int			/* yadder */,
25991ab64890Smrg    int*		/* x_return */,
26001ab64890Smrg    int*		/* y_return */,
26011ab64890Smrg    int*		/* width_return */,
26021ab64890Smrg    int*		/* height_return */
26031ab64890Smrg);
26041ab64890Smrg
26051ab64890Smrgextern int XGetErrorDatabaseText(
26061ab64890Smrg    Display*		/* display */,
26071ab64890Smrg    _Xconst char*	/* name */,
26081ab64890Smrg    _Xconst char*	/* message */,
26091ab64890Smrg    _Xconst char*	/* default_string */,
26101ab64890Smrg    char*		/* buffer_return */,
26111ab64890Smrg    int			/* length */
26121ab64890Smrg);
26131ab64890Smrg
26141ab64890Smrgextern int XGetErrorText(
26151ab64890Smrg    Display*		/* display */,
26161ab64890Smrg    int			/* code */,
26171ab64890Smrg    char*		/* buffer_return */,
26181ab64890Smrg    int			/* length */
26191ab64890Smrg);
26201ab64890Smrg
26211ab64890Smrgextern Bool XGetFontProperty(
26221ab64890Smrg    XFontStruct*	/* font_struct */,
26231ab64890Smrg    Atom		/* atom */,
26241ab64890Smrg    unsigned long*	/* value_return */
26251ab64890Smrg);
26261ab64890Smrg
26271ab64890Smrgextern Status XGetGCValues(
26281ab64890Smrg    Display*		/* display */,
26291ab64890Smrg    GC			/* gc */,
26301ab64890Smrg    unsigned long	/* valuemask */,
26311ab64890Smrg    XGCValues*		/* values_return */
26321ab64890Smrg);
26331ab64890Smrg
26341ab64890Smrgextern Status XGetGeometry(
26351ab64890Smrg    Display*		/* display */,
26361ab64890Smrg    Drawable		/* d */,
26371ab64890Smrg    Window*		/* root_return */,
26381ab64890Smrg    int*		/* x_return */,
26391ab64890Smrg    int*		/* y_return */,
26401ab64890Smrg    unsigned int*	/* width_return */,
26411ab64890Smrg    unsigned int*	/* height_return */,
26421ab64890Smrg    unsigned int*	/* border_width_return */,
26431ab64890Smrg    unsigned int*	/* depth_return */
26441ab64890Smrg);
26451ab64890Smrg
26461ab64890Smrgextern Status XGetIconName(
26471ab64890Smrg    Display*		/* display */,
26481ab64890Smrg    Window		/* w */,
26491ab64890Smrg    char**		/* icon_name_return */
26501ab64890Smrg);
26511ab64890Smrg
26521ab64890Smrgextern int XGetInputFocus(
26531ab64890Smrg    Display*		/* display */,
26541ab64890Smrg    Window*		/* focus_return */,
26551ab64890Smrg    int*		/* revert_to_return */
26561ab64890Smrg);
26571ab64890Smrg
26581ab64890Smrgextern int XGetKeyboardControl(
26591ab64890Smrg    Display*		/* display */,
26601ab64890Smrg    XKeyboardState*	/* values_return */
26611ab64890Smrg);
26621ab64890Smrg
26631ab64890Smrgextern int XGetPointerControl(
26641ab64890Smrg    Display*		/* display */,
26651ab64890Smrg    int*		/* accel_numerator_return */,
26661ab64890Smrg    int*		/* accel_denominator_return */,
26671ab64890Smrg    int*		/* threshold_return */
26681ab64890Smrg);
26691ab64890Smrg
26701ab64890Smrgextern int XGetPointerMapping(
26711ab64890Smrg    Display*		/* display */,
26721ab64890Smrg    unsigned char*	/* map_return */,
26731ab64890Smrg    int			/* nmap */
26741ab64890Smrg);
26751ab64890Smrg
26761ab64890Smrgextern int XGetScreenSaver(
26771ab64890Smrg    Display*		/* display */,
26781ab64890Smrg    int*		/* timeout_return */,
26791ab64890Smrg    int*		/* interval_return */,
26801ab64890Smrg    int*		/* prefer_blanking_return */,
26811ab64890Smrg    int*		/* allow_exposures_return */
26821ab64890Smrg);
26831ab64890Smrg
26841ab64890Smrgextern Status XGetTransientForHint(
26851ab64890Smrg    Display*		/* display */,
26861ab64890Smrg    Window		/* w */,
26871ab64890Smrg    Window*		/* prop_window_return */
26881ab64890Smrg);
26891ab64890Smrg
26901ab64890Smrgextern int XGetWindowProperty(
26911ab64890Smrg    Display*		/* display */,
26921ab64890Smrg    Window		/* w */,
26931ab64890Smrg    Atom		/* property */,
26941ab64890Smrg    long		/* long_offset */,
26951ab64890Smrg    long		/* long_length */,
26961ab64890Smrg    Bool		/* delete */,
26971ab64890Smrg    Atom		/* req_type */,
26981ab64890Smrg    Atom*		/* actual_type_return */,
26991ab64890Smrg    int*		/* actual_format_return */,
27001ab64890Smrg    unsigned long*	/* nitems_return */,
27011ab64890Smrg    unsigned long*	/* bytes_after_return */,
27021ab64890Smrg    unsigned char**	/* prop_return */
27031ab64890Smrg);
27041ab64890Smrg
27051ab64890Smrgextern Status XGetWindowAttributes(
27061ab64890Smrg    Display*		/* display */,
27071ab64890Smrg    Window		/* w */,
27081ab64890Smrg    XWindowAttributes*	/* window_attributes_return */
27091ab64890Smrg);
27101ab64890Smrg
27111ab64890Smrgextern int XGrabButton(
27121ab64890Smrg    Display*		/* display */,
27131ab64890Smrg    unsigned int	/* button */,
27141ab64890Smrg    unsigned int	/* modifiers */,
27151ab64890Smrg    Window		/* grab_window */,
27161ab64890Smrg    Bool		/* owner_events */,
27171ab64890Smrg    unsigned int	/* event_mask */,
27181ab64890Smrg    int			/* pointer_mode */,
27191ab64890Smrg    int			/* keyboard_mode */,
27201ab64890Smrg    Window		/* confine_to */,
27211ab64890Smrg    Cursor		/* cursor */
27221ab64890Smrg);
27231ab64890Smrg
27241ab64890Smrgextern int XGrabKey(
27251ab64890Smrg    Display*		/* display */,
27261ab64890Smrg    int			/* keycode */,
27271ab64890Smrg    unsigned int	/* modifiers */,
27281ab64890Smrg    Window		/* grab_window */,
27291ab64890Smrg    Bool		/* owner_events */,
27301ab64890Smrg    int			/* pointer_mode */,
27311ab64890Smrg    int			/* keyboard_mode */
27321ab64890Smrg);
27331ab64890Smrg
27341ab64890Smrgextern int XGrabKeyboard(
27351ab64890Smrg    Display*		/* display */,
27361ab64890Smrg    Window		/* grab_window */,
27371ab64890Smrg    Bool		/* owner_events */,
27381ab64890Smrg    int			/* pointer_mode */,
27391ab64890Smrg    int			/* keyboard_mode */,
27401ab64890Smrg    Time		/* time */
27411ab64890Smrg);
27421ab64890Smrg
27431ab64890Smrgextern int XGrabPointer(
27441ab64890Smrg    Display*		/* display */,
27451ab64890Smrg    Window		/* grab_window */,
27461ab64890Smrg    Bool		/* owner_events */,
27471ab64890Smrg    unsigned int	/* event_mask */,
27481ab64890Smrg    int			/* pointer_mode */,
27491ab64890Smrg    int			/* keyboard_mode */,
27501ab64890Smrg    Window		/* confine_to */,
27511ab64890Smrg    Cursor		/* cursor */,
27521ab64890Smrg    Time		/* time */
27531ab64890Smrg);
27541ab64890Smrg
27551ab64890Smrgextern int XGrabServer(
27561ab64890Smrg    Display*		/* display */
27571ab64890Smrg);
27581ab64890Smrg
27591ab64890Smrgextern int XHeightMMOfScreen(
27601ab64890Smrg    Screen*		/* screen */
27611ab64890Smrg);
27621ab64890Smrg
27631ab64890Smrgextern int XHeightOfScreen(
27641ab64890Smrg    Screen*		/* screen */
27651ab64890Smrg);
27661ab64890Smrg
27671ab64890Smrgextern int XIfEvent(
27681ab64890Smrg    Display*		/* display */,
27691ab64890Smrg    XEvent*		/* event_return */,
27701ab64890Smrg    Bool (*) (
27711ab64890Smrg	       Display*			/* display */,
27721ab64890Smrg               XEvent*			/* event */,
27731ab64890Smrg               XPointer			/* arg */
27741ab64890Smrg             )		/* predicate */,
27751ab64890Smrg    XPointer		/* arg */
27761ab64890Smrg);
27771ab64890Smrg
27781ab64890Smrgextern int XImageByteOrder(
27791ab64890Smrg    Display*		/* display */
27801ab64890Smrg);
27811ab64890Smrg
27821ab64890Smrgextern int XInstallColormap(
27831ab64890Smrg    Display*		/* display */,
27841ab64890Smrg    Colormap		/* colormap */
27851ab64890Smrg);
27861ab64890Smrg
27871ab64890Smrgextern KeyCode XKeysymToKeycode(
27881ab64890Smrg    Display*		/* display */,
27891ab64890Smrg    KeySym		/* keysym */
27901ab64890Smrg);
27911ab64890Smrg
27921ab64890Smrgextern int XKillClient(
27931ab64890Smrg    Display*		/* display */,
27941ab64890Smrg    XID			/* resource */
27951ab64890Smrg);
27961ab64890Smrg
27971ab64890Smrgextern Status XLookupColor(
27981ab64890Smrg    Display*		/* display */,
27991ab64890Smrg    Colormap		/* colormap */,
28001ab64890Smrg    _Xconst char*	/* color_name */,
28011ab64890Smrg    XColor*		/* exact_def_return */,
28021ab64890Smrg    XColor*		/* screen_def_return */
28031ab64890Smrg);
28041ab64890Smrg
28051ab64890Smrgextern int XLowerWindow(
28061ab64890Smrg    Display*		/* display */,
28071ab64890Smrg    Window		/* w */
28081ab64890Smrg);
28091ab64890Smrg
28101ab64890Smrgextern int XMapRaised(
28111ab64890Smrg    Display*		/* display */,
28121ab64890Smrg    Window		/* w */
28131ab64890Smrg);
28141ab64890Smrg
28151ab64890Smrgextern int XMapSubwindows(
28161ab64890Smrg    Display*		/* display */,
28171ab64890Smrg    Window		/* w */
28181ab64890Smrg);
28191ab64890Smrg
28201ab64890Smrgextern int XMapWindow(
28211ab64890Smrg    Display*		/* display */,
28221ab64890Smrg    Window		/* w */
28231ab64890Smrg);
28241ab64890Smrg
28251ab64890Smrgextern int XMaskEvent(
28261ab64890Smrg    Display*		/* display */,
28271ab64890Smrg    long		/* event_mask */,
28281ab64890Smrg    XEvent*		/* event_return */
28291ab64890Smrg);
28301ab64890Smrg
28311ab64890Smrgextern int XMaxCmapsOfScreen(
28321ab64890Smrg    Screen*		/* screen */
28331ab64890Smrg);
28341ab64890Smrg
28351ab64890Smrgextern int XMinCmapsOfScreen(
28361ab64890Smrg    Screen*		/* screen */
28371ab64890Smrg);
28381ab64890Smrg
28391ab64890Smrgextern int XMoveResizeWindow(
28401ab64890Smrg    Display*		/* display */,
28411ab64890Smrg    Window		/* w */,
28421ab64890Smrg    int			/* x */,
28431ab64890Smrg    int			/* y */,
28441ab64890Smrg    unsigned int	/* width */,
28451ab64890Smrg    unsigned int	/* height */
28461ab64890Smrg);
28471ab64890Smrg
28481ab64890Smrgextern int XMoveWindow(
28491ab64890Smrg    Display*		/* display */,
28501ab64890Smrg    Window		/* w */,
28511ab64890Smrg    int			/* x */,
28521ab64890Smrg    int			/* y */
28531ab64890Smrg);
28541ab64890Smrg
28551ab64890Smrgextern int XNextEvent(
28561ab64890Smrg    Display*		/* display */,
28571ab64890Smrg    XEvent*		/* event_return */
28581ab64890Smrg);
28591ab64890Smrg
28601ab64890Smrgextern int XNoOp(
28611ab64890Smrg    Display*		/* display */
28621ab64890Smrg);
28631ab64890Smrg
28641ab64890Smrgextern Status XParseColor(
28651ab64890Smrg    Display*		/* display */,
28661ab64890Smrg    Colormap		/* colormap */,
28671ab64890Smrg    _Xconst char*	/* spec */,
28681ab64890Smrg    XColor*		/* exact_def_return */
28691ab64890Smrg);
28701ab64890Smrg
28711ab64890Smrgextern int XParseGeometry(
28721ab64890Smrg    _Xconst char*	/* parsestring */,
28731ab64890Smrg    int*		/* x_return */,
28741ab64890Smrg    int*		/* y_return */,
28751ab64890Smrg    unsigned int*	/* width_return */,
28761ab64890Smrg    unsigned int*	/* height_return */
28771ab64890Smrg);
28781ab64890Smrg
28791ab64890Smrgextern int XPeekEvent(
28801ab64890Smrg    Display*		/* display */,
28811ab64890Smrg    XEvent*		/* event_return */
28821ab64890Smrg);
28831ab64890Smrg
28841ab64890Smrgextern int XPeekIfEvent(
28851ab64890Smrg    Display*		/* display */,
28861ab64890Smrg    XEvent*		/* event_return */,
28871ab64890Smrg    Bool (*) (
28881ab64890Smrg	       Display*		/* display */,
28891ab64890Smrg               XEvent*		/* event */,
28901ab64890Smrg               XPointer		/* arg */
28911ab64890Smrg             )		/* predicate */,
28921ab64890Smrg    XPointer		/* arg */
28931ab64890Smrg);
28941ab64890Smrg
28951ab64890Smrgextern int XPending(
28961ab64890Smrg    Display*		/* display */
28971ab64890Smrg);
28981ab64890Smrg
28991ab64890Smrgextern int XPlanesOfScreen(
29001ab64890Smrg    Screen*		/* screen */
29011ab64890Smrg);
29021ab64890Smrg
29031ab64890Smrgextern int XProtocolRevision(
29041ab64890Smrg    Display*		/* display */
29051ab64890Smrg);
29061ab64890Smrg
29071ab64890Smrgextern int XProtocolVersion(
29081ab64890Smrg    Display*		/* display */
29091ab64890Smrg);
29101ab64890Smrg
29111ab64890Smrg
29121ab64890Smrgextern int XPutBackEvent(
29131ab64890Smrg    Display*		/* display */,
29141ab64890Smrg    XEvent*		/* event */
29151ab64890Smrg);
29161ab64890Smrg
29171ab64890Smrgextern int XPutImage(
29181ab64890Smrg    Display*		/* display */,
29191ab64890Smrg    Drawable		/* d */,
29201ab64890Smrg    GC			/* gc */,
29211ab64890Smrg    XImage*		/* image */,
29221ab64890Smrg    int			/* src_x */,
29231ab64890Smrg    int			/* src_y */,
29241ab64890Smrg    int			/* dest_x */,
29251ab64890Smrg    int			/* dest_y */,
29261ab64890Smrg    unsigned int	/* width */,
292761b2299dSmrg    unsigned int	/* height */
29281ab64890Smrg);
29291ab64890Smrg
29301ab64890Smrgextern int XQLength(
29311ab64890Smrg    Display*		/* display */
29321ab64890Smrg);
29331ab64890Smrg
29341ab64890Smrgextern Status XQueryBestCursor(
29351ab64890Smrg    Display*		/* display */,
29361ab64890Smrg    Drawable		/* d */,
29371ab64890Smrg    unsigned int        /* width */,
29381ab64890Smrg    unsigned int	/* height */,
29391ab64890Smrg    unsigned int*	/* width_return */,
29401ab64890Smrg    unsigned int*	/* height_return */
29411ab64890Smrg);
29421ab64890Smrg
29431ab64890Smrgextern Status XQueryBestSize(
29441ab64890Smrg    Display*		/* display */,
29451ab64890Smrg    int			/* class */,
29461ab64890Smrg    Drawable		/* which_screen */,
29471ab64890Smrg    unsigned int	/* width */,
29481ab64890Smrg    unsigned int	/* height */,
29491ab64890Smrg    unsigned int*	/* width_return */,
29501ab64890Smrg    unsigned int*	/* height_return */
29511ab64890Smrg);
29521ab64890Smrg
29531ab64890Smrgextern Status XQueryBestStipple(
29541ab64890Smrg    Display*		/* display */,
29551ab64890Smrg    Drawable		/* which_screen */,
29561ab64890Smrg    unsigned int	/* width */,
29571ab64890Smrg    unsigned int	/* height */,
29581ab64890Smrg    unsigned int*	/* width_return */,
29591ab64890Smrg    unsigned int*	/* height_return */
29601ab64890Smrg);
29611ab64890Smrg
29621ab64890Smrgextern Status XQueryBestTile(
29631ab64890Smrg    Display*		/* display */,
29641ab64890Smrg    Drawable		/* which_screen */,
29651ab64890Smrg    unsigned int	/* width */,
29661ab64890Smrg    unsigned int	/* height */,
29671ab64890Smrg    unsigned int*	/* width_return */,
29681ab64890Smrg    unsigned int*	/* height_return */
29691ab64890Smrg);
29701ab64890Smrg
29711ab64890Smrgextern int XQueryColor(
29721ab64890Smrg    Display*		/* display */,
29731ab64890Smrg    Colormap		/* colormap */,
29741ab64890Smrg    XColor*		/* def_in_out */
29751ab64890Smrg);
29761ab64890Smrg
29771ab64890Smrgextern int XQueryColors(
29781ab64890Smrg    Display*		/* display */,
29791ab64890Smrg    Colormap		/* colormap */,
29801ab64890Smrg    XColor*		/* defs_in_out */,
29811ab64890Smrg    int			/* ncolors */
29821ab64890Smrg);
29831ab64890Smrg
29841ab64890Smrgextern Bool XQueryExtension(
29851ab64890Smrg    Display*		/* display */,
29861ab64890Smrg    _Xconst char*	/* name */,
29871ab64890Smrg    int*		/* major_opcode_return */,
29881ab64890Smrg    int*		/* first_event_return */,
29891ab64890Smrg    int*		/* first_error_return */
29901ab64890Smrg);
29911ab64890Smrg
29921ab64890Smrgextern int XQueryKeymap(
29931ab64890Smrg    Display*		/* display */,
29941ab64890Smrg    char [32]		/* keys_return */
29951ab64890Smrg);
29961ab64890Smrg
29971ab64890Smrgextern Bool XQueryPointer(
29981ab64890Smrg    Display*		/* display */,
29991ab64890Smrg    Window		/* w */,
30001ab64890Smrg    Window*		/* root_return */,
30011ab64890Smrg    Window*		/* child_return */,
30021ab64890Smrg    int*		/* root_x_return */,
30031ab64890Smrg    int*		/* root_y_return */,
30041ab64890Smrg    int*		/* win_x_return */,
30051ab64890Smrg    int*		/* win_y_return */,
30061ab64890Smrg    unsigned int*       /* mask_return */
30071ab64890Smrg);
30081ab64890Smrg
30091ab64890Smrgextern int XQueryTextExtents(
30101ab64890Smrg    Display*		/* display */,
30111ab64890Smrg    XID			/* font_ID */,
30121ab64890Smrg    _Xconst char*	/* string */,
30131ab64890Smrg    int			/* nchars */,
30141ab64890Smrg    int*		/* direction_return */,
30151ab64890Smrg    int*		/* font_ascent_return */,
30161ab64890Smrg    int*		/* font_descent_return */,
301761b2299dSmrg    XCharStruct*	/* overall_return */
30181ab64890Smrg);
30191ab64890Smrg
30201ab64890Smrgextern int XQueryTextExtents16(
30211ab64890Smrg    Display*		/* display */,
30221ab64890Smrg    XID			/* font_ID */,
30231ab64890Smrg    _Xconst XChar2b*	/* string */,
30241ab64890Smrg    int			/* nchars */,
30251ab64890Smrg    int*		/* direction_return */,
30261ab64890Smrg    int*		/* font_ascent_return */,
30271ab64890Smrg    int*		/* font_descent_return */,
30281ab64890Smrg    XCharStruct*	/* overall_return */
30291ab64890Smrg);
30301ab64890Smrg
30311ab64890Smrgextern Status XQueryTree(
30321ab64890Smrg    Display*		/* display */,
30331ab64890Smrg    Window		/* w */,
30341ab64890Smrg    Window*		/* root_return */,
30351ab64890Smrg    Window*		/* parent_return */,
30361ab64890Smrg    Window**		/* children_return */,
30371ab64890Smrg    unsigned int*	/* nchildren_return */
30381ab64890Smrg);
30391ab64890Smrg
30401ab64890Smrgextern int XRaiseWindow(
30411ab64890Smrg    Display*		/* display */,
30421ab64890Smrg    Window		/* w */
30431ab64890Smrg);
30441ab64890Smrg
30451ab64890Smrgextern int XReadBitmapFile(
30461ab64890Smrg    Display*		/* display */,
30471ab64890Smrg    Drawable 		/* d */,
30481ab64890Smrg    _Xconst char*	/* filename */,
30491ab64890Smrg    unsigned int*	/* width_return */,
30501ab64890Smrg    unsigned int*	/* height_return */,
30511ab64890Smrg    Pixmap*		/* bitmap_return */,
30521ab64890Smrg    int*		/* x_hot_return */,
30531ab64890Smrg    int*		/* y_hot_return */
30541ab64890Smrg);
30551ab64890Smrg
30561ab64890Smrgextern int XReadBitmapFileData(
30571ab64890Smrg    _Xconst char*	/* filename */,
30581ab64890Smrg    unsigned int*	/* width_return */,
30591ab64890Smrg    unsigned int*	/* height_return */,
30601ab64890Smrg    unsigned char**	/* data_return */,
30611ab64890Smrg    int*		/* x_hot_return */,
30621ab64890Smrg    int*		/* y_hot_return */
30631ab64890Smrg);
30641ab64890Smrg
30651ab64890Smrgextern int XRebindKeysym(
30661ab64890Smrg    Display*		/* display */,
30671ab64890Smrg    KeySym		/* keysym */,
30681ab64890Smrg    KeySym*		/* list */,
30691ab64890Smrg    int			/* mod_count */,
30701ab64890Smrg    _Xconst unsigned char*	/* string */,
30711ab64890Smrg    int			/* bytes_string */
30721ab64890Smrg);
30731ab64890Smrg
30741ab64890Smrgextern int XRecolorCursor(
30751ab64890Smrg    Display*		/* display */,
30761ab64890Smrg    Cursor		/* cursor */,
30771ab64890Smrg    XColor*		/* foreground_color */,
30781ab64890Smrg    XColor*		/* background_color */
30791ab64890Smrg);
30801ab64890Smrg
30811ab64890Smrgextern int XRefreshKeyboardMapping(
308261b2299dSmrg    XMappingEvent*	/* event_map */
30831ab64890Smrg);
30841ab64890Smrg
30851ab64890Smrgextern int XRemoveFromSaveSet(
30861ab64890Smrg    Display*		/* display */,
30871ab64890Smrg    Window		/* w */
30881ab64890Smrg);
30891ab64890Smrg
30901ab64890Smrgextern int XRemoveHost(
30911ab64890Smrg    Display*		/* display */,
30921ab64890Smrg    XHostAddress*	/* host */
30931ab64890Smrg);
30941ab64890Smrg
30951ab64890Smrgextern int XRemoveHosts(
30961ab64890Smrg    Display*		/* display */,
30971ab64890Smrg    XHostAddress*	/* hosts */,
30981ab64890Smrg    int			/* num_hosts */
30991ab64890Smrg);
31001ab64890Smrg
31011ab64890Smrgextern int XReparentWindow(
31021ab64890Smrg    Display*		/* display */,
31031ab64890Smrg    Window		/* w */,
31041ab64890Smrg    Window		/* parent */,
31051ab64890Smrg    int			/* x */,
31061ab64890Smrg    int			/* y */
31071ab64890Smrg);
31081ab64890Smrg
31091ab64890Smrgextern int XResetScreenSaver(
31101ab64890Smrg    Display*		/* display */
31111ab64890Smrg);
31121ab64890Smrg
31131ab64890Smrgextern int XResizeWindow(
31141ab64890Smrg    Display*		/* display */,
31151ab64890Smrg    Window		/* w */,
31161ab64890Smrg    unsigned int	/* width */,
31171ab64890Smrg    unsigned int	/* height */
31181ab64890Smrg);
31191ab64890Smrg
31201ab64890Smrgextern int XRestackWindows(
31211ab64890Smrg    Display*		/* display */,
31221ab64890Smrg    Window*		/* windows */,
31231ab64890Smrg    int			/* nwindows */
31241ab64890Smrg);
31251ab64890Smrg
31261ab64890Smrgextern int XRotateBuffers(
31271ab64890Smrg    Display*		/* display */,
31281ab64890Smrg    int			/* rotate */
31291ab64890Smrg);
31301ab64890Smrg
31311ab64890Smrgextern int XRotateWindowProperties(
31321ab64890Smrg    Display*		/* display */,
31331ab64890Smrg    Window		/* w */,
31341ab64890Smrg    Atom*		/* properties */,
31351ab64890Smrg    int			/* num_prop */,
31361ab64890Smrg    int			/* npositions */
31371ab64890Smrg);
31381ab64890Smrg
31391ab64890Smrgextern int XScreenCount(
31401ab64890Smrg    Display*		/* display */
31411ab64890Smrg);
31421ab64890Smrg
31431ab64890Smrgextern int XSelectInput(
31441ab64890Smrg    Display*		/* display */,
31451ab64890Smrg    Window		/* w */,
31461ab64890Smrg    long		/* event_mask */
31471ab64890Smrg);
31481ab64890Smrg
31491ab64890Smrgextern Status XSendEvent(
31501ab64890Smrg    Display*		/* display */,
31511ab64890Smrg    Window		/* w */,
31521ab64890Smrg    Bool		/* propagate */,
31531ab64890Smrg    long		/* event_mask */,
31541ab64890Smrg    XEvent*		/* event_send */
31551ab64890Smrg);
31561ab64890Smrg
31571ab64890Smrgextern int XSetAccessControl(
31581ab64890Smrg    Display*		/* display */,
31591ab64890Smrg    int			/* mode */
31601ab64890Smrg);
31611ab64890Smrg
31621ab64890Smrgextern int XSetArcMode(
31631ab64890Smrg    Display*		/* display */,
31641ab64890Smrg    GC			/* gc */,
31651ab64890Smrg    int			/* arc_mode */
31661ab64890Smrg);
31671ab64890Smrg
31681ab64890Smrgextern int XSetBackground(
31691ab64890Smrg    Display*		/* display */,
31701ab64890Smrg    GC			/* gc */,
31711ab64890Smrg    unsigned long	/* background */
31721ab64890Smrg);
31731ab64890Smrg
31741ab64890Smrgextern int XSetClipMask(
31751ab64890Smrg    Display*		/* display */,
31761ab64890Smrg    GC			/* gc */,
31771ab64890Smrg    Pixmap		/* pixmap */
31781ab64890Smrg);
31791ab64890Smrg
31801ab64890Smrgextern int XSetClipOrigin(
31811ab64890Smrg    Display*		/* display */,
31821ab64890Smrg    GC			/* gc */,
31831ab64890Smrg    int			/* clip_x_origin */,
31841ab64890Smrg    int			/* clip_y_origin */
31851ab64890Smrg);
31861ab64890Smrg
31871ab64890Smrgextern int XSetClipRectangles(
31881ab64890Smrg    Display*		/* display */,
31891ab64890Smrg    GC			/* gc */,
31901ab64890Smrg    int			/* clip_x_origin */,
31911ab64890Smrg    int			/* clip_y_origin */,
31921ab64890Smrg    XRectangle*		/* rectangles */,
31931ab64890Smrg    int			/* n */,
31941ab64890Smrg    int			/* ordering */
31951ab64890Smrg);
31961ab64890Smrg
31971ab64890Smrgextern int XSetCloseDownMode(
31981ab64890Smrg    Display*		/* display */,
31991ab64890Smrg    int			/* close_mode */
32001ab64890Smrg);
32011ab64890Smrg
32021ab64890Smrgextern int XSetCommand(
32031ab64890Smrg    Display*		/* display */,
32041ab64890Smrg    Window		/* w */,
32051ab64890Smrg    char**		/* argv */,
32061ab64890Smrg    int			/* argc */
32071ab64890Smrg);
32081ab64890Smrg
32091ab64890Smrgextern int XSetDashes(
32101ab64890Smrg    Display*		/* display */,
32111ab64890Smrg    GC			/* gc */,
32121ab64890Smrg    int			/* dash_offset */,
32131ab64890Smrg    _Xconst char*	/* dash_list */,
32141ab64890Smrg    int			/* n */
32151ab64890Smrg);
32161ab64890Smrg
32171ab64890Smrgextern int XSetFillRule(
32181ab64890Smrg    Display*		/* display */,
32191ab64890Smrg    GC			/* gc */,
32201ab64890Smrg    int			/* fill_rule */
32211ab64890Smrg);
32221ab64890Smrg
32231ab64890Smrgextern int XSetFillStyle(
32241ab64890Smrg    Display*		/* display */,
32251ab64890Smrg    GC			/* gc */,
32261ab64890Smrg    int			/* fill_style */
32271ab64890Smrg);
32281ab64890Smrg
32291ab64890Smrgextern int XSetFont(
32301ab64890Smrg    Display*		/* display */,
32311ab64890Smrg    GC			/* gc */,
32321ab64890Smrg    Font		/* font */
32331ab64890Smrg);
32341ab64890Smrg
32351ab64890Smrgextern int XSetFontPath(
32361ab64890Smrg    Display*		/* display */,
32371ab64890Smrg    char**		/* directories */,
323861b2299dSmrg    int			/* ndirs */
32391ab64890Smrg);
32401ab64890Smrg
32411ab64890Smrgextern int XSetForeground(
32421ab64890Smrg    Display*		/* display */,
32431ab64890Smrg    GC			/* gc */,
32441ab64890Smrg    unsigned long	/* foreground */
32451ab64890Smrg);
32461ab64890Smrg
32471ab64890Smrgextern int XSetFunction(
32481ab64890Smrg    Display*		/* display */,
32491ab64890Smrg    GC			/* gc */,
32501ab64890Smrg    int			/* function */
32511ab64890Smrg);
32521ab64890Smrg
32531ab64890Smrgextern int XSetGraphicsExposures(
32541ab64890Smrg    Display*		/* display */,
32551ab64890Smrg    GC			/* gc */,
32561ab64890Smrg    Bool		/* graphics_exposures */
32571ab64890Smrg);
32581ab64890Smrg
32591ab64890Smrgextern int XSetIconName(
32601ab64890Smrg    Display*		/* display */,
32611ab64890Smrg    Window		/* w */,
32621ab64890Smrg    _Xconst char*	/* icon_name */
32631ab64890Smrg);
32641ab64890Smrg
32651ab64890Smrgextern int XSetInputFocus(
32661ab64890Smrg    Display*		/* display */,
32671ab64890Smrg    Window		/* focus */,
32681ab64890Smrg    int			/* revert_to */,
32691ab64890Smrg    Time		/* time */
32701ab64890Smrg);
32711ab64890Smrg
32721ab64890Smrgextern int XSetLineAttributes(
32731ab64890Smrg    Display*		/* display */,
32741ab64890Smrg    GC			/* gc */,
32751ab64890Smrg    unsigned int	/* line_width */,
32761ab64890Smrg    int			/* line_style */,
32771ab64890Smrg    int			/* cap_style */,
32781ab64890Smrg    int			/* join_style */
32791ab64890Smrg);
32801ab64890Smrg
32811ab64890Smrgextern int XSetModifierMapping(
32821ab64890Smrg    Display*		/* display */,
32831ab64890Smrg    XModifierKeymap*	/* modmap */
32841ab64890Smrg);
32851ab64890Smrg
32861ab64890Smrgextern int XSetPlaneMask(
32871ab64890Smrg    Display*		/* display */,
32881ab64890Smrg    GC			/* gc */,
32891ab64890Smrg    unsigned long	/* plane_mask */
32901ab64890Smrg);
32911ab64890Smrg
32921ab64890Smrgextern int XSetPointerMapping(
32931ab64890Smrg    Display*		/* display */,
32941ab64890Smrg    _Xconst unsigned char*	/* map */,
32951ab64890Smrg    int			/* nmap */
32961ab64890Smrg);
32971ab64890Smrg
32981ab64890Smrgextern int XSetScreenSaver(
32991ab64890Smrg    Display*		/* display */,
33001ab64890Smrg    int			/* timeout */,
33011ab64890Smrg    int			/* interval */,
33021ab64890Smrg    int			/* prefer_blanking */,
33031ab64890Smrg    int			/* allow_exposures */
33041ab64890Smrg);
33051ab64890Smrg
33061ab64890Smrgextern int XSetSelectionOwner(
33071ab64890Smrg    Display*		/* display */,
33081ab64890Smrg    Atom	        /* selection */,
33091ab64890Smrg    Window		/* owner */,
33101ab64890Smrg    Time		/* time */
33111ab64890Smrg);
33121ab64890Smrg
33131ab64890Smrgextern int XSetState(
33141ab64890Smrg    Display*		/* display */,
33151ab64890Smrg    GC			/* gc */,
33161ab64890Smrg    unsigned long 	/* foreground */,
33171ab64890Smrg    unsigned long	/* background */,
33181ab64890Smrg    int			/* function */,
33191ab64890Smrg    unsigned long	/* plane_mask */
33201ab64890Smrg);
33211ab64890Smrg
33221ab64890Smrgextern int XSetStipple(
33231ab64890Smrg    Display*		/* display */,
33241ab64890Smrg    GC			/* gc */,
33251ab64890Smrg    Pixmap		/* stipple */
33261ab64890Smrg);
33271ab64890Smrg
33281ab64890Smrgextern int XSetSubwindowMode(
33291ab64890Smrg    Display*		/* display */,
33301ab64890Smrg    GC			/* gc */,
33311ab64890Smrg    int			/* subwindow_mode */
33321ab64890Smrg);
33331ab64890Smrg
33341ab64890Smrgextern int XSetTSOrigin(
33351ab64890Smrg    Display*		/* display */,
33361ab64890Smrg    GC			/* gc */,
33371ab64890Smrg    int			/* ts_x_origin */,
33381ab64890Smrg    int			/* ts_y_origin */
33391ab64890Smrg);
33401ab64890Smrg
33411ab64890Smrgextern int XSetTile(
33421ab64890Smrg    Display*		/* display */,
33431ab64890Smrg    GC			/* gc */,
33441ab64890Smrg    Pixmap		/* tile */
33451ab64890Smrg);
33461ab64890Smrg
33471ab64890Smrgextern int XSetWindowBackground(
33481ab64890Smrg    Display*		/* display */,
33491ab64890Smrg    Window		/* w */,
33501ab64890Smrg    unsigned long	/* background_pixel */
33511ab64890Smrg);
33521ab64890Smrg
33531ab64890Smrgextern int XSetWindowBackgroundPixmap(
33541ab64890Smrg    Display*		/* display */,
33551ab64890Smrg    Window		/* w */,
33561ab64890Smrg    Pixmap		/* background_pixmap */
33571ab64890Smrg);
33581ab64890Smrg
33591ab64890Smrgextern int XSetWindowBorder(
33601ab64890Smrg    Display*		/* display */,
33611ab64890Smrg    Window		/* w */,
33621ab64890Smrg    unsigned long	/* border_pixel */
33631ab64890Smrg);
33641ab64890Smrg
33651ab64890Smrgextern int XSetWindowBorderPixmap(
33661ab64890Smrg    Display*		/* display */,
33671ab64890Smrg    Window		/* w */,
33681ab64890Smrg    Pixmap		/* border_pixmap */
33691ab64890Smrg);
33701ab64890Smrg
33711ab64890Smrgextern int XSetWindowBorderWidth(
33721ab64890Smrg    Display*		/* display */,
33731ab64890Smrg    Window		/* w */,
33741ab64890Smrg    unsigned int	/* width */
33751ab64890Smrg);
33761ab64890Smrg
33771ab64890Smrgextern int XSetWindowColormap(
33781ab64890Smrg    Display*		/* display */,
33791ab64890Smrg    Window		/* w */,
33801ab64890Smrg    Colormap		/* colormap */
33811ab64890Smrg);
33821ab64890Smrg
33831ab64890Smrgextern int XStoreBuffer(
33841ab64890Smrg    Display*		/* display */,
33851ab64890Smrg    _Xconst char*	/* bytes */,
33861ab64890Smrg    int			/* nbytes */,
33871ab64890Smrg    int			/* buffer */
33881ab64890Smrg);
33891ab64890Smrg
33901ab64890Smrgextern int XStoreBytes(
33911ab64890Smrg    Display*		/* display */,
33921ab64890Smrg    _Xconst char*	/* bytes */,
33931ab64890Smrg    int			/* nbytes */
33941ab64890Smrg);
33951ab64890Smrg
33961ab64890Smrgextern int XStoreColor(
33971ab64890Smrg    Display*		/* display */,
33981ab64890Smrg    Colormap		/* colormap */,
33991ab64890Smrg    XColor*		/* color */
34001ab64890Smrg);
34011ab64890Smrg
34021ab64890Smrgextern int XStoreColors(
34031ab64890Smrg    Display*		/* display */,
34041ab64890Smrg    Colormap		/* colormap */,
34051ab64890Smrg    XColor*		/* color */,
34061ab64890Smrg    int			/* ncolors */
34071ab64890Smrg);
34081ab64890Smrg
34091ab64890Smrgextern int XStoreName(
34101ab64890Smrg    Display*		/* display */,
34111ab64890Smrg    Window		/* w */,
34121ab64890Smrg    _Xconst char*	/* window_name */
34131ab64890Smrg);
34141ab64890Smrg
34151ab64890Smrgextern int XStoreNamedColor(
34161ab64890Smrg    Display*		/* display */,
34171ab64890Smrg    Colormap		/* colormap */,
34181ab64890Smrg    _Xconst char*	/* color */,
34191ab64890Smrg    unsigned long	/* pixel */,
34201ab64890Smrg    int			/* flags */
34211ab64890Smrg);
34221ab64890Smrg
34231ab64890Smrgextern int XSync(
34241ab64890Smrg    Display*		/* display */,
34251ab64890Smrg    Bool		/* discard */
34261ab64890Smrg);
34271ab64890Smrg
34281ab64890Smrgextern int XTextExtents(
34291ab64890Smrg    XFontStruct*	/* font_struct */,
34301ab64890Smrg    _Xconst char*	/* string */,
34311ab64890Smrg    int			/* nchars */,
34321ab64890Smrg    int*		/* direction_return */,
34331ab64890Smrg    int*		/* font_ascent_return */,
34341ab64890Smrg    int*		/* font_descent_return */,
34351ab64890Smrg    XCharStruct*	/* overall_return */
34361ab64890Smrg);
34371ab64890Smrg
34381ab64890Smrgextern int XTextExtents16(
34391ab64890Smrg    XFontStruct*	/* font_struct */,
34401ab64890Smrg    _Xconst XChar2b*	/* string */,
34411ab64890Smrg    int			/* nchars */,
34421ab64890Smrg    int*		/* direction_return */,
34431ab64890Smrg    int*		/* font_ascent_return */,
34441ab64890Smrg    int*		/* font_descent_return */,
34451ab64890Smrg    XCharStruct*	/* overall_return */
34461ab64890Smrg);
34471ab64890Smrg
34481ab64890Smrgextern int XTextWidth(
34491ab64890Smrg    XFontStruct*	/* font_struct */,
34501ab64890Smrg    _Xconst char*	/* string */,
34511ab64890Smrg    int			/* count */
34521ab64890Smrg);
34531ab64890Smrg
34541ab64890Smrgextern int XTextWidth16(
34551ab64890Smrg    XFontStruct*	/* font_struct */,
34561ab64890Smrg    _Xconst XChar2b*	/* string */,
34571ab64890Smrg    int			/* count */
34581ab64890Smrg);
34591ab64890Smrg
34601ab64890Smrgextern Bool XTranslateCoordinates(
34611ab64890Smrg    Display*		/* display */,
34621ab64890Smrg    Window		/* src_w */,
34631ab64890Smrg    Window		/* dest_w */,
34641ab64890Smrg    int			/* src_x */,
34651ab64890Smrg    int			/* src_y */,
34661ab64890Smrg    int*		/* dest_x_return */,
34671ab64890Smrg    int*		/* dest_y_return */,
34681ab64890Smrg    Window*		/* child_return */
34691ab64890Smrg);
34701ab64890Smrg
34711ab64890Smrgextern int XUndefineCursor(
34721ab64890Smrg    Display*		/* display */,
34731ab64890Smrg    Window		/* w */
34741ab64890Smrg);
34751ab64890Smrg
34761ab64890Smrgextern int XUngrabButton(
34771ab64890Smrg    Display*		/* display */,
34781ab64890Smrg    unsigned int	/* button */,
34791ab64890Smrg    unsigned int	/* modifiers */,
34801ab64890Smrg    Window		/* grab_window */
34811ab64890Smrg);
34821ab64890Smrg
34831ab64890Smrgextern int XUngrabKey(
34841ab64890Smrg    Display*		/* display */,
34851ab64890Smrg    int			/* keycode */,
34861ab64890Smrg    unsigned int	/* modifiers */,
34871ab64890Smrg    Window		/* grab_window */
34881ab64890Smrg);
34891ab64890Smrg
34901ab64890Smrgextern int XUngrabKeyboard(
34911ab64890Smrg    Display*		/* display */,
34921ab64890Smrg    Time		/* time */
34931ab64890Smrg);
34941ab64890Smrg
34951ab64890Smrgextern int XUngrabPointer(
34961ab64890Smrg    Display*		/* display */,
34971ab64890Smrg    Time		/* time */
34981ab64890Smrg);
34991ab64890Smrg
35001ab64890Smrgextern int XUngrabServer(
35011ab64890Smrg    Display*		/* display */
35021ab64890Smrg);
35031ab64890Smrg
35041ab64890Smrgextern int XUninstallColormap(
35051ab64890Smrg    Display*		/* display */,
35061ab64890Smrg    Colormap		/* colormap */
35071ab64890Smrg);
35081ab64890Smrg
35091ab64890Smrgextern int XUnloadFont(
35101ab64890Smrg    Display*		/* display */,
35111ab64890Smrg    Font		/* font */
35121ab64890Smrg);
35131ab64890Smrg
35141ab64890Smrgextern int XUnmapSubwindows(
35151ab64890Smrg    Display*		/* display */,
35161ab64890Smrg    Window		/* w */
35171ab64890Smrg);
35181ab64890Smrg
35191ab64890Smrgextern int XUnmapWindow(
35201ab64890Smrg    Display*		/* display */,
35211ab64890Smrg    Window		/* w */
35221ab64890Smrg);
35231ab64890Smrg
35241ab64890Smrgextern int XVendorRelease(
35251ab64890Smrg    Display*		/* display */
35261ab64890Smrg);
35271ab64890Smrg
35281ab64890Smrgextern int XWarpPointer(
35291ab64890Smrg    Display*		/* display */,
35301ab64890Smrg    Window		/* src_w */,
35311ab64890Smrg    Window		/* dest_w */,
35321ab64890Smrg    int			/* src_x */,
35331ab64890Smrg    int			/* src_y */,
35341ab64890Smrg    unsigned int	/* src_width */,
35351ab64890Smrg    unsigned int	/* src_height */,
35361ab64890Smrg    int			/* dest_x */,
353761b2299dSmrg    int			/* dest_y */
35381ab64890Smrg);
35391ab64890Smrg
35401ab64890Smrgextern int XWidthMMOfScreen(
35411ab64890Smrg    Screen*		/* screen */
35421ab64890Smrg);
35431ab64890Smrg
35441ab64890Smrgextern int XWidthOfScreen(
35451ab64890Smrg    Screen*		/* screen */
35461ab64890Smrg);
35471ab64890Smrg
35481ab64890Smrgextern int XWindowEvent(
35491ab64890Smrg    Display*		/* display */,
35501ab64890Smrg    Window		/* w */,
35511ab64890Smrg    long		/* event_mask */,
35521ab64890Smrg    XEvent*		/* event_return */
35531ab64890Smrg);
35541ab64890Smrg
35551ab64890Smrgextern int XWriteBitmapFile(
35561ab64890Smrg    Display*		/* display */,
35571ab64890Smrg    _Xconst char*	/* filename */,
35581ab64890Smrg    Pixmap		/* bitmap */,
35591ab64890Smrg    unsigned int	/* width */,
35601ab64890Smrg    unsigned int	/* height */,
35611ab64890Smrg    int			/* x_hot */,
356261b2299dSmrg    int			/* y_hot */
35631ab64890Smrg);
35641ab64890Smrg
35651ab64890Smrgextern Bool XSupportsLocale (void);
35661ab64890Smrg
35671ab64890Smrgextern char *XSetLocaleModifiers(
35681ab64890Smrg    const char*		/* modifier_list */
35691ab64890Smrg);
35701ab64890Smrg
35711ab64890Smrgextern XOM XOpenOM(
35721ab64890Smrg    Display*			/* display */,
35731ab64890Smrg    struct _XrmHashBucketRec*	/* rdb */,
35741ab64890Smrg    _Xconst char*		/* res_name */,
35751ab64890Smrg    _Xconst char*		/* res_class */
35761ab64890Smrg);
35771ab64890Smrg
35781ab64890Smrgextern Status XCloseOM(
35791ab64890Smrg    XOM			/* om */
35801ab64890Smrg);
35811ab64890Smrg
35821ab64890Smrgextern char *XSetOMValues(
35831ab64890Smrg    XOM			/* om */,
35841ab64890Smrg    ...
35851ab64890Smrg) _X_SENTINEL(0);
35861ab64890Smrg
35871ab64890Smrgextern char *XGetOMValues(
35881ab64890Smrg    XOM			/* om */,
35891ab64890Smrg    ...
35901ab64890Smrg) _X_SENTINEL(0);
35911ab64890Smrg
35921ab64890Smrgextern Display *XDisplayOfOM(
35931ab64890Smrg    XOM			/* om */
35941ab64890Smrg);
35951ab64890Smrg
35961ab64890Smrgextern char *XLocaleOfOM(
35971ab64890Smrg    XOM			/* om */
35981ab64890Smrg);
35991ab64890Smrg
36001ab64890Smrgextern XOC XCreateOC(
36011ab64890Smrg    XOM			/* om */,
36021ab64890Smrg    ...
36031ab64890Smrg) _X_SENTINEL(0);
36041ab64890Smrg
36051ab64890Smrgextern void XDestroyOC(
36061ab64890Smrg    XOC			/* oc */
36071ab64890Smrg);
36081ab64890Smrg
36091ab64890Smrgextern XOM XOMOfOC(
36101ab64890Smrg    XOC			/* oc */
36111ab64890Smrg);
36121ab64890Smrg
36131ab64890Smrgextern char *XSetOCValues(
36141ab64890Smrg    XOC			/* oc */,
36151ab64890Smrg    ...
36161ab64890Smrg) _X_SENTINEL(0);
36171ab64890Smrg
36181ab64890Smrgextern char *XGetOCValues(
36191ab64890Smrg    XOC			/* oc */,
36201ab64890Smrg    ...
36211ab64890Smrg) _X_SENTINEL(0);
36221ab64890Smrg
36231ab64890Smrgextern XFontSet XCreateFontSet(
36241ab64890Smrg    Display*		/* display */,
36251ab64890Smrg    _Xconst char*	/* base_font_name_list */,
36261ab64890Smrg    char***		/* missing_charset_list */,
36271ab64890Smrg    int*		/* missing_charset_count */,
36281ab64890Smrg    char**		/* def_string */
36291ab64890Smrg);
36301ab64890Smrg
36311ab64890Smrgextern void XFreeFontSet(
36321ab64890Smrg    Display*		/* display */,
36331ab64890Smrg    XFontSet		/* font_set */
36341ab64890Smrg);
36351ab64890Smrg
36361ab64890Smrgextern int XFontsOfFontSet(
36371ab64890Smrg    XFontSet		/* font_set */,
36381ab64890Smrg    XFontStruct***	/* font_struct_list */,
36391ab64890Smrg    char***		/* font_name_list */
36401ab64890Smrg);
36411ab64890Smrg
36421ab64890Smrgextern char *XBaseFontNameListOfFontSet(
36431ab64890Smrg    XFontSet		/* font_set */
36441ab64890Smrg);
36451ab64890Smrg
36461ab64890Smrgextern char *XLocaleOfFontSet(
36471ab64890Smrg    XFontSet		/* font_set */
36481ab64890Smrg);
36491ab64890Smrg
36501ab64890Smrgextern Bool XContextDependentDrawing(
36511ab64890Smrg    XFontSet		/* font_set */
36521ab64890Smrg);
36531ab64890Smrg
36541ab64890Smrgextern Bool XDirectionalDependentDrawing(
36551ab64890Smrg    XFontSet		/* font_set */
36561ab64890Smrg);
36571ab64890Smrg
36581ab64890Smrgextern Bool XContextualDrawing(
36591ab64890Smrg    XFontSet		/* font_set */
36601ab64890Smrg);
36611ab64890Smrg
36621ab64890Smrgextern XFontSetExtents *XExtentsOfFontSet(
36631ab64890Smrg    XFontSet		/* font_set */
36641ab64890Smrg);
36651ab64890Smrg
36661ab64890Smrgextern int XmbTextEscapement(
36671ab64890Smrg    XFontSet		/* font_set */,
36681ab64890Smrg    _Xconst char*	/* text */,
36691ab64890Smrg    int			/* bytes_text */
36701ab64890Smrg);
36711ab64890Smrg
36721ab64890Smrgextern int XwcTextEscapement(
36731ab64890Smrg    XFontSet		/* font_set */,
36741ab64890Smrg    _Xconst wchar_t*	/* text */,
36751ab64890Smrg    int			/* num_wchars */
36761ab64890Smrg);
36771ab64890Smrg
36781ab64890Smrgextern int Xutf8TextEscapement(
36791ab64890Smrg    XFontSet		/* font_set */,
36801ab64890Smrg    _Xconst char*	/* text */,
36811ab64890Smrg    int			/* bytes_text */
36821ab64890Smrg);
36831ab64890Smrg
36841ab64890Smrgextern int XmbTextExtents(
36851ab64890Smrg    XFontSet		/* font_set */,
36861ab64890Smrg    _Xconst char*	/* text */,
36871ab64890Smrg    int			/* bytes_text */,
36881ab64890Smrg    XRectangle*		/* overall_ink_return */,
36891ab64890Smrg    XRectangle*		/* overall_logical_return */
36901ab64890Smrg);
36911ab64890Smrg
36921ab64890Smrgextern int XwcTextExtents(
36931ab64890Smrg    XFontSet		/* font_set */,
36941ab64890Smrg    _Xconst wchar_t*	/* text */,
36951ab64890Smrg    int			/* num_wchars */,
36961ab64890Smrg    XRectangle*		/* overall_ink_return */,
36971ab64890Smrg    XRectangle*		/* overall_logical_return */
36981ab64890Smrg);
36991ab64890Smrg
37001ab64890Smrgextern int Xutf8TextExtents(
37011ab64890Smrg    XFontSet		/* font_set */,
37021ab64890Smrg    _Xconst char*	/* text */,
37031ab64890Smrg    int			/* bytes_text */,
37041ab64890Smrg    XRectangle*		/* overall_ink_return */,
37051ab64890Smrg    XRectangle*		/* overall_logical_return */
37061ab64890Smrg);
37071ab64890Smrg
37081ab64890Smrgextern Status XmbTextPerCharExtents(
37091ab64890Smrg    XFontSet		/* font_set */,
37101ab64890Smrg    _Xconst char*	/* text */,
37111ab64890Smrg    int			/* bytes_text */,
37121ab64890Smrg    XRectangle*		/* ink_extents_buffer */,
37131ab64890Smrg    XRectangle*		/* logical_extents_buffer */,
37141ab64890Smrg    int			/* buffer_size */,
37151ab64890Smrg    int*		/* num_chars */,
37161ab64890Smrg    XRectangle*		/* overall_ink_return */,
37171ab64890Smrg    XRectangle*		/* overall_logical_return */
37181ab64890Smrg);
37191ab64890Smrg
37201ab64890Smrgextern Status XwcTextPerCharExtents(
37211ab64890Smrg    XFontSet		/* font_set */,
37221ab64890Smrg    _Xconst wchar_t*	/* text */,
37231ab64890Smrg    int			/* num_wchars */,
37241ab64890Smrg    XRectangle*		/* ink_extents_buffer */,
37251ab64890Smrg    XRectangle*		/* logical_extents_buffer */,
37261ab64890Smrg    int			/* buffer_size */,
37271ab64890Smrg    int*		/* num_chars */,
37281ab64890Smrg    XRectangle*		/* overall_ink_return */,
37291ab64890Smrg    XRectangle*		/* overall_logical_return */
37301ab64890Smrg);
37311ab64890Smrg
37321ab64890Smrgextern Status Xutf8TextPerCharExtents(
37331ab64890Smrg    XFontSet		/* font_set */,
37341ab64890Smrg    _Xconst char*	/* text */,
37351ab64890Smrg    int			/* bytes_text */,
37361ab64890Smrg    XRectangle*		/* ink_extents_buffer */,
37371ab64890Smrg    XRectangle*		/* logical_extents_buffer */,
37381ab64890Smrg    int			/* buffer_size */,
37391ab64890Smrg    int*		/* num_chars */,
37401ab64890Smrg    XRectangle*		/* overall_ink_return */,
37411ab64890Smrg    XRectangle*		/* overall_logical_return */
37421ab64890Smrg);
37431ab64890Smrg
37441ab64890Smrgextern void XmbDrawText(
37451ab64890Smrg    Display*		/* display */,
37461ab64890Smrg    Drawable		/* d */,
37471ab64890Smrg    GC			/* gc */,
37481ab64890Smrg    int			/* x */,
37491ab64890Smrg    int			/* y */,
37501ab64890Smrg    XmbTextItem*	/* text_items */,
37511ab64890Smrg    int			/* nitems */
37521ab64890Smrg);
37531ab64890Smrg
37541ab64890Smrgextern void XwcDrawText(
37551ab64890Smrg    Display*		/* display */,
37561ab64890Smrg    Drawable		/* d */,
37571ab64890Smrg    GC			/* gc */,
37581ab64890Smrg    int			/* x */,
37591ab64890Smrg    int			/* y */,
37601ab64890Smrg    XwcTextItem*	/* text_items */,
37611ab64890Smrg    int			/* nitems */
37621ab64890Smrg);
37631ab64890Smrg
37641ab64890Smrgextern void Xutf8DrawText(
37651ab64890Smrg    Display*		/* display */,
37661ab64890Smrg    Drawable		/* d */,
37671ab64890Smrg    GC			/* gc */,
37681ab64890Smrg    int			/* x */,
37691ab64890Smrg    int			/* y */,
37701ab64890Smrg    XmbTextItem*	/* text_items */,
37711ab64890Smrg    int			/* nitems */
37721ab64890Smrg);
37731ab64890Smrg
37741ab64890Smrgextern void XmbDrawString(
37751ab64890Smrg    Display*		/* display */,
37761ab64890Smrg    Drawable		/* d */,
37771ab64890Smrg    XFontSet		/* font_set */,
37781ab64890Smrg    GC			/* gc */,
37791ab64890Smrg    int			/* x */,
37801ab64890Smrg    int			/* y */,
37811ab64890Smrg    _Xconst char*	/* text */,
37821ab64890Smrg    int			/* bytes_text */
37831ab64890Smrg);
37841ab64890Smrg
37851ab64890Smrgextern void XwcDrawString(
37861ab64890Smrg    Display*		/* display */,
37871ab64890Smrg    Drawable		/* d */,
37881ab64890Smrg    XFontSet		/* font_set */,
37891ab64890Smrg    GC			/* gc */,
37901ab64890Smrg    int			/* x */,
37911ab64890Smrg    int			/* y */,
37921ab64890Smrg    _Xconst wchar_t*	/* text */,
37931ab64890Smrg    int			/* num_wchars */
37941ab64890Smrg);
37951ab64890Smrg
37961ab64890Smrgextern void Xutf8DrawString(
37971ab64890Smrg    Display*		/* display */,
37981ab64890Smrg    Drawable		/* d */,
37991ab64890Smrg    XFontSet		/* font_set */,
38001ab64890Smrg    GC			/* gc */,
38011ab64890Smrg    int			/* x */,
38021ab64890Smrg    int			/* y */,
38031ab64890Smrg    _Xconst char*	/* text */,
38041ab64890Smrg    int			/* bytes_text */
38051ab64890Smrg);
38061ab64890Smrg
38071ab64890Smrgextern void XmbDrawImageString(
38081ab64890Smrg    Display*		/* display */,
38091ab64890Smrg    Drawable		/* d */,
38101ab64890Smrg    XFontSet		/* font_set */,
38111ab64890Smrg    GC			/* gc */,
38121ab64890Smrg    int			/* x */,
38131ab64890Smrg    int			/* y */,
38141ab64890Smrg    _Xconst char*	/* text */,
38151ab64890Smrg    int			/* bytes_text */
38161ab64890Smrg);
38171ab64890Smrg
38181ab64890Smrgextern void XwcDrawImageString(
38191ab64890Smrg    Display*		/* display */,
38201ab64890Smrg    Drawable		/* d */,
38211ab64890Smrg    XFontSet		/* font_set */,
38221ab64890Smrg    GC			/* gc */,
38231ab64890Smrg    int			/* x */,
38241ab64890Smrg    int			/* y */,
38251ab64890Smrg    _Xconst wchar_t*	/* text */,
38261ab64890Smrg    int			/* num_wchars */
38271ab64890Smrg);
38281ab64890Smrg
38291ab64890Smrgextern void Xutf8DrawImageString(
38301ab64890Smrg    Display*		/* display */,
38311ab64890Smrg    Drawable		/* d */,
38321ab64890Smrg    XFontSet		/* font_set */,
38331ab64890Smrg    GC			/* gc */,
38341ab64890Smrg    int			/* x */,
38351ab64890Smrg    int			/* y */,
38361ab64890Smrg    _Xconst char*	/* text */,
38371ab64890Smrg    int			/* bytes_text */
38381ab64890Smrg);
38391ab64890Smrg
38401ab64890Smrgextern XIM XOpenIM(
38411ab64890Smrg    Display*			/* dpy */,
38421ab64890Smrg    struct _XrmHashBucketRec*	/* rdb */,
38431ab64890Smrg    char*			/* res_name */,
38441ab64890Smrg    char*			/* res_class */
38451ab64890Smrg);
38461ab64890Smrg
38471ab64890Smrgextern Status XCloseIM(
38481ab64890Smrg    XIM /* im */
38491ab64890Smrg);
38501ab64890Smrg
38511ab64890Smrgextern char *XGetIMValues(
38521ab64890Smrg    XIM /* im */, ...
38531ab64890Smrg) _X_SENTINEL(0);
38541ab64890Smrg
38551ab64890Smrgextern char *XSetIMValues(
38561ab64890Smrg    XIM /* im */, ...
38571ab64890Smrg) _X_SENTINEL(0);
38581ab64890Smrg
38591ab64890Smrgextern Display *XDisplayOfIM(
38601ab64890Smrg    XIM /* im */
38611ab64890Smrg);
38621ab64890Smrg
38631ab64890Smrgextern char *XLocaleOfIM(
38641ab64890Smrg    XIM /* im*/
38651ab64890Smrg);
38661ab64890Smrg
38671ab64890Smrgextern XIC XCreateIC(
38681ab64890Smrg    XIM /* im */, ...
38691ab64890Smrg) _X_SENTINEL(0);
38701ab64890Smrg
38711ab64890Smrgextern void XDestroyIC(
38721ab64890Smrg    XIC /* ic */
38731ab64890Smrg);
38741ab64890Smrg
38751ab64890Smrgextern void XSetICFocus(
38761ab64890Smrg    XIC /* ic */
38771ab64890Smrg);
38781ab64890Smrg
38791ab64890Smrgextern void XUnsetICFocus(
38801ab64890Smrg    XIC /* ic */
38811ab64890Smrg);
38821ab64890Smrg
38831ab64890Smrgextern wchar_t *XwcResetIC(
38841ab64890Smrg    XIC /* ic */
38851ab64890Smrg);
38861ab64890Smrg
38871ab64890Smrgextern char *XmbResetIC(
38881ab64890Smrg    XIC /* ic */
38891ab64890Smrg);
38901ab64890Smrg
38911ab64890Smrgextern char *Xutf8ResetIC(
38921ab64890Smrg    XIC /* ic */
38931ab64890Smrg);
38941ab64890Smrg
38951ab64890Smrgextern char *XSetICValues(
38961ab64890Smrg    XIC /* ic */, ...
38971ab64890Smrg) _X_SENTINEL(0);
38981ab64890Smrg
38991ab64890Smrgextern char *XGetICValues(
39001ab64890Smrg    XIC /* ic */, ...
39011ab64890Smrg) _X_SENTINEL(0);
39021ab64890Smrg
39031ab64890Smrgextern XIM XIMOfIC(
39041ab64890Smrg    XIC /* ic */
39051ab64890Smrg);
39061ab64890Smrg
39071ab64890Smrgextern Bool XFilterEvent(
39081ab64890Smrg    XEvent*	/* event */,
39091ab64890Smrg    Window	/* window */
39101ab64890Smrg);
39111ab64890Smrg
39121ab64890Smrgextern int XmbLookupString(
39131ab64890Smrg    XIC			/* ic */,
39141ab64890Smrg    XKeyPressedEvent*	/* event */,
39151ab64890Smrg    char*		/* buffer_return */,
39161ab64890Smrg    int			/* bytes_buffer */,
39171ab64890Smrg    KeySym*		/* keysym_return */,
39181ab64890Smrg    Status*		/* status_return */
39191ab64890Smrg);
39201ab64890Smrg
39211ab64890Smrgextern int XwcLookupString(
39221ab64890Smrg    XIC			/* ic */,
39231ab64890Smrg    XKeyPressedEvent*	/* event */,
39241ab64890Smrg    wchar_t*		/* buffer_return */,
39251ab64890Smrg    int			/* wchars_buffer */,
39261ab64890Smrg    KeySym*		/* keysym_return */,
39271ab64890Smrg    Status*		/* status_return */
39281ab64890Smrg);
39291ab64890Smrg
39301ab64890Smrgextern int Xutf8LookupString(
39311ab64890Smrg    XIC			/* ic */,
39321ab64890Smrg    XKeyPressedEvent*	/* event */,
39331ab64890Smrg    char*		/* buffer_return */,
39341ab64890Smrg    int			/* bytes_buffer */,
39351ab64890Smrg    KeySym*		/* keysym_return */,
39361ab64890Smrg    Status*		/* status_return */
39371ab64890Smrg);
39381ab64890Smrg
39391ab64890Smrgextern XVaNestedList XVaCreateNestedList(
39401ab64890Smrg    int /*unused*/, ...
39411ab64890Smrg) _X_SENTINEL(0);
39421ab64890Smrg
39431ab64890Smrg/* internal connections for IMs */
39441ab64890Smrg
39451ab64890Smrgextern Bool XRegisterIMInstantiateCallback(
39461ab64890Smrg    Display*			/* dpy */,
39471ab64890Smrg    struct _XrmHashBucketRec*	/* rdb */,
39481ab64890Smrg    char*			/* res_name */,
39491ab64890Smrg    char*			/* res_class */,
39501ab64890Smrg    XIDProc			/* callback */,
39511ab64890Smrg    XPointer			/* client_data */
39521ab64890Smrg);
39531ab64890Smrg
39541ab64890Smrgextern Bool XUnregisterIMInstantiateCallback(
39551ab64890Smrg    Display*			/* dpy */,
39561ab64890Smrg    struct _XrmHashBucketRec*	/* rdb */,
39571ab64890Smrg    char*			/* res_name */,
39581ab64890Smrg    char*			/* res_class */,
39591ab64890Smrg    XIDProc			/* callback */,
39601ab64890Smrg    XPointer			/* client_data */
39611ab64890Smrg);
39621ab64890Smrg
39631ab64890Smrgtypedef void (*XConnectionWatchProc)(
39641ab64890Smrg    Display*			/* dpy */,
39651ab64890Smrg    XPointer			/* client_data */,
39661ab64890Smrg    int				/* fd */,
39671ab64890Smrg    Bool			/* opening */,	 /* open or close flag */
39681ab64890Smrg    XPointer*			/* watch_data */ /* open sets, close uses */
39691ab64890Smrg);
397061b2299dSmrg
39711ab64890Smrg
39721ab64890Smrgextern Status XInternalConnectionNumbers(
39731ab64890Smrg    Display*			/* dpy */,
39741ab64890Smrg    int**			/* fd_return */,
39751ab64890Smrg    int*			/* count_return */
39761ab64890Smrg);
39771ab64890Smrg
39781ab64890Smrgextern void XProcessInternalConnection(
39791ab64890Smrg    Display*			/* dpy */,
39801ab64890Smrg    int				/* fd */
39811ab64890Smrg);
39821ab64890Smrg
39831ab64890Smrgextern Status XAddConnectionWatch(
39841ab64890Smrg    Display*			/* dpy */,
39851ab64890Smrg    XConnectionWatchProc	/* callback */,
39861ab64890Smrg    XPointer			/* client_data */
39871ab64890Smrg);
39881ab64890Smrg
39891ab64890Smrgextern void XRemoveConnectionWatch(
39901ab64890Smrg    Display*			/* dpy */,
39911ab64890Smrg    XConnectionWatchProc	/* callback */,
39921ab64890Smrg    XPointer			/* client_data */
39931ab64890Smrg);
39941ab64890Smrg
39951ab64890Smrgextern void XSetAuthorization(
39961ab64890Smrg    char *			/* name */,
399761b2299dSmrg    int				/* namelen */,
39981ab64890Smrg    char *			/* data */,
39991ab64890Smrg    int				/* datalen */
40001ab64890Smrg);
40011ab64890Smrg
40021ab64890Smrgextern int _Xmbtowc(
40031ab64890Smrg    wchar_t *			/* wstr */,
40041ab64890Smrg    char *			/* str */,
40051ab64890Smrg    int				/* len */
40061ab64890Smrg);
40071ab64890Smrg
40081ab64890Smrgextern int _Xwctomb(
40091ab64890Smrg    char *			/* str */,
40101ab64890Smrg    wchar_t			/* wc */
40111ab64890Smrg);
40121ab64890Smrg
4013b4ee4795Smrgextern Bool XGetEventData(
4014b4ee4795Smrg    Display*			/* dpy */,
4015b4ee4795Smrg    XGenericEventCookie*	/* cookie*/
4016b4ee4795Smrg);
4017b4ee4795Smrg
4018b4ee4795Smrgextern void XFreeEventData(
4019b4ee4795Smrg    Display*			/* dpy */,
4020b4ee4795Smrg    XGenericEventCookie*	/* cookie*/
4021b4ee4795Smrg);
4022b4ee4795Smrg
4023eb411b4bSmrg#ifdef __clang__
4024eb411b4bSmrg#pragma clang diagnostic pop
4025eb411b4bSmrg#endif
4026eb411b4bSmrg
40271ab64890Smrg_XFUNCPROTOEND
40281ab64890Smrg
4029e9fcaa8aSmrg#endif /* _X11_XLIB_H_ */
4030