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
00359 int
00360 xcb_res_query_clients_sizeof (const void *_buffer );
00361
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380 xcb_res_query_clients_cookie_t
00381 xcb_res_query_clients (xcb_connection_t *c );
00382
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404 xcb_res_query_clients_cookie_t
00405 xcb_res_query_clients_unchecked (xcb_connection_t *c );
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417 xcb_res_client_t *
00418 xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R );
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430 int
00431 xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R );
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443 xcb_res_client_iterator_t
00444 xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R );
00445
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472 xcb_res_query_clients_reply_t *
00473 xcb_res_query_clients_reply (xcb_connection_t *c ,
00474 xcb_res_query_clients_cookie_t cookie ,
00475 xcb_generic_error_t **e );
00476
00477 int
00478 xcb_res_query_client_resources_sizeof (const void *_buffer );
00479
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499 xcb_res_query_client_resources_cookie_t
00500 xcb_res_query_client_resources (xcb_connection_t *c ,
00501 uint32_t xid );
00502
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525 xcb_res_query_client_resources_cookie_t
00526 xcb_res_query_client_resources_unchecked (xcb_connection_t *c ,
00527 uint32_t xid );
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539 xcb_res_type_t *
00540 xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R );
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552 int
00553 xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R );
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565 xcb_res_type_iterator_t
00566 xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R );
00567
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594 xcb_res_query_client_resources_reply_t *
00595 xcb_res_query_client_resources_reply (xcb_connection_t *c ,
00596 xcb_res_query_client_resources_cookie_t cookie ,
00597 xcb_generic_error_t **e );
00598
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618 xcb_res_query_client_pixmap_bytes_cookie_t
00619 xcb_res_query_client_pixmap_bytes (xcb_connection_t *c ,
00620 uint32_t xid );
00621
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644 xcb_res_query_client_pixmap_bytes_cookie_t
00645 xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c ,
00646 uint32_t xid );
00647
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674 xcb_res_query_client_pixmap_bytes_reply_t *
00675 xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c ,
00676 xcb_res_query_client_pixmap_bytes_cookie_t cookie ,
00677 xcb_generic_error_t **e );
00678
00679
00680 #ifdef __cplusplus
00681 }
00682 #endif
00683
00684 #endif
00685