1 module derelict.x11.Xutil; 2 version(linux): 3 import core.stdc.config; 4 import derelict.x11.Xlib; 5 import derelict.x11.X; 6 import derelict.x11.Xregion; 7 import derelict.x11.Xresource : XrmStringToQuark; 8 import derelict.x11.keysym; 9 10 extern (C) nothrow @nogc: 11 12 /* 13 * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding 14 * value (x, y, width, height) was found in the parsed string. 15 */ 16 const int NoValue = 0x0000; 17 const int XValue = 0x0001; 18 const int YValue = 0x0002; 19 const int WidthValue = 0x0004; 20 const int HeightValue = 0x0008; 21 const int AllValues = 0x000F; 22 const int XNegative = 0x0010; 23 const int YNegative = 0x0020; 24 25 /* 26 * new version containing base_width, base_height, and win_gravity fields; 27 * used with WM_NORMAL_HINTS. 28 */ 29 struct XSizeHints { 30 c_long flags; /* marks which fields in this structure are defined */ 31 int x, y; /* obsolete for new window mgrs, but clients */ 32 int width, height; /* should set so old wm's don't mess up */ 33 int min_width, min_height; 34 int max_width, max_height; 35 int width_inc, height_inc; 36 struct aspect { 37 int x; /* numerator */ 38 int y; /* denominator */ 39 } 40 aspect min_aspect, max_aspect; 41 int base_width, base_height; /* added by ICCCM version 1 */ 42 int win_gravity; /* added by ICCCM version 1 */ 43 } 44 45 /* 46 * The next block of definitions are for window manager properties that 47 * clients and applications use for communication. 48 */ 49 50 /* flags argument in size hints */ 51 enum { 52 USPosition = 1L << 0, /* user specified x, y */ 53 USSize = 1L << 1, /* user specified width, height */ 54 55 PPosition = 1L << 2, /* program specified position */ 56 PSize = 1L << 3, /* program specified size */ 57 PMinSize = 1L << 4, /* program specified minimum size */ 58 PMaxSize = 1L << 5, /* program specified maximum size */ 59 PResizeInc = 1L << 6, /* program specified resize increments */ 60 PAspect = 1L << 7, /* program specified min and max aspect ratios */ 61 PBaseSize = 1L << 8, /* program specified base for incrementing */ 62 PWinGravity = 1L << 9 /* program specified window gravity */ 63 } 64 65 /* obsolete */ 66 c_long PAllHints = (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect); 67 68 69 70 struct XWMHints{ 71 c_long flags; /* marks which fields in this structure are defined */ 72 Bool input; /* does this application rely on the window manager to get keyboard input? */ 73 int nitial_state; /* see below */ 74 Pixmap icon_pixmap; /* pixmap to be used as icon */ 75 Window icon_window; /* window to be used as icon */ 76 int icon_x, icon_y; /* initial position of icon */ 77 Pixmap icon_mask; /* icon mask bitmap */ 78 XID window_group; /* id of related window group */ 79 /* this structure may be extended in the future */ 80 } 81 82 /* definition for flags of XWMHints */ 83 enum { 84 InputHint = (1L << 0), 85 StateHint = (1L << 1), 86 IconPixmapHint = (1L << 2), 87 IconWindowHint = (1L << 3), 88 IconPositionHint = (1L << 4), 89 IconMaskHint = (1L << 5), 90 WindowGroupHint = (1L << 6), 91 AllHints = (InputHint|StateHint|IconPixmapHint|IconWindowHint|IconPositionHint|IconMaskHint|WindowGroupHint), 92 XUrgencyHint = (1L << 8) 93 } 94 95 /* definitions for initial window state */ 96 enum { 97 WithdrawnState = 0, /* for windows that are not mapped */ 98 NormalState = 1, /* most applications want to start this way */ 99 IconicState = 3 /* application wants to start as an icon */ 100 } 101 102 /* 103 * Obsolete states no longer defined by ICCCM 104 */ 105 enum { 106 DontCareState = 0, /* don't know or care */ 107 ZoomState = 2, /* application wants to start zoomed */ 108 InactiveState = 4 /* application believes it is seldom used; */ 109 } 110 /* some wm's may put it on inactive menu */ 111 112 113 /* 114 * new structure for manipulating TEXT properties; used with WM_NAME, 115 * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND. 116 */ 117 struct XTextProperty{ 118 ubyte* value; /* same as Property routines */ 119 Atom encoding; /* prop type */ 120 int format; /* prop data format: 8, 16, or 32 */ 121 c_ulong nitems; /* number of data items in value */ 122 } 123 124 const int XNoMemory = -1; 125 const int XLocaleNotSupported = -2; 126 const int XConverterNotFound = -3; 127 128 alias int XICCEncodingStyle; 129 enum { 130 XStringStyle, /* STRING */ 131 XCompoundTextStyle, /* COMPOUND_TEXT */ 132 XTextStyle, /* text in owner's encoding (current locale) */ 133 XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */ 134 /* The following is an XFree86 extension, introduced in November 2000 */ 135 XUTF8StringStyle /* UTF8_STRING */ 136 } 137 138 struct XIconSize{ 139 int min_width, min_height; 140 int max_width, max_height; 141 int width_inc, height_inc; 142 } 143 144 struct XClassHint{ 145 char* res_name; 146 char* res_class; 147 } ; 148 149 version( XUTIL_DEFINE_FUNCTIONS ){ 150 extern int XDestroyImage( XImage* ximage ); 151 extern c_ulong XGetPixel( XImage *ximage, int x, int y ); 152 extern int XPutPixel( XImage* ximage, int x, int y, c_ulong pixel ); 153 extern XImage* XSubImage( XImage *ximage, int x, int y, uint width, uint height ); 154 extern int XAddPixel( XImage *ximage, c_long value); 155 } 156 else{ 157 /* 158 * These macros are used to give some sugar to the image routines so that 159 * naive people are more comfortable with them. 160 */ 161 /** 162 * XDestroyImage 163 * The XDestroyImage() function deallocates the memory associated with the XImage structure. 164 * Note that when the image is created using XCreateImage(), XGetImage(), or XSubImage(), the destroy procedure that this macro calls frees both the image structure and the data pointed to by the image structure. 165 * Params: 166 * ximage = Specifies the image. 167 * See_Also: 168 * XAddPixel(), XCreateImage(), XGetPixel(), XPutPixel(), XSubImage(), http://tronche.com/gui/x/xlib/utilities/manipulating-images.html 169 */ 170 int XDestroyImage( XImage* ximage ){ 171 return ximage.f.destroy_image(ximage); 172 } 173 /** 174 * XGetPixel 175 * The XGetPixel() function returns the specified pixel from the named image. The pixel value is returned in normalized format (that is, the least-significant byte of the long is the least-significant byte of the pixel). The image must contain the x and y coordinates. 176 * Params: 177 * ximage = Specifies the image. 178 * x = Specify the x coordinate. 179 * y = Specify the y coordinate. 180 * See_Also: 181 * XAddPixel(), XCreateImage(), XGetPixel(), XPutPixel(), XSubImage(), http://tronche.com/gui/x/xlib/utilities/manipulating-images.html 182 */ 183 c_ulong XGetPixel( XImage* ximage, int x, int y ){ 184 return ximage.f.get_pixel(ximage, x, y); 185 } 186 /** 187 * XPutPixel 188 * The XPutPixel() function overwrites the pixel in the named image with the specified pixel value. The input pixel value must be in normalized format (that is, the least-significant byte of the long is the least-significant byte of the pixel). The image must contain the x and y coordinates. 189 * Params: 190 * ximage = Specifies the image. 191 * x = Specify the x coordinate. 192 * y = Specify the y coordinate. 193 * pixel = Specifies the new pixel value. 194 * See_Also: 195 * XAddPixel(), XCreateImage(), XGetPixel(), XPutPixel(), XSubImage(), http://tronche.com/gui/x/xlib/utilities/manipulating-images.html 196 */ 197 int XPutPixel( XImage* ximage, int x, int y, c_ulong pixel ){ 198 return ximage.f.put_pixel(ximage, x, y, pixel); 199 } 200 /** 201 * XSubImage 202 * The XSubImage() function creates a new image that is a subsection of an existing one. It allocates the memory necessary for the new XImage structure and returns a pointer to the new image. The data is copied from the source image, and the image must contain the rectangle defined by x, y, subimage_width, and subimage_height. 203 * Params: 204 * ximage = Specifies the image. 205 * x = Specify the x coordinate. 206 * y = Specify the y coordinate. 207 * subimage_width = Specifies the width of the new subimage, in pixels. 208 * subimage_height = Specifies the height of the new subimage, in pixels. 209 * See_Also: 210 * XAddPixel(), XCreateImage(), XGetPixel(), XPutPixel(), XSubImage(), http://tronche.com/gui/x/xlib/utilities/manipulating-images.html 211 */ 212 XImage XSubImage( XImage* ximage, int x, int y, uint width, uint height ){ 213 return ximage.f.sub_image(ximage, x, y, width, height); 214 } 215 /** 216 * XAddPixel 217 * The XAddPixel() function adds a constant value to every pixel in an image. It is useful when you have a base pixel value from allocating color resources and need to manipulate the image to that form. 218 * Params: 219 * ximage = Specifies the image. 220 * value = Specifies the constant value that is to be added. 221 * See_Also: 222 * XAddPixel(), XCreateImage(), XGetPixel(), XPutPixel(), XSubImage(), http://tronche.com/gui/x/xlib/utilities/manipulating-images.html 223 */ 224 int XAddPixel( XImage* ximage, c_long value ){ 225 return ximage.f.add_pixel(ximage, value); 226 } 227 } 228 229 /* 230 * Compose sequence status structure, used in calling XLookupString. 231 */ 232 struct XComposeStatus { 233 XPointer compose_ptr; /* state table pointer */ 234 int chars_matched; /* match state */ 235 } 236 237 /* 238 * Keysym macros, used on Keysyms to test for classes of symbols 239 */ 240 template IsKeypadKey(KeySym keysym){ 241 const bool IsKeypadKey = (( keysym >= XK_KP_Space ) && ( keysym <= XK_KP_Equal)); 242 } 243 244 template IsPrivateKeypadKey(KeySym keysym){ 245 const bool IsPrivateKeypadKey = (( keysym >= 0x11000000 ) && ( keysym <= 0x1100FFFF)); 246 } 247 248 template IsCursorKey(KeySym keysym){ 249 const bool IsCursorKey = (( keysym >= XK_Home ) && ( keysym < XK_Select)); 250 } 251 252 template IsPFKey(KeySym keysym){ 253 const bool IsPFKey = (( keysym >= XK_KP_F1 ) && ( keysym <= XK_KP_F4)); 254 } 255 256 template IsFunctionKey(KeySym keysym){ 257 const bool IsFunctionKey = (( keysym >= XK_F1 ) && (keysym <= XK_F35)); 258 } 259 260 template IsMiscFunctionKey(KeySym keysym){ 261 const bool IsMiscFunctionKey = (( keysym >= XK_Select ) && ( keysym <= XK_Break)); 262 } 263 264 static if( XK_XKB_KEYS ){ 265 template IsModifierKey(KeySym keysym){ 266 const bool IsModifierKey = ( ( (keysym >= XK_Shift_L) && (keysym <= XK_Hyper_R) ) 267 || ( (keysym >= XK_ISO_Lock) && (keysym <= XK_ISO_Last_Group_Lock) ) 268 || ( keysym == XK_Mode_switch) 269 || ( keysym == XK_Num_Lock) 270 ); 271 } 272 } 273 else{ 274 template IsModifierKey(keysym){ 275 const bool IsModifierKey = (((keysym >= XK_Shift_L) && (keysym <= XK_Hyper_R)) 276 || (keysym == XK_Mode_switch) 277 || (keysym == XK_Num_Lock) 278 ); 279 } 280 } 281 /* 282 * opaque reference to Region data type 283 */ 284 alias _XRegion* Region; 285 286 /* Return values from XRectInRegion() */ 287 enum { 288 RectangleOut = 0, 289 RectangleIn = 1, 290 RectanglePart = 2 291 } 292 293 294 /* 295 * Information used by the visual utility routines to find desired visual 296 * type from the many visuals a display may support. 297 */ 298 299 struct XVisualInfo{ 300 Visual* visual; 301 VisualID visualid; 302 int screen; 303 int depth; 304 int c_class; /* C++ */; 305 c_ulong red_mask; 306 c_ulong green_mask; 307 c_ulong blue_mask; 308 int colormap_size; 309 int bits_per_rgb; 310 } 311 312 enum { 313 VisualNoMask = 0x0, 314 VisualIDMask = 0x1, 315 VisualScreenMask = 0x2, 316 VisualDepthMask = 0x4, 317 VisualClassMask = 0x8, 318 VisualRedMaskMask = 0x10, 319 VisualGreenMaskMask = 0x20, 320 VisualBlueMaskMask = 0x40, 321 VisualColormapSizeMask = 0x80, 322 VisualBitsPerRGBMask = 0x100, 323 VisualAllMask = 0x1FF 324 } 325 326 /* 327 * This defines a window manager property that clients may use to 328 * share standard color maps of type RGB_COLOR_MAP: 329 */ 330 struct XStandardColormap{ 331 Colormap colormap; 332 c_ulong red_max; 333 c_ulong red_mult; 334 c_ulong green_max; 335 c_ulong green_mult; 336 c_ulong blue_max; 337 c_ulong blue_mult; 338 c_ulong base_pixel; 339 VisualID visualid; /* added by ICCCM version 1 */ 340 XID killid; /* added by ICCCM version 1 */ 341 } 342 343 const XID ReleaseByFreeingColormap = 1L; /* for killid field above */ 344 345 346 /* 347 * return codes for XReadBitmapFile and XWriteBitmapFile 348 */ 349 enum { 350 BitmapSuccess = 0, 351 BitmapOpenFailed = 1, 352 BitmapFileInvalid = 2, 353 BitmapNoMemory = 3 354 } 355 356 /***************************************************************** 357 * 358 * Context Management 359 * 360 ****************************************************************/ 361 362 363 /* Associative lookup table return codes */ 364 enum { 365 XCSUCCESS = 0, /* No error. */ 366 XCNOMEM = 1, /* Out of memory */ 367 XCNOENT = 2, /* No entry in table */ 368 } 369 370 alias int XContext; 371 372 template XUniqueContext(){ 373 const XContext XUniqueContext = XrmUniqueQuark(); 374 } 375 376 XContext XStringToContext(char* statement){ 377 return XrmStringToQuark(statement); 378 } 379 380 /* The following declarations are alphabetized. */ 381 382 extern XClassHint* XAllocClassHint ( ); 383 384 extern XIconSize* XAllocIconSize ( ); 385 386 extern XSizeHints* XAllocSizeHints ( ); 387 388 extern XStandardColormap* XAllocStandardColormap ( ); 389 390 extern XWMHints* XAllocWMHints ( ); 391 392 extern int XClipBox( 393 Region /* r */, 394 XRectangle* /* rect_return */ 395 ); 396 397 extern Region XCreateRegion( ); 398 399 extern char* XDefaultString ( ); 400 401 extern int XDeleteContext( 402 Display* /* display */, 403 XID /* rid */, 404 XContext /* context */ 405 ); 406 407 extern int XDestroyRegion( 408 Region /* r */ 409 ); 410 411 extern int XEmptyRegion( 412 Region /* r */ 413 ); 414 415 extern int XEqualRegion( 416 Region /* r1 */, 417 Region /* r2 */ 418 ); 419 420 extern int XFindContext( 421 Display* /* display */, 422 XID /* rid */, 423 XContext /* context */, 424 XPointer* /* data_return */ 425 ); 426 427 extern Status XGetClassHint( 428 Display* /* display */, 429 Window /* w */, 430 XClassHint* /* class_hints_return */ 431 ); 432 433 extern Status XGetIconSizes( 434 Display* /* display */, 435 Window /* w */, 436 XIconSize** /* size_list_return */, 437 int* /* count_return */ 438 ); 439 440 extern Status XGetNormalHints( 441 Display* /* display */, 442 Window /* w */, 443 XSizeHints* /* hints_return */ 444 ); 445 446 extern Status XGetRGBColormaps( 447 Display* /* display */, 448 Window /* w */, 449 XStandardColormap** /* stdcmap_return */, 450 int* /* count_return */, 451 Atom /* property */ 452 ); 453 454 extern Status XGetSizeHints( 455 Display* /* display */, 456 Window /* w */, 457 XSizeHints* /* hints_return */, 458 Atom /* property */ 459 ); 460 461 extern Status XGetStandardColormap( 462 Display* /* display */, 463 Window /* w */, 464 XStandardColormap* /* colormap_return */, 465 Atom /* property */ 466 ); 467 468 extern Status XGetTextProperty( 469 Display* /* display */, 470 Window /* window */, 471 XTextProperty* /* text_prop_return */, 472 Atom /* property */ 473 ); 474 475 extern XVisualInfo* XGetVisualInfo( 476 Display* /* display */, 477 long /* vinfo_mask */, 478 XVisualInfo* /* vinfo_template */, 479 int* /* nitems_return */ 480 ); 481 482 extern Status XGetWMClientMachine( 483 Display* /* display */, 484 Window /* w */, 485 XTextProperty* /* text_prop_return */ 486 ); 487 488 extern XWMHints *XGetWMHints( 489 Display* /* display */, 490 Window /* w */ 491 ); 492 493 extern Status XGetWMIconName( 494 Display* /* display */, 495 Window /* w */, 496 XTextProperty* /* text_prop_return */ 497 ); 498 499 extern Status XGetWMName( 500 Display* /* display */, 501 Window /* w */, 502 XTextProperty* /* text_prop_return */ 503 ); 504 505 extern Status XGetWMNormalHints( 506 Display* /* display */, 507 Window /* w */, 508 XSizeHints* /* hints_return */, 509 long* /* supplied_return */ 510 ); 511 512 extern Status XGetWMSizeHints( 513 Display* /* display */, 514 Window /* w */, 515 XSizeHints* /* hints_return */, 516 long* /* supplied_return */, 517 Atom /* property */ 518 ); 519 520 extern Status XGetZoomHints( 521 Display* /* display */, 522 Window /* w */, 523 XSizeHints* /* zhints_return */ 524 ); 525 526 extern int XIntersectRegion( 527 Region /* sra */, 528 Region /* srb */, 529 Region /* dr_return */ 530 ); 531 532 extern void XConvertCase( 533 KeySym /* sym */, 534 KeySym* /* lower */, 535 KeySym* /* upper */ 536 ); 537 538 extern int XLookupString( 539 XKeyEvent* /* event_struct */, 540 char* /* buffer_return */, 541 int /* bytes_buffer */, 542 KeySym* /* keysym_return */, 543 XComposeStatus* /* status_in_out */ 544 ); 545 546 extern Status XMatchVisualInfo( 547 Display* /* display */, 548 int /* screen */, 549 int /* depth */, 550 int /* class */, 551 XVisualInfo* /* vinfo_return */ 552 ); 553 554 extern int XOffsetRegion( 555 Region /* r */, 556 int /* dx */, 557 int /* dy */ 558 ); 559 560 extern Bool XPointInRegion( 561 Region /* r */, 562 int /* x */, 563 int /* y */ 564 ); 565 566 extern Region XPolygonRegion( 567 XPoint* /* points */, 568 int /* n */, 569 int /* fill_rule */ 570 ); 571 572 extern int XRectInRegion( 573 Region /* r */, 574 int /* x */, 575 int /* y */, 576 uint /* width */, 577 uint /* height */ 578 ); 579 580 extern int XSaveContext( 581 Display* /* display */, 582 XID /* rid */, 583 XContext /* context */, 584 char* /* data */ 585 ); 586 587 extern int XSetClassHint( 588 Display* /* display */, 589 Window /* w */, 590 XClassHint* /* class_hints */ 591 ); 592 593 extern int XSetIconSizes( 594 Display* /* display */, 595 Window /* w */, 596 XIconSize* /* size_list */, 597 int /* count */ 598 ); 599 600 extern int XSetNormalHints( 601 Display* /* display */, 602 Window /* w */, 603 XSizeHints* /* hints */ 604 ); 605 606 extern void XSetRGBColormaps( 607 Display* /* display */, 608 Window /* w */, 609 XStandardColormap* /* stdcmaps */, 610 int /* count */, 611 Atom /* property */ 612 ); 613 614 extern int XSetSizeHints( 615 Display* /* display */, 616 Window /* w */, 617 XSizeHints* /* hints */, 618 Atom /* property */ 619 ); 620 621 extern int XSetStandardProperties( 622 Display* /* display */, 623 Window /* w */, 624 char* /* window_name */, 625 char* /* icon_name */, 626 Pixmap /* icon_pixmap */, 627 char** /* argv */, 628 int /* argc */, 629 XSizeHints* /* hints */ 630 ); 631 632 extern void XSetTextProperty( 633 Display* /* display */, 634 Window /* w */, 635 XTextProperty* /* text_prop */, 636 Atom /* property */ 637 ); 638 639 extern void XSetWMClientMachine( 640 Display* /* display */, 641 Window /* w */, 642 XTextProperty* /* text_prop */ 643 ); 644 645 extern int XSetWMHints( 646 Display* /* display */, 647 Window /* w */, 648 XWMHints* /* wm_hints */ 649 ); 650 651 extern void XSetWMIconName( 652 Display* /* display */, 653 Window /* w */, 654 XTextProperty* /* text_prop */ 655 ); 656 657 extern void XSetWMName( 658 Display* /* display */, 659 Window /* w */, 660 XTextProperty* /* text_prop */ 661 ); 662 663 extern void XSetWMNormalHints( 664 Display* /* display */, 665 Window /* w */, 666 XSizeHints* /* hints */ 667 ); 668 669 extern void XSetWMProperties( 670 Display* /* display */, 671 Window /* w */, 672 XTextProperty* /* window_name */, 673 XTextProperty* /* icon_name */, 674 char** /* argv */, 675 int /* argc */, 676 XSizeHints* /* normal_hints */, 677 XWMHints* /* wm_hints */, 678 XClassHint* /* class_hints */ 679 ); 680 681 extern void XmbSetWMProperties( 682 Display* /* display */, 683 Window /* w */, 684 char* /* window_name */, 685 char* /* icon_name */, 686 char** /* argv */, 687 int /* argc */, 688 XSizeHints* /* normal_hints */, 689 XWMHints* /* wm_hints */, 690 XClassHint* /* class_hints */ 691 ); 692 693 extern void Xutf8SetWMProperties( 694 Display* /* display */, 695 Window /* w */, 696 char* /* window_name */, 697 char* /* icon_name */, 698 char** /* argv */, 699 int /* argc */, 700 XSizeHints* /* normal_hints */, 701 XWMHints* /* wm_hints */, 702 XClassHint* /* class_hints */ 703 ); 704 705 extern void XSetWMSizeHints( 706 Display* /* display */, 707 Window /* w */, 708 XSizeHints* /* hints */, 709 Atom /* property */ 710 ); 711 712 extern int XSetRegion( 713 Display* /* display */, 714 GC /* gc */, 715 Region /* r */ 716 ); 717 718 extern void XSetStandardColormap( 719 Display* /* display */, 720 Window /* w */, 721 XStandardColormap* /* colormap */, 722 Atom /* property */ 723 ); 724 725 extern int XSetZoomHints( 726 Display* /* display */, 727 Window /* w */, 728 XSizeHints* /* zhints */ 729 ); 730 731 extern int XShrinkRegion( 732 Region /* r */, 733 int /* dx */, 734 int /* dy */ 735 ); 736 737 extern Status XStringListToTextProperty( 738 char** /* list */, 739 int /* count */, 740 XTextProperty* /* text_prop_return */ 741 ); 742 743 extern int XSubtractRegion( 744 Region /* sra */, 745 Region /* srb */, 746 Region /* dr_return */ 747 ); 748 749 extern int XmbTextListToTextProperty( 750 Display* display, 751 char** list, 752 int count, 753 XICCEncodingStyle style, 754 XTextProperty* text_prop_return 755 ); 756 757 extern int XwcTextListToTextProperty( 758 Display* display, 759 wchar** list, 760 int count, 761 XICCEncodingStyle style, 762 XTextProperty* text_prop_return 763 ); 764 765 extern int Xutf8TextListToTextProperty( 766 Display* display, 767 char** list, 768 int count, 769 XICCEncodingStyle style, 770 XTextProperty* text_prop_return 771 ); 772 773 extern void XwcFreeStringList( 774 wchar** list 775 ); 776 777 extern Status XTextPropertyToStringList( 778 XTextProperty* /* text_prop */, 779 char*** /* list_return */, 780 int* /* count_return */ 781 ); 782 783 extern int XmbTextPropertyToTextList( 784 Display* display, 785 const XTextProperty* text_prop, 786 char*** list_return, 787 int* count_return 788 ); 789 790 extern int XwcTextPropertyToTextList( 791 Display* display, 792 const XTextProperty* text_prop, 793 wchar*** list_return, 794 int* count_return 795 ); 796 797 extern int Xutf8TextPropertyToTextList( 798 Display* display, 799 const XTextProperty* text_prop, 800 char*** list_return, 801 int* count_return 802 ); 803 804 extern int XUnionRectWithRegion( 805 XRectangle* /* rectangle */, 806 Region /* src_region */, 807 Region /* dest_region_return */ 808 ); 809 810 extern int XUnionRegion( 811 Region /* sra */, 812 Region /* srb */, 813 Region /* dr_return */ 814 ); 815 816 extern int XWMGeometry( 817 Display* /* display */, 818 int /* screen_number */, 819 char* /* user_geometry */, 820 char* /* default_geometry */, 821 uint /* border_width */, 822 XSizeHints* /* hints */, 823 int* /* x_return */, 824 int* /* y_return */, 825 int* /* width_return */, 826 int* /* height_return */, 827 int* /* gravity_return */ 828 ); 829 830 extern int XXorRegion( 831 Region /* sra */, 832 Region /* srb */, 833 Region /* dr_return */ 834 );