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