1*971bb1a5SLionel Sambuc /*
2*971bb1a5SLionel Sambuc * This file generated automatically from xevie.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 "xevie.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_xevie_id = { "XEVIE", 0 };
19*971bb1a5SLionel Sambuc
20*971bb1a5SLionel Sambuc xcb_xevie_query_version_cookie_t
xcb_xevie_query_version(xcb_connection_t * c,uint16_t client_major_version,uint16_t client_minor_version)21*971bb1a5SLionel Sambuc xcb_xevie_query_version (xcb_connection_t *c /**< */,
22*971bb1a5SLionel Sambuc uint16_t client_major_version /**< */,
23*971bb1a5SLionel Sambuc uint16_t client_minor_version /**< */)
24*971bb1a5SLionel Sambuc {
25*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
26*971bb1a5SLionel Sambuc /* count */ 2,
27*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
28*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_QUERY_VERSION,
29*971bb1a5SLionel Sambuc /* isvoid */ 0
30*971bb1a5SLionel Sambuc };
31*971bb1a5SLionel Sambuc
32*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
33*971bb1a5SLionel Sambuc xcb_xevie_query_version_cookie_t xcb_ret;
34*971bb1a5SLionel Sambuc xcb_xevie_query_version_request_t xcb_out;
35*971bb1a5SLionel Sambuc
36*971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
37*971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
38*971bb1a5SLionel Sambuc
39*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
40*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
41*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
42*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
43*971bb1a5SLionel Sambuc
44*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
45*971bb1a5SLionel Sambuc return xcb_ret;
46*971bb1a5SLionel Sambuc }
47*971bb1a5SLionel Sambuc
48*971bb1a5SLionel Sambuc xcb_xevie_query_version_cookie_t
xcb_xevie_query_version_unchecked(xcb_connection_t * c,uint16_t client_major_version,uint16_t client_minor_version)49*971bb1a5SLionel Sambuc xcb_xevie_query_version_unchecked (xcb_connection_t *c /**< */,
50*971bb1a5SLionel Sambuc uint16_t client_major_version /**< */,
51*971bb1a5SLionel Sambuc uint16_t client_minor_version /**< */)
52*971bb1a5SLionel Sambuc {
53*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
54*971bb1a5SLionel Sambuc /* count */ 2,
55*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
56*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_QUERY_VERSION,
57*971bb1a5SLionel Sambuc /* isvoid */ 0
58*971bb1a5SLionel Sambuc };
59*971bb1a5SLionel Sambuc
60*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
61*971bb1a5SLionel Sambuc xcb_xevie_query_version_cookie_t xcb_ret;
62*971bb1a5SLionel Sambuc xcb_xevie_query_version_request_t xcb_out;
63*971bb1a5SLionel Sambuc
64*971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
65*971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
66*971bb1a5SLionel Sambuc
67*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
68*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
69*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
70*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
71*971bb1a5SLionel Sambuc
72*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
73*971bb1a5SLionel Sambuc return xcb_ret;
74*971bb1a5SLionel Sambuc }
75*971bb1a5SLionel Sambuc
76*971bb1a5SLionel Sambuc xcb_xevie_query_version_reply_t *
xcb_xevie_query_version_reply(xcb_connection_t * c,xcb_xevie_query_version_cookie_t cookie,xcb_generic_error_t ** e)77*971bb1a5SLionel Sambuc xcb_xevie_query_version_reply (xcb_connection_t *c /**< */,
78*971bb1a5SLionel Sambuc xcb_xevie_query_version_cookie_t cookie /**< */,
79*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
80*971bb1a5SLionel Sambuc {
81*971bb1a5SLionel Sambuc return (xcb_xevie_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
82*971bb1a5SLionel Sambuc }
83*971bb1a5SLionel Sambuc
84*971bb1a5SLionel Sambuc xcb_xevie_start_cookie_t
xcb_xevie_start(xcb_connection_t * c,uint32_t screen)85*971bb1a5SLionel Sambuc xcb_xevie_start (xcb_connection_t *c /**< */,
86*971bb1a5SLionel Sambuc uint32_t screen /**< */)
87*971bb1a5SLionel Sambuc {
88*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
89*971bb1a5SLionel Sambuc /* count */ 2,
90*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
91*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_START,
92*971bb1a5SLionel Sambuc /* isvoid */ 0
93*971bb1a5SLionel Sambuc };
94*971bb1a5SLionel Sambuc
95*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
96*971bb1a5SLionel Sambuc xcb_xevie_start_cookie_t xcb_ret;
97*971bb1a5SLionel Sambuc xcb_xevie_start_request_t xcb_out;
98*971bb1a5SLionel Sambuc
99*971bb1a5SLionel Sambuc xcb_out.screen = screen;
100*971bb1a5SLionel Sambuc
101*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
102*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
103*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
104*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
105*971bb1a5SLionel Sambuc
106*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
107*971bb1a5SLionel Sambuc return xcb_ret;
108*971bb1a5SLionel Sambuc }
109*971bb1a5SLionel Sambuc
110*971bb1a5SLionel Sambuc xcb_xevie_start_cookie_t
xcb_xevie_start_unchecked(xcb_connection_t * c,uint32_t screen)111*971bb1a5SLionel Sambuc xcb_xevie_start_unchecked (xcb_connection_t *c /**< */,
112*971bb1a5SLionel Sambuc uint32_t screen /**< */)
113*971bb1a5SLionel Sambuc {
114*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
115*971bb1a5SLionel Sambuc /* count */ 2,
116*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
117*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_START,
118*971bb1a5SLionel Sambuc /* isvoid */ 0
119*971bb1a5SLionel Sambuc };
120*971bb1a5SLionel Sambuc
121*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
122*971bb1a5SLionel Sambuc xcb_xevie_start_cookie_t xcb_ret;
123*971bb1a5SLionel Sambuc xcb_xevie_start_request_t xcb_out;
124*971bb1a5SLionel Sambuc
125*971bb1a5SLionel Sambuc xcb_out.screen = screen;
126*971bb1a5SLionel Sambuc
127*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
128*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
129*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
130*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
131*971bb1a5SLionel Sambuc
132*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
133*971bb1a5SLionel Sambuc return xcb_ret;
134*971bb1a5SLionel Sambuc }
135*971bb1a5SLionel Sambuc
136*971bb1a5SLionel Sambuc xcb_xevie_start_reply_t *
xcb_xevie_start_reply(xcb_connection_t * c,xcb_xevie_start_cookie_t cookie,xcb_generic_error_t ** e)137*971bb1a5SLionel Sambuc xcb_xevie_start_reply (xcb_connection_t *c /**< */,
138*971bb1a5SLionel Sambuc xcb_xevie_start_cookie_t cookie /**< */,
139*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
140*971bb1a5SLionel Sambuc {
141*971bb1a5SLionel Sambuc return (xcb_xevie_start_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
142*971bb1a5SLionel Sambuc }
143*971bb1a5SLionel Sambuc
144*971bb1a5SLionel Sambuc xcb_xevie_end_cookie_t
xcb_xevie_end(xcb_connection_t * c,uint32_t cmap)145*971bb1a5SLionel Sambuc xcb_xevie_end (xcb_connection_t *c /**< */,
146*971bb1a5SLionel Sambuc uint32_t cmap /**< */)
147*971bb1a5SLionel Sambuc {
148*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
149*971bb1a5SLionel Sambuc /* count */ 2,
150*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
151*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_END,
152*971bb1a5SLionel Sambuc /* isvoid */ 0
153*971bb1a5SLionel Sambuc };
154*971bb1a5SLionel Sambuc
155*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
156*971bb1a5SLionel Sambuc xcb_xevie_end_cookie_t xcb_ret;
157*971bb1a5SLionel Sambuc xcb_xevie_end_request_t xcb_out;
158*971bb1a5SLionel Sambuc
159*971bb1a5SLionel Sambuc xcb_out.cmap = cmap;
160*971bb1a5SLionel Sambuc
161*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
162*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
163*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
164*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
165*971bb1a5SLionel Sambuc
166*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
167*971bb1a5SLionel Sambuc return xcb_ret;
168*971bb1a5SLionel Sambuc }
169*971bb1a5SLionel Sambuc
170*971bb1a5SLionel Sambuc xcb_xevie_end_cookie_t
xcb_xevie_end_unchecked(xcb_connection_t * c,uint32_t cmap)171*971bb1a5SLionel Sambuc xcb_xevie_end_unchecked (xcb_connection_t *c /**< */,
172*971bb1a5SLionel Sambuc uint32_t cmap /**< */)
173*971bb1a5SLionel Sambuc {
174*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
175*971bb1a5SLionel Sambuc /* count */ 2,
176*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
177*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_END,
178*971bb1a5SLionel Sambuc /* isvoid */ 0
179*971bb1a5SLionel Sambuc };
180*971bb1a5SLionel Sambuc
181*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
182*971bb1a5SLionel Sambuc xcb_xevie_end_cookie_t xcb_ret;
183*971bb1a5SLionel Sambuc xcb_xevie_end_request_t xcb_out;
184*971bb1a5SLionel Sambuc
185*971bb1a5SLionel Sambuc xcb_out.cmap = cmap;
186*971bb1a5SLionel Sambuc
187*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
188*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
189*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
190*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
191*971bb1a5SLionel Sambuc
192*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
193*971bb1a5SLionel Sambuc return xcb_ret;
194*971bb1a5SLionel Sambuc }
195*971bb1a5SLionel Sambuc
196*971bb1a5SLionel Sambuc xcb_xevie_end_reply_t *
xcb_xevie_end_reply(xcb_connection_t * c,xcb_xevie_end_cookie_t cookie,xcb_generic_error_t ** e)197*971bb1a5SLionel Sambuc xcb_xevie_end_reply (xcb_connection_t *c /**< */,
198*971bb1a5SLionel Sambuc xcb_xevie_end_cookie_t cookie /**< */,
199*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
200*971bb1a5SLionel Sambuc {
201*971bb1a5SLionel Sambuc return (xcb_xevie_end_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
202*971bb1a5SLionel Sambuc }
203*971bb1a5SLionel Sambuc
204*971bb1a5SLionel Sambuc void
xcb_xevie_event_next(xcb_xevie_event_iterator_t * i)205*971bb1a5SLionel Sambuc xcb_xevie_event_next (xcb_xevie_event_iterator_t *i /**< */)
206*971bb1a5SLionel Sambuc {
207*971bb1a5SLionel Sambuc --i->rem;
208*971bb1a5SLionel Sambuc ++i->data;
209*971bb1a5SLionel Sambuc i->index += sizeof(xcb_xevie_event_t);
210*971bb1a5SLionel Sambuc }
211*971bb1a5SLionel Sambuc
212*971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xevie_event_end(xcb_xevie_event_iterator_t i)213*971bb1a5SLionel Sambuc xcb_xevie_event_end (xcb_xevie_event_iterator_t i /**< */)
214*971bb1a5SLionel Sambuc {
215*971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
216*971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
217*971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
218*971bb1a5SLionel Sambuc ret.rem = 0;
219*971bb1a5SLionel Sambuc return ret;
220*971bb1a5SLionel Sambuc }
221*971bb1a5SLionel Sambuc
222*971bb1a5SLionel Sambuc xcb_xevie_send_cookie_t
xcb_xevie_send(xcb_connection_t * c,xcb_xevie_event_t event,uint32_t data_type)223*971bb1a5SLionel Sambuc xcb_xevie_send (xcb_connection_t *c /**< */,
224*971bb1a5SLionel Sambuc xcb_xevie_event_t event /**< */,
225*971bb1a5SLionel Sambuc uint32_t data_type /**< */)
226*971bb1a5SLionel Sambuc {
227*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
228*971bb1a5SLionel Sambuc /* count */ 2,
229*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
230*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_SEND,
231*971bb1a5SLionel Sambuc /* isvoid */ 0
232*971bb1a5SLionel Sambuc };
233*971bb1a5SLionel Sambuc
234*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
235*971bb1a5SLionel Sambuc xcb_xevie_send_cookie_t xcb_ret;
236*971bb1a5SLionel Sambuc xcb_xevie_send_request_t xcb_out;
237*971bb1a5SLionel Sambuc
238*971bb1a5SLionel Sambuc xcb_out.event = event;
239*971bb1a5SLionel Sambuc xcb_out.data_type = data_type;
240*971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 64);
241*971bb1a5SLionel Sambuc
242*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
243*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
244*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
245*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
246*971bb1a5SLionel Sambuc
247*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
248*971bb1a5SLionel Sambuc return xcb_ret;
249*971bb1a5SLionel Sambuc }
250*971bb1a5SLionel Sambuc
251*971bb1a5SLionel Sambuc xcb_xevie_send_cookie_t
xcb_xevie_send_unchecked(xcb_connection_t * c,xcb_xevie_event_t event,uint32_t data_type)252*971bb1a5SLionel Sambuc xcb_xevie_send_unchecked (xcb_connection_t *c /**< */,
253*971bb1a5SLionel Sambuc xcb_xevie_event_t event /**< */,
254*971bb1a5SLionel Sambuc uint32_t data_type /**< */)
255*971bb1a5SLionel Sambuc {
256*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
257*971bb1a5SLionel Sambuc /* count */ 2,
258*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
259*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_SEND,
260*971bb1a5SLionel Sambuc /* isvoid */ 0
261*971bb1a5SLionel Sambuc };
262*971bb1a5SLionel Sambuc
263*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
264*971bb1a5SLionel Sambuc xcb_xevie_send_cookie_t xcb_ret;
265*971bb1a5SLionel Sambuc xcb_xevie_send_request_t xcb_out;
266*971bb1a5SLionel Sambuc
267*971bb1a5SLionel Sambuc xcb_out.event = event;
268*971bb1a5SLionel Sambuc xcb_out.data_type = data_type;
269*971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 64);
270*971bb1a5SLionel Sambuc
271*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
272*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
273*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
274*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
275*971bb1a5SLionel Sambuc
276*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
277*971bb1a5SLionel Sambuc return xcb_ret;
278*971bb1a5SLionel Sambuc }
279*971bb1a5SLionel Sambuc
280*971bb1a5SLionel Sambuc xcb_xevie_send_reply_t *
xcb_xevie_send_reply(xcb_connection_t * c,xcb_xevie_send_cookie_t cookie,xcb_generic_error_t ** e)281*971bb1a5SLionel Sambuc xcb_xevie_send_reply (xcb_connection_t *c /**< */,
282*971bb1a5SLionel Sambuc xcb_xevie_send_cookie_t cookie /**< */,
283*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
284*971bb1a5SLionel Sambuc {
285*971bb1a5SLionel Sambuc return (xcb_xevie_send_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
286*971bb1a5SLionel Sambuc }
287*971bb1a5SLionel Sambuc
288*971bb1a5SLionel Sambuc xcb_xevie_select_input_cookie_t
xcb_xevie_select_input(xcb_connection_t * c,uint32_t event_mask)289*971bb1a5SLionel Sambuc xcb_xevie_select_input (xcb_connection_t *c /**< */,
290*971bb1a5SLionel Sambuc uint32_t event_mask /**< */)
291*971bb1a5SLionel Sambuc {
292*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
293*971bb1a5SLionel Sambuc /* count */ 2,
294*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
295*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_SELECT_INPUT,
296*971bb1a5SLionel Sambuc /* isvoid */ 0
297*971bb1a5SLionel Sambuc };
298*971bb1a5SLionel Sambuc
299*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
300*971bb1a5SLionel Sambuc xcb_xevie_select_input_cookie_t xcb_ret;
301*971bb1a5SLionel Sambuc xcb_xevie_select_input_request_t xcb_out;
302*971bb1a5SLionel Sambuc
303*971bb1a5SLionel Sambuc xcb_out.event_mask = event_mask;
304*971bb1a5SLionel Sambuc
305*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
306*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
307*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
308*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
309*971bb1a5SLionel Sambuc
310*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
311*971bb1a5SLionel Sambuc return xcb_ret;
312*971bb1a5SLionel Sambuc }
313*971bb1a5SLionel Sambuc
314*971bb1a5SLionel Sambuc xcb_xevie_select_input_cookie_t
xcb_xevie_select_input_unchecked(xcb_connection_t * c,uint32_t event_mask)315*971bb1a5SLionel Sambuc xcb_xevie_select_input_unchecked (xcb_connection_t *c /**< */,
316*971bb1a5SLionel Sambuc uint32_t event_mask /**< */)
317*971bb1a5SLionel Sambuc {
318*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
319*971bb1a5SLionel Sambuc /* count */ 2,
320*971bb1a5SLionel Sambuc /* ext */ &xcb_xevie_id,
321*971bb1a5SLionel Sambuc /* opcode */ XCB_XEVIE_SELECT_INPUT,
322*971bb1a5SLionel Sambuc /* isvoid */ 0
323*971bb1a5SLionel Sambuc };
324*971bb1a5SLionel Sambuc
325*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
326*971bb1a5SLionel Sambuc xcb_xevie_select_input_cookie_t xcb_ret;
327*971bb1a5SLionel Sambuc xcb_xevie_select_input_request_t xcb_out;
328*971bb1a5SLionel Sambuc
329*971bb1a5SLionel Sambuc xcb_out.event_mask = event_mask;
330*971bb1a5SLionel Sambuc
331*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
332*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
333*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
334*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
335*971bb1a5SLionel Sambuc
336*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
337*971bb1a5SLionel Sambuc return xcb_ret;
338*971bb1a5SLionel Sambuc }
339*971bb1a5SLionel Sambuc
340*971bb1a5SLionel Sambuc xcb_xevie_select_input_reply_t *
xcb_xevie_select_input_reply(xcb_connection_t * c,xcb_xevie_select_input_cookie_t cookie,xcb_generic_error_t ** e)341*971bb1a5SLionel Sambuc xcb_xevie_select_input_reply (xcb_connection_t *c /**< */,
342*971bb1a5SLionel Sambuc xcb_xevie_select_input_cookie_t cookie /**< */,
343*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
344*971bb1a5SLionel Sambuc {
345*971bb1a5SLionel Sambuc return (xcb_xevie_select_input_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
346*971bb1a5SLionel Sambuc }
347*971bb1a5SLionel Sambuc
348