xtest.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. /*
  2. * This file generated automatically from xtest.xml by c_client.py.
  3. * Edit at your peril.
  4. */
  5. /**
  6. * @defgroup XCB_Test_API XCB Test API
  7. * @brief Test XCB Protocol Implementation.
  8. * @{
  9. **/
  10. #ifndef __XTEST_H
  11. #define __XTEST_H
  12. #include "xcb.h"
  13. #include "xproto.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define XCB_TEST_MAJOR_VERSION 2
  18. #define XCB_TEST_MINOR_VERSION 2
  19. extern xcb_extension_t xcb_test_id;
  20. /**
  21. * @brief xcb_test_get_version_cookie_t
  22. **/
  23. typedef struct xcb_test_get_version_cookie_t {
  24. unsigned int sequence;
  25. } xcb_test_get_version_cookie_t;
  26. /** Opcode for xcb_test_get_version. */
  27. #define XCB_TEST_GET_VERSION 0
  28. /**
  29. * @brief xcb_test_get_version_request_t
  30. **/
  31. typedef struct xcb_test_get_version_request_t {
  32. uint8_t major_opcode;
  33. uint8_t minor_opcode;
  34. uint16_t length;
  35. uint8_t major_version;
  36. uint8_t pad0;
  37. uint16_t minor_version;
  38. } xcb_test_get_version_request_t;
  39. /**
  40. * @brief xcb_test_get_version_reply_t
  41. **/
  42. typedef struct xcb_test_get_version_reply_t {
  43. uint8_t response_type;
  44. uint8_t major_version;
  45. uint16_t sequence;
  46. uint32_t length;
  47. uint16_t minor_version;
  48. } xcb_test_get_version_reply_t;
  49. typedef enum xcb_test_cursor_t {
  50. XCB_TEST_CURSOR_NONE = 0,
  51. XCB_TEST_CURSOR_CURRENT = 1
  52. } xcb_test_cursor_t;
  53. /**
  54. * @brief xcb_test_compare_cursor_cookie_t
  55. **/
  56. typedef struct xcb_test_compare_cursor_cookie_t {
  57. unsigned int sequence;
  58. } xcb_test_compare_cursor_cookie_t;
  59. /** Opcode for xcb_test_compare_cursor. */
  60. #define XCB_TEST_COMPARE_CURSOR 1
  61. /**
  62. * @brief xcb_test_compare_cursor_request_t
  63. **/
  64. typedef struct xcb_test_compare_cursor_request_t {
  65. uint8_t major_opcode;
  66. uint8_t minor_opcode;
  67. uint16_t length;
  68. xcb_window_t window;
  69. xcb_cursor_t cursor;
  70. } xcb_test_compare_cursor_request_t;
  71. /**
  72. * @brief xcb_test_compare_cursor_reply_t
  73. **/
  74. typedef struct xcb_test_compare_cursor_reply_t {
  75. uint8_t response_type;
  76. uint8_t same;
  77. uint16_t sequence;
  78. uint32_t length;
  79. } xcb_test_compare_cursor_reply_t;
  80. /** Opcode for xcb_test_fake_input. */
  81. #define XCB_TEST_FAKE_INPUT 2
  82. /**
  83. * @brief xcb_test_fake_input_request_t
  84. **/
  85. typedef struct xcb_test_fake_input_request_t {
  86. uint8_t major_opcode;
  87. uint8_t minor_opcode;
  88. uint16_t length;
  89. uint8_t type;
  90. uint8_t detail;
  91. uint8_t pad0[2];
  92. uint32_t time;
  93. xcb_window_t root;
  94. uint8_t pad1[8];
  95. int16_t rootX;
  96. int16_t rootY;
  97. uint8_t pad2[7];
  98. uint8_t deviceid;
  99. } xcb_test_fake_input_request_t;
  100. /** Opcode for xcb_test_grab_control. */
  101. #define XCB_TEST_GRAB_CONTROL 3
  102. /**
  103. * @brief xcb_test_grab_control_request_t
  104. **/
  105. typedef struct xcb_test_grab_control_request_t {
  106. uint8_t major_opcode;
  107. uint8_t minor_opcode;
  108. uint16_t length;
  109. uint8_t impervious;
  110. uint8_t pad0[3];
  111. } xcb_test_grab_control_request_t;
  112. /**
  113. *
  114. * @param c The connection
  115. * @return A cookie
  116. *
  117. * Delivers a request to the X server.
  118. *
  119. */
  120. xcb_test_get_version_cookie_t
  121. xcb_test_get_version (xcb_connection_t *c,
  122. uint8_t major_version,
  123. uint16_t minor_version);
  124. /**
  125. *
  126. * @param c The connection
  127. * @return A cookie
  128. *
  129. * Delivers a request to the X server.
  130. *
  131. * This form can be used only if the request will cause
  132. * a reply to be generated. Any returned error will be
  133. * placed in the event queue.
  134. */
  135. xcb_test_get_version_cookie_t
  136. xcb_test_get_version_unchecked (xcb_connection_t *c,
  137. uint8_t major_version,
  138. uint16_t minor_version);
  139. /**
  140. * Return the reply
  141. * @param c The connection
  142. * @param cookie The cookie
  143. * @param e The xcb_generic_error_t supplied
  144. *
  145. * Returns the reply of the request asked by
  146. *
  147. * The parameter @p e supplied to this function must be NULL if
  148. * xcb_test_get_version_unchecked(). is used.
  149. * Otherwise, it stores the error if any.
  150. *
  151. * The returned value must be freed by the caller using free().
  152. */
  153. xcb_test_get_version_reply_t *
  154. xcb_test_get_version_reply (xcb_connection_t *c,
  155. xcb_test_get_version_cookie_t cookie /**< */,
  156. xcb_generic_error_t **e);
  157. /**
  158. *
  159. * @param c The connection
  160. * @return A cookie
  161. *
  162. * Delivers a request to the X server.
  163. *
  164. */
  165. xcb_test_compare_cursor_cookie_t
  166. xcb_test_compare_cursor (xcb_connection_t *c,
  167. xcb_window_t window,
  168. xcb_cursor_t cursor);
  169. /**
  170. *
  171. * @param c The connection
  172. * @return A cookie
  173. *
  174. * Delivers a request to the X server.
  175. *
  176. * This form can be used only if the request will cause
  177. * a reply to be generated. Any returned error will be
  178. * placed in the event queue.
  179. */
  180. xcb_test_compare_cursor_cookie_t
  181. xcb_test_compare_cursor_unchecked (xcb_connection_t *c,
  182. xcb_window_t window,
  183. xcb_cursor_t cursor);
  184. /**
  185. * Return the reply
  186. * @param c The connection
  187. * @param cookie The cookie
  188. * @param e The xcb_generic_error_t supplied
  189. *
  190. * Returns the reply of the request asked by
  191. *
  192. * The parameter @p e supplied to this function must be NULL if
  193. * xcb_test_compare_cursor_unchecked(). is used.
  194. * Otherwise, it stores the error if any.
  195. *
  196. * The returned value must be freed by the caller using free().
  197. */
  198. xcb_test_compare_cursor_reply_t *
  199. xcb_test_compare_cursor_reply (xcb_connection_t *c,
  200. xcb_test_compare_cursor_cookie_t cookie /**< */,
  201. xcb_generic_error_t **e);
  202. /**
  203. *
  204. * @param c The connection
  205. * @return A cookie
  206. *
  207. * Delivers a request to the X server.
  208. *
  209. * This form can be used only if the request will not cause
  210. * a reply to be generated. Any returned error will be
  211. * saved for handling by xcb_request_check().
  212. */
  213. xcb_void_cookie_t
  214. xcb_test_fake_input_checked (xcb_connection_t *c,
  215. uint8_t type,
  216. uint8_t detail,
  217. uint32_t time,
  218. xcb_window_t root,
  219. int16_t rootX,
  220. int16_t rootY,
  221. uint8_t deviceid);
  222. /**
  223. *
  224. * @param c The connection
  225. * @return A cookie
  226. *
  227. * Delivers a request to the X server.
  228. *
  229. */
  230. xcb_void_cookie_t
  231. xcb_test_fake_input (xcb_connection_t *c,
  232. uint8_t type,
  233. uint8_t detail,
  234. uint32_t time,
  235. xcb_window_t root,
  236. int16_t rootX,
  237. int16_t rootY,
  238. uint8_t deviceid);
  239. /**
  240. *
  241. * @param c The connection
  242. * @return A cookie
  243. *
  244. * Delivers a request to the X server.
  245. *
  246. * This form can be used only if the request will not cause
  247. * a reply to be generated. Any returned error will be
  248. * saved for handling by xcb_request_check().
  249. */
  250. xcb_void_cookie_t
  251. xcb_test_grab_control_checked (xcb_connection_t *c,
  252. uint8_t impervious);
  253. /**
  254. *
  255. * @param c The connection
  256. * @return A cookie
  257. *
  258. * Delivers a request to the X server.
  259. *
  260. */
  261. xcb_void_cookie_t
  262. xcb_test_grab_control (xcb_connection_t *c,
  263. uint8_t impervious);
  264. #ifdef __cplusplus
  265. }
  266. #endif
  267. #endif
  268. /**
  269. * @}
  270. */