annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/xcb/damage.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /*
jpayne@69 2 * This file generated automatically from damage.xml by c_client.py.
jpayne@69 3 * Edit at your peril.
jpayne@69 4 */
jpayne@69 5
jpayne@69 6 /**
jpayne@69 7 * @defgroup XCB_Damage_API XCB Damage API
jpayne@69 8 * @brief Damage XCB Protocol Implementation.
jpayne@69 9 * @{
jpayne@69 10 **/
jpayne@69 11
jpayne@69 12 #ifndef __DAMAGE_H
jpayne@69 13 #define __DAMAGE_H
jpayne@69 14
jpayne@69 15 #include "xcb.h"
jpayne@69 16 #include "xproto.h"
jpayne@69 17 #include "xfixes.h"
jpayne@69 18
jpayne@69 19 #ifdef __cplusplus
jpayne@69 20 extern "C" {
jpayne@69 21 #endif
jpayne@69 22
jpayne@69 23 #define XCB_DAMAGE_MAJOR_VERSION 1
jpayne@69 24 #define XCB_DAMAGE_MINOR_VERSION 1
jpayne@69 25
jpayne@69 26 extern xcb_extension_t xcb_damage_id;
jpayne@69 27
jpayne@69 28 typedef uint32_t xcb_damage_damage_t;
jpayne@69 29
jpayne@69 30 /**
jpayne@69 31 * @brief xcb_damage_damage_iterator_t
jpayne@69 32 **/
jpayne@69 33 typedef struct xcb_damage_damage_iterator_t {
jpayne@69 34 xcb_damage_damage_t *data;
jpayne@69 35 int rem;
jpayne@69 36 int index;
jpayne@69 37 } xcb_damage_damage_iterator_t;
jpayne@69 38
jpayne@69 39 typedef enum xcb_damage_report_level_t {
jpayne@69 40 XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES = 0,
jpayne@69 41 XCB_DAMAGE_REPORT_LEVEL_DELTA_RECTANGLES = 1,
jpayne@69 42 XCB_DAMAGE_REPORT_LEVEL_BOUNDING_BOX = 2,
jpayne@69 43 XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY = 3
jpayne@69 44 } xcb_damage_report_level_t;
jpayne@69 45
jpayne@69 46 /** Opcode for xcb_damage_bad_damage. */
jpayne@69 47 #define XCB_DAMAGE_BAD_DAMAGE 0
jpayne@69 48
jpayne@69 49 /**
jpayne@69 50 * @brief xcb_damage_bad_damage_error_t
jpayne@69 51 **/
jpayne@69 52 typedef struct xcb_damage_bad_damage_error_t {
jpayne@69 53 uint8_t response_type;
jpayne@69 54 uint8_t error_code;
jpayne@69 55 uint16_t sequence;
jpayne@69 56 uint32_t bad_value;
jpayne@69 57 uint16_t minor_opcode;
jpayne@69 58 uint8_t major_opcode;
jpayne@69 59 } xcb_damage_bad_damage_error_t;
jpayne@69 60
jpayne@69 61 /**
jpayne@69 62 * @brief xcb_damage_query_version_cookie_t
jpayne@69 63 **/
jpayne@69 64 typedef struct xcb_damage_query_version_cookie_t {
jpayne@69 65 unsigned int sequence;
jpayne@69 66 } xcb_damage_query_version_cookie_t;
jpayne@69 67
jpayne@69 68 /** Opcode for xcb_damage_query_version. */
jpayne@69 69 #define XCB_DAMAGE_QUERY_VERSION 0
jpayne@69 70
jpayne@69 71 /**
jpayne@69 72 * @brief xcb_damage_query_version_request_t
jpayne@69 73 **/
jpayne@69 74 typedef struct xcb_damage_query_version_request_t {
jpayne@69 75 uint8_t major_opcode;
jpayne@69 76 uint8_t minor_opcode;
jpayne@69 77 uint16_t length;
jpayne@69 78 uint32_t client_major_version;
jpayne@69 79 uint32_t client_minor_version;
jpayne@69 80 } xcb_damage_query_version_request_t;
jpayne@69 81
jpayne@69 82 /**
jpayne@69 83 * @brief xcb_damage_query_version_reply_t
jpayne@69 84 **/
jpayne@69 85 typedef struct xcb_damage_query_version_reply_t {
jpayne@69 86 uint8_t response_type;
jpayne@69 87 uint8_t pad0;
jpayne@69 88 uint16_t sequence;
jpayne@69 89 uint32_t length;
jpayne@69 90 uint32_t major_version;
jpayne@69 91 uint32_t minor_version;
jpayne@69 92 uint8_t pad1[16];
jpayne@69 93 } xcb_damage_query_version_reply_t;
jpayne@69 94
jpayne@69 95 /** Opcode for xcb_damage_create. */
jpayne@69 96 #define XCB_DAMAGE_CREATE 1
jpayne@69 97
jpayne@69 98 /**
jpayne@69 99 * @brief xcb_damage_create_request_t
jpayne@69 100 **/
jpayne@69 101 typedef struct xcb_damage_create_request_t {
jpayne@69 102 uint8_t major_opcode;
jpayne@69 103 uint8_t minor_opcode;
jpayne@69 104 uint16_t length;
jpayne@69 105 xcb_damage_damage_t damage;
jpayne@69 106 xcb_drawable_t drawable;
jpayne@69 107 uint8_t level;
jpayne@69 108 uint8_t pad0[3];
jpayne@69 109 } xcb_damage_create_request_t;
jpayne@69 110
jpayne@69 111 /** Opcode for xcb_damage_destroy. */
jpayne@69 112 #define XCB_DAMAGE_DESTROY 2
jpayne@69 113
jpayne@69 114 /**
jpayne@69 115 * @brief xcb_damage_destroy_request_t
jpayne@69 116 **/
jpayne@69 117 typedef struct xcb_damage_destroy_request_t {
jpayne@69 118 uint8_t major_opcode;
jpayne@69 119 uint8_t minor_opcode;
jpayne@69 120 uint16_t length;
jpayne@69 121 xcb_damage_damage_t damage;
jpayne@69 122 } xcb_damage_destroy_request_t;
jpayne@69 123
jpayne@69 124 /** Opcode for xcb_damage_subtract. */
jpayne@69 125 #define XCB_DAMAGE_SUBTRACT 3
jpayne@69 126
jpayne@69 127 /**
jpayne@69 128 * @brief xcb_damage_subtract_request_t
jpayne@69 129 **/
jpayne@69 130 typedef struct xcb_damage_subtract_request_t {
jpayne@69 131 uint8_t major_opcode;
jpayne@69 132 uint8_t minor_opcode;
jpayne@69 133 uint16_t length;
jpayne@69 134 xcb_damage_damage_t damage;
jpayne@69 135 xcb_xfixes_region_t repair;
jpayne@69 136 xcb_xfixes_region_t parts;
jpayne@69 137 } xcb_damage_subtract_request_t;
jpayne@69 138
jpayne@69 139 /** Opcode for xcb_damage_add. */
jpayne@69 140 #define XCB_DAMAGE_ADD 4
jpayne@69 141
jpayne@69 142 /**
jpayne@69 143 * @brief xcb_damage_add_request_t
jpayne@69 144 **/
jpayne@69 145 typedef struct xcb_damage_add_request_t {
jpayne@69 146 uint8_t major_opcode;
jpayne@69 147 uint8_t minor_opcode;
jpayne@69 148 uint16_t length;
jpayne@69 149 xcb_drawable_t drawable;
jpayne@69 150 xcb_xfixes_region_t region;
jpayne@69 151 } xcb_damage_add_request_t;
jpayne@69 152
jpayne@69 153 /** Opcode for xcb_damage_notify. */
jpayne@69 154 #define XCB_DAMAGE_NOTIFY 0
jpayne@69 155
jpayne@69 156 /**
jpayne@69 157 * @brief xcb_damage_notify_event_t
jpayne@69 158 **/
jpayne@69 159 typedef struct xcb_damage_notify_event_t {
jpayne@69 160 uint8_t response_type;
jpayne@69 161 uint8_t level;
jpayne@69 162 uint16_t sequence;
jpayne@69 163 xcb_drawable_t drawable;
jpayne@69 164 xcb_damage_damage_t damage;
jpayne@69 165 xcb_timestamp_t timestamp;
jpayne@69 166 xcb_rectangle_t area;
jpayne@69 167 xcb_rectangle_t geometry;
jpayne@69 168 } xcb_damage_notify_event_t;
jpayne@69 169
jpayne@69 170 /**
jpayne@69 171 * Get the next element of the iterator
jpayne@69 172 * @param i Pointer to a xcb_damage_damage_iterator_t
jpayne@69 173 *
jpayne@69 174 * Get the next element in the iterator. The member rem is
jpayne@69 175 * decreased by one. The member data points to the next
jpayne@69 176 * element. The member index is increased by sizeof(xcb_damage_damage_t)
jpayne@69 177 */
jpayne@69 178 void
jpayne@69 179 xcb_damage_damage_next (xcb_damage_damage_iterator_t *i);
jpayne@69 180
jpayne@69 181 /**
jpayne@69 182 * Return the iterator pointing to the last element
jpayne@69 183 * @param i An xcb_damage_damage_iterator_t
jpayne@69 184 * @return The iterator pointing to the last element
jpayne@69 185 *
jpayne@69 186 * Set the current element in the iterator to the last element.
jpayne@69 187 * The member rem is set to 0. The member data points to the
jpayne@69 188 * last element.
jpayne@69 189 */
jpayne@69 190 xcb_generic_iterator_t
jpayne@69 191 xcb_damage_damage_end (xcb_damage_damage_iterator_t i);
jpayne@69 192
jpayne@69 193 /**
jpayne@69 194 * @brief Negotiate the version of the DAMAGE extension
jpayne@69 195 *
jpayne@69 196 * @param c The connection
jpayne@69 197 * @param client_major_version The major version supported by the client.
jpayne@69 198 * @param client_minor_version The minor version supported by the client.
jpayne@69 199 * @return A cookie
jpayne@69 200 *
jpayne@69 201 * This negotiates the version of the DAMAGE extension. It must precede any other
jpayne@69 202 * request using the DAMAGE extension. Failure to do so will cause a BadRequest
jpayne@69 203 * error for those requests.
jpayne@69 204 *
jpayne@69 205 */
jpayne@69 206 xcb_damage_query_version_cookie_t
jpayne@69 207 xcb_damage_query_version (xcb_connection_t *c,
jpayne@69 208 uint32_t client_major_version,
jpayne@69 209 uint32_t client_minor_version);
jpayne@69 210
jpayne@69 211 /**
jpayne@69 212 * @brief Negotiate the version of the DAMAGE extension
jpayne@69 213 *
jpayne@69 214 * @param c The connection
jpayne@69 215 * @param client_major_version The major version supported by the client.
jpayne@69 216 * @param client_minor_version The minor version supported by the client.
jpayne@69 217 * @return A cookie
jpayne@69 218 *
jpayne@69 219 * This negotiates the version of the DAMAGE extension. It must precede any other
jpayne@69 220 * request using the DAMAGE extension. Failure to do so will cause a BadRequest
jpayne@69 221 * error for those requests.
jpayne@69 222 *
jpayne@69 223 * This form can be used only if the request will cause
jpayne@69 224 * a reply to be generated. Any returned error will be
jpayne@69 225 * placed in the event queue.
jpayne@69 226 */
jpayne@69 227 xcb_damage_query_version_cookie_t
jpayne@69 228 xcb_damage_query_version_unchecked (xcb_connection_t *c,
jpayne@69 229 uint32_t client_major_version,
jpayne@69 230 uint32_t client_minor_version);
jpayne@69 231
jpayne@69 232 /**
jpayne@69 233 * Return the reply
jpayne@69 234 * @param c The connection
jpayne@69 235 * @param cookie The cookie
jpayne@69 236 * @param e The xcb_generic_error_t supplied
jpayne@69 237 *
jpayne@69 238 * Returns the reply of the request asked by
jpayne@69 239 *
jpayne@69 240 * The parameter @p e supplied to this function must be NULL if
jpayne@69 241 * xcb_damage_query_version_unchecked(). is used.
jpayne@69 242 * Otherwise, it stores the error if any.
jpayne@69 243 *
jpayne@69 244 * The returned value must be freed by the caller using free().
jpayne@69 245 */
jpayne@69 246 xcb_damage_query_version_reply_t *
jpayne@69 247 xcb_damage_query_version_reply (xcb_connection_t *c,
jpayne@69 248 xcb_damage_query_version_cookie_t cookie /**< */,
jpayne@69 249 xcb_generic_error_t **e);
jpayne@69 250
jpayne@69 251 /**
jpayne@69 252 * @brief Creates a Damage object to monitor changes to a drawable.
jpayne@69 253 *
jpayne@69 254 * @param c The connection
jpayne@69 255 * @param damage The ID with which you will refer to the new Damage object, created by
jpayne@69 256 * `xcb_generate_id`.
jpayne@69 257 * @param drawable The ID of the drawable to be monitored.
jpayne@69 258 * @param level A bitmask of #xcb_damage_report_level_t values.
jpayne@69 259 * @param level The level of detail to be provided in Damage events.
jpayne@69 260 * @return A cookie
jpayne@69 261 *
jpayne@69 262 * This creates a Damage object to monitor changes to a drawable, and specifies
jpayne@69 263 * the level of detail to be reported for changes.
jpayne@69 264 *
jpayne@69 265 * We call changes made to pixel contents of windows and pixmaps 'damage'
jpayne@69 266 * throughout this extension.
jpayne@69 267 *
jpayne@69 268 * Damage accumulates as drawing occurs in the drawable. Each drawing operation
jpayne@69 269 * 'damages' one or more rectangular areas within the drawable. The rectangles
jpayne@69 270 * are guaranteed to include the set of pixels modified by each operation, but
jpayne@69 271 * may include significantly more than just those pixels. The desire is for
jpayne@69 272 * the damage to strike a balance between the number of rectangles reported and
jpayne@69 273 * the extraneous area included. A reasonable goal is for each primitive
jpayne@69 274 * object drawn (line, string, rectangle) to be represented as a single
jpayne@69 275 * rectangle and for the damage area of the operation to be the union of these
jpayne@69 276 * rectangles.
jpayne@69 277 *
jpayne@69 278 * The DAMAGE extension allows applications to either receive the raw
jpayne@69 279 * rectangles as a stream of events, or to have them partially processed within
jpayne@69 280 * the X server to reduce the amount of data transmitted as well as reduce the
jpayne@69 281 * processing latency once the repaint operation has started.
jpayne@69 282 *
jpayne@69 283 * The Damage object holds any accumulated damage region and reflects the
jpayne@69 284 * relationship between the drawable selected for damage notification and the
jpayne@69 285 * drawable for which damage is tracked.
jpayne@69 286 *
jpayne@69 287 * This form can be used only if the request will not cause
jpayne@69 288 * a reply to be generated. Any returned error will be
jpayne@69 289 * saved for handling by xcb_request_check().
jpayne@69 290 */
jpayne@69 291 xcb_void_cookie_t
jpayne@69 292 xcb_damage_create_checked (xcb_connection_t *c,
jpayne@69 293 xcb_damage_damage_t damage,
jpayne@69 294 xcb_drawable_t drawable,
jpayne@69 295 uint8_t level);
jpayne@69 296
jpayne@69 297 /**
jpayne@69 298 * @brief Creates a Damage object to monitor changes to a drawable.
jpayne@69 299 *
jpayne@69 300 * @param c The connection
jpayne@69 301 * @param damage The ID with which you will refer to the new Damage object, created by
jpayne@69 302 * `xcb_generate_id`.
jpayne@69 303 * @param drawable The ID of the drawable to be monitored.
jpayne@69 304 * @param level A bitmask of #xcb_damage_report_level_t values.
jpayne@69 305 * @param level The level of detail to be provided in Damage events.
jpayne@69 306 * @return A cookie
jpayne@69 307 *
jpayne@69 308 * This creates a Damage object to monitor changes to a drawable, and specifies
jpayne@69 309 * the level of detail to be reported for changes.
jpayne@69 310 *
jpayne@69 311 * We call changes made to pixel contents of windows and pixmaps 'damage'
jpayne@69 312 * throughout this extension.
jpayne@69 313 *
jpayne@69 314 * Damage accumulates as drawing occurs in the drawable. Each drawing operation
jpayne@69 315 * 'damages' one or more rectangular areas within the drawable. The rectangles
jpayne@69 316 * are guaranteed to include the set of pixels modified by each operation, but
jpayne@69 317 * may include significantly more than just those pixels. The desire is for
jpayne@69 318 * the damage to strike a balance between the number of rectangles reported and
jpayne@69 319 * the extraneous area included. A reasonable goal is for each primitive
jpayne@69 320 * object drawn (line, string, rectangle) to be represented as a single
jpayne@69 321 * rectangle and for the damage area of the operation to be the union of these
jpayne@69 322 * rectangles.
jpayne@69 323 *
jpayne@69 324 * The DAMAGE extension allows applications to either receive the raw
jpayne@69 325 * rectangles as a stream of events, or to have them partially processed within
jpayne@69 326 * the X server to reduce the amount of data transmitted as well as reduce the
jpayne@69 327 * processing latency once the repaint operation has started.
jpayne@69 328 *
jpayne@69 329 * The Damage object holds any accumulated damage region and reflects the
jpayne@69 330 * relationship between the drawable selected for damage notification and the
jpayne@69 331 * drawable for which damage is tracked.
jpayne@69 332 *
jpayne@69 333 */
jpayne@69 334 xcb_void_cookie_t
jpayne@69 335 xcb_damage_create (xcb_connection_t *c,
jpayne@69 336 xcb_damage_damage_t damage,
jpayne@69 337 xcb_drawable_t drawable,
jpayne@69 338 uint8_t level);
jpayne@69 339
jpayne@69 340 /**
jpayne@69 341 * @brief Destroys a previously created Damage object.
jpayne@69 342 *
jpayne@69 343 * @param c The connection
jpayne@69 344 * @param damage The ID you provided to `xcb_create_damage`.
jpayne@69 345 * @return A cookie
jpayne@69 346 *
jpayne@69 347 * This destroys a Damage object and requests the X server stop reporting
jpayne@69 348 * the changes it was tracking.
jpayne@69 349 *
jpayne@69 350 * This form can be used only if the request will not cause
jpayne@69 351 * a reply to be generated. Any returned error will be
jpayne@69 352 * saved for handling by xcb_request_check().
jpayne@69 353 */
jpayne@69 354 xcb_void_cookie_t
jpayne@69 355 xcb_damage_destroy_checked (xcb_connection_t *c,
jpayne@69 356 xcb_damage_damage_t damage);
jpayne@69 357
jpayne@69 358 /**
jpayne@69 359 * @brief Destroys a previously created Damage object.
jpayne@69 360 *
jpayne@69 361 * @param c The connection
jpayne@69 362 * @param damage The ID you provided to `xcb_create_damage`.
jpayne@69 363 * @return A cookie
jpayne@69 364 *
jpayne@69 365 * This destroys a Damage object and requests the X server stop reporting
jpayne@69 366 * the changes it was tracking.
jpayne@69 367 *
jpayne@69 368 */
jpayne@69 369 xcb_void_cookie_t
jpayne@69 370 xcb_damage_destroy (xcb_connection_t *c,
jpayne@69 371 xcb_damage_damage_t damage);
jpayne@69 372
jpayne@69 373 /**
jpayne@69 374 * @brief Remove regions from a previously created Damage object.
jpayne@69 375 *
jpayne@69 376 * @param c The connection
jpayne@69 377 * @param damage The ID you provided to `xcb_create_damage`.
jpayne@69 378 * @return A cookie
jpayne@69 379 *
jpayne@69 380 * This updates the regions of damage recorded in a a Damage object.
jpayne@69 381 * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
jpayne@69 382 * for details.
jpayne@69 383 *
jpayne@69 384 * This form can be used only if the request will not cause
jpayne@69 385 * a reply to be generated. Any returned error will be
jpayne@69 386 * saved for handling by xcb_request_check().
jpayne@69 387 */
jpayne@69 388 xcb_void_cookie_t
jpayne@69 389 xcb_damage_subtract_checked (xcb_connection_t *c,
jpayne@69 390 xcb_damage_damage_t damage,
jpayne@69 391 xcb_xfixes_region_t repair,
jpayne@69 392 xcb_xfixes_region_t parts);
jpayne@69 393
jpayne@69 394 /**
jpayne@69 395 * @brief Remove regions from a previously created Damage object.
jpayne@69 396 *
jpayne@69 397 * @param c The connection
jpayne@69 398 * @param damage The ID you provided to `xcb_create_damage`.
jpayne@69 399 * @return A cookie
jpayne@69 400 *
jpayne@69 401 * This updates the regions of damage recorded in a a Damage object.
jpayne@69 402 * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
jpayne@69 403 * for details.
jpayne@69 404 *
jpayne@69 405 */
jpayne@69 406 xcb_void_cookie_t
jpayne@69 407 xcb_damage_subtract (xcb_connection_t *c,
jpayne@69 408 xcb_damage_damage_t damage,
jpayne@69 409 xcb_xfixes_region_t repair,
jpayne@69 410 xcb_xfixes_region_t parts);
jpayne@69 411
jpayne@69 412 /**
jpayne@69 413 * @brief Add a region to a previously created Damage object.
jpayne@69 414 *
jpayne@69 415 * @param c The connection
jpayne@69 416 * @return A cookie
jpayne@69 417 *
jpayne@69 418 * This updates the regions of damage recorded in a a Damage object.
jpayne@69 419 * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
jpayne@69 420 * for details.
jpayne@69 421 *
jpayne@69 422 * This form can be used only if the request will not cause
jpayne@69 423 * a reply to be generated. Any returned error will be
jpayne@69 424 * saved for handling by xcb_request_check().
jpayne@69 425 */
jpayne@69 426 xcb_void_cookie_t
jpayne@69 427 xcb_damage_add_checked (xcb_connection_t *c,
jpayne@69 428 xcb_drawable_t drawable,
jpayne@69 429 xcb_xfixes_region_t region);
jpayne@69 430
jpayne@69 431 /**
jpayne@69 432 * @brief Add a region to a previously created Damage object.
jpayne@69 433 *
jpayne@69 434 * @param c The connection
jpayne@69 435 * @return A cookie
jpayne@69 436 *
jpayne@69 437 * This updates the regions of damage recorded in a a Damage object.
jpayne@69 438 * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt
jpayne@69 439 * for details.
jpayne@69 440 *
jpayne@69 441 */
jpayne@69 442 xcb_void_cookie_t
jpayne@69 443 xcb_damage_add (xcb_connection_t *c,
jpayne@69 444 xcb_drawable_t drawable,
jpayne@69 445 xcb_xfixes_region_t region);
jpayne@69 446
jpayne@69 447
jpayne@69 448 #ifdef __cplusplus
jpayne@69 449 }
jpayne@69 450 #endif
jpayne@69 451
jpayne@69 452 #endif
jpayne@69 453
jpayne@69 454 /**
jpayne@69 455 * @}
jpayne@69 456 */