Remove building with NOCRYPTO option
[minix.git] / external / mit / xorg / lib / libxcb / files / xevie.c
blob708882df6485bc97570067a92ee72a6623a40d36
1 /*
2 * This file generated automatically from xevie.xml by c_client.py.
3 * Edit at your peril.
4 */
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 "xevie.h"
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
18 xcb_extension_t xcb_xevie_id = { "XEVIE", 0 };
20 xcb_xevie_query_version_cookie_t
21 xcb_xevie_query_version (xcb_connection_t *c /**< */,
22 uint16_t client_major_version /**< */,
23 uint16_t client_minor_version /**< */)
25 static const xcb_protocol_request_t xcb_req = {
26 /* count */ 2,
27 /* ext */ &xcb_xevie_id,
28 /* opcode */ XCB_XEVIE_QUERY_VERSION,
29 /* isvoid */ 0
32 struct iovec xcb_parts[4];
33 xcb_xevie_query_version_cookie_t xcb_ret;
34 xcb_xevie_query_version_request_t xcb_out;
36 xcb_out.client_major_version = client_major_version;
37 xcb_out.client_minor_version = client_minor_version;
39 xcb_parts[2].iov_base = (char *) &xcb_out;
40 xcb_parts[2].iov_len = sizeof(xcb_out);
41 xcb_parts[3].iov_base = 0;
42 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
44 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
45 return xcb_ret;
48 xcb_xevie_query_version_cookie_t
49 xcb_xevie_query_version_unchecked (xcb_connection_t *c /**< */,
50 uint16_t client_major_version /**< */,
51 uint16_t client_minor_version /**< */)
53 static const xcb_protocol_request_t xcb_req = {
54 /* count */ 2,
55 /* ext */ &xcb_xevie_id,
56 /* opcode */ XCB_XEVIE_QUERY_VERSION,
57 /* isvoid */ 0
60 struct iovec xcb_parts[4];
61 xcb_xevie_query_version_cookie_t xcb_ret;
62 xcb_xevie_query_version_request_t xcb_out;
64 xcb_out.client_major_version = client_major_version;
65 xcb_out.client_minor_version = client_minor_version;
67 xcb_parts[2].iov_base = (char *) &xcb_out;
68 xcb_parts[2].iov_len = sizeof(xcb_out);
69 xcb_parts[3].iov_base = 0;
70 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
72 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
73 return xcb_ret;
76 xcb_xevie_query_version_reply_t *
77 xcb_xevie_query_version_reply (xcb_connection_t *c /**< */,
78 xcb_xevie_query_version_cookie_t cookie /**< */,
79 xcb_generic_error_t **e /**< */)
81 return (xcb_xevie_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
84 xcb_xevie_start_cookie_t
85 xcb_xevie_start (xcb_connection_t *c /**< */,
86 uint32_t screen /**< */)
88 static const xcb_protocol_request_t xcb_req = {
89 /* count */ 2,
90 /* ext */ &xcb_xevie_id,
91 /* opcode */ XCB_XEVIE_START,
92 /* isvoid */ 0
95 struct iovec xcb_parts[4];
96 xcb_xevie_start_cookie_t xcb_ret;
97 xcb_xevie_start_request_t xcb_out;
99 xcb_out.screen = screen;
101 xcb_parts[2].iov_base = (char *) &xcb_out;
102 xcb_parts[2].iov_len = sizeof(xcb_out);
103 xcb_parts[3].iov_base = 0;
104 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
106 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
107 return xcb_ret;
110 xcb_xevie_start_cookie_t
111 xcb_xevie_start_unchecked (xcb_connection_t *c /**< */,
112 uint32_t screen /**< */)
114 static const xcb_protocol_request_t xcb_req = {
115 /* count */ 2,
116 /* ext */ &xcb_xevie_id,
117 /* opcode */ XCB_XEVIE_START,
118 /* isvoid */ 0
121 struct iovec xcb_parts[4];
122 xcb_xevie_start_cookie_t xcb_ret;
123 xcb_xevie_start_request_t xcb_out;
125 xcb_out.screen = screen;
127 xcb_parts[2].iov_base = (char *) &xcb_out;
128 xcb_parts[2].iov_len = sizeof(xcb_out);
129 xcb_parts[3].iov_base = 0;
130 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
132 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
133 return xcb_ret;
136 xcb_xevie_start_reply_t *
137 xcb_xevie_start_reply (xcb_connection_t *c /**< */,
138 xcb_xevie_start_cookie_t cookie /**< */,
139 xcb_generic_error_t **e /**< */)
141 return (xcb_xevie_start_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
144 xcb_xevie_end_cookie_t
145 xcb_xevie_end (xcb_connection_t *c /**< */,
146 uint32_t cmap /**< */)
148 static const xcb_protocol_request_t xcb_req = {
149 /* count */ 2,
150 /* ext */ &xcb_xevie_id,
151 /* opcode */ XCB_XEVIE_END,
152 /* isvoid */ 0
155 struct iovec xcb_parts[4];
156 xcb_xevie_end_cookie_t xcb_ret;
157 xcb_xevie_end_request_t xcb_out;
159 xcb_out.cmap = cmap;
161 xcb_parts[2].iov_base = (char *) &xcb_out;
162 xcb_parts[2].iov_len = sizeof(xcb_out);
163 xcb_parts[3].iov_base = 0;
164 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
166 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
167 return xcb_ret;
170 xcb_xevie_end_cookie_t
171 xcb_xevie_end_unchecked (xcb_connection_t *c /**< */,
172 uint32_t cmap /**< */)
174 static const xcb_protocol_request_t xcb_req = {
175 /* count */ 2,
176 /* ext */ &xcb_xevie_id,
177 /* opcode */ XCB_XEVIE_END,
178 /* isvoid */ 0
181 struct iovec xcb_parts[4];
182 xcb_xevie_end_cookie_t xcb_ret;
183 xcb_xevie_end_request_t xcb_out;
185 xcb_out.cmap = cmap;
187 xcb_parts[2].iov_base = (char *) &xcb_out;
188 xcb_parts[2].iov_len = sizeof(xcb_out);
189 xcb_parts[3].iov_base = 0;
190 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
192 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
193 return xcb_ret;
196 xcb_xevie_end_reply_t *
197 xcb_xevie_end_reply (xcb_connection_t *c /**< */,
198 xcb_xevie_end_cookie_t cookie /**< */,
199 xcb_generic_error_t **e /**< */)
201 return (xcb_xevie_end_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
204 void
205 xcb_xevie_event_next (xcb_xevie_event_iterator_t *i /**< */)
207 --i->rem;
208 ++i->data;
209 i->index += sizeof(xcb_xevie_event_t);
212 xcb_generic_iterator_t
213 xcb_xevie_event_end (xcb_xevie_event_iterator_t i /**< */)
215 xcb_generic_iterator_t ret;
216 ret.data = i.data + i.rem;
217 ret.index = i.index + ((char *) ret.data - (char *) i.data);
218 ret.rem = 0;
219 return ret;
222 xcb_xevie_send_cookie_t
223 xcb_xevie_send (xcb_connection_t *c /**< */,
224 xcb_xevie_event_t event /**< */,
225 uint32_t data_type /**< */)
227 static const xcb_protocol_request_t xcb_req = {
228 /* count */ 2,
229 /* ext */ &xcb_xevie_id,
230 /* opcode */ XCB_XEVIE_SEND,
231 /* isvoid */ 0
234 struct iovec xcb_parts[4];
235 xcb_xevie_send_cookie_t xcb_ret;
236 xcb_xevie_send_request_t xcb_out;
238 xcb_out.event = event;
239 xcb_out.data_type = data_type;
240 memset(xcb_out.pad0, 0, 64);
242 xcb_parts[2].iov_base = (char *) &xcb_out;
243 xcb_parts[2].iov_len = sizeof(xcb_out);
244 xcb_parts[3].iov_base = 0;
245 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
247 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
248 return xcb_ret;
251 xcb_xevie_send_cookie_t
252 xcb_xevie_send_unchecked (xcb_connection_t *c /**< */,
253 xcb_xevie_event_t event /**< */,
254 uint32_t data_type /**< */)
256 static const xcb_protocol_request_t xcb_req = {
257 /* count */ 2,
258 /* ext */ &xcb_xevie_id,
259 /* opcode */ XCB_XEVIE_SEND,
260 /* isvoid */ 0
263 struct iovec xcb_parts[4];
264 xcb_xevie_send_cookie_t xcb_ret;
265 xcb_xevie_send_request_t xcb_out;
267 xcb_out.event = event;
268 xcb_out.data_type = data_type;
269 memset(xcb_out.pad0, 0, 64);
271 xcb_parts[2].iov_base = (char *) &xcb_out;
272 xcb_parts[2].iov_len = sizeof(xcb_out);
273 xcb_parts[3].iov_base = 0;
274 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
276 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
277 return xcb_ret;
280 xcb_xevie_send_reply_t *
281 xcb_xevie_send_reply (xcb_connection_t *c /**< */,
282 xcb_xevie_send_cookie_t cookie /**< */,
283 xcb_generic_error_t **e /**< */)
285 return (xcb_xevie_send_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
288 xcb_xevie_select_input_cookie_t
289 xcb_xevie_select_input (xcb_connection_t *c /**< */,
290 uint32_t event_mask /**< */)
292 static const xcb_protocol_request_t xcb_req = {
293 /* count */ 2,
294 /* ext */ &xcb_xevie_id,
295 /* opcode */ XCB_XEVIE_SELECT_INPUT,
296 /* isvoid */ 0
299 struct iovec xcb_parts[4];
300 xcb_xevie_select_input_cookie_t xcb_ret;
301 xcb_xevie_select_input_request_t xcb_out;
303 xcb_out.event_mask = event_mask;
305 xcb_parts[2].iov_base = (char *) &xcb_out;
306 xcb_parts[2].iov_len = sizeof(xcb_out);
307 xcb_parts[3].iov_base = 0;
308 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
310 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
311 return xcb_ret;
314 xcb_xevie_select_input_cookie_t
315 xcb_xevie_select_input_unchecked (xcb_connection_t *c /**< */,
316 uint32_t event_mask /**< */)
318 static const xcb_protocol_request_t xcb_req = {
319 /* count */ 2,
320 /* ext */ &xcb_xevie_id,
321 /* opcode */ XCB_XEVIE_SELECT_INPUT,
322 /* isvoid */ 0
325 struct iovec xcb_parts[4];
326 xcb_xevie_select_input_cookie_t xcb_ret;
327 xcb_xevie_select_input_request_t xcb_out;
329 xcb_out.event_mask = event_mask;
331 xcb_parts[2].iov_base = (char *) &xcb_out;
332 xcb_parts[2].iov_len = sizeof(xcb_out);
333 xcb_parts[3].iov_base = 0;
334 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
336 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
337 return xcb_ret;
340 xcb_xevie_select_input_reply_t *
341 xcb_xevie_select_input_reply (xcb_connection_t *c /**< */,
342 xcb_xevie_select_input_cookie_t cookie /**< */,
343 xcb_generic_error_t **e /**< */)
345 return (xcb_xevie_select_input_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);