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