home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / Xlib / CH09 < prev    next >
Encoding:
Text File  |  1991-07-30  |  36.6 KB  |  1,313 lines

  1. \&
  2. .sp 1
  3. .ce 3
  4. \s+1\fBChapter 9\fP\s-1
  5.  
  6. \s+1\fBWindow and Session Manager Functions\fP\s-1
  7. .sp 2
  8. .nr H1 9
  9. .nr H2 0
  10. .nr H3 0
  11. .nr H4 0
  12. .nr H5 0
  13. .na
  14. .LP
  15. .XS
  16. Chapter 9: Window and Session Manager Functions 
  17. .XE
  18. Although it is difficult to categorize functions as exclusively
  19. for an application or a window manager or a session manager,
  20. the functions in this chapter are most often used by window managers
  21. and session managers.
  22. It is not expected that these functions will be used by most 
  23. application programs.
  24. Xlib provides management functions to:
  25. .IP \(bu 5
  26. Change the parent of a window
  27. .IP \(bu 5
  28. Control the lifetime of a window
  29. .IP \(bu 5
  30. Manage installed colormaps
  31. .IP \(bu 5
  32. Set and retrieve the font search path
  33. .IP \(bu 5
  34. Grab the server
  35. .IP \(bu 5
  36. Kill a client
  37. .IP \(bu 5
  38. Control the screen saver
  39. .IP \(bu 5
  40. Control host access
  41. .RE
  42. .NH 2
  43. Changing the Parent of a Window
  44. .XS
  45. \*(SN Changing the Parent of a Window 
  46. .XE
  47. .LP
  48. To change a window's parent to another window on the same screen, use
  49. .PN XReparentWindow .
  50. There is no way to move a window between screens.
  51. .IN "XReparentWindow" "" "@DEF@"
  52. .\" Start marker code here
  53. .FD 0
  54. .\" $Header: XReparentWin.f,v 1.1 88/02/26 10:02:42 mento Exp $
  55. XReparentWindow\^(\^\fIdisplay\fP, \fIw\fP\^, \fIparent\fP\^, \fIx\fP\^, \fIy\fP\^)
  56. .br
  57.       Display *\fIdisplay\fP\^;
  58. .br
  59.       Window \fIw\fP\^;
  60. .br
  61.       Window \fIparent\fP\^;
  62. .br
  63.       int \fIx\fP\^, \fIy\fP\^;
  64. .FN
  65. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  66. .IP \fIdisplay\fP 1i
  67. Specifies the connection to the X server.
  68. .\" $Header: w.a,v 1.2 88/05/07 11:35:31 mento Exp $
  69. .IP \fIw\fP 1i
  70. Specifies the window.
  71. .\" $Header: parent.a,v 1.2 88/05/07 11:34:55 mento Exp $
  72. .IP \fIparent\fP 1i
  73. Specifies the parent window.
  74. .ds Xy \ of the position in the new parent window
  75. .\" $Header: xy_gen.a,v 1.2 88/08/04 11:22:37 mento Exp $
  76. .IP \fIx\fP 1i
  77. .br
  78. .ns
  79. .IP \fIy\fP 1i
  80. Specify the x and y coordinates\*(Xy.
  81. .\" End marker code here
  82. .LP
  83. .\" $Header: XReparentWin.d,v 1.3 88/08/19 20:07:29 mento Exp $
  84. If the specified window is mapped,
  85. .PN XReparentWindow
  86. automatically performs an
  87. .PN UnmapWindow
  88. request on it, removes it from its current position in the hierarchy,
  89. and inserts it as the child of the specified parent.
  90. The window is placed in the stacking order on top with respect to
  91. sibling windows.
  92. .LP
  93. After reparenting the specified window,
  94. .PN XReparentWindow
  95. causes the X server to generate a
  96. .PN ReparentNotify
  97. event.
  98. The override_redirect member returned in this event is
  99. set to the window's corresponding attribute.
  100. Window manager clients usually should ignore this window if this member
  101. is set to
  102. .PN True .
  103. Finally, if the specified window was originally mapped,
  104. the X server automatically performs a
  105. .PN MapWindow
  106. request on it.
  107. .LP
  108. The X server performs normal exposure processing on formerly obscured
  109. windows.
  110. The X server might not generate 
  111. .PN Expose 
  112. events for regions from the initial
  113. .PN UnmapWindow
  114. request that are immediately obscured by the final
  115. .PN MapWindow
  116. request.
  117. A
  118. .PN BadMatch
  119. error results if:
  120. .IP \(bu 5
  121. The new parent window is not on the same screen as
  122. the old parent window.
  123. .IP \(bu 5
  124. The new parent window is the specified window or an inferior of the
  125. specified window.
  126. .IP \(bu 5
  127. The new parent is
  128. .PN InputOnly
  129. and the window is not.
  130. .IP \(bu 5
  131. The specified window has a
  132. .PN ParentRelative
  133. background, and the new parent window is not the same depth as the
  134. specified window.
  135. .LP
  136. .PN XReparentWindow
  137. can generate
  138. .PN BadMatch
  139. and
  140. .PN BadWindow 
  141. errors.
  142. .NH 2
  143. Controlling the Lifetime of a Window
  144. .XS
  145. \*(SN Controlling the Lifetime of a Window 
  146. .XE
  147. .LP
  148. The save-set of a client is a list of other clients' windows that,
  149. if they are inferiors of one of the client's windows at connection close,
  150. should not be destroyed and should be remapped if they are unmapped.
  151. For further information about close-connection processing,
  152. see section 2.6.
  153. To allow an application's window to survive when a window manager that
  154. has reparented a window fails,
  155. Xlib provides the save-set functions that you can 
  156. use to control the longevity of subwindows
  157. that are normally destroyed when the parent is destroyed.
  158. For example, a window manager that wants to add decoration
  159. to a window by adding a frame might reparent an application's
  160. window. 
  161. When the frame is destroyed,
  162. the application's window should not be destroyed 
  163. but be returned to its previous place in the window hierarchy.
  164. .LP
  165. The X server automatically removes windows from the save-set
  166. when they are destroyed.
  167. .LP
  168. .sp
  169. To add or remove a window from the client's save-set, use
  170. .PN XChangeSaveSet .
  171. .IN "XChangeSaveSet" "" "@DEF@"
  172. .\" Start marker code here
  173. .FD 0
  174. .\" $Header: XChSaveSet.f,v 1.1 88/02/26 09:58:34 mento Exp $
  175. XChangeSaveSet\^(\^\fIdisplay\fP, \fIw\fP\^, \fIchange_mode\fP\^)
  176. .br
  177.       Display *\fIdisplay\fP\^;
  178. .br
  179.       Window \fIw\fP\^;
  180. .br
  181.       int \fIchange_mode\fP\^;
  182. .FN
  183. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  184. .IP \fIdisplay\fP 1i
  185. Specifies the connection to the X server.
  186. .ds Wi that you want to add to or delete from the client's save-set
  187. .\" $Header: w_gen.a,v 1.4 88/08/04 11:21:56 mento Exp $
  188. .IP \fIw\fP 1i
  189. Specifies the window \*(Wi.
  190. .\" $Header: changemode.a,v 1.3 88/05/14 06:01:44 mento Exp $
  191. .IP \fIchange_mode\fP 1i
  192. Specifies the mode.
  193. You can pass
  194. .PN SetModeInsert 
  195. or
  196. .PN SetModeDelete .
  197. .\" End marker code here
  198. .LP
  199. .\" $Header: XChSaveSet.d,v 1.4 88/06/11 07:49:10 mento Exp $
  200. Depending on the specified mode,
  201. .PN XChangeSaveSet
  202. either inserts or deletes the specified window from the client's save-set. 
  203. The specified window must have been created by some other client,
  204. or a
  205. .PN BadMatch
  206. error results.
  207. .LP
  208. .PN XChangeSaveSet
  209. can generate
  210. .PN BadMatch ,
  211. .PN BadValue ,
  212. and
  213. .PN BadWindow 
  214. errors.
  215. .LP
  216. .sp
  217. To add a window to the client's save-set, use
  218. .PN XAddToSaveSet .
  219. .IN "XAddToSaveSet" "" "@DEF@"
  220. .\" Start marker code here
  221. .FD 0
  222. XAddToSaveSet\^(\^\fIdisplay\fP, \fIw\fP\^)
  223. .br
  224.       Display *\fIdisplay\fP\^;
  225. .br
  226.       Window \fIw\fP\^;
  227. .FN
  228. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  229. .IP \fIdisplay\fP 1i
  230. Specifies the connection to the X server.
  231. .ds Wi that you want to add to the client's save-set
  232. .\" $Header: w_gen.a,v 1.4 88/08/04 11:21:56 mento Exp $
  233. .IP \fIw\fP 1i
  234. Specifies the window \*(Wi.
  235. .\" End marker code here
  236. .LP
  237. .\" $Header: XAddSaveSet.d,v 1.3 88/06/11 07:48:34 mento Exp $
  238. The
  239. .PN XAddToSaveSet
  240. function adds the specified window to the client's save-set.
  241. The specified window must have been created by some other client,
  242. or a
  243. .PN BadMatch
  244. error results.
  245. .LP
  246. .PN XAddToSaveSet
  247. can generate
  248. .PN BadMatch
  249. and
  250. .PN BadWindow 
  251. errors.
  252. .LP
  253. .sp
  254. To remove a window from the client's save-set, use
  255. .PN XRemoveFromSaveSet .
  256. .IN "XRemoveFromSaveSet" "" "@DEF@"
  257. .\" Start marker code here
  258. .FD 0
  259. XRemoveFromSaveSet\^(\^\fIdisplay\fP, \fIw\fP\^)
  260. .br
  261.       Display *\fIdisplay\fP\^;
  262. .br
  263.       Window \fIw\fP\^;
  264. .FN
  265. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  266. .IP \fIdisplay\fP 1i
  267. Specifies the connection to the X server.
  268. .ds Wi that you want to delete from the client's save-set
  269. .\" $Header: w_gen.a,v 1.4 88/08/04 11:21:56 mento Exp $
  270. .IP \fIw\fP 1i
  271. Specifies the window \*(Wi.
  272. .\" End marker code here
  273. .LP
  274. .\" $Header: XRmvSaveSet.d,v 1.3 88/06/11 07:52:51 mento Exp $
  275. The
  276. .PN XRemoveFromSaveSet
  277. function removes the specified window from the client's save-set.
  278. The specified window must have been created by some other client,
  279. or a
  280. .PN BadMatch
  281. error results.
  282. .LP
  283. .PN XRemoveFromSaveSet
  284. can generate
  285. .PN BadMatch 
  286. and
  287. .PN BadWindow 
  288. errors.
  289. .NH 2
  290. Managing Installed Colormaps
  291. .XS
  292. \*(SN Managing Installed Colormaps
  293. .XE
  294. .LP
  295. The X server maintains a list of installed colormaps.
  296. Windows using these colormaps are guaranteed to display with
  297. correct colors; windows using other colormaps may or may not display
  298. with correct colors.
  299. Xlib provides functions that you can use to install a colormap, 
  300. uninstall a colormap, and obtain a list of installed colormaps.
  301. .LP
  302. At any time,
  303. there is a subset of the installed maps that is viewed as an ordered list
  304. and is called the required list.
  305. The length of the required list is at most M,
  306. where M is the minimum number of installed colormaps specified for the screen
  307. in the connection setup.
  308. The required list is maintained as follows.
  309. When a colormap is specified to
  310. .PN XInstallColormap ,
  311. it is added to the head of the list;
  312. the list is truncated at the tail, if necessary, to keep its length to 
  313. at most M.
  314. When a colormap is specified to
  315. .PN XUninstallColormap
  316. and it is in the required list,
  317. it is removed from the list.
  318. A colormap is not added to the required list when it is implicitly installed
  319. by the X server,
  320. and the X server cannot implicitly uninstall a colormap that is in the
  321. required list.
  322. .LP
  323. .sp
  324. To install a colormap, use
  325. .PN XInstallColormap .
  326. .IN "XInstallColormap" "" "@DEF@"
  327. .\" Start marker code here
  328. .FD 0
  329. .\" $Header: XInsCmap.f,v 1.2 88/05/14 06:22:44 mento Exp $
  330. XInstallColormap\^(\^\fIdisplay\fP, \fIcolormap\fP\^)
  331. .br
  332.       Display *\fIdisplay\fP\^;
  333. .br
  334.       Colormap \fIcolormap\fP\^;
  335. .FN
  336. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  337. .IP \fIdisplay\fP 1i
  338. Specifies the connection to the X server.
  339. .\" $Header: cmap.a,v 1.2 88/05/09 06:39:13 mento Exp $
  340. .IP \fIcolormap\fP 1i
  341. Specifies the colormap.
  342. .\" End marker code here
  343. .LP
  344. .\" $Header: XInsCmap.d,v 1.3 88/06/11 07:51:41 mento Exp $
  345. The
  346. .PN XInstallColormap
  347. function installs the specified colormap for its associated screen.
  348. All windows associated with this colormap immediately display with
  349. true colors.
  350. You associated the windows with this colormap when you created them by calling
  351. .PN XCreateWindow ,
  352. .PN XCreateSimpleWindow ,
  353. .PN XChangeWindowAttributes ,
  354. or
  355. .PN XSetWindowColormap .
  356. .LP
  357. If the specified colormap is not already an installed colormap, 
  358. the X server generates a
  359. .PN ColormapNotify
  360. event on each window that has that colormap.
  361. In addition, for every other colormap that is installed as 
  362. a result of a call to
  363. .PN XInstallColormap ,
  364. the X server generates a
  365. .PN ColormapNotify
  366. event on each window that has that colormap.
  367. .LP
  368. .PN XInstallColormap
  369. can generate a
  370. .PN BadColor 
  371. error.
  372. .LP
  373. .sp
  374. To uninstall a colormap, use
  375. .PN XUninstallColormap .
  376. .IN "XUninstallColormap" "" "@DEF@"
  377. .\" Start marker code here
  378. .FD 0
  379. .\" $Header: XUninsCmap.f,v 1.2 88/05/14 06:28:37 mento Exp $
  380. XUninstallColormap\^(\^\fIdisplay\fP, \fIcolormap\fP\^)
  381. .br
  382.       Display *\fIdisplay\fP\^;
  383. .br
  384.       Colormap \fIcolormap\fP\^;
  385. .FN
  386. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  387. .IP \fIdisplay\fP 1i
  388. Specifies the connection to the X server.
  389. .\" $Header: cmap.a,v 1.2 88/05/09 06:39:13 mento Exp $
  390. .IP \fIcolormap\fP 1i
  391. Specifies the colormap.
  392. .\" End marker code here
  393. .LP
  394. .\" $Header: XUninsCmap.d,v 1.4 88/08/19 20:13:47 mento Exp $
  395. The
  396. .PN XUninstallColormap
  397. function removes the specified colormap from the required
  398. list for its screen.
  399. As a result,
  400. the specified colormap might be uninstalled, 
  401. and the X server might implicitly install or uninstall additional colormaps.
  402. Which colormaps get installed or uninstalled is server-dependent
  403. except that the required list must remain installed.
  404. .LP
  405. If the specified colormap becomes uninstalled, 
  406. the X server generates a
  407. .PN ColormapNotify
  408. event on each window that has that colormap.
  409. In addition, for every other colormap that is installed or uninstalled as a 
  410. result of a call to 
  411. .PN XUninstallColormap ,
  412. the X server generates a
  413. .PN ColormapNotify
  414. event on each window that has that colormap.
  415. .LP
  416. .PN XUninstallColormap
  417. can generate a
  418. .PN BadColor 
  419. error.
  420. .LP
  421. .sp
  422. To obtain a list of the currently installed colormaps for a given screen, use
  423. .PN XListInstalledColormaps .
  424. .IN "XListInstalledColormaps" "" "@DEF@"
  425. .\" Start marker code here
  426. .FD 0
  427. .\" $Header: XLstInsCmaps.f,v 1.1 88/02/26 10:01:27 mento Exp $
  428. Colormap *XListInstalledColormaps\^(\^\fIdisplay\fP, \fIw\fP, \fInum_return\fP\^)
  429. .br
  430.       Display *\fIdisplay\fP\^;
  431. .br
  432.       Window \fIw\fP\^;
  433. .br
  434.       int *\fInum_return\fP\^;
  435. .FN
  436. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  437. .IP \fIdisplay\fP 1i
  438. Specifies the connection to the X server.
  439. .ds Wi that determines the screen
  440. .\" $Header: w_gen.a,v 1.4 88/08/04 11:21:56 mento Exp $
  441. .IP \fIw\fP 1i
  442. Specifies the window \*(Wi.
  443. .IP \fInum_return\fP 1i
  444. Returns the number of currently installed colormaps.
  445. .\" End marker code here
  446. .LP
  447. .\" $Header: XLstInsCmaps.d,v 1.4 88/08/19 20:16:08 mento Exp $
  448. The
  449. .PN XListInstalledColormaps
  450. function returns a list of the currently installed colormaps for the screen 
  451. of the specified window.
  452. The order of the colormaps in the list is not significant
  453. and is no explicit indication of the required list.
  454. When the allocated list is no longer needed,
  455. free it by using
  456. .PN XFree .
  457. .LP
  458. .PN XListInstalledColormaps
  459. can generate a
  460. .PN BadWindow 
  461. error.
  462. .NH 2
  463. Setting and Retrieving the Font Search Path
  464. .XS
  465. \*(SN Setting and Retrieving the Font Search Path 
  466. .XE
  467. .LP
  468. The set of fonts available from a server depends on a font
  469. search path.  Xlib provides functions to set and retrieve the
  470. search path for a server.
  471. .LP
  472. .sp
  473. To set the font search path, use
  474. .PN XSetFontPath .
  475. .IN "XSetFontPath" "" "@DEF@"
  476. .\" Start marker code here
  477. .FD 0
  478. .\" $Header: XSetFontPath.f,v 1.1 88/02/26 10:03:10 mento Exp $
  479. XSetFontPath\^(\^\fIdisplay\fP, \fIdirectories\fP\^, \fIndirs\fP\^)
  480. .br
  481.       Display *\fIdisplay\fP\^;
  482. .br
  483.       char **\fIdirectories\fP\^;
  484. .br
  485.       int \fIndirs\fP\^;
  486. .FN
  487. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  488. .IP \fIdisplay\fP 1i
  489. Specifies the connection to the X server.
  490. .\" $Header: directories.a,v 1.1 88/02/26 10:06:52 mento Exp $
  491. .IP \fIdirectories\fP 1i
  492. Specifies the directory path used to look for a font.
  493. Setting the path to the empty list restores the default path defined
  494. for the X server.
  495. .\" $Header: ndirs.a,v 1.1 88/02/26 10:29:29 mento Exp $
  496. .IP \fIndirs\fP 1i
  497. Specifies the number of directories in the path.
  498. .\" End marker code here
  499. .LP
  500. .\" $Header: XSetFontPath.d,v 1.2 88/06/11 07:53:13 mento Exp $
  501. The
  502. .PN XSetFontPath
  503. function defines the directory search path for font lookup.
  504. There is only one search path per X server, not one per client.
  505. The encoding and interpretation of the
  506. strings is implementation dependent, but typically they specify
  507. directories or font servers to be searched in the order listed.
  508. An X server is permitted to cache font information internally,
  509. for example, it might cache an entire font from a file and not
  510. check on subsequent opens of that font to see if the underlying
  511. font file has changed.
  512. However,
  513. when the font path is changed
  514. the X server is guaranteed to flush all cached information about fonts 
  515. for which there currently are no explicit resource IDs allocated.
  516. The meaning of an error from this request is implementation dependent.
  517. .LP
  518. .PN XSetFontPath
  519. can generate a
  520. .PN BadValue 
  521. error.
  522. .LP
  523. .sp
  524. To get the current font search path, use
  525. .PN XGetFontPath .
  526. .IN "XGetFontPath" "" "@DEF@"
  527. .\" Start marker code here
  528. .FD 0
  529. .\" $Header: XGetFontPath.f,v 1.1 88/02/26 10:00:27 mento Exp $
  530. char **XGetFontPath\^(\^\fIdisplay\fP, \fInpaths_return\fP\^)
  531. .br
  532.       Display *\fIdisplay\fP\^;
  533. .br
  534.       int *\fInpaths_return\fP\^;
  535.  
  536. .FN
  537. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  538. .IP \fIdisplay\fP 1i
  539. Specifies the connection to the X server.
  540. .\" $Header: npaths.a,v 1.1 88/02/26 10:29:38 mento Exp $
  541. .IP \fInpaths_return\fP 1i
  542. Returns the number of strings in the font path array.
  543. .\" End marker code here
  544. .LP
  545. .\" $Header: XGetFontPath.d,v 1.3 88/04/23 09:36:29 mento Exp $
  546. The
  547. .PN XGetFontPath
  548. function allocates and returns an array of strings containing the search path.
  549. The contents of these strings are implementation dependent
  550. and are not intended to be interpreted by client applications.
  551. When it is no longer needed,
  552. the data in the font path should be freed by using
  553. .PN XFreeFontPath .
  554. .LP
  555. .sp
  556. To free data returned by
  557. .PN XGetFontPath ,
  558. use
  559. .PN XFreeFontPath .
  560. .IN "XFreeFontPath" "" "@DEF@"
  561. .\" Start marker code here
  562. .FD 0
  563. .\" $Header: XFFontPath.f,v 1.1 88/02/26 09:59:58 mento Exp $
  564. XFreeFontPath\^(\^\fIlist\fP\^)
  565. .br
  566.       char **\fIlist\fP\^;
  567.  
  568. .FN
  569. .\" $Header: list.a,v 1.1 88/02/26 10:28:40 mento Exp $
  570. .IP \fIlist\fP 1i
  571. Specifies the array of strings you want to free.
  572. .\" End marker code here
  573. .LP
  574. .\" $Header: XFFontPath.d,v 1.3 88/04/06 15:18:51 mento Exp $
  575. The
  576. .PN XFreeFontPath
  577. function
  578. frees the data allocated by
  579. .PN XGetFontPath .
  580. .NH 2
  581. Server Grabbing 
  582. .XS
  583. \*(SN Server Grabbing 
  584. .XE
  585. .LP
  586. Xlib provides functions that you can use to grab and ungrab the server.
  587. These functions can be used to control processing of output on other
  588. connections by the window system server.
  589. While the server is grabbed,
  590. no processing of requests or close downs on any other connection will occur.
  591. A client closing its connection automatically ungrabs the server.
  592. .IN "Menus"
  593. .IN "Window" "managers"
  594. Although grabbing the server is highly discouraged, it is sometimes necessary.
  595. .LP
  596. .sp
  597. To grab the server, use
  598. .PN XGrabServer .
  599. .IN "Server" "grabbing"
  600. .IN "Grabbing" "server"
  601. .IN "XGrabServer" "" "@DEF@"
  602. .\" Start marker code here
  603. .FD 0
  604. .\" $Header: XGrabServer.f,v 1.1 88/02/26 10:01:06 mento Exp $
  605. XGrabServer\^(\^\fIdisplay\fP\^)
  606. .br
  607.       Display *\fIdisplay\fP\^;
  608. .FN
  609. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  610. .IP \fIdisplay\fP 1i
  611. Specifies the connection to the X server.
  612. .\" End marker code here
  613. .LP
  614. .\" $Header: XGrabServer.d,v 1.3 88/08/19 20:31:23 mento Exp $
  615. The
  616. .PN XGrabServer
  617. function disables processing of requests and close downs on all other 
  618. connections than the one this request arrived on.
  619. You should not grab the X server any more than is absolutely necessary.
  620. .LP
  621. .sp
  622. To ungrab the server, use
  623. .PN XUngrabServer .
  624. .IN "XUngrabServer" "" "@DEF@"
  625. .\" Start marker code here
  626. .FD 0
  627. .\" $Header: XUngrbSrvr.f,v 1.1 88/02/26 10:04:07 mento Exp $
  628. XUngrabServer\^(\^\fIdisplay\fP\^)
  629. .br
  630.       Display *\fIdisplay\fP\^;
  631. .FN
  632. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  633. .IP \fIdisplay\fP 1i
  634. Specifies the connection to the X server.
  635. .\" End marker code here
  636. .LP
  637. .\" $Header: XUngrbSrvr.d,v 1.3 88/08/19 20:32:06 mento Exp $
  638. The
  639. .PN XUngrabServer
  640. function restarts processing of requests and close downs on other connections.
  641. You should avoid grabbing the X server as much as possible.
  642. .NH 2
  643. Killing Clients
  644. .XS
  645. \*(SN Killing Clients 
  646. .XE
  647. .LP
  648. Xlib provides a function to cause the connection to
  649. a client to be closed and its resources to be destroyed.
  650. To destroy a client, use
  651. .PN XKillClient .
  652. .IN "XKillClient" "" "@DEF@"
  653. .\" Start marker code here
  654. .FD 0
  655. .\" $Header: XKillClient.f,v 1.1 88/02/26 10:01:20 mento Exp $
  656. XKillClient\^(\^\fIdisplay\fP, \fIresource\fP\^)
  657. .br
  658.       Display *\fIdisplay\fP\^;
  659. .br
  660.       XID \fIresource\fP\^;
  661. .FN
  662. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  663. .IP \fIdisplay\fP 1i
  664. Specifies the connection to the X server.
  665. .\" $Header: resource.a,v 1.2 88/05/14 09:01:41 mento Exp $
  666. .IP \fIresource\fP 1i
  667. Specifies any resource associated with the client that you want to destroy or
  668. .PN AllTemporary .
  669. .\" End marker code here
  670. .LP
  671. .\" $Header: XKillClient.d,v 1.3 88/08/19 20:35:43 mento Exp $
  672. The
  673. .PN XKillClient
  674. function
  675. forces a close-down of the client
  676. that created the resource
  677. if a valid resource is specified.
  678. If the client has already terminated in
  679. either 
  680. .PN RetainPermanent 
  681. or 
  682. .PN RetainTemporary 
  683. mode, all of the client's
  684. resources are destroyed.
  685. If 
  686. .PN AllTemporary 
  687. is specified, the resources of all clients that have terminated in
  688. .PN RetainTemporary 
  689. are destroyed (see section 2.5).
  690. This permits implementation of window manager facilities that aid debugging.
  691. A client can set its close-down mode to
  692. .PN RetainTemporary .
  693. If the client then crashes,
  694. its windows would not be destroyed. 
  695. The programmer can then inspect the application's window tree 
  696. and use the window manager to destroy the zombie windows.
  697. .LP
  698. .PN XKillClient
  699. can generate a
  700. .PN BadValue 
  701. error.
  702. .NH 2
  703. Screen Saver Control
  704. .XS
  705. \*(SN Screen Saver Control
  706. .XE
  707. .LP
  708. Xlib provides functions that you can use to set or reset the mode 
  709. of the screen saver, to force or activate the screen saver,
  710. or to obtain the current screen saver values.
  711. .LP
  712. .sp
  713. To set the screen saver mode, use
  714. .PN XSetScreenSaver .
  715. .IN "XSetScreenSaver" "" "@DEF@"
  716. .\" Start marker code here
  717. .FD 0
  718. .\" $Header: XSetScrnSvr.f,v 1.1 88/02/26 10:03:37 mento Exp $
  719. XSetScreenSaver\^(\^\fIdisplay\fP, \fItimeout\fP\^, \fIinterval\fP\^, \fIprefer_blanking\fP\^, \fIallow_exposures\fP\^)
  720. .br
  721.       Display *\fIdisplay\fP\^;
  722. .br
  723.       int \fItimeout\fP\^, \fIinterval\fP\^;
  724. .br
  725.       int \fIprefer_blanking\fP\^; 
  726. .br
  727.       int \fIallow_exposures\fP\^;
  728. .FN
  729. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  730. .IP \fIdisplay\fP 1i
  731. Specifies the connection to the X server.
  732. .\" $Header: timeout.a,v 1.1 88/02/26 10:31:42 mento Exp $
  733. .IP \fItimeout\fP 1i
  734. Specifies the timeout, in seconds, until the screen saver turns on.
  735. .\" $Header: interval.a,v 1.2 88/04/06 18:31:20 mento Exp $
  736. .IP \fIinterval\fP 1i
  737. Specifies the interval, in seconds, between screen saver alterations.
  738. .\" $Header: preferblank.a,v 1.3 88/05/14 09:42:26 mento Exp $
  739. .IP \fIprefer_blanking\fP 1i
  740. Specifies how to enable screen blanking.
  741. You can pass
  742. .PN DontPreferBlanking ,
  743. .PN PreferBlanking ,
  744. or
  745. .PN DefaultBlanking .
  746. .\" $Header: allowexp.a,v 1.3 88/05/14 09:43:06 mento Exp $
  747. .IP \fIallow_exposures\fP 1i
  748. Specifies the screen save control values.
  749. You can pass
  750. .PN DontAllowExposures ,
  751. .PN AllowExposures ,
  752. or
  753. .PN DefaultExposures .
  754. .\" End marker code here
  755. .LP
  756. .\" $Header: XSetScrnSvr.d,v 1.3 88/08/19 21:02:13 mento Exp $
  757. Timeout and interval are specified in seconds. 
  758. A timeout of 0 disables the screen saver 
  759. (but an activated screen saver is not deactivated),
  760. and a timeout of \-1 restores the default.
  761. Other negative values generate a
  762. .PN BadValue
  763. error.
  764. If the timeout value is nonzero, 
  765. .PN XSetScreenSaver
  766. enables the screen saver.
  767. An interval of 0 disables the random-pattern motion.
  768. If no input from devices (keyboard, mouse, and so on) is generated 
  769. for the specified number of timeout seconds once the screen saver is enabled,
  770. the screen saver is activated.
  771. .LP
  772. For each screen, 
  773. if blanking is preferred and the hardware supports video blanking, 
  774. the screen simply goes blank.  
  775. Otherwise, if either exposures are allowed or the screen can be regenerated 
  776. without sending 
  777. .PN Expose 
  778. events to clients, 
  779. the screen is tiled with the root window background tile randomly 
  780. re-origined each interval minutes.
  781. Otherwise, the screens' state do not change, 
  782. and the screen saver is not activated.
  783. The screen saver is deactivated,
  784. and all screen states are restored at the next
  785. keyboard or pointer input or at the next call to
  786. .PN XForceScreenSaver
  787. with mode
  788. .PN ScreenSaverReset .  
  789. .LP
  790. If the server-dependent screen saver method supports periodic change,
  791. the interval argument serves as a hint about how long the change period
  792. should be, and zero hints that no periodic change should be made.
  793. Examples of ways to change the screen include scrambling the colormap
  794. periodically, moving an icon image around the screen periodically, or tiling
  795. the screen with the root window background tile, randomly re-origined
  796. periodically.
  797. .LP
  798. .PN XSetScreenSaver
  799. can generate a
  800. .PN BadValue 
  801. error.
  802. .LP
  803. .sp
  804. To force the screen saver on or off, use
  805. .PN XForceScreenSaver .
  806. .IN "XForceScreenSaver" "" "@DEF@"
  807. .\" Start marker code here
  808. .FD 0
  809. XForceScreenSaver\^(\^\fIdisplay\fP\^, \fImode\fP\^)
  810. .br
  811.       Display *\fIdisplay\fP\^;
  812. .br
  813.       int \fImode\fP\^;
  814. .FN
  815. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  816. .IP \fIdisplay\fP 1i
  817. Specifies the connection to the X server.
  818. .IP \fImode\fP 1i
  819. Specifies the mode that is to be applied.
  820. You can pass
  821. .PN ScreenSaverActive
  822. or
  823. .PN ScreenSaverReset .
  824. .\" End marker code here
  825. .LP
  826. .\" $Header: XForScrnSvr.d,v 1.2 88/06/11 07:50:37 mento Exp $
  827. If the specified mode is 
  828. .PN ScreenSaverActive 
  829. and the screen saver currently is deactivated,
  830. .PN XForceScreenSaver
  831. activates the screen saver even if the screen saver had been disabled
  832. with a timeout of zero.
  833. If the specified mode is 
  834. .PN ScreenSaverReset 
  835. and the screen saver currently is enabled,
  836. .PN XForceScreenSaver
  837. deactivates the screen saver if it was activated,
  838. and the activation timer is reset to its initial state 
  839. (as if device input had been received).
  840. .LP
  841. .PN XForceScreenSaver
  842. can generate a
  843. .PN BadValue 
  844. error.
  845. .LP
  846. .sp
  847. To activate the screen saver, use
  848. .PN XActivateScreenSaver .
  849. .IN "XActivateScreenSaver" "" "@DEF@"
  850. .\" Start marker code here
  851. .FD 0
  852. XActivateScreenSaver\^(\^\fIdisplay\fP\^)
  853. .br
  854.       Display *\fIdisplay\fP\^;
  855. .FN
  856. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  857. .IP \fIdisplay\fP 1i
  858. Specifies the connection to the X server.
  859. .\" End marker code here
  860. .LP
  861. .sp
  862. To reset the screen saver, use
  863. .PN XResetScreenSaver .
  864. .IN "XResetScreenSaver" "" "@DEF@"
  865. .\" Start marker code here
  866. .FD 0
  867. XResetScreenSaver\^(\^\fIdisplay\fP\^)
  868. .br
  869.       Display *\fIdisplay\fP\^;
  870. .FN
  871. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  872. .IP \fIdisplay\fP 1i
  873. Specifies the connection to the X server.
  874. .\" End marker code here
  875. .LP
  876. .sp
  877. To get the current screen saver values, use
  878. .PN XGetScreenSaver .
  879. .IN "XGetScreenSaver" "" "@DEF@"
  880. .\" Start marker code here
  881. .FD 0
  882. .\" $Header: XGetScrnSvr.f,v 1.1 88/02/26 10:00:59 mento Exp $
  883. XGetScreenSaver\^(\^\fIdisplay\fP, \fItimeout_return\fP\^, \fIinterval_return\fP\^, \fIprefer_blanking_return\fP\^, 
  884. .br
  885.                   \fIallow_exposures_return\fP\^)
  886. .br
  887.       Display *\fIdisplay\fP\^;
  888. .br
  889.       int *\fItimeout_return\fP\^, *\fIinterval_return\fP\^;
  890. .br
  891.       int *\fIprefer_blanking_return\fP\^;
  892. .br
  893.       int *\fIallow_exposures_return\fP\^;
  894. .FN
  895. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  896. .IP \fIdisplay\fP 1i
  897. Specifies the connection to the X server.
  898. .\" $Header: timeoutret.a,v 1.1 88/02/26 10:31:43 mento Exp $
  899. .IP \fItimeout_return\fP 1i
  900. Returns the timeout, in seconds, until the screen saver turns on.
  901. .\" $Header: intervalret.a,v 1.1 88/02/26 10:28:20 mento Exp $
  902. .IP \fIinterval_return\fP 1i
  903. Returns the interval between screen saver invocations.
  904. .\" $Header: prefrblnkret.a,v 1.2 88/05/14 09:49:37 mento Exp $
  905. .IP \fIprefer_blanking_return\fP 1i
  906. Returns the current screen blanking preference
  907. .Pn ( DontPreferBlanking ,
  908. .PN PreferBlanking ,
  909. or
  910. .PN DefaultBlanking ).
  911. .\" $Header: allowexpret.a,v 1.2 88/05/14 09:50:38 mento Exp $
  912. .IP \fIallow_exposures_return\fP 1i
  913. Returns the current screen save control value
  914. .Pn ( DontAllowExposures ,
  915. .PN AllowExposures ,
  916. or
  917. .PN DefaultExposures ).
  918. .\" End marker code here
  919. .NH 2
  920. Controlling Host Access
  921. .XS
  922. \*(SN Controlling Host Access 
  923. .XE
  924. .LP
  925. This section discusses how to:
  926. .IP \(bu 5
  927. Add, get, or remove hosts from the access control list
  928. .IP \(bu 5
  929. Change, enable, or disable access
  930. .LE
  931. .LP
  932. .IN "Access control list"
  933. .IN "Authentication"
  934. X does not provide any protection on a per-window basis.
  935. If you find out the resource ID of a resource, you can manipulate it.
  936. To provide some minimal level of protection, however,
  937. connections are permitted only from machines you trust.
  938. This is adequate on single-user workstations but obviously
  939. breaks down on timesharing machines.
  940. Although provisions exist in the X protocol for proper connection
  941. authentication, the lack of a standard authentication server
  942. leaves host-level access control as the only common mechanism.
  943. .LP
  944. .IN "Default Protection"
  945. The initial set of hosts allowed to open connections typically consists of:
  946. .IP \(bu 5
  947. The host the window system is running on.
  948. .IP \(bu 5
  949. On POSIX-conformant systems, each host listed in the
  950. .PN /etc/X?.hosts 
  951. file.
  952. The ? indicates the number of the
  953. display.
  954. .IN "Files" "/etc/X?.hosts"
  955. This file should consist of host names separated by newlines.
  956. DECnet nodes must terminate in :: to distinguish them from Internet hosts.
  957. .LP
  958. If a host is not in the access control list when the access control 
  959. mechanism is enabled and if the host attempts to establish a connection,
  960. the server refuses the connection.
  961. To change the access list,
  962. the client must reside on the same host as the server and/or must
  963. have been granted permission in the initial authorization at connection
  964. setup.
  965. .LP
  966. Servers also can implement other access control policies in addition to
  967. or in place of this host access facility.
  968. For further information about other access control implementations,
  969. see ``X Window System Protocol.''
  970. .NH 3
  971. Adding, Getting, or Removing Hosts
  972. .XS
  973. \*(SN Adding, Getting, or Removing Hosts 
  974. .XE
  975. .LP
  976. Xlib provides functions that you can use to add, get, or remove hosts
  977. from the access control list.
  978. All the host access control functions use the 
  979. .PN XHostAddress 
  980. structure, which contains:
  981. .LP
  982. .IN "XHostAddress" "" "@DEF@"
  983. .\" Start marker code here
  984. .Ds 0
  985. .TA .5i 3i
  986. .ta .5i 3i
  987. typedef struct {
  988.     int family;    /* for example FamilyInternet */
  989.     int length;    /* length of address, in bytes */
  990.     char *address;    /* pointer to where to find the address */
  991. } XHostAddress;
  992. .De
  993. .\" End marker code here
  994. .LP
  995. The family member specifies which protocol address family to use 
  996. (for example, TCP/IP or DECnet) and can be
  997. .PN FamilyInternet ,
  998. .PN FamilyDECnet ,
  999. or
  1000. .PN FamilyChaos .
  1001. The length member specifies the length of the address in bytes.
  1002. The address member specifies a pointer to the address.
  1003. .LP
  1004. For TCP/IP, the address should be in network byte order.
  1005. For the DECnet family, 
  1006. the server performs no automatic swapping on the address bytes.
  1007. A Phase IV address is two bytes long.
  1008. The first byte contains the least-significant eight bits of the node number.
  1009. The second byte contains the most-significant two bits of the
  1010. node number in the least-significant two bits of the byte
  1011. and the area in the most-significant six bits of the byte.
  1012. .LP
  1013. .sp
  1014. To add a single host, use
  1015. .PN XAddHost .
  1016. .IN "XAddHost" "" "@DEF@"
  1017. .\" Start marker code here
  1018. .FD 0
  1019. .\" $Header: XAddHost.f,v 1.1 88/02/26 09:58:00 mento Exp $
  1020. XAddHost\^(\^\fIdisplay\fP, \fIhost\fP\^)
  1021. .br
  1022.       Display *\fIdisplay\fP\^;
  1023. .br
  1024.       XHostAddress *\fIhost\fP\^;    
  1025. .FN
  1026. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  1027. .IP \fIdisplay\fP 1i
  1028. Specifies the connection to the X server.
  1029. .ds Ho added
  1030. .\" $Header: host.a,v 1.4 88/08/04 11:14:39 mento Exp $
  1031. .IP \fIhost\fP 1i
  1032. Specifies the host that is to be \*(Ho.
  1033. .\" End marker code here
  1034. .LP
  1035. .\" $Header: XAddHost.d,v 1.4 88/06/11 07:48:33 mento Exp $
  1036. The
  1037. .PN XAddHost
  1038. function adds the specified host to the access control list for that display.
  1039. The server must be on the same host as the client issuing the command, or a
  1040. .PN BadAccess
  1041. error results.
  1042. .LP
  1043. .PN XAddHost
  1044. can generate
  1045. .PN BadAccess
  1046. and
  1047. .PN BadValue 
  1048. errors.
  1049. .LP
  1050. .sp
  1051. To add multiple hosts at one time, use
  1052. .PN XAddHosts .
  1053. .IN "XAddHosts" "" "@DEF@"
  1054. .\" Start marker code here
  1055. .FD 0
  1056. XAddHosts\^(\^\fIdisplay\fP, \fIhosts\fP, \fInum_hosts\fP\^)
  1057. .br
  1058.       Display *\fIdisplay\fP\^;
  1059. .br
  1060.       XHostAddress *\fIhosts\fP\^;
  1061. .br
  1062.       int \fInum_hosts\fP\^;
  1063. .FN
  1064. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  1065. .IP \fIdisplay\fP 1i
  1066. Specifies the connection to the X server.
  1067. .ds Ho added
  1068. .IP \fIhosts\fP 1i
  1069. Specifies each host that is to be \*(Ho.
  1070. .IP \fInum_hosts\fP 1i
  1071. Specifies the number of hosts.
  1072. .\" End marker code here
  1073. .LP
  1074. .\" $Header: XAddHosts.d,v 1.4 88/06/11 07:48:33 mento Exp $
  1075. The
  1076. .PN XAddHosts
  1077. function adds each specified host to the access control list for that display.
  1078. The server must be on the same host as the client issuing the command, or a
  1079. .PN BadAccess
  1080. error results.
  1081. .LP
  1082. .PN XAddHosts
  1083. can generate
  1084. .PN BadAccess
  1085. and
  1086. .PN BadValue 
  1087. errors.
  1088. .LP
  1089. .sp
  1090. To obtain a host list, use
  1091. .PN XListHosts .
  1092. .IN "XListHosts" "" "@DEF@"
  1093. .IN "Files" "<sys/socket.h>"
  1094. .\" Start marker code here
  1095. .FD 0
  1096. .\" $Header: XGetHosts.f,v 1.1 88/02/26 10:00:39 mento Exp $
  1097. XHostAddress *XListHosts\^(\^\fIdisplay\fP, \fInhosts_return\fP, \fIstate_return\fP\^)
  1098. .br
  1099.       Display *\fIdisplay\fP\^;
  1100. .br
  1101.       int *\fInhosts_return\fP\^;
  1102. .br
  1103.       Bool *\fIstate_return\fP\^;
  1104. .FN
  1105. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  1106. .IP \fIdisplay\fP 1i
  1107. Specifies the connection to the X server.
  1108. .\" $Header: nhosts.a,v 1.1 88/02/26 10:29:33 mento Exp $
  1109. .IP \fInhosts_return\fP 1i
  1110. Returns the number of hosts currently in the access control list.
  1111. .IP \fIstate_return\fP 1i
  1112. Returns the state of the access control.
  1113. .\" End marker code here
  1114. .LP
  1115. .\" $Header: XGetHosts.d,v 1.2 88/06/11 07:51:06 mento Exp $
  1116. The
  1117. .PN XListHosts
  1118. function returns the current access control list as well as whether the use 
  1119. of the list at connection setup was enabled or disabled.
  1120. .PN XListHosts
  1121. allows a program to find out what machines can make connections.
  1122. It also returns a pointer to a list of host structures that
  1123. were allocated by the function. 
  1124. When no longer needed,
  1125. this memory should be freed by calling
  1126. .PN XFree .
  1127. .LP
  1128. .sp
  1129. To remove a single host, use
  1130. .PN XRemoveHost .
  1131. .IN "XRemoveHost" "" "@DEF@"
  1132. .\" Start marker code here
  1133. .FD 0
  1134. .\" $Header: XRemoveHost.f,v 1.1 88/02/26 10:02:40 mento Exp $
  1135. XRemoveHost\^(\^\fIdisplay\fP, \fIhost\fP\^)
  1136. .br
  1137.       Display *\fIdisplay\fP\^;
  1138. .br
  1139.       XHostAddress *\fIhost\fP\^;
  1140. .FN
  1141. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  1142. .IP \fIdisplay\fP 1i
  1143. Specifies the connection to the X server.
  1144. .ds Ho removed
  1145. .\" $Header: host.a,v 1.4 88/08/04 11:14:39 mento Exp $
  1146. .IP \fIhost\fP 1i
  1147. Specifies the host that is to be \*(Ho.
  1148. .\" End marker code here
  1149. .LP
  1150. .\" $Header: XRemoveHost.d,v 1.4 88/06/11 07:52:48 mento Exp $
  1151. The
  1152. .PN XRemoveHost
  1153. function removes the specified host from the access control list 
  1154. for that display.
  1155. The server must be on the same host as the client process, or a
  1156. .PN BadAccess
  1157. error results.
  1158. If you remove your machine from the access list,
  1159. you can no longer connect to that server,
  1160. and this operation cannot be reversed unless you reset the server.
  1161. .LP
  1162. .PN XRemoveHost
  1163. can generate
  1164. .PN BadAccess
  1165. and
  1166. .PN BadValue 
  1167. errors.
  1168. .LP
  1169. .sp
  1170. To remove multiple hosts at one time, use
  1171. .PN XRemoveHosts .
  1172. .IN "XRemoveHosts" "" "@DEF@"
  1173. .\" Start marker code here
  1174. .FD 0
  1175. XRemoveHosts\^(\^\fIdisplay\fP, \fIhosts\fP, \fInum_hosts\fP\^)
  1176. .br
  1177.       Display *\fIdisplay\fP\^;
  1178. .br
  1179.       XHostAddress *\fIhosts\fP\^;
  1180. .br
  1181.       int \fInum_hosts\fP\^;
  1182. .FN
  1183. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  1184. .IP \fIdisplay\fP 1i
  1185. Specifies the connection to the X server.
  1186. .ds Ho removed
  1187. .IP \fIhosts\fP 1i
  1188. Specifies each host that is to be \*(Ho.
  1189. .IP \fInum_hosts\fP 1i
  1190. Specifies the number of hosts.
  1191. .\" End marker code here
  1192. .LP
  1193. .\" $Header: XRemoveHosts.d,v 1.3 88/06/11 07:52:49 mento Exp $
  1194. The
  1195. .PN XRemoveHosts
  1196. function removes each specified host from the access control list for that 
  1197. display.  
  1198. The X server must be on the same host as the client process, or a
  1199. .PN BadAccess
  1200. error results.
  1201. If you remove your machine from the access list, 
  1202. you can no longer connect to that server,
  1203. and this operation cannot be reversed unless you reset the server.
  1204. .LP
  1205. .PN XRemoveHosts
  1206. can generate
  1207. .PN BadAccess
  1208. and
  1209. .PN BadValue 
  1210. errors.
  1211. .NH 3
  1212. Changing, Enabling, or Disabling Access Control
  1213. .XS
  1214. \*(SN Changing, Enabling, or Disabling Access Control 
  1215. .XE
  1216. .LP
  1217. Xlib provides functions that you can use to enable, disable, 
  1218. or change access control.
  1219. .LP
  1220. For these functions to execute successfully,
  1221. the client application must reside on the same host as the X server
  1222. and/or have been given permission in the initial authorization
  1223. at connection setup.
  1224. .LP
  1225. .sp
  1226. To change access control, use
  1227. .PN XSetAccessControl .
  1228. .IN "XSetAccessControl" "" "@DEF@"
  1229. .\" Start marker code here
  1230. .FD 0
  1231. XSetAccessControl\^(\^\fIdisplay\fP, \fImode\fP\^)
  1232. .br
  1233.       Display *\fIdisplay\fP\^;
  1234. .br
  1235.       int \fImode\fP\^;
  1236. .FN
  1237. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  1238. .IP \fIdisplay\fP 1i
  1239. Specifies the connection to the X server.
  1240. .IP \fImode\fP 1i
  1241. Specifies the mode.
  1242. You can pass
  1243. .PN EnableAccess
  1244. or
  1245. .PN DisableAccess .
  1246. .\" End marker code here
  1247. .LP
  1248. .\" $Header: XChAccsCntrl.d,v 1.2 88/05/14 10:03:40 mento Exp $
  1249. The
  1250. .PN XSetAccessControl
  1251. function either enables or disables the use of the access control list 
  1252. at each connection setup.
  1253. .LP
  1254. .PN XSetAccessControl
  1255. can generate
  1256. .PN BadAccess
  1257. and
  1258. .PN BadValue 
  1259. errors.
  1260. .LP
  1261. .sp
  1262. To enable access control, use
  1263. .PN XEnableAccessControl .
  1264. .IN "XEnableAccessControl" "" "@DEF@"
  1265. .\" Start marker code here
  1266. .FD 0
  1267. .\" $Header: XEnAccsCntrl.f,v 1.1 88/02/26 09:59:47 mento Exp $
  1268. XEnableAccessControl\^(\^\fIdisplay\fP\^)
  1269. .br
  1270.       Display *\fIdisplay\fP\^;
  1271. .FN
  1272. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  1273. .IP \fIdisplay\fP 1i
  1274. Specifies the connection to the X server.
  1275. .\" End marker code here
  1276. .LP
  1277. .\" $Header: XEnAccsCntrl.d,v 1.2 88/05/14 10:04:37 mento Exp $
  1278. The
  1279. .PN XEnableAccessControl
  1280. function enables the use of the access control list at each connection setup.
  1281. .LP
  1282. .PN XEnableAccessControl
  1283. can generate a
  1284. .PN BadAccess 
  1285. error.
  1286. .LP
  1287. .sp
  1288. To disable access control, use
  1289. .PN XDisableAccessControl .
  1290. .IN "XDisableAccessControl" "" "@DEF@"
  1291. .\" Start marker code here
  1292. .FD 0
  1293. .\" $Header: XDisAcsCntrl.f,v 1.1 88/02/26 09:59:41 mento Exp $
  1294. XDisableAccessControl\^(\^\fIdisplay\fP\^)
  1295. .br
  1296.       Display *\fIdisplay\fP\^;
  1297. .FN
  1298. .\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
  1299. .IP \fIdisplay\fP 1i
  1300. Specifies the connection to the X server.
  1301. .\" End marker code here
  1302. .LP
  1303. .\" $Header: XDisAcsCntrl.d,v 1.2 88/05/14 10:05:51 mento Exp $
  1304. The
  1305. .PN XDisableAccessControl
  1306. function disables the use of the access control list at each connection setup.
  1307. .LP
  1308. .PN XDisableAccessControl
  1309. can generate a
  1310. .PN BadAccess 
  1311. error.
  1312. .bp
  1313.