xutil.pp 19 KB

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