Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:36

0001 /*
0002  * This file generated automatically from dri2.xml by c_client.py.
0003  * Edit at your peril.
0004  */
0005 
0006 /**
0007  * @defgroup XCB_DRI2_API XCB DRI2 API
0008  * @brief DRI2 XCB Protocol Implementation.
0009  * @{
0010  **/
0011 
0012 #ifndef __DRI2_H
0013 #define __DRI2_H
0014 
0015 #include "xcb.h"
0016 #include "xproto.h"
0017 
0018 #ifdef __cplusplus
0019 extern "C" {
0020 #endif
0021 
0022 #define XCB_DRI2_MAJOR_VERSION 1
0023 #define XCB_DRI2_MINOR_VERSION 4
0024 
0025 extern xcb_extension_t xcb_dri2_id;
0026 
0027 typedef enum xcb_dri2_attachment_t {
0028     XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT = 0,
0029     XCB_DRI2_ATTACHMENT_BUFFER_BACK_LEFT = 1,
0030     XCB_DRI2_ATTACHMENT_BUFFER_FRONT_RIGHT = 2,
0031     XCB_DRI2_ATTACHMENT_BUFFER_BACK_RIGHT = 3,
0032     XCB_DRI2_ATTACHMENT_BUFFER_DEPTH = 4,
0033     XCB_DRI2_ATTACHMENT_BUFFER_STENCIL = 5,
0034     XCB_DRI2_ATTACHMENT_BUFFER_ACCUM = 6,
0035     XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT = 7,
0036     XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_RIGHT = 8,
0037     XCB_DRI2_ATTACHMENT_BUFFER_DEPTH_STENCIL = 9,
0038     XCB_DRI2_ATTACHMENT_BUFFER_HIZ = 10
0039 } xcb_dri2_attachment_t;
0040 
0041 typedef enum xcb_dri2_driver_type_t {
0042     XCB_DRI2_DRIVER_TYPE_DRI = 0,
0043     XCB_DRI2_DRIVER_TYPE_VDPAU = 1
0044 } xcb_dri2_driver_type_t;
0045 
0046 typedef enum xcb_dri2_event_type_t {
0047     XCB_DRI2_EVENT_TYPE_EXCHANGE_COMPLETE = 1,
0048     XCB_DRI2_EVENT_TYPE_BLIT_COMPLETE = 2,
0049     XCB_DRI2_EVENT_TYPE_FLIP_COMPLETE = 3
0050 } xcb_dri2_event_type_t;
0051 
0052 /**
0053  * @brief xcb_dri2_dri2_buffer_t
0054  **/
0055 typedef struct xcb_dri2_dri2_buffer_t {
0056     uint32_t attachment;
0057     uint32_t name;
0058     uint32_t pitch;
0059     uint32_t cpp;
0060     uint32_t flags;
0061 } xcb_dri2_dri2_buffer_t;
0062 
0063 /**
0064  * @brief xcb_dri2_dri2_buffer_iterator_t
0065  **/
0066 typedef struct xcb_dri2_dri2_buffer_iterator_t {
0067     xcb_dri2_dri2_buffer_t *data;
0068     int                     rem;
0069     int                     index;
0070 } xcb_dri2_dri2_buffer_iterator_t;
0071 
0072 /**
0073  * @brief xcb_dri2_attach_format_t
0074  **/
0075 typedef struct xcb_dri2_attach_format_t {
0076     uint32_t attachment;
0077     uint32_t format;
0078 } xcb_dri2_attach_format_t;
0079 
0080 /**
0081  * @brief xcb_dri2_attach_format_iterator_t
0082  **/
0083 typedef struct xcb_dri2_attach_format_iterator_t {
0084     xcb_dri2_attach_format_t *data;
0085     int                       rem;
0086     int                       index;
0087 } xcb_dri2_attach_format_iterator_t;
0088 
0089 /**
0090  * @brief xcb_dri2_query_version_cookie_t
0091  **/
0092 typedef struct xcb_dri2_query_version_cookie_t {
0093     unsigned int sequence;
0094 } xcb_dri2_query_version_cookie_t;
0095 
0096 /** Opcode for xcb_dri2_query_version. */
0097 #define XCB_DRI2_QUERY_VERSION 0
0098 
0099 /**
0100  * @brief xcb_dri2_query_version_request_t
0101  **/
0102 typedef struct xcb_dri2_query_version_request_t {
0103     uint8_t  major_opcode;
0104     uint8_t  minor_opcode;
0105     uint16_t length;
0106     uint32_t major_version;
0107     uint32_t minor_version;
0108 } xcb_dri2_query_version_request_t;
0109 
0110 /**
0111  * @brief xcb_dri2_query_version_reply_t
0112  **/
0113 typedef struct xcb_dri2_query_version_reply_t {
0114     uint8_t  response_type;
0115     uint8_t  pad0;
0116     uint16_t sequence;
0117     uint32_t length;
0118     uint32_t major_version;
0119     uint32_t minor_version;
0120 } xcb_dri2_query_version_reply_t;
0121 
0122 /**
0123  * @brief xcb_dri2_connect_cookie_t
0124  **/
0125 typedef struct xcb_dri2_connect_cookie_t {
0126     unsigned int sequence;
0127 } xcb_dri2_connect_cookie_t;
0128 
0129 /** Opcode for xcb_dri2_connect. */
0130 #define XCB_DRI2_CONNECT 1
0131 
0132 /**
0133  * @brief xcb_dri2_connect_request_t
0134  **/
0135 typedef struct xcb_dri2_connect_request_t {
0136     uint8_t      major_opcode;
0137     uint8_t      minor_opcode;
0138     uint16_t     length;
0139     xcb_window_t window;
0140     uint32_t     driver_type;
0141 } xcb_dri2_connect_request_t;
0142 
0143 /**
0144  * @brief xcb_dri2_connect_reply_t
0145  **/
0146 typedef struct xcb_dri2_connect_reply_t {
0147     uint8_t  response_type;
0148     uint8_t  pad0;
0149     uint16_t sequence;
0150     uint32_t length;
0151     uint32_t driver_name_length;
0152     uint32_t device_name_length;
0153     uint8_t  pad1[16];
0154 } xcb_dri2_connect_reply_t;
0155 
0156 /**
0157  * @brief xcb_dri2_authenticate_cookie_t
0158  **/
0159 typedef struct xcb_dri2_authenticate_cookie_t {
0160     unsigned int sequence;
0161 } xcb_dri2_authenticate_cookie_t;
0162 
0163 /** Opcode for xcb_dri2_authenticate. */
0164 #define XCB_DRI2_AUTHENTICATE 2
0165 
0166 /**
0167  * @brief xcb_dri2_authenticate_request_t
0168  **/
0169 typedef struct xcb_dri2_authenticate_request_t {
0170     uint8_t      major_opcode;
0171     uint8_t      minor_opcode;
0172     uint16_t     length;
0173     xcb_window_t window;
0174     uint32_t     magic;
0175 } xcb_dri2_authenticate_request_t;
0176 
0177 /**
0178  * @brief xcb_dri2_authenticate_reply_t
0179  **/
0180 typedef struct xcb_dri2_authenticate_reply_t {
0181     uint8_t  response_type;
0182     uint8_t  pad0;
0183     uint16_t sequence;
0184     uint32_t length;
0185     uint32_t authenticated;
0186 } xcb_dri2_authenticate_reply_t;
0187 
0188 /** Opcode for xcb_dri2_create_drawable. */
0189 #define XCB_DRI2_CREATE_DRAWABLE 3
0190 
0191 /**
0192  * @brief xcb_dri2_create_drawable_request_t
0193  **/
0194 typedef struct xcb_dri2_create_drawable_request_t {
0195     uint8_t        major_opcode;
0196     uint8_t        minor_opcode;
0197     uint16_t       length;
0198     xcb_drawable_t drawable;
0199 } xcb_dri2_create_drawable_request_t;
0200 
0201 /** Opcode for xcb_dri2_destroy_drawable. */
0202 #define XCB_DRI2_DESTROY_DRAWABLE 4
0203 
0204 /**
0205  * @brief xcb_dri2_destroy_drawable_request_t
0206  **/
0207 typedef struct xcb_dri2_destroy_drawable_request_t {
0208     uint8_t        major_opcode;
0209     uint8_t        minor_opcode;
0210     uint16_t       length;
0211     xcb_drawable_t drawable;
0212 } xcb_dri2_destroy_drawable_request_t;
0213 
0214 /**
0215  * @brief xcb_dri2_get_buffers_cookie_t
0216  **/
0217 typedef struct xcb_dri2_get_buffers_cookie_t {
0218     unsigned int sequence;
0219 } xcb_dri2_get_buffers_cookie_t;
0220 
0221 /** Opcode for xcb_dri2_get_buffers. */
0222 #define XCB_DRI2_GET_BUFFERS 5
0223 
0224 /**
0225  * @brief xcb_dri2_get_buffers_request_t
0226  **/
0227 typedef struct xcb_dri2_get_buffers_request_t {
0228     uint8_t        major_opcode;
0229     uint8_t        minor_opcode;
0230     uint16_t       length;
0231     xcb_drawable_t drawable;
0232     uint32_t       count;
0233 } xcb_dri2_get_buffers_request_t;
0234 
0235 /**
0236  * @brief xcb_dri2_get_buffers_reply_t
0237  **/
0238 typedef struct xcb_dri2_get_buffers_reply_t {
0239     uint8_t  response_type;
0240     uint8_t  pad0;
0241     uint16_t sequence;
0242     uint32_t length;
0243     uint32_t width;
0244     uint32_t height;
0245     uint32_t count;
0246     uint8_t  pad1[12];
0247 } xcb_dri2_get_buffers_reply_t;
0248 
0249 /**
0250  * @brief xcb_dri2_copy_region_cookie_t
0251  **/
0252 typedef struct xcb_dri2_copy_region_cookie_t {
0253     unsigned int sequence;
0254 } xcb_dri2_copy_region_cookie_t;
0255 
0256 /** Opcode for xcb_dri2_copy_region. */
0257 #define XCB_DRI2_COPY_REGION 6
0258 
0259 /**
0260  * @brief xcb_dri2_copy_region_request_t
0261  **/
0262 typedef struct xcb_dri2_copy_region_request_t {
0263     uint8_t        major_opcode;
0264     uint8_t        minor_opcode;
0265     uint16_t       length;
0266     xcb_drawable_t drawable;
0267     uint32_t       region;
0268     uint32_t       dest;
0269     uint32_t       src;
0270 } xcb_dri2_copy_region_request_t;
0271 
0272 /**
0273  * @brief xcb_dri2_copy_region_reply_t
0274  **/
0275 typedef struct xcb_dri2_copy_region_reply_t {
0276     uint8_t  response_type;
0277     uint8_t  pad0;
0278     uint16_t sequence;
0279     uint32_t length;
0280 } xcb_dri2_copy_region_reply_t;
0281 
0282 /**
0283  * @brief xcb_dri2_get_buffers_with_format_cookie_t
0284  **/
0285 typedef struct xcb_dri2_get_buffers_with_format_cookie_t {
0286     unsigned int sequence;
0287 } xcb_dri2_get_buffers_with_format_cookie_t;
0288 
0289 /** Opcode for xcb_dri2_get_buffers_with_format. */
0290 #define XCB_DRI2_GET_BUFFERS_WITH_FORMAT 7
0291 
0292 /**
0293  * @brief xcb_dri2_get_buffers_with_format_request_t
0294  **/
0295 typedef struct xcb_dri2_get_buffers_with_format_request_t {
0296     uint8_t        major_opcode;
0297     uint8_t        minor_opcode;
0298     uint16_t       length;
0299     xcb_drawable_t drawable;
0300     uint32_t       count;
0301 } xcb_dri2_get_buffers_with_format_request_t;
0302 
0303 /**
0304  * @brief xcb_dri2_get_buffers_with_format_reply_t
0305  **/
0306 typedef struct xcb_dri2_get_buffers_with_format_reply_t {
0307     uint8_t  response_type;
0308     uint8_t  pad0;
0309     uint16_t sequence;
0310     uint32_t length;
0311     uint32_t width;
0312     uint32_t height;
0313     uint32_t count;
0314     uint8_t  pad1[12];
0315 } xcb_dri2_get_buffers_with_format_reply_t;
0316 
0317 /**
0318  * @brief xcb_dri2_swap_buffers_cookie_t
0319  **/
0320 typedef struct xcb_dri2_swap_buffers_cookie_t {
0321     unsigned int sequence;
0322 } xcb_dri2_swap_buffers_cookie_t;
0323 
0324 /** Opcode for xcb_dri2_swap_buffers. */
0325 #define XCB_DRI2_SWAP_BUFFERS 8
0326 
0327 /**
0328  * @brief xcb_dri2_swap_buffers_request_t
0329  **/
0330 typedef struct xcb_dri2_swap_buffers_request_t {
0331     uint8_t        major_opcode;
0332     uint8_t        minor_opcode;
0333     uint16_t       length;
0334     xcb_drawable_t drawable;
0335     uint32_t       target_msc_hi;
0336     uint32_t       target_msc_lo;
0337     uint32_t       divisor_hi;
0338     uint32_t       divisor_lo;
0339     uint32_t       remainder_hi;
0340     uint32_t       remainder_lo;
0341 } xcb_dri2_swap_buffers_request_t;
0342 
0343 /**
0344  * @brief xcb_dri2_swap_buffers_reply_t
0345  **/
0346 typedef struct xcb_dri2_swap_buffers_reply_t {
0347     uint8_t  response_type;
0348     uint8_t  pad0;
0349     uint16_t sequence;
0350     uint32_t length;
0351     uint32_t swap_hi;
0352     uint32_t swap_lo;
0353 } xcb_dri2_swap_buffers_reply_t;
0354 
0355 /**
0356  * @brief xcb_dri2_get_msc_cookie_t
0357  **/
0358 typedef struct xcb_dri2_get_msc_cookie_t {
0359     unsigned int sequence;
0360 } xcb_dri2_get_msc_cookie_t;
0361 
0362 /** Opcode for xcb_dri2_get_msc. */
0363 #define XCB_DRI2_GET_MSC 9
0364 
0365 /**
0366  * @brief xcb_dri2_get_msc_request_t
0367  **/
0368 typedef struct xcb_dri2_get_msc_request_t {
0369     uint8_t        major_opcode;
0370     uint8_t        minor_opcode;
0371     uint16_t       length;
0372     xcb_drawable_t drawable;
0373 } xcb_dri2_get_msc_request_t;
0374 
0375 /**
0376  * @brief xcb_dri2_get_msc_reply_t
0377  **/
0378 typedef struct xcb_dri2_get_msc_reply_t {
0379     uint8_t  response_type;
0380     uint8_t  pad0;
0381     uint16_t sequence;
0382     uint32_t length;
0383     uint32_t ust_hi;
0384     uint32_t ust_lo;
0385     uint32_t msc_hi;
0386     uint32_t msc_lo;
0387     uint32_t sbc_hi;
0388     uint32_t sbc_lo;
0389 } xcb_dri2_get_msc_reply_t;
0390 
0391 /**
0392  * @brief xcb_dri2_wait_msc_cookie_t
0393  **/
0394 typedef struct xcb_dri2_wait_msc_cookie_t {
0395     unsigned int sequence;
0396 } xcb_dri2_wait_msc_cookie_t;
0397 
0398 /** Opcode for xcb_dri2_wait_msc. */
0399 #define XCB_DRI2_WAIT_MSC 10
0400 
0401 /**
0402  * @brief xcb_dri2_wait_msc_request_t
0403  **/
0404 typedef struct xcb_dri2_wait_msc_request_t {
0405     uint8_t        major_opcode;
0406     uint8_t        minor_opcode;
0407     uint16_t       length;
0408     xcb_drawable_t drawable;
0409     uint32_t       target_msc_hi;
0410     uint32_t       target_msc_lo;
0411     uint32_t       divisor_hi;
0412     uint32_t       divisor_lo;
0413     uint32_t       remainder_hi;
0414     uint32_t       remainder_lo;
0415 } xcb_dri2_wait_msc_request_t;
0416 
0417 /**
0418  * @brief xcb_dri2_wait_msc_reply_t
0419  **/
0420 typedef struct xcb_dri2_wait_msc_reply_t {
0421     uint8_t  response_type;
0422     uint8_t  pad0;
0423     uint16_t sequence;
0424     uint32_t length;
0425     uint32_t ust_hi;
0426     uint32_t ust_lo;
0427     uint32_t msc_hi;
0428     uint32_t msc_lo;
0429     uint32_t sbc_hi;
0430     uint32_t sbc_lo;
0431 } xcb_dri2_wait_msc_reply_t;
0432 
0433 /**
0434  * @brief xcb_dri2_wait_sbc_cookie_t
0435  **/
0436 typedef struct xcb_dri2_wait_sbc_cookie_t {
0437     unsigned int sequence;
0438 } xcb_dri2_wait_sbc_cookie_t;
0439 
0440 /** Opcode for xcb_dri2_wait_sbc. */
0441 #define XCB_DRI2_WAIT_SBC 11
0442 
0443 /**
0444  * @brief xcb_dri2_wait_sbc_request_t
0445  **/
0446 typedef struct xcb_dri2_wait_sbc_request_t {
0447     uint8_t        major_opcode;
0448     uint8_t        minor_opcode;
0449     uint16_t       length;
0450     xcb_drawable_t drawable;
0451     uint32_t       target_sbc_hi;
0452     uint32_t       target_sbc_lo;
0453 } xcb_dri2_wait_sbc_request_t;
0454 
0455 /**
0456  * @brief xcb_dri2_wait_sbc_reply_t
0457  **/
0458 typedef struct xcb_dri2_wait_sbc_reply_t {
0459     uint8_t  response_type;
0460     uint8_t  pad0;
0461     uint16_t sequence;
0462     uint32_t length;
0463     uint32_t ust_hi;
0464     uint32_t ust_lo;
0465     uint32_t msc_hi;
0466     uint32_t msc_lo;
0467     uint32_t sbc_hi;
0468     uint32_t sbc_lo;
0469 } xcb_dri2_wait_sbc_reply_t;
0470 
0471 /** Opcode for xcb_dri2_swap_interval. */
0472 #define XCB_DRI2_SWAP_INTERVAL 12
0473 
0474 /**
0475  * @brief xcb_dri2_swap_interval_request_t
0476  **/
0477 typedef struct xcb_dri2_swap_interval_request_t {
0478     uint8_t        major_opcode;
0479     uint8_t        minor_opcode;
0480     uint16_t       length;
0481     xcb_drawable_t drawable;
0482     uint32_t       interval;
0483 } xcb_dri2_swap_interval_request_t;
0484 
0485 /**
0486  * @brief xcb_dri2_get_param_cookie_t
0487  **/
0488 typedef struct xcb_dri2_get_param_cookie_t {
0489     unsigned int sequence;
0490 } xcb_dri2_get_param_cookie_t;
0491 
0492 /** Opcode for xcb_dri2_get_param. */
0493 #define XCB_DRI2_GET_PARAM 13
0494 
0495 /**
0496  * @brief xcb_dri2_get_param_request_t
0497  **/
0498 typedef struct xcb_dri2_get_param_request_t {
0499     uint8_t        major_opcode;
0500     uint8_t        minor_opcode;
0501     uint16_t       length;
0502     xcb_drawable_t drawable;
0503     uint32_t       param;
0504 } xcb_dri2_get_param_request_t;
0505 
0506 /**
0507  * @brief xcb_dri2_get_param_reply_t
0508  **/
0509 typedef struct xcb_dri2_get_param_reply_t {
0510     uint8_t  response_type;
0511     uint8_t  is_param_recognized;
0512     uint16_t sequence;
0513     uint32_t length;
0514     uint32_t value_hi;
0515     uint32_t value_lo;
0516 } xcb_dri2_get_param_reply_t;
0517 
0518 /** Opcode for xcb_dri2_buffer_swap_complete. */
0519 #define XCB_DRI2_BUFFER_SWAP_COMPLETE 0
0520 
0521 /**
0522  * @brief xcb_dri2_buffer_swap_complete_event_t
0523  **/
0524 typedef struct xcb_dri2_buffer_swap_complete_event_t {
0525     uint8_t        response_type;
0526     uint8_t        pad0;
0527     uint16_t       sequence;
0528     uint16_t       event_type;
0529     uint8_t        pad1[2];
0530     xcb_drawable_t drawable;
0531     uint32_t       ust_hi;
0532     uint32_t       ust_lo;
0533     uint32_t       msc_hi;
0534     uint32_t       msc_lo;
0535     uint32_t       sbc;
0536 } xcb_dri2_buffer_swap_complete_event_t;
0537 
0538 /** Opcode for xcb_dri2_invalidate_buffers. */
0539 #define XCB_DRI2_INVALIDATE_BUFFERS 1
0540 
0541 /**
0542  * @brief xcb_dri2_invalidate_buffers_event_t
0543  **/
0544 typedef struct xcb_dri2_invalidate_buffers_event_t {
0545     uint8_t        response_type;
0546     uint8_t        pad0;
0547     uint16_t       sequence;
0548     xcb_drawable_t drawable;
0549 } xcb_dri2_invalidate_buffers_event_t;
0550 
0551 /**
0552  * Get the next element of the iterator
0553  * @param i Pointer to a xcb_dri2_dri2_buffer_iterator_t
0554  *
0555  * Get the next element in the iterator. The member rem is
0556  * decreased by one. The member data points to the next
0557  * element. The member index is increased by sizeof(xcb_dri2_dri2_buffer_t)
0558  */
0559 void
0560 xcb_dri2_dri2_buffer_next (xcb_dri2_dri2_buffer_iterator_t *i);
0561 
0562 /**
0563  * Return the iterator pointing to the last element
0564  * @param i An xcb_dri2_dri2_buffer_iterator_t
0565  * @return  The iterator pointing to the last element
0566  *
0567  * Set the current element in the iterator to the last element.
0568  * The member rem is set to 0. The member data points to the
0569  * last element.
0570  */
0571 xcb_generic_iterator_t
0572 xcb_dri2_dri2_buffer_end (xcb_dri2_dri2_buffer_iterator_t i);
0573 
0574 /**
0575  * Get the next element of the iterator
0576  * @param i Pointer to a xcb_dri2_attach_format_iterator_t
0577  *
0578  * Get the next element in the iterator. The member rem is
0579  * decreased by one. The member data points to the next
0580  * element. The member index is increased by sizeof(xcb_dri2_attach_format_t)
0581  */
0582 void
0583 xcb_dri2_attach_format_next (xcb_dri2_attach_format_iterator_t *i);
0584 
0585 /**
0586  * Return the iterator pointing to the last element
0587  * @param i An xcb_dri2_attach_format_iterator_t
0588  * @return  The iterator pointing to the last element
0589  *
0590  * Set the current element in the iterator to the last element.
0591  * The member rem is set to 0. The member data points to the
0592  * last element.
0593  */
0594 xcb_generic_iterator_t
0595 xcb_dri2_attach_format_end (xcb_dri2_attach_format_iterator_t i);
0596 
0597 /**
0598  *
0599  * @param c The connection
0600  * @return A cookie
0601  *
0602  * Delivers a request to the X server.
0603  *
0604  */
0605 xcb_dri2_query_version_cookie_t
0606 xcb_dri2_query_version (xcb_connection_t *c,
0607                         uint32_t          major_version,
0608                         uint32_t          minor_version);
0609 
0610 /**
0611  *
0612  * @param c The connection
0613  * @return A cookie
0614  *
0615  * Delivers a request to the X server.
0616  *
0617  * This form can be used only if the request will cause
0618  * a reply to be generated. Any returned error will be
0619  * placed in the event queue.
0620  */
0621 xcb_dri2_query_version_cookie_t
0622 xcb_dri2_query_version_unchecked (xcb_connection_t *c,
0623                                   uint32_t          major_version,
0624                                   uint32_t          minor_version);
0625 
0626 /**
0627  * Return the reply
0628  * @param c      The connection
0629  * @param cookie The cookie
0630  * @param e      The xcb_generic_error_t supplied
0631  *
0632  * Returns the reply of the request asked by
0633  *
0634  * The parameter @p e supplied to this function must be NULL if
0635  * xcb_dri2_query_version_unchecked(). is used.
0636  * Otherwise, it stores the error if any.
0637  *
0638  * The returned value must be freed by the caller using free().
0639  */
0640 xcb_dri2_query_version_reply_t *
0641 xcb_dri2_query_version_reply (xcb_connection_t                 *c,
0642                               xcb_dri2_query_version_cookie_t   cookie  /**< */,
0643                               xcb_generic_error_t             **e);
0644 
0645 int
0646 xcb_dri2_connect_sizeof (const void  *_buffer);
0647 
0648 /**
0649  *
0650  * @param c The connection
0651  * @return A cookie
0652  *
0653  * Delivers a request to the X server.
0654  *
0655  */
0656 xcb_dri2_connect_cookie_t
0657 xcb_dri2_connect (xcb_connection_t *c,
0658                   xcb_window_t      window,
0659                   uint32_t          driver_type);
0660 
0661 /**
0662  *
0663  * @param c The connection
0664  * @return A cookie
0665  *
0666  * Delivers a request to the X server.
0667  *
0668  * This form can be used only if the request will cause
0669  * a reply to be generated. Any returned error will be
0670  * placed in the event queue.
0671  */
0672 xcb_dri2_connect_cookie_t
0673 xcb_dri2_connect_unchecked (xcb_connection_t *c,
0674                             xcb_window_t      window,
0675                             uint32_t          driver_type);
0676 
0677 char *
0678 xcb_dri2_connect_driver_name (const xcb_dri2_connect_reply_t *R);
0679 
0680 int
0681 xcb_dri2_connect_driver_name_length (const xcb_dri2_connect_reply_t *R);
0682 
0683 xcb_generic_iterator_t
0684 xcb_dri2_connect_driver_name_end (const xcb_dri2_connect_reply_t *R);
0685 
0686 void *
0687 xcb_dri2_connect_alignment_pad (const xcb_dri2_connect_reply_t *R);
0688 
0689 int
0690 xcb_dri2_connect_alignment_pad_length (const xcb_dri2_connect_reply_t *R);
0691 
0692 xcb_generic_iterator_t
0693 xcb_dri2_connect_alignment_pad_end (const xcb_dri2_connect_reply_t *R);
0694 
0695 char *
0696 xcb_dri2_connect_device_name (const xcb_dri2_connect_reply_t *R);
0697 
0698 int
0699 xcb_dri2_connect_device_name_length (const xcb_dri2_connect_reply_t *R);
0700 
0701 xcb_generic_iterator_t
0702 xcb_dri2_connect_device_name_end (const xcb_dri2_connect_reply_t *R);
0703 
0704 /**
0705  * Return the reply
0706  * @param c      The connection
0707  * @param cookie The cookie
0708  * @param e      The xcb_generic_error_t supplied
0709  *
0710  * Returns the reply of the request asked by
0711  *
0712  * The parameter @p e supplied to this function must be NULL if
0713  * xcb_dri2_connect_unchecked(). is used.
0714  * Otherwise, it stores the error if any.
0715  *
0716  * The returned value must be freed by the caller using free().
0717  */
0718 xcb_dri2_connect_reply_t *
0719 xcb_dri2_connect_reply (xcb_connection_t           *c,
0720                         xcb_dri2_connect_cookie_t   cookie  /**< */,
0721                         xcb_generic_error_t       **e);
0722 
0723 /**
0724  *
0725  * @param c The connection
0726  * @return A cookie
0727  *
0728  * Delivers a request to the X server.
0729  *
0730  */
0731 xcb_dri2_authenticate_cookie_t
0732 xcb_dri2_authenticate (xcb_connection_t *c,
0733                        xcb_window_t      window,
0734                        uint32_t          magic);
0735 
0736 /**
0737  *
0738  * @param c The connection
0739  * @return A cookie
0740  *
0741  * Delivers a request to the X server.
0742  *
0743  * This form can be used only if the request will cause
0744  * a reply to be generated. Any returned error will be
0745  * placed in the event queue.
0746  */
0747 xcb_dri2_authenticate_cookie_t
0748 xcb_dri2_authenticate_unchecked (xcb_connection_t *c,
0749                                  xcb_window_t      window,
0750                                  uint32_t          magic);
0751 
0752 /**
0753  * Return the reply
0754  * @param c      The connection
0755  * @param cookie The cookie
0756  * @param e      The xcb_generic_error_t supplied
0757  *
0758  * Returns the reply of the request asked by
0759  *
0760  * The parameter @p e supplied to this function must be NULL if
0761  * xcb_dri2_authenticate_unchecked(). is used.
0762  * Otherwise, it stores the error if any.
0763  *
0764  * The returned value must be freed by the caller using free().
0765  */
0766 xcb_dri2_authenticate_reply_t *
0767 xcb_dri2_authenticate_reply (xcb_connection_t                *c,
0768                              xcb_dri2_authenticate_cookie_t   cookie  /**< */,
0769                              xcb_generic_error_t            **e);
0770 
0771 /**
0772  *
0773  * @param c The connection
0774  * @return A cookie
0775  *
0776  * Delivers a request to the X server.
0777  *
0778  * This form can be used only if the request will not cause
0779  * a reply to be generated. Any returned error will be
0780  * saved for handling by xcb_request_check().
0781  */
0782 xcb_void_cookie_t
0783 xcb_dri2_create_drawable_checked (xcb_connection_t *c,
0784                                   xcb_drawable_t    drawable);
0785 
0786 /**
0787  *
0788  * @param c The connection
0789  * @return A cookie
0790  *
0791  * Delivers a request to the X server.
0792  *
0793  */
0794 xcb_void_cookie_t
0795 xcb_dri2_create_drawable (xcb_connection_t *c,
0796                           xcb_drawable_t    drawable);
0797 
0798 /**
0799  *
0800  * @param c The connection
0801  * @return A cookie
0802  *
0803  * Delivers a request to the X server.
0804  *
0805  * This form can be used only if the request will not cause
0806  * a reply to be generated. Any returned error will be
0807  * saved for handling by xcb_request_check().
0808  */
0809 xcb_void_cookie_t
0810 xcb_dri2_destroy_drawable_checked (xcb_connection_t *c,
0811                                    xcb_drawable_t    drawable);
0812 
0813 /**
0814  *
0815  * @param c The connection
0816  * @return A cookie
0817  *
0818  * Delivers a request to the X server.
0819  *
0820  */
0821 xcb_void_cookie_t
0822 xcb_dri2_destroy_drawable (xcb_connection_t *c,
0823                            xcb_drawable_t    drawable);
0824 
0825 int
0826 xcb_dri2_get_buffers_sizeof (const void  *_buffer,
0827                              uint32_t     attachments_len);
0828 
0829 /**
0830  *
0831  * @param c The connection
0832  * @return A cookie
0833  *
0834  * Delivers a request to the X server.
0835  *
0836  */
0837 xcb_dri2_get_buffers_cookie_t
0838 xcb_dri2_get_buffers (xcb_connection_t *c,
0839                       xcb_drawable_t    drawable,
0840                       uint32_t          count,
0841                       uint32_t          attachments_len,
0842                       const uint32_t   *attachments);
0843 
0844 /**
0845  *
0846  * @param c The connection
0847  * @return A cookie
0848  *
0849  * Delivers a request to the X server.
0850  *
0851  * This form can be used only if the request will cause
0852  * a reply to be generated. Any returned error will be
0853  * placed in the event queue.
0854  */
0855 xcb_dri2_get_buffers_cookie_t
0856 xcb_dri2_get_buffers_unchecked (xcb_connection_t *c,
0857                                 xcb_drawable_t    drawable,
0858                                 uint32_t          count,
0859                                 uint32_t          attachments_len,
0860                                 const uint32_t   *attachments);
0861 
0862 xcb_dri2_dri2_buffer_t *
0863 xcb_dri2_get_buffers_buffers (const xcb_dri2_get_buffers_reply_t *R);
0864 
0865 int
0866 xcb_dri2_get_buffers_buffers_length (const xcb_dri2_get_buffers_reply_t *R);
0867 
0868 xcb_dri2_dri2_buffer_iterator_t
0869 xcb_dri2_get_buffers_buffers_iterator (const xcb_dri2_get_buffers_reply_t *R);
0870 
0871 /**
0872  * Return the reply
0873  * @param c      The connection
0874  * @param cookie The cookie
0875  * @param e      The xcb_generic_error_t supplied
0876  *
0877  * Returns the reply of the request asked by
0878  *
0879  * The parameter @p e supplied to this function must be NULL if
0880  * xcb_dri2_get_buffers_unchecked(). is used.
0881  * Otherwise, it stores the error if any.
0882  *
0883  * The returned value must be freed by the caller using free().
0884  */
0885 xcb_dri2_get_buffers_reply_t *
0886 xcb_dri2_get_buffers_reply (xcb_connection_t               *c,
0887                             xcb_dri2_get_buffers_cookie_t   cookie  /**< */,
0888                             xcb_generic_error_t           **e);
0889 
0890 /**
0891  *
0892  * @param c The connection
0893  * @return A cookie
0894  *
0895  * Delivers a request to the X server.
0896  *
0897  */
0898 xcb_dri2_copy_region_cookie_t
0899 xcb_dri2_copy_region (xcb_connection_t *c,
0900                       xcb_drawable_t    drawable,
0901                       uint32_t          region,
0902                       uint32_t          dest,
0903                       uint32_t          src);
0904 
0905 /**
0906  *
0907  * @param c The connection
0908  * @return A cookie
0909  *
0910  * Delivers a request to the X server.
0911  *
0912  * This form can be used only if the request will cause
0913  * a reply to be generated. Any returned error will be
0914  * placed in the event queue.
0915  */
0916 xcb_dri2_copy_region_cookie_t
0917 xcb_dri2_copy_region_unchecked (xcb_connection_t *c,
0918                                 xcb_drawable_t    drawable,
0919                                 uint32_t          region,
0920                                 uint32_t          dest,
0921                                 uint32_t          src);
0922 
0923 /**
0924  * Return the reply
0925  * @param c      The connection
0926  * @param cookie The cookie
0927  * @param e      The xcb_generic_error_t supplied
0928  *
0929  * Returns the reply of the request asked by
0930  *
0931  * The parameter @p e supplied to this function must be NULL if
0932  * xcb_dri2_copy_region_unchecked(). is used.
0933  * Otherwise, it stores the error if any.
0934  *
0935  * The returned value must be freed by the caller using free().
0936  */
0937 xcb_dri2_copy_region_reply_t *
0938 xcb_dri2_copy_region_reply (xcb_connection_t               *c,
0939                             xcb_dri2_copy_region_cookie_t   cookie  /**< */,
0940                             xcb_generic_error_t           **e);
0941 
0942 int
0943 xcb_dri2_get_buffers_with_format_sizeof (const void  *_buffer,
0944                                          uint32_t     attachments_len);
0945 
0946 /**
0947  *
0948  * @param c The connection
0949  * @return A cookie
0950  *
0951  * Delivers a request to the X server.
0952  *
0953  */
0954 xcb_dri2_get_buffers_with_format_cookie_t
0955 xcb_dri2_get_buffers_with_format (xcb_connection_t               *c,
0956                                   xcb_drawable_t                  drawable,
0957                                   uint32_t                        count,
0958                                   uint32_t                        attachments_len,
0959                                   const xcb_dri2_attach_format_t *attachments);
0960 
0961 /**
0962  *
0963  * @param c The connection
0964  * @return A cookie
0965  *
0966  * Delivers a request to the X server.
0967  *
0968  * This form can be used only if the request will cause
0969  * a reply to be generated. Any returned error will be
0970  * placed in the event queue.
0971  */
0972 xcb_dri2_get_buffers_with_format_cookie_t
0973 xcb_dri2_get_buffers_with_format_unchecked (xcb_connection_t               *c,
0974                                             xcb_drawable_t                  drawable,
0975                                             uint32_t                        count,
0976                                             uint32_t                        attachments_len,
0977                                             const xcb_dri2_attach_format_t *attachments);
0978 
0979 xcb_dri2_dri2_buffer_t *
0980 xcb_dri2_get_buffers_with_format_buffers (const xcb_dri2_get_buffers_with_format_reply_t *R);
0981 
0982 int
0983 xcb_dri2_get_buffers_with_format_buffers_length (const xcb_dri2_get_buffers_with_format_reply_t *R);
0984 
0985 xcb_dri2_dri2_buffer_iterator_t
0986 xcb_dri2_get_buffers_with_format_buffers_iterator (const xcb_dri2_get_buffers_with_format_reply_t *R);
0987 
0988 /**
0989  * Return the reply
0990  * @param c      The connection
0991  * @param cookie The cookie
0992  * @param e      The xcb_generic_error_t supplied
0993  *
0994  * Returns the reply of the request asked by
0995  *
0996  * The parameter @p e supplied to this function must be NULL if
0997  * xcb_dri2_get_buffers_with_format_unchecked(). is used.
0998  * Otherwise, it stores the error if any.
0999  *
1000  * The returned value must be freed by the caller using free().
1001  */
1002 xcb_dri2_get_buffers_with_format_reply_t *
1003 xcb_dri2_get_buffers_with_format_reply (xcb_connection_t                           *c,
1004                                         xcb_dri2_get_buffers_with_format_cookie_t   cookie  /**< */,
1005                                         xcb_generic_error_t                       **e);
1006 
1007 /**
1008  *
1009  * @param c The connection
1010  * @return A cookie
1011  *
1012  * Delivers a request to the X server.
1013  *
1014  */
1015 xcb_dri2_swap_buffers_cookie_t
1016 xcb_dri2_swap_buffers (xcb_connection_t *c,
1017                        xcb_drawable_t    drawable,
1018                        uint32_t          target_msc_hi,
1019                        uint32_t          target_msc_lo,
1020                        uint32_t          divisor_hi,
1021                        uint32_t          divisor_lo,
1022                        uint32_t          remainder_hi,
1023                        uint32_t          remainder_lo);
1024 
1025 /**
1026  *
1027  * @param c The connection
1028  * @return A cookie
1029  *
1030  * Delivers a request to the X server.
1031  *
1032  * This form can be used only if the request will cause
1033  * a reply to be generated. Any returned error will be
1034  * placed in the event queue.
1035  */
1036 xcb_dri2_swap_buffers_cookie_t
1037 xcb_dri2_swap_buffers_unchecked (xcb_connection_t *c,
1038                                  xcb_drawable_t    drawable,
1039                                  uint32_t          target_msc_hi,
1040                                  uint32_t          target_msc_lo,
1041                                  uint32_t          divisor_hi,
1042                                  uint32_t          divisor_lo,
1043                                  uint32_t          remainder_hi,
1044                                  uint32_t          remainder_lo);
1045 
1046 /**
1047  * Return the reply
1048  * @param c      The connection
1049  * @param cookie The cookie
1050  * @param e      The xcb_generic_error_t supplied
1051  *
1052  * Returns the reply of the request asked by
1053  *
1054  * The parameter @p e supplied to this function must be NULL if
1055  * xcb_dri2_swap_buffers_unchecked(). is used.
1056  * Otherwise, it stores the error if any.
1057  *
1058  * The returned value must be freed by the caller using free().
1059  */
1060 xcb_dri2_swap_buffers_reply_t *
1061 xcb_dri2_swap_buffers_reply (xcb_connection_t                *c,
1062                              xcb_dri2_swap_buffers_cookie_t   cookie  /**< */,
1063                              xcb_generic_error_t            **e);
1064 
1065 /**
1066  *
1067  * @param c The connection
1068  * @return A cookie
1069  *
1070  * Delivers a request to the X server.
1071  *
1072  */
1073 xcb_dri2_get_msc_cookie_t
1074 xcb_dri2_get_msc (xcb_connection_t *c,
1075                   xcb_drawable_t    drawable);
1076 
1077 /**
1078  *
1079  * @param c The connection
1080  * @return A cookie
1081  *
1082  * Delivers a request to the X server.
1083  *
1084  * This form can be used only if the request will cause
1085  * a reply to be generated. Any returned error will be
1086  * placed in the event queue.
1087  */
1088 xcb_dri2_get_msc_cookie_t
1089 xcb_dri2_get_msc_unchecked (xcb_connection_t *c,
1090                             xcb_drawable_t    drawable);
1091 
1092 /**
1093  * Return the reply
1094  * @param c      The connection
1095  * @param cookie The cookie
1096  * @param e      The xcb_generic_error_t supplied
1097  *
1098  * Returns the reply of the request asked by
1099  *
1100  * The parameter @p e supplied to this function must be NULL if
1101  * xcb_dri2_get_msc_unchecked(). is used.
1102  * Otherwise, it stores the error if any.
1103  *
1104  * The returned value must be freed by the caller using free().
1105  */
1106 xcb_dri2_get_msc_reply_t *
1107 xcb_dri2_get_msc_reply (xcb_connection_t           *c,
1108                         xcb_dri2_get_msc_cookie_t   cookie  /**< */,
1109                         xcb_generic_error_t       **e);
1110 
1111 /**
1112  *
1113  * @param c The connection
1114  * @return A cookie
1115  *
1116  * Delivers a request to the X server.
1117  *
1118  */
1119 xcb_dri2_wait_msc_cookie_t
1120 xcb_dri2_wait_msc (xcb_connection_t *c,
1121                    xcb_drawable_t    drawable,
1122                    uint32_t          target_msc_hi,
1123                    uint32_t          target_msc_lo,
1124                    uint32_t          divisor_hi,
1125                    uint32_t          divisor_lo,
1126                    uint32_t          remainder_hi,
1127                    uint32_t          remainder_lo);
1128 
1129 /**
1130  *
1131  * @param c The connection
1132  * @return A cookie
1133  *
1134  * Delivers a request to the X server.
1135  *
1136  * This form can be used only if the request will cause
1137  * a reply to be generated. Any returned error will be
1138  * placed in the event queue.
1139  */
1140 xcb_dri2_wait_msc_cookie_t
1141 xcb_dri2_wait_msc_unchecked (xcb_connection_t *c,
1142                              xcb_drawable_t    drawable,
1143                              uint32_t          target_msc_hi,
1144                              uint32_t          target_msc_lo,
1145                              uint32_t          divisor_hi,
1146                              uint32_t          divisor_lo,
1147                              uint32_t          remainder_hi,
1148                              uint32_t          remainder_lo);
1149 
1150 /**
1151  * Return the reply
1152  * @param c      The connection
1153  * @param cookie The cookie
1154  * @param e      The xcb_generic_error_t supplied
1155  *
1156  * Returns the reply of the request asked by
1157  *
1158  * The parameter @p e supplied to this function must be NULL if
1159  * xcb_dri2_wait_msc_unchecked(). is used.
1160  * Otherwise, it stores the error if any.
1161  *
1162  * The returned value must be freed by the caller using free().
1163  */
1164 xcb_dri2_wait_msc_reply_t *
1165 xcb_dri2_wait_msc_reply (xcb_connection_t            *c,
1166                          xcb_dri2_wait_msc_cookie_t   cookie  /**< */,
1167                          xcb_generic_error_t        **e);
1168 
1169 /**
1170  *
1171  * @param c The connection
1172  * @return A cookie
1173  *
1174  * Delivers a request to the X server.
1175  *
1176  */
1177 xcb_dri2_wait_sbc_cookie_t
1178 xcb_dri2_wait_sbc (xcb_connection_t *c,
1179                    xcb_drawable_t    drawable,
1180                    uint32_t          target_sbc_hi,
1181                    uint32_t          target_sbc_lo);
1182 
1183 /**
1184  *
1185  * @param c The connection
1186  * @return A cookie
1187  *
1188  * Delivers a request to the X server.
1189  *
1190  * This form can be used only if the request will cause
1191  * a reply to be generated. Any returned error will be
1192  * placed in the event queue.
1193  */
1194 xcb_dri2_wait_sbc_cookie_t
1195 xcb_dri2_wait_sbc_unchecked (xcb_connection_t *c,
1196                              xcb_drawable_t    drawable,
1197                              uint32_t          target_sbc_hi,
1198                              uint32_t          target_sbc_lo);
1199 
1200 /**
1201  * Return the reply
1202  * @param c      The connection
1203  * @param cookie The cookie
1204  * @param e      The xcb_generic_error_t supplied
1205  *
1206  * Returns the reply of the request asked by
1207  *
1208  * The parameter @p e supplied to this function must be NULL if
1209  * xcb_dri2_wait_sbc_unchecked(). is used.
1210  * Otherwise, it stores the error if any.
1211  *
1212  * The returned value must be freed by the caller using free().
1213  */
1214 xcb_dri2_wait_sbc_reply_t *
1215 xcb_dri2_wait_sbc_reply (xcb_connection_t            *c,
1216                          xcb_dri2_wait_sbc_cookie_t   cookie  /**< */,
1217                          xcb_generic_error_t        **e);
1218 
1219 /**
1220  *
1221  * @param c The connection
1222  * @return A cookie
1223  *
1224  * Delivers a request to the X server.
1225  *
1226  * This form can be used only if the request will not cause
1227  * a reply to be generated. Any returned error will be
1228  * saved for handling by xcb_request_check().
1229  */
1230 xcb_void_cookie_t
1231 xcb_dri2_swap_interval_checked (xcb_connection_t *c,
1232                                 xcb_drawable_t    drawable,
1233                                 uint32_t          interval);
1234 
1235 /**
1236  *
1237  * @param c The connection
1238  * @return A cookie
1239  *
1240  * Delivers a request to the X server.
1241  *
1242  */
1243 xcb_void_cookie_t
1244 xcb_dri2_swap_interval (xcb_connection_t *c,
1245                         xcb_drawable_t    drawable,
1246                         uint32_t          interval);
1247 
1248 /**
1249  *
1250  * @param c The connection
1251  * @return A cookie
1252  *
1253  * Delivers a request to the X server.
1254  *
1255  */
1256 xcb_dri2_get_param_cookie_t
1257 xcb_dri2_get_param (xcb_connection_t *c,
1258                     xcb_drawable_t    drawable,
1259                     uint32_t          param);
1260 
1261 /**
1262  *
1263  * @param c The connection
1264  * @return A cookie
1265  *
1266  * Delivers a request to the X server.
1267  *
1268  * This form can be used only if the request will cause
1269  * a reply to be generated. Any returned error will be
1270  * placed in the event queue.
1271  */
1272 xcb_dri2_get_param_cookie_t
1273 xcb_dri2_get_param_unchecked (xcb_connection_t *c,
1274                               xcb_drawable_t    drawable,
1275                               uint32_t          param);
1276 
1277 /**
1278  * Return the reply
1279  * @param c      The connection
1280  * @param cookie The cookie
1281  * @param e      The xcb_generic_error_t supplied
1282  *
1283  * Returns the reply of the request asked by
1284  *
1285  * The parameter @p e supplied to this function must be NULL if
1286  * xcb_dri2_get_param_unchecked(). is used.
1287  * Otherwise, it stores the error if any.
1288  *
1289  * The returned value must be freed by the caller using free().
1290  */
1291 xcb_dri2_get_param_reply_t *
1292 xcb_dri2_get_param_reply (xcb_connection_t             *c,
1293                           xcb_dri2_get_param_cookie_t   cookie  /**< */,
1294                           xcb_generic_error_t         **e);
1295 
1296 
1297 #ifdef __cplusplus
1298 }
1299 #endif
1300 
1301 #endif
1302 
1303 /**
1304  * @}
1305  */