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
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194 void
00195 xcb_res_client_next (xcb_res_client_iterator_t *i );
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207 xcb_generic_iterator_t
00208 xcb_res_client_end (xcb_res_client_iterator_t i );
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220 void
00221 xcb_res_type_next (xcb_res_type_iterator_t *i );
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233 xcb_generic_iterator_t
00234 xcb_res_type_end (xcb_res_type_iterator_t i );
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248 xcb_res_query_version_cookie_t
00249 xcb_res_query_version (xcb_connection_t *c ,
00250 uint8_t client_major ,
00251 uint8_t client_minor );
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265 xcb_res_query_version_cookie_t
00266 xcb_res_query_version_unchecked (xcb_connection_t *c ,
00267 uint8_t client_major ,
00268 uint8_t client_minor );
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282 xcb_res_query_version_reply_t *
00283 xcb_res_query_version_reply (xcb_connection_t *c ,
00284 xcb_res_query_version_cookie_t cookie ,
00285 xcb_generic_error_t **e );
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297 xcb_res_query_clients_cookie_t
00298 xcb_res_query_clients (xcb_connection_t *c );
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310 xcb_res_query_clients_cookie_t
00311 xcb_res_query_clients_unchecked (xcb_connection_t *c );
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323 xcb_res_client_t *
00324 xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R );
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336 int
00337 xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R );
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349 xcb_res_client_iterator_t
00350 xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R );
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364 xcb_res_query_clients_reply_t *
00365 xcb_res_query_clients_reply (xcb_connection_t *c ,
00366 xcb_res_query_clients_cookie_t cookie ,
00367 xcb_generic_error_t **e );
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380 xcb_res_query_client_resources_cookie_t
00381 xcb_res_query_client_resources (xcb_connection_t *c ,
00382 uint32_t xid );
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395 xcb_res_query_client_resources_cookie_t
00396 xcb_res_query_client_resources_unchecked (xcb_connection_t *c ,
00397 uint32_t xid );
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409 xcb_res_type_t *
00410 xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R );
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422 int
00423 xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R );
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435 xcb_res_type_iterator_t
00436 xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R );
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450 xcb_res_query_client_resources_reply_t *
00451 xcb_res_query_client_resources_reply (xcb_connection_t *c ,
00452 xcb_res_query_client_resources_cookie_t cookie ,
00453 xcb_generic_error_t **e );
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466 xcb_res_query_client_pixmap_bytes_cookie_t
00467 xcb_res_query_client_pixmap_bytes (xcb_connection_t *c ,
00468 uint32_t xid );
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481 xcb_res_query_client_pixmap_bytes_cookie_t
00482 xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c ,
00483 uint32_t xid );
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497 xcb_res_query_client_pixmap_bytes_reply_t *
00498 xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c ,
00499 xcb_res_query_client_pixmap_bytes_cookie_t cookie ,
00500 xcb_generic_error_t **e );
00501
00502
00503 #endif
00504