1 /* 2 * This file generated automatically from dri3.xml by c_client.py. 3 * Edit at your peril. 4 */ 5 6 /** 7 * @defgroup XCB_DRI3_API XCB DRI3 API 8 * @brief DRI3 XCB Protocol Implementation. 9 * @{ 10 **/ 11 12 #ifndef __DRI3_H 13 #define __DRI3_H 14 15 #include "xcb.h" 16 #include "xproto.h" 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 #define XCB_DRI3_MAJOR_VERSION 1 23 #define XCB_DRI3_MINOR_VERSION 0 24 25 extern xcb_extension_t xcb_dri3_id; 26 27 /** 28 * @brief xcb_dri3_query_version_cookie_t 29 **/ 30 typedef struct xcb_dri3_query_version_cookie_t { 31 unsigned int sequence; /**< */ 32 } xcb_dri3_query_version_cookie_t; 33 34 /** Opcode for xcb_dri3_query_version. */ 35 #define XCB_DRI3_QUERY_VERSION 0 36 37 /** 38 * @brief xcb_dri3_query_version_request_t 39 **/ 40 typedef struct xcb_dri3_query_version_request_t { 41 uint8_t major_opcode; /**< */ 42 uint8_t minor_opcode; /**< */ 43 uint16_t length; /**< */ 44 uint32_t major_version; /**< */ 45 uint32_t minor_version; /**< */ 46 } xcb_dri3_query_version_request_t; 47 48 /** 49 * @brief xcb_dri3_query_version_reply_t 50 **/ 51 typedef struct xcb_dri3_query_version_reply_t { 52 uint8_t response_type; /**< */ 53 uint8_t pad0; /**< */ 54 uint16_t sequence; /**< */ 55 uint32_t length; /**< */ 56 uint32_t major_version; /**< */ 57 uint32_t minor_version; /**< */ 58 } xcb_dri3_query_version_reply_t; 59 60 /** 61 * @brief xcb_dri3_open_cookie_t 62 **/ 63 typedef struct xcb_dri3_open_cookie_t { 64 unsigned int sequence; /**< */ 65 } xcb_dri3_open_cookie_t; 66 67 /** Opcode for xcb_dri3_open. */ 68 #define XCB_DRI3_OPEN 1 69 70 /** 71 * @brief xcb_dri3_open_request_t 72 **/ 73 typedef struct xcb_dri3_open_request_t { 74 uint8_t major_opcode; /**< */ 75 uint8_t minor_opcode; /**< */ 76 uint16_t length; /**< */ 77 xcb_drawable_t drawable; /**< */ 78 uint32_t provider; /**< */ 79 } xcb_dri3_open_request_t; 80 81 /** 82 * @brief xcb_dri3_open_reply_t 83 **/ 84 typedef struct xcb_dri3_open_reply_t { 85 uint8_t response_type; /**< */ 86 uint8_t nfd; /**< */ 87 uint16_t sequence; /**< */ 88 uint32_t length; /**< */ 89 uint8_t pad0[24]; /**< */ 90 } xcb_dri3_open_reply_t; 91 92 /** Opcode for xcb_dri3_pixmap_from_buffer. */ 93 #define XCB_DRI3_PIXMAP_FROM_BUFFER 2 94 95 /** 96 * @brief xcb_dri3_pixmap_from_buffer_request_t 97 **/ 98 typedef struct xcb_dri3_pixmap_from_buffer_request_t { 99 uint8_t major_opcode; /**< */ 100 uint8_t minor_opcode; /**< */ 101 uint16_t length; /**< */ 102 xcb_pixmap_t pixmap; /**< */ 103 xcb_drawable_t drawable; /**< */ 104 uint32_t size; /**< */ 105 uint16_t width; /**< */ 106 uint16_t height; /**< */ 107 uint16_t stride; /**< */ 108 uint8_t depth; /**< */ 109 uint8_t bpp; /**< */ 110 } xcb_dri3_pixmap_from_buffer_request_t; 111 112 /** 113 * @brief xcb_dri3_buffer_from_pixmap_cookie_t 114 **/ 115 typedef struct xcb_dri3_buffer_from_pixmap_cookie_t { 116 unsigned int sequence; /**< */ 117 } xcb_dri3_buffer_from_pixmap_cookie_t; 118 119 /** Opcode for xcb_dri3_buffer_from_pixmap. */ 120 #define XCB_DRI3_BUFFER_FROM_PIXMAP 3 121 122 /** 123 * @brief xcb_dri3_buffer_from_pixmap_request_t 124 **/ 125 typedef struct xcb_dri3_buffer_from_pixmap_request_t { 126 uint8_t major_opcode; /**< */ 127 uint8_t minor_opcode; /**< */ 128 uint16_t length; /**< */ 129 xcb_pixmap_t pixmap; /**< */ 130 } xcb_dri3_buffer_from_pixmap_request_t; 131 132 /** 133 * @brief xcb_dri3_buffer_from_pixmap_reply_t 134 **/ 135 typedef struct xcb_dri3_buffer_from_pixmap_reply_t { 136 uint8_t response_type; /**< */ 137 uint8_t nfd; /**< */ 138 uint16_t sequence; /**< */ 139 uint32_t length; /**< */ 140 uint32_t size; /**< */ 141 uint16_t width; /**< */ 142 uint16_t height; /**< */ 143 uint16_t stride; /**< */ 144 uint8_t depth; /**< */ 145 uint8_t bpp; /**< */ 146 uint8_t pad0[12]; /**< */ 147 } xcb_dri3_buffer_from_pixmap_reply_t; 148 149 /** Opcode for xcb_dri3_fence_from_fd. */ 150 #define XCB_DRI3_FENCE_FROM_FD 4 151 152 /** 153 * @brief xcb_dri3_fence_from_fd_request_t 154 **/ 155 typedef struct xcb_dri3_fence_from_fd_request_t { 156 uint8_t major_opcode; /**< */ 157 uint8_t minor_opcode; /**< */ 158 uint16_t length; /**< */ 159 xcb_drawable_t drawable; /**< */ 160 uint32_t fence; /**< */ 161 uint8_t initially_triggered; /**< */ 162 uint8_t pad0[3]; /**< */ 163 } xcb_dri3_fence_from_fd_request_t; 164 165 /** 166 * @brief xcb_dri3_fd_from_fence_cookie_t 167 **/ 168 typedef struct xcb_dri3_fd_from_fence_cookie_t { 169 unsigned int sequence; /**< */ 170 } xcb_dri3_fd_from_fence_cookie_t; 171 172 /** Opcode for xcb_dri3_fd_from_fence. */ 173 #define XCB_DRI3_FD_FROM_FENCE 5 174 175 /** 176 * @brief xcb_dri3_fd_from_fence_request_t 177 **/ 178 typedef struct xcb_dri3_fd_from_fence_request_t { 179 uint8_t major_opcode; /**< */ 180 uint8_t minor_opcode; /**< */ 181 uint16_t length; /**< */ 182 xcb_drawable_t drawable; /**< */ 183 uint32_t fence; /**< */ 184 } xcb_dri3_fd_from_fence_request_t; 185 186 /** 187 * @brief xcb_dri3_fd_from_fence_reply_t 188 **/ 189 typedef struct xcb_dri3_fd_from_fence_reply_t { 190 uint8_t response_type; /**< */ 191 uint8_t nfd; /**< */ 192 uint16_t sequence; /**< */ 193 uint32_t length; /**< */ 194 uint8_t pad0[24]; /**< */ 195 } xcb_dri3_fd_from_fence_reply_t; 196 197 /** 198 * 199 * @param c The connection 200 * @return A cookie 201 * 202 * Delivers a request to the X server. 203 * 204 */ 205 xcb_dri3_query_version_cookie_t 206 xcb_dri3_query_version (xcb_connection_t *c /**< */, 207 uint32_t major_version /**< */, 208 uint32_t minor_version /**< */); 209 210 /** 211 * 212 * @param c The connection 213 * @return A cookie 214 * 215 * Delivers a request to the X server. 216 * 217 * This form can be used only if the request will cause 218 * a reply to be generated. Any returned error will be 219 * placed in the event queue. 220 */ 221 xcb_dri3_query_version_cookie_t 222 xcb_dri3_query_version_unchecked (xcb_connection_t *c /**< */, 223 uint32_t major_version /**< */, 224 uint32_t minor_version /**< */); 225 226 /** 227 * Return the reply 228 * @param c The connection 229 * @param cookie The cookie 230 * @param e The xcb_generic_error_t supplied 231 * 232 * Returns the reply of the request asked by 233 * 234 * The parameter @p e supplied to this function must be NULL if 235 * xcb_dri3_query_version_unchecked(). is used. 236 * Otherwise, it stores the error if any. 237 * 238 * The returned value must be freed by the caller using free(). 239 */ 240 xcb_dri3_query_version_reply_t * 241 xcb_dri3_query_version_reply (xcb_connection_t *c /**< */, 242 xcb_dri3_query_version_cookie_t cookie /**< */, 243 xcb_generic_error_t **e /**< */); 244 245 /** 246 * 247 * @param c The connection 248 * @return A cookie 249 * 250 * Delivers a request to the X server. 251 * 252 */ 253 xcb_dri3_open_cookie_t 254 xcb_dri3_open (xcb_connection_t *c /**< */, 255 xcb_drawable_t drawable /**< */, 256 uint32_t provider /**< */); 257 258 /** 259 * 260 * @param c The connection 261 * @return A cookie 262 * 263 * Delivers a request to the X server. 264 * 265 * This form can be used only if the request will cause 266 * a reply to be generated. Any returned error will be 267 * placed in the event queue. 268 */ 269 xcb_dri3_open_cookie_t 270 xcb_dri3_open_unchecked (xcb_connection_t *c /**< */, 271 xcb_drawable_t drawable /**< */, 272 uint32_t provider /**< */); 273 274 /** 275 * Return the reply 276 * @param c The connection 277 * @param cookie The cookie 278 * @param e The xcb_generic_error_t supplied 279 * 280 * Returns the reply of the request asked by 281 * 282 * The parameter @p e supplied to this function must be NULL if 283 * xcb_dri3_open_unchecked(). is used. 284 * Otherwise, it stores the error if any. 285 * 286 * The returned value must be freed by the caller using free(). 287 */ 288 xcb_dri3_open_reply_t * 289 xcb_dri3_open_reply (xcb_connection_t *c /**< */, 290 xcb_dri3_open_cookie_t cookie /**< */, 291 xcb_generic_error_t **e /**< */); 292 293 /** 294 * Return the reply fds 295 * @param c The connection 296 * @param reply The reply 297 * 298 * Returns the array of reply fds of the request asked by 299 * 300 * The returned value must be freed by the caller using free(). 301 */ 302 int * 303 xcb_dri3_open_reply_fds (xcb_connection_t *c /**< */, 304 xcb_dri3_open_reply_t *reply /**< */); 305 306 /** 307 * 308 * @param c The connection 309 * @return A cookie 310 * 311 * Delivers a request to the X server. 312 * 313 * This form can be used only if the request will not cause 314 * a reply to be generated. Any returned error will be 315 * saved for handling by xcb_request_check(). 316 */ 317 xcb_void_cookie_t 318 xcb_dri3_pixmap_from_buffer_checked (xcb_connection_t *c /**< */, 319 xcb_pixmap_t pixmap /**< */, 320 xcb_drawable_t drawable /**< */, 321 uint32_t size /**< */, 322 uint16_t width /**< */, 323 uint16_t height /**< */, 324 uint16_t stride /**< */, 325 uint8_t depth /**< */, 326 uint8_t bpp /**< */, 327 int32_t pixmap_fd /**< */); 328 329 /** 330 * 331 * @param c The connection 332 * @return A cookie 333 * 334 * Delivers a request to the X server. 335 * 336 */ 337 xcb_void_cookie_t 338 xcb_dri3_pixmap_from_buffer (xcb_connection_t *c /**< */, 339 xcb_pixmap_t pixmap /**< */, 340 xcb_drawable_t drawable /**< */, 341 uint32_t size /**< */, 342 uint16_t width /**< */, 343 uint16_t height /**< */, 344 uint16_t stride /**< */, 345 uint8_t depth /**< */, 346 uint8_t bpp /**< */, 347 int32_t pixmap_fd /**< */); 348 349 /** 350 * 351 * @param c The connection 352 * @return A cookie 353 * 354 * Delivers a request to the X server. 355 * 356 */ 357 xcb_dri3_buffer_from_pixmap_cookie_t 358 xcb_dri3_buffer_from_pixmap (xcb_connection_t *c /**< */, 359 xcb_pixmap_t pixmap /**< */); 360 361 /** 362 * 363 * @param c The connection 364 * @return A cookie 365 * 366 * Delivers a request to the X server. 367 * 368 * This form can be used only if the request will cause 369 * a reply to be generated. Any returned error will be 370 * placed in the event queue. 371 */ 372 xcb_dri3_buffer_from_pixmap_cookie_t 373 xcb_dri3_buffer_from_pixmap_unchecked (xcb_connection_t *c /**< */, 374 xcb_pixmap_t pixmap /**< */); 375 376 /** 377 * Return the reply 378 * @param c The connection 379 * @param cookie The cookie 380 * @param e The xcb_generic_error_t supplied 381 * 382 * Returns the reply of the request asked by 383 * 384 * The parameter @p e supplied to this function must be NULL if 385 * xcb_dri3_buffer_from_pixmap_unchecked(). is used. 386 * Otherwise, it stores the error if any. 387 * 388 * The returned value must be freed by the caller using free(). 389 */ 390 xcb_dri3_buffer_from_pixmap_reply_t * 391 xcb_dri3_buffer_from_pixmap_reply (xcb_connection_t *c /**< */, 392 xcb_dri3_buffer_from_pixmap_cookie_t cookie /**< */, 393 xcb_generic_error_t **e /**< */); 394 395 /** 396 * Return the reply fds 397 * @param c The connection 398 * @param reply The reply 399 * 400 * Returns the array of reply fds of the request asked by 401 * 402 * The returned value must be freed by the caller using free(). 403 */ 404 int * 405 xcb_dri3_buffer_from_pixmap_reply_fds (xcb_connection_t *c /**< */, 406 xcb_dri3_buffer_from_pixmap_reply_t *reply /**< */); 407 408 /** 409 * 410 * @param c The connection 411 * @return A cookie 412 * 413 * Delivers a request to the X server. 414 * 415 * This form can be used only if the request will not cause 416 * a reply to be generated. Any returned error will be 417 * saved for handling by xcb_request_check(). 418 */ 419 xcb_void_cookie_t 420 xcb_dri3_fence_from_fd_checked (xcb_connection_t *c /**< */, 421 xcb_drawable_t drawable /**< */, 422 uint32_t fence /**< */, 423 uint8_t initially_triggered /**< */, 424 int32_t fence_fd /**< */); 425 426 /** 427 * 428 * @param c The connection 429 * @return A cookie 430 * 431 * Delivers a request to the X server. 432 * 433 */ 434 xcb_void_cookie_t 435 xcb_dri3_fence_from_fd (xcb_connection_t *c /**< */, 436 xcb_drawable_t drawable /**< */, 437 uint32_t fence /**< */, 438 uint8_t initially_triggered /**< */, 439 int32_t fence_fd /**< */); 440 441 /** 442 * 443 * @param c The connection 444 * @return A cookie 445 * 446 * Delivers a request to the X server. 447 * 448 */ 449 xcb_dri3_fd_from_fence_cookie_t 450 xcb_dri3_fd_from_fence (xcb_connection_t *c /**< */, 451 xcb_drawable_t drawable /**< */, 452 uint32_t fence /**< */); 453 454 /** 455 * 456 * @param c The connection 457 * @return A cookie 458 * 459 * Delivers a request to the X server. 460 * 461 * This form can be used only if the request will cause 462 * a reply to be generated. Any returned error will be 463 * placed in the event queue. 464 */ 465 xcb_dri3_fd_from_fence_cookie_t 466 xcb_dri3_fd_from_fence_unchecked (xcb_connection_t *c /**< */, 467 xcb_drawable_t drawable /**< */, 468 uint32_t fence /**< */); 469 470 /** 471 * Return the reply 472 * @param c The connection 473 * @param cookie The cookie 474 * @param e The xcb_generic_error_t supplied 475 * 476 * Returns the reply of the request asked by 477 * 478 * The parameter @p e supplied to this function must be NULL if 479 * xcb_dri3_fd_from_fence_unchecked(). is used. 480 * Otherwise, it stores the error if any. 481 * 482 * The returned value must be freed by the caller using free(). 483 */ 484 xcb_dri3_fd_from_fence_reply_t * 485 xcb_dri3_fd_from_fence_reply (xcb_connection_t *c /**< */, 486 xcb_dri3_fd_from_fence_cookie_t cookie /**< */, 487 xcb_generic_error_t **e /**< */); 488 489 /** 490 * Return the reply fds 491 * @param c The connection 492 * @param reply The reply 493 * 494 * Returns the array of reply fds of the request asked by 495 * 496 * The returned value must be freed by the caller using free(). 497 */ 498 int * 499 xcb_dri3_fd_from_fence_reply_fds (xcb_connection_t *c /**< */, 500 xcb_dri3_fd_from_fence_reply_t *reply /**< */); 501 502 503 #ifdef __cplusplus 504 } 505 #endif 506 507 #endif 508 509 /** 510 * @} 511 */ 512