home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / Protocol / X11.encoding < prev    next >
Encoding:
Text File  |  1991-07-29  |  66.5 KB  |  4,408 lines

  1. \&
  2. .sp 1
  3. .ps 11
  4. .nr PS 11
  5. .XS
  6. Appendix B \- Protocol Encoding
  7. .XE
  8. .ce 3
  9. \s+1\fBAppendix B\fP\s-1
  10.  
  11. \s+1\fBProtocol Encoding\fP\s-1
  12. .sp 2
  13. .LP
  14. .\"The sections in this appendix correspond to their number counterparts
  15. .\"in the protocol document.
  16. .SH
  17. Syntactic Conventions
  18. .LP
  19. All numbers are in decimal, 
  20. unless prefixed with #x, in which case they are in hexadecimal (base 16).
  21. .LP
  22. The general syntax used to describe requests, replies, errors, events, and
  23. compound types is:
  24. .LP
  25. .ps 9
  26. .nr PS 9
  27. .Ds
  28. .R
  29. .PN NameofThing
  30.   encode-form
  31.   ...
  32.   encode-form
  33. .De
  34. .ps 11
  35. .nr PS 11
  36. .LP
  37. Each encode-form describes a single component.
  38. .LP
  39. For components described in the protocol as:
  40. .LP
  41. .ps 9
  42. .nr PS 9
  43. .Ds
  44. .R
  45. name: TYPE
  46. .De
  47. .ps 11
  48. .nr PS 11
  49. .LP
  50. the encode-form is:
  51. .LP
  52. .ps 9
  53. .nr PS 9
  54. .Ds 
  55. .TA 1i 1.5i 2.5i
  56. .ta 1i 1.5i 2.5i
  57. .R
  58. N    TYPE    name
  59. .De
  60. .ps 11
  61. .nr PS 11
  62. .LP
  63. N is the number of bytes occupied in the data stream, 
  64. and TYPE is the interpretation of those bytes.
  65. For example,
  66. .LP
  67. .ps 9
  68. .nr PS 9
  69. .Ds
  70. .TA 1i 1.5i
  71. .ta 1i 1.5i
  72. .R
  73. depth: CARD8
  74. .De
  75. .ps 11
  76. .nr PS 11
  77. .LP
  78. becomes:
  79. .LP
  80. .ps 9
  81. .nr PS 9
  82. .Ds
  83. .R
  84. .TA 1i 1.5i 2.5i 
  85. .ta 1i 1.5i 2.5i
  86. 1    CARD8    depth
  87. .De
  88. .ps 11
  89. .nr PS 11
  90. .LP
  91. For components with a static numeric value the encode-form is:
  92. .LP
  93. .ps 9
  94. .nr PS 9
  95. .Ds
  96. .TA 1i 1.5i 2.5i
  97. .ta 1i 1.5i 2.5i
  98. .R
  99. N    value    name
  100. .De
  101. .ps 11
  102. .nr PS 11
  103. .LP
  104. The value is always interpreted as an N-byte unsigned integer.
  105. For example, 
  106. the first two bytes of a Window error are always zero (indicating an
  107. error in general) and three (indicating the Window error in particular):
  108. .LP
  109. .ps 9
  110. .nr PS 9
  111. .Ds
  112. .TA 1i 1.5i 2.5i
  113. .ta 1i 1.5i 2.5i
  114. .R
  115. 1    0    Error
  116. 1    3    code
  117. .De
  118. .ps 11
  119. .nr PS 11
  120. .LP
  121. For components described in the protocol as:
  122. .RS
  123. .ps 9
  124. .nr PS 9
  125. .LP
  126. name: 
  127. .Pn { Name1 ,..., 
  128. .PN NameI }
  129. .RE
  130. .ps 11
  131. .nr PS 11
  132. .LP
  133. the encode-form is:
  134. .LP
  135. .ps 9
  136. .nr PS 9
  137. .Ds
  138. .TA 1i 1.5i 2.5i
  139. .ta 1i 1.5i 2.5i
  140. .R
  141. N        name
  142.     value1 Name1
  143.     ...
  144.     valueI NameI
  145. .De
  146. .ps 11
  147. .nr PS 11
  148. .LP
  149. The value is always interpreted as an N-byte unsigned integer.
  150. Note that the size of N is sometimes larger than that strictly required 
  151. to encode the values.
  152. For example:
  153. .RS
  154. .ps 9
  155. .nr PS 9
  156. .LP
  157. class: 
  158. .Pn { InputOutput , 
  159. .PN InputOnly , 
  160. .PN CopyFromParent }
  161. .RE
  162. .ps 11
  163. .nr PS 11
  164. .LP
  165. becomes:
  166. .LP
  167. .ps 9
  168. .nr PS 9
  169. .Ds
  170. .TA 1i 1.5i 2.5i 3i
  171. .ta 1i 1.5i 2.5i 3i
  172. .R
  173. 2            class
  174.     0    CopyFromParent
  175.     1    InputOutput
  176.     2    InputOnly
  177. .De
  178. .ps 11
  179. .nr PS 11
  180. .LP
  181. For components described in the protocol as:
  182. .RS
  183. .ps 9
  184. .nr PS 9
  185. .LP
  186. NAME: TYPE or 
  187. .PN Alternative1 ...or
  188. .PN AlternativeI
  189. .RE
  190. .ps 11
  191. .nr PS 11
  192. .LP
  193. the encode-form is:
  194. .LP
  195. .ps 9
  196. .nr PS 9
  197. .Ds
  198. .TA 1i 1.5i 2i 2.5i 3i
  199. .ta 1i 1.5i 2i 2.5i 3i
  200. .R
  201. N    TYPE            NAME
  202.     value1    Alternative1
  203.     ...
  204.     valueI    AlternativeI
  205. .De
  206. .ps 11
  207. .nr PS 11
  208. .LP
  209. The alternative values are guaranteed not to conflict with the encoding
  210. of TYPE.  
  211. For example:
  212. .RS
  213. .ps 9
  214. .nr PS 9
  215. .LP
  216. destination: WINDOW or 
  217. .PN PointerWindow or 
  218. .PN InputFocus
  219. .RE
  220. .ps 11
  221. .nr PS 11
  222. .LP
  223. becomes:
  224. .LP
  225. .ps 9
  226. .nr PS 9
  227. .Ds
  228. .TA 1i 1.5i 2.5i
  229. .ta 1i 1.5i 2.5i
  230. .R
  231. 4    WINDOW        destination
  232.     0    PointerWindow
  233.     1    InputFocus
  234. .De
  235. .ps 11
  236. .nr PS 11
  237. .LP
  238. For components described in the protocol as:
  239. .LP
  240. .ps 9
  241. .nr PS 9
  242. .Ds
  243. .TA 1i 1.5i
  244. .ta 1i 1.5i
  245. .R
  246. value-mask: BITMASK
  247. .De
  248. .ps 11
  249. .nr PS 11
  250. .LP
  251. the encode-form is:
  252. .LP
  253. .ps 9
  254. .nr PS 9
  255. .Ds
  256. .TA 1i 1.5i 2i 2.5i 
  257. .ta 1i 1.5i 2i 2.5i
  258. .R
  259. N    BITMASK            value-mask
  260.     mask1    mask-name1
  261.     ...
  262.     maskI    mask-nameI
  263. .De
  264. .ps 11
  265. .nr PS 11
  266. .LP
  267. The individual bits in the mask are specified and named, 
  268. and N is 2 or 4.
  269. The most-significant bit in a BITMASK is reserved for use in defining
  270. chained (multiword) bitmasks, as extensions augment existing core requests.
  271. The precise interpretation of this bit is not yet defined here, 
  272. although a probable mechanism is that a 1-bit indicates that another N bytes 
  273. of bitmask follows, with bits within the overall mask still interpreted 
  274. from least-significant to most-significant with an N-byte unit, with N-byte units 
  275. interpreted in stream order, and with the overall mask being byte-swapped 
  276. in individual N-byte units.
  277. .LP
  278. For LISTofVALUE encodings, the request is followed by a section of the form:
  279. .LP
  280. .ps 9
  281. .nr PS 9
  282. .Ds
  283. .TA 1i 1.5i
  284. .ta 1i 1.5i
  285. .R
  286. VALUEs
  287.  encode-form
  288.  ...
  289.  encode-form
  290. .De
  291. .ps 11
  292. .nr PS 11
  293. .LP
  294. listing an encode-form for each VALUE.
  295. The NAME in each encode-form keys to the corresponding BITMASK bit.
  296. The encoding of a VALUE always occupies four bytes, 
  297. but the number of bytes specified in the encoding-form indicates how
  298. many of the least-significant bytes are actually used; 
  299. the remaining bytes are unused and their values do not matter.
  300. .LP
  301. In various cases, the number of bytes occupied by a component will be specified
  302. by a lowercase single-letter variable name instead of a specific numeric
  303. value, and often some other component will have its value specified as a
  304. simple numeric expression involving these variables.
  305. Components specified with such expressions are always interpreted 
  306. as unsigned integers.
  307. The scope of such variables is always just the enclosing request, reply, 
  308. error, event, or compound type structure.
  309. For example:
  310. .LP
  311. .ps 9
  312. .nr PS 9
  313. .Ds
  314. .TA 1i 1.5i 2i 2.5i
  315. .ta 1i 1.5i 2i 2.5i
  316. .R
  317. 2    3+n            request length
  318. 4n    LISTofPOINT        points
  319. .De
  320. .ps 11
  321. .nr PS 11
  322. .LP
  323. For unused bytes (the values of the bytes are undefined and do no matter),
  324. the encode-form is:
  325. .LP
  326. .ps 9
  327. .nr PS 9
  328. .Ds
  329. .R
  330. .TA 1i 1.5i 2i 2.5i
  331. .ta 1i 1.5i 2i 2.5i
  332. N            unused
  333. .De
  334. .ps 11
  335. .nr PS 11
  336. .LP
  337. If the number of unused bytes is variable, the encode-form typically is:
  338. .LP
  339. .ps 9
  340. .nr PS 9
  341. .Ds
  342. .TA 1i 1.5i 2i 2.5i
  343. .ta 1i 1.5i 2i 2.5i
  344. .R
  345. p            unused, p=pad(E)
  346. .De
  347. .ps 11
  348. .nr PS 11
  349. .LP
  350. where E is some expression,
  351. and pad(E) is the number of bytes needed to round E up to a multiple of four.
  352. .LP
  353. .ps 9
  354. .nr PS 9
  355. .Ds
  356. .TA 1i 1.5i 2i 2.5i
  357. .ta 1i 1.5i 2i 2.5i
  358. .R
  359. pad(E) = (4 - (E mod 4)) mod 4
  360. .De
  361. .ps 11
  362. .nr PS 11
  363. .SH
  364. Common Types
  365. .ps 9
  366. .nr PS 9
  367. .LP
  368. LISTofFOO
  369. .ps 11
  370. .nr PS 11
  371. .IP
  372. In this document the LISTof notation strictly means some number of repetitions
  373. of the FOO encoding; 
  374. the actual length of the list is encoded elsewhere.
  375. .ps 9
  376. .nr PS 9
  377. .LP
  378. SETofFOO
  379. .ps 11
  380. .nr PS 11
  381. .IP
  382. A set is always represented by a bitmask, with a 1-bit indicating presence in
  383. the set.
  384. .ps 9
  385. .nr PS 9
  386. .LP
  387. BITMASK: CARD32
  388. .LP
  389. WINDOW: CARD32
  390. .LP
  391. PIXMAP: CARD32
  392. .LP
  393. CURSOR: CARD32
  394. .LP
  395. FONT: CARD32
  396. .LP
  397. GCONTEXT: CARD32
  398. .LP
  399. COLORMAP: CARD32
  400. .LP
  401. DRAWABLE: CARD32
  402. .LP
  403. FONTABLE: CARD32
  404. .LP
  405. ATOM: CARD32
  406. .LP
  407. VISUALID: CARD32
  408. .LP
  409. BYTE: 8-bit value
  410. .LP
  411. INT8: 8-bit signed integer
  412. .LP
  413. INT16: 16-bit signed integer
  414. .LP
  415. INT32: 32-bit signed integer
  416. .LP
  417. CARD8: 8-bit unsigned integer
  418. .LP
  419. CARD16: 16-bit unsigned integer
  420. .LP
  421. CARD32: 32-bit unsigned integer
  422. .LP
  423. TIMESTAMP: CARD32
  424. .LP
  425. .Ds 0
  426. .TA .75i 1.75i
  427. .ta .75i 1.75i
  428. .R
  429. BITGRAVITY
  430.     0    Forget
  431.     1    NorthWest
  432.     2    North
  433.     3    NorthEast
  434.     4    West
  435.     5    Center
  436.     6    East
  437.     7    SouthWest
  438.     8    South
  439.     9    SouthEast
  440.     10    Static
  441. .De
  442. .LP
  443. .Ds 0
  444. .TA .75i 1.75i
  445. .ta .75i 1.75i
  446. .R
  447. WINGRAVITY
  448.     0    Unmap
  449.     1    NorthWest
  450.     2    North
  451.     3    NorthEast
  452.     4    West
  453.     5    Center
  454.     6    East
  455.     7    SouthWest
  456.     8    South
  457.     9    SouthEast
  458.     10    Static
  459. .De
  460. .LP
  461. .Ds 0
  462. .TA .75i 1.75i
  463. .ta .75i 1.75i
  464. .R
  465. BOOL
  466.     0    False
  467.     1    True
  468. .De
  469. .LP
  470. .Ds 0
  471. .TA .75i 1.75i
  472. .ta .75i 1.75i
  473. .R
  474. SETofEVENT
  475.     #x00000001    KeyPress
  476.     #x00000002    KeyRelease
  477.     #x00000004    ButtonPress
  478.     #x00000008    ButtonRelease
  479.     #x00000010    EnterWindow
  480.     #x00000020    LeaveWindow
  481.     #x00000040    PointerMotion
  482.     #x00000080    PointerMotionHint
  483.     #x00000100    Button1Motion
  484.     #x00000200    Button2Motion
  485.     #x00000400    Button3Motion
  486.     #x00000800    Button4Motion
  487.     #x00001000    Button5Motion
  488.     #x00002000    ButtonMotion
  489.     #x00004000    KeymapState
  490.     #x00008000    Exposure
  491.     #x00010000    VisibilityChange
  492.     #x00020000    StructureNotify
  493.     #x00040000    ResizeRedirect
  494.     #x00080000    SubstructureNotify
  495.     #x00100000    SubstructureRedirect
  496.     #x00200000    FocusChange
  497.     #x00400000    PropertyChange
  498.     #x00800000    ColormapChange
  499.     #x01000000    OwnerGrabButton
  500.     #xFE000000    unused but must be zero
  501. .De
  502. .LP
  503. .Ds 0
  504. .TA .75i 1.75i
  505. .ta .75i 1.75i
  506. .R
  507. SETofPOINTEREVENT
  508.     encodings are the same as for SETofEVENT, except with
  509.     #xFFFF8003    unused but must be zero
  510. .De
  511. .LP
  512. .Ds 0
  513. .TA .75i 1.75i
  514. .ta .75i 1.75i
  515. .R
  516. SETofDEVICEEVENT
  517.     encodings are the same as for SETofEVENT, except with
  518.     #xFFFFC0B0    unused but must be zero
  519. .De
  520. KEYSYM: CARD32
  521. .LP
  522. KEYCODE: CARD8
  523. .LP
  524. BUTTON: CARD8
  525. .LP
  526. .Ds 0
  527. .TA .75i 1.75i
  528. .ta .75i 1.75i
  529. .R
  530. SETofKEYBUTMASK
  531.     #x0001    Shift
  532.     #x0002    Lock
  533.     #x0004    Control
  534.     #x0008    Mod1
  535.     #x0010    Mod2
  536.     #x0020    Mod3
  537.     #x0040    Mod4
  538.     #x0080    Mod5
  539.     #x0100    Button1
  540.     #x0200    Button2
  541.     #x0400    Button3
  542.     #x0800    Button4
  543.     #x1000    Button5
  544.     #xE000    unused but must be zero
  545. .De
  546. .LP
  547. .Ds 0
  548. .TA .75i 1.75i
  549. .ta .75i 1.75i
  550. .R
  551. SETofKEYMASK
  552.     encodings are the same as for SETofKEYBUTMASK, except with
  553.     #xFF00        unused but must be zero
  554. .De
  555. .LP
  556. STRING8: LISTofCARD8
  557. .LP
  558. STRING16: LISTofCHAR2B
  559. .LP
  560. .Ds 0
  561. .TA .2i .5i 1.5i
  562. .ta .2i .5i 1.5i
  563. .R
  564. CHAR2B
  565.     1    CARD8    byte1
  566.     1    CARD8    byte2
  567. .De
  568. .LP
  569. .Ds 0
  570. .TA .2i .5i 1.5i
  571. .ta .2i .5i 1.5i
  572. .R
  573. POINT
  574.     2    INT16    x
  575.     2    INT16    y
  576. .De
  577. .LP
  578. .Ds 0
  579. .TA .2i .5i 1.5i
  580. .ta .2i .5i 1.5i
  581. .R
  582. RECTANGLE
  583.     2    INT16    x
  584.     2    INT16    y
  585.     2    CARD16    width
  586.     2    CARD16    height
  587. .De
  588. .LP
  589. .Ds 0
  590. .TA .2i .5i 1.5i
  591. .ta .2i .5i 1.5i
  592. .R
  593. ARC
  594.     2    INT16    x
  595.     2    INT16    y
  596.     2    CARD16    width
  597.     2    CARD16    height
  598.     2    INT16    angle1
  599.     2    INT16    angle2
  600. .De
  601. .LP
  602. .Ds 0
  603. .TA .2i .5i 1.5i 2.5i
  604. .ta .2i .5i 1.5i 2.5i
  605. .R
  606. HOST
  607.     1            family
  608.         0    Internet
  609.         1    DECnet
  610.         2    Chaos
  611.     1            unused
  612.     2    n        length of address
  613.     n    LISTofBYTE        address
  614.     p            unused, p=pad(n)
  615. .De
  616. .LP
  617. .Ds 0
  618. .TA .2i .5i 1.5i 2.5i
  619. .ta .2i .5i 1.5i 2.5i
  620. .R
  621. STR
  622.     1    n        length of name in bytes
  623.     n    STRING8        name
  624. .De
  625. .ps 11
  626. .nr PS 11
  627. .SH
  628. Errors
  629. .LP
  630. .ps 9
  631. .nr PS 9
  632. .Ds 0
  633. .TA .2i .5i 1.5i 2.5i
  634. .ta .2i .5i 1.5i 2.5i
  635. .R
  636. .PN Request
  637.     1    0        Error
  638.     1    1        code
  639.     2    CARD16        sequence number
  640.     4            unused
  641.     2    CARD16        minor opcode
  642.     1    CARD8        major opcode
  643.     21            unused
  644. .De
  645. .LP
  646. .Ds 0
  647. .TA .2i .5i 1.5i 2.5i
  648. .ta .2i .5i 1.5i 2.5i
  649. .R
  650. .PN Value
  651.     1    0        Error
  652.     1    2        code
  653.     2    CARD16        sequence number
  654.     4    <32-bits>        bad value
  655.     2    CARD16        minor opcode
  656.     1    CARD8        major opcode
  657.     21            unused
  658. .De
  659. .LP
  660. .Ds 0
  661. .TA .2i .5i 1.5i 2.5i
  662. .ta .2i .5i 1.5i 2.5i
  663. .R
  664. .PN Window
  665.     1    0        Error
  666.     1    3        code
  667.     2    CARD16        sequence number
  668.     4    CARD32        bad resource id
  669.     2    CARD16        minor opcode
  670.     1    CARD8        major opcode
  671.     21            unused
  672. .De
  673. .LP
  674. .Ds 0
  675. .TA .2i .5i 1.5i 2.5i
  676. .ta .2i .5i 1.5i 2.5i
  677. .R
  678. .PN Pixmap
  679.     1    0        Error
  680.     1    4        code
  681.     2    CARD16        sequence number
  682.     4    CARD32        bad resource id
  683.     2    CARD16        minor opcode
  684.     1    CARD8        major opcode
  685.     21            unused
  686. .De
  687. .LP
  688. .Ds 0
  689. .TA .2i .5i 1.5i 2.5i
  690. .ta .2i .5i 1.5i 2.5i
  691. .R
  692. .PN Atom
  693.     1    0        Error
  694.     1    5        code
  695.     2    CARD16        sequence number
  696.     4    CARD32        bad atom id
  697.     2    CARD16        minor opcode
  698.     1    CARD8        major opcode
  699.     21            unused
  700. .De
  701. .LP
  702. .Ds 0
  703. .TA .2i .5i 1.5i 2.5i
  704. .ta .2i .5i 1.5i 2.5i
  705. .R
  706. .PN Cursor
  707.     1    0        Error
  708.     1    6        code
  709.     2    CARD16        sequence number
  710.     4    CARD32        bad resource id
  711.     2    CARD16        minor opcode
  712.     1    CARD8        major opcode
  713.     21            unused
  714. .De
  715. .LP
  716. .Ds 0
  717. .TA .2i .5i 1.5i 2.5i
  718. .ta .2i .5i 1.5i 2.5i
  719. .R
  720. .PN Font
  721.     1    0        Error
  722.     1    7        code
  723.     2    CARD16        sequence number
  724.     4    CARD32        bad resource id
  725.     2    CARD16        minor opcode
  726.     1    CARD8        major opcode
  727.     21            unused
  728. .De
  729. .LP
  730. .Ds 0
  731. .TA .2i .5i 1.5i 2.5i
  732. .ta .2i .5i 1.5i 2.5i
  733. .R
  734. .PN Match
  735.     1    0        Error
  736.     1    8        code
  737.     2    CARD16        sequence number
  738.     4            unused
  739.     2    CARD16        minor opcode
  740.     1    CARD8        major opcode
  741.     21            unused
  742. .De
  743. .LP
  744. .Ds 0
  745. .TA .2i .5i 1.5i 2.5i
  746. .ta .2i .5i 1.5i 2.5i
  747. .R
  748. .PN Drawable
  749.     1    0        Error
  750.     1    9        code
  751.     2    CARD16        sequence number
  752.     4    CARD32        bad resource id
  753.     2    CARD16        minor opcode
  754.     1    CARD8        major opcode
  755.     21            unused
  756. .De
  757. .LP
  758. .Ds 0
  759. .TA .2i .5i 1.5i 2.5i
  760. .ta .2i .5i 1.5i 2.5i
  761. .R
  762. .PN Access
  763.     1    0        Error
  764.     1    10        code
  765.     2    CARD16        sequence number
  766.     4            unused
  767.     2    CARD16        minor opcode
  768.     1    CARD8        major opcode
  769.     21            unused
  770. .De
  771. .LP
  772. .Ds 0
  773. .TA .2i .5i 1.5i 2.5i
  774. .ta .2i .5i 1.5i 2.5i
  775. .R
  776. .PN Alloc
  777.     1    0        Error
  778.     1    11        code
  779.     2    CARD16        sequence number
  780.     4            unused
  781.     2    CARD16        minor opcode
  782.     1    CARD8        major opcode
  783.     21            unused
  784. .De
  785. .LP
  786. .Ds 0
  787. .TA .2i .5i 1.5i 2.5i
  788. .ta .2i .5i 1.5i 2.5i
  789. .R
  790. .PN Colormap
  791.     1    0        Error
  792.     1    12        code
  793.     2    CARD16        sequence number
  794.     4    CARD32        bad resource id
  795.     2    CARD16        minor opcode
  796.     1    CARD8        major opcode
  797.     21            unused
  798. .De
  799. .LP
  800. .Ds 0
  801. .TA .2i .5i 1.5i 2.5i
  802. .ta .2i .5i 1.5i 2.5i
  803. .R
  804. .PN GContext
  805.     1    0        Error
  806.     1    13        code
  807.     2    CARD16        sequence number
  808.     4    CARD32        bad resource id
  809.     2    CARD16        minor opcode
  810.     1    CARD8        major opcode
  811.     21            unused
  812. .De
  813. .LP
  814. .Ds 0
  815. .TA .2i .5i 1.5i 2.5i
  816. .ta .2i .5i 1.5i 2.5i
  817. .R
  818. .PN IDChoice
  819.     1    0        Error
  820.     1    14        code
  821.     2    CARD16        sequence number
  822.     4    CARD32        bad resource id
  823.     2    CARD16        minor opcode
  824.     1    CARD8        major opcode
  825.     21            unused
  826. .De
  827. .LP
  828. .Ds 0
  829. .TA .2i .5i 1.5i 2.5i
  830. .ta .2i .5i 1.5i 2.5i
  831. .R
  832. .PN Name
  833.     1    0        Error
  834.     1    15        code
  835.     2    CARD16        sequence number
  836.     4            unused
  837.     2    CARD16        minor opcode
  838.     1    CARD8        major opcode
  839.     21            unused
  840. .De
  841. .LP
  842. .Ds 0
  843. .TA .2i .5i 1.5i 2.5i
  844. .ta .2i .5i 1.5i 2.5i
  845. .R
  846. .PN Length
  847.     1    0        Error
  848.     1    16        code
  849.     2    CARD16        sequence number
  850.     4            unused
  851.     2    CARD16        minor opcode
  852.     1    CARD8        major opcode
  853.     21            unused
  854. .De
  855. .LP
  856. .Ds 0
  857. .TA .2i .5i 1.5i 2.5i
  858. .ta .2i .5i 1.5i 2.5i
  859. .R
  860. .PN Implementation
  861.     1    0        Error
  862.     1    17        code
  863.     2    CARD16        sequence number
  864.     4            unused
  865.     2    CARD16        minor opcode
  866.     1    CARD8        major opcode
  867.     21            unused
  868. .De
  869. .ps 11
  870. .nr PS 11
  871. .SH
  872. Keyboards
  873. .LP
  874. KEYCODE values are always greater than 7 (and less than 256).
  875. .LP
  876. KEYSYM values with the bit #x10000000 set are reserved as vendor-specific.
  877. .LP
  878. The names and encodings of the standard KEYSYM values are contained in 
  879. Appendix A, Keysym Encoding.
  880. .SH
  881. Pointers
  882. .LP
  883. BUTTON values are numbered starting with one.
  884. .SH
  885. Predefined Atoms
  886. .LP
  887. .ps 9
  888. .nr PS 9
  889. .Ds 0
  890. .TA 1.75i 3i 4.75i
  891. .ta 1.75i 3i 4.75i
  892. PRIMARY    1    WM_NORMAL_HINTS    40
  893. SECONDARY    2    WM_SIZE_HINTS    41
  894. ARC    3    WM_ZOOM_HINTS    42
  895. ATOM    4    MIN_SPACE    43
  896. BITMAP    5    NORM_SPACE    44
  897. CARDINAL    6    MAX_SPACE    45
  898. COLORMAP    7    END_SPACE    46
  899. CURSOR    8    SUPERSCRIPT_X    47
  900. CUT_BUFFER0    9    SUPERSCRIPT_Y    48
  901. CUT_BUFFER1    10    SUBSCRIPT_X    49
  902. CUT_BUFFER2    11    SUBSCRIPT_Y    50
  903. CUT_BUFFER3    12    UNDERLINE_POSITION    51
  904. CUT_BUFFER4    13    UNDERLINE_THICKNESS    52
  905. CUT_BUFFER5    14    STRIKEOUT_ASCENT    53
  906. CUT_BUFFER6    15    STRIKEOUT_DESCENT    54
  907. CUT_BUFFER7    16    ITALIC_ANGLE    55
  908. DRAWABLE    17    X_HEIGHT    56
  909. FONT    18    QUAD_WIDTH    57
  910. INTEGER    19    WEIGHT    58
  911. PIXMAP    20    POINT_SIZE    59
  912. POINT    21    RESOLUTION    60
  913. RECTANGLE    22    COPYRIGHT    61
  914. RESOURCE_MANAGER    23    NOTICE    62
  915. RGB_COLOR_MAP    24    FONT_NAME    63
  916. RGB_BEST_MAP    25    FAMILY_NAME    64
  917. RGB_BLUE_MAP    26    FULL_NAME    65
  918. RGB_DEFAULT_MAP    27    CAP_HEIGHT    66
  919. RGB_GRAY_MAP    28    WM_CLASS    67
  920. RGB_GREEN_MAP    29    WM_TRANSIENT_FOR    68
  921. RGB_RED_MAP    30
  922. STRING    31
  923. VISUALID    32
  924. WINDOW    33
  925. WM_COMMAND    34
  926. WM_HINTS    35
  927. WM_CLIENT_MACHINE    36
  928. WM_ICON_NAME    37
  929. WM_ICON_SIZE    38
  930. WM_NAME    39
  931. .De
  932. .ps 11
  933. .nr PS 11
  934. .SH
  935. Connection Setup
  936. .LP
  937. For TCP connections, 
  938. displays on a given host are numbered starting from 0,
  939. and the server for display N listens and accepts connections on port 6000 + N.
  940. For DECnet connections,
  941. displays on a given host are numbered starting from 0,
  942. and the server for display N listens and accepts connections on the object
  943. name obtained by concatenating ``X$X'' with the decimal representation of N,
  944. for example, X$X0 and X$X1.
  945. .LP
  946. Information sent by the client at connection setup:
  947. .LP
  948. .ps 9
  949. .nr PS 9
  950. .Ds 0
  951. .TA .2i .5i 1.5i 2.5i
  952. .ta .2i .5i 1.5i 2.5i
  953. .R
  954.     1            byte-order
  955.         #x42    MSB first
  956.         #x6C    LSB first
  957.     1            unused
  958.     2    CARD16        protocol-major-version
  959.     2    CARD16        protocol-minor-version
  960.     2    n        length of authorization-protocol-name
  961.     2    d        length of authorization-protocol-data
  962.     2            unused
  963.     n    STRING8        authorization-protocol-name
  964.     p            unused, p=pad(n)
  965.     d    STRING8        authorization-protocol-data
  966.     q            unused, q=pad(d)
  967. .De
  968. .ps 11
  969. .nr PS 11
  970. .LP
  971. Except where explicitly noted in the protocol, 
  972. all 16-bit and 32-bit quantities sent by the client must be transmitted 
  973. with the specified byte order, 
  974. and all 16-bit and 32-bit quantities returned by the server will be transmitted
  975. with this byte order.
  976. .LP
  977. Information received by the client if authorization fails:
  978. .LP
  979. .ps 9
  980. .nr PS 9
  981. .Ds 0
  982. .TA .2i .5i 1.5i 2.5i
  983. .ta .2i .5i 1.5i 2.5i
  984. .R
  985.     1    0        failed
  986.     1    n        length of reason in bytes
  987.     2    CARD16        protocol-major-version
  988.     2    CARD16        protocol-minor-version
  989.     2    (n+p)/4            length in 4-byte units of ``additional data''
  990.     n    STRING8            reason
  991.     p            unused, p=pad(n)
  992. .De
  993. .ps 11
  994. .nr PS 11
  995. .LP
  996. Information received by the client if authorization is accepted:
  997. .LP
  998. .ps 9
  999. .nr PS 9
  1000. .Ds 0
  1001. .TA .2i .5i 1.5i 2.5i
  1002. .ta .2i .5i 1.5i 2.5i
  1003. .R
  1004.     1    1        success
  1005.     1            unused
  1006.     2    CARD16        protocol-major-version
  1007.     2    CARD16        protocol-minor-version
  1008.     2    8+2n+(v+p+m)/4        length in 4-byte units of ``additional data''
  1009.     4    CARD32        release-number
  1010.     4    CARD32        resource-id-base
  1011.     4    CARD32        resource-id-mask
  1012.     4    CARD32        motion-buffer-size
  1013.     2    v        length of vendor
  1014.     2    CARD16        maximum-request-length
  1015.     1    CARD8        number of SCREENs in roots
  1016.     1    n        number for FORMATs in pixmap-formats
  1017.     1            image-byte-order
  1018.         0    LSBFirst
  1019.         1    MSBFirst
  1020.     1            bitmap-format-bit-order
  1021.         0    LeastSignificant
  1022.         1    MostSignificant
  1023.     1    CARD8        bitmap-format-scanline-unit
  1024.     1    CARD8        bitmap-format-scanline-pad
  1025.     1    KEYCODE        min-keycode
  1026.     1    KEYCODE        max-keycode
  1027.     4            unused
  1028.     v    STRING8        vendor
  1029.     p            unused, p=pad(v)
  1030.     8n    LISTofFORMAT        pixmap-formats
  1031.     m    LISTofSCREEN        roots (m is always a multiple of 4)
  1032. .De
  1033. .LP
  1034. .Ds 0
  1035. .TA .2i .5i 1.5i 2.5i
  1036. .ta .2i .5i 1.5i 2.5i
  1037. .R
  1038. FORMAT
  1039.     1    CARD8        depth
  1040.     1    CARD8        bits-per-pixel
  1041.     1    CARD8        scanline-pad
  1042.     5            unused
  1043. .De
  1044. .LP
  1045. .Ds 0
  1046. .TA .2i .5i 1.5i 2.5i
  1047. .ta .2i .5i 1.5i 2.5i
  1048. .R
  1049. SCREEN
  1050.     4    WINDOW        root
  1051.     4    COLORMAP        default-colormap
  1052.     4    CARD32        white-pixel
  1053.     4    CARD32        black-pixel
  1054.     4    SETofEVENT        current-input-masks
  1055.     2    CARD16        width-in-pixels
  1056.     2    CARD16        height-in-pixels
  1057.     2    CARD16        width-in-millimeters
  1058.     2    CARD16        height-in-millimeters
  1059.     2    CARD16        min-installed-maps
  1060.     2    CARD16        max-installed-maps
  1061.     4    VISUALID        root-visual
  1062.     1            backing-stores
  1063.         0    Never
  1064.         1    WhenMapped
  1065.         2    Always
  1066.     1    BOOL        save-unders
  1067.     1    CARD8        root-depth
  1068.     1    CARD8        number of DEPTHs in allowed-depths
  1069.     n    LISTofDEPTH            allowed-depths (n is always a multiple of 4)
  1070. .De
  1071. .LP
  1072. .Ds 0
  1073. .TA .2i .5i 1.5i 2.5i
  1074. .ta .2i .5i 1.5i 2.5i
  1075. .R
  1076. DEPTH
  1077.     1    CARD8        depth
  1078.     1            unused
  1079.     2    n        number of VISUALTYPES in visuals
  1080.     4            unused
  1081.     24n    LISTofVISUALTYPE            visuals
  1082. .De
  1083. .LP
  1084. .Ds 0
  1085. .TA .2i .5i 1.5i 2.5i
  1086. .ta .2i .5i 1.5i 2.5i
  1087. .R
  1088. VISUALTYPE
  1089.     4    VISUALID        visual-id
  1090.     1            class
  1091.         0    StaticGray
  1092.         1    GrayScale
  1093.         2    StaticColor
  1094.         3    PseudoColor
  1095.         4    TrueColor
  1096.         5    DirectColor
  1097.     1    CARD8        bits-per-rgb-value
  1098.     2    CARD16        colormap-entries
  1099.     4    CARD32        red-mask
  1100.     4    CARD32        green-mask
  1101.     4    CARD32        blue-mask
  1102.     4            unused
  1103. .De
  1104. .ps 11
  1105. .nr PS 11
  1106. .SH
  1107. Requests
  1108. .LP
  1109. .ps 9
  1110. .nr PS 9
  1111. .Ds 0
  1112. .TA .2i .5i 1.5i 2.5i
  1113. .ta .2i .5i 1.5i 2.5i
  1114. .R
  1115. .PN CreateWindow
  1116.     1    1        opcode
  1117.     1    CARD8        depth
  1118.     2    8+n        request length
  1119.     4    WINDOW        wid
  1120.     4    WINDOW        parent
  1121.     2    INT16        x
  1122.     2    INT16        y
  1123.     2    CARD16        width
  1124.     2    CARD16        height
  1125.     2    CARD16        border-width
  1126.     2            class
  1127.         0    CopyFromParent
  1128.         1    InputOutput
  1129.         2    InputOnly
  1130.     4    VISUALID        visual
  1131.         0    CopyFromParent
  1132.     4    BITMASK            value-mask (has n bits set to 1)
  1133.         #x00000001    background-pixmap
  1134.         #x00000002    background-pixel
  1135.         #x00000004    border-pixmap
  1136.         #x00000008    border-pixel
  1137.         #x00000010    bit-gravity
  1138.         #x00000020    win-gravity
  1139.         #x00000040    backing-store
  1140.         #x00000080    backing-planes
  1141.         #x00000100    backing-pixel
  1142.         #x00000200    override-redirect
  1143.         #x00000400    save-under
  1144.         #x00000800    event-mask
  1145.         #x00001000    do-not-propagate-mask
  1146.         #x00002000    colormap
  1147.         #x00004000    cursor
  1148.     4n    LISTofVALUE        value-list
  1149. .De
  1150. .Ds 0
  1151. .TA .2i .5i 1.5i 2.5i
  1152. .ta .2i .5i 1.5i 2.5i
  1153. .R
  1154.   VALUEs
  1155.     4    PIXMAP        background-pixmap
  1156.         0    None
  1157.         1    ParentRelative
  1158.     4    CARD32        background-pixel
  1159.     4    PIXMAP        border-pixmap
  1160.         0    CopyFromParent
  1161.     4    CARD32        border-pixel
  1162.     1    BITGRAVITY        bit-gravity
  1163.     1    WINGRAVITY        win-gravity
  1164.     1            backing-store
  1165.         0    NotUseful
  1166.         1    WhenMapped
  1167.         2    Always
  1168.     4    CARD32        backing-planes
  1169.     4    CARD32        backing-pixel
  1170.     1    BOOL        override-redirect
  1171.     1    BOOL        save-under
  1172.     4    SETofEVENT        event-mask
  1173.     4    SETofDEVICEEVENT    do-not-propagate-mask
  1174.     4    COLORMAP        colormap
  1175.         0    CopyFromParent
  1176.     4    CURSOR        cursor
  1177.         0    None
  1178. .De
  1179. .LP
  1180. .Ds 0
  1181. .TA .2i .5i 1.5i 2.5i
  1182. .ta .2i .5i 1.5i 2.5i
  1183. .R
  1184. .PN ChangeWindowAttributes
  1185.     1    2        opcode
  1186.     1            unused
  1187.     2    3+n        request length
  1188.     4    WINDOW        window
  1189.     4    BITMASK        value-mask (has n bits set to 1)
  1190.         encodings are the same as for CreateWindow
  1191.     4n    LISTofVALUE        value-list
  1192.         encodings are the same as for CreateWindow
  1193. .De
  1194. .LP
  1195. .Ds 0
  1196. .TA .2i .5i 1.5i 2.5i
  1197. .ta .2i .5i 1.5i 2.5i
  1198. .R
  1199. .PN GetWindowAttributes
  1200.     1    3        opcode
  1201.     1            unused
  1202.     2    2        request length
  1203.     4    WINDOW        window
  1204. .De
  1205. .Ds 0
  1206. .TA .2i .5i 1.5i 2.5i
  1207. .ta .2i .5i 1.5i 2.5i
  1208. .R
  1209.  =>
  1210.     1    1        Reply
  1211.     1            backing-store
  1212.         0    NotUseful
  1213.         1    WhenMapped
  1214.         2    Always
  1215.     2    CARD16        sequence number
  1216.     4    3        reply length
  1217.     4    VISUALID        visual
  1218.     2            class
  1219.         1    InputOutput
  1220.         2    InputOnly
  1221.     1    BITGRAVITY        bit-gravity
  1222.     1    WINGRAVITY        win-gravity
  1223.     4    CARD32        backing-planes
  1224.     4    CARD32        backing-pixel
  1225.     1    BOOL        save-under
  1226.     1    BOOL        map-is-installed
  1227.     1            map-state
  1228.         0    Unmapped
  1229.         1    Unviewable
  1230.         2    Viewable
  1231.     1    BOOL        override-redirect
  1232.     4    COLORMAP        colormap
  1233.         0    None
  1234.     4    SETofEVENT        all-event-masks
  1235.     4    SETofEVENT        your-event-mask
  1236.     2    SETofDEVICEEVENT        do-not-propagate-mask
  1237.     2            unused
  1238. .De
  1239. .LP
  1240. .Ds 0
  1241. .TA .2i .5i 1.5i 2.5i
  1242. .ta .2i .5i 1.5i 2.5i
  1243. .R
  1244. .PN DestroyWindow
  1245.     1    4        opcode
  1246.     1            unused
  1247.     2    2        request length
  1248.     4    WINDOW        window
  1249. .De
  1250. .LP
  1251. .Ds 0
  1252. .TA .2i .5i 1.5i 2.5i
  1253. .ta .2i .5i 1.5i 2.5i
  1254. .R
  1255. .PN DestroySubwindows
  1256.     1    5        opcode
  1257.     1            unused
  1258.     2    2        request length
  1259.     4    WINDOW        window
  1260. .De
  1261. .LP
  1262. .Ds 0
  1263. .TA .2i .5i 1.5i 2.5i
  1264. .ta .2i .5i 1.5i 2.5i
  1265. .R
  1266. .PN ChangeSaveSet
  1267.     1    6        opcode
  1268.     1            mode
  1269.         0    Insert
  1270.         1    Delete
  1271.     2    2        request length
  1272.     4    WINDOW        window
  1273. .De
  1274. .LP
  1275. .Ds 0
  1276. .TA .2i .5i 1.5i 2.5i
  1277. .ta .2i .5i 1.5i 2.5i
  1278. .R
  1279. .PN ReparentWindow
  1280.     1    7        opcode
  1281.     1            unused
  1282.     2    4        request length
  1283.     4    WINDOW        window
  1284.     4    WINDOW        parent
  1285.     2    INT16        x
  1286.     2    INT16        y
  1287. .De
  1288. .LP
  1289. .Ds 0
  1290. .TA .2i .5i 1.5i 2.5i
  1291. .ta .2i .5i 1.5i 2.5i
  1292. .R
  1293. .PN MapWindow
  1294.     1    8        opcode
  1295.     1            unused
  1296.     2    2        request length
  1297.     4    WINDOW        window
  1298. .De
  1299. .LP
  1300. .Ds 0
  1301. .TA .2i .5i 1.5i 2.5i
  1302. .ta .2i .5i 1.5i 2.5i
  1303. .R
  1304. .PN MapSubwindows
  1305.     1    9        opcode
  1306.     1            unused
  1307.     2    2        request length
  1308.     4    WINDOW        window
  1309. .De
  1310. .LP
  1311. .Ds 0
  1312. .TA .2i .5i 1.5i 2.5i
  1313. .ta .2i .5i 1.5i 2.5i
  1314. .R
  1315. .PN UnmapWindow
  1316.     1    10        opcode
  1317.     1            unused
  1318.     2    2        request length
  1319.     4    WINDOW        window
  1320. .De
  1321. .LP
  1322. .Ds 0
  1323. .TA .2i .5i 1.5i 2.5i
  1324. .ta .2i .5i 1.5i 2.5i
  1325. .R
  1326. .PN UnmapSubwindows
  1327.     1    11        opcode
  1328.     1            unused
  1329.     2    2        request length
  1330.     4    WINDOW        window
  1331. .De
  1332. .LP
  1333. .Ds 0
  1334. .TA .2i .5i 1.5i 2.5i
  1335. .ta .2i .5i 1.5i 2.5i
  1336. .R
  1337. .PN ConfigureWindow
  1338.     1    12        opcode
  1339.     1            unused
  1340.     2    3+n        request length
  1341.     4    WINDOW        window
  1342.     2    BITMASK            value-mask (has n bits set to 1)
  1343.         #x0001    x
  1344.         #x0002    y
  1345.         #x0004    width
  1346.         #x0008    height
  1347.         #x0010    border-width
  1348.         #x0020    sibling
  1349.         #x0040    stack-mode
  1350.     2            unused
  1351.     4n    LISTofVALUE        value-list
  1352. .De
  1353. .Ds 0
  1354. .TA .2i .5i 1.5i 2.5i
  1355. .ta .2i .5i 1.5i 2.5i
  1356. .R
  1357.   VALUEs
  1358.     2    INT16        x
  1359.     2    INT16        y
  1360.     2    CARD16        width
  1361.     2    CARD16        height
  1362.     2    CARD16        border-width
  1363.     4    WINDOW        sibling
  1364.     1            stack-mode
  1365.         0    Above
  1366.         1    Below
  1367.         2    TopIf
  1368.         3    BottomIf
  1369.         4    Opposite
  1370. .De
  1371. .LP
  1372. .Ds 0
  1373. .TA .2i .5i 1.5i 2.5i
  1374. .ta .2i .5i 1.5i 2.5i
  1375. .R
  1376. .PN CirculateWindow
  1377.     1    13        opcode
  1378.     1            direction
  1379.         0    RaiseLowest
  1380.         1    LowerHighest
  1381.     2    2        request length
  1382.     4    WINDOW        window
  1383. .De
  1384. .LP
  1385. .Ds 0
  1386. .TA .2i .5i 1.5i 2.5i
  1387. .ta .2i .5i 1.5i 2.5i
  1388. .R
  1389. .PN GetGeometry
  1390.     1    14        opcode
  1391.     1            unused
  1392.     2    2        request length
  1393.     4    DRAWABLE        drawable
  1394. .De
  1395. .Ds 0
  1396. .TA .2i .5i 1.5i 2.5i
  1397. .ta .2i .5i 1.5i 2.5i
  1398. .R
  1399.  =>
  1400.     1    1        Reply
  1401.     1    CARD8        depth
  1402.     2    CARD16        sequence number
  1403.     4    0        reply length
  1404.     4    WINDOW        root
  1405.     2    INT16        x
  1406.     2    INT16        y
  1407.     2    CARD16        width
  1408.     2    CARD16        height
  1409.     2    CARD16        border-width
  1410.     10            unused
  1411. .De
  1412. .LP
  1413. .Ds 0
  1414. .TA .2i .5i 1.5i 2.5i
  1415. .ta .2i .5i 1.5i 2.5i
  1416. .R
  1417. .PN QueryTree
  1418.     1    15        opcode
  1419.     1            unused
  1420.     2    2        request length
  1421.     4    WINDOW        window
  1422. .De
  1423. .Ds 0
  1424. .TA .2i .5i 1.5i 2.5i
  1425. .ta .2i .5i 1.5i 2.5i
  1426. .R
  1427.  =>
  1428.     1    1        Reply
  1429.     1            unused
  1430.     2    CARD16        sequence number
  1431.     4    n        reply length
  1432.     4    WINDOW        root
  1433.     4    WINDOW        parent
  1434.         0    None
  1435.     2    n        number of WINDOWs in children
  1436.     14            unused
  1437.     4n    LISTofWINDOW        children
  1438. .De
  1439. .LP
  1440. .Ds 0
  1441. .TA .2i .5i 1.5i 2.5i
  1442. .ta .2i .5i 1.5i 2.5i
  1443. .R
  1444. .PN InternAtom
  1445.     1    16        opcode
  1446.     1    BOOL        only-if-exists
  1447.     2    2+(n+p)/4        request length
  1448.     2    n        length of name
  1449.     2            unused
  1450.     n    STRING8            name
  1451.     p            unused, p=pad(n)
  1452. .De
  1453. .Ds 0
  1454. .TA .2i .5i 1.5i 2.5i
  1455. .ta .2i .5i 1.5i 2.5i
  1456. .R
  1457.  =>
  1458.     1    1        Reply
  1459.     1            unused
  1460.     2    CARD16        sequence number
  1461.     4    0        reply length
  1462.     4    ATOM        atom
  1463.         0    None
  1464.     20            unused
  1465. .De
  1466. .LP
  1467. .Ds 0
  1468. .TA .2i .5i 1.5i 2.5i
  1469. .ta .2i .5i 1.5i 2.5i
  1470. .R
  1471. .PN GetAtomName
  1472.     1    17        opcode
  1473.     1            unused
  1474.     2    2        request length
  1475.     4    ATOM        atom
  1476. .De
  1477. .Ds 0
  1478. .TA .2i .5i 1.5i 2.5i
  1479. .ta .2i .5i 1.5i 2.5i
  1480. .R
  1481.  =>
  1482.     1    1        Reply
  1483.     1                unused
  1484.     2    CARD16        sequence number
  1485.     4    (n+p)/4            reply length
  1486.     2    n        length of name
  1487.     22            unused
  1488.     n    STRING8        name
  1489.     p            unused, p=pad(n)
  1490. .De
  1491. .LP
  1492. .Ds 0
  1493. .TA .2i .5i 1.5i 2.5i
  1494. .ta .2i .5i 1.5i 2.5i
  1495. .R
  1496. .PN ChangeProperty
  1497.     1    18        opcode
  1498.     1            mode
  1499.         0    Replace
  1500.         1    Prepend
  1501.         2    Append
  1502.     2    6+(n+p)/4        request length
  1503.     4    WINDOW        window
  1504.     4    ATOM        property
  1505.     4    ATOM        type
  1506.     1    CARD8        format
  1507.     3            unused
  1508.     4    CARD32        length of data in format units
  1509.                 (= n for format = 8)
  1510.                 (= n/2 for format = 16)
  1511.                 (= n/4 for format = 32)
  1512.     n    LISTofBYTE        data
  1513.                 (n is a multiple of 2 for format = 16)
  1514.                 (n is a multiple of 4 for format = 32)
  1515.     p            unused, p=pad(n)
  1516. .De
  1517. .LP
  1518. .Ds 0
  1519. .TA .2i .5i 1.5i 2.5i
  1520. .ta .2i .5i 1.5i 2.5i
  1521. .R
  1522. .PN DeleteProperty
  1523.     1    19        opcode
  1524.     1            unused
  1525.     2    3        request length
  1526.     4    WINDOW        window
  1527.     4    ATOM        property
  1528. .De
  1529. .LP
  1530. .Ds 0
  1531. .TA .2i .5i 1.5i 2.5i
  1532. .ta .2i .5i 1.5i 2.5i
  1533. .R
  1534. .PN GetProperty
  1535.     1    20        opcode
  1536.     1    BOOL        delete
  1537.     2    6        request length
  1538.     4    WINDOW        window
  1539.     4    ATOM        property
  1540.     4    ATOM        type
  1541.         0    AnyPropertyType
  1542.     4    CARD32        long-offset
  1543.     4    CARD32        long-length
  1544. .De
  1545. .Ds 0
  1546. .TA .2i .5i 1.5i 2.5i
  1547. .ta .2i .5i 1.5i 2.5i
  1548. .R
  1549.  =>
  1550.     1    1        Reply
  1551.     1    CARD8        format
  1552.     2    CARD16        sequence number
  1553.     4    (n+p)/4            reply length
  1554.     4    ATOM        type
  1555.         0    None
  1556.     4    CARD32        bytes-after
  1557.     4    CARD32        length of value in format units
  1558.                 (= 0 for format = 0)
  1559.                 (= n for format = 8)
  1560.                 (= n/2 for format = 16)
  1561.                 (= n/4 for format = 32)
  1562.     12            unused
  1563.     n    LISTofBYTE        value
  1564.                 (n is zero for format = 0)
  1565.                 (n is a multiple of 2 for format = 16)
  1566.                 (n is a multiple of 4 for format = 32)
  1567.     p            unused, p=pad(n)
  1568. .De
  1569. .LP
  1570. .Ds 0
  1571. .TA .2i .5i 1.5i 2.5i
  1572. .ta .2i .5i 1.5i 2.5i
  1573. .R
  1574. .PN ListProperties
  1575.     1    21        opcode
  1576.     1            unused
  1577.     2    2        request length
  1578.     4    WINDOW        window
  1579. .De
  1580. .Ds 0
  1581. .TA .2i .5i 1.5i 2.5i
  1582. .ta .2i .5i 1.5i 2.5i
  1583. .R
  1584.  =>
  1585.     1    1        Reply
  1586.     1            unused
  1587.     2    CARD16        sequence number
  1588.     4    n        reply length
  1589.     2    n        number of ATOMs in atoms
  1590.     22            unused
  1591.     4n    LISTofATOM        atoms
  1592. .De
  1593. .LP
  1594. .Ds 0
  1595. .TA .2i .5i 1.5i 2.5i
  1596. .ta .2i .5i 1.5i 2.5i
  1597. .R
  1598. .PN SetSelectionOwner
  1599.     1    22        opcode
  1600.     1            unused
  1601.     2    4        request length
  1602.     4    WINDOW        owner
  1603.         0    None
  1604.     4    ATOM        selection
  1605.     4    TIMESTAMP        time
  1606.         0    CurrentTime
  1607. .De
  1608. .LP
  1609. .Ds 0
  1610. .TA .2i .5i 1.5i 2.5i
  1611. .ta .2i .5i 1.5i 2.5i
  1612. .R
  1613. .PN GetSelectionOwner
  1614.     1    23        opcode
  1615.     1            unused
  1616.     2    2        request length
  1617.     4    ATOM        selection
  1618. .De
  1619. .Ds 0
  1620. .TA .2i .5i 1.5i 2.5i
  1621. .ta .2i .5i 1.5i 2.5i
  1622. .R
  1623.  =>
  1624.     1    1        Reply
  1625.     1            unused
  1626.     2    CARD16        sequence number
  1627.     4    0        reply length
  1628.     4    WINDOW        owner
  1629.         0    None
  1630.     20            unused
  1631. .De
  1632. .LP
  1633. .Ds 0
  1634. .TA .2i .5i 1.5i 2.5i
  1635. .ta .2i .5i 1.5i 2.5i
  1636. .R
  1637. .PN ConvertSelection
  1638.     1    24        opcode
  1639.     1            unused
  1640.     2    6        request length
  1641.     4    WINDOW        requestor
  1642.     4    ATOM        selection
  1643.     4    ATOM        target
  1644.     4    ATOM        property
  1645.         0    None
  1646.     4    TIMESTAMP        time
  1647.         0    CurrentTime
  1648. .De
  1649. .LP
  1650. .Ds 0
  1651. .TA .2i .5i 1.5i 2.5i
  1652. .ta .2i .5i 1.5i 2.5i
  1653. .R
  1654. .PN SendEvent
  1655.     1    25        opcode
  1656.     1    BOOL        propagate
  1657.     2    11        request length
  1658.     4    WINDOW        destination
  1659.         0    PointerWindow
  1660.         1    InputFocus
  1661.     4    SETofEVENT        event-mask
  1662.     32            event
  1663.         standard event format (see the Events section)
  1664. .De
  1665. .LP
  1666. .Ds 0
  1667. .TA .2i .5i 1.5i 2.5i
  1668. .ta .2i .5i 1.5i 2.5i
  1669. .R
  1670. .PN GrabPointer
  1671.     1    26        opcode
  1672.     1    BOOL        owner-events
  1673.     2    6        request length
  1674.     4    WINDOW        grab-window
  1675.     2    SETofPOINTEREVENT        event-mask
  1676.     1            pointer-mode
  1677.         0    Synchronous
  1678.         1    Asynchronous
  1679.     1            keyboard-mode
  1680.         0    Synchronous
  1681.         1    Asynchronous
  1682.     4    WINDOW        confine-to
  1683.         0    None
  1684.     4    CURSOR        cursor
  1685.         0    None
  1686.     4    TIMESTAMP        time
  1687.         0    CurrentTime
  1688. .De
  1689. .Ds 0
  1690. .TA .2i .5i 1.5i 2.5i
  1691. .ta .2i .5i 1.5i 2.5i
  1692. .R
  1693.  =>
  1694.     1    1        Reply
  1695.     1            status
  1696.         0    Success
  1697.         1    AlreadyGrabbed
  1698.         2    InvalidTime
  1699.         3    NotViewable
  1700.         4    Frozen
  1701.     2    CARD16        sequence number
  1702.     4    0        reply length
  1703.     24            unused
  1704. .De
  1705. .LP
  1706. .Ds 0
  1707. .TA .2i .5i 1.5i 2.5i
  1708. .ta .2i .5i 1.5i 2.5i
  1709. .R
  1710. .PN UngrabPointer
  1711.     1    27        opcode
  1712.     1            unused
  1713.     2    2        request length
  1714.     4    TIMESTAMP        time
  1715.         0    CurrentTime
  1716. .De
  1717. .LP
  1718. .Ds 0
  1719. .TA .2i .5i 1.5i 2.5i
  1720. .ta .2i .5i 1.5i 2.5i
  1721. .R
  1722. .PN GrabButton
  1723.     1    28        opcode
  1724.     1    BOOL        owner-events
  1725.     2    6        request length
  1726.     4    WINDOW        grab-window
  1727.     2    SETofPOINTEREVENT        event-mask
  1728.     1            pointer-mode
  1729.         0    Synchronous
  1730.         1    Asynchronous
  1731.     1            keyboard-mode
  1732.         0    Synchronous
  1733.         1    Asynchronous
  1734.     4    WINDOW        confine-to
  1735.         0    None
  1736.     4    CURSOR        cursor
  1737.         0    None
  1738.     1    BUTTON        button
  1739.         0    AnyButton
  1740.     1            unused
  1741.     2    SETofKEYMASK        modifiers
  1742.         #x8000    AnyModifier
  1743. .De
  1744. .LP
  1745. .Ds 0
  1746. .TA .2i .5i 1.5i 2.5i
  1747. .ta .2i .5i 1.5i 2.5i
  1748. .R
  1749. .PN UngrabButton
  1750.     1    29        opcode
  1751.     1    BUTTON        button
  1752.         0    AnyButton
  1753.     2    3        request length
  1754.     4    WINDOW        grab-window
  1755.     2    SETofKEYMASK        modifiers
  1756.         #x8000    AnyModifier
  1757.     2            unused
  1758. .De
  1759. .LP
  1760. .Ds 0
  1761. .TA .2i .5i 1.5i 2.5i
  1762. .ta .2i .5i 1.5i 2.5i
  1763. .R
  1764. .PN ChangeActivePointerGrab
  1765.     1    30        opcode
  1766.     1            unused
  1767.     2    4        request length
  1768.     4    CURSOR        cursor
  1769.         0    None
  1770.     4    TIMESTAMP        time
  1771.         0    CurrentTime
  1772.     2    SETofPOINTEREVENT        event-mask
  1773.     2            unused
  1774. .De
  1775. .LP
  1776. .Ds 0
  1777. .TA .2i .5i 1.5i 2.5i
  1778. .ta .2i .5i 1.5i 2.5i
  1779. .R
  1780. .PN GrabKeyboard
  1781.     1    31        opcode
  1782.     1    BOOL        owner-events
  1783.     2    4        request length
  1784.     4    WINDOW        grab-window
  1785.     4    TIMESTAMP        time
  1786.         0    CurrentTime
  1787.     1            pointer-mode
  1788.         0    Synchronous
  1789.         1    Asynchronous
  1790.     1            keyboard-mode
  1791.         0    Synchronous
  1792.         1    Asynchronous
  1793.     2            unused
  1794. .De
  1795. .Ds 0
  1796. .TA .2i .5i 1.5i 2.5i
  1797. .ta .2i .5i 1.5i 2.5i
  1798. .R
  1799.  =>
  1800.     1    1        Reply
  1801.     1            status
  1802.         0    Success
  1803.         1    AlreadyGrabbed
  1804.         2    InvalidTime
  1805.         3    NotViewable
  1806.         4    Frozen
  1807.     2    CARD16        sequence number
  1808.     4    0        reply length
  1809.     24            unused
  1810. .De
  1811. .LP
  1812. .Ds 0
  1813. .TA .2i .5i 1.5i 2.5i
  1814. .ta .2i .5i 1.5i 2.5i
  1815. .R
  1816. .PN UngrabKeyboard
  1817.     1    32        opcode
  1818.     1            unused
  1819.     2    2        request length
  1820.     4    TIMESTAMP        time
  1821.         0    CurrentTime
  1822. .De
  1823. .LP
  1824. .Ds 0
  1825. .TA .2i .5i 1.5i 2.5i
  1826. .ta .2i .5i 1.5i 2.5i
  1827. .PN GrabKey
  1828.     1    33        opcode
  1829.     1    BOOL        owner-events
  1830.     2    4        request length
  1831.     4    WINDOW        grab-window
  1832.     2    SETofKEYMASK        modifiers
  1833.         #x8000    AnyModifier
  1834.     1    KEYCODE            key
  1835.         0    AnyKey
  1836.     1            pointer-mode
  1837.         0    Synchronous
  1838.         1    Asynchronous
  1839.     1            keyboard-mode
  1840.         0    Synchronous
  1841.         1    Asynchronous
  1842.     3            unused
  1843. .De
  1844. .LP
  1845. .Ds 0
  1846. .TA .2i .5i 1.5i 2.5i
  1847. .ta .2i .5i 1.5i 2.5i
  1848. .R
  1849. .PN UngrabKey
  1850.     1    34        opcode
  1851.     1    KEYCODE            key
  1852.         0    AnyKey
  1853.     2    3        request length
  1854.     4    WINDOW        grab-window
  1855.     2    SETofKEYMASK        modifiers
  1856.         #x8000    AnyModifier
  1857.     2            unused
  1858. .De
  1859. .LP
  1860. .Ds 0
  1861. .TA .2i .5i 1.5i 2.5i
  1862. .ta .2i .5i 1.5i 2.5i
  1863. .R
  1864. .PN AllowEvents
  1865.     1    35        opcode
  1866.     1            mode
  1867.         0    AsyncPointer
  1868.         1    SyncPointer
  1869.         2    ReplayPointer
  1870.         3    AsyncKeyboard
  1871.         4    SyncKeyboard
  1872.         5    ReplayKeyboard
  1873.         6    AsyncBoth
  1874.         7    SyncBoth
  1875.     2    2        request length
  1876.     4    TIMESTAMP        time
  1877.         0    CurrentTime
  1878. .De
  1879. .LP
  1880. .Ds 0
  1881. .TA .2i .5i 1.5i 2.5i
  1882. .ta .2i .5i 1.5i 2.5i
  1883. .R
  1884. .PN GrabServer
  1885.     1    36        opcode
  1886.     1            unused
  1887.     2    1        request length
  1888. .De
  1889. .LP
  1890. .Ds 0
  1891. .TA .2i .5i 1.5i 2.5i
  1892. .ta .2i .5i 1.5i 2.5i
  1893. .R
  1894. .PN UngrabServer
  1895.     1    37        opcode
  1896.     1            unused
  1897.     2    1        request length
  1898. .De
  1899. .LP
  1900. .Ds 0
  1901. .TA .2i .5i 1.5i 2.5i
  1902. .ta .2i .5i 1.5i 2.5i
  1903. .R
  1904. .PN QueryPointer
  1905.     1    38        opcode
  1906.     1            unused
  1907.     2    2        request length
  1908.     4    WINDOW        window
  1909. .De
  1910. .Ds 0
  1911. .TA .2i .5i 1.5i 2.5i
  1912. .ta .2i .5i 1.5i 2.5i
  1913. .R
  1914.  =>
  1915.     1    1        Reply
  1916.     1    BOOL        same-screen
  1917.     2    CARD16        sequence number
  1918.     4    0        reply length
  1919.     4    WINDOW        root
  1920.     4    WINDOW        child
  1921.         0    None
  1922.     2    INT16        root-x
  1923.     2    INT16        root-y
  1924.     2    INT16        win-x
  1925.     2    INT16        win-y
  1926.     2    SETofKEYBUTMASK        mask
  1927.     6            unused
  1928. .De
  1929. .LP
  1930. .Ds 0
  1931. .TA .2i .5i 1.5i 2.5i
  1932. .ta .2i .5i 1.5i 2.5i
  1933. .R
  1934. .PN GetMotionEvents
  1935.     1    39        opcode
  1936.     1            unused
  1937.     2    4        request length
  1938.     4    WINDOW        window
  1939.     4    TIMESTAMP        start
  1940.         0    CurrentTime
  1941.     4    TIMESTAMP        stop
  1942.         0    CurrentTime
  1943. .De
  1944. .Ds 0
  1945. .TA .2i .5i 1.5i 2.5i
  1946. .ta .2i .5i 1.5i 2.5i
  1947. .R
  1948.  =>
  1949.     1    1        Reply
  1950.     1            unused
  1951.     2    CARD16        sequence number
  1952.     4    2n        reply length
  1953.     4    n        number of TIMECOORDs in events
  1954.     20            unused
  1955.     8n    LISTofTIMECOORD            events
  1956. .De
  1957. .LP
  1958. .Ds 0
  1959. .TA .2i .5i 1.5i 2.5i
  1960. .ta .2i .5i 1.5i 2.5i
  1961. .R
  1962.   TIMECOORD
  1963.     4    TIMESTAMP        time
  1964.     2    INT16        x
  1965.     2    INT16        y
  1966. .De
  1967. .LP
  1968. .Ds 0
  1969. .TA .2i .5i 1.5i 2.5i
  1970. .ta .2i .5i 1.5i 2.5i
  1971. .R
  1972. .PN TranslateCoordinates
  1973.     1    40        opcode
  1974.     1            unused
  1975.     2    4        request length
  1976.     4    WINDOW        src-window
  1977.     4    WINDOW        dst-window
  1978.     2    INT16        src-x
  1979.     2    INT16        src-y
  1980. .De
  1981. .Ds 0
  1982. .TA .2i .5i 1.5i 2.5i
  1983. .ta .2i .5i 1.5i 2.5i
  1984. .R
  1985.  =>
  1986.     1    1        Reply
  1987.     1    BOOL        same-screen
  1988.     2    CARD16        sequence number
  1989.     4    0        reply length
  1990.     4    WINDOW        child
  1991.         0    None
  1992.     2    INT16        dst-x
  1993.     2    INT16        dst-y
  1994.     16            unused
  1995. .De
  1996. .LP
  1997. .Ds 0
  1998. .TA .2i .5i 1.5i 2.5i
  1999. .ta .2i .5i 1.5i 2.5i
  2000. .R
  2001. .PN WarpPointer
  2002.     1    41        opcode
  2003.     1            unused
  2004.     2    6        request length
  2005.     4    WINDOW        src-window
  2006.         0    None
  2007.     4    WINDOW        dst-window
  2008.         0    None
  2009.     2    INT16        src-x
  2010.     2    INT16        src-y
  2011.     2    CARD16        src-width
  2012.     2    CARD16        src-height
  2013.     2    INT16        dst-x
  2014.     2    INT16        dst-y
  2015. .De
  2016. .LP
  2017. .Ds 0
  2018. .TA .2i .5i 1.5i 2.5i
  2019. .ta .2i .5i 1.5i 2.5i
  2020. .R
  2021. .PN SetInputFocus
  2022.     1    42        opcode
  2023.     1            revert-to
  2024.         0    None
  2025.         1    PointerRoot
  2026.         2    Parent
  2027.     2    3        request length
  2028.     4    WINDOW        focus
  2029.         0    None
  2030.         1    PointerRoot
  2031.     4    TIMESTAMP        time
  2032.         0    CurrentTime
  2033. .De
  2034. .LP
  2035. .Ds 0
  2036. .TA .2i .5i 1.5i 2.5i
  2037. .ta .2i .5i 1.5i 2.5i
  2038. .R
  2039. .PN GetInputFocus
  2040.     1    43        opcode
  2041.     1            unused
  2042.     2    1        request length
  2043. .De
  2044. .Ds 0
  2045. .TA .2i .5i 1.5i 2.5i
  2046. .ta .2i .5i 1.5i 2.5i
  2047. .R
  2048.  =>
  2049.     1    1        Reply
  2050.     1            revert-to
  2051.         0    None
  2052.         1    PointerRoot
  2053.         2    Parent
  2054.     2    CARD16        sequence number
  2055.     4    0        reply length
  2056.     4    WINDOW        focus
  2057.         0    None
  2058.         1    PointerRoot
  2059.     20            unused
  2060. .De
  2061. .LP
  2062. .Ds 0
  2063. .TA .2i .5i 1.5i 2.5i
  2064. .ta .2i .5i 1.5i 2.5i
  2065. .R
  2066. .PN QueryKeymap
  2067.     1    44        opcode
  2068.     1            unused
  2069.     2    1        request length
  2070. .De
  2071. .Ds 0
  2072. .TA .2i .5i 1.5i 2.5i
  2073. .ta .2i .5i 1.5i 2.5i
  2074. .R
  2075.  =>
  2076.     1    1        Reply
  2077.     1            unused
  2078.     2    CARD16        sequence number
  2079.     4    2        reply length
  2080.     32    LISTofCARD8        keys
  2081. .De
  2082. .LP
  2083. .Ds 0
  2084. .TA .2i .5i 1.5i 2.5i
  2085. .ta .2i .5i 1.5i 2.5i
  2086. .R
  2087. .PN OpenFont
  2088.     1    45        opcode
  2089.     1            unused
  2090.     2    3+(n+p)/4        request length
  2091.     4    FONT        fid
  2092.     2    n        length of name
  2093.     2            unused
  2094.     n    STRING8            name
  2095.     p            unused, p=pad(n)
  2096. .De
  2097. .LP
  2098. .Ds 0
  2099. .TA .2i .5i 1.5i 2.5i
  2100. .ta .2i .5i 1.5i 2.5i
  2101. .R
  2102. .PN CloseFont
  2103.     1    46        opcode
  2104.     1            unused
  2105.     2    2        request length
  2106.     4    FONT        font
  2107. .De
  2108. .LP
  2109. .Ds 0
  2110. .TA .2i .5i 1.5i 2.5i
  2111. .ta .2i .5i 1.5i 2.5i
  2112. .R
  2113. .PN QueryFont
  2114.     1    47        opcode
  2115.     1            unused
  2116.     2    2        request length
  2117.     4    FONTABLE        font
  2118. .De
  2119. .Ds 0
  2120. .TA .2i .5i 1.5i 2.5i
  2121. .ta .2i .5i 1.5i 2.5i
  2122. .R
  2123.  =>
  2124.     1    1        Reply
  2125.     1            unused
  2126.     2    CARD16        sequence number
  2127.     4    7+2n+3m        reply length
  2128.     12    CHARINFO        min-bounds
  2129.     4            unused
  2130.     12    CHARINFO        max-bounds
  2131.     4            unused
  2132.     2    CARD16        min-char-or-byte2
  2133.     2    CARD16        max-char-or-byte2
  2134.     2    CARD16        default-char
  2135.     2    n        number of FONTPROPs in properties
  2136.     1            draw-direction
  2137.         0    LeftToRight
  2138.         1    RightToLeft
  2139.     1    CARD8        min-byte1
  2140.     1    CARD8        max-byte1
  2141.     1    BOOL        all-chars-exist
  2142.     2    INT16        font-ascent
  2143.     2    INT16        font-descent
  2144.     4    m        number of CHARINFOs in char-infos
  2145.     8n    LISTofFONTPROP        properties
  2146.     12m    LISTofCHARINFO        char-infos
  2147. .De
  2148. .Ds 0
  2149. .TA .2i .5i 1.5i 2.5i
  2150. .ta .2i .5i 1.5i 2.5i
  2151. .R
  2152.   FONTPROP
  2153.     4    ATOM        name
  2154.     4    <32-bits>        value
  2155. .De
  2156. .LP
  2157. .Ds 0
  2158. .TA .2i .5i 1.5i 2.5i
  2159. .ta .2i .5i 1.5i 2.5i
  2160. .R
  2161.   CHARINFO
  2162.     2    INT16        left-side-bearing
  2163.     2    INT16        right-side-bearing
  2164.     2    INT16        character-width
  2165.     2    INT16        ascent
  2166.     2    INT16        descent
  2167.     2    CARD16        attributes
  2168. .De
  2169. .LP
  2170. .Ds 0
  2171. .TA .2i .5i 1.5i 2.5i
  2172. .ta .2i .5i 1.5i 2.5i
  2173. .R
  2174. .PN QueryTextExtents
  2175.     1    48        opcode
  2176.     1    BOOL        odd length, True if p = 2
  2177.     2    2+(2n+p)/4        request length
  2178.     4    FONTABLE        font
  2179.     2n    STRING16        string
  2180.     p            unused, p=pad(2n)
  2181. .De
  2182. .Ds 0
  2183. .TA .2i .5i 1.5i 2.5i
  2184. .ta .2i .5i 1.5i 2.5i
  2185. .R
  2186.  =>
  2187.     1    1        Reply
  2188.     1            draw-direction
  2189.         0    LeftToRight
  2190.         1    RightToLeft
  2191.     2    CARD16        sequence number
  2192.     4    0        reply length
  2193.     2    INT16        font-ascent
  2194.     2    INT16        font-descent
  2195.     2    INT16        overall-ascent
  2196.     2    INT16        overall-descent
  2197.     4    INT32        overall-width
  2198.     4    INT32        overall-left
  2199.     4    INT32        overall-right
  2200.     4            unused
  2201. .De
  2202. .LP
  2203. .Ds 0
  2204. .TA .2i .5i 1.5i 2.5i
  2205. .ta .2i .5i 1.5i 2.5i
  2206. .R
  2207. .PN ListFonts
  2208.     1    49        opcode
  2209.     1            unused
  2210.     2    2+(n+p)/4        request length
  2211.     2    CARD16        max-names
  2212.     2    n        length of pattern
  2213.     n    STRING8        pattern
  2214.     p            unused, p=pad(n)
  2215. .De
  2216. .Ds 0
  2217. .TA .2i .5i 1.5i 2.5i
  2218. .ta .2i .5i 1.5i 2.5i
  2219. .R
  2220.  =>
  2221.     1    1        Reply
  2222.     1            unused
  2223.     2    CARD16        sequence number
  2224.     4    (n+p)/4        reply length
  2225.     2    CARD16        number of STRs in names
  2226.     22            unused
  2227.     n    LISTofSTR        names
  2228.     p            unused, p=pad(n)
  2229. .De
  2230. .LP
  2231. .Ds 0
  2232. .TA .2i .5i 1.5i 2.5i
  2233. .ta .2i .5i 1.5i 2.5i
  2234. .R
  2235. .PN ListFontsWithInfo
  2236.     1    50        opcode
  2237.     1            unused
  2238.     2    2+(n+p)/4        request length
  2239.     2    CARD16        max-names
  2240.     2    n        length of pattern
  2241.     n    STRING8        pattern
  2242.     p            unused, p=pad(n)
  2243. .De
  2244. .Ds 0
  2245. .TA .2i .5i 1.5i 2.5i
  2246. .ta .2i .5i 1.5i 2.5i
  2247. .R
  2248.  => (except for last in series)
  2249.     1    1        Reply
  2250.     1    n        length of name in bytes
  2251.     2    CARD16        sequence number
  2252.     4    7+2m+(n+p)/4        reply length
  2253.     12    CHARINFO        min-bounds
  2254.     4            unused
  2255.     12    CHARINFO        max-bounds
  2256.     4            unused
  2257.     2    CARD16        min-char-or-byte2
  2258.     2    CARD16        max-char-or-byte2
  2259.     2    CARD16        default-char
  2260.     2    m        number of FONTPROPs in properties
  2261.     1            draw-direction
  2262.         0    LeftToRight
  2263.         1    RightToLeft
  2264.     1    CARD8        min-byte1
  2265.     1    CARD8        max-byte1
  2266.     1    BOOL        all-chars-exist
  2267.     2    INT16        font-ascent
  2268.     2    INT16        font-descent
  2269.     4    CARD32        replies-hint
  2270.     8m    LISTofFONTPROP        properties
  2271.     n    STRING8        name
  2272.     p            unused, p=pad(n)
  2273. .De
  2274. .Ds 0
  2275. .TA .2i .5i 1.5i 2.5i
  2276. .ta .2i .5i 1.5i 2.5i
  2277. .R
  2278.   FONTPROP
  2279.     encodings are the same as for QueryFont
  2280.  
  2281.   CHARINFO
  2282.     encodings are the same as for QueryFont
  2283. .De
  2284. .Ds 0
  2285. .TA .2i .5i 1.5i 2.5i
  2286. .ta .2i .5i 1.5i 2.5i
  2287. .R
  2288.  => (last in series)
  2289.     1    1        Reply
  2290.     1    0        last-reply indicator
  2291.     2    CARD16        sequence number
  2292.     4    7        reply length
  2293.     52            unused
  2294. .De
  2295. .LP
  2296. .Ds 0
  2297. .TA .2i .5i 1.5i 2.5i
  2298. .ta .2i .5i 1.5i 2.5i
  2299. .R
  2300. .PN SetFontPath
  2301.     1    51        opcode
  2302.     1            unused
  2303.     2    2+(n+p)/4        request length
  2304.     2    CARD16        number of STRs in path
  2305.     2            unused
  2306.     n    LISTofSTR        path
  2307.     p            unused, p=pad(n)
  2308. .De
  2309. .LP
  2310. .Ds 0
  2311. .TA .2i .5i 1.5i 2.5i
  2312. .ta .2i .5i 1.5i 2.5i
  2313. .R
  2314. .PN GetFontPath
  2315.     1    52        opcode
  2316.     1            unused
  2317.     2    1        request list
  2318. .De
  2319. .Ds 0
  2320. .TA .2i .5i 1.5i 2.5i
  2321. .ta .2i .5i 1.5i 2.5i
  2322. .R
  2323.  =>
  2324.     1    1        Reply
  2325.     1            unused
  2326.     2    CARD16        sequence number
  2327.     4    (n+p)/4        reply length
  2328.     2    CARD16        number of STRs in path
  2329.     22            unused
  2330.     n    LISTofSTR        path
  2331.     p            unused, p=pad(n)
  2332. .De
  2333. .LP
  2334. .Ds 0
  2335. .TA .2i .5i 1.5i 2.5i
  2336. .ta .2i .5i 1.5i 2.5i
  2337. .R
  2338. .PN CreatePixmap
  2339.     1    53        opcode
  2340.     1    CARD8        depth
  2341.     2    4        request length
  2342.     4    PIXMAP        pid
  2343.     4    DRAWABLE        drawable
  2344.     2    CARD16        width
  2345.     2    CARD16        height
  2346. .De
  2347. .LP
  2348. .Ds 0
  2349. .TA .2i .5i 1.5i 2.5i
  2350. .ta .2i .5i 1.5i 2.5i
  2351. .R
  2352. .PN FreePixmap
  2353.     1    54        opcode
  2354.     1            unused
  2355.     2    2        request length
  2356.     4    PIXMAP        pixmap
  2357. .De
  2358. .LP
  2359. .Ds 0
  2360. .TA .2i .5i 1.5i 2.5i
  2361. .ta .2i .5i 1.5i 2.5i
  2362. .R
  2363. .PN CreateGC
  2364.     1    55        opcode
  2365.     1            unused
  2366.     2    4+n        request length
  2367.     4    GCONTEXT        cid
  2368.     4    DRAWABLE        drawable
  2369.     4    BITMASK        value-mask (has n bits set to 1)
  2370.         #x00000001    function
  2371.         #x00000002    plane-mask
  2372.         #x00000004    foreground
  2373.         #x00000008    background
  2374.         #x00000010    line-width
  2375.         #x00000020    line-style
  2376.         #x00000040    cap-style
  2377.         #x00000080    join-style
  2378.         #x00000100    fill-style
  2379.         #x00000200    fill-rule
  2380.         #x00000400    tile
  2381.         #x00000800    stipple
  2382.         #x00001000    tile-stipple-x-origin
  2383.         #x00002000    tile-stipple-y-origin
  2384.         #x00004000    font
  2385.         #x00008000    subwindow-mode
  2386.         #x00010000    graphics-exposures
  2387.         #x00020000    clip-x-origin
  2388.         #x00040000    clip-y-origin
  2389.         #x00080000    clip-mask
  2390.         #x00100000    dash-offset
  2391.         #x00200000    dashes
  2392.         #x00400000    arc-mode
  2393.     4n    LISTofVALUE        value-list
  2394. .De
  2395. .Ds 0
  2396. .TA .2i .5i 1.5i 2.5i
  2397. .ta .2i .5i 1.5i 2.5i
  2398. .R
  2399.   VALUEs
  2400.     1            function
  2401.          0    Clear
  2402.          1    And
  2403.          2    AndReverse
  2404.          3    Copy
  2405.          4    AndInverted
  2406.          5    NoOp
  2407.          6    Xor
  2408.          7    Or
  2409.          8    Nor
  2410.          9    Equiv
  2411.         10    Invert
  2412.         11    OrReverse
  2413.         12    CopyInverted
  2414.         13    OrInverted
  2415.         14    Nand
  2416.         15    Set
  2417.     4    CARD32        plane-mask
  2418.     4    CARD32        foreground
  2419.     4    CARD32        background
  2420.     2    CARD16        line-width
  2421.     1            line-style
  2422.         0    Solid
  2423.         1    OnOffDash
  2424.         2    DoubleDash
  2425.     1            cap-style
  2426.         0    NotLast
  2427.         1    Butt
  2428.         2    Round
  2429.         3    Projecting
  2430.     1            join-style
  2431.         0    Miter
  2432.         1    Round
  2433.         2    Bevel
  2434.     1            fill-style
  2435.         0    Solid
  2436.         1    Tiled
  2437.         2    Stippled
  2438.         3    OpaqueStippled
  2439.     1            fill-rule
  2440.         0    EvenOdd
  2441.         1    Winding
  2442.     4    PIXMAP        tile
  2443.     4    PIXMAP        stipple
  2444.     2    INT16        tile-stipple-x-origin
  2445.     2    INT16        tile-stipple-y-origin
  2446.     4    FONT        font
  2447.     1            subwindow-mode
  2448.         0    ClipByChildren
  2449.         1    IncludeInferiors
  2450.     1    BOOL        graphics-exposures
  2451.     2    INT16        clip-x-origin
  2452.     2    INT16        clip-y-origin
  2453.     4    PIXMAP        clip-mask
  2454.         0    None
  2455.     2    CARD16        dash-offset
  2456.     1    CARD8        dashes
  2457.     1            arc-mode
  2458.         0    Chord
  2459.         1    PieSlice
  2460. .De
  2461. .LP
  2462. .Ds 0
  2463. .TA .2i .5i 1.5i 2.5i
  2464. .ta .2i .5i 1.5i 2.5i
  2465. .R
  2466. .PN ChangeGC
  2467.     1    56        opcode
  2468.     1            unused
  2469.     2    3+n        request length
  2470.     4    GCONTEXT        gc
  2471.     4    BITMASK        value-mask (has n bits set to 1)
  2472.         encodings are the same as for CreateGC
  2473.     4n    LISTofVALUE        value-list
  2474.         encodings are the same as for CreateGC
  2475. .De
  2476. .LP
  2477. .Ds 0
  2478. .TA .2i .5i 1.5i 2.5i
  2479. .ta .2i .5i 1.5i 2.5i
  2480. .R
  2481. .PN CopyGC
  2482.     1    57        opcode
  2483.     1            unused
  2484.     2    4        request length
  2485.     4    GCONTEXT        src-gc
  2486.     4    GCONTEXT        dst-gc
  2487.     4    BITMASK        value-mask
  2488.         encodings are the same as for CreateGC
  2489. .De
  2490. .LP
  2491. .Ds 0
  2492. .TA .2i .5i 1.5i 2.5i
  2493. .ta .2i .5i 1.5i 2.5i
  2494. .R
  2495. .PN SetDashes
  2496.     1    58        opcode
  2497.     1            unused
  2498.     2    3+(n+p)/4        request length
  2499.     4    GCONTEXT        gc
  2500.     2    CARD16        dash-offset
  2501.     2    n        length of dashes
  2502.     n    LISTofCARD8        dashes
  2503.     p            unused, p=pad(n)
  2504. .De
  2505. .LP
  2506. .Ds 0
  2507. .TA .2i .5i 1.5i 2.5i
  2508. .ta .2i .5i 1.5i 2.5i
  2509. .R
  2510. .PN SetClipRectangles
  2511.     1    59        opcode
  2512.     1            ordering
  2513.         0    UnSorted
  2514.         1    YSorted
  2515.         2    YXSorted
  2516.         3    YXBanded
  2517.     2    3+2n        request length
  2518.     4    GCONTEXT        gc
  2519.     2    INT16        clip-x-origin
  2520.     2    INT16        clip-y-origin
  2521.     8n    LISTofRECTANGLE        rectangles
  2522. .De
  2523. .LP
  2524. .Ds 0
  2525. .TA .2i .5i 1.5i 2.5i
  2526. .ta .2i .5i 1.5i 2.5i
  2527. .R
  2528. .PN FreeGC
  2529.     1    60        opcode
  2530.     1            unused
  2531.     2    2        request length
  2532.     4    GCONTEXT        gc
  2533. .De
  2534. .LP
  2535. .Ds 0
  2536. .TA .2i .5i 1.5i 2.5i
  2537. .ta .2i .5i 1.5i 2.5i
  2538. .R
  2539. .PN ClearArea
  2540.     1    61        opcode
  2541.     1    BOOL        exposures
  2542.     2    4        request length
  2543.     4    WINDOW        window
  2544.     2    INT16        x
  2545.     2    INT16        y
  2546.     2    CARD16        width
  2547.     2    CARD16        height
  2548. .De
  2549. .LP
  2550. .Ds 0
  2551. .TA .2i .5i 1.5i 2.5i
  2552. .ta .2i .5i 1.5i 2.5i
  2553. .R
  2554. .PN CopyArea
  2555.     1    62        opcode
  2556.     1            unused
  2557.     2    7        request length
  2558.     4    DRAWABLE        src-drawable
  2559.     4    DRAWABLE        dst-drawable
  2560.     4    GCONTEXT        gc
  2561.     2    INT16        src-x
  2562.     2    INT16        src-y
  2563.     2    INT16        dst-x
  2564.     2    INT16        dst-y
  2565.     2    CARD16        width
  2566.     2    CARD16        height
  2567. .De
  2568. .LP
  2569. .Ds 0
  2570. .TA .2i .5i 1.5i 2.5i
  2571. .ta .2i .5i 1.5i 2.5i
  2572. .R
  2573. .PN CopyPlane
  2574.     1    63        opcode
  2575.     1            unused
  2576.     2    8        request length
  2577.     4    DRAWABLE        src-drawable
  2578.     4    DRAWABLE        dst-drawable
  2579.     4    GCONTEXT        gc
  2580.     2    INT16        src-x
  2581.     2    INT16        src-y
  2582.     2    INT16        dst-x
  2583.     2    INT16        dst-y
  2584.     2    CARD16        width
  2585.     2    CARD16        height
  2586.     4    CARD32        bit-plane
  2587. .De
  2588. .LP
  2589. .Ds 0
  2590. .TA .2i .5i 1.5i 2.5i
  2591. .ta .2i .5i 1.5i 2.5i
  2592. .R
  2593. .PN PolyPoint
  2594.     1    64        opcode
  2595.     1            coordinate-mode
  2596.         0    Origin
  2597.         1    Previous
  2598.     2    3+n        request length
  2599.     4    DRAWABLE        drawable
  2600.     4    GCONTEXT        gc
  2601.     4n    LISTofPOINT        points
  2602. .De
  2603. .LP
  2604. .Ds 0
  2605. .TA .2i .5i 1.5i 2.5i
  2606. .ta .2i .5i 1.5i 2.5i
  2607. .R
  2608. .PN PolyLine
  2609.     1    65        opcode
  2610.     1            coordinate-mode
  2611.         0    Origin
  2612.         1    Previous
  2613.     2    3+n        request length
  2614.     4    DRAWABLE        drawable
  2615.     4    GCONTEXT        gc
  2616.     4n    LISTofPOINT        points
  2617. .De
  2618. .LP
  2619. .Ds 0
  2620. .TA .2i .5i 1.5i 2.5i
  2621. .ta .2i .5i 1.5i 2.5i
  2622. .R
  2623. .PN PolySegment
  2624.     1    66        opcode
  2625.     1            unused
  2626.     2    3+2n        request length
  2627.     4    DRAWABLE        drawable
  2628.     4    GCONTEXT        gc
  2629.     8n    LISTofSEGMENT        segments
  2630. .De
  2631. .Ds 0
  2632. .TA .2i .5i 1.5i 2.5i
  2633. .ta .2i .5i 1.5i 2.5i
  2634. .R
  2635.   SEGMENT
  2636.     2    INT16        x1
  2637.     2    INT16        y1
  2638.     2    INT16        x2
  2639.     2    INT16        y2
  2640. .De
  2641. .LP
  2642. .Ds 0
  2643. .TA .2i .5i 1.5i 2.5i
  2644. .ta .2i .5i 1.5i 2.5i
  2645. .R
  2646. .PN PolyRectangle
  2647.     1    67        opcode
  2648.     1            unused
  2649.     2    3+2n        request length
  2650.     4    DRAWABLE        drawable
  2651.     4    GCONTEXT        gc
  2652.     8n    LISTofRECTANGLE        rectangles
  2653. .De
  2654. .LP
  2655. .Ds 0
  2656. .TA .2i .5i 1.5i 2.5i
  2657. .ta .2i .5i 1.5i 2.5i
  2658. .R
  2659. .PN PolyArc
  2660.     1    68        opcode
  2661.     1            unused
  2662.     2    3+3n        request length
  2663.     4    DRAWABLE        drawable
  2664.     4    GCONTEXT        gc
  2665.     12n    LISTofARC        arcs
  2666. .De
  2667. .LP
  2668. .Ds 0
  2669. .TA .2i .5i 1.5i 2.5i
  2670. .ta .2i .5i 1.5i 2.5i
  2671. .R
  2672. .PN FillPoly
  2673.     1    69        opcode
  2674.     1            unused
  2675.     2    4+n        request length
  2676.     4    DRAWABLE        drawable
  2677.     4    GCONTEXT        gc
  2678.     1            shape
  2679.         0    Complex
  2680.         1    Nonconvex
  2681.         2    Convex
  2682.     1            coordinate-mode
  2683.         0    Origin
  2684.         1    Previous
  2685.     2            unused
  2686.     4n    LISTofPOINT        points
  2687. .De
  2688. .LP
  2689. .Ds 0
  2690. .TA .2i .5i 1.5i 2.5i
  2691. .ta .2i .5i 1.5i 2.5i
  2692. .R
  2693. .PN PolyFillRectangle
  2694.     1    70        opcode
  2695.     1            unused
  2696.     2    3+2n        request length
  2697.     4    DRAWABLE        drawable
  2698.     4    GCONTEXT        gc
  2699.     8n    LISTofRECTANGLE            rectangles
  2700. .De
  2701. .LP
  2702. .Ds 0
  2703. .TA .2i .5i 1.5i 2.5i
  2704. .ta .2i .5i 1.5i 2.5i
  2705. .R
  2706. .PN PolyFillArc
  2707.     1    71        opcode
  2708.     1            unused
  2709.     2    3+3n        request length
  2710.     4    DRAWABLE        drawable
  2711.     4    GCONTEXT        gc
  2712.     12n    LISTofARC        arcs
  2713. .De
  2714. .LP
  2715. .Ds 0
  2716. .TA .2i .5i 1.5i 2.5i
  2717. .ta .2i .5i 1.5i 2.5i
  2718. .R
  2719. .PN PutImage
  2720.     1    72        opcode
  2721.     1            format
  2722.         0    Bitmap
  2723.         1    XYPixmap
  2724.         2    ZPixmap
  2725.     2    6+(n+p)/4        request length
  2726.     4    DRAWABLE        drawable
  2727.     4    GCONTEXT        gc
  2728.     2    CARD16        width
  2729.     2    CARD16        height
  2730.     2    INT16        dst-x
  2731.     2    INT16        dst-y
  2732.     1    CARD8        left-pad
  2733.     1    CARD8        depth
  2734.     2            unused
  2735.     n    LISTofBYTE        data
  2736.     p            unused, p=pad(n)
  2737. .De
  2738. .LP
  2739. .Ds 0
  2740. .TA .2i .5i 1.5i 2.5i
  2741. .ta .2i .5i 1.5i 2.5i
  2742. .R
  2743. .PN GetImage
  2744.     1    73        opcode
  2745.     1            format
  2746.         1    XYPixmap
  2747.         2    ZPixmap
  2748.     2    5        request length
  2749.     4    DRAWABLE        drawable
  2750.     2    INT16        x
  2751.     2    INT16        y
  2752.     2    CARD16        width
  2753.     2    CARD16        height
  2754.     4    CARD32        plane-mask
  2755. .De
  2756. .Ds 0
  2757. .TA .2i .5i 1.5i 2.5i
  2758. .ta .2i .5i 1.5i 2.5i
  2759. .R
  2760.  =>
  2761.     1    1        Reply
  2762.     1    CARD8        depth
  2763.     2    CARD16        sequence number
  2764.     4    (n+p)/4        reply length
  2765.     4    VISUALID        visual
  2766.         0    None
  2767.     20            unused
  2768.     n    LISTofBYTE        data
  2769.     p            unused, p=pad(n)
  2770. .De
  2771. .LP
  2772. .Ds 0
  2773. .TA .2i .5i 1.5i 2.5i
  2774. .ta .2i .5i 1.5i 2.5i
  2775. .R
  2776. .PN PolyText8
  2777.     1    74        opcode
  2778.     1            unused
  2779.     2    4+(n+p)/4        request length
  2780.     4    DRAWABLE        drawable
  2781.     4    GCONTEXT        gc
  2782.     2    INT16        x
  2783.     2    INT16        y
  2784.     n    LISTofTEXTITEM8        items
  2785.     p            unused, p=pad(n)  (p is always 0 or 1)
  2786. .De
  2787. .Ds 0
  2788. .TA .2i .5i 1.5i 2.5i
  2789. .ta .2i .5i 1.5i 2.5i
  2790. .R
  2791.   TEXTITEM8
  2792.     1    m        length of string (cannot be 255)
  2793.     1    INT8        delta
  2794.     m    STRING8        string
  2795.   or
  2796.     1    255        font-shift indicator
  2797.     1            font byte 3 (most-significant)
  2798.     1            font byte 2
  2799.     1            font byte 1
  2800.     1            font byte 0 (least-significant)
  2801. .De
  2802. .LP
  2803. .Ds 0
  2804. .TA .2i .5i 1.5i 2.5i
  2805. .ta .2i .5i 1.5i 2.5i
  2806. .R
  2807. .PN PolyText16
  2808.     1    75        opcode
  2809.     1            unused
  2810.     2    4+(n+p)/4        request length
  2811.     4    DRAWABLE        drawable
  2812.     4    GCONTEXT        gc
  2813.     2    INT16        x
  2814.     2    INT16        y
  2815.     n    LISTofTEXTITEM16        items
  2816.     p            unused, p=pad(n)  (p must be 0 or 1)
  2817. .De
  2818. .Ds 0
  2819. .TA .2i .5i 1.5i 2.5i
  2820. .ta .2i .5i 1.5i 2.5i
  2821. .R
  2822.   TEXTITEM16
  2823.     1    m        number of CHAR2Bs in string (cannot be 255)
  2824.     1    INT8        delta
  2825.     2m    STRING16        string
  2826.   or
  2827.     1    255        font-shift indicator
  2828.     1            font byte 3 (most-significant)
  2829.     1            font byte 2
  2830.     1            font byte 1
  2831.     1            font byte 0 (least-significant)
  2832. .De
  2833. .LP
  2834. .Ds 0
  2835. .TA .2i .5i 1.5i 2.5i
  2836. .ta .2i .5i 1.5i 2.5i
  2837. .R
  2838. .PN ImageText8
  2839.     1    76        opcode
  2840.     1    n        length of string
  2841.     2    4+(n+p)/4        request length
  2842.     4    DRAWABLE        drawable
  2843.     4    GCONTEXT        gc
  2844.     2    INT16        x
  2845.     2    INT16        y
  2846.     n    STRING8        string
  2847.     p            unused, p=pad(n)
  2848. .De
  2849. .LP
  2850. .Ds 0
  2851. .TA .2i .5i 1.5i 2.5i
  2852. .ta .2i .5i 1.5i 2.5i
  2853. .R
  2854. .PN ImageText16
  2855.     1    77        opcode
  2856.     1    n        number of CHAR2Bs in string
  2857.     2    4+(2n+p)/4        request length
  2858.     4    DRAWABLE        drawable
  2859.     4    GCONTEXT        gc
  2860.     2    INT16        x
  2861.     2    INT16        y
  2862.     2n    STRING16        string
  2863.     p            unused, p=pad(2n)
  2864. .De
  2865. .LP
  2866. .Ds 0
  2867. .TA .2i .5i 1.5i 2.5i
  2868. .ta .2i .5i 1.5i 2.5i
  2869. .R
  2870. .PN CreateColormap
  2871.     1    78        opcode
  2872.     1            alloc
  2873.         0    None
  2874.         1    All
  2875.     2    4        request length
  2876.     4    COLORMAP        mid
  2877.     4    WINDOW        window
  2878.     4    VISUALID        visual
  2879. .De
  2880. .LP
  2881. .Ds 0
  2882. .TA .2i .5i 1.5i 2.5i
  2883. .ta .2i .5i 1.5i 2.5i
  2884. .R
  2885. .PN FreeColormap
  2886.     1    79        opcode
  2887.     1            unused
  2888.     2    2        request length
  2889.     4    COLORMAP        cmap
  2890. .De
  2891. .LP
  2892. .Ds 0
  2893. .TA .2i .5i 1.5i 2.5i
  2894. .ta .2i .5i 1.5i 2.5i
  2895. .R
  2896. .PN CopyColormapAndFree
  2897.     1    80        opcode
  2898.     1            unused
  2899.     2    3        request length
  2900.     4    COLORMAP        mid
  2901.     4    COLORMAP        src-cmap
  2902. .De
  2903. .LP
  2904. .Ds 0
  2905. .TA .2i .5i 1.5i 2.5i
  2906. .ta .2i .5i 1.5i 2.5i
  2907. .R
  2908. .PN InstallColormap
  2909.     1    81        opcode
  2910.     1            unused
  2911.     2    2        request length
  2912.     4    COLORMAP        cmap
  2913. .De
  2914. .LP
  2915. .Ds 0
  2916. .TA .2i .5i 1.5i 2.5i
  2917. .ta .2i .5i 1.5i 2.5i
  2918. .R
  2919. .PN UninstallColormap
  2920.     1    82        opcode
  2921.     1            unused
  2922.     2    2        request length
  2923.     4    COLORMAP        cmap
  2924. .De
  2925. .LP
  2926. .Ds 0
  2927. .TA .2i .5i 1.5i 2.5i
  2928. .ta .2i .5i 1.5i 2.5i
  2929. .R
  2930. .PN ListInstalledColormaps
  2931.     1    83        opcode
  2932.     1            unused
  2933.     2    2        request length
  2934.     4    WINDOW        window
  2935. .De
  2936. .Ds 0
  2937. .TA .2i .5i 1.5i 2.5i
  2938. .ta .2i .5i 1.5i 2.5i
  2939. .R
  2940.  =>
  2941.     1    1        Reply
  2942.     1            unused
  2943.     2    CARD16        sequence number
  2944.     4    n        reply length
  2945.     2    n        number of COLORMAPs in cmaps
  2946.     22            unused
  2947.     4n    LISTofCOLORMAP        cmaps
  2948. .De
  2949. .LP
  2950. .Ds 0
  2951. .TA .2i .5i 1.5i 2.5i
  2952. .ta .2i .5i 1.5i 2.5i
  2953. .R
  2954. .PN AllocColor
  2955.     1    84        opcode
  2956.     1            unused
  2957.     2    4        request length
  2958.     4    COLORMAP        cmap
  2959.     2    CARD16        red
  2960.     2    CARD16        green
  2961.     2    CARD16        blue
  2962.     2            unused
  2963. .De
  2964. .Ds 0
  2965. .TA .2i .5i 1.5i 2.5i
  2966. .ta .2i .5i 1.5i 2.5i
  2967. .R
  2968.  =>
  2969.     1    1        Reply
  2970.     1            unused
  2971.     2    CARD16        sequence number
  2972.     4    0        reply length
  2973.     2    CARD16        red
  2974.     2    CARD16        green
  2975.     2    CARD16        blue
  2976.     2            unused
  2977.     4    CARD32        pixel
  2978.     12            unused
  2979. .De
  2980. .LP
  2981. .Ds 0
  2982. .TA .2i .5i 1.5i 2.5i
  2983. .ta .2i .5i 1.5i 2.5i
  2984. .R
  2985. .PN AllocNamedColor
  2986.     1    85        opcode
  2987.     1            unused
  2988.     2    3+(n+p)/4        request length
  2989.     4    COLORMAP        cmap
  2990.     2    n        length of name
  2991.     2            unused
  2992.     n    STRING8        name
  2993.     p            unused, p=pad(n)
  2994. .De
  2995. .Ds 0
  2996. .TA .2i .5i 1.5i 2.5i
  2997. .ta .2i .5i 1.5i 2.5i
  2998. .R
  2999.  =>
  3000.     1    1        Reply
  3001.     1            unused
  3002.     2    CARD16        sequence number
  3003.     4    0        reply length
  3004.     4    CARD32        pixel
  3005.     2    CARD16        exact-red
  3006.     2    CARD16        exact-green
  3007.     2    CARD16        exact-blue
  3008.     2    CARD16        visual-red
  3009.     2    CARD16        visual-green
  3010.     2    CARD16        visual-blue
  3011.     8            unused
  3012. .De
  3013. .LP
  3014. .Ds 0
  3015. .TA .2i .5i 1.5i 2.5i
  3016. .ta .2i .5i 1.5i 2.5i
  3017. .R
  3018. .PN AllocColorCells
  3019.     1    86        opcode
  3020.     1    BOOL        contiguous
  3021.     2    3        request length
  3022.     4    COLORMAP        cmap
  3023.     2    CARD16        colors
  3024.     2    CARD16        planes
  3025. .De
  3026. .Ds 0
  3027. .TA .2i .5i 1.5i 2.5i
  3028. .ta .2i .5i 1.5i 2.5i
  3029. .R
  3030.  =>
  3031.     1    1        Reply
  3032.     1            unused
  3033.     2    CARD16        sequence number
  3034.     4    n+m        reply length
  3035.     2    n        number of CARD32s in pixels
  3036.     2    m        number of CARD32s in masks
  3037.     20            unused
  3038.     4n    LISTofCARD32        pixels
  3039.     4m    LISTofCARD32        masks
  3040. .De
  3041. .LP
  3042. .Ds 0
  3043. .TA .2i .5i 1.5i 2.5i
  3044. .ta .2i .5i 1.5i 2.5i
  3045. .R
  3046. .PN AllocColorPlanes
  3047.     1    87        opcode
  3048.     1    BOOL        contiguous
  3049.     2    4        request length
  3050.     4    COLORMAP        cmap
  3051.     2    CARD16        colors
  3052.     2    CARD16        reds
  3053.     2    CARD16        greens
  3054.     2    CARD16        blues
  3055. .De
  3056. .Ds 0
  3057. .TA .2i .5i 1.5i 2.5i
  3058. .ta .2i .5i 1.5i 2.5i
  3059. .R
  3060.  =>
  3061.     1    1        Reply
  3062.     1            unused
  3063.     2    CARD16        sequence number
  3064.     4    n        reply length
  3065.     2    n        number of CARD32s in pixels
  3066.     2            unused
  3067.     4    CARD32        red-mask
  3068.     4    CARD32        green-mask
  3069.     4    CARD32        blue-mask
  3070.     8                unused
  3071.     4n    LISTofCARD32        pixels
  3072. .De
  3073. .LP
  3074. .Ds 0
  3075. .TA .2i .5i 1.5i 2.5i
  3076. .ta .2i .5i 1.5i 2.5i
  3077. .R
  3078. .PN FreeColors
  3079.     1    88        opcode
  3080.     1            unused
  3081.     2    3+n        request length
  3082.     4    COLORMAP        cmap
  3083.     4    CARD32        plane-mask
  3084.     4n    LISTofCARD32        pixels
  3085. .De
  3086. .LP
  3087. .Ds 0
  3088. .TA .2i .5i 1.5i 2.5i
  3089. .ta .2i .5i 1.5i 2.5i
  3090. .R
  3091. .PN StoreColors
  3092.     1    89        opcode
  3093.     1            unused
  3094.     2    2+3n        request length
  3095.     4    COLORMAP        cmap
  3096.     12n    LISTofCOLORITEM        items
  3097. .De
  3098. .Ds 0
  3099. .TA .2i .5i 1.5i 2.5i
  3100. .ta .2i .5i 1.5i 2.5i
  3101. .R
  3102.   COLORITEM
  3103.     4    CARD32        pixel
  3104.     2    CARD16        red
  3105.     2    CARD16        green
  3106.     2    CARD16        blue
  3107.     1            do-red, do-green, do-blue
  3108.         #x01    do-red (1 is True, 0 is False)
  3109.         #x02    do-green (1 is True, 0 is False)
  3110.         #x04    do-blue (1 is True, 0 is False)
  3111.         #xF8    unused
  3112.     1            unused
  3113. .De
  3114. .LP
  3115. .Ds 0
  3116. .TA .2i .5i 1.5i 2.5i
  3117. .ta .2i .5i 1.5i 2.5i
  3118. .R
  3119. .PN StoreNamedColor
  3120.     1    90        opcode
  3121.     1            do-red, do-green, do-blue
  3122.         #x01    do-red (1 is True, 0 is False)
  3123.         #x02    do-green (1 is True, 0 is False)
  3124.         #x04    do-blue (1 is True, 0 is False)
  3125.         #xF8    unused
  3126.     2    4+(n+p)/4        request length
  3127.     4    COLORMAP        cmap
  3128.     4    CARD32        pixel
  3129.     2    n        length of name
  3130.     2            unused
  3131.     n    STRING8        name
  3132.     p            unused, p=pad(n)
  3133. .De
  3134. .LP
  3135. .Ds 0
  3136. .TA .2i .5i 1.5i 2.5i
  3137. .ta .2i .5i 1.5i 2.5i
  3138. .R
  3139. .PN QueryColors
  3140.     1    91        opcode
  3141.     1            unused
  3142.     2    2+n        request length
  3143.     4    COLORMAP        cmap
  3144.     4n    LISTofCARD32        pixels
  3145. .De
  3146. .Ds 0
  3147. .TA .2i .5i 1.5i 2.5i
  3148. .ta .2i .5i 1.5i 2.5i
  3149. .R
  3150.  =>
  3151.     1    1        Reply
  3152.     1            unused
  3153.     2    CARD16        sequence number
  3154.     4    2n        reply length
  3155.     2    n        number of RGBs in colors
  3156.     22            unused
  3157.     8n    LISTofRGB        colors
  3158. .De
  3159. .Ds 0
  3160. .TA .2i .5i 1.5i 2.5i
  3161. .ta .2i .5i 1.5i 2.5i
  3162. .R
  3163.   RGB
  3164.     2    CARD16        red
  3165.     2    CARD16        green
  3166.     2    CARD16        blue
  3167.     2            unused
  3168. .De
  3169. .LP
  3170. .Ds 0
  3171. .TA .2i .5i 1.5i 2.5i
  3172. .ta .2i .5i 1.5i 2.5i
  3173. .R
  3174. .PN LookupColor
  3175.     1    92        opcode
  3176.     1            unused
  3177.     2    3+(n+p)/4        request length
  3178.     4    COLORMAP        cmap
  3179.     2    n        length of name
  3180.     2            unused
  3181.     n    STRING8        name
  3182.     p            unused, p=pad(n)
  3183. .De
  3184. .Ds 0
  3185. .TA .2i .5i 1.5i 2.5i
  3186. .ta .2i .5i 1.5i 2.5i
  3187. .R
  3188.  =>
  3189.     1    1        Reply
  3190.     1            unused
  3191.     2    CARD16        sequence number
  3192.     4    0        reply length
  3193.     2    CARD16        exact-red
  3194.     2    CARD16        exact-green
  3195.     2    CARD16        exact-blue
  3196.     2    CARD16        visual-red
  3197.     2    CARD16        visual-green
  3198.     2    CARD16        visual-blue
  3199.     12            unused
  3200. .De
  3201. .LP
  3202. .Ds 0
  3203. .TA .2i .5i 1.5i 2.5i
  3204. .ta .2i .5i 1.5i 2.5i
  3205. .R
  3206. .PN CreateCursor
  3207.     1    93        opcode
  3208.     1            unused
  3209.     2    8        request length
  3210.     4    CURSOR        cid
  3211.     4    PIXMAP        source
  3212.     4    PIXMAP        mask
  3213.         0    None
  3214.     2    CARD16        fore-red
  3215.     2    CARD16        fore-green
  3216.     2    CARD16        fore-blue
  3217.     2    CARD16        back-red
  3218.     2    CARD16        back-green
  3219.     2    CARD16        back-blue
  3220.     2    CARD16        x
  3221.     2    CARD16        y
  3222. .De
  3223. .LP
  3224. .Ds 0
  3225. .TA .2i .5i 1.5i 2.5i
  3226. .ta .2i .5i 1.5i 2.5i
  3227. .R
  3228. .PN CreateGlyphCursor
  3229.     1    94        opcode
  3230.     1            unused
  3231.     2    8        request length
  3232.     4    CURSOR        cid
  3233.     4    FONT        source-font
  3234.     4    FONT        mask-font
  3235.         0    None
  3236.     2    CARD16        source-char
  3237.     2    CARD16        mask-char
  3238.     2    CARD16        fore-red
  3239.     2    CARD16        fore-green
  3240.     2    CARD16        fore-blue
  3241.     2    CARD16        back-red
  3242.     2    CARD16        back-green
  3243.     2    CARD16        back-blue
  3244. .De
  3245. .LP
  3246. .Ds 0
  3247. .TA .2i .5i 1.5i 2.5i
  3248. .ta .2i .5i 1.5i 2.5i
  3249. .R
  3250. .PN FreeCursor
  3251.     1    95        opcode
  3252.     1            unused
  3253.     2    2        request length
  3254.     4    CURSOR        cursor
  3255. .De
  3256. .LP
  3257. .Ds 0
  3258. .TA .2i .5i 1.5i 2.5i
  3259. .ta .2i .5i 1.5i 2.5i
  3260. .R
  3261. .PN RecolorCursor
  3262.     1    96        opcode
  3263.     1            unused
  3264.     2    5        request length
  3265.     4    CURSOR        cursor
  3266.     2    CARD16        fore-red
  3267.     2    CARD16        fore-green
  3268.     2    CARD16        fore-blue
  3269.     2    CARD16        back-red
  3270.     2    CARD16        back-green
  3271.     2    CARD16        back-blue
  3272. .De
  3273. .LP
  3274. .Ds 0
  3275. .TA .2i .5i 1.5i 2.5i
  3276. .ta .2i .5i 1.5i 2.5i
  3277. .R
  3278. .PN QueryBestSize
  3279.     1    97        opcode
  3280.     1            class
  3281.         0    Cursor
  3282.         1    Tile
  3283.         2    Stipple
  3284.     2    3        request length
  3285.     4    DRAWABLE        drawable
  3286.     2    CARD16        width
  3287.     2    CARD16        height
  3288. .De
  3289. .Ds 0
  3290. .TA .2i .5i 1.5i 2.5i
  3291. .ta .2i .5i 1.5i 2.5i
  3292. .R
  3293.  =>
  3294.     1    1        Reply
  3295.     1            unused
  3296.     2    CARD16        sequence number
  3297.     4    0        reply length
  3298.     2    CARD16        width
  3299.     2    CARD16        height
  3300.     20            unused
  3301. .De
  3302. .LP
  3303. .Ds 0
  3304. .TA .2i .5i 1.5i 2.5i
  3305. .ta .2i .5i 1.5i 2.5i
  3306. .R
  3307. .PN QueryExtension
  3308.     1    98        opcode
  3309.     1            unused
  3310.     2    2+(n+p)/4        request length
  3311.     2    n        length of name
  3312.     2            unused
  3313.     n    STRING8        name
  3314.     p            unused, p=pad(n)
  3315. .De
  3316. .Ds 0
  3317. .TA .2i .5i 1.5i 2.5i
  3318. .ta .2i .5i 1.5i 2.5i
  3319. .R
  3320.  =>
  3321.     1    1        Reply
  3322.     1            unused
  3323.     2    CARD16        sequence number
  3324.     4    0        reply length
  3325.     1    BOOL        present
  3326.     1    CARD8        major-opcode
  3327.     1    CARD8        first-event
  3328.     1    CARD8        first-error
  3329.     20            unused
  3330. .De
  3331. .LP
  3332. .Ds 0
  3333. .TA .2i .5i 1.5i 2.5i
  3334. .ta .2i .5i 1.5i 2.5i
  3335. .R
  3336. .PN ListExtensions
  3337.     1    99        opcode
  3338.     1            unused
  3339.     2    1        request length
  3340. .De
  3341. .Ds 0
  3342. .TA .2i .5i 1.5i 2.5i
  3343. .ta .2i .5i 1.5i 2.5i
  3344. .R
  3345.  =>
  3346.     1    1        Reply
  3347.     1    CARD8        number of STRs in names
  3348.     2    CARD16        sequence number
  3349.     4    (n+p)/4        reply length
  3350.     24            unused
  3351.     n    LISTofSTR        names
  3352.     p            unused, p=pad(n)
  3353. .De
  3354. .LP
  3355. .Ds 0
  3356. .TA .2i .5i 1.5i 2.5i
  3357. .ta .2i .5i 1.5i 2.5i
  3358. .R
  3359. .PN ChangeKeyboardMapping
  3360.     1    100        opcode
  3361.     1    n        keycode-count
  3362.     2    2+nm        request length
  3363.     1    KEYCODE        first-keycode
  3364.     1    m        keysyms-per-keycode
  3365.     2            unused
  3366.     4nm    LISTofKEYSYM        keysyms
  3367. .De
  3368. .LP
  3369. .Ds 0
  3370. .TA .2i .5i 1.5i 2.5i
  3371. .ta .2i .5i 1.5i 2.5i
  3372. .R
  3373. .PN GetKeyboardMapping
  3374.     1    101        opcode
  3375.     1            unused
  3376.     2    2        request length
  3377.     1    KEYCODE        first-keycode
  3378.     1    m        count
  3379.     2            unused
  3380. .De
  3381. .Ds 0
  3382. .TA .2i .5i 1.5i 2.5i
  3383. .ta .2i .5i 1.5i 2.5i
  3384. .R
  3385.  =>
  3386.     1    1        Reply
  3387.     1    n        keysyms-per-keycode
  3388.     2    CARD16        sequence number
  3389.     4    nm        reply length (m = count field from the request)
  3390.     24            unused
  3391.     4nm    LISTofKEYSYM        keysyms
  3392. .De
  3393. .LP
  3394. .Ds 0
  3395. .TA .2i .5i 1.5i 2.5i
  3396. .ta .2i .5i 1.5i 2.5i
  3397. .R
  3398. .PN ChangeKeyboardControl
  3399.     1    102        opcode
  3400.     1            unused
  3401.     2    2+n        request length
  3402.     4    BITMASK        value-mask (has n bits set to 1)
  3403.         #x0001    key-click-percent
  3404.         #x0002    bell-percent
  3405.         #x0004    bell-pitch
  3406.         #x0008    bell-duration
  3407.         #x0010    led
  3408.         #x0020    led-mode
  3409.         #x0040    key
  3410.         #x0080    auto-repeat-mode
  3411.     4n    LISTofVALUE        value-list
  3412. .De
  3413. .Ds 0
  3414. .TA .2i .5i 1.5i 2.5i
  3415. .ta .2i .5i 1.5i 2.5i
  3416. .R
  3417.   VALUEs
  3418.     1    INT8        key-click-percent
  3419.     1    INT8        bell-percent
  3420.     2    INT16        bell-pitch
  3421.     2    INT16        bell-duration
  3422.     1    CARD8        led
  3423.     1            led-mode
  3424.         0    Off
  3425.         1    On
  3426.     1    KEYCODE        key
  3427.     1            auto-repeat-mode
  3428.         0    Off
  3429.         1    On
  3430.         2    Default
  3431. .De
  3432. .LP
  3433. .Ds 0
  3434. .TA .2i .5i 1.5i 2.5i
  3435. .ta .2i .5i 1.5i 2.5i
  3436. .R
  3437. .PN GetKeyboardControl
  3438.     1    103            opcode
  3439.     1                unused
  3440.     2    1            request length
  3441. .De
  3442. .Ds 0
  3443. .TA .2i .5i 1.5i 2.5i
  3444. .ta .2i .5i 1.5i 2.5i
  3445. .R
  3446.  =>
  3447.     1    1        Reply
  3448.     1            global-auto-repeat
  3449.         0    Off
  3450.         1    On
  3451.     2    CARD16        sequence number
  3452.     4    5        reply length
  3453.     4    CARD32        led-mask
  3454.     1    CARD8        key-click-percent
  3455.     1    CARD8        bell-percent
  3456.     2    CARD16        bell-pitch
  3457.     2    CARD16        bell-duration
  3458.     2            unused
  3459.     32    LISTofCARD8        auto-repeats
  3460. .De
  3461. .LP
  3462. .Ds 0
  3463. .TA .2i .5i 1.5i 2.5i
  3464. .ta .2i .5i 1.5i 2.5i
  3465. .R
  3466. .PN Bell
  3467.     1    104        opcode
  3468.     1    INT8        percent
  3469.     2    1        request length
  3470. .De
  3471. .LP
  3472. .Ds 0
  3473. .TA .2i .5i 1.5i 2.5i
  3474. .ta .2i .5i 1.5i 2.5i
  3475. .R
  3476. .PN ChangePointerControl
  3477.     1    105        opcode
  3478.     1            unused
  3479.     2    3        request length
  3480.     2    INT16        acceleration-numerator
  3481.     2    INT16        acceleration-denominator
  3482.     2    INT16        threshold
  3483.     1    BOOL        do-acceleration
  3484.     1    BOOL        do-threshold
  3485. .De
  3486. .LP
  3487. .Ds 0
  3488. .TA .2i .5i 1.5i 2.5i
  3489. .ta .2i .5i 1.5i 2.5i
  3490. .R
  3491. .PN GetPointerControl
  3492.     1    106        opcode
  3493.     1            unused
  3494.     2    1        request length
  3495. .De
  3496. .Ds 0
  3497. .TA .2i .5i 1.5i 2.5i
  3498. .ta .2i .5i 1.5i 2.5i
  3499. .R
  3500.  =>
  3501.     1    1        Reply
  3502.     1            unused
  3503.     2    CARD16        sequence number
  3504.     4    0        reply length
  3505.     2    CARD16        acceleration-numerator
  3506.     2    CARD16        acceleration-denominator
  3507.     2    CARD16        threshold
  3508.     18            unused
  3509. .De
  3510. .LP
  3511. .Ds 0
  3512. .TA .2i .5i 1.5i 2.5i
  3513. .ta .2i .5i 1.5i 2.5i
  3514. .R
  3515. .PN SetScreenSaver
  3516.     1    107        opcode
  3517.     1            unused
  3518.     2    3        request length
  3519.     2    INT16        timeout
  3520.     2    INT16        interval
  3521.     1            prefer-blanking
  3522.         0    No
  3523.         1    Yes
  3524.         2    Default
  3525.     1            allow-exposures
  3526.         0    No
  3527.         1    Yes
  3528.         2    Default
  3529.     2            unused
  3530. .De
  3531. .LP
  3532. .Ds 0
  3533. .TA .2i .5i 1.5i 2.5i
  3534. .ta .2i .5i 1.5i 2.5i
  3535. .R
  3536. .PN GetScreenSaver
  3537.     1    108        opcode
  3538.     1            unused
  3539.     2    1        request length
  3540. .De
  3541. .Ds 0
  3542. .TA .2i .5i 1.5i 2.5i
  3543. .ta .2i .5i 1.5i 2.5i
  3544. .R
  3545.  =>
  3546.     1    1        Reply
  3547.     1            unused
  3548.     2    CARD16        sequence number
  3549.     4    0        reply length
  3550.     2    CARD16        timeout
  3551.     2    CARD16        interval
  3552.     1            prefer-blanking
  3553.         0    No
  3554.         1    Yes
  3555.     1            allow-exposures
  3556.         0    No
  3557.         1    Yes
  3558.     18            unused
  3559. .De
  3560. .LP
  3561. .Ds 0
  3562. .TA .2i .5i 1.5i 2.5i
  3563. .ta .2i .5i 1.5i 2.5i
  3564. .R
  3565. .PN ChangeHosts
  3566.     1    109        opcode
  3567.     1            mode
  3568.         0    Insert
  3569.         1    Delete
  3570.     2    2+(n+p)/4        request length
  3571.     1            family
  3572.         0    Internet
  3573.         1    DECnet
  3574.         2    Chaos
  3575.     1            unused
  3576.     2    n        length of address
  3577.     n    LISTofCARD8        address
  3578.     p            unused, p=pad(n)
  3579. .De
  3580. .LP
  3581. .Ds 0
  3582. .TA .2i .5i 1.5i 2.5i
  3583. .ta .2i .5i 1.5i 2.5i
  3584. .R
  3585. .PN ListHosts
  3586.     1    110        opcode
  3587.     1            unused
  3588.     2    1        request length
  3589. .De
  3590. .Ds 0
  3591. .TA .2i .5i 1.5i 2.5i
  3592. .ta .2i .5i 1.5i 2.5i
  3593. .R
  3594.  =>
  3595.     1    1        Reply
  3596.     1            mode
  3597.         0    Disabled
  3598.         1    Enabled
  3599.     2    CARD16        sequence number
  3600.     4    n/4        reply length
  3601.     2    CARD16        number of HOSTs in hosts
  3602.     22            unused
  3603.     n    LISTofHOST        hosts (n always a multiple of 4)
  3604. .De
  3605. .LP
  3606. .Ds 0
  3607. .TA .2i .5i 1.5i 2.5i
  3608. .ta .2i .5i 1.5i 2.5i
  3609. .R
  3610. .PN SetAccessControl
  3611.     1    111        opcode
  3612.     1            mode
  3613.         0    Disable
  3614.         1    Enable
  3615.     2    1        request length
  3616. .De
  3617. .LP
  3618. .Ds 0
  3619. .TA .2i .5i 1.5i 2.5i
  3620. .ta .2i .5i 1.5i 2.5i
  3621. .R
  3622. .PN SetCloseDownMode
  3623.     1    112        opcode
  3624.     1            mode
  3625.         0    Destroy
  3626.         1    RetainPermanent
  3627.         2    RetainTemporary
  3628.     2    1        request length
  3629. .De
  3630. .LP
  3631. .Ds 0
  3632. .TA .2i .5i 1.5i 2.5i
  3633. .ta .2i .5i 1.5i 2.5i
  3634. .R
  3635. .PN KillClient
  3636.     1    113        opcode
  3637.     1            unused
  3638.     2    2        request length
  3639.     4    CARD32        resource
  3640.         0    AllTemporary
  3641. .De
  3642. .LP
  3643. .Ds 0
  3644. .TA .2i .5i 1.5i 2.5i
  3645. .ta .2i .5i 1.5i 2.5i
  3646. .R
  3647. .PN RotateProperties
  3648.     1    114        opcode
  3649.     1            unused
  3650.     2    3+n        request length
  3651.     4    WINDOW        window
  3652.     2    n        number of properties
  3653.     2    INT16        delta
  3654.     4n    LISTofATOM        properties
  3655. .De
  3656. .LP
  3657. .Ds 0
  3658. .TA .2i .5i 1.5i 2.5i
  3659. .ta .2i .5i 1.5i 2.5i
  3660. .R
  3661. .PN ForceScreenSaver
  3662.     1    115        opcode
  3663.     1            mode
  3664.         0    Reset
  3665.         1    Activate
  3666.     2    1        request length
  3667. .De
  3668. .LP
  3669. .Ds 0
  3670. .TA .2i .5i 1.5i 2.5i
  3671. .ta .2i .5i 1.5i 2.5i
  3672. .R
  3673. .PN SetPointerMapping
  3674.     1    116        opcode
  3675.     1    n        length of map
  3676.     2    1+(n+p)/4        request length
  3677.     n    LISTofCARD8        map
  3678.     p            unused, p=pad(n)
  3679. .De
  3680. .Ds 0
  3681. .TA .2i .5i 1.5i 2.5i
  3682. .ta .2i .5i 1.5i 2.5i
  3683. .R
  3684.  =>
  3685.     1    1        Reply
  3686.     1            status
  3687.         0    Success
  3688.         1    Busy
  3689.     2    CARD16        sequence number
  3690.     4    0        reply length
  3691.     24            unused
  3692. .De
  3693. .LP
  3694. .Ds 0
  3695. .TA .2i .5i 1.5i 2.5i
  3696. .ta .2i .5i 1.5i 2.5i
  3697. .R
  3698. .PN GetPointerMapping
  3699.     1    117        opcode
  3700.     1            unused
  3701.     2    1        request length
  3702. .De
  3703. .Ds 0
  3704. .TA .2i .5i 1.5i 2.5i
  3705. .ta .2i .5i 1.5i 2.5i
  3706. .R
  3707.  =>
  3708.     1    1        Reply
  3709.     1    n        length of map
  3710.     2    CARD16        sequence number
  3711.     4    (n+p)/4        reply length
  3712.     24            unused
  3713.     n    LISTofCARD8        map
  3714.     p            unused, p=pad(n)
  3715. .De
  3716. .LP
  3717. .Ds 0
  3718. .TA .2i .5i 1.5i 2.5i
  3719. .ta .2i .5i 1.5i 2.5i
  3720. .R
  3721. .PN SetModifierMapping
  3722.     1    118        opcode
  3723.     1    n        keycodes-per-modifier
  3724.     2    1+2n        request length
  3725.     8n    LISTofKEYCODE        keycodes
  3726. .De
  3727. .Ds 0
  3728. .TA .2i .5i 1.5i 2.5i
  3729. .ta .2i .5i 1.5i 2.5i
  3730. .R
  3731.  =>
  3732.     1    1        Reply
  3733.     1            status
  3734.         0    Success
  3735.         1    Busy
  3736.         2    Failed
  3737.     2    CARD16        sequence number
  3738.     4    0        reply length
  3739.     24            unused
  3740. .De
  3741. .LP
  3742. .Ds 0
  3743. .TA .2i .5i 1.5i 2.5i
  3744. .ta .2i .5i 1.5i 2.5i
  3745. .R
  3746. .PN GetModifierMapping
  3747.     1    119        opcode
  3748.     1            unused
  3749.     2    1        request length
  3750. .De
  3751. .Ds 0
  3752. .TA .2i .5i 1.5i 2.5i
  3753. .ta .2i .5i 1.5i 2.5i
  3754. .R
  3755.  =>
  3756.     1    1        Reply
  3757.     1    n        keycodes-per-modifier
  3758.     2    CARD16        sequence number
  3759.     4    2n        reply length
  3760.     24            unused
  3761.     8n    LISTofKEYCODE        keycodes
  3762. .De
  3763. .LP
  3764. .Ds 0
  3765. .TA .2i .5i 1.5i 2.5i
  3766. .ta .2i .5i 1.5i 2.5i
  3767. .R
  3768. .PN NoOperation
  3769.     1    127        opcode
  3770.     1            unused
  3771.     2    1        request length
  3772. .De
  3773. .ps 11
  3774. .nr PS 11
  3775. .SH
  3776. Events
  3777. .LP
  3778. .ps 9
  3779. .nr PS 9
  3780. .Ds 0
  3781. .TA .2i .5i 1.5i 2.5i
  3782. .ta .2i .5i 1.5i 2.5i
  3783. .R
  3784. .PN KeyPress
  3785.     1    2        code
  3786.     1    KEYCODE        detail
  3787.     2    CARD16        sequence number
  3788.     4    TIMESTAMP        time
  3789.     4    WINDOW        root
  3790.     4    WINDOW        event
  3791.     4    WINDOW        child
  3792.         0    None
  3793.     2    INT16        root-x
  3794.     2    INT16        root-y
  3795.     2    INT16        event-x
  3796.     2    INT16        event-y
  3797.     2    SETofKEYBUTMASK        state
  3798.     1    BOOL        same-screen
  3799.     1            unused
  3800. .De
  3801. .LP
  3802. .Ds 0
  3803. .TA .2i .5i 1.5i 2.5i
  3804. .ta .2i .5i 1.5i 2.5i
  3805. .R
  3806. .PN KeyRelease
  3807.     1    3        code
  3808.     1    KEYCODE        detail
  3809.     2    CARD16        sequence number
  3810.     4    TIMESTAMP        time
  3811.     4    WINDOW        root
  3812.     4    WINDOW        event
  3813.     4    WINDOW        child
  3814.         0    None
  3815.     2    INT16        root-x
  3816.     2    INT16        root-y
  3817.     2    INT16        event-x
  3818.     2    INT16        event-y
  3819.     2    SETofKEYBUTMASK            state
  3820.     1    BOOL        same-screen
  3821.     1            unused
  3822. .De
  3823. .LP
  3824. .Ds 0
  3825. .TA .2i .5i 1.5i 2.5i
  3826. .ta .2i .5i 1.5i 2.5i
  3827. .R
  3828. .PN ButtonPress
  3829.     1    4        code
  3830.     1    BUTTON        detail
  3831.     2    CARD16        sequence number
  3832.     4    TIMESTAMP        time
  3833.     4    WINDOW        root
  3834.     4    WINDOW        event
  3835.     4    WINDOW        child
  3836.         0    None
  3837.     2    INT16        root-x
  3838.     2    INT16        root-y
  3839.     2    INT16        event-x
  3840.     2    INT16        event-y
  3841.     2    SETofKEYBUTMASK        state
  3842.     1    BOOL        same-screen
  3843.     1            unused
  3844. .De
  3845. .LP
  3846. .Ds 0
  3847. .TA .2i .5i 1.5i 2.5i
  3848. .ta .2i .5i 1.5i 2.5i
  3849. .R
  3850. .PN ButtonRelease
  3851.     1    5        code
  3852.     1    BUTTON        detail
  3853.     2    CARD16        sequence number
  3854.     4    TIMESTAMP        time
  3855.     4    WINDOW        root
  3856.     4    WINDOW        event
  3857.     4    WINDOW        child
  3858.         0    None
  3859.     2    INT16        root-x
  3860.     2    INT16        root-y
  3861.     2    INT16        event-x
  3862.     2    INT16        event-y
  3863.     2    SETofKEYBUTMASK        state
  3864.     1    BOOL        same-screen
  3865.     1            unused
  3866. .De
  3867. .LP
  3868. .Ds 0
  3869. .TA .2i .5i 1.5i 2.5i
  3870. .ta .2i .5i 1.5i 2.5i
  3871. .R
  3872. .PN MotionNotify
  3873.     1    6        code
  3874.     1            detail
  3875.         0    Normal
  3876.         1    Hint
  3877.     2    CARD16        sequence number
  3878.     4    TIMESTAMP        time
  3879.     4    WINDOW        root
  3880.     4    WINDOW        event
  3881.     4    WINDOW        child
  3882.          0    None
  3883.     2    INT16        root-x
  3884.     2    INT16        root-y
  3885.     2    INT16        event-x
  3886.     2    INT16        event-y
  3887.     2    SETofKEYBUTMASK        state
  3888.     1    BOOL        same-screen
  3889.     1            unused
  3890. .De
  3891. .LP
  3892. .Ds 0
  3893. .TA .2i .5i 1.5i 2.5i
  3894. .ta .2i .5i 1.5i 2.5i
  3895. .R
  3896. .PN EnterNotify
  3897.     1    7        code
  3898.     1            detail
  3899.         0    Ancestor
  3900.         1    Virtual
  3901.         2    Inferior
  3902.         3    Nonlinear
  3903.         4    NonlinearVirtual
  3904.     2    CARD16        sequence number
  3905.     4    TIMESTAMP        time
  3906.     4    WINDOW        root
  3907.     4    WINDOW        event
  3908.     4    WINDOW        child
  3909.         0    None
  3910.     2    INT16        root-x
  3911.     2    INT16        root-y
  3912.     2    INT16        event-x
  3913.     2    INT16        event-y
  3914.     2    SETofKEYBUTMASK        state
  3915.     1            mode
  3916.         0    Normal
  3917.         1    Grab
  3918.         2    Ungrab
  3919.     1            same-screen, focus
  3920.         #x01    focus (1 is True, 0 is False)
  3921.         #x02    same-screen (1 is True, 0 is False)
  3922.         #xFC    unused
  3923. .De
  3924. .LP
  3925. .Ds 0
  3926. .TA .2i .5i 1.5i 2.5i
  3927. .ta .2i .5i 1.5i 2.5i
  3928. .R
  3929. .PN LeaveNotify
  3930.     1    8        code
  3931.     1            detail
  3932.         0    Ancestor
  3933.         1    Virtual
  3934.         2    Inferior
  3935.         3    Nonlinear
  3936.         4    NonlinearVirtual
  3937.     2    CARD16        sequence number
  3938.     4    TIMESTAMP        time
  3939.     4    WINDOW        root
  3940.     4    WINDOW        event
  3941.     4    WINDOW        child
  3942.         0    None
  3943.     2    INT16        root-x
  3944.     2    INT16        root-y
  3945.     2    INT16        event-x
  3946.     2    INT16        event-y
  3947.     2    SETofKEYBUTMASK        state
  3948.     1            mode
  3949.         0    Normal
  3950.         1    Grab
  3951.         2    Ungrab
  3952.     1            same-screen, focus
  3953.         #x01    focus (1 is True, 0 is False)
  3954.         #x02    same-screen (1 is True, 0 is False)
  3955.         #xFC    unused
  3956. .De
  3957. .LP
  3958. .Ds 0
  3959. .TA .2i .5i 1.5i 2.5i
  3960. .ta .2i .5i 1.5i 2.5i
  3961. .R
  3962. .PN FocusIn
  3963.     1    9        code
  3964.     1            detail
  3965.         0    Ancestor
  3966.         1    Virtual
  3967.         2    Inferior
  3968.         3    Nonlinear
  3969.         4    NonlinearVirtual
  3970.         5    Pointer
  3971.         6    PointerRoot
  3972.         7    None
  3973.     2    CARD16        sequence number
  3974.     4    WINDOW        event
  3975.     1            mode
  3976.         0    Normal
  3977.         1    Grab
  3978.         2    Ungrab
  3979.         3    WhileGrabbed
  3980.     23            unused
  3981. .De
  3982. .LP
  3983. .Ds 0
  3984. .TA .2i .5i 1.5i 2.5i
  3985. .ta .2i .5i 1.5i 2.5i
  3986. .R
  3987. .PN FocusOut
  3988.     1    10        code
  3989.     1            detail
  3990.         0    Ancestor
  3991.         1    Virtual
  3992.         2    Inferior
  3993.         3    Nonlinear
  3994.         4    NonlinearVirtual
  3995.         5    Pointer
  3996.         6    PointerRoot
  3997.         7    None
  3998.     2    CARD16        sequence number
  3999.     4    WINDOW        event
  4000.     1            mode
  4001.         0    Normal
  4002.         1    Grab
  4003.         2    Ungrab
  4004.         3    WhileGrabbed
  4005.     23            unused
  4006. .De
  4007. .LP
  4008. .Ds 0
  4009. .TA .2i .5i 1.5i 2.5i
  4010. .ta .2i .5i 1.5i 2.5i
  4011. .R
  4012. .PN KeymapNotify
  4013.     1    11        code
  4014.     31    LISTofCARD8        keys (byte for keycodes 0\-7 is omitted)
  4015. .De
  4016. .LP
  4017. .Ds 0
  4018. .TA .2i .5i 1.5i 2.5i
  4019. .ta .2i .5i 1.5i 2.5i
  4020. .R
  4021. .PN Expose
  4022.     1    12        code
  4023.     1            unused
  4024.     2    CARD16        sequence number
  4025.     4    WINDOW        window
  4026.     2    CARD16        x
  4027.     2    CARD16        y
  4028.     2    CARD16        width
  4029.     2    CARD16        height
  4030.     2    CARD16        count
  4031.     14            unused
  4032. .De
  4033. .LP
  4034. .Ds 0
  4035. .TA .2i .5i 1.5i 2.5i
  4036. .ta .2i .5i 1.5i 2.5i
  4037. .R
  4038. .PN GraphicsExposure
  4039.     1    13        code
  4040.     1            unused
  4041.     2    CARD16        sequence number
  4042.     4    DRAWABLE        drawable
  4043.     2    CARD16        x
  4044.     2    CARD16        y
  4045.     2    CARD16        width
  4046.     2    CARD16        height
  4047.     2    CARD16        minor-opcode
  4048.     2    CARD16        count
  4049.     1    CARD8        major-opcode
  4050.     11            unused
  4051. .De
  4052. .LP
  4053. .Ds 0
  4054. .TA .2i .5i 1.5i 2.5i
  4055. .ta .2i .5i 1.5i 2.5i
  4056. .R
  4057. .PN NoExposure
  4058.     1    14        code
  4059.     1            unused
  4060.     2    CARD16        sequence number
  4061.     4    DRAWABLE        drawable
  4062.     2    CARD16        minor-opcode
  4063.     1    CARD8        major-opcode
  4064.     21            unused
  4065. .De
  4066. .LP
  4067. .Ds 0
  4068. .TA .2i .5i 1.5i 2.5i
  4069. .ta .2i .5i 1.5i 2.5i
  4070. .R
  4071. .PN VisibilityNotify
  4072.     1    15        code
  4073.     1            unused
  4074.     2    CARD16        sequence number
  4075.     4    WINDOW        window
  4076.     1            state
  4077.         0    Unobscured
  4078.         1    PartiallyObscured
  4079.         2    FullyObscured
  4080.     23            unused
  4081. .De
  4082. .LP
  4083. .Ds 0
  4084. .TA .2i .5i 1.5i 2.5i
  4085. .ta .2i .5i 1.5i 2.5i
  4086. .R
  4087. .PN CreateNotify
  4088.     1    16        code
  4089.     1            unused
  4090.     2    CARD16        sequence number
  4091.     4    WINDOW        parent
  4092.     4    WINDOW        window
  4093.     2    INT16        x
  4094.     2    INT16        y
  4095.     2    CARD16        width
  4096.     2    CARD16        height
  4097.     2    CARD16        border-width
  4098.     1    BOOL        override-redirect
  4099.     9            unused
  4100. .De
  4101. .LP
  4102. .Ds 0
  4103. .TA .2i .5i 1.5i 2.5i
  4104. .ta .2i .5i 1.5i 2.5i
  4105. .R
  4106. .PN DestroyNotify
  4107.     1    17        code
  4108.     1            unused
  4109.     2    CARD16        sequence number
  4110.     4    WINDOW        event
  4111.     4    WINDOW        window
  4112.     20            unused
  4113. .De
  4114. .LP
  4115. .Ds 0
  4116. .TA .2i .5i 1.5i 2.5i
  4117. .ta .2i .5i 1.5i 2.5i
  4118. .R
  4119. .PN UnmapNotify
  4120.     1    18        code
  4121.     1            unused
  4122.     2    CARD16        sequence number
  4123.     4    WINDOW        event
  4124.     4    WINDOW        window
  4125.     1    BOOL        from-configure
  4126.     19            unused
  4127. .De
  4128. .LP
  4129. .Ds 0
  4130. .TA .2i .5i 1.5i 2.5i
  4131. .ta .2i .5i 1.5i 2.5i
  4132. .R
  4133. .PN MapNotify
  4134.     1    19        code
  4135.     1            unused
  4136.     2    CARD16        sequence number
  4137.     4    WINDOW        event
  4138.     4    WINDOW        window
  4139.     1    BOOL        override-redirect
  4140.     19            unused
  4141. .De
  4142. .LP
  4143. .Ds 0
  4144. .TA .2i .5i 1.5i 2.5i
  4145. .ta .2i .5i 1.5i 2.5i
  4146. .R
  4147. .PN MapRequest
  4148.     1    20        code
  4149.     1            unused
  4150.     2    CARD16        sequence number
  4151.     4    WINDOW        parent
  4152.     4    WINDOW        window
  4153.     20            unused
  4154. .De
  4155. .LP
  4156. .Ds 0
  4157. .TA .2i .5i 1.5i 2.5i
  4158. .ta .2i .5i 1.5i 2.5i
  4159. .R
  4160. .PN ReparentNotify
  4161.     1    21        code
  4162.     1            unused
  4163.     2    CARD16        sequence number
  4164.     4    WINDOW        event
  4165.     4    WINDOW        window
  4166.     4    WINDOW        parent
  4167.     2    INT16        x
  4168.     2    INT16        y
  4169.     1    BOOL        override-redirect
  4170.     11            unused
  4171. .De
  4172. .LP
  4173. .Ds 0
  4174. .TA .2i .5i 1.5i 2.5i
  4175. .ta .2i .5i 1.5i 2.5i
  4176. .R
  4177. .PN ConfigureNotify
  4178.     1    22        code
  4179.     1            unused
  4180.     2    CARD16        sequence number
  4181.     4    WINDOW        event
  4182.     4    WINDOW        window
  4183.     4    WINDOW        above-sibling
  4184.         0    None
  4185.     2    INT16        x
  4186.     2    INT16        y
  4187.     2    CARD16        width
  4188.     2    CARD16        height
  4189.     2    CARD16        border-width
  4190.     1    BOOL        override-redirect
  4191.     5            unused
  4192. .De
  4193. .LP
  4194. .Ds 0
  4195. .TA .2i .5i 1.5i 2.5i
  4196. .ta .2i .5i 1.5i 2.5i
  4197. .R
  4198. .PN ConfigureRequest
  4199.     1    23        code
  4200.     1            stack-mode
  4201.         0    Above
  4202.         1    Below
  4203.         2    TopIf
  4204.         3    BottomIf
  4205.         4    Opposite
  4206.     2    CARD16        sequence number
  4207.     4    WINDOW        parent
  4208.     4    WINDOW        window
  4209.     4    WINDOW        sibling
  4210.         0    None
  4211.     2    INT16        x
  4212.     2    INT16        y
  4213.     2    CARD16        width
  4214.     2    CARD16        height
  4215.     2    CARD16        border-width
  4216.     2    BITMASK        value-mask
  4217.         #x0001    x
  4218.         #x0002    y
  4219.         #x0004    width
  4220.         #x0008    height
  4221.         #x0010    border-width
  4222.         #x0020    sibling
  4223.         #x0040    stack-mode
  4224.     4            unused
  4225. .De
  4226. .LP
  4227. .Ds 0
  4228. .TA .2i .5i 1.5i 2.5i
  4229. .ta .2i .5i 1.5i 2.5i
  4230. .R
  4231. .PN GravityNotify
  4232.     1    24        code
  4233.     1            unused
  4234.     2    CARD16        sequence number
  4235.     4    WINDOW        event
  4236.     4    WINDOW        window
  4237.     2    INT16        x
  4238.     2    INT16        y
  4239.     16            unused
  4240. .De
  4241. .LP
  4242. .Ds 0
  4243. .TA .2i .5i 1.5i 2.5i
  4244. .ta .2i .5i 1.5i 2.5i
  4245. .R
  4246. .PN ResizeRequest
  4247.     1    25        code
  4248.     1            unused
  4249.     2    CARD16        sequence number
  4250.     4    WINDOW        window
  4251.     2    CARD16        width
  4252.     2    CARD16        height
  4253.     20            unused
  4254. .De
  4255. .LP
  4256. .Ds 0
  4257. .TA .2i .5i 1.5i 2.5i
  4258. .ta .2i .5i 1.5i 2.5i
  4259. .R
  4260. .PN CirculateNotify
  4261.     1    26        code
  4262.     1            unused
  4263.     2    CARD16        sequence number
  4264.     4    WINDOW        event
  4265.     4    WINDOW        window
  4266.     4    WINDOW        unused
  4267.     1            place
  4268.         0    Top
  4269.         1    Bottom
  4270.     15            unused
  4271. .De
  4272. .LP
  4273. .Ds 0
  4274. .TA .2i .5i 1.5i 2.5i
  4275. .ta .2i .5i 1.5i 2.5i
  4276. .R
  4277. .PN CirculateRequest
  4278.     1    27        code
  4279.     1            unused
  4280.     2    CARD16        sequence number
  4281.     4    WINDOW        parent
  4282.     4    WINDOW        window
  4283.     4            unused
  4284.     1            place
  4285.         0    Top
  4286.         1    Bottom
  4287.     15            unused
  4288. .De
  4289. .LP
  4290. .Ds 0
  4291. .TA .2i .5i 1.5i 2.5i
  4292. .ta .2i .5i 1.5i 2.5i
  4293. .R
  4294. .PN PropertyNotify
  4295.     1    28        code
  4296.     1            unused
  4297.     2    CARD16        sequence number
  4298.     4    WINDOW        window
  4299.     4    ATOM        atom
  4300.     4    TIMESTAMP        time
  4301.     1            state
  4302.         0    NewValue
  4303.         1    Deleted
  4304.     15            unused
  4305. .De
  4306. .LP
  4307. .Ds 0
  4308. .TA .2i .5i 1.5i 2.5i
  4309. .ta .2i .5i 1.5i 2.5i
  4310. .R
  4311. .PN SelectionClear
  4312.     1    29        code
  4313.     1            unused
  4314.     2    CARD16        sequence number
  4315.     4    TIMESTAMP        time
  4316.     4    WINDOW        owner
  4317.     4    ATOM        selection
  4318.     16            unused
  4319. .De
  4320. .LP
  4321. .Ds 0
  4322. .TA .2i .5i 1.5i 2.5i
  4323. .ta .2i .5i 1.5i 2.5i
  4324. .R
  4325. .PN SelectionRequest
  4326.     1    30        code
  4327.     1                unused
  4328.     2    CARD16        sequence number
  4329.     4    TIMESTAMP        time
  4330.         0    CurrentTime
  4331.     4    WINDOW        owner
  4332.     4    WINDOW        requestor
  4333.     4    ATOM        selection
  4334.     4    ATOM        target
  4335.     4    ATOM        property
  4336.         0    None
  4337.     4            unused
  4338. .De
  4339. .LP
  4340. .Ds 0
  4341. .TA .2i .5i 1.5i 2.5i
  4342. .ta .2i .5i 1.5i 2.5i
  4343. .R
  4344. .PN SelectionNotify
  4345.     1    31        code
  4346.     1            unused
  4347.     2    CARD16        sequence number
  4348.     4    TIMESTAMP        time
  4349.         0    CurrentTime
  4350.     4    WINDOW        requestor
  4351.     4    ATOM        selection
  4352.     4    ATOM        target
  4353.     4    ATOM        property
  4354.         0    None
  4355.     8            unused
  4356. .De
  4357. .LP
  4358. .Ds 0
  4359. .TA .2i .5i 1.5i 2.5i
  4360. .ta .2i .5i 1.5i 2.5i
  4361. .R
  4362. .PN ColormapNotify
  4363.     1    32        code
  4364.     1            unused
  4365.     2    CARD16        sequence number
  4366.     4    WINDOW        window
  4367.     4    COLORMAP        colormap
  4368.         0    None
  4369.     1    BOOL        new
  4370.     1            state
  4371.         0    Uninstalled
  4372.         1    Installed
  4373.     18            unused
  4374. .De
  4375. .LP
  4376. .Ds 0
  4377. .TA .2i .5i 1.5i 2.5i
  4378. .ta .2i .5i 1.5i 2.5i
  4379. .R
  4380. .PN ClientMessage
  4381.     1    33        code
  4382.     1    CARD8        format
  4383.     2    CARD16        sequence number
  4384.     4    WINDOW        window
  4385.     4    ATOM        type
  4386.     20            data
  4387. .De
  4388. .LP
  4389. .Ds 0
  4390. .TA .2i .5i 1.5i 2.5i
  4391. .ta .2i .5i 1.5i 2.5i
  4392. .R
  4393. .PN MappingNotify
  4394.     1    34        code
  4395.     1            unused
  4396.     2    CARD16        sequence number
  4397.     1            request
  4398.         0    Modifier
  4399.         1    Keyboard
  4400.         2    Pointer
  4401.     1    KEYCODE        first-keycode
  4402.     1    CARD8        count
  4403.     25            unused
  4404. .De
  4405. .ps 11
  4406. .nr PS 11
  4407. .bp
  4408.