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