dmxproto.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. /*
  2. * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
  3. *
  4. * All Rights Reserved.
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining
  7. * a copy of this software and associated documentation files (the
  8. * "Software"), to deal in the Software without restriction, including
  9. * without limitation on the rights to use, copy, modify, merge,
  10. * publish, distribute, sublicense, and/or sell copies of the Software,
  11. * and to permit persons to whom the Software is furnished to do so,
  12. * subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice (including the
  15. * next paragraph) shall be included in all copies or substantial
  16. * portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  19. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  21. * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
  22. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  23. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  24. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  25. * SOFTWARE.
  26. */
  27. /*
  28. * Authors:
  29. * Rickard E. (Rik) Faith <faith@redhat.com>
  30. *
  31. */
  32. /** \file
  33. * This file describes the structures necessary to implement the wire
  34. * protocol for the DMX protocol extension. It should be included only
  35. * in files that implement the client-side (or server-side) part of the
  36. * protocol (i.e., client-side applications should \b not include this
  37. * file). */
  38. #ifndef _DMXSTR_H_
  39. #define _DMXSTR_H_
  40. #define DMX_EXTENSION_NAME "DMX"
  41. #define DMX_EXTENSION_MAJOR 2
  42. #define DMX_EXTENSION_MINOR 2
  43. #define DMX_EXTENSION_PATCH 20040604
  44. /* These values must be larger than LastExtensionError.
  45. The values in dmxext.h and dmxproto.h *MUST* match. */
  46. #define DMX_BAD_XINERAMA 1001
  47. #define DMX_BAD_VALUE 1002
  48. #define X_DMXQueryVersion 0
  49. #define X_DMXGetScreenCount 1
  50. #define X_DMXGetScreenInformationDEPRECATED 2
  51. #define X_DMXGetWindowAttributes 3
  52. #define X_DMXGetInputCount 4
  53. #define X_DMXGetInputAttributes 5
  54. #define X_DMXForceWindowCreationDEPRECATED 6
  55. #define X_DMXReconfigureScreenDEPRECATED 7
  56. #define X_DMXSync 8
  57. #define X_DMXForceWindowCreation 9
  58. #define X_DMXGetScreenAttributes 10
  59. #define X_DMXChangeScreensAttributes 11
  60. #define X_DMXAddScreen 12
  61. #define X_DMXRemoveScreen 13
  62. #define X_DMXGetDesktopAttributes 14
  63. #define X_DMXChangeDesktopAttributes 15
  64. #define X_DMXAddInput 16
  65. #define X_DMXRemoveInput 17
  66. /** Wire-level description of DMXQueryVersion protocol request. */
  67. typedef struct {
  68. CARD8 reqType; /* dmxcode */
  69. CARD8 dmxReqType; /* X_DMXQueryVersion */
  70. CARD16 length B16;
  71. } xDMXQueryVersionReq;
  72. #define sz_xDMXQueryVersionReq 4
  73. /** Wire-level description of DMXQueryVersion protocol reply. */
  74. typedef struct {
  75. BYTE type; /* X_Reply */
  76. CARD8 ununsed;
  77. CARD16 sequenceNumber B16;
  78. CARD32 length B32;
  79. CARD32 majorVersion B32;
  80. CARD32 minorVersion B32;
  81. CARD32 patchVersion B32;
  82. CARD32 pad0 B32;
  83. CARD32 pad1 B32;
  84. CARD32 pad2 B32;
  85. } xDMXQueryVersionReply;
  86. #define sz_xDMXQueryVersionReply 32
  87. /** Wire-level description of DMXSync protocol request. */
  88. typedef struct {
  89. CARD8 reqType; /* DMXCode */
  90. CARD8 dmxReqType; /* X_DMXSync */
  91. CARD16 length B16;
  92. } xDMXSyncReq;
  93. #define sz_xDMXSyncReq 4
  94. /** Wire-level description of DMXSync protocol reply. */
  95. typedef struct {
  96. BYTE type; /* X_Reply */
  97. CARD8 unused;
  98. CARD16 sequenceNumber B16;
  99. CARD32 length B32;
  100. CARD32 status B32;
  101. CARD32 pad0 B32;
  102. CARD32 pad1 B32;
  103. CARD32 pad2 B32;
  104. CARD32 pad3 B32;
  105. CARD32 pad4 B32;
  106. } xDMXSyncReply;
  107. #define sz_xDMXSyncReply 32
  108. /** Wire-level description of DMXForceWindowCreation protocol request. */
  109. typedef struct {
  110. CARD8 reqType; /* DMXCode */
  111. CARD8 dmxReqType; /* X_DMXForceWindowCreation */
  112. CARD16 length B16;
  113. CARD32 window B32;
  114. } xDMXForceWindowCreationReq;
  115. #define sz_xDMXForceWindowCreationReq 8
  116. /** Wire-level description of DMXForceWindowCreation protocol reply. */
  117. typedef struct {
  118. BYTE type; /* X_Reply */
  119. CARD8 unused;
  120. CARD16 sequenceNumber B16;
  121. CARD32 length B32;
  122. CARD32 status B32;
  123. CARD32 pad0 B32;
  124. CARD32 pad1 B32;
  125. CARD32 pad2 B32;
  126. CARD32 pad3 B32;
  127. CARD32 pad4 B32;
  128. } xDMXForceWindowCreationReply;
  129. #define sz_xDMXForceWindowCreationReply 32
  130. /** Wire-level description of DMXGetScreenCount protocol request. */
  131. typedef struct {
  132. CARD8 reqType; /* DMXCode */
  133. CARD8 dmxReqType; /* X_DMXGetScreenCount */
  134. CARD16 length B16;
  135. } xDMXGetScreenCountReq;
  136. #define sz_xDMXGetScreenCountReq 4
  137. /** Wire-level description of DMXGetScreenCount protocol reply. */
  138. typedef struct {
  139. BYTE type; /* X_Reply */
  140. CARD8 unused;
  141. CARD16 sequenceNumber B16;
  142. CARD32 length B32;
  143. CARD32 screenCount B32;
  144. CARD32 pad0 B32;
  145. CARD32 pad1 B32;
  146. CARD32 pad2 B32;
  147. CARD32 pad3 B32;
  148. CARD32 pad4 B32;
  149. } xDMXGetScreenCountReply;
  150. #define sz_xDMXGetScreenCountReply 32
  151. /** Wire-level description of DMXGetScreenAttributes protocol request. */
  152. typedef struct {
  153. CARD8 reqType; /* DMXCode */
  154. CARD8 dmxReqType; /* X_DMXGetScreenAttributes */
  155. CARD16 length B16;
  156. CARD32 physicalScreen B32;
  157. } xDMXGetScreenAttributesReq;
  158. #define sz_xDMXGetScreenAttributesReq 8
  159. /** Wire-level description of DMXGetScreenAttributes protocol reply. */
  160. typedef struct {
  161. BYTE type; /* X_Reply */
  162. CARD8 unused;
  163. CARD16 sequenceNumber B16;
  164. CARD32 length B32;
  165. CARD32 displayNameLength B32;
  166. CARD32 logicalScreen B32;
  167. CARD16 screenWindowWidth B16;
  168. CARD16 screenWindowHeight B16;
  169. INT16 screenWindowXoffset B16;
  170. INT16 screenWindowYoffset B16;
  171. CARD16 rootWindowWidth B16;
  172. CARD16 rootWindowHeight B16;
  173. INT16 rootWindowXoffset B16;
  174. INT16 rootWindowYoffset B16;
  175. INT16 rootWindowXorigin B16;
  176. INT16 rootWindowYorigin B16;
  177. } xDMXGetScreenAttributesReply;
  178. #define sz_xDMXGetScreenAttributesReply 36
  179. /** Wire-level description of DMXChangeScreensAttributes protocol request. */
  180. typedef struct {
  181. CARD8 reqType; /* DMXCode */
  182. CARD8 dmxReqType; /* X_DMXChangeScreensAttributes */
  183. CARD16 length B16;
  184. CARD32 screenCount B32;
  185. CARD32 maskCount B32;
  186. } xDMXChangeScreensAttributesReq;
  187. #define sz_xDMXChangeScreensAttributesReq 12
  188. /** Wire-level description of DMXChangeScreensAttributes protocol reply. */
  189. typedef struct {
  190. BYTE type; /* X_Reply */
  191. CARD8 unused;
  192. CARD16 sequenceNumber B16;
  193. CARD32 length B32;
  194. CARD32 status B32;
  195. CARD32 errorScreen B32;
  196. CARD32 pad0 B32;
  197. CARD32 pad1 B32;
  198. CARD32 pad2 B32;
  199. CARD32 pad3 B32;
  200. } xDMXChangeScreensAttributesReply;
  201. #define sz_xDMXChangeScreensAttributesReply 32
  202. /** Wire-level description of DMXAddScreen protocol request. */
  203. typedef struct {
  204. CARD8 reqType; /* DMXCode */
  205. CARD8 dmxReqType; /* X_DMXAddScreen */
  206. CARD16 length B16;
  207. CARD32 displayNameLength B32;
  208. CARD32 physicalScreen B32;
  209. CARD32 valueMask B32;
  210. } xDMXAddScreenReq;
  211. #define sz_xDMXAddScreenReq 16
  212. /** Wire-level description of DMXAddScreen protocol reply. */
  213. typedef struct {
  214. BYTE type; /* X_Reply */
  215. CARD8 unused;
  216. CARD16 sequenceNumber B16;
  217. CARD32 length B32;
  218. CARD32 status B32;
  219. CARD32 physicalScreen B32;
  220. CARD32 pad0 B32;
  221. CARD32 pad1 B32;
  222. CARD32 pad2 B32;
  223. CARD32 pad3 B32;
  224. } xDMXAddScreenReply;
  225. #define sz_xDMXAddScreenReply 32
  226. /** Wire-level description of DMXRemoveScreen protocol request. */
  227. typedef struct {
  228. CARD8 reqType; /* DMXCode */
  229. CARD8 dmxReqType; /* X_DMXRemoveScreen */
  230. CARD16 length B16;
  231. CARD32 physicalScreen B32;
  232. } xDMXRemoveScreenReq;
  233. #define sz_xDMXRemoveScreenReq 8
  234. /** Wire-level description of DMXRemoveScreen protocol reply. */
  235. typedef struct {
  236. BYTE type; /* X_Reply */
  237. CARD8 unused;
  238. CARD16 sequenceNumber B16;
  239. CARD32 length B32;
  240. CARD32 status B32;
  241. CARD32 pad0 B32;
  242. CARD32 pad1 B32;
  243. CARD32 pad2 B32;
  244. CARD32 pad3 B32;
  245. CARD32 pad4 B32;
  246. } xDMXRemoveScreenReply;
  247. #define sz_xDMXRemoveScreenReply 32
  248. /** Wire-level description of DMXGetWindowAttributes protocol request. */
  249. typedef struct {
  250. CARD8 reqType; /* DMXCode */
  251. CARD8 dmxReqType; /* X_DMXGetWindowAttributes */
  252. CARD16 length B16;
  253. CARD32 window B32;
  254. } xDMXGetWindowAttributesReq;
  255. #define sz_xDMXGetWindowAttributesReq 8
  256. /** Wire-level description of DMXGetWindowAttributes protocol reply. */
  257. typedef struct {
  258. BYTE type; /* X_Reply */
  259. CARD8 unused;
  260. CARD16 sequenceNumber B16;
  261. CARD32 length B32;
  262. CARD32 screenCount B32;
  263. CARD32 pad0 B32;
  264. CARD32 pad1 B32;
  265. CARD32 pad2 B32;
  266. CARD32 pad3 B32;
  267. CARD32 pad4 B32;
  268. } xDMXGetWindowAttributesReply;
  269. #define sz_xDMXGetWindowAttributesReply 32
  270. /** Wire-level description of DMXGetDesktopAttributes protocol request. */
  271. typedef struct {
  272. CARD8 reqType; /* DMXCode */
  273. CARD8 dmxReqType; /* X_DMXGetDesktopAttributes */
  274. CARD16 length B16;
  275. } xDMXGetDesktopAttributesReq;
  276. #define sz_xDMXGetDesktopAttributesReq 4
  277. /** Wire-level description of DMXGetDesktopAttributes protocol reply. */
  278. typedef struct {
  279. BYTE type; /* X_Reply */
  280. CARD8 unused;
  281. CARD16 sequenceNumber B16;
  282. CARD32 length B32;
  283. INT16 width;
  284. INT16 height;
  285. INT16 shiftX;
  286. INT16 shiftY;
  287. CARD32 pad0 B32;
  288. CARD32 pad1 B32;
  289. CARD32 pad2 B32;
  290. CARD32 pad3 B32;
  291. } xDMXGetDesktopAttributesReply;
  292. #define sz_xDMXGetDesktopAttributesReply 32
  293. /** Wire-level description of DMXChangeDesktopAttributes protocol request. */
  294. typedef struct {
  295. CARD8 reqType; /* DMXCode */
  296. CARD8 dmxReqType; /* X_DMXChangeDesktopAttributes */
  297. CARD16 length B16;
  298. CARD32 valueMask B32;
  299. } xDMXChangeDesktopAttributesReq;
  300. #define sz_xDMXChangeDesktopAttributesReq 8
  301. /** Wire-level description of DMXChangeDesktopAttributes protocol reply. */
  302. typedef struct {
  303. BYTE type; /* X_Reply */
  304. CARD8 unused;
  305. CARD16 sequenceNumber B16;
  306. CARD32 length B32;
  307. CARD32 status B32;
  308. CARD32 pad0 B32;
  309. CARD32 pad1 B32;
  310. CARD32 pad2 B32;
  311. CARD32 pad3 B32;
  312. CARD32 pad4 B32;
  313. } xDMXChangeDesktopAttributesReply;
  314. #define sz_xDMXChangeDesktopAttributesReply 32
  315. /** Wire-level description of DMXGetInputCount protocol request. */
  316. typedef struct {
  317. CARD8 reqType; /* DMXCode */
  318. CARD8 dmxReqType; /* X_DMXGetInputCount */
  319. CARD16 length B16;
  320. } xDMXGetInputCountReq;
  321. #define sz_xDMXGetInputCountReq 4
  322. /** Wire-level description of DMXGetInputCount protocol reply. */
  323. typedef struct {
  324. BYTE type; /* X_Reply */
  325. CARD8 unused;
  326. CARD16 sequenceNumber B16;
  327. CARD32 length B32;
  328. CARD32 inputCount B32;
  329. CARD32 pad0 B32;
  330. CARD32 pad1 B32;
  331. CARD32 pad2 B32;
  332. CARD32 pad3 B32;
  333. CARD32 pad4 B32;
  334. } xDMXGetInputCountReply;
  335. #define sz_xDMXGetInputCountReply 32
  336. /** Wire-level description of DMXGetInputAttributes protocol request. */
  337. typedef struct {
  338. CARD8 reqType; /* DMXCode */
  339. CARD8 dmxReqType; /* X_DMXGetInputAttributes */
  340. CARD16 length B16;
  341. CARD32 deviceId B32;
  342. } xDMXGetInputAttributesReq;
  343. #define sz_xDMXGetInputAttributesReq 8
  344. /** Wire-level description of DMXGetInputAttributes protocol reply. */
  345. typedef struct {
  346. BYTE type; /* X_Reply */
  347. CARD8 unused;
  348. CARD16 sequenceNumber B16;
  349. CARD32 length B32;
  350. CARD32 inputType B32;
  351. CARD32 physicalScreen B32;
  352. CARD32 physicalId B32;
  353. CARD32 nameLength B32;
  354. BOOL isCore;
  355. BOOL sendsCore;
  356. BOOL detached;
  357. CARD8 pad0;
  358. CARD32 pad1 B32;
  359. } xDMXGetInputAttributesReply;
  360. #define sz_xDMXGetInputAttributesReply 32
  361. /** Wire-level description of DMXAddInput protocol request. */
  362. typedef struct {
  363. CARD8 reqType; /* DMXCode */
  364. CARD8 dmxReqType; /* X_DMXAddInput */
  365. CARD16 length B16;
  366. CARD32 displayNameLength B32;
  367. CARD32 valueMask;
  368. } xDMXAddInputReq;
  369. #define sz_xDMXAddInputReq 12
  370. /** Wire-level description of DMXAddInput protocol reply. */
  371. typedef struct {
  372. BYTE type; /* X_Reply */
  373. CARD8 unused;
  374. CARD16 sequenceNumber B16;
  375. CARD32 length B32;
  376. CARD32 status B32;
  377. CARD32 physicalId B32;
  378. CARD32 pad0 B32;
  379. CARD32 pad1 B32;
  380. CARD32 pad2 B32;
  381. CARD32 pad3 B32;
  382. } xDMXAddInputReply;
  383. #define sz_xDMXAddInputReply 32
  384. /** Wire-level description of DMXRemoveInput protocol request. */
  385. typedef struct {
  386. CARD8 reqType; /* DMXCode */
  387. CARD8 dmxReqType; /* X_DMXRemoveInput */
  388. CARD16 length B16;
  389. CARD32 physicalId B32;
  390. } xDMXRemoveInputReq;
  391. #define sz_xDMXRemoveInputReq 8
  392. /** Wire-level description of DMXRemoveInput protocol reply. */
  393. typedef struct {
  394. BYTE type;
  395. CARD8 unused;
  396. CARD16 sequenceNumber B16;
  397. CARD32 length B32;
  398. CARD32 status B32;
  399. CARD32 pad0 B32;
  400. CARD32 pad1 B32;
  401. CARD32 pad2 B32;
  402. CARD32 pad3 B32;
  403. CARD32 pad4 B32;
  404. } xDMXRemoveInputReply;
  405. #define sz_xDMXRemoveInputReply 32
  406. #endif