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