00001
00002
00003
00004
00005
00012 #ifndef __RES_H
00013 #define __RES_H
00014
00015 #include "xcb.h"
00016
00017 #define XCB_RES_MAJOR_VERSION 1
00018 #define XCB_RES_MINOR_VERSION 0
00019
00020 extern xcb_extension_t xcb_res_id;
00021
00025 typedef struct xcb_res_client_t {
00026 uint32_t resource_base;
00027 uint32_t resource_mask;
00028 } xcb_res_client_t;
00029
00033 typedef struct xcb_res_client_iterator_t {
00034 xcb_res_client_t *data;
00035 int rem;
00036 int index;
00037 } xcb_res_client_iterator_t;
00038
00042 typedef struct xcb_res_type_t {
00043 uint32_t resource_type;
00044 uint32_t count;
00045 } xcb_res_type_t;
00046
00050 typedef struct xcb_res_type_iterator_t {
00051 xcb_res_type_t *data;
00052 int rem;
00053 int index;
00054 } xcb_res_type_iterator_t;
00055
00059 typedef struct xcb_res_query_version_cookie_t {
00060 unsigned int sequence;
00061 } xcb_res_query_version_cookie_t;
00062
00064 #define XCB_RES_QUERY_VERSION 0
00065
00069 typedef struct xcb_res_query_version_request_t {
00070 uint8_t major_opcode;
00071 uint8_t minor_opcode;
00072 uint16_t length;
00073 uint8_t client_major;
00074 uint8_t client_minor;
00075 } xcb_res_query_version_request_t;
00076
00080 typedef struct xcb_res_query_version_reply_t {
00081 uint8_t response_type;
00082 uint8_t pad0;
00083 uint16_t sequence;
00084 uint32_t length;
00085 uint16_t server_major;
00086 uint16_t server_minor;
00087 } xcb_res_query_version_reply_t;
00088
00092 typedef struct xcb_res_query_clients_cookie_t {
00093 unsigned int sequence;
00094 } xcb_res_query_clients_cookie_t;
00095
00097 #define XCB_RES_QUERY_CLIENTS 1
00098
00102 typedef struct xcb_res_query_clients_request_t {
00103 uint8_t major_opcode;
00104 uint8_t minor_opcode;
00105 uint16_t length;
00106 } xcb_res_query_clients_request_t;
00107
00111 typedef struct xcb_res_query_clients_reply_t {
00112 uint8_t response_type;
00113 uint8_t pad0;
00114 uint16_t sequence;
00115 uint32_t length;
00116 uint32_t num_clients;
00117 uint8_t pad1[20];
00118 } xcb_res_query_clients_reply_t;
00119
00123 typedef struct xcb_res_query_client_resources_cookie_t {
00124 unsigned int sequence;
00125 } xcb_res_query_client_resources_cookie_t;
00126
00128 #define XCB_RES_QUERY_CLIENT_RESOURCES 2
00129
00133 typedef struct xcb_res_query_client_resources_request_t {
00134 uint8_t major_opcode;
00135 uint8_t minor_opcode;
00136 uint16_t length;
00137 uint32_t xid;
00138 } xcb_res_query_client_resources_request_t;
00139
00143 typedef struct xcb_res_query_client_resources_reply_t {
00144 uint8_t response_type;
00145 uint8_t pad0;
00146 uint16_t sequence;
00147 uint32_t length;
00148 uint32_t num_types;
00149 uint8_t pad1[20];
00150 } xcb_res_query_client_resources_reply_t;
00151
00155 typedef struct xcb_res_query_client_pixmap_bytes_cookie_t {
00156 unsigned int sequence;
00157 } xcb_res_query_client_pixmap_bytes_cookie_t;
00158
00160 #define XCB_RES_QUERY_CLIENT_PIXMAP_BYTES 3
00161
00165 typedef struct xcb_res_query_client_pixmap_bytes_request_t {
00166 uint8_t major_opcode;
00167 uint8_t minor_opcode;
00168 uint16_t length;
00169 uint32_t xid;
00170 } xcb_res_query_client_pixmap_bytes_request_t;
00171
00175 typedef struct xcb_res_query_client_pixmap_bytes_reply_t {
00176 uint8_t response_type;
00177 uint8_t pad0;
00178 uint16_t sequence;
00179 uint32_t length;
00180 uint32_t bytes;
00181 uint32_t bytes_overflow;
00182 } xcb_res_query_client_pixmap_bytes_reply_t;
00183
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202 void
00203 xcb_res_client_next (xcb_res_client_iterator_t *i );
00204
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224 xcb_generic_iterator_t
00225 xcb_res_client_end (xcb_res_client_iterator_t i );
00226
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245 void
00246 xcb_res_type_next (xcb_res_type_iterator_t *i );
00247
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267 xcb_generic_iterator_t
00268 xcb_res_type_end (xcb_res_type_iterator_t i );
00269
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290 xcb_res_query_version_cookie_t
00291 xcb_res_query_version (xcb_connection_t *c ,
00292 uint8_t client_major ,
00293 uint8_t client_minor );
00294
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318 xcb_res_query_version_cookie_t
00319 xcb_res_query_version_unchecked (xcb_connection_t *c ,
00320 uint8_t client_major ,
00321 uint8_t client_minor );
00322
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347 xcb_res_query_version_reply_t *
00348 xcb_res_query_version_reply (xcb_connection_t *c ,
00349 xcb_res_query_version_cookie_t cookie ,
00350 xcb_generic_error_t **e );
00351
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370 xcb_res_query_clients_cookie_t
00371 xcb_res_query_clients (xcb_connection_t *c );
00372
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394 xcb_res_query_clients_cookie_t
00395 xcb_res_query_clients_unchecked (xcb_connection_t *c );
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407 xcb_res_client_t *
00408 xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R );
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420 int
00421 xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R );
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433 xcb_res_client_iterator_t
00434 xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R );
00435
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460 xcb_res_query_clients_reply_t *
00461 xcb_res_query_clients_reply (xcb_connection_t *c ,
00462 xcb_res_query_clients_cookie_t cookie ,
00463 xcb_generic_error_t **e );
00464
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484 xcb_res_query_client_resources_cookie_t
00485 xcb_res_query_client_resources (xcb_connection_t *c ,
00486 uint32_t xid );
00487
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510 xcb_res_query_client_resources_cookie_t
00511 xcb_res_query_client_resources_unchecked (xcb_connection_t *c ,
00512 uint32_t xid );
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524 xcb_res_type_t *
00525 xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R );
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537 int
00538 xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R );
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550 xcb_res_type_iterator_t
00551 xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R );
00552
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577 xcb_res_query_client_resources_reply_t *
00578 xcb_res_query_client_resources_reply (xcb_connection_t *c ,
00579 xcb_res_query_client_resources_cookie_t cookie ,
00580 xcb_generic_error_t **e );
00581
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601 xcb_res_query_client_pixmap_bytes_cookie_t
00602 xcb_res_query_client_pixmap_bytes (xcb_connection_t *c ,
00603 uint32_t xid );
00604
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627 xcb_res_query_client_pixmap_bytes_cookie_t
00628 xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c ,
00629 uint32_t xid );
00630
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655 xcb_res_query_client_pixmap_bytes_reply_t *
00656 xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c ,
00657 xcb_res_query_client_pixmap_bytes_cookie_t cookie ,
00658 xcb_generic_error_t **e );
00659
00660
00661 #endif
00662