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