home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / Protocol / X11.protocol < prev    next >
Encoding:
Text File  |  1991-07-30  |  241.6 KB  |  10,110 lines

  1. .EH ''''
  2. .OH ''''
  3. .EF ''''
  4. .OF ''''
  5. .ps 11
  6. .nr PS 11
  7. \&
  8. .sp 8
  9. .ce 4
  10. \s+2\fBX Window System Protocol\fP\s-2
  11.  
  12. \s+1\fBMIT X Consortium Standard\fP\s-1
  13.  
  14. \s+1\fBX Version 11, Release 5\fP\s-1
  15. .sp 6
  16. .ce 5
  17. \s-1Robert W. Scheifler
  18. .sp 6p
  19. Massachusetts Institute of Technology
  20. Laboratory for Computer Science\s+1
  21. .bp
  22. \&
  23. .ps 9
  24. .nr PS 9
  25. .sp 8
  26. .LP
  27. X Window System is a trademark of M.I.T.
  28. .LP
  29. Copyright \(co 1986, 1987, 1988 
  30. Massachusetts Institute of Technology
  31. .LP
  32. Permission to use, copy, modify, and distribute this document 
  33. for any purpose and without fee is hereby granted, provided 
  34. that the above copyright notice appear in all copies and 
  35. that both that copyright notice and this permission
  36. notice are retained, and that the name of M.I.T. not be used 
  37. in advertising or publicity pertaining to this document without 
  38. specific, written prior permission.
  39. M.I.T. makes no representations about the suitability of this
  40. document or the protocol defined in this document for any purpose.
  41. It is provided ``as is'' without express or implied warranty.
  42. .ps 11
  43. .nr PS 11
  44. .bp
  45. .XS iii
  46. Acknowledgments
  47. .XE
  48. \&
  49. .sp 1
  50. .ce 3
  51. \s+1\fBAcknowledgments\fP\s-1
  52. .sp 2
  53. .na
  54. .LP
  55. The primary contributers to the X11 protocol are:
  56. .LP
  57. .Ds
  58. Dave Carver (Digital HPW)
  59. Branko Gerovac (Digital HPW)
  60. Jim Gettys (MIT/Project Athena, Digital)
  61. Phil Karlton (Digital WSL)
  62. Scott McGregor (Digital SSG)
  63. Ram Rao (Digital UEG)
  64. David Rosenthal (Sun)
  65. Dave Winchell (Digital UEG)
  66. .De
  67. .LP
  68. The implementors of initial server who provided useful 
  69. input are:
  70. .LP
  71. .Ds
  72. Susan Angebranndt (Digital)
  73. Raymond Drewry (Digital)
  74. Todd Newman (Digital)
  75. .De
  76. .LP
  77. The invited reviewers who provided useful input are:
  78. .LP
  79. .Ds
  80. Andrew Cherenson (Berkeley)
  81. Burns Fisher (Digital)
  82. Dan Garfinkel (HP)
  83. Leo Hourvitz (Next)
  84. Brock Krizan (HP)
  85. David Laidlaw (Stellar)
  86. Dave Mellinger (Interleaf)
  87. Ron Newman (MIT)
  88. John Ousterhout (Berkeley)
  89. Andrew Palay (ITC CMU)
  90. Ralph Swick (MIT)
  91. Craig Taylor (Sun)
  92. Jeffery Vroom (Stellar)
  93. .De
  94. .LP
  95. Thanks go to Al Mento of Digital's UEG Documentation Group for
  96. formatting this document.
  97. .LP
  98. This document does not attempt to provide the rationale or pragmatics required
  99. to fully understand the protocol or to place it in perspective within a
  100. complete system.
  101. .LP
  102. The protocol contains many management mechanisms that are not intended for
  103. normal applications.
  104. Not all mechanisms are needed to build a particular user interface.
  105. It is important to keep in mind that the protocol is intended to
  106. provide mechanism, not policy.
  107. .LP
  108. .Ds 0
  109. Robert W. Scheifler
  110. Massachusetts Institute of Technology
  111. Laboratory for Computer Science
  112. .De
  113. .bp 1
  114. .EH '\fBX Protocol\fP''\fBX11, Release 5\fP'
  115. .OH '\fBX Protocol\fP''\fBX11, Release 5\fP'
  116. .EF ''\fB % \fP''
  117. .OF ''\fB % \fP''
  118. .NH 1
  119. Protocol Formats
  120. .XS
  121. \*(SN Protocol Formats
  122. .XE
  123. .SH
  124. Request Format
  125. .LP
  126. Every request contains an 8-bit major opcode and a 16-bit length field
  127. expressed in units of four bytes.
  128. Every request consists of four bytes of a header
  129. (containing the major opcode, the length field, and a data byte) 
  130. followed by zero or more additional bytes of data.
  131. The length field defines the total length of the request, including the header.
  132. The length field in a request must equal the minimum length required to contain
  133. the request.
  134. If the specified length is smaller or larger than the required length, 
  135. an error is generated.
  136. Unused bytes in a request are not required to be zero.
  137. Major opcodes 128 through 255 are reserved for extensions.
  138. Extensions are intended to contain multiple requests, 
  139. so extension requests typically have an additional minor opcode encoded 
  140. in the ``spare'' data byte in the request header.
  141. However, the placement and interpretation of this minor opcode and of all
  142. other fields in extension requests are not defined by the core protocol.
  143. Every request on a given connection is implicitly assigned a sequence number, 
  144. starting with one, that is used in replies, errors, and events.
  145. .SH
  146. Reply Format
  147. .LP
  148. Every reply contains a 32-bit length field expressed in units of four bytes.
  149. Every reply consists of 32 bytes followed by zero or more additional bytes of
  150. data, as specified in the length field.
  151. Unused bytes within a reply are not guaranteed to be zero.
  152. Every reply also contains the least-significant 16 bits of the sequence number 
  153. of the corresponding request.
  154. .SH
  155. Error Format
  156. .LP
  157. Error reports are 32 bytes long.
  158. Every error includes an 8-bit error code.
  159. Error codes 128 through 255 are reserved for extensions.
  160. Every error also includes the major and minor opcodes of the failed request
  161. and the least-significant 16 bits of the sequence number of the request.
  162. For the following errors (see section 4), 
  163. the failing resource ID is also returned: 
  164. .PN Colormap ,
  165. .PN Cursor , 
  166. .PN Drawable , 
  167. .PN Font , 
  168. .PN GContext , 
  169. .PN IDChoice , 
  170. .PN Pixmap , 
  171. and 
  172. .PN Window .
  173. For 
  174. .PN Atom
  175. errors, the failing atom is returned.
  176. For 
  177. .PN Value 
  178. errors, the failing value is returned.
  179. Other core errors return no additional data.
  180. Unused bytes within an error are not guaranteed to be zero.
  181. .SH
  182. Event Format
  183. .LP
  184. Events are 32 bytes long.
  185. Unused bytes within an event are not guaranteed to be zero.
  186. Every event contains an 8-bit type code.
  187. The most-significant bit in this code is set if the event was generated from a 
  188. .PN SendEvent 
  189. request.
  190. Event codes 64 through 127 are reserved for extensions, although the core
  191. protocol does not define a mechanism for selecting interest in such events.
  192. Every core event (with the exception of 
  193. .PN KeymapNotify ) 
  194. also contains the least-significant 16 bits of the sequence number of the last 
  195. request issued by the client that was (or is currently being) processed by 
  196. the server.
  197. .NH 1
  198. Syntactic Conventions
  199. .XS
  200. \*(SN Syntactic Conventions
  201. .XE
  202. .LP
  203. The rest of this document uses the following syntactic conventions.
  204. .IP \(bu 5
  205. The syntax {...} encloses a set of alternatives.
  206. .IP \(bu 5
  207. The syntax [...] encloses a set of structure components.
  208. .IP \(bu 5
  209. In general, TYPEs are in uppercase and 
  210. .PN AlternativeValues
  211. are capitalized.
  212. .IP \(bu 5
  213. Requests in section 9 are described in the following format:
  214. .IP
  215. .Ds 0
  216. .TA .75i
  217. .ta .75i
  218. .PN RequestName
  219.     \fIarg1\fP\^: type1
  220.     ...
  221.     \fIargN\fP\^: typeN
  222.    =>
  223.     result1: type1
  224.     ...
  225.     resultM: typeM
  226.  
  227.     Errors: kind1, ..., kindK
  228.  
  229.     Description.
  230. .De
  231. .IP
  232. If no => is present in the description, 
  233. then the request has no reply (it is asynchronous), 
  234. although errors may still be reported.
  235. If =>+ is used, 
  236. then one or more replies can be generated for a single request.
  237. .IP \(bu 5
  238. Events in section 11 are described in the following format:
  239. .IP
  240. .Ds 0
  241. .TA .75i
  242. .ta .75i
  243. .PN EventName
  244.     \fIvalue1\fP\^: type1
  245.     ...
  246.     \fIvalueN\fP\^: typeN
  247.  
  248.     Description.
  249. .De
  250. .NH 1
  251. Common Types
  252. .XS
  253. \*(SN Common Types
  254. .XE
  255. .LP
  256. .TS
  257. lw(1.25i) lw(4.5i).
  258. _
  259. .sp 6p
  260. .B
  261. Name    Value
  262. .sp 6p
  263. _
  264. .sp 6p
  265. .TH
  266. .R
  267. .IN "Types" "LISTofFOO" "@DEF@"
  268. LISTofFOO    T{
  269. A type name of the form LISTofFOO means a counted list of elements of type
  270. FOO.
  271. The size of the length field may vary (it is not necessarily the same
  272. size as a FOO), and in some cases, it may be implicit. 
  273. It is fully specified in Appendix B.
  274. Except where explicitly noted,
  275. zero-length lists are legal.
  276. T}
  277. .sp 3p
  278. .IN "Types" "BITMASK" "@DEF@"
  279. T{
  280. BITMASK
  281. .br
  282. .ns
  283. .IN "Types" "LISTofVALUE" "@DEF@"
  284. LISTofVALUE
  285. T}    T{
  286. The types BITMASK and LISTofVALUE are somewhat special.
  287. Various requests contain arguments of the form:
  288. .br
  289. \fIvalue-mask\fP\^: BITMASK
  290. .br
  291. \fIvalue-list\fP\^: LISTofVALUE
  292. .br
  293. These are used to allow the client to specify a subset of a heterogeneous 
  294. collection of optional arguments.
  295. The value-mask specifies which arguments are to be provided; 
  296. each such argument is assigned a unique bit position.
  297. The representation of the BITMASK will typically contain more bits than 
  298. there are defined arguments.
  299. The unused bits in the value-mask must be zero (or the server generates a 
  300. .PN Value 
  301. error).
  302. The value-list contains one value for each bit set to 1 in the mask, 
  303. from least-significant to most-significant bit in the mask.
  304. Each value is represented with four bytes, 
  305. but the actual value occupies only the least-significant bytes as required.
  306. The values of the unused bytes do not matter.
  307. T}
  308. .sp 3p
  309. .IN "Types" "OR" "@DEF@"
  310. OR    T{
  311. A type of the form ``T1 or ... or Tn'' means the union of the indicated types.
  312. A single-element type is given as the element without enclosing braces.
  313. T}
  314. .IN "Types" "WINDOW" "@DEF@"
  315. WINDOW    32-bit value (top three bits guaranteed to be zero)
  316. .IN "Types" "PIXMAP" "@DEF@"
  317. PIXMAP    32-bit value (top three bits guaranteed to be zero)
  318. .IN "Types" "CURSOR" "@DEF@"
  319. CURSOR    32-bit value (top three bits guaranteed to be zero)
  320. .IN "Types" "FONT" "@DEF@"
  321. FONT    32-bit value (top three bits guaranteed to be zero)
  322. .IN "Types" "GCONTEXT" "@DEF@"
  323. GCONTEXT    32-bit value (top three bits guaranteed to be zero)
  324. .IN "Types" "COLORMAP" "@DEF@"
  325. COLORMAP    32-bit value (top three bits guaranteed to be zero)
  326. .IN "Types" "DRAWABLE" "@DEF@"
  327. DRAWABLE    WINDOW or PIXMAP
  328. .IN "Types" "FONTABLE" "@DEF@"
  329. FONTABLE    FONT or GCONTEXT
  330. .IN "Types" "ATOM" "@DEF@"
  331. ATOM    32-bit value (top three bits guaranteed to be zero)
  332. .IN "Types" "VISUALID" "@DEF@"
  333. VISUALID    32-bit value (top three bits guaranteed to be zero)
  334. .IN "Types" "VALUE" "@DEF@"
  335. VALUE    32-bit quantity (used only in LISTofVALUE)
  336. .IN "Types" "BYTE" "@DEF@"
  337. BYTE    8-bit value
  338. .IN "Types" "INT8" "@DEF@"
  339. INT8    8-bit signed integer
  340. .IN "Types" "INT16" "@DEF@"
  341. INT16    16-bit signed integer
  342. .IN "Types" "INT32" "@DEF@"
  343. INT32    32-bit signed integer
  344. .IN "Types" "CARD8" "@DEF@"
  345. CARD8    8-bit unsigned integer
  346. .IN "Types" "CARD16" "@DEF@"
  347. CARD16    16-bit unsigned integer
  348. .IN "Types" "CARD32" "@DEF@"
  349. CARD32    32-bit unsigned integer
  350. .IN "Types" "TIMESTAMP" "@DEF@"
  351. TIMESTAMP    CARD32
  352. .IN "Types" "BITGRAVITY" "@DEF@"
  353. BITGRAVITY    T{
  354. .Pn { Forget , 
  355. .PN Static ,
  356. .PN NorthWest ,
  357. .PN North , 
  358. .PN NorthEast ,
  359. .PN West , 
  360. .PN Center , 
  361. .br
  362. .PN East ,
  363. .PN SouthWest , 
  364. .PN South , 
  365. .PN SouthEast }
  366. T}
  367. .IN "Types" "WINGRAVITY" "@DEF@"
  368. WINGRAVITY    T{
  369. .Pn { Unmap , 
  370. .PN Static ,
  371. .PN NorthWest , 
  372. .PN North , 
  373. .PN NorthEast ,
  374. .PN West , 
  375. .PN Center , 
  376. .br
  377. .PN East ,
  378. .PN SouthWest , 
  379. .PN South , 
  380. .PN SouthEast }
  381. T}
  382. .IN "Types" "BOOL" "@DEF@"
  383. BOOL    T{
  384. .Pn { True , 
  385. .PN False }
  386. T}
  387. .IN "Types" "EVENT" "@DEF@"
  388. EVENT    T{
  389. .Pn { KeyPress , 
  390. .PN KeyRelease ,
  391. .PN OwnerGrabButton ,
  392. .PN ButtonPress , 
  393. .br
  394. .PN ButtonRelease , 
  395. .PN EnterWindow , 
  396. .PN LeaveWindow ,
  397. .PN PointerMotion , 
  398. .br
  399. .PN PointerMotionHint ,
  400. .PN Button1Motion , 
  401. .PN Button2Motion , 
  402. .br
  403. .PN Button3Motion ,
  404. .PN Button4Motion , 
  405. .PN Button5Motion , 
  406. .PN ButtonMotion ,
  407. .br
  408. .PN Exposure , 
  409. .PN VisibilityChange ,
  410. .PN StructureNotify , 
  411. .PN ResizeRedirect ,
  412. .br
  413. .PN SubstructureNotify , 
  414. .PN SubstructureRedirect ,
  415. .PN FocusChange ,
  416. .br
  417. .PN PropertyChange , 
  418. .PN ColormapChange ,
  419. .PN KeymapState }
  420. T}
  421. .IN "Types" "POINTEREVENT" "@DEF@"
  422. POINTEREVENT    T{
  423. .Pn { ButtonPress , 
  424. .PN ButtonRelease , 
  425. .PN EnterWindow , 
  426. .PN LeaveWindow ,
  427. .br
  428. .PN PointerMotion , 
  429. .PN PointerMotionHint ,
  430. .PN Button1Motion , 
  431. .br
  432. .PN Button2Motion , 
  433. .PN Button3Motion ,
  434. .PN Button4Motion , 
  435. .PN Button5Motion , 
  436. .br
  437. .PN ButtonMotion ,
  438. .PN KeymapState }
  439. T}
  440. .IN "Types" "DEVICEEVENT" "@DEF@"
  441. DEVICEEVENT    T{
  442. .Pn { KeyPress , 
  443. .PN KeyRelease ,
  444. .PN ButtonPress , 
  445. .PN ButtonRelease ,
  446. .br
  447. .PN PointerMotion ,
  448. .PN Button1Motion , 
  449. .PN Button2Motion , 
  450. .PN Button3Motion ,
  451. .br
  452. .PN Button4Motion , 
  453. .PN Button5Motion , 
  454. .PN ButtonMotion }
  455. T}
  456. .IN "Types" "KEYSYM" "@DEF@"
  457. KEYSYM    32-bit value (top three bits guaranteed to be zero)
  458. .IN "Types" "KEYCODE" "@DEF@"
  459. KEYCODE    CARD8
  460. .IN "Types" "BUTTON" "@DEF@"
  461. BUTTON    CARD8
  462. .IN "Types" "KEYMASK" "@DEF@"
  463. KEYMASK    T{
  464. .Pn { Shift , 
  465. .PN Lock , 
  466. .PN Control , 
  467. .PN Mod1 , 
  468. .PN Mod2 , 
  469. .PN Mod3 , 
  470. .PN Mod4 , 
  471. .PN Mod5 }
  472. T}
  473. .IN "Types" "BUTMASK" "@DEF@"
  474. BUTMASK    T{
  475. .Pn { Button1 , 
  476. .PN Button2 , 
  477. .PN Button3 , 
  478. .PN Button4 , 
  479. .PN Button5 }
  480. T}
  481. .IN "Types" "KEYBUTMASK" "@DEF@"
  482. KEYBUTMASK    KEYMASK or BUTMASK
  483. .IN "Types" "STRING8" "@DEF@"
  484. STRING8    LISTofCARD8
  485. .IN "Types" "STRING16" "@DEF@"
  486. STRING16    LISTofCHAR2B
  487. .IN "Types" "CHAR2B" "@DEF@"
  488. CHAR2B    [byte1, byte2: CARD8]
  489. .IN "Types" "POINT" "@DEF@"
  490. POINT    [x, y: INT16]
  491. .IN "Types" "RECTANGLE" "@DEF@"
  492. RECTANGLE    T{
  493. [x, y: INT16, 
  494. .br
  495. \ width, height: CARD16]
  496. T}
  497. .IN "Types" "ARC" "@DEF@"
  498. ARC    T{
  499. [x, y: INT16,
  500. .br
  501. \ width, height: CARD16,
  502. .br
  503. \ angle1, angle2: INT16]
  504. T}
  505. .IN "Types" "HOST" "@DEF@"
  506. HOST    T{
  507. [family: 
  508. .Pn { Internet , 
  509. .PN DECnet , 
  510. .PN Chaos }
  511. T}
  512.     T{
  513. \ address: LISTofBYTE]
  514. T}
  515. .TE
  516. .LP
  517. The [x,y] coordinates of a RECTANGLE specify the upper-left corner.
  518. .LP
  519. The primary interpretation of large characters in a STRING16 is that they
  520. are composed of two bytes used to index a 2-D matrix;
  521. hence, the use of CHAR2B rather than CARD16.
  522. This corresponds to the JIS/ISO method of indexing 2-byte characters.
  523. It is expected that most large fonts will be defined with 2-byte 
  524. matrix indexing.
  525. For large fonts constructed with linear indexing, 
  526. a CHAR2B can be interpreted as a 16-bit number by treating byte1 as
  527. the most-significant byte.
  528. This means that clients should always transmit such
  529. 16-bit character values most-significant byte first, as the server will never
  530. byte-swap CHAR2B quantities.
  531. .LP
  532. The length, format, and interpretation of a HOST address are specific to the
  533. family (see 
  534. .PN ChangeHosts 
  535. request).
  536. .NH 1
  537. Errors
  538. .XS
  539. \*(SN Errors
  540. .XE
  541. .LP
  542. In general, when a request terminates with an error, 
  543. the request has no side effects (that is, there is no partial execution).
  544. The only requests for which this is not true are 
  545. .PN ChangeWindowAttributes , 
  546. .PN ChangeGC , 
  547. .PN PolyText8 , 
  548. .PN PolyText16 ,
  549. .PN FreeColors , 
  550. .PN StoreColors , 
  551. and 
  552. .PN ChangeKeyboardControl .
  553. .LP
  554. The following error codes result from various requests as follows:
  555. .TS H
  556. lw(1.5i) lw(4.25i).
  557. _
  558. .sp 6p
  559. .B
  560. Error    Description
  561. .sp 6p
  562. _
  563. .sp 6p
  564. .TH
  565. .R
  566. .IN "Error Codes" "Access" "@DEF@"
  567. T{
  568. .PN Access
  569. T}    T{
  570. An attempt is made to grab a key/button combination already grabbed by another
  571. client.
  572. .sp 6p
  573. An attempt is made to free a colormap entry not allocated by the client,
  574. or to free an entry in a colormap that was created with all entries writable.
  575. .sp 6p
  576. An attempt is made to store into a read-only or an unallocated colormap entry.
  577. .sp 6p
  578. An attempt is made to modify the access control list from other than the local
  579. host (or otherwise authorized client).
  580. .sp 6p
  581. An attempt is made to select an event type that only one client can
  582. select at a time when another client has already selected it.
  583. T}
  584. .sp 6p
  585. .IN "Error Codes" "Alloc" "@DEF@"
  586. T{
  587. .PN Alloc
  588. T}    T{
  589. The server failed to allocate the requested resource.
  590. Note that the explicit listing of
  591. .PN Alloc
  592. errors in request only covers allocation errors at a very coarse level
  593. and is not intended to cover all cases
  594. of a server running out of allocation space in the middle of service.
  595. The semantics when a server runs out of allocation space are left unspecified,
  596. but a server may generate an
  597. .PN Alloc
  598. error on any request for this reason,
  599. and clients should be prepared to receive such errors and handle
  600. or discard them.
  601. T}
  602. .sp 6p
  603. .IN "Error Codes" "Atom" "@DEF@"
  604. T{
  605. .PN Atom
  606. T}    T{
  607. A value for an ATOM argument does not name a defined ATOM.
  608. T}
  609. .sp 6p
  610. .IN "Error Codes" "Colormap" "@DEF@"
  611. T{
  612. .PN Colormap
  613. T}    T{
  614. A value for a COLORMAP argument does not name a defined COLORMAP.
  615. T}
  616. .sp 6p
  617. .IN "Error Codes" "Cursor" "@DEF@"
  618. T{
  619. .PN Cursor
  620. T}    T{
  621. A value for a CURSOR argument does not name a defined CURSOR.
  622. T}
  623. .sp 6p
  624. .IN "Error Codes" "Drawable" "@DEF@"
  625. T{
  626. .PN Drawable
  627. T}    T{
  628. A value for a DRAWABLE argument does not name a defined WINDOW or
  629. PIXMAP.
  630. T}
  631. .sp 6p
  632. .IN "Error Codes" "Font" "@DEF@"
  633. T{
  634. .PN Font
  635. T}    T{
  636. A value for a FONT argument does not name a defined FONT.
  637. .sp 6p
  638. A value for a FONTABLE argument does not name a defined FONT or a
  639. defined GCONTEXT.
  640. T}
  641. .sp 6p
  642. .IN "Error Codes" "GContext" "@DEF@"
  643. T{
  644. .PN GContext
  645. T}    T{
  646. A value for a GCONTEXT argument does not name a defined GCONTEXT.
  647. T}
  648. .sp 6p
  649. .IN "Error Codes" "IDChoice" "@DEF@"
  650. T{
  651. .PN IDChoice
  652. T}    T{
  653. The value chosen for a resource identifier either is not included
  654. in the range assigned to the client or is already in use.
  655. T}
  656. .sp 6p
  657. .IN "Error Codes" "Implementation" "@DEF@"
  658. T{
  659. .PN Implementation
  660. T}    T{
  661. The server does not implement some aspect of the request.
  662. A server that generates this error for a core request is deficient.
  663. As such, this error is not listed for any of the requests, 
  664. but clients should be prepared to receive such errors 
  665. and handle or discard them.
  666. T}
  667. .sp 6p
  668. .IN "Error Codes" "Length" "@DEF@"
  669. T{
  670. .PN Length
  671. T}    T{
  672. The length of a request is shorter or longer than that required
  673. to minimally contain the arguments.
  674. .sp 6p
  675. The length of a request exceeds the maximum length accepted by the
  676. server.
  677. T}
  678. .sp 6p
  679. .IN "Error Codes" "Match" "@DEF@"
  680. T{
  681. .PN Match
  682. T}    T{
  683. An 
  684. .PN InputOnly 
  685. window is used as a DRAWABLE.
  686. .sp 6p
  687. In a graphics request, the GCONTEXT argument does not have the same
  688. root and depth as the destination DRAWABLE argument.
  689. .sp 6p
  690. Some argument (or pair of arguments) has the correct type and range,
  691. but it fails to match in some other way required by the request.
  692. T}
  693. .sp 6p
  694. .IN "Error Codes" "Name" "@DEF@"
  695. T{
  696. .PN Name
  697. T}    T{
  698. A font or color of the specified name does not exist.
  699. T}
  700. .sp 6p
  701. .IN "Error Codes" "Pixmap" "@DEF@"
  702. T{
  703. .PN Pixmap
  704. T}    T{
  705. A value for a PIXMAP argument does not name a defined PIXMAP.
  706. T}
  707. .sp 6p
  708. .IN "Error Codes" "Request" "@DEF@"
  709. T{
  710. .PN Request
  711. T}    T{
  712. The major or minor opcode does not specify a valid request.
  713. T}
  714. .sp 6p
  715. .IN "Error Codes" "Value" "@DEF@"
  716. T{
  717. .PN Value
  718. T}    T{
  719. Some numeric value falls outside the range of values accepted by the request.
  720. Unless a specific range is specified for an argument,
  721. the full range defined by the argument's type is accepted.
  722. Any argument defined as a set of alternatives typically can generate 
  723. this error (due to the encoding).
  724. T}
  725. .sp 6p
  726. .IN "Error Codes" "Window" "@DEF@"
  727. T{
  728. .PN Window
  729. T}    T{
  730. A value for a WINDOW argument does not name a defined WINDOW.
  731. T}
  732. .sp 6p
  733. _
  734. .TE
  735. .NT Note
  736. The 
  737. .PN Atom , 
  738. .PN Colormap , 
  739. .PN Cursor , 
  740. .PN Drawable , 
  741. .PN Font , 
  742. .PN GContext , 
  743. .PN Pixmap , 
  744. and
  745. .PN Window 
  746. errors are also used when the argument type is extended by union with a
  747. set of fixed alternatives, for example, <WINDOW or 
  748. .PN PointerRoot 
  749. or 
  750. .PN None >.
  751. .NE
  752. .NH 1
  753. Keyboards
  754. .XS
  755. \*(SN Keyboards
  756. .XE
  757. .LP
  758. A KEYCODE represents a physical (or logical) key.
  759. Keycodes lie in the inclusive range [8,255].
  760. A keycode value carries no intrinsic information,
  761. although server implementors may attempt to encode geometry information
  762. (for example, matrix) to be interpreted in a server-dependent fashion.
  763. The mapping between keys and keycodes cannot be changed using the 
  764. protocol.
  765. .LP
  766. A KEYSYM is an encoding of a symbol on the cap of a key.
  767. The set of defined KEYSYMs include the character sets Latin 1, Latin 2, 
  768. Latin 3, Latin 4, Kana, Arabic, Cyrillic, Greek, Tech, Special, Publish, APL, 
  769. and Hebrew as well as a set of symbols common on keyboards (Return, Help, Tab,
  770. and so on).
  771. KEYSYMs with the most-significant bit (of the 29 bits) set are reserved 
  772. as vendor-specific.
  773. .LP
  774. A list of KEYSYMs is associated with each KEYCODE.
  775. The list is intended to convey the set of symbols on the corresponding key.
  776. If the list (ignoring trailing NoSymbol entries) is a single KEYSYM ``\fIK\fP'',
  777. then the list is treated as if it were 
  778. the list ``\fIK\fP NoSymbol \fIK\fP NoSymbol''.
  779. If the list (ignoring trailing NoSymbol entries) is a pair of KEYSYMs
  780. ``\fIK1 K2\fP'', then the list is treated as if it were the list
  781. ``\fIK1 K2 K1 K2\fP''. 
  782. If the list (ignoring trailing NoSymbol entries) is 
  783. a triple of KEYSYMs ``\fIK1 K2 K3\fP'',
  784. then the list is treated as if it were the list ``\fIK1 K2 K3\fP NoSymbol''.
  785. When an explicit ``void'' element is desired in the list,
  786. the value VoidSymbol can be used.
  787. .LP
  788. The first four elements of the list are split into two groups of KEYSYMs.
  789. Group 1 contains the first and second KEYSYMs, Group 2 contains the third and
  790. fourth KEYSYMs.
  791. Within each group, 
  792. if the second element of the group is NoSymbol,
  793. then the group should be treated as if the second element were the
  794. same as the first element, except when the first element is an alphabetic
  795. KEYSYM ``\fIK\fP'' for which both lowercase and uppercase forms are defined.
  796. In that case, the group should be treated as if the first element were the
  797. lowercase form of ``\fIK\fP'' and the second element were the uppercase form
  798. of ``\fIK\fP''.
  799. .LP
  800. The standard rules for obtaining a KEYSYM from a
  801. .PN KeyPress
  802. event make use of only the Group 1 and Group 2 KEYSYMs; no interpretation of
  803. other KEYSYMs in the list is defined.  The modifier state determines which 
  804. group to use.  Switching between groups is controlled by the KEYSYM named
  805. MODE SWITCH, by attaching that KEYSYM to some KEYCODE and attaching that
  806. KEYCODE to any one of the modifiers Mod1 through Mod5.  This modifier is
  807. called the ``group modifier.''  For any KEYCODE, Group 1 is used when the
  808. group modifier is off, and Group 2 is used when the group modifier is on.
  809. .LP
  810. Within a group, the modifier state determines which KEYSYM to use.  The
  811. first KEYSYM is used when the Shift and Lock modifiers are off.  The second
  812. KEYSYM is used when the Shift modifier is on, or when the Lock modifier is on
  813. and the second KEYSYM is uppercase alphabetic, or when the Lock modifier is on
  814. and is interpreted as ShiftLock.  Otherwise, when the Lock modifier is on and
  815. is interpreted as CapsLock, the state of the Shift modifier is applied first to
  816. select a KEYSYM; but if that KEYSYM is lowercase alphabetic, then the
  817. corresponding uppercase KEYSYM is used instead.
  818. .LP
  819. The mapping between KEYCODEs and KEYSYMs is not used directly by the server;
  820. it is merely stored for reading and writing by clients.
  821. .LP
  822. The KEYMASK modifier named Lock is intended to be mapped to either a CapsLock
  823. or a ShiftLock key, but which one is left as application-specific
  824. and/or user-specific.
  825. However, it is suggested that the determination be made according to the
  826. associated KEYSYM(s) of the corresponding KEYCODE.
  827. .NH 1
  828. Pointers
  829. .XS
  830. \*(SN Pointers
  831. .XE
  832. .LP
  833. Buttons are always numbered starting with one.
  834. .NH 1
  835. Predefined Atoms
  836. .XS
  837. \*(SN Predefined Atoms
  838. .XE
  839. .LP
  840. Predefined atoms are not strictly necessary and may not be useful in all
  841. environments, but they will eliminate many 
  842. .PN InternAtom 
  843. requests in most applications.
  844. Note that they are predefined only in the sense of having numeric values, 
  845. not in the sense of having required semantics.
  846. The core protocol imposes no semantics on these names,
  847. but semantics are specified in other X Consortium standards,
  848. such as the \fIInter-Client Communication Conventions Manual\fP
  849. and the \fIX Logical Font Description Conventions\fP.
  850. .LP
  851. The following names have predefined atom values.
  852. Note that uppercase and lowercase matter.
  853. .TS
  854. lw(1.75i) l w(1.75i) lw(1.75i).
  855. ARC    ITALIC_ANGLE    STRING
  856. ATOM    MAX_SPACE    SUBSCRIPT_X
  857. BITMAP    MIN_SPACE    SUBSCRIPT_Y
  858. CAP_HEIGHT    NORM_SPACE    SUPERSCRIPT_X
  859. CARDINAL    NOTICE    SUPERSCRIPT_Y
  860. COLORMAP    PIXMAP    UNDERLINE_POSITION
  861. COPYRIGHT    POINT    UNDERLINE_THICKNESS
  862. CURSOR    POINT_SIZE    VISUALID
  863. CUT_BUFFER0    PRIMARY    WEIGHT
  864. CUT_BUFFER1    QUAD_WIDTH    WINDOW
  865. CUT_BUFFER2    RECTANGLE    WM_CLASS
  866. CUT_BUFFER3    RESOLUTION    WM_CLIENT_MACHINE
  867. CUT_BUFFER4    RESOURCE_MANAGER    WM_COMMAND
  868. CUT_BUFFER5    RGB_BEST_MAP    WM_HINTS
  869. CUT_BUFFER6    RGB_BLUE_MAP    WM_ICON_NAME
  870. CUT_BUFFER7    RGB_COLOR_MAP    WM_ICON_SIZE
  871. DRAWABLE    RGB_DEFAULT_MAP    WM_NAME
  872. END_SPACE    RGB_GRAY_MAP    WM_NORMAL_HINTS
  873. FAMILY_NAME    RGB_GREEN_MAP    WM_SIZE_HINTS
  874. FONT    RGB_RED_MAP    WM_TRANSIENT_FOR
  875. FONT_NAME    SECONDARY    WM_ZOOM_HINTS
  876. FULL_NAME    STRIKEOUT_ASCENT    X_HEIGHT
  877. INTEGER        STRIKEOUT_DESCENT
  878. .TE
  879. .LP
  880. To avoid conflicts with possible future names for which semantics might be
  881. imposed (either at the protocol level or in terms of higher level user
  882. interface models),
  883. names beginning with an underscore should be used for atoms
  884. that are private to a particular vendor or organization.
  885. To guarantee no conflicts between vendors and organizations,
  886. additional prefixes need to be used.
  887. However, the protocol does not define the mechanism for choosing such prefixes.
  888. For names private to a single application or end user but stored in globally
  889. accessible locations,
  890. it is suggested that two leading underscores be used to avoid conflicts with
  891. other names.
  892. .NH 1
  893. Connection Setup
  894. .XS
  895. \*(SN Connection Setup
  896. .XE
  897. .LP
  898. For remote clients, 
  899. the X protocol can be built on top of any reliable byte stream.
  900. .SH
  901. Connection Initiation
  902. .LP
  903. The client must send an initial byte of data to identify the byte order to be
  904. employed.
  905. The value of the byte must be octal 102 or 154.
  906. The value 102 (ASCII uppercase B) means values are transmitted most-significant
  907. byte first, and value 154 (ASCII lowercase l) means values are transmitted 
  908. least-significant byte first.
  909. Except where explicitly noted in the protocol,
  910. all 16-bit and 32-bit quantities sent by the client must be transmitted with 
  911. this byte order,
  912. and all 16-bit and 32-bit quantities returned by the server will be transmitted
  913. with this byte order.
  914. .LP
  915. Following the byte-order byte,
  916. the client sends the following information at connection setup:
  917. .IP
  918. protocol-major-version: CARD16
  919. .br
  920. protocol-minor-version: CARD16
  921. .br
  922. authorization-protocol-name: STRING8
  923. .br
  924. authorization-protocol-data: STRING8
  925. .LP
  926. The version numbers indicate what version of the protocol the client
  927. expects the server to implement.
  928. .LP
  929. The authorization name indicates what authorization protocol the client
  930. expects the server to use, and the data is specific to that protocol.
  931. Specification of valid authorization mechanisms is not part of the core
  932. X protocol.
  933. It is hoped that eventually one authorization protocol will be agreed upon.
  934. In the meantime,
  935. a server that implements a different protocol than the client expects 
  936. or that only implements the host-based mechanism may simply ignore this
  937. information.
  938. If both name and data strings are empty,
  939. this is to be interpreted as ``no explicit authorization.''
  940. .SH
  941. Server Response
  942. .LP
  943. The client receives the following information at connection setup:
  944. .IP
  945. success: BOOL
  946. .br
  947. protocol-major-version: CARD16
  948. .br
  949. protocol-minor-version: CARD16
  950. .br
  951. length: CARD16
  952. .LP
  953. Length is the amount of additional data to follow, in units of four bytes.
  954. The version numbers are an escape hatch in case future revisions of the
  955. protocol are necessary.
  956. In general, 
  957. the major version would increment for incompatible changes, 
  958. and the minor version would increment for small upward compatible changes.
  959. Barring changes,
  960. the major version will be 11, and the minor version will be 0.
  961. The protocol version numbers returned indicate the protocol the server
  962. actually supports.
  963. This might not equal the version sent by the client.
  964. The server can (but need not) refuse connections from clients that offer a
  965. different version than the server supports.
  966. A server can (but need not) support more than one version simultaneously.
  967. .LP
  968. The client receives the following additional data if authorization fails:
  969. .IP
  970. reason: STRING8
  971. .LP
  972. The client receives the following additional data if authorization is accepted:
  973. .IP
  974. vendor: STRING8
  975. .br
  976. release-number: CARD32
  977. .br
  978. resource-id-base, resource-id-mask: CARD32
  979. .br
  980. image-byte-order:
  981. .Pn { LSBFirst , 
  982. .PN MSBFirst }
  983. .br
  984. bitmap-scanline-unit: {8, 16, 32}
  985. .br
  986. bitmap-scanline-pad: {8, 16, 32}
  987. .br
  988. bitmap-bit-order:
  989. .Pn { LeastSignificant , 
  990. .PN MostSignificant }
  991. .br
  992. pixmap-formats: LISTofFORMAT
  993. .br
  994. roots: LISTofSCREEN
  995. .br
  996. motion-buffer-size: CARD32
  997. .br
  998. maximum-request-length: CARD16
  999. .br
  1000. min-keycode, max-keycode: KEYCODE
  1001. .IP
  1002. where:
  1003. .TS
  1004. rw(1.25i) lw(4i).
  1005. T{
  1006. FORMAT:
  1007. T}    T{
  1008. [depth: CARD8,
  1009. .br
  1010. \ bits-per-pixel: {1, 4, 8, 16, 24, 32}
  1011. .br
  1012. \ scanline-pad: {8, 16, 32}]
  1013. T}
  1014. .sp
  1015. T{
  1016. SCREEN:
  1017. T}    T{
  1018. [root: WINDOW
  1019. .br
  1020. \ width-in-pixels, height-in-pixels: CARD16
  1021. .br
  1022. \ width-in-millimeters, height-in-millimeters: CARD16
  1023. .br
  1024. \ allowed-depths: LISTofDEPTH
  1025. .br
  1026. \ root-depth: CARD8
  1027. .br
  1028. \ root-visual: VISUALID
  1029. .br
  1030. \ default-colormap: COLORMAP
  1031. .br
  1032. \ white-pixel, black-pixel: CARD32
  1033. .br
  1034. \ min-installed-maps, max-installed-maps: CARD16
  1035. .br
  1036. \ backing-stores:
  1037. .Pn { Never , 
  1038. .PN WhenMapped , 
  1039. .PN Always }
  1040. .br
  1041. \ save-unders: BOOL
  1042. .br
  1043. \ current-input-masks: SETofEVENT]
  1044. T}
  1045. .sp
  1046. T{
  1047. DEPTH:
  1048. T}    T{
  1049. [depth: CARD8
  1050. .br
  1051. \ visuals: LISTofVISUALTYPE]
  1052. T}
  1053. .sp
  1054. T{
  1055. VISUALTYPE:
  1056. T}    T{
  1057. [visual-id: VISUALID
  1058. .br
  1059. \ class:
  1060. .Pn { StaticGray , 
  1061. .PN StaticColor , 
  1062. .PN TrueColor ,
  1063. .PN GrayScale , 
  1064. .br
  1065. \ \ \ \ \ \ \ \ \ \ 
  1066. .PN PseudoColor , 
  1067. .PN DirectColor }
  1068. .br
  1069. \ red-mask, green-mask, blue-mask: CARD32
  1070. .br
  1071. \ bits-per-rgb-value: CARD8
  1072. .br
  1073. \ colormap-entries: CARD16]
  1074. T}
  1075. .TE
  1076. .SH
  1077. Server Information
  1078. .LP
  1079. The information that is global to the server is:
  1080. .LP
  1081. The vendor string gives some identification of the owner of the server
  1082. implementation.
  1083. The vendor controls the semantics of the release number.
  1084. .LP
  1085. The resource-id-mask contains a single contiguous set of bits (at least 18).
  1086. The client allocates resource IDs for types WINDOW, PIXMAP,
  1087. CURSOR, FONT, GCONTEXT, and COLORMAP by choosing a value with only
  1088. some subset of these bits set and ORing it with resource-id-base.
  1089. Only values constructed in this way can be used to name newly created
  1090. resources over this connection.
  1091. Resource IDs never have the top three bits set.
  1092. The client is not restricted to linear or contiguous allocation
  1093. of resource IDs.
  1094. Once an ID has been freed, 
  1095. it can be reused, but this should not be necessary.
  1096. An ID must be unique with respect to the IDs of all other resources,
  1097. not just other resources of the same type.
  1098. However, note that the value spaces of resource identifiers,
  1099. atoms, visualids, and keysyms are distinguished by context, and
  1100. as such, are not required to be disjoint; for example, a given numeric value
  1101. might be both a valid window ID, a valid atom, and a valid keysym.
  1102. .LP
  1103. Although the server is in general responsible for byte-swapping data to
  1104. match the client, 
  1105. images are always transmitted and received in formats (including byte order)
  1106. specified by the server.
  1107. The byte order for images is given by image-byte-order and applies to each 
  1108. scanline unit in XY format (bitmap format) and to each pixel value in Z format.
  1109. .LP
  1110. A bitmap is represented in scanline order.
  1111. Each scanline is padded to a multiple of bits as given by bitmap-scanline-pad.
  1112. The pad bits are of arbitrary value.
  1113. The scanline is quantized in multiples of bits as given by bitmap-scanline-unit.
  1114. The bitmap-scanline-unit is always less than or equal to the
  1115. bitmap-scanline-pad.
  1116. Within each unit,
  1117. the leftmost bit in the bitmap is either the least-significant
  1118. or most-significant bit in the unit, as given by bitmap-bit-order.
  1119. If a pixmap is represented in XY format,
  1120. each plane is represented as a bitmap, and the planes appear from 
  1121. most-significant to least-significant in bit order with no padding 
  1122. between planes.
  1123. .LP
  1124. Pixmap-formats contains one entry for each depth value.
  1125. The entry describes the Z format used to represent images of that depth.
  1126. An entry for a depth is included if any screen supports that depth,
  1127. and all screens supporting that depth must support only that Z format for that
  1128. depth.
  1129. In Z format, 
  1130. the pixels are in scanline order, left to right within a scanline.
  1131. The number of bits used to hold each pixel is given by bits-per-pixel.
  1132. Bits-per-pixel may be larger than strictly required by the depth,
  1133. in which case the least-significant bits are used to hold
  1134. the pixmap data, and the values of the unused high-order bits are
  1135. undefined.
  1136. When the bits-per-pixel is 4,
  1137. the order of nibbles in the byte is the same as the image byte-order.
  1138. When the bits-per-pixel is 1,
  1139. the format is identical for bitmap format.
  1140. Each scanline is padded to a multiple of bits as given by scanline-pad.
  1141. When bits-per-pixel is 1,
  1142. this will be identical to bitmap-scanline-pad.
  1143. .LP
  1144. How a pointing device roams the screens is up to the server
  1145. implementation and is transparent to the protocol.
  1146. No geometry is defined among screens.
  1147. .LP
  1148. The server may retain the recent history of pointer motion and do so to a
  1149. finer granularity than is reported by 
  1150. .PN MotionNotify 
  1151. events.
  1152. The 
  1153. .PN GetMotionEvents 
  1154. request makes such history available.
  1155. The motion-buffer-size gives the approximate maximum number 
  1156. of elements in the history buffer.
  1157. .LP
  1158. Maximum-request-length specifies the maximum length of a request
  1159. accepted by the server, in 4-byte units.
  1160. That is, length is the maximum value that can appear in the length field of a 
  1161. request.
  1162. Requests larger than this maximum generate a 
  1163. .PN Length 
  1164. error,
  1165. and the server will read and simply discard the entire request.
  1166. Maximum-request-length will always be at least 4096 
  1167. (that is, requests of length up to and including 16384 bytes
  1168. will be accepted by all servers).
  1169. .LP
  1170. Min-keycode and max-keycode specify the smallest and largest keycode
  1171. values transmitted by the server.
  1172. Min-keycode is never less than 8, 
  1173. and max-keycode is never greater than 255.
  1174. Not all keycodes in this range are required to have corresponding keys.
  1175. .SH
  1176. Screen Information
  1177. .LP
  1178. The information that applies per screen is:
  1179. .LP
  1180. The allowed-depths specifies what pixmap and window depths are supported.
  1181. Pixmaps are supported for each depth listed,
  1182. and windows of that depth are supported if at least one visual type is listed 
  1183. for the depth.
  1184. A pixmap depth of one is always supported and listed,
  1185. but windows of depth one might not be supported.
  1186. A depth of zero is never listed,
  1187. but zero-depth
  1188. .PN InputOnly
  1189. windows are always supported.
  1190. .LP
  1191. Root-depth and root-visual specify the depth and visual type of the
  1192. root window.
  1193. Width-in-pixels and height-in-pixels specify the size of
  1194. the root window (which cannot be changed).
  1195. The class of the root window is always 
  1196. .PN InputOutput .
  1197. Width-in-millimeters and height-in-millimeters can be used to determine the 
  1198. physical size and the aspect ratio.
  1199. .LP
  1200. The default-colormap is the one initially associated with the root window.
  1201. Clients with minimal color requirements creating windows of
  1202. the same depth as the root may want to allocate from this map by
  1203. default.
  1204. .LP
  1205. Black-pixel and white-pixel can be used in implementing a monochrome
  1206. application.
  1207. These pixel values are for permanently allocated entries in the 
  1208. default-colormap.
  1209. The actual RGB values may be settable on some screens 
  1210. and, in any case, may not actually be black and white.
  1211. The names are intended to convey the expected relative intensity of the colors.
  1212. .LP
  1213. The border of the root window is initially a pixmap filled with the black-pixel.
  1214. The initial background of the root window is a pixmap filled with some 
  1215. unspecified two-color pattern using black-pixel and white-pixel.
  1216. .LP
  1217. Min-installed-maps specifies the number of maps that can be guaranteed
  1218. to be installed simultaneously (with 
  1219. .PN InstallColormap ), 
  1220. regardless of the number of entries allocated in each map.
  1221. Max-installed-maps specifies the maximum number of maps that might possibly be 
  1222. installed simultaneously, depending on their allocations.
  1223. Multiple static-visual colormaps with identical contents but differing in 
  1224. resource ID should be considered as a single map for the purposes of this 
  1225. number.
  1226. For the typical case of a single hardware colormap, both values will be 1.
  1227. .LP
  1228. Backing-stores indicates when the server supports backing stores for
  1229. this screen, although it may be storage limited in the number of
  1230. windows it can support at once.
  1231. If save-unders is 
  1232. .PN True , 
  1233. the server can support the save-under mode in 
  1234. .PN CreateWindow 
  1235. and
  1236. .PN ChangeWindowAttributes , 
  1237. although again it may be storage limited.
  1238. .LP
  1239. The current-input-events is what 
  1240. .PN GetWindowAttributes 
  1241. would return for the all-event-masks for the root window.
  1242. .SH
  1243. Visual Information
  1244. .LP
  1245. The information that applies per visual-type is:
  1246. .LP
  1247. A given visual type might be listed for more than one depth or for
  1248. more than one screen.
  1249. .LP
  1250. For 
  1251. .PN PseudoColor , 
  1252. a pixel value indexes a colormap to produce independent RGB values; 
  1253. the RGB values can be changed dynamically.
  1254. .PN GrayScale 
  1255. is treated in the same way as 
  1256. .PN PseudoColor
  1257. except which primary drives the screen is undefined;
  1258. thus, the client should always store the
  1259. same value for red, green, and blue in colormaps.
  1260. For 
  1261. .PN DirectColor , 
  1262. a pixel value is decomposed into separate RGB subfields, 
  1263. and each subfield separately indexes the colormap for the corresponding value.
  1264. The RGB values can be changed dynamically.
  1265. .PN TrueColor 
  1266. is treated in the same way as 
  1267. .PN DirectColor 
  1268. except the colormap has predefined read-only RGB values.
  1269. These values are server-dependent but provide linear or near-linear 
  1270. increasing ramps in each primary.
  1271. .PN StaticColor
  1272. is treated in the same way as 
  1273. .PN PseudoColor 
  1274. except the colormap has predefined read-only RGB values,
  1275. which are server-dependent.
  1276. .PN StaticGray 
  1277. is treated in the same way as 
  1278. .PN StaticColor
  1279. except the red, green, and blue values are equal for any
  1280. single pixel value, resulting in shades of gray.
  1281. .PN StaticGray 
  1282. with a two-entry colormap can be thought of as monochrome.
  1283. .LP
  1284. The red-mask, green-mask, and blue-mask are only defined for
  1285. .PN DirectColor 
  1286. and 
  1287. .PN TrueColor .
  1288. Each has one contiguous set of bits set to 1 with no intersections.
  1289. Usually each mask has the same number of bits set to 1.
  1290. .LP
  1291. The bits-per-rgb-value specifies the log base 2 of the number of
  1292. distinct color intensity values (individually) of red, green, and blue.
  1293. This number need not bear any relation to the number of colormap entries.
  1294. Actual RGB values are always passed in the protocol within a
  1295. 16-bit spectrum, with 0 being minimum intensity and 65535 being the
  1296. maximum intensity.
  1297. On hardware that provides a linear zero-based intensity ramp,
  1298. the following relationship exists:
  1299. .LP
  1300. .RS
  1301. .DS
  1302. hw-intensity = protocol-intensity / (65536 / total-hw-intensities)
  1303. .DE
  1304. .RE
  1305. .LP
  1306. Colormap entries are indexed from 0.
  1307. The colormap-entries defines the number of available colormap entries in a 
  1308. newly created colormap.
  1309. For 
  1310. .PN DirectColor 
  1311. and 
  1312. .PN TrueColor , 
  1313. this will usually be 2 to the power of the maximum number of bits set to 1 in 
  1314. red-mask, green-mask, and blue-mask.
  1315. .NH 1
  1316. Requests
  1317. .XS
  1318. \*(SN Requests
  1319. .XE
  1320. .EQ
  1321. delim %%
  1322. .EN
  1323. .LP
  1324. .\" Start marker code here
  1325. .IN "CreateWindow" "" "@DEF@"
  1326. .PN CreateWindow
  1327. .in +.2i
  1328. .LP
  1329. \fIwid\fP, \fIparent\fP\^: WINDOW
  1330. .br
  1331. \fIclass\fP\^:
  1332. .Pn { InputOutput , 
  1333. .PN InputOnly , 
  1334. .PN CopyFromParent }
  1335. .br
  1336. \fIdepth\fP\^: CARD8
  1337. .br
  1338. \fIvisual\fP\^: VISUALID or 
  1339. .PN CopyFromParent
  1340. .br
  1341. \fIx\fP, \fIy\fP\^: INT16
  1342. .br
  1343. \fIwidth\fP, \fIheight\fP, \fIborder-width\fP\^: CARD16
  1344. .br
  1345. \fIvalue-mask\fP\^: BITMASK
  1346. .br
  1347. \fIvalue-list\fP\^: LISTofVALUE
  1348. .LP
  1349. Errors: 
  1350. .PN Alloc ,
  1351. .PN Colormap , 
  1352. .PN Cursor , 
  1353. .PN IDChoice , 
  1354. .PN Match , 
  1355. .PN Pixmap , 
  1356. .PN Value , 
  1357. .PN Window
  1358. .\" End marker code here
  1359. .in -.2i
  1360. .LP
  1361. This request creates an unmapped window and assigns the identifier wid to it.
  1362. .LP
  1363. A class of 
  1364. .PN CopyFromParent 
  1365. means the class is taken from the parent.
  1366. A depth of zero for class
  1367. .PN InputOutput 
  1368. or
  1369. .PN CopyFromParent 
  1370. means the depth is taken from the parent.
  1371. A visual of
  1372. .PN CopyFromParent
  1373. means the visual type is taken from the parent.
  1374. For class
  1375. .PN InputOutput ,
  1376. the visual type and depth must be a combination supported for the screen 
  1377. (or a
  1378. .PN Match
  1379. error results).
  1380. The depth need not be the same as the parent,
  1381. but the parent must not be of class
  1382. .PN InputOnly
  1383. (or a
  1384. .PN Match 
  1385. error results).
  1386. For class 
  1387. .PN InputOnly ,
  1388. the depth must be zero (or a 
  1389. .PN Match
  1390. error results), and the visual must be one supported for the screen (or a 
  1391. .PN Match
  1392. error results). 
  1393. However, the parent can have any depth and class.
  1394. .LP
  1395. The server essentially acts as if
  1396. .PN InputOnly
  1397. windows do not exist for the purposes of graphics requests,
  1398. exposure processing, and 
  1399. .PN VisibilityNotify 
  1400. events.
  1401. An 
  1402. .PN InputOnly 
  1403. window cannot be used as a drawable (as a source or destination for graphics 
  1404. requests).
  1405. .PN InputOnly
  1406. and 
  1407. .PN InputOutput 
  1408. windows act identically in other respects\-properties,
  1409. grabs, input control, and so on.
  1410. .LP
  1411. The coordinate system has the X axis horizontal and the Y axis vertical, 
  1412. with the origin [0, 0] at the upper left.
  1413. Coordinates are integral,
  1414. in terms of pixels,
  1415. and coincide with pixel centers.
  1416. Each window and pixmap has its own coordinate system.
  1417. For a window, 
  1418. the origin is inside the border at the inside upper left.
  1419. .LP
  1420. The x and y coordinates
  1421. for the window are relative to the parent's origin
  1422. and specify the position of the upper-left outer corner of the window
  1423. (not the origin).
  1424. The width and height specify the inside size (not including the border)
  1425. and must be nonzero (or a 
  1426. .PN Value 
  1427. error results).
  1428. The border-width for an 
  1429. .PN InputOnly 
  1430. window must be zero (or a 
  1431. .PN Match 
  1432. error results).
  1433. .LP
  1434. The window is placed on top in the stacking order with respect to siblings.
  1435. .LP
  1436. The value-mask and value-list specify attributes of the window that are
  1437. to be explicitly initialized.
  1438. The possible values are:
  1439. .TS H
  1440. l lw(2.6i).
  1441. _
  1442. .sp 6p
  1443. .B
  1444. Attribute    Type
  1445. .sp 6p
  1446. _
  1447. .TH
  1448. .R
  1449. .sp 6p
  1450. T{
  1451. background-pixmap
  1452. T}    T{
  1453. PIXMAP or 
  1454. .PN None 
  1455. or 
  1456. .PN ParentRelative
  1457. T}
  1458. T{
  1459. background-pixel
  1460. T}    T{
  1461. CARD32
  1462. T}
  1463. T{
  1464. border-pixmap
  1465. T}    T{
  1466. PIXMAP or 
  1467. .PN CopyFromParent
  1468. T}
  1469. T{
  1470. border-pixel
  1471. T}    T{
  1472. CARD32
  1473. T}
  1474. T{
  1475. bit-gravity
  1476. T}    T{
  1477. BITGRAVITY
  1478. T}
  1479. T{
  1480. win-gravity
  1481. T}    T{
  1482. WINGRAVITY
  1483. T}
  1484. T{
  1485. backing-store
  1486. T}    T{
  1487. .Pn { NotUseful , 
  1488. .PN WhenMapped , 
  1489. .PN Always }
  1490. T}
  1491. T{
  1492. backing-planes
  1493. T}    T{
  1494. CARD32
  1495. T}
  1496. T{
  1497. backing-pixel
  1498. T}    T{
  1499. CARD32
  1500. T}
  1501. T{
  1502. save-under
  1503. T}    T{
  1504. BOOL
  1505. T}
  1506. T{
  1507. event-mask
  1508. T}    T{
  1509. SETofEVENT
  1510. T}
  1511. T{
  1512. do-not-propagate-mask
  1513. T}    T{
  1514. SETofDEVICEEVENT
  1515. T}
  1516. T{
  1517. override-redirect
  1518. T}    T{
  1519. BOOL
  1520. T}
  1521. T{
  1522. colormap
  1523. T}    T{
  1524. COLORMAP or 
  1525. .PN CopyFromParent
  1526. T}
  1527. T{
  1528. cursor
  1529. T}    T{
  1530. CURSOR or 
  1531. .PN None
  1532. T}
  1533. .sp 6p
  1534. _
  1535. .TE
  1536. .LP
  1537. The default values when attributes are not explicitly initialized
  1538. are:
  1539. .TS H
  1540. l l.
  1541. _
  1542. .sp 6p
  1543. .B
  1544. Attribute    Default
  1545. .sp 6p
  1546. _
  1547. .TH
  1548. .R
  1549. .sp 6p
  1550. T{
  1551. background-pixmap
  1552. T}    T{
  1553. .PN None
  1554. T}
  1555. T{
  1556. border-pixmap
  1557. T}    T{
  1558. .PN CopyFromParent
  1559. T}
  1560. T{
  1561. bit-gravity
  1562. T}    T{
  1563. .PN Forget
  1564. T}
  1565. T{
  1566. win-gravity
  1567. T}    T{
  1568. .PN NorthWest
  1569. T}
  1570. T{
  1571. backing-store
  1572. T}    T{
  1573. .PN NotUseful
  1574. T}
  1575. T{
  1576. backing-planes
  1577. T}    T{
  1578. all ones
  1579. T}
  1580. T{
  1581. backing-pixel
  1582. T}    T{
  1583. zero
  1584. T}
  1585. T{
  1586. save-under
  1587. T}    T{
  1588. .PN False
  1589. T}
  1590. T{
  1591. event-mask
  1592. T}    T{
  1593. {} (empty set)
  1594. T}
  1595. T{
  1596. do-not-propagate-mask
  1597. T}    T{
  1598. {} (empty set)
  1599. T}
  1600. T{
  1601. override-redirect
  1602. T}    T{
  1603. .PN False
  1604. T}
  1605. T{
  1606. colormap
  1607. T}    T{
  1608. .PN CopyFromParent
  1609. T}
  1610. T{
  1611. cursor
  1612. T}    T{
  1613. .PN None
  1614. T}
  1615. .sp 6p
  1616. _
  1617. .TE
  1618. .LP
  1619. Only the following attributes are defined for 
  1620. .PN InputOnly 
  1621. windows:
  1622. .IP \(bu 5
  1623. win-gravity 
  1624. .IP \(bu 5 
  1625. event-mask
  1626. .IP \(bu 5
  1627. do-not-propagate-mask
  1628. .IP \(bu 5
  1629. override-redirect
  1630. .IP \(bu 5
  1631. cursor
  1632. .LP
  1633. It is a 
  1634. .PN Match 
  1635. error to specify any other attributes for 
  1636. .PN InputOnly
  1637. windows.
  1638. .LP
  1639. If background-pixmap is given, 
  1640. it overrides the default background-pixmap.
  1641. The background pixmap and the window must have the
  1642. same root and the same depth (or a 
  1643. .PN Match 
  1644. error results).
  1645. Any size pixmap can be used, although some sizes may be faster than others.
  1646. If background
  1647. .PN None 
  1648. is specified, the window has no defined background.
  1649. If background
  1650. .PN ParentRelative 
  1651. is specified, the parent's background is used, 
  1652. but the window must have the same depth as the parent (or a 
  1653. .PN Match
  1654. error results).
  1655. If the parent has background 
  1656. .PN None , 
  1657. then the window will also have background 
  1658. .PN None .
  1659. A copy of the parent's background is not made.
  1660. The parent's background is reexamined each time the window background is
  1661. required.
  1662. If background-pixel is given, it overrides the default
  1663. background-pixmap and any background-pixmap given explicitly, 
  1664. and a pixmap of undefined size filled with background-pixel is used for the
  1665. background.
  1666. Range checking is not performed on the background-pixel value;
  1667. it is simply truncated to the appropriate number of bits.
  1668. For a 
  1669. .PN ParentRelative 
  1670. background, 
  1671. the background tile origin always aligns with the parent's background tile 
  1672. origin.
  1673. Otherwise, the background tile origin is always the window origin.
  1674. .LP
  1675. When no valid contents are available for regions of a window
  1676. and the regions are either visible or the server is maintaining backing store,
  1677. the server automatically tiles the regions with the window's background
  1678. unless the window has a background of 
  1679. .PN None .
  1680. If the background is 
  1681. .PN None , 
  1682. the previous screen contents from other windows of the same depth as the window
  1683. are simply left in place if the contents come from the parent of the window
  1684. or an inferior of the parent;
  1685. otherwise, the initial contents of the exposed regions are undefined.
  1686. Exposure events are then generated for the regions, even if the background is
  1687. .PN None .
  1688. .LP
  1689. The border tile origin is always the same as the background tile origin.
  1690. If border-pixmap is given, 
  1691. it overrides the default border-pixmap.
  1692. The border pixmap and the window must have the same root 
  1693. and the same depth (or a 
  1694. .PN Match 
  1695. error results).
  1696. Any size pixmap can be used,
  1697. although some sizes may be faster than others.
  1698. If 
  1699. .PN CopyFromParent
  1700. is given, the parent's border pixmap is copied (subsequent changes to
  1701. the parent's border attribute do not affect the child), 
  1702. but the window must have the same depth as the parent (or a 
  1703. .PN Match 
  1704. error results).
  1705. The pixmap might be copied by sharing the same pixmap object between the
  1706. child and parent or by making a complete copy of the pixmap contents.
  1707. If border-pixel is given,
  1708. it overrides the default border-pixmap and any border-pixmap given explicitly, 
  1709. and a pixmap of undefined size filled with border-pixel is used for the border.
  1710. Range checking is not performed on the border-pixel value;
  1711. it is simply truncated to the appropriate number of bits.
  1712. .LP
  1713. Output to a window is always clipped to the inside of the window, 
  1714. so that the border is never affected.
  1715. .LP
  1716. The bit-gravity defines which region of the window should be retained
  1717. if the window is resized, and win-gravity defines how the window should
  1718. be repositioned if the parent is resized (see 
  1719. .PN ConfigureWindow 
  1720. request).
  1721. .LP
  1722. A backing-store of 
  1723. .PN WhenMapped 
  1724. advises the server that maintaining contents of obscured regions 
  1725. when the window is mapped would be beneficial.
  1726. A backing-store of
  1727. .PN Always
  1728. advises the server that maintaining contents even when the window is 
  1729. unmapped would be beneficial.
  1730. In this case,
  1731. the server may generate an exposure event when the window is created.
  1732. A value of
  1733. .PN NotUseful
  1734. advises the server that maintaining contents is unnecessary,
  1735. although a server may still choose to maintain contents while the window 
  1736. is mapped.
  1737. Note that if the server maintains contents,
  1738. then the server should maintain complete contents
  1739. not just the region within the parent boundaries, 
  1740. even if the window is larger than its parent.
  1741. While the server maintains contents,
  1742. exposure events will not normally be generated,
  1743. but the server may stop maintaining contents at any time.
  1744. .LP
  1745. If save-under is 
  1746. .PN True , 
  1747. the server is advised that when this window is
  1748. mapped, saving the contents of windows it obscures would be beneficial.
  1749. .LP
  1750. When the contents of obscured regions of a window are being maintained,
  1751. regions obscured by noninferior windows are included in the
  1752. destination (and source, when the window is the source) of graphics
  1753. requests, but regions obscured by inferior windows are not included.
  1754. .LP
  1755. The backing-planes indicates (with bits set to 1) which bit planes 
  1756. of the window hold dynamic data that must be preserved in backing-stores 
  1757. and during save-unders.
  1758. The backing-pixel specifies what value to use in planes not
  1759. covered by backing-planes.
  1760. The server is free to save only the specified bit planes in the backing-store 
  1761. or save-under and regenerate the remaining planes with the specified pixel 
  1762. value.
  1763. Any bits beyond the specified depth of the window in these 
  1764. values are simply ignored.
  1765. .LP
  1766. The event-mask defines which events the client is interested in for
  1767. this window (or for some event types, inferiors of the window).
  1768. The do-not-propagate-mask defines which events should not be propagated to
  1769. ancestor windows when no client has the event type selected in this
  1770. window.
  1771. .LP
  1772. The override-redirect specifies whether map and configure requests on this
  1773. window should override a 
  1774. .PN SubstructureRedirect
  1775. on the parent, typically to inform a window manager not to tamper with 
  1776. the window.
  1777. .LP
  1778. The colormap specifies the colormap that best reflects the true
  1779. colors of the window.
  1780. Servers capable of supporting multiple hardware colormaps may use this 
  1781. information, and window managers may use it for
  1782. .PN InstallColormap
  1783. requests.
  1784. The colormap must have the same visual type and root as the window (or a 
  1785. .PN Match
  1786. error results).
  1787. If 
  1788. .PN CopyFromParent
  1789. is specified,
  1790. the parent's colormap is copied (subsequent changes to the parent's
  1791. colormap attribute do not affect the child). 
  1792. However, the window must have the same visual type as the parent (or a 
  1793. .PN Match 
  1794. error results), and the parent must not have a colormap of 
  1795. .PN None 
  1796. (or a 
  1797. .PN Match
  1798. error results).
  1799. For an explanation of
  1800. .PN None ,
  1801. see
  1802. .PN FreeColormap 
  1803. request.
  1804. The colormap is copied by sharing the colormap object between the child
  1805. and the parent,
  1806. not by making a complete copy of the colormap contents.
  1807. .LP
  1808. If a cursor is specified, 
  1809. it will be used whenever the pointer is in the window.
  1810. If 
  1811. .PN None
  1812. is specified,
  1813. the parent's cursor will be used when the pointer is in the window,
  1814. and any change in the parent's cursor will cause an immediate change
  1815. in the displayed cursor.
  1816. .LP
  1817. This request generates a 
  1818. .PN CreateNotify 
  1819. event.
  1820. .LP
  1821. The background and border pixmaps and the cursor may be freed
  1822. immediately if no further explicit references to them are to be made.
  1823. .LP
  1824. Subsequent drawing into the background or border pixmap has an
  1825. undefined effect on the window state.
  1826. The server might or might not make a copy of the pixmap.
  1827. .sp
  1828. .LP
  1829. .\" Start marker code here
  1830. .IN "ChangeWindowAttributes" "" "@DEF@"
  1831. .PN ChangeWindowAttributes
  1832. .in +.2i
  1833. .LP
  1834. \fIwindow\fP\^: WINDOW
  1835. .br
  1836. \fIvalue-mask\fP\^: BITMASK
  1837. .br
  1838. \fIvalue-list\fP\^: LISTofVALUE
  1839. .LP
  1840. Errors: 
  1841. .PN Access ,
  1842. .PN Colormap , 
  1843. .PN Cursor , 
  1844. .PN Match , 
  1845. .PN Pixmap , 
  1846. .PN Value , 
  1847. .PN Window
  1848. .\" End marker code here
  1849. .in -.2i
  1850. .LP
  1851. The value-mask and value-list specify which attributes are to be changed.
  1852. The values and restrictions are the same as for 
  1853. .PN CreateWindow .
  1854. .LP
  1855. Setting a new background, whether by background-pixmap or
  1856. background-pixel, overrides any previous background.
  1857. Setting a new border, whether by border-pixel or border-pixmap, 
  1858. overrides any previous border.
  1859. .LP
  1860. Changing the background does not cause the window contents to be changed.
  1861. Setting the border or changing the background such that the
  1862. border tile origin changes causes the border to be repainted.
  1863. Changing the background of a root window to 
  1864. .PN None
  1865. or 
  1866. .PN ParentRelative
  1867. restores the default background pixmap.
  1868. Changing the border of a root window to 
  1869. .PN CopyFromParent
  1870. restores the default border pixmap.
  1871. .LP
  1872. Changing the win-gravity does not affect the current position of the
  1873. window.
  1874. .LP
  1875. Changing the backing-store of an obscured window to 
  1876. .PN WhenMapped 
  1877. or
  1878. .PN Always  
  1879. or changing the backing-planes, backing-pixel, or save-under of
  1880. a mapped window may have no immediate effect.
  1881. .LP
  1882. Multiple clients can select input on the same window; 
  1883. their event-masks are disjoint.
  1884. When an event is generated,
  1885. it will be reported to all interested clients.
  1886. However, only one client at a time can select for 
  1887. .PN SubstructureRedirect , 
  1888. only one client at a time can select for 
  1889. .PN ResizeRedirect , 
  1890. and only one client at a time can select for
  1891. .PN ButtonPress .
  1892. An attempt to violate these restrictions results in an
  1893. .PN Access 
  1894. error.
  1895. .LP
  1896. There is only one do-not-propagate-mask for a window, not one per
  1897. client.
  1898. .LP
  1899. Changing the colormap of a window (by defining a new map, not by
  1900. changing the contents of the existing map) generates a 
  1901. .PN ColormapNotify
  1902. event.
  1903. Changing the colormap of a visible window might have no immediate effect 
  1904. on the screen (see 
  1905. .PN InstallColormap 
  1906. request).
  1907. .LP
  1908. Changing the cursor of a root window to 
  1909. .PN None
  1910. restores the default cursor.
  1911. .LP
  1912. The order in which attributes are verified and altered is server-dependent.
  1913. If an error is generated,
  1914. a subset of the attributes may have been altered.
  1915. .sp
  1916. .LP
  1917. .\" Start marker code here
  1918. .IN "GetWindowAttributes" "" "@DEF@"
  1919. .PN GetWindowAttributes
  1920. .in +.2i
  1921. .LP
  1922. \fIwindow\fP\^: WINDOW
  1923. .in -.2i
  1924. .LP
  1925.    =>
  1926. .in +.2i
  1927. .LP
  1928. visual: VISUALID
  1929. .br
  1930. class:
  1931. .Pn { InputOutput , 
  1932. .PN InputOnly }
  1933. .br
  1934. bit-gravity: BITGRAVITY
  1935. .br
  1936. win-gravity: WINGRAVITY
  1937. .br
  1938. backing-store:
  1939. .Pn { NotUseful , 
  1940. .PN WhenMapped , 
  1941. .PN Always }
  1942. .br
  1943. backing-planes: CARD32
  1944. .br
  1945. backing-pixel: CARD32
  1946. .br
  1947. save-under: BOOL
  1948. .br
  1949. colormap: COLORMAP or 
  1950. .PN None
  1951. .br
  1952. map-is-installed: BOOL
  1953. .br
  1954. map-state:
  1955. .Pn { Unmapped , 
  1956. .PN Unviewable , 
  1957. .PN Viewable }
  1958. .br
  1959. all-event-masks, your-event-mask: SETofEVENT
  1960. .br
  1961. do-not-propagate-mask: SETofDEVICEEVENT
  1962. .br
  1963. override-redirect: BOOL
  1964. .LP
  1965. Errors: 
  1966. .PN Window
  1967. .\" End marker code here
  1968. .in -.2i
  1969. .LP
  1970. This request returns the current attributes of the window.
  1971. A window is 
  1972. .PN Unviewable 
  1973. if it is mapped but some ancestor is unmapped.
  1974. All-event-masks is the inclusive-OR of all event masks selected on the window 
  1975. by clients.
  1976. Your-event-mask is the event mask selected by the querying client.
  1977. .sp
  1978. .LP
  1979. .\" Start marker code here
  1980. .IN "DestroyWindow" "" "@DEF@"
  1981. .PN DestroyWindow
  1982. .in +.2i
  1983. .LP
  1984. \fIwindow\fP\^: WINDOW
  1985. .LP
  1986. Errors: 
  1987. .PN Window
  1988. .\" End marker code here
  1989. .in -.2i
  1990. .LP
  1991. If the argument window is mapped, 
  1992. an 
  1993. .PN UnmapWindow 
  1994. request is performed automatically.
  1995. The window and all inferiors are then destroyed, and a
  1996. .PN DestroyNotify 
  1997. event is generated for each window.
  1998. The ordering of the
  1999. .PN DestroyNotify 
  2000. events is such that for any given window, 
  2001. .PN DestroyNotify
  2002. is generated on all inferiors of the window before being generated on
  2003. the window itself.
  2004. The ordering among siblings and across subhierarchies is not otherwise
  2005. constrained.
  2006. .LP
  2007. Normal exposure processing on formerly obscured windows is performed.
  2008. .LP
  2009. If the window is a root window, 
  2010. this request has no effect.
  2011. .sp
  2012. .LP
  2013. .\" Start marker code here
  2014. .IN "DestroySubwindows" "" "@DEF@"
  2015. .PN DestroySubwindows
  2016. .in +.2i
  2017. .LP
  2018. \fIwindow\fP\^: WINDOW
  2019. .LP
  2020. Errors: 
  2021. .PN Window
  2022. .\" End marker code here
  2023. .in -.2i
  2024. .LP
  2025. This request performs a
  2026. .PN DestroyWindow
  2027. request on all children of the window, in bottom-to-top stacking order.
  2028. .sp
  2029. .LP
  2030. .\" Start marker code here
  2031. .IN "ChangeSaveSet" "" "@DEF@"
  2032. .PN ChangeSaveSet
  2033. .in +.2i
  2034. .LP
  2035. \fIwindow\fP\^: WINDOW
  2036. .br
  2037. \fImode\fP\^:
  2038. .Pn { Insert , 
  2039. .PN Delete }
  2040. .LP
  2041. Errors: 
  2042. .PN Match , 
  2043. .PN Value ,
  2044. .PN Window
  2045. .\" End marker code here
  2046. .LP
  2047. .in -.2i
  2048. This request adds or removes the specified window from the client's 
  2049. save-set.
  2050. The window must have been created by some other client (or a 
  2051. .PN Match
  2052. error results).
  2053. For further information about the use of the save-set,
  2054. see section 10.
  2055. .LP
  2056. When windows are destroyed,
  2057. the server automatically removes them from the save-set.
  2058. .sp
  2059. .LP
  2060. .\" Start marker code here
  2061. .IN "ReparentWindow" "" "@DEF@"
  2062. .PN ReparentWindow
  2063. .in +.2i
  2064. .LP
  2065. \fIwindow\fP\^, \fIparent\fP\^: WINDOW
  2066. .br
  2067. \fIx\fP\^, \fIy\fP\^: INT16
  2068. .LP
  2069. Errors: 
  2070. .PN Match ,
  2071. .PN Window
  2072. .\" End marker code here
  2073. .in -.2i
  2074. .LP
  2075. If the window is mapped, 
  2076. an 
  2077. .PN UnmapWindow 
  2078. request is performed automatically first.
  2079. The window is then removed from its current position in the hierarchy 
  2080. and is inserted as a child of the specified parent.
  2081. The x and y coordinates are relative to the parent's origin
  2082. and specify the new position of the upper-left outer corner of the
  2083. window.
  2084. The window is placed on top in the stacking order with respect
  2085. to siblings.
  2086. .PN ReparentNotify 
  2087. event is then generated.
  2088. The override-redirect attribute of the window is passed on in this event; 
  2089. a value of
  2090. .PN True 
  2091. indicates that a window manager should not tamper with this window.
  2092. Finally, if the window was originally mapped, a 
  2093. .PN MapWindow
  2094. request is performed automatically.
  2095. .LP
  2096. Normal exposure processing on formerly obscured windows is performed.
  2097. The server might not generate exposure events for regions from the
  2098. initial unmap that are immediately obscured by the final map.
  2099. .LP
  2100. .PN Match 
  2101. error is generated if:
  2102. .IP \(bu 5
  2103. The new parent is not on the same screen as the old parent.
  2104. .IP \(bu 5
  2105. The new parent is the window itself or an inferior of the window.
  2106. .IP \(bu 5
  2107. The new parent is
  2108. .PN InputOnly
  2109. and the window is not.
  2110. .IP \(bu 5
  2111. The window has a 
  2112. .PN ParentRelative
  2113. background, and the new parent is not the same depth as the window.
  2114. .sp
  2115. .LP
  2116. .\" Start marker code here
  2117. .IN "MapWindow" "" "@DEF@"
  2118. .PN MapWindow
  2119. .in +.2i
  2120. .LP
  2121. \fIwindow\fP\^: WINDOW
  2122. .LP
  2123. Errors: 
  2124. .PN Window
  2125. .\" End marker code here
  2126. .in -.2i
  2127. .LP
  2128. If the window is already mapped, this request has no effect.
  2129. .LP
  2130. If the override-redirect attribute of the window is 
  2131. .PN False 
  2132. and some other client has selected 
  2133. .PN SubstructureRedirect 
  2134. on the parent, then a
  2135. .PN MapRequest 
  2136. event is generated, but the window remains unmapped.
  2137. Otherwise, the window is mapped,
  2138. and a 
  2139. .PN MapNotify 
  2140. event is generated.
  2141. .LP
  2142. If the window is now viewable and its contents have been discarded,
  2143. the window is tiled with its background (if no background is defined,
  2144. the existing screen contents are not altered), and zero or more exposure
  2145. events are generated.
  2146. If a backing-store has been maintained while the window was unmapped, 
  2147. no exposure events are generated.
  2148. If a backing-store will now be maintained,
  2149. a full-window exposure is always generated.
  2150. Otherwise, only visible regions may be reported.
  2151. Similar tiling and exposure take place for any newly viewable inferiors.
  2152. .sp
  2153. .LP
  2154. .\" Start marker code here
  2155. .IN "MapSubwindows" "" "@DEF@"
  2156. .PN MapSubwindows
  2157. .in +.2i
  2158. .LP
  2159. \fIwindow\fP\^: WINDOW
  2160. .LP
  2161. Errors: 
  2162. .PN Window
  2163. .\" End marker code here
  2164. .in -.2i
  2165. .LP
  2166. This request performs a 
  2167. .PN MapWindow 
  2168. request on all unmapped children of the window, 
  2169. in top-to-bottom stacking order.
  2170. .sp
  2171. .LP
  2172. .\" Start marker code here
  2173. .IN "UnmapWindow" "" "@DEF@"
  2174. .PN UnmapWindow
  2175. .in +.2i
  2176. .LP
  2177. \fIwindow\fP\^: WINDOW
  2178. .LP
  2179. Errors: 
  2180. .PN Window
  2181. .\" End marker code here
  2182. .in -.2i
  2183. .LP
  2184. If the window is already unmapped, this request has no effect.
  2185. Otherwise, the window is unmapped, and an 
  2186. .PN UnmapNotify 
  2187. event is generated.
  2188. Normal exposure processing on formerly obscured windows is performed.
  2189. .sp
  2190. .LP
  2191. .\" Start marker code here
  2192. .IN "UnmapSubwindows" "" "@DEF@"
  2193. .PN UnmapSubwindows
  2194. .in +.2i
  2195. .LP
  2196. \fIwindow\fP\^: WINDOW
  2197. .LP
  2198. Errors: 
  2199. .PN Window
  2200. .\" End marker code here
  2201. .in -.2i
  2202. .LP
  2203. This request performs an 
  2204. .PN UnmapWindow 
  2205. request on all mapped children of the window,
  2206. in bottom-to-top stacking order.
  2207. .sp
  2208. .LP
  2209. .\" Start marker code here
  2210. .IN "ConfigureWindow" "" "@DEF@"
  2211. .PN ConfigureWindow
  2212. .in +.2i
  2213. .LP
  2214. \fIwindow\fP\^: WINDOW
  2215. .br
  2216. \fIvalue-mask\fP\^: BITMASK
  2217. .br
  2218. \fIvalue-list\fP\^: LISTofVALUE
  2219. .LP
  2220. Errors: 
  2221. .PN Match , 
  2222. .PN Value ,
  2223. .PN Window
  2224. .\" End marker code here
  2225. .in -.2i
  2226. .LP
  2227. This request changes the configuration of the window.
  2228. The value-mask and value-list specify which values are to be given.
  2229. The possible values are:
  2230. .TS H
  2231. l lw(3.1i).
  2232. _
  2233. .sp 6p
  2234. .B
  2235. Attribute    Type
  2236. .sp 6p
  2237. _
  2238. .TH
  2239. .R
  2240. .sp 6p
  2241. T{
  2242. x
  2243. T}    T{
  2244. INT16
  2245. T}
  2246. T{
  2247. y
  2248. T}    T{
  2249. INT16
  2250. T}
  2251. T{
  2252. width
  2253. T}    T{
  2254. CARD16
  2255. T}
  2256. T{
  2257. height
  2258. T}    T{
  2259. CARD16
  2260. T}
  2261. T{
  2262. border-width
  2263. T}    T{
  2264. CARD16
  2265. T}
  2266. T{
  2267. sibling
  2268. T}    T{
  2269. WINDOW
  2270. T}
  2271. T{
  2272. stack-mode
  2273. T}    T{
  2274. .Pn { Above , 
  2275. .PN Below , 
  2276. .PN TopIf , 
  2277. .PN BottomIf , 
  2278. .PN Opposite }
  2279. T}
  2280. .sp 6p
  2281. _
  2282. .TE
  2283. .LP
  2284. The x and y coordinates are relative to the parent's origin 
  2285. and specify the position of the upper-left outer corner of the window.
  2286. The width and height specify the inside size, not including the border, and
  2287. must be nonzero (or a 
  2288. .PN Value 
  2289. error results).
  2290. Those values not specified are taken from the existing geometry of the window.
  2291. Note that changing just the border-width leaves the outer-left corner 
  2292. of the window in a fixed position but moves the absolute position of the 
  2293. window's origin.
  2294. It is a 
  2295. .PN Match 
  2296. error to attempt to make the border-width of an 
  2297. .PN InputOnly
  2298. window nonzero.
  2299. .LP
  2300. If the override-redirect attribute of the window is 
  2301. .PN False 
  2302. and some other client has selected 
  2303. .PN SubstructureRedirect 
  2304. on the parent, a
  2305. .PN ConfigureRequest 
  2306. event is generated, and no further processing is performed.
  2307. Otherwise, the following is performed:
  2308. .LP
  2309. If some other client has selected 
  2310. .PN ResizeRedirect 
  2311. on the window and the inside width or height of the window is being changed, 
  2312. a
  2313. .PN ResizeRequest 
  2314. event is generated, 
  2315. and the current inside width and height are used instead.
  2316. Note that the override-redirect attribute of the window has no effect on
  2317. .PN ResizeRedirect
  2318. and that 
  2319. .PN SubstructureRedirect 
  2320. on the parent has precedence over 
  2321. .PN ResizeRedirect 
  2322. on the window.
  2323. .LP
  2324. The geometry of the window is changed as specified, 
  2325. the window is restacked among siblings, and a 
  2326. .PN ConfigureNotify
  2327. event is generated if the state of the window actually changes.
  2328. If the inside width or height of the window has actually changed, 
  2329. then children of the window are affected,
  2330. according to their win-gravity.
  2331. Exposure processing is performed on formerly obscured windows
  2332. (including the window itself and its inferiors if regions of them were
  2333. obscured but now are not).
  2334. Exposure processing is also performed on any new regions of the window 
  2335. (as a result of increasing the width or height) 
  2336. and on any regions where window contents are lost.
  2337. .LP
  2338. If the inside width or height of a window is not changed
  2339. but the window is moved or its border is changed, 
  2340. then the contents of the window are not lost but move with the window.
  2341. Changing the inside width or height of the window causes its contents to be 
  2342. moved or lost, depending on the bit-gravity of the window.
  2343. It also causes children to be reconfigured, depending on their win-gravity.
  2344. For a change of width and height of W and H, 
  2345. we define the [x, y] pairs as:
  2346. .TS H
  2347. l l.
  2348. _
  2349. .sp 6p
  2350. .B
  2351. Direction    Deltas
  2352. .sp 6p
  2353. _
  2354. .R
  2355. .sp 6p
  2356. T{
  2357. .PN NorthWest
  2358. T}    T{
  2359. [\^0, 0\^]
  2360. T}
  2361. T{
  2362. .PN North
  2363. T}    T{
  2364. [\^W/2, 0\^]
  2365. T}
  2366. T{
  2367. .PN NorthEast
  2368. T}    T{
  2369. [\^W, 0\^]
  2370. T}
  2371. T{
  2372. .PN West
  2373. T}    T{
  2374. [\^0, H/2\^]
  2375. T}
  2376. T{
  2377. .PN Center
  2378. T}    T{
  2379. [\^W/2, H/2\^]
  2380. T}
  2381. T{
  2382. .PN East
  2383. T}    T{
  2384. [\^W, H/2\^]
  2385. T}
  2386. T{
  2387. .PN SouthWest
  2388. T}    T{
  2389. [\^0, H\^]
  2390. T}
  2391. T{
  2392. .PN South
  2393. T}    T{
  2394. [\^W/2, H\^]
  2395. T}
  2396. T{
  2397. .PN SouthEast
  2398. T}    T{
  2399. [\^W, H\^]
  2400. T}
  2401. .sp 6p
  2402. _
  2403. .TE
  2404. .LP
  2405. When a window with one of these bit-gravities is resized, 
  2406. the corresponding pair defines the change in position of each pixel in the
  2407. window.
  2408. When a window with one of these win-gravities has its parent window resized, 
  2409. the corresponding pair defines the change in position
  2410. of the window within the parent.
  2411. This repositioning generates a 
  2412. .PN GravityNotify 
  2413. event.
  2414. .PN GravityNotify
  2415. events are generated after the 
  2416. .PN ConfigureNotify 
  2417. event is generated.
  2418. .LP
  2419. A gravity of 
  2420. .PN Static 
  2421. indicates that the contents or origin should not move relative to the origin 
  2422. of the root window.
  2423. If the change in size of the window is coupled with a change 
  2424. in position of [X, Y], 
  2425. then for bit-gravity the change in position of each pixel is [\-X, \-Y] and for
  2426. win-gravity the change in position of a child when its parent is so
  2427. resized is [\-X, \-Y].
  2428. Note that 
  2429. .PN Static 
  2430. gravity still only takes effect when the width or height of the 
  2431. window is changed, not when the window is simply moved.
  2432. .LP
  2433. A bit-gravity of 
  2434. .PN Forget 
  2435. indicates that the window contents are always discarded after a size change,
  2436. even if backing-store or save-under has been requested.
  2437. The window is tiled with its background (except, if no background is defined, 
  2438. the existing screen contents are not altered)
  2439. and zero or more exposure events are generated.
  2440. .LP
  2441. The contents and borders of inferiors are not affected by their parent's
  2442. bit-gravity.
  2443. A server is permitted to ignore the specified bit-gravity and use 
  2444. .PN Forget 
  2445. instead.
  2446. .LP
  2447. A win-gravity of 
  2448. .PN Unmap 
  2449. is like 
  2450. .PN NorthWest , 
  2451. but the child is also unmapped when the parent is resized, 
  2452. and an 
  2453. .PN UnmapNotify 
  2454. event is generated.
  2455. .PN UnmapNotify 
  2456. events are generated after the 
  2457. .PN ConfigureNotify
  2458. event is generated.
  2459. .LP
  2460. If a sibling and a stack-mode are specified, 
  2461. the window is restacked as follows:
  2462. .TS 
  2463. lw(1i) lw(4.75i).
  2464. T{
  2465. .PN Above
  2466. T}    T{
  2467. The window is placed just above the sibling.
  2468. T}
  2469. .sp 6p
  2470. T{
  2471. .PN Below
  2472. T}    T{
  2473. The window is placed just below the sibling.
  2474. T}
  2475. .sp 6p
  2476. T{
  2477. .PN TopIf
  2478. T}    T{
  2479. If the sibling occludes the window, 
  2480. then the window is placed at the top of the stack.
  2481. T}
  2482. .sp 6p
  2483. T{
  2484. .PN BottomIf
  2485. T}    T{
  2486. If the window occludes the sibling, 
  2487. then the window is placed at the bottom of the stack.
  2488. T}
  2489. .sp 6p
  2490. T{
  2491. .PN Opposite
  2492. T}    T{
  2493. If the sibling occludes the window, 
  2494. then the window is placed at the top of the stack.
  2495. Otherwise, if the window occludes the sibling, 
  2496. then the window is placed at the bottom of the stack.
  2497. T}
  2498. .TE
  2499. .LP
  2500. If a stack-mode is specified but no sibling is specified, 
  2501. the window is restacked as follows:
  2502. .TS
  2503. lw(1i) lw(4.75i).
  2504. T{
  2505. .PN Above
  2506. T}    T{
  2507. The window is placed at the top of the stack.
  2508. T}
  2509. .sp 6p
  2510. T{
  2511. .PN Below
  2512. T}    T{
  2513. The window is placed at the bottom of the stack.
  2514. T}
  2515. .sp 6p
  2516. T{
  2517. .PN TopIf
  2518. T}    T{
  2519. If any sibling occludes the window, 
  2520. then the window is placed at the top of the stack.
  2521. T}
  2522. .sp 6p
  2523. T{
  2524. .PN BottomIf
  2525. T}    T{
  2526. If the window occludes any sibling, 
  2527. then the window is placed at the bottom of the stack.
  2528. T}
  2529. .sp 6p
  2530. T{
  2531. .PN Opposite
  2532. T}    T{
  2533. If any sibling occludes the window, 
  2534. then the window is placed at the top of the stack.
  2535. Otherwise, if the window occludes any sibling, 
  2536. then the window is placed at the bottom of the stack.
  2537. T}
  2538. .TE
  2539. .LP
  2540. It is a 
  2541. .PN Match 
  2542. error if a sibling is specified without a stack-mode 
  2543. or if the window is not actually a sibling.
  2544. .LP
  2545. Note that the computations for 
  2546. .PN BottomIf , 
  2547. .PN TopIf , 
  2548. and 
  2549. .PN Opposite 
  2550. are performed with respect to the window's final geometry (as controlled by
  2551. the other arguments to the request), not to its initial geometry.
  2552. .LP
  2553. Attempts to configure a root window have no effect.
  2554. .sp
  2555. .LP
  2556. .\" Start marker code here
  2557. .IN "CirculateWindow" "" "@DEF@"
  2558. .PN CirculateWindow
  2559. .in +.2i
  2560. .LP
  2561. \fIwindow\fP\^: WINDOW
  2562. .br
  2563. \fIdirection\fP\^: 
  2564. .Pn { RaiseLowest , 
  2565. .PN LowerHighest }
  2566. .LP
  2567. Errors: 
  2568. .PN Value ,
  2569. .PN Window
  2570. .\" End marker code here
  2571. .in -.2i
  2572. .LP
  2573. If some other client has selected 
  2574. .PN SubstructureRedirect 
  2575. on the window, then a 
  2576. .PN CirculateRequest 
  2577. event is generated, and no further processing is performed.
  2578. Otherwise, the following is performed, and then a
  2579. .PN CirculateNotify 
  2580. event is generated if the window is actually restacked.
  2581. .LP
  2582. For 
  2583. .PN RaiseLowest , 
  2584. .PN CirculateWindow
  2585. raises the lowest mapped child (if any) that is
  2586. occluded by another child to the top of the stack.
  2587. For 
  2588. .PN LowerHighest ,
  2589. .PN CirculateWindow
  2590. lowers the highest mapped child (if any) that occludes another child to
  2591. the bottom of the stack.
  2592. Exposure processing is performed on formerly obscured windows.
  2593. .sp
  2594. .LP
  2595. .\" Start marker code here
  2596. .IN "GetGeometry" "" "@DEF@"
  2597. .PN GetGeometry
  2598. .in +.2i
  2599. .LP
  2600. \fIdrawable\fP\^: DRAWABLE
  2601. .in -.2i
  2602. .LP
  2603.    =>
  2604. .in +.2i
  2605. .LP
  2606. root: WINDOW
  2607. .br
  2608. depth: CARD8
  2609. .br
  2610. x, y: INT16
  2611. .br
  2612. width, height, border-width: CARD16
  2613. .LP
  2614. Errors: 
  2615. .PN Drawable
  2616. .\" End marker code here
  2617. .in -.2i
  2618. .LP
  2619. This request returns the root and current geometry of the drawable.
  2620. The depth is the number of bits per pixel for the object.
  2621. The x, y, and border-width will always be zero for pixmaps.
  2622. For a window, 
  2623. the x and y coordinates specify the upper-left outer corner of the window 
  2624. relative to its parent's origin, 
  2625. and the width and height specify the inside size, not including the border.
  2626. .LP
  2627. It is legal to pass an 
  2628. .PN InputOnly 
  2629. window as a drawable to this request.
  2630. .sp
  2631. .LP
  2632. .\" Start marker code here
  2633. .IN "QueryTree" "" "@DEF@"
  2634. .PN QueryTree
  2635. .in +.2i
  2636. .LP
  2637. \fIwindow\fP\^: WINDOW
  2638. .LP
  2639. .in -.2i
  2640.    =>
  2641. .in +.2i
  2642. .LP
  2643. root: WINDOW
  2644. .br
  2645. parent: WINDOW or 
  2646. .PN None
  2647. .br
  2648. children: LISTofWINDOW
  2649. .LP
  2650. Errors: 
  2651. .PN Window
  2652. .\" End marker code here
  2653. .in -.2i
  2654. .LP
  2655. This request returns the root, the parent, and the children of the window.
  2656. The children are listed in bottom-to-top stacking order.
  2657. .sp
  2658. .LP
  2659. .\" Start marker code here
  2660. .IN "InternAtom" "" "@DEF@"
  2661. .PN InternAtom
  2662. .in +.2i
  2663. .LP
  2664. \fIname\fP\^: STRING8
  2665. .br
  2666. \fIonly-if-exists\fP\^: BOOL
  2667. .in -.2i
  2668. .LP
  2669.    =>
  2670. .in +.2i
  2671. .LP
  2672. atom: ATOM or 
  2673. .PN None
  2674. .LP
  2675. Errors:
  2676. .PN Alloc ,
  2677. .PN Value
  2678. .\" End marker code here
  2679. .in -.2i
  2680. .LP
  2681. This request returns the atom for the given name.
  2682. If only-if-exists is 
  2683. .PN False , 
  2684. then the atom is created if it does not exist.
  2685. The string should use the ISO Latin-1 encoding. 
  2686. Uppercase and lowercase matter.
  2687. .LP
  2688. The lifetime of an atom is not tied to the interning client.
  2689. Atoms remain defined until server reset (see section 10).
  2690. .sp
  2691. .LP
  2692. .\" Start marker code here
  2693. .IN "GetAtomName" "" "@DEF@"
  2694. .PN GetAtomName
  2695. .in +.2i
  2696. .LP
  2697. \fIatom\fP\^: ATOM
  2698. .in -.2i
  2699. .LP
  2700.    =>
  2701. .in +.2i
  2702. .LP
  2703. name: STRING8
  2704. .LP
  2705. Errors: 
  2706. .PN Atom
  2707. .\" End marker code here
  2708. .in -.2i
  2709. .LP
  2710. This request returns the name for the given atom.
  2711. .sp
  2712. .LP
  2713. .\" Start marker code here
  2714. .IN "ChangeProperty" "" "@DEF@"
  2715. .PN ChangeProperty
  2716. .in +.2i
  2717. .LP
  2718. \fIwindow\fP\^: WINDOW
  2719. .br
  2720. \fIproperty\fP, \fItype\fP\^: ATOM
  2721. .br
  2722. \fIformat\fP\^: {8, 16, 32}
  2723. .br
  2724. \fImode\fP\^:
  2725. .Pn { Replace , 
  2726. .PN Prepend , 
  2727. .PN Append }
  2728. .br
  2729. \fIdata\fP\^: LISTofINT8 or LISTofINT16 or LISTofINT32
  2730. .LP
  2731. Errors: 
  2732. .PN Alloc ,
  2733. .PN Atom , 
  2734. .PN Match , 
  2735. .PN Value , 
  2736. .PN Window
  2737. .\" End marker code here
  2738. .in -.2i
  2739. .LP
  2740. This request alters the property for the specified window.
  2741. The type is uninterpreted by the server.
  2742. The format specifies whether the data should be viewed as a list of 8-bit, 
  2743. 16-bit, or 32-bit quantities so that the server can correctly byte-swap 
  2744. as necessary.
  2745. .LP
  2746. If the mode is 
  2747. .PN Replace , 
  2748. the previous property value is discarded.
  2749. If the mode is 
  2750. .PN Prepend 
  2751. or 
  2752. .PN Append , 
  2753. then the type and format must match the existing property value (or a 
  2754. .PN Match 
  2755. error results).
  2756. If the property is undefined, 
  2757. it is treated as defined with the correct type
  2758. and format with zero-length data.
  2759. For 
  2760. .PN Prepend , 
  2761. the data is tacked on to the beginning of the existing data, and for 
  2762. .PN Append ,
  2763. it is tacked on to the end of the existing data.
  2764. .LP
  2765. This request generates a 
  2766. .PN PropertyNotify 
  2767. event on the window.
  2768. .LP
  2769. The lifetime of a property is not tied to the storing client.
  2770. Properties remain until explicitly deleted, until the window is destroyed,
  2771. or until server reset (see section 10).
  2772. .LP
  2773. The maximum size of a property is server-dependent and may vary dynamically.
  2774. .sp
  2775. .LP
  2776. .\" Start marker code here
  2777. .IN "DeleteProperty" "" "@DEF@"
  2778. .PN DeleteProperty
  2779. .in +.2i
  2780. .LP
  2781. \fIwindow\fP\^: WINDOW
  2782. .br
  2783. \fIproperty\fP\^: ATOM
  2784. .LP
  2785. Errors: 
  2786. .PN Atom ,
  2787. .PN Window
  2788. .\" End marker code here
  2789. .in -.2i
  2790. .LP
  2791. This request deletes the property from the specified window 
  2792. if the property exists and generates a 
  2793. .PN PropertyNotify 
  2794. event on the window unless the property does not exist.
  2795. .sp
  2796. .LP
  2797. .\" Start marker code here
  2798. .IN "GetProperty" "" "@DEF@"
  2799. .PN GetProperty
  2800. .in +.2i
  2801. .LP
  2802. \fIwindow\fP\^: WINDOW
  2803. .br
  2804. \fIproperty\fP\^: ATOM
  2805. .br
  2806. \fItype\fP\^: ATOM or 
  2807. .PN AnyPropertyType
  2808. .br
  2809. \fIlong-offset\fP, \fIlong-length\fP\^: CARD32
  2810. .br
  2811. \fIdelete\fP\^: BOOL
  2812. .in -.2i
  2813. .LP
  2814.    =>
  2815. .in +.2i
  2816. .LP
  2817. type: ATOM or 
  2818. .PN None
  2819. .br
  2820. format: {0, 8, 16, 32}
  2821. .br
  2822. bytes-after: CARD32
  2823. .br
  2824. value: LISTofINT8 or LISTofINT16 or LISTofINT32
  2825. .LP
  2826. Errors: 
  2827. .PN Atom , 
  2828. .PN Value ,
  2829. .PN Window
  2830. .\" End marker code here
  2831. .in -.2i
  2832. .LP
  2833. If the specified property does not exist for the specified window, 
  2834. then the return type is 
  2835. .PN None , 
  2836. the format and bytes-after are zero, 
  2837. and the value is empty.
  2838. The delete argument is ignored in this case.
  2839. If the specified property exists but its type does not match the specified type,
  2840. then the return type is the actual type of the property, 
  2841. the format is the actual format of the property (never zero), 
  2842. the bytes-after is the length of the property in bytes 
  2843. (even if the format is 16 or 32), 
  2844. and the value is empty.
  2845. The delete argument is ignored in this case.
  2846. If the specified property exists and either 
  2847. .PN AnyPropertyType 
  2848. is specified or the specified type matches the actual type of the property, 
  2849. then the return type is the actual type of the property, 
  2850. the format is the actual format of the property (never zero), 
  2851. and the bytes-after and value are as follows, given:
  2852. .DS
  2853. N = actual length of the stored property in bytes 
  2854. \ \ \ \ (even if the format is 16 or 32)
  2855. I = 4 * long-offset
  2856. T = N \- I
  2857. L = MINIMUM(T, 4 * long-length)
  2858. A = N \- (I + L)
  2859. .DE
  2860. .LP
  2861. The returned value starts at byte index I in the property (indexing from 0), 
  2862. and its length in bytes is L.
  2863. However, it is a 
  2864. .PN Value 
  2865. error if long-offset is given such that L is negative.
  2866. The value of bytes-after is A, 
  2867. giving the number of trailing unread bytes in the stored
  2868. property.
  2869. If delete is 
  2870. .PN True 
  2871. and the bytes-after is zero, 
  2872. the property is also deleted from the window,
  2873. and a 
  2874. .PN PropertyNotify 
  2875. event is generated on the window.
  2876. .sp
  2877. .LP
  2878. .\" Start marker code here
  2879. .IN "RotateProperties" "" "@DEF@"
  2880. .PN RotateProperties
  2881. .in +.2i
  2882. .LP
  2883. \fIwindow\fP\^: WINDOW
  2884. .br
  2885. \fIdelta\fP\^: INT16
  2886. .br
  2887. \fIproperties\fP\^: LISTofATOM
  2888. .LP
  2889. Errors: 
  2890. .PN Atom , 
  2891. .PN Match ,
  2892. .PN Window
  2893. .\" End marker code here
  2894. .in -.2i
  2895. .LP
  2896. If the property names in the list are viewed as being numbered starting
  2897. from zero, and there are N property names in the list, 
  2898. then the value associated with property name I becomes the value 
  2899. associated with property name (I + delta) mod N, for all I from zero to N \- 1.
  2900. The effect is to rotate the states by delta places around the virtual ring
  2901. of property names (right for positive delta, left for negative delta).
  2902. .LP
  2903. If delta mod N is nonzero, 
  2904. .PN PropertyNotify 
  2905. event is generated for each property in the order listed.
  2906. .LP
  2907. If an atom occurs more than once in the list or no property with that
  2908. name is defined for the window, 
  2909. .PN Match 
  2910. error is generated.
  2911. If an 
  2912. .PN Atom 
  2913. or 
  2914. .PN Match 
  2915. error is generated, no properties are changed.
  2916. .sp
  2917. .LP
  2918. .\" Start marker code here
  2919. .IN "ListProperties" "" "@DEF@"
  2920. .PN ListProperties
  2921. .in +.2i
  2922. .LP
  2923. \fIwindow\fP\^: WINDOW
  2924. .in -.2i
  2925. .LP
  2926.    =>
  2927. .in +.2i
  2928. .LP
  2929. atoms: LISTofATOM
  2930. .LP
  2931. Errors: 
  2932. .PN Window
  2933. .\" End marker code here
  2934. .in -.2i
  2935. .LP
  2936. This request returns the atoms of properties currently defined on the window.
  2937. .sp
  2938. .LP
  2939. .\" Start marker code here
  2940. .IN "SetSelectionOwner" "" "@DEF@"
  2941. .PN SetSelectionOwner
  2942. .in +.2i
  2943. .LP
  2944. \fIselection\fP\^: ATOM
  2945. .br
  2946. \fIowner\fP\^: WINDOW or 
  2947. .PN None
  2948. .br
  2949. \fItime\fP\^: TIMESTAMP or 
  2950. .PN CurrentTime
  2951. .LP
  2952. Errors: 
  2953. .PN Atom , 
  2954. .PN Window
  2955. .\" End marker code here
  2956. .in -.2i
  2957. .LP
  2958. This request changes the owner, owner window, 
  2959. and last-change time of the specified selection.
  2960. This request has no effect if the specified time is earlier
  2961. than the current last-change time of the specified selection or is
  2962. later than the current server time.
  2963. Otherwise, the last-change time is set to the specified time
  2964. with 
  2965. .PN CurrentTime 
  2966. replaced by the current server time.
  2967. If the owner window is specified as 
  2968. .PN None , 
  2969. then the owner of the selection becomes 
  2970. .PN None 
  2971. (that is, no owner).
  2972. Otherwise, the owner of the selection becomes the client executing the request.
  2973. If the new owner (whether a client or 
  2974. .PN None ) 
  2975. is not the same as the current owner
  2976. and the current owner is not 
  2977. .PN None , 
  2978. then the current owner is sent a
  2979. .PN SelectionClear 
  2980. event.
  2981. .LP
  2982. If the client that is the owner of a selection is later terminated
  2983. (that is, its connection is closed) or if the owner window it has
  2984. specified in the request is later destroyed, 
  2985. then the owner of the selection automatically reverts to 
  2986. .PN None , 
  2987. but the last-change time is not affected.
  2988. .LP
  2989. The selection atom is uninterpreted by the server.
  2990. The owner window is returned by the 
  2991. .PN GetSelectionOwner 
  2992. request and is reported in
  2993. .PN SelectionRequest 
  2994. and 
  2995. .PN SelectionClear 
  2996. events.
  2997. .LP
  2998. Selections are global to the server.
  2999. .sp
  3000. .LP
  3001. .\" Start marker code here
  3002. .IN "GetSelectionOwner" "" "@DEF@"
  3003. .PN GetSelectionOwner
  3004. .in +.2i
  3005. .LP
  3006. \fIselection\fP\^: ATOM
  3007. .in -.2i
  3008. .LP
  3009.    =>
  3010. .in +.2i
  3011. .LP
  3012. owner: WINDOW or 
  3013. .PN None
  3014. .IP
  3015. Errors: 
  3016. .PN Atom
  3017. .\" End marker code here
  3018. .in -.2i
  3019. .LP
  3020. This request returns the current owner window of the specified selection, 
  3021. if any.
  3022. If 
  3023. .PN None 
  3024. is returned, then there is no owner for the selection.
  3025. .sp
  3026. .LP
  3027. .\" Start marker code here
  3028. .IN "ConvertSelection" "" "@DEF@"
  3029. .PN ConvertSelection
  3030. .in +.2i
  3031. .LP
  3032. \fIselection\fP, \fItarget\fP\^: ATOM
  3033. .br
  3034. \fIproperty\fP\^: ATOM or 
  3035. .PN None
  3036. .br
  3037. \fIrequestor\fP\^: WINDOW
  3038. .br
  3039. \fItime\fP\^: TIMESTAMP or 
  3040. .PN CurrentTime
  3041. .LP
  3042. Errors: 
  3043. .PN Atom , 
  3044. .PN Window
  3045. .\" End marker code here
  3046. .in -.2i
  3047. .LP
  3048. If the specified selection has an owner, 
  3049. the server sends a
  3050. .PN SelectionRequest 
  3051. event to that owner.
  3052. If no owner for the specified selection exists, 
  3053. the server generates a 
  3054. .PN SelectionNotify 
  3055. event to the requestor with property 
  3056. .PN None .
  3057. The arguments are passed on unchanged in either of the events.
  3058. .sp
  3059. .LP
  3060. .\" Start marker code here
  3061. .IN "SendEvent" "" "@DEF@"
  3062. .PN SendEvent
  3063. .in +.2i
  3064. .LP
  3065. \fIdestination\fP\^: WINDOW or 
  3066. .PN PointerWindow 
  3067. or 
  3068. .PN InputFocus
  3069. .br
  3070. \fIpropagate\fP\^: BOOL
  3071. .br
  3072. \fIevent-mask\fP\^: SETofEVENT
  3073. .br
  3074. \fIevent\fP\^: <normal-event-format>
  3075. .LP
  3076. Errors: 
  3077. .PN Value ,
  3078. .PN Window
  3079. .\" End marker code here
  3080. .in -.2i
  3081. .LP
  3082. If 
  3083. .PN PointerWindow 
  3084. is specified, 
  3085. destination is replaced with the window that the pointer is in.
  3086. If 
  3087. .PN InputFocus 
  3088. is specified and the focus window contains the pointer, 
  3089. destination is replaced with the window that the pointer is in.
  3090. Otherwise, destination is replaced with the focus window.
  3091. .LP
  3092. If the event-mask is the empty set, 
  3093. then the event is sent to the client that created the destination window.
  3094. If that client no longer exists, no event is sent.
  3095. .LP
  3096. If propagate is 
  3097. .PN False , 
  3098. then the event is sent to every client selecting
  3099. on destination any of the event types in event-mask.
  3100. .LP
  3101. If propagate is 
  3102. .PN True 
  3103. and no clients have selected on destination any 
  3104. of the event types in event-mask, 
  3105. then destination is replaced with the
  3106. closest ancestor of destination for which some client has selected a
  3107. type in event-mask and no intervening window has that type in its
  3108. do-not-propagate-mask.
  3109. If no such window exists or if the window is an ancestor of the focus window
  3110. and 
  3111. .PN InputFocus 
  3112. was originally specified as the destination, 
  3113. then the event is not sent to any clients.
  3114. Otherwise, the event is reported to every client selecting on the final
  3115. destination any of the types specified in event-mask.
  3116. .LP
  3117. The event code must be one of the core events or one of the events
  3118. defined by an extension (or a
  3119. .PN Value
  3120. error results) so that the server can correctly byte-swap the
  3121. contents as necessary.
  3122. The contents of the event are otherwise unaltered and unchecked 
  3123. by the server except to force on the most-significant bit of the event code
  3124. and to set the sequence number in the event correctly.
  3125. .LP
  3126. Active grabs are ignored for this request.
  3127. .sp
  3128. .LP
  3129. .\" Start marker code here
  3130. .IN "GrabPointer" "" "@DEF@"
  3131. .PN GrabPointer
  3132. .in +.2i
  3133. .LP
  3134. \fIgrab-window\fP\^: WINDOW
  3135. .br
  3136. \fIowner-events\fP\^: BOOL
  3137. .br
  3138. \fIevent-mask\fP\^: SETofPOINTEREVENT
  3139. .br
  3140. \fIpointer-mode\fP, \fIkeyboard-mode\fP\^: 
  3141. .Pn { Synchronous , 
  3142. .PN Asynchronous }
  3143. .br
  3144. \fIconfine-to\fP\^: WINDOW or 
  3145. .PN None
  3146. .br
  3147. \fIcursor\fP\^: CURSOR or 
  3148. .PN None
  3149. .br
  3150. \fItime\fP\^: TIMESTAMP or 
  3151. .PN CurrentTime
  3152. .in -.2i
  3153. .LP
  3154.    =>
  3155. .in +.2i
  3156. .LP
  3157. status: 
  3158. .Pn { Success , 
  3159. .PN AlreadyGrabbed , 
  3160. .PN Frozen , 
  3161. .PN InvalidTime , 
  3162. .PN NotViewable }
  3163. .LP
  3164. Errors: 
  3165. .PN Cursor , 
  3166. .PN Value ,
  3167. .PN Window
  3168. .\" End marker code here
  3169. .in -.2i
  3170. .LP
  3171. This request actively grabs control of the pointer.
  3172. Further pointer events are only reported to the grabbing client.
  3173. The request overrides any active pointer grab by this client.
  3174. .LP
  3175. If owner-events is 
  3176. .PN False , 
  3177. all generated pointer events are reported with respect to grab-window 
  3178. and are only reported if selected by event-mask.
  3179. If owner-events is 
  3180. .PN True  
  3181. and a generated pointer event would normally be reported to this client, 
  3182. it is reported normally.
  3183. Otherwise, the event is reported with respect to the grab-window and is
  3184. only reported if selected by event-mask.
  3185. For either value of owner-events, 
  3186. unreported events are simply discarded.
  3187. .LP
  3188. If pointer-mode is 
  3189. .PN Asynchronous , 
  3190. pointer event processing continues normally.
  3191. If the pointer is currently frozen by this client, 
  3192. then processing of pointer events is resumed.
  3193. If pointer-mode is 
  3194. .PN Synchronous , 
  3195. the state of the pointer (as seen by means of the protocol) appears to freeze,
  3196. and no further pointer events are generated by the server until the
  3197. grabbing client issues a releasing 
  3198. .PN AllowEvents 
  3199. request or until the pointer grab is released.
  3200. Actual pointer changes are not lost while the pointer is frozen.
  3201. They are simply queued for later processing.
  3202. .LP
  3203. If keyboard-mode is 
  3204. .PN Asynchronous , 
  3205. keyboard event processing is unaffected by activation of the grab.
  3206. If keyboard-mode is 
  3207. .PN Synchronous ,
  3208. the state of the keyboard (as seen by means of the protocol) appears to freeze,
  3209. and no further keyboard events are generated by the server until the grabbing
  3210. client issues a releasing 
  3211. .PN AllowEvents 
  3212. request or until the pointer grab is released.
  3213. Actual keyboard changes are not lost while the keyboard is frozen.
  3214. They are simply queued for later processing.
  3215. .LP
  3216. If a cursor is specified, 
  3217. then it is displayed regardless of what window the pointer is in.
  3218. If no cursor is specified,
  3219. then when the pointer is in grab-window or one of its subwindows, 
  3220. the normal cursor for that window is displayed.
  3221. Otherwise, the cursor for grab-window is displayed.
  3222. .LP
  3223. If a confine-to window is specified, 
  3224. then the pointer will be restricted to stay contained in that window.
  3225. The confine-to window need have no relationship to the grab-window.
  3226. If the pointer is not initially in the confine-to window, 
  3227. then it is warped automatically to the closest edge 
  3228. (and enter/leave events are generated normally) just before the grab activates.
  3229. If the confine-to window is subsequently reconfigured,
  3230. the pointer will be warped automatically as necessary to
  3231. keep it contained in the window.
  3232. .LP
  3233. This request generates 
  3234. .PN EnterNotify 
  3235. and 
  3236. .PN LeaveNotify 
  3237. events.
  3238. .LP
  3239. The request fails with status 
  3240. .PN AlreadyGrabbed 
  3241. if the pointer is actively grabbed by some other client.
  3242. The request fails with status 
  3243. .PN Frozen 
  3244. if the pointer is frozen by an active grab of another client.
  3245. The request fails with status 
  3246. .PN NotViewable 
  3247. if grab-window or confine-to window is not viewable
  3248. or if the confine-to window lies completely outside the boundaries 
  3249. of the root window.
  3250. The request fails with status 
  3251. .PN InvalidTime 
  3252. if the specified time is earlier than the last-pointer-grab time or later than
  3253. the current server time.
  3254. Otherwise, the last-pointer-grab time is set to the specified time, with 
  3255. .PN CurrentTime 
  3256. replaced by the current server time.
  3257. .sp
  3258. .LP
  3259. .\" Start marker code here
  3260. .IN "UngrabPointer" "" "@DEF@"
  3261. .PN UngrabPointer
  3262. .in +.2i
  3263. .LP
  3264. \fItime\fP\^: TIMESTAMP or 
  3265. .PN CurrentTime
  3266. .\" End marker code here
  3267. .in -.2i
  3268. .LP
  3269. This request releases the pointer if this client has it actively grabbed (from
  3270. either 
  3271. .PN GrabPointer 
  3272. or 
  3273. .PN GrabButton 
  3274. or from a normal button press) and releases any queued events.
  3275. The request has no effect if the specified time is earlier than 
  3276. the last-pointer-grab time or is later than the current server time.
  3277. .LP
  3278. This request generates 
  3279. .PN EnterNotify 
  3280. and 
  3281. .PN LeaveNotify 
  3282. events.
  3283. .LP
  3284. An 
  3285. .PN UngrabPointer 
  3286. request is performed automatically if the event window or
  3287. confine-to window for an active pointer grab becomes not viewable
  3288. or if window reconfiguration causes the confine-to window to lie
  3289. completely outside the boundaries of the root window.
  3290. .sp
  3291. .LP
  3292. .\" Start marker code here
  3293. .IN "GrabButton" "" "@DEF@"
  3294. .PN GrabButton
  3295. .in +.2i
  3296. .LP
  3297. \fImodifiers\fP\^: SETofKEYMASK or 
  3298. .PN AnyModifier
  3299. .br
  3300. \fIbutton\fP\^: BUTTON or 
  3301. .PN AnyButton
  3302. .br
  3303. \fIgrab-window\fP\^: WINDOW
  3304. .br
  3305. \fIowner-events\fP\^: BOOL
  3306. .br
  3307. \fIevent-mask\fP\^: SETofPOINTEREVENT
  3308. .br
  3309. \fIpointer-mode\fP, \fIkeyboard-mode\fP\^:
  3310. .Pn { Synchronous , 
  3311. .PN Asynchronous }
  3312. .br
  3313. \fIconfine-to\fP\^: WINDOW or 
  3314. .PN None
  3315. .br
  3316. \fIcursor\fP\^: CURSOR or 
  3317. .PN None
  3318. .LP
  3319. Errors: 
  3320. .PN Access ,
  3321. .PN Cursor , 
  3322. .PN Value , 
  3323. .PN Window
  3324. .\" End marker code here
  3325. .in -.2i
  3326. .LP
  3327. This request establishes a passive grab.
  3328. In the future,
  3329. the pointer is actively grabbed as described in 
  3330. .PN GrabPointer ,
  3331. the last-pointer-grab time is set to the time at which the button was
  3332. pressed (as transmitted in the 
  3333. .PN ButtonPress 
  3334. event), and the 
  3335. .PN ButtonPress
  3336. event is reported if all of the following conditions are true:
  3337. .IP \(bu 5
  3338. The pointer is not grabbed and the specified button is logically pressed
  3339. when the specified modifier keys are logically down,
  3340. and no other buttons or modifier keys are logically down.
  3341. .IP \(bu 5
  3342. The grab-window contains the pointer. 
  3343. .IP \(bu 5
  3344. The confine-to window (if any) is viewable.
  3345. .IP \(bu 5
  3346. A passive grab on the same button/key combination does not exist 
  3347. on any ancestor of grab-window.
  3348. .LP
  3349. The interpretation of the remaining arguments is the same as for 
  3350. .PN GrabPointer .
  3351. The active grab is terminated automatically when
  3352. the logical state of the pointer has all buttons released,
  3353. independent of the logical state of modifier keys.
  3354. Note that the logical state of a device (as seen by means of the protocol)
  3355. may lag the physical state if device event processing is frozen.
  3356. .LP
  3357. This request overrides all previous passive grabs by the same client on
  3358. the same button/key combinations on the same window.
  3359. A modifier of 
  3360. .PN AnyModifier 
  3361. is equivalent to issuing the request for all possible modifier combinations 
  3362. (including the combination of no modifiers).
  3363. It is not required that all specified modifiers have currently assigned 
  3364. keycodes.
  3365. A button of 
  3366. .PN AnyButton 
  3367. is equivalent to issuing the request for all possible buttons.
  3368. Otherwise, it is not required that the button specified currently be assigned 
  3369. to a physical button.
  3370. .LP
  3371. An 
  3372. .PN Access 
  3373. error is generated if some other client has already issued a
  3374. .PN GrabButton 
  3375. request with the same button/key combination on the same window.
  3376. When using 
  3377. .PN AnyModifier 
  3378. or 
  3379. .PN AnyButton , 
  3380. the request fails completely (no grabs are established), and an 
  3381. .PN Access 
  3382. error is generated if there is a conflicting grab for any combination.
  3383. The request has no effect on an active grab.
  3384. .sp
  3385. .LP
  3386. .\" Start marker code here
  3387. .IN "UngrabButton" "" "@DEF@"
  3388. .PN UngrabButton
  3389. .in +.2i
  3390. .LP
  3391. \fImodifiers\fP\^: SETofKEYMASK or 
  3392. .PN AnyModifier
  3393. .br
  3394. \fIbutton\fP\^: BUTTON or 
  3395. .PN AnyButton
  3396. .br
  3397. \fIgrab-window\fP\^: WINDOW
  3398. .LP
  3399. Errors: 
  3400. .PN Value ,
  3401. .PN Window
  3402. .\" End marker code here
  3403. .in -.2i
  3404. .LP
  3405. This request releases the passive button/key combination 
  3406. on the specified window if it was grabbed by this client.
  3407. A modifiers argument of 
  3408. .PN AnyModifier 
  3409. is equivalent to issuing the request for all possible modifier
  3410. combinations (including the combination of no modifiers).
  3411. A button of
  3412. .PN AnyButton 
  3413. is equivalent to issuing the request for all possible buttons.
  3414. The request has no effect on an active grab.
  3415. .sp
  3416. .LP
  3417. .\" Start marker code here
  3418. .IN "ChangeActivePointerGrab" "" "@DEF@"
  3419. .PN ChangeActivePointerGrab
  3420. .in +.2i
  3421. .LP
  3422. \fIevent-mask\fP\^: SETofPOINTEREVENT
  3423. .br
  3424. \fIcursor\fP\^: CURSOR or 
  3425. .PN None
  3426. .br
  3427. \fItime\fP\^: TIMESTAMP or 
  3428. .PN CurrentTime
  3429. .LP
  3430. Errors: 
  3431. .PN Cursor ,
  3432. .PN Value
  3433. .\" End marker code here
  3434. .in -.2i
  3435. .LP
  3436. This request changes the specified dynamic parameters if the pointer is 
  3437. actively grabbed by the client and the specified time is no earlier than the
  3438. last-pointer-grab time and no later than the current server time.
  3439. The interpretation of event-mask and cursor are the same as in 
  3440. .PN GrabPointer .
  3441. This request has no effect on the parameters of any passive grabs established
  3442. with
  3443. .PN GrabButton .
  3444. .sp
  3445. .LP
  3446. .\" Start marker code here
  3447. .IN "GrabKeyboard" "" "@DEF@"
  3448. .PN GrabKeyboard
  3449. .in +.2i
  3450. .LP
  3451. \fIgrab-window\fP\^: WINDOW
  3452. .br
  3453. \fIowner-events\fP\^: BOOL
  3454. .br
  3455. \fIpointer-mode\fP, \fIkeyboard-mode\fP\^:
  3456. .Pn { Synchronous , 
  3457. .PN Asynchronous }
  3458. .br
  3459. \fItime\fP\^: TIMESTAMP or 
  3460. .PN CurrentTime
  3461. .in -.2i
  3462. .LP
  3463.    =>
  3464. .in +.2i
  3465. .LP
  3466. status:
  3467. .Pn { Success , 
  3468. .PN AlreadyGrabbed , 
  3469. .PN Frozen ,
  3470. .PN InvalidTime , 
  3471. .PN NotViewable }
  3472. .LP
  3473. Errors: 
  3474. .PN Value ,
  3475. .PN Window
  3476. .\" End marker code here
  3477. .in -.2i
  3478. .LP
  3479. This request actively grabs control of the keyboard.
  3480. Further key events are reported only to the grabbing client.
  3481. This request overrides any active keyboard grab by this client.
  3482. .LP
  3483. If owner-events is 
  3484. .PN False , 
  3485. all generated key events are reported with respect to grab-window.
  3486. If owner-events is 
  3487. .PN True
  3488. and if a generated key event would normally be reported to this client, 
  3489. it is reported normally.
  3490. Otherwise, the event is reported with respect to the grab-window.
  3491. Both 
  3492. .PN KeyPress 
  3493. and 
  3494. .PN KeyRelease 
  3495. events are always reported,
  3496. independent of any event selection made by the client.
  3497. .LP
  3498. If keyboard-mode is
  3499. .PN Asynchronous ,
  3500. keyboard event processing continues normally.
  3501. If the keyboard is currently frozen by this client, 
  3502. then processing of keyboard events is resumed.
  3503. If keyboard-mode is 
  3504. .PN Synchronous , 
  3505. the state of the keyboard (as seen by means of the protocol) appears to freeze.
  3506. No further keyboard events are generated by the server until the
  3507. grabbing client issues a releasing 
  3508. .PN AllowEvents 
  3509. request or until the keyboard grab is released.
  3510. Actual keyboard changes are not lost while the keyboard is frozen.
  3511. They are simply queued for later processing.
  3512. .LP
  3513. If pointer-mode is 
  3514. .PN Asynchronous , 
  3515. pointer event processing is unaffected by activation of the grab.
  3516. If pointer-mode is 
  3517. .PN Synchronous , 
  3518. the state of the pointer (as seen by means of the protocol) appears to freeze.
  3519. No further pointer events are generated by the server 
  3520. until the grabbing client issues a releasing 
  3521. .PN AllowEvents 
  3522. request or until the keyboard grab is released.
  3523. Actual pointer changes are not lost while the pointer is frozen.
  3524. They are simply queued for later processing.
  3525. .LP
  3526. This request generates 
  3527. .PN FocusIn 
  3528. and 
  3529. .PN FocusOut 
  3530. events.
  3531. .LP
  3532. The request fails with status 
  3533. .PN AlreadyGrabbed 
  3534. if the keyboard is actively grabbed by some other client.
  3535. The request fails with status 
  3536. .PN Frozen
  3537. if the keyboard is frozen by an active grab of another client.
  3538. The request fails with status 
  3539. .PN NotViewable 
  3540. if grab-window is not viewable.
  3541. The request fails with status 
  3542. .PN InvalidTime 
  3543. if the specified time is earlier than the last-keyboard-grab time 
  3544. or later than the current server time.
  3545. Otherwise, the last-keyboard-grab time is set to the specified time with 
  3546. .PN CurrentTime 
  3547. replaced by the current server time.
  3548. .sp
  3549. .LP
  3550. .\" Start marker code here
  3551. .IN "UngrabKeyboard" "" "@DEF@"
  3552. .PN UngrabKeyboard
  3553. .in +.2i
  3554. .LP
  3555. \fItime\fP\^: TIMESTAMP or 
  3556. .PN CurrentTime
  3557. .\" End marker code here
  3558. .in -.2i
  3559. .LP
  3560. This request releases the keyboard if this client has it actively grabbed 
  3561. (as a result of either 
  3562. .PN GrabKeyboard 
  3563. or 
  3564. .PN GrabKey ) 
  3565. and releases any queued events.
  3566. The request has no effect if the specified time is earlier than the
  3567. last-keyboard-grab time or is later than the current server time.
  3568. .LP
  3569. This request generates 
  3570. .PN FocusIn 
  3571. and 
  3572. .PN FocusOut 
  3573. events.
  3574. .LP
  3575. An 
  3576. .PN UngrabKeyboard 
  3577. is performed automatically if the event window for an active keyboard grab 
  3578. becomes not viewable.
  3579. .sp
  3580. .LP
  3581. .\" Start marker code here
  3582. .IN "GrabKey" "" "@DEF@"
  3583. .PN GrabKey
  3584. .in +.2i
  3585. .LP
  3586. \fIkey\fP\^: KEYCODE or 
  3587. .PN AnyKey
  3588. .br
  3589. \fImodifiers\fP\^: SETofKEYMASK or 
  3590. .PN AnyModifier
  3591. .br
  3592. \fIgrab-window\fP\^: WINDOW
  3593. .br
  3594. \fIowner-events\fP\^: BOOL
  3595. .br
  3596. \fIpointer-mode\fP, \fIkeyboard-mode\fP\^:
  3597. .Pn { Synchronous , 
  3598. .PN Asynchronous }
  3599. .LP
  3600. Errors: 
  3601. .PN Access ,
  3602. .PN Value , 
  3603. .PN Window
  3604. .\" End marker code here
  3605. .in -.2i
  3606. .LP
  3607. This request establishes a passive grab on the keyboard.
  3608. In the future,
  3609. the keyboard is actively grabbed as described in
  3610. .PN GrabKeyboard , 
  3611. the last-keyboard-grab time is set to the time at which the key was pressed 
  3612. (as transmitted in the 
  3613. .PN KeyPress 
  3614. event), and the 
  3615. .PN KeyPress 
  3616. event is reported if all of the following conditions are true:
  3617. .IP \(bu 5
  3618. The keyboard is not grabbed and the specified key 
  3619. (which can itself be a modifier key) is logically pressed
  3620. when the specified modifier keys are logically down, 
  3621. and no other modifier keys are logically down.
  3622. .IP \(bu 5
  3623. Either the grab-window is an ancestor of (or is) the focus window,
  3624. or the grab-window is a descendent of the focus window and contains the pointer.
  3625. .IP \(bu 5
  3626. A passive grab on the same key combination does not exist
  3627. on any ancestor of grab-window.
  3628. .LP
  3629. The interpretation of the remaining arguments is the same as for 
  3630. .PN GrabKeyboard .
  3631. The active grab is terminated automatically when the logical state
  3632. of the keyboard has the specified key released,
  3633. independent of the logical state of modifier keys.
  3634. Note that the logical state of a device (as seen by means of the protocol)
  3635. may lag the physical state if device event processing is frozen.
  3636. .LP
  3637. This request overrides all previous passive grabs by the same client
  3638. on the same key combinations on the same window.
  3639. A modifier of 
  3640. .PN AnyModifier 
  3641. is equivalent to issuing the request for all possible modifier combinations 
  3642. (including the combination of no modifiers).
  3643. It is not required that all modifiers specified have
  3644. currently assigned keycodes.
  3645. A key of 
  3646. .PN AnyKey 
  3647. is equivalent to issuing the request for all possible keycodes.
  3648. Otherwise, the key must be in the range specified by min-keycode 
  3649. and max-keycode in the connection setup (or a 
  3650. .PN Value 
  3651. error results).
  3652. .LP
  3653. An 
  3654. .PN Access 
  3655. error is generated if some other client has issued a 
  3656. .PN GrabKey
  3657. with the same key combination on the same window.
  3658. When using
  3659. .PN AnyModifier 
  3660. or 
  3661. .PN AnyKey , 
  3662. the request fails completely (no grabs are established),
  3663. and an 
  3664. .PN Access 
  3665. error is generated if there is a conflicting grab for any combination.
  3666. .sp
  3667. .LP
  3668. .\" Start marker code here
  3669. .IN "UngrabKey" "" "@DEF@"
  3670. .PN UngrabKey
  3671. .in +.2i
  3672. .LP
  3673. \fIkey\fP\^: KEYCODE or 
  3674. .PN AnyKey
  3675. .br
  3676. \fImodifiers\fP\^: SETofKEYMASK or 
  3677. .PN AnyModifier
  3678. .br
  3679. \fIgrab-window\fP\^: WINDOW
  3680. .LP
  3681. Errors: 
  3682. .PN Value ,
  3683. .PN Window
  3684. .\" End marker code here
  3685. .in -.2i
  3686. .LP
  3687. This request releases the key combination on the specified window 
  3688. if it was grabbed by this client.
  3689. A modifiers argument of 
  3690. .PN AnyModifier 
  3691. is equivalent to issuing the request for all possible modifier combinations 
  3692. (including the combination of no modifiers).
  3693. A key of 
  3694. .PN AnyKey 
  3695. is equivalent to issuing the request for all possible keycodes.
  3696. This request has no effect on an active grab.
  3697. .sp
  3698. .LP
  3699. .\" Start marker code here
  3700. .IN "AllowEvents" "" "@DEF@"
  3701. .PN AllowEvents
  3702. .in +.2i
  3703. .LP
  3704. \fImode\fP:
  3705. .Pn { AsyncPointer , 
  3706. .PN SyncPointer , 
  3707. .PN ReplayPointer ,
  3708. .PN AsyncKeyboard , 
  3709. .br
  3710. \ \ \ \ \ \ \ \ \ \ 
  3711. .PN SyncKeyboard , 
  3712. .PN ReplayKeyboard ,
  3713. .PN AsyncBoth , 
  3714. .PN SyncBoth }
  3715. .br
  3716. \fItime\fP\^: TIMESTAMP or 
  3717. .PN CurrentTime
  3718. .LP
  3719. Errors: 
  3720. .PN Value
  3721. .\" End marker code here
  3722. .in -.2i
  3723. .LP
  3724. This request releases some queued events if the client has caused a device to
  3725. freeze.
  3726. The request has no effect if the specified time is earlier
  3727. than the last-grab time of the most recent active grab for the client
  3728. or if the specified time is later than the current server time.
  3729. .LP
  3730. For 
  3731. .PN AsyncPointer , 
  3732. if the pointer is frozen by the client, 
  3733. pointer event processing continues normally.
  3734. If the pointer is frozen twice by the client on behalf of two separate grabs, 
  3735. .PN AsyncPointer 
  3736. thaws for both.
  3737. .PN AsyncPointer 
  3738. has no effect if the pointer is not frozen by the client,
  3739. but the pointer need not be grabbed by the client.
  3740. .LP
  3741. For 
  3742. .PN SyncPointer , 
  3743. if the pointer is frozen and actively grabbed by the client, 
  3744. pointer event processing continues normally until the next
  3745. .PN ButtonPress 
  3746. or 
  3747. .PN ButtonRelease 
  3748. event is reported to the client, 
  3749. at which time the pointer again appears to freeze.
  3750. However, if the reported event causes the pointer grab to be released,
  3751. then the pointer does not freeze.
  3752. .PN SyncPointer 
  3753. has no effect if the pointer is not frozen by the
  3754. client or if the pointer is not grabbed by the client.
  3755. .LP
  3756. For 
  3757. .PN ReplayPointer , 
  3758. if the pointer is actively grabbed by the client and
  3759. is frozen as the result of an event having been sent to the client
  3760. (either from the activation of a 
  3761. .PN GrabButton  
  3762. or from a previous
  3763. .PN AllowEvents 
  3764. with mode 
  3765. .PN SyncPointer
  3766. but not from a 
  3767. .PN GrabPointer ), 
  3768. then the pointer grab is released and that event is completely reprocessed,
  3769. this time ignoring any passive grabs at or above (towards the root)
  3770. the grab-window of the grab just released.
  3771. The request has no effect if the pointer is not grabbed by the client
  3772. or if the pointer is not frozen as the result of an event.
  3773. .LP
  3774. For 
  3775. .PN AsyncKeyboard , 
  3776. if the keyboard is frozen by the client, 
  3777. keyboard event processing continues normally.
  3778. If the keyboard is frozen twice by the client on behalf of two separate grabs,
  3779. .PN AsyncKeyboard 
  3780. thaws for both.
  3781. .PN AsyncKeyboard 
  3782. has no effect if the keyboard is not frozen by the client, 
  3783. but the keyboard need not be grabbed by the client.
  3784. .LP
  3785. For 
  3786. .PN SyncKeyboard ,
  3787. if the keyboard is frozen and actively grabbed by the client, 
  3788. keyboard event processing continues normally until the next
  3789. .PN KeyPress 
  3790. or 
  3791. .PN KeyRelease 
  3792. event is reported to the client, 
  3793. at which time the keyboard again appears to freeze.
  3794. However, if the reported event causes the keyboard grab to be released, 
  3795. then the keyboard does not freeze.
  3796. .PN SyncKeyboard 
  3797. has no effect if the keyboard is not frozen by the client or 
  3798. if the keyboard is not grabbed by the client.
  3799. .LP
  3800. For 
  3801. .PN ReplayKeyboard , 
  3802. if the keyboard is actively grabbed by the client
  3803. and is frozen as the result of an event having been sent to the client
  3804. (either from the activation of a 
  3805. .PN GrabKey
  3806. or from a previous
  3807. .PN AllowEvents 
  3808. with mode 
  3809. .PN SyncKeyboard 
  3810. but not from a 
  3811. .PN GrabKeyboard ), 
  3812. then the keyboard grab is released and that event is completely reprocessed,
  3813. this time ignoring any passive grabs at or above (towards the root)
  3814. the grab-window of the grab just released.
  3815. The request has no effect if the keyboard is not grabbed by the client 
  3816. or if the keyboard is not frozen as the result of an event.
  3817. .LP
  3818. For 
  3819. .PN SyncBoth , 
  3820. if both pointer and keyboard are frozen by the client,
  3821. event processing (for both devices) continues normally until the next
  3822. .PN ButtonPress , 
  3823. .PN ButtonRelease , 
  3824. .PN KeyPress , 
  3825. or 
  3826. .PN KeyRelease 
  3827. event is reported to the client for a grabbed device 
  3828. (button event for the pointer, key event for the keyboard), 
  3829. at which time the devices again appear to freeze.
  3830. However, if the reported event causes the grab to be released,
  3831. then the devices do not freeze (but if the other device is still
  3832. grabbed, then a subsequent event for it will still cause both devices
  3833. to freeze).
  3834. .PN SyncBoth 
  3835. has no effect unless both pointer and keyboard are frozen by the client.
  3836. If the pointer or keyboard is frozen twice by the client on behalf 
  3837. of two separate grabs, 
  3838. .PN SyncBoth 
  3839. thaws for both (but a subsequent freeze for 
  3840. .PN SyncBoth 
  3841. will only freeze each device once).
  3842. .LP
  3843. For 
  3844. .PN AsyncBoth , 
  3845. if the pointer and the keyboard are frozen by the client, 
  3846. event processing for both devices continues normally.
  3847. If a device is frozen twice by the client on behalf of two separate grabs,
  3848. .PN AsyncBoth 
  3849. thaws for both.
  3850. .PN AsyncBoth 
  3851. has no effect unless both pointer and keyboard are frozen by the client.
  3852. .LP
  3853. .PN AsyncPointer , 
  3854. .PN SyncPointer , 
  3855. and 
  3856. .PN ReplayPointer 
  3857. have no effect on processing of keyboard events.
  3858. .PN AsyncKeyboard , 
  3859. .PN SyncKeyboard , 
  3860. and
  3861. .PN ReplayKeyboard 
  3862. have no effect on processing of pointer events.
  3863. .LP
  3864. It is possible for both a pointer grab and a keyboard grab to be active
  3865. simultaneously (by the same or different clients).
  3866. When a device is frozen on behalf of either grab, 
  3867. no event processing is performed for the device.
  3868. It is possible for a single device to be frozen because of both grabs.
  3869. In this case, the freeze must be released on behalf of both grabs 
  3870. before events can again be processed.
  3871. If a device is frozen twice by a single client, then a single
  3872. .PN AllowEvents
  3873. releases both.
  3874. .sp
  3875. .LP
  3876. .\" Start marker code here
  3877. .IN "GrabServer" "" "@DEF@"
  3878. .PN GrabServer
  3879. .\" End marker code here
  3880. .LP
  3881. This request disables processing of requests and close-downs on all 
  3882. connections other than the one this request arrived on.
  3883. .sp
  3884. .LP
  3885. .\" Start marker code here
  3886. .IN "UngrabServer" "" "@DEF@"
  3887. .PN UngrabServer
  3888. .\" End marker code here
  3889. .LP
  3890. This request restarts processing of requests and close-downs 
  3891. on other connections.
  3892. .sp
  3893. .LP
  3894. .\" Start marker code here
  3895. .IN "QueryPointer" "" "@DEF@"
  3896. .PN QueryPointer
  3897. .in +.2i
  3898. .LP
  3899. \fIwindow\fP\^: WINDOW
  3900. .in -.2i
  3901. .LP
  3902.    =>
  3903. .in +.2i
  3904. .LP
  3905. root: WINDOW
  3906. .br
  3907. child: WINDOW or 
  3908. .PN None
  3909. .br
  3910. same-screen: BOOL
  3911. .br
  3912. root-x, root-y, win-x, win-y: INT16
  3913. .br
  3914. mask: SETofKEYBUTMASK
  3915. .LP
  3916. Errors: 
  3917. .PN Window
  3918. .\" End marker code here
  3919. .in -.2i
  3920. .LP
  3921. The root window the pointer is logically on and the pointer coordinates
  3922. relative to the root's origin are returned.
  3923. If same-screen is 
  3924. .PN False ,
  3925. then the pointer is not on the same screen as the argument window,
  3926. child is 
  3927. .PN None ,
  3928. and win-x and win-y are zero.
  3929. If same-screen is 
  3930. .PN True ,
  3931. then win-x and win-y are the pointer coordinates relative to the
  3932. argument window's origin, and child is the child containing the
  3933. pointer, if any.
  3934. The current logical state of the modifier keys and the buttons 
  3935. are also returned.
  3936. Note that the logical state of a device (as seen by means of the protocol)
  3937. may lag the physical state if device event processing is frozen.
  3938. .sp
  3939. .LP
  3940. .\" Start marker code here
  3941. .IN "GetMotionEvents" "" "@DEF@"
  3942. .PN GetMotionEvents
  3943. .in +.2i
  3944. .LP
  3945. \fIstart\fP, \fIstop\fP\^: TIMESTAMP or 
  3946. .PN CurrentTime
  3947. .br
  3948. \fIwindow\fP\^: WINDOW
  3949. .in -.2i
  3950. .LP
  3951.    =>
  3952. .in +.2i
  3953. .LP
  3954. events: LISTofTIMECOORD
  3955. .LP
  3956. where:
  3957. .TS
  3958. l l.
  3959. TIMECOORD:    [x, y: INT16
  3960. .br
  3961.     \ time: TIMESTAMP]
  3962. .TE
  3963. .LP
  3964. Errors: 
  3965. .PN Window
  3966. .\" End marker code here
  3967. .in -.2i
  3968. .LP
  3969. This request returns all events in the motion history buffer that fall 
  3970. between the specified start and stop times (inclusive) 
  3971. and that have coordinates that lie within (including borders) 
  3972. the specified window at its present placement.
  3973. The x and y coordinates are reported relative to the origin of the window.
  3974. .LP
  3975. If the start time is later than the stop time or if the start time is
  3976. in the future, no events are returned.
  3977. If the stop time is in the future, it is equivalent to specifying 
  3978. .PN CurrentTime .
  3979. .sp
  3980. .LP
  3981. .\" Start marker code here
  3982. .IN "TranslateCoordinates" "" "@DEF@"
  3983. .PN TranslateCoordinates
  3984. .in +.2i
  3985. .LP
  3986. \fIsrc-window\fP, \fIdst-window\fP: WINDOW
  3987. .br
  3988. \fIsrc-x\fP, \fIsrc-y\fP\^: INT16
  3989. .in -.2i
  3990. .LP
  3991.    =>
  3992. .in +.2i
  3993. .LP
  3994. same-screen: BOOL
  3995. .br
  3996. child: WINDOW or 
  3997. .PN None
  3998. .br
  3999. dst-x, dst-y: INT16
  4000. .LP
  4001. Errors: 
  4002. .PN Window
  4003. .\" End marker code here
  4004. .in -.2i
  4005. .LP
  4006. The src-x and src-y coordinates are taken relative to src-window's
  4007. origin and are returned as dst-x and dst-y coordinates relative to
  4008. dst-window's origin.
  4009. If same-screen is 
  4010. .PN False , 
  4011. then src-window and dst-window are on different screens, 
  4012. and dst-x and dst-y are zero.
  4013. If the coordinates are contained in a mapped child of dst-window, 
  4014. then that child is returned.
  4015. .sp
  4016. .LP
  4017. .\" Start marker code here
  4018. .IN "WarpPointer" "" "@DEF@"
  4019. .PN WarpPointer
  4020. .in +.2i
  4021. .LP
  4022. \fIsrc-window\fP\^: WINDOW or 
  4023. .PN None
  4024. .br
  4025. \fIdst-window\fP\^: WINDOW or 
  4026. .PN None
  4027. .br
  4028. \fIsrc-x\fP, \fIsrc-y\fP\^: INT16
  4029. .br
  4030. \fIsrc-width\fP, \fIsrc-height\fP\^: CARD16
  4031. .br
  4032. \fIdst-x\fP, \fIdst-y\fP\^: INT16
  4033. .LP
  4034. Errors: 
  4035. .PN Window
  4036. .\" End marker code here
  4037. .in -.2i
  4038. .LP
  4039. If dst-window is 
  4040. .PN None , 
  4041. this request moves the pointer by offsets [dst-x, dst-y] 
  4042. relative to the current position of the pointer.
  4043. If dst-window is a window, 
  4044. this request moves the pointer to [dst-x, dst-y] relative to dst-window's 
  4045. origin.
  4046. However, if src-window is not 
  4047. .PN None , 
  4048. the move only takes place if src-window contains the pointer 
  4049. and the pointer is contained in the specified rectangle of src-window.
  4050. .LP
  4051. The src-x and src-y coordinates are relative to src-window's origin.
  4052. If src-height is zero, 
  4053. it is replaced with the current height of src-window minus src-y.
  4054. If src-width is zero, 
  4055. it is replaced with the current width of src-window minus src-x.
  4056. .LP
  4057. This request cannot be used to move the pointer outside the confine-to
  4058. window of an active pointer grab.
  4059. An attempt will only move the pointer as far as the closest edge 
  4060. of the confine-to window.
  4061. .LP
  4062. This request will generate events just as if the user had instantaneously 
  4063. moved the pointer.
  4064. .sp
  4065. .LP
  4066. .\" Start marker code here
  4067. .IN "SetInputFocus" "" "@DEF@"
  4068. .PN SetInputFocus
  4069. .in +.2i
  4070. .LP
  4071. \fIfocus\fP\^: WINDOW or 
  4072. .PN PointerRoot 
  4073. or 
  4074. .PN None
  4075. .br
  4076. \fIrevert-to\fP\^:
  4077. .Pn { Parent , 
  4078. .PN PointerRoot , 
  4079. .PN None }
  4080. .br
  4081. \fItime\fP\^: TIMESTAMP or 
  4082. .PN CurrentTime
  4083. .LP
  4084. Errors: 
  4085. .PN Match ,
  4086. .PN Value , 
  4087. .PN Window
  4088. .\" End marker code here
  4089. .in -.2i
  4090. .LP
  4091. This request changes the input focus and the last-focus-change time.
  4092. The request has no effect if the specified time is earlier than the current
  4093. last-focus-change time or is later than the current server time.
  4094. Otherwise, the last-focus-change time is set to the specified time
  4095. with 
  4096. .PN CurrentTime 
  4097. replaced by the current server time.
  4098. .LP
  4099. If 
  4100. .PN None 
  4101. is specified as the focus, 
  4102. all keyboard events are discarded until a new focus window is set.
  4103. In this case, the revert-to argument is ignored.
  4104. .LP
  4105. If a window is specified as the focus, 
  4106. it becomes the keyboard's focus window.
  4107. If a generated keyboard event would normally be reported to
  4108. this window or one of its inferiors, the event is reported normally.
  4109. Otherwise, the event is reported with respect to the focus window.
  4110. .LP
  4111. If 
  4112. .PN PointerRoot 
  4113. is specified as the focus, 
  4114. the focus window is dynamically taken to be the root window of whatever screen 
  4115. the pointer is on at each keyboard event.
  4116. In this case, 
  4117. the revert-to argument is ignored.
  4118. .LP
  4119. This request generates 
  4120. .PN FocusIn 
  4121. and 
  4122. .PN FocusOut 
  4123. events.
  4124. .LP
  4125. The specified focus window must be viewable at the time of the request (or a 
  4126. .PN Match 
  4127. error results).
  4128. If the focus window later becomes not viewable,
  4129. the new focus window depends on the revert-to argument.
  4130. If revert-to is 
  4131. .PN Parent , 
  4132. the focus reverts to the parent (or the closest viewable ancestor) 
  4133. and the new revert-to value is taken to be 
  4134. .PN None .
  4135. If revert-to is 
  4136. .PN PointerRoot 
  4137. or 
  4138. .PN None , 
  4139. the focus reverts to that value.
  4140. When the focus reverts, 
  4141. .PN FocusIn 
  4142. and 
  4143. .PN FocusOut 
  4144. events are generated, 
  4145. but the last-focus-change time is not affected.
  4146. .sp
  4147. .LP
  4148. .\" Start marker code here
  4149. .IN "GetInputFocus" "" "@DEF@"
  4150. .PN GetInputFocus
  4151. .LP
  4152.    =>
  4153. .in +.2i
  4154. .LP
  4155. focus: WINDOW or 
  4156. .PN PointerRoot 
  4157. or 
  4158. .PN None
  4159. .br
  4160. revert-to:
  4161. .Pn { Parent , 
  4162. .PN PointerRoot , 
  4163. .PN None }
  4164. .\" End marker code here
  4165. .in -.2i
  4166. .LP
  4167. This request returns the current focus state.
  4168. .sp
  4169. .LP
  4170. .\" Start marker code here
  4171. .IN "QueryKeymap" "" "@DEF@"
  4172. .PN QueryKeymap
  4173. .LP
  4174.    =>
  4175. .in +.2i
  4176. .LP
  4177. keys: LISTofCARD8
  4178. .\" End marker code here
  4179. .in -.2i
  4180. .LP
  4181. This request returns a bit vector for the logical state of the keyboard.
  4182. Each bit set to 1 indicates that the corresponding key is currently pressed.
  4183. The vector is represented as 32 bytes.
  4184. Byte N (from 0) contains the bits for keys 8N to 8N + 7
  4185. with the least-significant bit in the byte representing key 8N.
  4186. Note that the logical state of a device (as seen by means of the protocol)
  4187. may lag the physical state if device event processing is frozen.
  4188. .sp
  4189. .LP
  4190. .\" Start marker code here
  4191. .IN "OpenFont" "" "@DEF@"
  4192. .PN OpenFont
  4193. .in +.2i
  4194. .LP
  4195. \fIfid\fP\^: FONT
  4196. .br
  4197. \fIname\fP\^: STRING8
  4198. .LP
  4199. Errors: 
  4200. .PN Alloc ,
  4201. .PN IDChoice , 
  4202. .PN Name
  4203. .\" End marker code here
  4204. .in -.2i
  4205. .LP
  4206. This request loads the specified font, if necessary, 
  4207. and associates identifier fid with it.
  4208. The font name should use the ISO Latin-1 encoding, 
  4209. and uppercase and lowercase do not matter.
  4210. The interpretation of characters ``?'' (octal value 77) and ``*''
  4211. (octal value 52) in the name is not defined by the core protocol,
  4212. but is reserved for future definition.
  4213. A structured format for font names is specified in the
  4214. X Consortium standard \fIX Logical Font Description Conventions\fP.
  4215. .LP
  4216. Fonts are not associated with a particular screen 
  4217. and can be stored as a component of any graphics context.
  4218. .sp
  4219. .LP
  4220. .\" Start marker code here
  4221. .IN "CloseFont" "" "@DEF@"
  4222. .PN CloseFont
  4223. .in +.2i
  4224. .LP
  4225. \fIfont\fP\^: FONT
  4226. .LP
  4227. Errors: 
  4228. .PN Font
  4229. .\" End marker code here
  4230. .in -.2i
  4231. .LP
  4232. This request deletes the association between the resource ID and the font.
  4233. The font itself will be freed when no other resource references it.
  4234. .sp
  4235. .LP
  4236. .\" Start marker code here
  4237. .IN "QueryFont" "" "@DEF@"
  4238. .PN QueryFont
  4239. .in +.2i
  4240. .LP
  4241. \fIfont\fP\^: FONTABLE
  4242. .in -.2i
  4243. .LP
  4244.    =>
  4245. .in +.2i
  4246. .LP
  4247. font-info: FONTINFO
  4248. .br
  4249. char-infos: LISTofCHARINFO
  4250. .LP
  4251. where:
  4252. .IP
  4253. .TS
  4254. l lw(3i).
  4255. T{
  4256. FONTINFO:
  4257. T}    T{
  4258. [draw-direction: 
  4259. .Pn { LeftToRight , 
  4260. .PN RightToLeft }
  4261. T}
  4262.     \ min-char-or-byte2, max-char-or-byte2: CARD16
  4263.     \ min-byte1, max-byte1: CARD8
  4264.     \ all-chars-exist: BOOL
  4265.     \ default-char: CARD16
  4266.     \ min-bounds: CHARINFO
  4267.     \ max-bounds: CHARINFO
  4268.     \ font-ascent: INT16
  4269.     \ font-descent: INT16
  4270.     \ properties: LISTofFONTPROP]
  4271. FONTPROP:    [name: ATOM
  4272.     \ value: <32-bit-value>]
  4273. CHARINFO:    [left-side-bearing: INT16
  4274.     \ right-side-bearing: INT16
  4275.     \ character-width: INT16
  4276.     \ ascent: INT16
  4277.     \ descent: INT16
  4278.     \ attributes: CARD16]
  4279. .TE
  4280. .LP
  4281. Errors: 
  4282. .PN Font
  4283. .\" End marker code here
  4284. .in -.2i
  4285. .LP
  4286. This request returns logical information about a font.
  4287. If a gcontext is given for font,
  4288. the currently contained font is used.
  4289. .LP
  4290. The draw-direction is just a hint 
  4291. and indicates whether most char-infos have a positive, 
  4292. .PN LeftToRight ,
  4293. or a negative,
  4294. .PN RightToLeft ,
  4295. character-width metric.
  4296. The core protocol defines no support for vertical text.
  4297. .LP
  4298. If min-byte1 and max-byte1 are both zero, 
  4299. then min-char-or-byte2 specifies the linear character index corresponding 
  4300. to the first element of char-infos, 
  4301. and max-char-or-byte2 specifies the linear character index of the last element.
  4302. If either min-byte1 or max-byte1 are nonzero, 
  4303. then both min-char-or-byte2 and max-char-or-byte2 will be less than 256, 
  4304. and the 2-byte character index values corresponding to char-infos element N 
  4305. (counting from 0) are:
  4306. .DS
  4307. byte1 = N/D + min-byte1
  4308. byte2 = N\\\\D + min-char-or-byte2
  4309. .DE
  4310. .LP
  4311. where:
  4312. .DS
  4313. D = max-char-or-byte2 \- min-char-or-byte2 + 1
  4314. / = integer division
  4315. \\\\ = integer modulus
  4316. .DE
  4317. .LP
  4318. If char-infos has length zero, 
  4319. then min-bounds and max-bounds will be identical, 
  4320. and the effective char-infos is one filled with this char-info, of length:
  4321. .DS
  4322. L = D * (max-byte1 \- min-byte1 + 1)
  4323. .DE
  4324. .LP
  4325. That is, 
  4326. all glyphs in the specified linear or matrix range have the same information, 
  4327. as given by min-bounds (and max-bounds).
  4328. If all-chars-exist is 
  4329. .PN True , 
  4330. then all characters in char-infos have nonzero bounding boxes.
  4331. .LP
  4332. The default-char specifies the character that will be used when an
  4333. undefined or nonexistent character is used.
  4334. Note that default-char is a CARD16, not CHAR2B.
  4335. For a font using 2-byte matrix format, 
  4336. the default-char has byte1 in the most-significant byte
  4337. and byte2 in the least-significant byte.
  4338. If the default-char itself specifies an undefined or nonexistent character,
  4339. then no printing is performed for an undefined or nonexistent character.
  4340. .LP
  4341. The min-bounds and max-bounds contain the minimum and maximum values of
  4342. each individual CHARINFO component over all char-infos (ignoring
  4343. nonexistent characters).
  4344. The bounding box of the font (that is, the
  4345. smallest rectangle enclosing the shape obtained by superimposing all
  4346. characters at the same origin [x,y]) has its upper-left coordinate at:
  4347. .DS
  4348. [x + min-bounds.left-side-bearing, y \- max-bounds.ascent]
  4349. .DE
  4350. with a width of:
  4351. .DS
  4352. max-bounds.right-side-bearing \- min-bounds.left-side-bearing
  4353. .DE
  4354. .LP
  4355. and a height of:
  4356. .DS
  4357. max-bounds.ascent + max-bounds.descent
  4358. .DE
  4359. .LP
  4360. The font-ascent is the logical extent of the font above the baseline
  4361. and is used for determining line spacing.
  4362. Specific characters may extend beyond this.
  4363. The font-descent is the logical extent of the font at or below the baseline
  4364. and is used for determining line spacing.
  4365. Specific characters may extend beyond this.
  4366. If the baseline is at Y-coordinate y, 
  4367. then the logical extent of the font is inclusive 
  4368. between the Y-coordinate values (y \- font-ascent) and (y + font-descent \- 1).
  4369. .LP
  4370. A font is not guaranteed to have any properties.
  4371. The interpretation of the property value (for example, INT32, CARD32) 
  4372. must be derived from \fIa priori\fP knowledge of the property.
  4373. A basic set of font properties is specified in the X Consortium
  4374. standard \fIX Logical Font Description Conventions\fP.
  4375. .LP
  4376. For a character origin at [x,y], 
  4377. the bounding box of a character (that is,
  4378. the smallest rectangle enclosing the character's shape), described in
  4379. terms of CHARINFO components, is a rectangle with its upper-left corner at:
  4380. .DS
  4381. [x + left-side-bearing, y \- ascent]
  4382. .DE
  4383. .LP
  4384. with a width of:
  4385. .DS
  4386. right-side-bearing \- left-side-bearing
  4387. .DE
  4388. .LP
  4389. and a height of:
  4390. .DS
  4391. ascent + descent
  4392. .DE
  4393. .LP
  4394. and the origin for the next character is defined to be:
  4395. .DS
  4396. [x + character-width, y]
  4397. .DE
  4398. .LP
  4399. Note that the baseline is logically viewed as being just below
  4400. nondescending characters (when descent is zero, only pixels with
  4401. Y-coordinates less than y are drawn) and that the origin is logically
  4402. viewed as being coincident with the left edge of a nonkerned character
  4403. (when left-side-bearing is zero, no pixels with X-coordinate less than
  4404. x are drawn).
  4405. .LP
  4406. Note that CHARINFO metric values can be negative.
  4407. .LP
  4408. A nonexistent character is represented with all CHARINFO components
  4409. zero.
  4410. .LP
  4411. The interpretation of the per-character attributes field is
  4412. server-dependent.
  4413. .sp
  4414. .LP
  4415. .\" Start marker code here
  4416. .IN "QueryTextExtents" "" "@DEF@"
  4417. .PN QueryTextExtents
  4418. .in +.2i
  4419. .LP
  4420. \fIfont\fP\^: FONTABLE
  4421. .br
  4422. \fIstring\fP\^: STRING16
  4423. .in -.2i
  4424. .LP
  4425.    =>
  4426. .in +.2i
  4427. .LP
  4428. draw-direction:
  4429. .Pn { LeftToRight , 
  4430. .PN RightToLeft }
  4431. .br
  4432. font-ascent: INT16
  4433. .br
  4434. font-descent: INT16
  4435. .br
  4436. overall-ascent: INT16
  4437. .br
  4438. overall-descent: INT16
  4439. .br
  4440. overall-width: INT32
  4441. .br
  4442. overall-left: INT32
  4443. .br
  4444. overall-right: INT32
  4445. .LP
  4446. Errors: 
  4447. .PN Font
  4448. .\" End marker code here
  4449. .in -.2i
  4450. .LP
  4451. This request returns the logical extents of the specified string of characters 
  4452. in the specified font.
  4453. If a gcontext is given for font, 
  4454. the currently contained font is used.
  4455. The draw-direction, font-ascent, and font-descent are the same as
  4456. described in 
  4457. .PN QueryFont .
  4458. The overall-ascent is the maximum of the ascent metrics of all characters 
  4459. in the string, and the overall-descent is the maximum of the descent metrics.
  4460. The overall-width is the sum of the character-width metrics of all characters 
  4461. in the string.
  4462. For each character in the string, 
  4463. let W be the sum of the character-width metrics of all characters preceding it 
  4464. in the string, 
  4465. let L be the left-side-bearing metric of the character plus W, 
  4466. and let R be the right-side-bearing metric of the character plus W.
  4467. The overall-left is the minimum L of all characters in the string, 
  4468. and the overall-right is the maximum R.
  4469. .LP
  4470. For fonts defined with linear indexing rather than 2-byte matrix indexing, 
  4471. the server will interpret each CHAR2B as a 16-bit number that
  4472. has been transmitted most-significant byte first (that is, byte1 of the
  4473. CHAR2B is taken as the most-significant byte).
  4474. .LP
  4475. Characters with all zero metrics are ignored.
  4476. If the font has no defined default-char, 
  4477. then undefined characters in the string are also ignored.
  4478. .sp
  4479. .LP
  4480. .\" Start marker code here
  4481. .IN "ListFonts" "" "@DEF@"
  4482. .PN ListFonts
  4483. .in +.2i
  4484. .LP
  4485. \fIpattern\fP\^: STRING8
  4486. .br
  4487. \fImax-names\fP\^: CARD16
  4488. .in -.2i
  4489. .LP
  4490.    =>
  4491. .in +.2i
  4492. .LP
  4493. names: LISTofSTRING8
  4494. .\" End marker code here
  4495. .in -.2i
  4496. .LP
  4497. This request returns a list
  4498. of available font names (as controlled by the font search path; see
  4499. .PN SetFontPath 
  4500. request)
  4501. that match the pattern.
  4502. At most, max-names names will be returned.
  4503. The pattern should use the ISO Latin-1 encoding, 
  4504. and uppercase and lowercase do not matter.
  4505. In the pattern, 
  4506. the ``?'' character (octal value 77) will match any single character, 
  4507. and the ``*'' character (octal value 52) will match any number 
  4508. of characters.
  4509. The returned names are in lowercase.
  4510. .sp
  4511. .LP
  4512. .\" Start marker code here
  4513. .IN "ListFontsWithInfo" "" "@DEF@"
  4514. .PN ListFontsWithInfo
  4515. .in +.2i
  4516. .LP
  4517. \fIpattern\fP\^: STRING8
  4518. .br
  4519. \fImax-names\fP\^: CARD16
  4520. .in -.2i
  4521. .LP
  4522.    =>+
  4523. .in +.2i
  4524. .LP
  4525. name: STRING8
  4526. .br
  4527. info: FONTINFO
  4528. .br
  4529. replies-hint: CARD32
  4530. .LP
  4531. where:
  4532. .LP
  4533. FONTINFO: <same type definition as in 
  4534. .PN QueryFont >
  4535. .\" End marker code here
  4536. .in -.2i
  4537. .LP
  4538. This request is similar to
  4539. .PN ListFonts, 
  4540. but it also returns information about each font.
  4541. The information returned for each font is identical to what 
  4542. .PN QueryFont 
  4543. would return except that the per-character metrics are not returned.
  4544. Note that this request can generate multiple replies.
  4545. With each reply,
  4546. replies-hint may provide an indication of how many more fonts will be returned.
  4547. This number is a hint only and may be larger or smaller than
  4548. the number of fonts actually returned.
  4549. A zero value does not guarantee that no more fonts will be returned.
  4550. After the font replies, 
  4551. a reply with a zero-length name is sent to indicate the end of the reply
  4552. sequence.
  4553. .sp
  4554. .LP
  4555. .\" Start marker code here
  4556. .IN "SetFontPath" "" "@DEF@"
  4557. .PN SetFontPath
  4558. .in +.2i
  4559. .LP
  4560. \fIpath\fP\^: LISTofSTRING8
  4561. .LP
  4562. Errors: 
  4563. .PN Value
  4564. .\" End marker code here
  4565. .in -.2i
  4566. .LP
  4567. This request defines the search path for font lookup.
  4568. There is only one search path per server, not one per client.
  4569. The interpretation of the strings is operating-system-dependent, 
  4570. but the strings are intended to specify directories to be searched in the 
  4571. order listed.
  4572. .LP
  4573. Setting the path to the empty list restores the default path defined
  4574. for the server.
  4575. .LP
  4576. As a side effect of executing this request,
  4577. the server is guaranteed to flush all cached information about fonts 
  4578. for which there currently are no explicit resource IDs allocated.
  4579. .LP
  4580. The meaning of an error from this request is system specific.
  4581. .sp
  4582. .LP
  4583. .\" Start marker code here
  4584. .IN "GetFontPath" "" "@DEF@"
  4585. .PN GetFontPath
  4586. .LP
  4587.    =>
  4588. .in +.2i
  4589. .LP
  4590. path: LISTofSTRING8
  4591. .\" End marker code here
  4592. .in -.2i
  4593. .LP
  4594. This request returns the current search path for fonts.
  4595. .sp
  4596. .LP
  4597. .\" Start marker code here
  4598. .IN "CreatePixmap" "" "@DEF@"
  4599. .PN CreatePixmap
  4600. .in +.2i
  4601. .LP
  4602. \fIpid\fP\^: PIXMAP
  4603. .br
  4604. \fIdrawable\fP\^: DRAWABLE
  4605. .br
  4606. \fIdepth\fP\^: CARD8
  4607. .br
  4608. \fIwidth\fP, \fIheight\fP\^: CARD16
  4609. .LP
  4610. Errors: 
  4611. .PN Alloc ,
  4612. .PN Drawable , 
  4613. .PN IDChoice , 
  4614. .PN Value
  4615. .\" End marker code here
  4616. .in -.2i
  4617. .LP
  4618. This request creates a pixmap and assigns the identifier pid to it.
  4619. The width and height must be nonzero (or a 
  4620. .PN Value 
  4621. error results).
  4622. The depth must be one of the depths supported by the root of the specified 
  4623. drawable (or a 
  4624. .PN Value
  4625. error results).
  4626. The initial contents of the pixmap are undefined.
  4627. .LP
  4628. It is legal to pass an 
  4629. .PN InputOnly 
  4630. window as a drawable to this request.
  4631. .sp
  4632. .LP
  4633. .\" Start marker code here
  4634. .IN "FreePixmap" "" "@DEF@"
  4635. .PN FreePixmap
  4636. .in +.2i
  4637. .LP
  4638. \fIpixmap\fP\^: PIXMAP
  4639. .LP
  4640. Errors: 
  4641. .PN Pixmap
  4642. .\" End marker code here
  4643. .in -.2i
  4644. .LP
  4645. This request deletes the association between the resource ID and the pixmap.
  4646. The pixmap storage will be freed when no other resource references it.
  4647. .sp
  4648. .LP
  4649. .\" Start marker code here
  4650. .IN "CreateGC" "" "@DEF@"
  4651. .PN CreateGC
  4652. .in +.2i
  4653. .LP
  4654. \fIcid\fP\^: GCONTEXT
  4655. .br
  4656. \fIdrawable\fP\^: DRAWABLE
  4657. .br
  4658. \fIvalue-mask\fP\^: BITMASK
  4659. .br
  4660. \fIvalue-list\fP\^: LISTofVALUE
  4661. .LP
  4662. Errors: 
  4663. .PN Alloc ,
  4664. .PN Drawable , 
  4665. .PN Font , 
  4666. .PN IDChoice , 
  4667. .PN Match , 
  4668. .PN Pixmap , 
  4669. .PN Value
  4670. .\" End marker code here
  4671. .in -.2i
  4672. .LP
  4673. This request creates a graphics context 
  4674. and assigns the identifier cid to it.
  4675. The gcontext can be used with any destination drawable having the same root
  4676. and depth as the specified drawable; 
  4677. use with other drawables results in a 
  4678. .PN Match 
  4679. error.
  4680. .LP
  4681. The value-mask and value-list specify which components are to be
  4682. explicitly initialized.
  4683. The context components are:
  4684. .TS H
  4685. lw(1.5i) lw(4.25i).
  4686. _
  4687. .sp 6p
  4688. .B
  4689. Component    Type
  4690. .sp 6p
  4691. _
  4692. .TH
  4693. .R
  4694. .sp 6p
  4695. T{
  4696. function
  4697. T}    T{
  4698. .Pn { Clear , 
  4699. .PN And , 
  4700. .PN AndReverse , 
  4701. .PN Copy , 
  4702. .PN AndInverted , 
  4703. .PN NoOp ,
  4704. .PN Xor , 
  4705. .br
  4706. .PN Or , 
  4707. .PN Nor , 
  4708. .PN Equiv , 
  4709. .PN Invert , 
  4710. .PN OrReverse ,
  4711. .PN CopyInverted , 
  4712. .br
  4713. .PN OrInverted , 
  4714. .PN Nand , 
  4715. .PN Set }
  4716. T}
  4717. T{
  4718. plane-mask
  4719. T}    T{
  4720. CARD32
  4721. T}
  4722. T{
  4723. foreground
  4724. T}    T{
  4725. CARD32
  4726. T}
  4727. T{
  4728. background
  4729. T}    T{
  4730. CARD32
  4731. T}
  4732. T{
  4733. line-width
  4734. T}    T{
  4735. CARD16
  4736. T}
  4737. T{
  4738. line-style
  4739. T}    T{
  4740. .Pn { Solid , 
  4741. .PN OnOffDash , 
  4742. .PN DoubleDash }
  4743. T}
  4744. T{
  4745. cap-style
  4746. T}    T{
  4747. .Pn { NotLast , 
  4748. .PN Butt , 
  4749. .PN Round , 
  4750. .PN Projecting }
  4751. T}
  4752. T{
  4753. join-style
  4754. T}    T{
  4755. .Pn { Miter , 
  4756. .PN Round , 
  4757. .PN Bevel }
  4758. T}
  4759. T{
  4760. fill-style
  4761. T}    T{
  4762. .Pn { Solid , 
  4763. .PN Tiled , 
  4764. .PN OpaqueStippled , 
  4765. .PN Stippled }
  4766. T}
  4767. T{
  4768. fill-rule
  4769. T}    T{
  4770. .Pn { EvenOdd , 
  4771. .PN Winding }
  4772. T}
  4773. T{
  4774. arc-mode
  4775. T}    T{
  4776. .Pn { Chord , 
  4777. .PN PieSlice }
  4778. T}
  4779. T{
  4780. tile
  4781. T}    T{
  4782. PIXMAP
  4783. T}
  4784. T{
  4785. stipple
  4786. T}    T{
  4787. PIXMAP
  4788. T}
  4789. T{
  4790. tile-stipple-x-origin
  4791. T}    T{
  4792. INT16
  4793. T}
  4794. T{
  4795. tile-stipple-y-origin
  4796. T}    T{
  4797. INT16
  4798. T}
  4799. T{
  4800. font
  4801. T}    T{
  4802. FONT
  4803. T}
  4804. T{
  4805. subwindow-mode
  4806. T}    T{
  4807. .Pn { ClipByChildren , 
  4808. .PN IncludeInferiors }
  4809. T}
  4810. T{
  4811. graphics-exposures
  4812. T}    T{
  4813. BOOL
  4814. T}
  4815. T{
  4816. clip-x-origin
  4817. T}    T{
  4818. INT16
  4819. T}
  4820. T{
  4821. clip-y-origin
  4822. T}    T{
  4823. INT16
  4824. T}
  4825. T{
  4826. clip-mask
  4827. T}    T{
  4828. PIXMAP or 
  4829. .PN None
  4830. T}
  4831. T{
  4832. dash-offset
  4833. T}    T{
  4834. CARD16
  4835. T}
  4836. T{
  4837. dashes
  4838. T}    T{
  4839. CARD8
  4840. T}
  4841. .sp 6p
  4842. _
  4843. .TE
  4844. .LP
  4845. In graphics operations, 
  4846. given a source and destination pixel, 
  4847. the result is computed bitwise on corresponding bits of the pixels;
  4848. that is, a Boolean operation is performed in each bit plane.
  4849. The plane-mask restricts the operation to a subset of planes,
  4850. so the result is:
  4851. .LP
  4852. .DS
  4853. ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask))
  4854. .DE
  4855. .LP
  4856. Range checking is not performed on the values for foreground, background, 
  4857. or plane-mask.
  4858. They are simply truncated to the appropriate number of bits.
  4859. .LP
  4860. The meanings of the functions are:
  4861. .TS
  4862. lw(1.5i) lw(2i).
  4863. _
  4864. .sp 6p
  4865. .B
  4866. Function    Operation
  4867. .sp 6p
  4868. _
  4869. .R
  4870. .sp 6p
  4871. T{
  4872. .PN Clear
  4873. T}    T{
  4874. 0
  4875. T}
  4876. T{
  4877. .PN And
  4878. T}    T{
  4879. src AND dst
  4880. T}
  4881. T{
  4882. .PN AndReverse
  4883. T}    T{
  4884. src AND (NOT dst)
  4885. T}
  4886. T{
  4887. .PN Copy
  4888. T}    T{
  4889. src
  4890. T}
  4891. T{
  4892. .PN AndInverted
  4893. T}    T{
  4894. (NOT src) AND dst
  4895. T}
  4896. T{
  4897. .PN NoOp
  4898. T}    T{
  4899. dst
  4900. T}
  4901. T{
  4902. .PN Xor
  4903. T}    T{
  4904. src XOR dst
  4905. T}
  4906. T{
  4907. .PN Or
  4908. T}    T{
  4909. src OR dst
  4910. T}
  4911. T{
  4912. .PN Nor
  4913. T}    T{
  4914. (NOT src) AND (NOT dst)
  4915. T}
  4916. T{
  4917. .PN Equiv
  4918. T}    T{
  4919. (NOT src) XOR dst
  4920. T}
  4921. T{
  4922. .PN Invert
  4923. T}    T{
  4924. NOT dst
  4925. T}
  4926. T{
  4927. .PN OrReverse
  4928. T}    T{
  4929. src OR (NOT dst)
  4930. T}
  4931. T{
  4932. .PN CopyInverted
  4933. T}    T{
  4934. NOT src
  4935. T}
  4936. T{
  4937. .PN OrInverted
  4938. T}    T{
  4939. (NOT src) OR dst
  4940. T}
  4941. T{
  4942. .PN Nand
  4943. T}    T{
  4944. (NOT src) OR (NOT dst)
  4945. T}
  4946. T{
  4947. .PN Set
  4948. T}    T{
  4949. 1
  4950. T}
  4951. .sp 6p
  4952. _
  4953. .TE
  4954. .LP
  4955. The line-width is measured in pixels and can be greater than or equal to
  4956. one, a wide line, or the special value zero, a thin line.
  4957. .LP
  4958. Wide lines are drawn centered on the path described by the graphics request.
  4959. Unless otherwise specified by the join or cap style, 
  4960. the bounding box of a wide line with endpoints [x1, y1], [x2, y2] and
  4961. width w is a rectangle with vertices at the following real coordinates:
  4962. .DS
  4963. [x1\-(w*sn/2), y1+(w*cs/2)], [x1+(w*sn/2), y1\-(w*cs/2)],
  4964. [x2\-(w*sn/2), y2+(w*cs/2)], [x2+(w*sn/2), y2\-(w*cs/2)]
  4965. .DE
  4966. .LP
  4967. The sn is the sine of the angle of the line and cs is the cosine of
  4968. the angle of the line.
  4969. A pixel is part of the line (and hence drawn) if the center of the pixel 
  4970. is fully inside the bounding box, which is viewed as having infinitely thin 
  4971. edges.
  4972. If the center of the pixel is exactly on the bounding box, 
  4973. it is part of the line if and only if the interior is immediately to its right 
  4974. (x increasing direction).
  4975. Pixels with centers on a horizontal edge are a special case and are part of
  4976. the line if and only if the interior or the boundary is immediately below 
  4977. (y increasing direction) and if the interior or the boundary is immediately
  4978. to the right (x increasing direction).
  4979. Note that this description is a mathematical model describing the pixels 
  4980. that are drawn for a wide line and does not imply that trigonometry is required
  4981. to implement such a model.
  4982. Real or fixed point arithmetic is recommended for computing the corners of the 
  4983. line endpoints for lines greater than one pixel in width.
  4984. .LP
  4985. Thin lines (zero line-width) are ``one pixel wide'' lines drawn using an
  4986. unspecified, device-dependent algorithm.
  4987. There are only two constraints on this algorithm.
  4988. First, if a line is drawn unclipped from [x1,y1] to [x2,y2] 
  4989. and another line is drawn unclipped from [x1+dx,y1+dy] to [x2+dx,y2+dy], 
  4990. then a point [x,y] is touched by drawing the first line if 
  4991. and only if the point [x+dx,y+dy] is touched by drawing the second line.
  4992. Second, the effective set of points comprising a line cannot be affected 
  4993. by clipping.
  4994. Thus, a point is touched in a clipped line if and only if the point lies 
  4995. inside the clipping region and the point would be touched by the line 
  4996. when drawn unclipped.
  4997. .LP
  4998. Note that a wide line drawn from [x1,y1] to [x2,y2] always draws the
  4999. same pixels as a wide line drawn from [x2,y2] to [x1,y1], not counting
  5000. cap-style and join-style.
  5001. Implementors are encouraged to make this property true for thin lines, 
  5002. but it is not required.
  5003. A line-width of zero may differ from a line-width of one in which pixels 
  5004. are drawn.
  5005. In general, 
  5006. drawing a thin line will be faster than drawing a wide line of width one, 
  5007. but thin lines may not mix well aesthetically with wide lines 
  5008. because of the different drawing algorithms.
  5009. If it is desirable to obtain precise and uniform results across all displays,
  5010. a client should always use a line-width of one, rather than a line-width of
  5011. zero.
  5012. .LP
  5013. The line-style defines which sections of a line are drawn:
  5014. .TS
  5015. lw(1i) lw(4.75i).
  5016. T{
  5017. .PN Solid
  5018. T}    T{
  5019. The full path of the line is drawn.
  5020. T}
  5021. .sp 6p
  5022. T{
  5023. .PN DoubleDash
  5024. T}    T{
  5025. The full path of the line is drawn, 
  5026. but the even dashes are filled differently than the odd dashes 
  5027. (see fill-style), with Butt cap-style used where even and odd dashes meet.
  5028. T}
  5029. .sp 6p
  5030. T{
  5031. .PN OnOffDash
  5032. T}    T{
  5033. Only the even dashes are drawn, 
  5034. and cap-style applies to all internal ends of the individual dashes 
  5035. (except
  5036. .PN NotLast 
  5037. is treated as 
  5038. .PN Butt ).
  5039. T}
  5040. .TE
  5041. .LP
  5042. The cap-style defines how the endpoints of a path are drawn:
  5043. .TS
  5044. lw(1i) lw(4.75i).
  5045. T{
  5046. .PN NotLast
  5047. T}    T{
  5048. The result is equivalent to 
  5049. .PN Butt , 
  5050. except that for a line-width of zero the final endpoint is not drawn.
  5051. T}
  5052. .sp 6p
  5053. T{
  5054. .PN Butt
  5055. T}    T{
  5056. The result is square at the endpoint (perpendicular to the slope of the
  5057. line) with no projection beyond.
  5058. T}
  5059. .sp 6p
  5060. T{
  5061. .PN Round
  5062. T}    T{
  5063. The result is a circular arc with its diameter equal to the line-width,
  5064. centered on the endpoint; it is equivalent to 
  5065. .PN Butt 
  5066. for line-width zero.
  5067. T}
  5068. .sp 6p
  5069. T{
  5070. .PN Projecting
  5071. T}    T{
  5072. The result is square at the end, but the path continues beyond the
  5073. endpoint for a distance equal to half the line-width;
  5074. it is equivalent to 
  5075. .PN Butt 
  5076. for line-width zero.
  5077. T}
  5078. .TE
  5079. .LP
  5080. The join-style defines how corners are drawn for wide lines:
  5081. .TS
  5082. lw(1i) lw(4.75i).
  5083. T{
  5084. .PN Miter
  5085. T}    T{
  5086. The outer edges of the two lines extend to meet at an angle.
  5087. However, if the angle is less than 11 degrees, a
  5088. .PN Bevel
  5089. join-style is used instead.
  5090. T}
  5091. .sp 6p
  5092. T{
  5093. .PN Round
  5094. T}    T{
  5095. The result is a circular arc with a diameter equal to the line-width,
  5096. centered on the joinpoint.
  5097. T}
  5098. .sp 6p
  5099. T{
  5100. .PN Bevel
  5101. T}    T{
  5102. The result is
  5103. .PN Butt 
  5104. endpoint styles, and then the triangular ``notch'' is filled.
  5105. T}
  5106. .TE
  5107. .LP
  5108. For a line with coincident endpoints (x1=x2, y1=y2), when the cap-style
  5109. is applied to both endpoints, the semantics depends on the line-width
  5110. and the cap-style:
  5111. .TS
  5112. lw(1i) lw(.5i) lw(4.25i).
  5113. T{
  5114. .PN NotLast
  5115. T}    T{
  5116. thin 
  5117. T}    T{
  5118. This is device-dependent, but the desired effect is that nothing is drawn.
  5119. T}
  5120. .sp 6p
  5121. T{
  5122. .PN Butt
  5123. T}    T{
  5124. thin
  5125. T}    T{
  5126. This is device-dependent, but the desired effect is that a single pixel is drawn.
  5127. T}
  5128. .sp 6p
  5129. T{
  5130. .PN Round
  5131. T}    T{
  5132. thin
  5133. T}    T{
  5134. This is the same as 
  5135. .PN Butt /thin.
  5136. T}
  5137. .sp 6p
  5138. T{
  5139. .PN Projecting
  5140. T}    T{
  5141. thin
  5142. T}    T{
  5143. This is the same as 
  5144. .PN Butt /thin.
  5145. T}
  5146. .sp 6p
  5147. T{
  5148. .PN Butt
  5149. T}    T{
  5150. wide
  5151. T}    T{
  5152. Nothing is drawn.
  5153. T}
  5154. .sp 6p
  5155. T{
  5156. .PN Round
  5157. T}    T{
  5158. wide
  5159. T}    T{
  5160. The closed path is a circle, centered at the endpoint and
  5161. with a diameter equal to the line-width.
  5162. T}
  5163. .sp 6p
  5164. T{
  5165. .PN Projecting
  5166. T}    T{
  5167. wide
  5168. T}    T{
  5169. The closed path is a square, aligned with the coordinate axes, 
  5170. centered at the endpoint and with sides equal to the line-width.
  5171. T}
  5172. .TE
  5173. .LP
  5174. For a line with coincident endpoints (x1=x2, y1=y2), 
  5175. when the join-style is applied at one or both endpoints, 
  5176. the effect is as if the line was removed from the overall path.
  5177. However, if the total path consists of (or is reduced to) a single point 
  5178. joined with itself, 
  5179. the effect is the same as when the cap-style is applied at both endpoints.
  5180. .LP
  5181. The tile/stipple represents an infinite 2D plane, with the tile/stipple
  5182. replicated in all dimensions.  When that plane is superimposed on
  5183. the drawable for use in a graphics operation, the upper left corner
  5184. of some instance of the tile/stipple is at the coordinates within
  5185. the drawable specified by the tile/stipple origin.
  5186. The tile/stipple and clip origins are interpreted relative to the
  5187. origin of whatever destination drawable is specified in a graphics
  5188. request.
  5189. .LP
  5190. The tile pixmap must have the same root and depth as the gcontext (or a 
  5191. .PN Match 
  5192. error results).
  5193. The stipple pixmap must have depth one and must have the same root 
  5194. as the gcontext (or a 
  5195. .PN Match 
  5196. error results).
  5197. For fill-style 
  5198. .PN Stippled 
  5199. (but not fill-style 
  5200. .PN OpaqueStippled ), 
  5201. the stipple pattern is tiled in a single plane 
  5202. and acts as an additional clip mask to be ANDed with the clip-mask.
  5203. Any size pixmap can be used for tiling or stippling, 
  5204. although some sizes may be faster to use than others.
  5205. .LP
  5206. The fill-style defines the contents of the source for line, text, and
  5207. fill requests.
  5208. For all text and fill requests (for example,
  5209. .PN PolyText8 , 
  5210. .PN PolyText16 ,
  5211. .PN PolyFillRectangle , 
  5212. .PN FillPoly , 
  5213. and
  5214. .PN PolyFillArc )
  5215. as well as for line requests with line-style 
  5216. .PN Solid ,
  5217. (for example,
  5218. .PN PolyLine ,
  5219. .PN PolySegment , 
  5220. .PN PolyRectangle , 
  5221. .PN PolyArc )
  5222. and for the even dashes for line requests with line-style 
  5223. .PN OnOffDash 
  5224. or 
  5225. .PN DoubleDash :
  5226. .TS
  5227. lw(1.25i) lw(4.5i).
  5228. T{
  5229. .PN Solid
  5230. T}    T{
  5231. Foreground
  5232. T}
  5233. .sp 6p
  5234. T{
  5235. .PN Tiled
  5236. T}    T{
  5237. Tile
  5238. T}
  5239. .sp 6p
  5240. T{
  5241. .PN OpaqueStippled
  5242. T}    T{
  5243. A tile with the same width and height as stipple
  5244. but with background everywhere stipple has a zero
  5245. and with foreground everywhere stipple has a one
  5246. T}
  5247. .sp 6p
  5248. T{
  5249. .PN Stippled
  5250. T}    T{
  5251. Foreground masked by stipple
  5252. T}
  5253. .TE
  5254. .LP
  5255. For the odd dashes for line requests with line-style 
  5256. .PN DoubleDash :
  5257. .TS
  5258. lw(1.25i) lw(4.5i).
  5259. T{
  5260. .PN Solid
  5261. T}    T{
  5262. Background
  5263. T}
  5264. .sp 6p
  5265. T{
  5266. .PN Tiled
  5267. T}    T{
  5268. Same as for even dashes
  5269. T}
  5270. .sp 6p
  5271. T{
  5272. .PN OpaqueStippled
  5273. T}    T{
  5274. Same as for even dashes
  5275. T}
  5276. .sp 6p
  5277. T{
  5278. .PN Stippled
  5279. T}    T{
  5280. Background masked by stipple
  5281. T}
  5282. .TE
  5283. .LP
  5284. The dashes value allowed here is actually a simplified form of the more
  5285. general patterns that can be set with 
  5286. .PN SetDashes .
  5287. Specifying a value of N here is equivalent to specifying 
  5288. the two element list [N, N] in
  5289. .PN SetDashes .
  5290. The value must be nonzero (or a 
  5291. .PN Value 
  5292. error results).
  5293. The meaning of dash-offset and dashes are explained in the 
  5294. .PN SetDashes
  5295. request.
  5296. .LP
  5297. The clip-mask restricts writes to the destination drawable.
  5298. Only pixels where the clip-mask has bits set to 1 are drawn. 
  5299. Pixels are not drawn outside the area covered by the clip-mask 
  5300. or where the clip-mask has bits set to 0.
  5301. The clip-mask affects all graphics requests, 
  5302. but it does not clip sources.
  5303. The clip-mask origin is interpreted relative to the origin of whatever 
  5304. destination drawable is specified in a graphics request.
  5305. If a pixmap is specified as the clip-mask,
  5306. it must have depth 1 and have the same root as the gcontext (or a 
  5307. .PN Match 
  5308. error results).
  5309. If clip-mask is 
  5310. .PN None , 
  5311. then pixels are always drawn, regardless of the clip origin.
  5312. The clip-mask can also be set with the 
  5313. .PN SetClipRectangles
  5314. request.
  5315. .LP
  5316. For 
  5317. .PN ClipByChildren , 
  5318. both source and destination windows are additionally clipped by all viewable 
  5319. .PN InputOutput 
  5320. children.
  5321. For
  5322. .PN IncludeInferiors , 
  5323. neither source nor destination window is clipped by inferiors.
  5324. This will result in including subwindow contents in the
  5325. source and drawing through subwindow boundaries of the destination.
  5326. The use of 
  5327. .PN IncludeInferiors 
  5328. with a source or destination window of one depth with mapped inferiors 
  5329. of differing depth is not illegal, 
  5330. but the semantics is undefined by the core protocol.
  5331. .LP
  5332. The fill-rule defines what pixels are inside (that is, are drawn) for
  5333. paths given in 
  5334. .PN FillPoly 
  5335. requests.
  5336. .PN EvenOdd 
  5337. means a point is inside if an infinite ray with the point as origin crosses 
  5338. the path an odd number of times.
  5339. For 
  5340. .PN Winding , 
  5341. a point is inside if an infinite ray with the point as origin crosses an 
  5342. unequal number of clockwise and counterclockwise directed path segments.
  5343. A clockwise directed path segment is one that crosses the ray from left 
  5344. to right as observed from the point.
  5345. A counter-clockwise segment is one that crosses the ray from right to left 
  5346. as observed from the point.
  5347. The case where a directed line segment is coincident with the ray is 
  5348. uninteresting because one can simply choose a different ray that is not 
  5349. coincident with a segment.
  5350. .LP
  5351. For both fill rules, 
  5352. a point is infinitely small and the path is an infinitely thin line.
  5353. A pixel is inside if the center point of the pixel is inside 
  5354. and the center point is not on the boundary.
  5355. If the center point is on the boundary, 
  5356. the pixel is inside if and only if the polygon interior is immediately 
  5357. to its right (x increasing direction).
  5358. Pixels with centers along a horizontal edge are a special case 
  5359. and are inside if and only if the polygon interior is immediately below 
  5360. (y increasing direction).
  5361. .LP
  5362. The arc-mode controls filling in the 
  5363. .PN PolyFillArc 
  5364. request.
  5365. .LP
  5366. The graphics-exposures flag controls 
  5367. .PN GraphicsExposure 
  5368. event generation for 
  5369. .PN CopyArea 
  5370. and 
  5371. .PN CopyPlane 
  5372. requests (and any similar requests defined by extensions).
  5373. .LP
  5374. The default component values are:
  5375. .TS H
  5376. l lw(4i).
  5377. _
  5378. .sp 6p
  5379. .B
  5380. Component    Default
  5381. .sp 6p
  5382. _
  5383. .TH
  5384. .R
  5385. .sp 6p
  5386. T{
  5387. function
  5388. T}    T{
  5389. .PN Copy
  5390. T}
  5391. T{
  5392. plane-mask
  5393. T}    T{
  5394. all ones
  5395. T}
  5396. T{
  5397. foreground
  5398. T}    T{
  5399. 0
  5400. T}
  5401. T{
  5402. background
  5403. T}    T{
  5404. 1
  5405. T}
  5406. T{
  5407. line-width
  5408. T}    T{
  5409. 0
  5410. T}
  5411. T{
  5412. line-style
  5413. T}    T{
  5414. .PN Solid
  5415. T}
  5416. T{
  5417. cap-style
  5418. T}    T{
  5419. .PN Butt
  5420. T}
  5421. T{
  5422. join-style
  5423. T}    T{
  5424. .PN Miter
  5425. T}
  5426. T{
  5427. fill-style
  5428. T}    T{
  5429. .PN Solid
  5430. T}
  5431. T{
  5432. fill-rule
  5433. T}    T{
  5434. .PN EvenOdd
  5435. T}
  5436. T{
  5437. arc-mode
  5438. T}    T{
  5439. .PN PieSlice
  5440. T}
  5441. T{
  5442. tile
  5443. T}    T{
  5444. Pixmap of unspecified size filled with foreground pixel
  5445. .br
  5446. (that is, client specified pixel if any, else 0)
  5447. .br
  5448. (subsequent changes to foreground do not affect this pixmap)
  5449. T}
  5450. T{
  5451. stipple
  5452. T}    T{
  5453. Pixmap of unspecified size filled with ones
  5454. T}
  5455. T{
  5456. tile-stipple-x-origin
  5457. T}    T{
  5458. 0
  5459. T}
  5460. T{
  5461. tile-stipple-y-origin
  5462. T}    T{
  5463. 0
  5464. T}
  5465. T{
  5466. font
  5467. T}    T{
  5468. <server-dependent-font>
  5469. T}
  5470. T{
  5471. subwindow-mode
  5472. T}    T{
  5473. .PN ClipByChildren
  5474. T}
  5475. T{
  5476. graphics-exposures
  5477. T}    T{
  5478. .PN True
  5479. T}
  5480. T{
  5481. clip-x-origin
  5482. T}    T{
  5483. 0
  5484. T}
  5485. T{
  5486. clip-y-origin
  5487. T}    T{
  5488. 0
  5489. T}
  5490. T{
  5491. clip-mask
  5492. T}    T{
  5493. .PN None
  5494. T}
  5495. T{
  5496. dash-offset
  5497. T}    T{
  5498. 0
  5499. T}
  5500. T{
  5501. dashes
  5502. T}    T{
  5503. 4 (that is, the list [4, 4])
  5504. T}
  5505. .sp 6p
  5506. _
  5507. .TE
  5508. .LP
  5509. Storing a pixmap in a gcontext might or might not result in a copy
  5510. being made.
  5511. If the pixmap is later used as the destination for a graphics request,
  5512. the change might or might not be reflected in the gcontext.
  5513. If the pixmap is used simultaneously in a graphics request 
  5514. as both a destination and as a tile or stipple, 
  5515. the results are not defined.
  5516. .LP
  5517. It is quite likely that some amount of gcontext information will be
  5518. cached in display hardware and that such hardware can only cache a
  5519. small number of gcontexts.
  5520. Given the number and complexity of components, 
  5521. clients should view switching between gcontexts with nearly
  5522. identical state as significantly more expensive than making minor
  5523. changes to a single gcontext.
  5524. .sp
  5525. .LP
  5526. .\" Start marker code here
  5527. .IN "ChangeGC" "" "@DEF@"
  5528. .PN ChangeGC
  5529. .in +.2i
  5530. .LP
  5531. \fIgc\fP\^: GCONTEXT
  5532. .br
  5533. \fIvalue-mask\fP\^: BITMASK
  5534. .br
  5535. \fIvalue-list\fP\^: LISTofVALUE
  5536. .LP
  5537. Errors: 
  5538. .PN Alloc ,
  5539. .PN Font , 
  5540. .PN GContext , 
  5541. .PN Match , 
  5542. .PN Pixmap , 
  5543. .PN Value
  5544. .\" End marker code here
  5545. .in -.2i
  5546. .LP
  5547. This request changes components in gc.
  5548. The value-mask and value-list specify which components are to be changed.
  5549. The values and restrictions are the same
  5550. as for 
  5551. .PN CreateGC .
  5552. .LP
  5553. Changing the clip-mask also overrides any previous 
  5554. .PN SetClipRectangles
  5555. request on the context.
  5556. Changing dash-offset or dashes overrides any previous 
  5557. .PN SetDashes 
  5558. request on the context.
  5559. .LP
  5560. The order in which components are verified and altered is server-dependent.
  5561. If an error is generated,
  5562. a subset of the components may have been altered.
  5563. .sp
  5564. .LP
  5565. .\" Start marker code here
  5566. .IN "CopyGC" "" "@DEF@"
  5567. .PN CopyGC
  5568. .in +.2i
  5569. .LP
  5570. \fIsrc-gc\fP, \fIdst-gc\fP\^: GCONTEXT
  5571. .br
  5572. \fIvalue-mask\fP\^: BITMASK
  5573. .LP
  5574. Errors: 
  5575. .PN Alloc ,
  5576. .PN GContext , 
  5577. .PN Match , 
  5578. .PN Value
  5579. .\" End marker code here
  5580. .in -.2i
  5581. .LP
  5582. This request copies components from src-gc to dst-gc.
  5583. The value-mask specifies which components to copy, as for 
  5584. .PN CreateGC .
  5585. The two gcontexts must have the same root and the same depth (or a 
  5586. .PN Match 
  5587. error results).
  5588. .sp
  5589. .LP
  5590. .\" Start marker code here
  5591. .IN "SetDashes" "" "@DEF@"
  5592. .PN SetDashes
  5593. .in +.2i
  5594. .LP
  5595. \fIgc\fP\^: GCONTEXT
  5596. .br
  5597. \fIdash-offset\fP\^: CARD16
  5598. .br
  5599. \fIdashes\fP\^: LISTofCARD8
  5600. .LP
  5601. Errors: 
  5602. .PN Alloc ,
  5603. .PN GContext , 
  5604. .PN Value
  5605. .\" End marker code here
  5606. .in -.2i
  5607. .LP
  5608. This request sets dash-offset and dashes in gc for dashed line styles.
  5609. Dashes cannot be empty (or a 
  5610. .PN Value 
  5611. error results).
  5612. Specifying an odd-length list is equivalent to specifying the same list 
  5613. concatenated with itself to produce an even-length list.
  5614. The initial and alternating elements of dashes are the even dashes; 
  5615. the others are the odd dashes.
  5616. Each element specifies a dash length in pixels.
  5617. All of the elements must be nonzero (or a 
  5618. .PN Value 
  5619. error results).
  5620. The dash-offset defines the phase of the pattern, 
  5621. specifying how many pixels into dashes the pattern should actually begin in 
  5622. any single graphics request.
  5623. Dashing is continuous through path elements combined with a join-style
  5624. but is reset to the dash-offset between each sequence of joined lines.
  5625. .LP
  5626. The unit of measure for dashes is the same as in the ordinary
  5627. coordinate system.
  5628. Ideally, a dash length is measured along the slope of the line, 
  5629. but implementations are only required to match this ideal 
  5630. for horizontal and vertical lines.
  5631. Failing the ideal semantics, 
  5632. it is suggested that the length be measured along the major axis of the line.
  5633. The major axis is defined as the x axis for lines drawn at an angle of
  5634. between \-45 and +45 degrees or between 135 and 225 degrees from the x axis.
  5635. For all other lines, the major axis is the y axis.
  5636. .sp
  5637. .LP
  5638. .\" Start marker code here
  5639. .IN "SetClipRectangles" "" "@DEF@"
  5640. .PN SetClipRectangles
  5641. .in +.2i
  5642. .LP
  5643. \fIgc\fP\^: GCONTEXT
  5644. .br
  5645. \fIclip-x-origin\fP, \fIclip-y-origin\fP\^: INT16
  5646. .br
  5647. \fIrectangles\fP\^: LISTofRECTANGLE
  5648. .br
  5649. \fIordering\fP\^:
  5650. .Pn { UnSorted , 
  5651. .PN YSorted , 
  5652. .PN YXSorted ,
  5653. .PN YXBanded }
  5654. .LP
  5655. Errors: 
  5656. .PN Alloc , 
  5657. .PN GContext , 
  5658. .PN Match ,
  5659. .PN Value
  5660. .\" End marker code here
  5661. .in -.2i
  5662. .LP
  5663. This request changes clip-mask in gc to the specified list of rectangles 
  5664. and sets the clip origin.
  5665. Output will be clipped to remain contained within the rectangles.
  5666. The clip origin is interpreted relative to the origin of
  5667. whatever destination drawable is specified in a graphics request.
  5668. The rectangle coordinates are interpreted relative to the clip origin.
  5669. The rectangles should be nonintersecting, or graphics results will be
  5670. undefined.
  5671. Note that the list of rectangles can be empty, 
  5672. which effectively disables output.
  5673. This is the opposite of passing 
  5674. .PN None 
  5675. as the clip-mask in 
  5676. .PN CreateGC 
  5677. and 
  5678. .PN ChangeGC .
  5679. .LP
  5680. If known by the client, 
  5681. ordering relations on the rectangles can be specified with the ordering 
  5682. argument.
  5683. This may provide faster operation by the server.
  5684. If an incorrect ordering is specified, 
  5685. the server may generate a 
  5686. .PN Match 
  5687. error, but it is not required to do so.
  5688. If no error is generated,
  5689. the graphics results are undefined.
  5690. .PN UnSorted 
  5691. means that the rectangles are in arbitrary order.
  5692. .PN YSorted 
  5693. means that the rectangles are nondecreasing in their Y origin.
  5694. .PN YXSorted 
  5695. additionally constrains 
  5696. .PN YSorted 
  5697. order in that all rectangles with an equal Y origin are
  5698. nondecreasing in their X origin.
  5699. .PN YXBanded 
  5700. additionally constrains 
  5701. .PN YXSorted 
  5702. by requiring that, for every possible Y scanline,
  5703. all rectangles that include that scanline have identical Y origins and Y
  5704. extents.
  5705. .sp
  5706. .LP
  5707. .\" Start marker code here
  5708. .IN "FreeGC" "" "@DEF@"
  5709. .PN FreeGC
  5710. .in +.2i
  5711. .LP
  5712. \fIgc\fP\^: GCONTEXT
  5713. .LP
  5714. Errors: 
  5715. .PN GContext
  5716. .\" End marker code here
  5717. .in -.2i
  5718. .LP
  5719. This request deletes the association between the resource ID and the gcontext 
  5720. and destroys the gcontext.
  5721. .sp
  5722. .LP
  5723. .\" Start marker code here
  5724. .IN "ClearArea" "" "@DEF@"
  5725. .PN ClearArea
  5726. .in +.2i
  5727. .LP
  5728. \fIwindow\fP\^: WINDOW
  5729. .br
  5730. \fIx\fP, \fIy\fP\^: INT16
  5731. .br
  5732. \fIwidth\fP, \fIheight\fP: CARD16
  5733. .br
  5734. \fIexposures\fP\^: BOOL
  5735. .LP
  5736. Errors: 
  5737. .PN Match ,
  5738. .PN Value , 
  5739. .PN Window 
  5740. .\" End marker code here
  5741. .in -.2i
  5742. .LP
  5743. The x and y coordinates are relative to the window's origin
  5744. and specify the upper-left corner of the rectangle.
  5745. If width is zero,
  5746. it is replaced with the current width of the window minus x.
  5747. If height is zero,
  5748. it is replaced with the current height of the window minus y.
  5749. If the window has a defined background tile,
  5750. the rectangle is tiled with a plane-mask of all ones and function of 
  5751. .PN Copy
  5752. and a subwindow-mode of
  5753. .PN ClipByChildren .
  5754. If the window has background 
  5755. .PN None ,
  5756. the contents of the window are not changed.
  5757. In either case, 
  5758. if exposures is 
  5759. .PN True , 
  5760. then one or more exposure events are generated for regions of the rectangle 
  5761. that are either visible or are being retained in a backing store.
  5762. .LP
  5763. It is a 
  5764. .PN Match 
  5765. error to use an 
  5766. .PN InputOnly 
  5767. window in this request.
  5768. .sp
  5769. .LP
  5770. .\" Start marker code here
  5771. .IN "CopyArea" "" "@DEF@"
  5772. .PN CopyArea
  5773. .in +.2i
  5774. .LP
  5775. \fIsrc-drawable\fP, \fIdst-drawable\fP\^: DRAWABLE
  5776. .br
  5777. \fIgc\fP\^: GCONTEXT
  5778. .br
  5779. \fIsrc-x\fP\^, \fIsrc-y\fP\^: INT16
  5780. .br
  5781. \fIwidth\fP, \fIheight\fP\^: CARD16
  5782. .br
  5783. \fIdst-x\fP, \fIdst-y\fP\^: INT16
  5784. .LP
  5785. Errors: 
  5786. .PN Drawable , 
  5787. .PN GContext , 
  5788. .PN Match
  5789. .\" End marker code here
  5790. .in -.2i
  5791. .LP
  5792. This request combines the specified rectangle of src-drawable with the 
  5793. specified rectangle of dst-drawable.
  5794. The src-x and src-y coordinates are relative to src-drawable's origin.
  5795. The dst-x and dst-y are relative to dst-drawable's origin, 
  5796. each pair specifying the upper-left corner of the rectangle.
  5797. The src-drawable must have the same root and the same depth
  5798. as dst-drawable (or a 
  5799. .PN Match 
  5800. error results).
  5801. .LP
  5802. If regions of the source rectangle are obscured and have not been retained 
  5803. in backing store
  5804. or if regions outside the boundaries of the source drawable are specified, 
  5805. then those regions are not copied, 
  5806. but the following occurs on all corresponding destination regions that are
  5807. either visible or are retained in backing-store.
  5808. If the dst-drawable is a window with a background other than 
  5809. .PN None , 
  5810. these corresponding destination regions are tiled 
  5811. (with plane-mask of all ones and function 
  5812. .PN Copy ) 
  5813. with that background.
  5814. Regardless of tiling and whether the destination is a window or a pixmap, 
  5815. if graphics-exposures in gc is
  5816. .PN True ,
  5817. then 
  5818. .PN GraphicsExposure 
  5819. events for all corresponding destination regions are generated.
  5820. .LP
  5821. If graphics-exposures is 
  5822. .PN True 
  5823. but no
  5824. .PN GraphicsExposure
  5825. events are generated,
  5826. then a 
  5827. .PN NoExposure 
  5828. event is generated.
  5829. .LP
  5830. GC components: function, plane-mask, subwindow-mode,
  5831. graphics-exposures, clip-x-origin, clip-y-origin, clip-mask
  5832. .sp
  5833. .LP
  5834. .\" Start marker code here
  5835. .IN "CopyPlane" "" "@DEF@"
  5836. .PN CopyPlane
  5837. .in +.2i
  5838. .LP
  5839. \fIsrc-drawable\fP, \fIdst-drawable\fP\^: DRAWABLE
  5840. .br
  5841. \fIgc\fP\^: GCONTEXT
  5842. .br
  5843. \fIsrc-x\fP, \fIsrc-y\fP\^: INT16
  5844. .br
  5845. \fIwidth\fP, \fIheight\fP\^: CARD16
  5846. .br
  5847. \fIdst-x\fP, \fIdst-y\fP\^: INT16
  5848. .br
  5849. \fIbit-plane\fP\^: CARD32
  5850. .LP
  5851. Errors: 
  5852. .PN Drawable , 
  5853. .PN GContext , 
  5854. .PN Match ,
  5855. .PN Value
  5856. .\" End marker code here
  5857. .in -.2i
  5858. .LP
  5859. The src-drawable must have the same root as dst-drawable (or a 
  5860. .PN Match
  5861. error results), but it need not have the same depth.
  5862. The bit-plane must have exactly one bit set to 1 and the value of bit-plane
  5863. must be less than %2 sup n% where \fIn\fP is the depth of src-drawable (or a 
  5864. .PN Value 
  5865. error results).
  5866. Effectively, a pixmap of the same depth as dst-drawable and with size specified
  5867. by the source region is formed using the foreground/background pixels in gc 
  5868. (foreground everywhere the bit-plane in src-drawable contains a bit set to 1, 
  5869. background everywhere the bit-plane contains a bit set to 0), 
  5870. and the equivalent of a
  5871. .PN CopyArea 
  5872. is performed, with all the same exposure semantics.
  5873. This can also be thought of as using the specified region of the source
  5874. bit-plane as a stipple with a fill-style of 
  5875. .PN OpaqueStippled 
  5876. for filling a rectangular area of the destination.
  5877. .LP
  5878. GC components: function, plane-mask, foreground, background,
  5879. subwindow-mode, graphics-exposures, clip-x-origin, clip-y-origin,
  5880. clip-mask
  5881. .sp
  5882. .LP
  5883. .\" Start marker code here
  5884. .IN "PolyPoint" "" "@DEF@"
  5885. .PN PolyPoint
  5886. .in +.2i
  5887. .LP
  5888. \fIdrawable\fP\^: DRAWABLE
  5889. .br
  5890. \fIgc\fP\^: GCONTEXT
  5891. .br
  5892. \fIcoordinate-mode\fP\^:
  5893. .Pn { Origin , 
  5894. .PN Previous }
  5895. .br
  5896. \fIpoints\fP\^: LISTofPOINT
  5897. .LP
  5898. Errors: 
  5899. .PN Drawable , 
  5900. .PN GContext , 
  5901. .PN Match ,
  5902. .PN Value
  5903. .\" End marker code here
  5904. .in -.2i
  5905. .LP
  5906. This request combines the foreground pixel in gc with the pixel 
  5907. at each point in the drawable.
  5908. The points are drawn in the order listed.
  5909. .LP
  5910. The first point is always relative to the drawable's origin.
  5911. The rest are relative either to that origin or the previous point, 
  5912. depending on the coordinate-mode.
  5913. .LP
  5914. GC components: function, plane-mask, foreground, subwindow-mode,
  5915. clip-x-origin, clip-y-origin, clip-mask
  5916. .sp
  5917. .LP
  5918. .\" Start marker code here
  5919. .IN "PolyLine" "" "@DEF@"
  5920. .PN PolyLine
  5921. .in +.2i
  5922. .LP
  5923. \fIdrawable\fP\^: DRAWABLE
  5924. .br
  5925. \fIgc\fP\^: GCONTEXT
  5926. .br
  5927. \fIcoordinate-mode\fP\^:
  5928. .Pn { Origin , 
  5929. .PN Previous }
  5930. .br
  5931. \fIpoints\fP\^: LISTofPOINT
  5932. .LP
  5933. Errors: 
  5934. .PN Drawable , 
  5935. .PN GContext , 
  5936. .PN Match ,
  5937. .PN Value
  5938. .\" End marker code here
  5939. .in -.2i
  5940. .LP
  5941. This request draws lines between each pair of points (point[i], point[i+1]).
  5942. The lines are drawn in the order listed.
  5943. The lines join correctly at all intermediate points, 
  5944. and if the first and last points coincide, 
  5945. the first and last lines also join correctly.
  5946. .LP
  5947. For any given line,
  5948. no pixel is drawn more than once.
  5949. If thin (zero line-width) lines intersect, 
  5950. the intersecting pixels are drawn multiple times.
  5951. If wide lines intersect,
  5952. the intersecting pixels are drawn only once, as though the entire 
  5953. .PN PolyLine 
  5954. were a single filled shape.
  5955. .LP
  5956. The first point is always relative to the drawable's origin.
  5957. The rest are relative either to that origin or the previous point, 
  5958. depending on the coordinate-mode.
  5959. .LP
  5960. GC components: function, plane-mask, line-width, line-style,
  5961. cap-style, join-style, fill-style, subwindow-mode, clip-x-origin,
  5962. clip-y-origin, clip-mask
  5963. .LP
  5964. GC mode-dependent components: foreground, background, tile, stipple,
  5965. tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dashes
  5966. .sp
  5967. .LP
  5968. .\" Start marker code here
  5969. .IN "PolySegment" "" "@DEF@"
  5970. .PN PolySegment
  5971. .in +.2i
  5972. .LP
  5973. \fIdrawable\fP\^: DRAWABLE
  5974. .br
  5975. \fIgc\fP\^: GCONTEXT
  5976. .br
  5977. \fIsegments\fP\^: LISTofSEGMENT
  5978. .LP
  5979. where:
  5980. .LP
  5981. SEGMENT: [x1, y1, x2, y2: INT16]
  5982. .LP
  5983. Errors: 
  5984. .PN Drawable , 
  5985. .PN GContext , 
  5986. .PN Match
  5987. .\" End marker code here
  5988. .in -.2i
  5989. .LP
  5990. For each segment, 
  5991. this request draws a line between [x1, y1] and [x2, y2].
  5992. The lines are drawn in the order listed.
  5993. No joining is performed at coincident endpoints.
  5994. For any given line, 
  5995. no pixel is drawn more than once.
  5996. If lines intersect,
  5997. the intersecting pixels are drawn multiple times.
  5998. .LP
  5999. GC components: function, plane-mask, line-width, line-style,
  6000. cap-style, fill-style, subwindow-mode, clip-x-origin, clip-y-origin,
  6001. clip-mask
  6002. .LP
  6003. GC mode-dependent components: foreground, background, tile, stipple,
  6004. tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dashes
  6005. .sp
  6006. .LP
  6007. .\" Start marker code here
  6008. .IN "PolyRectangle" "" "@DEF@"
  6009. .PN PolyRectangle
  6010. .in +.2i
  6011. .LP
  6012. \fIdrawable\fP\^: DRAWABLE
  6013. .br
  6014. \fIgc\fP\^: GCONTEXT
  6015. .br
  6016. \fIrectangles\fP\^: LISTofRECTANGLE
  6017. .LP
  6018. Errors: 
  6019. .PN Drawable , 
  6020. .PN GContext , 
  6021. .PN Match
  6022. .\" End marker code here
  6023. .in -.2i
  6024. .LP
  6025. This request draws the outlines of the specified rectangles, as if a five-point
  6026. .PN PolyLine 
  6027. were specified for each rectangle:
  6028. .LP
  6029. .DS
  6030. [x,y] [x+width,y] [x+width,y+height] [x,y+height] [x,y]
  6031. .DE
  6032. .LP
  6033. The x and y coordinates of each rectangle are relative to the drawable's origin
  6034. and define the upper-left corner of the rectangle.
  6035. .LP
  6036. The rectangles are drawn in the order listed.
  6037. For any given rectangle,
  6038. no pixel is drawn more than once.
  6039. If rectangles intersect,
  6040. the intersecting pixels are drawn multiple times.
  6041. .LP
  6042. GC components: function, plane-mask, line-width, line-style,
  6043. cap-style, join-style, fill-style, subwindow-mode, clip-x-origin,
  6044. clip-y-origin, clip-mask
  6045. .LP
  6046. GC mode-dependent components: foreground, background, tile, stipple,
  6047. tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dashes
  6048. .sp
  6049. .LP
  6050. .\" Start marker code here
  6051. .IN "PolyArc" "" "@DEF@"
  6052. .PN PolyArc
  6053. .in +.2i
  6054. .LP
  6055. \fIdrawable\fP\^: DRAWABLE
  6056. .br
  6057. \fIgc\fP\^: GCONTEXT
  6058. .br
  6059. \fIarcs\fP\^: LISTofARC
  6060. .LP
  6061. Errors: 
  6062. .PN Drawable , 
  6063. .PN GContext , 
  6064. .PN Match
  6065. .\" End marker code here
  6066. .in -.2i
  6067. .LP
  6068. This request draws circular or elliptical arcs.
  6069. Each arc is specified by a rectangle and two angles.
  6070. The angles are signed integers in degrees scaled by 64, 
  6071. with positive indicating counterclockwise motion and
  6072. negative indicating clockwise motion.
  6073. The start of the arc is specified by angle1 relative to the three-o'clock 
  6074. position from the center of the rectangle, 
  6075. and the path and extent of the arc is specified by angle2 relative to the 
  6076. start of the arc.
  6077. If the magnitude of angle2 is greater than 360 degrees,
  6078. it is truncated to 360 degrees.
  6079. The x and y coordinates of the rectangle are relative to the origin of
  6080. the drawable.
  6081. For an arc specified as [x,y,w,h,a1,a2], 
  6082. the origin of the major and minor axes is at [x+(w/2),y+(h/2)], 
  6083. and the infinitely thin path describing the entire circle/ellipse intersects 
  6084. the horizontal axis at [x,y+(h/2)] and [x+w,y+(h/2)] and intersects the
  6085. vertical axis at [x+(w/2),y] and [x+(w/2),y+h].
  6086. These coordinates can be fractional;
  6087. that is, they are not truncated to discrete coordinates.
  6088. The path should be defined by the ideal mathematical path.
  6089. For a wide line with line-width lw,
  6090. the bounding outlines for filling are given by the two infinitely thin paths 
  6091. consisting of all points whose perpendicular distance from the path of the
  6092. circle/ellipse is equal to lw/2 (which may be a fractional value).
  6093. The cap-style and join-style are applied the same as for a line corresponding
  6094. to the tangent of the circle/ellipse at the endpoint.
  6095. .LP
  6096. For an arc specified as [x,y,w,h,a1,a2], 
  6097. the angles must be specified in the effectively skewed coordinate system of 
  6098. the ellipse (for a circle, the angles and coordinate systems are identical).
  6099. The relationship between these angles and angles expressed in the normal
  6100. coordinate system of the screen (as measured with a protractor) is as
  6101. follows:
  6102. .DS
  6103. skewed-angle = atan(tan(normal-angle) * w/h) + adjust
  6104. .DE
  6105. .LP
  6106. The skewed-angle and normal-angle are expressed in radians (rather
  6107. than in degrees scaled by 64) in the range [0,2*PI).
  6108. The atan returns a value in the range [\-PI/2,PI/2].
  6109. The adjust is:
  6110. .RS
  6111. .TS
  6112. l l.
  6113. 0    for normal-angle in the range [0,PI/2)
  6114. PI    for normal-angle in the range [PI/2,(3*PI)/2)
  6115. 2*PI    for normal-angle in the range [(3*PI)/2,2*PI)
  6116. .TE
  6117. .RE
  6118. .LP
  6119. The arcs are drawn in the order listed.
  6120. If the last point in one arc coincides with the first point in the following 
  6121. arc, 
  6122. the two arcs will join correctly.
  6123. If the first point in the first arc coincides with the last point 
  6124. in the last arc, 
  6125. the two arcs will join correctly.
  6126. For any given arc, 
  6127. no pixel is drawn more than once.
  6128. If two arcs join correctly and the line-width is greater than zero 
  6129. and the arcs intersect, 
  6130. no pixel is drawn more than once.
  6131. Otherwise, the intersecting pixels of intersecting arcs are drawn multiple 
  6132. times.
  6133. Specifying an arc with one endpoint and a clockwise extent draws the
  6134. same pixels as specifying the other endpoint and an equivalent
  6135. counterclockwise extent, except as it affects joins.
  6136. .LP
  6137. By specifying one axis to be zero, 
  6138. a horizontal or vertical line can be drawn.
  6139. .LP
  6140. Angles are computed based solely on the coordinate system,
  6141. ignoring the aspect ratio.
  6142. .LP
  6143. GC components: function, plane-mask, line-width, line-style,
  6144. cap-style, join-style, fill-style, subwindow-mode, clip-x-origin,
  6145. clip-y-origin, clip-mask
  6146. .LP
  6147. GC mode-dependent components: foreground, background, tile, stipple,
  6148. tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dashes
  6149. .sp
  6150. .LP
  6151. .\" Start marker code here
  6152. .IN "FillPoly" "" "@DEF@"
  6153. .PN FillPoly
  6154. .in +.2i
  6155. .LP
  6156. \fIdrawable\fP\^: DRAWABLE
  6157. .br
  6158. \fIgc\fP\^: GCONTEXT
  6159. .br
  6160. \fIshape\fP\^:
  6161. .Pn { Complex , 
  6162. .PN Nonconvex , 
  6163. .PN Convex }
  6164. .br
  6165. \fIcoordinate-mode\fP\^:
  6166. .Pn { Origin , 
  6167. .PN Previous }
  6168. .br
  6169. \fIpoints\fP\^: LISTofPOINT
  6170. .LP
  6171. Errors: 
  6172. .PN Drawable , 
  6173. .PN GContext , 
  6174. .PN Match , 
  6175. .PN Value
  6176. .\" End marker code here
  6177. .in -.2i
  6178. .LP
  6179. This request fills the region closed by the specified path.
  6180. The path is closed automatically if the last point in the list does not 
  6181. coincide with the first point.
  6182. No pixel of the region is drawn more than once.
  6183. .LP
  6184. The first point is always relative to the drawable's origin.
  6185. The rest are relative either to that origin or the previous point, 
  6186. depending on the coordinate-mode.
  6187. .LP
  6188. The shape parameter may be used by the server to improve performance.
  6189. .PN Complex 
  6190. means the path may self-intersect.
  6191. Contiguous coincident points in the path are not treated
  6192. as self-intersection.
  6193. .LP
  6194. .PN Nonconvex 
  6195. means the path does not self-intersect, 
  6196. but the shape is not wholly convex.
  6197. If known by the client, 
  6198. specifying 
  6199. .PN Nonconvex 
  6200. over
  6201. .PN Complex 
  6202. may improve performance.
  6203. If 
  6204. .PN Nonconvex 
  6205. is specified for a self-intersecting path, 
  6206. the graphics results are undefined.
  6207. .LP
  6208. .PN Convex 
  6209. means that for every pair of points inside the polygon,
  6210. the line segment connecting them does not intersect the path.
  6211. If known by the client,
  6212. specifying 
  6213. .PN Convex 
  6214. can improve performance.
  6215. If 
  6216. .PN Convex 
  6217. is specified for a path that is not convex, 
  6218. the graphics results are undefined.
  6219. .LP
  6220. GC components: function, plane-mask, fill-style, fill-rule,
  6221. subwindow-mode, clip-x-origin, clip-y-origin, clip-mask
  6222. .LP
  6223. GC mode-dependent components: foreground, background, tile, stipple,
  6224. tile-stipple-x-origin, tile-stipple-y-origin
  6225. .sp
  6226. .LP
  6227. .\" Start marker code here
  6228. .IN "PolyFillRectangle" "" "@DEF@"
  6229. .PN PolyFillRectangle
  6230. .in +.2i
  6231. .LP
  6232. \fIdrawable\fP\^: DRAWABLE
  6233. .br
  6234. \fIgc\fP\^: GCONTEXT
  6235. .br
  6236. \fIrectangles\fP\^: LISTofRECTANGLE
  6237. .LP
  6238. Errors: 
  6239. .PN Drawable , 
  6240. .PN GContext , 
  6241. .PN Match
  6242. .\" End marker code here
  6243. .in -.2i
  6244. .LP
  6245. This request fills the specified rectangles, as if a four-point 
  6246. .PN FillPoly 
  6247. were specified for each rectangle:
  6248. .DS
  6249. [x,y] [x+width,y] [x+width,y+height] [x,y+height]
  6250. .DE
  6251. .LP
  6252. The x and y coordinates of each rectangle are relative to the drawable's origin
  6253. and define the upper-left corner of the rectangle.
  6254. .LP
  6255. The rectangles are drawn in the order listed.
  6256. For any given rectangle,
  6257. no pixel is drawn more than once.
  6258. If rectangles intersect,
  6259. the intersecting pixels are drawn multiple times.
  6260. .LP
  6261. GC components: function, plane-mask, fill-style, subwindow-mode,
  6262. clip-x-origin, clip-y-origin, clip-mask
  6263. .LP
  6264. GC mode-dependent components: foreground, background, tile, stipple,
  6265. tile-stipple-x-origin, tile-stipple-y-origin
  6266. .sp
  6267. .LP
  6268. .\" Start marker code here
  6269. .IN "PolyFillArc" "" "@DEF@"
  6270. .PN PolyFillArc
  6271. .in +.2i
  6272. .LP
  6273. \fIdrawable\fP\^: DRAWABLE
  6274. .br
  6275. \fIgc\fP\^: GCONTEXT
  6276. .br
  6277. \fIarcs\fP\^: LISTofARC
  6278. .LP
  6279. Errors: 
  6280. .PN Drawable , 
  6281. .PN GContext , 
  6282. .PN Match
  6283. .\" End marker code here
  6284. .in -.2i
  6285. .LP
  6286. For each arc, 
  6287. this request fills the region closed by the infinitely thin path
  6288. described by the specified arc and one or two line segments, 
  6289. depending on the arc-mode.
  6290. For 
  6291. .PN Chord , 
  6292. the single line segment joining the endpoints of the arc is used.
  6293. For 
  6294. .PN PieSlice , 
  6295. the two line segments joining the endpoints of the arc with the center point 
  6296. are used.
  6297. The arcs are as specified in the 
  6298. .PN PolyArc 
  6299. request.
  6300. .LP
  6301. The arcs are filled in the order listed.
  6302. For any given arc, 
  6303. no pixel is drawn more than once.
  6304. If regions intersect, 
  6305. the intersecting pixels are drawn multiple times.
  6306. .LP
  6307. GC components: function, plane-mask, fill-style, arc-mode,
  6308. subwindow-mode, clip-x-origin, clip-y-origin, clip-mask
  6309. .LP
  6310. GC mode-dependent components: foreground, background, tile, stipple,
  6311. tile-stipple-x-origin, tile-stipple-y-origin
  6312. .sp
  6313. .LP
  6314. .\" Start marker code here
  6315. .IN "PutImage" "" "@DEF@"
  6316. .PN PutImage
  6317. .in +.2i
  6318. .LP
  6319. \fIdrawable\fP\^: DRAWABLE
  6320. .br
  6321. \fIgc\fP\^: GCONTEXT
  6322. .br
  6323. \fIdepth\fP\^: CARD8
  6324. .br
  6325. \fIwidth\fP, \fIheight\fP\^: CARD16
  6326. .br
  6327. \fIdst-x\fP, \fIdst-y\fP\^: INT16
  6328. .br
  6329. \fIleft-pad\fP\^: CARD8
  6330. .br
  6331. \fIformat\fP\^:
  6332. .Pn { Bitmap , 
  6333. .PN XYPixmap , 
  6334. .PN ZPixmap }
  6335. .br
  6336. \fIdata\fP\^: LISTofBYTE
  6337. .LP
  6338. Errors: 
  6339. .PN Drawable , 
  6340. .PN GContext , 
  6341. .PN Match , 
  6342. .PN Value
  6343. .\" End marker code here
  6344. .in -.2i
  6345. .LP
  6346. This request combines an image with a rectangle of the drawable.
  6347. The dst-x and dst-y coordinates are relative to the drawable's origin.
  6348. .LP
  6349. If 
  6350. .PN Bitmap 
  6351. format is used, 
  6352. then depth must be one (or a 
  6353. .PN Match 
  6354. error results), and the image must be in XY format.
  6355. The foreground pixel in gc defines the source for bits set to 1 in the image, 
  6356. and the background pixel defines the source for the bits set to 0.
  6357. .LP
  6358. For
  6359. .PN XYPixmap 
  6360. and 
  6361. .PN ZPixmap , 
  6362. the depth must match the depth of the drawable (or a 
  6363. .PN Match 
  6364. error results).
  6365. For 
  6366. .PN XYPixmap , 
  6367. the image must be sent in XY format.
  6368. For
  6369. .PN ZPixmap , 
  6370. the image must be sent in the Z format defined for the given depth.
  6371. .LP
  6372. The left-pad must be zero for 
  6373. .PN ZPixmap 
  6374. format (or a 
  6375. .PN Match 
  6376. error results).
  6377. For
  6378. .PN Bitmap 
  6379. and 
  6380. .PN XYPixmap 
  6381. format, 
  6382. left-pad must be less than bitmap-scanline-pad as given in the server 
  6383. connection setup information (or a 
  6384. .PN Match 
  6385. error results).
  6386. The first left-pad bits in every scanline are to be ignored by the server.
  6387. The actual image begins that many bits into the data.
  6388. The width argument defines the width of the actual image
  6389. and does not include left-pad.
  6390. .LP
  6391. GC components: function, plane-mask, subwindow-mode, clip-x-origin,
  6392. clip-y-origin, clip-mask
  6393. .LP
  6394. GC mode-dependent components: foreground, background
  6395. .sp
  6396. .LP
  6397. .\" Start marker code here
  6398. .IN "GetImage" "" "@DEF@"
  6399. .PN GetImage
  6400. .in +.2i
  6401. .LP
  6402. \fIdrawable\fP\^: DRAWABLE
  6403. .br
  6404. \fIx\fP, \fIy\fP\^: INT16
  6405. .br
  6406. \fIwidth\fP, \fIheight\fP\^: CARD16
  6407. .br
  6408. \fIplane-mask\fP\^: CARD32
  6409. .br
  6410. \fIformat\fP\^:
  6411. .Pn { XYPixmap , 
  6412. .PN ZPixmap }
  6413. .in -.2i
  6414. .LP
  6415.    =>
  6416. .in +.2i
  6417. .LP
  6418. depth: CARD8
  6419. .br
  6420. visual: VISUALID or 
  6421. .PN None
  6422. .br
  6423. data: LISTofBYTE
  6424. .LP
  6425. Errors: 
  6426. .PN Drawable , 
  6427. .PN Match ,
  6428. .PN Value
  6429. .\" End marker code here
  6430. .in -.2i
  6431. .LP
  6432. This request returns the contents of the given rectangle of the drawable in the
  6433. given format.
  6434. The x and y coordinates are relative to the drawable's origin 
  6435. and define the upper-left corner of the rectangle.
  6436. If 
  6437. .PN XYPixmap
  6438. is specified, 
  6439. only the bit planes specified in plane-mask are transmitted, 
  6440. with the planes appearing from most-significant to least-significant 
  6441. in bit order.
  6442. If 
  6443. .PN ZPixmap 
  6444. is specified, then bits in all planes not specified in plane-mask are 
  6445. transmitted as zero.
  6446. Range checking is not performed on plane-mask; 
  6447. extraneous bits are simply ignored.
  6448. The returned depth is as specified when the drawable was created
  6449. and is the same as a depth component in a FORMAT structure (in the connection
  6450. setup), not a bits-per-pixel component.
  6451. If the drawable is a window,
  6452. its visual type is returned.
  6453. If the drawable is a pixmap, 
  6454. the visual is 
  6455. .PN None .
  6456. .LP
  6457. If the drawable is a pixmap, 
  6458. then the given rectangle must be wholly contained within the pixmap (or a 
  6459. .PN Match 
  6460. error results).
  6461. If the drawable is a window, 
  6462. the window must be viewable, 
  6463. and it must be the case that, 
  6464. if there were no inferiors or overlapping windows,
  6465. the specified rectangle of the window would be fully visible on the screen 
  6466. and wholly contained within the outside edges of the window (or a 
  6467. .PN Match 
  6468. error results).
  6469. Note that the borders of the window can be included and read with this request.
  6470. If the window has a backing store, 
  6471. then the backing-store contents are returned for regions of the window 
  6472. that are obscured by noninferior windows;
  6473. otherwise, the returned contents of such obscured regions are undefined.
  6474. Also undefined are the returned contents of visible
  6475. regions of inferiors of different depth than the specified window.
  6476. The pointer cursor image is not included in the contents returned.
  6477. .LP
  6478. This request is not general-purpose in the same sense as other
  6479. graphics-related requests.
  6480. It is intended specifically for rudimentary hardcopy support.
  6481. .sp
  6482. .LP
  6483. .\" Start marker code here
  6484. .IN "PolyText8" "" "@DEF@"
  6485. .PN PolyText8
  6486. .in +.2i
  6487. .LP
  6488. \fIdrawable\fP\^: DRAWABLE
  6489. .br
  6490. \fIgc\fP\^: GCONTEXT
  6491. .br
  6492. \fIx\fP, \fIy\fP\^: INT16
  6493. .br
  6494. \fIitems\fP\^: LISTofTEXTITEM8
  6495. .LP
  6496. where:
  6497. .TS
  6498. r l.
  6499. TEXTITEM8:    TEXTELT8 or FONT
  6500. .br
  6501. TEXTELT8:    [delta: INT8 
  6502. .br
  6503.     \ string: STRING8]
  6504. .TE
  6505. .LP
  6506. Errors: 
  6507. .PN Drawable , 
  6508. .PN Font ,
  6509. .PN GContext , 
  6510. .PN Match 
  6511. .\" End marker code here
  6512. .in -.2i
  6513. .LP
  6514. The x and y coordinates are relative to the drawable's origin 
  6515. and specify the baseline starting position (the initial character origin).
  6516. Each text item is processed in turn.
  6517. A font item causes the font to be stored in gc 
  6518. and to be used for subsequent text.
  6519. Switching among fonts does not affect the next character origin.
  6520. A text element delta specifies an additional change in the position 
  6521. along the x axis before the string is drawn;
  6522. the delta is always added to the character origin.
  6523. Each character image, as defined by the font in gc, 
  6524. is treated as an additional mask for a fill operation on the drawable.
  6525. .LP
  6526. All contained FONTs are always transmitted most-significant byte first.
  6527. .LP
  6528. If a 
  6529. .PN Font 
  6530. error is generated for an item, 
  6531. the previous items may have been drawn.
  6532. .LP
  6533. For fonts defined with 2-byte matrix indexing, 
  6534. each STRING8 byte is interpreted as a byte2 value of a CHAR2B with a byte1 
  6535. value of zero.
  6536. .LP
  6537. GC components: function, plane-mask, fill-style, font,
  6538. subwindow-mode, clip-x-origin, clip-y-origin, clip-mask
  6539. .LP
  6540. GC mode-dependent components: foreground, background, tile, stipple,
  6541. tile-stipple-x-origin, tile-stipple-y-origin
  6542. .sp
  6543. .LP
  6544. .\" Start marker code here
  6545. .IN "PolyText16" "" "@DEF@"
  6546. .PN PolyText16
  6547. .in +.2i
  6548. .LP
  6549. \fIdrawable\fP\^: DRAWABLE
  6550. .br
  6551. \fIgc\fP\^: GCONTEXT
  6552. .br
  6553. \fIx\fP, \fIy\fP\^: INT16
  6554. .br
  6555. \fIitems\fP\^: LISTofTEXTITEM16
  6556. .LP
  6557. where:
  6558. .TS
  6559. r l.
  6560. TEXTITEM16:    TEXTELT16 or FONT
  6561. .br
  6562. TEXTELT16:    [delta: INT8
  6563. .br
  6564.     \ string: STRING16]
  6565. .TE
  6566. .LP
  6567. Errors: 
  6568. .PN Drawable , 
  6569. .PN Font ,
  6570. .PN GContext , 
  6571. .PN Match
  6572. .\" End marker code here
  6573. .in -.2i
  6574. .LP
  6575. This request is similar to
  6576. .PN PolyText8 , 
  6577. except 2-byte (or 16-bit) characters are used.
  6578. For fonts defined with linear indexing rather than 2-byte matrix indexing, 
  6579. the server will interpret each CHAR2B as a 16-bit number that
  6580. has been transmitted most-significant byte first (that is, byte1 of the
  6581. CHAR2B is taken as the most-significant byte).
  6582. .sp
  6583. .LP
  6584. .\" Start marker code here
  6585. .IN "ImageText8" "" "@DEF@"
  6586. .PN ImageText8
  6587. .in +.2i
  6588. .LP
  6589. \fIdrawable\fP\^: DRAWABLE
  6590. .br
  6591. \fIgc\fP\^: GCONTEXT
  6592. .br
  6593. \fIx\fP, \fIy\fP\^: INT16
  6594. .br
  6595. \fIstring\fP\^: STRING8
  6596. .LP
  6597. Errors: 
  6598. .PN Drawable , 
  6599. .PN GContext , 
  6600. .PN Match
  6601. .\" End marker code here
  6602. .in -.2i
  6603. .LP
  6604. The x and y coordinates are relative to the drawable's origin 
  6605. and specify the baseline starting position (the initial character origin).
  6606. The effect is first to fill a destination rectangle with the background
  6607. pixel defined in gc and then to paint the text with the foreground pixel.
  6608. The upper-left corner of the filled rectangle is at:
  6609. .DS
  6610. [x, y \- font-ascent]
  6611. .DE
  6612. .LP
  6613. the width is:
  6614. .DS
  6615. overall-width
  6616. .DE
  6617. .LP
  6618. and the height is:
  6619. .DS
  6620. font-ascent + font-descent
  6621. .DE
  6622. .LP
  6623. The overall-width, font-ascent, and font-descent are as 
  6624. they would be returned by a 
  6625. .PN QueryTextExtents 
  6626. call using gc and string.
  6627. .LP
  6628. The function and fill-style defined in gc are ignored for this request.
  6629. The effective function is 
  6630. .PN Copy ,
  6631. and the effective fill-style 
  6632. .PN Solid .
  6633. .LP
  6634. For fonts defined with 2-byte matrix indexing, 
  6635. each STRING8 byte is interpreted as a byte2 value of a CHAR2B with a byte1 
  6636. value of zero.
  6637. .LP
  6638. GC components: plane-mask, foreground, background, font,
  6639. subwindow-mode, clip-x-origin, clip-y-origin, clip-mask
  6640. .sp
  6641. .LP
  6642. .\" Start marker code here
  6643. .IN "ImageText16" "" "@DEF@"
  6644. .PN ImageText16
  6645. .in +.2i
  6646. .LP
  6647. \fIdrawable\fP\^: DRAWABLE
  6648. .br
  6649. \fIgc\fP\^: GCONTEXT
  6650. .br
  6651. \fIx\fP, \fIy\fP\^: INT16
  6652. .br
  6653. \fIstring\fP\^: STRING16
  6654. .LP
  6655. Errors: 
  6656. .PN Drawable , 
  6657. .PN GContext , 
  6658. .PN Match
  6659. .\" End marker code here
  6660. .in -.2i
  6661. .LP
  6662. This request is similar to
  6663. .PN ImageText8 , 
  6664. except 2-byte (or 16-bit) characters are used.
  6665. For fonts defined with linear indexing rather than 2-byte matrix indexing, 
  6666. the server will interpret each CHAR2B as a 16-bit number that
  6667. has been transmitted most-significant byte first (that is, byte1 of the
  6668. CHAR2B is taken as the most-significant byte).
  6669. .sp
  6670. .LP
  6671. .\" Start marker code here
  6672. .IN "CreateColormap" "" "@DEF@"
  6673. .PN CreateColormap
  6674. .in +.2i
  6675. .LP
  6676. \fImid\fP\^: COLORMAP
  6677. .br
  6678. \fIvisual\fP\^: VISUALID
  6679. .br
  6680. \fIwindow\fP\^: WINDOW
  6681. .br
  6682. \fIalloc\fP\^:
  6683. .Pn { None , 
  6684. .PN All }
  6685. .LP
  6686. Errors: 
  6687. .PN Alloc ,
  6688. .PN IDChoice , 
  6689. .PN Match , 
  6690. .PN Value , 
  6691. .PN Window 
  6692. .\" End marker code here
  6693. .in -.2i
  6694. .LP
  6695. This request creates a colormap of the specified visual type for the screen 
  6696. on which the window resides and associates the identifier mid with it.
  6697. The visual type must be one supported by the screen (or a 
  6698. .PN Match 
  6699. error results).
  6700. The initial values of the colormap entries are undefined for classes
  6701. .PN GrayScale , 
  6702. .PN PseudoColor , 
  6703. and 
  6704. .PN DirectColor .
  6705. For 
  6706. .PN StaticGray , 
  6707. .PN StaticColor ,
  6708. and 
  6709. .PN TrueColor , 
  6710. the entries will have defined values, 
  6711. but those values are specific to the visual and are not defined 
  6712. by the core protocol.
  6713. For 
  6714. .PN StaticGray , 
  6715. .PN StaticColor , 
  6716. and 
  6717. .PN TrueColor , 
  6718. alloc must be specified as 
  6719. .PN None 
  6720. (or a 
  6721. .PN Match 
  6722. error results).
  6723. For the other classes, if alloc is 
  6724. .PN None ,
  6725. the colormap initially has no allocated entries, 
  6726. and clients can allocate entries.
  6727. .LP
  6728. If alloc is 
  6729. .PN All , 
  6730. then the entire colormap is ``allocated'' writable.
  6731. The initial values of all allocated entries are undefined.
  6732. For 
  6733. .PN GrayScale
  6734. and 
  6735. .PN PseudoColor , 
  6736. the effect is as if an 
  6737. .PN AllocColorCells 
  6738. request returned all pixel values from zero to N \- 1, 
  6739. where N is the colormap-entries value in the specified visual.
  6740. For 
  6741. .PN DirectColor , 
  6742. the effect is as if an 
  6743. .PN AllocColorPlanes 
  6744. request returned a pixel value of zero and red-mask,
  6745. green-mask, and blue-mask values containing the same bits as the
  6746. corresponding masks in the specified visual.
  6747. However, 
  6748. in all cases, none of these entries can be freed with 
  6749. .PN FreeColors .
  6750. .sp
  6751. .LP
  6752. .\" Start marker code here
  6753. .IN "FreeColormap" "" "@DEF@"
  6754. .PN FreeColormap
  6755. .in +.2i
  6756. .LP
  6757. \fIcmap\fP\^: COLORMAP
  6758. .LP
  6759. Errors: 
  6760. .PN Colormap
  6761. .\" End marker code here
  6762. .in -.2i
  6763. .LP
  6764. This request deletes the association between the resource ID and the colormap
  6765. and frees the colormap storage.
  6766. If the colormap is an installed map for a screen, 
  6767. it is uninstalled (see
  6768. .PN UninstallColormap 
  6769. request).
  6770. If the colormap is defined as the colormap for a window (by means of 
  6771. .PN CreateWindow 
  6772. or 
  6773. .PN ChangeWindowAttributes ), 
  6774. the colormap for the window is changed to 
  6775. .PN None , 
  6776. and a 
  6777. .PN ColormapNotify 
  6778. event is generated.
  6779. The protocol does not define the colors displayed for a window with a colormap of 
  6780. .PN None .
  6781. .LP
  6782. This request has no effect on a default colormap for a screen.
  6783. .sp
  6784. .LP
  6785. .\" Start marker code here
  6786. .IN "CopyColormapAndFree" "" "@DEF@"
  6787. .PN CopyColormapAndFree
  6788. .in +.2i
  6789. .LP
  6790. \fImid\fP, \fIsrc-cmap\fP\^: COLORMAP
  6791. .LP
  6792. Errors: 
  6793. .PN Alloc ,
  6794. .PN Colormap , 
  6795. .PN IDChoice
  6796. .\" End marker code here
  6797. .in -.2i
  6798. .LP
  6799. This request creates a colormap of the same visual type 
  6800. and for the same screen as src-cmap, 
  6801. and it associates identifier mid with it.
  6802. It also moves all of the client's existing allocations from src-cmap 
  6803. to the new colormap with their color values intact 
  6804. and their read-only or writable characteristics intact, 
  6805. and it frees those entries in src-cmap.
  6806. Color values in other entries in the new colormap are undefined.
  6807. If src-cmap was created by the client with alloc 
  6808. .PN All 
  6809. (see 
  6810. .PN CreateColormap 
  6811. request), 
  6812. then the new colormap is also created with alloc 
  6813. .PN All , 
  6814. all color values for all entries are copied from src-cmap, 
  6815. and then all entries in src-cmap are freed.
  6816. If src-cmap was not created by the client with alloc 
  6817. .PN All , 
  6818. then the allocations to be moved are all those pixels and planes that have
  6819. been allocated by the client using either 
  6820. .PN AllocColor , 
  6821. .PN AllocNamedColor ,
  6822. .PN AllocColorCells , 
  6823. or 
  6824. .PN AllocColorPlanes
  6825. and that have not been freed since they were allocated.
  6826. .sp
  6827. .LP
  6828. .\" Start marker code here
  6829. .IN "InstallColormap" "" "@DEF@"
  6830. .PN InstallColormap
  6831. .in +.2i
  6832. .LP
  6833. \fIcmap\fP\^: COLORMAP
  6834. .LP
  6835. Errors: 
  6836. .PN Colormap
  6837. .\" End marker code here
  6838. .in -.2i
  6839. .LP
  6840. This request makes this colormap an installed map for its screen.
  6841. All windows associated with this colormap immediately display with true colors.
  6842. As a side effect, 
  6843. additional colormaps might be implicitly installed 
  6844. or uninstalled by the server.
  6845. Which other colormaps get installed or uninstalled is server-dependent
  6846. except that the required list must remain installed.
  6847. .LP
  6848. If cmap is not already an installed map, a 
  6849. .PN ColormapNotify 
  6850. event is generated on every window having cmap as an attribute.
  6851. In addition, 
  6852. for every other colormap that is installed or uninstalled as a result
  6853. of the request, a 
  6854. .PN ColormapNotify 
  6855. event is generated on every window having that colormap as an attribute.
  6856. .LP
  6857. At any time, there is a subset of the installed maps that are viewed as an
  6858. ordered list and are called the required list.
  6859. The length of the required list is at most M, 
  6860. where M is the min-installed-maps specified for the screen in the 
  6861. connection setup.
  6862. The required list is maintained as follows.
  6863. When a colormap is an explicit argument to 
  6864. .PN InstallColormap ,
  6865. it is added to the head of the list; the list is truncated at the
  6866. tail, if necessary, to keep the length of the list to at most M.
  6867. When a colormap is an explicit argument to 
  6868. .PN UninstallColormap 
  6869. and it is in the required list, it is removed from the list.
  6870. A colormap is not added to the required list when it is installed implicitly 
  6871. by the server, and the server cannot implicitly uninstall a colormap that is 
  6872. in the required list.
  6873. .LP
  6874. Initially the default colormap for a screen is installed (but is not in
  6875. the required list).
  6876. .sp
  6877. .LP
  6878. .\" Start marker code here
  6879. .IN "UninstallColormap" "" "@DEF@"
  6880. .PN UninstallColormap
  6881. .in +.2i
  6882. .LP
  6883. \fIcmap\fP\^: COLORMAP
  6884. .LP
  6885. Errors: 
  6886. .PN Colormap
  6887. .\" End marker code here
  6888. .in -.2i
  6889. .LP
  6890. If cmap is on the required list for its screen (see 
  6891. .PN InstallColormap 
  6892. request),
  6893. it is removed from the list.
  6894. As a side effect, 
  6895. cmap might be uninstalled, 
  6896. and additional colormaps might be implicitly installed or uninstalled.
  6897. Which colormaps get installed or uninstalled is server-dependent
  6898. except that the required list must remain installed.
  6899. .LP
  6900. If cmap becomes uninstalled, a 
  6901. .PN ColormapNotify 
  6902. event is generated on every window having cmap as an attribute.
  6903. In addition, 
  6904. for every other colormap that is installed or uninstalled as a result of 
  6905. the request, a 
  6906. .PN ColormapNotify
  6907. event is generated on every window having that colormap as an attribute.
  6908. .sp
  6909. .LP
  6910. .\" Start marker code here
  6911. .IN "ListInstalledColormaps" "" "@DEF@"
  6912. .PN ListInstalledColormaps
  6913. .in +.2i
  6914. .LP
  6915. \fIwindow\fP\^: WINDOW
  6916. .in -.2i
  6917. .LP
  6918.    =>
  6919. .in +.2i
  6920. .LP
  6921. cmaps: LISTofCOLORMAP
  6922. .LP
  6923. Errors: 
  6924. .PN Window
  6925. .\" End marker code here
  6926. .in -.2i
  6927. .LP
  6928. This request returns a list of the currently installed colormaps for the 
  6929. screen of the specified window.
  6930. The order of colormaps is not significant, 
  6931. and there is no explicit indication of the required list (see
  6932. .PN InstallColormap 
  6933. request).
  6934. .sp
  6935. .LP
  6936. .\" Start marker code here
  6937. .IN "AllocColor" "" "@DEF@"
  6938. .PN AllocColor
  6939. .in +.2i
  6940. .LP
  6941. \fIcmap\fP\^: COLORMAP
  6942. .br
  6943. \fIred\fP, \fIgreen\fP, \fIblue\fP\^: CARD16
  6944. .in -.2i
  6945. .LP
  6946.    =>
  6947. .in +.2i
  6948. .LP
  6949. pixel: CARD32
  6950. .br
  6951. red, green, blue: CARD16
  6952. .LP
  6953. Errors: 
  6954. .PN Alloc ,
  6955. .PN Colormap 
  6956. .\" End marker code here
  6957. .in -.2i
  6958. .LP
  6959. This request allocates a read-only colormap entry corresponding to the closest 
  6960. RGB values provided by the hardware.
  6961. It also returns the pixel and the RGB values actually used.
  6962. Multiple clients requesting the same effective RGB values can be assigned
  6963. the same read-only entry, allowing entries to be shared.
  6964. .sp
  6965. .LP
  6966. .\" Start marker code here
  6967. .IN "AllocNamedColor" "" "@DEF@"
  6968. .PN AllocNamedColor
  6969. .in +.2i
  6970. .LP
  6971. \fIcmap\fP\^: COLORMAP
  6972. .br
  6973. \fIname\fP\^: STRING8
  6974. .in -.2i
  6975. .LP
  6976.    =>
  6977. .in +.2i
  6978. .LP
  6979. pixel: CARD32
  6980. .br
  6981. exact-red, exact-green, exact-blue: CARD16
  6982. .br
  6983. visual-red, visual-green, visual-blue: CARD16
  6984. .LP
  6985. Errors: 
  6986. .PN Alloc ,
  6987. .PN Colormap , 
  6988. .PN Name
  6989. .\" End marker code here
  6990. .in -.2i
  6991. .LP
  6992. This request looks up the named color with respect to the screen associated 
  6993. with the colormap.
  6994. Then, it does an 
  6995. .PN AllocColor 
  6996. on cmap.
  6997. The name should use the ISO Latin-1 encoding, 
  6998. and uppercase and lowercase do not matter.
  6999. The exact RGB values specify the true values for the color, 
  7000. and the visual values specify the values actually used in the colormap.
  7001. .sp
  7002. .LP
  7003. .\" Start marker code here
  7004. .IN "AllocColorCells" "" "@DEF@"
  7005. .PN AllocColorCells
  7006. .in +.2i
  7007. .LP
  7008. \fIcmap\fP\^: COLORMAP
  7009. .br
  7010. \fIcolors\fP, \fIplanes\fP\^: CARD16
  7011. .br
  7012. \fIcontiguous\fP\^: BOOL
  7013. .in -.2i
  7014. .LP
  7015.    =>
  7016. .in +.2i
  7017. .LP
  7018. pixels, masks: LISTofCARD32
  7019. .LP
  7020. Errors: 
  7021. .PN Alloc ,
  7022. .PN Colormap , 
  7023. .PN Value
  7024. .\" Start marker code here
  7025. .in -.2i
  7026. .LP
  7027. The number of colors must be positive, 
  7028. and the number of planes must be nonnegative (or a 
  7029. .PN Value 
  7030. error results).
  7031. If C colors and P planes are requested, 
  7032. then C pixels and P masks are returned.
  7033. No mask will have any bits in common with any other mask 
  7034. or with any of the pixels.
  7035. By ORing together masks and pixels, 
  7036. C*%2 sup P% distinct pixels can be produced; 
  7037. all of these are allocated writable by the request.
  7038. For
  7039. .PN GrayScale 
  7040. or 
  7041. .PN PseudoColor , 
  7042. each mask will have exactly one bit set to 1; for
  7043. .PN DirectColor ,
  7044. each will have exactly three bits set to 1.
  7045. If contiguous is 
  7046. .PN True
  7047. and if all masks are ORed together, 
  7048. a single contiguous set of bits will be formed for 
  7049. .PN GrayScale 
  7050. or 
  7051. .PN PseudoColor , 
  7052. and three contiguous sets of bits (one within each pixel subfield) for 
  7053. .PN DirectColor .
  7054. The RGB values of the allocated entries are undefined.
  7055. .sp
  7056. .LP
  7057. .\" Start marker code here
  7058. .IN "AllocColorPlanes" "" "@DEF@"
  7059. .PN AllocColorPlanes
  7060. .in +.2i
  7061. .LP
  7062. \fIcmap\fP\^: COLORMAP
  7063. .br
  7064. \fIcolors\fP, \fIreds\fP, \fIgreens\fP, \fIblues\fP\^: CARD16
  7065. .br
  7066. \fIcontiguous\fP\^: BOOL
  7067. .in -.2i
  7068. .LP
  7069.    =>
  7070. .in +.2i
  7071. .LP
  7072. pixels: LISTofCARD32
  7073. .br
  7074. red-mask, green-mask, blue-mask: CARD32
  7075. .LP
  7076. Errors: 
  7077. .PN Alloc ,
  7078. .PN Colormap , 
  7079. .PN Value
  7080. .\" End marker code here
  7081. .in -.2i
  7082. .LP
  7083. The number of colors must be positive, 
  7084. and the reds, greens, and blues must be nonnegative (or a 
  7085. .PN Value 
  7086. error results).
  7087. If C colors, R reds, G greens, and B blues are requested, 
  7088. then C pixels are returned, and the masks have R, G, and B bits set,
  7089. respectively.
  7090. If contiguous is 
  7091. .PN True , 
  7092. then each mask will have a contiguous set of bits.
  7093. No mask will have any bits in common with any other mask 
  7094. or with any of the pixels.
  7095. For
  7096. .PN DirectColor , 
  7097. each mask will lie within the corresponding pixel subfield.
  7098. By ORing together subsets of masks with pixels,
  7099. C*%2 sup R+G+B% distinct pixels can be produced; 
  7100. all of these are allocated writable by the request.
  7101. The initial RGB values of the allocated entries are undefined.
  7102. In the colormap,
  7103. there are only C*%2 sup R% independent red entries, 
  7104. C*%2 sup G% independent green entries, 
  7105. and C*%2 sup B% independent blue entries.
  7106. This is true even for 
  7107. .PN PseudoColor .
  7108. When the colormap entry for a pixel value is changed using 
  7109. .PN StoreColors 
  7110. or
  7111. .PN StoreNamedColor , 
  7112. the pixel is decomposed according to the masks and the
  7113. corresponding independent entries are updated.
  7114. .sp
  7115. .LP
  7116. .\" Start marker code here
  7117. .IN "FreeColors" "" "@DEF@"
  7118. .PN FreeColors
  7119. .in +.2i
  7120. .LP
  7121. \fIcmap\fP\^: COLORMAP
  7122. .br
  7123. \fIpixels\fP\^: LISTofCARD32
  7124. .br
  7125. \fIplane-mask\fP\^: CARD32
  7126. .LP
  7127. Errors: 
  7128. .PN Access , 
  7129. .PN Colormap , 
  7130. .PN Value
  7131. .\" End marker code here
  7132. .in -.2i
  7133. .LP
  7134. The plane-mask should not have any bits in common with any of the
  7135. pixels.
  7136. The set of all pixels is produced by ORing together subsets of
  7137. plane-mask with the pixels.
  7138. The request frees all of these pixels that
  7139. were allocated by the client (using 
  7140. .PN AllocColor , 
  7141. .PN AllocNamedColor ,
  7142. .PN AllocColorCells , 
  7143. and 
  7144. .PN AllocColorPlanes ).
  7145. Note that freeing an
  7146. individual pixel obtained from 
  7147. .PN AllocColorPlanes 
  7148. may not actually allow it to be reused until all of its related pixels 
  7149. are also freed.
  7150. Similarly, a read-only entry is not actually freed until it has been
  7151. freed by all clients, and if a client allocates the same read-only entry
  7152. multiple times, it must free the entry that many times before the
  7153. entry is actually freed.
  7154. .LP
  7155. All specified pixels that are allocated by the client in cmap are freed, 
  7156. even if one or more pixels produce an error.
  7157. .PN Value 
  7158. error is generated if a specified pixel is not a valid index into cmap.
  7159. An 
  7160. .PN Access 
  7161. error is generated if a specified pixel is not allocated by the
  7162. client (that is, is unallocated or is only allocated by another client)
  7163. or if the colormap was created with all entries writable (using an alloc
  7164. value of
  7165. .PN All
  7166. in
  7167. .PN CreateColormap ).
  7168. If more than one pixel is in error, 
  7169. it is arbitrary as to which pixel is reported.
  7170. .sp
  7171. .LP
  7172. .\" Start marker code here
  7173. .IN "StoreColors" "" "@DEF@"
  7174. .PN StoreColors
  7175. .in +.2i
  7176. .LP
  7177. \fIcmap\fP\^: COLORMAP
  7178. .br
  7179. \fIitems\fP\^: LISTofCOLORITEM
  7180. .LP
  7181. where:
  7182. .TS
  7183. l l.
  7184. COLORITEM:    [pixel: CARD32
  7185. .br
  7186.     \ do-red, do-green, do-blue: BOOL
  7187. .br
  7188.     \ red, green, blue: CARD16]
  7189. .TE
  7190. .LP
  7191. Errors: 
  7192. .PN Access , 
  7193. .PN Colormap , 
  7194. .PN Value
  7195. .\" End marker code here
  7196. .in -.2i
  7197. .LP
  7198. This request changes the colormap entries of the specified pixels.
  7199. The do-red, do-green, and do-blue fields indicate which components 
  7200. should actually be changed.
  7201. If the colormap is an installed map for its screen, 
  7202. the changes are visible immediately.
  7203. .LP
  7204. All specified pixels that are allocated writable in cmap (by any client) 
  7205. are changed, even if one or more pixels produce an error.
  7206. A
  7207. .PN Value 
  7208. error is generated if a specified pixel is not a valid index into cmap, and an 
  7209. .PN Access 
  7210. error is generated if a specified pixel is unallocated or is allocated 
  7211. read-only.
  7212. If more than one pixel is in error,
  7213. it is arbitrary as to which pixel is reported.
  7214. .sp
  7215. .LP
  7216. .\" Start marker code here
  7217. .IN "StoreNamedColor" "" "@DEF@"
  7218. .PN StoreNamedColor
  7219. .in +.2i
  7220. .LP
  7221. \fIcmap\fP\^: COLORMAP
  7222. .br
  7223. \fIpixel\fP\^: CARD32
  7224. .br
  7225. \fIname\fP\^: STRING8
  7226. .br
  7227. \fIdo-red\fP, \fIdo-green\fP\^, \fIdo-blue\fP\^: BOOL
  7228. .LP
  7229. Errors: 
  7230. .PN Access , 
  7231. .PN Colormap ,
  7232. .PN Name , 
  7233. .PN Value
  7234. .\" End marker code here
  7235. .in -.2i
  7236. .LP
  7237. This request looks up the named color with respect to the screen associated 
  7238. with cmap and then does a 
  7239. .PN StoreColors 
  7240. in cmap.
  7241. The name should use the ISO Latin-1 encoding, 
  7242. and uppercase and lowercase do not matter.
  7243. The 
  7244. .PN Access 
  7245. and 
  7246. .PN Value 
  7247. errors are the same as in 
  7248. .PN StoreColors .
  7249. .sp
  7250. .LP
  7251. .\" Start marker code here
  7252. .IN "QueryColors" "" "@DEF@"
  7253. .PN QueryColors
  7254. .in +.2i
  7255. .LP
  7256. \fIcmap\fP\^: COLORMAP
  7257. .br
  7258. \fIpixels\fP\^: LISTofCARD32
  7259. .in -.2i
  7260. .LP
  7261.    =>
  7262. .in +.2i
  7263. .LP
  7264. colors: LISTofRGB
  7265. .LP
  7266. where:
  7267. .LP
  7268. .DS 0
  7269. RGB: [red, green, blue: CARD16]
  7270. .DE
  7271. Errors: 
  7272. .PN Colormap , 
  7273. .PN Value
  7274. .\" End marker code here
  7275. .in -.2i
  7276. .LP
  7277. This request returns the hardware-specific color values stored in cmap for
  7278. the specified pixels.
  7279. The values returned for an unallocated entry are undefined.
  7280. .PN Value 
  7281. error is generated if a pixel is not a valid index into cmap.
  7282. If more than one pixel is in error,
  7283. it is arbitrary as to which pixel is reported.
  7284. .sp
  7285. .LP
  7286. .\" Start marker code here
  7287. .IN "LookupColor" "" "@DEF@"
  7288. .PN LookupColor
  7289. .in +.2i
  7290. .LP
  7291. \fIcmap\fP\^: COLORMAP
  7292. .br
  7293. \fIname\fP\^: STRING8
  7294. .in -.2i
  7295. .LP
  7296.    =>
  7297. .in +.2i
  7298. .LP
  7299. exact-red, exact-green, exact-blue: CARD16
  7300. .br
  7301. visual-red, visual-green, visual-blue: CARD16
  7302. .LP
  7303. Errors: 
  7304. .PN Colormap , 
  7305. .PN Name
  7306. .\" End marker code here
  7307. .in -.2i
  7308. .LP
  7309. This request looks up the string name of a color with respect to the screen
  7310. associated with cmap and returns both the exact color values and
  7311. the closest values provided by the hardware with respect to the visual
  7312. type of cmap.
  7313. The name should use the ISO Latin-1 encoding, 
  7314. and uppercase and lowercase do not matter.
  7315. .sp
  7316. .LP
  7317. .\" Start marker code here
  7318. .IN "CreateCursor" "" "@DEF@"
  7319. .PN CreateCursor
  7320. .in +.2i
  7321. .LP
  7322. \fIcid\fP\^: CURSOR
  7323. .br
  7324. \fIsource\fP\^: PIXMAP
  7325. .br
  7326. \fImask\fP\^: PIXMAP or 
  7327. .PN None
  7328. .br
  7329. \fIfore-red\fP, \fIfore-green\fP, \fIfore-blue\fP\^: CARD16
  7330. .br
  7331. \fIback-red\fP, \fIback-green\fP, \fIback-blue\fP\^: CARD16
  7332. .br
  7333. \fIx\fP, \fIy\fP\^: CARD16
  7334. .LP
  7335. Errors: 
  7336. .PN Alloc ,
  7337. .PN IDChoice , 
  7338. .PN Match , 
  7339. .PN Pixmap
  7340. .\" End marker code here
  7341. .in -.2i
  7342. .LP
  7343. This request creates a cursor and associates identifier cid with it.
  7344. The foreground and background RGB values must be specified, 
  7345. even if the server only has a
  7346. .PN StaticGray 
  7347. or 
  7348. .PN GrayScale 
  7349. screen.
  7350. The foreground is used for the bits set to 1 in the source, 
  7351. and the background is used for the bits set to 0.
  7352. Both source and mask (if specified) must have depth one (or a 
  7353. .PN Match
  7354. error results), but they can have any root.
  7355. The mask pixmap defines the shape of the cursor.
  7356. That is, 
  7357. the bits set to 1 in the mask define which source pixels will be displayed,
  7358. and where the mask has bits set to 0, 
  7359. the corresponding bits of the source pixmap are ignored.
  7360. If no mask is given, 
  7361. all pixels of the source are displayed.
  7362. The mask, if present, must be the same size as the source (or a 
  7363. .PN Match 
  7364. error results).
  7365. The x and y coordinates define the hotspot relative to the source's origin
  7366. and must be a point within the source (or a 
  7367. .PN Match 
  7368. error results).
  7369. .LP
  7370. The components of the cursor may be transformed arbitrarily to meet
  7371. display limitations.
  7372. .LP
  7373. The pixmaps can be freed immediately if no further explicit references
  7374. to them are to be made.
  7375. .LP
  7376. Subsequent drawing in the source or mask pixmap has an undefined effect
  7377. on the cursor.
  7378. The server might or might not make a copy of the pixmap.
  7379. .sp
  7380. .LP
  7381. .\" Start marker code here
  7382. .IN "CreateGlyphCursor" "" "@DEF@"
  7383. .PN CreateGlyphCursor
  7384. .in +.2i
  7385. .LP
  7386. \fIcid\fP\^: CURSOR
  7387. .br
  7388. \fIsource-font\fP\^: FONT
  7389. .br
  7390. \fImask-font\fP\^: FONT or 
  7391. .PN None
  7392. .br
  7393. \fIsource-char\fP, \fImask-char\fP\^: CARD16
  7394. .br
  7395. \fIfore-red\fP, \fIfore-green\fP, \fIfore-blue\fP\^: CARD16
  7396. .br
  7397. \fIback-red\fP, \fIback-green\fP, \fIback-blue\fP\^: CARD16
  7398. .LP
  7399. Errors: 
  7400. .PN Alloc ,
  7401. .PN Font , 
  7402. .PN IDChoice , 
  7403. .PN Value
  7404. .\" End marker code here
  7405. .in -.2i
  7406. .LP
  7407. This request is similar to 
  7408. .PN CreateCursor , 
  7409. except the source and mask bitmaps are obtained from the specified font glyphs.
  7410. The source-char must be a defined glyph in source-font,
  7411. and if mask-font is given, mask-char must be a defined glyph in mask-font 
  7412. (or a 
  7413. .PN Value 
  7414. error results).
  7415. The mask font and character are optional.
  7416. The origins of the source and mask (if it is defined) glyphs 
  7417. are positioned coincidently and define the hotspot.
  7418. The source and mask need not have the same bounding box metrics, 
  7419. and there is no restriction on the placement of the hotspot relative 
  7420. to the bounding boxes.
  7421. If no mask is given, 
  7422. all pixels of the source are displayed.
  7423. Note that source-char and mask-char are CARD16, not CHAR2B.
  7424. For 2-byte matrix fonts, 
  7425. the 16-bit value should be formed with byte1 in the most-significant byte 
  7426. and byte2 in the least-significant byte.
  7427. .LP
  7428. The components of the cursor may be transformed arbitrarily to meet
  7429. display limitations.
  7430. .LP
  7431. The fonts can be freed immediately if no further explicit references to
  7432. them are to be made.
  7433. .sp
  7434. .LP
  7435. .\" Start marker code here
  7436. .IN "FreeCursor" "" "@DEF@"
  7437. .PN FreeCursor
  7438. .in +.2i
  7439. .LP
  7440. \fIcursor\fP\^: CURSOR
  7441. .LP
  7442. Errors: 
  7443. .PN Cursor
  7444. .\" End marker code here
  7445. .in -.2i
  7446. .LP
  7447. This request deletes the association between the resource ID and the cursor.
  7448. The cursor storage will be freed when no other resource references it.
  7449. .sp
  7450. .LP
  7451. .\" Start marker code here
  7452. .IN "RecolorCursor" "" "@DEF@"
  7453. .PN RecolorCursor
  7454. .in +.2i
  7455. .LP
  7456. \fIcursor\fP\^: CURSOR
  7457. .br
  7458. \fIfore-red\fP, \fIfore-green\fP, \fIfore-blue\fP\^: CARD16
  7459. .br
  7460. \fIback-red\fP, \fIback-green\fP, \fIback-blue\fP\^: CARD16
  7461. .LP
  7462. Errors: 
  7463. .PN Cursor
  7464. .\" End marker code here
  7465. .in -.2i
  7466. .LP
  7467. This request changes the color of a cursor.
  7468. If the cursor is being displayed on a screen, 
  7469. the change is visible immediately.
  7470. .sp
  7471. .LP
  7472. .\" Start marker code here
  7473. .IN "QueryBestSize" "" "@DEF@"
  7474. .PN QueryBestSize
  7475. .in +.2i
  7476. .LP
  7477. \fIclass\fP: 
  7478. .Pn { Cursor , 
  7479. .PN Tile , 
  7480. .PN Stipple }
  7481. .br
  7482. \fIdrawable\fP\^: DRAWABLE
  7483. .br
  7484. \fIwidth\fP, \fIheight\fP\^: CARD16
  7485. .in -.2i
  7486. .LP
  7487.    =>
  7488. .in +.2i
  7489. .LP
  7490. width, height: CARD16
  7491. .LP
  7492. Errors: 
  7493. .PN Drawable , 
  7494. .PN Match ,
  7495. .PN Value
  7496. .\" End marker code here
  7497. .in -.2i
  7498. .LP
  7499. This request returns the best size that is closest to the argument size.
  7500. For
  7501. .PN Cursor , 
  7502. this is the largest size that can be fully displayed.
  7503. For
  7504. .PN Tile , 
  7505. this is the size that can be tiled fastest.
  7506. For 
  7507. .PN Stipple , 
  7508. this is the size that can be stippled fastest.
  7509. .LP
  7510. For 
  7511. .PN Cursor , 
  7512. the drawable indicates the desired screen.
  7513. For 
  7514. .PN Tile 
  7515. and
  7516. .PN Stipple , 
  7517. the drawable indicates the screen and also possibly the window class and depth.
  7518. An 
  7519. .PN InputOnly 
  7520. window cannot be used as the drawable for 
  7521. .PN Tile
  7522. or 
  7523. .PN Stipple 
  7524. (or a 
  7525. .PN Match 
  7526. error results).
  7527. .sp
  7528. .LP
  7529. .\" Start marker code here
  7530. .IN "QueryExtension" "" "@DEF@"
  7531. .PN QueryExtension
  7532. .in +.2i
  7533. .LP
  7534. \fIname\fP\^: STRING8
  7535. .in -.2i
  7536. .LP
  7537.    =>
  7538. .in +.2i
  7539. .LP
  7540. present: BOOL
  7541. .br
  7542. major-opcode: CARD8
  7543. .br
  7544. first-event: CARD8
  7545. .br
  7546. first-error: CARD8
  7547. .\" End marker code here
  7548. .in -.2i
  7549. .LP
  7550. This request determines if the named extension is present.
  7551. If so, 
  7552. the major opcode for the extension is returned, if it has one.
  7553. Otherwise, zero is returned.
  7554. Any minor opcode and the request formats are specific to the extension.
  7555. If the extension involves additional event types,
  7556. the base event type code is returned.
  7557. Otherwise, zero is returned.
  7558. The format of the events is specific to the extension.
  7559. If the extension involves additional error codes,
  7560. the base error code is returned.
  7561. Otherwise, zero is returned.
  7562. The format of additional data in the errors is specific to the extension.
  7563. .LP
  7564. The extension name should use the ISO Latin-1 encoding, 
  7565. and uppercase and lowercase matter.
  7566. .sp
  7567. .LP
  7568. .\" Start marker code here
  7569. .IN "ListExtensions" "" "@DEF@"
  7570. .PN ListExtensions
  7571. .LP
  7572.    =>
  7573. .in +.2i
  7574. .LP
  7575. names: LISTofSTRING8
  7576. .\" End marker code here
  7577. .in -.2i
  7578. .LP
  7579. This request returns a list of all extensions supported by the server.
  7580. .LP
  7581. .\" Start marker code here
  7582. .IN "SetModifierMapping" "" "@DEF@"
  7583. .PN SetModifierMapping
  7584. .in +.2i
  7585. .LP
  7586. \fIkeycodes-per-modifier\fP\^: CARD8
  7587. .br
  7588. \fIkeycodes\fP\^: LISTofKEYCODE
  7589. .in -.2i
  7590. .LP
  7591.    =>
  7592. .in +.2i
  7593. .LP
  7594. status: 
  7595. .Pn { Success , 
  7596. .PN Busy , 
  7597. .PN Failed }
  7598. .LP
  7599. Errors: 
  7600. .PN Alloc ,
  7601. .PN Value
  7602. .\" End marker code here
  7603. .in -.2i
  7604. .LP
  7605. This request specifies the keycodes (if any) of the keys to be used as 
  7606. modifiers.
  7607. The number of keycodes in the list must be 8*keycodes-per-modifier (or a 
  7608. .PN Length 
  7609. error results).
  7610. The keycodes are divided into eight sets, 
  7611. with each set containing keycodes-per-modifier elements.
  7612. The sets are assigned to the modifiers 
  7613. .PN Shift , 
  7614. .PN Lock , 
  7615. .PN Control , 
  7616. .PN Mod1 ,
  7617. .PN Mod2 , 
  7618. .PN Mod3 , 
  7619. .PN Mod4 , 
  7620. and 
  7621. .PN Mod5 ,
  7622. in order.
  7623. Only nonzero keycode values are used within each set; 
  7624. zero values are ignored.
  7625. All of the nonzero keycodes must be in the range specified by min-keycode 
  7626. and max-keycode in the connection setup (or a 
  7627. .PN Value 
  7628. error results).
  7629. The order of keycodes within a set does not matter.
  7630. If no nonzero values are specified in a set,
  7631. the use of the corresponding modifier is disabled, 
  7632. and the modifier bit will always be zero.
  7633. Otherwise, the modifier bit will be one whenever
  7634. at least one of the keys in the corresponding set is in the down
  7635. position.
  7636. .LP
  7637. A server can impose restrictions on how modifiers can be changed (for example,
  7638. if certain keys do not generate up transitions in hardware,
  7639. if auto-repeat cannot be disabled on certain keys,
  7640. or if multiple keys per modifier are not supported).
  7641. The status reply is 
  7642. .PN Failed 
  7643. if some such restriction is violated, 
  7644. and none of the modifiers is changed.
  7645. .LP
  7646. If the new nonzero keycodes specified for a modifier differ from those
  7647. currently defined and any (current or new) keys for that modifier are
  7648. logically in the down state, then the status reply is 
  7649. .PN Busy , 
  7650. and none of the modifiers is changed.
  7651. .LP
  7652. This request generates a 
  7653. .PN MappingNotify 
  7654. event on a 
  7655. .PN Success 
  7656. status.
  7657. .sp
  7658. .LP
  7659. .\" Start marker code here
  7660. .IN "GetModifierMapping" "" "@DEF@"
  7661. .PN GetModifierMapping
  7662. .LP
  7663.    =>
  7664. .in +.2i
  7665. .LP
  7666. keycodes-per-modifier: CARD8
  7667. .br
  7668. keycodes: LISTofKEYCODE
  7669. .\" End marker code here
  7670. .in -.2i
  7671. .LP
  7672. This request returns the keycodes of the keys being used as modifiers.
  7673. The number of keycodes in the list is 8*keycodes-per-modifier.
  7674. The keycodes are divided into eight sets, 
  7675. with each set containing keycodes-per-modifier elements.
  7676. The sets are assigned to the modifiers 
  7677. .PN Shift ,
  7678. .PN Lock ,
  7679. .PN Control ,
  7680. .PN Mod1 ,
  7681. .PN Mod2 ,
  7682. .PN Mod3 ,
  7683. .PN Mod4 ,
  7684. and
  7685. .PN Mod5 ,
  7686. in order.
  7687. The keycodes-per-modifier value is chosen arbitrarily by the server; 
  7688. zeroes are used to fill in unused elements within each set.
  7689. If only zero values are given in a set,
  7690. the use of the corresponding modifier has been disabled.
  7691. The order of keycodes within each set is chosen arbitrarily by the server.
  7692. .sp
  7693. .LP
  7694. .\" Start marker code here
  7695. .IN "ChangeKeyboardMapping" "" "@DEF@"
  7696. .PN ChangeKeyboardMapping
  7697. .in +.2i
  7698. .LP
  7699. \fIfirst-keycode\fP\^: KEYCODE
  7700. .br
  7701. \fIkeysyms-per-keycode\fP\^: CARD8
  7702. .br
  7703. \fIkeysyms\fP\^: LISTofKEYSYM
  7704. .LP
  7705. Errors: 
  7706. .PN Alloc ,
  7707. .PN Value
  7708. .\" End marker code here
  7709. .in -.2i
  7710. .LP
  7711. This request defines the symbols for the specified number of keycodes, 
  7712. starting with the specified keycode.
  7713. The symbols for keycodes outside this range remained unchanged.
  7714. The number of elements in the keysyms list must be a multiple of 
  7715. keysyms-per-keycode (or a 
  7716. .PN Length 
  7717. error results).
  7718. The first-keycode must be greater than or equal to min-keycode as returned 
  7719. in the connection setup (or a 
  7720. .PN Value 
  7721. error results) and:
  7722. .DS
  7723. first-keycode + (keysyms-length / keysyms-per-keycode) \- 1
  7724. .DE
  7725. .LP
  7726. must be less than or equal to max-keycode as returned in the connection
  7727. setup (or a 
  7728. .PN Value 
  7729. error results).
  7730. KEYSYM number N (counting from zero) for keycode K has an index 
  7731. (counting from zero) of:
  7732. .DS
  7733. (K \- first-keycode) * keysyms-per-keycode + N
  7734. .DE
  7735. .LP
  7736. in keysyms.
  7737. The keysyms-per-keycode can be chosen arbitrarily by the client
  7738. to be large enough to hold all desired symbols.
  7739. A special KEYSYM value of 
  7740. .PN NoSymbol 
  7741. should be used to fill in unused elements for individual keycodes.
  7742. It is legal for 
  7743. .PN NoSymbol 
  7744. to appear in nontrailing positions of the effective list for a keycode.
  7745. .LP
  7746. This request generates a 
  7747. .PN MappingNotify 
  7748. event.
  7749. .LP
  7750. There is no requirement that the server interpret this mapping; 
  7751. it is merely stored for reading and writing by clients (see section 5).
  7752. .sp
  7753. .LP
  7754. .\" Start marker code here
  7755. .IN "GetKeyboardMapping" "" "@DEF@"
  7756. .PN GetKeyboardMapping
  7757. .in +.2i
  7758. .LP
  7759. \fIfirst-keycode\fP\^: KEYCODE
  7760. .br
  7761. \fIcount\fP\^: CARD8
  7762. .in -.2i
  7763. .LP
  7764.    =>
  7765. .in +.2i
  7766. .LP
  7767. keysyms-per-keycode: CARD8
  7768. .br
  7769. keysyms: LISTofKEYSYM
  7770. .LP
  7771. Errors: 
  7772. .PN Value
  7773. .\" End marker code here
  7774. .in -.2i
  7775. .LP
  7776. This request returns the symbols for the specified number of keycodes, 
  7777. starting with the specified keycode.
  7778. The first-keycode must be greater than or equal to
  7779. min-keycode as returned in the connection setup (or a 
  7780. .PN Value 
  7781. error results), and:
  7782. .DS
  7783. first-keycode + count \- 1
  7784. .DE
  7785. .LP
  7786. must be less than or equal to max-keycode as returned in the connection setup 
  7787. (or a 
  7788. .PN Value 
  7789. error results).
  7790. The number of elements in the keysyms list is:
  7791. .DS
  7792. count * keysyms-per-keycode
  7793. .DE
  7794. .LP
  7795. and KEYSYM number N (counting from zero) for keycode K has an index
  7796. (counting from zero) of:
  7797. .DS
  7798. (K \- first-keycode) * keysyms-per-keycode + N
  7799. .DE
  7800. .LP
  7801. in keysyms.
  7802. The keysyms-per-keycode value is chosen arbitrarily by the server 
  7803. to be large enough to report all requested symbols.
  7804. A special KEYSYM value of 
  7805. .PN NoSymbol 
  7806. is used to fill in unused elements for individual keycodes.
  7807. .sp
  7808. .LP
  7809. .\" Start marker code here
  7810. .IN "ChangeKeyboardControl" "" "@DEF@"
  7811. .PN ChangeKeyboardControl
  7812. .in +.2i
  7813. .LP
  7814. \fIvalue-mask\fP\^: BITMASK
  7815. .br
  7816. \fIvalue-list\fP\^: LISTofVALUE
  7817. .LP
  7818. Errors: 
  7819. .PN Match , 
  7820. .PN Value
  7821. .\" End marker code here
  7822. .in -.2i
  7823. .LP
  7824. This request controls various aspects of the keyboard.
  7825. The value-mask and value-list specify which controls are to be changed.
  7826. The possible values are:
  7827. .TS H
  7828. l l.
  7829. _
  7830. .sp 6p
  7831. .B
  7832. Control    Type
  7833. .sp 6p
  7834. _
  7835. .TH
  7836. .R
  7837. .sp 6p
  7838. T{
  7839. key-click-percent
  7840. T}    T{
  7841. INT8
  7842. T}
  7843. T{
  7844. bell-percent
  7845. T}    T{
  7846. INT8
  7847. T}
  7848. T{
  7849. bell-pitch
  7850. T}    T{
  7851. INT16
  7852. T}
  7853. T{
  7854. bell-duration
  7855. T}    T{
  7856. INT16
  7857. T}
  7858. T{
  7859. led
  7860. T}    T{
  7861. CARD8
  7862. T}
  7863. T{
  7864. led-mode
  7865. T}    T{
  7866. .Pn { On , 
  7867. .PN Off }
  7868. T}
  7869. T{
  7870. key
  7871. T}    T{
  7872. KEYCODE
  7873. T}
  7874. T{
  7875. auto-repeat-mode
  7876. T}    T{
  7877. .Pn { On , 
  7878. .PN Off , 
  7879. .PN Default }
  7880. T}
  7881. .sp 6p
  7882. _
  7883. .TE
  7884. .LP
  7885. The key-click-percent sets the volume for key clicks between 0 (off) and
  7886. 100 (loud) inclusive, if possible.
  7887. Setting to \-1 restores the default.
  7888. Other negative values generate a 
  7889. .PN Value 
  7890. error.
  7891. .LP
  7892. The bell-percent sets the base volume for the bell between 0 (off) and 100
  7893. (loud) inclusive, if possible.
  7894. Setting to \-1 restores the default.
  7895. Other negative values generate a 
  7896. .PN Value 
  7897. error.
  7898. .LP
  7899. The bell-pitch sets the pitch (specified in Hz) of the bell, if possible.
  7900. Setting to \-1 restores the default.
  7901. Other negative values generate a
  7902. .PN Value 
  7903. error.
  7904. .LP
  7905. The bell-duration sets the duration of the bell (specified in milliseconds),
  7906. if possible.
  7907. Setting to \-1 restores the default.
  7908. Other negative values generate a 
  7909. .PN Value 
  7910. error.
  7911. .LP
  7912. If both led-mode and led are specified, 
  7913. then the state of that LED is changed, if possible.
  7914. If only led-mode is specified, 
  7915. then the state of all LEDs are changed, if possible.
  7916. At most 32 LEDs, numbered from one, are supported.
  7917. No standard interpretation of LEDs is defined.
  7918. It is a 
  7919. .PN Match 
  7920. error if an led is specified without an led-mode.
  7921. .LP
  7922. If both auto-repeat-mode and key are specified, 
  7923. then the auto-repeat mode of that key is changed, if possible.
  7924. If only auto-repeat-mode is specified, 
  7925. then the global auto-repeat mode for the entire keyboard is changed, 
  7926. if possible, without affecting the per-key settings.
  7927. It is a
  7928. .PN Match 
  7929. error if a key is specified without an auto-repeat-mode.
  7930. Each key has an individual mode of whether or not it should auto-repeat
  7931. and a default setting for that mode.
  7932. In addition, there is a global mode of whether auto-repeat should be 
  7933. enabled or not and a default setting for that mode.
  7934. When the global mode is
  7935. .PN On ,
  7936. keys should obey their individual auto-repeat modes.
  7937. When the global mode is
  7938. .PN Off ,
  7939. no keys should auto-repeat.
  7940. An auto-repeating key generates alternating
  7941. .PN KeyPress
  7942. and
  7943. .PN KeyRelease
  7944. events.
  7945. When a key is used as a modifier,
  7946. it is desirable for the key not to auto-repeat,
  7947. regardless of the auto-repeat setting for that key.
  7948. .LP
  7949. A bell generator connected with the console but not directly on the
  7950. keyboard is treated as if it were part of the keyboard.
  7951. .LP
  7952. The order in which controls are verified and altered is server-dependent.
  7953. If an error is generated, 
  7954. a subset of the controls may have been altered.
  7955. .sp
  7956. .LP
  7957. .\" Start marker code here
  7958. .IN "GetKeyboardControl" "" "@DEF@"
  7959. .PN GetKeyboardControl
  7960. .LP
  7961.    =>
  7962. .in +.2i
  7963. .LP
  7964. key-click-percent: CARD8
  7965. .br
  7966. bell-percent: CARD8
  7967. .br
  7968. bell-pitch: CARD16
  7969. .br
  7970. bell-duration: CARD16
  7971. .br
  7972. led-mask: CARD32
  7973. .br
  7974. global-auto-repeat: 
  7975. .Pn { On , 
  7976. .PN Off }
  7977. .br
  7978. auto-repeats: LISTofCARD8
  7979. .\" End marker code here
  7980. .in -.2i
  7981. .LP
  7982. This request returns the current control values for the keyboard.
  7983. For the LEDs, 
  7984. the least-significant bit of led-mask corresponds to LED one, 
  7985. and each one bit in led-mask indicates an LED that is lit.
  7986. The auto-repeats is a bit vector; 
  7987. each one bit indicates that auto-repeat is enabled for the corresponding key.
  7988. The vector is represented as 32 bytes.
  7989. Byte N (from 0) contains the bits for keys 8N to 8N + 7, 
  7990. with the least-significant bit in the byte representing key 8N.
  7991. .sp
  7992. .LP
  7993. .\" Start marker code here
  7994. .IN "Bell" "" "@DEF@"
  7995. .PN Bell
  7996. .in +.2i
  7997. .LP
  7998. \fIpercent\fP\^: INT8
  7999. .LP
  8000. Errors: 
  8001. .PN Value
  8002. .\" End marker code here
  8003. .in -.2i
  8004. .LP
  8005. This request rings the bell on the keyboard at a volume relative to the 
  8006. base volume for the keyboard, if possible.
  8007. Percent can range from \-100 to 100 inclusive (or a 
  8008. .PN Value 
  8009. error results).
  8010. The volume at which the bell is rung when percent is nonnegative is:
  8011. .DS
  8012. base \- [(base * percent) / 100] + percent
  8013. .DE
  8014. .LP
  8015. When percent is negative, it is:
  8016. .DS
  8017. base + [(base * percent) / 100]
  8018. .DE
  8019. .sp
  8020. .LP
  8021. .\" Start marker code here
  8022. .IN "SetPointerMapping" "" "@DEF@"
  8023. .PN SetPointerMapping
  8024. .in +.2i
  8025. .LP
  8026. \fImap\fP\^: LISTofCARD8
  8027. .in -.2i
  8028. .LP
  8029.    =>
  8030. .in +.2i
  8031. .LP
  8032. status: 
  8033. .Pn { Success , 
  8034. .PN Busy }
  8035. .LP
  8036. Errors: 
  8037. .PN Value
  8038. .\" End marker code here
  8039. .in -.2i
  8040. .LP
  8041. This request sets the mapping of the pointer.
  8042. Elements of the list are indexed starting from one.
  8043. The length of the list must be the same as 
  8044. .PN GetPointerMapping 
  8045. would return (or a 
  8046. .PN Value 
  8047. error results).
  8048. The index is a core button number, 
  8049. and the element of the list defines the effective number.
  8050. .LP
  8051. A zero element disables a button. 
  8052. Elements are not restricted in value by the number of physical buttons, 
  8053. but no two elements can have the same nonzero value (or a 
  8054. .PN Value 
  8055. error results).
  8056. .LP
  8057. If any of the buttons to be altered are logically in the down state,
  8058. the status reply is 
  8059. .PN Busy ,
  8060. and the mapping is not changed.
  8061. .LP
  8062. This request generates a 
  8063. .PN MappingNotify 
  8064. event on a 
  8065. .PN Success 
  8066. status.
  8067. .sp
  8068. .LP
  8069. .\" Start marker code here
  8070. .IN "GetPointerMapping" "" "@DEF@"
  8071. .PN GetPointerMapping
  8072. .LP
  8073.    =>
  8074. .in +.2i
  8075. .LP
  8076. map: LISTofCARD8
  8077. .\" End marker code here
  8078. .in -.2i
  8079. .LP
  8080. This request returns the current mapping of the pointer.
  8081. Elements of the list are indexed starting from one.
  8082. The length of the list indicates the number of physical buttons.
  8083. .LP
  8084. The nominal mapping for a pointer is the identity mapping: map[i]=i.
  8085. .sp
  8086. .LP
  8087. .\" Start marker code here
  8088. .IN "ChangePointerControl" "" "@DEF@"
  8089. .PN ChangePointerControl
  8090. .in +.2i
  8091. .LP
  8092. \fIdo-acceleration\fP, \fIdo-threshold\fP\^: BOOL
  8093. .br
  8094. \fIacceleration-numerator\fP, \fIacceleration-denominator\fP\^: INT16
  8095. .br
  8096. \fIthreshold\fP\^: INT16
  8097. .LP
  8098. Errors: 
  8099. .PN Value
  8100. .\" End marker code here
  8101. .in -.2i
  8102. .LP
  8103. This request defines how the pointer moves.
  8104. The acceleration is a multiplier for movement expressed as a fraction.
  8105. For example, 
  8106. specifying 3/1 means the pointer moves three times as fast as normal.
  8107. The fraction can be rounded arbitrarily by the server.
  8108. Acceleration only takes effect if the pointer moves more than threshold 
  8109. number of pixels at once and only applies to the amount beyond the threshold.
  8110. Setting a value to \-1 restores the default.
  8111. Other negative values generate a 
  8112. .PN Value 
  8113. error, as does a zero value for acceleration-denominator.
  8114. .sp
  8115. .LP
  8116. .\" Start marker code here
  8117. .IN "GetPointerControl" "" "@DEF@"
  8118. .PN GetPointerControl
  8119. .LP
  8120.    =>
  8121. .in +.2i
  8122. .LP
  8123. acceleration-numerator, acceleration-denominator: CARD16
  8124. .br
  8125. threshold: CARD16
  8126. .\" End marker code here
  8127. .in -.2i
  8128. .LP
  8129. This request returns the current acceleration and threshold for the pointer.
  8130. .sp
  8131. .LP
  8132. .\" Start marker code here
  8133. .IN "SetScreenSaver" "" "@DEF@"
  8134. .PN SetScreenSaver
  8135. .in +.2i
  8136. .LP
  8137. \fItimeout\fP, \fIinterval\fP\^: INT16
  8138. .br
  8139. \fIprefer-blanking\fP\^: 
  8140. .Pn { Yes , 
  8141. .PN No , 
  8142. .PN Default }
  8143. .br
  8144. \fIallow-exposures\fP\^: 
  8145. .Pn { Yes , 
  8146. .PN No , 
  8147. .PN Default }
  8148. .LP
  8149. Errors: 
  8150. .PN Value
  8151. .\" End marker code here
  8152. .in -.2i
  8153. .LP
  8154. The timeout and interval are specified in seconds; 
  8155. setting a value to \-1 restores the default.
  8156. Other negative values generate a 
  8157. .PN Value 
  8158. error.
  8159. If the timeout value is zero, 
  8160. screen-saver is disabled (but an activated screen-saver is not deactivated).
  8161. If the timeout value is nonzero, 
  8162. screen-saver is enabled.
  8163. Once screen-saver is enabled,
  8164. if no input from the keyboard or pointer is generated for timeout seconds, 
  8165. screen-saver is activated.
  8166. For each screen, 
  8167. if blanking is preferred and the hardware supports video blanking,
  8168. the screen will simply go blank.
  8169. Otherwise, 
  8170. if either exposures are allowed or the screen can be regenerated without 
  8171. sending exposure events to clients, 
  8172. the screen is changed in a server-dependent fashion to avoid phosphor burn.
  8173. Otherwise, 
  8174. the state of the screens does not change, and screen-saver is not activated.
  8175. At the next keyboard or pointer input or at the next 
  8176. .PN ForceScreenSaver 
  8177. with mode 
  8178. .PN Reset ,
  8179. screen-saver is deactivated, and all screen states are restored.
  8180. .LP
  8181. If the server-dependent screen-saver method is amenable to periodic change, 
  8182. interval serves as a hint about how long the change period should be, 
  8183. with zero hinting that no periodic change should be made.
  8184. Examples of ways to change the screen include scrambling the color map 
  8185. periodically, moving an icon image about the screen periodically, or
  8186. tiling the screen with the root window background tile, 
  8187. randomly reorigined periodically.
  8188. .sp
  8189. .LP
  8190. .\" Start marker code here
  8191. .IN "GetScreenSaver" "" "@DEF@"
  8192. .PN GetScreenSaver
  8193. .LP
  8194.    =>
  8195. .in +.2i
  8196. .LP
  8197. timeout, interval: CARD16
  8198. .br
  8199. prefer-blanking: 
  8200. .Pn { Yes , 
  8201. .PN No }
  8202. .br
  8203. allow-exposures: 
  8204. .Pn { Yes , 
  8205. .PN No }
  8206. .\" End marker code here
  8207. .in -.2i
  8208. .LP
  8209. This request returns the current screen-saver control values.
  8210. .sp
  8211. .LP
  8212. .\" Start marker code here
  8213. .IN "ForceScreenSaver" "" "@DEF@"
  8214. .PN ForceScreenSaver
  8215. .in +.2i
  8216. .LP
  8217. \fImode\fP\^: 
  8218. .Pn { Activate , 
  8219. .PN Reset }
  8220. .LP
  8221. Errors: 
  8222. .PN Value
  8223. .\" End marker code here
  8224. .in -.2i
  8225. .LP
  8226. If the mode is 
  8227. .PN Activate 
  8228. and screen-saver is currently deactivated, 
  8229. then screen-saver is activated (even if screen-saver has been disabled with
  8230. a timeout value of zero).
  8231. If the mode is 
  8232. .PN Reset 
  8233. and screen-saver is currently enabled, 
  8234. then screen-saver is deactivated (if it was activated), 
  8235. and the activation timer is reset to its initial state
  8236. as if device input had just been received.
  8237. .sp
  8238. .LP
  8239. .\" Start marker code here
  8240. .IN "ChangeHosts" "" "@DEF@"
  8241. .PN ChangeHosts
  8242. .in +.2i
  8243. .LP
  8244. \fImode\fP\^: 
  8245. .Pn { Insert , 
  8246. .PN Delete }
  8247. .br
  8248. \fIhost\fP: HOST
  8249. .LP
  8250. Errors: 
  8251. .PN Access , 
  8252. .PN Value
  8253. .\" End marker code here
  8254. .in -.2i
  8255. .LP
  8256. This request adds or removes the specified host from the access control list.
  8257. When the access control mechanism is enabled and a host attempts to
  8258. establish a connection to the server, 
  8259. the host must be in this list, or the server will refuse the connection.
  8260. .LP
  8261. The client must reside on the same host as the server and/or have been granted
  8262. permission by a server-dependent method to execute this request (or an 
  8263. .PN Access 
  8264. error results).
  8265. .LP
  8266. An initial access control list can usually be specified,
  8267. typically by naming a file that the server reads at startup and reset.
  8268. .LP
  8269. The following address families are defined.
  8270. A server is not required to support these families
  8271. and may support families not listed here.
  8272. Use of an unsupported family, an improper address format, 
  8273. or an improper address length within a supported family results in a 
  8274. .PN Value 
  8275. error.
  8276. .LP
  8277. For the Internet family, 
  8278. the address must be four bytes long.
  8279. The address bytes are in standard IP order;
  8280. the server performs no automatic swapping on the address bytes.
  8281. For a Class A address, 
  8282. the network number is the first byte in the address, 
  8283. and the host number is the remaining three bytes, most-significant byte first.
  8284. For a Class B address, 
  8285. the network number is the first two bytes and the host number
  8286. is the last two bytes, each most-significant byte first.
  8287. For a Class C address, 
  8288. the network number is the first three bytes, most-significant byte first, 
  8289. and the last byte is the host number.
  8290. .LP
  8291. For the DECnet family, 
  8292. the server performs no automatic swapping on the address bytes.
  8293. A Phase IV address is two bytes long:
  8294. the first byte contains the least-significant eight bits of the node number,
  8295. and the second byte contains the most-significant two bits of the node number in
  8296. the least-significant two bits of the byte and the area in the most
  8297. significant six bits of the byte.
  8298. .LP
  8299. For the Chaos family, 
  8300. the address must be two bytes long.
  8301. The host number is always the first byte in the address, 
  8302. and the subnet number is always the second byte.
  8303. The server performs no automatic swapping on the address bytes.
  8304. .sp
  8305. .LP
  8306. .\" Start marker code here
  8307. .IN "ListHosts" "" "@DEF@"
  8308. .PN ListHosts
  8309. .LP
  8310.    =>
  8311. .in +.2i
  8312. .LP
  8313. mode: 
  8314. .Pn { Enabled , 
  8315. .PN Disabled }
  8316. .br
  8317. hosts: LISTofHOST
  8318. .\" End marker code here
  8319. .in -.2i
  8320. .LP
  8321. This request returns the hosts on the access control list 
  8322. and whether use of the list at connection setup is currently 
  8323. enabled or disabled.
  8324. .LP
  8325. Each HOST is padded to a multiple of four bytes.
  8326. .sp
  8327. .LP
  8328. .\" Start marker code here
  8329. .IN "SetAccessControl" "" "@DEF@"
  8330. .PN SetAccessControl
  8331. .in +.2i
  8332. .LP
  8333. \fImode\fP\^: 
  8334. .Pn { Enable , 
  8335. .PN Disable }
  8336. .LP
  8337. Errors: 
  8338. .PN Access ,
  8339. .PN Value
  8340. .\" End marker code here
  8341. .in -.2i
  8342. .LP
  8343. This request enables or disables the use of the access control list 
  8344. at connection setups.
  8345. .LP
  8346. The client must reside on the same host as the server
  8347. and/or have been granted permission by a server-dependent method 
  8348. to execute this request (or an 
  8349. .PN Access 
  8350. error results).
  8351. .sp
  8352. .LP
  8353. .\" Start marker code here
  8354. .IN "SetCloseDownMode" "" "@DEF@"
  8355. .PN SetCloseDownMode
  8356. .in +.2i
  8357. .LP
  8358. \fImode\fP: 
  8359. .Pn { Destroy , 
  8360. .PN RetainPermanent , 
  8361. .PN RetainTemporary }
  8362. .LP
  8363. Errors: 
  8364. .PN Value
  8365. .\" End marker code here
  8366. .in -.2i
  8367. .LP
  8368. This request defines what will happen to the client's resources 
  8369. at connection close.
  8370. A connection starts in 
  8371. .PN Destroy 
  8372. mode.
  8373. The meaning of the close-down mode is described in section 10.
  8374. .sp
  8375. .LP
  8376. .\" Start marker code here
  8377. .IN "KillClient" "" "@DEF@"
  8378. .PN KillClient
  8379. .in +.2i
  8380. .LP
  8381. \fIresource\fP\^: CARD32 or 
  8382. .PN AllTemporary
  8383. .LP
  8384. Errors: 
  8385. .PN Value
  8386. .\" End marker code here
  8387. .in -.2i
  8388. .LP
  8389. If a valid resource is specified, 
  8390. .PN KillClient
  8391. forces a close-down of the client that created the resource.
  8392. If the client has already terminated in either 
  8393. .PN RetainPermanent 
  8394. or 
  8395. .PN RetainTemporary 
  8396. mode, all of the client's resources are destroyed (see section 10).
  8397. If 
  8398. .PN AllTemporary 
  8399. is specified, 
  8400. then the resources of all clients that have terminated in
  8401. .PN RetainTemporary 
  8402. are destroyed.
  8403. .sp
  8404. .LP
  8405. .\" Start marker code here
  8406. .IN "NoOperation" "" "@DEF@"
  8407. .PN NoOperation
  8408. .\" End marker code here
  8409. .LP
  8410. This request has no arguments and no results, 
  8411. but the request length field can be nonzero, 
  8412. which allows the request to be any multiple of four bytes in length.
  8413. The bytes contained in the request are uninterpreted by the server.
  8414. .LP
  8415. This request can be used in its minimum four byte form as padding where
  8416. necessary by client libraries that find it convenient to force requests
  8417. to begin on 64-bit boundaries.
  8418. .NH 1
  8419. Connection Close
  8420. .XS
  8421. \*(SN Connection Close
  8422. .XE
  8423. .LP
  8424. At connection close,
  8425. all event selections made by the client are discarded.
  8426. If the client has the pointer actively grabbed, an 
  8427. .PN UngrabPointer 
  8428. is performed.
  8429. If the client has the keyboard actively grabbed, an 
  8430. .PN UngrabKeyboard 
  8431. is performed.
  8432. All passive grabs by the client are released.
  8433. If the client has the server grabbed, an 
  8434. .PN UngrabServer 
  8435. is performed.
  8436. All selections (see 
  8437. .PN SetSelectionOwner 
  8438. request)
  8439. owned by the client are disowned.
  8440. If close-down mode (see 
  8441. .PN SetCloseDownMode 
  8442. request) is 
  8443. .PN RetainPermanent 
  8444. or 
  8445. .PN RetainTemporary , 
  8446. then all resources (including colormap entries)
  8447. allocated by the client are marked as permanent or temporary,
  8448. respectively (but this does not prevent other clients from explicitly
  8449. destroying them).
  8450. If the mode is 
  8451. .PN Destroy , 
  8452. all of the client's resources are destroyed.
  8453. .LP
  8454. When a client's resources are destroyed,
  8455. for each window in the client's save-set, 
  8456. if the window is an inferior of a window created by the client, 
  8457. the save-set window is reparented to the closest ancestor such that 
  8458. the save-set window is not an inferior of a window created by the client.
  8459. If the save-set window is unmapped, a 
  8460. .PN MapWindow 
  8461. request is performed on it (even if it was not an inferior
  8462. of a window created by the client).
  8463. The reparenting leaves unchanged the absolute coordinates
  8464. (with respect to the root window) of the upper-left outer corner of the
  8465. save-set window.
  8466. After save-set processing, 
  8467. all windows created by the client are destroyed.
  8468. For each nonwindow resource created by the client,
  8469. the appropriate 
  8470. .PN Free 
  8471. request is performed.
  8472. All colors and colormap entries allocated by the client are freed.
  8473. .LP
  8474. A server goes through a cycle of having no connections and having some
  8475. connections.
  8476. At every transition to the state of having no connections
  8477. as a result of a connection closing with a 
  8478. .PN Destroy 
  8479. close-down mode, 
  8480. the server resets its state as if it had just been started.
  8481. This starts by destroying all lingering resources from clients 
  8482. that have terminated in 
  8483. .PN RetainPermanent 
  8484. or 
  8485. .PN RetainTemporary 
  8486. mode.
  8487. It additionally includes deleting all but the predefined atom identifiers, 
  8488. deleting all properties on all root windows, resetting all device maps and
  8489. attributes (key click, bell volume, acceleration), resetting the access
  8490. control list, restoring the standard root tiles and cursors, restoring
  8491. the default font path, and restoring the input focus to state
  8492. .PN PointerRoot .
  8493. .LP
  8494. Note that closing a connection with a close-down mode of
  8495. .PN RetainPermanent 
  8496. or 
  8497. .PN RetainTemporary 
  8498. will not cause the server to reset.
  8499. .NH 1
  8500. Events
  8501. .XS
  8502. \*(SN Events
  8503. .XE
  8504. .LP
  8505. When a button press is processed with the pointer in some window W
  8506. and no active pointer grab is in progress, 
  8507. the ancestors of W are searched from the root down, 
  8508. looking for a passive grab to activate.
  8509. If no matching passive grab on the button exists, 
  8510. then an active grab is started automatically for the client receiving the event,
  8511. and the last-pointer-grab time is set to the current server time.
  8512. The effect is essentially equivalent to a 
  8513. .PN GrabButton
  8514. with arguments:
  8515. .TS H
  8516. lw(2.25i) lw(3.25i).
  8517. _
  8518. .sp 6p
  8519. .B
  8520. Argument    Value
  8521. .sp 6p
  8522. _
  8523. .TH
  8524. .R
  8525. .sp 6p
  8526. T{
  8527. event-window
  8528. T}    T{
  8529. Event window
  8530. T}
  8531. T{
  8532. event-mask
  8533. T}    T{
  8534. Client's selected pointer events on the event window
  8535. T}
  8536. T{
  8537. pointer-mode and keyboard-mode
  8538. T}    T{
  8539. .PN Asynchronous
  8540. T}
  8541. T{
  8542. owner-events
  8543. T}    T{
  8544. .PN True 
  8545. if the client has 
  8546. .PN OwnerGrabButton 
  8547. selected on the event window, otherwise 
  8548. .PN False
  8549. T}
  8550. T{
  8551. confine-to
  8552. T}    T{
  8553. .PN None
  8554. T}
  8555. T{
  8556. cursor
  8557. T}    T{
  8558. .PN None
  8559. T}
  8560. .sp 6p
  8561. _
  8562. .TE
  8563. .LP
  8564. The grab is terminated automatically when the logical state of the pointer
  8565. has all buttons released.
  8566. .PN UngrabPointer 
  8567. and 
  8568. .PN ChangeActivePointerGrab 
  8569. can both be used to modify the active grab.
  8570. .sp
  8571. .LP
  8572. .\" Start marker code here
  8573. .IN "KeyPress" "" "@DEF@"
  8574. .PN KeyPress
  8575. .br
  8576. .IN "KeyRelease" "" "@DEF@"
  8577. .PN KeyRelease
  8578. .br
  8579. .IN "ButtonPress" "" "@DEF@"
  8580. .PN ButtonPress
  8581. .br
  8582. .IN "ButtonRelease" "" "@DEF@"
  8583. .PN ButtonRelease
  8584. .br
  8585. .IN "MotionNotify" "" "@DEF@"
  8586. .PN MotionNotify
  8587. .in +.2i
  8588. .LP
  8589. \fIroot\fP, \fIevent\fP\^: WINDOW
  8590. .br
  8591. \fIchild\fP\^: WINDOW or 
  8592. .PN None
  8593. .br
  8594. \fIsame-screen\fP\^: BOOL
  8595. .br
  8596. \fIroot-x\fP, \fIroot-y\fP, \fIevent-x\fP, \fIevent-y\fP\^: INT16
  8597. .br
  8598. \fIdetail\fP\^: <see below>
  8599. .br
  8600. \fIstate\fP\^: SETofKEYBUTMASK
  8601. .br
  8602. \fItime\fP\^: TIMESTAMP
  8603. .\" End marker code here
  8604. .in -.2i
  8605. .LP
  8606. These events are generated either when a key or button logically changes state
  8607. or when the pointer logically moves.
  8608. The generation of these logical changes may lag the physical changes
  8609. if device event processing is frozen.
  8610. Note that
  8611. .PN KeyPress 
  8612. and 
  8613. .PN KeyRelease 
  8614. are generated for all keys, even those mapped to modifier bits.
  8615. The source of the event is the window the pointer is in.
  8616. The window the event is reported with respect to is called the event window.
  8617. The event window is found by starting with the source window and 
  8618. looking up the hierarchy for the first window on which any client has selected 
  8619. interest in the event (provided no intervening window prohibits event 
  8620. generation by including the event type in its do-not-propagate-mask).
  8621. The actual window used for reporting can be modified by active grabs and, 
  8622. in the case of keyboard events, can be modified by the focus window.
  8623. .LP
  8624. The root is the root window of the source window, 
  8625. and root-x and root-y are the pointer coordinates relative to root's origin 
  8626. at the time of the event.
  8627. Event is the event window.
  8628. If the event window is on the same screen as root, 
  8629. then event-x and event-y are the pointer coordinates relative to the 
  8630. event window's origin.
  8631. Otherwise, event-x and event-y are zero.
  8632. If the source window is an inferior of the event window, 
  8633. then child is set to the child of the event window that is an
  8634. ancestor of (or is) the source window.
  8635. Otherwise, it is set to 
  8636. .PN None .
  8637. The state component gives the logical state of the buttons and modifier keys
  8638. just before the event.
  8639. The detail component type varies with the event type:
  8640. .TS H
  8641. l l.
  8642. _
  8643. .sp 6p
  8644. .B
  8645. Event    Component
  8646. .sp 6p
  8647. _
  8648. .TH
  8649. .R
  8650. .sp 6p
  8651. T{
  8652. .PN KeyPress , 
  8653. .PN KeyRelease 
  8654. T}    T{
  8655. KEYCODE
  8656. T}
  8657. T{
  8658. .PN ButtonPress , 
  8659. .PN ButtonRelease
  8660. T}    T{
  8661. BUTTON
  8662. T}
  8663. T{
  8664. .PN MotionNotify
  8665. T}    T{
  8666. .Pn { Normal , 
  8667. .PN Hint }
  8668. T}
  8669. .sp 6p
  8670. _
  8671. .TE
  8672. .LP
  8673. .PN MotionNotify 
  8674. events are only generated when the motion begins and ends in the window.
  8675. The granularity of motion events is not guaranteed, 
  8676. but a client selecting for motion events is guaranteed to get at least one
  8677. event when the pointer moves and comes to rest.
  8678. Selecting
  8679. .PN PointerMotion 
  8680. receives events independent of the state of the pointer buttons.
  8681. By selecting some subset of 
  8682. .PN Button[1-5]Motion
  8683. instead,
  8684. .PN MotionNotify 
  8685. events will only be received when one or more of the
  8686. specified buttons are pressed.
  8687. By selecting 
  8688. .PN ButtonMotion , 
  8689. .PN MotionNotify
  8690. events will be received only when at least one button is pressed.
  8691. The events are always of type 
  8692. .PN MotionNotify , 
  8693. independent of the selection.
  8694. If 
  8695. .PN PointerMotionHint 
  8696. is selected, 
  8697. the server is free to send only one
  8698. .PN MotionNotify 
  8699. event (with detail 
  8700. .PN Hint ) 
  8701. to the client for the event window until 
  8702. either the key or button state changes, 
  8703. the pointer leaves the event window, 
  8704. or the client issues a 
  8705. .PN QueryPointer 
  8706. or
  8707. .PN GetMotionEvents 
  8708. request.
  8709. .sp
  8710. .LP
  8711. .\" Start marker code here
  8712. .IN "EnterNotify" "" "@DEF@"
  8713. .PN EnterNotify
  8714. .br
  8715. .IN "LeaveNotify" "" "@DEF@"
  8716. .PN LeaveNotify
  8717. .in +.2i
  8718. .LP
  8719. \fIroot\fP, \fIevent\fP\^: WINDOW
  8720. .br
  8721. \fIchild\fP\^: WINDOW or 
  8722. .PN None
  8723. .br
  8724. \fIsame-screen\fP\^: BOOL
  8725. .br
  8726. \fIroot-x\fP, \fIroot-y\fP, \fIevent-x\fP, \fIevent-y\fP\^: INT16
  8727. .br
  8728. \fImode\fP\^: 
  8729. .Pn { Normal , 
  8730. .PN Grab , 
  8731. .PN Ungrab }
  8732. .br
  8733. \fIdetail\fP\^: 
  8734. .Pn { Ancestor , 
  8735. .PN Virtual ,
  8736. .PN Inferior , 
  8737. .PN Nonlinear , 
  8738. .PN NonlinearVirtual }
  8739. .br
  8740. \fIfocus\fP\^: BOOL
  8741. .br
  8742. \fIstate\fP\^: SETofKEYBUTMASK
  8743. .br
  8744. \fItime\fP\^: TIMESTAMP
  8745. .\" End marker code here
  8746. .in -.2i
  8747. .LP
  8748. If pointer motion or window hierarchy change causes the pointer to be
  8749. in a different window than before, 
  8750. .PN EnterNotify 
  8751. and 
  8752. .PN LeaveNotify 
  8753. events are generated instead of a 
  8754. .PN MotionNotify 
  8755. event.
  8756. Only clients selecting 
  8757. .PN EnterWindow 
  8758. on a window receive 
  8759. .PN EnterNotify 
  8760. events, and only clients selecting 
  8761. .PN LeaveWindow 
  8762. receive 
  8763. .PN LeaveNotify 
  8764. events.
  8765. The pointer position reported in the event is always the final position, 
  8766. not the initial position of the pointer.
  8767. The root is the root window for this position,
  8768. and root-x and root-y are the pointer coordinates relative to root's
  8769. origin at the time of the event.
  8770. Event is the event window.
  8771. If the event window is on the same screen as root, 
  8772. then event-x and event-y are the pointer coordinates relative 
  8773. to the event window's origin.
  8774. Otherwise, event-x and event-y are zero.
  8775. In a 
  8776. .PN LeaveNotify 
  8777. event, if a child of the event window contains the initial position of the
  8778. pointer, then the child component is set to that child.
  8779. Otherwise, it is
  8780. .PN None .
  8781. For an 
  8782. .PN EnterNotify 
  8783. event, if a child of the event window contains the final pointer position, 
  8784. then the child component is set to that child.
  8785. Otherwise, it is 
  8786. .PN None .
  8787. If the event window is the focus window or an inferior of the focus window,
  8788. then focus is 
  8789. .PN True .
  8790. Otherwise, focus is 
  8791. .PN False .
  8792. .LP
  8793. Normal pointer motion events have mode 
  8794. .PN Normal .
  8795. Pseudo-motion events when a grab activates have mode 
  8796. .PN Grab , 
  8797. and pseudo-motion events when a grab deactivates have mode 
  8798. .PN Ungrab .
  8799. .LP
  8800. All 
  8801. .PN EnterNotify 
  8802. and 
  8803. .PN LeaveNotify 
  8804. events caused by a hierarchy change are generated after any hierarchy event 
  8805. caused by that change (that is,
  8806. .PN UnmapNotify , 
  8807. .PN MapNotify ,
  8808. .PN ConfigureNotify , 
  8809. .PN GravityNotify , 
  8810. .PN CirculateNotify ),
  8811. but the ordering of 
  8812. .PN EnterNotify 
  8813. and 
  8814. .PN LeaveNotify 
  8815. events with respect to
  8816. .PN FocusOut , 
  8817. .PN VisibilityNotify , 
  8818. and 
  8819. .PN Expose 
  8820. events is not constrained.
  8821. .LP
  8822. Normal events are generated as follows:
  8823. .LP
  8824. When the pointer moves from window A to window B and A is an inferior
  8825. of B:
  8826. .IP \(bu 5
  8827. .PN LeaveNotify 
  8828. with detail 
  8829. .PN Ancestor 
  8830. is generated on A.
  8831. .IP \(bu 5
  8832. .PN LeaveNotify 
  8833. with detail 
  8834. .PN Virtual 
  8835. is generated on each window between A and B exclusive (in that order).
  8836. .IP \(bu 5
  8837. .PN EnterNotify 
  8838. with detail 
  8839. .PN Inferior 
  8840. is generated on B.
  8841. .LP
  8842. When the pointer moves from window A to window B and B is an inferior
  8843. of A:
  8844. .IP \(bu 5
  8845. .PN LeaveNotify 
  8846. with detail 
  8847. .PN Inferior 
  8848. is generated on A.
  8849. .IP \(bu 5
  8850. .PN EnterNotify 
  8851. with detail 
  8852. .PN Virtual 
  8853. is generated on each window between A and B exclusive (in that order).
  8854. .IP \(bu 5
  8855. .PN EnterNotify 
  8856. with detail 
  8857. .PN Ancestor 
  8858. is generated on B.
  8859. .LP
  8860. When the pointer moves from window A to window B and window C is
  8861. their least common ancestor:
  8862. .IP \(bu 5
  8863. .PN LeaveNotify 
  8864. with detail 
  8865. .PN Nonlinear 
  8866. is generated on A.
  8867. .IP \(bu 5
  8868. .PN LeaveNotify 
  8869. with detail 
  8870. .PN NonlinearVirtual 
  8871. is generated on each window between A and C exclusive (in that order).
  8872. .IP \(bu 5
  8873. .PN EnterNotify 
  8874. with detail 
  8875. .PN NonlinearVirtual 
  8876. is generated on each window between C and B exclusive (in that order).
  8877. .IP \(bu 5
  8878. .PN EnterNotify 
  8879. with detail 
  8880. .PN Nonlinear 
  8881. is generated on B.
  8882. .LP
  8883. When the pointer moves from window A to window B on different screens:
  8884. .IP \(bu 5
  8885. .PN LeaveNotify 
  8886. with detail 
  8887. .PN Nonlinear 
  8888. is generated on A.
  8889. .IP \(bu 5
  8890. If A is not a root window, 
  8891. .PN LeaveNotify 
  8892. with detail 
  8893. .PN NonlinearVirtual 
  8894. is generated on each window above A up to and including its root (in order).
  8895. .IP \(bu 5
  8896. If B is not a root window, 
  8897. .PN EnterNotify 
  8898. with detail 
  8899. .PN NonlinearVirtual 
  8900. is generated on each window from B's root down to but not including B 
  8901. (in order).
  8902. .IP \(bu 5
  8903. .PN EnterNotify 
  8904. with detail 
  8905. .PN Nonlinear 
  8906. is generated on B.
  8907. .LP
  8908. When a pointer grab activates (but after any initial warp into a confine-to
  8909. window and before generating any actual 
  8910. .PN ButtonPress 
  8911. event that activates the grab), 
  8912. G is the grab-window for the grab, and P is the window the pointer is in:
  8913. .IP \(bu 5
  8914. .PN EnterNotify 
  8915. and 
  8916. .PN LeaveNotify 
  8917. events with mode 
  8918. .PN Grab 
  8919. are generated (as for
  8920. .PN Normal 
  8921. above) as if the pointer were to suddenly warp from its current
  8922. position in P to some position in G.
  8923. However, the pointer does not warp, 
  8924. and the pointer position is used as both the initial 
  8925. and final positions for the events.
  8926. .LP
  8927. When a pointer grab deactivates (but after generating any actual
  8928. .PN ButtonRelease 
  8929. event that deactivates the grab), G is the grab-window for
  8930. the grab, and P is the window the pointer is in:
  8931. .IP \(bu 5
  8932. .PN EnterNotify 
  8933. and 
  8934. .PN LeaveNotify 
  8935. events with mode 
  8936. .PN Ungrab 
  8937. are generated (as for 
  8938. .PN Normal 
  8939. above) as if the pointer were to suddenly warp from 
  8940. some position in G to its current position in P.
  8941. However, the pointer does not warp, 
  8942. and the current pointer position is used as both the initial 
  8943. and final positions for the events.
  8944. .sp
  8945. .LP
  8946. .\" Start marker code here
  8947. .IN "FocusIn" "" "@DEF@"
  8948. .PN FocusIn
  8949. .br
  8950. .IN "FocusOut" "" "@DEF@"
  8951. .PN FocusOut
  8952. .in +.2i
  8953. .LP
  8954. \fIevent\fP\^: WINDOW
  8955. .br
  8956. \fImode\fP\^:
  8957. .Pn { Normal , 
  8958. .PN WhileGrabbed , 
  8959. .PN Grab , 
  8960. .PN Ungrab }
  8961. .br
  8962. \fIdetail\fP\^:
  8963. .Pn { Ancestor , 
  8964. .PN Virtual , 
  8965. .PN Inferior , 
  8966. .PN Nonlinear , 
  8967. .PN NonlinearVirtual ,
  8968. .PN Pointer , 
  8969. .br
  8970. \ \ \ \ \ \ \ \ \ \ \ 
  8971. .PN PointerRoot , 
  8972. .PN None }
  8973. .\" End marker code here
  8974. .in -.2i
  8975. .LP
  8976. These events are generated when the input focus changes 
  8977. and are reported to clients selecting 
  8978. .PN FocusChange 
  8979. on the window.
  8980. Events generated by 
  8981. .PN SetInputFocus 
  8982. when the keyboard is not grabbed have mode 
  8983. .PN Normal .
  8984. Events generated by
  8985. .PN SetInputFocus 
  8986. when the keyboard is grabbed have mode 
  8987. .PN WhileGrabbed .
  8988. Events generated when a keyboard grab activates have mode 
  8989. .PN Grab , 
  8990. and events generated when a keyboard grab deactivates have mode 
  8991. .PN Ungrab .
  8992. .LP
  8993. All 
  8994. .PN FocusOut 
  8995. events caused by a window unmap are generated after any
  8996. .PN UnmapNotify 
  8997. event, but the ordering of 
  8998. .PN FocusOut 
  8999. with respect to generated 
  9000. .PN EnterNotify , 
  9001. .PN LeaveNotify , 
  9002. .PN VisibilityNotify , 
  9003. and 
  9004. .PN Expose 
  9005. events is not constrained.
  9006. .LP
  9007. .PN Normal 
  9008. and 
  9009. .PN WhileGrabbed 
  9010. events are generated as follows:
  9011. .LP
  9012. When the focus moves from window A to window B, A is an inferior of B,
  9013. and the pointer is in window P:
  9014. .IP \(bu 5
  9015. .PN FocusOut 
  9016. with detail 
  9017. .PN Ancestor 
  9018. is generated on A.
  9019. .IP \(bu 5
  9020. .PN FocusOut 
  9021. with detail 
  9022. .PN Virtual 
  9023. is generated on each window between A and B exclusive (in order).
  9024. .IP \(bu 5
  9025. .PN FocusIn 
  9026. with detail 
  9027. .PN Inferior 
  9028. is generated on B.
  9029. .IP \(bu 5
  9030. If P is an inferior of B
  9031. but P is not A or an inferior of A or an ancestor of A, 
  9032. .PN FocusIn 
  9033. with detail 
  9034. .PN Pointer 
  9035. is generated on each window below B down to and including P (in order).
  9036. .LP
  9037. When the focus moves from window A to window B, B is an inferior of A,
  9038. and the pointer is in window P:
  9039. .IP \(bu 5
  9040. If P is an inferior of A 
  9041. but P is not an inferior of B or an ancestor of B, 
  9042. .PN FocusOut 
  9043. with detail 
  9044. .PN Pointer 
  9045. is generated on each window from P up to but not including A (in order).
  9046. .IP \(bu 5
  9047. .PN FocusOut 
  9048. with detail 
  9049. .PN Inferior 
  9050. is generated on A.
  9051. .IP \(bu 5
  9052. .PN FocusIn 
  9053. with detail 
  9054. .PN Virtual 
  9055. is generated on each window between A and B exclusive (in order).
  9056. .IP \(bu 5
  9057. .PN FocusIn 
  9058. with detail 
  9059. .PN Ancestor 
  9060. is generated on B.
  9061. .LP
  9062. When the focus moves from window A to window B, window C is their
  9063. least common ancestor, and the pointer is in window P:
  9064. .IP \(bu 5
  9065. If P is an inferior of A, 
  9066. .PN FocusOut 
  9067. with detail 
  9068. .PN Pointer 
  9069. is generated on each window from P up to but not including A (in order).
  9070. .IP \(bu 5
  9071. .PN FocusOut 
  9072. with detail 
  9073. .PN Nonlinear 
  9074. is generated on A.
  9075. .IP \(bu 5
  9076. .PN FocusOut 
  9077. with detail 
  9078. .PN NonlinearVirtual 
  9079. is generated on each window between A and C exclusive (in order).
  9080. .IP \(bu 5
  9081. .PN FocusIn 
  9082. with detail 
  9083. .PN NonlinearVirtual 
  9084. is generated on each window between C and B exclusive (in order).
  9085. .IP \(bu 5
  9086. .PN FocusIn 
  9087. with detail 
  9088. .PN Nonlinear 
  9089. is generated on B.
  9090. .IP \(bu 5
  9091. If P is an inferior of B, 
  9092. .PN FocusIn 
  9093. with detail 
  9094. .PN Pointer 
  9095. is generated on each window below B down to and including P (in order).
  9096. .LP
  9097. When the focus moves from window A to window B on different screens
  9098. and the pointer is in window P:
  9099. .IP \(bu 5
  9100. If P is an inferior of A, 
  9101. .PN FocusOut 
  9102. with detail 
  9103. .PN Pointer 
  9104. is generated on each window from P up to but not including A (in order).
  9105. .IP \(bu 5
  9106. .PN FocusOut 
  9107. with detail 
  9108. .PN Nonlinear 
  9109. is generated on A.
  9110. .IP \(bu 5
  9111. If A is not a root window, 
  9112. .PN FocusOut 
  9113. with detail 
  9114. .PN NonlinearVirtual 
  9115. is generated on each window above A up to and including its root (in order).
  9116. .IP \(bu 5
  9117. If B is not a root window, 
  9118. .PN FocusIn 
  9119. with detail 
  9120. .PN NonlinearVirtual 
  9121. is generated on each window from B's root down to but not including B 
  9122. (in order).
  9123. .IP \(bu 5
  9124. .PN FocusIn 
  9125. with detail 
  9126. .PN Nonlinear 
  9127. is generated on B.
  9128. .IP \(bu 5
  9129. If P is an inferior of B, 
  9130. .PN FocusIn 
  9131. with detail 
  9132. .PN Pointer 
  9133. is generated on each window below B down to and including P (in order).
  9134. .LP
  9135. When the focus moves from window A to 
  9136. .PN PointerRoot 
  9137. (or 
  9138. .PN None ) 
  9139. and the pointer is in window P:
  9140. .IP \(bu 5
  9141. If P is an inferior of A, 
  9142. .PN FocusOut 
  9143. with detail 
  9144. .PN Pointer 
  9145. is generated on each window from P up to but not including A (in order).
  9146. .IP \(bu 5
  9147. .PN FocusOut 
  9148. with detail 
  9149. .PN Nonlinear 
  9150. is generated on A.
  9151. .IP \(bu 5
  9152. If A is not a root window, 
  9153. .PN FocusOut 
  9154. with detail 
  9155. .PN NonlinearVirtual 
  9156. is generated on each window above A up to and including its root (in order).
  9157. .IP \(bu 5
  9158. .PN FocusIn 
  9159. with detail 
  9160. .PN PointerRoot 
  9161. (or 
  9162. .PN None ) 
  9163. is generated on all root windows.
  9164. .IP \(bu 5
  9165. If the new focus is 
  9166. .PN PointerRoot , 
  9167. .PN FocusIn 
  9168. with detail 
  9169. .PN Pointer 
  9170. is generated on each window from P's root down to and including P (in order).
  9171. .LP
  9172. When the focus moves from 
  9173. .PN PointerRoot 
  9174. (or 
  9175. .PN None ) 
  9176. to window A and the pointer is in window P:
  9177. .IP \(bu 5
  9178. If the old focus is 
  9179. .PN PointerRoot , 
  9180. .PN FocusOut 
  9181. with detail 
  9182. .PN Pointer 
  9183. is generated on each window from P up to and including P's root (in order).
  9184. .IP \(bu 5
  9185. .PN FocusOut 
  9186. with detail 
  9187. .PN PointerRoot 
  9188. (or 
  9189. .PN None ) 
  9190. is generated on all root windows.
  9191. .IP \(bu 5
  9192. If A is not a root window, 
  9193. .PN FocusIn 
  9194. with detail 
  9195. .PN NonlinearVirtual 
  9196. is generated on each window from A's root down to but not including A 
  9197. (in order).
  9198. .IP \(bu 5
  9199. .PN FocusIn 
  9200. with detail 
  9201. .PN Nonlinear 
  9202. is generated on A.
  9203. .IP \(bu 5
  9204. If P is an inferior of A, 
  9205. .PN FocusIn 
  9206. with detail 
  9207. .PN Pointer 
  9208. is generated on each window below A down to and including P (in order).
  9209. .LP
  9210. When the focus moves from 
  9211. .PN PointerRoot
  9212. to 
  9213. .PN None 
  9214. (or vice versa) and the pointer is in window P:
  9215. .IP \(bu 5
  9216. If the old focus is 
  9217. .PN PointerRoot , 
  9218. .PN FocusOut 
  9219. with detail 
  9220. .PN Pointer 
  9221. is generated on each window from P up to and including P's root (in order).
  9222. .IP \(bu 5
  9223. .PN FocusOut 
  9224. with detail 
  9225. .PN PointerRoot 
  9226. (or 
  9227. .PN None ) 
  9228. is generated on all root windows.
  9229. .IP \(bu 5
  9230. .PN FocusIn 
  9231. with detail 
  9232. .PN None 
  9233. (or 
  9234. .PN PointerRoot ) 
  9235. is generated on all root windows.
  9236. .IP \(bu 5
  9237. If the new focus is 
  9238. .PN PointerRoot , 
  9239. .PN FocusIn 
  9240. with detail 
  9241. .PN Pointer 
  9242. is generated on each window from P's root down to and including P (in order).
  9243. .LP
  9244. When a keyboard grab activates (but before generating any actual 
  9245. .PN KeyPress
  9246. event that activates the grab), G is the grab-window for the grab,
  9247. and F is the current focus:
  9248. .IP \(bu 5
  9249. .PN FocusIn 
  9250. and 
  9251. .PN FocusOut 
  9252. events with mode 
  9253. .PN Grab 
  9254. are generated (as for 
  9255. .PN Normal
  9256. above) as if the focus were to change from F to G.
  9257. .LP
  9258. When a keyboard grab deactivates (but after generating any actual
  9259. .PN KeyRelease 
  9260. event that deactivates the grab), G is the grab-window for the grab,
  9261. and F is the current focus:
  9262. .IP \(bu 5
  9263. .PN FocusIn 
  9264. and 
  9265. .PN FocusOut 
  9266. events with mode 
  9267. .PN Ungrab 
  9268. are generated (as for 
  9269. .PN Normal 
  9270. above) as if the focus were to change from G to F.
  9271. .sp
  9272. .LP
  9273. .\" Start marker code here
  9274. .IN "KeymapNotify" "" "@DEF@"
  9275. .PN KeymapNotify
  9276. .in +.2i
  9277. .LP
  9278. \fIkeys\fP\^: LISTofCARD8
  9279. .\" End marker code here
  9280. .in -.2i
  9281. .LP
  9282. The value is a bit vector as described in 
  9283. .PN QueryKeymap .
  9284. This event is reported to clients selecting 
  9285. .PN KeymapState 
  9286. on a window and is generated immediately after every 
  9287. .PN EnterNotify 
  9288. and 
  9289. .PN FocusIn .
  9290. .sp
  9291. .LP
  9292. .\" Start marker code here
  9293. .IN "Expose" "" "@DEF@"
  9294. .PN Expose
  9295. .in +.2i
  9296. .LP
  9297. \fIwindow\fP\^: WINDOW
  9298. .br
  9299. \fIx\fP, \fIy\fP, \fIwidth\fP, \fIheight\fP\^: CARD16
  9300. .br
  9301. \fIcount\fP\^: CARD16
  9302. .\" End marker code here
  9303. .in -.2i
  9304. .LP
  9305. This event is reported to clients selecting 
  9306. .PN Exposure 
  9307. on the window.
  9308. It is generated when no valid contents are available for regions of a window,
  9309. and either the regions are visible, the regions are viewable
  9310. and the server is (perhaps newly) maintaining backing store on the window,
  9311. or the window is not viewable but the server is (perhaps newly) honoring
  9312. window's backing-store attribute of
  9313. .PN Always
  9314. or
  9315. .PN WhenMapped .
  9316. The regions are decomposed into an arbitrary set of rectangles,
  9317. and an
  9318. .PN Expose
  9319. event is generated for each rectangle.
  9320. .LP
  9321. For a given action causing exposure events,
  9322. the set of events for a given window are guaranteed to be reported contiguously.
  9323. If count is zero,
  9324. then no more
  9325. .PN Expose
  9326. events for this window follow.
  9327. If count is nonzero,
  9328. then at least that many more
  9329. .PN Expose
  9330. events for this window follow (and possibly more).
  9331. .LP
  9332. The x and y coordinates are relative to window's origin 
  9333. and specify the upper-left corner of a rectangle.
  9334. The width and height specify the extent of the rectangle.
  9335. .LP
  9336. .PN Expose 
  9337. events are never generated on 
  9338. .PN InputOnly 
  9339. windows.
  9340. .LP
  9341. All 
  9342. .PN Expose 
  9343. events caused by a hierarchy change are generated after any
  9344. hierarchy event caused by that change (for example,
  9345. .PN UnmapNotify , 
  9346. .PN MapNotify , 
  9347. .PN ConfigureNotify ,
  9348. .PN GravityNotify , 
  9349. .PN CirculateNotify ).
  9350. All 
  9351. .PN Expose
  9352. events on a given window are generated after any 
  9353. .PN VisibilityNotify 
  9354. event on that window, 
  9355. but it is not required that all 
  9356. .PN Expose 
  9357. events on all windows be generated after all 
  9358. .PN Visibilitity 
  9359. events on all windows.
  9360. The ordering of 
  9361. .PN Expose 
  9362. events with respect to 
  9363. .PN FocusOut , 
  9364. .PN EnterNotify , 
  9365. and
  9366. .PN LeaveNotify 
  9367. events is not constrained.
  9368. .sp
  9369. .LP
  9370. .\" Start marker code here
  9371. .IN "GraphicsExposure" "" "@DEF@"
  9372. .PN GraphicsExposure
  9373. .in +.2i
  9374. .LP
  9375. \fIdrawable\fP\^: DRAWABLE
  9376. .br
  9377. \fIx\fP, \fIy\fP, \fIwidth\fP, \fIheight\fP\^: CARD16
  9378. .br
  9379. \fIcount\fP\^: CARD16
  9380. .br
  9381. \fImajor-opcode\fP\^: CARD8
  9382. .br
  9383. \fIminor-opcode\fP\^: CARD16
  9384. .\" End marker code here
  9385. .in -.2i
  9386. .LP
  9387. This event is reported to clients selecting graphics-exposures in a graphics 
  9388. context and is generated when a destination region could not be computed due 
  9389. to an obscured or out-of-bounds source region.
  9390. All of the regions exposed by a given graphics request 
  9391. are guaranteed to be reported contiguously.
  9392. If count is zero then no more
  9393. .PN GraphicsExposure 
  9394. events for this window follow.
  9395. If count is nonzero,
  9396. then at least that many more
  9397. .PN GraphicsExposure 
  9398. events for this window follow (and possibly more).
  9399. .LP
  9400. The x and y coordinates are relative to drawable's origin 
  9401. and specify the upper-left corner of a rectangle.
  9402. The width and height specify the extent of the rectangle.
  9403. .LP
  9404. The major and minor opcodes identify the graphics request used.
  9405. For the core protocol, 
  9406. major-opcode is always 
  9407. .PN CopyArea 
  9408. or 
  9409. .PN CopyPlane ,
  9410. and minor-opcode is always zero.
  9411. .sp
  9412. .LP
  9413. .\" Start marker code here
  9414. .IN "NoExposure" "" "@DEF@"
  9415. .PN NoExposure
  9416. .in +.2i
  9417. .LP
  9418. \fIdrawable\fP\^: DRAWABLE
  9419. .br
  9420. \fImajor-opcode\fP\^: CARD8
  9421. .br
  9422. \fIminor-opcode:\fP\^ CARD16
  9423. .\" End marker code here
  9424. .in -.2i
  9425. .LP
  9426. This event is reported to clients selecting graphics-exposures 
  9427. in a graphics context and is generated when a graphics request 
  9428. that might produce 
  9429. .PN GraphicsExposure
  9430. events does not produce any.
  9431. The drawable specifies the destination used for the graphics request.
  9432. .LP
  9433. The major and minor opcodes identify the graphics request used.
  9434. For the core protocol, 
  9435. major-opcode is always 
  9436. .PN CopyArea 
  9437. or 
  9438. .PN CopyPlane ,
  9439. and the minor-opcode is always zero.
  9440. .sp
  9441. .LP
  9442. .\" Start marker code here
  9443. .IN "VisibilityNotify" "" "@DEF@"
  9444. .PN VisibilityNotify
  9445. .in +.2i
  9446. .LP
  9447. \fIwindow\fP\^: WINDOW
  9448. .br
  9449. \fIstate\fP\^: 
  9450. .Pn { Unobscured , 
  9451. .PN PartiallyObscured , 
  9452. .PN FullyObscured }
  9453. .\" End marker code here
  9454. .in -.2i
  9455. .LP
  9456. This event is reported to clients selecting 
  9457. .PN VisibilityChange 
  9458. on the window.
  9459. In the following, 
  9460. the state of the window is calculated ignoring all of the window's subwindows.
  9461. When a window changes state from partially or fully obscured or 
  9462. not viewable to viewable and completely unobscured,
  9463. an event with 
  9464. .PN Unobscured 
  9465. is generated.
  9466. When a window changes state from viewable and completely unobscured 
  9467. or not viewable, to viewable and partially obscured, 
  9468. an event with 
  9469. .PN PartiallyObscured 
  9470. is generated.
  9471. When a window changes state from viewable and completely unobscured,
  9472. from viewable and partially obscured,
  9473. or from not viewable to viewable and fully obscured, 
  9474. an event with 
  9475. .PN FullyObscured 
  9476. is generated.
  9477. .LP
  9478. .PN VisibilityNotify 
  9479. events are never generated on 
  9480. .PN InputOnly 
  9481. windows.
  9482. .LP
  9483. All 
  9484. .PN VisibilityNotify 
  9485. events caused by a hierarchy change are generated after any hierarchy event 
  9486. caused by that change (for example,
  9487. .PN UnmapNotify , 
  9488. .PN MapNotify , 
  9489. .PN ConfigureNotify ,
  9490. .PN GravityNotify , 
  9491. .PN CirculateNotify ).
  9492. Any
  9493. .PN VisibilityNotify 
  9494. event on a given window is generated before any
  9495. .PN Expose 
  9496. events on that window, 
  9497. but it is not required that all
  9498. .PN VisibilityNotify 
  9499. events on all windows be generated before all 
  9500. .PN Expose
  9501. events on all windows.
  9502. The ordering of 
  9503. .PN VisibilityNotify 
  9504. events with respect to 
  9505. .PN FocusOut , 
  9506. .PN EnterNotify , 
  9507. and 
  9508. .PN LeaveNotify 
  9509. events is not constrained.
  9510. .sp
  9511. .LP
  9512. .\" Start marker code here
  9513. .IN "CreateNotify" "" "@DEF@"
  9514. .PN CreateNotify
  9515. .in +.2i
  9516. .LP
  9517. \fIparent\fP, \fIwindow\fP\^: WINDOW
  9518. .br
  9519. \fIx\fP, \fIy\fP\^: INT16
  9520. .br
  9521. \fIwidth\fP, \fIheight\fP, \fIborder-width\fP\^: CARD16
  9522. .br
  9523. \fIoverride-redirect\fP\^: BOOL
  9524. .\" End marker code here
  9525. .in -.2i
  9526. .LP
  9527. This event is reported to clients selecting 
  9528. .PN SubstructureNotify 
  9529. on the parent 
  9530. and is generated when the window is created.
  9531. The arguments are as in the
  9532. .PN CreateWindow 
  9533. request.
  9534. .sp
  9535. .LP
  9536. .\" Start marker code here
  9537. .IN "DestroyNotify" "" "@DEF@"
  9538. .PN DestroyNotify
  9539. .in +.2i
  9540. .LP
  9541. \fIevent\fP, \fIwindow\fP\^: WINDOW
  9542. .\" End marker code here
  9543. .in -.2i
  9544. .LP
  9545. This event is reported to clients selecting 
  9546. .PN StructureNotify 
  9547. on the window and to clients selecting 
  9548. .PN SubstructureNotify 
  9549. on the parent.
  9550. It is generated when the window is destroyed.
  9551. The event is the window on which the event was generated, 
  9552. and the window is the window that is destroyed.
  9553. .LP
  9554. The ordering of the 
  9555. .PN DestroyNotify 
  9556. events is such that for any given window, 
  9557. .PN DestroyNotify 
  9558. is generated on all inferiors of the window 
  9559. before being generated on the window itself.
  9560. The ordering among siblings and across subhierarchies is not 
  9561. otherwise constrained.
  9562. .sp
  9563. .LP
  9564. .\" Start marker code here
  9565. .IN "UnmapNotify" "" "@DEF@"
  9566. .PN UnmapNotify
  9567. .in +.2i
  9568. .LP
  9569. \fIevent\fP, \fIwindow\fP\^: WINDOW
  9570. .br
  9571. \fIfrom-configure\fP\^: BOOL
  9572. .\" End marker code here
  9573. .in -.2i
  9574. .LP
  9575. This event is reported to clients selecting 
  9576. .PN StructureNotify 
  9577. on the window and to clients selecting 
  9578. .PN SubstructureNotify 
  9579. on the parent.
  9580. It is generated when the window changes state from mapped to unmapped.
  9581. The event is the window on which the event was generated, 
  9582. and the window is the window that is unmapped.
  9583. The from-configure flag is 
  9584. .PN True 
  9585. if the event was generated as a result of the window's parent being resized 
  9586. when the window itself had a win-gravity of 
  9587. .PN Unmap .
  9588. .sp
  9589. .LP
  9590. .\" Start marker code here
  9591. .IN "MapNotify" "" "@DEF@"
  9592. .PN MapNotify
  9593. .in +.2i
  9594. .LP
  9595. \fIevent\fP, \fIwindow\fP\^: WINDOW
  9596. .br
  9597. \fIoverride-redirect\fP\^: BOOL
  9598. .\" End marker code here
  9599. .in -.2i
  9600. .LP
  9601. This event is reported to clients selecting 
  9602. .PN StructureNotify 
  9603. on the window and to clients selecting 
  9604. .PN SubstructureNotify 
  9605. on the parent.
  9606. It is generated when the window changes state from unmapped to mapped.
  9607. The event is the window on which the event was generated, 
  9608. and the window is the window that is mapped.
  9609. The override-redirect flag is from the window's attribute.
  9610. .sp
  9611. .LP
  9612. .\" Start marker code here
  9613. .IN "MapRequest" "" "@DEF@"
  9614. .PN MapRequest
  9615. .in +.2i
  9616. .LP
  9617. \fIparent\fP, \fIwindow\fP\^: WINDOW
  9618. .\" End marker code here
  9619. .in -.2i
  9620. .LP
  9621. This event is reported to the client selecting 
  9622. .PN SubstructureRedirect 
  9623. on the parent and is generated when a 
  9624. .PN MapWindow 
  9625. request is issued on an unmapped window with an override-redirect attribute of 
  9626. .PN False .
  9627. .sp
  9628. .LP
  9629. .\" Start marker code here
  9630. .IN "ReparentNotify" "" "@DEF@"
  9631. .PN ReparentNotify
  9632. .in +.2i
  9633. .LP
  9634. \fIevent\fP, \fIwindow\fP, \fIparent\fP\^: WINDOW
  9635. .br
  9636. \fIx\fP, \fIy\fP\^: INT16
  9637. .br
  9638. \fIoverride-redirect\fP\^: BOOL
  9639. .\" End marker code here
  9640. .in -.2i
  9641. .LP
  9642. This event is reported to clients selecting 
  9643. .PN SubstructureNotify 
  9644. on either the old or the new parent and to clients selecting 
  9645. .PN StructureNotify 
  9646. on the window.
  9647. It is generated when the window is reparented.
  9648. The event is the window on which the event was generated.
  9649. The window is the window that has been rerooted.
  9650. The parent specifies the new parent.
  9651. The x and y coordinates are relative to the new parent's origin 
  9652. and specify the position of the upper-left outer corner of the window.
  9653. The override-redirect flag is from the window's attribute.
  9654. .sp
  9655. .LP
  9656. .\" Start marker code here
  9657. .IN "ConfigureNotify" "" "@DEF@"
  9658. .PN ConfigureNotify
  9659. .in +.2i
  9660. .LP
  9661. \fIevent\fP, \fIwindow\fP\^: WINDOW
  9662. .br
  9663. \fIx\fP, \fIy\fP\^: INT16
  9664. .br
  9665. \fIwidth\fP, \fIheight\fP, \fIborder-width\fP\^: CARD16
  9666. .br
  9667. \fIabove-sibling\fP\^: WINDOW or 
  9668. .PN None
  9669. .br
  9670. \fIoverride-redirect\fP\^: BOOL
  9671. .\" End marker code here
  9672. .in -.2i
  9673. .LP
  9674. This event is reported to clients selecting 
  9675. .PN StructureNotify 
  9676. on the window and to clients selecting 
  9677. .PN SubstructureNotify 
  9678. on the parent.
  9679. It is generated when a
  9680. .PN ConfigureWindow 
  9681. request actually changes the state of the window.
  9682. The event is the window on which the event was generated, 
  9683. and the window is the window that is changed.
  9684. The x and y coordinates are relative to the new parent's origin 
  9685. and specify the position of the upper-left outer corner of the window.
  9686. The width and height specify the inside size, not including the border.
  9687. If above-sibling is 
  9688. .PN None , 
  9689. then the window is on the bottom of the stack with respect to siblings.
  9690. Otherwise, the window is immediately on top of the specified sibling.
  9691. The override-redirect flag is from the window's attribute.
  9692. .sp
  9693. .LP
  9694. .\" Start marker code here
  9695. .IN "GravityNotify" "" "@DEF@"
  9696. .PN GravityNotify
  9697. .in +.2i
  9698. .LP
  9699. \fIevent\fP, \fIwindow\fP\^: WINDOW
  9700. .br
  9701. \fIx\fP, \fIy\fP\^: INT16
  9702. .\" End marker code here
  9703. .in -.2i
  9704. .LP
  9705. This event is reported to clients selecting 
  9706. .PN SubstructureNotify 
  9707. on the parent and to clients selecting 
  9708. .PN StructureNotify 
  9709. on the window.
  9710. It is generated when a window is moved because of a change in size 
  9711. of the parent.
  9712. The event is the window on which the event was generated, 
  9713. and the window is the window that is moved.
  9714. The x and y coordinates are relative to the new parent's origin 
  9715. and specify the position of the upper-left outer corner of the window.
  9716. .sp
  9717. .LP
  9718. .\" Start marker code here
  9719. .IN "ResizeRequest" "" "@DEF@"
  9720. .PN ResizeRequest
  9721. .in +.2i
  9722. .LP
  9723. \fIwindow\fP\^: WINDOW
  9724. .br
  9725. \fIwidth\fP, \fIheight\fP\^: CARD16
  9726. .\" End marker code here
  9727. .in -.2i
  9728. .LP
  9729. This event is reported to the client selecting 
  9730. .PN ResizeRedirect 
  9731. on the window and is generated when a 
  9732. .PN ConfigureWindow 
  9733. request by some other client on the window attempts to change the size 
  9734. of the window.
  9735. The width and height are the inside size, not including the border.
  9736. .sp
  9737. .LP
  9738. .\" Start marker code here
  9739. .IN "ConfigureRequest" "" "@DEF@"
  9740. .PN ConfigureRequest
  9741. .in +.2i
  9742. .LP
  9743. \fIparent\fP, \fIwindow\fP\^: WINDOW
  9744. .br
  9745. \fIx\fP, \fIy\fP\^: INT16
  9746. .br
  9747. \fIwidth\fP, \fIheight\fP, \fIborder-width\fP\^: CARD16
  9748. .br
  9749. \fIsibling\fP\^: WINDOW or 
  9750. .PN None
  9751. .br
  9752. \fIstack-mode\fP\^: 
  9753. .Pn { Above , 
  9754. .PN Below , 
  9755. .PN TopIf , 
  9756. .PN BottomIf , 
  9757. .PN Opposite }
  9758. .br
  9759. \fIvalue-mask\fP\^: BITMASK
  9760. .\" End marker code here
  9761. .in -.2i
  9762. .LP
  9763. This event is reported to the client selecting 
  9764. .PN SubstructureRedirect 
  9765. on the parent and is generated when a 
  9766. .PN ConfigureWindow 
  9767. request is issued on the window by some other client.
  9768. The value-mask indicates which components were specified in the request.
  9769. The value-mask and the corresponding values are reported as given 
  9770. in the request.
  9771. The remaining values are filled in from the current geometry of the window, 
  9772. except in the case of sibling and stack-mode, 
  9773. which are reported as 
  9774. .PN None
  9775. and 
  9776. .PN Above 
  9777. (respectively) if not given in the request.
  9778. .sp
  9779. .LP
  9780. .\" Start marker code here
  9781. .IN "CirculateNotify" "" "@DEF@"
  9782. .PN CirculateNotify
  9783. .in +.2i
  9784. .LP
  9785. \fIevent\fP, \fIwindow\fP\^: WINDOW
  9786. .br
  9787. \fIplace\fP\^: 
  9788. .Pn { Top , 
  9789. .PN Bottom }
  9790. .\" End marker code here
  9791. .in -.2i
  9792. .LP
  9793. This event is reported to clients selecting 
  9794. .PN StructureNotify 
  9795. on the window and to clients selecting 
  9796. .PN SubstructureNotify 
  9797. on the parent.
  9798. It is generated when the window is actually restacked from a 
  9799. .PN CirculateWindow 
  9800. request.
  9801. The event is the window on which the event was generated, 
  9802. and the window is the window that is restacked.
  9803. If place is 
  9804. .PN Top , 
  9805. the window is now on top of all siblings.
  9806. Otherwise, it is below all siblings.
  9807. .sp
  9808. .LP
  9809. .\" Start marker code here
  9810. .IN "CirculateRequest" "" "@DEF@"
  9811. .PN CirculateRequest
  9812. .in +.2i
  9813. .LP
  9814. \fIparent\fP, \fIwindow\fP\^: WINDOW
  9815. .br
  9816. \fIplace\fP: 
  9817. .Pn { Top , 
  9818. .PN Bottom }
  9819. .\" End marker code here
  9820. .in -.2i
  9821. .LP
  9822. This event is reported to the client selecting 
  9823. .PN SubstructureRedirect 
  9824. on the parent and is generated when a 
  9825. .PN CirculateWindow 
  9826. request is issued on the parent and a window actually needs to be restacked.
  9827. The window specifies the window to be restacked, 
  9828. and the place specifies what the new position in the stacking order should be.
  9829. .sp
  9830. .LP
  9831. .\" Start marker code here
  9832. .IN "PropertyNotify" "" "@DEF@"
  9833. .PN PropertyNotify
  9834. .in +.2i
  9835. .LP
  9836. \fIwindow\fP\^: WINDOW
  9837. .br
  9838. \fIatom\fP\^: ATOM
  9839. .br
  9840. \fIstate\fP\^: 
  9841. .Pn { NewValue , 
  9842. .PN Deleted }
  9843. .br
  9844. \fItime\fP\^: TIMESTAMP
  9845. .\" End marker code here
  9846. .in -.2i
  9847. .LP
  9848. This event is reported to clients selecting 
  9849. .PN PropertyChange 
  9850. on the window and is generated with state
  9851. .PN NewValue
  9852. when a property of the window is changed using
  9853. .PN ChangeProperty 
  9854. or
  9855. .PN RotateProperties ,
  9856. even when adding zero-length data using
  9857. .PN ChangeProperty
  9858. and when replacing all or part of a property with identical data using
  9859. .PN ChangeProperty
  9860. or
  9861. .PN RotateProperties .
  9862. It is generated with state
  9863. .PN Deleted
  9864. when a property of the
  9865. window is deleted using request
  9866. .PN DeleteProperty
  9867. or
  9868. .PN GetProperty .
  9869. The timestamp indicates the server time when the property was changed.
  9870. .sp
  9871. .LP
  9872. .\" Start marker code here
  9873. .IN "SelectionClear" "" "@DEF@"
  9874. .PN SelectionClear
  9875. .in +.2i
  9876. .LP
  9877. \fIowner\fP\^: WINDOW
  9878. .br
  9879. \fIselection\fP\^: ATOM
  9880. .br
  9881. \fItime\fP\^: TIMESTAMP
  9882. .\" End marker code here
  9883. .in -.2i
  9884. .LP
  9885. This event is reported to the current owner of a selection
  9886. and is generated when a new owner is being defined by means of 
  9887. .PN SetSelectionOwner .
  9888. The timestamp is the last-change time recorded for the selection.
  9889. The owner argument is the window that was specified by the current owner in its
  9890. .PN SetSelectionOwner
  9891. request.
  9892. .sp
  9893. .LP
  9894. .\" Start marker code here
  9895. .IN "SelectionRequest" "" "@DEF@"
  9896. .PN SelectionRequest
  9897. .in +.2i
  9898. .LP
  9899. \fIowner\fP\^: WINDOW
  9900. .br
  9901. \fIselection\fP\^: ATOM
  9902. .br
  9903. \fItarget\fP\^: ATOM
  9904. .br
  9905. \fIproperty\fP\^: ATOM or 
  9906. .PN None
  9907. .br
  9908. \fIrequestor\fP\^: WINDOW
  9909. .br
  9910. \fItime\fP\^: TIMESTAMP or 
  9911. .PN CurrentTime
  9912. .\" End marker code here
  9913. .in -.2i
  9914. .LP
  9915. This event is reported to the owner of a selection 
  9916. and is generated when a client issues a 
  9917. .PN ConvertSelection 
  9918. request.
  9919. The owner argument is the window that was specified in the 
  9920. .PN SetSelectionOwner 
  9921. request.
  9922. The remaining arguments are as in the 
  9923. .PN ConvertSelection 
  9924. request.
  9925. .LP
  9926. The owner should convert the selection based on the specified target type
  9927. and send a
  9928. .PN SelectionNotify
  9929. back to the requestor.
  9930. A complete specification for using selections is given in the X Consortium
  9931. standard \fIInter-Client Communication Conventions Manual\fP.
  9932. .sp
  9933. .LP
  9934. .\" Start marker code here
  9935. .IN "SelectionNotify" "" "@DEF@"
  9936. .PN SelectionNotify
  9937. .in +.2i
  9938. .LP
  9939. \fIrequestor\fP\^: WINDOW
  9940. .br
  9941. \fIselection\fP, \fItarget\fP\^: ATOM
  9942. .br
  9943. \fIproperty\fP\^: ATOM or 
  9944. .PN None
  9945. .br
  9946. \fItime\fP\^: TIMESTAMP or 
  9947. .PN CurrentTime
  9948. .\" End marker code here
  9949. .in -.2i
  9950. .LP
  9951. This event is generated by the server in response to a 
  9952. .PN ConvertSelection
  9953. request when there is no owner for the selection.
  9954. When there is an owner, 
  9955. it should be generated by the owner using 
  9956. .PN SendEvent .
  9957. The owner of a selection should send this event to a requestor either
  9958. when a selection has been converted and stored as a property 
  9959. or when a selection conversion could not be performed (indicated with property 
  9960. .PN None ).
  9961. .sp
  9962. .LP
  9963. .\" Start marker code here
  9964. .IN "ColormapNotify" "" "@DEF@"
  9965. .PN ColormapNotify
  9966. .in +.2i
  9967. .LP
  9968. \fIwindow\fP\^: WINDOW
  9969. .br
  9970. \fIcolormap\fP\^: COLORMAP or 
  9971. .PN None
  9972. .br
  9973. \fInew\fP\^: BOOL
  9974. .br
  9975. \fIstate\fP\^: 
  9976. .Pn { Installed , 
  9977. .PN Uninstalled }
  9978. .\" End marker code here
  9979. .in -.2i
  9980. .LP
  9981. This event is reported to clients selecting 
  9982. .PN ColormapChange 
  9983. on the window.
  9984. It is generated with value 
  9985. .PN True 
  9986. for new when the colormap attribute of the window is changed
  9987. and is generated with value 
  9988. .PN False 
  9989. for new when the colormap of a window is installed or uninstalled.
  9990. In either case,
  9991. the state indicates whether the colormap is currently installed.
  9992. .sp
  9993. .LP
  9994. .\" Start marker code here
  9995. .IN "MappingNotify" "" "@DEF@"
  9996. .PN MappingNotify
  9997. .in +.2i
  9998. .LP
  9999. \fIrequest\fP: 
  10000. .Pn { Modifier , 
  10001. .PN Keyboard , 
  10002. .PN Pointer }
  10003. .br
  10004. \fIfirst-keycode\fP, \fIcount\fP\^: CARD8
  10005. .\" End marker code here
  10006. .in -.2i
  10007. .LP
  10008. This event is sent to all clients.
  10009. There is no mechanism to express disinterest in this event.
  10010. The detail indicates the kind of change that occurred:  
  10011. .PN Modifiers
  10012. for a successful 
  10013. .PN SetModifierMapping , 
  10014. .PN Keyboard
  10015. for a successful 
  10016. .PN ChangeKeyboardMapping , 
  10017. and 
  10018. .PN Pointer 
  10019. for a successful 
  10020. .PN SetPointerMapping .
  10021. If the detail is 
  10022. .PN Keyboard , 
  10023. then first-keycode and count indicate the range of altered keycodes.
  10024. .sp
  10025. .LP
  10026. .\" Start marker code here
  10027. .IN "ClientMessage" "" "@DEF@"
  10028. .PN ClientMessage
  10029. .in +.2i
  10030. .LP
  10031. \fIwindow\fP\^: WINDOW
  10032. .br
  10033. \fItype\fP\^: ATOM
  10034. .br
  10035. \fIformat\fP\^: {8, 16, 32}
  10036. .br
  10037. \fIdata\fP\^: LISTofINT8 or LISTofINT16 or LISTofINT32
  10038. .\" End marker code here
  10039. .in -.2i
  10040. .LP
  10041. This event is only generated by clients using 
  10042. .PN SendEvent .
  10043. The type specifies how the data is to be interpreted by the receiving client;
  10044. the server places no interpretation on the type or the data.
  10045. The format specifies whether the data should be viewed as a list of 8-bit,
  10046. 16-bit, or 32-bit quantities, so that the server can correctly
  10047. byte-swap, as necessary.
  10048. The data always consists of either 20 8-bit values or 10 16-bit values 
  10049. or 5 32-bit values, although particular message types might not make use 
  10050. of all of these values.
  10051. .NH 1
  10052. Flow Control and Concurrency
  10053. .XS
  10054. \*(SN Flow Control and Concurrency
  10055. .XE
  10056. .LP
  10057. Whenever the server is writing to a given connection, 
  10058. it is permissible for the server to stop reading from that connection 
  10059. (but if the writing would block, it must continue to service other connections).
  10060. The server is not required to buffer more than a single request per connection 
  10061. at one time.
  10062. For a given connection to the server, 
  10063. a client can block while reading from the connection 
  10064. but should undertake to read (events and errors) when writing would block.
  10065. Failure on the part of a client to obey this rule could result
  10066. in a deadlocked connection, 
  10067. although deadlock is probably unlikely unless either
  10068. the transport layer has very little buffering or the client attempts to
  10069. send large numbers of requests without ever reading replies or checking for
  10070. errors and events.
  10071. .LP
  10072. Whether or not a server is implemented with internal concurrency, 
  10073. the overall effect must be as if individual requests are executed to completion
  10074. in some serial order, 
  10075. and requests from a given connection must be executed in delivery order
  10076. (that is, the total execution order is a shuffle of the individual streams).
  10077. The execution of a request includes validating all arguments, 
  10078. collecting all data for any reply, 
  10079. and generating and queueing all required events.
  10080. However, 
  10081. it does not include the actual transmission of the reply and the events.
  10082. In addition, the effect of any other cause that can generate multiple events
  10083. (for example, activation of a grab or pointer motion) must effectively generate 
  10084. and queue all required events indivisibly with respect to all other causes 
  10085. and requests.
  10086. For a request from a given client,
  10087. any events destined for that client that are caused by executing the request
  10088. must be sent to the client before any reply or error is sent.
  10089.