00001
00002
00003
00004
00005
00012 #ifndef __DRI2_H
00013 #define __DRI2_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021
00022 #define XCB_DRI2_MAJOR_VERSION 1
00023 #define XCB_DRI2_MINOR_VERSION 1
00024
00025 extern xcb_extension_t xcb_dri2_id;
00026
00027 typedef enum xcb_dri2_attachment_t {
00028 XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT,
00029 XCB_DRI2_ATTACHMENT_BUFFER_BACK_LEFT,
00030 XCB_DRI2_ATTACHMENT_BUFFER_FRONT_RIGHT,
00031 XCB_DRI2_ATTACHMENT_BUFFER_BACK_RIGHT,
00032 XCB_DRI2_ATTACHMENT_BUFFER_DEPTH,
00033 XCB_DRI2_ATTACHMENT_BUFFER_STENCIL,
00034 XCB_DRI2_ATTACHMENT_BUFFER_ACCUM,
00035 XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT,
00036 XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_RIGHT,
00037 XCB_DRI2_ATTACHMENT_BUFFER_DEPTH_STENCIL
00038 } xcb_dri2_attachment_t;
00039
00040 typedef enum xcb_dri2_driver_type_t {
00041 XCB_DRI2_DRIVER_TYPE_DRI
00042 } xcb_dri2_driver_type_t;
00043
00047 typedef struct xcb_dri2_dri2_buffer_t {
00048 uint32_t attachment;
00049 uint32_t name;
00050 uint32_t pitch;
00051 uint32_t cpp;
00052 uint32_t flags;
00053 } xcb_dri2_dri2_buffer_t;
00054
00058 typedef struct xcb_dri2_dri2_buffer_iterator_t {
00059 xcb_dri2_dri2_buffer_t *data;
00060 int rem;
00061 int index;
00062 } xcb_dri2_dri2_buffer_iterator_t;
00063
00067 typedef struct xcb_dri2_attach_format_t {
00068 uint32_t attachment;
00069 uint32_t format;
00070 } xcb_dri2_attach_format_t;
00071
00075 typedef struct xcb_dri2_attach_format_iterator_t {
00076 xcb_dri2_attach_format_t *data;
00077 int rem;
00078 int index;
00079 } xcb_dri2_attach_format_iterator_t;
00080
00084 typedef struct xcb_dri2_query_version_cookie_t {
00085 unsigned int sequence;
00086 } xcb_dri2_query_version_cookie_t;
00087
00089 #define XCB_DRI2_QUERY_VERSION 0
00090
00094 typedef struct xcb_dri2_query_version_request_t {
00095 uint8_t major_opcode;
00096 uint8_t minor_opcode;
00097 uint16_t length;
00098 uint32_t major_version;
00099 uint32_t minor_version;
00100 } xcb_dri2_query_version_request_t;
00101
00105 typedef struct xcb_dri2_query_version_reply_t {
00106 uint8_t response_type;
00107 uint8_t pad0;
00108 uint16_t sequence;
00109 uint32_t length;
00110 uint32_t major_version;
00111 uint32_t minor_version;
00112 } xcb_dri2_query_version_reply_t;
00113
00117 typedef struct xcb_dri2_connect_cookie_t {
00118 unsigned int sequence;
00119 } xcb_dri2_connect_cookie_t;
00120
00122 #define XCB_DRI2_CONNECT 1
00123
00127 typedef struct xcb_dri2_connect_request_t {
00128 uint8_t major_opcode;
00129 uint8_t minor_opcode;
00130 uint16_t length;
00131 xcb_window_t window;
00132 uint32_t driver_type;
00133 } xcb_dri2_connect_request_t;
00134
00138 typedef struct xcb_dri2_connect_reply_t {
00139 uint8_t response_type;
00140 uint8_t pad0;
00141 uint16_t sequence;
00142 uint32_t length;
00143 uint32_t driver_name_length;
00144 uint32_t device_name_length;
00145 uint8_t pad1[16];
00146 } xcb_dri2_connect_reply_t;
00147
00151 typedef struct xcb_dri2_authenticate_cookie_t {
00152 unsigned int sequence;
00153 } xcb_dri2_authenticate_cookie_t;
00154
00156 #define XCB_DRI2_AUTHENTICATE 2
00157
00161 typedef struct xcb_dri2_authenticate_request_t {
00162 uint8_t major_opcode;
00163 uint8_t minor_opcode;
00164 uint16_t length;
00165 xcb_window_t window;
00166 uint32_t magic;
00167 } xcb_dri2_authenticate_request_t;
00168
00172 typedef struct xcb_dri2_authenticate_reply_t {
00173 uint8_t response_type;
00174 uint8_t pad0;
00175 uint16_t sequence;
00176 uint32_t length;
00177 uint32_t authenticated;
00178 } xcb_dri2_authenticate_reply_t;
00179
00181 #define XCB_DRI2_CREATE_DRAWABLE 3
00182
00186 typedef struct xcb_dri2_create_drawable_request_t {
00187 uint8_t major_opcode;
00188 uint8_t minor_opcode;
00189 uint16_t length;
00190 xcb_drawable_t drawable;
00191 } xcb_dri2_create_drawable_request_t;
00192
00194 #define XCB_DRI2_DESTROY_DRAWABLE 4
00195
00199 typedef struct xcb_dri2_destroy_drawable_request_t {
00200 uint8_t major_opcode;
00201 uint8_t minor_opcode;
00202 uint16_t length;
00203 xcb_drawable_t drawable;
00204 } xcb_dri2_destroy_drawable_request_t;
00205
00209 typedef struct xcb_dri2_get_buffers_cookie_t {
00210 unsigned int sequence;
00211 } xcb_dri2_get_buffers_cookie_t;
00212
00214 #define XCB_DRI2_GET_BUFFERS 5
00215
00219 typedef struct xcb_dri2_get_buffers_request_t {
00220 uint8_t major_opcode;
00221 uint8_t minor_opcode;
00222 uint16_t length;
00223 xcb_drawable_t drawable;
00224 uint32_t count;
00225 } xcb_dri2_get_buffers_request_t;
00226
00230 typedef struct xcb_dri2_get_buffers_reply_t {
00231 uint8_t response_type;
00232 uint8_t pad0;
00233 uint16_t sequence;
00234 uint32_t length;
00235 uint32_t width;
00236 uint32_t height;
00237 uint32_t count;
00238 uint8_t pad1[12];
00239 } xcb_dri2_get_buffers_reply_t;
00240
00244 typedef struct xcb_dri2_copy_region_cookie_t {
00245 unsigned int sequence;
00246 } xcb_dri2_copy_region_cookie_t;
00247
00249 #define XCB_DRI2_COPY_REGION 6
00250
00254 typedef struct xcb_dri2_copy_region_request_t {
00255 uint8_t major_opcode;
00256 uint8_t minor_opcode;
00257 uint16_t length;
00258 xcb_drawable_t drawable;
00259 uint32_t region;
00260 uint32_t dest;
00261 uint32_t src;
00262 } xcb_dri2_copy_region_request_t;
00263
00267 typedef struct xcb_dri2_copy_region_reply_t {
00268 uint8_t response_type;
00269 uint8_t pad0;
00270 uint16_t sequence;
00271 uint32_t length;
00272 } xcb_dri2_copy_region_reply_t;
00273
00277 typedef struct xcb_dri2_get_buffers_with_format_cookie_t {
00278 unsigned int sequence;
00279 } xcb_dri2_get_buffers_with_format_cookie_t;
00280
00282 #define XCB_DRI2_GET_BUFFERS_WITH_FORMAT 7
00283
00287 typedef struct xcb_dri2_get_buffers_with_format_request_t {
00288 uint8_t major_opcode;
00289 uint8_t minor_opcode;
00290 uint16_t length;
00291 xcb_drawable_t drawable;
00292 uint32_t count;
00293 } xcb_dri2_get_buffers_with_format_request_t;
00294
00298 typedef struct xcb_dri2_get_buffers_with_format_reply_t {
00299 uint8_t response_type;
00300 uint8_t pad0;
00301 uint16_t sequence;
00302 uint32_t length;
00303 uint32_t width;
00304 uint32_t height;
00305 uint32_t count;
00306 uint8_t pad1[12];
00307 } xcb_dri2_get_buffers_with_format_reply_t;
00308
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327 void
00328 xcb_dri2_dri2_buffer_next (xcb_dri2_dri2_buffer_iterator_t *i );
00329
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349 xcb_generic_iterator_t
00350 xcb_dri2_dri2_buffer_end (xcb_dri2_dri2_buffer_iterator_t i );
00351
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370 void
00371 xcb_dri2_attach_format_next (xcb_dri2_attach_format_iterator_t *i );
00372
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392 xcb_generic_iterator_t
00393 xcb_dri2_attach_format_end (xcb_dri2_attach_format_iterator_t i );
00394
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415 xcb_dri2_query_version_cookie_t
00416 xcb_dri2_query_version (xcb_connection_t *c ,
00417 uint32_t major_version ,
00418 uint32_t minor_version );
00419
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443 xcb_dri2_query_version_cookie_t
00444 xcb_dri2_query_version_unchecked (xcb_connection_t *c ,
00445 uint32_t major_version ,
00446 uint32_t minor_version );
00447
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474 xcb_dri2_query_version_reply_t *
00475 xcb_dri2_query_version_reply (xcb_connection_t *c ,
00476 xcb_dri2_query_version_cookie_t cookie ,
00477 xcb_generic_error_t **e );
00478
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499 xcb_dri2_connect_cookie_t
00500 xcb_dri2_connect (xcb_connection_t *c ,
00501 xcb_window_t window ,
00502 uint32_t driver_type );
00503
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527 xcb_dri2_connect_cookie_t
00528 xcb_dri2_connect_unchecked (xcb_connection_t *c ,
00529 xcb_window_t window ,
00530 uint32_t driver_type );
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542 char *
00543 xcb_dri2_connect_driver_name (const xcb_dri2_connect_reply_t *R );
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555 int
00556 xcb_dri2_connect_driver_name_length (const xcb_dri2_connect_reply_t *R );
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568 xcb_generic_iterator_t
00569 xcb_dri2_connect_driver_name_end (const xcb_dri2_connect_reply_t *R );
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581 void *
00582 xcb_dri2_connect_alignment_pad (const xcb_dri2_connect_reply_t *R );
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594 int
00595 xcb_dri2_connect_alignment_pad_length (const xcb_dri2_connect_reply_t *R );
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607 xcb_generic_iterator_t
00608 xcb_dri2_connect_alignment_pad_end (const xcb_dri2_connect_reply_t *R );
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620 char *
00621 xcb_dri2_connect_device_name (const xcb_dri2_connect_reply_t *R );
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633 int
00634 xcb_dri2_connect_device_name_length (const xcb_dri2_connect_reply_t *R );
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646 xcb_generic_iterator_t
00647 xcb_dri2_connect_device_name_end (const xcb_dri2_connect_reply_t *R );
00648
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675 xcb_dri2_connect_reply_t *
00676 xcb_dri2_connect_reply (xcb_connection_t *c ,
00677 xcb_dri2_connect_cookie_t cookie ,
00678 xcb_generic_error_t **e );
00679
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700 xcb_dri2_authenticate_cookie_t
00701 xcb_dri2_authenticate (xcb_connection_t *c ,
00702 xcb_window_t window ,
00703 uint32_t magic );
00704
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728 xcb_dri2_authenticate_cookie_t
00729 xcb_dri2_authenticate_unchecked (xcb_connection_t *c ,
00730 xcb_window_t window ,
00731 uint32_t magic );
00732
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759 xcb_dri2_authenticate_reply_t *
00760 xcb_dri2_authenticate_reply (xcb_connection_t *c ,
00761 xcb_dri2_authenticate_cookie_t cookie ,
00762 xcb_generic_error_t **e );
00763
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786 xcb_void_cookie_t
00787 xcb_dri2_create_drawable_checked (xcb_connection_t *c ,
00788 xcb_drawable_t drawable );
00789
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809 xcb_void_cookie_t
00810 xcb_dri2_create_drawable (xcb_connection_t *c ,
00811 xcb_drawable_t drawable );
00812
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835 xcb_void_cookie_t
00836 xcb_dri2_destroy_drawable_checked (xcb_connection_t *c ,
00837 xcb_drawable_t drawable );
00838
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857
00858 xcb_void_cookie_t
00859 xcb_dri2_destroy_drawable (xcb_connection_t *c ,
00860 xcb_drawable_t drawable );
00861
00871
00872
00873
00874
00875
00876
00877
00878
00879
00880
00881
00882
00883
00884 xcb_dri2_get_buffers_cookie_t
00885 xcb_dri2_get_buffers (xcb_connection_t *c ,
00886 xcb_drawable_t drawable ,
00887 uint32_t count ,
00888 uint32_t attachments_len ,
00889 const uint32_t *attachments );
00890
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916 xcb_dri2_get_buffers_cookie_t
00917 xcb_dri2_get_buffers_unchecked (xcb_connection_t *c ,
00918 xcb_drawable_t drawable ,
00919 uint32_t count ,
00920 uint32_t attachments_len ,
00921 const uint32_t *attachments );
00922
00923
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933 xcb_dri2_dri2_buffer_t *
00934 xcb_dri2_get_buffers_buffers (const xcb_dri2_get_buffers_reply_t *R );
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946 int
00947 xcb_dri2_get_buffers_buffers_length (const xcb_dri2_get_buffers_reply_t *R );
00948
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959 xcb_dri2_dri2_buffer_iterator_t
00960 xcb_dri2_get_buffers_buffers_iterator (const xcb_dri2_get_buffers_reply_t *R );
00961
00977
00978
00979
00980
00981
00982
00983
00984
00985
00986
00987
00988 xcb_dri2_get_buffers_reply_t *
00989 xcb_dri2_get_buffers_reply (xcb_connection_t *c ,
00990 xcb_dri2_get_buffers_cookie_t cookie ,
00991 xcb_generic_error_t **e );
00992
01002
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013
01014
01015 xcb_dri2_copy_region_cookie_t
01016 xcb_dri2_copy_region (xcb_connection_t *c ,
01017 xcb_drawable_t drawable ,
01018 uint32_t region ,
01019 uint32_t dest ,
01020 uint32_t src );
01021
01034
01035
01036
01037
01038
01039
01040
01041
01042
01043
01044
01045
01046
01047 xcb_dri2_copy_region_cookie_t
01048 xcb_dri2_copy_region_unchecked (xcb_connection_t *c ,
01049 xcb_drawable_t drawable ,
01050 uint32_t region ,
01051 uint32_t dest ,
01052 uint32_t src );
01053
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079
01080 xcb_dri2_copy_region_reply_t *
01081 xcb_dri2_copy_region_reply (xcb_connection_t *c ,
01082 xcb_dri2_copy_region_cookie_t cookie ,
01083 xcb_generic_error_t **e );
01084
01094
01095
01096
01097
01098
01099
01100
01101
01102
01103
01104
01105
01106
01107 xcb_dri2_get_buffers_with_format_cookie_t
01108 xcb_dri2_get_buffers_with_format (xcb_connection_t *c ,
01109 xcb_drawable_t drawable ,
01110 uint32_t count ,
01111 uint32_t attachments_len ,
01112 const xcb_dri2_attach_format_t *attachments );
01113
01126
01127
01128
01129
01130
01131
01132
01133
01134
01135
01136
01137
01138
01139 xcb_dri2_get_buffers_with_format_cookie_t
01140 xcb_dri2_get_buffers_with_format_unchecked (xcb_connection_t *c ,
01141 xcb_drawable_t drawable ,
01142 uint32_t count ,
01143 uint32_t attachments_len ,
01144 const xcb_dri2_attach_format_t *attachments );
01145
01146
01147
01148
01149
01150
01151
01152
01153
01154
01155
01156 xcb_dri2_dri2_buffer_t *
01157 xcb_dri2_get_buffers_with_format_buffers (const xcb_dri2_get_buffers_with_format_reply_t *R );
01158
01159
01160
01161
01162
01163
01164
01165
01166
01167
01168
01169 int
01170 xcb_dri2_get_buffers_with_format_buffers_length (const xcb_dri2_get_buffers_with_format_reply_t *R );
01171
01172
01173
01174
01175
01176
01177
01178
01179
01180
01181
01182 xcb_dri2_dri2_buffer_iterator_t
01183 xcb_dri2_get_buffers_with_format_buffers_iterator (const xcb_dri2_get_buffers_with_format_reply_t *R );
01184
01200
01201
01202
01203
01204
01205
01206
01207
01208
01209
01210
01211 xcb_dri2_get_buffers_with_format_reply_t *
01212 xcb_dri2_get_buffers_with_format_reply (xcb_connection_t *c ,
01213 xcb_dri2_get_buffers_with_format_cookie_t cookie ,
01214 xcb_generic_error_t **e );
01215
01216
01217 #ifdef __cplusplus
01218 }
01219 #endif
01220
01221 #endif
01222