00001
00002
00003
00004
00005
00012 #ifndef __RES_H
00013 #define __RES_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021
00022 #define XCB_RES_MAJOR_VERSION 1
00023 #define XCB_RES_MINOR_VERSION 0
00024
00025 extern xcb_extension_t xcb_res_id;
00026
00030 typedef struct xcb_res_client_t {
00031 uint32_t resource_base;
00032 uint32_t resource_mask;
00033 } xcb_res_client_t;
00034
00038 typedef struct xcb_res_client_iterator_t {
00039 xcb_res_client_t *data;
00040 int rem;
00041 int index;
00042 } xcb_res_client_iterator_t;
00043
00047 typedef struct xcb_res_type_t {
00048 xcb_atom_t resource_type;
00049 uint32_t count;
00050 } xcb_res_type_t;
00051
00055 typedef struct xcb_res_type_iterator_t {
00056 xcb_res_type_t *data;
00057 int rem;
00058 int index;
00059 } xcb_res_type_iterator_t;
00060
00064 typedef struct xcb_res_query_version_cookie_t {
00065 unsigned int sequence;
00066 } xcb_res_query_version_cookie_t;
00067
00069 #define XCB_RES_QUERY_VERSION 0
00070
00074 typedef struct xcb_res_query_version_request_t {
00075 uint8_t major_opcode;
00076 uint8_t minor_opcode;
00077 uint16_t length;
00078 uint8_t client_major;
00079 uint8_t client_minor;
00080 } xcb_res_query_version_request_t;
00081
00085 typedef struct xcb_res_query_version_reply_t {
00086 uint8_t response_type;
00087 uint8_t pad0;
00088 uint16_t sequence;
00089 uint32_t length;
00090 uint16_t server_major;
00091 uint16_t server_minor;
00092 } xcb_res_query_version_reply_t;
00093
00097 typedef struct xcb_res_query_clients_cookie_t {
00098 unsigned int sequence;
00099 } xcb_res_query_clients_cookie_t;
00100
00102 #define XCB_RES_QUERY_CLIENTS 1
00103
00107 typedef struct xcb_res_query_clients_request_t {
00108 uint8_t major_opcode;
00109 uint8_t minor_opcode;
00110 uint16_t length;
00111 } xcb_res_query_clients_request_t;
00112
00116 typedef struct xcb_res_query_clients_reply_t {
00117 uint8_t response_type;
00118 uint8_t pad0;
00119 uint16_t sequence;
00120 uint32_t length;
00121 uint32_t num_clients;
00122 uint8_t pad1[20];
00123 } xcb_res_query_clients_reply_t;
00124
00128 typedef struct xcb_res_query_client_resources_cookie_t {
00129 unsigned int sequence;
00130 } xcb_res_query_client_resources_cookie_t;
00131
00133 #define XCB_RES_QUERY_CLIENT_RESOURCES 2
00134
00138 typedef struct xcb_res_query_client_resources_request_t {
00139 uint8_t major_opcode;
00140 uint8_t minor_opcode;
00141 uint16_t length;
00142 uint32_t xid;
00143 } xcb_res_query_client_resources_request_t;
00144
00148 typedef struct xcb_res_query_client_resources_reply_t {
00149 uint8_t response_type;
00150 uint8_t pad0;
00151 uint16_t sequence;
00152 uint32_t length;
00153 uint32_t num_types;
00154 uint8_t pad1[20];
00155 } xcb_res_query_client_resources_reply_t;
00156
00160 typedef struct xcb_res_query_client_pixmap_bytes_cookie_t {
00161 unsigned int sequence;
00162 } xcb_res_query_client_pixmap_bytes_cookie_t;
00163
00165 #define XCB_RES_QUERY_CLIENT_PIXMAP_BYTES 3
00166
00170 typedef struct xcb_res_query_client_pixmap_bytes_request_t {
00171 uint8_t major_opcode;
00172 uint8_t minor_opcode;
00173 uint16_t length;
00174 uint32_t xid;
00175 } xcb_res_query_client_pixmap_bytes_request_t;
00176
00180 typedef struct xcb_res_query_client_pixmap_bytes_reply_t {
00181 uint8_t response_type;
00182 uint8_t pad0;
00183 uint16_t sequence;
00184 uint32_t length;
00185 uint32_t bytes;
00186 uint32_t bytes_overflow;
00187 } xcb_res_query_client_pixmap_bytes_reply_t;
00188
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207 void
00208 xcb_res_client_next (xcb_res_client_iterator_t *i );
00209
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229 xcb_generic_iterator_t
00230 xcb_res_client_end (xcb_res_client_iterator_t i );
00231
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250 void
00251 xcb_res_type_next (xcb_res_type_iterator_t *i );
00252
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272 xcb_generic_iterator_t
00273 xcb_res_type_end (xcb_res_type_iterator_t i );
00274
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295 xcb_res_query_version_cookie_t
00296 xcb_res_query_version (xcb_connection_t *c ,
00297 uint8_t client_major ,
00298 uint8_t client_minor );
00299
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323 xcb_res_query_version_cookie_t
00324 xcb_res_query_version_unchecked (xcb_connection_t *c ,
00325 uint8_t client_major ,
00326 uint8_t client_minor );
00327
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354 xcb_res_query_version_reply_t *
00355 xcb_res_query_version_reply (xcb_connection_t *c ,
00356 xcb_res_query_version_cookie_t cookie ,
00357 xcb_generic_error_t **e );
00358
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377 xcb_res_query_clients_cookie_t
00378 xcb_res_query_clients (xcb_connection_t *c );
00379
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401 xcb_res_query_clients_cookie_t
00402 xcb_res_query_clients_unchecked (xcb_connection_t *c );
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414 xcb_res_client_t *
00415 xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R );
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427 int
00428 xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R );
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440 xcb_res_client_iterator_t
00441 xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R );
00442
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469 xcb_res_query_clients_reply_t *
00470 xcb_res_query_clients_reply (xcb_connection_t *c ,
00471 xcb_res_query_clients_cookie_t cookie ,
00472 xcb_generic_error_t **e );
00473
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493 xcb_res_query_client_resources_cookie_t
00494 xcb_res_query_client_resources (xcb_connection_t *c ,
00495 uint32_t xid );
00496
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519 xcb_res_query_client_resources_cookie_t
00520 xcb_res_query_client_resources_unchecked (xcb_connection_t *c ,
00521 uint32_t xid );
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533 xcb_res_type_t *
00534 xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R );
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546 int
00547 xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R );
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559 xcb_res_type_iterator_t
00560 xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R );
00561
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588 xcb_res_query_client_resources_reply_t *
00589 xcb_res_query_client_resources_reply (xcb_connection_t *c ,
00590 xcb_res_query_client_resources_cookie_t cookie ,
00591 xcb_generic_error_t **e );
00592
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612 xcb_res_query_client_pixmap_bytes_cookie_t
00613 xcb_res_query_client_pixmap_bytes (xcb_connection_t *c ,
00614 uint32_t xid );
00615
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638 xcb_res_query_client_pixmap_bytes_cookie_t
00639 xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c ,
00640 uint32_t xid );
00641
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668 xcb_res_query_client_pixmap_bytes_reply_t *
00669 xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c ,
00670 xcb_res_query_client_pixmap_bytes_cookie_t cookie ,
00671 xcb_generic_error_t **e );
00672
00673
00674 #ifdef __cplusplus
00675 }
00676 #endif
00677
00678 #endif
00679