00001
00002
00003
00004
00005
00012 #ifndef __DAMAGE_H
00013 #define __DAMAGE_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017 #include "render.h"
00018 #include "shape.h"
00019 #include "xfixes.h"
00020
00021 #define XCB_DAMAGE_MAJOR_VERSION 1
00022 #define XCB_DAMAGE_MINOR_VERSION 1
00023
00024 extern xcb_extension_t xcb_damage_id;
00025
00026 typedef uint32_t xcb_damage_damage_t;
00027
00031 typedef struct xcb_damage_damage_iterator_t {
00032 xcb_damage_damage_t *data;
00033 int rem;
00034 int index;
00035 } xcb_damage_damage_iterator_t;
00036
00037 typedef enum xcb_damage_report_level_t {
00038 XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES,
00039 XCB_DAMAGE_REPORT_LEVEL_DELTA_RECTANGLES,
00040 XCB_DAMAGE_REPORT_LEVEL_BOUNDING_BOX,
00041 XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY
00042 } xcb_damage_report_level_t;
00043
00045 #define XCB_DAMAGE_BAD_DAMAGE 0
00046
00050 typedef struct xcb_damage_bad_damage_error_t {
00051 uint8_t response_type;
00052 uint8_t error_code;
00053 uint16_t sequence;
00054 } xcb_damage_bad_damage_error_t;
00055
00059 typedef struct xcb_damage_query_version_cookie_t {
00060 unsigned int sequence;
00061 } xcb_damage_query_version_cookie_t;
00062
00064 #define XCB_DAMAGE_QUERY_VERSION 0
00065
00069 typedef struct xcb_damage_query_version_request_t {
00070 uint8_t major_opcode;
00071 uint8_t minor_opcode;
00072 uint16_t length;
00073 uint32_t client_major_version;
00074 uint32_t client_minor_version;
00075 } xcb_damage_query_version_request_t;
00076
00080 typedef struct xcb_damage_query_version_reply_t {
00081 uint8_t response_type;
00082 uint8_t pad0;
00083 uint16_t sequence;
00084 uint32_t length;
00085 uint32_t major_version;
00086 uint32_t minor_version;
00087 uint8_t pad1[16];
00088 } xcb_damage_query_version_reply_t;
00089
00091 #define XCB_DAMAGE_CREATE 1
00092
00096 typedef struct xcb_damage_create_request_t {
00097 uint8_t major_opcode;
00098 uint8_t minor_opcode;
00099 uint16_t length;
00100 xcb_damage_damage_t damage;
00101 xcb_drawable_t drawable;
00102 uint8_t level;
00103 uint8_t pad0[3];
00104 } xcb_damage_create_request_t;
00105
00107 #define XCB_DAMAGE_DESTROY 2
00108
00112 typedef struct xcb_damage_destroy_request_t {
00113 uint8_t major_opcode;
00114 uint8_t minor_opcode;
00115 uint16_t length;
00116 xcb_damage_damage_t damage;
00117 } xcb_damage_destroy_request_t;
00118
00120 #define XCB_DAMAGE_SUBTRACT 3
00121
00125 typedef struct xcb_damage_subtract_request_t {
00126 uint8_t major_opcode;
00127 uint8_t minor_opcode;
00128 uint16_t length;
00129 xcb_damage_damage_t damage;
00130 xcb_xfixes_region_t repair;
00131 xcb_xfixes_region_t parts;
00132 } xcb_damage_subtract_request_t;
00133
00135 #define XCB_DAMAGE_ADD 4
00136
00140 typedef struct xcb_damage_add_request_t {
00141 uint8_t major_opcode;
00142 uint8_t minor_opcode;
00143 uint16_t length;
00144 xcb_drawable_t drawable;
00145 xcb_xfixes_region_t region;
00146 } xcb_damage_add_request_t;
00147
00149 #define XCB_DAMAGE_NOTIFY 0
00150
00154 typedef struct xcb_damage_notify_event_t {
00155 uint8_t response_type;
00156 uint8_t level;
00157 uint16_t sequence;
00158 xcb_drawable_t drawable;
00159 xcb_damage_damage_t damage;
00160 xcb_timestamp_t timestamp;
00161 xcb_rectangle_t area;
00162 xcb_rectangle_t geometry;
00163 } xcb_damage_notify_event_t;
00164
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183 void
00184 xcb_damage_damage_next (xcb_damage_damage_iterator_t *i );
00185
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205 xcb_generic_iterator_t
00206 xcb_damage_damage_end (xcb_damage_damage_iterator_t i );
00207
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228 xcb_damage_query_version_cookie_t
00229 xcb_damage_query_version (xcb_connection_t *c ,
00230 uint32_t client_major_version ,
00231 uint32_t client_minor_version );
00232
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256 xcb_damage_query_version_cookie_t
00257 xcb_damage_query_version_unchecked (xcb_connection_t *c ,
00258 uint32_t client_major_version ,
00259 uint32_t client_minor_version );
00260
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287 xcb_damage_query_version_reply_t *
00288 xcb_damage_query_version_reply (xcb_connection_t *c ,
00289 xcb_damage_query_version_cookie_t cookie ,
00290 xcb_generic_error_t **e );
00291
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316 xcb_void_cookie_t
00317 xcb_damage_create_checked (xcb_connection_t *c ,
00318 xcb_damage_damage_t damage ,
00319 xcb_drawable_t drawable ,
00320 uint8_t level );
00321
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343 xcb_void_cookie_t
00344 xcb_damage_create (xcb_connection_t *c ,
00345 xcb_damage_damage_t damage ,
00346 xcb_drawable_t drawable ,
00347 uint8_t level );
00348
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371 xcb_void_cookie_t
00372 xcb_damage_destroy_checked (xcb_connection_t *c ,
00373 xcb_damage_damage_t damage );
00374
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394 xcb_void_cookie_t
00395 xcb_damage_destroy (xcb_connection_t *c ,
00396 xcb_damage_damage_t damage );
00397
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422 xcb_void_cookie_t
00423 xcb_damage_subtract_checked (xcb_connection_t *c ,
00424 xcb_damage_damage_t damage ,
00425 xcb_xfixes_region_t repair ,
00426 xcb_xfixes_region_t parts );
00427
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449 xcb_void_cookie_t
00450 xcb_damage_subtract (xcb_connection_t *c ,
00451 xcb_damage_damage_t damage ,
00452 xcb_xfixes_region_t repair ,
00453 xcb_xfixes_region_t parts );
00454
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478 xcb_void_cookie_t
00479 xcb_damage_add_checked (xcb_connection_t *c ,
00480 xcb_drawable_t drawable ,
00481 xcb_xfixes_region_t region );
00482
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503 xcb_void_cookie_t
00504 xcb_damage_add (xcb_connection_t *c ,
00505 xcb_drawable_t drawable ,
00506 xcb_xfixes_region_t region );
00507
00508
00509 #endif
00510