3
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
5
Permission to use, copy, modify, distribute, and sell this software and its
6
documentation for any purpose is hereby granted without fee, provided that
7
the above copyright notice appear in all copies and that both that
8
copyright notice and this permission notice appear in supporting
11
The above copyright notice and this permission notice shall be included in
12
all copies or substantial portions of the Software.
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
Except as contained in this notice, the name of The Open Group shall not be
22
used in advertising or otherwise to promote the sale, use or other dealings
23
in this Software without prior written authorization from The Open Group.
29
* Xlib.h - Header definition and support file for the C subroutine
30
* interface library (Xlib) to the X Window System Protocol (V11).
31
* Structures and symbols starting with "_" are private to the library.
36
#define XlibSpecificationRelease 6
38
#include <sys/types.h>
40
#if defined(__SCO__) || defined(__UNIXWARE__)
46
/* applications should not depend on these two headers being included! */
47
#include <X11/Xfuncproto.h>
48
#include <X11/Xosdefs.h>
56
/* replace this with #include or typedef appropriate for your system */
57
typedef unsigned long wchar_t;
61
#if defined(ISC) && defined(USE_XMBTOWC)
62
#define wctomb(a,b) _Xwctomb(a,b)
63
#define mblen(a,b) _Xmblen(a,b)
64
#ifndef USE_XWCHAR_STRING
65
#define mbtowc(a,b,c) _Xmbtowc(a,b,c)
80
/* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in
81
November 2000. Its presence is indicated through the following macro. */
82
#define X_HAVE_UTF8_STRING 1
84
typedef char *XPointer;
91
#define QueuedAlready 0
92
#define QueuedAfterReading 1
93
#define QueuedAfterFlush 2
95
#define ConnectionNumber(dpy) (((_XPrivDisplay)dpy)->fd)
96
#define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root)
97
#define DefaultScreen(dpy) (((_XPrivDisplay)dpy)->default_screen)
98
#define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
99
#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
100
#define DefaultGC(dpy, scr) (ScreenOfDisplay(dpy,scr)->default_gc)
101
#define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel)
102
#define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel)
103
#define AllPlanes ((unsigned long)~0L)
104
#define QLength(dpy) (((_XPrivDisplay)dpy)->qlen)
105
#define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width)
106
#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
107
#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
108
#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
109
#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
110
#define DisplayCells(dpy, scr) (DefaultVisual(dpy,scr)->map_entries)
111
#define ScreenCount(dpy) (((_XPrivDisplay)dpy)->nscreens)
112
#define ServerVendor(dpy) (((_XPrivDisplay)dpy)->vendor)
113
#define ProtocolVersion(dpy) (((_XPrivDisplay)dpy)->proto_major_version)
114
#define ProtocolRevision(dpy) (((_XPrivDisplay)dpy)->proto_minor_version)
115
#define VendorRelease(dpy) (((_XPrivDisplay)dpy)->release)
116
#define DisplayString(dpy) (((_XPrivDisplay)dpy)->display_name)
117
#define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
118
#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
119
#define BitmapUnit(dpy) (((_XPrivDisplay)dpy)->bitmap_unit)
120
#define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order)
121
#define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad)
122
#define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order)
123
#ifdef CRAY /* unable to get WORD64 without pulling in other symbols */
124
#define NextRequest(dpy) XNextRequest(dpy)
126
#define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1)
128
#define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read)
130
/* macros for screen oriented applications (toolkit) */
131
#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
132
#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
133
#define DisplayOfScreen(s) ((s)->display)
134
#define RootWindowOfScreen(s) ((s)->root)
135
#define BlackPixelOfScreen(s) ((s)->black_pixel)
136
#define WhitePixelOfScreen(s) ((s)->white_pixel)
137
#define DefaultColormapOfScreen(s)((s)->cmap)
138
#define DefaultDepthOfScreen(s) ((s)->root_depth)
139
#define DefaultGCOfScreen(s) ((s)->default_gc)
140
#define DefaultVisualOfScreen(s)((s)->root_visual)
141
#define WidthOfScreen(s) ((s)->width)
142
#define HeightOfScreen(s) ((s)->height)
143
#define WidthMMOfScreen(s) ((s)->mwidth)
144
#define HeightMMOfScreen(s) ((s)->mheight)
145
#define PlanesOfScreen(s) ((s)->root_depth)
146
#define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries)
147
#define MinCmapsOfScreen(s) ((s)->min_maps)
148
#define MaxCmapsOfScreen(s) ((s)->max_maps)
149
#define DoesSaveUnders(s) ((s)->save_unders)
150
#define DoesBackingStore(s) ((s)->backing_store)
151
#define EventMaskOfScreen(s) ((s)->root_input_mask)
154
* Extensions need a way to hang private data on some structures.
156
typedef struct _XExtData {
157
int number; /* number returned by XRegisterExtension */
158
struct _XExtData *next; /* next item on list of data for structure */
159
int (*free_private)( /* called to free private storage */
160
struct _XExtData *extension
162
XPointer private_data; /* data private to this extension. */
166
* This file contains structures used by the extension mechanism.
168
typedef struct { /* public to extension, cannot be changed */
169
int extension; /* extension number */
170
int major_opcode; /* major op-code assigned by server */
171
int first_event; /* first event number for the extension */
172
int first_error; /* first error number for the extension */
176
* Data structure for retrieving info about pixmap formats.
183
} XPixmapFormatValues;
187
* Data structure for setting graphics context.
190
int function; /* logical operation */
191
unsigned long plane_mask;/* plane mask */
192
unsigned long foreground;/* foreground pixel */
193
unsigned long background;/* background pixel */
194
int line_width; /* line width */
195
int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
196
int cap_style; /* CapNotLast, CapButt,
197
CapRound, CapProjecting */
198
int join_style; /* JoinMiter, JoinRound, JoinBevel */
199
int fill_style; /* FillSolid, FillTiled,
200
FillStippled, FillOpaeueStippled */
201
int fill_rule; /* EvenOddRule, WindingRule */
202
int arc_mode; /* ArcChord, ArcPieSlice */
203
Pixmap tile; /* tile pixmap for tiling operations */
204
Pixmap stipple; /* stipple 1 plane pixmap for stipping */
205
int ts_x_origin; /* offset for tile or stipple operations */
207
Font font; /* default text font for text operations */
208
int subwindow_mode; /* ClipByChildren, IncludeInferiors */
209
Bool graphics_exposures;/* boolean, should exposures be generated */
210
int clip_x_origin; /* origin for clipping */
212
Pixmap clip_mask; /* bitmap clipping; other calls for rects */
213
int dash_offset; /* patterned/dashed line information */
218
* Graphics context. The contents of this structure are implementation
219
* dependent. A GC should be treated as opaque by application code.
223
#ifdef XLIB_ILLEGAL_ACCESS
225
XExtData *ext_data; /* hook for extension to hang data */
226
GContext gid; /* protocol ID for graphics context */
227
/* there is more to this structure, but it is private to Xlib */
233
* Visual structure; contains information about colormapping possible.
236
XExtData *ext_data; /* hook for extension to hang data */
237
VisualID visualid; /* visual id of this visual */
238
#if defined(__cplusplus) || defined(c_plusplus)
239
int c_class; /* C++ class of screen (monochrome, etc.) */
241
int class; /* class of screen (monochrome, etc.) */
243
unsigned long red_mask, green_mask, blue_mask; /* mask values */
244
int bits_per_rgb; /* log base 2 of distinct color values */
245
int map_entries; /* color map entries */
249
* Depth structure; contains information for each possible depth.
252
int depth; /* this depth (Z) of the depth */
253
int nvisuals; /* number of Visual types at this depth */
254
Visual *visuals; /* list of visuals possible at this depth */
258
* Information about the screen. The contents of this structure are
259
* implementation dependent. A Screen should be treated as opaque
260
* by application code.
263
struct _XDisplay; /* Forward declare before use for C++ */
266
XExtData *ext_data; /* hook for extension to hang data */
267
struct _XDisplay *display;/* back pointer to display structure */
268
Window root; /* Root window id. */
269
int width, height; /* width and height of screen */
270
int mwidth, mheight; /* width and height of in millimeters */
271
int ndepths; /* number of depths possible */
272
Depth *depths; /* list of allowable depths on the screen */
273
int root_depth; /* bits per pixel */
274
Visual *root_visual; /* root visual */
275
GC default_gc; /* GC for the root root visual */
276
Colormap cmap; /* default color map */
277
unsigned long white_pixel;
278
unsigned long black_pixel; /* White and Black pixel values */
279
int max_maps, min_maps; /* max and min color maps */
280
int backing_store; /* Never, WhenMapped, Always */
282
long root_input_mask; /* initial root input mask */
286
* Format structure; describes ZFormat data the screen will understand.
289
XExtData *ext_data; /* hook for extension to hang data */
290
int depth; /* depth of this image format */
291
int bits_per_pixel; /* bits/pixel at this depth */
292
int scanline_pad; /* scanline must padded to this multiple */
296
* Data structure for setting window attributes.
299
Pixmap background_pixmap; /* background or None or ParentRelative */
300
unsigned long background_pixel; /* background pixel */
301
Pixmap border_pixmap; /* border of the window */
302
unsigned long border_pixel; /* border pixel value */
303
int bit_gravity; /* one of bit gravity values */
304
int win_gravity; /* one of the window gravity values */
305
int backing_store; /* NotUseful, WhenMapped, Always */
306
unsigned long backing_planes;/* planes to be preseved if possible */
307
unsigned long backing_pixel;/* value to use in restoring planes */
308
Bool save_under; /* should bits under be saved? (popups) */
309
long event_mask; /* set of events that should be saved */
310
long do_not_propagate_mask; /* set of events that should not propagate */
311
Bool override_redirect; /* boolean value for override-redirect */
312
Colormap colormap; /* color map to be associated with window */
313
Cursor cursor; /* cursor to be displayed (or None) */
314
} XSetWindowAttributes;
317
int x, y; /* location of window */
318
int width, height; /* width and height of window */
319
int border_width; /* border width of window */
320
int depth; /* depth of window */
321
Visual *visual; /* the associated visual structure */
322
Window root; /* root of screen containing window */
323
#if defined(__cplusplus) || defined(c_plusplus)
324
int c_class; /* C++ InputOutput, InputOnly*/
326
int class; /* InputOutput, InputOnly*/
328
int bit_gravity; /* one of bit gravity values */
329
int win_gravity; /* one of the window gravity values */
330
int backing_store; /* NotUseful, WhenMapped, Always */
331
unsigned long backing_planes;/* planes to be preserved if possible */
332
unsigned long backing_pixel;/* value to be used when restoring planes */
333
Bool save_under; /* boolean, should bits under be saved? */
334
Colormap colormap; /* color map to be associated with window */
335
Bool map_installed; /* boolean, is color map currently installed*/
336
int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
337
long all_event_masks; /* set of events all people have interest in*/
338
long your_event_mask; /* my event mask */
339
long do_not_propagate_mask; /* set of events that should not propagate */
340
Bool override_redirect; /* boolean value for override-redirect */
341
Screen *screen; /* back pointer to correct screen */
345
* Data structure for host setting; getting routines.
350
int family; /* for example FamilyInternet */
351
int length; /* length of address, in bytes */
352
char *address; /* pointer to where to find the bytes */
356
* Data structure for ServerFamilyInterpreted addresses in host routines
359
int typelength; /* length of type string, in bytes */
360
int valuelength; /* length of value string, in bytes */
361
char *type; /* pointer to where to find the type string */
362
char *value; /* pointer to where to find the address */
363
} XServerInterpretedAddress;
366
* Data structure for "image" data, used by image manipulation routines.
368
typedef struct _XImage {
369
int width, height; /* size of image */
370
int xoffset; /* number of pixels offset in X direction */
371
int format; /* XYBitmap, XYPixmap, ZPixmap */
372
char *data; /* pointer to image data */
373
int byte_order; /* data byte order, LSBFirst, MSBFirst */
374
int bitmap_unit; /* quant. of scanline 8, 16, 32 */
375
int bitmap_bit_order; /* LSBFirst, MSBFirst */
376
int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */
377
int depth; /* depth of image */
378
int bytes_per_line; /* accelarator to next line */
379
int bits_per_pixel; /* bits per pixel (ZPixmap) */
380
unsigned long red_mask; /* bits in z arrangment */
381
unsigned long green_mask;
382
unsigned long blue_mask;
383
XPointer obdata; /* hook for the object routines to hang on */
384
struct funcs { /* image manipulation routines */
385
struct _XImage *(*create_image)(
386
struct _XDisplay* /* display */,
387
Visual* /* visual */,
388
unsigned int /* depth */,
392
unsigned int /* width */,
393
unsigned int /* height */,
394
int /* bitmap_pad */,
395
int /* bytes_per_line */);
396
int (*destroy_image) (struct _XImage *);
397
unsigned long (*get_pixel) (struct _XImage *, int, int);
398
int (*put_pixel) (struct _XImage *, int, int, unsigned long);
399
struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
400
int (*add_pixel) (struct _XImage *, long);
405
* Data structure for XReconfigureWindow
416
* Data structure used by color operations
420
unsigned short red, green, blue;
421
char flags; /* do_red, do_green, do_blue */
426
* Data structures for graphics operations. On most machines, these are
427
* congruent with the wire protocol structures, so reformatting the data
428
* can be avoided on these architectures.
431
short x1, y1, x2, y2;
440
unsigned short width, height;
445
unsigned short width, height;
446
short angle1, angle2;
450
/* Data structure for XChangeKeyboardControl */
453
int key_click_percent;
460
int auto_repeat_mode; /* On, Off, Default */
463
/* Data structure for XGetKeyboardControl */
466
int key_click_percent;
468
unsigned int bell_pitch, bell_duration;
469
unsigned long led_mask;
470
int global_auto_repeat;
471
char auto_repeats[32];
474
/* Data structure for XGetMotionEvents. */
481
/* Data structure for X{Set,Get}ModifierMapping */
484
int max_keypermod; /* The server's max # of keys per modifier */
485
KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */
490
* Display datatype maintaining display specific data.
491
* The contents of this structure are implementation dependent.
492
* A Display should be treated as opaque by application code.
494
#ifndef XLIB_ILLEGAL_ACCESS
495
typedef struct _XDisplay Display;
498
struct _XPrivate; /* Forward declare before use for C++ */
499
struct _XrmHashBucketRec;
502
#ifdef XLIB_ILLEGAL_ACCESS
506
XExtData *ext_data; /* hook for extension to hang data */
507
struct _XPrivate *private1;
508
int fd; /* Network socket. */
510
int proto_major_version;/* major version of server's X protocol */
511
int proto_minor_version;/* minor version of servers X protocol */
512
char *vendor; /* vendor of the server hardware */
517
XID (*resource_alloc)( /* allocator function */
520
int byte_order; /* screen byte order, LSBFirst, MSBFirst */
521
int bitmap_unit; /* padding and data requirements */
522
int bitmap_pad; /* padding requirements on bitmaps */
523
int bitmap_bit_order; /* LeastSignificant or MostSignificant */
524
int nformats; /* number of pixmap formats in list */
525
ScreenFormat *pixmap_format; /* pixmap format list */
527
int release; /* release of the server */
528
struct _XPrivate *private9, *private10;
529
int qlen; /* Length of input event queue */
530
unsigned long last_request_read; /* seq number of last event read */
531
unsigned long request; /* sequence number of last request. */
536
unsigned max_request_size; /* maximum number 32 bit words in request*/
537
struct _XrmHashBucketRec *db;
541
char *display_name; /* "host:display" string used on this connect*/
542
int default_screen; /* default screen for operations */
543
int nscreens; /* number of screens on this server*/
544
Screen *screens; /* pointer to list of screens */
545
unsigned long motion_buffer; /* size of motion buffer */
546
unsigned long private16;
547
int min_keycode; /* minimum defined keycode */
548
int max_keycode; /* maximum defined keycode */
552
char *xdefaults; /* contents of defaults from server */
553
/* there is more to this structure, but it is private to Xlib */
555
#ifdef XLIB_ILLEGAL_ACCESS
563
* Definitions of specific events.
566
int type; /* of event */
567
unsigned long serial; /* # of last request processed by server */
568
Bool send_event; /* true if this came from a SendEvent request */
569
Display *display; /* Display the event was read from */
570
Window window; /* "event" window it is reported relative to */
571
Window root; /* root window that the event occurred on */
572
Window subwindow; /* child window */
573
Time time; /* milliseconds */
574
int x, y; /* pointer x, y coordinates in event window */
575
int x_root, y_root; /* coordinates relative to root */
576
unsigned int state; /* key or button mask */
577
unsigned int keycode; /* detail */
578
Bool same_screen; /* same screen flag */
580
typedef XKeyEvent XKeyPressedEvent;
581
typedef XKeyEvent XKeyReleasedEvent;
584
int type; /* of event */
585
unsigned long serial; /* # of last request processed by server */
586
Bool send_event; /* true if this came from a SendEvent request */
587
Display *display; /* Display the event was read from */
588
Window window; /* "event" window it is reported relative to */
589
Window root; /* root window that the event occurred on */
590
Window subwindow; /* child window */
591
Time time; /* milliseconds */
592
int x, y; /* pointer x, y coordinates in event window */
593
int x_root, y_root; /* coordinates relative to root */
594
unsigned int state; /* key or button mask */
595
unsigned int button; /* detail */
596
Bool same_screen; /* same screen flag */
598
typedef XButtonEvent XButtonPressedEvent;
599
typedef XButtonEvent XButtonReleasedEvent;
602
int type; /* of event */
603
unsigned long serial; /* # of last request processed by server */
604
Bool send_event; /* true if this came from a SendEvent request */
605
Display *display; /* Display the event was read from */
606
Window window; /* "event" window reported relative to */
607
Window root; /* root window that the event occurred on */
608
Window subwindow; /* child window */
609
Time time; /* milliseconds */
610
int x, y; /* pointer x, y coordinates in event window */
611
int x_root, y_root; /* coordinates relative to root */
612
unsigned int state; /* key or button mask */
613
char is_hint; /* detail */
614
Bool same_screen; /* same screen flag */
616
typedef XMotionEvent XPointerMovedEvent;
619
int type; /* of event */
620
unsigned long serial; /* # of last request processed by server */
621
Bool send_event; /* true if this came from a SendEvent request */
622
Display *display; /* Display the event was read from */
623
Window window; /* "event" window reported relative to */
624
Window root; /* root window that the event occurred on */
625
Window subwindow; /* child window */
626
Time time; /* milliseconds */
627
int x, y; /* pointer x, y coordinates in event window */
628
int x_root, y_root; /* coordinates relative to root */
629
int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
632
* NotifyAncestor, NotifyVirtual, NotifyInferior,
633
* NotifyNonlinear,NotifyNonlinearVirtual
635
Bool same_screen; /* same screen flag */
636
Bool focus; /* boolean focus */
637
unsigned int state; /* key or button mask */
639
typedef XCrossingEvent XEnterWindowEvent;
640
typedef XCrossingEvent XLeaveWindowEvent;
643
int type; /* FocusIn or FocusOut */
644
unsigned long serial; /* # of last request processed by server */
645
Bool send_event; /* true if this came from a SendEvent request */
646
Display *display; /* Display the event was read from */
647
Window window; /* window of event */
648
int mode; /* NotifyNormal, NotifyWhileGrabbed,
649
NotifyGrab, NotifyUngrab */
652
* NotifyAncestor, NotifyVirtual, NotifyInferior,
653
* NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
654
* NotifyPointerRoot, NotifyDetailNone
657
typedef XFocusChangeEvent XFocusInEvent;
658
typedef XFocusChangeEvent XFocusOutEvent;
660
/* generated on EnterWindow and FocusIn when KeyMapState selected */
663
unsigned long serial; /* # of last request processed by server */
664
Bool send_event; /* true if this came from a SendEvent request */
665
Display *display; /* Display the event was read from */
672
unsigned long serial; /* # of last request processed by server */
673
Bool send_event; /* true if this came from a SendEvent request */
674
Display *display; /* Display the event was read from */
678
int count; /* if non-zero, at least this many more */
683
unsigned long serial; /* # of last request processed by server */
684
Bool send_event; /* true if this came from a SendEvent request */
685
Display *display; /* Display the event was read from */
689
int count; /* if non-zero, at least this many more */
690
int major_code; /* core is CopyArea or CopyPlane */
691
int minor_code; /* not defined in the core */
692
} XGraphicsExposeEvent;
696
unsigned long serial; /* # of last request processed by server */
697
Bool send_event; /* true if this came from a SendEvent request */
698
Display *display; /* Display the event was read from */
700
int major_code; /* core is CopyArea or CopyPlane */
701
int minor_code; /* not defined in the core */
706
unsigned long serial; /* # of last request processed by server */
707
Bool send_event; /* true if this came from a SendEvent request */
708
Display *display; /* Display the event was read from */
710
int state; /* Visibility state */
715
unsigned long serial; /* # of last request processed by server */
716
Bool send_event; /* true if this came from a SendEvent request */
717
Display *display; /* Display the event was read from */
718
Window parent; /* parent of the window */
719
Window window; /* window id of window created */
720
int x, y; /* window location */
721
int width, height; /* size of window */
722
int border_width; /* border width */
723
Bool override_redirect; /* creation should be overridden */
724
} XCreateWindowEvent;
728
unsigned long serial; /* # of last request processed by server */
729
Bool send_event; /* true if this came from a SendEvent request */
730
Display *display; /* Display the event was read from */
733
} XDestroyWindowEvent;
737
unsigned long serial; /* # of last request processed by server */
738
Bool send_event; /* true if this came from a SendEvent request */
739
Display *display; /* Display the event was read from */
747
unsigned long serial; /* # of last request processed by server */
748
Bool send_event; /* true if this came from a SendEvent request */
749
Display *display; /* Display the event was read from */
752
Bool override_redirect; /* boolean, is override set... */
757
unsigned long serial; /* # of last request processed by server */
758
Bool send_event; /* true if this came from a SendEvent request */
759
Display *display; /* Display the event was read from */
766
unsigned long serial; /* # of last request processed by server */
767
Bool send_event; /* true if this came from a SendEvent request */
768
Display *display; /* Display the event was read from */
773
Bool override_redirect;
778
unsigned long serial; /* # of last request processed by server */
779
Bool send_event; /* true if this came from a SendEvent request */
780
Display *display; /* Display the event was read from */
787
Bool override_redirect;
792
unsigned long serial; /* # of last request processed by server */
793
Bool send_event; /* true if this came from a SendEvent request */
794
Display *display; /* Display the event was read from */
802
unsigned long serial; /* # of last request processed by server */
803
Bool send_event; /* true if this came from a SendEvent request */
804
Display *display; /* Display the event was read from */
807
} XResizeRequestEvent;
811
unsigned long serial; /* # of last request processed by server */
812
Bool send_event; /* true if this came from a SendEvent request */
813
Display *display; /* Display the event was read from */
820
int detail; /* Above, Below, TopIf, BottomIf, Opposite */
821
unsigned long value_mask;
822
} XConfigureRequestEvent;
826
unsigned long serial; /* # of last request processed by server */
827
Bool send_event; /* true if this came from a SendEvent request */
828
Display *display; /* Display the event was read from */
831
int place; /* PlaceOnTop, PlaceOnBottom */
836
unsigned long serial; /* # of last request processed by server */
837
Bool send_event; /* true if this came from a SendEvent request */
838
Display *display; /* Display the event was read from */
841
int place; /* PlaceOnTop, PlaceOnBottom */
842
} XCirculateRequestEvent;
846
unsigned long serial; /* # of last request processed by server */
847
Bool send_event; /* true if this came from a SendEvent request */
848
Display *display; /* Display the event was read from */
852
int state; /* NewValue, Deleted */
857
unsigned long serial; /* # of last request processed by server */
858
Bool send_event; /* true if this came from a SendEvent request */
859
Display *display; /* Display the event was read from */
863
} XSelectionClearEvent;
867
unsigned long serial; /* # of last request processed by server */
868
Bool send_event; /* true if this came from a SendEvent request */
869
Display *display; /* Display the event was read from */
876
} XSelectionRequestEvent;
880
unsigned long serial; /* # of last request processed by server */
881
Bool send_event; /* true if this came from a SendEvent request */
882
Display *display; /* Display the event was read from */
886
Atom property; /* ATOM or None */
892
unsigned long serial; /* # of last request processed by server */
893
Bool send_event; /* true if this came from a SendEvent request */
894
Display *display; /* Display the event was read from */
896
Colormap colormap; /* COLORMAP or None */
897
#if defined(__cplusplus) || defined(c_plusplus)
898
Bool c_new; /* C++ */
902
int state; /* ColormapInstalled, ColormapUninstalled */
907
unsigned long serial; /* # of last request processed by server */
908
Bool send_event; /* true if this came from a SendEvent request */
909
Display *display; /* Display the event was read from */
918
} XClientMessageEvent;
922
unsigned long serial; /* # of last request processed by server */
923
Bool send_event; /* true if this came from a SendEvent request */
924
Display *display; /* Display the event was read from */
925
Window window; /* unused */
926
int request; /* one of MappingModifier, MappingKeyboard,
928
int first_keycode; /* first keycode */
929
int count; /* defines range of change w. first_keycode*/
934
Display *display; /* Display the event was read from */
935
XID resourceid; /* resource id */
936
unsigned long serial; /* serial number of failed request */
937
unsigned char error_code; /* error code of failed request */
938
unsigned char request_code; /* Major op-code of failed request */
939
unsigned char minor_code; /* Minor op-code of failed request */
944
unsigned long serial; /* # of last request processed by server */
945
Bool send_event; /* true if this came from a SendEvent request */
946
Display *display;/* Display the event was read from */
947
Window window; /* window on which event was requested in event mask */
951
/***************************************************************
953
* GenericEvent. This event is the standard event for all newer extensions.
958
int type; /* of event. Always GenericEvent */
959
unsigned long serial; /* # of last request processed */
960
Bool send_event; /* true if from SendEvent request */
961
Display *display; /* Display the event was read from */
962
int extension; /* major opcode of extension that caused the event */
963
int evtype; /* actual event type. */
967
int type; /* of event. Always GenericEvent */
968
unsigned long serial; /* # of last request processed */
969
Bool send_event; /* true if from SendEvent request */
970
Display *display; /* Display the event was read from */
971
int extension; /* major opcode of extension that caused the event */
972
int evtype; /* actual event type. */
975
} XGenericEventCookie;
978
* this union is defined so Xlib can always use the same sized
979
* event structure internally, to avoid memory fragmentation.
981
typedef union _XEvent {
982
int type; /* must not be changed; first element */
985
XButtonEvent xbutton;
986
XMotionEvent xmotion;
987
XCrossingEvent xcrossing;
988
XFocusChangeEvent xfocus;
989
XExposeEvent xexpose;
990
XGraphicsExposeEvent xgraphicsexpose;
991
XNoExposeEvent xnoexpose;
992
XVisibilityEvent xvisibility;
993
XCreateWindowEvent xcreatewindow;
994
XDestroyWindowEvent xdestroywindow;
997
XMapRequestEvent xmaprequest;
998
XReparentEvent xreparent;
999
XConfigureEvent xconfigure;
1000
XGravityEvent xgravity;
1001
XResizeRequestEvent xresizerequest;
1002
XConfigureRequestEvent xconfigurerequest;
1003
XCirculateEvent xcirculate;
1004
XCirculateRequestEvent xcirculaterequest;
1005
XPropertyEvent xproperty;
1006
XSelectionClearEvent xselectionclear;
1007
XSelectionRequestEvent xselectionrequest;
1008
XSelectionEvent xselection;
1009
XColormapEvent xcolormap;
1010
XClientMessageEvent xclient;
1011
XMappingEvent xmapping;
1013
XKeymapEvent xkeymap;
1014
XGenericEvent xgeneric;
1015
XGenericEventCookie xcookie;
1020
#define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))
1023
* per character font metric information.
1026
short lbearing; /* origin to left edge of raster */
1027
short rbearing; /* origin to right edge of raster */
1028
short width; /* advance to next char's origin */
1029
short ascent; /* baseline to top edge of raster */
1030
short descent; /* baseline to bottom edge of raster */
1031
unsigned short attributes; /* per char flags (not predefined) */
1035
* To allow arbitrary information with fonts, there are additional properties
1040
unsigned long card32;
1044
XExtData *ext_data; /* hook for extension to hang data */
1045
Font fid; /* Font id for this font */
1046
unsigned direction; /* hint about direction the font is painted */
1047
unsigned min_char_or_byte2;/* first character */
1048
unsigned max_char_or_byte2;/* last character */
1049
unsigned min_byte1; /* first row that exists */
1050
unsigned max_byte1; /* last row that exists */
1051
Bool all_chars_exist;/* flag if all characters have non-zero size*/
1052
unsigned default_char; /* char to print for undefined character */
1053
int n_properties; /* how many properties there are */
1054
XFontProp *properties; /* pointer to array of additional properties*/
1055
XCharStruct min_bounds; /* minimum bounds over all existing char*/
1056
XCharStruct max_bounds; /* maximum bounds over all existing char*/
1057
XCharStruct *per_char; /* first_char to last_char information */
1058
int ascent; /* log. extent above baseline for spacing */
1059
int descent; /* log. descent below baseline for spacing */
1063
* PolyText routines take these as arguments.
1066
char *chars; /* pointer to string */
1067
int nchars; /* number of characters */
1068
int delta; /* delta between strings */
1069
Font font; /* font to print it in, None don't change */
1072
typedef struct { /* normal 16 bit characters are two bytes */
1073
unsigned char byte1;
1074
unsigned char byte2;
1078
XChar2b *chars; /* two byte characters */
1079
int nchars; /* number of characters */
1080
int delta; /* delta between strings */
1081
Font font; /* font to print it in, None don't change */
1085
typedef union { Display *display;
1089
ScreenFormat *pixmap_format;
1090
XFontStruct *font; } XEDataObject;
1093
XRectangle max_ink_extent;
1094
XRectangle max_logical_extent;
1098
typedef void (*XOMProc)();
1101
typedef struct _XOM *XOM;
1102
typedef struct _XOC *XOC, *XFontSet;
1118
#define XNRequiredCharSet "requiredCharSet"
1119
#define XNQueryOrientation "queryOrientation"
1120
#define XNBaseFontName "baseFontName"
1121
#define XNOMAutomatic "omAutomatic"
1122
#define XNMissingCharSet "missingCharSet"
1123
#define XNDefaultString "defaultString"
1124
#define XNOrientation "orientation"
1125
#define XNDirectionalDependentDrawing "directionalDependentDrawing"
1126
#define XNContextualDrawing "contextualDrawing"
1127
#define XNFontInfo "fontInfo"
1131
char **charset_list;
1135
XOMOrientation_LTR_TTB,
1136
XOMOrientation_RTL_TTB,
1137
XOMOrientation_TTB_LTR,
1138
XOMOrientation_TTB_RTL,
1139
XOMOrientation_Context
1143
int num_orientation;
1144
XOrientation *orientation; /* Input Text description */
1149
XFontStruct **font_struct_list;
1150
char **font_name_list;
1153
typedef struct _XIM *XIM;
1154
typedef struct _XIC *XIC;
1156
typedef void (*XIMProc)(
1162
typedef Bool (*XICProc)(
1168
typedef void (*XIDProc)(
1174
typedef unsigned long XIMStyle;
1177
unsigned short count_styles;
1178
XIMStyle *supported_styles;
1181
#define XIMPreeditArea 0x0001L
1182
#define XIMPreeditCallbacks 0x0002L
1183
#define XIMPreeditPosition 0x0004L
1184
#define XIMPreeditNothing 0x0008L
1185
#define XIMPreeditNone 0x0010L
1186
#define XIMStatusArea 0x0100L
1187
#define XIMStatusCallbacks 0x0200L
1188
#define XIMStatusNothing 0x0400L
1189
#define XIMStatusNone 0x0800L
1191
#define XNVaNestedList "XNVaNestedList"
1192
#define XNQueryInputStyle "queryInputStyle"
1193
#define XNClientWindow "clientWindow"
1194
#define XNInputStyle "inputStyle"
1195
#define XNFocusWindow "focusWindow"
1196
#define XNResourceName "resourceName"
1197
#define XNResourceClass "resourceClass"
1198
#define XNGeometryCallback "geometryCallback"
1199
#define XNDestroyCallback "destroyCallback"
1200
#define XNFilterEvents "filterEvents"
1201
#define XNPreeditStartCallback "preeditStartCallback"
1202
#define XNPreeditDoneCallback "preeditDoneCallback"
1203
#define XNPreeditDrawCallback "preeditDrawCallback"
1204
#define XNPreeditCaretCallback "preeditCaretCallback"
1205
#define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1206
#define XNPreeditAttributes "preeditAttributes"
1207
#define XNStatusStartCallback "statusStartCallback"
1208
#define XNStatusDoneCallback "statusDoneCallback"
1209
#define XNStatusDrawCallback "statusDrawCallback"
1210
#define XNStatusAttributes "statusAttributes"
1211
#define XNArea "area"
1212
#define XNAreaNeeded "areaNeeded"
1213
#define XNSpotLocation "spotLocation"
1214
#define XNColormap "colorMap"
1215
#define XNStdColormap "stdColorMap"
1216
#define XNForeground "foreground"
1217
#define XNBackground "background"
1218
#define XNBackgroundPixmap "backgroundPixmap"
1219
#define XNFontSet "fontSet"
1220
#define XNLineSpace "lineSpace"
1221
#define XNCursor "cursor"
1223
#define XNQueryIMValuesList "queryIMValuesList"
1224
#define XNQueryICValuesList "queryICValuesList"
1225
#define XNVisiblePosition "visiblePosition"
1226
#define XNR6PreeditCallback "r6PreeditCallback"
1227
#define XNStringConversionCallback "stringConversionCallback"
1228
#define XNStringConversion "stringConversion"
1229
#define XNResetState "resetState"
1230
#define XNHotKey "hotKey"
1231
#define XNHotKeyState "hotKeyState"
1232
#define XNPreeditState "preeditState"
1233
#define XNSeparatorofNestedList "separatorofNestedList"
1235
#define XBufferOverflow -1
1236
#define XLookupNone 1
1237
#define XLookupChars 2
1238
#define XLookupKeySym 3
1239
#define XLookupBoth 4
1241
typedef void *XVaNestedList;
1244
XPointer client_data;
1249
XPointer client_data;
1253
typedef unsigned long XIMFeedback;
1255
#define XIMReverse 1L
1256
#define XIMUnderline (1L<<1)
1257
#define XIMHighlight (1L<<2)
1258
#define XIMPrimary (1L<<5)
1259
#define XIMSecondary (1L<<6)
1260
#define XIMTertiary (1L<<7)
1261
#define XIMVisibleToForward (1L<<8)
1262
#define XIMVisibleToBackword (1L<<9)
1263
#define XIMVisibleToCenter (1L<<10)
1265
typedef struct _XIMText {
1266
unsigned short length;
1267
XIMFeedback *feedback;
1268
Bool encoding_is_wchar;
1275
typedef unsigned long XIMPreeditState;
1277
#define XIMPreeditUnKnown 0L
1278
#define XIMPreeditEnable 1L
1279
#define XIMPreeditDisable (1L<<1)
1281
typedef struct _XIMPreeditStateNotifyCallbackStruct {
1282
XIMPreeditState state;
1283
} XIMPreeditStateNotifyCallbackStruct;
1285
typedef unsigned long XIMResetState;
1287
#define XIMInitialState 1L
1288
#define XIMPreserveState (1L<<1)
1290
typedef unsigned long XIMStringConversionFeedback;
1292
#define XIMStringConversionLeftEdge (0x00000001)
1293
#define XIMStringConversionRightEdge (0x00000002)
1294
#define XIMStringConversionTopEdge (0x00000004)
1295
#define XIMStringConversionBottomEdge (0x00000008)
1296
#define XIMStringConversionConcealed (0x00000010)
1297
#define XIMStringConversionWrapped (0x00000020)
1299
typedef struct _XIMStringConversionText {
1300
unsigned short length;
1301
XIMStringConversionFeedback *feedback;
1302
Bool encoding_is_wchar;
1307
} XIMStringConversionText;
1309
typedef unsigned short XIMStringConversionPosition;
1311
typedef unsigned short XIMStringConversionType;
1313
#define XIMStringConversionBuffer (0x0001)
1314
#define XIMStringConversionLine (0x0002)
1315
#define XIMStringConversionWord (0x0003)
1316
#define XIMStringConversionChar (0x0004)
1318
typedef unsigned short XIMStringConversionOperation;
1320
#define XIMStringConversionSubstitution (0x0001)
1321
#define XIMStringConversionRetrieval (0x0002)
1324
XIMForwardChar, XIMBackwardChar,
1325
XIMForwardWord, XIMBackwardWord,
1326
XIMCaretUp, XIMCaretDown,
1327
XIMNextLine, XIMPreviousLine,
1328
XIMLineStart, XIMLineEnd,
1329
XIMAbsolutePosition,
1331
} XIMCaretDirection;
1333
typedef struct _XIMStringConversionCallbackStruct {
1334
XIMStringConversionPosition position;
1335
XIMCaretDirection direction;
1336
XIMStringConversionOperation operation;
1337
unsigned short factor;
1338
XIMStringConversionText *text;
1339
} XIMStringConversionCallbackStruct;
1341
typedef struct _XIMPreeditDrawCallbackStruct {
1342
int caret; /* Cursor offset within pre-edit string */
1343
int chg_first; /* Starting change position */
1344
int chg_length; /* Length of the change in character count */
1346
} XIMPreeditDrawCallbackStruct;
1349
XIMIsInvisible, /* Disable caret feedback */
1350
XIMIsPrimary, /* UI defined caret feedback */
1351
XIMIsSecondary /* UI defined caret feedback */
1354
typedef struct _XIMPreeditCaretCallbackStruct {
1355
int position; /* Caret offset within pre-edit string */
1356
XIMCaretDirection direction; /* Caret moves direction */
1357
XIMCaretStyle style; /* Feedback of the caret */
1358
} XIMPreeditCaretCallbackStruct;
1363
} XIMStatusDataType;
1365
typedef struct _XIMStatusDrawCallbackStruct {
1366
XIMStatusDataType type;
1371
} XIMStatusDrawCallbackStruct;
1373
typedef struct _XIMHotKeyTrigger {
1379
typedef struct _XIMHotKeyTriggers {
1381
XIMHotKeyTrigger *key;
1382
} XIMHotKeyTriggers;
1384
typedef unsigned long XIMHotKeyState;
1386
#define XIMHotKeyStateON (0x0001L)
1387
#define XIMHotKeyStateOFF (0x0002L)
1390
unsigned short count_values;
1391
char **supported_values;
1396
#if defined(WIN32) && !defined(_XLIBINT_)
1397
#define _Xdebug (*_Xdebug_p)
1402
extern XFontStruct *XLoadQueryFont(
1403
Display* /* display */,
1404
_Xconst char* /* name */
1407
extern XFontStruct *XQueryFont(
1408
Display* /* display */,
1413
extern XTimeCoord *XGetMotionEvents(
1414
Display* /* display */,
1418
int* /* nevents_return */
1421
extern XModifierKeymap *XDeleteModifiermapEntry(
1422
XModifierKeymap* /* modmap */,
1423
#if NeedWidePrototypes
1424
unsigned int /* keycode_entry */,
1426
KeyCode /* keycode_entry */,
1431
extern XModifierKeymap *XGetModifierMapping(
1432
Display* /* display */
1435
extern XModifierKeymap *XInsertModifiermapEntry(
1436
XModifierKeymap* /* modmap */,
1437
#if NeedWidePrototypes
1438
unsigned int /* keycode_entry */,
1440
KeyCode /* keycode_entry */,
1445
extern XModifierKeymap *XNewModifiermap(
1446
int /* max_keys_per_mod */
1449
extern XImage *XCreateImage(
1450
Display* /* display */,
1451
Visual* /* visual */,
1452
unsigned int /* depth */,
1456
unsigned int /* width */,
1457
unsigned int /* height */,
1458
int /* bitmap_pad */,
1459
int /* bytes_per_line */
1461
extern Status XInitImage(
1464
extern XImage *XGetImage(
1465
Display* /* display */,
1469
unsigned int /* width */,
1470
unsigned int /* height */,
1471
unsigned long /* plane_mask */,
1474
extern XImage *XGetSubImage(
1475
Display* /* display */,
1479
unsigned int /* width */,
1480
unsigned int /* height */,
1481
unsigned long /* plane_mask */,
1483
XImage* /* dest_image */,
1489
* X function declarations.
1491
extern Display *XOpenDisplay(
1492
_Xconst char* /* display_name */
1495
extern void XrmInitialize(
1499
extern char *XFetchBytes(
1500
Display* /* display */,
1501
int* /* nbytes_return */
1503
extern char *XFetchBuffer(
1504
Display* /* display */,
1505
int* /* nbytes_return */,
1508
extern char *XGetAtomName(
1509
Display* /* display */,
1512
extern Status XGetAtomNames(
1516
char** /* names_return */
1518
extern char *XGetDefault(
1519
Display* /* display */,
1520
_Xconst char* /* program */,
1521
_Xconst char* /* option */
1523
extern char *XDisplayName(
1524
_Xconst char* /* string */
1526
extern char *XKeysymToString(
1530
extern int (*XSynchronize(
1531
Display* /* display */,
1534
Display* /* display */
1536
extern int (*XSetAfterFunction(
1537
Display* /* display */,
1539
Display* /* display */
1542
Display* /* display */
1544
extern Atom XInternAtom(
1545
Display* /* display */,
1546
_Xconst char* /* atom_name */,
1547
Bool /* only_if_exists */
1549
extern Status XInternAtoms(
1553
Bool /* onlyIfExists */,
1554
Atom* /* atoms_return */
1556
extern Colormap XCopyColormapAndFree(
1557
Display* /* display */,
1558
Colormap /* colormap */
1560
extern Colormap XCreateColormap(
1561
Display* /* display */,
1563
Visual* /* visual */,
1566
extern Cursor XCreatePixmapCursor(
1567
Display* /* display */,
1568
Pixmap /* source */,
1570
XColor* /* foreground_color */,
1571
XColor* /* background_color */,
1572
unsigned int /* x */,
1573
unsigned int /* y */
1575
extern Cursor XCreateGlyphCursor(
1576
Display* /* display */,
1577
Font /* source_font */,
1578
Font /* mask_font */,
1579
unsigned int /* source_char */,
1580
unsigned int /* mask_char */,
1581
XColor _Xconst * /* foreground_color */,
1582
XColor _Xconst * /* background_color */
1584
extern Cursor XCreateFontCursor(
1585
Display* /* display */,
1586
unsigned int /* shape */
1588
extern Font XLoadFont(
1589
Display* /* display */,
1590
_Xconst char* /* name */
1592
extern GC XCreateGC(
1593
Display* /* display */,
1595
unsigned long /* valuemask */,
1596
XGCValues* /* values */
1598
extern GContext XGContextFromGC(
1601
extern void XFlushGC(
1602
Display* /* display */,
1605
extern Pixmap XCreatePixmap(
1606
Display* /* display */,
1608
unsigned int /* width */,
1609
unsigned int /* height */,
1610
unsigned int /* depth */
1612
extern Pixmap XCreateBitmapFromData(
1613
Display* /* display */,
1615
_Xconst char* /* data */,
1616
unsigned int /* width */,
1617
unsigned int /* height */
1619
extern Pixmap XCreatePixmapFromBitmapData(
1620
Display* /* display */,
1623
unsigned int /* width */,
1624
unsigned int /* height */,
1625
unsigned long /* fg */,
1626
unsigned long /* bg */,
1627
unsigned int /* depth */
1629
extern Window XCreateSimpleWindow(
1630
Display* /* display */,
1631
Window /* parent */,
1634
unsigned int /* width */,
1635
unsigned int /* height */,
1636
unsigned int /* border_width */,
1637
unsigned long /* border */,
1638
unsigned long /* background */
1640
extern Window XGetSelectionOwner(
1641
Display* /* display */,
1642
Atom /* selection */
1644
extern Window XCreateWindow(
1645
Display* /* display */,
1646
Window /* parent */,
1649
unsigned int /* width */,
1650
unsigned int /* height */,
1651
unsigned int /* border_width */,
1653
unsigned int /* class */,
1654
Visual* /* visual */,
1655
unsigned long /* valuemask */,
1656
XSetWindowAttributes* /* attributes */
1658
extern Colormap *XListInstalledColormaps(
1659
Display* /* display */,
1661
int* /* num_return */
1663
extern char **XListFonts(
1664
Display* /* display */,
1665
_Xconst char* /* pattern */,
1667
int* /* actual_count_return */
1669
extern char **XListFontsWithInfo(
1670
Display* /* display */,
1671
_Xconst char* /* pattern */,
1673
int* /* count_return */,
1674
XFontStruct** /* info_return */
1676
extern char **XGetFontPath(
1677
Display* /* display */,
1678
int* /* npaths_return */
1680
extern char **XListExtensions(
1681
Display* /* display */,
1682
int* /* nextensions_return */
1684
extern Atom *XListProperties(
1685
Display* /* display */,
1687
int* /* num_prop_return */
1689
extern XHostAddress *XListHosts(
1690
Display* /* display */,
1691
int* /* nhosts_return */,
1692
Bool* /* state_return */
1694
extern KeySym XKeycodeToKeysym(
1695
Display* /* display */,
1696
#if NeedWidePrototypes
1697
unsigned int /* keycode */,
1699
KeyCode /* keycode */,
1703
extern KeySym XLookupKeysym(
1704
XKeyEvent* /* key_event */,
1707
extern KeySym *XGetKeyboardMapping(
1708
Display* /* display */,
1709
#if NeedWidePrototypes
1710
unsigned int /* first_keycode */,
1712
KeyCode /* first_keycode */,
1714
int /* keycode_count */,
1715
int* /* keysyms_per_keycode_return */
1717
extern KeySym XStringToKeysym(
1718
_Xconst char* /* string */
1720
extern long XMaxRequestSize(
1721
Display* /* display */
1723
extern long XExtendedMaxRequestSize(
1724
Display* /* display */
1726
extern char *XResourceManagerString(
1727
Display* /* display */
1729
extern char *XScreenResourceString(
1730
Screen* /* screen */
1732
extern unsigned long XDisplayMotionBufferSize(
1733
Display* /* display */
1735
extern VisualID XVisualIDFromVisual(
1736
Visual* /* visual */
1739
/* multithread routines */
1741
extern Status XInitThreads(
1745
extern void XLockDisplay(
1746
Display* /* display */
1749
extern void XUnlockDisplay(
1750
Display* /* display */
1753
/* routines for dealing with extensions */
1755
extern XExtCodes *XInitExtension(
1756
Display* /* display */,
1757
_Xconst char* /* name */
1760
extern XExtCodes *XAddExtension(
1761
Display* /* display */
1763
extern XExtData *XFindOnExtensionList(
1764
XExtData** /* structure */,
1767
extern XExtData **XEHeadOfExtensionList(
1768
XEDataObject /* object */
1771
/* these are routines for which there are also macros */
1772
extern Window XRootWindow(
1773
Display* /* display */,
1774
int /* screen_number */
1776
extern Window XDefaultRootWindow(
1777
Display* /* display */
1779
extern Window XRootWindowOfScreen(
1780
Screen* /* screen */
1782
extern Visual *XDefaultVisual(
1783
Display* /* display */,
1784
int /* screen_number */
1786
extern Visual *XDefaultVisualOfScreen(
1787
Screen* /* screen */
1789
extern GC XDefaultGC(
1790
Display* /* display */,
1791
int /* screen_number */
1793
extern GC XDefaultGCOfScreen(
1794
Screen* /* screen */
1796
extern unsigned long XBlackPixel(
1797
Display* /* display */,
1798
int /* screen_number */
1800
extern unsigned long XWhitePixel(
1801
Display* /* display */,
1802
int /* screen_number */
1804
extern unsigned long XAllPlanes(
1807
extern unsigned long XBlackPixelOfScreen(
1808
Screen* /* screen */
1810
extern unsigned long XWhitePixelOfScreen(
1811
Screen* /* screen */
1813
extern unsigned long XNextRequest(
1814
Display* /* display */
1816
extern unsigned long XLastKnownRequestProcessed(
1817
Display* /* display */
1819
extern char *XServerVendor(
1820
Display* /* display */
1822
extern char *XDisplayString(
1823
Display* /* display */
1825
extern Colormap XDefaultColormap(
1826
Display* /* display */,
1827
int /* screen_number */
1829
extern Colormap XDefaultColormapOfScreen(
1830
Screen* /* screen */
1832
extern Display *XDisplayOfScreen(
1833
Screen* /* screen */
1835
extern Screen *XScreenOfDisplay(
1836
Display* /* display */,
1837
int /* screen_number */
1839
extern Screen *XDefaultScreenOfDisplay(
1840
Display* /* display */
1842
extern long XEventMaskOfScreen(
1843
Screen* /* screen */
1846
extern int XScreenNumberOfScreen(
1847
Screen* /* screen */
1850
typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
1851
Display* /* display */,
1852
XErrorEvent* /* error_event */
1855
extern XErrorHandler XSetErrorHandler (
1856
XErrorHandler /* handler */
1860
typedef int (*XIOErrorHandler) ( /* WARNING, this type not in Xlib spec */
1861
Display* /* display */
1864
extern XIOErrorHandler XSetIOErrorHandler (
1865
XIOErrorHandler /* handler */
1869
extern XPixmapFormatValues *XListPixmapFormats(
1870
Display* /* display */,
1871
int* /* count_return */
1873
extern int *XListDepths(
1874
Display* /* display */,
1875
int /* screen_number */,
1876
int* /* count_return */
1879
/* ICCCM routines for things that don't require special include files; */
1880
/* other declarations are given in Xutil.h */
1881
extern Status XReconfigureWMWindow(
1882
Display* /* display */,
1884
int /* screen_number */,
1885
unsigned int /* mask */,
1886
XWindowChanges* /* changes */
1889
extern Status XGetWMProtocols(
1890
Display* /* display */,
1892
Atom** /* protocols_return */,
1893
int* /* count_return */
1895
extern Status XSetWMProtocols(
1896
Display* /* display */,
1898
Atom* /* protocols */,
1901
extern Status XIconifyWindow(
1902
Display* /* display */,
1904
int /* screen_number */
1906
extern Status XWithdrawWindow(
1907
Display* /* display */,
1909
int /* screen_number */
1911
extern Status XGetCommand(
1912
Display* /* display */,
1914
char*** /* argv_return */,
1915
int* /* argc_return */
1917
extern Status XGetWMColormapWindows(
1918
Display* /* display */,
1920
Window** /* windows_return */,
1921
int* /* count_return */
1923
extern Status XSetWMColormapWindows(
1924
Display* /* display */,
1926
Window* /* colormap_windows */,
1929
extern void XFreeStringList(
1932
extern int XSetTransientForHint(
1933
Display* /* display */,
1935
Window /* prop_window */
1938
/* The following are given in alphabetical order */
1940
extern int XActivateScreenSaver(
1941
Display* /* display */
1944
extern int XAddHost(
1945
Display* /* display */,
1946
XHostAddress* /* host */
1949
extern int XAddHosts(
1950
Display* /* display */,
1951
XHostAddress* /* hosts */,
1955
extern int XAddToExtensionList(
1956
struct _XExtData** /* structure */,
1957
XExtData* /* ext_data */
1960
extern int XAddToSaveSet(
1961
Display* /* display */,
1965
extern Status XAllocColor(
1966
Display* /* display */,
1967
Colormap /* colormap */,
1968
XColor* /* screen_in_out */
1971
extern Status XAllocColorCells(
1972
Display* /* display */,
1973
Colormap /* colormap */,
1975
unsigned long* /* plane_masks_return */,
1976
unsigned int /* nplanes */,
1977
unsigned long* /* pixels_return */,
1978
unsigned int /* npixels */
1981
extern Status XAllocColorPlanes(
1982
Display* /* display */,
1983
Colormap /* colormap */,
1985
unsigned long* /* pixels_return */,
1990
unsigned long* /* rmask_return */,
1991
unsigned long* /* gmask_return */,
1992
unsigned long* /* bmask_return */
1995
extern Status XAllocNamedColor(
1996
Display* /* display */,
1997
Colormap /* colormap */,
1998
_Xconst char* /* color_name */,
1999
XColor* /* screen_def_return */,
2000
XColor* /* exact_def_return */
2003
extern int XAllowEvents(
2004
Display* /* display */,
2005
int /* event_mode */,
2009
extern int XAutoRepeatOff(
2010
Display* /* display */
2013
extern int XAutoRepeatOn(
2014
Display* /* display */
2018
Display* /* display */,
2022
extern int XBitmapBitOrder(
2023
Display* /* display */
2026
extern int XBitmapPad(
2027
Display* /* display */
2030
extern int XBitmapUnit(
2031
Display* /* display */
2034
extern int XCellsOfScreen(
2035
Screen* /* screen */
2038
extern int XChangeActivePointerGrab(
2039
Display* /* display */,
2040
unsigned int /* event_mask */,
2041
Cursor /* cursor */,
2045
extern int XChangeGC(
2046
Display* /* display */,
2048
unsigned long /* valuemask */,
2049
XGCValues* /* values */
2052
extern int XChangeKeyboardControl(
2053
Display* /* display */,
2054
unsigned long /* value_mask */,
2055
XKeyboardControl* /* values */
2058
extern int XChangeKeyboardMapping(
2059
Display* /* display */,
2060
int /* first_keycode */,
2061
int /* keysyms_per_keycode */,
2062
KeySym* /* keysyms */,
2066
extern int XChangePointerControl(
2067
Display* /* display */,
2068
Bool /* do_accel */,
2069
Bool /* do_threshold */,
2070
int /* accel_numerator */,
2071
int /* accel_denominator */,
2075
extern int XChangeProperty(
2076
Display* /* display */,
2078
Atom /* property */,
2082
_Xconst unsigned char* /* data */,
2086
extern int XChangeSaveSet(
2087
Display* /* display */,
2089
int /* change_mode */
2092
extern int XChangeWindowAttributes(
2093
Display* /* display */,
2095
unsigned long /* valuemask */,
2096
XSetWindowAttributes* /* attributes */
2099
extern Bool XCheckIfEvent(
2100
Display* /* display */,
2101
XEvent* /* event_return */,
2103
Display* /* display */,
2104
XEvent* /* event */,
2110
extern Bool XCheckMaskEvent(
2111
Display* /* display */,
2112
long /* event_mask */,
2113
XEvent* /* event_return */
2116
extern Bool XCheckTypedEvent(
2117
Display* /* display */,
2118
int /* event_type */,
2119
XEvent* /* event_return */
2122
extern Bool XCheckTypedWindowEvent(
2123
Display* /* display */,
2125
int /* event_type */,
2126
XEvent* /* event_return */
2129
extern Bool XCheckWindowEvent(
2130
Display* /* display */,
2132
long /* event_mask */,
2133
XEvent* /* event_return */
2136
extern int XCirculateSubwindows(
2137
Display* /* display */,
2142
extern int XCirculateSubwindowsDown(
2143
Display* /* display */,
2147
extern int XCirculateSubwindowsUp(
2148
Display* /* display */,
2152
extern int XClearArea(
2153
Display* /* display */,
2157
unsigned int /* width */,
2158
unsigned int /* height */,
2159
Bool /* exposures */
2162
extern int XClearWindow(
2163
Display* /* display */,
2167
extern int XCloseDisplay(
2168
Display* /* display */
2171
extern int XConfigureWindow(
2172
Display* /* display */,
2174
unsigned int /* value_mask */,
2175
XWindowChanges* /* values */
2178
extern int XConnectionNumber(
2179
Display* /* display */
2182
extern int XConvertSelection(
2183
Display* /* display */,
2184
Atom /* selection */,
2186
Atom /* property */,
2187
Window /* requestor */,
2191
extern int XCopyArea(
2192
Display* /* display */,
2194
Drawable /* dest */,
2198
unsigned int /* width */,
2199
unsigned int /* height */,
2205
Display* /* display */,
2207
unsigned long /* valuemask */,
2211
extern int XCopyPlane(
2212
Display* /* display */,
2214
Drawable /* dest */,
2218
unsigned int /* width */,
2219
unsigned int /* height */,
2222
unsigned long /* plane */
2225
extern int XDefaultDepth(
2226
Display* /* display */,
2227
int /* screen_number */
2230
extern int XDefaultDepthOfScreen(
2231
Screen* /* screen */
2234
extern int XDefaultScreen(
2235
Display* /* display */
2238
extern int XDefineCursor(
2239
Display* /* display */,
2244
extern int XDeleteProperty(
2245
Display* /* display */,
2250
extern int XDestroyWindow(
2251
Display* /* display */,
2255
extern int XDestroySubwindows(
2256
Display* /* display */,
2260
extern int XDoesBackingStore(
2261
Screen* /* screen */
2264
extern Bool XDoesSaveUnders(
2265
Screen* /* screen */
2268
extern int XDisableAccessControl(
2269
Display* /* display */
2273
extern int XDisplayCells(
2274
Display* /* display */,
2275
int /* screen_number */
2278
extern int XDisplayHeight(
2279
Display* /* display */,
2280
int /* screen_number */
2283
extern int XDisplayHeightMM(
2284
Display* /* display */,
2285
int /* screen_number */
2288
extern int XDisplayKeycodes(
2289
Display* /* display */,
2290
int* /* min_keycodes_return */,
2291
int* /* max_keycodes_return */
2294
extern int XDisplayPlanes(
2295
Display* /* display */,
2296
int /* screen_number */
2299
extern int XDisplayWidth(
2300
Display* /* display */,
2301
int /* screen_number */
2304
extern int XDisplayWidthMM(
2305
Display* /* display */,
2306
int /* screen_number */
2309
extern int XDrawArc(
2310
Display* /* display */,
2315
unsigned int /* width */,
2316
unsigned int /* height */,
2321
extern int XDrawArcs(
2322
Display* /* display */,
2329
extern int XDrawImageString(
2330
Display* /* display */,
2335
_Xconst char* /* string */,
2339
extern int XDrawImageString16(
2340
Display* /* display */,
2345
_Xconst XChar2b* /* string */,
2349
extern int XDrawLine(
2350
Display* /* display */,
2359
extern int XDrawLines(
2360
Display* /* display */,
2363
XPoint* /* points */,
2368
extern int XDrawPoint(
2369
Display* /* display */,
2376
extern int XDrawPoints(
2377
Display* /* display */,
2380
XPoint* /* points */,
2385
extern int XDrawRectangle(
2386
Display* /* display */,
2391
unsigned int /* width */,
2392
unsigned int /* height */
2395
extern int XDrawRectangles(
2396
Display* /* display */,
2399
XRectangle* /* rectangles */,
2400
int /* nrectangles */
2403
extern int XDrawSegments(
2404
Display* /* display */,
2407
XSegment* /* segments */,
2411
extern int XDrawString(
2412
Display* /* display */,
2417
_Xconst char* /* string */,
2421
extern int XDrawString16(
2422
Display* /* display */,
2427
_Xconst XChar2b* /* string */,
2431
extern int XDrawText(
2432
Display* /* display */,
2437
XTextItem* /* items */,
2441
extern int XDrawText16(
2442
Display* /* display */,
2447
XTextItem16* /* items */,
2451
extern int XEnableAccessControl(
2452
Display* /* display */
2455
extern int XEventsQueued(
2456
Display* /* display */,
2460
extern Status XFetchName(
2461
Display* /* display */,
2463
char** /* window_name_return */
2466
extern int XFillArc(
2467
Display* /* display */,
2472
unsigned int /* width */,
2473
unsigned int /* height */,
2478
extern int XFillArcs(
2479
Display* /* display */,
2486
extern int XFillPolygon(
2487
Display* /* display */,
2490
XPoint* /* points */,
2496
extern int XFillRectangle(
2497
Display* /* display */,
2502
unsigned int /* width */,
2503
unsigned int /* height */
2506
extern int XFillRectangles(
2507
Display* /* display */,
2510
XRectangle* /* rectangles */,
2511
int /* nrectangles */
2515
Display* /* display */
2518
extern int XForceScreenSaver(
2519
Display* /* display */,
2527
extern int XFreeColormap(
2528
Display* /* display */,
2529
Colormap /* colormap */
2532
extern int XFreeColors(
2533
Display* /* display */,
2534
Colormap /* colormap */,
2535
unsigned long* /* pixels */,
2537
unsigned long /* planes */
2540
extern int XFreeCursor(
2541
Display* /* display */,
2545
extern int XFreeExtensionList(
2549
extern int XFreeFont(
2550
Display* /* display */,
2551
XFontStruct* /* font_struct */
2554
extern int XFreeFontInfo(
2556
XFontStruct* /* free_info */,
2557
int /* actual_count */
2560
extern int XFreeFontNames(
2564
extern int XFreeFontPath(
2569
Display* /* display */,
2573
extern int XFreeModifiermap(
2574
XModifierKeymap* /* modmap */
2577
extern int XFreePixmap(
2578
Display* /* display */,
2582
extern int XGeometry(
2583
Display* /* display */,
2585
_Xconst char* /* position */,
2586
_Xconst char* /* default_position */,
2587
unsigned int /* bwidth */,
2588
unsigned int /* fwidth */,
2589
unsigned int /* fheight */,
2592
int* /* x_return */,
2593
int* /* y_return */,
2594
int* /* width_return */,
2595
int* /* height_return */
2598
extern int XGetErrorDatabaseText(
2599
Display* /* display */,
2600
_Xconst char* /* name */,
2601
_Xconst char* /* message */,
2602
_Xconst char* /* default_string */,
2603
char* /* buffer_return */,
2607
extern int XGetErrorText(
2608
Display* /* display */,
2610
char* /* buffer_return */,
2614
extern Bool XGetFontProperty(
2615
XFontStruct* /* font_struct */,
2617
unsigned long* /* value_return */
2620
extern Status XGetGCValues(
2621
Display* /* display */,
2623
unsigned long /* valuemask */,
2624
XGCValues* /* values_return */
2627
extern Status XGetGeometry(
2628
Display* /* display */,
2630
Window* /* root_return */,
2631
int* /* x_return */,
2632
int* /* y_return */,
2633
unsigned int* /* width_return */,
2634
unsigned int* /* height_return */,
2635
unsigned int* /* border_width_return */,
2636
unsigned int* /* depth_return */
2639
extern Status XGetIconName(
2640
Display* /* display */,
2642
char** /* icon_name_return */
2645
extern int XGetInputFocus(
2646
Display* /* display */,
2647
Window* /* focus_return */,
2648
int* /* revert_to_return */
2651
extern int XGetKeyboardControl(
2652
Display* /* display */,
2653
XKeyboardState* /* values_return */
2656
extern int XGetPointerControl(
2657
Display* /* display */,
2658
int* /* accel_numerator_return */,
2659
int* /* accel_denominator_return */,
2660
int* /* threshold_return */
2663
extern int XGetPointerMapping(
2664
Display* /* display */,
2665
unsigned char* /* map_return */,
2669
extern int XGetScreenSaver(
2670
Display* /* display */,
2671
int* /* timeout_return */,
2672
int* /* interval_return */,
2673
int* /* prefer_blanking_return */,
2674
int* /* allow_exposures_return */
2677
extern Status XGetTransientForHint(
2678
Display* /* display */,
2680
Window* /* prop_window_return */
2683
extern int XGetWindowProperty(
2684
Display* /* display */,
2686
Atom /* property */,
2687
long /* long_offset */,
2688
long /* long_length */,
2690
Atom /* req_type */,
2691
Atom* /* actual_type_return */,
2692
int* /* actual_format_return */,
2693
unsigned long* /* nitems_return */,
2694
unsigned long* /* bytes_after_return */,
2695
unsigned char** /* prop_return */
2698
extern Status XGetWindowAttributes(
2699
Display* /* display */,
2701
XWindowAttributes* /* window_attributes_return */
2704
extern int XGrabButton(
2705
Display* /* display */,
2706
unsigned int /* button */,
2707
unsigned int /* modifiers */,
2708
Window /* grab_window */,
2709
Bool /* owner_events */,
2710
unsigned int /* event_mask */,
2711
int /* pointer_mode */,
2712
int /* keyboard_mode */,
2713
Window /* confine_to */,
2717
extern int XGrabKey(
2718
Display* /* display */,
2720
unsigned int /* modifiers */,
2721
Window /* grab_window */,
2722
Bool /* owner_events */,
2723
int /* pointer_mode */,
2724
int /* keyboard_mode */
2727
extern int XGrabKeyboard(
2728
Display* /* display */,
2729
Window /* grab_window */,
2730
Bool /* owner_events */,
2731
int /* pointer_mode */,
2732
int /* keyboard_mode */,
2736
extern int XGrabPointer(
2737
Display* /* display */,
2738
Window /* grab_window */,
2739
Bool /* owner_events */,
2740
unsigned int /* event_mask */,
2741
int /* pointer_mode */,
2742
int /* keyboard_mode */,
2743
Window /* confine_to */,
2744
Cursor /* cursor */,
2748
extern int XGrabServer(
2749
Display* /* display */
2752
extern int XHeightMMOfScreen(
2753
Screen* /* screen */
2756
extern int XHeightOfScreen(
2757
Screen* /* screen */
2760
extern int XIfEvent(
2761
Display* /* display */,
2762
XEvent* /* event_return */,
2764
Display* /* display */,
2765
XEvent* /* event */,
2771
extern int XImageByteOrder(
2772
Display* /* display */
2775
extern int XInstallColormap(
2776
Display* /* display */,
2777
Colormap /* colormap */
2780
extern KeyCode XKeysymToKeycode(
2781
Display* /* display */,
2785
extern int XKillClient(
2786
Display* /* display */,
2790
extern Status XLookupColor(
2791
Display* /* display */,
2792
Colormap /* colormap */,
2793
_Xconst char* /* color_name */,
2794
XColor* /* exact_def_return */,
2795
XColor* /* screen_def_return */
2798
extern int XLowerWindow(
2799
Display* /* display */,
2803
extern int XMapRaised(
2804
Display* /* display */,
2808
extern int XMapSubwindows(
2809
Display* /* display */,
2813
extern int XMapWindow(
2814
Display* /* display */,
2818
extern int XMaskEvent(
2819
Display* /* display */,
2820
long /* event_mask */,
2821
XEvent* /* event_return */
2824
extern int XMaxCmapsOfScreen(
2825
Screen* /* screen */
2828
extern int XMinCmapsOfScreen(
2829
Screen* /* screen */
2832
extern int XMoveResizeWindow(
2833
Display* /* display */,
2837
unsigned int /* width */,
2838
unsigned int /* height */
2841
extern int XMoveWindow(
2842
Display* /* display */,
2848
extern int XNextEvent(
2849
Display* /* display */,
2850
XEvent* /* event_return */
2854
Display* /* display */
2857
extern Status XParseColor(
2858
Display* /* display */,
2859
Colormap /* colormap */,
2860
_Xconst char* /* spec */,
2861
XColor* /* exact_def_return */
2864
extern int XParseGeometry(
2865
_Xconst char* /* parsestring */,
2866
int* /* x_return */,
2867
int* /* y_return */,
2868
unsigned int* /* width_return */,
2869
unsigned int* /* height_return */
2872
extern int XPeekEvent(
2873
Display* /* display */,
2874
XEvent* /* event_return */
2877
extern int XPeekIfEvent(
2878
Display* /* display */,
2879
XEvent* /* event_return */,
2881
Display* /* display */,
2882
XEvent* /* event */,
2888
extern int XPending(
2889
Display* /* display */
2892
extern int XPlanesOfScreen(
2893
Screen* /* screen */
2896
extern int XProtocolRevision(
2897
Display* /* display */
2900
extern int XProtocolVersion(
2901
Display* /* display */
2905
extern int XPutBackEvent(
2906
Display* /* display */,
2910
extern int XPutImage(
2911
Display* /* display */,
2914
XImage* /* image */,
2919
unsigned int /* width */,
2920
unsigned int /* height */
2923
extern int XQLength(
2924
Display* /* display */
2927
extern Status XQueryBestCursor(
2928
Display* /* display */,
2930
unsigned int /* width */,
2931
unsigned int /* height */,
2932
unsigned int* /* width_return */,
2933
unsigned int* /* height_return */
2936
extern Status XQueryBestSize(
2937
Display* /* display */,
2939
Drawable /* which_screen */,
2940
unsigned int /* width */,
2941
unsigned int /* height */,
2942
unsigned int* /* width_return */,
2943
unsigned int* /* height_return */
2946
extern Status XQueryBestStipple(
2947
Display* /* display */,
2948
Drawable /* which_screen */,
2949
unsigned int /* width */,
2950
unsigned int /* height */,
2951
unsigned int* /* width_return */,
2952
unsigned int* /* height_return */
2955
extern Status XQueryBestTile(
2956
Display* /* display */,
2957
Drawable /* which_screen */,
2958
unsigned int /* width */,
2959
unsigned int /* height */,
2960
unsigned int* /* width_return */,
2961
unsigned int* /* height_return */
2964
extern int XQueryColor(
2965
Display* /* display */,
2966
Colormap /* colormap */,
2967
XColor* /* def_in_out */
2970
extern int XQueryColors(
2971
Display* /* display */,
2972
Colormap /* colormap */,
2973
XColor* /* defs_in_out */,
2977
extern Bool XQueryExtension(
2978
Display* /* display */,
2979
_Xconst char* /* name */,
2980
int* /* major_opcode_return */,
2981
int* /* first_event_return */,
2982
int* /* first_error_return */
2985
extern int XQueryKeymap(
2986
Display* /* display */,
2987
char [32] /* keys_return */
2990
extern Bool XQueryPointer(
2991
Display* /* display */,
2993
Window* /* root_return */,
2994
Window* /* child_return */,
2995
int* /* root_x_return */,
2996
int* /* root_y_return */,
2997
int* /* win_x_return */,
2998
int* /* win_y_return */,
2999
unsigned int* /* mask_return */
3002
extern int XQueryTextExtents(
3003
Display* /* display */,
3005
_Xconst char* /* string */,
3007
int* /* direction_return */,
3008
int* /* font_ascent_return */,
3009
int* /* font_descent_return */,
3010
XCharStruct* /* overall_return */
3013
extern int XQueryTextExtents16(
3014
Display* /* display */,
3016
_Xconst XChar2b* /* string */,
3018
int* /* direction_return */,
3019
int* /* font_ascent_return */,
3020
int* /* font_descent_return */,
3021
XCharStruct* /* overall_return */
3024
extern Status XQueryTree(
3025
Display* /* display */,
3027
Window* /* root_return */,
3028
Window* /* parent_return */,
3029
Window** /* children_return */,
3030
unsigned int* /* nchildren_return */
3033
extern int XRaiseWindow(
3034
Display* /* display */,
3038
extern int XReadBitmapFile(
3039
Display* /* display */,
3041
_Xconst char* /* filename */,
3042
unsigned int* /* width_return */,
3043
unsigned int* /* height_return */,
3044
Pixmap* /* bitmap_return */,
3045
int* /* x_hot_return */,
3046
int* /* y_hot_return */
3049
extern int XReadBitmapFileData(
3050
_Xconst char* /* filename */,
3051
unsigned int* /* width_return */,
3052
unsigned int* /* height_return */,
3053
unsigned char** /* data_return */,
3054
int* /* x_hot_return */,
3055
int* /* y_hot_return */
3058
extern int XRebindKeysym(
3059
Display* /* display */,
3060
KeySym /* keysym */,
3062
int /* mod_count */,
3063
_Xconst unsigned char* /* string */,
3064
int /* bytes_string */
3067
extern int XRecolorCursor(
3068
Display* /* display */,
3069
Cursor /* cursor */,
3070
XColor* /* foreground_color */,
3071
XColor* /* background_color */
3074
extern int XRefreshKeyboardMapping(
3075
XMappingEvent* /* event_map */
3078
extern int XRemoveFromSaveSet(
3079
Display* /* display */,
3083
extern int XRemoveHost(
3084
Display* /* display */,
3085
XHostAddress* /* host */
3088
extern int XRemoveHosts(
3089
Display* /* display */,
3090
XHostAddress* /* hosts */,
3094
extern int XReparentWindow(
3095
Display* /* display */,
3097
Window /* parent */,
3102
extern int XResetScreenSaver(
3103
Display* /* display */
3106
extern int XResizeWindow(
3107
Display* /* display */,
3109
unsigned int /* width */,
3110
unsigned int /* height */
3113
extern int XRestackWindows(
3114
Display* /* display */,
3115
Window* /* windows */,
3119
extern int XRotateBuffers(
3120
Display* /* display */,
3124
extern int XRotateWindowProperties(
3125
Display* /* display */,
3127
Atom* /* properties */,
3129
int /* npositions */
3132
extern int XScreenCount(
3133
Display* /* display */
3136
extern int XSelectInput(
3137
Display* /* display */,
3139
long /* event_mask */
3142
extern Status XSendEvent(
3143
Display* /* display */,
3145
Bool /* propagate */,
3146
long /* event_mask */,
3147
XEvent* /* event_send */
3150
extern int XSetAccessControl(
3151
Display* /* display */,
3155
extern int XSetArcMode(
3156
Display* /* display */,
3161
extern int XSetBackground(
3162
Display* /* display */,
3164
unsigned long /* background */
3167
extern int XSetClipMask(
3168
Display* /* display */,
3173
extern int XSetClipOrigin(
3174
Display* /* display */,
3176
int /* clip_x_origin */,
3177
int /* clip_y_origin */
3180
extern int XSetClipRectangles(
3181
Display* /* display */,
3183
int /* clip_x_origin */,
3184
int /* clip_y_origin */,
3185
XRectangle* /* rectangles */,
3190
extern int XSetCloseDownMode(
3191
Display* /* display */,
3192
int /* close_mode */
3195
extern int XSetCommand(
3196
Display* /* display */,
3202
extern int XSetDashes(
3203
Display* /* display */,
3205
int /* dash_offset */,
3206
_Xconst char* /* dash_list */,
3210
extern int XSetFillRule(
3211
Display* /* display */,
3216
extern int XSetFillStyle(
3217
Display* /* display */,
3219
int /* fill_style */
3222
extern int XSetFont(
3223
Display* /* display */,
3228
extern int XSetFontPath(
3229
Display* /* display */,
3230
char** /* directories */,
3234
extern int XSetForeground(
3235
Display* /* display */,
3237
unsigned long /* foreground */
3240
extern int XSetFunction(
3241
Display* /* display */,
3246
extern int XSetGraphicsExposures(
3247
Display* /* display */,
3249
Bool /* graphics_exposures */
3252
extern int XSetIconName(
3253
Display* /* display */,
3255
_Xconst char* /* icon_name */
3258
extern int XSetInputFocus(
3259
Display* /* display */,
3261
int /* revert_to */,
3265
extern int XSetLineAttributes(
3266
Display* /* display */,
3268
unsigned int /* line_width */,
3269
int /* line_style */,
3270
int /* cap_style */,
3271
int /* join_style */
3274
extern int XSetModifierMapping(
3275
Display* /* display */,
3276
XModifierKeymap* /* modmap */
3279
extern int XSetPlaneMask(
3280
Display* /* display */,
3282
unsigned long /* plane_mask */
3285
extern int XSetPointerMapping(
3286
Display* /* display */,
3287
_Xconst unsigned char* /* map */,
3291
extern int XSetScreenSaver(
3292
Display* /* display */,
3295
int /* prefer_blanking */,
3296
int /* allow_exposures */
3299
extern int XSetSelectionOwner(
3300
Display* /* display */,
3301
Atom /* selection */,
3306
extern int XSetState(
3307
Display* /* display */,
3309
unsigned long /* foreground */,
3310
unsigned long /* background */,
3312
unsigned long /* plane_mask */
3315
extern int XSetStipple(
3316
Display* /* display */,
3318
Pixmap /* stipple */
3321
extern int XSetSubwindowMode(
3322
Display* /* display */,
3324
int /* subwindow_mode */
3327
extern int XSetTSOrigin(
3328
Display* /* display */,
3330
int /* ts_x_origin */,
3331
int /* ts_y_origin */
3334
extern int XSetTile(
3335
Display* /* display */,
3340
extern int XSetWindowBackground(
3341
Display* /* display */,
3343
unsigned long /* background_pixel */
3346
extern int XSetWindowBackgroundPixmap(
3347
Display* /* display */,
3349
Pixmap /* background_pixmap */
3352
extern int XSetWindowBorder(
3353
Display* /* display */,
3355
unsigned long /* border_pixel */
3358
extern int XSetWindowBorderPixmap(
3359
Display* /* display */,
3361
Pixmap /* border_pixmap */
3364
extern int XSetWindowBorderWidth(
3365
Display* /* display */,
3367
unsigned int /* width */
3370
extern int XSetWindowColormap(
3371
Display* /* display */,
3373
Colormap /* colormap */
3376
extern int XStoreBuffer(
3377
Display* /* display */,
3378
_Xconst char* /* bytes */,
3383
extern int XStoreBytes(
3384
Display* /* display */,
3385
_Xconst char* /* bytes */,
3389
extern int XStoreColor(
3390
Display* /* display */,
3391
Colormap /* colormap */,
3395
extern int XStoreColors(
3396
Display* /* display */,
3397
Colormap /* colormap */,
3398
XColor* /* color */,
3402
extern int XStoreName(
3403
Display* /* display */,
3405
_Xconst char* /* window_name */
3408
extern int XStoreNamedColor(
3409
Display* /* display */,
3410
Colormap /* colormap */,
3411
_Xconst char* /* color */,
3412
unsigned long /* pixel */,
3417
Display* /* display */,
3421
extern int XTextExtents(
3422
XFontStruct* /* font_struct */,
3423
_Xconst char* /* string */,
3425
int* /* direction_return */,
3426
int* /* font_ascent_return */,
3427
int* /* font_descent_return */,
3428
XCharStruct* /* overall_return */
3431
extern int XTextExtents16(
3432
XFontStruct* /* font_struct */,
3433
_Xconst XChar2b* /* string */,
3435
int* /* direction_return */,
3436
int* /* font_ascent_return */,
3437
int* /* font_descent_return */,
3438
XCharStruct* /* overall_return */
3441
extern int XTextWidth(
3442
XFontStruct* /* font_struct */,
3443
_Xconst char* /* string */,
3447
extern int XTextWidth16(
3448
XFontStruct* /* font_struct */,
3449
_Xconst XChar2b* /* string */,
3453
extern Bool XTranslateCoordinates(
3454
Display* /* display */,
3456
Window /* dest_w */,
3459
int* /* dest_x_return */,
3460
int* /* dest_y_return */,
3461
Window* /* child_return */
3464
extern int XUndefineCursor(
3465
Display* /* display */,
3469
extern int XUngrabButton(
3470
Display* /* display */,
3471
unsigned int /* button */,
3472
unsigned int /* modifiers */,
3473
Window /* grab_window */
3476
extern int XUngrabKey(
3477
Display* /* display */,
3479
unsigned int /* modifiers */,
3480
Window /* grab_window */
3483
extern int XUngrabKeyboard(
3484
Display* /* display */,
3488
extern int XUngrabPointer(
3489
Display* /* display */,
3493
extern int XUngrabServer(
3494
Display* /* display */
3497
extern int XUninstallColormap(
3498
Display* /* display */,
3499
Colormap /* colormap */
3502
extern int XUnloadFont(
3503
Display* /* display */,
3507
extern int XUnmapSubwindows(
3508
Display* /* display */,
3512
extern int XUnmapWindow(
3513
Display* /* display */,
3517
extern int XVendorRelease(
3518
Display* /* display */
3521
extern int XWarpPointer(
3522
Display* /* display */,
3524
Window /* dest_w */,
3527
unsigned int /* src_width */,
3528
unsigned int /* src_height */,
3533
extern int XWidthMMOfScreen(
3534
Screen* /* screen */
3537
extern int XWidthOfScreen(
3538
Screen* /* screen */
3541
extern int XWindowEvent(
3542
Display* /* display */,
3544
long /* event_mask */,
3545
XEvent* /* event_return */
3548
extern int XWriteBitmapFile(
3549
Display* /* display */,
3550
_Xconst char* /* filename */,
3551
Pixmap /* bitmap */,
3552
unsigned int /* width */,
3553
unsigned int /* height */,
3558
extern Bool XSupportsLocale (void);
3560
extern char *XSetLocaleModifiers(
3561
const char* /* modifier_list */
3565
Display* /* display */,
3566
struct _XrmHashBucketRec* /* rdb */,
3567
_Xconst char* /* res_name */,
3568
_Xconst char* /* res_class */
3571
extern Status XCloseOM(
3575
extern char *XSetOMValues(
3580
extern char *XGetOMValues(
3585
extern Display *XDisplayOfOM(
3589
extern char *XLocaleOfOM(
3593
extern XOC XCreateOC(
3598
extern void XDestroyOC(
3606
extern char *XSetOCValues(
3611
extern char *XGetOCValues(
3616
extern XFontSet XCreateFontSet(
3617
Display* /* display */,
3618
_Xconst char* /* base_font_name_list */,
3619
char*** /* missing_charset_list */,
3620
int* /* missing_charset_count */,
3621
char** /* def_string */
3624
extern void XFreeFontSet(
3625
Display* /* display */,
3626
XFontSet /* font_set */
3629
extern int XFontsOfFontSet(
3630
XFontSet /* font_set */,
3631
XFontStruct*** /* font_struct_list */,
3632
char*** /* font_name_list */
3635
extern char *XBaseFontNameListOfFontSet(
3636
XFontSet /* font_set */
3639
extern char *XLocaleOfFontSet(
3640
XFontSet /* font_set */
3643
extern Bool XContextDependentDrawing(
3644
XFontSet /* font_set */
3647
extern Bool XDirectionalDependentDrawing(
3648
XFontSet /* font_set */
3651
extern Bool XContextualDrawing(
3652
XFontSet /* font_set */
3655
extern XFontSetExtents *XExtentsOfFontSet(
3656
XFontSet /* font_set */
3659
extern int XmbTextEscapement(
3660
XFontSet /* font_set */,
3661
_Xconst char* /* text */,
3662
int /* bytes_text */
3665
extern int XwcTextEscapement(
3666
XFontSet /* font_set */,
3667
_Xconst wchar_t* /* text */,
3668
int /* num_wchars */
3671
extern int Xutf8TextEscapement(
3672
XFontSet /* font_set */,
3673
_Xconst char* /* text */,
3674
int /* bytes_text */
3677
extern int XmbTextExtents(
3678
XFontSet /* font_set */,
3679
_Xconst char* /* text */,
3680
int /* bytes_text */,
3681
XRectangle* /* overall_ink_return */,
3682
XRectangle* /* overall_logical_return */
3685
extern int XwcTextExtents(
3686
XFontSet /* font_set */,
3687
_Xconst wchar_t* /* text */,
3688
int /* num_wchars */,
3689
XRectangle* /* overall_ink_return */,
3690
XRectangle* /* overall_logical_return */
3693
extern int Xutf8TextExtents(
3694
XFontSet /* font_set */,
3695
_Xconst char* /* text */,
3696
int /* bytes_text */,
3697
XRectangle* /* overall_ink_return */,
3698
XRectangle* /* overall_logical_return */
3701
extern Status XmbTextPerCharExtents(
3702
XFontSet /* font_set */,
3703
_Xconst char* /* text */,
3704
int /* bytes_text */,
3705
XRectangle* /* ink_extents_buffer */,
3706
XRectangle* /* logical_extents_buffer */,
3707
int /* buffer_size */,
3708
int* /* num_chars */,
3709
XRectangle* /* overall_ink_return */,
3710
XRectangle* /* overall_logical_return */
3713
extern Status XwcTextPerCharExtents(
3714
XFontSet /* font_set */,
3715
_Xconst wchar_t* /* text */,
3716
int /* num_wchars */,
3717
XRectangle* /* ink_extents_buffer */,
3718
XRectangle* /* logical_extents_buffer */,
3719
int /* buffer_size */,
3720
int* /* num_chars */,
3721
XRectangle* /* overall_ink_return */,
3722
XRectangle* /* overall_logical_return */
3725
extern Status Xutf8TextPerCharExtents(
3726
XFontSet /* font_set */,
3727
_Xconst char* /* text */,
3728
int /* bytes_text */,
3729
XRectangle* /* ink_extents_buffer */,
3730
XRectangle* /* logical_extents_buffer */,
3731
int /* buffer_size */,
3732
int* /* num_chars */,
3733
XRectangle* /* overall_ink_return */,
3734
XRectangle* /* overall_logical_return */
3737
extern void XmbDrawText(
3738
Display* /* display */,
3743
XmbTextItem* /* text_items */,
3747
extern void XwcDrawText(
3748
Display* /* display */,
3753
XwcTextItem* /* text_items */,
3757
extern void Xutf8DrawText(
3758
Display* /* display */,
3763
XmbTextItem* /* text_items */,
3767
extern void XmbDrawString(
3768
Display* /* display */,
3770
XFontSet /* font_set */,
3774
_Xconst char* /* text */,
3775
int /* bytes_text */
3778
extern void XwcDrawString(
3779
Display* /* display */,
3781
XFontSet /* font_set */,
3785
_Xconst wchar_t* /* text */,
3786
int /* num_wchars */
3789
extern void Xutf8DrawString(
3790
Display* /* display */,
3792
XFontSet /* font_set */,
3796
_Xconst char* /* text */,
3797
int /* bytes_text */
3800
extern void XmbDrawImageString(
3801
Display* /* display */,
3803
XFontSet /* font_set */,
3807
_Xconst char* /* text */,
3808
int /* bytes_text */
3811
extern void XwcDrawImageString(
3812
Display* /* display */,
3814
XFontSet /* font_set */,
3818
_Xconst wchar_t* /* text */,
3819
int /* num_wchars */
3822
extern void Xutf8DrawImageString(
3823
Display* /* display */,
3825
XFontSet /* font_set */,
3829
_Xconst char* /* text */,
3830
int /* bytes_text */
3835
struct _XrmHashBucketRec* /* rdb */,
3836
char* /* res_name */,
3837
char* /* res_class */
3840
extern Status XCloseIM(
3844
extern char *XGetIMValues(
3848
extern char *XSetIMValues(
3852
extern Display *XDisplayOfIM(
3856
extern char *XLocaleOfIM(
3860
extern XIC XCreateIC(
3864
extern void XDestroyIC(
3868
extern void XSetICFocus(
3872
extern void XUnsetICFocus(
3876
extern wchar_t *XwcResetIC(
3880
extern char *XmbResetIC(
3884
extern char *Xutf8ResetIC(
3888
extern char *XSetICValues(
3892
extern char *XGetICValues(
3900
extern Bool XFilterEvent(
3901
XEvent* /* event */,
3905
extern int XmbLookupString(
3907
XKeyPressedEvent* /* event */,
3908
char* /* buffer_return */,
3909
int /* bytes_buffer */,
3910
KeySym* /* keysym_return */,
3911
Status* /* status_return */
3914
extern int XwcLookupString(
3916
XKeyPressedEvent* /* event */,
3917
wchar_t* /* buffer_return */,
3918
int /* wchars_buffer */,
3919
KeySym* /* keysym_return */,
3920
Status* /* status_return */
3923
extern int Xutf8LookupString(
3925
XKeyPressedEvent* /* event */,
3926
char* /* buffer_return */,
3927
int /* bytes_buffer */,
3928
KeySym* /* keysym_return */,
3929
Status* /* status_return */
3932
extern XVaNestedList XVaCreateNestedList(
3936
/* internal connections for IMs */
3938
extern Bool XRegisterIMInstantiateCallback(
3940
struct _XrmHashBucketRec* /* rdb */,
3941
char* /* res_name */,
3942
char* /* res_class */,
3943
XIDProc /* callback */,
3944
XPointer /* client_data */
3947
extern Bool XUnregisterIMInstantiateCallback(
3949
struct _XrmHashBucketRec* /* rdb */,
3950
char* /* res_name */,
3951
char* /* res_class */,
3952
XIDProc /* callback */,
3953
XPointer /* client_data */
3956
typedef void (*XConnectionWatchProc)(
3958
XPointer /* client_data */,
3960
Bool /* opening */, /* open or close flag */
3961
XPointer* /* watch_data */ /* open sets, close uses */
3965
extern Status XInternalConnectionNumbers(
3967
int** /* fd_return */,
3968
int* /* count_return */
3971
extern void XProcessInternalConnection(
3976
extern Status XAddConnectionWatch(
3978
XConnectionWatchProc /* callback */,
3979
XPointer /* client_data */
3982
extern void XRemoveConnectionWatch(
3984
XConnectionWatchProc /* callback */,
3985
XPointer /* client_data */
3988
extern void XSetAuthorization(
3995
extern int _Xmbtowc(
3996
wchar_t * /* wstr */,
3998
char const * /* str */,
4006
extern int _Xwctomb(
4011
extern Bool XGetEventData(
4013
XGenericEventCookie* /* cookie*/
4016
extern void XFreeEventData(
4018
XGenericEventCookie* /* cookie*/
4023
#endif /* _XLIB_H_ */