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