home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / Xmu / Xmu.ms < prev    next >
Encoding:
Text File  |  1991-07-30  |  66.9 KB  |  2,464 lines

  1. .sp 8
  2. .ce 2
  3. \s+2\fBXmu Library\fP\s-2
  4. .sp 6p
  5. X Version 11, Release 5
  6. .sp 1
  7. .ce 1
  8. ``\fIDon't ask.\fP''
  9. .sp 2
  10. .LP
  11. Copyright \(co 1989 by the Massachusetts Institute of Technology
  12. .LP
  13. Permission to use, copy, modify, and distribute this documentation for any
  14. purpose and without fee is hereby granted, provided that the above copyright
  15. notice and this permission notice appear in all copies.  MIT makes no
  16. representations about the suitability for any purpose of the information in
  17. this document.  This documentation is provided ``as is'' without express or
  18. implied warranty.
  19. .sp 2
  20. .NH 1
  21. Introduction
  22. .LP
  23. The Xmu Library is a collection of miscellaneous (some might say random)
  24. utility functions that have been useful in building various applications
  25. and widgets.  This library is required by the Athena Widgets.
  26. .LP
  27. .NH 1
  28. Atom Functions
  29. .LP
  30. The use the functions and macros defined in this section, you should include
  31. the header file
  32. .Pn < X11/Xmu/Atoms.h >.
  33. .sp
  34. .FD 0
  35. XA_ATOM_PAIR(\fId\fP)
  36. XA_CHARACTER_POSITION(\fId\fP)
  37. XA_CLASS(\fId\fP)
  38. XA_CLIENT_WINDOW(\fId\fP)
  39. XA_CLIPBOARD(\fId\fP)
  40. XA_COMPOUND_TEXT(\fId\fP)
  41. XA_DECNET_ADDRESS(\fId\fP)
  42. XA_DELETE(\fId\fP)
  43. XA_FILENAME(\fId\fP)
  44. XA_HOSTNAME(\fId\fP)
  45. XA_IP_ADDRESS(\fId\fP)
  46. XA_LENGTH(\fId\fP)
  47. XA_LIST_LENGTH(\fId\fP)
  48. XA_NAME(\fId\fP)
  49. XA_NET_ADDRESS(\fId\fP)
  50. XA_NULL(\fId\fP)
  51. XA_OWNER_OS(\fId\fP)
  52. XA_SPAN(\fId\fP)
  53. XA_TARGETS(\fId\fP)
  54. XA_TEXT(\fId\fP)
  55. XA_TIMESTAMP(\fId\fP)
  56. XA_USER(\fId\fP)
  57. .FN
  58. .LP
  59. These macros take a display as argument and return an
  60. .PN Atom .
  61. The name of the
  62. atom is obtained from the macro name by removing the leading characters
  63. ``XA_''.  The
  64. .PN Atom
  65. value is cached, such that subsequent requests do not cause
  66. another round-trip to the server.
  67. .sp
  68. .FD 0
  69. AtomPtr XmuMakeAtom(\fIname\fP)
  70. .br
  71.       char* \fIname\fP;
  72. .FN
  73. .IP \fIname\fP 1i
  74. specifies the atom name
  75. .LP
  76. This function creates and initializes an opaque object, an
  77. .PN AtomPtr ,
  78. for an
  79. .PN Atom
  80. with the
  81. given name.
  82. .PN XmuInternAtom
  83. can be used to cache the Atom value for one or more displays.
  84. .sp
  85. .FD 0
  86. char *XmuNameOfAtom(\fIatom_ptr\fP)
  87. .br
  88.       AtomPtr \fIatom_ptr\fP;
  89. .FN
  90. .IP \fIatom_ptr\fP 1i
  91. specifies the AtomPtr
  92. .LP
  93. The function returns the name of an AtomPtr.
  94. .sp
  95. .FD 0
  96. Atom XmuInternAtom(\fId\fP, \fIatom_ptr\fP)
  97. .br
  98.       Display *\fId\fP;
  99. .br
  100.       AtomPtr \fIatom_ptr\fP;
  101. .FN
  102. .IP \fId\fP 1i
  103. specifies the connection to the X server
  104. .IP \fIatom_ptr\fP 1i
  105. specifies the AtomPtr
  106. .LP
  107. This function returns the
  108. .PN Atom
  109. for an
  110. .PN AtomPtr .
  111. The
  112. .PN Atom
  113. is cached,
  114. such that subsequent requests do not cause another round-trip to the server.
  115. .sp
  116. .FD 0
  117. char *XmuGetAtomName(\fId\fP, \fIatom\fP)
  118. .br
  119.       Display *\fId\fP;
  120. .br
  121.       Atom \fIatom\fP;
  122. .FN
  123. .IP \fId\fP 1i
  124. specifies the connection to the X server
  125. .IP \fIatom\fP 1i
  126. specifies the atom whose name is desired
  127. .LP
  128. This function returns the name of an
  129. .PN Atom .
  130. The result is cached, such that subsequent
  131. requests do not cause another round-trip to the server.
  132. .sp
  133. .FD 0
  134. void XmuInternStrings(\fId\fP, \fInames\fP, \fIcount\fP, \fIatoms\fP)
  135. .br
  136.       Display *\fId\fP;
  137. .br
  138.       String *\fInames\fP;
  139. .br
  140.       Cardinal \fIcount\fP;
  141. .br
  142.       Atom *\fIatoms\fP;
  143. .FN
  144. .IP \fId\fP 1i
  145. specifies the connection to the X server
  146. .IP \fInames\fP 1i
  147. specifies the strings to intern
  148. .IP \fIcount\fP 1i
  149. specifies the number of strings
  150. .IP \fIatoms\fP 1i
  151. returns the list of Atom values
  152. .LP
  153. This function converts a list of atom names into
  154. .PN Atom
  155. values.  The results are cached, such
  156. that subsequent requests do not cause further round-trips to the server.
  157. The caller is responsible for preallocating the array pointed at by atoms.
  158. .LP
  159. .NH 1
  160. Error Handler Functions
  161. .LP
  162. To use the functions defined in this section, you should include the header
  163. file
  164. .Pn < X11/Xmu/Error.h >.
  165. .sp
  166. .FD 0
  167. int XmuPrintDefaultErrorMessage(\fIdpy\fP, \fIevent\fP, \fIfp\fP)
  168. .br
  169.       Display *\fIdpy\fP;
  170. .br
  171.       XErrorEvent *\fIevent\fP;
  172. .br
  173.       FILE *\fIfp\fP;
  174. .FN
  175. .IP \fIdpy\fP 1i
  176. specifies the connection to the X server
  177. .IP \fIevent\fP 1i
  178. specifies the error
  179. .IP \fIfp\fP 1i
  180. specifies where to print the error message
  181. .LP
  182. This function prints an error message, equivalent to Xlib's default error
  183. message for protocol errors.  It returns a non-zero value
  184. if the caller should consider exiting, otherwise it returns 0.
  185. This function can be used when you need to
  186. write your own error handler, but need to print out an error from within
  187. that handler.
  188. .sp
  189. .FD 0
  190. int XmuSimpleErrorHandler(\fIdpy\fP, \fIerrorp\fP)
  191. .br
  192.       Display *\fIdpy\fP;
  193. .br
  194.       XErrorEvent *\fIerrorp\fP;
  195. .FN
  196. .IP \fIdpy\fP 1i
  197. specifies the connection to the X server
  198. .IP \fIerrorp\fP 1i
  199. specifies the error
  200. .LP
  201. This function ignores errors for
  202. .PN BadWindow
  203. errors for
  204. .PN XQueryTree
  205. and
  206. .PN XGetWindowAttributes ,
  207. and ignores
  208. .PN BadDrawable
  209. errors for
  210. .PN XGetGeometry ;
  211. it returns 0 in those cases.  Otherwise, it prints the default error message,
  212. and returns a non-zero value if the caller should consider exiting,
  213. and 0 if the caller should not exit.
  214. .LP
  215. .NH 1
  216. System Utility Functions
  217. .LP
  218. To use the functions defined in this section, you should include the header
  219. file
  220. .Pn < X11/Xmu/SysUtil.h >.
  221. .sp
  222. .FD 0
  223. int XmuGetHostname(\fIbuf\fP, \fImaxlen\fP)
  224. .br
  225.       char *\fIbuf\fP;
  226. .br
  227.       int \fImaxlen\fP;
  228. .FN
  229. .IP \fIbuf\fP 1i
  230. returns the host name
  231. .IP \fImaxlen\fP 1i
  232. specifies the length of buf
  233. .LP
  234. This function stores the null terminated name of the local host in buf, and
  235. returns length of the name.  This function hides operating system differences,
  236. such as whether to call gethostname or uname.
  237. .LP
  238. .NH 1
  239. Window Utility Functions
  240. .LP
  241. To use the functions defined in this section, you should include the header
  242. file
  243. .Pn < X11/Xmu/WinUtil.h >.
  244. .sp
  245. .FD 0
  246. Screen *XmuScreenOfWindow(\fIdpy\fP, \fIw\fP)
  247. .br
  248.       Display *\fIdpy\fP;
  249. .br
  250.       Window \fIw\fP;
  251. .FN
  252. .IP \fIdpy\fP 1i
  253. specifies the connection to the X server
  254. .IP \fIw\fP 1i
  255. specifies the window
  256. .LP
  257. This function returns the
  258. .PN Screen
  259. on which the specified window was created.
  260. .sp
  261. .FD 0
  262. Window XmuClientWindow(\fIdpy\fP, \fIwin\fP)
  263. .br
  264.       Display *\fIdpy\fP;
  265. .br
  266.       Window \fIwin\fP;
  267. .FN
  268. .IP \fIdpy\fP 1i
  269. specifies the connection to the X server
  270. .IP \fIwin\fP 1i
  271. specifies the window
  272. .LP
  273. This function finds a window, at or below the specified window, which has a
  274. WM_STATE property.  If such a window is found, it is returned, otherwise the
  275. argument window is returned.
  276. .sp
  277. .FD 0
  278. Bool XmuUpdateMapHints(\fIdpy\fP, \fIw\fP, \fIhints\fP)
  279. .br
  280.       Display *\fIdpy\fP;
  281. .br
  282.       Window \fIw\fP;
  283. .br
  284.       XSizeHints *\fIhints\fP;
  285. .FN
  286. .IP \fIdpy\fP 1i
  287. specifies the connection to the X server
  288. .IP \fIwin\fP 1i
  289. specifies the window
  290. .IP \fIhints\fP 1i
  291. specifies the new hints, or NULL
  292. .LP
  293. This function clears the
  294. .PN PPosition
  295. and
  296. .PN PSize
  297. flags and sets the
  298. .PN USPosition
  299. and
  300. .PN USSize
  301. flags in the hints structure, and then stores the hints for the
  302. window using
  303. .PN XSetWMNormalHints
  304. and returns
  305. .PN True .
  306. If NULL is passed for the
  307. hints structure, then the current hints are read back from the window using
  308. .PN XGetWMNormalHints
  309. and are used instead, and
  310. .PN True
  311. is returned; otherwise
  312. .PN False
  313. is returned.
  314. .LP
  315. .NH 1
  316. Cursor Utility Functions
  317. .LP
  318. To use the functions defined in this section, you should include the header
  319. file
  320. .Pn < X11/Xmu/CurUtil.h >.
  321. .sp
  322. .FD 0
  323. int XmuCursorNameToIndex(\fIname\fP)
  324. .br
  325.       char *\fIname\fP;
  326. .FN
  327. .IP \fIname\fP 1i
  328. specifies the name of the cursor
  329. .LP
  330. This function takes the name of a standard cursor and returns its index
  331. in the standard cursor font.  The cursor names are formed by removing the
  332. ``XC_'' prefix from the cursor defines listed in Appendix B of the Xlib
  333. manual.
  334. .LP
  335. .NH 1
  336. Graphics Functions
  337. .LP
  338. To use the functions defined in this section, you should include the header
  339. file
  340. .Pn < X11/Xmu/Drawing.h >.
  341. .sp
  342. .FD 0
  343. void XmuDrawRoundedRectangle(\fIdpy\fP, \fIdraw\fP, \fIgc\fP, \fIx\fP, \fIy\fP, \fIw\fP, \fIh\fP, \fIew\fP, \fIeh\fP)
  344. .br
  345.       Display *\fIdpy\fP;
  346. .br
  347.       Drawable \fIdraw\fP;
  348. .br
  349.       GC \fIgc\fP;
  350. .br
  351.       int \fIx\fP, \fIy\fP, \fIw\fP, \fIh\fP, \fIew\fP, \fIeh\fP;
  352. .FN
  353. .IP \fIdpy\fP 1i
  354. specifies the connection to the X server
  355. .IP \fIdraw\fP 1i
  356. specifies the drawable
  357. .IP \fIgc\fP 1i
  358. specifies the GC
  359. .IP \fIx\fP 1i
  360. specifies the upper left x coordinate
  361. .IP \fIy\fP 1i
  362. specifies the upper left y coordinate
  363. .IP \fIw\fP 1i
  364. specifies the rectangle width
  365. .IP \fIh\fP 1i
  366. specifies the rectangle height
  367. .IP \fIew\fP 1i
  368. specifies the corner width
  369. .IP \fIeh\fP 1i
  370. specifies the corner height
  371. .LP
  372. This function draws a rounded rectangle, where x, y, w, h are the dimensions
  373. of the overall rectangle, and ew and eh are the sizes of a bounding box that
  374. the corners are drawn inside of; ew should be no more than half of w, and eh
  375. should be no more than half of h.  The current GC line attributes control
  376. all attributes of the line.
  377. .sp
  378. .FD 0
  379. void XmuFillRoundedRectangle(\fIdpy\fP, \fIdraw\fP, \fIgc\fP, \fIx\fP, \fIy\fP, \fIw\fP, \fIh\fP, \fIew\fP, \fIeh\fP)
  380. .br
  381.       Display *\fIdpy\fP;
  382. .br
  383.       Drawable \fIdraw\fP;
  384. .br
  385.       GC \fIgc\fP;
  386. .br
  387.       int \fIx\fP, \fIy\fP, \fIw\fP, \fIh\fP, \fIew\fP, \fIeh\fP;
  388. .FN
  389. .IP \fIdpy\fP 1i
  390. specifies the connection to the X server
  391. .IP \fIdraw\fP 1i
  392. specifies the drawable
  393. .IP \fIgc\fP 1i
  394. specifies the GC
  395. .IP \fIx\fP 1i
  396. specifies the upper left x coordinate
  397. .IP \fIy\fP 1i
  398. specifies the upper left y coordinate
  399. .IP \fIw\fP 1i
  400. specifies the rectangle width
  401. .IP \fIh\fP 1i
  402. specifies the rectangle height
  403. .IP \fIew\fP 1i
  404. specifies the corner width
  405. .IP \fIeh\fP 1i
  406. specifies the corner height
  407. .LP
  408. This function draws a filled rounded rectangle, where x, y, w, h are the
  409. dimensions of the overall rectangle, and ew and eh are the sizes of a
  410. bounding box that the corners are drawn inside of; ew should be no more than
  411. half of w, and eh should be no more than half of h.  The current GC fill
  412. settings control all attributes of the fill contents.
  413. .sp
  414. .FD 0
  415. XmuDrawLogo(\fIdpy\fP, \fIdrawable\fP, \fIgcFore\fP, \fIgcBack\fP, \fIx\fP, \fIy\fP, \fIwidth\fP, \fIheight\fP)
  416. .br
  417.       Display *\fIdpy\fP;
  418. .br
  419.       Drawable \fIdrawable\fP;
  420. .br
  421.       GC \fIgcFore\fP, \fIgcBack\fP;
  422. .br
  423.       int \fIx\fP, \fIy\fP;
  424. .br
  425.       unsigned int \fIwidth\fP, \fIheight\fP;
  426. .FN
  427. .IP \fIdpy\fP 1i
  428. specifies the connection to the X server
  429. .IP \fIdrawable\fP 1i
  430. specifies the drawable
  431. .IP \fIgcFore\fP 1i
  432. specifies the foreground GC
  433. .IP \fIgcBack\fP 1i
  434. specifies the background GC
  435. .IP \fIx\fP 1i
  436. specifies the upper left x coordinate
  437. .IP \fIy\fP 1i
  438. specifies the upper left y coordinate
  439. .IP \fIwidth\fP 1i
  440. specifies the logo width
  441. .IP \fIheight\fP 1i
  442. specifies the logo height
  443. .LP
  444. This function draws the ``official'' X Window System logo.  The bounding box
  445. of the logo in the drawable is given by x, y, width, and height.  The logo
  446. itself is filled using gcFore, and the rest of the rectangle is filled using
  447. gcBack.
  448. .sp
  449. .FD 0
  450. Pixmap XmuCreateStippledPixmap(\fIscreen\fP, \fIfore\fP, \fIback\fP, \fIdepth\fP)
  451. .br
  452.       Screen *\fIscreen\fP;
  453. .br
  454.       Pixel \fIfore\fP, \fIback\fP;
  455. .br
  456.       unsigned int \fIdepth\fP;
  457. .FN
  458. .IP \fIscreen\fP 1i
  459. specifies the screen the pixmap is created on
  460. .IP \fIfore\fP 1i
  461. specifies the foreground pixel value
  462. .IP \fIback\fP 1i
  463. specifies the background pixel value
  464. .IP \fIdepth\fP 1i
  465. specifies the depth of the pixmap
  466. .LP
  467. This function creates a two pixel by one pixel stippled pixmap of specified
  468. depth on the specified screen.  The pixmap is cached so that multiple
  469. requests share the same pixmap.  The pixmap should be freed with
  470. .PN XmuReleaseStippledPixmap
  471. to maintain correct reference counts.
  472. .sp
  473. .FD 0
  474. void XmuReleaseStippledPixmap(\fIscreen\fP, \fIpixmap\fP)
  475. .br
  476.       Screen *\fIscreen\fP;
  477. .br
  478.       Pixmap \fIpixmap\fP;
  479. .FN
  480. .IP \fIscreen\fP 1i
  481. specifies the screen the pixmap was created on
  482. .IP \fIpixmap\fP 1i
  483. specifies the pixmap to free
  484. .LP
  485. This function frees a pixmap created with
  486. .PN XmuCreateStippledPixmap .
  487. .sp
  488. .FD 0
  489. int XmuReadBitmapData(\fIfstream\fP, \fIwidth\fP, \fIheight\fP, \fIdatap\fP, \fIx_hot\fP, \fIy_hot\fP)
  490.     FILE *\fIfstream\fP;
  491.     unsigned int *\fIwidth\fP, *\fIheight\fP;
  492.     unsigned char **\fIdatap\fP;
  493.     int *\fIx_hot\fP, *\fIy_hot\fP;
  494. .FN
  495. .IP \fIstream\fP 1i
  496. specifies the stream to read from
  497. .IP \fIwidth\fP 1i
  498. returns the width of the bitmap
  499. .IP \fIheight\fP 1i
  500. returns the height of the bitmap
  501. .IP \fIdatap\fP 1i
  502. returns the parsed bitmap data
  503. .IP \fIx_hot\fP 1i
  504. returns the x coordinate of the hotspot
  505. .IP \fIy_hot\fP 1i
  506. returns the y coordinate of the hotspot
  507. .LP
  508. This function reads a standard bitmap file description from the specified
  509. stream, and returns the parsed data in a format suitable for passing to
  510. .PN XCreateBitmapFromData .
  511. The return value of the function has the same
  512. interpretation as the return value for
  513. .PN XReadBitmapFile .
  514. .sp
  515. .FD 0
  516. int XmuReadBitmapDataFromFile(\fIfilename\fP, \fIwidth\fP, \fIheight\fP, \fIdatap\fP, \fIx_hot\fP, \fIy_hot\fP)
  517.     char *\fIfilename\fP;
  518.     unsigned int *\fIwidth\fP, *\fIheight\fP;
  519.     unsigned char **\fIdatap\fP;
  520.     int *\fIx_hot\fP, *\fIy_hot\fP;
  521. .FN
  522. .IP \fIfilename\fP 1i
  523. specifies the file to read from
  524. .IP \fIwidth\fP 1i
  525. returns the width of the bitmap
  526. .IP \fIheight\fP 1i
  527. returns the height of the bitmap
  528. .IP \fIdatap\fP 1i
  529. returns the parsed bitmap data
  530. .IP \fIx_hot\fP 1i
  531. returns the x coordinate of the hotspot
  532. .IP \fIy_hot\fP 1i
  533. returns the y coordinate of the hotspot
  534. .LP
  535. This function reads a standard bitmap file description from the specified
  536. file, and returns the parsed data in a format suitable for passing to
  537. .PN XCreateBitmapFromData .
  538. The return value of the function has the same
  539. interpretation as the return value for
  540. .PN XReadBitmapFile .
  541. .sp
  542. .FD 0
  543. Pixmap XmuLocateBitmapFile(\fIscreen\fP, \fIname\fP, \fIsrcname\fP, \fIsrcnamelen\fP, \fIwidthp\fP, \fIheightp\fP, \fIxhotp\fP, \fIyhotp\fP)
  544.     Screen *\fIscreen\fP;
  545.     char *\fIname\fP;
  546.     char *\fIsrcname\fP;
  547.     int \fIsrcnamelen\fP;
  548.     int *\fIwidthp\fP, *\fIheightp\fP, *\fIxhotp\fP, *\fIyhotp\fP;
  549. .FN
  550. .IP \fIscreen\fP 1i
  551. specifies the screen the pixmap is created on
  552. .IP \fIname\fP 1i
  553. specifies the file to read from
  554. .IP \fIsrcname\fP 1i
  555. returns the full filename of the bitmap
  556. .IP \fIsrcnamelen\fP 1i
  557. specifies the length of the srcname buffer
  558. .IP \fIwidth\fP 1i
  559. returns the width of the bitmap
  560. .IP \fIheight\fP 1i
  561. returns the height of the bitmap
  562. .IP \fIxhotp\fP 1i
  563. returns the x coordinate of the hotspot
  564. .IP \fIyhotp\fP 1i
  565. returns the y coordinate of the hotspot
  566. .LP
  567. This function reads a file in standard bitmap file format, using
  568. .PN XReadBitmapFile ,
  569. and returns the created bitmap.  The filename may be
  570. absolute, or relative to the global resource named bitmapFilePath with class
  571. BitmapFilePath.  If the resource is not defined, the default value is the
  572. build symbol BITMAPDIR, which is typically "/usr/include/X11/bitmaps".  If
  573. srcnamelen is greater than zero and srcname is not NULL, the null terminated
  574. filename will be copied into srcname.  The size and hotspot of the bitmap are
  575. also returned.
  576. .sp
  577. .FD 0
  578. Pixmap XmuCreatePixmapFromBitmap(\fIdpy\fP, \fId\fP, \fIbitmap\fP, \fIwidth\fP, \fIheight\fP, \fIdepth\fP, \fIfore\fP, \fIback\fP)
  579.     Display *\fIdpy\fP;
  580.     Drawable \fId\fP;
  581.     Pixmap \fIbitmap\fP;
  582.     unsigned int \fIwidth\fP, \fIheight\fP;
  583.     unsigned int \fIdepth\fP;
  584.     unsigned long \fIfore\fP, \fIback\fP;
  585. .FN
  586. .IP \fIdpy\fP 1i
  587. specifies the connection to the X server
  588. .IP \fId\fP 1i
  589. specifies the screen the pixmap is created on
  590. .IP \fIbitmap\fP 1i
  591. specifies the bitmap source
  592. .IP \fIwidth\fP 1i
  593. specifies the width of the pixmap
  594. .IP \fIheight\fP 1i
  595. specifies the height of the pixmap
  596. .IP \fIdepth\fP 1i
  597. specifies the depth of the pixmap
  598. .IP \fIfore\fP 1i
  599. specifies the foreground pixel value
  600. .IP \fIback\fP 1i
  601. specifies the background pixel value
  602. .LP
  603. This function creates a pixmap of the specified width, height, and depth, on
  604. the same screen as the specified drawable, and then performs an
  605. .PN XCopyPlane
  606. from the specified bitmap to the pixmap,
  607. using the specified foreground and background pixel values.
  608. The created pixmap is returned.
  609. .LP
  610. .NH 1
  611. Selection Functions
  612. .LP
  613. To use the functions defined in this section, you should include the header
  614. file
  615. .Pn < X11/Xmu/StdSel.h >.
  616. .sp
  617. .FD 0
  618. Boolean XmuConvertStandardSelection(\fIw\fP, \fItime\fP, \fIselection\fP, \fItarget\fP, \fItype\fP, \fIvalue\fP, \fIlength\fP, \fIformat\fP)
  619. .br
  620.       Widget \fIw\fP;
  621. .br
  622.       Time \fItime\fP;
  623. .br
  624.       Atom *\fIselection\fP, *\fItarget\fP, *\fItype\fP;
  625. .br
  626.       caddr_t *\fIvalue\fP;
  627. .br
  628.       unsigned long *\fIlength\fP;
  629. .br
  630.       int *\fIformat\fP;
  631. .FN
  632. .IP \fIw\fP 1i
  633. specifies the widget which currently owns the selection
  634. .IP \fItime\fP 1i
  635. specifies the time at which the selection was established
  636. .IP \fIselection\fP 1i
  637. this argument is ignored
  638. .IP \fItarget\fP 1i
  639. specifies the target type of the selection
  640. .IP \fItype\fP 1i
  641. returns the property type of the converted value
  642. .IP \fIvalue\fP 1i
  643. returns the converted value
  644. .IP \fIlength\fP 1i
  645. returns the number of elements in the converted value
  646. .IP \fIformat\fP 1i
  647. returns the size in bits of the elements
  648. .LP
  649. This function converts the following standard selections: CLASS,
  650. CLIENT_WINDOW, DECNET_ADDRESS, HOSTNAME, IP_ADDRESS, NAME, OWNER_OS,
  651. TARGETS, TIMESTAMP, and USER.  It returns
  652. .PN True
  653. if the conversion was successful, else it returns
  654. .PN False.
  655. .LP
  656. .NH 1
  657. Type Converter Functions
  658. .LP
  659. To use the functions defined in this section, you should include the header
  660. file
  661. .Pn < X11/Xmu/Converters.h >.
  662. .sp
  663. .FD 0
  664. void XmuCvtFunctionToCallback(\fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP)
  665. .br
  666.       XrmValue *\fIargs\fP;
  667. .br
  668.       Cardinal *\fInum_args\fP;
  669. .br
  670.       XrmValuePtr \fIfromVal\fP;
  671. .br
  672.       XrmValuePtr \fItoVal\fP;
  673. .FN
  674. .IP \fIargs\fP 1i
  675. this argument is ignored
  676. .IP \fInum_args\fP 1i
  677. this argument is ignored
  678. .IP \fIfromVal\fP 1i
  679. the function to convert
  680. .IP \fItoVal\fP
  681. the place to store the converted value
  682. .LP
  683. This function converts a callback procedure to a callback list containing
  684. that procedure, with NULL closure data.  To use this converter, include the
  685. following in your widget's ClassInitialize procedure:
  686. .LP
  687. XtAddConverter(XtRCallProc, XtRCallback, XmuCvtFunctionToCallback, NULL, 0);
  688. .sp
  689. .FD 0
  690. void XmuCvtStringToBackingStore(\fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP)
  691. .br
  692.       XrmValue *\fIargs\fP;
  693. .br
  694.       Cardinal *\fInum_args\fP;
  695. .br
  696.       XrmValuePtr \fIfromVal\fP;
  697. .br
  698.       XrmValuePtr \fItoVal\fP;
  699. .FN
  700. .IP \fIargs\fP 1i
  701. this argument is ignored
  702. .IP \fInum_args\fP 1i
  703. this argument must be a pointer to a Cardinal containing the value 0
  704. .IP \fIfromVal\fP 1i
  705. specifies the string to convert
  706. .IP \fItoVal\fP
  707. returns the converted value
  708. .LP
  709. This function converts a string to a backing-store integer as defined in
  710. .Pn < X11/X.h >.
  711. The string "notUseful" converts to
  712. .PN NotUseful ,
  713. "whenMapped" converts to
  714. .PN WhenMapped ,
  715. and "always" converts to
  716. .PN Always .
  717. The string "default" converts to the value
  718. .PN Always +
  719. .PN WhenMapped +
  720. .PN NotUseful .
  721. The case of the string does not matter.
  722. To use this converter, include the following
  723. in your widget's ClassInitialize procedure:
  724. .LP
  725. XtAddConverter(XtRString, XtRBackingStore, XmuCvtStringToBackingStore, NULL, 0);
  726. .sp
  727. .FD 0
  728. void XmuCvtStringToBitmap(\fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP)
  729. .br
  730.       XrmValuePtr \fIargs\fP;
  731. .br
  732.       Cardinal *\fInum_args\fP;
  733. .br
  734.       XrmValuePtr \fIfromVal\fP;
  735. .br
  736.       XrmValuePtr \fItoVal\fP;
  737. .FN
  738. .IP \fIargs\fP 1i
  739. the sole argument specifies the Screen on which to create the bitmap
  740. .IP \fInum_args\fP 1i
  741. must be the value 1
  742. .IP \fIfromVal\fP 1i
  743. specifies the string to convert
  744. .IP \fItoVal\fP
  745. returns the converted value
  746. .LP
  747. This function creates a bitmap (a Pixmap of depth one) suitable for window
  748. manager icons.  The string argument is the name of a file in standard bitmap
  749. file format.  For the possible filename specifications, see
  750. .PN XmuLocateBitmapFile .
  751. To use this converter, include the following in your widget's
  752. ClassInitialize procedure:
  753. .LP
  754. static XtConvertArgRec screenConvertArg[] = {
  755. .br
  756.   {XtBaseOffset, (XtPointer)XtOffset(Widget, core.screen), sizeof(Screen *)}
  757. .br
  758. };
  759. .LP
  760. XtAddConverter(XtRString, XtRBitmap, XmuCvtStringToBitmap,
  761. .br
  762.          screenConvertArg, XtNumber(screenConvertArg));
  763. .sp
  764. .FD 0
  765. Boolean XmuCvtStringToColorCursor(\fIdpy\fP, \fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP, \fIdata\fP)
  766. .br
  767.       Display * \fIdpy\fP;
  768. .br
  769.       XrmValuePtr \fIargs\fP;
  770. .br
  771.       Cardinal *\fInum_args\fP;
  772. .br
  773.       XrmValuePtr \fIfromVal\fP;
  774. .br
  775.       XrmValuePtr \fItoVal\fP;
  776. .br
  777.       XtPointer * \fIdata\fP;
  778. .FN
  779. .Ip \fIdpy\fP 1i
  780. specifies the display to use for conversion warnings
  781. .IP \fIargs\fP 1i
  782. specifies the required conversion arguments
  783. .IP \fInum_args\fP 1i
  784. specifies the number of required conversion arguments, which is 4
  785. .IP \fIfromVal\fP 1i
  786. specifies the string to convert
  787. .IP \fItoVal\fP
  788. returns the converted value
  789. .IP \fIdata\fP
  790. this argument is ignored
  791. .LP
  792. This function converts a string to a
  793. .PN Cursor 
  794. with the foreground and background pixels specified by the conversion
  795. arguments.  The string can either be a
  796. standard cursor name formed by removing the ``XC_'' prefix from any of the
  797. cursor defines listed in Appendix B of the Xlib Manual, a font name and
  798. glyph index in decimal of the form "FONT fontname index [[font] index]",
  799. or a bitmap filename acceptable to
  800. .PN XmuLocateBitmapFile .
  801. To use this converter, include
  802. the following in the widget ClassInitialize procedure:
  803. .LP
  804. static XtConvertArgRec colorCursorConvertArgs[] = {
  805. .br
  806.   {XtWidgetBaseOffset, (XtPointer) XtOffsetOf(WidgetRec, core.screen),
  807.    sizeof(Screen *)},
  808.   {XtResourceString, (XtPointer) XtNpointerColor, sizeof(Pixel)},
  809.   {XtResourceString, (XtPointer) XtNpointerColorBackground, sizeof(Pixel)},
  810.   {XtWidgetBaseOffset, (XtPointer) XtOffsetOf(WidgetRec, core.colormap),
  811.    sizeof(Colormap)}
  812. .br
  813. };
  814. .LP
  815. XtSetTypeConverter(XtRString, XtRColorCursor, XmuCvtStringToColorCursor,
  816. .br
  817.          colorCursorConvertArgs, XtNumber(colorCursorConvertArgs),
  818. .br
  819.                  XtCacheByDisplay, NULL);
  820. The widget must recognize XtNpointerColor and XtNpointerColorBackground as
  821. resources, or specify other appropriate foreground and background resources.
  822. The widget's Realize and SetValues methods must cause the converter to be
  823. invoked with the appropriate arguments when one of the foreground,
  824. background, or cursor resources has changed, or when the window is created,
  825. and must assign the cursor to the window of the widget.
  826. .sp
  827. .FD 0
  828. void XmuCvtStringToCursor(\fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP)
  829. .br
  830.       XrmValuePtr \fIargs\fP;
  831. .br
  832.       Cardinal *\fInum_args\fP;
  833. .br
  834.       XrmValuePtr \fIfromVal\fP;
  835. .br
  836.       XrmValuePtr \fItoVal\fP;
  837. .FN
  838. .IP \fIargs\fP 1i
  839. specifies the required conversion argument, the screen
  840. .IP \fInum_args\fP 1i
  841. specifies the number of required conversion arguments, which is 1
  842. .IP \fIfromVal\fP 1i
  843. specifies the string to convert
  844. .IP \fItoVal\fP
  845. returns the converted value
  846. .LP
  847. This function converts a string to a
  848. .PN Cursor .
  849. The string can either be a
  850. standard cursor name formed by removing the ``XC_'' prefix from any of the
  851. cursor defines listed in Appendix B of the Xlib Manual, a font name and
  852. glyph index in decimal of the form "FONT fontname index [[font] index]", or
  853. a bitmap filename acceptable to
  854. .PN XmuLocateBitmapFile .
  855. To use this converter, include
  856. the following in your widget's ClassInitialize procedure:
  857. .LP
  858. static XtConvertArgRec screenConvertArg[] = {
  859. .br
  860.   {XtBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen), sizeof(Screen *)}
  861. .br
  862. };
  863. .LP
  864. XtAddConverter(XtRString, XtRCursor, XmuCvtStringToCursor,
  865. .br
  866.          screenConvertArg, XtNumber(screenConvertArg));
  867. .sp
  868. .FD 0
  869. void XmuCvtStringToGravity(\fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP)
  870. .br
  871.      XrmValuePtr *\fIargs\fP;
  872. .br
  873.       Cardinal *\fInum_args\fP;
  874. .br
  875.       XrmValuePtr \fIfromVal\fP;
  876. .br
  877.       XrmValuePtr \fItoVal\fP;
  878. .FN
  879. .IP \fIargs\fP 1i
  880. this argument is ignored
  881. .IP \fInum_args\fP 1i
  882. this argument must be a pointer to a Cardinal containing the value 0
  883. .IP \fIfromVal\fP 1i
  884. specifies the string to convert
  885. .IP \fItoVal\fP
  886. returns the converted value
  887. .LP
  888. This function converts a string to an
  889. .PN XtGravity
  890. enumeration value.  The string "forget" and a NULL value convert to
  891. .PN ForgetGravity ,
  892. "NorthWestGravity" converts to 
  893. .PN NorthWestGravity ,
  894. the strings "NorthGravity" and "top" convert to
  895. .PN NorthGravity ,
  896. "NorthEastGravity" converts to
  897. .PN NorthEastGravity ,
  898. the strings "West" and "left" convert to
  899. .PN WestGravity ,
  900. "CenterGravity" converts to
  901. .PN CenterGravity ,
  902. "EastGravity" and "right" convert to
  903. .PN EastGravity ,
  904. "SouthWestGravity" converts to
  905. .PN SouthWestGravity ,
  906. "SouthGravity" and "bottom" convert to
  907. .PN SouthGravity ,
  908. "SouthEastGravity" converts to
  909. .PN SouthEastGravity ,
  910. "StaticGravity" converts to
  911. .PN StaticGravity ,
  912. and "UnmapGravity" converts to
  913. .PN UnmapGravity .
  914. The case of the string does not matter.  To use this converter, include
  915. the following in your widget's class initialize procedure:
  916. .LP
  917. XtAddConverter(XtRString, XtRGravity, XmuCvtStringToGravity, NULL, 0);
  918. .sp
  919. .FD 0
  920. void XmuCvtStringToJustify(\fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP)
  921. .br
  922.       XrmValuePtr *\fIargs\fP;
  923. .br
  924.       Cardinal *\fInum_args\fP;
  925. .br
  926.       XrmValuePtr \fIfromVal\fP;
  927. .br
  928.       XrmValuePtr \fItoVal\fP;
  929. .FN
  930. .IP \fIargs\fP 1i
  931. this argument is ignored
  932. .IP \fInum_args\fP 1i
  933. this argument is ignored
  934. .IP \fIfromVal\fP 1i
  935. specifies the string to convert
  936. .IP \fItoVal\fP
  937. returns the converted value
  938. .LP
  939. This function converts a string to an
  940. .PN XtJustify
  941. enumeration value.  The string "left" converts to
  942. .PN XtJustifyLeft ,
  943. "center" converts to
  944. .PN XtJustifyCenter ,
  945. and "right" converts to
  946. .PN XtJustifyRight .
  947. The case of the string does not matter.  To use this converter,
  948. include the following in your widget's ClassInitialize procedure:
  949. .LP
  950. XtAddConverter(XtRString, XtRJustify, XmuCvtStringToJustify, NULL, 0);
  951. .sp
  952. .FD 0
  953. void XmuCvtStringToLong(\fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP)
  954. .br
  955.       XrmValuePtr \fIargs\fP;
  956. .br
  957.       Cardinal    *\fInum_args\fP;
  958. .br
  959.       XrmValuePtr \fIfromVal\fP;
  960. .br
  961.       XrmValuePtr \fItoVal\fP;
  962. .FN
  963. .IP \fIargs\fP 1i
  964. this argument is ignored
  965. .IP \fInum_args\fP 1i
  966. this argument must be a pointer to a Cardinal containing 0
  967. .IP \fIfromVal\fP 1i
  968. specifies the string to convert
  969. .IP \fItoVal\fP
  970. returns the converted value
  971. .LP
  972. This function converts a string to an integer of type long.  It parses the
  973. string using
  974. .PN sscanf
  975. with a format of "%ld".  To use this converter, include
  976. the following in your widget's ClassInitialize procedure:
  977. .LP
  978. XtAddConverter(XtRString, XtRLong, XmuCvtStringToLong, NULL, 0);
  979. .sp
  980. .FD 0
  981. void XmuCvtStringToOrientation(\fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP)
  982. .br
  983.       XrmValuePtr *\fIargs\fP;
  984. .br
  985.       Cardinal *\fInum_args\fP;
  986. .br
  987.       XrmValuePtr \fIfromVal\fP;
  988. .br
  989.       XrmValuePtr \fItoVal\fP;
  990. .FN
  991. .IP \fIargs\fP 1i
  992. this argument is ignored
  993. .IP \fInum_args\fP 1i
  994. this argument is ignored
  995. .IP \fIfromVal\fP 1i
  996. specifies the string to convert
  997. .IP \fItoVal\fP
  998. returns the converted value
  999. .LP
  1000. This function converts a string to an
  1001. .PN XtOrientation
  1002. enumeration value.  The string "horizontal" converts to
  1003. .PN XtorientHorizontal
  1004. and "vertical" converts to
  1005. .PN XtorientVertical .
  1006. The case of the string does not matter.  To use this converter,
  1007. include the following in your widget's ClassInitialize procedure:
  1008. .LP
  1009. XtAddConverter(XtRString, XtROrientation, XmuCvtStringToOrientation, NULL, 0);
  1010. .sp
  1011. .FD 0
  1012. Boolean XmuCvtStringToShapeStyle(\fIdpy\fP, \fIargs\fP, \fInum_args\fP, \fIfrom\fP, \fItoVal\fP, data)
  1013. .br
  1014.       Display *\fIdpy\fP;
  1015. .br
  1016.       XrmValue *\fIargs\fP;
  1017. .br
  1018.       Cardinal *\fInum_args\fP;
  1019. .br
  1020.       XrmValue *\fIfrom\fP;
  1021. .br
  1022.       XrmValue *\fItoVal\fP;
  1023. .br
  1024.       XtPointer *\fIdata\fP;
  1025. .FN
  1026. .IP \fIdpy\fP 1i
  1027. the display to use for conversion warnings
  1028. .IP \fIargs\fP 1i
  1029. this argument is ignored
  1030. .IP \fInum_args\fP 1i
  1031. this argument is ignored
  1032. .IP \fIfromVal\fP 1i
  1033. the value to convert from
  1034. .IP \fItoVal\fP
  1035. the place to store the converted value
  1036. .IP \fIdata\fP 1i
  1037. this argument is ignored
  1038. .LP
  1039. This function converts a string to an integer shape style.  The string
  1040. "rectangle" converts to
  1041. .PN XmuShapeRectangle ,
  1042. "oval" converts to
  1043. .PN XmuShapeOval ,
  1044. "ellipse" converts to
  1045. .PN XmuShapeEllipse ,
  1046. and "roundedRectangle" converts to
  1047. .PN XmuShapeRoundedRectangle .
  1048. The case of the string does not matter.  To use this converter,
  1049. include the following in your widget's ClassInitialize procedure:
  1050. .LP
  1051. XtSetTypeConverter(XtRString, XtRShapeStyle, XmuCvtStringToShapeStyle,
  1052. .br
  1053.              NULL, 0, XtCacheNone, NULL);
  1054. .sp
  1055. .FD 0
  1056. Boolean XmuReshapeWidget(w, \fIshape_style\fP, \fIcorner_width\fP, \fIcorner_height\fP)
  1057. .br
  1058.       Widget \fIw\fP;
  1059. .br
  1060.       int \fIshape_style\fP;
  1061. .br
  1062.       int \fIcorner_width\fP, \fIcorner_height\fP;
  1063. .FN
  1064. .IP \fIw\fP 1i
  1065. specifies the widget to reshape
  1066. .IP \fIshape_style\fP 1i
  1067. specifies the new shape
  1068. .IP \fIcorner_width\fP 1i
  1069. specifies the width of the rounded rectangle corner
  1070. .IP \fIcorner_height\fP 1i
  1071. specified the height of the rounded rectangle corner
  1072. .LP
  1073. This function reshapes the specified widget, using the Shape extension, to a
  1074. rectangle, oval, ellipse, or rounded rectangle, as specified by shape_style
  1075. (
  1076. .PN XmuShapeRectangle ,
  1077. .PN XmuShapeOval ,
  1078. .PN XmuShapeEllipse ,
  1079. and
  1080. .PN XmuShapeRoundedRectangle ,
  1081. respectively).
  1082. The shape is bounded by the outside edges of the rectangular extents of the
  1083. widget.  If the shape is a rounded rectangle, corner_width and corner_height
  1084. specify the size of the bounding box that the corners are drawn inside of
  1085. (see
  1086. .PN XmuFillRoundedRectangle );
  1087. otherwise, corner_width and corner_height are ignored.
  1088. The origin of the widget within its parent remains unchanged.
  1089. .sp
  1090. .FD 0
  1091. void XmuCvtStringToWidget(\fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP)
  1092. .br
  1093.       XrmValuePtr \fIargs\fP;
  1094. .br
  1095.       Cardinal *\fInum_args\fP;
  1096. .br
  1097.       XrmValuePtr \fIfromVal\fP;
  1098. .br
  1099.       XrmValuePtr \fItoVal\fP;
  1100. .FN
  1101. .IP \fIargs\fP 1i
  1102. this sole argument is the parent Widget
  1103. .IP \fInum_args\fP 1i
  1104. this argument must be 1
  1105. .IP \fIfromVal\fP 1i
  1106. specifies the string to convert
  1107. .IP \fItoVal\fP
  1108. returns the converted value
  1109. .LP
  1110. This function converts a string to an immediate child widget of the parent
  1111. widget passed as an argument.  Note that this converter only works for
  1112. child widgets that have already been created; there is no lazy evaluation.
  1113. The string is first compared against the
  1114. names of the normal and popup children, and if a match is found the
  1115. corresponding child is returned.  If no match is found, the string is
  1116. compared against the classes of the normal and popup children, and if a
  1117. match is found the corresponding child is returned.  The case of the string
  1118. is significant.  To use this converter, include the following in your
  1119. widget's ClassInitialize procedure:
  1120. .LP
  1121. static XtConvertArgRec parentCvtArg[] = {
  1122. .br
  1123.   {XtBaseOffset, (XtPointer)XtOffset(Widget, core.parent), sizeof(Widget)},
  1124. .br
  1125. };
  1126. .LP
  1127. XtAddConverter(XtRString, XtRWidget, XmuCvtStringToWidget,
  1128. .br
  1129.          parentCvtArg, XtNumber(parentCvtArg));
  1130. .sp
  1131. .FD 0
  1132. Boolean XmuNewCvtStringToWidget(\fIdpy\fP, \fIargs\fP, \fInum_args\fP, \fIfromVal\fP, \fItoVal\fP, \fIdata\fP)
  1133. .br
  1134.       Display *\fIdpy\fP;
  1135. .br
  1136.       XrmValue * \fIargs\fP;
  1137. .br
  1138.       Cardinal *\fInum_args\fP;
  1139. .br
  1140.       XrmValue * \fIfromVal\fP;
  1141. .br
  1142.       XrmValue * \fItoVal\fP;
  1143. .br
  1144.       XtPointer *\fIdata\fP;
  1145. .FN
  1146. .IP \fIdpy\fP 1i
  1147. the display to use for conversion warnings
  1148. .IP \fIargs\fP 1i
  1149. this sole argument is the parent Widget
  1150. .IP \fInum_args\fP 1i
  1151. this argument must be a pointer to a Cardinal containing the value 1
  1152. .IP \fIfromVal\fP 1i
  1153. specifies the string to convert
  1154. .IP \fItoVal\fP
  1155. returns the converted value
  1156. .IP \fIdata\fP 1i
  1157. this argument is ignored
  1158. .LP
  1159. This converter is identical in functionality to XmuCvtStringToWidget, except
  1160. that it is a new-style converter, allowing the specification of a cache type
  1161. at the time of registration.
  1162. Most widgets will not cache the conversion results, as the application may
  1163. dynamically create and destroy widgets, which would cause cached values to
  1164. become illegal.  To use this converter, include the following in the widget's
  1165. class initialize procedure:
  1166. .LP
  1167. static XtConvertArgRec parentCvtArg[] = {
  1168. .br
  1169.   {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.parent),
  1170. .br
  1171.    sizeof(Widget)}
  1172. .br
  1173. };
  1174. .LP
  1175. XtSetTypeConverter(XtRString, XtRWidget, XmuNewCvtStringToWidget,
  1176. .br
  1177.            parentCvtArg, XtNumber(parentCvtArg), XtCacheNone, NULL);
  1178. .LP
  1179. .NH 1
  1180. Character Set Functions
  1181. .LP
  1182. To use the functions defined in this section, you should include the header
  1183. file
  1184. .Pn < X11/Xmu/CharSet.h >.
  1185. .sp
  1186. .FD 0
  1187. void XmuCopyISOLatin1Lowered(\fIdst\fP, \fIsrc\fP)
  1188. .br
  1189.       char *\fIdst\fP, *\fIsrc\fP;
  1190. .FN
  1191. .IP \fIdst\fP 1i
  1192. returns the string copy
  1193. .IP \fIsrc\fP 1i
  1194. specifies the string to copy
  1195. .LP
  1196. This function copies a null terminated string from src to dst (including the
  1197. null), changing all Latin-1 uppercase letters to lowercase.  The string is
  1198. assumed to be encoded using ISO 8859-1.
  1199. .sp
  1200. .FD 0
  1201. void XmuCopyISOLatin1Uppered(\fIdst\fP, \fIsrc\fP)
  1202. .br
  1203.       char *\fIdst\fP, *\fIsrc\fP;
  1204. .FN
  1205. .IP \fIdst\fP 1i
  1206. returns the string copy
  1207. .IP \fIsrc\fP 1i
  1208. specifies the string to copy
  1209. .LP
  1210. This function copies a null terminated string from src to dst (including the
  1211. null), changing all Latin-1 lowercase letters to uppercase.  The string is
  1212. assumed to be encoded using ISO 8859-1.
  1213. .sp
  1214. .FD 0
  1215. int XmuCompareISOLatin1(\fIfirst\fP, \fIsecond\fP)
  1216. .br
  1217.       char *\fIfirst\fP, *\fIsecond\fP;
  1218. .FN
  1219. .IP \fIdst\fP 1i
  1220. specifies a string to compare
  1221. .IP \fIsrc\fP 1i
  1222. specifies a string to compare
  1223. .LP
  1224. This function compares two null terminated Latin-1 strings, ignoring case
  1225. differences, and returns an integer greater than, equal to, or less than 0,
  1226. according to whether first is lexicographically greater than, equal to, or
  1227. less than second.  The two strings are assumed to be encoded using ISO
  1228. 8859-1.
  1229. .sp
  1230. .FD 0
  1231. int XmuLookupLatin1(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1232. .br
  1233.       XKeyEvent *\fIevent\fP;
  1234. .br
  1235.       char *\fIbuffer\fP;
  1236. .br
  1237.       int \fInbytes\fP;
  1238. .br
  1239.       KeySym *\fIkeysym\fP;
  1240. .br
  1241.       XComposeStatus *\fIstatus\fP;
  1242. .FN
  1243. .IP \fIevent\fP 1i
  1244. specifies the key event
  1245. .IP \fIbuffer\fP 1i
  1246. returns the translated characters
  1247. .IP \fInbytes\fP 1i
  1248. specifies the length of the buffer
  1249. .IP \fIkeysym\fP 1i
  1250. returns the computed KeySym, or None
  1251. .IP \fIstatus\fP 1i
  1252. specifies or returns the compose state
  1253. .LP
  1254. This function is identical to
  1255. .PN XLookupString ,
  1256. and exists only for naming symmetry with other functions.
  1257. .sp
  1258. .FD 0
  1259. int XmuLookupLatin2(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1260. .br
  1261.       XKeyEvent *\fIevent\fP;
  1262. .br
  1263.       char *\fIbuffer\fP;
  1264. .br
  1265.       int \fInbytes\fP;
  1266. .br
  1267.       KeySym *\fIkeysym\fP;
  1268. .br
  1269.       XComposeStatus *\fIstatus\fP;
  1270. .FN
  1271. .IP \fIevent\fP 1i
  1272. specifies the key event
  1273. .IP \fIbuffer\fP 1i
  1274. returns the translated characters
  1275. .IP \fInbytes\fP 1i
  1276. specifies the length of the buffer
  1277. .IP \fIkeysym\fP 1i
  1278. returns the computed KeySym, or None
  1279. .IP \fIstatus\fP 1i
  1280. specifies or returns the compose state
  1281. .LP
  1282. This function is similar to
  1283. .PN XLookupString ,
  1284. except that it maps a key event
  1285. to an Latin-2 (ISO 8859-2) string, or to an ASCII control string.
  1286. .sp
  1287. .FD 0
  1288. int XmuLookupLatin3(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1289. .br
  1290.       XKeyEvent *\fIevent\fP;
  1291. .br
  1292.       char *\fIbuffer\fP;
  1293. .br
  1294.       int \fInbytes\fP;
  1295. .br
  1296.       KeySym *\fIkeysym\fP;
  1297. .br
  1298.       XComposeStatus *\fIstatus\fP;
  1299. .FN
  1300. .IP \fIevent\fP 1i
  1301. specifies the key event
  1302. .IP \fIbuffer\fP 1i
  1303. returns the translated characters
  1304. .IP \fInbytes\fP 1i
  1305. specifies the length of the buffer
  1306. .IP \fIkeysym\fP 1i
  1307. returns the computed KeySym, or None
  1308. .IP \fIstatus\fP 1i
  1309. specifies or returns the compose state
  1310. .LP
  1311. This function is similar to
  1312. .PN XLookupString ,
  1313. except that it maps a key event
  1314. to an Latin-3 (ISO 8859-3) string, or to an ASCII control string.
  1315. .sp
  1316. .FD 0
  1317. int XmuLookupLatin4(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1318. .br
  1319.       XKeyEvent *\fIevent\fP;
  1320. .br
  1321.       char *\fIbuffer\fP;
  1322. .br
  1323.       int \fInbytes\fP;
  1324. .br
  1325.       KeySym *\fIkeysym\fP;
  1326. .br
  1327.       XComposeStatus *\fIstatus\fP;
  1328. .FN
  1329. .IP \fIevent\fP 1i
  1330. specifies the key event
  1331. .IP \fIbuffer\fP 1i
  1332. returns the translated characters
  1333. .IP \fInbytes\fP 1i
  1334. specifies the length of the buffer
  1335. .IP \fIkeysym\fP 1i
  1336. returns the computed KeySym, or None
  1337. .IP \fIstatus\fP 1i
  1338. specifies or returns the compose state
  1339. .LP
  1340. This function is similar to
  1341. .PN XLookupString ,
  1342. except that it maps a key event
  1343. to an Latin-4 (ISO 8859-4) string, or to an ASCII control string.
  1344. .sp
  1345. .FD 0
  1346. int XmuLookupKana(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1347. .br
  1348.       XKeyEvent *\fIevent\fP;
  1349. .br
  1350.       char *\fIbuffer\fP;
  1351. .br
  1352.       int \fInbytes\fP;
  1353. .br
  1354.       KeySym *\fIkeysym\fP;
  1355. .br
  1356.       XComposeStatus *\fIstatus\fP;
  1357. .FN
  1358. .IP \fIevent\fP 1i
  1359. specifies the key event
  1360. .IP \fIbuffer\fP 1i
  1361. returns the translated characters
  1362. .IP \fInbytes\fP 1i
  1363. specifies the length of the buffer
  1364. .IP \fIkeysym\fP 1i
  1365. returns the computed KeySym, or None
  1366. .IP \fIstatus\fP 1i
  1367. specifies or returns the compose state
  1368. .LP
  1369. This function is similar to
  1370. .PN XLookupString ,
  1371. except that it maps a key event
  1372. to a string in an encoding consisting of Latin-1 (ISO 8859-1) and ASCII
  1373. control in the Graphics Left half (values 0 to 127), and Katakana in the
  1374. Graphics Right half (values 128 to 255), using the values from JIS
  1375. X201-1976.
  1376. .sp
  1377. .FD 0
  1378. int XmuLookupJISX0201(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1379. .br
  1380.       XKeyEvent *\fIevent\fP;
  1381. .br
  1382.       char *\fIbuffer\fP;
  1383. .br
  1384.       int \fInbytes\fP;
  1385. .br
  1386.       KeySym *\fIkeysym\fP;
  1387. .br
  1388.       XComposeStatus *\fIstatus\fP;
  1389. .FN
  1390. .IP \fIevent\fP 1i
  1391. specifies the key event
  1392. .IP \fIbuffer\fP 1i
  1393. returns the translated characters
  1394. .IP \fInbytes\fP 1i
  1395. specifies the length of the buffer
  1396. .IP \fIkeysym\fP 1i
  1397. returns the computed KeySym, or None
  1398. .IP \fIstatus\fP 1i
  1399. specifies or returns the compose state
  1400. .LP
  1401. This function is similar to
  1402. .PN XLookupString ,
  1403. except that it maps a key event
  1404. to a string in the JIS X0201-1976 encoding, including ASCII control.
  1405. .sp
  1406. .FD 0
  1407. int XmuLookupArabic(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1408. .br
  1409.       XKeyEvent *\fIevent\fP;
  1410. .br
  1411.       char *\fIbuffer\fP;
  1412. .br
  1413.       int \fInbytes\fP;
  1414. .br
  1415.       KeySym *\fIkeysym\fP;
  1416. .br
  1417.       XComposeStatus *\fIstatus\fP;
  1418. .FN
  1419. .IP \fIevent\fP 1i
  1420. specifies the key event
  1421. .IP \fIbuffer\fP 1i
  1422. returns the translated characters
  1423. .IP \fInbytes\fP 1i
  1424. specifies the length of the buffer
  1425. .IP \fIkeysym\fP 1i
  1426. returns the computed KeySym, or None
  1427. .IP \fIstatus\fP 1i
  1428. specifies or returns the compose state
  1429. .LP
  1430. This function is similar to
  1431. .PN XLookupString ,
  1432. except that it maps a key event
  1433. to a Latin/Arabic (ISO 8859-6) string, or to an ASCII control string.
  1434. .sp
  1435. .FD 0
  1436. int XmuLookupCyrillic(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1437. .br
  1438.       XKeyEvent *\fIevent\fP;
  1439. .br
  1440.       char *\fIbuffer\fP;
  1441. .br
  1442.       int \fInbytes\fP;
  1443. .br
  1444.       KeySym *\fIkeysym\fP;
  1445. .br
  1446.       XComposeStatus *\fIstatus\fP;
  1447. .FN
  1448. .IP \fIevent\fP 1i
  1449. specifies the key event
  1450. .IP \fIbuffer\fP 1i
  1451. returns the translated characters
  1452. .IP \fInbytes\fP 1i
  1453. specifies the length of the buffer
  1454. .IP \fIkeysym\fP 1i
  1455. returns the computed KeySym, or None
  1456. .IP \fIstatus\fP 1i
  1457. specifies or returns the compose state
  1458. .LP
  1459. This function is similar to
  1460. .PN XLookupString ,
  1461. except that it maps a key event
  1462. to a Latin/Cyrillic (ISO 8859-5) string, or to an ASCII control string.
  1463. .sp
  1464. .FD 0
  1465. int XmuLookupGreek(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1466. .br
  1467.       XKeyEvent *\fIevent\fP;
  1468. .br
  1469.       char *\fIbuffer\fP;
  1470. .br
  1471.       int \fInbytes\fP;
  1472. .br
  1473.       KeySym *\fIkeysym\fP;
  1474. .br
  1475.       XComposeStatus *\fIstatus\fP;
  1476. .FN
  1477. .IP \fIevent\fP 1i
  1478. specifies the key event
  1479. .IP \fIbuffer\fP 1i
  1480. returns the translated characters
  1481. .IP \fInbytes\fP 1i
  1482. specifies the length of the buffer
  1483. .IP \fIkeysym\fP 1i
  1484. returns the computed KeySym, or None
  1485. .IP \fIstatus\fP 1i
  1486. specifies or returns the compose state
  1487. .LP
  1488. This function is similar to
  1489. .PN XLookupString ,
  1490. except that it maps a key event
  1491. to a Latin/Greek (ISO 8859-7) string, or to an ASCII control string.
  1492. .sp
  1493. .FD 0
  1494. int XmuLookupHebrew(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1495. .br
  1496.       XKeyEvent *\fIevent\fP;
  1497. .br
  1498.       char *\fIbuffer\fP;
  1499. .br
  1500.       int \fInbytes\fP;
  1501. .br
  1502.       KeySym *\fIkeysym\fP;
  1503. .br
  1504.       XComposeStatus *\fIstatus\fP;
  1505. .FN
  1506. .IP \fIevent\fP 1i
  1507. specifies the key event
  1508. .IP \fIbuffer\fP 1i
  1509. returns the translated characters
  1510. .IP \fInbytes\fP 1i
  1511. specifies the length of the buffer
  1512. .IP \fIkeysym\fP 1i
  1513. returns the computed KeySym, or None
  1514. .IP \fIstatus\fP 1i
  1515. specifies or returns the compose state
  1516. .LP
  1517. This function is similar to
  1518. .PN XLookupString ,
  1519. except that it maps a key event
  1520. to a Latin/Hebrew (ISO 8859-8) string, or to an ASCII control string.
  1521. .sp
  1522. .FD 0
  1523. int XmuLookupAPL(\fIevent\fP, \fIbuffer\fP, \fInbytes\fP, \fIkeysym\fP, \fIstatus\fP)
  1524. .br
  1525.       XKeyEvent *\fIevent\fP;
  1526. .br
  1527.       char *\fIbuffer\fP;
  1528. .br
  1529.       int \fInbytes\fP;
  1530. .br
  1531.       KeySym *\fIkeysym\fP;
  1532. .br
  1533.       XComposeStatus *\fIstatus\fP;
  1534. .FN
  1535. .IP \fIevent\fP 1i
  1536. specifies the key event
  1537. .IP \fIbuffer\fP 1i
  1538. returns the translated characters
  1539. .IP \fInbytes\fP 1i
  1540. specifies the length of the buffer
  1541. .IP \fIkeysym\fP 1i
  1542. returns the computed KeySym, or None
  1543. .IP \fIstatus\fP 1i
  1544. specifies or returns the compose state
  1545. .LP
  1546. This function is similar to
  1547. .PN XLookupString ,
  1548. except that it maps a key event to an APL string.
  1549. .LP
  1550. .NH 1
  1551. Compound Text Functions
  1552. .LP
  1553. The functions defined in this section are for parsing Compound Text strings,
  1554. decomposing them into individual segments.  Definitions needed to use these
  1555. routines are in the include file
  1556. .Pn < X11/Xmu/Xct.h >.
  1557. A Compound Text string is represented as the following type:
  1558. .LP
  1559.     typedef unsigned char *XctString;
  1560. .sp
  1561. .FD 0
  1562. XctData XctCreate(\fIstring\fP, \fIlength\fP, \fIflags\fP)
  1563. .br
  1564.       XctString \fIstring\fP;
  1565. .br
  1566.       int \fIlength\fP;
  1567. .br
  1568.       XctFlags \fIflags\fP;
  1569. .FN
  1570. .IP \fIstring\fP 1i
  1571. the Compound Text string
  1572. .IP \fIlength\fP 1i
  1573. the number of bytes in string
  1574. .IP \fIflags\fP 1i
  1575. parsing control flags
  1576. .LP
  1577. This function creates an
  1578. .PN XctData
  1579. structure for parsing a Compound Text
  1580. string.  The string need not be null terminated.  The following flags are
  1581. defined to control parsing of the string:
  1582. .LP
  1583. .PN XctSingleSetSegments
  1584. -- This means that returned segments should contain
  1585. characters from only one set (C0, C1, GL, GR).  When this is requested,
  1586. .PN XctSegment
  1587. is never returned by
  1588. .PN XctNextItem ,
  1589. instead
  1590. .PN XctC0Segment ,
  1591. .PN XctC1Segment ,
  1592. .PN XctGlSegment ,
  1593. and
  1594. .PN XctGRSegment
  1595. are returned.  C0 and C1
  1596. segments are always returned as singleton characters.
  1597. .LP
  1598. .PN XctProvideExtensions
  1599. -- This means that if the Compound Text string is from a
  1600. higher version than this code is implemented to, then syntactically correct
  1601. but unknown control sequences should be returned as
  1602. .PN XctExtension
  1603. items by
  1604. .PN XctNextItem .
  1605. If this flag is not set, and the Compound Text string version
  1606. indicates that extensions cannot be ignored, then each unknown control
  1607. sequence will be reported as an
  1608. .PN XctError .
  1609. .LP
  1610. .PN XctAcceptC0Extensions
  1611. -- This means that if the Compound Text string is from
  1612. a higher version than this code is implemented to, then unknown C0
  1613. characters should be treated as if they were legal, and returned as C0
  1614. characters (regardless of how
  1615. .PN XctProvideExtensions
  1616. is set) by
  1617. .PN XctNextItem .
  1618. If this flag is not set, then all unknown C0 characters are treated
  1619. according to
  1620. .PN XctProvideExtensions .
  1621. .LP
  1622. .PN XctAcceptC1Extensions
  1623. -- This means that if the Compound Text string is from
  1624. a higher version than this code is implemented to, then unknown C1
  1625. characters should be treated as if they were legal, and returned as C1
  1626. characters (regardless of how
  1627. .PN XctProvideExtensions
  1628. is set) by
  1629. .PN XctNextItem .
  1630. If this flag is not set, then all unknown C1 characters are treated
  1631. according to
  1632. .PN XctProvideExtensions .
  1633. .LP
  1634. .PN XctHideDirection
  1635. -- This means that horizontal direction changes should be
  1636. reported as
  1637. .PN XctHorizontal
  1638. items by
  1639. .PN XctNextItem .  If this flag is not set,
  1640. then direction changes are not returned as items, but the current direction
  1641. is still maintained and reported for other items.  The current direction is
  1642. given as an enumeration, with the values
  1643. .PN XctUnspecified ,
  1644. .PN XctLeftToRight ,
  1645. and
  1646. .PN XctRightToLeft .
  1647. .LP
  1648. .PN XctFreeString
  1649. -- This means that
  1650. .PN XctFree
  1651. should free the Compound Text string that is passed to
  1652. .PN XctCreate .
  1653. If this flag is not set, the string is not freed.
  1654. .LP
  1655. .PN XctShiftMultiGRToGL
  1656. -- This means that
  1657. .PN XctNextItem
  1658. should translate GR
  1659. segments on-the-fly into GL segments for the GR sets: GB2312.1980-1,
  1660. JISX0208.1983-1, and KSC5601.1987-1.
  1661. .sp
  1662. .FD 0
  1663. void XctReset(\fIdata\fP)
  1664. .br
  1665.       XctData \fIdata\fP;
  1666. .FN
  1667. .IP \fIdata\fP 1i
  1668. specifies the Compound Text structure
  1669. .LP
  1670. This function resets the
  1671. .PN XctData
  1672. structure to reparse the Compound Text string from the beginning.
  1673. .sp
  1674. .FD 0
  1675. XctResult XctNextItem(\fIdata\fP)
  1676. .br
  1677.       XctData \fIdata\fP;
  1678. .FN
  1679. .IP \fIdata\fP 1i
  1680. specifies the Compound Text structure
  1681. .LP
  1682. This function parses the next ``item'' from the Compound Text string.  The
  1683. return value indicates what kind of item is returned.  The item itself, it's
  1684. length, and the current contextual state, are reported as components of the
  1685. .PN XctData
  1686. structure.
  1687. .PN XctResult
  1688. is an enumeration, with the following values:
  1689. .LP
  1690. .PN XctSegment
  1691. -- the item contains some mixture of C0, GL, GR, and C1 characters.
  1692. .LP
  1693. .PN XctC0Segment
  1694. -- the item contains only C0 characters.
  1695. .LP
  1696. .PN XctGLSegment
  1697. -- the item contains only GL characters.
  1698. .LP
  1699. .PN XctC1Segment
  1700. -- the item contains only C1 characters.
  1701. .LP
  1702. .PN XctGRSegment
  1703. -- the item contains only GR characters.
  1704. .LP
  1705. .PN XctExtendedSegment
  1706. -- the item contains an extended segment.
  1707. .LP
  1708. .PN XctExtension
  1709. -- the item is an unknown extension control sequence.
  1710. .LP
  1711. .PN XctHorizontal
  1712. -- the item indicates a change in horizontal direction or
  1713. depth.  The new direction and depth are recorded in the
  1714. .PN XctData
  1715. structure.
  1716. .LP
  1717. .PN XctEndOfText
  1718. -- The end of the Compound Text string has been reached.
  1719. .LP
  1720. .PN XctError
  1721. -- the string contains a syntactic or semantic error; no further
  1722. parsing should be performed.
  1723. .LP
  1724. The following state values are stored in the
  1725. .PN XctData
  1726. structure:
  1727. .Ds 0
  1728. .TA .5i 3i
  1729. .ta .5i 3i
  1730.     XctString item;    /* the action item */
  1731.     int item_length;    /* the length of item in bytes */
  1732.     int char_size;    /* the number of bytes per character in
  1733.          * item, with zero meaning variable */
  1734.     char *encoding;    /* the XLFD encoding name for item */
  1735.     XctHDirection horizontal;    /* the direction of item */
  1736.     int horz_depth;    /* the current direction nesting depth */
  1737.     char *GL;    /* the "{I} F" string for the current GL */
  1738.     char *GL_encoding;    /* the XLFD encoding name for the current GL */
  1739.     int GL_set_size;    /* 94 or 96 */
  1740.     int GL_char_size;    /* the number of bytes per GL character */
  1741.     char *GR;    /* the "{I} F" string for the current GR */
  1742.     char *GR_encoding;    /* the XLFD encoding name the for current GR */
  1743.     int GR_set_size;    /* 94 or 96 */
  1744.     int GR_char_size;    /* the number of bytes per GR character */
  1745.     char *GLGR_encoding;    /* the XLFD encoding name for the current
  1746.          * GL+GR, if known */
  1747. .De
  1748. .sp
  1749. .FD 0
  1750. void XctFree(\fIdata\fP)
  1751. .br
  1752.       XctData \fIdata\fP;
  1753. .FN
  1754. .IP \fIdata\fP 1i
  1755. specifies the Compound Text structure
  1756. .LP
  1757. This function frees all data associated with the
  1758. .PN XctData
  1759. structure.
  1760. .LP
  1761. .NH 1
  1762. CloseDisplay Hook Functions
  1763. .LP
  1764. To use the functions defined in this section, you should include the header
  1765. file
  1766. .Pn < X11/Xmu/CloseHook.h >.
  1767. .sp
  1768. .FD 0
  1769. CloseHook XmuAddCloseDisplayHook(\fIdpy\fP, \fIfunc\fP, \fIarg\fP)
  1770. .br
  1771.       Display *\fIdpy\fP;
  1772. .br
  1773.       int (*\fIfunc\fP)();
  1774. .br
  1775.       caddr_t \fIarg\fP;
  1776. .FN
  1777. .IP \fIdpy\fP 1i
  1778. specifies the connection to the X server
  1779. .IP \fIfunc\fP 1i
  1780. specifies the function to call at display close
  1781. .IP \fIarg\fP 1i
  1782. specifies arbitrary data to pass to func
  1783. .LP
  1784. This function adds a callback for the given display.  When the display is
  1785. closed, the given function will be called with the given display and
  1786. argument as:
  1787. .LP
  1788.     (*func)(dpy, arg)
  1789. .LP 
  1790. The function is declared to return an int even though the value is ignored,
  1791. because some compilers have problems with functions returning void.
  1792. .LP
  1793. This routine returns NULL if it was unable to add the callback, otherwise it
  1794. returns an opaque handle that can be used to remove or lookup the callback.
  1795. .sp
  1796. .FD 0
  1797. Bool XmuRemoveCloseDisplayHook(\fIdpy\fP, \fIhandle\fP, \fIfunc\fP, \fIarg\fP)
  1798. .br
  1799.       Display *\fIdpy\fP;
  1800. .br
  1801.       CloseHook \fIhandle\fP;
  1802. .br
  1803.       int (*\fIfunc\fP)();
  1804. .br
  1805.       caddr_t \fIarg\fP;
  1806. .FN
  1807. .IP \fIdpy\fP 1i
  1808. specifies the connection to the X server
  1809. .IP \fIhandle\fP 1i
  1810. specifies the callback by id, or NULL
  1811. .IP \fIfunc\fP 1i
  1812. specifies the callback by function
  1813. .IP \fIarg\fP 1i
  1814. specifies the function data to match
  1815. .LP
  1816. This function deletes a callback that has been added with
  1817. .PN XmuAddCloseDisplayHook .
  1818. If handle is not NULL, it specifies the callback to
  1819. remove, and the func and arg parameters are ignored.  If handle is NULL, the
  1820. first callback found to match the specified func and arg will be removed.
  1821. Returns
  1822. .PN True
  1823. if a callback was removed, else returns
  1824. .PN False .
  1825. .sp
  1826. .FD 0
  1827. Bool XmuLookupCloseDisplayHook(\fIdpy\fP, \fIhandle\fP, \fIfunc\fP, \fIarg\fP)
  1828. .br
  1829.       Display *\fIdpy\fP;
  1830. .br
  1831.       CloseHook \fIhandle\fP;
  1832. .br
  1833.       int (*\fIfunc\fP)();
  1834. .br
  1835.       caddr_t \fIarg\fP;
  1836. .FN
  1837. .IP \fIdpy\fP 1i
  1838. specifies the connection to the X server
  1839. .IP \fIhandle\fP 1i
  1840. specifies the callback by id, or NULL
  1841. .IP \fIfunc\fP 1i
  1842. specifies the callback by function
  1843. .IP \fIarg\fP 1i
  1844. specifies the function data to match
  1845. .LP
  1846. This function determines if a callback is installed.  If handle is not NULL,
  1847. it specifies the callback to look for, and the func and arg parameters are
  1848. ignored.  If handle is NULL, the function will look for any callback for the
  1849. specified func and arg.  Returns
  1850. .PN True
  1851. if a matching callback exists, else returns
  1852. .PN False .
  1853. .LP
  1854. .NH 1
  1855. Display Queue Functions
  1856. .LP
  1857. To use the functions and types defined in this section, you should include the
  1858. header file
  1859. .Pn < X11/Xmu/DisplayQue.h >.
  1860. It defines the following types:
  1861. .LP
  1862. .Ds 0
  1863. .TA .5i 3i
  1864. .ta .5i 3i
  1865. typedef struct _XmuDisplayQueueEntry {
  1866.     struct _XmuDisplayQueueEntry *prev, *next;
  1867.     Display *display;
  1868.     CloseHook closehook;
  1869.     caddr_t data;
  1870. } XmuDisplayQueueEntry;
  1871.  
  1872. typedef struct _XmuDisplayQueue {
  1873.     int nentries;
  1874.     XmuDisplayQueueEntry *head, *tail;
  1875.     int (*closefunc)();
  1876.     int (*freefunc)();
  1877.     caddr_t data;
  1878. } XmuDisplayQueue;
  1879. .De
  1880. .sp
  1881. .FD 0
  1882. XmuDisplayQueue *XmuDQCreate(\fIclosefunc\fP, \fIfreefunc\fP, \fIdata\fP)
  1883. .br
  1884.       int (*\fIclosefunc\fP)();
  1885. .br
  1886.       int (*\fIfreefunc\fP)();
  1887. .br
  1888.       caddr_t \fIdata\fP;
  1889. .FN
  1890. .IP \fIclosefunc\fP 1i
  1891. specifies the close function
  1892. .IP \fIfreefunc\fP 1i
  1893. specifies the free function
  1894. .IP \fIdata\fP 1i
  1895. specifies private data for the functions
  1896. .LP
  1897. This function creates and returns an empty
  1898. .PN XmuDisplayQueue
  1899. (which is really just a set of displays, but is called a queue for
  1900. historical reasons).  The queue is initially empty, but displays
  1901. can be added using
  1902. .PN XmuAddDisplay .
  1903. The data value is simply stored in the queue for use by the closefunc
  1904. and freefunc callbacks.
  1905. Whenever a display in the queue is closed using
  1906. .PN XCloseDisplay ,
  1907. the closefunc (if non-NULL) is called with the queue and the display's
  1908. .PN XmuDisplayQueueEntry
  1909. as follows:
  1910. .LP
  1911.     (*closefunc)(queue, entry)
  1912. .LP
  1913. The freeproc (if non-NULL) is called whenever the last display in the
  1914. queue is closed, as follows:
  1915. .LP
  1916.     (*freefunc)(queue)
  1917. .LP
  1918. The application is responsible for actually freeing the queue, by calling
  1919. .PN XmuDQDestroy .
  1920. .sp
  1921. .FD 0
  1922. XmuDisplayQueueEntry *XmuDQAddDisplay(\fIq\fP, \fIdpy\fP, \fIdata\fP)
  1923. .br
  1924.       XmuDisplayQueue *\fIq\fP;
  1925. .br
  1926.       Display *\fIdpy\fP;
  1927. .br
  1928.       caddr_t \fIdata\fP;
  1929. .FN
  1930. .IP \fIq\fP 1i
  1931. specifies the queue
  1932. .IP \fIdpy\fP 1i
  1933. specifies the display to add
  1934. .IP \fIdata\fP 1i
  1935. specifies private data for the free function
  1936. .LP
  1937. This function adds the specified display to the queue.  If successful,
  1938. the queue entry is returned, otherwise NULL is returned.
  1939. The data value is simply stored in the queue entry for use by the
  1940. queue's freefunc callback.  This function does not attempt to prevent
  1941. duplicate entries in the queue; the caller should use
  1942. .PN XmuDQLookupDisplay
  1943. to determine if a display has already been added to a queue.
  1944. .sp
  1945. .FD 0
  1946. XmuDisplayQueueEntry *XmuDQLookupDisplay(\fIq\fP, \fIdpy\fP)
  1947. .br
  1948.       XmuDisplayQueue *\fIq\fP;
  1949. .br
  1950.       Display *\fIdpy\fP;
  1951. .FN
  1952. .IP \fIq\fP 1i
  1953. specifies the queue
  1954. .IP \fIdpy\fP 1i
  1955. specifies the display to lookup
  1956. .LP
  1957. This function returns the queue entry for the specified display, or NULL if
  1958. the display is not in the queue.
  1959. .sp
  1960. .FD 0
  1961. XmuDQNDisplays(\fIq\fP)
  1962. .FN
  1963. .LP
  1964. This macro returns the number of displays in the specified queue.
  1965. .sp
  1966. .FD 0
  1967. Bool XmuDQRemoveDisplay(\fIq\fP, \fIdpy\fP)
  1968. .br
  1969.       XmuDisplayQueue *\fIq\fP;
  1970. .br
  1971.       Display *\fIdpy\fP;
  1972. .FN
  1973. .IP \fIq\fP 1i
  1974. specifies the queue
  1975. .IP \fIdpy\fP 1i
  1976. specifies the display to remove
  1977. .LP
  1978. This function removes the specified display from the specified queue.
  1979. No callbacks are performed.
  1980. If the display is not found in the queue,
  1981. .PN False
  1982. is returned, otherwise
  1983. .PN True
  1984. is returned.
  1985. .sp
  1986. .FD 0
  1987. Bool XmuDQDestroy(\fIq\fP, \fIdocallbacks\fP)
  1988. .br
  1989.       XmuDisplayQueue *\fIq\fP;
  1990. .br
  1991.       Bool \fIdocallbacks\fP;
  1992. .FN
  1993. .IP \fIq\fP 1i
  1994. specifies the queue to destroy
  1995. .IP \fIdocallbacks\fP 1i
  1996. specifies whether close functions should be called
  1997. .LP
  1998. This function releases all memory associated with the specified queue.
  1999. If docallbacks is
  2000. .PN True ,
  2001. then the queue's closefunc callback (if non-NULL) is first called
  2002. for each display in the queue, even though
  2003. .PN XCloseDisplay
  2004. is not called on the display.
  2005. .LP
  2006. .NH 1
  2007. Toolkit Convenience Functions
  2008. .LP
  2009. To use the functions defined in this section, you should include the header
  2010. file
  2011. .Pn < X11/Xmu/Initer.h >.
  2012. .sp
  2013. .FD 0
  2014. void XmuAddInitializer(\fIfunc\fP, \fIdata\fP) 
  2015. .br
  2016.       void (*\fIfunc\fP)();
  2017. .br
  2018.       caddr_t \fIdata\fP;
  2019. .FN
  2020. .IP \fIfunc\fP 1i
  2021. specifies the procedure to register
  2022. .IP \fIdata\fP 1i
  2023. specifies private data for the procedure
  2024. .LP
  2025. This function registers a procedure, to be invoked the first time
  2026. .PN XmuCallInitializers
  2027. is called on a given application context.  The procedure
  2028. is called with the application context and the specified data:
  2029. .LP
  2030.     (*func)(app_con, data)
  2031. .sp
  2032. .FD 0
  2033. void XmuCallInitializers(\fIapp_con\fP)
  2034. .br
  2035.       XtAppContext \fIapp_con\fP;
  2036. .FN
  2037. .IP \fIapp_con\fP 1i
  2038. specifies the application context to initialize
  2039. .LP
  2040. This function calls each of the procedures that have been registered with
  2041. .PN XmuAddInitializer ,
  2042. if this is the first time the application context has been passed to
  2043. .PN XmuCallInitializers .
  2044. Otherwise, this function does nothing.
  2045. .LP
  2046. .NH 1
  2047. Standard Colormap Functions
  2048. .LP
  2049. To use the functions defined in this section, you should include the header
  2050. file
  2051. .Pn < X11/Xmu/StdCmap.h >.
  2052. .sp
  2053. .FD 0
  2054. Status XmuAllStandardColormaps(\fIdpy\fP)
  2055. .br
  2056.       Display *\fIdpy\fP;
  2057. .FN
  2058. .IP \fIdpy\fP 1i
  2059. specifies the connection to the X server
  2060. .LP
  2061. To create all of the appropriate standard colormaps for every visual of
  2062. every screen on a given display, use
  2063. .PN XmuAllStandardColormaps .
  2064. .LP
  2065. This function defines and retains as permanent resources all standard
  2066. colormaps which are meaningful for the visuals of each screen of the
  2067. display.  It returns 0 on failure, non-zero on success.  If the property of
  2068. any standard colormap is already defined, this function will redefine it.
  2069. .LP
  2070. This function is intended to be used by window managers or a special client
  2071. at the start of a session.
  2072. .LP
  2073. The standard colormaps of a screen are defined by properties associated with
  2074. the screen's root window.  The property names of standard colormaps are
  2075. predefined, and each property name except RGB_DEFAULT_MAP may describe at
  2076. most one colormap.
  2077. .LP  
  2078. The standard colormaps are: RGB_BEST_MAP, RGB_RED_MAP, RGB_GREEN_MAP,
  2079. RGB_BLUE_MAP, RGB_DEFAULT_MAP, and RGB_GRAY_MAP.  Therefore a screen may
  2080. have at most 6 standard colormap properties defined.
  2081. .LP
  2082. A standard colormap is associated with a particular visual of the screen.  A
  2083. screen may have multiple visuals defined, including visuals of the same
  2084. class at different depths.  Note that a visual id might be repeated for more
  2085. than one depth, so the visual id and the depth of a visual identify the
  2086. visual.  The characteristics of the visual will determine which standard
  2087. colormaps are meaningful under that visual, and will determine how the
  2088. standard colormap is defined.  Because a standard colormap is associated
  2089. with a specific visual, there must be a method of determining which visuals
  2090. take precedence in defining standard colormaps.
  2091. .LP
  2092. The method used here is: for the visual of greatest depth, define all
  2093. standard colormaps meaningful to that visual class, according to this order
  2094. of (descending) precedence:
  2095. .PN DirectColor ;
  2096. .PN PseudoColor ;
  2097. .PN TrueColor
  2098. and
  2099. .PN GrayScale ;
  2100. and finally
  2101. .PN StaticColor
  2102. and
  2103. .PN StaticGray .
  2104. .LP
  2105. This function allows success, on a per screen basis.  For example, if a map
  2106. on screen 1 fails, the maps on screen 0, created earlier, will remain.
  2107. However, none on screen 1 will remain.  If a map on screen 0 fails, none
  2108. will remain.
  2109. .LP
  2110. See
  2111. .PN XmuVisualStandardColormaps
  2112. for which standard colormaps are meaningful under these classes of visuals.
  2113. .sp
  2114. .FD 0
  2115. Status XmuVisualStandardColormaps(\fIdpy\fP, \fIscreen\fP, \fIvisualid\fP, \fIdepth\fP, \fIreplace\fP, \fIretain\fP)
  2116. .br
  2117.       Display *\fIdpy\fP;
  2118. .br
  2119.       int \fIscreen\fP;
  2120. .br
  2121.       VisualID \fIvisualid\fP;
  2122. .br
  2123.       unsigned int \fIdepth\fP;
  2124. .br
  2125.       Bool \fIreplace\fP;
  2126. .br
  2127.       Bool \fIretain\fP;
  2128. .FN
  2129. .IP \fIdpy\fP 1i
  2130. specifies the connection to the X server
  2131. .IP \fIscreen\fP 1i
  2132. specifies the screen of the display
  2133. .IP \fIvisualid\fP 1i
  2134. specifies the visual type
  2135. .IP \fIdepth\fP 1i
  2136. specifies the visual depth
  2137. .IP \fIreplace\fP 1i
  2138. specifies whether or not to replace
  2139. .IP \fIretain\fP 1i
  2140. specifies whether or not to retain
  2141. .LP
  2142. To create all of the appropriate standard colormaps for a given visual on a
  2143. given screen, use
  2144. .PN XmuVisualStandardColormaps .
  2145. .LP
  2146. This function defines all appropriate standard colormap properties for the
  2147. given visual.  If replace is
  2148. .PN True ,
  2149. any previous definition will be removed.
  2150. If retain is
  2151. .PN True ,
  2152. new properties will be retained for the duration of the
  2153. server session.  This function returns 0 on failure, non-zero on success.
  2154. On failure, no new properties will be defined, but old ones may have been
  2155. removed if replace was True.
  2156. .LP
  2157. Not all standard colormaps are meaningful to all visual classes.  This
  2158. routine will check and define the following properties for the following
  2159. classes, provided that the size of the colormap is not too small.  For
  2160. .PN DirectColor
  2161. and
  2162. .PN PseudoColor :
  2163. RGB_DEFAULT_MAP, RGB_BEST_MAP, RGB_RED_MAP,
  2164. RGB_GREEN_MAP, RGB_BLUE_MAP, and RGB_GRAY_MAP.  For
  2165. .PN TrueColor
  2166. and
  2167. .PN StaticColor :
  2168. RGB_BEST_MAP.  For
  2169. .PN GrayScale
  2170. and
  2171. .PN StaticGray :
  2172. RGB_GRAY_MAP.
  2173. .sp
  2174. .FD 0
  2175. Status XmuLookupStandardColormap(\fIdpy\fP, \fIscreen\fP, \fIvisualid\fP, \fIdepth\fP, \fIproperty\fP, \fIreplace\fP, \fIretain\fP)
  2176. .br
  2177.       Display *\fIdpy\fP;
  2178. .br
  2179.       int \fIscreen\fP;
  2180. .br
  2181.       VisualID \fIvisualid\fP;
  2182. .br
  2183.       unsigned int \fIdepth\fP;
  2184. .br
  2185.       Atom \fIproperty\fP;
  2186. .br
  2187.       Bool \fIreplace\fP;
  2188. .br
  2189.       Bool \fIretain\fP;
  2190. .FN
  2191. .IP \fIdpy\fP 1i
  2192. specifies the connection to the X server
  2193. .IP \fIscreen\fP 1i
  2194. specifies the screen of the display
  2195. .IP \fIvisualid\fP 1i
  2196. specifies the visual type
  2197. .IP \fIdepth\fP 1i
  2198. specifies the visual depth
  2199. .IP \fIproperty\fP 1i
  2200. specifies the standard colormap property
  2201. .IP \fIreplace\fP 1i
  2202. specifies whether or not to replace
  2203. .IP \fIretain\fP 1i
  2204. specifies whether or not to retain
  2205. .LP
  2206. To create a standard colormap if one does not currently exist, or replace
  2207. the currently existing standard colormap, use
  2208. .PN XmuLookupStandardColormap .
  2209. .LP
  2210. Given a screen, a visual, and a property, this function will determine the
  2211. best allocation for the property under the specified visual, and determine
  2212. the whether to create a new colormap or to use the default colormap of the
  2213. screen.
  2214. .LP
  2215. If replace is True, any previous definition of the property will be
  2216. replaced.  If retain is True, the property and the colormap will be made
  2217. permanent for the duration of the server session.  However, pre-existing
  2218. property definitions which are not replaced cannot be made permanent by a
  2219. call to this function; a request to retain resources pertains to newly
  2220. created resources.
  2221. .LP
  2222. This function returns 0 on failure, non-zero on success.  A request to
  2223. create a standard colormap upon a visual which cannot support such a map is
  2224. considered a failure.  An example of this would be requesting any standard
  2225. colormap property on a monochrome visual, or, requesting an RGB_BEST_MAP on
  2226. a display whose colormap size is 16.
  2227. .sp
  2228. .FD 0
  2229. Status XmuGetColormapAllocation(\fIvinfo\fP, \fIproperty\fP, \fIred_max\fP, \fIgreen_max\fP, \fIblue_max\fP)
  2230. .br
  2231.       XVisualInfo *\fIvinfo\fP;
  2232. .br
  2233.       Atom \fIproperty\fP;
  2234. .br
  2235.       unsigned long *\fIred_max\fP, *\fIgreen_max\fP, *\fIblue_max\fP;
  2236. .FN
  2237. .IP \fIvinfo\fP 1i
  2238. specifies visual information for a chosen visual
  2239. .IP \fIproperty\fP 1i
  2240. specifies one of the standard colormap property names
  2241. .IP \fIred_max\fP 1i
  2242. returns maximum red value 
  2243. .IP \fIgreen_max\fP 1i
  2244. returns maximum green value
  2245. .IP \fIblue_max\fP 1i
  2246. returns maximum blue value
  2247. .LP
  2248. To determine the best allocation of reds, greens, and blues in a standard
  2249. colormap, use
  2250. .PN XmuGetColormapAllocation .
  2251. .LP
  2252. .PN XmuGetColormapAllocation
  2253. returns 0 on failure, non-zero on success.  It is
  2254. assumed that the visual is appropriate for the colormap property.
  2255. .sp
  2256. .FD 0
  2257. XStandardColormap *XmuStandardColormap(\fIdpy\fP, \fIscreen\fP, \fIvisualid\fP, \fIdepth\fP, \fIproperty\fP,
  2258.                                        \fIcmap\fP, \fIred_max\fP, \fIgreen_max\fP, \fIblue_max\fP)
  2259. .br
  2260.       Display \fIdpy\fP;
  2261. .br
  2262.       int \fIscreen\fP;
  2263. .br
  2264.       VisualID \fIvisualid\fP;
  2265. .br
  2266.       unsigned int \fIdepth\fP;
  2267. .br
  2268.       Atom \fIproperty\fP;
  2269. .br
  2270.       Colormap \fIcmap\fP;
  2271. .br
  2272.       unsigned long \fIred_max\fP, \fIgreen_max\fP, \fIblue_max\fP;
  2273. .FN
  2274. .IP \fIdpy\fP 1i
  2275. specifies the connection to the X server
  2276. .IP \fIscreen\fP 1i
  2277. specifies the screen of the display
  2278. .IP \fIvisualid\fP 1i
  2279. specifies the visual type
  2280. .IP \fIdepth\fP 1i
  2281. specifies the visual depth
  2282. .IP \fIproperty\fP 1i
  2283. specifies the standard colormap property
  2284. .IP \fIcmap\fP 1i
  2285. specifies the colormap ID, or None
  2286. .IP \fIred_max\fP 1i
  2287. specifies the red allocation
  2288. .IP \fIgreen_max\fP 1i
  2289. specifies the green allocation
  2290. .IP \fIblue_max\fP 1i
  2291. specifies the blue allocation
  2292. .LP
  2293. To create any one standard colormap, use
  2294. .PN XmuStandardColormap .
  2295. .LP
  2296. This function creates a standard colormap for the given screen, visualid,
  2297. and visual depth, with the given red, green, and blue maximum values, with
  2298. the given standard property name.  Upon success, it returns a pointer to an
  2299. .PN XStandardColormap
  2300. structure which describes the newly created colormap.
  2301. Upon failure, it returns NULL.
  2302. If cmap is the default colormap of the screen, the standard colormap
  2303. will be defined on the default colormap; otherwise a new colormap is created.
  2304. .LP 
  2305. Resources created by this function are not made permanent; that is the
  2306. caller's responsibility.
  2307. .sp
  2308. .FD 0
  2309. Status XmuCreateColormap(\fIdpy\fP, \fIcolormap\fP)
  2310. .br
  2311.       Display *\fIdpy\fP;
  2312. .br
  2313.       XStandardColormap *\fIcolormap\fP;
  2314. .FN
  2315. .IP \fIdpy\fP 1i
  2316. specifies the connection under which the map is created
  2317. .IP \fIcolormap\fP 1i
  2318. specifies the map to be created
  2319. .FN
  2320. .LP
  2321. To create any one colormap which is described by an
  2322. .PN XStandardColormap
  2323. structure, use
  2324. .PN XmuCreateColormap .
  2325. .LP
  2326. This function returns 0 on failure, and non-zero on success.  The base_pixel
  2327. of the colormap is set on success.  Resources created by this function are
  2328. not made permanent.  No argument error checking is provided; use at your own
  2329. risk.
  2330. .LP
  2331. All colormaps are created with read-only allocations, with the exception of
  2332. read-only allocations of colors which fail
  2333. to return the expected pixel value, and these are individually defined as
  2334. read/write allocations.  This is done so that all the cells defined in the
  2335. colormap are contiguous, for use in image processing.  This typically
  2336. happens with White and Black in the default map.
  2337. .LP 
  2338. Colormaps of static visuals are considered to be successfully created if the
  2339. map of the static visual matches the definition given in the standard
  2340. colormap structure.
  2341. .sp
  2342. .FD 0
  2343. void XmuDeleteStandardColormap(\fIdpy\fP, \fIscreen\fP, \fIproperty\fP)
  2344. .br
  2345.       Display *\fIdpy\fP;
  2346. .br
  2347.       int \fIscreen\fP;
  2348. .br
  2349.       Atom \fIproperty\fP;
  2350. .FN
  2351. .IP \fIdpy\fP 1i
  2352. specifies the connection to the X server
  2353. .IP \fIscreen\fP 1i
  2354. specifies the screen of the display
  2355. .IP \fIproperty\fP 1i
  2356. specifies the standard colormap property
  2357. .LP
  2358. To remove any standard colormap property, use
  2359. .PN XmuDeleteStandardColormap .
  2360. This function will remove the specified property from the specified screen,
  2361. releasing any resources used by the colormap(s) of the property, if
  2362. possible.
  2363. .LP
  2364. .NH 1
  2365. Widget Description Functions
  2366. .LP
  2367. The functions defined in this section are for building a description of 
  2368. the structure of and resources associated with a hierarchy of widget classes.
  2369. This package is typically used by applications that wish to manipulate the 
  2370. widget set itself.
  2371. .LP
  2372. The definitions needed to use these interfaces are in the header file
  2373. .Pn < X11/Xmu/WidgetNode.h >.
  2374. The following function must be called before any of the others described
  2375. below:
  2376. .sp
  2377. .FD 0
  2378. void XmuWnInitializeNodes(\fInode_array\fP, \fInum_nodes\fP)
  2379. .br
  2380.       XmuWidgetNode *\fInode_array\fP;
  2381. .br
  2382.       int \fInum_nodes\fP;
  2383. .FN
  2384. .IP \fInode_array\fP 1i
  2385. specifies a list of widget classes, in alphabetical order
  2386. .IP \fInum_nodes\fP 1i
  2387. specfies the number of widget classes in the node array
  2388. .LP
  2389. To determine the resources provided by a widget class or classes, use
  2390. .sp
  2391. .FD 0
  2392. void XmuWnFetchResources(\fInode\fP, \fItoplevel\fP, \fItop_node\fP)
  2393. .br
  2394.       XmuWidgetNode *\fInode\fP;
  2395. .br
  2396.       Widget \fItoplevel\fP;
  2397. .br
  2398.       XmuWidgetNode *\fItop_node\fP;
  2399. .FN
  2400. .IP \fInode\fP 1i
  2401. specifies the widget class for which resources should be obtained.
  2402. .IP \fItoplevel\fP 1i
  2403. specifies the widget that should be used for creating an instance of \fInode\fP
  2404. from which resources are extracted.  This is typically the value returned
  2405. by \fBXtAppInitialize\fP.
  2406. .IP \fItop_node\fP 1i
  2407. specifies the ancestor of \fInode\fP that should be treated as the root
  2408. of the widget inheritance tree (used in determining which ancestor contributed 
  2409. which resources).
  2410. .LP
  2411. Each widget class inherits the resources of its parent.  To count the number
  2412. of resources contributed by a particular widget class, use:
  2413. .sp
  2414. .FD 0
  2415. int XmuWnCountOwnedResources(\fInode\fP, \fIowner_node\fP, \fIconstraints\fP)
  2416. .br
  2417.       XmuWidgetNode *\fInode\fP;
  2418. .br
  2419.       XmuWidgetNode *\fIowner_node\fP;
  2420. .br
  2421.       Bool \fIconstraints\fP;
  2422. .FN
  2423. .IP \fInode\fP 1i
  2424. specifies the widget class whose resources are being examined.
  2425. .IP \fIowner_node\fP 1i
  2426. specifies the widget class of the ancestor of \fInode\fP whose contributions
  2427. are being counted.
  2428. .IP \fIconstraints\fP 1i
  2429. specifies whether or not to count constraint resources or normal resources.
  2430. .LP
  2431. This routine returns the number of resources contributed (or ``owned'') by
  2432. the specified widget class.
  2433. .sp
  2434. .FD 0
  2435. XmuWidgetNode *XmuWnNameToNode(\fInode_list\fP, \fInum_nodes\fP, \fIname\fP)
  2436. .br
  2437.       XmuWidgetNode *\fInode_list\fP;
  2438.       int \fInum_nodes\fP;
  2439.       char *\fIname\fP;
  2440. .FN
  2441. .IP \fInode_list\fP 1i
  2442. specifies a list of widget nodes
  2443. .IP \fInum_nodes\fP 1i
  2444. specifies the number of nodes in the list
  2445. .IP \fIname\fP 1i
  2446. specifies the name of the widget class in the node list to search for
  2447. .LP
  2448. This function returns the WidgetNode in the list that matches the given
  2449. widget name or widget class name.  If no match is found, it returns NULL.
  2450. .LP
  2451. .NH 1
  2452. Participation in the Editres Protocol
  2453. .LP
  2454. To participate in the editres protocol, applications which are not based
  2455. on the Athena widget set should include the header file
  2456. .Pn < X11/Xmu/Editres.h >.
  2457. .LP
  2458. To participate in the editres protocol, Xt applications which do not rely
  2459. on the Athena widget set should register the editres protocol handler on 
  2460. each shell widget in the application, specifying an event mask of 0, 
  2461. nonmaskable events, and client data as NULL:
  2462. .LP
  2463. XtAddEventHandler(shell, (EventMask) 0, True, _XEditResCheckMessages, NULL);
  2464.