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