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