00001
00002
00003
00004
00005
00012 #ifndef __RES_H
00013 #define __RES_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017
00018 #define XCB_RES_MAJOR_VERSION 1
00019 #define XCB_RES_MINOR_VERSION 0
00020
00021 extern xcb_extension_t xcb_res_id;
00022
00026 typedef struct xcb_res_client_t {
00027 uint32_t resource_base;
00028 uint32_t resource_mask;
00029 } xcb_res_client_t;
00030
00034 typedef struct xcb_res_client_iterator_t {
00035 xcb_res_client_t *data;
00036 int rem;
00037 int index;
00038 } xcb_res_client_iterator_t;
00039
00043 typedef struct xcb_res_type_t {
00044 xcb_atom_t resource_type;
00045 uint32_t count;
00046 } xcb_res_type_t;
00047
00051 typedef struct xcb_res_type_iterator_t {
00052 xcb_res_type_t *data;
00053 int rem;
00054 int index;
00055 } xcb_res_type_iterator_t;
00056
00060 typedef struct xcb_res_query_version_cookie_t {
00061 unsigned int sequence;
00062 } xcb_res_query_version_cookie_t;
00063
00065 #define XCB_RES_QUERY_VERSION 0
00066
00070 typedef struct xcb_res_query_version_request_t {
00071 uint8_t major_opcode;
00072 uint8_t minor_opcode;
00073 uint16_t length;
00074 uint8_t client_major;
00075 uint8_t client_minor;
00076 } xcb_res_query_version_request_t;
00077
00081 typedef struct xcb_res_query_version_reply_t {
00082 uint8_t response_type;
00083 uint8_t pad0;
00084 uint16_t sequence;
00085 uint32_t length;
00086 uint16_t server_major;
00087 uint16_t server_minor;
00088 } xcb_res_query_version_reply_t;
00089
00093 typedef struct xcb_res_query_clients_cookie_t {
00094 unsigned int sequence;
00095 } xcb_res_query_clients_cookie_t;
00096
00098 #define XCB_RES_QUERY_CLIENTS 1
00099
00103 typedef struct xcb_res_query_clients_request_t {
00104 uint8_t major_opcode;
00105 uint8_t minor_opcode;
00106 uint16_t length;
00107 } xcb_res_query_clients_request_t;
00108
00112 typedef struct xcb_res_query_clients_reply_t {
00113 uint8_t response_type;
00114 uint8_t pad0;
00115 uint16_t sequence;
00116 uint32_t length;
00117 uint32_t num_clients;
00118 uint8_t pad1[20];
00119 } xcb_res_query_clients_reply_t;
00120
00124 typedef struct xcb_res_query_client_resources_cookie_t {
00125 unsigned int sequence;
00126 } xcb_res_query_client_resources_cookie_t;
00127
00129 #define XCB_RES_QUERY_CLIENT_RESOURCES 2
00130
00134 typedef struct xcb_res_query_client_resources_request_t {
00135 uint8_t major_opcode;
00136 uint8_t minor_opcode;
00137 uint16_t length;
00138 uint32_t xid;
00139 } xcb_res_query_client_resources_request_t;
00140
00144 typedef struct xcb_res_query_client_resources_reply_t {
00145 uint8_t response_type;
00146 uint8_t pad0;
00147 uint16_t sequence;
00148 uint32_t length;
00149 uint32_t num_types;
00150 uint8_t pad1[20];
00151 } xcb_res_query_client_resources_reply_t;
00152
00156 typedef struct xcb_res_query_client_pixmap_bytes_cookie_t {
00157 unsigned int sequence;
00158 } xcb_res_query_client_pixmap_bytes_cookie_t;
00159
00161 #define XCB_RES_QUERY_CLIENT_PIXMAP_BYTES 3
00162
00166 typedef struct xcb_res_query_client_pixmap_bytes_request_t {
00167 uint8_t major_opcode;
00168 uint8_t minor_opcode;
00169 uint16_t length;
00170 uint32_t xid;
00171 } xcb_res_query_client_pixmap_bytes_request_t;
00172
00176 typedef struct xcb_res_query_client_pixmap_bytes_reply_t {
00177 uint8_t response_type;
00178 uint8_t pad0;
00179 uint16_t sequence;
00180 uint32_t length;
00181 uint32_t bytes;
00182 uint32_t bytes_overflow;
00183 } xcb_res_query_client_pixmap_bytes_reply_t;
00184
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203 void
00204 xcb_res_client_next (xcb_res_client_iterator_t *i );
00205
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225 xcb_generic_iterator_t
00226 xcb_res_client_end (xcb_res_client_iterator_t i );
00227
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246 void
00247 xcb_res_type_next (xcb_res_type_iterator_t *i );
00248
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268 xcb_generic_iterator_t
00269 xcb_res_type_end (xcb_res_type_iterator_t i );
00270
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291 xcb_res_query_version_cookie_t
00292 xcb_res_query_version (xcb_connection_t *c ,
00293 uint8_t client_major ,
00294 uint8_t client_minor );
00295
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319 xcb_res_query_version_cookie_t
00320 xcb_res_query_version_unchecked (xcb_connection_t *c ,
00321 uint8_t client_major ,
00322 uint8_t client_minor );
00323
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350 xcb_res_query_version_reply_t *
00351 xcb_res_query_version_reply (xcb_connection_t *c ,
00352 xcb_res_query_version_cookie_t cookie ,
00353 xcb_generic_error_t **e );
00354
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373 xcb_res_query_clients_cookie_t
00374 xcb_res_query_clients (xcb_connection_t *c );
00375
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397 xcb_res_query_clients_cookie_t
00398 xcb_res_query_clients_unchecked (xcb_connection_t *c );
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410 xcb_res_client_t *
00411 xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R );
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423 int
00424 xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R );
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436 xcb_res_client_iterator_t
00437 xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R );
00438
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465 xcb_res_query_clients_reply_t *
00466 xcb_res_query_clients_reply (xcb_connection_t *c ,
00467 xcb_res_query_clients_cookie_t cookie ,
00468 xcb_generic_error_t **e );
00469
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489 xcb_res_query_client_resources_cookie_t
00490 xcb_res_query_client_resources (xcb_connection_t *c ,
00491 uint32_t xid );
00492
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515 xcb_res_query_client_resources_cookie_t
00516 xcb_res_query_client_resources_unchecked (xcb_connection_t *c ,
00517 uint32_t xid );
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529 xcb_res_type_t *
00530 xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R );
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542 int
00543 xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R );
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555 xcb_res_type_iterator_t
00556 xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R );
00557
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584 xcb_res_query_client_resources_reply_t *
00585 xcb_res_query_client_resources_reply (xcb_connection_t *c ,
00586 xcb_res_query_client_resources_cookie_t cookie ,
00587 xcb_generic_error_t **e );
00588
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608 xcb_res_query_client_pixmap_bytes_cookie_t
00609 xcb_res_query_client_pixmap_bytes (xcb_connection_t *c ,
00610 uint32_t xid );
00611
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634 xcb_res_query_client_pixmap_bytes_cookie_t
00635 xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c ,
00636 uint32_t xid );
00637
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664 xcb_res_query_client_pixmap_bytes_reply_t *
00665 xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c ,
00666 xcb_res_query_client_pixmap_bytes_cookie_t cookie ,
00667 xcb_generic_error_t **e );
00668
00669
00670 #endif
00671