00001
00002
00003
00004
00005
00012 #ifndef __DRI3_H
00013 #define __DRI3_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021
00022 #define XCB_DRI3_MAJOR_VERSION 1
00023 #define XCB_DRI3_MINOR_VERSION 0
00024
00025 extern xcb_extension_t xcb_dri3_id;
00026
00030 typedef struct xcb_dri3_query_version_cookie_t {
00031 unsigned int sequence;
00032 } xcb_dri3_query_version_cookie_t;
00033
00035 #define XCB_DRI3_QUERY_VERSION 0
00036
00040 typedef struct xcb_dri3_query_version_request_t {
00041 uint8_t major_opcode;
00042 uint8_t minor_opcode;
00043 uint16_t length;
00044 uint32_t major_version;
00045 uint32_t minor_version;
00046 } xcb_dri3_query_version_request_t;
00047
00051 typedef struct xcb_dri3_query_version_reply_t {
00052 uint8_t response_type;
00053 uint8_t pad0;
00054 uint16_t sequence;
00055 uint32_t length;
00056 uint32_t major_version;
00057 uint32_t minor_version;
00058 } xcb_dri3_query_version_reply_t;
00059
00063 typedef struct xcb_dri3_open_cookie_t {
00064 unsigned int sequence;
00065 } xcb_dri3_open_cookie_t;
00066
00068 #define XCB_DRI3_OPEN 1
00069
00073 typedef struct xcb_dri3_open_request_t {
00074 uint8_t major_opcode;
00075 uint8_t minor_opcode;
00076 uint16_t length;
00077 xcb_drawable_t drawable;
00078 uint32_t provider;
00079 } xcb_dri3_open_request_t;
00080
00084 typedef struct xcb_dri3_open_reply_t {
00085 uint8_t response_type;
00086 uint8_t nfd;
00087 uint16_t sequence;
00088 uint32_t length;
00089 uint8_t pad0[24];
00090 } xcb_dri3_open_reply_t;
00091
00093 #define XCB_DRI3_PIXMAP_FROM_BUFFER 2
00094
00098 typedef struct xcb_dri3_pixmap_from_buffer_request_t {
00099 uint8_t major_opcode;
00100 uint8_t minor_opcode;
00101 uint16_t length;
00102 xcb_pixmap_t pixmap;
00103 xcb_drawable_t drawable;
00104 uint32_t size;
00105 uint16_t width;
00106 uint16_t height;
00107 uint16_t stride;
00108 uint8_t depth;
00109 uint8_t bpp;
00110 } xcb_dri3_pixmap_from_buffer_request_t;
00111
00115 typedef struct xcb_dri3_buffer_from_pixmap_cookie_t {
00116 unsigned int sequence;
00117 } xcb_dri3_buffer_from_pixmap_cookie_t;
00118
00120 #define XCB_DRI3_BUFFER_FROM_PIXMAP 3
00121
00125 typedef struct xcb_dri3_buffer_from_pixmap_request_t {
00126 uint8_t major_opcode;
00127 uint8_t minor_opcode;
00128 uint16_t length;
00129 xcb_pixmap_t pixmap;
00130 } xcb_dri3_buffer_from_pixmap_request_t;
00131
00135 typedef struct xcb_dri3_buffer_from_pixmap_reply_t {
00136 uint8_t response_type;
00137 uint8_t nfd;
00138 uint16_t sequence;
00139 uint32_t length;
00140 uint32_t size;
00141 uint16_t width;
00142 uint16_t height;
00143 uint16_t stride;
00144 uint8_t depth;
00145 uint8_t bpp;
00146 uint8_t pad0[12];
00147 } xcb_dri3_buffer_from_pixmap_reply_t;
00148
00150 #define XCB_DRI3_FENCE_FROM_FD 4
00151
00155 typedef struct xcb_dri3_fence_from_fd_request_t {
00156 uint8_t major_opcode;
00157 uint8_t minor_opcode;
00158 uint16_t length;
00159 xcb_drawable_t drawable;
00160 uint32_t fence;
00161 uint8_t initially_triggered;
00162 uint8_t pad0[3];
00163 } xcb_dri3_fence_from_fd_request_t;
00164
00168 typedef struct xcb_dri3_fd_from_fence_cookie_t {
00169 unsigned int sequence;
00170 } xcb_dri3_fd_from_fence_cookie_t;
00171
00173 #define XCB_DRI3_FD_FROM_FENCE 5
00174
00178 typedef struct xcb_dri3_fd_from_fence_request_t {
00179 uint8_t major_opcode;
00180 uint8_t minor_opcode;
00181 uint16_t length;
00182 xcb_drawable_t drawable;
00183 uint32_t fence;
00184 } xcb_dri3_fd_from_fence_request_t;
00185
00189 typedef struct xcb_dri3_fd_from_fence_reply_t {
00190 uint8_t response_type;
00191 uint8_t nfd;
00192 uint16_t sequence;
00193 uint32_t length;
00194 uint8_t pad0[24];
00195 } xcb_dri3_fd_from_fence_reply_t;
00196
00205 xcb_dri3_query_version_cookie_t
00206 xcb_dri3_query_version (xcb_connection_t *c ,
00207 uint32_t major_version ,
00208 uint32_t minor_version );
00209
00221 xcb_dri3_query_version_cookie_t
00222 xcb_dri3_query_version_unchecked (xcb_connection_t *c ,
00223 uint32_t major_version ,
00224 uint32_t minor_version );
00225
00240 xcb_dri3_query_version_reply_t *
00241 xcb_dri3_query_version_reply (xcb_connection_t *c ,
00242 xcb_dri3_query_version_cookie_t cookie ,
00243 xcb_generic_error_t **e );
00244
00253 xcb_dri3_open_cookie_t
00254 xcb_dri3_open (xcb_connection_t *c ,
00255 xcb_drawable_t drawable ,
00256 uint32_t provider );
00257
00269 xcb_dri3_open_cookie_t
00270 xcb_dri3_open_unchecked (xcb_connection_t *c ,
00271 xcb_drawable_t drawable ,
00272 uint32_t provider );
00273
00288 xcb_dri3_open_reply_t *
00289 xcb_dri3_open_reply (xcb_connection_t *c ,
00290 xcb_dri3_open_cookie_t cookie ,
00291 xcb_generic_error_t **e );
00292
00302 int *
00303 xcb_dri3_open_reply_fds (xcb_connection_t *c ,
00304 xcb_dri3_open_reply_t *reply );
00305
00317 xcb_void_cookie_t
00318 xcb_dri3_pixmap_from_buffer_checked (xcb_connection_t *c ,
00319 xcb_pixmap_t pixmap ,
00320 xcb_drawable_t drawable ,
00321 uint32_t size ,
00322 uint16_t width ,
00323 uint16_t height ,
00324 uint16_t stride ,
00325 uint8_t depth ,
00326 uint8_t bpp ,
00327 int32_t pixmap_fd );
00328
00337 xcb_void_cookie_t
00338 xcb_dri3_pixmap_from_buffer (xcb_connection_t *c ,
00339 xcb_pixmap_t pixmap ,
00340 xcb_drawable_t drawable ,
00341 uint32_t size ,
00342 uint16_t width ,
00343 uint16_t height ,
00344 uint16_t stride ,
00345 uint8_t depth ,
00346 uint8_t bpp ,
00347 int32_t pixmap_fd );
00348
00357 xcb_dri3_buffer_from_pixmap_cookie_t
00358 xcb_dri3_buffer_from_pixmap (xcb_connection_t *c ,
00359 xcb_pixmap_t pixmap );
00360
00372 xcb_dri3_buffer_from_pixmap_cookie_t
00373 xcb_dri3_buffer_from_pixmap_unchecked (xcb_connection_t *c ,
00374 xcb_pixmap_t pixmap );
00375
00390 xcb_dri3_buffer_from_pixmap_reply_t *
00391 xcb_dri3_buffer_from_pixmap_reply (xcb_connection_t *c ,
00392 xcb_dri3_buffer_from_pixmap_cookie_t cookie ,
00393 xcb_generic_error_t **e );
00394
00404 int *
00405 xcb_dri3_buffer_from_pixmap_reply_fds (xcb_connection_t *c ,
00406 xcb_dri3_buffer_from_pixmap_reply_t *reply );
00407
00419 xcb_void_cookie_t
00420 xcb_dri3_fence_from_fd_checked (xcb_connection_t *c ,
00421 xcb_drawable_t drawable ,
00422 uint32_t fence ,
00423 uint8_t initially_triggered ,
00424 int32_t fence_fd );
00425
00434 xcb_void_cookie_t
00435 xcb_dri3_fence_from_fd (xcb_connection_t *c ,
00436 xcb_drawable_t drawable ,
00437 uint32_t fence ,
00438 uint8_t initially_triggered ,
00439 int32_t fence_fd );
00440
00449 xcb_dri3_fd_from_fence_cookie_t
00450 xcb_dri3_fd_from_fence (xcb_connection_t *c ,
00451 xcb_drawable_t drawable ,
00452 uint32_t fence );
00453
00465 xcb_dri3_fd_from_fence_cookie_t
00466 xcb_dri3_fd_from_fence_unchecked (xcb_connection_t *c ,
00467 xcb_drawable_t drawable ,
00468 uint32_t fence );
00469
00484 xcb_dri3_fd_from_fence_reply_t *
00485 xcb_dri3_fd_from_fence_reply (xcb_connection_t *c ,
00486 xcb_dri3_fd_from_fence_cookie_t cookie ,
00487 xcb_generic_error_t **e );
00488
00498 int *
00499 xcb_dri3_fd_from_fence_reply_fds (xcb_connection_t *c ,
00500 xcb_dri3_fd_from_fence_reply_t *reply );
00501
00502
00503 #ifdef __cplusplus
00504 }
00505 #endif
00506
00507 #endif
00508