File indexing completed on 2025-01-18 10:14:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __RES_H
0013 #define __RES_H
0014
0015 #include "xcb.h"
0016 #include "xproto.h"
0017
0018 #ifdef __cplusplus
0019 extern "C" {
0020 #endif
0021
0022 #define XCB_RES_MAJOR_VERSION 1
0023 #define XCB_RES_MINOR_VERSION 2
0024
0025 extern xcb_extension_t xcb_res_id;
0026
0027
0028
0029
0030 typedef struct xcb_res_client_t {
0031 uint32_t resource_base;
0032 uint32_t resource_mask;
0033 } xcb_res_client_t;
0034
0035
0036
0037
0038 typedef struct xcb_res_client_iterator_t {
0039 xcb_res_client_t *data;
0040 int rem;
0041 int index;
0042 } xcb_res_client_iterator_t;
0043
0044
0045
0046
0047 typedef struct xcb_res_type_t {
0048 xcb_atom_t resource_type;
0049 uint32_t count;
0050 } xcb_res_type_t;
0051
0052
0053
0054
0055 typedef struct xcb_res_type_iterator_t {
0056 xcb_res_type_t *data;
0057 int rem;
0058 int index;
0059 } xcb_res_type_iterator_t;
0060
0061 typedef enum xcb_res_client_id_mask_t {
0062 XCB_RES_CLIENT_ID_MASK_CLIENT_XID = 1,
0063 XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID = 2
0064 } xcb_res_client_id_mask_t;
0065
0066
0067
0068
0069 typedef struct xcb_res_client_id_spec_t {
0070 uint32_t client;
0071 uint32_t mask;
0072 } xcb_res_client_id_spec_t;
0073
0074
0075
0076
0077 typedef struct xcb_res_client_id_spec_iterator_t {
0078 xcb_res_client_id_spec_t *data;
0079 int rem;
0080 int index;
0081 } xcb_res_client_id_spec_iterator_t;
0082
0083
0084
0085
0086 typedef struct xcb_res_client_id_value_t {
0087 xcb_res_client_id_spec_t spec;
0088 uint32_t length;
0089 } xcb_res_client_id_value_t;
0090
0091
0092
0093
0094 typedef struct xcb_res_client_id_value_iterator_t {
0095 xcb_res_client_id_value_t *data;
0096 int rem;
0097 int index;
0098 } xcb_res_client_id_value_iterator_t;
0099
0100
0101
0102
0103 typedef struct xcb_res_resource_id_spec_t {
0104 uint32_t resource;
0105 uint32_t type;
0106 } xcb_res_resource_id_spec_t;
0107
0108
0109
0110
0111 typedef struct xcb_res_resource_id_spec_iterator_t {
0112 xcb_res_resource_id_spec_t *data;
0113 int rem;
0114 int index;
0115 } xcb_res_resource_id_spec_iterator_t;
0116
0117
0118
0119
0120 typedef struct xcb_res_resource_size_spec_t {
0121 xcb_res_resource_id_spec_t spec;
0122 uint32_t bytes;
0123 uint32_t ref_count;
0124 uint32_t use_count;
0125 } xcb_res_resource_size_spec_t;
0126
0127
0128
0129
0130 typedef struct xcb_res_resource_size_spec_iterator_t {
0131 xcb_res_resource_size_spec_t *data;
0132 int rem;
0133 int index;
0134 } xcb_res_resource_size_spec_iterator_t;
0135
0136
0137
0138
0139 typedef struct xcb_res_resource_size_value_t {
0140 xcb_res_resource_size_spec_t size;
0141 uint32_t num_cross_references;
0142 } xcb_res_resource_size_value_t;
0143
0144
0145
0146
0147 typedef struct xcb_res_resource_size_value_iterator_t {
0148 xcb_res_resource_size_value_t *data;
0149 int rem;
0150 int index;
0151 } xcb_res_resource_size_value_iterator_t;
0152
0153
0154
0155
0156 typedef struct xcb_res_query_version_cookie_t {
0157 unsigned int sequence;
0158 } xcb_res_query_version_cookie_t;
0159
0160
0161 #define XCB_RES_QUERY_VERSION 0
0162
0163
0164
0165
0166 typedef struct xcb_res_query_version_request_t {
0167 uint8_t major_opcode;
0168 uint8_t minor_opcode;
0169 uint16_t length;
0170 uint8_t client_major;
0171 uint8_t client_minor;
0172 } xcb_res_query_version_request_t;
0173
0174
0175
0176
0177 typedef struct xcb_res_query_version_reply_t {
0178 uint8_t response_type;
0179 uint8_t pad0;
0180 uint16_t sequence;
0181 uint32_t length;
0182 uint16_t server_major;
0183 uint16_t server_minor;
0184 } xcb_res_query_version_reply_t;
0185
0186
0187
0188
0189 typedef struct xcb_res_query_clients_cookie_t {
0190 unsigned int sequence;
0191 } xcb_res_query_clients_cookie_t;
0192
0193
0194 #define XCB_RES_QUERY_CLIENTS 1
0195
0196
0197
0198
0199 typedef struct xcb_res_query_clients_request_t {
0200 uint8_t major_opcode;
0201 uint8_t minor_opcode;
0202 uint16_t length;
0203 } xcb_res_query_clients_request_t;
0204
0205
0206
0207
0208 typedef struct xcb_res_query_clients_reply_t {
0209 uint8_t response_type;
0210 uint8_t pad0;
0211 uint16_t sequence;
0212 uint32_t length;
0213 uint32_t num_clients;
0214 uint8_t pad1[20];
0215 } xcb_res_query_clients_reply_t;
0216
0217
0218
0219
0220 typedef struct xcb_res_query_client_resources_cookie_t {
0221 unsigned int sequence;
0222 } xcb_res_query_client_resources_cookie_t;
0223
0224
0225 #define XCB_RES_QUERY_CLIENT_RESOURCES 2
0226
0227
0228
0229
0230 typedef struct xcb_res_query_client_resources_request_t {
0231 uint8_t major_opcode;
0232 uint8_t minor_opcode;
0233 uint16_t length;
0234 uint32_t xid;
0235 } xcb_res_query_client_resources_request_t;
0236
0237
0238
0239
0240 typedef struct xcb_res_query_client_resources_reply_t {
0241 uint8_t response_type;
0242 uint8_t pad0;
0243 uint16_t sequence;
0244 uint32_t length;
0245 uint32_t num_types;
0246 uint8_t pad1[20];
0247 } xcb_res_query_client_resources_reply_t;
0248
0249
0250
0251
0252 typedef struct xcb_res_query_client_pixmap_bytes_cookie_t {
0253 unsigned int sequence;
0254 } xcb_res_query_client_pixmap_bytes_cookie_t;
0255
0256
0257 #define XCB_RES_QUERY_CLIENT_PIXMAP_BYTES 3
0258
0259
0260
0261
0262 typedef struct xcb_res_query_client_pixmap_bytes_request_t {
0263 uint8_t major_opcode;
0264 uint8_t minor_opcode;
0265 uint16_t length;
0266 uint32_t xid;
0267 } xcb_res_query_client_pixmap_bytes_request_t;
0268
0269
0270
0271
0272 typedef struct xcb_res_query_client_pixmap_bytes_reply_t {
0273 uint8_t response_type;
0274 uint8_t pad0;
0275 uint16_t sequence;
0276 uint32_t length;
0277 uint32_t bytes;
0278 uint32_t bytes_overflow;
0279 } xcb_res_query_client_pixmap_bytes_reply_t;
0280
0281
0282
0283
0284 typedef struct xcb_res_query_client_ids_cookie_t {
0285 unsigned int sequence;
0286 } xcb_res_query_client_ids_cookie_t;
0287
0288
0289 #define XCB_RES_QUERY_CLIENT_IDS 4
0290
0291
0292
0293
0294 typedef struct xcb_res_query_client_ids_request_t {
0295 uint8_t major_opcode;
0296 uint8_t minor_opcode;
0297 uint16_t length;
0298 uint32_t num_specs;
0299 } xcb_res_query_client_ids_request_t;
0300
0301
0302
0303
0304 typedef struct xcb_res_query_client_ids_reply_t {
0305 uint8_t response_type;
0306 uint8_t pad0;
0307 uint16_t sequence;
0308 uint32_t length;
0309 uint32_t num_ids;
0310 uint8_t pad1[20];
0311 } xcb_res_query_client_ids_reply_t;
0312
0313
0314
0315
0316 typedef struct xcb_res_query_resource_bytes_cookie_t {
0317 unsigned int sequence;
0318 } xcb_res_query_resource_bytes_cookie_t;
0319
0320
0321 #define XCB_RES_QUERY_RESOURCE_BYTES 5
0322
0323
0324
0325
0326 typedef struct xcb_res_query_resource_bytes_request_t {
0327 uint8_t major_opcode;
0328 uint8_t minor_opcode;
0329 uint16_t length;
0330 uint32_t client;
0331 uint32_t num_specs;
0332 } xcb_res_query_resource_bytes_request_t;
0333
0334
0335
0336
0337 typedef struct xcb_res_query_resource_bytes_reply_t {
0338 uint8_t response_type;
0339 uint8_t pad0;
0340 uint16_t sequence;
0341 uint32_t length;
0342 uint32_t num_sizes;
0343 uint8_t pad1[20];
0344 } xcb_res_query_resource_bytes_reply_t;
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354 void
0355 xcb_res_client_next (xcb_res_client_iterator_t *i);
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365
0366 xcb_generic_iterator_t
0367 xcb_res_client_end (xcb_res_client_iterator_t i);
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377 void
0378 xcb_res_type_next (xcb_res_type_iterator_t *i);
0379
0380
0381
0382
0383
0384
0385
0386
0387
0388
0389 xcb_generic_iterator_t
0390 xcb_res_type_end (xcb_res_type_iterator_t i);
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400 void
0401 xcb_res_client_id_spec_next (xcb_res_client_id_spec_iterator_t *i);
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412 xcb_generic_iterator_t
0413 xcb_res_client_id_spec_end (xcb_res_client_id_spec_iterator_t i);
0414
0415 int
0416 xcb_res_client_id_value_sizeof (const void *_buffer);
0417
0418 uint32_t *
0419 xcb_res_client_id_value_value (const xcb_res_client_id_value_t *R);
0420
0421 int
0422 xcb_res_client_id_value_value_length (const xcb_res_client_id_value_t *R);
0423
0424 xcb_generic_iterator_t
0425 xcb_res_client_id_value_value_end (const xcb_res_client_id_value_t *R);
0426
0427
0428
0429
0430
0431
0432
0433
0434
0435 void
0436 xcb_res_client_id_value_next (xcb_res_client_id_value_iterator_t *i);
0437
0438
0439
0440
0441
0442
0443
0444
0445
0446
0447 xcb_generic_iterator_t
0448 xcb_res_client_id_value_end (xcb_res_client_id_value_iterator_t i);
0449
0450
0451
0452
0453
0454
0455
0456
0457
0458 void
0459 xcb_res_resource_id_spec_next (xcb_res_resource_id_spec_iterator_t *i);
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470 xcb_generic_iterator_t
0471 xcb_res_resource_id_spec_end (xcb_res_resource_id_spec_iterator_t i);
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481 void
0482 xcb_res_resource_size_spec_next (xcb_res_resource_size_spec_iterator_t *i);
0483
0484
0485
0486
0487
0488
0489
0490
0491
0492
0493 xcb_generic_iterator_t
0494 xcb_res_resource_size_spec_end (xcb_res_resource_size_spec_iterator_t i);
0495
0496 int
0497 xcb_res_resource_size_value_sizeof (const void *_buffer);
0498
0499 xcb_res_resource_size_spec_t *
0500 xcb_res_resource_size_value_cross_references (const xcb_res_resource_size_value_t *R);
0501
0502 int
0503 xcb_res_resource_size_value_cross_references_length (const xcb_res_resource_size_value_t *R);
0504
0505 xcb_res_resource_size_spec_iterator_t
0506 xcb_res_resource_size_value_cross_references_iterator (const xcb_res_resource_size_value_t *R);
0507
0508
0509
0510
0511
0512
0513
0514
0515
0516 void
0517 xcb_res_resource_size_value_next (xcb_res_resource_size_value_iterator_t *i);
0518
0519
0520
0521
0522
0523
0524
0525
0526
0527
0528 xcb_generic_iterator_t
0529 xcb_res_resource_size_value_end (xcb_res_resource_size_value_iterator_t i);
0530
0531
0532
0533
0534
0535
0536
0537
0538
0539 xcb_res_query_version_cookie_t
0540 xcb_res_query_version (xcb_connection_t *c,
0541 uint8_t client_major,
0542 uint8_t client_minor);
0543
0544
0545
0546
0547
0548
0549
0550
0551
0552
0553
0554
0555 xcb_res_query_version_cookie_t
0556 xcb_res_query_version_unchecked (xcb_connection_t *c,
0557 uint8_t client_major,
0558 uint8_t client_minor);
0559
0560
0561
0562
0563
0564
0565
0566
0567
0568
0569
0570
0571
0572
0573
0574 xcb_res_query_version_reply_t *
0575 xcb_res_query_version_reply (xcb_connection_t *c,
0576 xcb_res_query_version_cookie_t cookie ,
0577 xcb_generic_error_t **e);
0578
0579 int
0580 xcb_res_query_clients_sizeof (const void *_buffer);
0581
0582
0583
0584
0585
0586
0587
0588
0589
0590 xcb_res_query_clients_cookie_t
0591 xcb_res_query_clients (xcb_connection_t *c);
0592
0593
0594
0595
0596
0597
0598
0599
0600
0601
0602
0603
0604 xcb_res_query_clients_cookie_t
0605 xcb_res_query_clients_unchecked (xcb_connection_t *c);
0606
0607 xcb_res_client_t *
0608 xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R);
0609
0610 int
0611 xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R);
0612
0613 xcb_res_client_iterator_t
0614 xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R);
0615
0616
0617
0618
0619
0620
0621
0622
0623
0624
0625
0626
0627
0628
0629
0630 xcb_res_query_clients_reply_t *
0631 xcb_res_query_clients_reply (xcb_connection_t *c,
0632 xcb_res_query_clients_cookie_t cookie ,
0633 xcb_generic_error_t **e);
0634
0635 int
0636 xcb_res_query_client_resources_sizeof (const void *_buffer);
0637
0638
0639
0640
0641
0642
0643
0644
0645
0646 xcb_res_query_client_resources_cookie_t
0647 xcb_res_query_client_resources (xcb_connection_t *c,
0648 uint32_t xid);
0649
0650
0651
0652
0653
0654
0655
0656
0657
0658
0659
0660
0661 xcb_res_query_client_resources_cookie_t
0662 xcb_res_query_client_resources_unchecked (xcb_connection_t *c,
0663 uint32_t xid);
0664
0665 xcb_res_type_t *
0666 xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R);
0667
0668 int
0669 xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R);
0670
0671 xcb_res_type_iterator_t
0672 xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R);
0673
0674
0675
0676
0677
0678
0679
0680
0681
0682
0683
0684
0685
0686
0687
0688 xcb_res_query_client_resources_reply_t *
0689 xcb_res_query_client_resources_reply (xcb_connection_t *c,
0690 xcb_res_query_client_resources_cookie_t cookie ,
0691 xcb_generic_error_t **e);
0692
0693
0694
0695
0696
0697
0698
0699
0700
0701 xcb_res_query_client_pixmap_bytes_cookie_t
0702 xcb_res_query_client_pixmap_bytes (xcb_connection_t *c,
0703 uint32_t xid);
0704
0705
0706
0707
0708
0709
0710
0711
0712
0713
0714
0715
0716 xcb_res_query_client_pixmap_bytes_cookie_t
0717 xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c,
0718 uint32_t xid);
0719
0720
0721
0722
0723
0724
0725
0726
0727
0728
0729
0730
0731
0732
0733
0734 xcb_res_query_client_pixmap_bytes_reply_t *
0735 xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c,
0736 xcb_res_query_client_pixmap_bytes_cookie_t cookie ,
0737 xcb_generic_error_t **e);
0738
0739 int
0740 xcb_res_query_client_ids_sizeof (const void *_buffer);
0741
0742
0743
0744
0745
0746
0747
0748
0749
0750 xcb_res_query_client_ids_cookie_t
0751 xcb_res_query_client_ids (xcb_connection_t *c,
0752 uint32_t num_specs,
0753 const xcb_res_client_id_spec_t *specs);
0754
0755
0756
0757
0758
0759
0760
0761
0762
0763
0764
0765
0766 xcb_res_query_client_ids_cookie_t
0767 xcb_res_query_client_ids_unchecked (xcb_connection_t *c,
0768 uint32_t num_specs,
0769 const xcb_res_client_id_spec_t *specs);
0770
0771 int
0772 xcb_res_query_client_ids_ids_length (const xcb_res_query_client_ids_reply_t *R);
0773
0774 xcb_res_client_id_value_iterator_t
0775 xcb_res_query_client_ids_ids_iterator (const xcb_res_query_client_ids_reply_t *R);
0776
0777
0778
0779
0780
0781
0782
0783
0784
0785
0786
0787
0788
0789
0790
0791 xcb_res_query_client_ids_reply_t *
0792 xcb_res_query_client_ids_reply (xcb_connection_t *c,
0793 xcb_res_query_client_ids_cookie_t cookie ,
0794 xcb_generic_error_t **e);
0795
0796 int
0797 xcb_res_query_resource_bytes_sizeof (const void *_buffer);
0798
0799
0800
0801
0802
0803
0804
0805
0806
0807 xcb_res_query_resource_bytes_cookie_t
0808 xcb_res_query_resource_bytes (xcb_connection_t *c,
0809 uint32_t client,
0810 uint32_t num_specs,
0811 const xcb_res_resource_id_spec_t *specs);
0812
0813
0814
0815
0816
0817
0818
0819
0820
0821
0822
0823
0824 xcb_res_query_resource_bytes_cookie_t
0825 xcb_res_query_resource_bytes_unchecked (xcb_connection_t *c,
0826 uint32_t client,
0827 uint32_t num_specs,
0828 const xcb_res_resource_id_spec_t *specs);
0829
0830 int
0831 xcb_res_query_resource_bytes_sizes_length (const xcb_res_query_resource_bytes_reply_t *R);
0832
0833 xcb_res_resource_size_value_iterator_t
0834 xcb_res_query_resource_bytes_sizes_iterator (const xcb_res_query_resource_bytes_reply_t *R);
0835
0836
0837
0838
0839
0840
0841
0842
0843
0844
0845
0846
0847
0848
0849
0850 xcb_res_query_resource_bytes_reply_t *
0851 xcb_res_query_resource_bytes_reply (xcb_connection_t *c,
0852 xcb_res_query_resource_bytes_cookie_t cookie ,
0853 xcb_generic_error_t **e);
0854
0855
0856 #ifdef __cplusplus
0857 }
0858 #endif
0859
0860 #endif
0861
0862
0863
0864