DMXSpec-v1.txt 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. Client-to-Server DMX Extension to the X Protocol
  2. $Date: 2013/06/07 17:28:48 $, $Revision: 1.8 $
  3. Rickard E. (Rik) Faith (faith@redhat.com)
  4. Kevin E. Martin (kem@redhat.com)
  5. Copyright 2002,2003 Red Hat Inc., Raleigh, North Carolina.
  6. Permission is hereby granted, free of charge, to any person
  7. obtaining a copy of this software and associated documentation files
  8. (the "Software"), to deal in the Software without restriction,
  9. including without limitation on the rights to use, copy, modify,
  10. merge, publish, distribute, sublicense, and/or sell copies of the
  11. Software, and to permit persons to whom the Software is furnished to
  12. do so, subject to the following conditions:
  13. The above copyright notice and this permission notice (including the
  14. next paragraph) shall be included in all copies or substantial
  15. portions of the Software.
  16. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  18. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19. NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
  20. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  21. ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23. SOFTWARE.
  24. 1. Overview
  25. The client-to-server DMX extension to the X protocol (DMX) provides
  26. normal client applications with the ability to determine information
  27. about the characteristics of the Xdmx server and the back-end X
  28. servers that DMX is using.
  29. The name for this extension is "DMX".
  30. 2. Syntactic conventions
  31. This document uses the same syntactic conventions requests and data
  32. types as [X11R6.4].
  33. 3. Data types
  34. No new data types are defined by this extension. All data types
  35. referenced in this document are defined in [X11R6.4].
  36. 4. Requests
  37. DMXQueryVersion
  38. ==>
  39. majorVersion: CARD32
  40. minorVersion: CARD32
  41. patchVersion: CARD32
  42. The protocol this extension actually supports is indicated by
  43. majorVersion and minorVersion (patchVersion indicates the
  44. patchlevel and is for informational purposes only).
  45. Any incompatible changes to the protocol should be indicated by
  46. incrementing majorVersion.
  47. Small, upward-compatible changes should be indicated by incrementing
  48. minorVersion.
  49. Servers that support the protocol defined in this document will
  50. return a majorVersion of 1 and a minorVersion of 1.
  51. DMXGetScreenCount
  52. ==>
  53. screenCount: CARD32
  54. This request returns the number of back-end screens that the Xdmx
  55. server controls. A back-end screen may be managed as a regular X
  56. screen in the Xdmx server or may be joined with other back-end
  57. screens using Xinerama. (The information returned by this request
  58. does not change while Xdmx is running and may be cached on the
  59. client side.)
  60. DMXGetScreenInformation
  61. physicalScreen: CARD32
  62. ==>
  63. displayName: STRING8
  64. width: CARD16
  65. height: CARD16
  66. xoffset: INT16
  67. yoffset: INT16
  68. logicalScreen: CARD32
  69. xorigin: INT16
  70. yorigin: INT16
  71. Errors: Value
  72. This request returns information about individual back-end screens.
  73. The physicalScreen value is between 0 and screenCount-1, inclusive
  74. (values outside this range will result in a Value error). The
  75. displayname is the name used to open the display, either from the
  76. Xdmx command-line or from the configuration file. The width,
  77. height, xoffset, and yoffset values comprise a geometry
  78. specification (see X(7x)) for the location of the DMX window on the
  79. back-end screen. This request will always return non-negative
  80. (i.e., normalized) values for xoffset and yoffset. The
  81. logicalScreen value is the value of the screen that that Xdmx server
  82. exports to clients. When Xinerama is in use, this value is
  83. typically 0 for all values of physicalScreen. If Xinerama is in
  84. use, the xorigin and yorigin values specify where the physical
  85. screen is positioned in the global Xinerama coordinate system.
  86. Otherwise, these values are set to 0. (The information returned by
  87. this request does not change while Xdmx is running and may be cached
  88. on the client side.)
  89. DMXGetWindowInformation
  90. window: CARD32
  91. ==>
  92. screenCount: CARD32
  93. screens: LISTofCARD32
  94. windows: LISTofCARD32
  95. pos: LISTofRECTANGLE
  96. vis: LISTofRECTANGLE
  97. Errors: Window, Alloc
  98. This request computed the return values incorrectly for version 1.0
  99. of this protocol. Version 1.1 of this protocol conforms to this
  100. description.
  101. Given a window ID on the Xdmx server, this request returns data
  102. about how the window is represented on the back-end X servers. For
  103. each back-end X server that displays a portion of the window, the
  104. following information is returned:
  105. 1) the number of the physical screen containing that portion
  106. (which can be used with the DMXGetScreenInformation request
  107. to obtain more information about the screen),
  108. 2) the window ID on the back-end X server of the window
  109. containing that portion,
  110. 3) the position and dimensions of the window on the back-end, in
  111. screen coordinates, and
  112. 4) the visible area of the window on the back-end, in
  113. window-relative coordinates (all zeros for windows that are
  114. not visible)
  115. Note that DMX allows multiple back-end windows to overlap in their
  116. view of the DMX logical window. Further, a logical window does not
  117. have to be completely covered by back-end windows -- there may be
  118. gaps.
  119. As an example, consider a 500x500 window that spans the top two
  120. 1024x768 back-end displays (A and B) of a 2048x1536 DMX display
  121. composed of 4 1024x768 back-end displays arranged in a cube:
  122. A B
  123. C D
  124. In this case, the DMXGetWindowInformation call would return the
  125. following information for the 500x500 window:
  126. display A: 500x500 window at 1024-250,0 (relative to back end)
  127. with 250x500 visible at 0,0 (relative to window origin)
  128. display B: 500x500 window at -250,0 (relative to back end)
  129. with 250x500 visible at 250,0 (relative to window origin)
  130. display C: 500x500 window at 1024-250,-768 with 0x0 visible at 0,0
  131. display D: 500x500 window at -250,-768 with 0x0 visible at 0,0
  132. Note that if the specified window has not yet been mapped when
  133. DMXGetWindowInformation is called, then a subsequent XMapWindow call
  134. might be buffered in xlib while requests directly to the back-end X
  135. servers are processed. This race condition can be solved by calling
  136. DMXSync before talking directly to the back-end X servers.
  137. DMXGetInputCount
  138. ==>
  139. inputCount: CARD32
  140. This request was first supported in version 1.1 of this protocol.
  141. This request returns the number of input devices connected to the
  142. Xdmx server. This number is the same as that returned by
  143. XListInputDevices, but is available even when the XInput extension
  144. is not supported.
  145. DMXGetInputInformation
  146. deviceId: CARD32
  147. ==>
  148. inputType: CARD32
  149. physicalScreen: CARD32
  150. physicalId: CARD32
  151. isCore: BOOL
  152. sendsCore: BOOL
  153. name: STRING8
  154. Errors: Value
  155. This request was first supported in version 1.1 of this protocol.
  156. This request returns information about the specified input device
  157. that cannot be obtained from the XListInputDeivices call. The
  158. deviceId is the same as that used by the XListInputDevices call, and
  159. must be in the range 0 to inputCount-1, inclusive (values outside
  160. this range will result in a Value error).
  161. The value of inputType will always be value, and will be one of the
  162. following values:
  163. 0 for local (and dummy) devices,
  164. 1 for console devices, and
  165. 2 for back-end devices.
  166. For local devices, all other fields returned, except isCore and
  167. sendsCore, are invalid.
  168. For console devices, the physicalScreen and physicalID will be
  169. invalid, and the name will return the name of the X server on which
  170. the console window is displayed.
  171. For back-end devices, the physicalScreen will identify the back-end
  172. display and can be used as an argument to DMXGetScreenInformation to
  173. obtain more information; the physicalId will be the XInput device id
  174. on the back-end X server; and the name will be invalid (since it
  175. does not provide any additional information that cannot be obtained
  176. with DMXGetScreenInformation).
  177. If isCore is True, then this device is active as a true core input
  178. device and will send core events. If sendsCore is True, then this
  179. device queried an XInput extension device, but sends core events
  180. instead of extension events. Note that this behavior is different
  181. from that of XFree86, where XInput extension devices may send both
  182. extension events and core events.
  183. DMXForceWindowCreation
  184. window: CARD32
  185. ==>
  186. Errors: Window
  187. This request was first supported in version 1.2 of this protocol.
  188. When using the lazy window creation optimization, windows are not
  189. created on the back-end X servers until they are required. This
  190. request forces the immediate creation of the window requested.
  191. DMXReconfigureScreen
  192. screen: CARD32
  193. x: INT16
  194. y: INT16
  195. ==>
  196. status: CARD32
  197. Errors: Value
  198. This request was first supported in version 1.3 of this protocol.
  199. This request reconfigures the screen position to coordinates (x,y)
  200. when using the Xinerama extension. Otherwise, it is a NOP. Illegal
  201. values for screen will result in a BadValue error. Other non-fatal
  202. errors will be returned in status.
  203. DMXSync
  204. ==>
  205. This request was first supported in version 1.5 of this protocol.
  206. This request flushes all pending protocol requests between the Xdmx
  207. server and each back-end X server. It is used by a client that
  208. talks directly to back-end X servers
  209. To ensure proper synchronization semantics, this request has a
  210. reply, but the reply does not carry any information.
  211. 5. Events
  212. No new events are defined by this extension.
  213. 6. Errors
  214. No new events are defined by this extension.
  215. 7. Encoding
  216. DMXQueryVersion
  217. 1 CARD8 opcode (X assigned)
  218. 1 0 DMX opcode (X_DMXQueryVersion)
  219. 2 1 request length
  220. ==>
  221. 1 1 Reply
  222. 1 unused
  223. 2 CARD16 sequence number
  224. 4 0 reply length
  225. 4 CARD32 majorVersion
  226. 4 CARD32 minorVersion
  227. 4 CARD32 patchVersion
  228. 12 unused
  229. DMXGetScreenCount
  230. 1 CARD8 opcode (X assigned)
  231. 1 1 DMX opcode (X_DMXGetScreenCount)
  232. 2 1 request length
  233. ==>
  234. 1 1 Reply
  235. 1 unused
  236. 2 CARD16 sequence number
  237. 4 0 reply length
  238. 4 CARD32 screenCount
  239. 20 unused
  240. DMXGetScreenInformation
  241. 1 CARD8 opcode (X assigned)
  242. 1 2 DMX opcode (X_DMXGetScreenInformation)
  243. 2 2 request length
  244. 4 CARD32 physicalScreen
  245. ==>
  246. 1 1 Reply
  247. 1 unused
  248. 2 CARD16 sequence number
  249. 4 n/4+p reply length
  250. 4 n displayNameLength
  251. 2 CARD16 width
  252. 2 CARD16 height
  253. 2 INT16 xoffset
  254. 2 INT16 yoffset
  255. 4 CARD32 logicalScreen
  256. 2 INT16 xorigin
  257. 2 INT16 yorigin
  258. 4 unused
  259. n displayName
  260. p pad(n)
  261. DMXGetWindowInformation
  262. 1 CARD8 opcode (X assigned)
  263. 1 3 DMX opcode (X_DMXGetWindowInformation)
  264. 2 2 request length
  265. 4 CARD32 window
  266. ==>
  267. 1 1 Reply
  268. 1 unused
  269. 2 CARD16 sequence number
  270. 4 n*6 reply length
  271. 4 n screenCount
  272. 20 unused
  273. n*4 LISTofCARD32 screens
  274. n*4 LISTofCARD32 windows
  275. n*8 LISTofRECTANGLE pos
  276. n*8 LISTofRECTANGLE vis
  277. DMXGetInputCount
  278. 1 CARD8 opcode (X assigned)
  279. 1 DMX opcode (X_DMXGetInputCount)
  280. 2 1 request length
  281. ==>
  282. 1 1 Reply
  283. 1 unused
  284. 2 CARD16 sequence number
  285. 4 0 reply length
  286. 4 CARD32 inputCount
  287. 20 unused
  288. DMXGetInputInformation
  289. 1 CARD8 opcode (X assigned)
  290. 1 4 DMX opcode (X_DMXGetInputInformation)
  291. 2 2 request length
  292. 4 CARD32 deviceId
  293. ==>
  294. 1 1 Reply
  295. 1 unused
  296. 2 CARD16 sequence number
  297. 4 n/4+p reply length
  298. 4 CARD32 inputType
  299. 4 CARD32 physicalScreen
  300. 4 CARD32 physicalId
  301. 4 n nameLength
  302. 1 BOOL isCore
  303. 1 BOOL sendsCore
  304. 6 unused
  305. n name
  306. p pad(n)
  307. DMXForceWindowCreation
  308. 1 CARD8 opcode (X assigned)
  309. 1 2 DMX opcode (X_DMXForceWindowCreation)
  310. 2 2 request length
  311. 4 CARD32 window
  312. ==>
  313. DMXReconfigureScreen
  314. 1 CARD8 opcode (X assigned)
  315. 1 2 DMX opcode (X_DMXReconfigureScreen)
  316. 2 2 request length
  317. 4 CARD32 screen
  318. 2 INT16 x
  319. 2 INT16 y
  320. ==>
  321. 1 1 Reply
  322. 1 unused
  323. 2 CARD16 sequence number
  324. 4 0 reply length
  325. 4 CARD32 status
  326. 20 unused
  327. DMXSync
  328. 1 CARD8 opcode (X assigned)
  329. 1 0 DMX opcode (X_DMXSync)
  330. 2 1 request length
  331. ==>
  332. 1 1 Reply
  333. 1 unused
  334. 2 CARD16 sequence number
  335. 4 0 reply length
  336. 24 unused
  337. 8. Changes to existing requests/replies/events
  338. No changes to existing requests, replies, or events are necessitated
  339. by this extension.
  340. 9. Acknowledgments
  341. 10. References
  342. [X11R6.4] Robert W. Sheifler. X Window System Protocol, X Consortium
  343. Standard, X Version 11, Release 6.4. Available from
  344. xc/doc/specs/XProtocol and xc/doc/hardcopy/XProtocol.