Xutil.h 21 KB

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