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 char *
00582 xcb_dri2_connect_device_name (const xcb_dri2_connect_reply_t *R );
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594 int
00595 xcb_dri2_connect_device_name_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_device_name_end (const xcb_dri2_connect_reply_t *R );
00609
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636 xcb_dri2_connect_reply_t *
00637 xcb_dri2_connect_reply (xcb_connection_t *c ,
00638 xcb_dri2_connect_cookie_t cookie ,
00639 xcb_generic_error_t **e );
00640
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661 xcb_dri2_authenticate_cookie_t
00662 xcb_dri2_authenticate (xcb_connection_t *c ,
00663 xcb_window_t window ,
00664 uint32_t magic );
00665
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689 xcb_dri2_authenticate_cookie_t
00690 xcb_dri2_authenticate_unchecked (xcb_connection_t *c ,
00691 xcb_window_t window ,
00692 uint32_t magic );
00693
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720 xcb_dri2_authenticate_reply_t *
00721 xcb_dri2_authenticate_reply (xcb_connection_t *c ,
00722 xcb_dri2_authenticate_cookie_t cookie ,
00723 xcb_generic_error_t **e );
00724
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747 xcb_void_cookie_t
00748 xcb_dri2_create_drawable_checked (xcb_connection_t *c ,
00749 xcb_drawable_t drawable );
00750
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770 xcb_void_cookie_t
00771 xcb_dri2_create_drawable (xcb_connection_t *c ,
00772 xcb_drawable_t drawable );
00773
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796 xcb_void_cookie_t
00797 xcb_dri2_destroy_drawable_checked (xcb_connection_t *c ,
00798 xcb_drawable_t drawable );
00799
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819 xcb_void_cookie_t
00820 xcb_dri2_destroy_drawable (xcb_connection_t *c ,
00821 xcb_drawable_t drawable );
00822
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845 xcb_dri2_get_buffers_cookie_t
00846 xcb_dri2_get_buffers (xcb_connection_t *c ,
00847 xcb_drawable_t drawable ,
00848 uint32_t count ,
00849 uint32_t attachments_len ,
00850 const uint32_t *attachments );
00851
00864
00865
00866
00867
00868
00869
00870
00871
00872
00873
00874
00875
00876
00877 xcb_dri2_get_buffers_cookie_t
00878 xcb_dri2_get_buffers_unchecked (xcb_connection_t *c ,
00879 xcb_drawable_t drawable ,
00880 uint32_t count ,
00881 uint32_t attachments_len ,
00882 const uint32_t *attachments );
00883
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894 xcb_dri2_dri2_buffer_t *
00895 xcb_dri2_get_buffers_buffers (const xcb_dri2_get_buffers_reply_t *R );
00896
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907 int
00908 xcb_dri2_get_buffers_buffers_length (const xcb_dri2_get_buffers_reply_t *R );
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920 xcb_dri2_dri2_buffer_iterator_t
00921 xcb_dri2_get_buffers_buffers_iterator (const xcb_dri2_get_buffers_reply_t *R );
00922
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949 xcb_dri2_get_buffers_reply_t *
00950 xcb_dri2_get_buffers_reply (xcb_connection_t *c ,
00951 xcb_dri2_get_buffers_cookie_t cookie ,
00952 xcb_generic_error_t **e );
00953
00963
00964
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976 xcb_dri2_copy_region_cookie_t
00977 xcb_dri2_copy_region (xcb_connection_t *c ,
00978 xcb_drawable_t drawable ,
00979 uint32_t region ,
00980 uint32_t dest ,
00981 uint32_t src );
00982
00995
00996
00997
00998
00999
01000
01001
01002
01003
01004
01005
01006
01007
01008 xcb_dri2_copy_region_cookie_t
01009 xcb_dri2_copy_region_unchecked (xcb_connection_t *c ,
01010 xcb_drawable_t drawable ,
01011 uint32_t region ,
01012 uint32_t dest ,
01013 uint32_t src );
01014
01030
01031
01032
01033
01034
01035
01036
01037
01038
01039
01040
01041 xcb_dri2_copy_region_reply_t *
01042 xcb_dri2_copy_region_reply (xcb_connection_t *c ,
01043 xcb_dri2_copy_region_cookie_t cookie ,
01044 xcb_generic_error_t **e );
01045
01055
01056
01057
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068 xcb_dri2_get_buffers_with_format_cookie_t
01069 xcb_dri2_get_buffers_with_format (xcb_connection_t *c ,
01070 xcb_drawable_t drawable ,
01071 uint32_t count ,
01072 uint32_t attachments_len ,
01073 const xcb_dri2_attach_format_t *attachments );
01074
01087
01088
01089
01090
01091
01092
01093
01094
01095
01096
01097
01098
01099
01100 xcb_dri2_get_buffers_with_format_cookie_t
01101 xcb_dri2_get_buffers_with_format_unchecked (xcb_connection_t *c ,
01102 xcb_drawable_t drawable ,
01103 uint32_t count ,
01104 uint32_t attachments_len ,
01105 const xcb_dri2_attach_format_t *attachments );
01106
01107
01108
01109
01110
01111
01112
01113
01114
01115
01116
01117 xcb_dri2_dri2_buffer_t *
01118 xcb_dri2_get_buffers_with_format_buffers (const xcb_dri2_get_buffers_with_format_reply_t *R );
01119
01120
01121
01122
01123
01124
01125
01126
01127
01128
01129
01130 int
01131 xcb_dri2_get_buffers_with_format_buffers_length (const xcb_dri2_get_buffers_with_format_reply_t *R );
01132
01133
01134
01135
01136
01137
01138
01139
01140
01141
01142
01143 xcb_dri2_dri2_buffer_iterator_t
01144 xcb_dri2_get_buffers_with_format_buffers_iterator (const xcb_dri2_get_buffers_with_format_reply_t *R );
01145
01161
01162
01163
01164
01165
01166
01167
01168
01169
01170
01171
01172 xcb_dri2_get_buffers_with_format_reply_t *
01173 xcb_dri2_get_buffers_with_format_reply (xcb_connection_t *c ,
01174 xcb_dri2_get_buffers_with_format_cookie_t cookie ,
01175 xcb_generic_error_t **e );
01176
01177
01178 #ifdef __cplusplus
01179 }
01180 #endif
01181
01182 #endif
01183