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
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348 xcb_res_query_version_reply_t *
00349 xcb_res_query_version_reply (xcb_connection_t *c ,
00350 xcb_res_query_version_cookie_t cookie ,
00351 xcb_generic_error_t **e );
00352
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371 xcb_res_query_clients_cookie_t
00372 xcb_res_query_clients (xcb_connection_t *c );
00373
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395 xcb_res_query_clients_cookie_t
00396 xcb_res_query_clients_unchecked (xcb_connection_t *c );
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408 xcb_res_client_t *
00409 xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R );
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421 int
00422 xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R );
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434 xcb_res_client_iterator_t
00435 xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R );
00436
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461 xcb_res_query_clients_reply_t *
00462 xcb_res_query_clients_reply (xcb_connection_t *c ,
00463 xcb_res_query_clients_cookie_t cookie ,
00464 xcb_generic_error_t **e );
00465
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485 xcb_res_query_client_resources_cookie_t
00486 xcb_res_query_client_resources (xcb_connection_t *c ,
00487 uint32_t xid );
00488
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511 xcb_res_query_client_resources_cookie_t
00512 xcb_res_query_client_resources_unchecked (xcb_connection_t *c ,
00513 uint32_t xid );
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525 xcb_res_type_t *
00526 xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R );
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538 int
00539 xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R );
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551 xcb_res_type_iterator_t
00552 xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R );
00553
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578 xcb_res_query_client_resources_reply_t *
00579 xcb_res_query_client_resources_reply (xcb_connection_t *c ,
00580 xcb_res_query_client_resources_cookie_t cookie ,
00581 xcb_generic_error_t **e );
00582
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602 xcb_res_query_client_pixmap_bytes_cookie_t
00603 xcb_res_query_client_pixmap_bytes (xcb_connection_t *c ,
00604 uint32_t xid );
00605
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628 xcb_res_query_client_pixmap_bytes_cookie_t
00629 xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c ,
00630 uint32_t xid );
00631
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656 xcb_res_query_client_pixmap_bytes_reply_t *
00657 xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c ,
00658 xcb_res_query_client_pixmap_bytes_cookie_t cookie ,
00659 xcb_generic_error_t **e );
00660
00661
00662 #endif
00663