xref: /netbsd-src/external/mit/xorg/lib/libxcb/files/bigreq.c (revision b1c86f5f087524e68db12794ee9c3e3da1ab17a0)
1 /*
2  * This file generated automatically from bigreq.xml by c_client.py.
3  * Edit at your peril.
4  */
5 
6 #include <string.h>
7 #include <assert.h>
8 #include "xcbext.h"
9 #include "bigreq.h"
10 
11 xcb_extension_t xcb_big_requests_id = { "BIG-REQUESTS", 0 };
12 
13 
14 /*****************************************************************************
15  **
16  ** xcb_big_requests_enable_cookie_t xcb_big_requests_enable
17  **
18  ** @param xcb_connection_t *c
19  ** @returns xcb_big_requests_enable_cookie_t
20  **
21  *****************************************************************************/
22 
23 xcb_big_requests_enable_cookie_t
24 xcb_big_requests_enable (xcb_connection_t *c  /**< */)
25 {
26     static const xcb_protocol_request_t xcb_req = {
27         /* count */ 2,
28         /* ext */ &xcb_big_requests_id,
29         /* opcode */ XCB_BIG_REQUESTS_ENABLE,
30         /* isvoid */ 0
31     };
32 
33     struct iovec xcb_parts[4];
34     xcb_big_requests_enable_cookie_t xcb_ret;
35     xcb_big_requests_enable_request_t xcb_out;
36 
37 
38     xcb_parts[2].iov_base = (char *) &xcb_out;
39     xcb_parts[2].iov_len = sizeof(xcb_out);
40     xcb_parts[3].iov_base = 0;
41     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
42     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
43     return xcb_ret;
44 }
45 
46 
47 /*****************************************************************************
48  **
49  ** xcb_big_requests_enable_cookie_t xcb_big_requests_enable_unchecked
50  **
51  ** @param xcb_connection_t *c
52  ** @returns xcb_big_requests_enable_cookie_t
53  **
54  *****************************************************************************/
55 
56 xcb_big_requests_enable_cookie_t
57 xcb_big_requests_enable_unchecked (xcb_connection_t *c  /**< */)
58 {
59     static const xcb_protocol_request_t xcb_req = {
60         /* count */ 2,
61         /* ext */ &xcb_big_requests_id,
62         /* opcode */ XCB_BIG_REQUESTS_ENABLE,
63         /* isvoid */ 0
64     };
65 
66     struct iovec xcb_parts[4];
67     xcb_big_requests_enable_cookie_t xcb_ret;
68     xcb_big_requests_enable_request_t xcb_out;
69 
70 
71     xcb_parts[2].iov_base = (char *) &xcb_out;
72     xcb_parts[2].iov_len = sizeof(xcb_out);
73     xcb_parts[3].iov_base = 0;
74     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
75     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
76     return xcb_ret;
77 }
78 
79 
80 /*****************************************************************************
81  **
82  ** xcb_big_requests_enable_reply_t * xcb_big_requests_enable_reply
83  **
84  ** @param xcb_connection_t                  *c
85  ** @param xcb_big_requests_enable_cookie_t   cookie
86  ** @param xcb_generic_error_t              **e
87  ** @returns xcb_big_requests_enable_reply_t *
88  **
89  *****************************************************************************/
90 
91 xcb_big_requests_enable_reply_t *
92 xcb_big_requests_enable_reply (xcb_connection_t                  *c  /**< */,
93                                xcb_big_requests_enable_cookie_t   cookie  /**< */,
94                                xcb_generic_error_t              **e  /**< */)
95 {
96     return (xcb_big_requests_enable_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
97 }
98 
99