etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / lib / libxcb / files / render.c
blob5ac468ce281d8e8916bc7de7906428422d781790
1 /*
2 * This file generated automatically from render.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 "render.h"
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
19 xcb_extension_t xcb_render_id = { "RENDER", 0 };
21 void
22 xcb_render_glyph_next (xcb_render_glyph_iterator_t *i /**< */)
24 --i->rem;
25 ++i->data;
26 i->index += sizeof(xcb_render_glyph_t);
29 xcb_generic_iterator_t
30 xcb_render_glyph_end (xcb_render_glyph_iterator_t i /**< */)
32 xcb_generic_iterator_t ret;
33 ret.data = i.data + i.rem;
34 ret.index = i.index + ((char *) ret.data - (char *) i.data);
35 ret.rem = 0;
36 return ret;
39 void
40 xcb_render_glyphset_next (xcb_render_glyphset_iterator_t *i /**< */)
42 --i->rem;
43 ++i->data;
44 i->index += sizeof(xcb_render_glyphset_t);
47 xcb_generic_iterator_t
48 xcb_render_glyphset_end (xcb_render_glyphset_iterator_t i /**< */)
50 xcb_generic_iterator_t ret;
51 ret.data = i.data + i.rem;
52 ret.index = i.index + ((char *) ret.data - (char *) i.data);
53 ret.rem = 0;
54 return ret;
57 void
58 xcb_render_picture_next (xcb_render_picture_iterator_t *i /**< */)
60 --i->rem;
61 ++i->data;
62 i->index += sizeof(xcb_render_picture_t);
65 xcb_generic_iterator_t
66 xcb_render_picture_end (xcb_render_picture_iterator_t i /**< */)
68 xcb_generic_iterator_t ret;
69 ret.data = i.data + i.rem;
70 ret.index = i.index + ((char *) ret.data - (char *) i.data);
71 ret.rem = 0;
72 return ret;
75 void
76 xcb_render_pictformat_next (xcb_render_pictformat_iterator_t *i /**< */)
78 --i->rem;
79 ++i->data;
80 i->index += sizeof(xcb_render_pictformat_t);
83 xcb_generic_iterator_t
84 xcb_render_pictformat_end (xcb_render_pictformat_iterator_t i /**< */)
86 xcb_generic_iterator_t ret;
87 ret.data = i.data + i.rem;
88 ret.index = i.index + ((char *) ret.data - (char *) i.data);
89 ret.rem = 0;
90 return ret;
93 void
94 xcb_render_fixed_next (xcb_render_fixed_iterator_t *i /**< */)
96 --i->rem;
97 ++i->data;
98 i->index += sizeof(xcb_render_fixed_t);
101 xcb_generic_iterator_t
102 xcb_render_fixed_end (xcb_render_fixed_iterator_t i /**< */)
104 xcb_generic_iterator_t ret;
105 ret.data = i.data + i.rem;
106 ret.index = i.index + ((char *) ret.data - (char *) i.data);
107 ret.rem = 0;
108 return ret;
111 void
112 xcb_render_directformat_next (xcb_render_directformat_iterator_t *i /**< */)
114 --i->rem;
115 ++i->data;
116 i->index += sizeof(xcb_render_directformat_t);
119 xcb_generic_iterator_t
120 xcb_render_directformat_end (xcb_render_directformat_iterator_t i /**< */)
122 xcb_generic_iterator_t ret;
123 ret.data = i.data + i.rem;
124 ret.index = i.index + ((char *) ret.data - (char *) i.data);
125 ret.rem = 0;
126 return ret;
129 void
130 xcb_render_pictforminfo_next (xcb_render_pictforminfo_iterator_t *i /**< */)
132 --i->rem;
133 ++i->data;
134 i->index += sizeof(xcb_render_pictforminfo_t);
137 xcb_generic_iterator_t
138 xcb_render_pictforminfo_end (xcb_render_pictforminfo_iterator_t i /**< */)
140 xcb_generic_iterator_t ret;
141 ret.data = i.data + i.rem;
142 ret.index = i.index + ((char *) ret.data - (char *) i.data);
143 ret.rem = 0;
144 return ret;
147 void
148 xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i /**< */)
150 --i->rem;
151 ++i->data;
152 i->index += sizeof(xcb_render_pictvisual_t);
155 xcb_generic_iterator_t
156 xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i /**< */)
158 xcb_generic_iterator_t ret;
159 ret.data = i.data + i.rem;
160 ret.index = i.index + ((char *) ret.data - (char *) i.data);
161 ret.rem = 0;
162 return ret;
166 xcb_render_pictdepth_sizeof (const void *_buffer /**< */)
168 char *xcb_tmp = (char *)_buffer;
169 const xcb_render_pictdepth_t *_aux = (xcb_render_pictdepth_t *)_buffer;
170 unsigned int xcb_buffer_len = 0;
171 unsigned int xcb_block_len = 0;
172 unsigned int xcb_pad = 0;
173 unsigned int xcb_align_to = 0;
176 xcb_block_len += sizeof(xcb_render_pictdepth_t);
177 xcb_tmp += xcb_block_len;
178 xcb_buffer_len += xcb_block_len;
179 xcb_block_len = 0;
180 /* visuals */
181 xcb_block_len += _aux->num_visuals * sizeof(xcb_render_pictvisual_t);
182 xcb_tmp += xcb_block_len;
183 xcb_align_to = ALIGNOF(xcb_render_pictvisual_t);
184 /* insert padding */
185 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
186 xcb_buffer_len += xcb_block_len + xcb_pad;
187 if (0 != xcb_pad) {
188 xcb_tmp += xcb_pad;
189 xcb_pad = 0;
191 xcb_block_len = 0;
193 return xcb_buffer_len;
196 xcb_render_pictvisual_t *
197 xcb_render_pictdepth_visuals (const xcb_render_pictdepth_t *R /**< */)
199 return (xcb_render_pictvisual_t *) (R + 1);
203 xcb_render_pictdepth_visuals_length (const xcb_render_pictdepth_t *R /**< */)
205 return R->num_visuals;
208 xcb_render_pictvisual_iterator_t
209 xcb_render_pictdepth_visuals_iterator (const xcb_render_pictdepth_t *R /**< */)
211 xcb_render_pictvisual_iterator_t i;
212 i.data = (xcb_render_pictvisual_t *) (R + 1);
213 i.rem = R->num_visuals;
214 i.index = (char *) i.data - (char *) R;
215 return i;
218 void
219 xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i /**< */)
221 xcb_render_pictdepth_t *R = i->data;
222 xcb_generic_iterator_t child;
223 child.data = (xcb_render_pictdepth_t *)(((char *)R) + xcb_render_pictdepth_sizeof(R));
224 i->index = (char *) child.data - (char *) i->data;
225 --i->rem;
226 i->data = (xcb_render_pictdepth_t *) child.data;
229 xcb_generic_iterator_t
230 xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */)
232 xcb_generic_iterator_t ret;
233 while(i.rem > 0)
234 xcb_render_pictdepth_next(&i);
235 ret.data = i.data;
236 ret.rem = i.rem;
237 ret.index = i.index;
238 return ret;
242 xcb_render_pictscreen_sizeof (const void *_buffer /**< */)
244 char *xcb_tmp = (char *)_buffer;
245 const xcb_render_pictscreen_t *_aux = (xcb_render_pictscreen_t *)_buffer;
246 unsigned int xcb_buffer_len = 0;
247 unsigned int xcb_block_len = 0;
248 unsigned int xcb_pad = 0;
249 unsigned int xcb_align_to = 0;
251 unsigned int i;
252 unsigned int xcb_tmp_len;
254 xcb_block_len += sizeof(xcb_render_pictscreen_t);
255 xcb_tmp += xcb_block_len;
256 xcb_buffer_len += xcb_block_len;
257 xcb_block_len = 0;
258 /* depths */
259 for(i=0; i<_aux->num_depths; i++) {
260 xcb_tmp_len = xcb_render_pictdepth_sizeof(xcb_tmp);
261 xcb_block_len += xcb_tmp_len;
262 xcb_tmp += xcb_tmp_len;
264 xcb_align_to = ALIGNOF(xcb_render_pictdepth_t);
265 /* insert padding */
266 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
267 xcb_buffer_len += xcb_block_len + xcb_pad;
268 if (0 != xcb_pad) {
269 xcb_tmp += xcb_pad;
270 xcb_pad = 0;
272 xcb_block_len = 0;
274 return xcb_buffer_len;
278 xcb_render_pictscreen_depths_length (const xcb_render_pictscreen_t *R /**< */)
280 return R->num_depths;
283 xcb_render_pictdepth_iterator_t
284 xcb_render_pictscreen_depths_iterator (const xcb_render_pictscreen_t *R /**< */)
286 xcb_render_pictdepth_iterator_t i;
287 i.data = (xcb_render_pictdepth_t *) (R + 1);
288 i.rem = R->num_depths;
289 i.index = (char *) i.data - (char *) R;
290 return i;
293 void
294 xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i /**< */)
296 xcb_render_pictscreen_t *R = i->data;
297 xcb_generic_iterator_t child;
298 child.data = (xcb_render_pictscreen_t *)(((char *)R) + xcb_render_pictscreen_sizeof(R));
299 i->index = (char *) child.data - (char *) i->data;
300 --i->rem;
301 i->data = (xcb_render_pictscreen_t *) child.data;
304 xcb_generic_iterator_t
305 xcb_render_pictscreen_end (xcb_render_pictscreen_iterator_t i /**< */)
307 xcb_generic_iterator_t ret;
308 while(i.rem > 0)
309 xcb_render_pictscreen_next(&i);
310 ret.data = i.data;
311 ret.rem = i.rem;
312 ret.index = i.index;
313 return ret;
316 void
317 xcb_render_indexvalue_next (xcb_render_indexvalue_iterator_t *i /**< */)
319 --i->rem;
320 ++i->data;
321 i->index += sizeof(xcb_render_indexvalue_t);
324 xcb_generic_iterator_t
325 xcb_render_indexvalue_end (xcb_render_indexvalue_iterator_t i /**< */)
327 xcb_generic_iterator_t ret;
328 ret.data = i.data + i.rem;
329 ret.index = i.index + ((char *) ret.data - (char *) i.data);
330 ret.rem = 0;
331 return ret;
334 void
335 xcb_render_color_next (xcb_render_color_iterator_t *i /**< */)
337 --i->rem;
338 ++i->data;
339 i->index += sizeof(xcb_render_color_t);
342 xcb_generic_iterator_t
343 xcb_render_color_end (xcb_render_color_iterator_t i /**< */)
345 xcb_generic_iterator_t ret;
346 ret.data = i.data + i.rem;
347 ret.index = i.index + ((char *) ret.data - (char *) i.data);
348 ret.rem = 0;
349 return ret;
352 void
353 xcb_render_pointfix_next (xcb_render_pointfix_iterator_t *i /**< */)
355 --i->rem;
356 ++i->data;
357 i->index += sizeof(xcb_render_pointfix_t);
360 xcb_generic_iterator_t
361 xcb_render_pointfix_end (xcb_render_pointfix_iterator_t i /**< */)
363 xcb_generic_iterator_t ret;
364 ret.data = i.data + i.rem;
365 ret.index = i.index + ((char *) ret.data - (char *) i.data);
366 ret.rem = 0;
367 return ret;
370 void
371 xcb_render_linefix_next (xcb_render_linefix_iterator_t *i /**< */)
373 --i->rem;
374 ++i->data;
375 i->index += sizeof(xcb_render_linefix_t);
378 xcb_generic_iterator_t
379 xcb_render_linefix_end (xcb_render_linefix_iterator_t i /**< */)
381 xcb_generic_iterator_t ret;
382 ret.data = i.data + i.rem;
383 ret.index = i.index + ((char *) ret.data - (char *) i.data);
384 ret.rem = 0;
385 return ret;
388 void
389 xcb_render_triangle_next (xcb_render_triangle_iterator_t *i /**< */)
391 --i->rem;
392 ++i->data;
393 i->index += sizeof(xcb_render_triangle_t);
396 xcb_generic_iterator_t
397 xcb_render_triangle_end (xcb_render_triangle_iterator_t i /**< */)
399 xcb_generic_iterator_t ret;
400 ret.data = i.data + i.rem;
401 ret.index = i.index + ((char *) ret.data - (char *) i.data);
402 ret.rem = 0;
403 return ret;
406 void
407 xcb_render_trapezoid_next (xcb_render_trapezoid_iterator_t *i /**< */)
409 --i->rem;
410 ++i->data;
411 i->index += sizeof(xcb_render_trapezoid_t);
414 xcb_generic_iterator_t
415 xcb_render_trapezoid_end (xcb_render_trapezoid_iterator_t i /**< */)
417 xcb_generic_iterator_t ret;
418 ret.data = i.data + i.rem;
419 ret.index = i.index + ((char *) ret.data - (char *) i.data);
420 ret.rem = 0;
421 return ret;
424 void
425 xcb_render_glyphinfo_next (xcb_render_glyphinfo_iterator_t *i /**< */)
427 --i->rem;
428 ++i->data;
429 i->index += sizeof(xcb_render_glyphinfo_t);
432 xcb_generic_iterator_t
433 xcb_render_glyphinfo_end (xcb_render_glyphinfo_iterator_t i /**< */)
435 xcb_generic_iterator_t ret;
436 ret.data = i.data + i.rem;
437 ret.index = i.index + ((char *) ret.data - (char *) i.data);
438 ret.rem = 0;
439 return ret;
442 xcb_render_query_version_cookie_t
443 xcb_render_query_version (xcb_connection_t *c /**< */,
444 uint32_t client_major_version /**< */,
445 uint32_t client_minor_version /**< */)
447 static const xcb_protocol_request_t xcb_req = {
448 /* count */ 2,
449 /* ext */ &xcb_render_id,
450 /* opcode */ XCB_RENDER_QUERY_VERSION,
451 /* isvoid */ 0
454 struct iovec xcb_parts[4];
455 xcb_render_query_version_cookie_t xcb_ret;
456 xcb_render_query_version_request_t xcb_out;
458 xcb_out.client_major_version = client_major_version;
459 xcb_out.client_minor_version = client_minor_version;
461 xcb_parts[2].iov_base = (char *) &xcb_out;
462 xcb_parts[2].iov_len = sizeof(xcb_out);
463 xcb_parts[3].iov_base = 0;
464 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
466 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
467 return xcb_ret;
470 xcb_render_query_version_cookie_t
471 xcb_render_query_version_unchecked (xcb_connection_t *c /**< */,
472 uint32_t client_major_version /**< */,
473 uint32_t client_minor_version /**< */)
475 static const xcb_protocol_request_t xcb_req = {
476 /* count */ 2,
477 /* ext */ &xcb_render_id,
478 /* opcode */ XCB_RENDER_QUERY_VERSION,
479 /* isvoid */ 0
482 struct iovec xcb_parts[4];
483 xcb_render_query_version_cookie_t xcb_ret;
484 xcb_render_query_version_request_t xcb_out;
486 xcb_out.client_major_version = client_major_version;
487 xcb_out.client_minor_version = client_minor_version;
489 xcb_parts[2].iov_base = (char *) &xcb_out;
490 xcb_parts[2].iov_len = sizeof(xcb_out);
491 xcb_parts[3].iov_base = 0;
492 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
494 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
495 return xcb_ret;
498 xcb_render_query_version_reply_t *
499 xcb_render_query_version_reply (xcb_connection_t *c /**< */,
500 xcb_render_query_version_cookie_t cookie /**< */,
501 xcb_generic_error_t **e /**< */)
503 return (xcb_render_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
507 xcb_render_query_pict_formats_sizeof (const void *_buffer /**< */)
509 char *xcb_tmp = (char *)_buffer;
510 const xcb_render_query_pict_formats_reply_t *_aux = (xcb_render_query_pict_formats_reply_t *)_buffer;
511 unsigned int xcb_buffer_len = 0;
512 unsigned int xcb_block_len = 0;
513 unsigned int xcb_pad = 0;
514 unsigned int xcb_align_to = 0;
516 unsigned int i;
517 unsigned int xcb_tmp_len;
519 xcb_block_len += sizeof(xcb_render_query_pict_formats_reply_t);
520 xcb_tmp += xcb_block_len;
521 xcb_buffer_len += xcb_block_len;
522 xcb_block_len = 0;
523 /* formats */
524 xcb_block_len += _aux->num_formats * sizeof(xcb_render_pictforminfo_t);
525 xcb_tmp += xcb_block_len;
526 xcb_align_to = ALIGNOF(xcb_render_pictforminfo_t);
527 /* insert padding */
528 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
529 xcb_buffer_len += xcb_block_len + xcb_pad;
530 if (0 != xcb_pad) {
531 xcb_tmp += xcb_pad;
532 xcb_pad = 0;
534 xcb_block_len = 0;
535 /* screens */
536 for(i=0; i<_aux->num_screens; i++) {
537 xcb_tmp_len = xcb_render_pictscreen_sizeof(xcb_tmp);
538 xcb_block_len += xcb_tmp_len;
539 xcb_tmp += xcb_tmp_len;
541 xcb_align_to = ALIGNOF(xcb_render_pictscreen_t);
542 /* insert padding */
543 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
544 xcb_buffer_len += xcb_block_len + xcb_pad;
545 if (0 != xcb_pad) {
546 xcb_tmp += xcb_pad;
547 xcb_pad = 0;
549 xcb_block_len = 0;
550 /* subpixels */
551 xcb_block_len += _aux->num_subpixel * sizeof(uint32_t);
552 xcb_tmp += xcb_block_len;
553 xcb_align_to = ALIGNOF(uint32_t);
554 /* insert padding */
555 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
556 xcb_buffer_len += xcb_block_len + xcb_pad;
557 if (0 != xcb_pad) {
558 xcb_tmp += xcb_pad;
559 xcb_pad = 0;
561 xcb_block_len = 0;
563 return xcb_buffer_len;
566 xcb_render_query_pict_formats_cookie_t
567 xcb_render_query_pict_formats (xcb_connection_t *c /**< */)
569 static const xcb_protocol_request_t xcb_req = {
570 /* count */ 2,
571 /* ext */ &xcb_render_id,
572 /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS,
573 /* isvoid */ 0
576 struct iovec xcb_parts[4];
577 xcb_render_query_pict_formats_cookie_t xcb_ret;
578 xcb_render_query_pict_formats_request_t xcb_out;
581 xcb_parts[2].iov_base = (char *) &xcb_out;
582 xcb_parts[2].iov_len = sizeof(xcb_out);
583 xcb_parts[3].iov_base = 0;
584 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
586 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
587 return xcb_ret;
590 xcb_render_query_pict_formats_cookie_t
591 xcb_render_query_pict_formats_unchecked (xcb_connection_t *c /**< */)
593 static const xcb_protocol_request_t xcb_req = {
594 /* count */ 2,
595 /* ext */ &xcb_render_id,
596 /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS,
597 /* isvoid */ 0
600 struct iovec xcb_parts[4];
601 xcb_render_query_pict_formats_cookie_t xcb_ret;
602 xcb_render_query_pict_formats_request_t xcb_out;
605 xcb_parts[2].iov_base = (char *) &xcb_out;
606 xcb_parts[2].iov_len = sizeof(xcb_out);
607 xcb_parts[3].iov_base = 0;
608 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
610 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
611 return xcb_ret;
614 xcb_render_pictforminfo_t *
615 xcb_render_query_pict_formats_formats (const xcb_render_query_pict_formats_reply_t *R /**< */)
617 return (xcb_render_pictforminfo_t *) (R + 1);
621 xcb_render_query_pict_formats_formats_length (const xcb_render_query_pict_formats_reply_t *R /**< */)
623 return R->num_formats;
626 xcb_render_pictforminfo_iterator_t
627 xcb_render_query_pict_formats_formats_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */)
629 xcb_render_pictforminfo_iterator_t i;
630 i.data = (xcb_render_pictforminfo_t *) (R + 1);
631 i.rem = R->num_formats;
632 i.index = (char *) i.data - (char *) R;
633 return i;
637 xcb_render_query_pict_formats_screens_length (const xcb_render_query_pict_formats_reply_t *R /**< */)
639 return R->num_screens;
642 xcb_render_pictscreen_iterator_t
643 xcb_render_query_pict_formats_screens_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */)
645 xcb_render_pictscreen_iterator_t i;
646 xcb_generic_iterator_t prev = xcb_render_pictforminfo_end(xcb_render_query_pict_formats_formats_iterator(R));
647 i.data = (xcb_render_pictscreen_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_pictscreen_t, prev.index));
648 i.rem = R->num_screens;
649 i.index = (char *) i.data - (char *) R;
650 return i;
653 uint32_t *
654 xcb_render_query_pict_formats_subpixels (const xcb_render_query_pict_formats_reply_t *R /**< */)
656 xcb_generic_iterator_t prev = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R));
657 return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
661 xcb_render_query_pict_formats_subpixels_length (const xcb_render_query_pict_formats_reply_t *R /**< */)
663 return R->num_subpixel;
666 xcb_generic_iterator_t
667 xcb_render_query_pict_formats_subpixels_end (const xcb_render_query_pict_formats_reply_t *R /**< */)
669 xcb_generic_iterator_t i;
670 xcb_generic_iterator_t child = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R));
671 i.data = ((uint32_t *) child.data) + (R->num_subpixel);
672 i.rem = 0;
673 i.index = (char *) i.data - (char *) R;
674 return i;
677 xcb_render_query_pict_formats_reply_t *
678 xcb_render_query_pict_formats_reply (xcb_connection_t *c /**< */,
679 xcb_render_query_pict_formats_cookie_t cookie /**< */,
680 xcb_generic_error_t **e /**< */)
682 return (xcb_render_query_pict_formats_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
686 xcb_render_query_pict_index_values_sizeof (const void *_buffer /**< */)
688 char *xcb_tmp = (char *)_buffer;
689 const xcb_render_query_pict_index_values_reply_t *_aux = (xcb_render_query_pict_index_values_reply_t *)_buffer;
690 unsigned int xcb_buffer_len = 0;
691 unsigned int xcb_block_len = 0;
692 unsigned int xcb_pad = 0;
693 unsigned int xcb_align_to = 0;
696 xcb_block_len += sizeof(xcb_render_query_pict_index_values_reply_t);
697 xcb_tmp += xcb_block_len;
698 xcb_buffer_len += xcb_block_len;
699 xcb_block_len = 0;
700 /* values */
701 xcb_block_len += _aux->num_values * sizeof(xcb_render_indexvalue_t);
702 xcb_tmp += xcb_block_len;
703 xcb_align_to = ALIGNOF(xcb_render_indexvalue_t);
704 /* insert padding */
705 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
706 xcb_buffer_len += xcb_block_len + xcb_pad;
707 if (0 != xcb_pad) {
708 xcb_tmp += xcb_pad;
709 xcb_pad = 0;
711 xcb_block_len = 0;
713 return xcb_buffer_len;
716 xcb_render_query_pict_index_values_cookie_t
717 xcb_render_query_pict_index_values (xcb_connection_t *c /**< */,
718 xcb_render_pictformat_t format /**< */)
720 static const xcb_protocol_request_t xcb_req = {
721 /* count */ 2,
722 /* ext */ &xcb_render_id,
723 /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES,
724 /* isvoid */ 0
727 struct iovec xcb_parts[4];
728 xcb_render_query_pict_index_values_cookie_t xcb_ret;
729 xcb_render_query_pict_index_values_request_t xcb_out;
731 xcb_out.format = format;
733 xcb_parts[2].iov_base = (char *) &xcb_out;
734 xcb_parts[2].iov_len = sizeof(xcb_out);
735 xcb_parts[3].iov_base = 0;
736 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
738 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
739 return xcb_ret;
742 xcb_render_query_pict_index_values_cookie_t
743 xcb_render_query_pict_index_values_unchecked (xcb_connection_t *c /**< */,
744 xcb_render_pictformat_t format /**< */)
746 static const xcb_protocol_request_t xcb_req = {
747 /* count */ 2,
748 /* ext */ &xcb_render_id,
749 /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES,
750 /* isvoid */ 0
753 struct iovec xcb_parts[4];
754 xcb_render_query_pict_index_values_cookie_t xcb_ret;
755 xcb_render_query_pict_index_values_request_t xcb_out;
757 xcb_out.format = format;
759 xcb_parts[2].iov_base = (char *) &xcb_out;
760 xcb_parts[2].iov_len = sizeof(xcb_out);
761 xcb_parts[3].iov_base = 0;
762 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
764 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
765 return xcb_ret;
768 xcb_render_indexvalue_t *
769 xcb_render_query_pict_index_values_values (const xcb_render_query_pict_index_values_reply_t *R /**< */)
771 return (xcb_render_indexvalue_t *) (R + 1);
775 xcb_render_query_pict_index_values_values_length (const xcb_render_query_pict_index_values_reply_t *R /**< */)
777 return R->num_values;
780 xcb_render_indexvalue_iterator_t
781 xcb_render_query_pict_index_values_values_iterator (const xcb_render_query_pict_index_values_reply_t *R /**< */)
783 xcb_render_indexvalue_iterator_t i;
784 i.data = (xcb_render_indexvalue_t *) (R + 1);
785 i.rem = R->num_values;
786 i.index = (char *) i.data - (char *) R;
787 return i;
790 xcb_render_query_pict_index_values_reply_t *
791 xcb_render_query_pict_index_values_reply (xcb_connection_t *c /**< */,
792 xcb_render_query_pict_index_values_cookie_t cookie /**< */,
793 xcb_generic_error_t **e /**< */)
795 return (xcb_render_query_pict_index_values_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
799 xcb_render_create_picture_sizeof (const void *_buffer /**< */)
801 char *xcb_tmp = (char *)_buffer;
802 const xcb_render_create_picture_request_t *_aux = (xcb_render_create_picture_request_t *)_buffer;
803 unsigned int xcb_buffer_len = 0;
804 unsigned int xcb_block_len = 0;
805 unsigned int xcb_pad = 0;
806 unsigned int xcb_align_to = 0;
809 xcb_block_len += sizeof(xcb_render_create_picture_request_t);
810 xcb_tmp += xcb_block_len;
811 xcb_buffer_len += xcb_block_len;
812 xcb_block_len = 0;
813 /* value_list */
814 xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
815 xcb_tmp += xcb_block_len;
816 xcb_align_to = ALIGNOF(uint32_t);
817 /* insert padding */
818 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
819 xcb_buffer_len += xcb_block_len + xcb_pad;
820 if (0 != xcb_pad) {
821 xcb_tmp += xcb_pad;
822 xcb_pad = 0;
824 xcb_block_len = 0;
826 return xcb_buffer_len;
829 xcb_void_cookie_t
830 xcb_render_create_picture_checked (xcb_connection_t *c /**< */,
831 xcb_render_picture_t pid /**< */,
832 xcb_drawable_t drawable /**< */,
833 xcb_render_pictformat_t format /**< */,
834 uint32_t value_mask /**< */,
835 const uint32_t *value_list /**< */)
837 static const xcb_protocol_request_t xcb_req = {
838 /* count */ 4,
839 /* ext */ &xcb_render_id,
840 /* opcode */ XCB_RENDER_CREATE_PICTURE,
841 /* isvoid */ 1
844 struct iovec xcb_parts[6];
845 xcb_void_cookie_t xcb_ret;
846 xcb_render_create_picture_request_t xcb_out;
848 xcb_out.pid = pid;
849 xcb_out.drawable = drawable;
850 xcb_out.format = format;
851 xcb_out.value_mask = value_mask;
853 xcb_parts[2].iov_base = (char *) &xcb_out;
854 xcb_parts[2].iov_len = sizeof(xcb_out);
855 xcb_parts[3].iov_base = 0;
856 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
857 /* uint32_t value_list */
858 xcb_parts[4].iov_base = (char *) value_list;
859 xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
860 xcb_parts[5].iov_base = 0;
861 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
863 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
864 return xcb_ret;
867 xcb_void_cookie_t
868 xcb_render_create_picture (xcb_connection_t *c /**< */,
869 xcb_render_picture_t pid /**< */,
870 xcb_drawable_t drawable /**< */,
871 xcb_render_pictformat_t format /**< */,
872 uint32_t value_mask /**< */,
873 const uint32_t *value_list /**< */)
875 static const xcb_protocol_request_t xcb_req = {
876 /* count */ 4,
877 /* ext */ &xcb_render_id,
878 /* opcode */ XCB_RENDER_CREATE_PICTURE,
879 /* isvoid */ 1
882 struct iovec xcb_parts[6];
883 xcb_void_cookie_t xcb_ret;
884 xcb_render_create_picture_request_t xcb_out;
886 xcb_out.pid = pid;
887 xcb_out.drawable = drawable;
888 xcb_out.format = format;
889 xcb_out.value_mask = value_mask;
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;
895 /* uint32_t value_list */
896 xcb_parts[4].iov_base = (char *) value_list;
897 xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
898 xcb_parts[5].iov_base = 0;
899 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
901 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
902 return xcb_ret;
906 xcb_render_change_picture_sizeof (const void *_buffer /**< */)
908 char *xcb_tmp = (char *)_buffer;
909 const xcb_render_change_picture_request_t *_aux = (xcb_render_change_picture_request_t *)_buffer;
910 unsigned int xcb_buffer_len = 0;
911 unsigned int xcb_block_len = 0;
912 unsigned int xcb_pad = 0;
913 unsigned int xcb_align_to = 0;
916 xcb_block_len += sizeof(xcb_render_change_picture_request_t);
917 xcb_tmp += xcb_block_len;
918 xcb_buffer_len += xcb_block_len;
919 xcb_block_len = 0;
920 /* value_list */
921 xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
922 xcb_tmp += xcb_block_len;
923 xcb_align_to = ALIGNOF(uint32_t);
924 /* insert padding */
925 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
926 xcb_buffer_len += xcb_block_len + xcb_pad;
927 if (0 != xcb_pad) {
928 xcb_tmp += xcb_pad;
929 xcb_pad = 0;
931 xcb_block_len = 0;
933 return xcb_buffer_len;
936 xcb_void_cookie_t
937 xcb_render_change_picture_checked (xcb_connection_t *c /**< */,
938 xcb_render_picture_t picture /**< */,
939 uint32_t value_mask /**< */,
940 const uint32_t *value_list /**< */)
942 static const xcb_protocol_request_t xcb_req = {
943 /* count */ 4,
944 /* ext */ &xcb_render_id,
945 /* opcode */ XCB_RENDER_CHANGE_PICTURE,
946 /* isvoid */ 1
949 struct iovec xcb_parts[6];
950 xcb_void_cookie_t xcb_ret;
951 xcb_render_change_picture_request_t xcb_out;
953 xcb_out.picture = picture;
954 xcb_out.value_mask = value_mask;
956 xcb_parts[2].iov_base = (char *) &xcb_out;
957 xcb_parts[2].iov_len = sizeof(xcb_out);
958 xcb_parts[3].iov_base = 0;
959 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
960 /* uint32_t value_list */
961 xcb_parts[4].iov_base = (char *) value_list;
962 xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
963 xcb_parts[5].iov_base = 0;
964 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
966 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
967 return xcb_ret;
970 xcb_void_cookie_t
971 xcb_render_change_picture (xcb_connection_t *c /**< */,
972 xcb_render_picture_t picture /**< */,
973 uint32_t value_mask /**< */,
974 const uint32_t *value_list /**< */)
976 static const xcb_protocol_request_t xcb_req = {
977 /* count */ 4,
978 /* ext */ &xcb_render_id,
979 /* opcode */ XCB_RENDER_CHANGE_PICTURE,
980 /* isvoid */ 1
983 struct iovec xcb_parts[6];
984 xcb_void_cookie_t xcb_ret;
985 xcb_render_change_picture_request_t xcb_out;
987 xcb_out.picture = picture;
988 xcb_out.value_mask = value_mask;
990 xcb_parts[2].iov_base = (char *) &xcb_out;
991 xcb_parts[2].iov_len = sizeof(xcb_out);
992 xcb_parts[3].iov_base = 0;
993 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
994 /* uint32_t value_list */
995 xcb_parts[4].iov_base = (char *) value_list;
996 xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
997 xcb_parts[5].iov_base = 0;
998 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1000 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1001 return xcb_ret;
1005 xcb_render_set_picture_clip_rectangles_sizeof (const void *_buffer /**< */,
1006 uint32_t rectangles_len /**< */)
1008 char *xcb_tmp = (char *)_buffer;
1009 unsigned int xcb_buffer_len = 0;
1010 unsigned int xcb_block_len = 0;
1011 unsigned int xcb_pad = 0;
1012 unsigned int xcb_align_to = 0;
1015 xcb_block_len += sizeof(xcb_render_set_picture_clip_rectangles_request_t);
1016 xcb_tmp += xcb_block_len;
1017 xcb_buffer_len += xcb_block_len;
1018 xcb_block_len = 0;
1019 /* rectangles */
1020 xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
1021 xcb_tmp += xcb_block_len;
1022 xcb_align_to = ALIGNOF(xcb_rectangle_t);
1023 /* insert padding */
1024 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1025 xcb_buffer_len += xcb_block_len + xcb_pad;
1026 if (0 != xcb_pad) {
1027 xcb_tmp += xcb_pad;
1028 xcb_pad = 0;
1030 xcb_block_len = 0;
1032 return xcb_buffer_len;
1035 xcb_void_cookie_t
1036 xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c /**< */,
1037 xcb_render_picture_t picture /**< */,
1038 int16_t clip_x_origin /**< */,
1039 int16_t clip_y_origin /**< */,
1040 uint32_t rectangles_len /**< */,
1041 const xcb_rectangle_t *rectangles /**< */)
1043 static const xcb_protocol_request_t xcb_req = {
1044 /* count */ 4,
1045 /* ext */ &xcb_render_id,
1046 /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES,
1047 /* isvoid */ 1
1050 struct iovec xcb_parts[6];
1051 xcb_void_cookie_t xcb_ret;
1052 xcb_render_set_picture_clip_rectangles_request_t xcb_out;
1054 xcb_out.picture = picture;
1055 xcb_out.clip_x_origin = clip_x_origin;
1056 xcb_out.clip_y_origin = clip_y_origin;
1058 xcb_parts[2].iov_base = (char *) &xcb_out;
1059 xcb_parts[2].iov_len = sizeof(xcb_out);
1060 xcb_parts[3].iov_base = 0;
1061 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1062 /* xcb_rectangle_t rectangles */
1063 xcb_parts[4].iov_base = (char *) rectangles;
1064 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
1065 xcb_parts[5].iov_base = 0;
1066 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1068 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1069 return xcb_ret;
1072 xcb_void_cookie_t
1073 xcb_render_set_picture_clip_rectangles (xcb_connection_t *c /**< */,
1074 xcb_render_picture_t picture /**< */,
1075 int16_t clip_x_origin /**< */,
1076 int16_t clip_y_origin /**< */,
1077 uint32_t rectangles_len /**< */,
1078 const xcb_rectangle_t *rectangles /**< */)
1080 static const xcb_protocol_request_t xcb_req = {
1081 /* count */ 4,
1082 /* ext */ &xcb_render_id,
1083 /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES,
1084 /* isvoid */ 1
1087 struct iovec xcb_parts[6];
1088 xcb_void_cookie_t xcb_ret;
1089 xcb_render_set_picture_clip_rectangles_request_t xcb_out;
1091 xcb_out.picture = picture;
1092 xcb_out.clip_x_origin = clip_x_origin;
1093 xcb_out.clip_y_origin = clip_y_origin;
1095 xcb_parts[2].iov_base = (char *) &xcb_out;
1096 xcb_parts[2].iov_len = sizeof(xcb_out);
1097 xcb_parts[3].iov_base = 0;
1098 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1099 /* xcb_rectangle_t rectangles */
1100 xcb_parts[4].iov_base = (char *) rectangles;
1101 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
1102 xcb_parts[5].iov_base = 0;
1103 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1105 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1106 return xcb_ret;
1109 xcb_void_cookie_t
1110 xcb_render_free_picture_checked (xcb_connection_t *c /**< */,
1111 xcb_render_picture_t picture /**< */)
1113 static const xcb_protocol_request_t xcb_req = {
1114 /* count */ 2,
1115 /* ext */ &xcb_render_id,
1116 /* opcode */ XCB_RENDER_FREE_PICTURE,
1117 /* isvoid */ 1
1120 struct iovec xcb_parts[4];
1121 xcb_void_cookie_t xcb_ret;
1122 xcb_render_free_picture_request_t xcb_out;
1124 xcb_out.picture = picture;
1126 xcb_parts[2].iov_base = (char *) &xcb_out;
1127 xcb_parts[2].iov_len = sizeof(xcb_out);
1128 xcb_parts[3].iov_base = 0;
1129 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1131 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1132 return xcb_ret;
1135 xcb_void_cookie_t
1136 xcb_render_free_picture (xcb_connection_t *c /**< */,
1137 xcb_render_picture_t picture /**< */)
1139 static const xcb_protocol_request_t xcb_req = {
1140 /* count */ 2,
1141 /* ext */ &xcb_render_id,
1142 /* opcode */ XCB_RENDER_FREE_PICTURE,
1143 /* isvoid */ 1
1146 struct iovec xcb_parts[4];
1147 xcb_void_cookie_t xcb_ret;
1148 xcb_render_free_picture_request_t xcb_out;
1150 xcb_out.picture = picture;
1152 xcb_parts[2].iov_base = (char *) &xcb_out;
1153 xcb_parts[2].iov_len = sizeof(xcb_out);
1154 xcb_parts[3].iov_base = 0;
1155 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1157 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1158 return xcb_ret;
1161 xcb_void_cookie_t
1162 xcb_render_composite_checked (xcb_connection_t *c /**< */,
1163 uint8_t op /**< */,
1164 xcb_render_picture_t src /**< */,
1165 xcb_render_picture_t mask /**< */,
1166 xcb_render_picture_t dst /**< */,
1167 int16_t src_x /**< */,
1168 int16_t src_y /**< */,
1169 int16_t mask_x /**< */,
1170 int16_t mask_y /**< */,
1171 int16_t dst_x /**< */,
1172 int16_t dst_y /**< */,
1173 uint16_t width /**< */,
1174 uint16_t height /**< */)
1176 static const xcb_protocol_request_t xcb_req = {
1177 /* count */ 2,
1178 /* ext */ &xcb_render_id,
1179 /* opcode */ XCB_RENDER_COMPOSITE,
1180 /* isvoid */ 1
1183 struct iovec xcb_parts[4];
1184 xcb_void_cookie_t xcb_ret;
1185 xcb_render_composite_request_t xcb_out;
1187 xcb_out.op = op;
1188 memset(xcb_out.pad0, 0, 3);
1189 xcb_out.src = src;
1190 xcb_out.mask = mask;
1191 xcb_out.dst = dst;
1192 xcb_out.src_x = src_x;
1193 xcb_out.src_y = src_y;
1194 xcb_out.mask_x = mask_x;
1195 xcb_out.mask_y = mask_y;
1196 xcb_out.dst_x = dst_x;
1197 xcb_out.dst_y = dst_y;
1198 xcb_out.width = width;
1199 xcb_out.height = height;
1201 xcb_parts[2].iov_base = (char *) &xcb_out;
1202 xcb_parts[2].iov_len = sizeof(xcb_out);
1203 xcb_parts[3].iov_base = 0;
1204 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1206 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1207 return xcb_ret;
1210 xcb_void_cookie_t
1211 xcb_render_composite (xcb_connection_t *c /**< */,
1212 uint8_t op /**< */,
1213 xcb_render_picture_t src /**< */,
1214 xcb_render_picture_t mask /**< */,
1215 xcb_render_picture_t dst /**< */,
1216 int16_t src_x /**< */,
1217 int16_t src_y /**< */,
1218 int16_t mask_x /**< */,
1219 int16_t mask_y /**< */,
1220 int16_t dst_x /**< */,
1221 int16_t dst_y /**< */,
1222 uint16_t width /**< */,
1223 uint16_t height /**< */)
1225 static const xcb_protocol_request_t xcb_req = {
1226 /* count */ 2,
1227 /* ext */ &xcb_render_id,
1228 /* opcode */ XCB_RENDER_COMPOSITE,
1229 /* isvoid */ 1
1232 struct iovec xcb_parts[4];
1233 xcb_void_cookie_t xcb_ret;
1234 xcb_render_composite_request_t xcb_out;
1236 xcb_out.op = op;
1237 memset(xcb_out.pad0, 0, 3);
1238 xcb_out.src = src;
1239 xcb_out.mask = mask;
1240 xcb_out.dst = dst;
1241 xcb_out.src_x = src_x;
1242 xcb_out.src_y = src_y;
1243 xcb_out.mask_x = mask_x;
1244 xcb_out.mask_y = mask_y;
1245 xcb_out.dst_x = dst_x;
1246 xcb_out.dst_y = dst_y;
1247 xcb_out.width = width;
1248 xcb_out.height = height;
1250 xcb_parts[2].iov_base = (char *) &xcb_out;
1251 xcb_parts[2].iov_len = sizeof(xcb_out);
1252 xcb_parts[3].iov_base = 0;
1253 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1255 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1256 return xcb_ret;
1260 xcb_render_trapezoids_sizeof (const void *_buffer /**< */,
1261 uint32_t traps_len /**< */)
1263 char *xcb_tmp = (char *)_buffer;
1264 unsigned int xcb_buffer_len = 0;
1265 unsigned int xcb_block_len = 0;
1266 unsigned int xcb_pad = 0;
1267 unsigned int xcb_align_to = 0;
1270 xcb_block_len += sizeof(xcb_render_trapezoids_request_t);
1271 xcb_tmp += xcb_block_len;
1272 xcb_buffer_len += xcb_block_len;
1273 xcb_block_len = 0;
1274 /* traps */
1275 xcb_block_len += traps_len * sizeof(xcb_render_trapezoid_t);
1276 xcb_tmp += xcb_block_len;
1277 xcb_align_to = ALIGNOF(xcb_render_trapezoid_t);
1278 /* insert padding */
1279 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1280 xcb_buffer_len += xcb_block_len + xcb_pad;
1281 if (0 != xcb_pad) {
1282 xcb_tmp += xcb_pad;
1283 xcb_pad = 0;
1285 xcb_block_len = 0;
1287 return xcb_buffer_len;
1290 xcb_void_cookie_t
1291 xcb_render_trapezoids_checked (xcb_connection_t *c /**< */,
1292 uint8_t op /**< */,
1293 xcb_render_picture_t src /**< */,
1294 xcb_render_picture_t dst /**< */,
1295 xcb_render_pictformat_t mask_format /**< */,
1296 int16_t src_x /**< */,
1297 int16_t src_y /**< */,
1298 uint32_t traps_len /**< */,
1299 const xcb_render_trapezoid_t *traps /**< */)
1301 static const xcb_protocol_request_t xcb_req = {
1302 /* count */ 4,
1303 /* ext */ &xcb_render_id,
1304 /* opcode */ XCB_RENDER_TRAPEZOIDS,
1305 /* isvoid */ 1
1308 struct iovec xcb_parts[6];
1309 xcb_void_cookie_t xcb_ret;
1310 xcb_render_trapezoids_request_t xcb_out;
1312 xcb_out.op = op;
1313 memset(xcb_out.pad0, 0, 3);
1314 xcb_out.src = src;
1315 xcb_out.dst = dst;
1316 xcb_out.mask_format = mask_format;
1317 xcb_out.src_x = src_x;
1318 xcb_out.src_y = src_y;
1320 xcb_parts[2].iov_base = (char *) &xcb_out;
1321 xcb_parts[2].iov_len = sizeof(xcb_out);
1322 xcb_parts[3].iov_base = 0;
1323 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1324 /* xcb_render_trapezoid_t traps */
1325 xcb_parts[4].iov_base = (char *) traps;
1326 xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t);
1327 xcb_parts[5].iov_base = 0;
1328 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1330 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1331 return xcb_ret;
1334 xcb_void_cookie_t
1335 xcb_render_trapezoids (xcb_connection_t *c /**< */,
1336 uint8_t op /**< */,
1337 xcb_render_picture_t src /**< */,
1338 xcb_render_picture_t dst /**< */,
1339 xcb_render_pictformat_t mask_format /**< */,
1340 int16_t src_x /**< */,
1341 int16_t src_y /**< */,
1342 uint32_t traps_len /**< */,
1343 const xcb_render_trapezoid_t *traps /**< */)
1345 static const xcb_protocol_request_t xcb_req = {
1346 /* count */ 4,
1347 /* ext */ &xcb_render_id,
1348 /* opcode */ XCB_RENDER_TRAPEZOIDS,
1349 /* isvoid */ 1
1352 struct iovec xcb_parts[6];
1353 xcb_void_cookie_t xcb_ret;
1354 xcb_render_trapezoids_request_t xcb_out;
1356 xcb_out.op = op;
1357 memset(xcb_out.pad0, 0, 3);
1358 xcb_out.src = src;
1359 xcb_out.dst = dst;
1360 xcb_out.mask_format = mask_format;
1361 xcb_out.src_x = src_x;
1362 xcb_out.src_y = src_y;
1364 xcb_parts[2].iov_base = (char *) &xcb_out;
1365 xcb_parts[2].iov_len = sizeof(xcb_out);
1366 xcb_parts[3].iov_base = 0;
1367 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1368 /* xcb_render_trapezoid_t traps */
1369 xcb_parts[4].iov_base = (char *) traps;
1370 xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t);
1371 xcb_parts[5].iov_base = 0;
1372 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1374 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1375 return xcb_ret;
1379 xcb_render_triangles_sizeof (const void *_buffer /**< */,
1380 uint32_t triangles_len /**< */)
1382 char *xcb_tmp = (char *)_buffer;
1383 unsigned int xcb_buffer_len = 0;
1384 unsigned int xcb_block_len = 0;
1385 unsigned int xcb_pad = 0;
1386 unsigned int xcb_align_to = 0;
1389 xcb_block_len += sizeof(xcb_render_triangles_request_t);
1390 xcb_tmp += xcb_block_len;
1391 xcb_buffer_len += xcb_block_len;
1392 xcb_block_len = 0;
1393 /* triangles */
1394 xcb_block_len += triangles_len * sizeof(xcb_render_triangle_t);
1395 xcb_tmp += xcb_block_len;
1396 xcb_align_to = ALIGNOF(xcb_render_triangle_t);
1397 /* insert padding */
1398 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1399 xcb_buffer_len += xcb_block_len + xcb_pad;
1400 if (0 != xcb_pad) {
1401 xcb_tmp += xcb_pad;
1402 xcb_pad = 0;
1404 xcb_block_len = 0;
1406 return xcb_buffer_len;
1409 xcb_void_cookie_t
1410 xcb_render_triangles_checked (xcb_connection_t *c /**< */,
1411 uint8_t op /**< */,
1412 xcb_render_picture_t src /**< */,
1413 xcb_render_picture_t dst /**< */,
1414 xcb_render_pictformat_t mask_format /**< */,
1415 int16_t src_x /**< */,
1416 int16_t src_y /**< */,
1417 uint32_t triangles_len /**< */,
1418 const xcb_render_triangle_t *triangles /**< */)
1420 static const xcb_protocol_request_t xcb_req = {
1421 /* count */ 4,
1422 /* ext */ &xcb_render_id,
1423 /* opcode */ XCB_RENDER_TRIANGLES,
1424 /* isvoid */ 1
1427 struct iovec xcb_parts[6];
1428 xcb_void_cookie_t xcb_ret;
1429 xcb_render_triangles_request_t xcb_out;
1431 xcb_out.op = op;
1432 memset(xcb_out.pad0, 0, 3);
1433 xcb_out.src = src;
1434 xcb_out.dst = dst;
1435 xcb_out.mask_format = mask_format;
1436 xcb_out.src_x = src_x;
1437 xcb_out.src_y = src_y;
1439 xcb_parts[2].iov_base = (char *) &xcb_out;
1440 xcb_parts[2].iov_len = sizeof(xcb_out);
1441 xcb_parts[3].iov_base = 0;
1442 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1443 /* xcb_render_triangle_t triangles */
1444 xcb_parts[4].iov_base = (char *) triangles;
1445 xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t);
1446 xcb_parts[5].iov_base = 0;
1447 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1449 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1450 return xcb_ret;
1453 xcb_void_cookie_t
1454 xcb_render_triangles (xcb_connection_t *c /**< */,
1455 uint8_t op /**< */,
1456 xcb_render_picture_t src /**< */,
1457 xcb_render_picture_t dst /**< */,
1458 xcb_render_pictformat_t mask_format /**< */,
1459 int16_t src_x /**< */,
1460 int16_t src_y /**< */,
1461 uint32_t triangles_len /**< */,
1462 const xcb_render_triangle_t *triangles /**< */)
1464 static const xcb_protocol_request_t xcb_req = {
1465 /* count */ 4,
1466 /* ext */ &xcb_render_id,
1467 /* opcode */ XCB_RENDER_TRIANGLES,
1468 /* isvoid */ 1
1471 struct iovec xcb_parts[6];
1472 xcb_void_cookie_t xcb_ret;
1473 xcb_render_triangles_request_t xcb_out;
1475 xcb_out.op = op;
1476 memset(xcb_out.pad0, 0, 3);
1477 xcb_out.src = src;
1478 xcb_out.dst = dst;
1479 xcb_out.mask_format = mask_format;
1480 xcb_out.src_x = src_x;
1481 xcb_out.src_y = src_y;
1483 xcb_parts[2].iov_base = (char *) &xcb_out;
1484 xcb_parts[2].iov_len = sizeof(xcb_out);
1485 xcb_parts[3].iov_base = 0;
1486 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1487 /* xcb_render_triangle_t triangles */
1488 xcb_parts[4].iov_base = (char *) triangles;
1489 xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t);
1490 xcb_parts[5].iov_base = 0;
1491 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1493 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1494 return xcb_ret;
1498 xcb_render_tri_strip_sizeof (const void *_buffer /**< */,
1499 uint32_t points_len /**< */)
1501 char *xcb_tmp = (char *)_buffer;
1502 unsigned int xcb_buffer_len = 0;
1503 unsigned int xcb_block_len = 0;
1504 unsigned int xcb_pad = 0;
1505 unsigned int xcb_align_to = 0;
1508 xcb_block_len += sizeof(xcb_render_tri_strip_request_t);
1509 xcb_tmp += xcb_block_len;
1510 xcb_buffer_len += xcb_block_len;
1511 xcb_block_len = 0;
1512 /* points */
1513 xcb_block_len += points_len * sizeof(xcb_render_pointfix_t);
1514 xcb_tmp += xcb_block_len;
1515 xcb_align_to = ALIGNOF(xcb_render_pointfix_t);
1516 /* insert padding */
1517 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1518 xcb_buffer_len += xcb_block_len + xcb_pad;
1519 if (0 != xcb_pad) {
1520 xcb_tmp += xcb_pad;
1521 xcb_pad = 0;
1523 xcb_block_len = 0;
1525 return xcb_buffer_len;
1528 xcb_void_cookie_t
1529 xcb_render_tri_strip_checked (xcb_connection_t *c /**< */,
1530 uint8_t op /**< */,
1531 xcb_render_picture_t src /**< */,
1532 xcb_render_picture_t dst /**< */,
1533 xcb_render_pictformat_t mask_format /**< */,
1534 int16_t src_x /**< */,
1535 int16_t src_y /**< */,
1536 uint32_t points_len /**< */,
1537 const xcb_render_pointfix_t *points /**< */)
1539 static const xcb_protocol_request_t xcb_req = {
1540 /* count */ 4,
1541 /* ext */ &xcb_render_id,
1542 /* opcode */ XCB_RENDER_TRI_STRIP,
1543 /* isvoid */ 1
1546 struct iovec xcb_parts[6];
1547 xcb_void_cookie_t xcb_ret;
1548 xcb_render_tri_strip_request_t xcb_out;
1550 xcb_out.op = op;
1551 memset(xcb_out.pad0, 0, 3);
1552 xcb_out.src = src;
1553 xcb_out.dst = dst;
1554 xcb_out.mask_format = mask_format;
1555 xcb_out.src_x = src_x;
1556 xcb_out.src_y = src_y;
1558 xcb_parts[2].iov_base = (char *) &xcb_out;
1559 xcb_parts[2].iov_len = sizeof(xcb_out);
1560 xcb_parts[3].iov_base = 0;
1561 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1562 /* xcb_render_pointfix_t points */
1563 xcb_parts[4].iov_base = (char *) points;
1564 xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
1565 xcb_parts[5].iov_base = 0;
1566 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1568 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1569 return xcb_ret;
1572 xcb_void_cookie_t
1573 xcb_render_tri_strip (xcb_connection_t *c /**< */,
1574 uint8_t op /**< */,
1575 xcb_render_picture_t src /**< */,
1576 xcb_render_picture_t dst /**< */,
1577 xcb_render_pictformat_t mask_format /**< */,
1578 int16_t src_x /**< */,
1579 int16_t src_y /**< */,
1580 uint32_t points_len /**< */,
1581 const xcb_render_pointfix_t *points /**< */)
1583 static const xcb_protocol_request_t xcb_req = {
1584 /* count */ 4,
1585 /* ext */ &xcb_render_id,
1586 /* opcode */ XCB_RENDER_TRI_STRIP,
1587 /* isvoid */ 1
1590 struct iovec xcb_parts[6];
1591 xcb_void_cookie_t xcb_ret;
1592 xcb_render_tri_strip_request_t xcb_out;
1594 xcb_out.op = op;
1595 memset(xcb_out.pad0, 0, 3);
1596 xcb_out.src = src;
1597 xcb_out.dst = dst;
1598 xcb_out.mask_format = mask_format;
1599 xcb_out.src_x = src_x;
1600 xcb_out.src_y = src_y;
1602 xcb_parts[2].iov_base = (char *) &xcb_out;
1603 xcb_parts[2].iov_len = sizeof(xcb_out);
1604 xcb_parts[3].iov_base = 0;
1605 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1606 /* xcb_render_pointfix_t points */
1607 xcb_parts[4].iov_base = (char *) points;
1608 xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
1609 xcb_parts[5].iov_base = 0;
1610 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1612 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1613 return xcb_ret;
1617 xcb_render_tri_fan_sizeof (const void *_buffer /**< */,
1618 uint32_t points_len /**< */)
1620 char *xcb_tmp = (char *)_buffer;
1621 unsigned int xcb_buffer_len = 0;
1622 unsigned int xcb_block_len = 0;
1623 unsigned int xcb_pad = 0;
1624 unsigned int xcb_align_to = 0;
1627 xcb_block_len += sizeof(xcb_render_tri_fan_request_t);
1628 xcb_tmp += xcb_block_len;
1629 xcb_buffer_len += xcb_block_len;
1630 xcb_block_len = 0;
1631 /* points */
1632 xcb_block_len += points_len * sizeof(xcb_render_pointfix_t);
1633 xcb_tmp += xcb_block_len;
1634 xcb_align_to = ALIGNOF(xcb_render_pointfix_t);
1635 /* insert padding */
1636 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1637 xcb_buffer_len += xcb_block_len + xcb_pad;
1638 if (0 != xcb_pad) {
1639 xcb_tmp += xcb_pad;
1640 xcb_pad = 0;
1642 xcb_block_len = 0;
1644 return xcb_buffer_len;
1647 xcb_void_cookie_t
1648 xcb_render_tri_fan_checked (xcb_connection_t *c /**< */,
1649 uint8_t op /**< */,
1650 xcb_render_picture_t src /**< */,
1651 xcb_render_picture_t dst /**< */,
1652 xcb_render_pictformat_t mask_format /**< */,
1653 int16_t src_x /**< */,
1654 int16_t src_y /**< */,
1655 uint32_t points_len /**< */,
1656 const xcb_render_pointfix_t *points /**< */)
1658 static const xcb_protocol_request_t xcb_req = {
1659 /* count */ 4,
1660 /* ext */ &xcb_render_id,
1661 /* opcode */ XCB_RENDER_TRI_FAN,
1662 /* isvoid */ 1
1665 struct iovec xcb_parts[6];
1666 xcb_void_cookie_t xcb_ret;
1667 xcb_render_tri_fan_request_t xcb_out;
1669 xcb_out.op = op;
1670 memset(xcb_out.pad0, 0, 3);
1671 xcb_out.src = src;
1672 xcb_out.dst = dst;
1673 xcb_out.mask_format = mask_format;
1674 xcb_out.src_x = src_x;
1675 xcb_out.src_y = src_y;
1677 xcb_parts[2].iov_base = (char *) &xcb_out;
1678 xcb_parts[2].iov_len = sizeof(xcb_out);
1679 xcb_parts[3].iov_base = 0;
1680 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1681 /* xcb_render_pointfix_t points */
1682 xcb_parts[4].iov_base = (char *) points;
1683 xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
1684 xcb_parts[5].iov_base = 0;
1685 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1687 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1688 return xcb_ret;
1691 xcb_void_cookie_t
1692 xcb_render_tri_fan (xcb_connection_t *c /**< */,
1693 uint8_t op /**< */,
1694 xcb_render_picture_t src /**< */,
1695 xcb_render_picture_t dst /**< */,
1696 xcb_render_pictformat_t mask_format /**< */,
1697 int16_t src_x /**< */,
1698 int16_t src_y /**< */,
1699 uint32_t points_len /**< */,
1700 const xcb_render_pointfix_t *points /**< */)
1702 static const xcb_protocol_request_t xcb_req = {
1703 /* count */ 4,
1704 /* ext */ &xcb_render_id,
1705 /* opcode */ XCB_RENDER_TRI_FAN,
1706 /* isvoid */ 1
1709 struct iovec xcb_parts[6];
1710 xcb_void_cookie_t xcb_ret;
1711 xcb_render_tri_fan_request_t xcb_out;
1713 xcb_out.op = op;
1714 memset(xcb_out.pad0, 0, 3);
1715 xcb_out.src = src;
1716 xcb_out.dst = dst;
1717 xcb_out.mask_format = mask_format;
1718 xcb_out.src_x = src_x;
1719 xcb_out.src_y = src_y;
1721 xcb_parts[2].iov_base = (char *) &xcb_out;
1722 xcb_parts[2].iov_len = sizeof(xcb_out);
1723 xcb_parts[3].iov_base = 0;
1724 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1725 /* xcb_render_pointfix_t points */
1726 xcb_parts[4].iov_base = (char *) points;
1727 xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
1728 xcb_parts[5].iov_base = 0;
1729 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1731 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1732 return xcb_ret;
1735 xcb_void_cookie_t
1736 xcb_render_create_glyph_set_checked (xcb_connection_t *c /**< */,
1737 xcb_render_glyphset_t gsid /**< */,
1738 xcb_render_pictformat_t format /**< */)
1740 static const xcb_protocol_request_t xcb_req = {
1741 /* count */ 2,
1742 /* ext */ &xcb_render_id,
1743 /* opcode */ XCB_RENDER_CREATE_GLYPH_SET,
1744 /* isvoid */ 1
1747 struct iovec xcb_parts[4];
1748 xcb_void_cookie_t xcb_ret;
1749 xcb_render_create_glyph_set_request_t xcb_out;
1751 xcb_out.gsid = gsid;
1752 xcb_out.format = format;
1754 xcb_parts[2].iov_base = (char *) &xcb_out;
1755 xcb_parts[2].iov_len = sizeof(xcb_out);
1756 xcb_parts[3].iov_base = 0;
1757 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1759 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1760 return xcb_ret;
1763 xcb_void_cookie_t
1764 xcb_render_create_glyph_set (xcb_connection_t *c /**< */,
1765 xcb_render_glyphset_t gsid /**< */,
1766 xcb_render_pictformat_t format /**< */)
1768 static const xcb_protocol_request_t xcb_req = {
1769 /* count */ 2,
1770 /* ext */ &xcb_render_id,
1771 /* opcode */ XCB_RENDER_CREATE_GLYPH_SET,
1772 /* isvoid */ 1
1775 struct iovec xcb_parts[4];
1776 xcb_void_cookie_t xcb_ret;
1777 xcb_render_create_glyph_set_request_t xcb_out;
1779 xcb_out.gsid = gsid;
1780 xcb_out.format = format;
1782 xcb_parts[2].iov_base = (char *) &xcb_out;
1783 xcb_parts[2].iov_len = sizeof(xcb_out);
1784 xcb_parts[3].iov_base = 0;
1785 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1787 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1788 return xcb_ret;
1791 xcb_void_cookie_t
1792 xcb_render_reference_glyph_set_checked (xcb_connection_t *c /**< */,
1793 xcb_render_glyphset_t gsid /**< */,
1794 xcb_render_glyphset_t existing /**< */)
1796 static const xcb_protocol_request_t xcb_req = {
1797 /* count */ 2,
1798 /* ext */ &xcb_render_id,
1799 /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET,
1800 /* isvoid */ 1
1803 struct iovec xcb_parts[4];
1804 xcb_void_cookie_t xcb_ret;
1805 xcb_render_reference_glyph_set_request_t xcb_out;
1807 xcb_out.gsid = gsid;
1808 xcb_out.existing = existing;
1810 xcb_parts[2].iov_base = (char *) &xcb_out;
1811 xcb_parts[2].iov_len = sizeof(xcb_out);
1812 xcb_parts[3].iov_base = 0;
1813 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1815 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1816 return xcb_ret;
1819 xcb_void_cookie_t
1820 xcb_render_reference_glyph_set (xcb_connection_t *c /**< */,
1821 xcb_render_glyphset_t gsid /**< */,
1822 xcb_render_glyphset_t existing /**< */)
1824 static const xcb_protocol_request_t xcb_req = {
1825 /* count */ 2,
1826 /* ext */ &xcb_render_id,
1827 /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET,
1828 /* isvoid */ 1
1831 struct iovec xcb_parts[4];
1832 xcb_void_cookie_t xcb_ret;
1833 xcb_render_reference_glyph_set_request_t xcb_out;
1835 xcb_out.gsid = gsid;
1836 xcb_out.existing = existing;
1838 xcb_parts[2].iov_base = (char *) &xcb_out;
1839 xcb_parts[2].iov_len = sizeof(xcb_out);
1840 xcb_parts[3].iov_base = 0;
1841 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1843 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1844 return xcb_ret;
1847 xcb_void_cookie_t
1848 xcb_render_free_glyph_set_checked (xcb_connection_t *c /**< */,
1849 xcb_render_glyphset_t glyphset /**< */)
1851 static const xcb_protocol_request_t xcb_req = {
1852 /* count */ 2,
1853 /* ext */ &xcb_render_id,
1854 /* opcode */ XCB_RENDER_FREE_GLYPH_SET,
1855 /* isvoid */ 1
1858 struct iovec xcb_parts[4];
1859 xcb_void_cookie_t xcb_ret;
1860 xcb_render_free_glyph_set_request_t xcb_out;
1862 xcb_out.glyphset = glyphset;
1864 xcb_parts[2].iov_base = (char *) &xcb_out;
1865 xcb_parts[2].iov_len = sizeof(xcb_out);
1866 xcb_parts[3].iov_base = 0;
1867 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1869 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1870 return xcb_ret;
1873 xcb_void_cookie_t
1874 xcb_render_free_glyph_set (xcb_connection_t *c /**< */,
1875 xcb_render_glyphset_t glyphset /**< */)
1877 static const xcb_protocol_request_t xcb_req = {
1878 /* count */ 2,
1879 /* ext */ &xcb_render_id,
1880 /* opcode */ XCB_RENDER_FREE_GLYPH_SET,
1881 /* isvoid */ 1
1884 struct iovec xcb_parts[4];
1885 xcb_void_cookie_t xcb_ret;
1886 xcb_render_free_glyph_set_request_t xcb_out;
1888 xcb_out.glyphset = glyphset;
1890 xcb_parts[2].iov_base = (char *) &xcb_out;
1891 xcb_parts[2].iov_len = sizeof(xcb_out);
1892 xcb_parts[3].iov_base = 0;
1893 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1895 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1896 return xcb_ret;
1900 xcb_render_add_glyphs_sizeof (const void *_buffer /**< */,
1901 uint32_t data_len /**< */)
1903 char *xcb_tmp = (char *)_buffer;
1904 const xcb_render_add_glyphs_request_t *_aux = (xcb_render_add_glyphs_request_t *)_buffer;
1905 unsigned int xcb_buffer_len = 0;
1906 unsigned int xcb_block_len = 0;
1907 unsigned int xcb_pad = 0;
1908 unsigned int xcb_align_to = 0;
1911 xcb_block_len += sizeof(xcb_render_add_glyphs_request_t);
1912 xcb_tmp += xcb_block_len;
1913 xcb_buffer_len += xcb_block_len;
1914 xcb_block_len = 0;
1915 /* glyphids */
1916 xcb_block_len += _aux->glyphs_len * sizeof(uint32_t);
1917 xcb_tmp += xcb_block_len;
1918 xcb_align_to = ALIGNOF(uint32_t);
1919 /* insert padding */
1920 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1921 xcb_buffer_len += xcb_block_len + xcb_pad;
1922 if (0 != xcb_pad) {
1923 xcb_tmp += xcb_pad;
1924 xcb_pad = 0;
1926 xcb_block_len = 0;
1927 /* glyphs */
1928 xcb_block_len += _aux->glyphs_len * sizeof(xcb_render_glyphinfo_t);
1929 xcb_tmp += xcb_block_len;
1930 xcb_align_to = ALIGNOF(xcb_render_glyphinfo_t);
1931 /* insert padding */
1932 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1933 xcb_buffer_len += xcb_block_len + xcb_pad;
1934 if (0 != xcb_pad) {
1935 xcb_tmp += xcb_pad;
1936 xcb_pad = 0;
1938 xcb_block_len = 0;
1939 /* data */
1940 xcb_block_len += data_len * sizeof(uint8_t);
1941 xcb_tmp += xcb_block_len;
1942 xcb_align_to = ALIGNOF(uint8_t);
1943 /* insert padding */
1944 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1945 xcb_buffer_len += xcb_block_len + xcb_pad;
1946 if (0 != xcb_pad) {
1947 xcb_tmp += xcb_pad;
1948 xcb_pad = 0;
1950 xcb_block_len = 0;
1952 return xcb_buffer_len;
1955 xcb_void_cookie_t
1956 xcb_render_add_glyphs_checked (xcb_connection_t *c /**< */,
1957 xcb_render_glyphset_t glyphset /**< */,
1958 uint32_t glyphs_len /**< */,
1959 const uint32_t *glyphids /**< */,
1960 const xcb_render_glyphinfo_t *glyphs /**< */,
1961 uint32_t data_len /**< */,
1962 const uint8_t *data /**< */)
1964 static const xcb_protocol_request_t xcb_req = {
1965 /* count */ 8,
1966 /* ext */ &xcb_render_id,
1967 /* opcode */ XCB_RENDER_ADD_GLYPHS,
1968 /* isvoid */ 1
1971 struct iovec xcb_parts[10];
1972 xcb_void_cookie_t xcb_ret;
1973 xcb_render_add_glyphs_request_t xcb_out;
1975 xcb_out.glyphset = glyphset;
1976 xcb_out.glyphs_len = glyphs_len;
1978 xcb_parts[2].iov_base = (char *) &xcb_out;
1979 xcb_parts[2].iov_len = sizeof(xcb_out);
1980 xcb_parts[3].iov_base = 0;
1981 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1982 /* uint32_t glyphids */
1983 xcb_parts[4].iov_base = (char *) glyphids;
1984 xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t);
1985 xcb_parts[5].iov_base = 0;
1986 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1987 /* xcb_render_glyphinfo_t glyphs */
1988 xcb_parts[6].iov_base = (char *) glyphs;
1989 xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t);
1990 xcb_parts[7].iov_base = 0;
1991 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
1992 /* uint8_t data */
1993 xcb_parts[8].iov_base = (char *) data;
1994 xcb_parts[8].iov_len = data_len * sizeof(uint8_t);
1995 xcb_parts[9].iov_base = 0;
1996 xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
1998 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1999 return xcb_ret;
2002 xcb_void_cookie_t
2003 xcb_render_add_glyphs (xcb_connection_t *c /**< */,
2004 xcb_render_glyphset_t glyphset /**< */,
2005 uint32_t glyphs_len /**< */,
2006 const uint32_t *glyphids /**< */,
2007 const xcb_render_glyphinfo_t *glyphs /**< */,
2008 uint32_t data_len /**< */,
2009 const uint8_t *data /**< */)
2011 static const xcb_protocol_request_t xcb_req = {
2012 /* count */ 8,
2013 /* ext */ &xcb_render_id,
2014 /* opcode */ XCB_RENDER_ADD_GLYPHS,
2015 /* isvoid */ 1
2018 struct iovec xcb_parts[10];
2019 xcb_void_cookie_t xcb_ret;
2020 xcb_render_add_glyphs_request_t xcb_out;
2022 xcb_out.glyphset = glyphset;
2023 xcb_out.glyphs_len = glyphs_len;
2025 xcb_parts[2].iov_base = (char *) &xcb_out;
2026 xcb_parts[2].iov_len = sizeof(xcb_out);
2027 xcb_parts[3].iov_base = 0;
2028 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2029 /* uint32_t glyphids */
2030 xcb_parts[4].iov_base = (char *) glyphids;
2031 xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t);
2032 xcb_parts[5].iov_base = 0;
2033 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2034 /* xcb_render_glyphinfo_t glyphs */
2035 xcb_parts[6].iov_base = (char *) glyphs;
2036 xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t);
2037 xcb_parts[7].iov_base = 0;
2038 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
2039 /* uint8_t data */
2040 xcb_parts[8].iov_base = (char *) data;
2041 xcb_parts[8].iov_len = data_len * sizeof(uint8_t);
2042 xcb_parts[9].iov_base = 0;
2043 xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
2045 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2046 return xcb_ret;
2050 xcb_render_free_glyphs_sizeof (const void *_buffer /**< */,
2051 uint32_t glyphs_len /**< */)
2053 char *xcb_tmp = (char *)_buffer;
2054 unsigned int xcb_buffer_len = 0;
2055 unsigned int xcb_block_len = 0;
2056 unsigned int xcb_pad = 0;
2057 unsigned int xcb_align_to = 0;
2060 xcb_block_len += sizeof(xcb_render_free_glyphs_request_t);
2061 xcb_tmp += xcb_block_len;
2062 xcb_buffer_len += xcb_block_len;
2063 xcb_block_len = 0;
2064 /* glyphs */
2065 xcb_block_len += glyphs_len * sizeof(xcb_render_glyph_t);
2066 xcb_tmp += xcb_block_len;
2067 xcb_align_to = ALIGNOF(xcb_render_glyph_t);
2068 /* insert padding */
2069 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2070 xcb_buffer_len += xcb_block_len + xcb_pad;
2071 if (0 != xcb_pad) {
2072 xcb_tmp += xcb_pad;
2073 xcb_pad = 0;
2075 xcb_block_len = 0;
2077 return xcb_buffer_len;
2080 xcb_void_cookie_t
2081 xcb_render_free_glyphs_checked (xcb_connection_t *c /**< */,
2082 xcb_render_glyphset_t glyphset /**< */,
2083 uint32_t glyphs_len /**< */,
2084 const xcb_render_glyph_t *glyphs /**< */)
2086 static const xcb_protocol_request_t xcb_req = {
2087 /* count */ 4,
2088 /* ext */ &xcb_render_id,
2089 /* opcode */ XCB_RENDER_FREE_GLYPHS,
2090 /* isvoid */ 1
2093 struct iovec xcb_parts[6];
2094 xcb_void_cookie_t xcb_ret;
2095 xcb_render_free_glyphs_request_t xcb_out;
2097 xcb_out.glyphset = glyphset;
2099 xcb_parts[2].iov_base = (char *) &xcb_out;
2100 xcb_parts[2].iov_len = sizeof(xcb_out);
2101 xcb_parts[3].iov_base = 0;
2102 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2103 /* xcb_render_glyph_t glyphs */
2104 xcb_parts[4].iov_base = (char *) glyphs;
2105 xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t);
2106 xcb_parts[5].iov_base = 0;
2107 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2109 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2110 return xcb_ret;
2113 xcb_void_cookie_t
2114 xcb_render_free_glyphs (xcb_connection_t *c /**< */,
2115 xcb_render_glyphset_t glyphset /**< */,
2116 uint32_t glyphs_len /**< */,
2117 const xcb_render_glyph_t *glyphs /**< */)
2119 static const xcb_protocol_request_t xcb_req = {
2120 /* count */ 4,
2121 /* ext */ &xcb_render_id,
2122 /* opcode */ XCB_RENDER_FREE_GLYPHS,
2123 /* isvoid */ 1
2126 struct iovec xcb_parts[6];
2127 xcb_void_cookie_t xcb_ret;
2128 xcb_render_free_glyphs_request_t xcb_out;
2130 xcb_out.glyphset = glyphset;
2132 xcb_parts[2].iov_base = (char *) &xcb_out;
2133 xcb_parts[2].iov_len = sizeof(xcb_out);
2134 xcb_parts[3].iov_base = 0;
2135 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2136 /* xcb_render_glyph_t glyphs */
2137 xcb_parts[4].iov_base = (char *) glyphs;
2138 xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t);
2139 xcb_parts[5].iov_base = 0;
2140 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2142 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2143 return xcb_ret;
2147 xcb_render_composite_glyphs_8_sizeof (const void *_buffer /**< */,
2148 uint32_t glyphcmds_len /**< */)
2150 char *xcb_tmp = (char *)_buffer;
2151 unsigned int xcb_buffer_len = 0;
2152 unsigned int xcb_block_len = 0;
2153 unsigned int xcb_pad = 0;
2154 unsigned int xcb_align_to = 0;
2157 xcb_block_len += sizeof(xcb_render_composite_glyphs_8_request_t);
2158 xcb_tmp += xcb_block_len;
2159 xcb_buffer_len += xcb_block_len;
2160 xcb_block_len = 0;
2161 /* glyphcmds */
2162 xcb_block_len += glyphcmds_len * sizeof(uint8_t);
2163 xcb_tmp += xcb_block_len;
2164 xcb_align_to = ALIGNOF(uint8_t);
2165 /* insert padding */
2166 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2167 xcb_buffer_len += xcb_block_len + xcb_pad;
2168 if (0 != xcb_pad) {
2169 xcb_tmp += xcb_pad;
2170 xcb_pad = 0;
2172 xcb_block_len = 0;
2174 return xcb_buffer_len;
2177 xcb_void_cookie_t
2178 xcb_render_composite_glyphs_8_checked (xcb_connection_t *c /**< */,
2179 uint8_t op /**< */,
2180 xcb_render_picture_t src /**< */,
2181 xcb_render_picture_t dst /**< */,
2182 xcb_render_pictformat_t mask_format /**< */,
2183 xcb_render_glyphset_t glyphset /**< */,
2184 int16_t src_x /**< */,
2185 int16_t src_y /**< */,
2186 uint32_t glyphcmds_len /**< */,
2187 const uint8_t *glyphcmds /**< */)
2189 static const xcb_protocol_request_t xcb_req = {
2190 /* count */ 4,
2191 /* ext */ &xcb_render_id,
2192 /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8,
2193 /* isvoid */ 1
2196 struct iovec xcb_parts[6];
2197 xcb_void_cookie_t xcb_ret;
2198 xcb_render_composite_glyphs_8_request_t xcb_out;
2200 xcb_out.op = op;
2201 memset(xcb_out.pad0, 0, 3);
2202 xcb_out.src = src;
2203 xcb_out.dst = dst;
2204 xcb_out.mask_format = mask_format;
2205 xcb_out.glyphset = glyphset;
2206 xcb_out.src_x = src_x;
2207 xcb_out.src_y = src_y;
2209 xcb_parts[2].iov_base = (char *) &xcb_out;
2210 xcb_parts[2].iov_len = sizeof(xcb_out);
2211 xcb_parts[3].iov_base = 0;
2212 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2213 /* uint8_t glyphcmds */
2214 xcb_parts[4].iov_base = (char *) glyphcmds;
2215 xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2216 xcb_parts[5].iov_base = 0;
2217 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2219 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2220 return xcb_ret;
2223 xcb_void_cookie_t
2224 xcb_render_composite_glyphs_8 (xcb_connection_t *c /**< */,
2225 uint8_t op /**< */,
2226 xcb_render_picture_t src /**< */,
2227 xcb_render_picture_t dst /**< */,
2228 xcb_render_pictformat_t mask_format /**< */,
2229 xcb_render_glyphset_t glyphset /**< */,
2230 int16_t src_x /**< */,
2231 int16_t src_y /**< */,
2232 uint32_t glyphcmds_len /**< */,
2233 const uint8_t *glyphcmds /**< */)
2235 static const xcb_protocol_request_t xcb_req = {
2236 /* count */ 4,
2237 /* ext */ &xcb_render_id,
2238 /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8,
2239 /* isvoid */ 1
2242 struct iovec xcb_parts[6];
2243 xcb_void_cookie_t xcb_ret;
2244 xcb_render_composite_glyphs_8_request_t xcb_out;
2246 xcb_out.op = op;
2247 memset(xcb_out.pad0, 0, 3);
2248 xcb_out.src = src;
2249 xcb_out.dst = dst;
2250 xcb_out.mask_format = mask_format;
2251 xcb_out.glyphset = glyphset;
2252 xcb_out.src_x = src_x;
2253 xcb_out.src_y = src_y;
2255 xcb_parts[2].iov_base = (char *) &xcb_out;
2256 xcb_parts[2].iov_len = sizeof(xcb_out);
2257 xcb_parts[3].iov_base = 0;
2258 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2259 /* uint8_t glyphcmds */
2260 xcb_parts[4].iov_base = (char *) glyphcmds;
2261 xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2262 xcb_parts[5].iov_base = 0;
2263 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2265 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2266 return xcb_ret;
2270 xcb_render_composite_glyphs_16_sizeof (const void *_buffer /**< */,
2271 uint32_t glyphcmds_len /**< */)
2273 char *xcb_tmp = (char *)_buffer;
2274 unsigned int xcb_buffer_len = 0;
2275 unsigned int xcb_block_len = 0;
2276 unsigned int xcb_pad = 0;
2277 unsigned int xcb_align_to = 0;
2280 xcb_block_len += sizeof(xcb_render_composite_glyphs_16_request_t);
2281 xcb_tmp += xcb_block_len;
2282 xcb_buffer_len += xcb_block_len;
2283 xcb_block_len = 0;
2284 /* glyphcmds */
2285 xcb_block_len += glyphcmds_len * sizeof(uint8_t);
2286 xcb_tmp += xcb_block_len;
2287 xcb_align_to = ALIGNOF(uint8_t);
2288 /* insert padding */
2289 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2290 xcb_buffer_len += xcb_block_len + xcb_pad;
2291 if (0 != xcb_pad) {
2292 xcb_tmp += xcb_pad;
2293 xcb_pad = 0;
2295 xcb_block_len = 0;
2297 return xcb_buffer_len;
2300 xcb_void_cookie_t
2301 xcb_render_composite_glyphs_16_checked (xcb_connection_t *c /**< */,
2302 uint8_t op /**< */,
2303 xcb_render_picture_t src /**< */,
2304 xcb_render_picture_t dst /**< */,
2305 xcb_render_pictformat_t mask_format /**< */,
2306 xcb_render_glyphset_t glyphset /**< */,
2307 int16_t src_x /**< */,
2308 int16_t src_y /**< */,
2309 uint32_t glyphcmds_len /**< */,
2310 const uint8_t *glyphcmds /**< */)
2312 static const xcb_protocol_request_t xcb_req = {
2313 /* count */ 4,
2314 /* ext */ &xcb_render_id,
2315 /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16,
2316 /* isvoid */ 1
2319 struct iovec xcb_parts[6];
2320 xcb_void_cookie_t xcb_ret;
2321 xcb_render_composite_glyphs_16_request_t xcb_out;
2323 xcb_out.op = op;
2324 memset(xcb_out.pad0, 0, 3);
2325 xcb_out.src = src;
2326 xcb_out.dst = dst;
2327 xcb_out.mask_format = mask_format;
2328 xcb_out.glyphset = glyphset;
2329 xcb_out.src_x = src_x;
2330 xcb_out.src_y = src_y;
2332 xcb_parts[2].iov_base = (char *) &xcb_out;
2333 xcb_parts[2].iov_len = sizeof(xcb_out);
2334 xcb_parts[3].iov_base = 0;
2335 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2336 /* uint8_t glyphcmds */
2337 xcb_parts[4].iov_base = (char *) glyphcmds;
2338 xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2339 xcb_parts[5].iov_base = 0;
2340 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2342 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2343 return xcb_ret;
2346 xcb_void_cookie_t
2347 xcb_render_composite_glyphs_16 (xcb_connection_t *c /**< */,
2348 uint8_t op /**< */,
2349 xcb_render_picture_t src /**< */,
2350 xcb_render_picture_t dst /**< */,
2351 xcb_render_pictformat_t mask_format /**< */,
2352 xcb_render_glyphset_t glyphset /**< */,
2353 int16_t src_x /**< */,
2354 int16_t src_y /**< */,
2355 uint32_t glyphcmds_len /**< */,
2356 const uint8_t *glyphcmds /**< */)
2358 static const xcb_protocol_request_t xcb_req = {
2359 /* count */ 4,
2360 /* ext */ &xcb_render_id,
2361 /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16,
2362 /* isvoid */ 1
2365 struct iovec xcb_parts[6];
2366 xcb_void_cookie_t xcb_ret;
2367 xcb_render_composite_glyphs_16_request_t xcb_out;
2369 xcb_out.op = op;
2370 memset(xcb_out.pad0, 0, 3);
2371 xcb_out.src = src;
2372 xcb_out.dst = dst;
2373 xcb_out.mask_format = mask_format;
2374 xcb_out.glyphset = glyphset;
2375 xcb_out.src_x = src_x;
2376 xcb_out.src_y = src_y;
2378 xcb_parts[2].iov_base = (char *) &xcb_out;
2379 xcb_parts[2].iov_len = sizeof(xcb_out);
2380 xcb_parts[3].iov_base = 0;
2381 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2382 /* uint8_t glyphcmds */
2383 xcb_parts[4].iov_base = (char *) glyphcmds;
2384 xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2385 xcb_parts[5].iov_base = 0;
2386 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2388 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2389 return xcb_ret;
2393 xcb_render_composite_glyphs_32_sizeof (const void *_buffer /**< */,
2394 uint32_t glyphcmds_len /**< */)
2396 char *xcb_tmp = (char *)_buffer;
2397 unsigned int xcb_buffer_len = 0;
2398 unsigned int xcb_block_len = 0;
2399 unsigned int xcb_pad = 0;
2400 unsigned int xcb_align_to = 0;
2403 xcb_block_len += sizeof(xcb_render_composite_glyphs_32_request_t);
2404 xcb_tmp += xcb_block_len;
2405 xcb_buffer_len += xcb_block_len;
2406 xcb_block_len = 0;
2407 /* glyphcmds */
2408 xcb_block_len += glyphcmds_len * sizeof(uint8_t);
2409 xcb_tmp += xcb_block_len;
2410 xcb_align_to = ALIGNOF(uint8_t);
2411 /* insert padding */
2412 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2413 xcb_buffer_len += xcb_block_len + xcb_pad;
2414 if (0 != xcb_pad) {
2415 xcb_tmp += xcb_pad;
2416 xcb_pad = 0;
2418 xcb_block_len = 0;
2420 return xcb_buffer_len;
2423 xcb_void_cookie_t
2424 xcb_render_composite_glyphs_32_checked (xcb_connection_t *c /**< */,
2425 uint8_t op /**< */,
2426 xcb_render_picture_t src /**< */,
2427 xcb_render_picture_t dst /**< */,
2428 xcb_render_pictformat_t mask_format /**< */,
2429 xcb_render_glyphset_t glyphset /**< */,
2430 int16_t src_x /**< */,
2431 int16_t src_y /**< */,
2432 uint32_t glyphcmds_len /**< */,
2433 const uint8_t *glyphcmds /**< */)
2435 static const xcb_protocol_request_t xcb_req = {
2436 /* count */ 4,
2437 /* ext */ &xcb_render_id,
2438 /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32,
2439 /* isvoid */ 1
2442 struct iovec xcb_parts[6];
2443 xcb_void_cookie_t xcb_ret;
2444 xcb_render_composite_glyphs_32_request_t xcb_out;
2446 xcb_out.op = op;
2447 memset(xcb_out.pad0, 0, 3);
2448 xcb_out.src = src;
2449 xcb_out.dst = dst;
2450 xcb_out.mask_format = mask_format;
2451 xcb_out.glyphset = glyphset;
2452 xcb_out.src_x = src_x;
2453 xcb_out.src_y = src_y;
2455 xcb_parts[2].iov_base = (char *) &xcb_out;
2456 xcb_parts[2].iov_len = sizeof(xcb_out);
2457 xcb_parts[3].iov_base = 0;
2458 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2459 /* uint8_t glyphcmds */
2460 xcb_parts[4].iov_base = (char *) glyphcmds;
2461 xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2462 xcb_parts[5].iov_base = 0;
2463 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2465 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2466 return xcb_ret;
2469 xcb_void_cookie_t
2470 xcb_render_composite_glyphs_32 (xcb_connection_t *c /**< */,
2471 uint8_t op /**< */,
2472 xcb_render_picture_t src /**< */,
2473 xcb_render_picture_t dst /**< */,
2474 xcb_render_pictformat_t mask_format /**< */,
2475 xcb_render_glyphset_t glyphset /**< */,
2476 int16_t src_x /**< */,
2477 int16_t src_y /**< */,
2478 uint32_t glyphcmds_len /**< */,
2479 const uint8_t *glyphcmds /**< */)
2481 static const xcb_protocol_request_t xcb_req = {
2482 /* count */ 4,
2483 /* ext */ &xcb_render_id,
2484 /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32,
2485 /* isvoid */ 1
2488 struct iovec xcb_parts[6];
2489 xcb_void_cookie_t xcb_ret;
2490 xcb_render_composite_glyphs_32_request_t xcb_out;
2492 xcb_out.op = op;
2493 memset(xcb_out.pad0, 0, 3);
2494 xcb_out.src = src;
2495 xcb_out.dst = dst;
2496 xcb_out.mask_format = mask_format;
2497 xcb_out.glyphset = glyphset;
2498 xcb_out.src_x = src_x;
2499 xcb_out.src_y = src_y;
2501 xcb_parts[2].iov_base = (char *) &xcb_out;
2502 xcb_parts[2].iov_len = sizeof(xcb_out);
2503 xcb_parts[3].iov_base = 0;
2504 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2505 /* uint8_t glyphcmds */
2506 xcb_parts[4].iov_base = (char *) glyphcmds;
2507 xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2508 xcb_parts[5].iov_base = 0;
2509 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2511 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2512 return xcb_ret;
2516 xcb_render_fill_rectangles_sizeof (const void *_buffer /**< */,
2517 uint32_t rects_len /**< */)
2519 char *xcb_tmp = (char *)_buffer;
2520 unsigned int xcb_buffer_len = 0;
2521 unsigned int xcb_block_len = 0;
2522 unsigned int xcb_pad = 0;
2523 unsigned int xcb_align_to = 0;
2526 xcb_block_len += sizeof(xcb_render_fill_rectangles_request_t);
2527 xcb_tmp += xcb_block_len;
2528 xcb_buffer_len += xcb_block_len;
2529 xcb_block_len = 0;
2530 /* rects */
2531 xcb_block_len += rects_len * sizeof(xcb_rectangle_t);
2532 xcb_tmp += xcb_block_len;
2533 xcb_align_to = ALIGNOF(xcb_rectangle_t);
2534 /* insert padding */
2535 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2536 xcb_buffer_len += xcb_block_len + xcb_pad;
2537 if (0 != xcb_pad) {
2538 xcb_tmp += xcb_pad;
2539 xcb_pad = 0;
2541 xcb_block_len = 0;
2543 return xcb_buffer_len;
2546 xcb_void_cookie_t
2547 xcb_render_fill_rectangles_checked (xcb_connection_t *c /**< */,
2548 uint8_t op /**< */,
2549 xcb_render_picture_t dst /**< */,
2550 xcb_render_color_t color /**< */,
2551 uint32_t rects_len /**< */,
2552 const xcb_rectangle_t *rects /**< */)
2554 static const xcb_protocol_request_t xcb_req = {
2555 /* count */ 4,
2556 /* ext */ &xcb_render_id,
2557 /* opcode */ XCB_RENDER_FILL_RECTANGLES,
2558 /* isvoid */ 1
2561 struct iovec xcb_parts[6];
2562 xcb_void_cookie_t xcb_ret;
2563 xcb_render_fill_rectangles_request_t xcb_out;
2565 xcb_out.op = op;
2566 memset(xcb_out.pad0, 0, 3);
2567 xcb_out.dst = dst;
2568 xcb_out.color = color;
2570 xcb_parts[2].iov_base = (char *) &xcb_out;
2571 xcb_parts[2].iov_len = sizeof(xcb_out);
2572 xcb_parts[3].iov_base = 0;
2573 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2574 /* xcb_rectangle_t rects */
2575 xcb_parts[4].iov_base = (char *) rects;
2576 xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t);
2577 xcb_parts[5].iov_base = 0;
2578 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2580 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2581 return xcb_ret;
2584 xcb_void_cookie_t
2585 xcb_render_fill_rectangles (xcb_connection_t *c /**< */,
2586 uint8_t op /**< */,
2587 xcb_render_picture_t dst /**< */,
2588 xcb_render_color_t color /**< */,
2589 uint32_t rects_len /**< */,
2590 const xcb_rectangle_t *rects /**< */)
2592 static const xcb_protocol_request_t xcb_req = {
2593 /* count */ 4,
2594 /* ext */ &xcb_render_id,
2595 /* opcode */ XCB_RENDER_FILL_RECTANGLES,
2596 /* isvoid */ 1
2599 struct iovec xcb_parts[6];
2600 xcb_void_cookie_t xcb_ret;
2601 xcb_render_fill_rectangles_request_t xcb_out;
2603 xcb_out.op = op;
2604 memset(xcb_out.pad0, 0, 3);
2605 xcb_out.dst = dst;
2606 xcb_out.color = color;
2608 xcb_parts[2].iov_base = (char *) &xcb_out;
2609 xcb_parts[2].iov_len = sizeof(xcb_out);
2610 xcb_parts[3].iov_base = 0;
2611 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2612 /* xcb_rectangle_t rects */
2613 xcb_parts[4].iov_base = (char *) rects;
2614 xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t);
2615 xcb_parts[5].iov_base = 0;
2616 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2618 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2619 return xcb_ret;
2622 xcb_void_cookie_t
2623 xcb_render_create_cursor_checked (xcb_connection_t *c /**< */,
2624 xcb_cursor_t cid /**< */,
2625 xcb_render_picture_t source /**< */,
2626 uint16_t x /**< */,
2627 uint16_t y /**< */)
2629 static const xcb_protocol_request_t xcb_req = {
2630 /* count */ 2,
2631 /* ext */ &xcb_render_id,
2632 /* opcode */ XCB_RENDER_CREATE_CURSOR,
2633 /* isvoid */ 1
2636 struct iovec xcb_parts[4];
2637 xcb_void_cookie_t xcb_ret;
2638 xcb_render_create_cursor_request_t xcb_out;
2640 xcb_out.cid = cid;
2641 xcb_out.source = source;
2642 xcb_out.x = x;
2643 xcb_out.y = y;
2645 xcb_parts[2].iov_base = (char *) &xcb_out;
2646 xcb_parts[2].iov_len = sizeof(xcb_out);
2647 xcb_parts[3].iov_base = 0;
2648 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2650 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2651 return xcb_ret;
2654 xcb_void_cookie_t
2655 xcb_render_create_cursor (xcb_connection_t *c /**< */,
2656 xcb_cursor_t cid /**< */,
2657 xcb_render_picture_t source /**< */,
2658 uint16_t x /**< */,
2659 uint16_t y /**< */)
2661 static const xcb_protocol_request_t xcb_req = {
2662 /* count */ 2,
2663 /* ext */ &xcb_render_id,
2664 /* opcode */ XCB_RENDER_CREATE_CURSOR,
2665 /* isvoid */ 1
2668 struct iovec xcb_parts[4];
2669 xcb_void_cookie_t xcb_ret;
2670 xcb_render_create_cursor_request_t xcb_out;
2672 xcb_out.cid = cid;
2673 xcb_out.source = source;
2674 xcb_out.x = x;
2675 xcb_out.y = y;
2677 xcb_parts[2].iov_base = (char *) &xcb_out;
2678 xcb_parts[2].iov_len = sizeof(xcb_out);
2679 xcb_parts[3].iov_base = 0;
2680 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2682 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2683 return xcb_ret;
2686 void
2687 xcb_render_transform_next (xcb_render_transform_iterator_t *i /**< */)
2689 --i->rem;
2690 ++i->data;
2691 i->index += sizeof(xcb_render_transform_t);
2694 xcb_generic_iterator_t
2695 xcb_render_transform_end (xcb_render_transform_iterator_t i /**< */)
2697 xcb_generic_iterator_t ret;
2698 ret.data = i.data + i.rem;
2699 ret.index = i.index + ((char *) ret.data - (char *) i.data);
2700 ret.rem = 0;
2701 return ret;
2704 xcb_void_cookie_t
2705 xcb_render_set_picture_transform_checked (xcb_connection_t *c /**< */,
2706 xcb_render_picture_t picture /**< */,
2707 xcb_render_transform_t transform /**< */)
2709 static const xcb_protocol_request_t xcb_req = {
2710 /* count */ 2,
2711 /* ext */ &xcb_render_id,
2712 /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM,
2713 /* isvoid */ 1
2716 struct iovec xcb_parts[4];
2717 xcb_void_cookie_t xcb_ret;
2718 xcb_render_set_picture_transform_request_t xcb_out;
2720 xcb_out.picture = picture;
2721 xcb_out.transform = transform;
2723 xcb_parts[2].iov_base = (char *) &xcb_out;
2724 xcb_parts[2].iov_len = sizeof(xcb_out);
2725 xcb_parts[3].iov_base = 0;
2726 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2728 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2729 return xcb_ret;
2732 xcb_void_cookie_t
2733 xcb_render_set_picture_transform (xcb_connection_t *c /**< */,
2734 xcb_render_picture_t picture /**< */,
2735 xcb_render_transform_t transform /**< */)
2737 static const xcb_protocol_request_t xcb_req = {
2738 /* count */ 2,
2739 /* ext */ &xcb_render_id,
2740 /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM,
2741 /* isvoid */ 1
2744 struct iovec xcb_parts[4];
2745 xcb_void_cookie_t xcb_ret;
2746 xcb_render_set_picture_transform_request_t xcb_out;
2748 xcb_out.picture = picture;
2749 xcb_out.transform = transform;
2751 xcb_parts[2].iov_base = (char *) &xcb_out;
2752 xcb_parts[2].iov_len = sizeof(xcb_out);
2753 xcb_parts[3].iov_base = 0;
2754 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2756 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2757 return xcb_ret;
2761 xcb_render_query_filters_sizeof (const void *_buffer /**< */)
2763 char *xcb_tmp = (char *)_buffer;
2764 const xcb_render_query_filters_reply_t *_aux = (xcb_render_query_filters_reply_t *)_buffer;
2765 unsigned int xcb_buffer_len = 0;
2766 unsigned int xcb_block_len = 0;
2767 unsigned int xcb_pad = 0;
2768 unsigned int xcb_align_to = 0;
2770 unsigned int i;
2771 unsigned int xcb_tmp_len;
2773 xcb_block_len += sizeof(xcb_render_query_filters_reply_t);
2774 xcb_tmp += xcb_block_len;
2775 xcb_buffer_len += xcb_block_len;
2776 xcb_block_len = 0;
2777 /* aliases */
2778 xcb_block_len += _aux->num_aliases * sizeof(uint16_t);
2779 xcb_tmp += xcb_block_len;
2780 xcb_align_to = ALIGNOF(uint16_t);
2781 /* insert padding */
2782 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2783 xcb_buffer_len += xcb_block_len + xcb_pad;
2784 if (0 != xcb_pad) {
2785 xcb_tmp += xcb_pad;
2786 xcb_pad = 0;
2788 xcb_block_len = 0;
2789 /* filters */
2790 for(i=0; i<_aux->num_filters; i++) {
2791 xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
2792 xcb_block_len += xcb_tmp_len;
2793 xcb_tmp += xcb_tmp_len;
2795 xcb_align_to = ALIGNOF(xcb_str_t);
2796 /* insert padding */
2797 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2798 xcb_buffer_len += xcb_block_len + xcb_pad;
2799 if (0 != xcb_pad) {
2800 xcb_tmp += xcb_pad;
2801 xcb_pad = 0;
2803 xcb_block_len = 0;
2805 return xcb_buffer_len;
2808 xcb_render_query_filters_cookie_t
2809 xcb_render_query_filters (xcb_connection_t *c /**< */,
2810 xcb_drawable_t drawable /**< */)
2812 static const xcb_protocol_request_t xcb_req = {
2813 /* count */ 2,
2814 /* ext */ &xcb_render_id,
2815 /* opcode */ XCB_RENDER_QUERY_FILTERS,
2816 /* isvoid */ 0
2819 struct iovec xcb_parts[4];
2820 xcb_render_query_filters_cookie_t xcb_ret;
2821 xcb_render_query_filters_request_t xcb_out;
2823 xcb_out.drawable = drawable;
2825 xcb_parts[2].iov_base = (char *) &xcb_out;
2826 xcb_parts[2].iov_len = sizeof(xcb_out);
2827 xcb_parts[3].iov_base = 0;
2828 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2830 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2831 return xcb_ret;
2834 xcb_render_query_filters_cookie_t
2835 xcb_render_query_filters_unchecked (xcb_connection_t *c /**< */,
2836 xcb_drawable_t drawable /**< */)
2838 static const xcb_protocol_request_t xcb_req = {
2839 /* count */ 2,
2840 /* ext */ &xcb_render_id,
2841 /* opcode */ XCB_RENDER_QUERY_FILTERS,
2842 /* isvoid */ 0
2845 struct iovec xcb_parts[4];
2846 xcb_render_query_filters_cookie_t xcb_ret;
2847 xcb_render_query_filters_request_t xcb_out;
2849 xcb_out.drawable = drawable;
2851 xcb_parts[2].iov_base = (char *) &xcb_out;
2852 xcb_parts[2].iov_len = sizeof(xcb_out);
2853 xcb_parts[3].iov_base = 0;
2854 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2856 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2857 return xcb_ret;
2860 uint16_t *
2861 xcb_render_query_filters_aliases (const xcb_render_query_filters_reply_t *R /**< */)
2863 return (uint16_t *) (R + 1);
2867 xcb_render_query_filters_aliases_length (const xcb_render_query_filters_reply_t *R /**< */)
2869 return R->num_aliases;
2872 xcb_generic_iterator_t
2873 xcb_render_query_filters_aliases_end (const xcb_render_query_filters_reply_t *R /**< */)
2875 xcb_generic_iterator_t i;
2876 i.data = ((uint16_t *) (R + 1)) + (R->num_aliases);
2877 i.rem = 0;
2878 i.index = (char *) i.data - (char *) R;
2879 return i;
2883 xcb_render_query_filters_filters_length (const xcb_render_query_filters_reply_t *R /**< */)
2885 return R->num_filters;
2888 xcb_str_iterator_t
2889 xcb_render_query_filters_filters_iterator (const xcb_render_query_filters_reply_t *R /**< */)
2891 xcb_str_iterator_t i;
2892 xcb_generic_iterator_t prev = xcb_render_query_filters_aliases_end(R);
2893 i.data = (xcb_str_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_str_t, prev.index));
2894 i.rem = R->num_filters;
2895 i.index = (char *) i.data - (char *) R;
2896 return i;
2899 xcb_render_query_filters_reply_t *
2900 xcb_render_query_filters_reply (xcb_connection_t *c /**< */,
2901 xcb_render_query_filters_cookie_t cookie /**< */,
2902 xcb_generic_error_t **e /**< */)
2904 return (xcb_render_query_filters_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2908 xcb_render_set_picture_filter_sizeof (const void *_buffer /**< */,
2909 uint32_t values_len /**< */)
2911 char *xcb_tmp = (char *)_buffer;
2912 const xcb_render_set_picture_filter_request_t *_aux = (xcb_render_set_picture_filter_request_t *)_buffer;
2913 unsigned int xcb_buffer_len = 0;
2914 unsigned int xcb_block_len = 0;
2915 unsigned int xcb_pad = 0;
2916 unsigned int xcb_align_to = 0;
2919 xcb_block_len += sizeof(xcb_render_set_picture_filter_request_t);
2920 xcb_tmp += xcb_block_len;
2921 xcb_buffer_len += xcb_block_len;
2922 xcb_block_len = 0;
2923 /* filter */
2924 xcb_block_len += _aux->filter_len * sizeof(char);
2925 xcb_tmp += xcb_block_len;
2926 xcb_align_to = ALIGNOF(char);
2927 /* insert padding */
2928 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2929 xcb_buffer_len += xcb_block_len + xcb_pad;
2930 if (0 != xcb_pad) {
2931 xcb_tmp += xcb_pad;
2932 xcb_pad = 0;
2934 xcb_block_len = 0;
2935 /* values */
2936 xcb_block_len += values_len * sizeof(xcb_render_fixed_t);
2937 xcb_tmp += xcb_block_len;
2938 xcb_align_to = ALIGNOF(xcb_render_fixed_t);
2939 /* insert padding */
2940 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2941 xcb_buffer_len += xcb_block_len + xcb_pad;
2942 if (0 != xcb_pad) {
2943 xcb_tmp += xcb_pad;
2944 xcb_pad = 0;
2946 xcb_block_len = 0;
2948 return xcb_buffer_len;
2951 xcb_void_cookie_t
2952 xcb_render_set_picture_filter_checked (xcb_connection_t *c /**< */,
2953 xcb_render_picture_t picture /**< */,
2954 uint16_t filter_len /**< */,
2955 const char *filter /**< */,
2956 uint32_t values_len /**< */,
2957 const xcb_render_fixed_t *values /**< */)
2959 static const xcb_protocol_request_t xcb_req = {
2960 /* count */ 6,
2961 /* ext */ &xcb_render_id,
2962 /* opcode */ XCB_RENDER_SET_PICTURE_FILTER,
2963 /* isvoid */ 1
2966 struct iovec xcb_parts[8];
2967 xcb_void_cookie_t xcb_ret;
2968 xcb_render_set_picture_filter_request_t xcb_out;
2970 xcb_out.picture = picture;
2971 xcb_out.filter_len = filter_len;
2972 memset(xcb_out.pad0, 0, 2);
2974 xcb_parts[2].iov_base = (char *) &xcb_out;
2975 xcb_parts[2].iov_len = sizeof(xcb_out);
2976 xcb_parts[3].iov_base = 0;
2977 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2978 /* char filter */
2979 xcb_parts[4].iov_base = (char *) filter;
2980 xcb_parts[4].iov_len = filter_len * sizeof(char);
2981 xcb_parts[5].iov_base = 0;
2982 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2983 /* xcb_render_fixed_t values */
2984 xcb_parts[6].iov_base = (char *) values;
2985 xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t);
2986 xcb_parts[7].iov_base = 0;
2987 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
2989 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2990 return xcb_ret;
2993 xcb_void_cookie_t
2994 xcb_render_set_picture_filter (xcb_connection_t *c /**< */,
2995 xcb_render_picture_t picture /**< */,
2996 uint16_t filter_len /**< */,
2997 const char *filter /**< */,
2998 uint32_t values_len /**< */,
2999 const xcb_render_fixed_t *values /**< */)
3001 static const xcb_protocol_request_t xcb_req = {
3002 /* count */ 6,
3003 /* ext */ &xcb_render_id,
3004 /* opcode */ XCB_RENDER_SET_PICTURE_FILTER,
3005 /* isvoid */ 1
3008 struct iovec xcb_parts[8];
3009 xcb_void_cookie_t xcb_ret;
3010 xcb_render_set_picture_filter_request_t xcb_out;
3012 xcb_out.picture = picture;
3013 xcb_out.filter_len = filter_len;
3014 memset(xcb_out.pad0, 0, 2);
3016 xcb_parts[2].iov_base = (char *) &xcb_out;
3017 xcb_parts[2].iov_len = sizeof(xcb_out);
3018 xcb_parts[3].iov_base = 0;
3019 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3020 /* char filter */
3021 xcb_parts[4].iov_base = (char *) filter;
3022 xcb_parts[4].iov_len = filter_len * sizeof(char);
3023 xcb_parts[5].iov_base = 0;
3024 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3025 /* xcb_render_fixed_t values */
3026 xcb_parts[6].iov_base = (char *) values;
3027 xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t);
3028 xcb_parts[7].iov_base = 0;
3029 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3031 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3032 return xcb_ret;
3035 void
3036 xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i /**< */)
3038 --i->rem;
3039 ++i->data;
3040 i->index += sizeof(xcb_render_animcursorelt_t);
3043 xcb_generic_iterator_t
3044 xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i /**< */)
3046 xcb_generic_iterator_t ret;
3047 ret.data = i.data + i.rem;
3048 ret.index = i.index + ((char *) ret.data - (char *) i.data);
3049 ret.rem = 0;
3050 return ret;
3054 xcb_render_create_anim_cursor_sizeof (const void *_buffer /**< */,
3055 uint32_t cursors_len /**< */)
3057 char *xcb_tmp = (char *)_buffer;
3058 unsigned int xcb_buffer_len = 0;
3059 unsigned int xcb_block_len = 0;
3060 unsigned int xcb_pad = 0;
3061 unsigned int xcb_align_to = 0;
3064 xcb_block_len += sizeof(xcb_render_create_anim_cursor_request_t);
3065 xcb_tmp += xcb_block_len;
3066 xcb_buffer_len += xcb_block_len;
3067 xcb_block_len = 0;
3068 /* cursors */
3069 xcb_block_len += cursors_len * sizeof(xcb_render_animcursorelt_t);
3070 xcb_tmp += xcb_block_len;
3071 xcb_align_to = ALIGNOF(xcb_render_animcursorelt_t);
3072 /* insert padding */
3073 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3074 xcb_buffer_len += xcb_block_len + xcb_pad;
3075 if (0 != xcb_pad) {
3076 xcb_tmp += xcb_pad;
3077 xcb_pad = 0;
3079 xcb_block_len = 0;
3081 return xcb_buffer_len;
3084 xcb_void_cookie_t
3085 xcb_render_create_anim_cursor_checked (xcb_connection_t *c /**< */,
3086 xcb_cursor_t cid /**< */,
3087 uint32_t cursors_len /**< */,
3088 const xcb_render_animcursorelt_t *cursors /**< */)
3090 static const xcb_protocol_request_t xcb_req = {
3091 /* count */ 4,
3092 /* ext */ &xcb_render_id,
3093 /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR,
3094 /* isvoid */ 1
3097 struct iovec xcb_parts[6];
3098 xcb_void_cookie_t xcb_ret;
3099 xcb_render_create_anim_cursor_request_t xcb_out;
3101 xcb_out.cid = cid;
3103 xcb_parts[2].iov_base = (char *) &xcb_out;
3104 xcb_parts[2].iov_len = sizeof(xcb_out);
3105 xcb_parts[3].iov_base = 0;
3106 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3107 /* xcb_render_animcursorelt_t cursors */
3108 xcb_parts[4].iov_base = (char *) cursors;
3109 xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t);
3110 xcb_parts[5].iov_base = 0;
3111 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3113 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3114 return xcb_ret;
3117 xcb_void_cookie_t
3118 xcb_render_create_anim_cursor (xcb_connection_t *c /**< */,
3119 xcb_cursor_t cid /**< */,
3120 uint32_t cursors_len /**< */,
3121 const xcb_render_animcursorelt_t *cursors /**< */)
3123 static const xcb_protocol_request_t xcb_req = {
3124 /* count */ 4,
3125 /* ext */ &xcb_render_id,
3126 /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR,
3127 /* isvoid */ 1
3130 struct iovec xcb_parts[6];
3131 xcb_void_cookie_t xcb_ret;
3132 xcb_render_create_anim_cursor_request_t xcb_out;
3134 xcb_out.cid = cid;
3136 xcb_parts[2].iov_base = (char *) &xcb_out;
3137 xcb_parts[2].iov_len = sizeof(xcb_out);
3138 xcb_parts[3].iov_base = 0;
3139 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3140 /* xcb_render_animcursorelt_t cursors */
3141 xcb_parts[4].iov_base = (char *) cursors;
3142 xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t);
3143 xcb_parts[5].iov_base = 0;
3144 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3146 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3147 return xcb_ret;
3150 void
3151 xcb_render_spanfix_next (xcb_render_spanfix_iterator_t *i /**< */)
3153 --i->rem;
3154 ++i->data;
3155 i->index += sizeof(xcb_render_spanfix_t);
3158 xcb_generic_iterator_t
3159 xcb_render_spanfix_end (xcb_render_spanfix_iterator_t i /**< */)
3161 xcb_generic_iterator_t ret;
3162 ret.data = i.data + i.rem;
3163 ret.index = i.index + ((char *) ret.data - (char *) i.data);
3164 ret.rem = 0;
3165 return ret;
3168 void
3169 xcb_render_trap_next (xcb_render_trap_iterator_t *i /**< */)
3171 --i->rem;
3172 ++i->data;
3173 i->index += sizeof(xcb_render_trap_t);
3176 xcb_generic_iterator_t
3177 xcb_render_trap_end (xcb_render_trap_iterator_t i /**< */)
3179 xcb_generic_iterator_t ret;
3180 ret.data = i.data + i.rem;
3181 ret.index = i.index + ((char *) ret.data - (char *) i.data);
3182 ret.rem = 0;
3183 return ret;
3187 xcb_render_add_traps_sizeof (const void *_buffer /**< */,
3188 uint32_t traps_len /**< */)
3190 char *xcb_tmp = (char *)_buffer;
3191 unsigned int xcb_buffer_len = 0;
3192 unsigned int xcb_block_len = 0;
3193 unsigned int xcb_pad = 0;
3194 unsigned int xcb_align_to = 0;
3197 xcb_block_len += sizeof(xcb_render_add_traps_request_t);
3198 xcb_tmp += xcb_block_len;
3199 xcb_buffer_len += xcb_block_len;
3200 xcb_block_len = 0;
3201 /* traps */
3202 xcb_block_len += traps_len * sizeof(xcb_render_trap_t);
3203 xcb_tmp += xcb_block_len;
3204 xcb_align_to = ALIGNOF(xcb_render_trap_t);
3205 /* insert padding */
3206 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3207 xcb_buffer_len += xcb_block_len + xcb_pad;
3208 if (0 != xcb_pad) {
3209 xcb_tmp += xcb_pad;
3210 xcb_pad = 0;
3212 xcb_block_len = 0;
3214 return xcb_buffer_len;
3217 xcb_void_cookie_t
3218 xcb_render_add_traps_checked (xcb_connection_t *c /**< */,
3219 xcb_render_picture_t picture /**< */,
3220 int16_t x_off /**< */,
3221 int16_t y_off /**< */,
3222 uint32_t traps_len /**< */,
3223 const xcb_render_trap_t *traps /**< */)
3225 static const xcb_protocol_request_t xcb_req = {
3226 /* count */ 4,
3227 /* ext */ &xcb_render_id,
3228 /* opcode */ XCB_RENDER_ADD_TRAPS,
3229 /* isvoid */ 1
3232 struct iovec xcb_parts[6];
3233 xcb_void_cookie_t xcb_ret;
3234 xcb_render_add_traps_request_t xcb_out;
3236 xcb_out.picture = picture;
3237 xcb_out.x_off = x_off;
3238 xcb_out.y_off = y_off;
3240 xcb_parts[2].iov_base = (char *) &xcb_out;
3241 xcb_parts[2].iov_len = sizeof(xcb_out);
3242 xcb_parts[3].iov_base = 0;
3243 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3244 /* xcb_render_trap_t traps */
3245 xcb_parts[4].iov_base = (char *) traps;
3246 xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t);
3247 xcb_parts[5].iov_base = 0;
3248 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3250 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3251 return xcb_ret;
3254 xcb_void_cookie_t
3255 xcb_render_add_traps (xcb_connection_t *c /**< */,
3256 xcb_render_picture_t picture /**< */,
3257 int16_t x_off /**< */,
3258 int16_t y_off /**< */,
3259 uint32_t traps_len /**< */,
3260 const xcb_render_trap_t *traps /**< */)
3262 static const xcb_protocol_request_t xcb_req = {
3263 /* count */ 4,
3264 /* ext */ &xcb_render_id,
3265 /* opcode */ XCB_RENDER_ADD_TRAPS,
3266 /* isvoid */ 1
3269 struct iovec xcb_parts[6];
3270 xcb_void_cookie_t xcb_ret;
3271 xcb_render_add_traps_request_t xcb_out;
3273 xcb_out.picture = picture;
3274 xcb_out.x_off = x_off;
3275 xcb_out.y_off = y_off;
3277 xcb_parts[2].iov_base = (char *) &xcb_out;
3278 xcb_parts[2].iov_len = sizeof(xcb_out);
3279 xcb_parts[3].iov_base = 0;
3280 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3281 /* xcb_render_trap_t traps */
3282 xcb_parts[4].iov_base = (char *) traps;
3283 xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t);
3284 xcb_parts[5].iov_base = 0;
3285 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3287 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3288 return xcb_ret;
3291 xcb_void_cookie_t
3292 xcb_render_create_solid_fill_checked (xcb_connection_t *c /**< */,
3293 xcb_render_picture_t picture /**< */,
3294 xcb_render_color_t color /**< */)
3296 static const xcb_protocol_request_t xcb_req = {
3297 /* count */ 2,
3298 /* ext */ &xcb_render_id,
3299 /* opcode */ XCB_RENDER_CREATE_SOLID_FILL,
3300 /* isvoid */ 1
3303 struct iovec xcb_parts[4];
3304 xcb_void_cookie_t xcb_ret;
3305 xcb_render_create_solid_fill_request_t xcb_out;
3307 xcb_out.picture = picture;
3308 xcb_out.color = color;
3310 xcb_parts[2].iov_base = (char *) &xcb_out;
3311 xcb_parts[2].iov_len = sizeof(xcb_out);
3312 xcb_parts[3].iov_base = 0;
3313 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3315 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3316 return xcb_ret;
3319 xcb_void_cookie_t
3320 xcb_render_create_solid_fill (xcb_connection_t *c /**< */,
3321 xcb_render_picture_t picture /**< */,
3322 xcb_render_color_t color /**< */)
3324 static const xcb_protocol_request_t xcb_req = {
3325 /* count */ 2,
3326 /* ext */ &xcb_render_id,
3327 /* opcode */ XCB_RENDER_CREATE_SOLID_FILL,
3328 /* isvoid */ 1
3331 struct iovec xcb_parts[4];
3332 xcb_void_cookie_t xcb_ret;
3333 xcb_render_create_solid_fill_request_t xcb_out;
3335 xcb_out.picture = picture;
3336 xcb_out.color = color;
3338 xcb_parts[2].iov_base = (char *) &xcb_out;
3339 xcb_parts[2].iov_len = sizeof(xcb_out);
3340 xcb_parts[3].iov_base = 0;
3341 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3343 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3344 return xcb_ret;
3348 xcb_render_create_linear_gradient_sizeof (const void *_buffer /**< */)
3350 char *xcb_tmp = (char *)_buffer;
3351 const xcb_render_create_linear_gradient_request_t *_aux = (xcb_render_create_linear_gradient_request_t *)_buffer;
3352 unsigned int xcb_buffer_len = 0;
3353 unsigned int xcb_block_len = 0;
3354 unsigned int xcb_pad = 0;
3355 unsigned int xcb_align_to = 0;
3358 xcb_block_len += sizeof(xcb_render_create_linear_gradient_request_t);
3359 xcb_tmp += xcb_block_len;
3360 xcb_buffer_len += xcb_block_len;
3361 xcb_block_len = 0;
3362 /* stops */
3363 xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
3364 xcb_tmp += xcb_block_len;
3365 xcb_align_to = ALIGNOF(xcb_render_fixed_t);
3366 /* insert padding */
3367 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3368 xcb_buffer_len += xcb_block_len + xcb_pad;
3369 if (0 != xcb_pad) {
3370 xcb_tmp += xcb_pad;
3371 xcb_pad = 0;
3373 xcb_block_len = 0;
3374 /* colors */
3375 xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
3376 xcb_tmp += xcb_block_len;
3377 xcb_align_to = ALIGNOF(xcb_render_color_t);
3378 /* insert padding */
3379 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3380 xcb_buffer_len += xcb_block_len + xcb_pad;
3381 if (0 != xcb_pad) {
3382 xcb_tmp += xcb_pad;
3383 xcb_pad = 0;
3385 xcb_block_len = 0;
3387 return xcb_buffer_len;
3390 xcb_void_cookie_t
3391 xcb_render_create_linear_gradient_checked (xcb_connection_t *c /**< */,
3392 xcb_render_picture_t picture /**< */,
3393 xcb_render_pointfix_t p1 /**< */,
3394 xcb_render_pointfix_t p2 /**< */,
3395 uint32_t num_stops /**< */,
3396 const xcb_render_fixed_t *stops /**< */,
3397 const xcb_render_color_t *colors /**< */)
3399 static const xcb_protocol_request_t xcb_req = {
3400 /* count */ 6,
3401 /* ext */ &xcb_render_id,
3402 /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT,
3403 /* isvoid */ 1
3406 struct iovec xcb_parts[8];
3407 xcb_void_cookie_t xcb_ret;
3408 xcb_render_create_linear_gradient_request_t xcb_out;
3410 xcb_out.picture = picture;
3411 xcb_out.p1 = p1;
3412 xcb_out.p2 = p2;
3413 xcb_out.num_stops = num_stops;
3415 xcb_parts[2].iov_base = (char *) &xcb_out;
3416 xcb_parts[2].iov_len = sizeof(xcb_out);
3417 xcb_parts[3].iov_base = 0;
3418 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3419 /* xcb_render_fixed_t stops */
3420 xcb_parts[4].iov_base = (char *) stops;
3421 xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3422 xcb_parts[5].iov_base = 0;
3423 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3424 /* xcb_render_color_t colors */
3425 xcb_parts[6].iov_base = (char *) colors;
3426 xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3427 xcb_parts[7].iov_base = 0;
3428 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3430 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3431 return xcb_ret;
3434 xcb_void_cookie_t
3435 xcb_render_create_linear_gradient (xcb_connection_t *c /**< */,
3436 xcb_render_picture_t picture /**< */,
3437 xcb_render_pointfix_t p1 /**< */,
3438 xcb_render_pointfix_t p2 /**< */,
3439 uint32_t num_stops /**< */,
3440 const xcb_render_fixed_t *stops /**< */,
3441 const xcb_render_color_t *colors /**< */)
3443 static const xcb_protocol_request_t xcb_req = {
3444 /* count */ 6,
3445 /* ext */ &xcb_render_id,
3446 /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT,
3447 /* isvoid */ 1
3450 struct iovec xcb_parts[8];
3451 xcb_void_cookie_t xcb_ret;
3452 xcb_render_create_linear_gradient_request_t xcb_out;
3454 xcb_out.picture = picture;
3455 xcb_out.p1 = p1;
3456 xcb_out.p2 = p2;
3457 xcb_out.num_stops = num_stops;
3459 xcb_parts[2].iov_base = (char *) &xcb_out;
3460 xcb_parts[2].iov_len = sizeof(xcb_out);
3461 xcb_parts[3].iov_base = 0;
3462 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3463 /* xcb_render_fixed_t stops */
3464 xcb_parts[4].iov_base = (char *) stops;
3465 xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3466 xcb_parts[5].iov_base = 0;
3467 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3468 /* xcb_render_color_t colors */
3469 xcb_parts[6].iov_base = (char *) colors;
3470 xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3471 xcb_parts[7].iov_base = 0;
3472 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3474 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3475 return xcb_ret;
3479 xcb_render_create_radial_gradient_sizeof (const void *_buffer /**< */)
3481 char *xcb_tmp = (char *)_buffer;
3482 const xcb_render_create_radial_gradient_request_t *_aux = (xcb_render_create_radial_gradient_request_t *)_buffer;
3483 unsigned int xcb_buffer_len = 0;
3484 unsigned int xcb_block_len = 0;
3485 unsigned int xcb_pad = 0;
3486 unsigned int xcb_align_to = 0;
3489 xcb_block_len += sizeof(xcb_render_create_radial_gradient_request_t);
3490 xcb_tmp += xcb_block_len;
3491 xcb_buffer_len += xcb_block_len;
3492 xcb_block_len = 0;
3493 /* stops */
3494 xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
3495 xcb_tmp += xcb_block_len;
3496 xcb_align_to = ALIGNOF(xcb_render_fixed_t);
3497 /* insert padding */
3498 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3499 xcb_buffer_len += xcb_block_len + xcb_pad;
3500 if (0 != xcb_pad) {
3501 xcb_tmp += xcb_pad;
3502 xcb_pad = 0;
3504 xcb_block_len = 0;
3505 /* colors */
3506 xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
3507 xcb_tmp += xcb_block_len;
3508 xcb_align_to = ALIGNOF(xcb_render_color_t);
3509 /* insert padding */
3510 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3511 xcb_buffer_len += xcb_block_len + xcb_pad;
3512 if (0 != xcb_pad) {
3513 xcb_tmp += xcb_pad;
3514 xcb_pad = 0;
3516 xcb_block_len = 0;
3518 return xcb_buffer_len;
3521 xcb_void_cookie_t
3522 xcb_render_create_radial_gradient_checked (xcb_connection_t *c /**< */,
3523 xcb_render_picture_t picture /**< */,
3524 xcb_render_pointfix_t inner /**< */,
3525 xcb_render_pointfix_t outer /**< */,
3526 xcb_render_fixed_t inner_radius /**< */,
3527 xcb_render_fixed_t outer_radius /**< */,
3528 uint32_t num_stops /**< */,
3529 const xcb_render_fixed_t *stops /**< */,
3530 const xcb_render_color_t *colors /**< */)
3532 static const xcb_protocol_request_t xcb_req = {
3533 /* count */ 6,
3534 /* ext */ &xcb_render_id,
3535 /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT,
3536 /* isvoid */ 1
3539 struct iovec xcb_parts[8];
3540 xcb_void_cookie_t xcb_ret;
3541 xcb_render_create_radial_gradient_request_t xcb_out;
3543 xcb_out.picture = picture;
3544 xcb_out.inner = inner;
3545 xcb_out.outer = outer;
3546 xcb_out.inner_radius = inner_radius;
3547 xcb_out.outer_radius = outer_radius;
3548 xcb_out.num_stops = num_stops;
3550 xcb_parts[2].iov_base = (char *) &xcb_out;
3551 xcb_parts[2].iov_len = sizeof(xcb_out);
3552 xcb_parts[3].iov_base = 0;
3553 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3554 /* xcb_render_fixed_t stops */
3555 xcb_parts[4].iov_base = (char *) stops;
3556 xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3557 xcb_parts[5].iov_base = 0;
3558 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3559 /* xcb_render_color_t colors */
3560 xcb_parts[6].iov_base = (char *) colors;
3561 xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3562 xcb_parts[7].iov_base = 0;
3563 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3565 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3566 return xcb_ret;
3569 xcb_void_cookie_t
3570 xcb_render_create_radial_gradient (xcb_connection_t *c /**< */,
3571 xcb_render_picture_t picture /**< */,
3572 xcb_render_pointfix_t inner /**< */,
3573 xcb_render_pointfix_t outer /**< */,
3574 xcb_render_fixed_t inner_radius /**< */,
3575 xcb_render_fixed_t outer_radius /**< */,
3576 uint32_t num_stops /**< */,
3577 const xcb_render_fixed_t *stops /**< */,
3578 const xcb_render_color_t *colors /**< */)
3580 static const xcb_protocol_request_t xcb_req = {
3581 /* count */ 6,
3582 /* ext */ &xcb_render_id,
3583 /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT,
3584 /* isvoid */ 1
3587 struct iovec xcb_parts[8];
3588 xcb_void_cookie_t xcb_ret;
3589 xcb_render_create_radial_gradient_request_t xcb_out;
3591 xcb_out.picture = picture;
3592 xcb_out.inner = inner;
3593 xcb_out.outer = outer;
3594 xcb_out.inner_radius = inner_radius;
3595 xcb_out.outer_radius = outer_radius;
3596 xcb_out.num_stops = num_stops;
3598 xcb_parts[2].iov_base = (char *) &xcb_out;
3599 xcb_parts[2].iov_len = sizeof(xcb_out);
3600 xcb_parts[3].iov_base = 0;
3601 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3602 /* xcb_render_fixed_t stops */
3603 xcb_parts[4].iov_base = (char *) stops;
3604 xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3605 xcb_parts[5].iov_base = 0;
3606 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3607 /* xcb_render_color_t colors */
3608 xcb_parts[6].iov_base = (char *) colors;
3609 xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3610 xcb_parts[7].iov_base = 0;
3611 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3613 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3614 return xcb_ret;
3618 xcb_render_create_conical_gradient_sizeof (const void *_buffer /**< */)
3620 char *xcb_tmp = (char *)_buffer;
3621 const xcb_render_create_conical_gradient_request_t *_aux = (xcb_render_create_conical_gradient_request_t *)_buffer;
3622 unsigned int xcb_buffer_len = 0;
3623 unsigned int xcb_block_len = 0;
3624 unsigned int xcb_pad = 0;
3625 unsigned int xcb_align_to = 0;
3628 xcb_block_len += sizeof(xcb_render_create_conical_gradient_request_t);
3629 xcb_tmp += xcb_block_len;
3630 xcb_buffer_len += xcb_block_len;
3631 xcb_block_len = 0;
3632 /* stops */
3633 xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
3634 xcb_tmp += xcb_block_len;
3635 xcb_align_to = ALIGNOF(xcb_render_fixed_t);
3636 /* insert padding */
3637 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3638 xcb_buffer_len += xcb_block_len + xcb_pad;
3639 if (0 != xcb_pad) {
3640 xcb_tmp += xcb_pad;
3641 xcb_pad = 0;
3643 xcb_block_len = 0;
3644 /* colors */
3645 xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
3646 xcb_tmp += xcb_block_len;
3647 xcb_align_to = ALIGNOF(xcb_render_color_t);
3648 /* insert padding */
3649 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3650 xcb_buffer_len += xcb_block_len + xcb_pad;
3651 if (0 != xcb_pad) {
3652 xcb_tmp += xcb_pad;
3653 xcb_pad = 0;
3655 xcb_block_len = 0;
3657 return xcb_buffer_len;
3660 xcb_void_cookie_t
3661 xcb_render_create_conical_gradient_checked (xcb_connection_t *c /**< */,
3662 xcb_render_picture_t picture /**< */,
3663 xcb_render_pointfix_t center /**< */,
3664 xcb_render_fixed_t angle /**< */,
3665 uint32_t num_stops /**< */,
3666 const xcb_render_fixed_t *stops /**< */,
3667 const xcb_render_color_t *colors /**< */)
3669 static const xcb_protocol_request_t xcb_req = {
3670 /* count */ 6,
3671 /* ext */ &xcb_render_id,
3672 /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT,
3673 /* isvoid */ 1
3676 struct iovec xcb_parts[8];
3677 xcb_void_cookie_t xcb_ret;
3678 xcb_render_create_conical_gradient_request_t xcb_out;
3680 xcb_out.picture = picture;
3681 xcb_out.center = center;
3682 xcb_out.angle = angle;
3683 xcb_out.num_stops = num_stops;
3685 xcb_parts[2].iov_base = (char *) &xcb_out;
3686 xcb_parts[2].iov_len = sizeof(xcb_out);
3687 xcb_parts[3].iov_base = 0;
3688 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3689 /* xcb_render_fixed_t stops */
3690 xcb_parts[4].iov_base = (char *) stops;
3691 xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3692 xcb_parts[5].iov_base = 0;
3693 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3694 /* xcb_render_color_t colors */
3695 xcb_parts[6].iov_base = (char *) colors;
3696 xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3697 xcb_parts[7].iov_base = 0;
3698 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3700 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3701 return xcb_ret;
3704 xcb_void_cookie_t
3705 xcb_render_create_conical_gradient (xcb_connection_t *c /**< */,
3706 xcb_render_picture_t picture /**< */,
3707 xcb_render_pointfix_t center /**< */,
3708 xcb_render_fixed_t angle /**< */,
3709 uint32_t num_stops /**< */,
3710 const xcb_render_fixed_t *stops /**< */,
3711 const xcb_render_color_t *colors /**< */)
3713 static const xcb_protocol_request_t xcb_req = {
3714 /* count */ 6,
3715 /* ext */ &xcb_render_id,
3716 /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT,
3717 /* isvoid */ 1
3720 struct iovec xcb_parts[8];
3721 xcb_void_cookie_t xcb_ret;
3722 xcb_render_create_conical_gradient_request_t xcb_out;
3724 xcb_out.picture = picture;
3725 xcb_out.center = center;
3726 xcb_out.angle = angle;
3727 xcb_out.num_stops = num_stops;
3729 xcb_parts[2].iov_base = (char *) &xcb_out;
3730 xcb_parts[2].iov_len = sizeof(xcb_out);
3731 xcb_parts[3].iov_base = 0;
3732 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3733 /* xcb_render_fixed_t stops */
3734 xcb_parts[4].iov_base = (char *) stops;
3735 xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3736 xcb_parts[5].iov_base = 0;
3737 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3738 /* xcb_render_color_t colors */
3739 xcb_parts[6].iov_base = (char *) colors;
3740 xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3741 xcb_parts[7].iov_base = 0;
3742 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3744 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3745 return xcb_ret;