xref: /minix/external/mit/xorg/lib/libxcb/files/bigreq.c (revision 0a6a1f1d)
1 /*
2  * This file generated automatically from bigreq.xml by c_client.py.
3  * Edit at your peril.
4  */
5 
6 #ifdef HAVE_CONFIG_H
7 #include "config.h"
8 #endif
9 #include <stdlib.h>
10 #include <string.h>
11 #include <assert.h>
12 #include <stddef.h>  /* for offsetof() */
13 #include "xcbext.h"
14 #include "bigreq.h"
15 
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 
18 xcb_extension_t xcb_big_requests_id = { "BIG-REQUESTS", 0 };
19 
20 xcb_big_requests_enable_cookie_t
xcb_big_requests_enable(xcb_connection_t * c)21 xcb_big_requests_enable (xcb_connection_t *c  /**< */)
22 {
23     static const xcb_protocol_request_t xcb_req = {
24         /* count */ 2,
25         /* ext */ &xcb_big_requests_id,
26         /* opcode */ XCB_BIG_REQUESTS_ENABLE,
27         /* isvoid */ 0
28     };
29 
30     struct iovec xcb_parts[4];
31     xcb_big_requests_enable_cookie_t xcb_ret;
32     xcb_big_requests_enable_request_t xcb_out;
33 
34 
35     xcb_parts[2].iov_base = (char *) &xcb_out;
36     xcb_parts[2].iov_len = sizeof(xcb_out);
37     xcb_parts[3].iov_base = 0;
38     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
39 
40     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
41     return xcb_ret;
42 }
43 
44 xcb_big_requests_enable_cookie_t
xcb_big_requests_enable_unchecked(xcb_connection_t * c)45 xcb_big_requests_enable_unchecked (xcb_connection_t *c  /**< */)
46 {
47     static const xcb_protocol_request_t xcb_req = {
48         /* count */ 2,
49         /* ext */ &xcb_big_requests_id,
50         /* opcode */ XCB_BIG_REQUESTS_ENABLE,
51         /* isvoid */ 0
52     };
53 
54     struct iovec xcb_parts[4];
55     xcb_big_requests_enable_cookie_t xcb_ret;
56     xcb_big_requests_enable_request_t xcb_out;
57 
58 
59     xcb_parts[2].iov_base = (char *) &xcb_out;
60     xcb_parts[2].iov_len = sizeof(xcb_out);
61     xcb_parts[3].iov_base = 0;
62     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
63 
64     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
65     return xcb_ret;
66 }
67 
68 xcb_big_requests_enable_reply_t *
xcb_big_requests_enable_reply(xcb_connection_t * c,xcb_big_requests_enable_cookie_t cookie,xcb_generic_error_t ** e)69 xcb_big_requests_enable_reply (xcb_connection_t                  *c  /**< */,
70                                xcb_big_requests_enable_cookie_t   cookie  /**< */,
71                                xcb_generic_error_t              **e  /**< */)
72 {
73     return (xcb_big_requests_enable_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
74 }
75 
76