1 /* $XdotOrg: lib/X11/include/X11/Xlib.h,v 1.6 2005-11-08 06:33:25 jkj Exp $ */
2 /* $Xorg: Xlib.h,v 1.6 2001/02/09 02:03:38 xorgcvs Exp $ */
5 Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
7 Permission to use, copy, modify, distribute, and sell this software and its
8 documentation for any purpose is hereby granted without fee, provided that
9 the above copyright notice appear in all copies and that both that
10 copyright notice and this permission notice appear in supporting
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 Except as contained in this notice, the name of The Open Group shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from The Open Group.
28 /* $XFree86: xc/lib/X11/Xlib.h,v 3.25 2003/11/17 22:20:10 dawes Exp $ */
32 * Xlib.h - Header definition and support file for the C subroutine
33 * interface library (Xlib) to the X Window System Protocol (V11).
34 * Structures and symbols starting with "_" are private to the library.
39 #define XlibSpecificationRelease 6
43 #include <sys/types.h> /* forgot to protect it... */
45 #endif /* __TYPES__ */
47 #if defined(_POSIX_SOURCE) && defined(MOTOROLA)
49 #include <sys/types.h>
52 #include <sys/types.h>
56 #if defined(__SCO__) || defined(__UNIXWARE__)
62 /* applications should not depend on these two headers being included! */
63 #include <X11/Xfuncproto.h>
64 #include <X11/Xosdefs.h>
80 /* replace this with #include or typedef appropriate for your system */
81 typedef unsigned long wchar_t;
85 #if defined(ISC) && defined(USE_XMBTOWC)
86 #define wctomb(a,b) _Xwctomb(a,b)
87 #define mblen(a,b) _Xmblen(a,b)
88 #ifndef USE_XWCHAR_STRING
89 #define mbtowc(a,b,c) _Xmbtowc(a,b,c)
104 /* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in
105 November 2000. Its presence is indicated through the following macro. */
106 #define X_HAVE_UTF8_STRING 1
108 typedef char *XPointer
;
115 #define QueuedAlready 0
116 #define QueuedAfterReading 1
117 #define QueuedAfterFlush 2
119 #define ConnectionNumber(dpy) (((_XPrivDisplay)dpy)->fd)
120 #define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root)
121 #define DefaultScreen(dpy) (((_XPrivDisplay)dpy)->default_screen)
122 #define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
123 #define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
124 #define DefaultGC(dpy, scr) (ScreenOfDisplay(dpy,scr)->default_gc)
125 #define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel)
126 #define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel)
127 #define AllPlanes ((unsigned long)~0L)
128 #define QLength(dpy) (((_XPrivDisplay)dpy)->qlen)
129 #define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width)
130 #define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
131 #define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
132 #define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
133 #define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
134 #define DisplayCells(dpy, scr) (DefaultVisual(dpy,scr)->map_entries)
135 #define ScreenCount(dpy) (((_XPrivDisplay)dpy)->nscreens)
136 #define ServerVendor(dpy) (((_XPrivDisplay)dpy)->vendor)
137 #define ProtocolVersion(dpy) (((_XPrivDisplay)dpy)->proto_major_version)
138 #define ProtocolRevision(dpy) (((_XPrivDisplay)dpy)->proto_minor_version)
139 #define VendorRelease(dpy) (((_XPrivDisplay)dpy)->release)
140 #define DisplayString(dpy) (((_XPrivDisplay)dpy)->display_name)
141 #define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
142 #define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
143 #define BitmapUnit(dpy) (((_XPrivDisplay)dpy)->bitmap_unit)
144 #define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order)
145 #define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad)
146 #define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order)
147 #ifdef CRAY /* unable to get WORD64 without pulling in other symbols */
148 #define NextRequest(dpy) XNextRequest(dpy)
150 #define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1)
152 #define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read)
154 /* macros for screen oriented applications (toolkit) */
155 #define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
156 #define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
157 #define DisplayOfScreen(s) ((s)->display)
158 #define RootWindowOfScreen(s) ((s)->root)
159 #define BlackPixelOfScreen(s) ((s)->black_pixel)
160 #define WhitePixelOfScreen(s) ((s)->white_pixel)
161 #define DefaultColormapOfScreen(s)((s)->cmap)
162 #define DefaultDepthOfScreen(s) ((s)->root_depth)
163 #define DefaultGCOfScreen(s) ((s)->default_gc)
164 #define DefaultVisualOfScreen(s)((s)->root_visual)
165 #define WidthOfScreen(s) ((s)->width)
166 #define HeightOfScreen(s) ((s)->height)
167 #define WidthMMOfScreen(s) ((s)->mwidth)
168 #define HeightMMOfScreen(s) ((s)->mheight)
169 #define PlanesOfScreen(s) ((s)->root_depth)
170 #define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries)
171 #define MinCmapsOfScreen(s) ((s)->min_maps)
172 #define MaxCmapsOfScreen(s) ((s)->max_maps)
173 #define DoesSaveUnders(s) ((s)->save_unders)
174 #define DoesBackingStore(s) ((s)->backing_store)
175 #define EventMaskOfScreen(s) ((s)->root_input_mask)
178 * Extensions need a way to hang private data on some structures.
180 typedef struct _XExtData
{
181 int number
; /* number returned by XRegisterExtension */
182 struct _XExtData
*next
; /* next item on list of data for structure */
183 int (*free_private
)( /* called to free private storage */
184 struct _XExtData
*extension
186 XPointer private_data
; /* data private to this extension. */
190 * This file contains structures used by the extension mechanism.
192 typedef struct { /* public to extension, cannot be changed */
193 int extension
; /* extension number */
194 int major_opcode
; /* major op-code assigned by server */
195 int first_event
; /* first event number for the extension */
196 int first_error
; /* first error number for the extension */
200 * Data structure for retrieving info about pixmap formats.
207 } XPixmapFormatValues
;
211 * Data structure for setting graphics context.
214 int function
; /* logical operation */
215 unsigned long plane_mask
;/* plane mask */
216 unsigned long foreground
;/* foreground pixel */
217 unsigned long background
;/* background pixel */
218 int line_width
; /* line width */
219 int line_style
; /* LineSolid, LineOnOffDash, LineDoubleDash */
220 int cap_style
; /* CapNotLast, CapButt,
221 CapRound, CapProjecting */
222 int join_style
; /* JoinMiter, JoinRound, JoinBevel */
223 int fill_style
; /* FillSolid, FillTiled,
224 FillStippled, FillOpaeueStippled */
225 int fill_rule
; /* EvenOddRule, WindingRule */
226 int arc_mode
; /* ArcChord, ArcPieSlice */
227 Pixmap tile
; /* tile pixmap for tiling operations */
228 Pixmap stipple
; /* stipple 1 plane pixmap for stipping */
229 int ts_x_origin
; /* offset for tile or stipple operations */
231 Font font
; /* default text font for text operations */
232 int subwindow_mode
; /* ClipByChildren, IncludeInferiors */
233 Bool graphics_exposures
;/* boolean, should exposures be generated */
234 int clip_x_origin
; /* origin for clipping */
236 Pixmap clip_mask
; /* bitmap clipping; other calls for rects */
237 int dash_offset
; /* patterned/dashed line information */
242 * Graphics context. The contents of this structure are implementation
243 * dependent. A GC should be treated as opaque by application code.
247 #ifdef XLIB_ILLEGAL_ACCESS
249 XExtData
*ext_data
; /* hook for extension to hang data */
250 GContext gid
; /* protocol ID for graphics context */
251 /* there is more to this structure, but it is private to Xlib */
257 * Visual structure; contains information about colormapping possible.
260 XExtData
*ext_data
; /* hook for extension to hang data */
261 VisualID visualid
; /* visual id of this visual */
262 #if defined(__cplusplus) || defined(c_plusplus)
263 int c_class
; /* C++ class of screen (monochrome, etc.) */
265 int class; /* class of screen (monochrome, etc.) */
267 unsigned long red_mask
, green_mask
, blue_mask
; /* mask values */
268 int bits_per_rgb
; /* log base 2 of distinct color values */
269 int map_entries
; /* color map entries */
273 * Depth structure; contains information for each possible depth.
276 int depth
; /* this depth (Z) of the depth */
277 int nvisuals
; /* number of Visual types at this depth */
278 Visual
*visuals
; /* list of visuals possible at this depth */
282 * Information about the screen. The contents of this structure are
283 * implementation dependent. A Screen should be treated as opaque
284 * by application code.
287 struct _XDisplay
; /* Forward declare before use for C++ */
290 XExtData
*ext_data
; /* hook for extension to hang data */
291 struct _XDisplay
*display
;/* back pointer to display structure */
292 Window root
; /* Root window id. */
293 int width
, height
; /* width and height of screen */
294 int mwidth
, mheight
; /* width and height of in millimeters */
295 int ndepths
; /* number of depths possible */
296 Depth
*depths
; /* list of allowable depths on the screen */
297 int root_depth
; /* bits per pixel */
298 Visual
*root_visual
; /* root visual */
299 GC default_gc
; /* GC for the root root visual */
300 Colormap cmap
; /* default color map */
301 unsigned long white_pixel
;
302 unsigned long black_pixel
; /* White and Black pixel values */
303 int max_maps
, min_maps
; /* max and min color maps */
304 int backing_store
; /* Never, WhenMapped, Always */
306 long root_input_mask
; /* initial root input mask */
310 * Format structure; describes ZFormat data the screen will understand.
313 XExtData
*ext_data
; /* hook for extension to hang data */
314 int depth
; /* depth of this image format */
315 int bits_per_pixel
; /* bits/pixel at this depth */
316 int scanline_pad
; /* scanline must padded to this multiple */
320 * Data structure for setting window attributes.
323 Pixmap background_pixmap
; /* background or None or ParentRelative */
324 unsigned long background_pixel
; /* background pixel */
325 Pixmap border_pixmap
; /* border of the window */
326 unsigned long border_pixel
; /* border pixel value */
327 int bit_gravity
; /* one of bit gravity values */
328 int win_gravity
; /* one of the window gravity values */
329 int backing_store
; /* NotUseful, WhenMapped, Always */
330 unsigned long backing_planes
;/* planes to be preseved if possible */
331 unsigned long backing_pixel
;/* value to use in restoring planes */
332 Bool save_under
; /* should bits under be saved? (popups) */
333 long event_mask
; /* set of events that should be saved */
334 long do_not_propagate_mask
; /* set of events that should not propagate */
335 Bool override_redirect
; /* boolean value for override-redirect */
336 Colormap colormap
; /* color map to be associated with window */
337 Cursor cursor
; /* cursor to be displayed (or None) */
338 } XSetWindowAttributes
;
341 int x
, y
; /* location of window */
342 int width
, height
; /* width and height of window */
343 int border_width
; /* border width of window */
344 int depth
; /* depth of window */
345 Visual
*visual
; /* the associated visual structure */
346 Window root
; /* root of screen containing window */
347 #if defined(__cplusplus) || defined(c_plusplus)
348 int c_class
; /* C++ InputOutput, InputOnly*/
350 int class; /* InputOutput, InputOnly*/
352 int bit_gravity
; /* one of bit gravity values */
353 int win_gravity
; /* one of the window gravity values */
354 int backing_store
; /* NotUseful, WhenMapped, Always */
355 unsigned long backing_planes
;/* planes to be preserved if possible */
356 unsigned long backing_pixel
;/* value to be used when restoring planes */
357 Bool save_under
; /* boolean, should bits under be saved? */
358 Colormap colormap
; /* color map to be associated with window */
359 Bool map_installed
; /* boolean, is color map currently installed*/
360 int map_state
; /* IsUnmapped, IsUnviewable, IsViewable */
361 long all_event_masks
; /* set of events all people have interest in*/
362 long your_event_mask
; /* my event mask */
363 long do_not_propagate_mask
; /* set of events that should not propagate */
364 Bool override_redirect
; /* boolean value for override-redirect */
365 Screen
*screen
; /* back pointer to correct screen */
369 * Data structure for host setting; getting routines.
374 int family
; /* for example FamilyInternet */
375 int length
; /* length of address, in bytes */
376 char *address
; /* pointer to where to find the bytes */
380 * Data structure for ServerFamilyInterpreted addresses in host routines
383 int typelength
; /* length of type string, in bytes */
384 int valuelength
; /* length of value string, in bytes */
385 char *type
; /* pointer to where to find the type string */
386 char *value
; /* pointer to where to find the address */
387 } XServerInterpretedAddress
;
390 * Data structure for "image" data, used by image manipulation routines.
392 typedef struct _XImage
{
393 int width
, height
; /* size of image */
394 int xoffset
; /* number of pixels offset in X direction */
395 int format
; /* XYBitmap, XYPixmap, ZPixmap */
396 char *data
; /* pointer to image data */
397 int byte_order
; /* data byte order, LSBFirst, MSBFirst */
398 int bitmap_unit
; /* quant. of scanline 8, 16, 32 */
399 int bitmap_bit_order
; /* LSBFirst, MSBFirst */
400 int bitmap_pad
; /* 8, 16, 32 either XY or ZPixmap */
401 int depth
; /* depth of image */
402 int bytes_per_line
; /* accelarator to next line */
403 int bits_per_pixel
; /* bits per pixel (ZPixmap) */
404 unsigned long red_mask
; /* bits in z arrangment */
405 unsigned long green_mask
;
406 unsigned long blue_mask
;
407 XPointer obdata
; /* hook for the object routines to hang on */
408 struct funcs
{ /* image manipulation routines */
409 struct _XImage
*(*create_image
)(
410 struct _XDisplay
* /* display */,
411 Visual
* /* visual */,
412 unsigned int /* depth */,
416 unsigned int /* width */,
417 unsigned int /* height */,
418 int /* bitmap_pad */,
419 int /* bytes_per_line */);
420 int (*destroy_image
) (struct _XImage
*);
421 unsigned long (*get_pixel
) (struct _XImage
*, int, int);
422 int (*put_pixel
) (struct _XImage
*, int, int, unsigned long);
423 struct _XImage
*(*sub_image
)(struct _XImage
*, int, int, unsigned int, unsigned int);
424 int (*add_pixel
) (struct _XImage
*, long);
429 * Data structure for XReconfigureWindow
440 * Data structure used by color operations
444 unsigned short red
, green
, blue
;
445 char flags
; /* do_red, do_green, do_blue */
450 * Data structures for graphics operations. On most machines, these are
451 * congruent with the wire protocol structures, so reformatting the data
452 * can be avoided on these architectures.
455 short x1
, y1
, x2
, y2
;
464 unsigned short width
, height
;
469 unsigned short width
, height
;
470 short angle1
, angle2
;
474 /* Data structure for XChangeKeyboardControl */
477 int key_click_percent
;
484 int auto_repeat_mode
; /* On, Off, Default */
487 /* Data structure for XGetKeyboardControl */
490 int key_click_percent
;
492 unsigned int bell_pitch
, bell_duration
;
493 unsigned long led_mask
;
494 int global_auto_repeat
;
495 char auto_repeats
[32];
498 /* Data structure for XGetMotionEvents. */
505 /* Data structure for X{Set,Get}ModifierMapping */
508 int max_keypermod
; /* The server's max # of keys per modifier */
509 KeyCode
*modifiermap
; /* An 8 by max_keypermod array of modifiers */
514 * Display datatype maintaining display specific data.
515 * The contents of this structure are implementation dependent.
516 * A Display should be treated as opaque by application code.
518 #ifndef XLIB_ILLEGAL_ACCESS
519 typedef struct _XDisplay Display
;
522 struct _XPrivate
; /* Forward declare before use for C++ */
523 struct _XrmHashBucketRec
;
526 #ifdef XLIB_ILLEGAL_ACCESS
530 XExtData
*ext_data
; /* hook for extension to hang data */
531 struct _XPrivate
*private1
;
532 int fd
; /* Network socket. */
534 int proto_major_version
;/* major version of server's X protocol */
535 int proto_minor_version
;/* minor version of servers X protocol */
536 char *vendor
; /* vendor of the server hardware */
541 XID (*resource_alloc
)( /* allocator function */
544 int byte_order
; /* screen byte order, LSBFirst, MSBFirst */
545 int bitmap_unit
; /* padding and data requirements */
546 int bitmap_pad
; /* padding requirements on bitmaps */
547 int bitmap_bit_order
; /* LeastSignificant or MostSignificant */
548 int nformats
; /* number of pixmap formats in list */
549 ScreenFormat
*pixmap_format
; /* pixmap format list */
551 int release
; /* release of the server */
552 struct _XPrivate
*private9
, *private10
;
553 int qlen
; /* Length of input event queue */
554 unsigned long last_request_read
; /* seq number of last event read */
555 unsigned long request
; /* sequence number of last request. */
560 unsigned max_request_size
; /* maximum number 32 bit words in request*/
561 struct _XrmHashBucketRec
*db
;
565 char *display_name
; /* "host:display" string used on this connect*/
566 int default_screen
; /* default screen for operations */
567 int nscreens
; /* number of screens on this server*/
568 Screen
*screens
; /* pointer to list of screens */
569 unsigned long motion_buffer
; /* size of motion buffer */
570 unsigned long private16
;
571 int min_keycode
; /* minimum defined keycode */
572 int max_keycode
; /* maximum defined keycode */
576 char *xdefaults
; /* contents of defaults from server */
577 /* there is more to this structure, but it is private to Xlib */
579 #ifdef XLIB_ILLEGAL_ACCESS
587 * Definitions of specific events.
590 int type
; /* of event */
591 unsigned long serial
; /* # of last request processed by server */
592 Bool send_event
; /* true if this came from a SendEvent request */
593 Display
*display
; /* Display the event was read from */
594 Window window
; /* "event" window it is reported relative to */
595 Window root
; /* root window that the event occurred on */
596 Window subwindow
; /* child window */
597 Time time
; /* milliseconds */
598 int x
, y
; /* pointer x, y coordinates in event window */
599 int x_root
, y_root
; /* coordinates relative to root */
600 unsigned int state
; /* key or button mask */
601 unsigned int keycode
; /* detail */
602 Bool same_screen
; /* same screen flag */
604 typedef XKeyEvent XKeyPressedEvent
;
605 typedef XKeyEvent XKeyReleasedEvent
;
608 int type
; /* of event */
609 unsigned long serial
; /* # of last request processed by server */
610 Bool send_event
; /* true if this came from a SendEvent request */
611 Display
*display
; /* Display the event was read from */
612 Window window
; /* "event" window it is reported relative to */
613 Window root
; /* root window that the event occurred on */
614 Window subwindow
; /* child window */
615 Time time
; /* milliseconds */
616 int x
, y
; /* pointer x, y coordinates in event window */
617 int x_root
, y_root
; /* coordinates relative to root */
618 unsigned int state
; /* key or button mask */
619 unsigned int button
; /* detail */
620 Bool same_screen
; /* same screen flag */
622 typedef XButtonEvent XButtonPressedEvent
;
623 typedef XButtonEvent XButtonReleasedEvent
;
626 int type
; /* of event */
627 unsigned long serial
; /* # of last request processed by server */
628 Bool send_event
; /* true if this came from a SendEvent request */
629 Display
*display
; /* Display the event was read from */
630 Window window
; /* "event" window reported relative to */
631 Window root
; /* root window that the event occurred on */
632 Window subwindow
; /* child window */
633 Time time
; /* milliseconds */
634 int x
, y
; /* pointer x, y coordinates in event window */
635 int x_root
, y_root
; /* coordinates relative to root */
636 unsigned int state
; /* key or button mask */
637 char is_hint
; /* detail */
638 Bool same_screen
; /* same screen flag */
640 typedef XMotionEvent XPointerMovedEvent
;
643 int type
; /* of event */
644 unsigned long serial
; /* # of last request processed by server */
645 Bool send_event
; /* true if this came from a SendEvent request */
646 Display
*display
; /* Display the event was read from */
647 Window window
; /* "event" window reported relative to */
648 Window root
; /* root window that the event occurred on */
649 Window subwindow
; /* child window */
650 Time time
; /* milliseconds */
651 int x
, y
; /* pointer x, y coordinates in event window */
652 int x_root
, y_root
; /* coordinates relative to root */
653 int mode
; /* NotifyNormal, NotifyGrab, NotifyUngrab */
656 * NotifyAncestor, NotifyVirtual, NotifyInferior,
657 * NotifyNonlinear,NotifyNonlinearVirtual
659 Bool same_screen
; /* same screen flag */
660 Bool focus
; /* boolean focus */
661 unsigned int state
; /* key or button mask */
663 typedef XCrossingEvent XEnterWindowEvent
;
664 typedef XCrossingEvent XLeaveWindowEvent
;
667 int type
; /* FocusIn or FocusOut */
668 unsigned long serial
; /* # of last request processed by server */
669 Bool send_event
; /* true if this came from a SendEvent request */
670 Display
*display
; /* Display the event was read from */
671 Window window
; /* window of event */
672 int mode
; /* NotifyNormal, NotifyWhileGrabbed,
673 NotifyGrab, NotifyUngrab */
676 * NotifyAncestor, NotifyVirtual, NotifyInferior,
677 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
678 * NotifyPointerRoot, NotifyDetailNone
681 typedef XFocusChangeEvent XFocusInEvent
;
682 typedef XFocusChangeEvent XFocusOutEvent
;
684 /* generated on EnterWindow and FocusIn when KeyMapState selected */
687 unsigned long serial
; /* # of last request processed by server */
688 Bool send_event
; /* true if this came from a SendEvent request */
689 Display
*display
; /* Display the event was read from */
696 unsigned long serial
; /* # of last request processed by server */
697 Bool send_event
; /* true if this came from a SendEvent request */
698 Display
*display
; /* Display the event was read from */
702 int count
; /* if non-zero, at least this many more */
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 */
713 int count
; /* if non-zero, at least this many more */
714 int major_code
; /* core is CopyArea or CopyPlane */
715 int minor_code
; /* not defined in the core */
716 } XGraphicsExposeEvent
;
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 */
724 int major_code
; /* core is CopyArea or CopyPlane */
725 int minor_code
; /* not defined in the core */
730 unsigned long serial
; /* # of last request processed by server */
731 Bool send_event
; /* true if this came from a SendEvent request */
732 Display
*display
; /* Display the event was read from */
734 int state
; /* Visibility state */
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 parent
; /* parent of the window */
743 Window window
; /* window id of window created */
744 int x
, y
; /* window location */
745 int width
, height
; /* size of window */
746 int border_width
; /* border width */
747 Bool override_redirect
; /* creation should be overridden */
748 } XCreateWindowEvent
;
752 unsigned long serial
; /* # of last request processed by server */
753 Bool send_event
; /* true if this came from a SendEvent request */
754 Display
*display
; /* Display the event was read from */
757 } XDestroyWindowEvent
;
761 unsigned long serial
; /* # of last request processed by server */
762 Bool send_event
; /* true if this came from a SendEvent request */
763 Display
*display
; /* Display the event was read from */
771 unsigned long serial
; /* # of last request processed by server */
772 Bool send_event
; /* true if this came from a SendEvent request */
773 Display
*display
; /* Display the event was read from */
776 Bool override_redirect
; /* boolean, is override set... */
781 unsigned long serial
; /* # of last request processed by server */
782 Bool send_event
; /* true if this came from a SendEvent request */
783 Display
*display
; /* Display the event was read from */
790 unsigned long serial
; /* # of last request processed by server */
791 Bool send_event
; /* true if this came from a SendEvent request */
792 Display
*display
; /* Display the event was read from */
797 Bool override_redirect
;
802 unsigned long serial
; /* # of last request processed by server */
803 Bool send_event
; /* true if this came from a SendEvent request */
804 Display
*display
; /* Display the event was read from */
811 Bool override_redirect
;
816 unsigned long serial
; /* # of last request processed by server */
817 Bool send_event
; /* true if this came from a SendEvent request */
818 Display
*display
; /* Display the event was read from */
826 unsigned long serial
; /* # of last request processed by server */
827 Bool send_event
; /* true if this came from a SendEvent request */
828 Display
*display
; /* Display the event was read from */
831 } XResizeRequestEvent
;
835 unsigned long serial
; /* # of last request processed by server */
836 Bool send_event
; /* true if this came from a SendEvent request */
837 Display
*display
; /* Display the event was read from */
844 int detail
; /* Above, Below, TopIf, BottomIf, Opposite */
845 unsigned long value_mask
;
846 } XConfigureRequestEvent
;
850 unsigned long serial
; /* # of last request processed by server */
851 Bool send_event
; /* true if this came from a SendEvent request */
852 Display
*display
; /* Display the event was read from */
855 int place
; /* PlaceOnTop, PlaceOnBottom */
860 unsigned long serial
; /* # of last request processed by server */
861 Bool send_event
; /* true if this came from a SendEvent request */
862 Display
*display
; /* Display the event was read from */
865 int place
; /* PlaceOnTop, PlaceOnBottom */
866 } XCirculateRequestEvent
;
870 unsigned long serial
; /* # of last request processed by server */
871 Bool send_event
; /* true if this came from a SendEvent request */
872 Display
*display
; /* Display the event was read from */
876 int state
; /* NewValue, Deleted */
881 unsigned long serial
; /* # of last request processed by server */
882 Bool send_event
; /* true if this came from a SendEvent request */
883 Display
*display
; /* Display the event was read from */
887 } XSelectionClearEvent
;
891 unsigned long serial
; /* # of last request processed by server */
892 Bool send_event
; /* true if this came from a SendEvent request */
893 Display
*display
; /* Display the event was read from */
900 } XSelectionRequestEvent
;
904 unsigned long serial
; /* # of last request processed by server */
905 Bool send_event
; /* true if this came from a SendEvent request */
906 Display
*display
; /* Display the event was read from */
910 Atom property
; /* ATOM or None */
916 unsigned long serial
; /* # of last request processed by server */
917 Bool send_event
; /* true if this came from a SendEvent request */
918 Display
*display
; /* Display the event was read from */
920 Colormap colormap
; /* COLORMAP or None */
921 #if defined(__cplusplus) || defined(c_plusplus)
922 Bool c_new
; /* C++ */
926 int state
; /* ColormapInstalled, ColormapUninstalled */
931 unsigned long serial
; /* # of last request processed by server */
932 Bool send_event
; /* true if this came from a SendEvent request */
933 Display
*display
; /* Display the event was read from */
942 } XClientMessageEvent
;
946 unsigned long serial
; /* # of last request processed by server */
947 Bool send_event
; /* true if this came from a SendEvent request */
948 Display
*display
; /* Display the event was read from */
949 Window window
; /* unused */
950 int request
; /* one of MappingModifier, MappingKeyboard,
952 int first_keycode
; /* first keycode */
953 int count
; /* defines range of change w. first_keycode*/
958 Display
*display
; /* Display the event was read from */
959 XID resourceid
; /* resource id */
960 unsigned long serial
; /* serial number of failed request */
961 unsigned char error_code
; /* error code of failed request */
962 unsigned char request_code
; /* Major op-code of failed request */
963 unsigned char minor_code
; /* Minor op-code of failed request */
968 unsigned long serial
; /* # of last request processed by server */
969 Bool send_event
; /* true if this came from a SendEvent request */
970 Display
*display
;/* Display the event was read from */
971 Window window
; /* window on which event was requested in event mask */
975 * this union is defined so Xlib can always use the same sized
976 * event structure internally, to avoid memory fragmentation.
978 typedef union _XEvent
{
979 int type
; /* must not be changed; first element */
982 XButtonEvent xbutton
;
983 XMotionEvent xmotion
;
984 XCrossingEvent xcrossing
;
985 XFocusChangeEvent xfocus
;
986 XExposeEvent xexpose
;
987 XGraphicsExposeEvent xgraphicsexpose
;
988 XNoExposeEvent xnoexpose
;
989 XVisibilityEvent xvisibility
;
990 XCreateWindowEvent xcreatewindow
;
991 XDestroyWindowEvent xdestroywindow
;
994 XMapRequestEvent xmaprequest
;
995 XReparentEvent xreparent
;
996 XConfigureEvent xconfigure
;
997 XGravityEvent xgravity
;
998 XResizeRequestEvent xresizerequest
;
999 XConfigureRequestEvent xconfigurerequest
;
1000 XCirculateEvent xcirculate
;
1001 XCirculateRequestEvent xcirculaterequest
;
1002 XPropertyEvent xproperty
;
1003 XSelectionClearEvent xselectionclear
;
1004 XSelectionRequestEvent xselectionrequest
;
1005 XSelectionEvent xselection
;
1006 XColormapEvent xcolormap
;
1007 XClientMessageEvent xclient
;
1008 XMappingEvent xmapping
;
1010 XKeymapEvent xkeymap
;
1015 #define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))
1018 * per character font metric information.
1021 short lbearing
; /* origin to left edge of raster */
1022 short rbearing
; /* origin to right edge of raster */
1023 short width
; /* advance to next char's origin */
1024 short ascent
; /* baseline to top edge of raster */
1025 short descent
; /* baseline to bottom edge of raster */
1026 unsigned short attributes
; /* per char flags (not predefined) */
1030 * To allow arbitrary information with fonts, there are additional properties
1035 unsigned long card32
;
1039 XExtData
*ext_data
; /* hook for extension to hang data */
1040 Font fid
; /* Font id for this font */
1041 unsigned direction
; /* hint about direction the font is painted */
1042 unsigned min_char_or_byte2
;/* first character */
1043 unsigned max_char_or_byte2
;/* last character */
1044 unsigned min_byte1
; /* first row that exists */
1045 unsigned max_byte1
; /* last row that exists */
1046 Bool all_chars_exist
;/* flag if all characters have non-zero size*/
1047 unsigned default_char
; /* char to print for undefined character */
1048 int n_properties
; /* how many properties there are */
1049 XFontProp
*properties
; /* pointer to array of additional properties*/
1050 XCharStruct min_bounds
; /* minimum bounds over all existing char*/
1051 XCharStruct max_bounds
; /* maximum bounds over all existing char*/
1052 XCharStruct
*per_char
; /* first_char to last_char information */
1053 int ascent
; /* log. extent above baseline for spacing */
1054 int descent
; /* log. descent below baseline for spacing */
1058 * PolyText routines take these as arguments.
1061 char *chars
; /* pointer to string */
1062 int nchars
; /* number of characters */
1063 int delta
; /* delta between strings */
1064 Font font
; /* font to print it in, None don't change */
1067 typedef struct { /* normal 16 bit characters are two bytes */
1068 unsigned char byte1
;
1069 unsigned char byte2
;
1073 XChar2b
*chars
; /* two byte characters */
1074 int nchars
; /* number of characters */
1075 int delta
; /* delta between strings */
1076 Font font
; /* font to print it in, None don't change */
1080 typedef union { Display
*display
;
1084 ScreenFormat
*pixmap_format
;
1085 XFontStruct
*font
; } XEDataObject
;
1088 XRectangle max_ink_extent
;
1089 XRectangle max_logical_extent
;
1093 typedef void (*XOMProc)();
1096 typedef struct _XOM
*XOM
;
1097 typedef struct _XOC
*XOC
, *XFontSet
;
1113 #define XNRequiredCharSet "requiredCharSet"
1114 #define XNQueryOrientation "queryOrientation"
1115 #define XNBaseFontName "baseFontName"
1116 #define XNOMAutomatic "omAutomatic"
1117 #define XNMissingCharSet "missingCharSet"
1118 #define XNDefaultString "defaultString"
1119 #define XNOrientation "orientation"
1120 #define XNDirectionalDependentDrawing "directionalDependentDrawing"
1121 #define XNContextualDrawing "contextualDrawing"
1122 #define XNFontInfo "fontInfo"
1126 char **charset_list
;
1130 XOMOrientation_LTR_TTB
,
1131 XOMOrientation_RTL_TTB
,
1132 XOMOrientation_TTB_LTR
,
1133 XOMOrientation_TTB_RTL
,
1134 XOMOrientation_Context
1138 int num_orientation
;
1139 XOrientation
*orientation
; /* Input Text description */
1144 XFontStruct
**font_struct_list
;
1145 char **font_name_list
;
1148 typedef struct _XIM
*XIM
;
1149 typedef struct _XIC
*XIC
;
1151 typedef void (*XIMProc
)(
1157 typedef Bool (*XICProc
)(
1163 typedef void (*XIDProc
)(
1169 typedef unsigned long XIMStyle
;
1172 unsigned short count_styles
;
1173 XIMStyle
*supported_styles
;
1176 #define XIMPreeditArea 0x0001L
1177 #define XIMPreeditCallbacks 0x0002L
1178 #define XIMPreeditPosition 0x0004L
1179 #define XIMPreeditNothing 0x0008L
1180 #define XIMPreeditNone 0x0010L
1181 #define XIMStatusArea 0x0100L
1182 #define XIMStatusCallbacks 0x0200L
1183 #define XIMStatusNothing 0x0400L
1184 #define XIMStatusNone 0x0800L
1186 #define XNVaNestedList "XNVaNestedList"
1187 #define XNQueryInputStyle "queryInputStyle"
1188 #define XNClientWindow "clientWindow"
1189 #define XNInputStyle "inputStyle"
1190 #define XNFocusWindow "focusWindow"
1191 #define XNResourceName "resourceName"
1192 #define XNResourceClass "resourceClass"
1193 #define XNGeometryCallback "geometryCallback"
1194 #define XNDestroyCallback "destroyCallback"
1195 #define XNFilterEvents "filterEvents"
1196 #define XNPreeditStartCallback "preeditStartCallback"
1197 #define XNPreeditDoneCallback "preeditDoneCallback"
1198 #define XNPreeditDrawCallback "preeditDrawCallback"
1199 #define XNPreeditCaretCallback "preeditCaretCallback"
1200 #define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
1201 #define XNPreeditAttributes "preeditAttributes"
1202 #define XNStatusStartCallback "statusStartCallback"
1203 #define XNStatusDoneCallback "statusDoneCallback"
1204 #define XNStatusDrawCallback "statusDrawCallback"
1205 #define XNStatusAttributes "statusAttributes"
1206 #define XNArea "area"
1207 #define XNAreaNeeded "areaNeeded"
1208 #define XNSpotLocation "spotLocation"
1209 #define XNColormap "colorMap"
1210 #define XNStdColormap "stdColorMap"
1211 #define XNForeground "foreground"
1212 #define XNBackground "background"
1213 #define XNBackgroundPixmap "backgroundPixmap"
1214 #define XNFontSet "fontSet"
1215 #define XNLineSpace "lineSpace"
1216 #define XNCursor "cursor"
1218 #define XNQueryIMValuesList "queryIMValuesList"
1219 #define XNQueryICValuesList "queryICValuesList"
1220 #define XNVisiblePosition "visiblePosition"
1221 #define XNR6PreeditCallback "r6PreeditCallback"
1222 #define XNStringConversionCallback "stringConversionCallback"
1223 #define XNStringConversion "stringConversion"
1224 #define XNResetState "resetState"
1225 #define XNHotKey "hotKey"
1226 #define XNHotKeyState "hotKeyState"
1227 #define XNPreeditState "preeditState"
1228 #define XNSeparatorofNestedList "separatorofNestedList"
1230 #define XBufferOverflow -1
1231 #define XLookupNone 1
1232 #define XLookupChars 2
1233 #define XLookupKeySym 3
1234 #define XLookupBoth 4
1236 typedef void *XVaNestedList
;
1239 XPointer client_data
;
1244 XPointer client_data
;
1248 typedef unsigned long XIMFeedback
;
1250 #define XIMReverse 1L
1251 #define XIMUnderline (1L<<1)
1252 #define XIMHighlight (1L<<2)
1253 #define XIMPrimary (1L<<5)
1254 #define XIMSecondary (1L<<6)
1255 #define XIMTertiary (1L<<7)
1256 #define XIMVisibleToForward (1L<<8)
1257 #define XIMVisibleToBackword (1L<<9)
1258 #define XIMVisibleToCenter (1L<<10)
1260 typedef struct _XIMText
{
1261 unsigned short length
;
1262 XIMFeedback
*feedback
;
1263 Bool encoding_is_wchar
;
1270 typedef unsigned long XIMPreeditState
;
1272 #define XIMPreeditUnKnown 0L
1273 #define XIMPreeditEnable 1L
1274 #define XIMPreeditDisable (1L<<1)
1276 typedef struct _XIMPreeditStateNotifyCallbackStruct
{
1277 XIMPreeditState state
;
1278 } XIMPreeditStateNotifyCallbackStruct
;
1280 typedef unsigned long XIMResetState
;
1282 #define XIMInitialState 1L
1283 #define XIMPreserveState (1L<<1)
1285 typedef unsigned long XIMStringConversionFeedback
;
1287 #define XIMStringConversionLeftEdge (0x00000001)
1288 #define XIMStringConversionRightEdge (0x00000002)
1289 #define XIMStringConversionTopEdge (0x00000004)
1290 #define XIMStringConversionBottomEdge (0x00000008)
1291 #define XIMStringConversionConcealed (0x00000010)
1292 #define XIMStringConversionWrapped (0x00000020)
1294 typedef struct _XIMStringConversionText
{
1295 unsigned short length
;
1296 XIMStringConversionFeedback
*feedback
;
1297 Bool encoding_is_wchar
;
1302 } XIMStringConversionText
;
1304 typedef unsigned short XIMStringConversionPosition
;
1306 typedef unsigned short XIMStringConversionType
;
1308 #define XIMStringConversionBuffer (0x0001)
1309 #define XIMStringConversionLine (0x0002)
1310 #define XIMStringConversionWord (0x0003)
1311 #define XIMStringConversionChar (0x0004)
1313 typedef unsigned short XIMStringConversionOperation
;
1315 #define XIMStringConversionSubstitution (0x0001)
1316 #define XIMStringConversionRetrieval (0x0002)
1319 XIMForwardChar
, XIMBackwardChar
,
1320 XIMForwardWord
, XIMBackwardWord
,
1321 XIMCaretUp
, XIMCaretDown
,
1322 XIMNextLine
, XIMPreviousLine
,
1323 XIMLineStart
, XIMLineEnd
,
1324 XIMAbsolutePosition
,
1326 } XIMCaretDirection
;
1328 typedef struct _XIMStringConversionCallbackStruct
{
1329 XIMStringConversionPosition position
;
1330 XIMCaretDirection direction
;
1331 XIMStringConversionOperation operation
;
1332 unsigned short factor
;
1333 XIMStringConversionText
*text
;
1334 } XIMStringConversionCallbackStruct
;
1336 typedef struct _XIMPreeditDrawCallbackStruct
{
1337 int caret
; /* Cursor offset within pre-edit string */
1338 int chg_first
; /* Starting change position */
1339 int chg_length
; /* Length of the change in character count */
1341 } XIMPreeditDrawCallbackStruct
;
1344 XIMIsInvisible
, /* Disable caret feedback */
1345 XIMIsPrimary
, /* UI defined caret feedback */
1346 XIMIsSecondary
/* UI defined caret feedback */
1349 typedef struct _XIMPreeditCaretCallbackStruct
{
1350 int position
; /* Caret offset within pre-edit string */
1351 XIMCaretDirection direction
; /* Caret moves direction */
1352 XIMCaretStyle style
; /* Feedback of the caret */
1353 } XIMPreeditCaretCallbackStruct
;
1358 } XIMStatusDataType
;
1360 typedef struct _XIMStatusDrawCallbackStruct
{
1361 XIMStatusDataType type
;
1366 } XIMStatusDrawCallbackStruct
;
1368 typedef struct _XIMHotKeyTrigger
{
1374 typedef struct _XIMHotKeyTriggers
{
1376 XIMHotKeyTrigger
*key
;
1377 } XIMHotKeyTriggers
;
1379 typedef unsigned long XIMHotKeyState
;
1381 #define XIMHotKeyStateON (0x0001L)
1382 #define XIMHotKeyStateOFF (0x0002L)
1385 unsigned short count_values
;
1386 char **supported_values
;
1391 #if defined(WIN32) && !defined(_XLIBINT_)
1392 #define _Xdebug (*_Xdebug_p)
1397 extern XFontStruct
*XLoadQueryFont(
1398 Display
* /* display */,
1399 _Xconst
char* /* name */
1402 extern XFontStruct
*XQueryFont(
1403 Display
* /* display */,
1408 extern XTimeCoord
*XGetMotionEvents(
1409 Display
* /* display */,
1413 int* /* nevents_return */
1416 extern XModifierKeymap
*XDeleteModifiermapEntry(
1417 XModifierKeymap
* /* modmap */,
1418 #if NeedWidePrototypes
1419 unsigned int /* keycode_entry */,
1421 KeyCode
/* keycode_entry */,
1426 extern XModifierKeymap
*XGetModifierMapping(
1427 Display
* /* display */
1430 extern XModifierKeymap
*XInsertModifiermapEntry(
1431 XModifierKeymap
* /* modmap */,
1432 #if NeedWidePrototypes
1433 unsigned int /* keycode_entry */,
1435 KeyCode
/* keycode_entry */,
1440 extern XModifierKeymap
*XNewModifiermap(
1441 int /* max_keys_per_mod */
1444 extern XImage
*XCreateImage(
1445 Display
* /* display */,
1446 Visual
* /* visual */,
1447 unsigned int /* depth */,
1451 unsigned int /* width */,
1452 unsigned int /* height */,
1453 int /* bitmap_pad */,
1454 int /* bytes_per_line */
1456 extern Status
XInitImage(
1459 extern XImage
*XGetImage(
1460 Display
* /* display */,
1464 unsigned int /* width */,
1465 unsigned int /* height */,
1466 unsigned long /* plane_mask */,
1469 extern XImage
*XGetSubImage(
1470 Display
* /* display */,
1474 unsigned int /* width */,
1475 unsigned int /* height */,
1476 unsigned long /* plane_mask */,
1478 XImage
* /* dest_image */,
1484 * X function declarations.
1486 extern Display
*XOpenDisplay(
1487 _Xconst
char* /* display_name */
1490 extern void XrmInitialize(
1494 extern char *XFetchBytes(
1495 Display
* /* display */,
1496 int* /* nbytes_return */
1498 extern char *XFetchBuffer(
1499 Display
* /* display */,
1500 int* /* nbytes_return */,
1503 extern char *XGetAtomName(
1504 Display
* /* display */,
1507 extern Status
XGetAtomNames(
1511 char** /* names_return */
1513 extern char *XGetDefault(
1514 Display
* /* display */,
1515 _Xconst
char* /* program */,
1516 _Xconst
char* /* option */
1518 extern char *XDisplayName(
1519 _Xconst
char* /* string */
1521 extern char *XKeysymToString(
1525 extern int (*XSynchronize(
1526 Display
* /* display */,
1529 Display
* /* display */
1531 extern int (*XSetAfterFunction(
1532 Display
* /* display */,
1534 Display
* /* display */
1537 Display
* /* display */
1539 extern Atom
XInternAtom(
1540 Display
* /* display */,
1541 _Xconst
char* /* atom_name */,
1542 Bool
/* only_if_exists */
1544 extern Status
XInternAtoms(
1548 Bool
/* onlyIfExists */,
1549 Atom
* /* atoms_return */
1551 extern Colormap
XCopyColormapAndFree(
1552 Display
* /* display */,
1553 Colormap
/* colormap */
1555 extern Colormap
XCreateColormap(
1556 Display
* /* display */,
1558 Visual
* /* visual */,
1561 extern Cursor
XCreatePixmapCursor(
1562 Display
* /* display */,
1563 Pixmap
/* source */,
1565 XColor
* /* foreground_color */,
1566 XColor
* /* background_color */,
1567 unsigned int /* x */,
1568 unsigned int /* y */
1570 extern Cursor
XCreateGlyphCursor(
1571 Display
* /* display */,
1572 Font
/* source_font */,
1573 Font
/* mask_font */,
1574 unsigned int /* source_char */,
1575 unsigned int /* mask_char */,
1576 XColor _Xconst
* /* foreground_color */,
1577 XColor _Xconst
* /* background_color */
1579 extern Cursor
XCreateFontCursor(
1580 Display
* /* display */,
1581 unsigned int /* shape */
1583 extern Font
XLoadFont(
1584 Display
* /* display */,
1585 _Xconst
char* /* name */
1587 extern GC
XCreateGC(
1588 Display
* /* display */,
1590 unsigned long /* valuemask */,
1591 XGCValues
* /* values */
1593 extern GContext
XGContextFromGC(
1596 extern void XFlushGC(
1597 Display
* /* display */,
1600 extern Pixmap
XCreatePixmap(
1601 Display
* /* display */,
1603 unsigned int /* width */,
1604 unsigned int /* height */,
1605 unsigned int /* depth */
1607 extern Pixmap
XCreateBitmapFromData(
1608 Display
* /* display */,
1610 _Xconst
char* /* data */,
1611 unsigned int /* width */,
1612 unsigned int /* height */
1614 extern Pixmap
XCreatePixmapFromBitmapData(
1615 Display
* /* display */,
1618 unsigned int /* width */,
1619 unsigned int /* height */,
1620 unsigned long /* fg */,
1621 unsigned long /* bg */,
1622 unsigned int /* depth */
1624 extern Window
XCreateSimpleWindow(
1625 Display
* /* display */,
1626 Window
/* parent */,
1629 unsigned int /* width */,
1630 unsigned int /* height */,
1631 unsigned int /* border_width */,
1632 unsigned long /* border */,
1633 unsigned long /* background */
1635 extern Window
XGetSelectionOwner(
1636 Display
* /* display */,
1637 Atom
/* selection */
1639 extern Window
XCreateWindow(
1640 Display
* /* display */,
1641 Window
/* parent */,
1644 unsigned int /* width */,
1645 unsigned int /* height */,
1646 unsigned int /* border_width */,
1648 unsigned int /* class */,
1649 Visual
* /* visual */,
1650 unsigned long /* valuemask */,
1651 XSetWindowAttributes
* /* attributes */
1653 extern Colormap
*XListInstalledColormaps(
1654 Display
* /* display */,
1656 int* /* num_return */
1658 extern char **XListFonts(
1659 Display
* /* display */,
1660 _Xconst
char* /* pattern */,
1662 int* /* actual_count_return */
1664 extern char **XListFontsWithInfo(
1665 Display
* /* display */,
1666 _Xconst
char* /* pattern */,
1668 int* /* count_return */,
1669 XFontStruct
** /* info_return */
1671 extern char **XGetFontPath(
1672 Display
* /* display */,
1673 int* /* npaths_return */
1675 extern char **XListExtensions(
1676 Display
* /* display */,
1677 int* /* nextensions_return */
1679 extern Atom
*XListProperties(
1680 Display
* /* display */,
1682 int* /* num_prop_return */
1684 extern XHostAddress
*XListHosts(
1685 Display
* /* display */,
1686 int* /* nhosts_return */,
1687 Bool
* /* state_return */
1689 extern KeySym
XKeycodeToKeysym(
1690 Display
* /* display */,
1691 #if NeedWidePrototypes
1692 unsigned int /* keycode */,
1694 KeyCode
/* keycode */,
1698 extern KeySym
XLookupKeysym(
1699 XKeyEvent
* /* key_event */,
1702 extern KeySym
*XGetKeyboardMapping(
1703 Display
* /* display */,
1704 #if NeedWidePrototypes
1705 unsigned int /* first_keycode */,
1707 KeyCode
/* first_keycode */,
1709 int /* keycode_count */,
1710 int* /* keysyms_per_keycode_return */
1712 extern KeySym
XStringToKeysym(
1713 _Xconst
char* /* string */
1715 extern long XMaxRequestSize(
1716 Display
* /* display */
1718 extern long XExtendedMaxRequestSize(
1719 Display
* /* display */
1721 extern char *XResourceManagerString(
1722 Display
* /* display */
1724 extern char *XScreenResourceString(
1725 Screen
* /* screen */
1727 extern unsigned long XDisplayMotionBufferSize(
1728 Display
* /* display */
1730 extern VisualID
XVisualIDFromVisual(
1731 Visual
* /* visual */
1734 /* multithread routines */
1736 extern Status
XInitThreads(
1740 extern void XLockDisplay(
1741 Display
* /* display */
1744 extern void XUnlockDisplay(
1745 Display
* /* display */
1748 /* routines for dealing with extensions */
1750 extern XExtCodes
*XInitExtension(
1751 Display
* /* display */,
1752 _Xconst
char* /* name */
1755 extern XExtCodes
*XAddExtension(
1756 Display
* /* display */
1758 extern XExtData
*XFindOnExtensionList(
1759 XExtData
** /* structure */,
1762 extern XExtData
**XEHeadOfExtensionList(
1763 XEDataObject
/* object */
1766 /* these are routines for which there are also macros */
1767 extern Window
XRootWindow(
1768 Display
* /* display */,
1769 int /* screen_number */
1771 extern Window
XDefaultRootWindow(
1772 Display
* /* display */
1774 extern Window
XRootWindowOfScreen(
1775 Screen
* /* screen */
1777 extern Visual
*XDefaultVisual(
1778 Display
* /* display */,
1779 int /* screen_number */
1781 extern Visual
*XDefaultVisualOfScreen(
1782 Screen
* /* screen */
1784 extern GC
XDefaultGC(
1785 Display
* /* display */,
1786 int /* screen_number */
1788 extern GC
XDefaultGCOfScreen(
1789 Screen
* /* screen */
1791 extern unsigned long XBlackPixel(
1792 Display
* /* display */,
1793 int /* screen_number */
1795 extern unsigned long XWhitePixel(
1796 Display
* /* display */,
1797 int /* screen_number */
1799 extern unsigned long XAllPlanes(
1802 extern unsigned long XBlackPixelOfScreen(
1803 Screen
* /* screen */
1805 extern unsigned long XWhitePixelOfScreen(
1806 Screen
* /* screen */
1808 extern unsigned long XNextRequest(
1809 Display
* /* display */
1811 extern unsigned long XLastKnownRequestProcessed(
1812 Display
* /* display */
1814 extern char *XServerVendor(
1815 Display
* /* display */
1817 extern char *XDisplayString(
1818 Display
* /* display */
1820 extern Colormap
XDefaultColormap(
1821 Display
* /* display */,
1822 int /* screen_number */
1824 extern Colormap
XDefaultColormapOfScreen(
1825 Screen
* /* screen */
1827 extern Display
*XDisplayOfScreen(
1828 Screen
* /* screen */
1830 extern Screen
*XScreenOfDisplay(
1831 Display
* /* display */,
1832 int /* screen_number */
1834 extern Screen
*XDefaultScreenOfDisplay(
1835 Display
* /* display */
1837 extern long XEventMaskOfScreen(
1838 Screen
* /* screen */
1841 extern int XScreenNumberOfScreen(
1842 Screen
* /* screen */
1845 typedef int (*XErrorHandler
) ( /* WARNING, this type not in Xlib spec */
1846 Display
* /* display */,
1847 XErrorEvent
* /* error_event */
1850 extern XErrorHandler
XSetErrorHandler (
1851 XErrorHandler
/* handler */
1855 typedef int (*XIOErrorHandler
) ( /* WARNING, this type not in Xlib spec */
1856 Display
* /* display */
1859 extern XIOErrorHandler
XSetIOErrorHandler (
1860 XIOErrorHandler
/* handler */
1864 extern XPixmapFormatValues
*XListPixmapFormats(
1865 Display
* /* display */,
1866 int* /* count_return */
1868 extern int *XListDepths(
1869 Display
* /* display */,
1870 int /* screen_number */,
1871 int* /* count_return */
1874 /* ICCCM routines for things that don't require special include files; */
1875 /* other declarations are given in Xutil.h */
1876 extern Status
XReconfigureWMWindow(
1877 Display
* /* display */,
1879 int /* screen_number */,
1880 unsigned int /* mask */,
1881 XWindowChanges
* /* changes */
1884 extern Status
XGetWMProtocols(
1885 Display
* /* display */,
1887 Atom
** /* protocols_return */,
1888 int* /* count_return */
1890 extern Status
XSetWMProtocols(
1891 Display
* /* display */,
1893 Atom
* /* protocols */,
1896 extern Status
XIconifyWindow(
1897 Display
* /* display */,
1899 int /* screen_number */
1901 extern Status
XWithdrawWindow(
1902 Display
* /* display */,
1904 int /* screen_number */
1906 extern Status
XGetCommand(
1907 Display
* /* display */,
1909 char*** /* argv_return */,
1910 int* /* argc_return */
1912 extern Status
XGetWMColormapWindows(
1913 Display
* /* display */,
1915 Window
** /* windows_return */,
1916 int* /* count_return */
1918 extern Status
XSetWMColormapWindows(
1919 Display
* /* display */,
1921 Window
* /* colormap_windows */,
1924 extern void XFreeStringList(
1927 extern int XSetTransientForHint(
1928 Display
* /* display */,
1930 Window
/* prop_window */
1933 /* The following are given in alphabetical order */
1935 extern int XActivateScreenSaver(
1936 Display
* /* display */
1939 extern int XAddHost(
1940 Display
* /* display */,
1941 XHostAddress
* /* host */
1944 extern int XAddHosts(
1945 Display
* /* display */,
1946 XHostAddress
* /* hosts */,
1950 extern int XAddToExtensionList(
1951 struct _XExtData
** /* structure */,
1952 XExtData
* /* ext_data */
1955 extern int XAddToSaveSet(
1956 Display
* /* display */,
1960 extern Status
XAllocColor(
1961 Display
* /* display */,
1962 Colormap
/* colormap */,
1963 XColor
* /* screen_in_out */
1966 extern Status
XAllocColorCells(
1967 Display
* /* display */,
1968 Colormap
/* colormap */,
1970 unsigned long* /* plane_masks_return */,
1971 unsigned int /* nplanes */,
1972 unsigned long* /* pixels_return */,
1973 unsigned int /* npixels */
1976 extern Status
XAllocColorPlanes(
1977 Display
* /* display */,
1978 Colormap
/* colormap */,
1980 unsigned long* /* pixels_return */,
1985 unsigned long* /* rmask_return */,
1986 unsigned long* /* gmask_return */,
1987 unsigned long* /* bmask_return */
1990 extern Status
XAllocNamedColor(
1991 Display
* /* display */,
1992 Colormap
/* colormap */,
1993 _Xconst
char* /* color_name */,
1994 XColor
* /* screen_def_return */,
1995 XColor
* /* exact_def_return */
1998 extern int XAllowEvents(
1999 Display
* /* display */,
2000 int /* event_mode */,
2004 extern int XAutoRepeatOff(
2005 Display
* /* display */
2008 extern int XAutoRepeatOn(
2009 Display
* /* display */
2013 Display
* /* display */,
2017 extern int XBitmapBitOrder(
2018 Display
* /* display */
2021 extern int XBitmapPad(
2022 Display
* /* display */
2025 extern int XBitmapUnit(
2026 Display
* /* display */
2029 extern int XCellsOfScreen(
2030 Screen
* /* screen */
2033 extern int XChangeActivePointerGrab(
2034 Display
* /* display */,
2035 unsigned int /* event_mask */,
2036 Cursor
/* cursor */,
2040 extern int XChangeGC(
2041 Display
* /* display */,
2043 unsigned long /* valuemask */,
2044 XGCValues
* /* values */
2047 extern int XChangeKeyboardControl(
2048 Display
* /* display */,
2049 unsigned long /* value_mask */,
2050 XKeyboardControl
* /* values */
2053 extern int XChangeKeyboardMapping(
2054 Display
* /* display */,
2055 int /* first_keycode */,
2056 int /* keysyms_per_keycode */,
2057 KeySym
* /* keysyms */,
2061 extern int XChangePointerControl(
2062 Display
* /* display */,
2063 Bool
/* do_accel */,
2064 Bool
/* do_threshold */,
2065 int /* accel_numerator */,
2066 int /* accel_denominator */,
2070 extern int XChangeProperty(
2071 Display
* /* display */,
2073 Atom
/* property */,
2077 _Xconst
unsigned char* /* data */,
2081 extern int XChangeSaveSet(
2082 Display
* /* display */,
2084 int /* change_mode */
2087 extern int XChangeWindowAttributes(
2088 Display
* /* display */,
2090 unsigned long /* valuemask */,
2091 XSetWindowAttributes
* /* attributes */
2094 extern Bool
XCheckIfEvent(
2095 Display
* /* display */,
2096 XEvent
* /* event_return */,
2098 Display
* /* display */,
2099 XEvent
* /* event */,
2105 extern Bool
XCheckMaskEvent(
2106 Display
* /* display */,
2107 long /* event_mask */,
2108 XEvent
* /* event_return */
2111 extern Bool
XCheckTypedEvent(
2112 Display
* /* display */,
2113 int /* event_type */,
2114 XEvent
* /* event_return */
2117 extern Bool
XCheckTypedWindowEvent(
2118 Display
* /* display */,
2120 int /* event_type */,
2121 XEvent
* /* event_return */
2124 extern Bool
XCheckWindowEvent(
2125 Display
* /* display */,
2127 long /* event_mask */,
2128 XEvent
* /* event_return */
2131 extern int XCirculateSubwindows(
2132 Display
* /* display */,
2137 extern int XCirculateSubwindowsDown(
2138 Display
* /* display */,
2142 extern int XCirculateSubwindowsUp(
2143 Display
* /* display */,
2147 extern int XClearArea(
2148 Display
* /* display */,
2152 unsigned int /* width */,
2153 unsigned int /* height */,
2154 Bool
/* exposures */
2157 extern int XClearWindow(
2158 Display
* /* display */,
2162 extern int XCloseDisplay(
2163 Display
* /* display */
2166 extern int XConfigureWindow(
2167 Display
* /* display */,
2169 unsigned int /* value_mask */,
2170 XWindowChanges
* /* values */
2173 extern int XConnectionNumber(
2174 Display
* /* display */
2177 extern int XConvertSelection(
2178 Display
* /* display */,
2179 Atom
/* selection */,
2181 Atom
/* property */,
2182 Window
/* requestor */,
2186 extern int XCopyArea(
2187 Display
* /* display */,
2189 Drawable
/* dest */,
2193 unsigned int /* width */,
2194 unsigned int /* height */,
2200 Display
* /* display */,
2202 unsigned long /* valuemask */,
2206 extern int XCopyPlane(
2207 Display
* /* display */,
2209 Drawable
/* dest */,
2213 unsigned int /* width */,
2214 unsigned int /* height */,
2217 unsigned long /* plane */
2220 extern int XDefaultDepth(
2221 Display
* /* display */,
2222 int /* screen_number */
2225 extern int XDefaultDepthOfScreen(
2226 Screen
* /* screen */
2229 extern int XDefaultScreen(
2230 Display
* /* display */
2233 extern int XDefineCursor(
2234 Display
* /* display */,
2239 extern int XDeleteProperty(
2240 Display
* /* display */,
2245 extern int XDestroyWindow(
2246 Display
* /* display */,
2250 extern int XDestroySubwindows(
2251 Display
* /* display */,
2255 extern int XDoesBackingStore(
2256 Screen
* /* screen */
2259 extern Bool
XDoesSaveUnders(
2260 Screen
* /* screen */
2263 extern int XDisableAccessControl(
2264 Display
* /* display */
2268 extern int XDisplayCells(
2269 Display
* /* display */,
2270 int /* screen_number */
2273 extern int XDisplayHeight(
2274 Display
* /* display */,
2275 int /* screen_number */
2278 extern int XDisplayHeightMM(
2279 Display
* /* display */,
2280 int /* screen_number */
2283 extern int XDisplayKeycodes(
2284 Display
* /* display */,
2285 int* /* min_keycodes_return */,
2286 int* /* max_keycodes_return */
2289 extern int XDisplayPlanes(
2290 Display
* /* display */,
2291 int /* screen_number */
2294 extern int XDisplayWidth(
2295 Display
* /* display */,
2296 int /* screen_number */
2299 extern int XDisplayWidthMM(
2300 Display
* /* display */,
2301 int /* screen_number */
2304 extern int XDrawArc(
2305 Display
* /* display */,
2310 unsigned int /* width */,
2311 unsigned int /* height */,
2316 extern int XDrawArcs(
2317 Display
* /* display */,
2324 extern int XDrawImageString(
2325 Display
* /* display */,
2330 _Xconst
char* /* string */,
2334 extern int XDrawImageString16(
2335 Display
* /* display */,
2340 _Xconst XChar2b
* /* string */,
2344 extern int XDrawLine(
2345 Display
* /* display */,
2354 extern int XDrawLines(
2355 Display
* /* display */,
2358 XPoint
* /* points */,
2363 extern int XDrawPoint(
2364 Display
* /* display */,
2371 extern int XDrawPoints(
2372 Display
* /* display */,
2375 XPoint
* /* points */,
2380 extern int XDrawRectangle(
2381 Display
* /* display */,
2386 unsigned int /* width */,
2387 unsigned int /* height */
2390 extern int XDrawRectangles(
2391 Display
* /* display */,
2394 XRectangle
* /* rectangles */,
2395 int /* nrectangles */
2398 extern int XDrawSegments(
2399 Display
* /* display */,
2402 XSegment
* /* segments */,
2406 extern int XDrawString(
2407 Display
* /* display */,
2412 _Xconst
char* /* string */,
2416 extern int XDrawString16(
2417 Display
* /* display */,
2422 _Xconst XChar2b
* /* string */,
2426 extern int XDrawText(
2427 Display
* /* display */,
2432 XTextItem
* /* items */,
2436 extern int XDrawText16(
2437 Display
* /* display */,
2442 XTextItem16
* /* items */,
2446 extern int XEnableAccessControl(
2447 Display
* /* display */
2450 extern int XEventsQueued(
2451 Display
* /* display */,
2455 extern Status
XFetchName(
2456 Display
* /* display */,
2458 char** /* window_name_return */
2461 extern int XFillArc(
2462 Display
* /* display */,
2467 unsigned int /* width */,
2468 unsigned int /* height */,
2473 extern int XFillArcs(
2474 Display
* /* display */,
2481 extern int XFillPolygon(
2482 Display
* /* display */,
2485 XPoint
* /* points */,
2491 extern int XFillRectangle(
2492 Display
* /* display */,
2497 unsigned int /* width */,
2498 unsigned int /* height */
2501 extern int XFillRectangles(
2502 Display
* /* display */,
2505 XRectangle
* /* rectangles */,
2506 int /* nrectangles */
2510 Display
* /* display */
2513 extern int XForceScreenSaver(
2514 Display
* /* display */,
2522 extern int XFreeColormap(
2523 Display
* /* display */,
2524 Colormap
/* colormap */
2527 extern int XFreeColors(
2528 Display
* /* display */,
2529 Colormap
/* colormap */,
2530 unsigned long* /* pixels */,
2532 unsigned long /* planes */
2535 extern int XFreeCursor(
2536 Display
* /* display */,
2540 extern int XFreeExtensionList(
2544 extern int XFreeFont(
2545 Display
* /* display */,
2546 XFontStruct
* /* font_struct */
2549 extern int XFreeFontInfo(
2551 XFontStruct
* /* free_info */,
2552 int /* actual_count */
2555 extern int XFreeFontNames(
2559 extern int XFreeFontPath(
2564 Display
* /* display */,
2568 extern int XFreeModifiermap(
2569 XModifierKeymap
* /* modmap */
2572 extern int XFreePixmap(
2573 Display
* /* display */,
2577 extern int XGeometry(
2578 Display
* /* display */,
2580 _Xconst
char* /* position */,
2581 _Xconst
char* /* default_position */,
2582 unsigned int /* bwidth */,
2583 unsigned int /* fwidth */,
2584 unsigned int /* fheight */,
2587 int* /* x_return */,
2588 int* /* y_return */,
2589 int* /* width_return */,
2590 int* /* height_return */
2593 extern int XGetErrorDatabaseText(
2594 Display
* /* display */,
2595 _Xconst
char* /* name */,
2596 _Xconst
char* /* message */,
2597 _Xconst
char* /* default_string */,
2598 char* /* buffer_return */,
2602 extern int XGetErrorText(
2603 Display
* /* display */,
2605 char* /* buffer_return */,
2609 extern Bool
XGetFontProperty(
2610 XFontStruct
* /* font_struct */,
2612 unsigned long* /* value_return */
2615 extern Status
XGetGCValues(
2616 Display
* /* display */,
2618 unsigned long /* valuemask */,
2619 XGCValues
* /* values_return */
2622 extern Status
XGetGeometry(
2623 Display
* /* display */,
2625 Window
* /* root_return */,
2626 int* /* x_return */,
2627 int* /* y_return */,
2628 unsigned int* /* width_return */,
2629 unsigned int* /* height_return */,
2630 unsigned int* /* border_width_return */,
2631 unsigned int* /* depth_return */
2634 extern Status
XGetIconName(
2635 Display
* /* display */,
2637 char** /* icon_name_return */
2640 extern int XGetInputFocus(
2641 Display
* /* display */,
2642 Window
* /* focus_return */,
2643 int* /* revert_to_return */
2646 extern int XGetKeyboardControl(
2647 Display
* /* display */,
2648 XKeyboardState
* /* values_return */
2651 extern int XGetPointerControl(
2652 Display
* /* display */,
2653 int* /* accel_numerator_return */,
2654 int* /* accel_denominator_return */,
2655 int* /* threshold_return */
2658 extern int XGetPointerMapping(
2659 Display
* /* display */,
2660 unsigned char* /* map_return */,
2664 extern int XGetScreenSaver(
2665 Display
* /* display */,
2666 int* /* timeout_return */,
2667 int* /* interval_return */,
2668 int* /* prefer_blanking_return */,
2669 int* /* allow_exposures_return */
2672 extern Status
XGetTransientForHint(
2673 Display
* /* display */,
2675 Window
* /* prop_window_return */
2678 extern int XGetWindowProperty(
2679 Display
* /* display */,
2681 Atom
/* property */,
2682 long /* long_offset */,
2683 long /* long_length */,
2685 Atom
/* req_type */,
2686 Atom
* /* actual_type_return */,
2687 int* /* actual_format_return */,
2688 unsigned long* /* nitems_return */,
2689 unsigned long* /* bytes_after_return */,
2690 unsigned char** /* prop_return */
2693 extern Status
XGetWindowAttributes(
2694 Display
* /* display */,
2696 XWindowAttributes
* /* window_attributes_return */
2699 extern int XGrabButton(
2700 Display
* /* display */,
2701 unsigned int /* button */,
2702 unsigned int /* modifiers */,
2703 Window
/* grab_window */,
2704 Bool
/* owner_events */,
2705 unsigned int /* event_mask */,
2706 int /* pointer_mode */,
2707 int /* keyboard_mode */,
2708 Window
/* confine_to */,
2712 extern int XGrabKey(
2713 Display
* /* display */,
2715 unsigned int /* modifiers */,
2716 Window
/* grab_window */,
2717 Bool
/* owner_events */,
2718 int /* pointer_mode */,
2719 int /* keyboard_mode */
2722 extern int XGrabKeyboard(
2723 Display
* /* display */,
2724 Window
/* grab_window */,
2725 Bool
/* owner_events */,
2726 int /* pointer_mode */,
2727 int /* keyboard_mode */,
2731 extern int XGrabPointer(
2732 Display
* /* display */,
2733 Window
/* grab_window */,
2734 Bool
/* owner_events */,
2735 unsigned int /* event_mask */,
2736 int /* pointer_mode */,
2737 int /* keyboard_mode */,
2738 Window
/* confine_to */,
2739 Cursor
/* cursor */,
2743 extern int XGrabServer(
2744 Display
* /* display */
2747 extern int XHeightMMOfScreen(
2748 Screen
* /* screen */
2751 extern int XHeightOfScreen(
2752 Screen
* /* screen */
2755 extern int XIfEvent(
2756 Display
* /* display */,
2757 XEvent
* /* event_return */,
2759 Display
* /* display */,
2760 XEvent
* /* event */,
2766 extern int XImageByteOrder(
2767 Display
* /* display */
2770 extern int XInstallColormap(
2771 Display
* /* display */,
2772 Colormap
/* colormap */
2775 extern KeyCode
XKeysymToKeycode(
2776 Display
* /* display */,
2780 extern int XKillClient(
2781 Display
* /* display */,
2785 extern Status
XLookupColor(
2786 Display
* /* display */,
2787 Colormap
/* colormap */,
2788 _Xconst
char* /* color_name */,
2789 XColor
* /* exact_def_return */,
2790 XColor
* /* screen_def_return */
2793 extern int XLowerWindow(
2794 Display
* /* display */,
2798 extern int XMapRaised(
2799 Display
* /* display */,
2803 extern int XMapSubwindows(
2804 Display
* /* display */,
2808 extern int XMapWindow(
2809 Display
* /* display */,
2813 extern int XMaskEvent(
2814 Display
* /* display */,
2815 long /* event_mask */,
2816 XEvent
* /* event_return */
2819 extern int XMaxCmapsOfScreen(
2820 Screen
* /* screen */
2823 extern int XMinCmapsOfScreen(
2824 Screen
* /* screen */
2827 extern int XMoveResizeWindow(
2828 Display
* /* display */,
2832 unsigned int /* width */,
2833 unsigned int /* height */
2836 extern int XMoveWindow(
2837 Display
* /* display */,
2843 extern int XNextEvent(
2844 Display
* /* display */,
2845 XEvent
* /* event_return */
2849 Display
* /* display */
2852 extern Status
XParseColor(
2853 Display
* /* display */,
2854 Colormap
/* colormap */,
2855 _Xconst
char* /* spec */,
2856 XColor
* /* exact_def_return */
2859 extern int XParseGeometry(
2860 _Xconst
char* /* parsestring */,
2861 int* /* x_return */,
2862 int* /* y_return */,
2863 unsigned int* /* width_return */,
2864 unsigned int* /* height_return */
2867 extern int XPeekEvent(
2868 Display
* /* display */,
2869 XEvent
* /* event_return */
2872 extern int XPeekIfEvent(
2873 Display
* /* display */,
2874 XEvent
* /* event_return */,
2876 Display
* /* display */,
2877 XEvent
* /* event */,
2883 extern int XPending(
2884 Display
* /* display */
2887 extern int XPlanesOfScreen(
2888 Screen
* /* screen */
2891 extern int XProtocolRevision(
2892 Display
* /* display */
2895 extern int XProtocolVersion(
2896 Display
* /* display */
2900 extern int XPutBackEvent(
2901 Display
* /* display */,
2905 extern int XPutImage(
2906 Display
* /* display */,
2909 XImage
* /* image */,
2914 unsigned int /* width */,
2915 unsigned int /* height */
2918 extern int XQLength(
2919 Display
* /* display */
2922 extern Status
XQueryBestCursor(
2923 Display
* /* display */,
2925 unsigned int /* width */,
2926 unsigned int /* height */,
2927 unsigned int* /* width_return */,
2928 unsigned int* /* height_return */
2931 extern Status
XQueryBestSize(
2932 Display
* /* display */,
2934 Drawable
/* which_screen */,
2935 unsigned int /* width */,
2936 unsigned int /* height */,
2937 unsigned int* /* width_return */,
2938 unsigned int* /* height_return */
2941 extern Status
XQueryBestStipple(
2942 Display
* /* display */,
2943 Drawable
/* which_screen */,
2944 unsigned int /* width */,
2945 unsigned int /* height */,
2946 unsigned int* /* width_return */,
2947 unsigned int* /* height_return */
2950 extern Status
XQueryBestTile(
2951 Display
* /* display */,
2952 Drawable
/* which_screen */,
2953 unsigned int /* width */,
2954 unsigned int /* height */,
2955 unsigned int* /* width_return */,
2956 unsigned int* /* height_return */
2959 extern int XQueryColor(
2960 Display
* /* display */,
2961 Colormap
/* colormap */,
2962 XColor
* /* def_in_out */
2965 extern int XQueryColors(
2966 Display
* /* display */,
2967 Colormap
/* colormap */,
2968 XColor
* /* defs_in_out */,
2972 extern Bool
XQueryExtension(
2973 Display
* /* display */,
2974 _Xconst
char* /* name */,
2975 int* /* major_opcode_return */,
2976 int* /* first_event_return */,
2977 int* /* first_error_return */
2980 extern int XQueryKeymap(
2981 Display
* /* display */,
2982 char [32] /* keys_return */
2985 extern Bool
XQueryPointer(
2986 Display
* /* display */,
2988 Window
* /* root_return */,
2989 Window
* /* child_return */,
2990 int* /* root_x_return */,
2991 int* /* root_y_return */,
2992 int* /* win_x_return */,
2993 int* /* win_y_return */,
2994 unsigned int* /* mask_return */
2997 extern int XQueryTextExtents(
2998 Display
* /* display */,
3000 _Xconst
char* /* string */,
3002 int* /* direction_return */,
3003 int* /* font_ascent_return */,
3004 int* /* font_descent_return */,
3005 XCharStruct
* /* overall_return */
3008 extern int XQueryTextExtents16(
3009 Display
* /* display */,
3011 _Xconst XChar2b
* /* string */,
3013 int* /* direction_return */,
3014 int* /* font_ascent_return */,
3015 int* /* font_descent_return */,
3016 XCharStruct
* /* overall_return */
3019 extern Status
XQueryTree(
3020 Display
* /* display */,
3022 Window
* /* root_return */,
3023 Window
* /* parent_return */,
3024 Window
** /* children_return */,
3025 unsigned int* /* nchildren_return */
3028 extern int XRaiseWindow(
3029 Display
* /* display */,
3033 extern int XReadBitmapFile(
3034 Display
* /* display */,
3036 _Xconst
char* /* filename */,
3037 unsigned int* /* width_return */,
3038 unsigned int* /* height_return */,
3039 Pixmap
* /* bitmap_return */,
3040 int* /* x_hot_return */,
3041 int* /* y_hot_return */
3044 extern int XReadBitmapFileData(
3045 _Xconst
char* /* filename */,
3046 unsigned int* /* width_return */,
3047 unsigned int* /* height_return */,
3048 unsigned char** /* data_return */,
3049 int* /* x_hot_return */,
3050 int* /* y_hot_return */
3053 extern int XRebindKeysym(
3054 Display
* /* display */,
3055 KeySym
/* keysym */,
3057 int /* mod_count */,
3058 _Xconst
unsigned char* /* string */,
3059 int /* bytes_string */
3062 extern int XRecolorCursor(
3063 Display
* /* display */,
3064 Cursor
/* cursor */,
3065 XColor
* /* foreground_color */,
3066 XColor
* /* background_color */
3069 extern int XRefreshKeyboardMapping(
3070 XMappingEvent
* /* event_map */
3073 extern int XRemoveFromSaveSet(
3074 Display
* /* display */,
3078 extern int XRemoveHost(
3079 Display
* /* display */,
3080 XHostAddress
* /* host */
3083 extern int XRemoveHosts(
3084 Display
* /* display */,
3085 XHostAddress
* /* hosts */,
3089 extern int XReparentWindow(
3090 Display
* /* display */,
3092 Window
/* parent */,
3097 extern int XResetScreenSaver(
3098 Display
* /* display */
3101 extern int XResizeWindow(
3102 Display
* /* display */,
3104 unsigned int /* width */,
3105 unsigned int /* height */
3108 extern int XRestackWindows(
3109 Display
* /* display */,
3110 Window
* /* windows */,
3114 extern int XRotateBuffers(
3115 Display
* /* display */,
3119 extern int XRotateWindowProperties(
3120 Display
* /* display */,
3122 Atom
* /* properties */,
3124 int /* npositions */
3127 extern int XScreenCount(
3128 Display
* /* display */
3131 extern int XSelectInput(
3132 Display
* /* display */,
3134 long /* event_mask */
3137 extern Status
XSendEvent(
3138 Display
* /* display */,
3140 Bool
/* propagate */,
3141 long /* event_mask */,
3142 XEvent
* /* event_send */
3145 extern int XSetAccessControl(
3146 Display
* /* display */,
3150 extern int XSetArcMode(
3151 Display
* /* display */,
3156 extern int XSetBackground(
3157 Display
* /* display */,
3159 unsigned long /* background */
3162 extern int XSetClipMask(
3163 Display
* /* display */,
3168 extern int XSetClipOrigin(
3169 Display
* /* display */,
3171 int /* clip_x_origin */,
3172 int /* clip_y_origin */
3175 extern int XSetClipRectangles(
3176 Display
* /* display */,
3178 int /* clip_x_origin */,
3179 int /* clip_y_origin */,
3180 XRectangle
* /* rectangles */,
3185 extern int XSetCloseDownMode(
3186 Display
* /* display */,
3187 int /* close_mode */
3190 extern int XSetCommand(
3191 Display
* /* display */,
3197 extern int XSetDashes(
3198 Display
* /* display */,
3200 int /* dash_offset */,
3201 _Xconst
char* /* dash_list */,
3205 extern int XSetFillRule(
3206 Display
* /* display */,
3211 extern int XSetFillStyle(
3212 Display
* /* display */,
3214 int /* fill_style */
3217 extern int XSetFont(
3218 Display
* /* display */,
3223 extern int XSetFontPath(
3224 Display
* /* display */,
3225 char** /* directories */,
3229 extern int XSetForeground(
3230 Display
* /* display */,
3232 unsigned long /* foreground */
3235 extern int XSetFunction(
3236 Display
* /* display */,
3241 extern int XSetGraphicsExposures(
3242 Display
* /* display */,
3244 Bool
/* graphics_exposures */
3247 extern int XSetIconName(
3248 Display
* /* display */,
3250 _Xconst
char* /* icon_name */
3253 extern int XSetInputFocus(
3254 Display
* /* display */,
3256 int /* revert_to */,
3260 extern int XSetLineAttributes(
3261 Display
* /* display */,
3263 unsigned int /* line_width */,
3264 int /* line_style */,
3265 int /* cap_style */,
3266 int /* join_style */
3269 extern int XSetModifierMapping(
3270 Display
* /* display */,
3271 XModifierKeymap
* /* modmap */
3274 extern int XSetPlaneMask(
3275 Display
* /* display */,
3277 unsigned long /* plane_mask */
3280 extern int XSetPointerMapping(
3281 Display
* /* display */,
3282 _Xconst
unsigned char* /* map */,
3286 extern int XSetScreenSaver(
3287 Display
* /* display */,
3290 int /* prefer_blanking */,
3291 int /* allow_exposures */
3294 extern int XSetSelectionOwner(
3295 Display
* /* display */,
3296 Atom
/* selection */,
3301 extern int XSetState(
3302 Display
* /* display */,
3304 unsigned long /* foreground */,
3305 unsigned long /* background */,
3307 unsigned long /* plane_mask */
3310 extern int XSetStipple(
3311 Display
* /* display */,
3313 Pixmap
/* stipple */
3316 extern int XSetSubwindowMode(
3317 Display
* /* display */,
3319 int /* subwindow_mode */
3322 extern int XSetTSOrigin(
3323 Display
* /* display */,
3325 int /* ts_x_origin */,
3326 int /* ts_y_origin */
3329 extern int XSetTile(
3330 Display
* /* display */,
3335 extern int XSetWindowBackground(
3336 Display
* /* display */,
3338 unsigned long /* background_pixel */
3341 extern int XSetWindowBackgroundPixmap(
3342 Display
* /* display */,
3344 Pixmap
/* background_pixmap */
3347 extern int XSetWindowBorder(
3348 Display
* /* display */,
3350 unsigned long /* border_pixel */
3353 extern int XSetWindowBorderPixmap(
3354 Display
* /* display */,
3356 Pixmap
/* border_pixmap */
3359 extern int XSetWindowBorderWidth(
3360 Display
* /* display */,
3362 unsigned int /* width */
3365 extern int XSetWindowColormap(
3366 Display
* /* display */,
3368 Colormap
/* colormap */
3371 extern int XStoreBuffer(
3372 Display
* /* display */,
3373 _Xconst
char* /* bytes */,
3378 extern int XStoreBytes(
3379 Display
* /* display */,
3380 _Xconst
char* /* bytes */,
3384 extern int XStoreColor(
3385 Display
* /* display */,
3386 Colormap
/* colormap */,
3390 extern int XStoreColors(
3391 Display
* /* display */,
3392 Colormap
/* colormap */,
3393 XColor
* /* color */,
3397 extern int XStoreName(
3398 Display
* /* display */,
3400 _Xconst
char* /* window_name */
3403 extern int XStoreNamedColor(
3404 Display
* /* display */,
3405 Colormap
/* colormap */,
3406 _Xconst
char* /* color */,
3407 unsigned long /* pixel */,
3412 Display
* /* display */,
3416 extern int XTextExtents(
3417 XFontStruct
* /* font_struct */,
3418 _Xconst
char* /* string */,
3420 int* /* direction_return */,
3421 int* /* font_ascent_return */,
3422 int* /* font_descent_return */,
3423 XCharStruct
* /* overall_return */
3426 extern int XTextExtents16(
3427 XFontStruct
* /* font_struct */,
3428 _Xconst XChar2b
* /* string */,
3430 int* /* direction_return */,
3431 int* /* font_ascent_return */,
3432 int* /* font_descent_return */,
3433 XCharStruct
* /* overall_return */
3436 extern int XTextWidth(
3437 XFontStruct
* /* font_struct */,
3438 _Xconst
char* /* string */,
3442 extern int XTextWidth16(
3443 XFontStruct
* /* font_struct */,
3444 _Xconst XChar2b
* /* string */,
3448 extern Bool
XTranslateCoordinates(
3449 Display
* /* display */,
3451 Window
/* dest_w */,
3454 int* /* dest_x_return */,
3455 int* /* dest_y_return */,
3456 Window
* /* child_return */
3459 extern int XUndefineCursor(
3460 Display
* /* display */,
3464 extern int XUngrabButton(
3465 Display
* /* display */,
3466 unsigned int /* button */,
3467 unsigned int /* modifiers */,
3468 Window
/* grab_window */
3471 extern int XUngrabKey(
3472 Display
* /* display */,
3474 unsigned int /* modifiers */,
3475 Window
/* grab_window */
3478 extern int XUngrabKeyboard(
3479 Display
* /* display */,
3483 extern int XUngrabPointer(
3484 Display
* /* display */,
3488 extern int XUngrabServer(
3489 Display
* /* display */
3492 extern int XUninstallColormap(
3493 Display
* /* display */,
3494 Colormap
/* colormap */
3497 extern int XUnloadFont(
3498 Display
* /* display */,
3502 extern int XUnmapSubwindows(
3503 Display
* /* display */,
3507 extern int XUnmapWindow(
3508 Display
* /* display */,
3512 extern int XVendorRelease(
3513 Display
* /* display */
3516 extern int XWarpPointer(
3517 Display
* /* display */,
3519 Window
/* dest_w */,
3522 unsigned int /* src_width */,
3523 unsigned int /* src_height */,
3528 extern int XWidthMMOfScreen(
3529 Screen
* /* screen */
3532 extern int XWidthOfScreen(
3533 Screen
* /* screen */
3536 extern int XWindowEvent(
3537 Display
* /* display */,
3539 long /* event_mask */,
3540 XEvent
* /* event_return */
3543 extern int XWriteBitmapFile(
3544 Display
* /* display */,
3545 _Xconst
char* /* filename */,
3546 Pixmap
/* bitmap */,
3547 unsigned int /* width */,
3548 unsigned int /* height */,
3553 extern Bool
XSupportsLocale (void);
3555 extern char *XSetLocaleModifiers(
3556 const char* /* modifier_list */
3560 Display
* /* display */,
3561 struct _XrmHashBucketRec
* /* rdb */,
3562 _Xconst
char* /* res_name */,
3563 _Xconst
char* /* res_class */
3566 extern Status
XCloseOM(
3570 extern char *XSetOMValues(
3575 extern char *XGetOMValues(
3580 extern Display
*XDisplayOfOM(
3584 extern char *XLocaleOfOM(
3588 extern XOC
XCreateOC(
3593 extern void XDestroyOC(
3601 extern char *XSetOCValues(
3606 extern char *XGetOCValues(
3611 extern XFontSet
XCreateFontSet(
3612 Display
* /* display */,
3613 _Xconst
char* /* base_font_name_list */,
3614 char*** /* missing_charset_list */,
3615 int* /* missing_charset_count */,
3616 char** /* def_string */
3619 extern void XFreeFontSet(
3620 Display
* /* display */,
3621 XFontSet
/* font_set */
3624 extern int XFontsOfFontSet(
3625 XFontSet
/* font_set */,
3626 XFontStruct
*** /* font_struct_list */,
3627 char*** /* font_name_list */
3630 extern char *XBaseFontNameListOfFontSet(
3631 XFontSet
/* font_set */
3634 extern char *XLocaleOfFontSet(
3635 XFontSet
/* font_set */
3638 extern Bool
XContextDependentDrawing(
3639 XFontSet
/* font_set */
3642 extern Bool
XDirectionalDependentDrawing(
3643 XFontSet
/* font_set */
3646 extern Bool
XContextualDrawing(
3647 XFontSet
/* font_set */
3650 extern XFontSetExtents
*XExtentsOfFontSet(
3651 XFontSet
/* font_set */
3654 extern int XmbTextEscapement(
3655 XFontSet
/* font_set */,
3656 _Xconst
char* /* text */,
3657 int /* bytes_text */
3660 extern int XwcTextEscapement(
3661 XFontSet
/* font_set */,
3662 _Xconst
wchar_t* /* text */,
3663 int /* num_wchars */
3666 extern int Xutf8TextEscapement(
3667 XFontSet
/* font_set */,
3668 _Xconst
char* /* text */,
3669 int /* bytes_text */
3672 extern int XmbTextExtents(
3673 XFontSet
/* font_set */,
3674 _Xconst
char* /* text */,
3675 int /* bytes_text */,
3676 XRectangle
* /* overall_ink_return */,
3677 XRectangle
* /* overall_logical_return */
3680 extern int XwcTextExtents(
3681 XFontSet
/* font_set */,
3682 _Xconst
wchar_t* /* text */,
3683 int /* num_wchars */,
3684 XRectangle
* /* overall_ink_return */,
3685 XRectangle
* /* overall_logical_return */
3688 extern int Xutf8TextExtents(
3689 XFontSet
/* font_set */,
3690 _Xconst
char* /* text */,
3691 int /* bytes_text */,
3692 XRectangle
* /* overall_ink_return */,
3693 XRectangle
* /* overall_logical_return */
3696 extern Status
XmbTextPerCharExtents(
3697 XFontSet
/* font_set */,
3698 _Xconst
char* /* text */,
3699 int /* bytes_text */,
3700 XRectangle
* /* ink_extents_buffer */,
3701 XRectangle
* /* logical_extents_buffer */,
3702 int /* buffer_size */,
3703 int* /* num_chars */,
3704 XRectangle
* /* overall_ink_return */,
3705 XRectangle
* /* overall_logical_return */
3708 extern Status
XwcTextPerCharExtents(
3709 XFontSet
/* font_set */,
3710 _Xconst
wchar_t* /* text */,
3711 int /* num_wchars */,
3712 XRectangle
* /* ink_extents_buffer */,
3713 XRectangle
* /* logical_extents_buffer */,
3714 int /* buffer_size */,
3715 int* /* num_chars */,
3716 XRectangle
* /* overall_ink_return */,
3717 XRectangle
* /* overall_logical_return */
3720 extern Status
Xutf8TextPerCharExtents(
3721 XFontSet
/* font_set */,
3722 _Xconst
char* /* text */,
3723 int /* bytes_text */,
3724 XRectangle
* /* ink_extents_buffer */,
3725 XRectangle
* /* logical_extents_buffer */,
3726 int /* buffer_size */,
3727 int* /* num_chars */,
3728 XRectangle
* /* overall_ink_return */,
3729 XRectangle
* /* overall_logical_return */
3732 extern void XmbDrawText(
3733 Display
* /* display */,
3738 XmbTextItem
* /* text_items */,
3742 extern void XwcDrawText(
3743 Display
* /* display */,
3748 XwcTextItem
* /* text_items */,
3752 extern void Xutf8DrawText(
3753 Display
* /* display */,
3758 XmbTextItem
* /* text_items */,
3762 extern void XmbDrawString(
3763 Display
* /* display */,
3765 XFontSet
/* font_set */,
3769 _Xconst
char* /* text */,
3770 int /* bytes_text */
3773 extern void XwcDrawString(
3774 Display
* /* display */,
3776 XFontSet
/* font_set */,
3780 _Xconst
wchar_t* /* text */,
3781 int /* num_wchars */
3784 extern void Xutf8DrawString(
3785 Display
* /* display */,
3787 XFontSet
/* font_set */,
3791 _Xconst
char* /* text */,
3792 int /* bytes_text */
3795 extern void XmbDrawImageString(
3796 Display
* /* display */,
3798 XFontSet
/* font_set */,
3802 _Xconst
char* /* text */,
3803 int /* bytes_text */
3806 extern void XwcDrawImageString(
3807 Display
* /* display */,
3809 XFontSet
/* font_set */,
3813 _Xconst
wchar_t* /* text */,
3814 int /* num_wchars */
3817 extern void Xutf8DrawImageString(
3818 Display
* /* display */,
3820 XFontSet
/* font_set */,
3824 _Xconst
char* /* text */,
3825 int /* bytes_text */
3830 struct _XrmHashBucketRec
* /* rdb */,
3831 char* /* res_name */,
3832 char* /* res_class */
3835 extern Status
XCloseIM(
3839 extern char *XGetIMValues(
3843 extern char *XSetIMValues(
3847 extern Display
*XDisplayOfIM(
3851 extern char *XLocaleOfIM(
3855 extern XIC
XCreateIC(
3859 extern void XDestroyIC(
3863 extern void XSetICFocus(
3867 extern void XUnsetICFocus(
3871 extern wchar_t *XwcResetIC(
3875 extern char *XmbResetIC(
3879 extern char *Xutf8ResetIC(
3883 extern char *XSetICValues(
3887 extern char *XGetICValues(
3895 extern Bool
XFilterEvent(
3896 XEvent
* /* event */,
3900 extern int XmbLookupString(
3902 XKeyPressedEvent
* /* event */,
3903 char* /* buffer_return */,
3904 int /* bytes_buffer */,
3905 KeySym
* /* keysym_return */,
3906 Status
* /* status_return */
3909 extern int XwcLookupString(
3911 XKeyPressedEvent
* /* event */,
3912 wchar_t* /* buffer_return */,
3913 int /* wchars_buffer */,
3914 KeySym
* /* keysym_return */,
3915 Status
* /* status_return */
3918 extern int Xutf8LookupString(
3920 XKeyPressedEvent
* /* event */,
3921 char* /* buffer_return */,
3922 int /* bytes_buffer */,
3923 KeySym
* /* keysym_return */,
3924 Status
* /* status_return */
3927 extern XVaNestedList
XVaCreateNestedList(
3931 /* internal connections for IMs */
3933 extern Bool
XRegisterIMInstantiateCallback(
3935 struct _XrmHashBucketRec
* /* rdb */,
3936 char* /* res_name */,
3937 char* /* res_class */,
3938 XIDProc
/* callback */,
3939 XPointer
/* client_data */
3942 extern Bool
XUnregisterIMInstantiateCallback(
3944 struct _XrmHashBucketRec
* /* rdb */,
3945 char* /* res_name */,
3946 char* /* res_class */,
3947 XIDProc
/* callback */,
3948 XPointer
/* client_data */
3951 typedef void (*XConnectionWatchProc
)(
3953 XPointer
/* client_data */,
3955 Bool
/* opening */, /* open or close flag */
3956 XPointer
* /* watch_data */ /* open sets, close uses */
3960 extern Status
XInternalConnectionNumbers(
3962 int** /* fd_return */,
3963 int* /* count_return */
3966 extern void XProcessInternalConnection(
3971 extern Status
XAddConnectionWatch(
3973 XConnectionWatchProc
/* callback */,
3974 XPointer
/* client_data */
3977 extern void XRemoveConnectionWatch(
3979 XConnectionWatchProc
/* callback */,
3980 XPointer
/* client_data */
3983 extern void XSetAuthorization(
3990 extern int _Xmbtowc(
3991 wchar_t * /* wstr */,
3993 char const * /* str */,
4001 extern int _Xwctomb(
4008 #endif /* _XLIB_H_ */