1 module iv
.x11
.xlib
/*is aliced*/;
4 import core
.stdc
.config
: c_long
, c_ulong
;
5 import core
.stdc
.stddef
: wchar_t
;
14 alias XIOErrorHandler
= int function ( /* WARNING, this type not in Xlib spec */
19 @trusted nothrow @nogc:
21 enum int XlibSpecificationRelease
= 6;
22 enum int X_HAVE_UTF8_STRING
= 1;
24 alias XPointer
= char*;
30 alias QueueMode
= int;
37 int ConnectionNumber() (Display
* dpy
) { return dpy
.fd
; }
38 Window
RootWindow() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).root
; }
39 int DefaultScreen() (Display
* dpy
) { return dpy
.default_screen
; }
40 Window
DefaultRootWindow() (Display
* dpy
) { return ScreenOfDisplay( dpy
,DefaultScreen( dpy
) ).root
; }
41 Visual
* DefaultVisual() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).root_visual
; }
42 GC
DefaultGC() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).default_gc
; }
43 uint BlackPixel() (Display
* dpy
,int scr
) { return cast(uint)ScreenOfDisplay( dpy
,scr
).black_pixel
; }
44 uint WhitePixel() (Display
* dpy
,int scr
) { return cast(uint)ScreenOfDisplay( dpy
,scr
).white_pixel
; }
45 c_ulong
AllPlanes() ( ) { return 0xFFFFFFFF; }
46 int QLength() (Display
* dpy
) { return dpy
.qlen
; }
47 int DisplayWidth() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).width
; }
48 int DisplayHeight() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).height
; }
49 int DisplayWidthMM() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).mwidth
; }
50 int DisplayHeightMM() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).mheight
; }
51 int DisplayPlanes() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).root_depth
; }
52 int DisplayCells() (Display
* dpy
,int scr
) { return DefaultVisual( dpy
,scr
).map_entries
; }
53 int ScreenCount() (Display
* dpy
) { return dpy
.nscreens
; }
54 const(char)* ServerVendor() (Display
* dpy
) { return dpy
.vendor
; }
55 int ProtocolVersion() (Display
* dpy
) { return dpy
.proto_major_version
; }
56 int ProtocolRevision() (Display
* dpy
) { return dpy
.proto_minor_version
; }
57 int VendorRelease() (Display
* dpy
) { return dpy
.release
; }
58 const(char)* DisplayString() (Display
* dpy
) { return dpy
.display_name
; }
59 int DefaultDepth() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).root_depth
; }
60 Colormap
DefaultColormap() (Display
* dpy
,int scr
) { return ScreenOfDisplay( dpy
,scr
).cmap
; }
61 int BitmapUnit() (Display
* dpy
) { return dpy
.bitmap_unit
; }
62 int BitmapBitOrder() (Display
* dpy
) { return dpy
.bitmap_bit_order
; }
63 int BitmapPad() (Display
* dpy
) { return dpy
.bitmap_pad
; }
64 int ImagecharOrder() (Display
* dpy
) { return dpy
.char_order
; }
65 uint NextRequest() (Display
* dpy
) { return cast(uint)dpy
.request
+ 1; }
66 uint LastKnownRequestProcessed() (Display
* dpy
) { return cast(uint)dpy
.last_request_read
; }
68 /* macros for screen oriented applications ( toolkit ) */
69 Screen
* ScreenOfDisplay() (Display
* dpy
,int scr
) { return &dpy
.screens
[scr
]; }
70 Screen
* DefaultScreenOfDisplay() (Display
* dpy
) { return ScreenOfDisplay( dpy
,DefaultScreen( dpy
) ); }
71 Display
* DisplayOfScreen() (Screen
* s
) { return s
.display
; }
72 Window
RootWindowOfScreen() (Screen
* s
) { return s
.root
; }
73 uint BlackPixelOfScreen() (Screen
* s
) { return cast(uint)s
.black_pixel
; }
74 uint WhitePixelOfScreen() (Screen
* s
) { return cast(uint)s
.white_pixel
; }
75 Colormap
DefaultColormapOfScreen() (Screen
* s
) { return s
.cmap
; }
76 int DefaultDepthOfScreen() (Screen
* s
) { return s
.root_depth
; }
77 GC
DefaultGCOfScreen() (Screen
* s
) { return s
.default_gc
; }
78 Visual
* DefaultVisualOfScreen() (Screen
* s
) { return s
.root_visual
; }
79 int WidthOfScreen() (Screen
* s
) { return s
.width
; }
80 int HeightOfScreen() (Screen
* s
) { return s
.height
; }
81 int WidthMMOfScreen() (Screen
* s
) { return s
.mwidth
; }
82 int HeightMMOfScreen() (Screen
* s
) { return s
.mheight
; }
83 int PlanesOfScreen() (Screen
* s
) { return s
.root_depth
; }
84 int CellsOfScreen() (Screen
* s
) { return DefaultVisualOfScreen( s
).map_entries
; }
85 int MinCmapsOfScreen() (Screen
* s
) { return s
.min_maps
; }
86 int MaxCmapsOfScreen() (Screen
* s
) { return s
.max_maps
; }
87 Bool
DoesSaveUnders() (Screen
* s
) { return s
.save_unders
; }
88 int DoesBackingStore() (Screen
* s
) { return s
.backing_store
; }
89 long EventMaskOfScreen() (Screen
* s
) { return s
.root_input_mask
; }
92 * Extensions need a way to hang private data on some structures.
95 int number
; /* number returned by XRegisterExtension */
96 XExtData
* next
; /* next item on list of data for structure */
97 extern(C
) @trusted nothrow @nogc int function (XExtData
*extension
) free_private
; /* called to free private storage */
98 XPointer private_data
; /* data private to this extension. */
102 * This file contains structures used by the extension mechanism.
104 /* public to extension, cannot be changed */
106 int extension
; /* extension number */
107 int major_opcode
; /* major op-code assigned by server */
108 int first_event
; /* first event number for the extension */
109 int first_error
; /* first error number for the extension */
113 * Data structure for retrieving info about pixmap formats.
115 struct XPixmapFormatValues
{
122 * Data structure for setting graphics context.
125 int func
; /* logical operation */
126 c_ulong plane_mask
; /* plane mask */
127 c_ulong foreground
; /* foreground pixel */
128 c_ulong background
; /* background pixel */
129 int line_width
; /* line width */
130 int line_style
; /* LineSolid; LineOnOffDash; LineDoubleDash */
131 int cap_style
; /* CapNotLast; CapButt; CapRound; CapProjecting */
132 int join_style
; /* JoinMiter; JoinRound; JoinBevel */
133 int fill_style
; /* FillSolid; FillTiled; FillStippled; FillOpaeueStippled */
134 int fill_rule
; /* EvenOddRule; WindingRule */
135 int arc_mode
; /* ArcChord; ArcPieSlice */
136 Pixmap tile
; /* tile pixmap for tiling operations */
137 Pixmap stipple
; /* stipple 1 plane pixmap for stipping */
138 int ts_x_origin
; /* offset for tile or stipple operations */
140 Font font
; /* default text font for text operations */
141 int subwindow_mode
; /* ClipByChildren; IncludeInferiors */
142 Bool graphics_exposures
; /* boolean; should exposures be generated */
143 int clip_x_origin
; /* origin for clipping */
145 Pixmap clip_mask
; /* bitmap clipping; other calls for rects */
146 int dash_offset
; /* patterned/dashed line information */
149 version (XLIB_ILLEGAL_ACCESS
) {
151 XExtData
* ext_data
; /* hook for extension to hang data */
152 GContext gid
; /* protocol ID for graphics context */
153 /* there is more to this structure, but it is private to Xlib */
162 * Visual structure; contains information about colormapping possible.
165 XExtData
* ext_data
; /* hook for extension to hang data */
166 VisualID visualid
; /* visual id of this visual */
167 int c_class
; /* class of screen (monochrome, etc.) */
168 c_ulong red_mask
, green_mask
, blue_mask
; /* mask values */
169 int bits_per_rgb
; /* log base 2 of distinct color values */
170 int map_entries
; /* color map entries */
174 * Depth structure; contains information for each possible depth.
177 int depth
; /* this depth (Z) of the depth */
178 int nvisuals
; /* number of Visual types at this depth */
179 Visual
* visuals
; /* list of visuals possible at this depth */
182 alias XDisplay
= Display
;
185 XExtData
* ext_data
; /* hook for extension to hang data */
186 XDisplay
* display
; /* back pointer to display structure */
187 Window root
; /* Root window id. */
188 int width
, height
; /* width and height of screen */
189 int mwidth
, mheight
; /* width and height of in millimeters */
190 int ndepths
; /* number of depths possible */
191 Depth
* depths
; /* list of allowable depths on the screen */
192 int root_depth
; /* bits per pixel */
193 Visual
* root_visual
; /* root visual */
194 GC default_gc
; /* GC for the root root visual */
195 Colormap cmap
; /* default color map */
197 c_ulong black_pixel
; /* White and Black pixel values */
198 int max_maps
, min_maps
; /* max and min color maps */
199 int backing_store
; /* Never, WhenMapped, Always */
201 c_long root_input_mask
; /* initial root input mask */
205 * Format structure; describes ZFormat data the screen will understand.
207 struct ScreenFormat
{
208 XExtData
* ext_data
; /* hook for extension to hang data */
209 int depth
; /* depth of this image format */
210 int bits_per_pixel
; /* bits/pixel at this depth */
211 int scanline_pad
; /* scanline must padded to this multiple */
215 * Data structure for setting window attributes.
217 struct XSetWindowAttributes
{
218 Pixmap background_pixmap
; /* background or None or ParentRelative */
219 c_ulong background_pixel
; /* background pixel */
220 Pixmap border_pixmap
; /* border of the window */
221 c_ulong border_pixel
; /* border pixel value */
222 int bit_gravity
; /* one of bit gravity values */
223 int win_gravity
; /* one of the window gravity values */
224 int backing_store
; /* NotUseful, WhenMapped, Always */
225 c_ulong backing_planes
; /* planes to be preseved if possible */
226 c_ulong backing_pixel
; /* value to use in restoring planes */
227 Bool save_under
; /* should bits under be saved? (popups) */
228 c_long event_mask
; /* set of events that should be saved */
229 c_long do_not_propagate_mask
; /* set of events that should not propagate */
230 Bool override_redirect
; /* boolean value for override-redirect */
231 Colormap colormap
; /* color map to be associated with window */
232 Cursor cursor
; /* cursor to be displayed (or None) */
235 struct XWindowAttributes
{
236 int x
, y
; /* location of window */
237 int width
, height
; /* width and height of window */
238 int border_width
; /* border width of window */
239 int depth
; /* depth of window */
240 Visual
* visual
; /* the associated visual structure */
241 Window root
; /* root of screen containing window */
242 int c_class
; /* InputOutput, InputOnly */
243 int bit_gravity
; /* one of bit gravity values */
244 int win_gravity
; /* one of the window gravity values */
245 int backing_store
; /* NotUseful, WhenMapped, Always */
246 c_ulong backing_planes
; /* planes to be preserved if possible */
247 c_ulong backing_pixel
; /* value to be used when restoring planes */
248 Bool save_under
; /* boolean, should bits under be saved? */
249 Colormap colormap
; /* color map to be associated with window */
250 Bool map_installed
; /* boolean, is color map currently installed */
251 int map_state
; /* IsUnmapped, IsUnviewable, IsViewable */
252 c_long all_event_masks
; /* set of events all people have interest in */
253 c_long your_event_mask
; /* my event mask */
254 c_long do_not_propagate_mask
; /* set of events that should not propagate */
255 Bool override_redirect
; /* boolean value for override-redirect */
256 Screen
* screen
; /* back pointer to correct screen */
260 * Data structure for host setting; getting routines.
263 struct XHostAddress
{
264 int family
; /* for example FamilyInternet */
265 int length
; /* length of address, in chars */
266 char* address
; /* pointer to where to find the chars */
270 * Data structure for ServerFamilyInterpreted addresses in host routines
272 struct XServerInterpretedAddress
{
273 int typelength
; /* length of type string, in chars */
274 int valuelength
; /* length of value string, in chars */
275 char* type
; /* pointer to where to find the type string */
276 char* value
; /* pointer to where to find the address */
280 int width
, height
; /* size of image */
281 int xoffset
; /* number of pixels offset in X direction */
282 int format
; /* XYBitmap, XYPixmap, ZPixmap */
283 void* data
; /* pointer to image data */
284 int byte_order
; /* data byte order, LSBFirst, MSBFirst */
285 int bitmap_unit
; /* quant. of scanline 8, 16, 32 */
286 int bitmap_bit_order
; /* LSBFirst, MSBFirst */
287 int bitmap_pad
; /* 8, 16, 32 either XY or ZPixmap */
288 int depth
; /* depth of image */
289 int bytes_per_line
; /* accelarator to next line */
290 int bits_per_pixel
; /* bits per pixel (ZPixmap) */
291 c_ulong red_mask
; /* bits in z arrangment */
294 XPointer obdata
; /* hook for the object routines to hang on */
295 /* image manipulation routines */
298 XImage
* function (XDisplay
* display
, Visual
* visual
, uint depth
, int format
, int offset
, void* data
, uint width
, uint height
, int bitmap_pad
, int chars_per_line
) create_image
;
299 int function (XImage
*) destroy_image
;
300 c_ulong
function (XImage
*, int, int) get_pixel
;
301 int function (XImage
*, int, int, c_ulong
) put_pixel
;
302 XImage
* function (XImage
*, int, int, uint, uint) sub_image
;
303 int function (XImage
*, c_long
) add_pixel
;
309 * Data structure for XReconfigureWindow
311 struct XWindowChanges
{
321 * Data structure used by color operations
325 ushort red
, green
, blue
;
326 char flags
; /* do_red, do_green, do_blue */
331 * Data structures for graphics operations. On most machines, these are
332 * congruent with the wire protocol structures, so reformatting the data
333 * can be avoided on these architectures.
336 short x1
, y1
, x2
, y2
;
345 ushort width
, height
;
350 ushort width
, height
;
351 short angle1
, angle2
;
354 /* Data structure for XChangeKeyboardControl */
355 struct XKeyboardControl
{
356 int key_click_percent
;
363 int auto_repeat_mode
; /* On, Off, Default */
366 /* Data structure for XGetKeyboardControl */
367 struct XKeyboardState
{
368 int key_click_percent
;
370 uint bell_pitch
, bell_duration
;
372 int global_auto_repeat
;
373 char[32] auto_repeats
;
376 /* Data structure for XGetMotionEvents. */
382 /* Data structure for X{Set,Get}ModifierMapping */
383 struct XModifierKeymap
{
384 int max_keypermod
; /* The server's max # of keys per modifier */
385 KeyCode
* modifiermap
; /* An 8 by max_keypermod array of modifiers */
390 * Display datatype maintaining display specific data.
391 * The contents of this structure are implementation dependent.
392 * A Display should be treated as opaque by application code.
395 struct _XPrivate
; /* Forward declare before use for C++ */
396 struct _XrmHashBucketRec
;
399 XExtData
* ext_data
; /* hook for extension to hang data */
401 int fd
; /* Network socket. */
403 int proto_major_version
; /* major version of server's X protocol */
404 int proto_minor_version
; /* minor version of servers X protocol */
405 char* vendor
; /* vendor of the server hardware */
410 extern (C
) @trusted nothrow @nogc XID
function(_XDisplay
*) resource_alloc
; /* allocator function */
411 int char_order
; /* screen char order, LSBFirst, MSBFirst */
412 int bitmap_unit
; /* padding and data requirements */
413 int bitmap_pad
; /* padding requirements on bitmaps */
414 int bitmap_bit_order
; /* LeastSignificant or MostSignificant */
415 int nformats
; /* number of pixmap formats in list */
416 ScreenFormat
* pixmap_format
; /* pixmap format list */
418 int release
; /* release of the server */
419 _XPrivate
* private9
, private10
;
420 int qlen
; /* Length of input event queue */
421 c_ulong last_request_read
; /* seq number of last event read */
422 c_ulong request
; /* sequence number of last request. */
427 uint max_request_size
; /* maximum number 32 bit words in request*/
428 _XrmHashBucketRec
* db;
429 extern (C
) @trusted nothrow @nogc int function (_XDisplay
*) private15
;
430 char* display_name
; /* "host:display" string used on this connect*/
431 int default_screen
; /* default screen for operations */
432 int nscreens
; /* number of screens on this server*/
433 Screen
* screens
; /* pointer to list of screens */
434 c_ulong motion_buffer
; /* size of motion buffer */
436 int min_keycode
; /* minimum defined keycode */
437 int max_keycode
; /* maximum defined keycode */
441 char* xdefaults
; /* contents of defaults from server */
442 /* there is more to this structure, but it is private to Xlib */
444 alias Display
= _XDisplay
;
445 alias _XPrivDisplay
= _XDisplay
*;
448 int type
; /* of event */
449 c_ulong serial
; /* # of last request processed by server */
450 Bool send_event
; /* true if this came from a SendEvent request */
451 Display
* display
; /* Display the event was read from */
452 Window window
; /* "event" window it is reported relative to */
453 Window root
; /* root window that the event occurred on */
454 Window subwindow
; /* child window */
455 Time time
; /* milliseconds */
456 int x
, y
; /* pointer x, y coordinates in event window */
457 int x_root
, y_root
; /* coordinates relative to root */
458 uint state
; /* key or button mask */
459 uint keycode
; /* detail */
460 Bool same_screen
; /* same screen flag */
463 alias XKeyPressedEvent
= XKeyEvent
;
464 alias XKeyReleasedEvent
= XKeyEvent
;
466 struct XButtonEvent
{
467 int type
; /* of event */
468 c_ulong serial
; /* # of last request processed by server */
469 Bool send_event
; /* true if this came from a SendEvent request */
470 Display
* display
; /* Display the event was read from */
471 Window window
; /* "event" window it is reported relative to */
472 Window root
; /* root window that the event occurred on */
473 Window subwindow
; /* child window */
474 Time time
; /* milliseconds */
475 int x
, y
; /* pointer x, y coordinates in event window */
476 int x_root
, y_root
; /* coordinates relative to root */
477 uint state
; /* key or button mask */
478 uint button
; /* detail */
479 Bool same_screen
; /* same screen flag */
481 alias XButtonPressedEvent
= XButtonEvent
;
482 alias XButtonReleasedEvent
= XButtonEvent
;
484 struct XMotionEvent
{
485 int type
; /* of event */
486 c_ulong serial
; /* # of last request processed by server */
487 Bool send_event
; /* true if this came from a SendEvent request */
488 Display
* display
; /* Display the event was read from */
489 Window window
; /* "event" window reported relative to */
490 Window root
; /* root window that the event occurred on */
491 Window subwindow
; /* child window */
492 Time time
; /* milliseconds */
493 int x
, y
; /* pointer x, y coordinates in event window */
494 int x_root
, y_root
; /* coordinates relative to root */
495 uint state
; /* key or button mask */
496 char is_hint
; /* detail */
497 Bool same_screen
; /* same screen flag */
499 alias XPointerMovedEvent
= XMotionEvent
;
501 struct XCrossingEvent
{
502 int type
; /* of event */
503 c_ulong serial
; /* # of last request processed by server */
504 Bool send_event
; /* true if this came from a SendEvent request */
505 Display
* display
; /* Display the event was read from */
506 Window window
; /* "event" window reported relative to */
507 Window root
; /* root window that the event occurred on */
508 Window subwindow
; /* child window */
509 Time time
; /* milliseconds */
510 int x
, y
; /* pointer x, y coordinates in event window */
511 int x_root
, y_root
; /* coordinates relative to root */
512 int mode
; /* NotifyNormal, NotifyGrab, NotifyUngrab */
515 * NotifyAncestor, NotifyVirtual, NotifyInferior,
516 * NotifyNonlinear,NotifyNonlinearVirtual
518 Bool same_screen
; /* same screen flag */
519 Bool focus
; /* boolean focus */
520 uint state
; /* key or button mask */
522 alias XEnterWindowEvent
= XCrossingEvent
;
523 alias XLeaveWindowEvent
= XCrossingEvent
;
525 struct XFocusChangeEvent
{
526 int type
; /* FocusIn or FocusOut */
527 c_ulong serial
; /* # of last request processed by server */
528 Bool send_event
; /* true if this came from a SendEvent request */
529 Display
* display
; /* Display the event was read from */
530 Window window
; /* window of event */
531 int mode
; /* NotifyNormal, NotifyWhileGrabbed,*/
532 /* NotifyGrab, NotifyUngrab */
535 * NotifyAncestor, NotifyVirtual, NotifyInferior,
536 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
537 * NotifyPointerRoot, NotifyDetailNone
540 alias XFocusInEvent
= XFocusChangeEvent
;
541 alias XFocusOutEvent
= XFocusChangeEvent
;
543 /* generated on EnterWindow and FocusIn when KeyMapState selected */
544 struct XKeymapEvent
{
546 c_ulong serial
; /* # of last request processed by server */
547 Bool send_event
; /* true if this came from a SendEvent request */
548 Display
* display
; /* Display the event was read from */
553 struct XExposeEvent
{
555 c_ulong serial
; /* # of last request processed by server */
556 Bool send_event
; /* true if this came from a SendEvent request */
557 Display
* display
; /* Display the event was read from */
561 int count
; /* if non-zero, at least this many more */
564 struct XGraphicsExposeEvent
{
566 c_ulong serial
; /* # of last request processed by server */
567 Bool send_event
; /* true if this came from a SendEvent request */
568 Display
* display
; /* Display the event was read from */
572 int count
; /* if non-zero, at least this many more */
573 int major_code
; /* core is CopyArea or CopyPlane */
574 int minor_code
; /* not defined in the core */
577 struct XNoExposeEvent
{
579 c_ulong serial
; /* # of last request processed by server */
580 Bool send_event
; /* true if this came from a SendEvent request */
581 Display
* display
; /* Display the event was read from */
583 int major_code
; /* core is CopyArea or CopyPlane */
584 int minor_code
; /* not defined in the core */
587 struct XVisibilityEvent
{
589 c_ulong serial
; /* # of last request processed by server */
590 Bool send_event
; /* true if this came from a SendEvent request */
591 Display
* display
; /* Display the event was read from */
593 int state
; /* Visibility state */
596 struct XCreateWindowEvent
{
598 c_ulong serial
; /* # of last request processed by server */
599 Bool send_event
; /* true if this came from a SendEvent request */
600 Display
* display
; /* Display the event was read from */
601 Window parent
; /* parent of the window */
602 Window window
; /* window id of window created */
603 int x
, y
; /* window location */
604 int width
, height
; /* size of window */
605 int border_width
; /* border width */
606 Bool override_redirect
; /* creation should be overridden */
609 struct XDestroyWindowEvent
{
611 c_ulong serial
; /* # of last request processed by server */
612 Bool send_event
; /* true if this came from a SendEvent request */
613 Display
* display
; /* Display the event was read from */
620 c_ulong serial
; /* # of last request processed by server */
621 Bool send_event
; /* true if this came from a SendEvent request */
622 Display
* display
; /* Display the event was read from */
630 c_ulong serial
; /* # of last request processed by server */
631 Bool send_event
; /* true if this came from a SendEvent request */
632 Display
* display
; /* Display the event was read from */
635 Bool override_redirect
; /* boolean, is override set... */
638 struct XMapRequestEvent
{
640 c_ulong serial
; /* # of last request processed by server */
641 Bool send_event
; /* true if this came from a SendEvent request */
642 Display
* display
; /* Display the event was read from */
647 struct XReparentEvent
{
649 c_ulong serial
; /* # of last request processed by server */
650 Bool send_event
; /* true if this came from a SendEvent request */
651 Display
* display
; /* Display the event was read from */
656 Bool override_redirect
;
659 struct XConfigureEvent
{
661 c_ulong serial
; /* # of last request processed by server */
662 Bool send_event
; /* true if this came from a SendEvent request */
663 Display
* display
; /* Display the event was read from */
670 Bool override_redirect
;
673 struct XGravityEvent
{
675 c_ulong 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 */
683 struct XResizeRequestEvent
{
685 c_ulong serial
; /* # of last request processed by server */
686 Bool send_event
; /* true if this came from a SendEvent request */
687 Display
* display
; /* Display the event was read from */
692 struct XConfigureRequestEvent
{
694 c_ulong serial
; /* # of last request processed by server */
695 Bool send_event
; /* true if this came from a SendEvent request */
696 Display
* display
; /* Display the event was read from */
703 int detail
; /* Above, Below, TopIf, BottomIf, Opposite */
707 struct XCirculateEvent
{
709 c_ulong serial
; /* # of last request processed by server */
710 Bool send_event
; /* true if this came from a SendEvent request */
711 Display
* display
; /* Display the event was read from */
714 int place
; /* PlaceOnTop, PlaceOnBottom */
717 struct XCirculateRequestEvent
{
719 c_ulong serial
; /* # of last request processed by server */
720 Bool send_event
; /* true if this came from a SendEvent request */
721 Display
* display
; /* Display the event was read from */
724 int place
; /* PlaceOnTop, PlaceOnBottom */
727 struct XPropertyEvent
{
729 c_ulong 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 */
735 int state
; /* NewValue, Deleted */
738 struct XSelectionClearEvent
{
740 c_ulong serial
; /* # of last request processed by server */
741 Bool send_event
; /* true if this came from a SendEvent request */
742 Display
* display
; /* Display the event was read from */
748 struct XSelectionRequestEvent
{
750 c_ulong serial
; /* # of last request processed by server */
751 Bool send_event
; /* true if this came from a SendEvent request */
752 Display
* display
; /* Display the event was read from */
761 struct XSelectionEvent
{
763 c_ulong serial
; /* # of last request processed by server */
764 Bool send_event
; /* true if this came from a SendEvent request */
765 Display
* display
; /* Display the event was read from */
769 Atom property
; /* ATOM or None */
773 struct XColormapEvent
{
775 c_ulong serial
; /* # of last request processed by server */
776 Bool send_event
; /* true if this came from a SendEvent request */
777 Display
* display
; /* Display the event was read from */
779 Colormap colormap
; /* COLORMAP or None */
780 Bool c_new
; /* C++ */
781 int state
; /* ColormapInstalled, ColormapUninstalled */
784 struct XClientMessageEvent
{
786 c_ulong serial
; /* # of last request processed by server */
787 Bool send_event
; /* true if this came from a SendEvent request */
788 Display
* display
; /* Display the event was read from */
800 struct XMappingEvent
{
802 c_ulong 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 */
805 Window window
; /* unused */
806 int request
; /* one of MappingModifier, MappingKeyboard, MappingPointer */
807 int first_keycode
; /* first keycode */
808 int count
; /* defines range of change w. first_keycode */
813 Display
* display
; /* Display the event was read from */
814 XID resourceid
; /* resource id */
815 c_ulong serial
; /* serial number of failed request */
816 ubyte error_code
; /* error code of failed request */
817 ubyte request_code
; /* Major op-code of failed request */
818 ubyte minor_code
; /* Minor op-code of failed request */
823 c_ulong serial
; /* # of last request processed by server */
824 Bool send_event
; /* true if this came from a SendEvent request */
825 Display
* display
; /* Display the event was read from */
826 Window window
; /* window on which event was requested in event mask */
830 /***************************************************************
832 * GenericEvent. This event is the standard event for all newer extensions.
835 struct XGenericEvent
{
836 int type
; /* of event. Always GenericEvent */
837 c_ulong serial
; /* # of last request processed */
838 Bool send_event
; /* true if from SendEvent request */
839 Display
* display
; /* Display the event was read from */
840 int extension
; /* major opcode of extension that caused the event */
841 int evtype
; /* actual event type. */
844 struct XGenericEventCookie
{
845 int type
; /* of event. Always GenericEvent */
846 c_ulong serial
; /* # of last request processed */
847 Bool send_event
; /* true if from SendEvent request */
848 Display
* display
; /* Display the event was read from */
849 int extension
; /* major opcode of extension that caused the event */
850 int evtype
; /* actual event type. */
856 * this union is defined so Xlib can always use the same sized
857 * event structure internally, to avoid memory fragmentation.
860 int type
; /* must not be changed; first element */
863 XButtonEvent xbutton
;
864 XMotionEvent xmotion
;
865 XCrossingEvent xcrossing
;
866 XFocusChangeEvent xfocus
;
867 XExposeEvent xexpose
;
868 XGraphicsExposeEvent xgraphicsexpose
;
869 XNoExposeEvent xnoexpose
;
870 XVisibilityEvent xvisibility
;
871 XCreateWindowEvent xcreatewindow
;
872 XDestroyWindowEvent xdestroywindow
;
875 XMapRequestEvent xmaprequest
;
876 XReparentEvent xreparent
;
877 XConfigureEvent xconfigure
;
878 XGravityEvent xgravity
;
879 XResizeRequestEvent xresizerequest
;
880 XConfigureRequestEvent xconfigurerequest
;
881 XCirculateEvent xcirculate
;
882 XCirculateRequestEvent xcirculaterequest
;
883 XPropertyEvent xproperty
;
884 XSelectionClearEvent xselectionclear
;
885 XSelectionRequestEvent xselectionrequest
;
886 XSelectionEvent xselection
;
887 XColormapEvent xcolormap
;
888 XClientMessageEvent xclient
;
889 XMappingEvent xmapping
;
891 XKeymapEvent xkeymap
;
892 XGenericEvent xgeneric
;
893 XGenericEventCookie xcookie
;
897 int XAllocID (Display
* dpy
) { return cast(int)dpy
.resource_alloc(dpy
); }
900 * per character font metric information.
903 short lbearing
; /* origin to left edge of raster */
904 short rbearing
; /* origin to right edge of raster */
905 short width
; /* advance to next char's origin */
906 short ascent
; /* baseline to top edge of raster */
907 short descent
; /* baseline to bottom edge of raster */
908 ushort attributes
; /* per char flags (not predefined) */
912 * To allow arbitrary information with fonts, there are additional properties
921 XExtData
* ext_data
; /* hook for extension to hang data */
922 Font fid
; /* Font id for this font */
923 uint direction
; /* hint about direction the font is painted */
924 uint min_char_or_char2
; /* first character */
925 uint max_char_or_char2
; /* last character */
926 uint min_char1
; /* first row that exists */
927 uint max_char1
; /* last row that exists */
928 Bool all_chars_exist
; /* flag if all characters have non-zero size */
929 uint default_char
; /* char to print for undefined character */
930 int n_properties
; /* how many properties there are */
931 XFontProp
* properties
; /* pointer to array of additional properties */
932 XCharStruct min_bounds
; /* minimum bounds over all existing char */
933 XCharStruct max_bounds
; /* maximum bounds over all existing char */
934 XCharStruct
* per_char
; /* first_char to last_char information */
935 int ascent
; /* log. extent above baseline for spacing */
936 int descent
; /* log. descent below baseline for spacing */
940 * PolyText routines take these as arguments.
943 char* chars
; /* pointer to string */
944 int nchars
; /* number of characters */
945 int delta
; /* delta between strings */
946 Font font
; /* font to print it in, None don't change */
949 /* normal 16 bit characters are two chars */
950 align(1) struct XChar2b
{
957 XChar2b
* chars
; /* two char characters */
958 int nchars
; /* number of characters */
959 int delta
; /* delta between strings */
960 Font font
; /* font to print it in, None don't change */
968 ScreenFormat
* pixmap_format
;
972 struct XFontSetExtents
{
973 XRectangle max_ink_extent
;
974 XRectangle max_logical_extent
;
985 alias XFontSet
= _XOC
*;
1002 XNRequiredCharSet
= "requiredCharSet",
1003 XNQueryOrientation
= "queryOrientation",
1004 XNBaseFontName
= "baseFontName",
1005 XNOMAutomatic
= "omAutomatic",
1006 XNMissingCharSet
= "missingCharSet",
1007 XNDefaultString
= "defaultString",
1008 XNOrientation
= "orientation",
1009 XNDirectionalDependentDrawing
= "directionalDependentDrawing",
1010 XNContextualDrawing
= "contextualDrawing",
1011 XNFontInfo
= "fontInfo",
1014 struct XOMCharSetList
{
1016 char** charset_list
;
1019 alias XOrientation
= int;
1021 XOMOrientation_LTR_TTB
,
1022 XOMOrientation_RTL_TTB
,
1023 XOMOrientation_TTB_LTR
,
1024 XOMOrientation_TTB_RTL
,
1025 XOMOrientation_Context
,
1028 struct XOMOrientation
{
1029 int num_orientation
;
1030 XOrientation
* orientation
; /* Input Text description */
1035 XFontStruct
**font_struct_list
;
1036 char** font_name_list
;
1044 alias XIMProc
= void function (
1050 alias XICProc
= Bool
function (
1056 alias XIDProc
= void function (
1063 ushort count_styles
;
1064 XIMStyle
* supported_styles
;
1067 alias XIMStyle
= c_ulong
;
1069 XIMPreeditArea
= 0x0001,
1070 XIMPreeditCallbacks
= 0x0002,
1071 XIMPreeditPosition
= 0x0004,
1072 XIMPreeditNothing
= 0x0008,
1073 XIMPreeditNone
= 0x0010,
1074 XIMStatusArea
= 0x0100,
1075 XIMStatusCallbacks
= 0x0200,
1076 XIMStatusNothing
= 0x0400,
1077 XIMStatusNone
= 0x0800,
1081 XNVaNestedList
= "XNVaNestedList",
1082 XNQueryInputStyle
= "queryInputStyle",
1083 XNClientWindow
= "clientWindow",
1084 XNInputStyle
= "inputStyle",
1085 XNFocusWindow
= "focusWindow",
1086 XNResourceName
= "resourceName",
1087 XNResourceClass
= "resourceClass",
1088 XNGeometryCallback
= "geometryCallback",
1089 XNDestroyCallback
= "destroyCallback",
1090 XNFilterEvents
= "filterEvents",
1091 XNPreeditStartCallback
= "preeditStartCallback",
1092 XNPreeditDoneCallback
= "preeditDoneCallback",
1093 XNPreeditDrawCallback
= "preeditDrawCallback",
1094 XNPreeditCaretCallback
= "preeditCaretCallback",
1095 XNPreeditStateNotifyCallback
= "preeditStateNotifyCallback",
1096 XNPreeditAttributes
= "preeditAttributes",
1097 XNStatusStartCallback
= "statusStartCallback",
1098 XNStatusDoneCallback
= "statusDoneCallback",
1099 XNStatusDrawCallback
= "statusDrawCallback",
1100 XNStatusAttributes
= "statusAttributes",
1102 XNAreaNeeded
= "areaNeeded",
1103 XNSpotLocation
= "spotLocation",
1104 XNColormap
= "colorMap",
1105 XNStdColormap
= "stdColorMap",
1106 XNForeground
= "foreground",
1107 XNBackground
= "background",
1108 XNBackgroundPixmap
= "backgroundPixmap",
1109 XNFontSet
= "fontSet",
1110 XNLineSpace
= "lineSpace",
1111 XNCursor
= "cursor",
1113 XNQueryIMValuesList
= "queryIMValuesList",
1114 XNQueryICValuesList
= "queryICValuesList",
1115 XNVisiblePosition
= "visiblePosition",
1116 XNR6PreeditCallback
= "r6PreeditCallback",
1117 XNStringConversionCallback
= "stringConversionCallback",
1118 XNStringConversion
= "stringConversion",
1119 XNResetState
= "resetState",
1120 XNHotKey
= "hotKey",
1121 XNHotKeyState
= "hotKeyState",
1122 XNPreeditState
= "preeditState",
1123 XNSeparatorofNestedList
= "separatorofNestedList",
1126 enum int XBufferOverflow
= -1;
1127 enum int XLookupNone
= 1;
1128 enum int XLookupChars
= 2;
1129 enum int XLookupKeySym
= 3;
1130 enum int XLookupBoth
= 4;
1132 void* XVaNestedList
;
1134 struct XIMCallback
{
1135 XPointer client_data
;
1139 struct XICCallback
{
1140 XPointer client_data
;
1144 alias XIMFeedback
= int;
1147 XIMUnderline
= (1<<1),
1148 XIMHighlight
= (1<<2),
1149 XIMPrimary
= (1<<5),
1150 XIMSecondary
= (1<<6),
1151 XIMTertiary
= (1<<7),
1152 XIMVisibleToForward
= (1<<8),
1153 XIMVisibleToBackword
= (1<<9),
1154 XIMVisibleToCenter
= (1<<10),
1159 XIMFeedback
* feedback
;
1160 Bool encoding_is_wchar
;
1168 alias XIMPreeditState
= c_ulong
;
1170 XIMPreeditUnKnown
= 0,
1171 XIMPreeditEnable
= 1,
1172 XIMPreeditDisable
= (1<<1),
1175 struct XIMPreeditStateNotifyCallbackStruct
{
1176 XIMPreeditState state
;
1179 alias XIMResetState
= c_ulong
;
1181 XIMInitialState
= 1,
1182 XIMPreserveState
= 1<<1
1185 alias XIMStringConversionFeedback
= c_ulong
;
1187 XIMStringConversionLeftEdge
= 0x00000001,
1188 XIMStringConversionRightEdge
= 0x00000002,
1189 XIMStringConversionTopEdge
= 0x00000004,
1190 XIMStringConversionBottomEdge
= 0x00000008,
1191 XIMStringConversionConcealed
= 0x00000010,
1192 XIMStringConversionWrapped
= 0x00000020,
1195 struct XIMStringConversionText
{
1197 XIMStringConversionFeedback
* feedback
;
1198 Bool encoding_is_wchar
;
1205 alias XIMStringConversionPosition
= ushort;
1207 alias XIMStringConversionType
= ushort;
1209 XIMStringConversionBuffer
= 0x0001,
1210 XIMStringConversionLine
= 0x0002,
1211 XIMStringConversionWord
= 0x0003,
1212 XIMStringConversionChar
= 0x0004,
1215 alias XIMStringConversionOperation
= ushort;
1217 XIMStringConversionSubstitution
= 0x0001,
1218 XIMStringConversionRetrieval
= 0x0002,
1221 alias XIMCaretDirection
= int;
1223 XIMForwardChar
, XIMBackwardChar
,
1224 XIMForwardWord
, XIMBackwardWord
,
1225 XIMCaretUp
, XIMCaretDown
,
1226 XIMNextLine
, XIMPreviousLine
,
1227 XIMLineStart
, XIMLineEnd
,
1228 XIMAbsolutePosition
,
1232 struct XIMStringConversionCallbackStruct
{
1233 XIMStringConversionPosition position
;
1234 XIMCaretDirection direction
;
1235 XIMStringConversionOperation operation
;
1237 XIMStringConversionText
* text
;
1240 struct XIMPreeditDrawCallbackStruct
{
1241 int caret
; /* Cursor offset within pre-edit string */
1242 int chg_first
; /* Starting change position */
1243 int chg_length
; /* Length of the change in character count */
1247 alias XIMCaretStyle
= int;
1249 XIMIsInvisible
, /* Disable caret feedback */
1250 XIMIsPrimary
, /* UI defined caret feedback */
1251 XIMIsSecondary
/* UI defined caret feedback */
1254 struct XIMPreeditCaretCallbackStruct
{
1255 int position
; /* Caret offset within pre-edit string */
1256 XIMCaretDirection direction
; /* Caret moves direction */
1257 XIMCaretStyle style
; /* Feedback of the caret */
1260 alias XIMStatusDataType
= int;
1266 struct XIMStatusDrawCallbackStruct
{
1267 XIMStatusDataType type
;
1274 struct XIMHotKeyTrigger
{
1280 struct XIMHotKeyTriggers
{
1282 XIMHotKeyTrigger
* key
;
1285 alias XIMHotKeyState
= c_ulong
;
1287 XIMHotKeyStateON
= 0x0001,
1288 XIMHotKeyStateOFF
= 0x0002,
1291 struct XIMValuesList
{
1292 ushort count_values
;
1293 char** supported_values
;
1297 extern int *_Xdebug_p
;
1302 XFontStruct
* XLoadQueryFont(
1307 XFontStruct
* XQueryFont(
1313 XTimeCoord
* XGetMotionEvents(
1321 XModifierKeymap
* XDeleteModifiermapEntry(
1322 XModifierKeymap
* modmap
,
1323 KeyCode keycode_entry
,
1327 XModifierKeymap
* XGetModifierMapping(
1331 XModifierKeymap
* XInsertModifiermapEntry(
1332 XModifierKeymap
* modmap
,
1333 KeyCode keycode_entry
,
1337 XModifierKeymap
* XNewModifiermap(
1338 int max_keys_per_mod
1341 XImage
* XCreateImage(
1366 XImage
* XGetSubImage(
1381 * X function declarations.
1383 Display
* XOpenDisplay(
1384 const(char)*dpname
=null /*display_name*/
1387 void XrmInitialize( );
1402 Status
XGetAtomNames(
1416 char* XKeysymToString(
1436 const(char)* atom_name
,
1439 Status
XInternAtoms(
1441 const(const(char)*)* names
,
1446 Colormap
XCopyColormapAndFree(
1450 Colormap
XCreateColormap(
1456 Cursor
XCreatePixmapCursor(
1460 XColor
* foreground_color
,
1461 XColor
* background_color
,
1465 Cursor
XCreateGlyphCursor(
1469 uint* source_char
, //FIXME
1470 uint* mask_char
, //FIXME
1471 XColor
* foreground_color
,
1472 XColor
* background_color
1474 Cursor
XCreateFontCursor(
1488 GContext
XGContextFromGC(
1495 Pixmap
XCreatePixmap(
1502 Pixmap
XCreateBitmapFromData(
1509 Pixmap
XCreatePixmapFromBitmapData(
1519 Window
XCreateSimpleWindow(
1530 Window
XGetSelectionOwner(
1534 Window
XCreateWindow(
1546 XSetWindowAttributes
* attributes
1548 Colormap
* XListInstalledColormaps(
1555 const(char)* pattern
,
1557 int* actual_count_return
1559 char* XListFontsWithInfo(
1561 const(char)* pattern
,
1564 XFontStruct
** info_return
1566 char** XGetFontPath(
1570 char** XListExtensions(
1572 int* nextensions_return
1574 Atom
* XListProperties(
1577 int* num_prop_return
1579 XHostAddress
* XListHosts(
1584 KeySym
XKeycodeToKeysym(
1589 KeySym
XLookupKeysym(
1590 XKeyEvent
* key_event
,
1593 KeySym
* XGetKeyboardMapping(
1595 KeyCode first_keycode
,
1597 int* keysyms_per_keycode_return
1599 KeySym
XStringToKeysym(
1602 c_long
XMaxRequestSize(
1605 c_long
XExtendedMaxRequestSize(
1608 char* XResourceManagerString(
1611 char* XScreenResourceString(
1614 c_ulong
XDisplayMotionBufferSize(
1617 VisualID
XVisualIDFromVisual(
1621 /* multithread routines */
1623 Status
XInitThreads( );
1629 void XUnlockDisplay(
1633 /* routines for dealing with extensions */
1635 XExtCodes
* XInitExtension(
1640 XExtCodes
* XAddExtension(
1643 XExtData
* XFindOnExtensionList(
1644 XExtData
** structure
,
1647 XExtData
**XEHeadOfExtensionList(
1651 /* these are routines for which there are also macros */
1656 Window
XDefaultRootWindow(
1659 Window
XRootWindowOfScreen(
1662 Visual
* XDefaultVisual(
1666 Visual
* XDefaultVisualOfScreen(
1673 GC
XDefaultGCOfScreen(
1676 c_ulong
XBlackPixel(
1680 c_ulong
XWhitePixel(
1684 c_ulong
XAllPlanes( );
1685 c_ulong
XBlackPixelOfScreen(
1688 c_ulong
XWhitePixelOfScreen(
1694 uint XLastKnownRequestProcessed(
1697 char* XServerVendor(
1700 char* XDisplayString(
1703 Colormap
XDefaultColormap(
1707 Colormap
XDefaultColormapOfScreen(
1710 Display
* XDisplayOfScreen(
1713 Screen
* XScreenOfDisplay(
1717 Screen
* XDefaultScreenOfDisplay(
1720 c_long
XEventMaskOfScreen(
1724 int XScreenNumberOfScreen(
1728 alias XErrorHandler
= int function ( /* WARNING, this type not in Xlib spec */
1730 XErrorEvent
* error_event
1733 XErrorHandler
XSetErrorHandler (
1734 XErrorHandler handler
1737 //XIOErrorHandler: see at the top
1738 XIOErrorHandler
XSetIOErrorHandler (
1739 XIOErrorHandler handler
1743 XPixmapFormatValues
* XListPixmapFormats(
1753 /* ICCCM routines for things that don't require special include files; */
1754 /* other declarations are given in Xutil.h */
1755 Status
XReconfigureWMWindow(
1760 XWindowChanges
* changes
1763 Status
XGetWMProtocols(
1766 Atom
** protocols_return
,
1769 Status
XSetWMProtocols(
1775 Status
XIconifyWindow(
1780 Status
XWithdrawWindow(
1788 char*** argv_return
,
1791 Status
XGetWMColormapWindows(
1794 Window
** windows_return
,
1797 Status
XSetWMColormapWindows(
1800 Window
* colormap_windows
,
1803 void XFreeStringList(
1806 int XSetTransientForHint(
1812 /* The following are given in alphabetical order */
1814 int XActivateScreenSaver(
1825 XHostAddress
* hosts
,
1829 int XAddToExtensionList(
1830 XExtData
** structure
,
1842 XColor
* screen_in_out
1845 Status
XAllocColorCells(
1849 c_ulong
* plane_masks_return
,
1851 c_ulong
* pixels_return
,
1855 Status
XAllocColorPlanes(
1859 c_ulong
* pixels_return
,
1864 c_ulong
* rmask_return
,
1865 c_ulong
* gmask_return
,
1866 c_ulong
* bmask_return
1869 Status
XAllocNamedColor(
1872 const(char)* color_name
,
1873 XColor
* screen_def_return
,
1874 XColor
* exact_def_return
1896 int XBitmapBitOrder(
1912 int XChangeActivePointerGrab(
1926 int XChangeKeyboardControl(
1929 XKeyboardControl
* values
1932 int XChangeKeyboardMapping(
1935 int keysyms_per_keycode
,
1940 int XChangePointerControl(
1944 int accel_numerator
,
1945 int accel_denominator
,
1949 int XChangeProperty(
1966 int XChangeWindowAttributes(
1970 XSetWindowAttributes
* attributes
1975 XEvent
* event_return
,
1984 Bool
XCheckMaskEvent(
1987 XEvent
* event_return
1990 Bool
XCheckTypedEvent(
1993 XEvent
* event_return
1996 Bool
XCheckTypedWindowEvent(
2000 XEvent
* event_return
2003 Bool
XCheckWindowEvent(
2007 XEvent
* event_return
2010 int XCirculateSubwindows(
2016 int XCirculateSubwindowsDown(
2021 int XCirculateSubwindowsUp(
2045 int XConfigureWindow(
2049 XWindowChanges
* values
2052 int XConnectionNumber(
2056 int XConvertSelection(
2104 int XDefaultDepthOfScreen(
2118 int XDeleteProperty(
2129 int XDestroySubwindows(
2134 int XDoesBackingStore(
2138 Bool
XDoesSaveUnders(
2142 int XDisableAccessControl(
2157 int XDisplayHeightMM(
2162 int XDisplayKeycodes(
2164 int* min_keycodes_return
,
2165 int* max_keycodes_return
2178 int XDisplayWidthMM(
2203 int XDrawImageString(
2209 const(char)* string
,
2213 int XDrawImageString16(
2269 int XDrawRectangles(
2273 XRectangle
* rectangles
,
2291 const(char)* string
,
2325 int XEnableAccessControl(
2337 char** window_name_return
2380 int XFillRectangles(
2384 XRectangle
* rectangles
,
2392 int XForceScreenSaver(
2419 int XFreeExtensionList(
2425 XFontStruct
* font_struct
2430 XFontStruct
* free_info
,
2447 int XFreeModifiermap(
2448 XModifierKeymap
* modmap
2460 char* default_position
,
2472 int XGetErrorDatabaseText(
2475 const(char)* message
,
2476 const(char)* default_string
,
2477 char* buffer_return
,
2484 char* buffer_return
,
2488 Bool
XGetFontProperty(
2489 XFontStruct
* font_struct
,
2491 c_ulong
* value_return
2494 Status
XGetGCValues(
2498 XGCValues
* values_return
2501 Status
XGetGeometry(
2504 Window
* root_return
,
2508 uint* height_return
,
2509 uint* border_width_return
,
2513 Status
XGetIconName(
2516 char** icon_name_return
2521 Window
* focus_return
,
2522 int* revert_to_return
2525 int XGetKeyboardControl(
2527 XKeyboardState
* values_return
2530 int XGetPointerControl(
2532 int* accel_numerator_return
,
2533 int* accel_denominator_return
,
2534 int* threshold_return
2537 int XGetPointerMapping(
2543 int XGetScreenSaver(
2545 int* timeout_return
,
2546 int* interval_return
,
2547 int* prefer_blanking_return
,
2548 int* allow_exposures_return
2551 Status
XGetTransientForHint(
2554 Window
* prop_window_return
2557 int XGetWindowProperty(
2561 c_long c_long_offset
,
2562 c_long c_long_length
,
2565 Atom
* actual_type_return
,
2566 int* actual_format_return
,
2567 c_ulong
* nitems_return
,
2568 c_ulong
* chars_after_return
,
2572 Status
XGetWindowAttributes(
2575 XWindowAttributes
* window_attributes_return
2626 int XHeightMMOfScreen(
2630 int XHeightOfScreen(
2636 XEvent
* event_return
,
2645 int XImagecharOrder(
2649 int XInstallColormap(
2654 KeyCode
XKeysymToKeycode(
2664 Status
XLookupColor(
2667 const(char)* color_name
,
2668 XColor
* exact_def_return
,
2669 XColor
* screen_def_return
2695 XEvent
* event_return
2698 int XMaxCmapsOfScreen(
2702 int XMinCmapsOfScreen(
2706 int XMoveResizeWindow(
2724 XEvent
* event_return
2735 XColor
* exact_def_return
2748 XEvent
* event_return
2753 XEvent
* event_return
,
2766 int XPlanesOfScreen(
2770 int XProtocolRevision(
2774 int XProtocolVersion(
2801 Status
XQueryBestCursor(
2810 Status
XQueryBestSize(
2813 Drawable which_screen
,
2820 Status
XQueryBestStipple(
2822 Drawable which_screen
,
2829 Status
XQueryBestTile(
2831 Drawable which_screen
,
2847 XColor
* defs_in_out
,
2851 Bool
XQueryExtension(
2854 int* major_opcode_return
,
2855 int* first_event_return
,
2856 int* first_error_return
2861 char [32] keys_return
2867 Window
* root_return
,
2868 Window
* child_return
,
2876 int XQueryTextExtents(
2879 const(char)* string
,
2881 int* direction_return
,
2882 int* font_ascent_return
,
2883 int* font_descent_return
,
2884 XCharStruct
* overall_return
2887 int XQueryTextExtents16(
2892 int* direction_return
,
2893 int* font_ascent_return
,
2894 int* font_descent_return
,
2895 XCharStruct
* overall_return
2901 Window
* root_return
,
2902 Window
* parent_return
,
2903 Window
** children_return
,
2904 uint* nchildren_return
2912 int XReadBitmapFile(
2917 uint* height_return
,
2918 Pixmap
* bitmap_return
,
2923 int XReadBitmapFileData(
2924 const(char)* filename
,
2926 uint* height_return
,
2927 ubyte** data_return
,
2944 XColor
* foreground_color
,
2945 XColor
* background_color
2948 int XRefreshKeyboardMapping(
2949 XMappingEvent
* event_map
2952 int XRemoveFromSaveSet(
2964 XHostAddress
* hosts
,
2968 int XReparentWindow(
2976 int XResetScreenSaver(
2987 int XRestackWindows(
2998 int XRotateWindowProperties(
3024 int XSetAccessControl(
3054 int XSetClipRectangles(
3059 XRectangle
* rectangles
,
3064 int XSetCloseDownMode(
3120 int XSetGraphicsExposures(
3123 Bool graphics_exposures
3129 const(char)* icon_name
3139 int XSetLineAttributes(
3148 int XSetModifierMapping(
3150 XModifierKeymap
* modmap
3159 int XSetPointerMapping(
3165 int XSetScreenSaver(
3169 int prefer_blanking
,
3173 int XSetSelectionOwner(
3195 int XSetSubwindowMode(
3214 int XSetWindowBackground(
3217 c_ulong background_pixel
3220 int XSetWindowBackgroundPixmap(
3223 Pixmap background_pixmap
3226 int XSetWindowBorder(
3229 c_ulong border_pixel
3232 int XSetWindowBorderPixmap(
3235 Pixmap border_pixmap
3238 int XSetWindowBorderWidth(
3244 int XSetWindowColormap(
3279 const(char)* window_name
3282 int XStoreNamedColor(
3296 XFontStruct
* font_struct
,
3297 const(char)* string
,
3299 int* direction_return
,
3300 int* font_ascent_return
,
3301 int* font_descent_return
,
3302 XCharStruct
* overall_return
3306 XFontStruct
* font_struct
,
3309 int* direction_return
,
3310 int* font_ascent_return
,
3311 int* font_descent_return
,
3312 XCharStruct
* overall_return
3316 XFontStruct
* font_struct
,
3317 const(char)* string
,
3322 XFontStruct
* font_struct
,
3327 Bool
XTranslateCoordinates(
3335 Window
* child_return
3338 int XUndefineCursor(
3357 int XUngrabKeyboard(
3371 int XUninstallColormap(
3381 int XUnmapSubwindows(
3407 int XWidthMMOfScreen(
3419 XEvent
* event_return
3422 int XWriteBitmapFile(
3424 const(char)* filename
,
3432 Bool
XSupportsLocale ( );
3434 char* XSetLocaleModifiers(
3435 const(char)* modifier_list
3440 _XrmHashBucketRec
* rdb
,
3441 const(char)* res_name
,
3442 const(char)* res_class
3461 Display
* XDisplayOfOM(
3495 XFontSet
XCreateFontSet(
3497 const(char)* base_font_name_list
,
3498 char*** missing_charset_list
,
3499 int* missing_charset_count
,
3508 int XFontsOfFontSet(
3510 XFontStruct
*** font_struct_list
,
3511 char*** font_name_list
3514 char* XBaseFontNameListOfFontSet(
3515 XFontSet font_set
/*was char*/
3518 char* XLocaleOfFontSet(
3522 Bool
XContextDependentDrawing(
3526 Bool
XDirectionalDependentDrawing(
3530 Bool
XContextualDrawing(
3534 XFontSetExtents
* XExtentsOfFontSet(
3538 int XmbTextEscapement(
3544 int XwcTextEscapement(
3546 const(wchar_t
)* text
,
3550 int Xutf8TextEscapement(
3560 XRectangle
* overall_ink_return
,
3561 XRectangle
* overall_logical_return
3566 const(wchar_t
)* text
,
3568 XRectangle
* overall_ink_return
,
3569 XRectangle
* overall_logical_return
3572 int Xutf8TextExtents(
3576 XRectangle
* overall_ink_return
,
3577 XRectangle
* overall_logical_return
3580 Status
XmbTextPerCharExtents(
3584 XRectangle
* ink_extents_buffer
,
3585 XRectangle
* logical_extents_buffer
,
3588 XRectangle
* overall_ink_return
,
3589 XRectangle
* overall_logical_return
3592 Status
XwcTextPerCharExtents(
3594 const(wchar_t
)* text
,
3596 XRectangle
* ink_extents_buffer
,
3597 XRectangle
* logical_extents_buffer
,
3600 XRectangle
* overall_ink_return
,
3601 XRectangle
* overall_logical_return
3604 Status
Xutf8TextPerCharExtents(
3608 XRectangle
* ink_extents_buffer
,
3609 XRectangle
* logical_extents_buffer
,
3612 XRectangle
* overall_ink_return
,
3613 XRectangle
* overall_logical_return
3622 XmbTextItem
* text_items
,
3632 XwcTextItem
* text_items
,
3642 XmbTextItem
* text_items
,
3664 const(wchar_t
)* text
,
3668 void Xutf8DrawString(
3679 void XmbDrawImageString(
3690 void XwcDrawImageString(
3697 const(wchar_t
)* text
,
3701 void Xutf8DrawImageString(
3714 _XrmHashBucketRec
* rdb
,
3715 const(char)* res_name
,
3716 const(char)* res_class
3725 ) /*_X_SENTINEL(0)*/;
3729 ) /*_X_SENTINEL(0)*/;
3731 Display
* XDisplayOfIM(
3742 ) /*_X_SENTINEL(0)*/;
3756 wchar_t
* XwcResetIC(
3770 ) /*_X_SENTINEL(0)*/;
3774 ) /*_X_SENTINEL(0)*/;
3785 int XmbLookupString(
3787 XKeyPressedEvent
* event
,
3788 char* buffer_return
,
3790 KeySym
* keysym_return
,
3791 Status
* status_return
3794 int XwcLookupString(
3796 XKeyPressedEvent
* event
,
3797 wchar_t
* buffer_return
,
3799 KeySym
* keysym_return
,
3800 Status
* status_return
3803 int Xutf8LookupString(
3805 XKeyPressedEvent
* event
,
3806 char* buffer_return
,
3808 KeySym
* keysym_return
,
3809 Status
* status_return
3813 XVaNestedList XVaCreateNestedList(
3817 /* internal connections for IMs */
3819 Bool
XRegisterIMInstantiateCallback(
3821 _XrmHashBucketRec
* rdb
,
3822 const(char)* res_name
,
3823 const(char)* res_class
,
3825 XPointer client_data
3828 Bool
XUnregisterIMInstantiateCallback(
3830 _XrmHashBucketRec
* rdb
,
3831 const(char)* res_name
,
3832 const(char)* res_class
,
3834 XPointer client_data
3837 alias XConnectionWatchProc
= void function(
3839 XPointer client_data
,
3841 Bool
/* opening, open or close flag */,
3842 XPointer
* /* watch_data, open sets, close uses */
3846 Status
XInternalConnectionNumbers(
3852 void XProcessInternalConnection(
3857 Status
XAddConnectionWatch(
3859 XConnectionWatchProc callback
,
3860 XPointer client_data
3863 void XRemoveConnectionWatch(
3865 XConnectionWatchProc callback
,
3866 XPointer client_data
3869 void XSetAuthorization(
3889 XGenericEventCookie
* cookie
3892 void XFreeEventData(
3894 XGenericEventCookie
* cookie
3898 Bool
XkbSetDetectableAutoRepeat(