xevie.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. /*
  2. * This file generated automatically from xevie.xml by c_client.py.
  3. * Edit at your peril.
  4. */
  5. /**
  6. * @defgroup XCB_Xevie_API XCB Xevie API
  7. * @brief Xevie XCB Protocol Implementation.
  8. * @{
  9. **/
  10. #ifndef __XEVIE_H
  11. #define __XEVIE_H
  12. #include "xcb.h"
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #define XCB_XEVIE_MAJOR_VERSION 1
  17. #define XCB_XEVIE_MINOR_VERSION 0
  18. extern xcb_extension_t xcb_xevie_id;
  19. /**
  20. * @brief xcb_xevie_query_version_cookie_t
  21. **/
  22. typedef struct xcb_xevie_query_version_cookie_t {
  23. unsigned int sequence;
  24. } xcb_xevie_query_version_cookie_t;
  25. /** Opcode for xcb_xevie_query_version. */
  26. #define XCB_XEVIE_QUERY_VERSION 0
  27. /**
  28. * @brief xcb_xevie_query_version_request_t
  29. **/
  30. typedef struct xcb_xevie_query_version_request_t {
  31. uint8_t major_opcode;
  32. uint8_t minor_opcode;
  33. uint16_t length;
  34. uint16_t client_major_version;
  35. uint16_t client_minor_version;
  36. } xcb_xevie_query_version_request_t;
  37. /**
  38. * @brief xcb_xevie_query_version_reply_t
  39. **/
  40. typedef struct xcb_xevie_query_version_reply_t {
  41. uint8_t response_type;
  42. uint8_t pad0;
  43. uint16_t sequence;
  44. uint32_t length;
  45. uint16_t server_major_version;
  46. uint16_t server_minor_version;
  47. uint8_t pad1[20];
  48. } xcb_xevie_query_version_reply_t;
  49. /**
  50. * @brief xcb_xevie_start_cookie_t
  51. **/
  52. typedef struct xcb_xevie_start_cookie_t {
  53. unsigned int sequence;
  54. } xcb_xevie_start_cookie_t;
  55. /** Opcode for xcb_xevie_start. */
  56. #define XCB_XEVIE_START 1
  57. /**
  58. * @brief xcb_xevie_start_request_t
  59. **/
  60. typedef struct xcb_xevie_start_request_t {
  61. uint8_t major_opcode;
  62. uint8_t minor_opcode;
  63. uint16_t length;
  64. uint32_t screen;
  65. } xcb_xevie_start_request_t;
  66. /**
  67. * @brief xcb_xevie_start_reply_t
  68. **/
  69. typedef struct xcb_xevie_start_reply_t {
  70. uint8_t response_type;
  71. uint8_t pad0;
  72. uint16_t sequence;
  73. uint32_t length;
  74. uint8_t pad1[24];
  75. } xcb_xevie_start_reply_t;
  76. /**
  77. * @brief xcb_xevie_end_cookie_t
  78. **/
  79. typedef struct xcb_xevie_end_cookie_t {
  80. unsigned int sequence;
  81. } xcb_xevie_end_cookie_t;
  82. /** Opcode for xcb_xevie_end. */
  83. #define XCB_XEVIE_END 2
  84. /**
  85. * @brief xcb_xevie_end_request_t
  86. **/
  87. typedef struct xcb_xevie_end_request_t {
  88. uint8_t major_opcode;
  89. uint8_t minor_opcode;
  90. uint16_t length;
  91. uint32_t cmap;
  92. } xcb_xevie_end_request_t;
  93. /**
  94. * @brief xcb_xevie_end_reply_t
  95. **/
  96. typedef struct xcb_xevie_end_reply_t {
  97. uint8_t response_type;
  98. uint8_t pad0;
  99. uint16_t sequence;
  100. uint32_t length;
  101. uint8_t pad1[24];
  102. } xcb_xevie_end_reply_t;
  103. typedef enum xcb_xevie_datatype_t {
  104. XCB_XEVIE_DATATYPE_UNMODIFIED = 0,
  105. XCB_XEVIE_DATATYPE_MODIFIED = 1
  106. } xcb_xevie_datatype_t;
  107. /**
  108. * @brief xcb_xevie_event_t
  109. **/
  110. typedef struct xcb_xevie_event_t {
  111. uint8_t pad0[32];
  112. } xcb_xevie_event_t;
  113. /**
  114. * @brief xcb_xevie_event_iterator_t
  115. **/
  116. typedef struct xcb_xevie_event_iterator_t {
  117. xcb_xevie_event_t *data;
  118. int rem;
  119. int index;
  120. } xcb_xevie_event_iterator_t;
  121. /**
  122. * @brief xcb_xevie_send_cookie_t
  123. **/
  124. typedef struct xcb_xevie_send_cookie_t {
  125. unsigned int sequence;
  126. } xcb_xevie_send_cookie_t;
  127. /** Opcode for xcb_xevie_send. */
  128. #define XCB_XEVIE_SEND 3
  129. /**
  130. * @brief xcb_xevie_send_request_t
  131. **/
  132. typedef struct xcb_xevie_send_request_t {
  133. uint8_t major_opcode;
  134. uint8_t minor_opcode;
  135. uint16_t length;
  136. xcb_xevie_event_t event;
  137. uint32_t data_type;
  138. uint8_t pad0[64];
  139. } xcb_xevie_send_request_t;
  140. /**
  141. * @brief xcb_xevie_send_reply_t
  142. **/
  143. typedef struct xcb_xevie_send_reply_t {
  144. uint8_t response_type;
  145. uint8_t pad0;
  146. uint16_t sequence;
  147. uint32_t length;
  148. uint8_t pad1[24];
  149. } xcb_xevie_send_reply_t;
  150. /**
  151. * @brief xcb_xevie_select_input_cookie_t
  152. **/
  153. typedef struct xcb_xevie_select_input_cookie_t {
  154. unsigned int sequence;
  155. } xcb_xevie_select_input_cookie_t;
  156. /** Opcode for xcb_xevie_select_input. */
  157. #define XCB_XEVIE_SELECT_INPUT 4
  158. /**
  159. * @brief xcb_xevie_select_input_request_t
  160. **/
  161. typedef struct xcb_xevie_select_input_request_t {
  162. uint8_t major_opcode;
  163. uint8_t minor_opcode;
  164. uint16_t length;
  165. uint32_t event_mask;
  166. } xcb_xevie_select_input_request_t;
  167. /**
  168. * @brief xcb_xevie_select_input_reply_t
  169. **/
  170. typedef struct xcb_xevie_select_input_reply_t {
  171. uint8_t response_type;
  172. uint8_t pad0;
  173. uint16_t sequence;
  174. uint32_t length;
  175. uint8_t pad1[24];
  176. } xcb_xevie_select_input_reply_t;
  177. /**
  178. *
  179. * @param c The connection
  180. * @return A cookie
  181. *
  182. * Delivers a request to the X server.
  183. *
  184. */
  185. xcb_xevie_query_version_cookie_t
  186. xcb_xevie_query_version (xcb_connection_t *c,
  187. uint16_t client_major_version,
  188. uint16_t client_minor_version);
  189. /**
  190. *
  191. * @param c The connection
  192. * @return A cookie
  193. *
  194. * Delivers a request to the X server.
  195. *
  196. * This form can be used only if the request will cause
  197. * a reply to be generated. Any returned error will be
  198. * placed in the event queue.
  199. */
  200. xcb_xevie_query_version_cookie_t
  201. xcb_xevie_query_version_unchecked (xcb_connection_t *c,
  202. uint16_t client_major_version,
  203. uint16_t client_minor_version);
  204. /**
  205. * Return the reply
  206. * @param c The connection
  207. * @param cookie The cookie
  208. * @param e The xcb_generic_error_t supplied
  209. *
  210. * Returns the reply of the request asked by
  211. *
  212. * The parameter @p e supplied to this function must be NULL if
  213. * xcb_xevie_query_version_unchecked(). is used.
  214. * Otherwise, it stores the error if any.
  215. *
  216. * The returned value must be freed by the caller using free().
  217. */
  218. xcb_xevie_query_version_reply_t *
  219. xcb_xevie_query_version_reply (xcb_connection_t *c,
  220. xcb_xevie_query_version_cookie_t cookie /**< */,
  221. xcb_generic_error_t **e);
  222. /**
  223. *
  224. * @param c The connection
  225. * @return A cookie
  226. *
  227. * Delivers a request to the X server.
  228. *
  229. */
  230. xcb_xevie_start_cookie_t
  231. xcb_xevie_start (xcb_connection_t *c,
  232. uint32_t screen);
  233. /**
  234. *
  235. * @param c The connection
  236. * @return A cookie
  237. *
  238. * Delivers a request to the X server.
  239. *
  240. * This form can be used only if the request will cause
  241. * a reply to be generated. Any returned error will be
  242. * placed in the event queue.
  243. */
  244. xcb_xevie_start_cookie_t
  245. xcb_xevie_start_unchecked (xcb_connection_t *c,
  246. uint32_t screen);
  247. /**
  248. * Return the reply
  249. * @param c The connection
  250. * @param cookie The cookie
  251. * @param e The xcb_generic_error_t supplied
  252. *
  253. * Returns the reply of the request asked by
  254. *
  255. * The parameter @p e supplied to this function must be NULL if
  256. * xcb_xevie_start_unchecked(). is used.
  257. * Otherwise, it stores the error if any.
  258. *
  259. * The returned value must be freed by the caller using free().
  260. */
  261. xcb_xevie_start_reply_t *
  262. xcb_xevie_start_reply (xcb_connection_t *c,
  263. xcb_xevie_start_cookie_t cookie /**< */,
  264. xcb_generic_error_t **e);
  265. /**
  266. *
  267. * @param c The connection
  268. * @return A cookie
  269. *
  270. * Delivers a request to the X server.
  271. *
  272. */
  273. xcb_xevie_end_cookie_t
  274. xcb_xevie_end (xcb_connection_t *c,
  275. uint32_t cmap);
  276. /**
  277. *
  278. * @param c The connection
  279. * @return A cookie
  280. *
  281. * Delivers a request to the X server.
  282. *
  283. * This form can be used only if the request will cause
  284. * a reply to be generated. Any returned error will be
  285. * placed in the event queue.
  286. */
  287. xcb_xevie_end_cookie_t
  288. xcb_xevie_end_unchecked (xcb_connection_t *c,
  289. uint32_t cmap);
  290. /**
  291. * Return the reply
  292. * @param c The connection
  293. * @param cookie The cookie
  294. * @param e The xcb_generic_error_t supplied
  295. *
  296. * Returns the reply of the request asked by
  297. *
  298. * The parameter @p e supplied to this function must be NULL if
  299. * xcb_xevie_end_unchecked(). is used.
  300. * Otherwise, it stores the error if any.
  301. *
  302. * The returned value must be freed by the caller using free().
  303. */
  304. xcb_xevie_end_reply_t *
  305. xcb_xevie_end_reply (xcb_connection_t *c,
  306. xcb_xevie_end_cookie_t cookie /**< */,
  307. xcb_generic_error_t **e);
  308. /**
  309. * Get the next element of the iterator
  310. * @param i Pointer to a xcb_xevie_event_iterator_t
  311. *
  312. * Get the next element in the iterator. The member rem is
  313. * decreased by one. The member data points to the next
  314. * element. The member index is increased by sizeof(xcb_xevie_event_t)
  315. */
  316. void
  317. xcb_xevie_event_next (xcb_xevie_event_iterator_t *i);
  318. /**
  319. * Return the iterator pointing to the last element
  320. * @param i An xcb_xevie_event_iterator_t
  321. * @return The iterator pointing to the last element
  322. *
  323. * Set the current element in the iterator to the last element.
  324. * The member rem is set to 0. The member data points to the
  325. * last element.
  326. */
  327. xcb_generic_iterator_t
  328. xcb_xevie_event_end (xcb_xevie_event_iterator_t i);
  329. /**
  330. *
  331. * @param c The connection
  332. * @return A cookie
  333. *
  334. * Delivers a request to the X server.
  335. *
  336. */
  337. xcb_xevie_send_cookie_t
  338. xcb_xevie_send (xcb_connection_t *c,
  339. xcb_xevie_event_t event,
  340. uint32_t data_type);
  341. /**
  342. *
  343. * @param c The connection
  344. * @return A cookie
  345. *
  346. * Delivers a request to the X server.
  347. *
  348. * This form can be used only if the request will cause
  349. * a reply to be generated. Any returned error will be
  350. * placed in the event queue.
  351. */
  352. xcb_xevie_send_cookie_t
  353. xcb_xevie_send_unchecked (xcb_connection_t *c,
  354. xcb_xevie_event_t event,
  355. uint32_t data_type);
  356. /**
  357. * Return the reply
  358. * @param c The connection
  359. * @param cookie The cookie
  360. * @param e The xcb_generic_error_t supplied
  361. *
  362. * Returns the reply of the request asked by
  363. *
  364. * The parameter @p e supplied to this function must be NULL if
  365. * xcb_xevie_send_unchecked(). is used.
  366. * Otherwise, it stores the error if any.
  367. *
  368. * The returned value must be freed by the caller using free().
  369. */
  370. xcb_xevie_send_reply_t *
  371. xcb_xevie_send_reply (xcb_connection_t *c,
  372. xcb_xevie_send_cookie_t cookie /**< */,
  373. xcb_generic_error_t **e);
  374. /**
  375. *
  376. * @param c The connection
  377. * @return A cookie
  378. *
  379. * Delivers a request to the X server.
  380. *
  381. */
  382. xcb_xevie_select_input_cookie_t
  383. xcb_xevie_select_input (xcb_connection_t *c,
  384. uint32_t event_mask);
  385. /**
  386. *
  387. * @param c The connection
  388. * @return A cookie
  389. *
  390. * Delivers a request to the X server.
  391. *
  392. * This form can be used only if the request will cause
  393. * a reply to be generated. Any returned error will be
  394. * placed in the event queue.
  395. */
  396. xcb_xevie_select_input_cookie_t
  397. xcb_xevie_select_input_unchecked (xcb_connection_t *c,
  398. uint32_t event_mask);
  399. /**
  400. * Return the reply
  401. * @param c The connection
  402. * @param cookie The cookie
  403. * @param e The xcb_generic_error_t supplied
  404. *
  405. * Returns the reply of the request asked by
  406. *
  407. * The parameter @p e supplied to this function must be NULL if
  408. * xcb_xevie_select_input_unchecked(). is used.
  409. * Otherwise, it stores the error if any.
  410. *
  411. * The returned value must be freed by the caller using free().
  412. */
  413. xcb_xevie_select_input_reply_t *
  414. xcb_xevie_select_input_reply (xcb_connection_t *c,
  415. xcb_xevie_select_input_cookie_t cookie /**< */,
  416. xcb_generic_error_t **e);
  417. #ifdef __cplusplus
  418. }
  419. #endif
  420. #endif
  421. /**
  422. * @}
  423. */