etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / lib / libxcb / files / xfixes.c
bloba10868c4474a43b66d24c3e20a9c2a147add3759
1 /*
2 * This file generated automatically from xfixes.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 "xfixes.h"
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
18 #include "render.h"
19 #include "shape.h"
21 xcb_extension_t xcb_xfixes_id = { "XFIXES", 0 };
23 xcb_xfixes_query_version_cookie_t
24 xcb_xfixes_query_version (xcb_connection_t *c /**< */,
25 uint32_t client_major_version /**< */,
26 uint32_t client_minor_version /**< */)
28 static const xcb_protocol_request_t xcb_req = {
29 /* count */ 2,
30 /* ext */ &xcb_xfixes_id,
31 /* opcode */ XCB_XFIXES_QUERY_VERSION,
32 /* isvoid */ 0
35 struct iovec xcb_parts[4];
36 xcb_xfixes_query_version_cookie_t xcb_ret;
37 xcb_xfixes_query_version_request_t xcb_out;
39 xcb_out.client_major_version = client_major_version;
40 xcb_out.client_minor_version = client_minor_version;
42 xcb_parts[2].iov_base = (char *) &xcb_out;
43 xcb_parts[2].iov_len = sizeof(xcb_out);
44 xcb_parts[3].iov_base = 0;
45 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
47 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
48 return xcb_ret;
51 xcb_xfixes_query_version_cookie_t
52 xcb_xfixes_query_version_unchecked (xcb_connection_t *c /**< */,
53 uint32_t client_major_version /**< */,
54 uint32_t client_minor_version /**< */)
56 static const xcb_protocol_request_t xcb_req = {
57 /* count */ 2,
58 /* ext */ &xcb_xfixes_id,
59 /* opcode */ XCB_XFIXES_QUERY_VERSION,
60 /* isvoid */ 0
63 struct iovec xcb_parts[4];
64 xcb_xfixes_query_version_cookie_t xcb_ret;
65 xcb_xfixes_query_version_request_t xcb_out;
67 xcb_out.client_major_version = client_major_version;
68 xcb_out.client_minor_version = client_minor_version;
70 xcb_parts[2].iov_base = (char *) &xcb_out;
71 xcb_parts[2].iov_len = sizeof(xcb_out);
72 xcb_parts[3].iov_base = 0;
73 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
75 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
76 return xcb_ret;
79 xcb_xfixes_query_version_reply_t *
80 xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */,
81 xcb_xfixes_query_version_cookie_t cookie /**< */,
82 xcb_generic_error_t **e /**< */)
84 return (xcb_xfixes_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
87 xcb_void_cookie_t
88 xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */,
89 uint8_t mode /**< */,
90 uint8_t target /**< */,
91 uint8_t map /**< */,
92 xcb_window_t window /**< */)
94 static const xcb_protocol_request_t xcb_req = {
95 /* count */ 2,
96 /* ext */ &xcb_xfixes_id,
97 /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET,
98 /* isvoid */ 1
101 struct iovec xcb_parts[4];
102 xcb_void_cookie_t xcb_ret;
103 xcb_xfixes_change_save_set_request_t xcb_out;
105 xcb_out.mode = mode;
106 xcb_out.target = target;
107 xcb_out.map = map;
108 xcb_out.pad0 = 0;
109 xcb_out.window = window;
111 xcb_parts[2].iov_base = (char *) &xcb_out;
112 xcb_parts[2].iov_len = sizeof(xcb_out);
113 xcb_parts[3].iov_base = 0;
114 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
116 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
117 return xcb_ret;
120 xcb_void_cookie_t
121 xcb_xfixes_change_save_set (xcb_connection_t *c /**< */,
122 uint8_t mode /**< */,
123 uint8_t target /**< */,
124 uint8_t map /**< */,
125 xcb_window_t window /**< */)
127 static const xcb_protocol_request_t xcb_req = {
128 /* count */ 2,
129 /* ext */ &xcb_xfixes_id,
130 /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET,
131 /* isvoid */ 1
134 struct iovec xcb_parts[4];
135 xcb_void_cookie_t xcb_ret;
136 xcb_xfixes_change_save_set_request_t xcb_out;
138 xcb_out.mode = mode;
139 xcb_out.target = target;
140 xcb_out.map = map;
141 xcb_out.pad0 = 0;
142 xcb_out.window = window;
144 xcb_parts[2].iov_base = (char *) &xcb_out;
145 xcb_parts[2].iov_len = sizeof(xcb_out);
146 xcb_parts[3].iov_base = 0;
147 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
149 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
150 return xcb_ret;
153 xcb_void_cookie_t
154 xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */,
155 xcb_window_t window /**< */,
156 xcb_atom_t selection /**< */,
157 uint32_t event_mask /**< */)
159 static const xcb_protocol_request_t xcb_req = {
160 /* count */ 2,
161 /* ext */ &xcb_xfixes_id,
162 /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT,
163 /* isvoid */ 1
166 struct iovec xcb_parts[4];
167 xcb_void_cookie_t xcb_ret;
168 xcb_xfixes_select_selection_input_request_t xcb_out;
170 xcb_out.window = window;
171 xcb_out.selection = selection;
172 xcb_out.event_mask = event_mask;
174 xcb_parts[2].iov_base = (char *) &xcb_out;
175 xcb_parts[2].iov_len = sizeof(xcb_out);
176 xcb_parts[3].iov_base = 0;
177 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
179 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
180 return xcb_ret;
183 xcb_void_cookie_t
184 xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */,
185 xcb_window_t window /**< */,
186 xcb_atom_t selection /**< */,
187 uint32_t event_mask /**< */)
189 static const xcb_protocol_request_t xcb_req = {
190 /* count */ 2,
191 /* ext */ &xcb_xfixes_id,
192 /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT,
193 /* isvoid */ 1
196 struct iovec xcb_parts[4];
197 xcb_void_cookie_t xcb_ret;
198 xcb_xfixes_select_selection_input_request_t xcb_out;
200 xcb_out.window = window;
201 xcb_out.selection = selection;
202 xcb_out.event_mask = event_mask;
204 xcb_parts[2].iov_base = (char *) &xcb_out;
205 xcb_parts[2].iov_len = sizeof(xcb_out);
206 xcb_parts[3].iov_base = 0;
207 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
209 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
210 return xcb_ret;
213 xcb_void_cookie_t
214 xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */,
215 xcb_window_t window /**< */,
216 uint32_t event_mask /**< */)
218 static const xcb_protocol_request_t xcb_req = {
219 /* count */ 2,
220 /* ext */ &xcb_xfixes_id,
221 /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT,
222 /* isvoid */ 1
225 struct iovec xcb_parts[4];
226 xcb_void_cookie_t xcb_ret;
227 xcb_xfixes_select_cursor_input_request_t xcb_out;
229 xcb_out.window = window;
230 xcb_out.event_mask = event_mask;
232 xcb_parts[2].iov_base = (char *) &xcb_out;
233 xcb_parts[2].iov_len = sizeof(xcb_out);
234 xcb_parts[3].iov_base = 0;
235 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
237 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
238 return xcb_ret;
241 xcb_void_cookie_t
242 xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */,
243 xcb_window_t window /**< */,
244 uint32_t event_mask /**< */)
246 static const xcb_protocol_request_t xcb_req = {
247 /* count */ 2,
248 /* ext */ &xcb_xfixes_id,
249 /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT,
250 /* isvoid */ 1
253 struct iovec xcb_parts[4];
254 xcb_void_cookie_t xcb_ret;
255 xcb_xfixes_select_cursor_input_request_t xcb_out;
257 xcb_out.window = window;
258 xcb_out.event_mask = event_mask;
260 xcb_parts[2].iov_base = (char *) &xcb_out;
261 xcb_parts[2].iov_len = sizeof(xcb_out);
262 xcb_parts[3].iov_base = 0;
263 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
265 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
266 return xcb_ret;
270 xcb_xfixes_get_cursor_image_sizeof (const void *_buffer /**< */)
272 char *xcb_tmp = (char *)_buffer;
273 const xcb_xfixes_get_cursor_image_reply_t *_aux = (xcb_xfixes_get_cursor_image_reply_t *)_buffer;
274 unsigned int xcb_buffer_len = 0;
275 unsigned int xcb_block_len = 0;
276 unsigned int xcb_pad = 0;
277 unsigned int xcb_align_to = 0;
280 xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_reply_t);
281 xcb_tmp += xcb_block_len;
282 xcb_buffer_len += xcb_block_len;
283 xcb_block_len = 0;
284 /* cursor_image */
285 xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t);
286 xcb_tmp += xcb_block_len;
287 xcb_align_to = ALIGNOF(uint32_t);
288 /* insert padding */
289 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
290 xcb_buffer_len += xcb_block_len + xcb_pad;
291 if (0 != xcb_pad) {
292 xcb_tmp += xcb_pad;
293 xcb_pad = 0;
295 xcb_block_len = 0;
297 return xcb_buffer_len;
300 xcb_xfixes_get_cursor_image_cookie_t
301 xcb_xfixes_get_cursor_image (xcb_connection_t *c /**< */)
303 static const xcb_protocol_request_t xcb_req = {
304 /* count */ 2,
305 /* ext */ &xcb_xfixes_id,
306 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE,
307 /* isvoid */ 0
310 struct iovec xcb_parts[4];
311 xcb_xfixes_get_cursor_image_cookie_t xcb_ret;
312 xcb_xfixes_get_cursor_image_request_t xcb_out;
315 xcb_parts[2].iov_base = (char *) &xcb_out;
316 xcb_parts[2].iov_len = sizeof(xcb_out);
317 xcb_parts[3].iov_base = 0;
318 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
320 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
321 return xcb_ret;
324 xcb_xfixes_get_cursor_image_cookie_t
325 xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c /**< */)
327 static const xcb_protocol_request_t xcb_req = {
328 /* count */ 2,
329 /* ext */ &xcb_xfixes_id,
330 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE,
331 /* isvoid */ 0
334 struct iovec xcb_parts[4];
335 xcb_xfixes_get_cursor_image_cookie_t xcb_ret;
336 xcb_xfixes_get_cursor_image_request_t xcb_out;
339 xcb_parts[2].iov_base = (char *) &xcb_out;
340 xcb_parts[2].iov_len = sizeof(xcb_out);
341 xcb_parts[3].iov_base = 0;
342 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
344 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
345 return xcb_ret;
348 uint32_t *
349 xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R /**< */)
351 return (uint32_t *) (R + 1);
355 xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R /**< */)
357 return (R->width * R->height);
360 xcb_generic_iterator_t
361 xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_reply_t *R /**< */)
363 xcb_generic_iterator_t i;
364 i.data = ((uint32_t *) (R + 1)) + ((R->width * R->height));
365 i.rem = 0;
366 i.index = (char *) i.data - (char *) R;
367 return i;
370 xcb_xfixes_get_cursor_image_reply_t *
371 xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c /**< */,
372 xcb_xfixes_get_cursor_image_cookie_t cookie /**< */,
373 xcb_generic_error_t **e /**< */)
375 return (xcb_xfixes_get_cursor_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
378 void
379 xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */)
381 --i->rem;
382 ++i->data;
383 i->index += sizeof(xcb_xfixes_region_t);
386 xcb_generic_iterator_t
387 xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */)
389 xcb_generic_iterator_t ret;
390 ret.data = i.data + i.rem;
391 ret.index = i.index + ((char *) ret.data - (char *) i.data);
392 ret.rem = 0;
393 return ret;
397 xcb_xfixes_create_region_sizeof (const void *_buffer /**< */,
398 uint32_t rectangles_len /**< */)
400 char *xcb_tmp = (char *)_buffer;
401 unsigned int xcb_buffer_len = 0;
402 unsigned int xcb_block_len = 0;
403 unsigned int xcb_pad = 0;
404 unsigned int xcb_align_to = 0;
407 xcb_block_len += sizeof(xcb_xfixes_create_region_request_t);
408 xcb_tmp += xcb_block_len;
409 xcb_buffer_len += xcb_block_len;
410 xcb_block_len = 0;
411 /* rectangles */
412 xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
413 xcb_tmp += xcb_block_len;
414 xcb_align_to = ALIGNOF(xcb_rectangle_t);
415 /* insert padding */
416 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
417 xcb_buffer_len += xcb_block_len + xcb_pad;
418 if (0 != xcb_pad) {
419 xcb_tmp += xcb_pad;
420 xcb_pad = 0;
422 xcb_block_len = 0;
424 return xcb_buffer_len;
427 xcb_void_cookie_t
428 xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */,
429 xcb_xfixes_region_t region /**< */,
430 uint32_t rectangles_len /**< */,
431 const xcb_rectangle_t *rectangles /**< */)
433 static const xcb_protocol_request_t xcb_req = {
434 /* count */ 4,
435 /* ext */ &xcb_xfixes_id,
436 /* opcode */ XCB_XFIXES_CREATE_REGION,
437 /* isvoid */ 1
440 struct iovec xcb_parts[6];
441 xcb_void_cookie_t xcb_ret;
442 xcb_xfixes_create_region_request_t xcb_out;
444 xcb_out.region = region;
446 xcb_parts[2].iov_base = (char *) &xcb_out;
447 xcb_parts[2].iov_len = sizeof(xcb_out);
448 xcb_parts[3].iov_base = 0;
449 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
450 /* xcb_rectangle_t rectangles */
451 xcb_parts[4].iov_base = (char *) rectangles;
452 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
453 xcb_parts[5].iov_base = 0;
454 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
456 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
457 return xcb_ret;
460 xcb_void_cookie_t
461 xcb_xfixes_create_region (xcb_connection_t *c /**< */,
462 xcb_xfixes_region_t region /**< */,
463 uint32_t rectangles_len /**< */,
464 const xcb_rectangle_t *rectangles /**< */)
466 static const xcb_protocol_request_t xcb_req = {
467 /* count */ 4,
468 /* ext */ &xcb_xfixes_id,
469 /* opcode */ XCB_XFIXES_CREATE_REGION,
470 /* isvoid */ 1
473 struct iovec xcb_parts[6];
474 xcb_void_cookie_t xcb_ret;
475 xcb_xfixes_create_region_request_t xcb_out;
477 xcb_out.region = region;
479 xcb_parts[2].iov_base = (char *) &xcb_out;
480 xcb_parts[2].iov_len = sizeof(xcb_out);
481 xcb_parts[3].iov_base = 0;
482 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
483 /* xcb_rectangle_t rectangles */
484 xcb_parts[4].iov_base = (char *) rectangles;
485 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
486 xcb_parts[5].iov_base = 0;
487 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
489 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
490 return xcb_ret;
493 xcb_void_cookie_t
494 xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */,
495 xcb_xfixes_region_t region /**< */,
496 xcb_pixmap_t bitmap /**< */)
498 static const xcb_protocol_request_t xcb_req = {
499 /* count */ 2,
500 /* ext */ &xcb_xfixes_id,
501 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP,
502 /* isvoid */ 1
505 struct iovec xcb_parts[4];
506 xcb_void_cookie_t xcb_ret;
507 xcb_xfixes_create_region_from_bitmap_request_t xcb_out;
509 xcb_out.region = region;
510 xcb_out.bitmap = bitmap;
512 xcb_parts[2].iov_base = (char *) &xcb_out;
513 xcb_parts[2].iov_len = sizeof(xcb_out);
514 xcb_parts[3].iov_base = 0;
515 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
517 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
518 return xcb_ret;
521 xcb_void_cookie_t
522 xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */,
523 xcb_xfixes_region_t region /**< */,
524 xcb_pixmap_t bitmap /**< */)
526 static const xcb_protocol_request_t xcb_req = {
527 /* count */ 2,
528 /* ext */ &xcb_xfixes_id,
529 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP,
530 /* isvoid */ 1
533 struct iovec xcb_parts[4];
534 xcb_void_cookie_t xcb_ret;
535 xcb_xfixes_create_region_from_bitmap_request_t xcb_out;
537 xcb_out.region = region;
538 xcb_out.bitmap = bitmap;
540 xcb_parts[2].iov_base = (char *) &xcb_out;
541 xcb_parts[2].iov_len = sizeof(xcb_out);
542 xcb_parts[3].iov_base = 0;
543 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
545 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
546 return xcb_ret;
549 xcb_void_cookie_t
550 xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */,
551 xcb_xfixes_region_t region /**< */,
552 xcb_window_t window /**< */,
553 xcb_shape_kind_t kind /**< */)
555 static const xcb_protocol_request_t xcb_req = {
556 /* count */ 2,
557 /* ext */ &xcb_xfixes_id,
558 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW,
559 /* isvoid */ 1
562 struct iovec xcb_parts[4];
563 xcb_void_cookie_t xcb_ret;
564 xcb_xfixes_create_region_from_window_request_t xcb_out;
566 xcb_out.region = region;
567 xcb_out.window = window;
568 xcb_out.kind = kind;
569 memset(xcb_out.pad0, 0, 3);
571 xcb_parts[2].iov_base = (char *) &xcb_out;
572 xcb_parts[2].iov_len = sizeof(xcb_out);
573 xcb_parts[3].iov_base = 0;
574 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
576 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
577 return xcb_ret;
580 xcb_void_cookie_t
581 xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */,
582 xcb_xfixes_region_t region /**< */,
583 xcb_window_t window /**< */,
584 xcb_shape_kind_t kind /**< */)
586 static const xcb_protocol_request_t xcb_req = {
587 /* count */ 2,
588 /* ext */ &xcb_xfixes_id,
589 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW,
590 /* isvoid */ 1
593 struct iovec xcb_parts[4];
594 xcb_void_cookie_t xcb_ret;
595 xcb_xfixes_create_region_from_window_request_t xcb_out;
597 xcb_out.region = region;
598 xcb_out.window = window;
599 xcb_out.kind = kind;
600 memset(xcb_out.pad0, 0, 3);
602 xcb_parts[2].iov_base = (char *) &xcb_out;
603 xcb_parts[2].iov_len = sizeof(xcb_out);
604 xcb_parts[3].iov_base = 0;
605 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
607 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
608 return xcb_ret;
611 xcb_void_cookie_t
612 xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */,
613 xcb_xfixes_region_t region /**< */,
614 xcb_gcontext_t gc /**< */)
616 static const xcb_protocol_request_t xcb_req = {
617 /* count */ 2,
618 /* ext */ &xcb_xfixes_id,
619 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC,
620 /* isvoid */ 1
623 struct iovec xcb_parts[4];
624 xcb_void_cookie_t xcb_ret;
625 xcb_xfixes_create_region_from_gc_request_t xcb_out;
627 xcb_out.region = region;
628 xcb_out.gc = gc;
630 xcb_parts[2].iov_base = (char *) &xcb_out;
631 xcb_parts[2].iov_len = sizeof(xcb_out);
632 xcb_parts[3].iov_base = 0;
633 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
635 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
636 return xcb_ret;
639 xcb_void_cookie_t
640 xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */,
641 xcb_xfixes_region_t region /**< */,
642 xcb_gcontext_t gc /**< */)
644 static const xcb_protocol_request_t xcb_req = {
645 /* count */ 2,
646 /* ext */ &xcb_xfixes_id,
647 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC,
648 /* isvoid */ 1
651 struct iovec xcb_parts[4];
652 xcb_void_cookie_t xcb_ret;
653 xcb_xfixes_create_region_from_gc_request_t xcb_out;
655 xcb_out.region = region;
656 xcb_out.gc = gc;
658 xcb_parts[2].iov_base = (char *) &xcb_out;
659 xcb_parts[2].iov_len = sizeof(xcb_out);
660 xcb_parts[3].iov_base = 0;
661 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
663 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
664 return xcb_ret;
667 xcb_void_cookie_t
668 xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */,
669 xcb_xfixes_region_t region /**< */,
670 xcb_render_picture_t picture /**< */)
672 static const xcb_protocol_request_t xcb_req = {
673 /* count */ 2,
674 /* ext */ &xcb_xfixes_id,
675 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE,
676 /* isvoid */ 1
679 struct iovec xcb_parts[4];
680 xcb_void_cookie_t xcb_ret;
681 xcb_xfixes_create_region_from_picture_request_t xcb_out;
683 xcb_out.region = region;
684 xcb_out.picture = picture;
686 xcb_parts[2].iov_base = (char *) &xcb_out;
687 xcb_parts[2].iov_len = sizeof(xcb_out);
688 xcb_parts[3].iov_base = 0;
689 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
691 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
692 return xcb_ret;
695 xcb_void_cookie_t
696 xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */,
697 xcb_xfixes_region_t region /**< */,
698 xcb_render_picture_t picture /**< */)
700 static const xcb_protocol_request_t xcb_req = {
701 /* count */ 2,
702 /* ext */ &xcb_xfixes_id,
703 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE,
704 /* isvoid */ 1
707 struct iovec xcb_parts[4];
708 xcb_void_cookie_t xcb_ret;
709 xcb_xfixes_create_region_from_picture_request_t xcb_out;
711 xcb_out.region = region;
712 xcb_out.picture = picture;
714 xcb_parts[2].iov_base = (char *) &xcb_out;
715 xcb_parts[2].iov_len = sizeof(xcb_out);
716 xcb_parts[3].iov_base = 0;
717 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
719 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
720 return xcb_ret;
723 xcb_void_cookie_t
724 xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */,
725 xcb_xfixes_region_t region /**< */)
727 static const xcb_protocol_request_t xcb_req = {
728 /* count */ 2,
729 /* ext */ &xcb_xfixes_id,
730 /* opcode */ XCB_XFIXES_DESTROY_REGION,
731 /* isvoid */ 1
734 struct iovec xcb_parts[4];
735 xcb_void_cookie_t xcb_ret;
736 xcb_xfixes_destroy_region_request_t xcb_out;
738 xcb_out.region = region;
740 xcb_parts[2].iov_base = (char *) &xcb_out;
741 xcb_parts[2].iov_len = sizeof(xcb_out);
742 xcb_parts[3].iov_base = 0;
743 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
745 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
746 return xcb_ret;
749 xcb_void_cookie_t
750 xcb_xfixes_destroy_region (xcb_connection_t *c /**< */,
751 xcb_xfixes_region_t region /**< */)
753 static const xcb_protocol_request_t xcb_req = {
754 /* count */ 2,
755 /* ext */ &xcb_xfixes_id,
756 /* opcode */ XCB_XFIXES_DESTROY_REGION,
757 /* isvoid */ 1
760 struct iovec xcb_parts[4];
761 xcb_void_cookie_t xcb_ret;
762 xcb_xfixes_destroy_region_request_t xcb_out;
764 xcb_out.region = region;
766 xcb_parts[2].iov_base = (char *) &xcb_out;
767 xcb_parts[2].iov_len = sizeof(xcb_out);
768 xcb_parts[3].iov_base = 0;
769 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
771 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
772 return xcb_ret;
776 xcb_xfixes_set_region_sizeof (const void *_buffer /**< */,
777 uint32_t rectangles_len /**< */)
779 char *xcb_tmp = (char *)_buffer;
780 unsigned int xcb_buffer_len = 0;
781 unsigned int xcb_block_len = 0;
782 unsigned int xcb_pad = 0;
783 unsigned int xcb_align_to = 0;
786 xcb_block_len += sizeof(xcb_xfixes_set_region_request_t);
787 xcb_tmp += xcb_block_len;
788 xcb_buffer_len += xcb_block_len;
789 xcb_block_len = 0;
790 /* rectangles */
791 xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
792 xcb_tmp += xcb_block_len;
793 xcb_align_to = ALIGNOF(xcb_rectangle_t);
794 /* insert padding */
795 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
796 xcb_buffer_len += xcb_block_len + xcb_pad;
797 if (0 != xcb_pad) {
798 xcb_tmp += xcb_pad;
799 xcb_pad = 0;
801 xcb_block_len = 0;
803 return xcb_buffer_len;
806 xcb_void_cookie_t
807 xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */,
808 xcb_xfixes_region_t region /**< */,
809 uint32_t rectangles_len /**< */,
810 const xcb_rectangle_t *rectangles /**< */)
812 static const xcb_protocol_request_t xcb_req = {
813 /* count */ 4,
814 /* ext */ &xcb_xfixes_id,
815 /* opcode */ XCB_XFIXES_SET_REGION,
816 /* isvoid */ 1
819 struct iovec xcb_parts[6];
820 xcb_void_cookie_t xcb_ret;
821 xcb_xfixes_set_region_request_t xcb_out;
823 xcb_out.region = region;
825 xcb_parts[2].iov_base = (char *) &xcb_out;
826 xcb_parts[2].iov_len = sizeof(xcb_out);
827 xcb_parts[3].iov_base = 0;
828 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
829 /* xcb_rectangle_t rectangles */
830 xcb_parts[4].iov_base = (char *) rectangles;
831 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
832 xcb_parts[5].iov_base = 0;
833 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
835 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
836 return xcb_ret;
839 xcb_void_cookie_t
840 xcb_xfixes_set_region (xcb_connection_t *c /**< */,
841 xcb_xfixes_region_t region /**< */,
842 uint32_t rectangles_len /**< */,
843 const xcb_rectangle_t *rectangles /**< */)
845 static const xcb_protocol_request_t xcb_req = {
846 /* count */ 4,
847 /* ext */ &xcb_xfixes_id,
848 /* opcode */ XCB_XFIXES_SET_REGION,
849 /* isvoid */ 1
852 struct iovec xcb_parts[6];
853 xcb_void_cookie_t xcb_ret;
854 xcb_xfixes_set_region_request_t xcb_out;
856 xcb_out.region = region;
858 xcb_parts[2].iov_base = (char *) &xcb_out;
859 xcb_parts[2].iov_len = sizeof(xcb_out);
860 xcb_parts[3].iov_base = 0;
861 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
862 /* xcb_rectangle_t rectangles */
863 xcb_parts[4].iov_base = (char *) rectangles;
864 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
865 xcb_parts[5].iov_base = 0;
866 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
868 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
869 return xcb_ret;
872 xcb_void_cookie_t
873 xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */,
874 xcb_xfixes_region_t source /**< */,
875 xcb_xfixes_region_t destination /**< */)
877 static const xcb_protocol_request_t xcb_req = {
878 /* count */ 2,
879 /* ext */ &xcb_xfixes_id,
880 /* opcode */ XCB_XFIXES_COPY_REGION,
881 /* isvoid */ 1
884 struct iovec xcb_parts[4];
885 xcb_void_cookie_t xcb_ret;
886 xcb_xfixes_copy_region_request_t xcb_out;
888 xcb_out.source = source;
889 xcb_out.destination = destination;
891 xcb_parts[2].iov_base = (char *) &xcb_out;
892 xcb_parts[2].iov_len = sizeof(xcb_out);
893 xcb_parts[3].iov_base = 0;
894 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
896 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
897 return xcb_ret;
900 xcb_void_cookie_t
901 xcb_xfixes_copy_region (xcb_connection_t *c /**< */,
902 xcb_xfixes_region_t source /**< */,
903 xcb_xfixes_region_t destination /**< */)
905 static const xcb_protocol_request_t xcb_req = {
906 /* count */ 2,
907 /* ext */ &xcb_xfixes_id,
908 /* opcode */ XCB_XFIXES_COPY_REGION,
909 /* isvoid */ 1
912 struct iovec xcb_parts[4];
913 xcb_void_cookie_t xcb_ret;
914 xcb_xfixes_copy_region_request_t xcb_out;
916 xcb_out.source = source;
917 xcb_out.destination = destination;
919 xcb_parts[2].iov_base = (char *) &xcb_out;
920 xcb_parts[2].iov_len = sizeof(xcb_out);
921 xcb_parts[3].iov_base = 0;
922 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
924 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
925 return xcb_ret;
928 xcb_void_cookie_t
929 xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */,
930 xcb_xfixes_region_t source1 /**< */,
931 xcb_xfixes_region_t source2 /**< */,
932 xcb_xfixes_region_t destination /**< */)
934 static const xcb_protocol_request_t xcb_req = {
935 /* count */ 2,
936 /* ext */ &xcb_xfixes_id,
937 /* opcode */ XCB_XFIXES_UNION_REGION,
938 /* isvoid */ 1
941 struct iovec xcb_parts[4];
942 xcb_void_cookie_t xcb_ret;
943 xcb_xfixes_union_region_request_t xcb_out;
945 xcb_out.source1 = source1;
946 xcb_out.source2 = source2;
947 xcb_out.destination = destination;
949 xcb_parts[2].iov_base = (char *) &xcb_out;
950 xcb_parts[2].iov_len = sizeof(xcb_out);
951 xcb_parts[3].iov_base = 0;
952 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
954 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
955 return xcb_ret;
958 xcb_void_cookie_t
959 xcb_xfixes_union_region (xcb_connection_t *c /**< */,
960 xcb_xfixes_region_t source1 /**< */,
961 xcb_xfixes_region_t source2 /**< */,
962 xcb_xfixes_region_t destination /**< */)
964 static const xcb_protocol_request_t xcb_req = {
965 /* count */ 2,
966 /* ext */ &xcb_xfixes_id,
967 /* opcode */ XCB_XFIXES_UNION_REGION,
968 /* isvoid */ 1
971 struct iovec xcb_parts[4];
972 xcb_void_cookie_t xcb_ret;
973 xcb_xfixes_union_region_request_t xcb_out;
975 xcb_out.source1 = source1;
976 xcb_out.source2 = source2;
977 xcb_out.destination = destination;
979 xcb_parts[2].iov_base = (char *) &xcb_out;
980 xcb_parts[2].iov_len = sizeof(xcb_out);
981 xcb_parts[3].iov_base = 0;
982 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
984 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
985 return xcb_ret;
988 xcb_void_cookie_t
989 xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */,
990 xcb_xfixes_region_t source1 /**< */,
991 xcb_xfixes_region_t source2 /**< */,
992 xcb_xfixes_region_t destination /**< */)
994 static const xcb_protocol_request_t xcb_req = {
995 /* count */ 2,
996 /* ext */ &xcb_xfixes_id,
997 /* opcode */ XCB_XFIXES_INTERSECT_REGION,
998 /* isvoid */ 1
1001 struct iovec xcb_parts[4];
1002 xcb_void_cookie_t xcb_ret;
1003 xcb_xfixes_intersect_region_request_t xcb_out;
1005 xcb_out.source1 = source1;
1006 xcb_out.source2 = source2;
1007 xcb_out.destination = destination;
1009 xcb_parts[2].iov_base = (char *) &xcb_out;
1010 xcb_parts[2].iov_len = sizeof(xcb_out);
1011 xcb_parts[3].iov_base = 0;
1012 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1014 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1015 return xcb_ret;
1018 xcb_void_cookie_t
1019 xcb_xfixes_intersect_region (xcb_connection_t *c /**< */,
1020 xcb_xfixes_region_t source1 /**< */,
1021 xcb_xfixes_region_t source2 /**< */,
1022 xcb_xfixes_region_t destination /**< */)
1024 static const xcb_protocol_request_t xcb_req = {
1025 /* count */ 2,
1026 /* ext */ &xcb_xfixes_id,
1027 /* opcode */ XCB_XFIXES_INTERSECT_REGION,
1028 /* isvoid */ 1
1031 struct iovec xcb_parts[4];
1032 xcb_void_cookie_t xcb_ret;
1033 xcb_xfixes_intersect_region_request_t xcb_out;
1035 xcb_out.source1 = source1;
1036 xcb_out.source2 = source2;
1037 xcb_out.destination = destination;
1039 xcb_parts[2].iov_base = (char *) &xcb_out;
1040 xcb_parts[2].iov_len = sizeof(xcb_out);
1041 xcb_parts[3].iov_base = 0;
1042 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1044 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1045 return xcb_ret;
1048 xcb_void_cookie_t
1049 xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */,
1050 xcb_xfixes_region_t source1 /**< */,
1051 xcb_xfixes_region_t source2 /**< */,
1052 xcb_xfixes_region_t destination /**< */)
1054 static const xcb_protocol_request_t xcb_req = {
1055 /* count */ 2,
1056 /* ext */ &xcb_xfixes_id,
1057 /* opcode */ XCB_XFIXES_SUBTRACT_REGION,
1058 /* isvoid */ 1
1061 struct iovec xcb_parts[4];
1062 xcb_void_cookie_t xcb_ret;
1063 xcb_xfixes_subtract_region_request_t xcb_out;
1065 xcb_out.source1 = source1;
1066 xcb_out.source2 = source2;
1067 xcb_out.destination = destination;
1069 xcb_parts[2].iov_base = (char *) &xcb_out;
1070 xcb_parts[2].iov_len = sizeof(xcb_out);
1071 xcb_parts[3].iov_base = 0;
1072 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1074 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1075 return xcb_ret;
1078 xcb_void_cookie_t
1079 xcb_xfixes_subtract_region (xcb_connection_t *c /**< */,
1080 xcb_xfixes_region_t source1 /**< */,
1081 xcb_xfixes_region_t source2 /**< */,
1082 xcb_xfixes_region_t destination /**< */)
1084 static const xcb_protocol_request_t xcb_req = {
1085 /* count */ 2,
1086 /* ext */ &xcb_xfixes_id,
1087 /* opcode */ XCB_XFIXES_SUBTRACT_REGION,
1088 /* isvoid */ 1
1091 struct iovec xcb_parts[4];
1092 xcb_void_cookie_t xcb_ret;
1093 xcb_xfixes_subtract_region_request_t xcb_out;
1095 xcb_out.source1 = source1;
1096 xcb_out.source2 = source2;
1097 xcb_out.destination = destination;
1099 xcb_parts[2].iov_base = (char *) &xcb_out;
1100 xcb_parts[2].iov_len = sizeof(xcb_out);
1101 xcb_parts[3].iov_base = 0;
1102 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1104 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1105 return xcb_ret;
1108 xcb_void_cookie_t
1109 xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */,
1110 xcb_xfixes_region_t source /**< */,
1111 xcb_rectangle_t bounds /**< */,
1112 xcb_xfixes_region_t destination /**< */)
1114 static const xcb_protocol_request_t xcb_req = {
1115 /* count */ 2,
1116 /* ext */ &xcb_xfixes_id,
1117 /* opcode */ XCB_XFIXES_INVERT_REGION,
1118 /* isvoid */ 1
1121 struct iovec xcb_parts[4];
1122 xcb_void_cookie_t xcb_ret;
1123 xcb_xfixes_invert_region_request_t xcb_out;
1125 xcb_out.source = source;
1126 xcb_out.bounds = bounds;
1127 xcb_out.destination = destination;
1129 xcb_parts[2].iov_base = (char *) &xcb_out;
1130 xcb_parts[2].iov_len = sizeof(xcb_out);
1131 xcb_parts[3].iov_base = 0;
1132 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1134 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1135 return xcb_ret;
1138 xcb_void_cookie_t
1139 xcb_xfixes_invert_region (xcb_connection_t *c /**< */,
1140 xcb_xfixes_region_t source /**< */,
1141 xcb_rectangle_t bounds /**< */,
1142 xcb_xfixes_region_t destination /**< */)
1144 static const xcb_protocol_request_t xcb_req = {
1145 /* count */ 2,
1146 /* ext */ &xcb_xfixes_id,
1147 /* opcode */ XCB_XFIXES_INVERT_REGION,
1148 /* isvoid */ 1
1151 struct iovec xcb_parts[4];
1152 xcb_void_cookie_t xcb_ret;
1153 xcb_xfixes_invert_region_request_t xcb_out;
1155 xcb_out.source = source;
1156 xcb_out.bounds = bounds;
1157 xcb_out.destination = destination;
1159 xcb_parts[2].iov_base = (char *) &xcb_out;
1160 xcb_parts[2].iov_len = sizeof(xcb_out);
1161 xcb_parts[3].iov_base = 0;
1162 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1164 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1165 return xcb_ret;
1168 xcb_void_cookie_t
1169 xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */,
1170 xcb_xfixes_region_t region /**< */,
1171 int16_t dx /**< */,
1172 int16_t dy /**< */)
1174 static const xcb_protocol_request_t xcb_req = {
1175 /* count */ 2,
1176 /* ext */ &xcb_xfixes_id,
1177 /* opcode */ XCB_XFIXES_TRANSLATE_REGION,
1178 /* isvoid */ 1
1181 struct iovec xcb_parts[4];
1182 xcb_void_cookie_t xcb_ret;
1183 xcb_xfixes_translate_region_request_t xcb_out;
1185 xcb_out.region = region;
1186 xcb_out.dx = dx;
1187 xcb_out.dy = dy;
1189 xcb_parts[2].iov_base = (char *) &xcb_out;
1190 xcb_parts[2].iov_len = sizeof(xcb_out);
1191 xcb_parts[3].iov_base = 0;
1192 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1194 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1195 return xcb_ret;
1198 xcb_void_cookie_t
1199 xcb_xfixes_translate_region (xcb_connection_t *c /**< */,
1200 xcb_xfixes_region_t region /**< */,
1201 int16_t dx /**< */,
1202 int16_t dy /**< */)
1204 static const xcb_protocol_request_t xcb_req = {
1205 /* count */ 2,
1206 /* ext */ &xcb_xfixes_id,
1207 /* opcode */ XCB_XFIXES_TRANSLATE_REGION,
1208 /* isvoid */ 1
1211 struct iovec xcb_parts[4];
1212 xcb_void_cookie_t xcb_ret;
1213 xcb_xfixes_translate_region_request_t xcb_out;
1215 xcb_out.region = region;
1216 xcb_out.dx = dx;
1217 xcb_out.dy = dy;
1219 xcb_parts[2].iov_base = (char *) &xcb_out;
1220 xcb_parts[2].iov_len = sizeof(xcb_out);
1221 xcb_parts[3].iov_base = 0;
1222 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1224 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1225 return xcb_ret;
1228 xcb_void_cookie_t
1229 xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */,
1230 xcb_xfixes_region_t source /**< */,
1231 xcb_xfixes_region_t destination /**< */)
1233 static const xcb_protocol_request_t xcb_req = {
1234 /* count */ 2,
1235 /* ext */ &xcb_xfixes_id,
1236 /* opcode */ XCB_XFIXES_REGION_EXTENTS,
1237 /* isvoid */ 1
1240 struct iovec xcb_parts[4];
1241 xcb_void_cookie_t xcb_ret;
1242 xcb_xfixes_region_extents_request_t xcb_out;
1244 xcb_out.source = source;
1245 xcb_out.destination = destination;
1247 xcb_parts[2].iov_base = (char *) &xcb_out;
1248 xcb_parts[2].iov_len = sizeof(xcb_out);
1249 xcb_parts[3].iov_base = 0;
1250 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1252 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1253 return xcb_ret;
1256 xcb_void_cookie_t
1257 xcb_xfixes_region_extents (xcb_connection_t *c /**< */,
1258 xcb_xfixes_region_t source /**< */,
1259 xcb_xfixes_region_t destination /**< */)
1261 static const xcb_protocol_request_t xcb_req = {
1262 /* count */ 2,
1263 /* ext */ &xcb_xfixes_id,
1264 /* opcode */ XCB_XFIXES_REGION_EXTENTS,
1265 /* isvoid */ 1
1268 struct iovec xcb_parts[4];
1269 xcb_void_cookie_t xcb_ret;
1270 xcb_xfixes_region_extents_request_t xcb_out;
1272 xcb_out.source = source;
1273 xcb_out.destination = destination;
1275 xcb_parts[2].iov_base = (char *) &xcb_out;
1276 xcb_parts[2].iov_len = sizeof(xcb_out);
1277 xcb_parts[3].iov_base = 0;
1278 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1280 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1281 return xcb_ret;
1285 xcb_xfixes_fetch_region_sizeof (const void *_buffer /**< */)
1287 char *xcb_tmp = (char *)_buffer;
1288 const xcb_xfixes_fetch_region_reply_t *_aux = (xcb_xfixes_fetch_region_reply_t *)_buffer;
1289 unsigned int xcb_buffer_len = 0;
1290 unsigned int xcb_block_len = 0;
1291 unsigned int xcb_pad = 0;
1292 unsigned int xcb_align_to = 0;
1295 xcb_block_len += sizeof(xcb_xfixes_fetch_region_reply_t);
1296 xcb_tmp += xcb_block_len;
1297 xcb_buffer_len += xcb_block_len;
1298 xcb_block_len = 0;
1299 /* rectangles */
1300 xcb_block_len += (_aux->length / 2) * sizeof(xcb_rectangle_t);
1301 xcb_tmp += xcb_block_len;
1302 xcb_align_to = ALIGNOF(xcb_rectangle_t);
1303 /* insert padding */
1304 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1305 xcb_buffer_len += xcb_block_len + xcb_pad;
1306 if (0 != xcb_pad) {
1307 xcb_tmp += xcb_pad;
1308 xcb_pad = 0;
1310 xcb_block_len = 0;
1312 return xcb_buffer_len;
1315 xcb_xfixes_fetch_region_cookie_t
1316 xcb_xfixes_fetch_region (xcb_connection_t *c /**< */,
1317 xcb_xfixes_region_t region /**< */)
1319 static const xcb_protocol_request_t xcb_req = {
1320 /* count */ 2,
1321 /* ext */ &xcb_xfixes_id,
1322 /* opcode */ XCB_XFIXES_FETCH_REGION,
1323 /* isvoid */ 0
1326 struct iovec xcb_parts[4];
1327 xcb_xfixes_fetch_region_cookie_t xcb_ret;
1328 xcb_xfixes_fetch_region_request_t xcb_out;
1330 xcb_out.region = region;
1332 xcb_parts[2].iov_base = (char *) &xcb_out;
1333 xcb_parts[2].iov_len = sizeof(xcb_out);
1334 xcb_parts[3].iov_base = 0;
1335 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1337 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1338 return xcb_ret;
1341 xcb_xfixes_fetch_region_cookie_t
1342 xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c /**< */,
1343 xcb_xfixes_region_t region /**< */)
1345 static const xcb_protocol_request_t xcb_req = {
1346 /* count */ 2,
1347 /* ext */ &xcb_xfixes_id,
1348 /* opcode */ XCB_XFIXES_FETCH_REGION,
1349 /* isvoid */ 0
1352 struct iovec xcb_parts[4];
1353 xcb_xfixes_fetch_region_cookie_t xcb_ret;
1354 xcb_xfixes_fetch_region_request_t xcb_out;
1356 xcb_out.region = region;
1358 xcb_parts[2].iov_base = (char *) &xcb_out;
1359 xcb_parts[2].iov_len = sizeof(xcb_out);
1360 xcb_parts[3].iov_base = 0;
1361 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1363 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1364 return xcb_ret;
1367 xcb_rectangle_t *
1368 xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R /**< */)
1370 return (xcb_rectangle_t *) (R + 1);
1374 xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R /**< */)
1376 return (R->length / 2);
1379 xcb_rectangle_iterator_t
1380 xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_reply_t *R /**< */)
1382 xcb_rectangle_iterator_t i;
1383 i.data = (xcb_rectangle_t *) (R + 1);
1384 i.rem = (R->length / 2);
1385 i.index = (char *) i.data - (char *) R;
1386 return i;
1389 xcb_xfixes_fetch_region_reply_t *
1390 xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */,
1391 xcb_xfixes_fetch_region_cookie_t cookie /**< */,
1392 xcb_generic_error_t **e /**< */)
1394 return (xcb_xfixes_fetch_region_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1397 xcb_void_cookie_t
1398 xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */,
1399 xcb_gcontext_t gc /**< */,
1400 xcb_xfixes_region_t region /**< */,
1401 int16_t x_origin /**< */,
1402 int16_t y_origin /**< */)
1404 static const xcb_protocol_request_t xcb_req = {
1405 /* count */ 2,
1406 /* ext */ &xcb_xfixes_id,
1407 /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION,
1408 /* isvoid */ 1
1411 struct iovec xcb_parts[4];
1412 xcb_void_cookie_t xcb_ret;
1413 xcb_xfixes_set_gc_clip_region_request_t xcb_out;
1415 xcb_out.gc = gc;
1416 xcb_out.region = region;
1417 xcb_out.x_origin = x_origin;
1418 xcb_out.y_origin = y_origin;
1420 xcb_parts[2].iov_base = (char *) &xcb_out;
1421 xcb_parts[2].iov_len = sizeof(xcb_out);
1422 xcb_parts[3].iov_base = 0;
1423 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1425 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1426 return xcb_ret;
1429 xcb_void_cookie_t
1430 xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */,
1431 xcb_gcontext_t gc /**< */,
1432 xcb_xfixes_region_t region /**< */,
1433 int16_t x_origin /**< */,
1434 int16_t y_origin /**< */)
1436 static const xcb_protocol_request_t xcb_req = {
1437 /* count */ 2,
1438 /* ext */ &xcb_xfixes_id,
1439 /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION,
1440 /* isvoid */ 1
1443 struct iovec xcb_parts[4];
1444 xcb_void_cookie_t xcb_ret;
1445 xcb_xfixes_set_gc_clip_region_request_t xcb_out;
1447 xcb_out.gc = gc;
1448 xcb_out.region = region;
1449 xcb_out.x_origin = x_origin;
1450 xcb_out.y_origin = y_origin;
1452 xcb_parts[2].iov_base = (char *) &xcb_out;
1453 xcb_parts[2].iov_len = sizeof(xcb_out);
1454 xcb_parts[3].iov_base = 0;
1455 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1457 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1458 return xcb_ret;
1461 xcb_void_cookie_t
1462 xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */,
1463 xcb_window_t dest /**< */,
1464 xcb_shape_kind_t dest_kind /**< */,
1465 int16_t x_offset /**< */,
1466 int16_t y_offset /**< */,
1467 xcb_xfixes_region_t region /**< */)
1469 static const xcb_protocol_request_t xcb_req = {
1470 /* count */ 2,
1471 /* ext */ &xcb_xfixes_id,
1472 /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION,
1473 /* isvoid */ 1
1476 struct iovec xcb_parts[4];
1477 xcb_void_cookie_t xcb_ret;
1478 xcb_xfixes_set_window_shape_region_request_t xcb_out;
1480 xcb_out.dest = dest;
1481 xcb_out.dest_kind = dest_kind;
1482 memset(xcb_out.pad0, 0, 3);
1483 xcb_out.x_offset = x_offset;
1484 xcb_out.y_offset = y_offset;
1485 xcb_out.region = region;
1487 xcb_parts[2].iov_base = (char *) &xcb_out;
1488 xcb_parts[2].iov_len = sizeof(xcb_out);
1489 xcb_parts[3].iov_base = 0;
1490 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1492 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1493 return xcb_ret;
1496 xcb_void_cookie_t
1497 xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */,
1498 xcb_window_t dest /**< */,
1499 xcb_shape_kind_t dest_kind /**< */,
1500 int16_t x_offset /**< */,
1501 int16_t y_offset /**< */,
1502 xcb_xfixes_region_t region /**< */)
1504 static const xcb_protocol_request_t xcb_req = {
1505 /* count */ 2,
1506 /* ext */ &xcb_xfixes_id,
1507 /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION,
1508 /* isvoid */ 1
1511 struct iovec xcb_parts[4];
1512 xcb_void_cookie_t xcb_ret;
1513 xcb_xfixes_set_window_shape_region_request_t xcb_out;
1515 xcb_out.dest = dest;
1516 xcb_out.dest_kind = dest_kind;
1517 memset(xcb_out.pad0, 0, 3);
1518 xcb_out.x_offset = x_offset;
1519 xcb_out.y_offset = y_offset;
1520 xcb_out.region = region;
1522 xcb_parts[2].iov_base = (char *) &xcb_out;
1523 xcb_parts[2].iov_len = sizeof(xcb_out);
1524 xcb_parts[3].iov_base = 0;
1525 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1527 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1528 return xcb_ret;
1531 xcb_void_cookie_t
1532 xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */,
1533 xcb_render_picture_t picture /**< */,
1534 xcb_xfixes_region_t region /**< */,
1535 int16_t x_origin /**< */,
1536 int16_t y_origin /**< */)
1538 static const xcb_protocol_request_t xcb_req = {
1539 /* count */ 2,
1540 /* ext */ &xcb_xfixes_id,
1541 /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION,
1542 /* isvoid */ 1
1545 struct iovec xcb_parts[4];
1546 xcb_void_cookie_t xcb_ret;
1547 xcb_xfixes_set_picture_clip_region_request_t xcb_out;
1549 xcb_out.picture = picture;
1550 xcb_out.region = region;
1551 xcb_out.x_origin = x_origin;
1552 xcb_out.y_origin = y_origin;
1554 xcb_parts[2].iov_base = (char *) &xcb_out;
1555 xcb_parts[2].iov_len = sizeof(xcb_out);
1556 xcb_parts[3].iov_base = 0;
1557 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1559 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1560 return xcb_ret;
1563 xcb_void_cookie_t
1564 xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */,
1565 xcb_render_picture_t picture /**< */,
1566 xcb_xfixes_region_t region /**< */,
1567 int16_t x_origin /**< */,
1568 int16_t y_origin /**< */)
1570 static const xcb_protocol_request_t xcb_req = {
1571 /* count */ 2,
1572 /* ext */ &xcb_xfixes_id,
1573 /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION,
1574 /* isvoid */ 1
1577 struct iovec xcb_parts[4];
1578 xcb_void_cookie_t xcb_ret;
1579 xcb_xfixes_set_picture_clip_region_request_t xcb_out;
1581 xcb_out.picture = picture;
1582 xcb_out.region = region;
1583 xcb_out.x_origin = x_origin;
1584 xcb_out.y_origin = y_origin;
1586 xcb_parts[2].iov_base = (char *) &xcb_out;
1587 xcb_parts[2].iov_len = sizeof(xcb_out);
1588 xcb_parts[3].iov_base = 0;
1589 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1591 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1592 return xcb_ret;
1596 xcb_xfixes_set_cursor_name_sizeof (const void *_buffer /**< */)
1598 char *xcb_tmp = (char *)_buffer;
1599 const xcb_xfixes_set_cursor_name_request_t *_aux = (xcb_xfixes_set_cursor_name_request_t *)_buffer;
1600 unsigned int xcb_buffer_len = 0;
1601 unsigned int xcb_block_len = 0;
1602 unsigned int xcb_pad = 0;
1603 unsigned int xcb_align_to = 0;
1606 xcb_block_len += sizeof(xcb_xfixes_set_cursor_name_request_t);
1607 xcb_tmp += xcb_block_len;
1608 xcb_buffer_len += xcb_block_len;
1609 xcb_block_len = 0;
1610 /* name */
1611 xcb_block_len += _aux->nbytes * sizeof(char);
1612 xcb_tmp += xcb_block_len;
1613 xcb_align_to = ALIGNOF(char);
1614 /* insert padding */
1615 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1616 xcb_buffer_len += xcb_block_len + xcb_pad;
1617 if (0 != xcb_pad) {
1618 xcb_tmp += xcb_pad;
1619 xcb_pad = 0;
1621 xcb_block_len = 0;
1623 return xcb_buffer_len;
1626 xcb_void_cookie_t
1627 xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */,
1628 xcb_cursor_t cursor /**< */,
1629 uint16_t nbytes /**< */,
1630 const char *name /**< */)
1632 static const xcb_protocol_request_t xcb_req = {
1633 /* count */ 4,
1634 /* ext */ &xcb_xfixes_id,
1635 /* opcode */ XCB_XFIXES_SET_CURSOR_NAME,
1636 /* isvoid */ 1
1639 struct iovec xcb_parts[6];
1640 xcb_void_cookie_t xcb_ret;
1641 xcb_xfixes_set_cursor_name_request_t xcb_out;
1643 xcb_out.cursor = cursor;
1644 xcb_out.nbytes = nbytes;
1645 memset(xcb_out.pad0, 0, 2);
1647 xcb_parts[2].iov_base = (char *) &xcb_out;
1648 xcb_parts[2].iov_len = sizeof(xcb_out);
1649 xcb_parts[3].iov_base = 0;
1650 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1651 /* char name */
1652 xcb_parts[4].iov_base = (char *) name;
1653 xcb_parts[4].iov_len = nbytes * sizeof(char);
1654 xcb_parts[5].iov_base = 0;
1655 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1657 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1658 return xcb_ret;
1661 xcb_void_cookie_t
1662 xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */,
1663 xcb_cursor_t cursor /**< */,
1664 uint16_t nbytes /**< */,
1665 const char *name /**< */)
1667 static const xcb_protocol_request_t xcb_req = {
1668 /* count */ 4,
1669 /* ext */ &xcb_xfixes_id,
1670 /* opcode */ XCB_XFIXES_SET_CURSOR_NAME,
1671 /* isvoid */ 1
1674 struct iovec xcb_parts[6];
1675 xcb_void_cookie_t xcb_ret;
1676 xcb_xfixes_set_cursor_name_request_t xcb_out;
1678 xcb_out.cursor = cursor;
1679 xcb_out.nbytes = nbytes;
1680 memset(xcb_out.pad0, 0, 2);
1682 xcb_parts[2].iov_base = (char *) &xcb_out;
1683 xcb_parts[2].iov_len = sizeof(xcb_out);
1684 xcb_parts[3].iov_base = 0;
1685 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1686 /* char name */
1687 xcb_parts[4].iov_base = (char *) name;
1688 xcb_parts[4].iov_len = nbytes * sizeof(char);
1689 xcb_parts[5].iov_base = 0;
1690 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1692 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1693 return xcb_ret;
1697 xcb_xfixes_get_cursor_name_sizeof (const void *_buffer /**< */)
1699 char *xcb_tmp = (char *)_buffer;
1700 const xcb_xfixes_get_cursor_name_reply_t *_aux = (xcb_xfixes_get_cursor_name_reply_t *)_buffer;
1701 unsigned int xcb_buffer_len = 0;
1702 unsigned int xcb_block_len = 0;
1703 unsigned int xcb_pad = 0;
1704 unsigned int xcb_align_to = 0;
1707 xcb_block_len += sizeof(xcb_xfixes_get_cursor_name_reply_t);
1708 xcb_tmp += xcb_block_len;
1709 xcb_buffer_len += xcb_block_len;
1710 xcb_block_len = 0;
1711 /* name */
1712 xcb_block_len += _aux->nbytes * sizeof(char);
1713 xcb_tmp += xcb_block_len;
1714 xcb_align_to = ALIGNOF(char);
1715 /* insert padding */
1716 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1717 xcb_buffer_len += xcb_block_len + xcb_pad;
1718 if (0 != xcb_pad) {
1719 xcb_tmp += xcb_pad;
1720 xcb_pad = 0;
1722 xcb_block_len = 0;
1724 return xcb_buffer_len;
1727 xcb_xfixes_get_cursor_name_cookie_t
1728 xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */,
1729 xcb_cursor_t cursor /**< */)
1731 static const xcb_protocol_request_t xcb_req = {
1732 /* count */ 2,
1733 /* ext */ &xcb_xfixes_id,
1734 /* opcode */ XCB_XFIXES_GET_CURSOR_NAME,
1735 /* isvoid */ 0
1738 struct iovec xcb_parts[4];
1739 xcb_xfixes_get_cursor_name_cookie_t xcb_ret;
1740 xcb_xfixes_get_cursor_name_request_t xcb_out;
1742 xcb_out.cursor = cursor;
1744 xcb_parts[2].iov_base = (char *) &xcb_out;
1745 xcb_parts[2].iov_len = sizeof(xcb_out);
1746 xcb_parts[3].iov_base = 0;
1747 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1749 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1750 return xcb_ret;
1753 xcb_xfixes_get_cursor_name_cookie_t
1754 xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c /**< */,
1755 xcb_cursor_t cursor /**< */)
1757 static const xcb_protocol_request_t xcb_req = {
1758 /* count */ 2,
1759 /* ext */ &xcb_xfixes_id,
1760 /* opcode */ XCB_XFIXES_GET_CURSOR_NAME,
1761 /* isvoid */ 0
1764 struct iovec xcb_parts[4];
1765 xcb_xfixes_get_cursor_name_cookie_t xcb_ret;
1766 xcb_xfixes_get_cursor_name_request_t xcb_out;
1768 xcb_out.cursor = cursor;
1770 xcb_parts[2].iov_base = (char *) &xcb_out;
1771 xcb_parts[2].iov_len = sizeof(xcb_out);
1772 xcb_parts[3].iov_base = 0;
1773 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1775 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1776 return xcb_ret;
1779 char *
1780 xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R /**< */)
1782 return (char *) (R + 1);
1786 xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R /**< */)
1788 return R->nbytes;
1791 xcb_generic_iterator_t
1792 xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R /**< */)
1794 xcb_generic_iterator_t i;
1795 i.data = ((char *) (R + 1)) + (R->nbytes);
1796 i.rem = 0;
1797 i.index = (char *) i.data - (char *) R;
1798 return i;
1801 xcb_xfixes_get_cursor_name_reply_t *
1802 xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**< */,
1803 xcb_xfixes_get_cursor_name_cookie_t cookie /**< */,
1804 xcb_generic_error_t **e /**< */)
1806 return (xcb_xfixes_get_cursor_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1810 xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer /**< */)
1812 char *xcb_tmp = (char *)_buffer;
1813 const xcb_xfixes_get_cursor_image_and_name_reply_t *_aux = (xcb_xfixes_get_cursor_image_and_name_reply_t *)_buffer;
1814 unsigned int xcb_buffer_len = 0;
1815 unsigned int xcb_block_len = 0;
1816 unsigned int xcb_pad = 0;
1817 unsigned int xcb_align_to = 0;
1820 xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_and_name_reply_t);
1821 xcb_tmp += xcb_block_len;
1822 xcb_buffer_len += xcb_block_len;
1823 xcb_block_len = 0;
1824 /* name */
1825 xcb_block_len += _aux->nbytes * sizeof(char);
1826 xcb_tmp += xcb_block_len;
1827 xcb_align_to = ALIGNOF(char);
1828 /* insert padding */
1829 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1830 xcb_buffer_len += xcb_block_len + xcb_pad;
1831 if (0 != xcb_pad) {
1832 xcb_tmp += xcb_pad;
1833 xcb_pad = 0;
1835 xcb_block_len = 0;
1836 /* cursor_image */
1837 xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t);
1838 xcb_tmp += xcb_block_len;
1839 xcb_align_to = ALIGNOF(uint32_t);
1840 /* insert padding */
1841 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1842 xcb_buffer_len += xcb_block_len + xcb_pad;
1843 if (0 != xcb_pad) {
1844 xcb_tmp += xcb_pad;
1845 xcb_pad = 0;
1847 xcb_block_len = 0;
1849 return xcb_buffer_len;
1852 xcb_xfixes_get_cursor_image_and_name_cookie_t
1853 xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c /**< */)
1855 static const xcb_protocol_request_t xcb_req = {
1856 /* count */ 2,
1857 /* ext */ &xcb_xfixes_id,
1858 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME,
1859 /* isvoid */ 0
1862 struct iovec xcb_parts[4];
1863 xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret;
1864 xcb_xfixes_get_cursor_image_and_name_request_t xcb_out;
1867 xcb_parts[2].iov_base = (char *) &xcb_out;
1868 xcb_parts[2].iov_len = sizeof(xcb_out);
1869 xcb_parts[3].iov_base = 0;
1870 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1872 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1873 return xcb_ret;
1876 xcb_xfixes_get_cursor_image_and_name_cookie_t
1877 xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c /**< */)
1879 static const xcb_protocol_request_t xcb_req = {
1880 /* count */ 2,
1881 /* ext */ &xcb_xfixes_id,
1882 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME,
1883 /* isvoid */ 0
1886 struct iovec xcb_parts[4];
1887 xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret;
1888 xcb_xfixes_get_cursor_image_and_name_request_t xcb_out;
1891 xcb_parts[2].iov_base = (char *) &xcb_out;
1892 xcb_parts[2].iov_len = sizeof(xcb_out);
1893 xcb_parts[3].iov_base = 0;
1894 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1896 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1897 return xcb_ret;
1900 char *
1901 xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1903 return (char *) (R + 1);
1907 xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1909 return R->nbytes;
1912 xcb_generic_iterator_t
1913 xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1915 xcb_generic_iterator_t i;
1916 i.data = ((char *) (R + 1)) + (R->nbytes);
1917 i.rem = 0;
1918 i.index = (char *) i.data - (char *) R;
1919 return i;
1922 uint32_t *
1923 xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1925 xcb_generic_iterator_t prev = xcb_xfixes_get_cursor_image_and_name_name_end(R);
1926 return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
1930 xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1932 return (R->width * R->height);
1935 xcb_generic_iterator_t
1936 xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1938 xcb_generic_iterator_t i;
1939 xcb_generic_iterator_t child = xcb_xfixes_get_cursor_image_and_name_name_end(R);
1940 i.data = ((uint32_t *) child.data) + ((R->width * R->height));
1941 i.rem = 0;
1942 i.index = (char *) i.data - (char *) R;
1943 return i;
1946 xcb_xfixes_get_cursor_image_and_name_reply_t *
1947 xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c /**< */,
1948 xcb_xfixes_get_cursor_image_and_name_cookie_t cookie /**< */,
1949 xcb_generic_error_t **e /**< */)
1951 return (xcb_xfixes_get_cursor_image_and_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1954 xcb_void_cookie_t
1955 xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */,
1956 xcb_cursor_t source /**< */,
1957 xcb_cursor_t destination /**< */)
1959 static const xcb_protocol_request_t xcb_req = {
1960 /* count */ 2,
1961 /* ext */ &xcb_xfixes_id,
1962 /* opcode */ XCB_XFIXES_CHANGE_CURSOR,
1963 /* isvoid */ 1
1966 struct iovec xcb_parts[4];
1967 xcb_void_cookie_t xcb_ret;
1968 xcb_xfixes_change_cursor_request_t xcb_out;
1970 xcb_out.source = source;
1971 xcb_out.destination = destination;
1973 xcb_parts[2].iov_base = (char *) &xcb_out;
1974 xcb_parts[2].iov_len = sizeof(xcb_out);
1975 xcb_parts[3].iov_base = 0;
1976 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1978 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1979 return xcb_ret;
1982 xcb_void_cookie_t
1983 xcb_xfixes_change_cursor (xcb_connection_t *c /**< */,
1984 xcb_cursor_t source /**< */,
1985 xcb_cursor_t destination /**< */)
1987 static const xcb_protocol_request_t xcb_req = {
1988 /* count */ 2,
1989 /* ext */ &xcb_xfixes_id,
1990 /* opcode */ XCB_XFIXES_CHANGE_CURSOR,
1991 /* isvoid */ 1
1994 struct iovec xcb_parts[4];
1995 xcb_void_cookie_t xcb_ret;
1996 xcb_xfixes_change_cursor_request_t xcb_out;
1998 xcb_out.source = source;
1999 xcb_out.destination = destination;
2001 xcb_parts[2].iov_base = (char *) &xcb_out;
2002 xcb_parts[2].iov_len = sizeof(xcb_out);
2003 xcb_parts[3].iov_base = 0;
2004 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2006 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2007 return xcb_ret;
2011 xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer /**< */)
2013 char *xcb_tmp = (char *)_buffer;
2014 const xcb_xfixes_change_cursor_by_name_request_t *_aux = (xcb_xfixes_change_cursor_by_name_request_t *)_buffer;
2015 unsigned int xcb_buffer_len = 0;
2016 unsigned int xcb_block_len = 0;
2017 unsigned int xcb_pad = 0;
2018 unsigned int xcb_align_to = 0;
2021 xcb_block_len += sizeof(xcb_xfixes_change_cursor_by_name_request_t);
2022 xcb_tmp += xcb_block_len;
2023 xcb_buffer_len += xcb_block_len;
2024 xcb_block_len = 0;
2025 /* name */
2026 xcb_block_len += _aux->nbytes * sizeof(char);
2027 xcb_tmp += xcb_block_len;
2028 xcb_align_to = ALIGNOF(char);
2029 /* insert padding */
2030 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2031 xcb_buffer_len += xcb_block_len + xcb_pad;
2032 if (0 != xcb_pad) {
2033 xcb_tmp += xcb_pad;
2034 xcb_pad = 0;
2036 xcb_block_len = 0;
2038 return xcb_buffer_len;
2041 xcb_void_cookie_t
2042 xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */,
2043 xcb_cursor_t src /**< */,
2044 uint16_t nbytes /**< */,
2045 const char *name /**< */)
2047 static const xcb_protocol_request_t xcb_req = {
2048 /* count */ 4,
2049 /* ext */ &xcb_xfixes_id,
2050 /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME,
2051 /* isvoid */ 1
2054 struct iovec xcb_parts[6];
2055 xcb_void_cookie_t xcb_ret;
2056 xcb_xfixes_change_cursor_by_name_request_t xcb_out;
2058 xcb_out.src = src;
2059 xcb_out.nbytes = nbytes;
2060 memset(xcb_out.pad0, 0, 2);
2062 xcb_parts[2].iov_base = (char *) &xcb_out;
2063 xcb_parts[2].iov_len = sizeof(xcb_out);
2064 xcb_parts[3].iov_base = 0;
2065 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2066 /* char name */
2067 xcb_parts[4].iov_base = (char *) name;
2068 xcb_parts[4].iov_len = nbytes * sizeof(char);
2069 xcb_parts[5].iov_base = 0;
2070 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2072 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2073 return xcb_ret;
2076 xcb_void_cookie_t
2077 xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */,
2078 xcb_cursor_t src /**< */,
2079 uint16_t nbytes /**< */,
2080 const char *name /**< */)
2082 static const xcb_protocol_request_t xcb_req = {
2083 /* count */ 4,
2084 /* ext */ &xcb_xfixes_id,
2085 /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME,
2086 /* isvoid */ 1
2089 struct iovec xcb_parts[6];
2090 xcb_void_cookie_t xcb_ret;
2091 xcb_xfixes_change_cursor_by_name_request_t xcb_out;
2093 xcb_out.src = src;
2094 xcb_out.nbytes = nbytes;
2095 memset(xcb_out.pad0, 0, 2);
2097 xcb_parts[2].iov_base = (char *) &xcb_out;
2098 xcb_parts[2].iov_len = sizeof(xcb_out);
2099 xcb_parts[3].iov_base = 0;
2100 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2101 /* char name */
2102 xcb_parts[4].iov_base = (char *) name;
2103 xcb_parts[4].iov_len = nbytes * sizeof(char);
2104 xcb_parts[5].iov_base = 0;
2105 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2107 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2108 return xcb_ret;
2111 xcb_void_cookie_t
2112 xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */,
2113 xcb_xfixes_region_t source /**< */,
2114 xcb_xfixes_region_t destination /**< */,
2115 uint16_t left /**< */,
2116 uint16_t right /**< */,
2117 uint16_t top /**< */,
2118 uint16_t bottom /**< */)
2120 static const xcb_protocol_request_t xcb_req = {
2121 /* count */ 2,
2122 /* ext */ &xcb_xfixes_id,
2123 /* opcode */ XCB_XFIXES_EXPAND_REGION,
2124 /* isvoid */ 1
2127 struct iovec xcb_parts[4];
2128 xcb_void_cookie_t xcb_ret;
2129 xcb_xfixes_expand_region_request_t xcb_out;
2131 xcb_out.source = source;
2132 xcb_out.destination = destination;
2133 xcb_out.left = left;
2134 xcb_out.right = right;
2135 xcb_out.top = top;
2136 xcb_out.bottom = bottom;
2138 xcb_parts[2].iov_base = (char *) &xcb_out;
2139 xcb_parts[2].iov_len = sizeof(xcb_out);
2140 xcb_parts[3].iov_base = 0;
2141 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2143 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2144 return xcb_ret;
2147 xcb_void_cookie_t
2148 xcb_xfixes_expand_region (xcb_connection_t *c /**< */,
2149 xcb_xfixes_region_t source /**< */,
2150 xcb_xfixes_region_t destination /**< */,
2151 uint16_t left /**< */,
2152 uint16_t right /**< */,
2153 uint16_t top /**< */,
2154 uint16_t bottom /**< */)
2156 static const xcb_protocol_request_t xcb_req = {
2157 /* count */ 2,
2158 /* ext */ &xcb_xfixes_id,
2159 /* opcode */ XCB_XFIXES_EXPAND_REGION,
2160 /* isvoid */ 1
2163 struct iovec xcb_parts[4];
2164 xcb_void_cookie_t xcb_ret;
2165 xcb_xfixes_expand_region_request_t xcb_out;
2167 xcb_out.source = source;
2168 xcb_out.destination = destination;
2169 xcb_out.left = left;
2170 xcb_out.right = right;
2171 xcb_out.top = top;
2172 xcb_out.bottom = bottom;
2174 xcb_parts[2].iov_base = (char *) &xcb_out;
2175 xcb_parts[2].iov_len = sizeof(xcb_out);
2176 xcb_parts[3].iov_base = 0;
2177 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2179 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2180 return xcb_ret;
2183 xcb_void_cookie_t
2184 xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */,
2185 xcb_window_t window /**< */)
2187 static const xcb_protocol_request_t xcb_req = {
2188 /* count */ 2,
2189 /* ext */ &xcb_xfixes_id,
2190 /* opcode */ XCB_XFIXES_HIDE_CURSOR,
2191 /* isvoid */ 1
2194 struct iovec xcb_parts[4];
2195 xcb_void_cookie_t xcb_ret;
2196 xcb_xfixes_hide_cursor_request_t xcb_out;
2198 xcb_out.window = window;
2200 xcb_parts[2].iov_base = (char *) &xcb_out;
2201 xcb_parts[2].iov_len = sizeof(xcb_out);
2202 xcb_parts[3].iov_base = 0;
2203 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2205 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2206 return xcb_ret;
2209 xcb_void_cookie_t
2210 xcb_xfixes_hide_cursor (xcb_connection_t *c /**< */,
2211 xcb_window_t window /**< */)
2213 static const xcb_protocol_request_t xcb_req = {
2214 /* count */ 2,
2215 /* ext */ &xcb_xfixes_id,
2216 /* opcode */ XCB_XFIXES_HIDE_CURSOR,
2217 /* isvoid */ 1
2220 struct iovec xcb_parts[4];
2221 xcb_void_cookie_t xcb_ret;
2222 xcb_xfixes_hide_cursor_request_t xcb_out;
2224 xcb_out.window = window;
2226 xcb_parts[2].iov_base = (char *) &xcb_out;
2227 xcb_parts[2].iov_len = sizeof(xcb_out);
2228 xcb_parts[3].iov_base = 0;
2229 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2231 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2232 return xcb_ret;
2235 xcb_void_cookie_t
2236 xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */,
2237 xcb_window_t window /**< */)
2239 static const xcb_protocol_request_t xcb_req = {
2240 /* count */ 2,
2241 /* ext */ &xcb_xfixes_id,
2242 /* opcode */ XCB_XFIXES_SHOW_CURSOR,
2243 /* isvoid */ 1
2246 struct iovec xcb_parts[4];
2247 xcb_void_cookie_t xcb_ret;
2248 xcb_xfixes_show_cursor_request_t xcb_out;
2250 xcb_out.window = window;
2252 xcb_parts[2].iov_base = (char *) &xcb_out;
2253 xcb_parts[2].iov_len = sizeof(xcb_out);
2254 xcb_parts[3].iov_base = 0;
2255 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2257 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2258 return xcb_ret;
2261 xcb_void_cookie_t
2262 xcb_xfixes_show_cursor (xcb_connection_t *c /**< */,
2263 xcb_window_t window /**< */)
2265 static const xcb_protocol_request_t xcb_req = {
2266 /* count */ 2,
2267 /* ext */ &xcb_xfixes_id,
2268 /* opcode */ XCB_XFIXES_SHOW_CURSOR,
2269 /* isvoid */ 1
2272 struct iovec xcb_parts[4];
2273 xcb_void_cookie_t xcb_ret;
2274 xcb_xfixes_show_cursor_request_t xcb_out;
2276 xcb_out.window = window;
2278 xcb_parts[2].iov_base = (char *) &xcb_out;
2279 xcb_parts[2].iov_len = sizeof(xcb_out);
2280 xcb_parts[3].iov_base = 0;
2281 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2283 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2284 return xcb_ret;
2287 void
2288 xcb_xfixes_barrier_next (xcb_xfixes_barrier_iterator_t *i /**< */)
2290 --i->rem;
2291 ++i->data;
2292 i->index += sizeof(xcb_xfixes_barrier_t);
2295 xcb_generic_iterator_t
2296 xcb_xfixes_barrier_end (xcb_xfixes_barrier_iterator_t i /**< */)
2298 xcb_generic_iterator_t ret;
2299 ret.data = i.data + i.rem;
2300 ret.index = i.index + ((char *) ret.data - (char *) i.data);
2301 ret.rem = 0;
2302 return ret;
2306 xcb_xfixes_create_pointer_barrier_sizeof (const void *_buffer /**< */)
2308 char *xcb_tmp = (char *)_buffer;
2309 const xcb_xfixes_create_pointer_barrier_request_t *_aux = (xcb_xfixes_create_pointer_barrier_request_t *)_buffer;
2310 unsigned int xcb_buffer_len = 0;
2311 unsigned int xcb_block_len = 0;
2312 unsigned int xcb_pad = 0;
2313 unsigned int xcb_align_to = 0;
2316 xcb_block_len += sizeof(xcb_xfixes_create_pointer_barrier_request_t);
2317 xcb_tmp += xcb_block_len;
2318 xcb_buffer_len += xcb_block_len;
2319 xcb_block_len = 0;
2320 /* devices */
2321 xcb_block_len += _aux->num_devices * sizeof(uint16_t);
2322 xcb_tmp += xcb_block_len;
2323 xcb_align_to = ALIGNOF(uint16_t);
2324 /* insert padding */
2325 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2326 xcb_buffer_len += xcb_block_len + xcb_pad;
2327 if (0 != xcb_pad) {
2328 xcb_tmp += xcb_pad;
2329 xcb_pad = 0;
2331 xcb_block_len = 0;
2333 return xcb_buffer_len;
2336 xcb_void_cookie_t
2337 xcb_xfixes_create_pointer_barrier_checked (xcb_connection_t *c /**< */,
2338 xcb_xfixes_barrier_t barrier /**< */,
2339 xcb_window_t window /**< */,
2340 uint16_t x1 /**< */,
2341 uint16_t y1 /**< */,
2342 uint16_t x2 /**< */,
2343 uint16_t y2 /**< */,
2344 uint32_t directions /**< */,
2345 uint16_t num_devices /**< */,
2346 const uint16_t *devices /**< */)
2348 static const xcb_protocol_request_t xcb_req = {
2349 /* count */ 4,
2350 /* ext */ &xcb_xfixes_id,
2351 /* opcode */ XCB_XFIXES_CREATE_POINTER_BARRIER,
2352 /* isvoid */ 1
2355 struct iovec xcb_parts[6];
2356 xcb_void_cookie_t xcb_ret;
2357 xcb_xfixes_create_pointer_barrier_request_t xcb_out;
2359 xcb_out.barrier = barrier;
2360 xcb_out.window = window;
2361 xcb_out.x1 = x1;
2362 xcb_out.y1 = y1;
2363 xcb_out.x2 = x2;
2364 xcb_out.y2 = y2;
2365 xcb_out.directions = directions;
2366 memset(xcb_out.pad0, 0, 2);
2367 xcb_out.num_devices = num_devices;
2369 xcb_parts[2].iov_base = (char *) &xcb_out;
2370 xcb_parts[2].iov_len = sizeof(xcb_out);
2371 xcb_parts[3].iov_base = 0;
2372 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2373 /* uint16_t devices */
2374 xcb_parts[4].iov_base = (char *) devices;
2375 xcb_parts[4].iov_len = num_devices * sizeof(uint16_t);
2376 xcb_parts[5].iov_base = 0;
2377 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2379 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2380 return xcb_ret;
2383 xcb_void_cookie_t
2384 xcb_xfixes_create_pointer_barrier (xcb_connection_t *c /**< */,
2385 xcb_xfixes_barrier_t barrier /**< */,
2386 xcb_window_t window /**< */,
2387 uint16_t x1 /**< */,
2388 uint16_t y1 /**< */,
2389 uint16_t x2 /**< */,
2390 uint16_t y2 /**< */,
2391 uint32_t directions /**< */,
2392 uint16_t num_devices /**< */,
2393 const uint16_t *devices /**< */)
2395 static const xcb_protocol_request_t xcb_req = {
2396 /* count */ 4,
2397 /* ext */ &xcb_xfixes_id,
2398 /* opcode */ XCB_XFIXES_CREATE_POINTER_BARRIER,
2399 /* isvoid */ 1
2402 struct iovec xcb_parts[6];
2403 xcb_void_cookie_t xcb_ret;
2404 xcb_xfixes_create_pointer_barrier_request_t xcb_out;
2406 xcb_out.barrier = barrier;
2407 xcb_out.window = window;
2408 xcb_out.x1 = x1;
2409 xcb_out.y1 = y1;
2410 xcb_out.x2 = x2;
2411 xcb_out.y2 = y2;
2412 xcb_out.directions = directions;
2413 memset(xcb_out.pad0, 0, 2);
2414 xcb_out.num_devices = num_devices;
2416 xcb_parts[2].iov_base = (char *) &xcb_out;
2417 xcb_parts[2].iov_len = sizeof(xcb_out);
2418 xcb_parts[3].iov_base = 0;
2419 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2420 /* uint16_t devices */
2421 xcb_parts[4].iov_base = (char *) devices;
2422 xcb_parts[4].iov_len = num_devices * sizeof(uint16_t);
2423 xcb_parts[5].iov_base = 0;
2424 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2426 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2427 return xcb_ret;
2430 xcb_void_cookie_t
2431 xcb_xfixes_delete_pointer_barrier_checked (xcb_connection_t *c /**< */,
2432 xcb_xfixes_barrier_t barrier /**< */)
2434 static const xcb_protocol_request_t xcb_req = {
2435 /* count */ 2,
2436 /* ext */ &xcb_xfixes_id,
2437 /* opcode */ XCB_XFIXES_DELETE_POINTER_BARRIER,
2438 /* isvoid */ 1
2441 struct iovec xcb_parts[4];
2442 xcb_void_cookie_t xcb_ret;
2443 xcb_xfixes_delete_pointer_barrier_request_t xcb_out;
2445 xcb_out.barrier = barrier;
2447 xcb_parts[2].iov_base = (char *) &xcb_out;
2448 xcb_parts[2].iov_len = sizeof(xcb_out);
2449 xcb_parts[3].iov_base = 0;
2450 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2452 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2453 return xcb_ret;
2456 xcb_void_cookie_t
2457 xcb_xfixes_delete_pointer_barrier (xcb_connection_t *c /**< */,
2458 xcb_xfixes_barrier_t barrier /**< */)
2460 static const xcb_protocol_request_t xcb_req = {
2461 /* count */ 2,
2462 /* ext */ &xcb_xfixes_id,
2463 /* opcode */ XCB_XFIXES_DELETE_POINTER_BARRIER,
2464 /* isvoid */ 1
2467 struct iovec xcb_parts[4];
2468 xcb_void_cookie_t xcb_ret;
2469 xcb_xfixes_delete_pointer_barrier_request_t xcb_out;
2471 xcb_out.barrier = barrier;
2473 xcb_parts[2].iov_base = (char *) &xcb_out;
2474 xcb_parts[2].iov_len = sizeof(xcb_out);
2475 xcb_parts[3].iov_base = 0;
2476 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2478 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2479 return xcb_ret;