etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / lib / libxcb / files / composite.c
blobb79e9ac4646a00a42c66005f7030ea3de0de1829
1 /*
2 * This file generated automatically from composite.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 "composite.h"
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
18 #include "xfixes.h"
20 xcb_extension_t xcb_composite_id = { "Composite", 0 };
22 xcb_composite_query_version_cookie_t
23 xcb_composite_query_version (xcb_connection_t *c /**< */,
24 uint32_t client_major_version /**< */,
25 uint32_t client_minor_version /**< */)
27 static const xcb_protocol_request_t xcb_req = {
28 /* count */ 2,
29 /* ext */ &xcb_composite_id,
30 /* opcode */ XCB_COMPOSITE_QUERY_VERSION,
31 /* isvoid */ 0
34 struct iovec xcb_parts[4];
35 xcb_composite_query_version_cookie_t xcb_ret;
36 xcb_composite_query_version_request_t xcb_out;
38 xcb_out.client_major_version = client_major_version;
39 xcb_out.client_minor_version = client_minor_version;
41 xcb_parts[2].iov_base = (char *) &xcb_out;
42 xcb_parts[2].iov_len = sizeof(xcb_out);
43 xcb_parts[3].iov_base = 0;
44 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
46 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
47 return xcb_ret;
50 xcb_composite_query_version_cookie_t
51 xcb_composite_query_version_unchecked (xcb_connection_t *c /**< */,
52 uint32_t client_major_version /**< */,
53 uint32_t client_minor_version /**< */)
55 static const xcb_protocol_request_t xcb_req = {
56 /* count */ 2,
57 /* ext */ &xcb_composite_id,
58 /* opcode */ XCB_COMPOSITE_QUERY_VERSION,
59 /* isvoid */ 0
62 struct iovec xcb_parts[4];
63 xcb_composite_query_version_cookie_t xcb_ret;
64 xcb_composite_query_version_request_t xcb_out;
66 xcb_out.client_major_version = client_major_version;
67 xcb_out.client_minor_version = client_minor_version;
69 xcb_parts[2].iov_base = (char *) &xcb_out;
70 xcb_parts[2].iov_len = sizeof(xcb_out);
71 xcb_parts[3].iov_base = 0;
72 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
74 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
75 return xcb_ret;
78 xcb_composite_query_version_reply_t *
79 xcb_composite_query_version_reply (xcb_connection_t *c /**< */,
80 xcb_composite_query_version_cookie_t cookie /**< */,
81 xcb_generic_error_t **e /**< */)
83 return (xcb_composite_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
86 xcb_void_cookie_t
87 xcb_composite_redirect_window_checked (xcb_connection_t *c /**< */,
88 xcb_window_t window /**< */,
89 uint8_t update /**< */)
91 static const xcb_protocol_request_t xcb_req = {
92 /* count */ 2,
93 /* ext */ &xcb_composite_id,
94 /* opcode */ XCB_COMPOSITE_REDIRECT_WINDOW,
95 /* isvoid */ 1
98 struct iovec xcb_parts[4];
99 xcb_void_cookie_t xcb_ret;
100 xcb_composite_redirect_window_request_t xcb_out;
102 xcb_out.window = window;
103 xcb_out.update = update;
104 memset(xcb_out.pad0, 0, 3);
106 xcb_parts[2].iov_base = (char *) &xcb_out;
107 xcb_parts[2].iov_len = sizeof(xcb_out);
108 xcb_parts[3].iov_base = 0;
109 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
111 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
112 return xcb_ret;
115 xcb_void_cookie_t
116 xcb_composite_redirect_window (xcb_connection_t *c /**< */,
117 xcb_window_t window /**< */,
118 uint8_t update /**< */)
120 static const xcb_protocol_request_t xcb_req = {
121 /* count */ 2,
122 /* ext */ &xcb_composite_id,
123 /* opcode */ XCB_COMPOSITE_REDIRECT_WINDOW,
124 /* isvoid */ 1
127 struct iovec xcb_parts[4];
128 xcb_void_cookie_t xcb_ret;
129 xcb_composite_redirect_window_request_t xcb_out;
131 xcb_out.window = window;
132 xcb_out.update = update;
133 memset(xcb_out.pad0, 0, 3);
135 xcb_parts[2].iov_base = (char *) &xcb_out;
136 xcb_parts[2].iov_len = sizeof(xcb_out);
137 xcb_parts[3].iov_base = 0;
138 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
140 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
141 return xcb_ret;
144 xcb_void_cookie_t
145 xcb_composite_redirect_subwindows_checked (xcb_connection_t *c /**< */,
146 xcb_window_t window /**< */,
147 uint8_t update /**< */)
149 static const xcb_protocol_request_t xcb_req = {
150 /* count */ 2,
151 /* ext */ &xcb_composite_id,
152 /* opcode */ XCB_COMPOSITE_REDIRECT_SUBWINDOWS,
153 /* isvoid */ 1
156 struct iovec xcb_parts[4];
157 xcb_void_cookie_t xcb_ret;
158 xcb_composite_redirect_subwindows_request_t xcb_out;
160 xcb_out.window = window;
161 xcb_out.update = update;
162 memset(xcb_out.pad0, 0, 3);
164 xcb_parts[2].iov_base = (char *) &xcb_out;
165 xcb_parts[2].iov_len = sizeof(xcb_out);
166 xcb_parts[3].iov_base = 0;
167 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
169 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
170 return xcb_ret;
173 xcb_void_cookie_t
174 xcb_composite_redirect_subwindows (xcb_connection_t *c /**< */,
175 xcb_window_t window /**< */,
176 uint8_t update /**< */)
178 static const xcb_protocol_request_t xcb_req = {
179 /* count */ 2,
180 /* ext */ &xcb_composite_id,
181 /* opcode */ XCB_COMPOSITE_REDIRECT_SUBWINDOWS,
182 /* isvoid */ 1
185 struct iovec xcb_parts[4];
186 xcb_void_cookie_t xcb_ret;
187 xcb_composite_redirect_subwindows_request_t xcb_out;
189 xcb_out.window = window;
190 xcb_out.update = update;
191 memset(xcb_out.pad0, 0, 3);
193 xcb_parts[2].iov_base = (char *) &xcb_out;
194 xcb_parts[2].iov_len = sizeof(xcb_out);
195 xcb_parts[3].iov_base = 0;
196 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
198 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
199 return xcb_ret;
202 xcb_void_cookie_t
203 xcb_composite_unredirect_window_checked (xcb_connection_t *c /**< */,
204 xcb_window_t window /**< */,
205 uint8_t update /**< */)
207 static const xcb_protocol_request_t xcb_req = {
208 /* count */ 2,
209 /* ext */ &xcb_composite_id,
210 /* opcode */ XCB_COMPOSITE_UNREDIRECT_WINDOW,
211 /* isvoid */ 1
214 struct iovec xcb_parts[4];
215 xcb_void_cookie_t xcb_ret;
216 xcb_composite_unredirect_window_request_t xcb_out;
218 xcb_out.window = window;
219 xcb_out.update = update;
220 memset(xcb_out.pad0, 0, 3);
222 xcb_parts[2].iov_base = (char *) &xcb_out;
223 xcb_parts[2].iov_len = sizeof(xcb_out);
224 xcb_parts[3].iov_base = 0;
225 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
227 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
228 return xcb_ret;
231 xcb_void_cookie_t
232 xcb_composite_unredirect_window (xcb_connection_t *c /**< */,
233 xcb_window_t window /**< */,
234 uint8_t update /**< */)
236 static const xcb_protocol_request_t xcb_req = {
237 /* count */ 2,
238 /* ext */ &xcb_composite_id,
239 /* opcode */ XCB_COMPOSITE_UNREDIRECT_WINDOW,
240 /* isvoid */ 1
243 struct iovec xcb_parts[4];
244 xcb_void_cookie_t xcb_ret;
245 xcb_composite_unredirect_window_request_t xcb_out;
247 xcb_out.window = window;
248 xcb_out.update = update;
249 memset(xcb_out.pad0, 0, 3);
251 xcb_parts[2].iov_base = (char *) &xcb_out;
252 xcb_parts[2].iov_len = sizeof(xcb_out);
253 xcb_parts[3].iov_base = 0;
254 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
256 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
257 return xcb_ret;
260 xcb_void_cookie_t
261 xcb_composite_unredirect_subwindows_checked (xcb_connection_t *c /**< */,
262 xcb_window_t window /**< */,
263 uint8_t update /**< */)
265 static const xcb_protocol_request_t xcb_req = {
266 /* count */ 2,
267 /* ext */ &xcb_composite_id,
268 /* opcode */ XCB_COMPOSITE_UNREDIRECT_SUBWINDOWS,
269 /* isvoid */ 1
272 struct iovec xcb_parts[4];
273 xcb_void_cookie_t xcb_ret;
274 xcb_composite_unredirect_subwindows_request_t xcb_out;
276 xcb_out.window = window;
277 xcb_out.update = update;
278 memset(xcb_out.pad0, 0, 3);
280 xcb_parts[2].iov_base = (char *) &xcb_out;
281 xcb_parts[2].iov_len = sizeof(xcb_out);
282 xcb_parts[3].iov_base = 0;
283 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
285 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
286 return xcb_ret;
289 xcb_void_cookie_t
290 xcb_composite_unredirect_subwindows (xcb_connection_t *c /**< */,
291 xcb_window_t window /**< */,
292 uint8_t update /**< */)
294 static const xcb_protocol_request_t xcb_req = {
295 /* count */ 2,
296 /* ext */ &xcb_composite_id,
297 /* opcode */ XCB_COMPOSITE_UNREDIRECT_SUBWINDOWS,
298 /* isvoid */ 1
301 struct iovec xcb_parts[4];
302 xcb_void_cookie_t xcb_ret;
303 xcb_composite_unredirect_subwindows_request_t xcb_out;
305 xcb_out.window = window;
306 xcb_out.update = update;
307 memset(xcb_out.pad0, 0, 3);
309 xcb_parts[2].iov_base = (char *) &xcb_out;
310 xcb_parts[2].iov_len = sizeof(xcb_out);
311 xcb_parts[3].iov_base = 0;
312 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
314 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
315 return xcb_ret;
318 xcb_void_cookie_t
319 xcb_composite_create_region_from_border_clip_checked (xcb_connection_t *c /**< */,
320 xcb_xfixes_region_t region /**< */,
321 xcb_window_t window /**< */)
323 static const xcb_protocol_request_t xcb_req = {
324 /* count */ 2,
325 /* ext */ &xcb_composite_id,
326 /* opcode */ XCB_COMPOSITE_CREATE_REGION_FROM_BORDER_CLIP,
327 /* isvoid */ 1
330 struct iovec xcb_parts[4];
331 xcb_void_cookie_t xcb_ret;
332 xcb_composite_create_region_from_border_clip_request_t xcb_out;
334 xcb_out.region = region;
335 xcb_out.window = window;
337 xcb_parts[2].iov_base = (char *) &xcb_out;
338 xcb_parts[2].iov_len = sizeof(xcb_out);
339 xcb_parts[3].iov_base = 0;
340 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
342 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
343 return xcb_ret;
346 xcb_void_cookie_t
347 xcb_composite_create_region_from_border_clip (xcb_connection_t *c /**< */,
348 xcb_xfixes_region_t region /**< */,
349 xcb_window_t window /**< */)
351 static const xcb_protocol_request_t xcb_req = {
352 /* count */ 2,
353 /* ext */ &xcb_composite_id,
354 /* opcode */ XCB_COMPOSITE_CREATE_REGION_FROM_BORDER_CLIP,
355 /* isvoid */ 1
358 struct iovec xcb_parts[4];
359 xcb_void_cookie_t xcb_ret;
360 xcb_composite_create_region_from_border_clip_request_t xcb_out;
362 xcb_out.region = region;
363 xcb_out.window = window;
365 xcb_parts[2].iov_base = (char *) &xcb_out;
366 xcb_parts[2].iov_len = sizeof(xcb_out);
367 xcb_parts[3].iov_base = 0;
368 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
370 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
371 return xcb_ret;
374 xcb_void_cookie_t
375 xcb_composite_name_window_pixmap_checked (xcb_connection_t *c /**< */,
376 xcb_window_t window /**< */,
377 xcb_pixmap_t pixmap /**< */)
379 static const xcb_protocol_request_t xcb_req = {
380 /* count */ 2,
381 /* ext */ &xcb_composite_id,
382 /* opcode */ XCB_COMPOSITE_NAME_WINDOW_PIXMAP,
383 /* isvoid */ 1
386 struct iovec xcb_parts[4];
387 xcb_void_cookie_t xcb_ret;
388 xcb_composite_name_window_pixmap_request_t xcb_out;
390 xcb_out.window = window;
391 xcb_out.pixmap = pixmap;
393 xcb_parts[2].iov_base = (char *) &xcb_out;
394 xcb_parts[2].iov_len = sizeof(xcb_out);
395 xcb_parts[3].iov_base = 0;
396 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
398 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
399 return xcb_ret;
402 xcb_void_cookie_t
403 xcb_composite_name_window_pixmap (xcb_connection_t *c /**< */,
404 xcb_window_t window /**< */,
405 xcb_pixmap_t pixmap /**< */)
407 static const xcb_protocol_request_t xcb_req = {
408 /* count */ 2,
409 /* ext */ &xcb_composite_id,
410 /* opcode */ XCB_COMPOSITE_NAME_WINDOW_PIXMAP,
411 /* isvoid */ 1
414 struct iovec xcb_parts[4];
415 xcb_void_cookie_t xcb_ret;
416 xcb_composite_name_window_pixmap_request_t xcb_out;
418 xcb_out.window = window;
419 xcb_out.pixmap = pixmap;
421 xcb_parts[2].iov_base = (char *) &xcb_out;
422 xcb_parts[2].iov_len = sizeof(xcb_out);
423 xcb_parts[3].iov_base = 0;
424 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
426 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
427 return xcb_ret;
430 xcb_composite_get_overlay_window_cookie_t
431 xcb_composite_get_overlay_window (xcb_connection_t *c /**< */,
432 xcb_window_t window /**< */)
434 static const xcb_protocol_request_t xcb_req = {
435 /* count */ 2,
436 /* ext */ &xcb_composite_id,
437 /* opcode */ XCB_COMPOSITE_GET_OVERLAY_WINDOW,
438 /* isvoid */ 0
441 struct iovec xcb_parts[4];
442 xcb_composite_get_overlay_window_cookie_t xcb_ret;
443 xcb_composite_get_overlay_window_request_t xcb_out;
445 xcb_out.window = window;
447 xcb_parts[2].iov_base = (char *) &xcb_out;
448 xcb_parts[2].iov_len = sizeof(xcb_out);
449 xcb_parts[3].iov_base = 0;
450 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
452 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
453 return xcb_ret;
456 xcb_composite_get_overlay_window_cookie_t
457 xcb_composite_get_overlay_window_unchecked (xcb_connection_t *c /**< */,
458 xcb_window_t window /**< */)
460 static const xcb_protocol_request_t xcb_req = {
461 /* count */ 2,
462 /* ext */ &xcb_composite_id,
463 /* opcode */ XCB_COMPOSITE_GET_OVERLAY_WINDOW,
464 /* isvoid */ 0
467 struct iovec xcb_parts[4];
468 xcb_composite_get_overlay_window_cookie_t xcb_ret;
469 xcb_composite_get_overlay_window_request_t xcb_out;
471 xcb_out.window = window;
473 xcb_parts[2].iov_base = (char *) &xcb_out;
474 xcb_parts[2].iov_len = sizeof(xcb_out);
475 xcb_parts[3].iov_base = 0;
476 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
478 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
479 return xcb_ret;
482 xcb_composite_get_overlay_window_reply_t *
483 xcb_composite_get_overlay_window_reply (xcb_connection_t *c /**< */,
484 xcb_composite_get_overlay_window_cookie_t cookie /**< */,
485 xcb_generic_error_t **e /**< */)
487 return (xcb_composite_get_overlay_window_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
490 xcb_void_cookie_t
491 xcb_composite_release_overlay_window_checked (xcb_connection_t *c /**< */,
492 xcb_window_t window /**< */)
494 static const xcb_protocol_request_t xcb_req = {
495 /* count */ 2,
496 /* ext */ &xcb_composite_id,
497 /* opcode */ XCB_COMPOSITE_RELEASE_OVERLAY_WINDOW,
498 /* isvoid */ 1
501 struct iovec xcb_parts[4];
502 xcb_void_cookie_t xcb_ret;
503 xcb_composite_release_overlay_window_request_t xcb_out;
505 xcb_out.window = window;
507 xcb_parts[2].iov_base = (char *) &xcb_out;
508 xcb_parts[2].iov_len = sizeof(xcb_out);
509 xcb_parts[3].iov_base = 0;
510 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
512 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
513 return xcb_ret;
516 xcb_void_cookie_t
517 xcb_composite_release_overlay_window (xcb_connection_t *c /**< */,
518 xcb_window_t window /**< */)
520 static const xcb_protocol_request_t xcb_req = {
521 /* count */ 2,
522 /* ext */ &xcb_composite_id,
523 /* opcode */ XCB_COMPOSITE_RELEASE_OVERLAY_WINDOW,
524 /* isvoid */ 1
527 struct iovec xcb_parts[4];
528 xcb_void_cookie_t xcb_ret;
529 xcb_composite_release_overlay_window_request_t xcb_out;
531 xcb_out.window = window;
533 xcb_parts[2].iov_base = (char *) &xcb_out;
534 xcb_parts[2].iov_len = sizeof(xcb_out);
535 xcb_parts[3].iov_base = 0;
536 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
538 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
539 return xcb_ret;