damage.h 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. /*
  2. * This file generated automatically from damage.xml by c_client.py.
  3. * Edit at your peril.
  4. */
  5. /**
  6. * @defgroup XCB_Damage_API XCB Damage API
  7. * @brief Damage XCB Protocol Implementation.
  8. * @{
  9. **/
  10. #ifndef __DAMAGE_H
  11. #define __DAMAGE_H
  12. #include "xcb.h"
  13. #include "xproto.h"
  14. #include "xfixes.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #define XCB_DAMAGE_MAJOR_VERSION 1
  19. #define XCB_DAMAGE_MINOR_VERSION 1
  20. extern xcb_extension_t xcb_damage_id;
  21. typedef uint32_t xcb_damage_damage_t;
  22. /**
  23. * @brief xcb_damage_damage_iterator_t
  24. **/
  25. typedef struct xcb_damage_damage_iterator_t {
  26. xcb_damage_damage_t *data;
  27. int rem;
  28. int index;
  29. } xcb_damage_damage_iterator_t;
  30. typedef enum xcb_damage_report_level_t {
  31. XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES = 0,
  32. XCB_DAMAGE_REPORT_LEVEL_DELTA_RECTANGLES = 1,
  33. XCB_DAMAGE_REPORT_LEVEL_BOUNDING_BOX = 2,
  34. XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY = 3
  35. } xcb_damage_report_level_t;
  36. /** Opcode for xcb_damage_bad_damage. */
  37. #define XCB_DAMAGE_BAD_DAMAGE 0
  38. /**
  39. * @brief xcb_damage_bad_damage_error_t
  40. **/
  41. typedef struct xcb_damage_bad_damage_error_t {
  42. uint8_t response_type;
  43. uint8_t error_code;
  44. uint16_t sequence;
  45. } xcb_damage_bad_damage_error_t;
  46. /**
  47. * @brief xcb_damage_query_version_cookie_t
  48. **/
  49. typedef struct xcb_damage_query_version_cookie_t {
  50. unsigned int sequence;
  51. } xcb_damage_query_version_cookie_t;
  52. /** Opcode for xcb_damage_query_version. */
  53. #define XCB_DAMAGE_QUERY_VERSION 0
  54. /**
  55. * @brief xcb_damage_query_version_request_t
  56. **/
  57. typedef struct xcb_damage_query_version_request_t {
  58. uint8_t major_opcode;
  59. uint8_t minor_opcode;
  60. uint16_t length;
  61. uint32_t client_major_version;
  62. uint32_t client_minor_version;
  63. } xcb_damage_query_version_request_t;
  64. /**
  65. * @brief xcb_damage_query_version_reply_t
  66. **/
  67. typedef struct xcb_damage_query_version_reply_t {
  68. uint8_t response_type;
  69. uint8_t pad0;
  70. uint16_t sequence;
  71. uint32_t length;
  72. uint32_t major_version;
  73. uint32_t minor_version;
  74. uint8_t pad1[16];
  75. } xcb_damage_query_version_reply_t;
  76. /** Opcode for xcb_damage_create. */
  77. #define XCB_DAMAGE_CREATE 1
  78. /**
  79. * @brief xcb_damage_create_request_t
  80. **/
  81. typedef struct xcb_damage_create_request_t {
  82. uint8_t major_opcode;
  83. uint8_t minor_opcode;
  84. uint16_t length;
  85. xcb_damage_damage_t damage;
  86. xcb_drawable_t drawable;
  87. uint8_t level;
  88. uint8_t pad0[3];
  89. } xcb_damage_create_request_t;
  90. /** Opcode for xcb_damage_destroy. */
  91. #define XCB_DAMAGE_DESTROY 2
  92. /**
  93. * @brief xcb_damage_destroy_request_t
  94. **/
  95. typedef struct xcb_damage_destroy_request_t {
  96. uint8_t major_opcode;
  97. uint8_t minor_opcode;
  98. uint16_t length;
  99. xcb_damage_damage_t damage;
  100. } xcb_damage_destroy_request_t;
  101. /** Opcode for xcb_damage_subtract. */
  102. #define XCB_DAMAGE_SUBTRACT 3
  103. /**
  104. * @brief xcb_damage_subtract_request_t
  105. **/
  106. typedef struct xcb_damage_subtract_request_t {
  107. uint8_t major_opcode;
  108. uint8_t minor_opcode;
  109. uint16_t length;
  110. xcb_damage_damage_t damage;
  111. xcb_xfixes_region_t repair;
  112. xcb_xfixes_region_t parts;
  113. } xcb_damage_subtract_request_t;
  114. /** Opcode for xcb_damage_add. */
  115. #define XCB_DAMAGE_ADD 4
  116. /**
  117. * @brief xcb_damage_add_request_t
  118. **/
  119. typedef struct xcb_damage_add_request_t {
  120. uint8_t major_opcode;
  121. uint8_t minor_opcode;
  122. uint16_t length;
  123. xcb_drawable_t drawable;
  124. xcb_xfixes_region_t region;
  125. } xcb_damage_add_request_t;
  126. /** Opcode for xcb_damage_notify. */
  127. #define XCB_DAMAGE_NOTIFY 0
  128. /**
  129. * @brief xcb_damage_notify_event_t
  130. **/
  131. typedef struct xcb_damage_notify_event_t {
  132. uint8_t response_type;
  133. uint8_t level;
  134. uint16_t sequence;
  135. xcb_drawable_t drawable;
  136. xcb_damage_damage_t damage;
  137. xcb_timestamp_t timestamp;
  138. xcb_rectangle_t area;
  139. xcb_rectangle_t geometry;
  140. } xcb_damage_notify_event_t;
  141. /**
  142. * Get the next element of the iterator
  143. * @param i Pointer to a xcb_damage_damage_iterator_t
  144. *
  145. * Get the next element in the iterator. The member rem is
  146. * decreased by one. The member data points to the next
  147. * element. The member index is increased by sizeof(xcb_damage_damage_t)
  148. */
  149. void
  150. xcb_damage_damage_next (xcb_damage_damage_iterator_t *i);
  151. /**
  152. * Return the iterator pointing to the last element
  153. * @param i An xcb_damage_damage_iterator_t
  154. * @return The iterator pointing to the last element
  155. *
  156. * Set the current element in the iterator to the last element.
  157. * The member rem is set to 0. The member data points to the
  158. * last element.
  159. */
  160. xcb_generic_iterator_t
  161. xcb_damage_damage_end (xcb_damage_damage_iterator_t i);
  162. /**
  163. *
  164. * @param c The connection
  165. * @return A cookie
  166. *
  167. * Delivers a request to the X server.
  168. *
  169. */
  170. xcb_damage_query_version_cookie_t
  171. xcb_damage_query_version (xcb_connection_t *c,
  172. uint32_t client_major_version,
  173. uint32_t client_minor_version);
  174. /**
  175. *
  176. * @param c The connection
  177. * @return A cookie
  178. *
  179. * Delivers a request to the X server.
  180. *
  181. * This form can be used only if the request will cause
  182. * a reply to be generated. Any returned error will be
  183. * placed in the event queue.
  184. */
  185. xcb_damage_query_version_cookie_t
  186. xcb_damage_query_version_unchecked (xcb_connection_t *c,
  187. uint32_t client_major_version,
  188. uint32_t client_minor_version);
  189. /**
  190. * Return the reply
  191. * @param c The connection
  192. * @param cookie The cookie
  193. * @param e The xcb_generic_error_t supplied
  194. *
  195. * Returns the reply of the request asked by
  196. *
  197. * The parameter @p e supplied to this function must be NULL if
  198. * xcb_damage_query_version_unchecked(). is used.
  199. * Otherwise, it stores the error if any.
  200. *
  201. * The returned value must be freed by the caller using free().
  202. */
  203. xcb_damage_query_version_reply_t *
  204. xcb_damage_query_version_reply (xcb_connection_t *c,
  205. xcb_damage_query_version_cookie_t cookie /**< */,
  206. xcb_generic_error_t **e);
  207. /**
  208. *
  209. * @param c The connection
  210. * @return A cookie
  211. *
  212. * Delivers a request to the X server.
  213. *
  214. * This form can be used only if the request will not cause
  215. * a reply to be generated. Any returned error will be
  216. * saved for handling by xcb_request_check().
  217. */
  218. xcb_void_cookie_t
  219. xcb_damage_create_checked (xcb_connection_t *c,
  220. xcb_damage_damage_t damage,
  221. xcb_drawable_t drawable,
  222. uint8_t level);
  223. /**
  224. *
  225. * @param c The connection
  226. * @return A cookie
  227. *
  228. * Delivers a request to the X server.
  229. *
  230. */
  231. xcb_void_cookie_t
  232. xcb_damage_create (xcb_connection_t *c,
  233. xcb_damage_damage_t damage,
  234. xcb_drawable_t drawable,
  235. uint8_t level);
  236. /**
  237. *
  238. * @param c The connection
  239. * @return A cookie
  240. *
  241. * Delivers a request to the X server.
  242. *
  243. * This form can be used only if the request will not cause
  244. * a reply to be generated. Any returned error will be
  245. * saved for handling by xcb_request_check().
  246. */
  247. xcb_void_cookie_t
  248. xcb_damage_destroy_checked (xcb_connection_t *c,
  249. xcb_damage_damage_t damage);
  250. /**
  251. *
  252. * @param c The connection
  253. * @return A cookie
  254. *
  255. * Delivers a request to the X server.
  256. *
  257. */
  258. xcb_void_cookie_t
  259. xcb_damage_destroy (xcb_connection_t *c,
  260. xcb_damage_damage_t damage);
  261. /**
  262. *
  263. * @param c The connection
  264. * @return A cookie
  265. *
  266. * Delivers a request to the X server.
  267. *
  268. * This form can be used only if the request will not cause
  269. * a reply to be generated. Any returned error will be
  270. * saved for handling by xcb_request_check().
  271. */
  272. xcb_void_cookie_t
  273. xcb_damage_subtract_checked (xcb_connection_t *c,
  274. xcb_damage_damage_t damage,
  275. xcb_xfixes_region_t repair,
  276. xcb_xfixes_region_t parts);
  277. /**
  278. *
  279. * @param c The connection
  280. * @return A cookie
  281. *
  282. * Delivers a request to the X server.
  283. *
  284. */
  285. xcb_void_cookie_t
  286. xcb_damage_subtract (xcb_connection_t *c,
  287. xcb_damage_damage_t damage,
  288. xcb_xfixes_region_t repair,
  289. xcb_xfixes_region_t parts);
  290. /**
  291. *
  292. * @param c The connection
  293. * @return A cookie
  294. *
  295. * Delivers a request to the X server.
  296. *
  297. * This form can be used only if the request will not cause
  298. * a reply to be generated. Any returned error will be
  299. * saved for handling by xcb_request_check().
  300. */
  301. xcb_void_cookie_t
  302. xcb_damage_add_checked (xcb_connection_t *c,
  303. xcb_drawable_t drawable,
  304. xcb_xfixes_region_t region);
  305. /**
  306. *
  307. * @param c The connection
  308. * @return A cookie
  309. *
  310. * Delivers a request to the X server.
  311. *
  312. */
  313. xcb_void_cookie_t
  314. xcb_damage_add (xcb_connection_t *c,
  315. xcb_drawable_t drawable,
  316. xcb_xfixes_region_t region);
  317. #ifdef __cplusplus
  318. }
  319. #endif
  320. #endif
  321. /**
  322. * @}
  323. */