xref: /netbsd-src/external/mit/xorg/lib/libxcb/files/bigreq.h (revision fea83ee4938f6f630ec4626dba8d28098c73f0cc)
1 /*
2  * This file generated automatically from bigreq.xml by c_client.py.
3  * Edit at your peril.
4  */
5 
6 /**
7  * @defgroup XCB_BigRequests_API XCB BigRequests API
8  * @brief BigRequests XCB Protocol Implementation.
9  * @{
10  **/
11 
12 #ifndef __BIGREQ_H
13 #define __BIGREQ_H
14 
15 #include "xcb.h"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #define XCB_BIGREQUESTS_MAJOR_VERSION 0
22 #define XCB_BIGREQUESTS_MINOR_VERSION 0
23 
24 extern xcb_extension_t xcb_big_requests_id;
25 
26 /**
27  * @brief xcb_big_requests_enable_cookie_t
28  **/
29 typedef struct xcb_big_requests_enable_cookie_t {
30     unsigned int sequence;
31 } xcb_big_requests_enable_cookie_t;
32 
33 /** Opcode for xcb_big_requests_enable. */
34 #define XCB_BIG_REQUESTS_ENABLE 0
35 
36 /**
37  * @brief xcb_big_requests_enable_request_t
38  **/
39 typedef struct xcb_big_requests_enable_request_t {
40     uint8_t  major_opcode;
41     uint8_t  minor_opcode;
42     uint16_t length;
43 } xcb_big_requests_enable_request_t;
44 
45 /**
46  * @brief xcb_big_requests_enable_reply_t
47  **/
48 typedef struct xcb_big_requests_enable_reply_t {
49     uint8_t  response_type;
50     uint8_t  pad0;
51     uint16_t sequence;
52     uint32_t length;
53     uint32_t maximum_request_length;
54 } xcb_big_requests_enable_reply_t;
55 
56 /**
57  * @brief Enable the BIG-REQUESTS extension
58  *
59  * @param c The connection
60  * @return A cookie
61  *
62  * This enables the BIG-REQUESTS extension, which allows for requests larger than
63  * 262140 bytes in length.  When enabled, if the 16-bit length field is zero, it
64  * is immediately followed by a 32-bit length field specifying the length of the
65  * request in 4-byte units.
66  *
67  */
68 xcb_big_requests_enable_cookie_t
69 xcb_big_requests_enable (xcb_connection_t *c);
70 
71 /**
72  * @brief Enable the BIG-REQUESTS extension
73  *
74  * @param c The connection
75  * @return A cookie
76  *
77  * This enables the BIG-REQUESTS extension, which allows for requests larger than
78  * 262140 bytes in length.  When enabled, if the 16-bit length field is zero, it
79  * is immediately followed by a 32-bit length field specifying the length of the
80  * request in 4-byte units.
81  *
82  * This form can be used only if the request will cause
83  * a reply to be generated. Any returned error will be
84  * placed in the event queue.
85  */
86 xcb_big_requests_enable_cookie_t
87 xcb_big_requests_enable_unchecked (xcb_connection_t *c);
88 
89 /**
90  * Return the reply
91  * @param c      The connection
92  * @param cookie The cookie
93  * @param e      The xcb_generic_error_t supplied
94  *
95  * Returns the reply of the request asked by
96  *
97  * The parameter @p e supplied to this function must be NULL if
98  * xcb_big_requests_enable_unchecked(). is used.
99  * Otherwise, it stores the error if any.
100  *
101  * The returned value must be freed by the caller using free().
102  */
103 xcb_big_requests_enable_reply_t *
104 xcb_big_requests_enable_reply (xcb_connection_t                  *c,
105                                xcb_big_requests_enable_cookie_t   cookie  /**< */,
106                                xcb_generic_error_t              **e);
107 
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif
114 
115 /**
116  * @}
117  */
118