xref: /netbsd-src/external/mit/xorg/lib/libxcb/files/render.c (revision b7b7574d3bf8eeb51a1fa3977b59142ec6434a55)
1 /*
2  * This file generated automatically from render.xml by c_client.py.
3  * Edit at your peril.
4  */
5 
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"
15 
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
18 
19 xcb_extension_t xcb_render_id = { "RENDER", 0 };
20 
21 
22 /*****************************************************************************
23  **
24  ** void xcb_render_glyph_next
25  **
26  ** @param xcb_render_glyph_iterator_t *i
27  ** @returns void
28  **
29  *****************************************************************************/
30 
31 void
32 xcb_render_glyph_next (xcb_render_glyph_iterator_t *i  /**< */)
33 {
34     --i->rem;
35     ++i->data;
36     i->index += sizeof(xcb_render_glyph_t);
37 }
38 
39 
40 /*****************************************************************************
41  **
42  ** xcb_generic_iterator_t xcb_render_glyph_end
43  **
44  ** @param xcb_render_glyph_iterator_t i
45  ** @returns xcb_generic_iterator_t
46  **
47  *****************************************************************************/
48 
49 xcb_generic_iterator_t
50 xcb_render_glyph_end (xcb_render_glyph_iterator_t i  /**< */)
51 {
52     xcb_generic_iterator_t ret;
53     ret.data = i.data + i.rem;
54     ret.index = i.index + ((char *) ret.data - (char *) i.data);
55     ret.rem = 0;
56     return ret;
57 }
58 
59 
60 /*****************************************************************************
61  **
62  ** void xcb_render_glyphset_next
63  **
64  ** @param xcb_render_glyphset_iterator_t *i
65  ** @returns void
66  **
67  *****************************************************************************/
68 
69 void
70 xcb_render_glyphset_next (xcb_render_glyphset_iterator_t *i  /**< */)
71 {
72     --i->rem;
73     ++i->data;
74     i->index += sizeof(xcb_render_glyphset_t);
75 }
76 
77 
78 /*****************************************************************************
79  **
80  ** xcb_generic_iterator_t xcb_render_glyphset_end
81  **
82  ** @param xcb_render_glyphset_iterator_t i
83  ** @returns xcb_generic_iterator_t
84  **
85  *****************************************************************************/
86 
87 xcb_generic_iterator_t
88 xcb_render_glyphset_end (xcb_render_glyphset_iterator_t i  /**< */)
89 {
90     xcb_generic_iterator_t ret;
91     ret.data = i.data + i.rem;
92     ret.index = i.index + ((char *) ret.data - (char *) i.data);
93     ret.rem = 0;
94     return ret;
95 }
96 
97 
98 /*****************************************************************************
99  **
100  ** void xcb_render_picture_next
101  **
102  ** @param xcb_render_picture_iterator_t *i
103  ** @returns void
104  **
105  *****************************************************************************/
106 
107 void
108 xcb_render_picture_next (xcb_render_picture_iterator_t *i  /**< */)
109 {
110     --i->rem;
111     ++i->data;
112     i->index += sizeof(xcb_render_picture_t);
113 }
114 
115 
116 /*****************************************************************************
117  **
118  ** xcb_generic_iterator_t xcb_render_picture_end
119  **
120  ** @param xcb_render_picture_iterator_t i
121  ** @returns xcb_generic_iterator_t
122  **
123  *****************************************************************************/
124 
125 xcb_generic_iterator_t
126 xcb_render_picture_end (xcb_render_picture_iterator_t i  /**< */)
127 {
128     xcb_generic_iterator_t ret;
129     ret.data = i.data + i.rem;
130     ret.index = i.index + ((char *) ret.data - (char *) i.data);
131     ret.rem = 0;
132     return ret;
133 }
134 
135 
136 /*****************************************************************************
137  **
138  ** void xcb_render_pictformat_next
139  **
140  ** @param xcb_render_pictformat_iterator_t *i
141  ** @returns void
142  **
143  *****************************************************************************/
144 
145 void
146 xcb_render_pictformat_next (xcb_render_pictformat_iterator_t *i  /**< */)
147 {
148     --i->rem;
149     ++i->data;
150     i->index += sizeof(xcb_render_pictformat_t);
151 }
152 
153 
154 /*****************************************************************************
155  **
156  ** xcb_generic_iterator_t xcb_render_pictformat_end
157  **
158  ** @param xcb_render_pictformat_iterator_t i
159  ** @returns xcb_generic_iterator_t
160  **
161  *****************************************************************************/
162 
163 xcb_generic_iterator_t
164 xcb_render_pictformat_end (xcb_render_pictformat_iterator_t i  /**< */)
165 {
166     xcb_generic_iterator_t ret;
167     ret.data = i.data + i.rem;
168     ret.index = i.index + ((char *) ret.data - (char *) i.data);
169     ret.rem = 0;
170     return ret;
171 }
172 
173 
174 /*****************************************************************************
175  **
176  ** void xcb_render_fixed_next
177  **
178  ** @param xcb_render_fixed_iterator_t *i
179  ** @returns void
180  **
181  *****************************************************************************/
182 
183 void
184 xcb_render_fixed_next (xcb_render_fixed_iterator_t *i  /**< */)
185 {
186     --i->rem;
187     ++i->data;
188     i->index += sizeof(xcb_render_fixed_t);
189 }
190 
191 
192 /*****************************************************************************
193  **
194  ** xcb_generic_iterator_t xcb_render_fixed_end
195  **
196  ** @param xcb_render_fixed_iterator_t i
197  ** @returns xcb_generic_iterator_t
198  **
199  *****************************************************************************/
200 
201 xcb_generic_iterator_t
202 xcb_render_fixed_end (xcb_render_fixed_iterator_t i  /**< */)
203 {
204     xcb_generic_iterator_t ret;
205     ret.data = i.data + i.rem;
206     ret.index = i.index + ((char *) ret.data - (char *) i.data);
207     ret.rem = 0;
208     return ret;
209 }
210 
211 
212 /*****************************************************************************
213  **
214  ** void xcb_render_directformat_next
215  **
216  ** @param xcb_render_directformat_iterator_t *i
217  ** @returns void
218  **
219  *****************************************************************************/
220 
221 void
222 xcb_render_directformat_next (xcb_render_directformat_iterator_t *i  /**< */)
223 {
224     --i->rem;
225     ++i->data;
226     i->index += sizeof(xcb_render_directformat_t);
227 }
228 
229 
230 /*****************************************************************************
231  **
232  ** xcb_generic_iterator_t xcb_render_directformat_end
233  **
234  ** @param xcb_render_directformat_iterator_t i
235  ** @returns xcb_generic_iterator_t
236  **
237  *****************************************************************************/
238 
239 xcb_generic_iterator_t
240 xcb_render_directformat_end (xcb_render_directformat_iterator_t i  /**< */)
241 {
242     xcb_generic_iterator_t ret;
243     ret.data = i.data + i.rem;
244     ret.index = i.index + ((char *) ret.data - (char *) i.data);
245     ret.rem = 0;
246     return ret;
247 }
248 
249 
250 /*****************************************************************************
251  **
252  ** void xcb_render_pictforminfo_next
253  **
254  ** @param xcb_render_pictforminfo_iterator_t *i
255  ** @returns void
256  **
257  *****************************************************************************/
258 
259 void
260 xcb_render_pictforminfo_next (xcb_render_pictforminfo_iterator_t *i  /**< */)
261 {
262     --i->rem;
263     ++i->data;
264     i->index += sizeof(xcb_render_pictforminfo_t);
265 }
266 
267 
268 /*****************************************************************************
269  **
270  ** xcb_generic_iterator_t xcb_render_pictforminfo_end
271  **
272  ** @param xcb_render_pictforminfo_iterator_t i
273  ** @returns xcb_generic_iterator_t
274  **
275  *****************************************************************************/
276 
277 xcb_generic_iterator_t
278 xcb_render_pictforminfo_end (xcb_render_pictforminfo_iterator_t i  /**< */)
279 {
280     xcb_generic_iterator_t ret;
281     ret.data = i.data + i.rem;
282     ret.index = i.index + ((char *) ret.data - (char *) i.data);
283     ret.rem = 0;
284     return ret;
285 }
286 
287 
288 /*****************************************************************************
289  **
290  ** void xcb_render_pictvisual_next
291  **
292  ** @param xcb_render_pictvisual_iterator_t *i
293  ** @returns void
294  **
295  *****************************************************************************/
296 
297 void
298 xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i  /**< */)
299 {
300     --i->rem;
301     ++i->data;
302     i->index += sizeof(xcb_render_pictvisual_t);
303 }
304 
305 
306 /*****************************************************************************
307  **
308  ** xcb_generic_iterator_t xcb_render_pictvisual_end
309  **
310  ** @param xcb_render_pictvisual_iterator_t i
311  ** @returns xcb_generic_iterator_t
312  **
313  *****************************************************************************/
314 
315 xcb_generic_iterator_t
316 xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i  /**< */)
317 {
318     xcb_generic_iterator_t ret;
319     ret.data = i.data + i.rem;
320     ret.index = i.index + ((char *) ret.data - (char *) i.data);
321     ret.rem = 0;
322     return ret;
323 }
324 
325 int
326 xcb_render_pictdepth_sizeof (const void  *_buffer  /**< */)
327 {
328     char *xcb_tmp = (char *)_buffer;
329     const xcb_render_pictdepth_t *_aux = (xcb_render_pictdepth_t *)_buffer;
330     unsigned int xcb_buffer_len = 0;
331     unsigned int xcb_block_len = 0;
332     unsigned int xcb_pad = 0;
333     unsigned int xcb_align_to = 0;
334 
335 
336     xcb_block_len += sizeof(xcb_render_pictdepth_t);
337     xcb_tmp += xcb_block_len;
338     xcb_buffer_len += xcb_block_len;
339     xcb_block_len = 0;
340     /* visuals */
341     xcb_block_len += _aux->num_visuals * sizeof(xcb_render_pictvisual_t);
342     xcb_tmp += xcb_block_len;
343     xcb_align_to = ALIGNOF(xcb_render_pictvisual_t);
344     /* insert padding */
345     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
346     xcb_buffer_len += xcb_block_len + xcb_pad;
347     if (0 != xcb_pad) {
348         xcb_tmp += xcb_pad;
349         xcb_pad = 0;
350     }
351     xcb_block_len = 0;
352 
353     return xcb_buffer_len;
354 }
355 
356 
357 /*****************************************************************************
358  **
359  ** xcb_render_pictvisual_t * xcb_render_pictdepth_visuals
360  **
361  ** @param const xcb_render_pictdepth_t *R
362  ** @returns xcb_render_pictvisual_t *
363  **
364  *****************************************************************************/
365 
366 xcb_render_pictvisual_t *
367 xcb_render_pictdepth_visuals (const xcb_render_pictdepth_t *R  /**< */)
368 {
369     return (xcb_render_pictvisual_t *) (R + 1);
370 }
371 
372 
373 /*****************************************************************************
374  **
375  ** int xcb_render_pictdepth_visuals_length
376  **
377  ** @param const xcb_render_pictdepth_t *R
378  ** @returns int
379  **
380  *****************************************************************************/
381 
382 int
383 xcb_render_pictdepth_visuals_length (const xcb_render_pictdepth_t *R  /**< */)
384 {
385     return R->num_visuals;
386 }
387 
388 
389 /*****************************************************************************
390  **
391  ** xcb_render_pictvisual_iterator_t xcb_render_pictdepth_visuals_iterator
392  **
393  ** @param const xcb_render_pictdepth_t *R
394  ** @returns xcb_render_pictvisual_iterator_t
395  **
396  *****************************************************************************/
397 
398 xcb_render_pictvisual_iterator_t
399 xcb_render_pictdepth_visuals_iterator (const xcb_render_pictdepth_t *R  /**< */)
400 {
401     xcb_render_pictvisual_iterator_t i;
402     i.data = (xcb_render_pictvisual_t *) (R + 1);
403     i.rem = R->num_visuals;
404     i.index = (char *) i.data - (char *) R;
405     return i;
406 }
407 
408 
409 /*****************************************************************************
410  **
411  ** void xcb_render_pictdepth_next
412  **
413  ** @param xcb_render_pictdepth_iterator_t *i
414  ** @returns void
415  **
416  *****************************************************************************/
417 
418 void
419 xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i  /**< */)
420 {
421     xcb_render_pictdepth_t *R = i->data;
422     xcb_generic_iterator_t child;
423     child.data = (xcb_render_pictdepth_t *)(((char *)R) + xcb_render_pictdepth_sizeof(R));
424     i->index = (char *) child.data - (char *) i->data;
425     --i->rem;
426     i->data = (xcb_render_pictdepth_t *) child.data;
427 }
428 
429 
430 /*****************************************************************************
431  **
432  ** xcb_generic_iterator_t xcb_render_pictdepth_end
433  **
434  ** @param xcb_render_pictdepth_iterator_t i
435  ** @returns xcb_generic_iterator_t
436  **
437  *****************************************************************************/
438 
439 xcb_generic_iterator_t
440 xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i  /**< */)
441 {
442     xcb_generic_iterator_t ret;
443     while(i.rem > 0)
444         xcb_render_pictdepth_next(&i);
445     ret.data = i.data;
446     ret.rem = i.rem;
447     ret.index = i.index;
448     return ret;
449 }
450 
451 int
452 xcb_render_pictscreen_sizeof (const void  *_buffer  /**< */)
453 {
454     char *xcb_tmp = (char *)_buffer;
455     const xcb_render_pictscreen_t *_aux = (xcb_render_pictscreen_t *)_buffer;
456     unsigned int xcb_buffer_len = 0;
457     unsigned int xcb_block_len = 0;
458     unsigned int xcb_pad = 0;
459     unsigned int xcb_align_to = 0;
460 
461     unsigned int i;
462     unsigned int xcb_tmp_len;
463 
464     xcb_block_len += sizeof(xcb_render_pictscreen_t);
465     xcb_tmp += xcb_block_len;
466     xcb_buffer_len += xcb_block_len;
467     xcb_block_len = 0;
468     /* depths */
469     for(i=0; i<_aux->num_depths; i++) {
470         xcb_tmp_len = xcb_render_pictdepth_sizeof(xcb_tmp);
471         xcb_block_len += xcb_tmp_len;
472         xcb_tmp += xcb_tmp_len;
473     }
474     xcb_align_to = ALIGNOF(xcb_render_pictdepth_t);
475     /* insert padding */
476     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
477     xcb_buffer_len += xcb_block_len + xcb_pad;
478     if (0 != xcb_pad) {
479         xcb_tmp += xcb_pad;
480         xcb_pad = 0;
481     }
482     xcb_block_len = 0;
483 
484     return xcb_buffer_len;
485 }
486 
487 
488 /*****************************************************************************
489  **
490  ** int xcb_render_pictscreen_depths_length
491  **
492  ** @param const xcb_render_pictscreen_t *R
493  ** @returns int
494  **
495  *****************************************************************************/
496 
497 int
498 xcb_render_pictscreen_depths_length (const xcb_render_pictscreen_t *R  /**< */)
499 {
500     return R->num_depths;
501 }
502 
503 
504 /*****************************************************************************
505  **
506  ** xcb_render_pictdepth_iterator_t xcb_render_pictscreen_depths_iterator
507  **
508  ** @param const xcb_render_pictscreen_t *R
509  ** @returns xcb_render_pictdepth_iterator_t
510  **
511  *****************************************************************************/
512 
513 xcb_render_pictdepth_iterator_t
514 xcb_render_pictscreen_depths_iterator (const xcb_render_pictscreen_t *R  /**< */)
515 {
516     xcb_render_pictdepth_iterator_t i;
517     i.data = (xcb_render_pictdepth_t *) (R + 1);
518     i.rem = R->num_depths;
519     i.index = (char *) i.data - (char *) R;
520     return i;
521 }
522 
523 
524 /*****************************************************************************
525  **
526  ** void xcb_render_pictscreen_next
527  **
528  ** @param xcb_render_pictscreen_iterator_t *i
529  ** @returns void
530  **
531  *****************************************************************************/
532 
533 void
534 xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i  /**< */)
535 {
536     xcb_render_pictscreen_t *R = i->data;
537     xcb_generic_iterator_t child;
538     child.data = (xcb_render_pictscreen_t *)(((char *)R) + xcb_render_pictscreen_sizeof(R));
539     i->index = (char *) child.data - (char *) i->data;
540     --i->rem;
541     i->data = (xcb_render_pictscreen_t *) child.data;
542 }
543 
544 
545 /*****************************************************************************
546  **
547  ** xcb_generic_iterator_t xcb_render_pictscreen_end
548  **
549  ** @param xcb_render_pictscreen_iterator_t i
550  ** @returns xcb_generic_iterator_t
551  **
552  *****************************************************************************/
553 
554 xcb_generic_iterator_t
555 xcb_render_pictscreen_end (xcb_render_pictscreen_iterator_t i  /**< */)
556 {
557     xcb_generic_iterator_t ret;
558     while(i.rem > 0)
559         xcb_render_pictscreen_next(&i);
560     ret.data = i.data;
561     ret.rem = i.rem;
562     ret.index = i.index;
563     return ret;
564 }
565 
566 
567 /*****************************************************************************
568  **
569  ** void xcb_render_indexvalue_next
570  **
571  ** @param xcb_render_indexvalue_iterator_t *i
572  ** @returns void
573  **
574  *****************************************************************************/
575 
576 void
577 xcb_render_indexvalue_next (xcb_render_indexvalue_iterator_t *i  /**< */)
578 {
579     --i->rem;
580     ++i->data;
581     i->index += sizeof(xcb_render_indexvalue_t);
582 }
583 
584 
585 /*****************************************************************************
586  **
587  ** xcb_generic_iterator_t xcb_render_indexvalue_end
588  **
589  ** @param xcb_render_indexvalue_iterator_t i
590  ** @returns xcb_generic_iterator_t
591  **
592  *****************************************************************************/
593 
594 xcb_generic_iterator_t
595 xcb_render_indexvalue_end (xcb_render_indexvalue_iterator_t i  /**< */)
596 {
597     xcb_generic_iterator_t ret;
598     ret.data = i.data + i.rem;
599     ret.index = i.index + ((char *) ret.data - (char *) i.data);
600     ret.rem = 0;
601     return ret;
602 }
603 
604 
605 /*****************************************************************************
606  **
607  ** void xcb_render_color_next
608  **
609  ** @param xcb_render_color_iterator_t *i
610  ** @returns void
611  **
612  *****************************************************************************/
613 
614 void
615 xcb_render_color_next (xcb_render_color_iterator_t *i  /**< */)
616 {
617     --i->rem;
618     ++i->data;
619     i->index += sizeof(xcb_render_color_t);
620 }
621 
622 
623 /*****************************************************************************
624  **
625  ** xcb_generic_iterator_t xcb_render_color_end
626  **
627  ** @param xcb_render_color_iterator_t i
628  ** @returns xcb_generic_iterator_t
629  **
630  *****************************************************************************/
631 
632 xcb_generic_iterator_t
633 xcb_render_color_end (xcb_render_color_iterator_t i  /**< */)
634 {
635     xcb_generic_iterator_t ret;
636     ret.data = i.data + i.rem;
637     ret.index = i.index + ((char *) ret.data - (char *) i.data);
638     ret.rem = 0;
639     return ret;
640 }
641 
642 
643 /*****************************************************************************
644  **
645  ** void xcb_render_pointfix_next
646  **
647  ** @param xcb_render_pointfix_iterator_t *i
648  ** @returns void
649  **
650  *****************************************************************************/
651 
652 void
653 xcb_render_pointfix_next (xcb_render_pointfix_iterator_t *i  /**< */)
654 {
655     --i->rem;
656     ++i->data;
657     i->index += sizeof(xcb_render_pointfix_t);
658 }
659 
660 
661 /*****************************************************************************
662  **
663  ** xcb_generic_iterator_t xcb_render_pointfix_end
664  **
665  ** @param xcb_render_pointfix_iterator_t i
666  ** @returns xcb_generic_iterator_t
667  **
668  *****************************************************************************/
669 
670 xcb_generic_iterator_t
671 xcb_render_pointfix_end (xcb_render_pointfix_iterator_t i  /**< */)
672 {
673     xcb_generic_iterator_t ret;
674     ret.data = i.data + i.rem;
675     ret.index = i.index + ((char *) ret.data - (char *) i.data);
676     ret.rem = 0;
677     return ret;
678 }
679 
680 
681 /*****************************************************************************
682  **
683  ** void xcb_render_linefix_next
684  **
685  ** @param xcb_render_linefix_iterator_t *i
686  ** @returns void
687  **
688  *****************************************************************************/
689 
690 void
691 xcb_render_linefix_next (xcb_render_linefix_iterator_t *i  /**< */)
692 {
693     --i->rem;
694     ++i->data;
695     i->index += sizeof(xcb_render_linefix_t);
696 }
697 
698 
699 /*****************************************************************************
700  **
701  ** xcb_generic_iterator_t xcb_render_linefix_end
702  **
703  ** @param xcb_render_linefix_iterator_t i
704  ** @returns xcb_generic_iterator_t
705  **
706  *****************************************************************************/
707 
708 xcb_generic_iterator_t
709 xcb_render_linefix_end (xcb_render_linefix_iterator_t i  /**< */)
710 {
711     xcb_generic_iterator_t ret;
712     ret.data = i.data + i.rem;
713     ret.index = i.index + ((char *) ret.data - (char *) i.data);
714     ret.rem = 0;
715     return ret;
716 }
717 
718 
719 /*****************************************************************************
720  **
721  ** void xcb_render_triangle_next
722  **
723  ** @param xcb_render_triangle_iterator_t *i
724  ** @returns void
725  **
726  *****************************************************************************/
727 
728 void
729 xcb_render_triangle_next (xcb_render_triangle_iterator_t *i  /**< */)
730 {
731     --i->rem;
732     ++i->data;
733     i->index += sizeof(xcb_render_triangle_t);
734 }
735 
736 
737 /*****************************************************************************
738  **
739  ** xcb_generic_iterator_t xcb_render_triangle_end
740  **
741  ** @param xcb_render_triangle_iterator_t i
742  ** @returns xcb_generic_iterator_t
743  **
744  *****************************************************************************/
745 
746 xcb_generic_iterator_t
747 xcb_render_triangle_end (xcb_render_triangle_iterator_t i  /**< */)
748 {
749     xcb_generic_iterator_t ret;
750     ret.data = i.data + i.rem;
751     ret.index = i.index + ((char *) ret.data - (char *) i.data);
752     ret.rem = 0;
753     return ret;
754 }
755 
756 
757 /*****************************************************************************
758  **
759  ** void xcb_render_trapezoid_next
760  **
761  ** @param xcb_render_trapezoid_iterator_t *i
762  ** @returns void
763  **
764  *****************************************************************************/
765 
766 void
767 xcb_render_trapezoid_next (xcb_render_trapezoid_iterator_t *i  /**< */)
768 {
769     --i->rem;
770     ++i->data;
771     i->index += sizeof(xcb_render_trapezoid_t);
772 }
773 
774 
775 /*****************************************************************************
776  **
777  ** xcb_generic_iterator_t xcb_render_trapezoid_end
778  **
779  ** @param xcb_render_trapezoid_iterator_t i
780  ** @returns xcb_generic_iterator_t
781  **
782  *****************************************************************************/
783 
784 xcb_generic_iterator_t
785 xcb_render_trapezoid_end (xcb_render_trapezoid_iterator_t i  /**< */)
786 {
787     xcb_generic_iterator_t ret;
788     ret.data = i.data + i.rem;
789     ret.index = i.index + ((char *) ret.data - (char *) i.data);
790     ret.rem = 0;
791     return ret;
792 }
793 
794 
795 /*****************************************************************************
796  **
797  ** void xcb_render_glyphinfo_next
798  **
799  ** @param xcb_render_glyphinfo_iterator_t *i
800  ** @returns void
801  **
802  *****************************************************************************/
803 
804 void
805 xcb_render_glyphinfo_next (xcb_render_glyphinfo_iterator_t *i  /**< */)
806 {
807     --i->rem;
808     ++i->data;
809     i->index += sizeof(xcb_render_glyphinfo_t);
810 }
811 
812 
813 /*****************************************************************************
814  **
815  ** xcb_generic_iterator_t xcb_render_glyphinfo_end
816  **
817  ** @param xcb_render_glyphinfo_iterator_t i
818  ** @returns xcb_generic_iterator_t
819  **
820  *****************************************************************************/
821 
822 xcb_generic_iterator_t
823 xcb_render_glyphinfo_end (xcb_render_glyphinfo_iterator_t i  /**< */)
824 {
825     xcb_generic_iterator_t ret;
826     ret.data = i.data + i.rem;
827     ret.index = i.index + ((char *) ret.data - (char *) i.data);
828     ret.rem = 0;
829     return ret;
830 }
831 
832 
833 /*****************************************************************************
834  **
835  ** xcb_render_query_version_cookie_t xcb_render_query_version
836  **
837  ** @param xcb_connection_t *c
838  ** @param uint32_t          client_major_version
839  ** @param uint32_t          client_minor_version
840  ** @returns xcb_render_query_version_cookie_t
841  **
842  *****************************************************************************/
843 
844 xcb_render_query_version_cookie_t
845 xcb_render_query_version (xcb_connection_t *c  /**< */,
846                           uint32_t          client_major_version  /**< */,
847                           uint32_t          client_minor_version  /**< */)
848 {
849     static const xcb_protocol_request_t xcb_req = {
850         /* count */ 2,
851         /* ext */ &xcb_render_id,
852         /* opcode */ XCB_RENDER_QUERY_VERSION,
853         /* isvoid */ 0
854     };
855 
856     struct iovec xcb_parts[4];
857     xcb_render_query_version_cookie_t xcb_ret;
858     xcb_render_query_version_request_t xcb_out;
859 
860     xcb_out.client_major_version = client_major_version;
861     xcb_out.client_minor_version = client_minor_version;
862 
863     xcb_parts[2].iov_base = (char *) &xcb_out;
864     xcb_parts[2].iov_len = sizeof(xcb_out);
865     xcb_parts[3].iov_base = 0;
866     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
867 
868     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
869     return xcb_ret;
870 }
871 
872 
873 /*****************************************************************************
874  **
875  ** xcb_render_query_version_cookie_t xcb_render_query_version_unchecked
876  **
877  ** @param xcb_connection_t *c
878  ** @param uint32_t          client_major_version
879  ** @param uint32_t          client_minor_version
880  ** @returns xcb_render_query_version_cookie_t
881  **
882  *****************************************************************************/
883 
884 xcb_render_query_version_cookie_t
885 xcb_render_query_version_unchecked (xcb_connection_t *c  /**< */,
886                                     uint32_t          client_major_version  /**< */,
887                                     uint32_t          client_minor_version  /**< */)
888 {
889     static const xcb_protocol_request_t xcb_req = {
890         /* count */ 2,
891         /* ext */ &xcb_render_id,
892         /* opcode */ XCB_RENDER_QUERY_VERSION,
893         /* isvoid */ 0
894     };
895 
896     struct iovec xcb_parts[4];
897     xcb_render_query_version_cookie_t xcb_ret;
898     xcb_render_query_version_request_t xcb_out;
899 
900     xcb_out.client_major_version = client_major_version;
901     xcb_out.client_minor_version = client_minor_version;
902 
903     xcb_parts[2].iov_base = (char *) &xcb_out;
904     xcb_parts[2].iov_len = sizeof(xcb_out);
905     xcb_parts[3].iov_base = 0;
906     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
907 
908     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
909     return xcb_ret;
910 }
911 
912 
913 /*****************************************************************************
914  **
915  ** xcb_render_query_version_reply_t * xcb_render_query_version_reply
916  **
917  ** @param xcb_connection_t                   *c
918  ** @param xcb_render_query_version_cookie_t   cookie
919  ** @param xcb_generic_error_t               **e
920  ** @returns xcb_render_query_version_reply_t *
921  **
922  *****************************************************************************/
923 
924 xcb_render_query_version_reply_t *
925 xcb_render_query_version_reply (xcb_connection_t                   *c  /**< */,
926                                 xcb_render_query_version_cookie_t   cookie  /**< */,
927                                 xcb_generic_error_t               **e  /**< */)
928 {
929     return (xcb_render_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
930 }
931 
932 int
933 xcb_render_query_pict_formats_sizeof (const void  *_buffer  /**< */)
934 {
935     char *xcb_tmp = (char *)_buffer;
936     const xcb_render_query_pict_formats_reply_t *_aux = (xcb_render_query_pict_formats_reply_t *)_buffer;
937     unsigned int xcb_buffer_len = 0;
938     unsigned int xcb_block_len = 0;
939     unsigned int xcb_pad = 0;
940     unsigned int xcb_align_to = 0;
941 
942     unsigned int i;
943     unsigned int xcb_tmp_len;
944 
945     xcb_block_len += sizeof(xcb_render_query_pict_formats_reply_t);
946     xcb_tmp += xcb_block_len;
947     xcb_buffer_len += xcb_block_len;
948     xcb_block_len = 0;
949     /* formats */
950     xcb_block_len += _aux->num_formats * sizeof(xcb_render_pictforminfo_t);
951     xcb_tmp += xcb_block_len;
952     xcb_align_to = ALIGNOF(xcb_render_pictforminfo_t);
953     /* insert padding */
954     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
955     xcb_buffer_len += xcb_block_len + xcb_pad;
956     if (0 != xcb_pad) {
957         xcb_tmp += xcb_pad;
958         xcb_pad = 0;
959     }
960     xcb_block_len = 0;
961     /* screens */
962     for(i=0; i<_aux->num_screens; i++) {
963         xcb_tmp_len = xcb_render_pictscreen_sizeof(xcb_tmp);
964         xcb_block_len += xcb_tmp_len;
965         xcb_tmp += xcb_tmp_len;
966     }
967     xcb_align_to = ALIGNOF(xcb_render_pictscreen_t);
968     /* insert padding */
969     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
970     xcb_buffer_len += xcb_block_len + xcb_pad;
971     if (0 != xcb_pad) {
972         xcb_tmp += xcb_pad;
973         xcb_pad = 0;
974     }
975     xcb_block_len = 0;
976     /* subpixels */
977     xcb_block_len += _aux->num_subpixel * sizeof(uint32_t);
978     xcb_tmp += xcb_block_len;
979     xcb_align_to = ALIGNOF(uint32_t);
980     /* insert padding */
981     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
982     xcb_buffer_len += xcb_block_len + xcb_pad;
983     if (0 != xcb_pad) {
984         xcb_tmp += xcb_pad;
985         xcb_pad = 0;
986     }
987     xcb_block_len = 0;
988 
989     return xcb_buffer_len;
990 }
991 
992 
993 /*****************************************************************************
994  **
995  ** xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats
996  **
997  ** @param xcb_connection_t *c
998  ** @returns xcb_render_query_pict_formats_cookie_t
999  **
1000  *****************************************************************************/
1001 
1002 xcb_render_query_pict_formats_cookie_t
1003 xcb_render_query_pict_formats (xcb_connection_t *c  /**< */)
1004 {
1005     static const xcb_protocol_request_t xcb_req = {
1006         /* count */ 2,
1007         /* ext */ &xcb_render_id,
1008         /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS,
1009         /* isvoid */ 0
1010     };
1011 
1012     struct iovec xcb_parts[4];
1013     xcb_render_query_pict_formats_cookie_t xcb_ret;
1014     xcb_render_query_pict_formats_request_t xcb_out;
1015 
1016 
1017     xcb_parts[2].iov_base = (char *) &xcb_out;
1018     xcb_parts[2].iov_len = sizeof(xcb_out);
1019     xcb_parts[3].iov_base = 0;
1020     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1021 
1022     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1023     return xcb_ret;
1024 }
1025 
1026 
1027 /*****************************************************************************
1028  **
1029  ** xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats_unchecked
1030  **
1031  ** @param xcb_connection_t *c
1032  ** @returns xcb_render_query_pict_formats_cookie_t
1033  **
1034  *****************************************************************************/
1035 
1036 xcb_render_query_pict_formats_cookie_t
1037 xcb_render_query_pict_formats_unchecked (xcb_connection_t *c  /**< */)
1038 {
1039     static const xcb_protocol_request_t xcb_req = {
1040         /* count */ 2,
1041         /* ext */ &xcb_render_id,
1042         /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS,
1043         /* isvoid */ 0
1044     };
1045 
1046     struct iovec xcb_parts[4];
1047     xcb_render_query_pict_formats_cookie_t xcb_ret;
1048     xcb_render_query_pict_formats_request_t xcb_out;
1049 
1050 
1051     xcb_parts[2].iov_base = (char *) &xcb_out;
1052     xcb_parts[2].iov_len = sizeof(xcb_out);
1053     xcb_parts[3].iov_base = 0;
1054     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1055 
1056     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1057     return xcb_ret;
1058 }
1059 
1060 
1061 /*****************************************************************************
1062  **
1063  ** xcb_render_pictforminfo_t * xcb_render_query_pict_formats_formats
1064  **
1065  ** @param const xcb_render_query_pict_formats_reply_t *R
1066  ** @returns xcb_render_pictforminfo_t *
1067  **
1068  *****************************************************************************/
1069 
1070 xcb_render_pictforminfo_t *
1071 xcb_render_query_pict_formats_formats (const xcb_render_query_pict_formats_reply_t *R  /**< */)
1072 {
1073     return (xcb_render_pictforminfo_t *) (R + 1);
1074 }
1075 
1076 
1077 /*****************************************************************************
1078  **
1079  ** int xcb_render_query_pict_formats_formats_length
1080  **
1081  ** @param const xcb_render_query_pict_formats_reply_t *R
1082  ** @returns int
1083  **
1084  *****************************************************************************/
1085 
1086 int
1087 xcb_render_query_pict_formats_formats_length (const xcb_render_query_pict_formats_reply_t *R  /**< */)
1088 {
1089     return R->num_formats;
1090 }
1091 
1092 
1093 /*****************************************************************************
1094  **
1095  ** xcb_render_pictforminfo_iterator_t xcb_render_query_pict_formats_formats_iterator
1096  **
1097  ** @param const xcb_render_query_pict_formats_reply_t *R
1098  ** @returns xcb_render_pictforminfo_iterator_t
1099  **
1100  *****************************************************************************/
1101 
1102 xcb_render_pictforminfo_iterator_t
1103 xcb_render_query_pict_formats_formats_iterator (const xcb_render_query_pict_formats_reply_t *R  /**< */)
1104 {
1105     xcb_render_pictforminfo_iterator_t i;
1106     i.data = (xcb_render_pictforminfo_t *) (R + 1);
1107     i.rem = R->num_formats;
1108     i.index = (char *) i.data - (char *) R;
1109     return i;
1110 }
1111 
1112 
1113 /*****************************************************************************
1114  **
1115  ** int xcb_render_query_pict_formats_screens_length
1116  **
1117  ** @param const xcb_render_query_pict_formats_reply_t *R
1118  ** @returns int
1119  **
1120  *****************************************************************************/
1121 
1122 int
1123 xcb_render_query_pict_formats_screens_length (const xcb_render_query_pict_formats_reply_t *R  /**< */)
1124 {
1125     return R->num_screens;
1126 }
1127 
1128 
1129 /*****************************************************************************
1130  **
1131  ** xcb_render_pictscreen_iterator_t xcb_render_query_pict_formats_screens_iterator
1132  **
1133  ** @param const xcb_render_query_pict_formats_reply_t *R
1134  ** @returns xcb_render_pictscreen_iterator_t
1135  **
1136  *****************************************************************************/
1137 
1138 xcb_render_pictscreen_iterator_t
1139 xcb_render_query_pict_formats_screens_iterator (const xcb_render_query_pict_formats_reply_t *R  /**< */)
1140 {
1141     xcb_render_pictscreen_iterator_t i;
1142     xcb_generic_iterator_t prev = xcb_render_pictforminfo_end(xcb_render_query_pict_formats_formats_iterator(R));
1143     i.data = (xcb_render_pictscreen_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_pictscreen_t, prev.index));
1144     i.rem = R->num_screens;
1145     i.index = (char *) i.data - (char *) R;
1146     return i;
1147 }
1148 
1149 
1150 /*****************************************************************************
1151  **
1152  ** uint32_t * xcb_render_query_pict_formats_subpixels
1153  **
1154  ** @param const xcb_render_query_pict_formats_reply_t *R
1155  ** @returns uint32_t *
1156  **
1157  *****************************************************************************/
1158 
1159 uint32_t *
1160 xcb_render_query_pict_formats_subpixels (const xcb_render_query_pict_formats_reply_t *R  /**< */)
1161 {
1162     xcb_generic_iterator_t prev = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R));
1163     return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
1164 }
1165 
1166 
1167 /*****************************************************************************
1168  **
1169  ** int xcb_render_query_pict_formats_subpixels_length
1170  **
1171  ** @param const xcb_render_query_pict_formats_reply_t *R
1172  ** @returns int
1173  **
1174  *****************************************************************************/
1175 
1176 int
1177 xcb_render_query_pict_formats_subpixels_length (const xcb_render_query_pict_formats_reply_t *R  /**< */)
1178 {
1179     return R->num_subpixel;
1180 }
1181 
1182 
1183 /*****************************************************************************
1184  **
1185  ** xcb_generic_iterator_t xcb_render_query_pict_formats_subpixels_end
1186  **
1187  ** @param const xcb_render_query_pict_formats_reply_t *R
1188  ** @returns xcb_generic_iterator_t
1189  **
1190  *****************************************************************************/
1191 
1192 xcb_generic_iterator_t
1193 xcb_render_query_pict_formats_subpixels_end (const xcb_render_query_pict_formats_reply_t *R  /**< */)
1194 {
1195     xcb_generic_iterator_t i;
1196     xcb_generic_iterator_t child = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R));
1197     i.data = ((uint32_t *) child.data) + (R->num_subpixel);
1198     i.rem = 0;
1199     i.index = (char *) i.data - (char *) R;
1200     return i;
1201 }
1202 
1203 
1204 /*****************************************************************************
1205  **
1206  ** xcb_render_query_pict_formats_reply_t * xcb_render_query_pict_formats_reply
1207  **
1208  ** @param xcb_connection_t                        *c
1209  ** @param xcb_render_query_pict_formats_cookie_t   cookie
1210  ** @param xcb_generic_error_t                    **e
1211  ** @returns xcb_render_query_pict_formats_reply_t *
1212  **
1213  *****************************************************************************/
1214 
1215 xcb_render_query_pict_formats_reply_t *
1216 xcb_render_query_pict_formats_reply (xcb_connection_t                        *c  /**< */,
1217                                      xcb_render_query_pict_formats_cookie_t   cookie  /**< */,
1218                                      xcb_generic_error_t                    **e  /**< */)
1219 {
1220     return (xcb_render_query_pict_formats_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1221 }
1222 
1223 int
1224 xcb_render_query_pict_index_values_sizeof (const void  *_buffer  /**< */)
1225 {
1226     char *xcb_tmp = (char *)_buffer;
1227     const xcb_render_query_pict_index_values_reply_t *_aux = (xcb_render_query_pict_index_values_reply_t *)_buffer;
1228     unsigned int xcb_buffer_len = 0;
1229     unsigned int xcb_block_len = 0;
1230     unsigned int xcb_pad = 0;
1231     unsigned int xcb_align_to = 0;
1232 
1233 
1234     xcb_block_len += sizeof(xcb_render_query_pict_index_values_reply_t);
1235     xcb_tmp += xcb_block_len;
1236     xcb_buffer_len += xcb_block_len;
1237     xcb_block_len = 0;
1238     /* values */
1239     xcb_block_len += _aux->num_values * sizeof(xcb_render_indexvalue_t);
1240     xcb_tmp += xcb_block_len;
1241     xcb_align_to = ALIGNOF(xcb_render_indexvalue_t);
1242     /* insert padding */
1243     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1244     xcb_buffer_len += xcb_block_len + xcb_pad;
1245     if (0 != xcb_pad) {
1246         xcb_tmp += xcb_pad;
1247         xcb_pad = 0;
1248     }
1249     xcb_block_len = 0;
1250 
1251     return xcb_buffer_len;
1252 }
1253 
1254 
1255 /*****************************************************************************
1256  **
1257  ** xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values
1258  **
1259  ** @param xcb_connection_t        *c
1260  ** @param xcb_render_pictformat_t  format
1261  ** @returns xcb_render_query_pict_index_values_cookie_t
1262  **
1263  *****************************************************************************/
1264 
1265 xcb_render_query_pict_index_values_cookie_t
1266 xcb_render_query_pict_index_values (xcb_connection_t        *c  /**< */,
1267                                     xcb_render_pictformat_t  format  /**< */)
1268 {
1269     static const xcb_protocol_request_t xcb_req = {
1270         /* count */ 2,
1271         /* ext */ &xcb_render_id,
1272         /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES,
1273         /* isvoid */ 0
1274     };
1275 
1276     struct iovec xcb_parts[4];
1277     xcb_render_query_pict_index_values_cookie_t xcb_ret;
1278     xcb_render_query_pict_index_values_request_t xcb_out;
1279 
1280     xcb_out.format = format;
1281 
1282     xcb_parts[2].iov_base = (char *) &xcb_out;
1283     xcb_parts[2].iov_len = sizeof(xcb_out);
1284     xcb_parts[3].iov_base = 0;
1285     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1286 
1287     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1288     return xcb_ret;
1289 }
1290 
1291 
1292 /*****************************************************************************
1293  **
1294  ** xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values_unchecked
1295  **
1296  ** @param xcb_connection_t        *c
1297  ** @param xcb_render_pictformat_t  format
1298  ** @returns xcb_render_query_pict_index_values_cookie_t
1299  **
1300  *****************************************************************************/
1301 
1302 xcb_render_query_pict_index_values_cookie_t
1303 xcb_render_query_pict_index_values_unchecked (xcb_connection_t        *c  /**< */,
1304                                               xcb_render_pictformat_t  format  /**< */)
1305 {
1306     static const xcb_protocol_request_t xcb_req = {
1307         /* count */ 2,
1308         /* ext */ &xcb_render_id,
1309         /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES,
1310         /* isvoid */ 0
1311     };
1312 
1313     struct iovec xcb_parts[4];
1314     xcb_render_query_pict_index_values_cookie_t xcb_ret;
1315     xcb_render_query_pict_index_values_request_t xcb_out;
1316 
1317     xcb_out.format = format;
1318 
1319     xcb_parts[2].iov_base = (char *) &xcb_out;
1320     xcb_parts[2].iov_len = sizeof(xcb_out);
1321     xcb_parts[3].iov_base = 0;
1322     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1323 
1324     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1325     return xcb_ret;
1326 }
1327 
1328 
1329 /*****************************************************************************
1330  **
1331  ** xcb_render_indexvalue_t * xcb_render_query_pict_index_values_values
1332  **
1333  ** @param const xcb_render_query_pict_index_values_reply_t *R
1334  ** @returns xcb_render_indexvalue_t *
1335  **
1336  *****************************************************************************/
1337 
1338 xcb_render_indexvalue_t *
1339 xcb_render_query_pict_index_values_values (const xcb_render_query_pict_index_values_reply_t *R  /**< */)
1340 {
1341     return (xcb_render_indexvalue_t *) (R + 1);
1342 }
1343 
1344 
1345 /*****************************************************************************
1346  **
1347  ** int xcb_render_query_pict_index_values_values_length
1348  **
1349  ** @param const xcb_render_query_pict_index_values_reply_t *R
1350  ** @returns int
1351  **
1352  *****************************************************************************/
1353 
1354 int
1355 xcb_render_query_pict_index_values_values_length (const xcb_render_query_pict_index_values_reply_t *R  /**< */)
1356 {
1357     return R->num_values;
1358 }
1359 
1360 
1361 /*****************************************************************************
1362  **
1363  ** xcb_render_indexvalue_iterator_t xcb_render_query_pict_index_values_values_iterator
1364  **
1365  ** @param const xcb_render_query_pict_index_values_reply_t *R
1366  ** @returns xcb_render_indexvalue_iterator_t
1367  **
1368  *****************************************************************************/
1369 
1370 xcb_render_indexvalue_iterator_t
1371 xcb_render_query_pict_index_values_values_iterator (const xcb_render_query_pict_index_values_reply_t *R  /**< */)
1372 {
1373     xcb_render_indexvalue_iterator_t i;
1374     i.data = (xcb_render_indexvalue_t *) (R + 1);
1375     i.rem = R->num_values;
1376     i.index = (char *) i.data - (char *) R;
1377     return i;
1378 }
1379 
1380 
1381 /*****************************************************************************
1382  **
1383  ** xcb_render_query_pict_index_values_reply_t * xcb_render_query_pict_index_values_reply
1384  **
1385  ** @param xcb_connection_t                             *c
1386  ** @param xcb_render_query_pict_index_values_cookie_t   cookie
1387  ** @param xcb_generic_error_t                         **e
1388  ** @returns xcb_render_query_pict_index_values_reply_t *
1389  **
1390  *****************************************************************************/
1391 
1392 xcb_render_query_pict_index_values_reply_t *
1393 xcb_render_query_pict_index_values_reply (xcb_connection_t                             *c  /**< */,
1394                                           xcb_render_query_pict_index_values_cookie_t   cookie  /**< */,
1395                                           xcb_generic_error_t                         **e  /**< */)
1396 {
1397     return (xcb_render_query_pict_index_values_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1398 }
1399 
1400 int
1401 xcb_render_create_picture_sizeof (const void  *_buffer  /**< */)
1402 {
1403     char *xcb_tmp = (char *)_buffer;
1404     const xcb_render_create_picture_request_t *_aux = (xcb_render_create_picture_request_t *)_buffer;
1405     unsigned int xcb_buffer_len = 0;
1406     unsigned int xcb_block_len = 0;
1407     unsigned int xcb_pad = 0;
1408     unsigned int xcb_align_to = 0;
1409 
1410 
1411     xcb_block_len += sizeof(xcb_render_create_picture_request_t);
1412     xcb_tmp += xcb_block_len;
1413     xcb_buffer_len += xcb_block_len;
1414     xcb_block_len = 0;
1415     /* value_list */
1416     xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
1417     xcb_tmp += xcb_block_len;
1418     xcb_align_to = ALIGNOF(uint32_t);
1419     /* insert padding */
1420     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1421     xcb_buffer_len += xcb_block_len + xcb_pad;
1422     if (0 != xcb_pad) {
1423         xcb_tmp += xcb_pad;
1424         xcb_pad = 0;
1425     }
1426     xcb_block_len = 0;
1427 
1428     return xcb_buffer_len;
1429 }
1430 
1431 
1432 /*****************************************************************************
1433  **
1434  ** xcb_void_cookie_t xcb_render_create_picture_checked
1435  **
1436  ** @param xcb_connection_t        *c
1437  ** @param xcb_render_picture_t     pid
1438  ** @param xcb_drawable_t           drawable
1439  ** @param xcb_render_pictformat_t  format
1440  ** @param uint32_t                 value_mask
1441  ** @param const uint32_t          *value_list
1442  ** @returns xcb_void_cookie_t
1443  **
1444  *****************************************************************************/
1445 
1446 xcb_void_cookie_t
1447 xcb_render_create_picture_checked (xcb_connection_t        *c  /**< */,
1448                                    xcb_render_picture_t     pid  /**< */,
1449                                    xcb_drawable_t           drawable  /**< */,
1450                                    xcb_render_pictformat_t  format  /**< */,
1451                                    uint32_t                 value_mask  /**< */,
1452                                    const uint32_t          *value_list  /**< */)
1453 {
1454     static const xcb_protocol_request_t xcb_req = {
1455         /* count */ 4,
1456         /* ext */ &xcb_render_id,
1457         /* opcode */ XCB_RENDER_CREATE_PICTURE,
1458         /* isvoid */ 1
1459     };
1460 
1461     struct iovec xcb_parts[6];
1462     xcb_void_cookie_t xcb_ret;
1463     xcb_render_create_picture_request_t xcb_out;
1464 
1465     xcb_out.pid = pid;
1466     xcb_out.drawable = drawable;
1467     xcb_out.format = format;
1468     xcb_out.value_mask = value_mask;
1469 
1470     xcb_parts[2].iov_base = (char *) &xcb_out;
1471     xcb_parts[2].iov_len = sizeof(xcb_out);
1472     xcb_parts[3].iov_base = 0;
1473     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1474     /* uint32_t value_list */
1475     xcb_parts[4].iov_base = (char *) value_list;
1476     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
1477     xcb_parts[5].iov_base = 0;
1478     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1479 
1480     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1481     return xcb_ret;
1482 }
1483 
1484 
1485 /*****************************************************************************
1486  **
1487  ** xcb_void_cookie_t xcb_render_create_picture
1488  **
1489  ** @param xcb_connection_t        *c
1490  ** @param xcb_render_picture_t     pid
1491  ** @param xcb_drawable_t           drawable
1492  ** @param xcb_render_pictformat_t  format
1493  ** @param uint32_t                 value_mask
1494  ** @param const uint32_t          *value_list
1495  ** @returns xcb_void_cookie_t
1496  **
1497  *****************************************************************************/
1498 
1499 xcb_void_cookie_t
1500 xcb_render_create_picture (xcb_connection_t        *c  /**< */,
1501                            xcb_render_picture_t     pid  /**< */,
1502                            xcb_drawable_t           drawable  /**< */,
1503                            xcb_render_pictformat_t  format  /**< */,
1504                            uint32_t                 value_mask  /**< */,
1505                            const uint32_t          *value_list  /**< */)
1506 {
1507     static const xcb_protocol_request_t xcb_req = {
1508         /* count */ 4,
1509         /* ext */ &xcb_render_id,
1510         /* opcode */ XCB_RENDER_CREATE_PICTURE,
1511         /* isvoid */ 1
1512     };
1513 
1514     struct iovec xcb_parts[6];
1515     xcb_void_cookie_t xcb_ret;
1516     xcb_render_create_picture_request_t xcb_out;
1517 
1518     xcb_out.pid = pid;
1519     xcb_out.drawable = drawable;
1520     xcb_out.format = format;
1521     xcb_out.value_mask = value_mask;
1522 
1523     xcb_parts[2].iov_base = (char *) &xcb_out;
1524     xcb_parts[2].iov_len = sizeof(xcb_out);
1525     xcb_parts[3].iov_base = 0;
1526     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1527     /* uint32_t value_list */
1528     xcb_parts[4].iov_base = (char *) value_list;
1529     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
1530     xcb_parts[5].iov_base = 0;
1531     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1532 
1533     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1534     return xcb_ret;
1535 }
1536 
1537 int
1538 xcb_render_change_picture_sizeof (const void  *_buffer  /**< */)
1539 {
1540     char *xcb_tmp = (char *)_buffer;
1541     const xcb_render_change_picture_request_t *_aux = (xcb_render_change_picture_request_t *)_buffer;
1542     unsigned int xcb_buffer_len = 0;
1543     unsigned int xcb_block_len = 0;
1544     unsigned int xcb_pad = 0;
1545     unsigned int xcb_align_to = 0;
1546 
1547 
1548     xcb_block_len += sizeof(xcb_render_change_picture_request_t);
1549     xcb_tmp += xcb_block_len;
1550     xcb_buffer_len += xcb_block_len;
1551     xcb_block_len = 0;
1552     /* value_list */
1553     xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
1554     xcb_tmp += xcb_block_len;
1555     xcb_align_to = ALIGNOF(uint32_t);
1556     /* insert padding */
1557     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1558     xcb_buffer_len += xcb_block_len + xcb_pad;
1559     if (0 != xcb_pad) {
1560         xcb_tmp += xcb_pad;
1561         xcb_pad = 0;
1562     }
1563     xcb_block_len = 0;
1564 
1565     return xcb_buffer_len;
1566 }
1567 
1568 
1569 /*****************************************************************************
1570  **
1571  ** xcb_void_cookie_t xcb_render_change_picture_checked
1572  **
1573  ** @param xcb_connection_t     *c
1574  ** @param xcb_render_picture_t  picture
1575  ** @param uint32_t              value_mask
1576  ** @param const uint32_t       *value_list
1577  ** @returns xcb_void_cookie_t
1578  **
1579  *****************************************************************************/
1580 
1581 xcb_void_cookie_t
1582 xcb_render_change_picture_checked (xcb_connection_t     *c  /**< */,
1583                                    xcb_render_picture_t  picture  /**< */,
1584                                    uint32_t              value_mask  /**< */,
1585                                    const uint32_t       *value_list  /**< */)
1586 {
1587     static const xcb_protocol_request_t xcb_req = {
1588         /* count */ 4,
1589         /* ext */ &xcb_render_id,
1590         /* opcode */ XCB_RENDER_CHANGE_PICTURE,
1591         /* isvoid */ 1
1592     };
1593 
1594     struct iovec xcb_parts[6];
1595     xcb_void_cookie_t xcb_ret;
1596     xcb_render_change_picture_request_t xcb_out;
1597 
1598     xcb_out.picture = picture;
1599     xcb_out.value_mask = value_mask;
1600 
1601     xcb_parts[2].iov_base = (char *) &xcb_out;
1602     xcb_parts[2].iov_len = sizeof(xcb_out);
1603     xcb_parts[3].iov_base = 0;
1604     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1605     /* uint32_t value_list */
1606     xcb_parts[4].iov_base = (char *) value_list;
1607     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
1608     xcb_parts[5].iov_base = 0;
1609     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1610 
1611     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1612     return xcb_ret;
1613 }
1614 
1615 
1616 /*****************************************************************************
1617  **
1618  ** xcb_void_cookie_t xcb_render_change_picture
1619  **
1620  ** @param xcb_connection_t     *c
1621  ** @param xcb_render_picture_t  picture
1622  ** @param uint32_t              value_mask
1623  ** @param const uint32_t       *value_list
1624  ** @returns xcb_void_cookie_t
1625  **
1626  *****************************************************************************/
1627 
1628 xcb_void_cookie_t
1629 xcb_render_change_picture (xcb_connection_t     *c  /**< */,
1630                            xcb_render_picture_t  picture  /**< */,
1631                            uint32_t              value_mask  /**< */,
1632                            const uint32_t       *value_list  /**< */)
1633 {
1634     static const xcb_protocol_request_t xcb_req = {
1635         /* count */ 4,
1636         /* ext */ &xcb_render_id,
1637         /* opcode */ XCB_RENDER_CHANGE_PICTURE,
1638         /* isvoid */ 1
1639     };
1640 
1641     struct iovec xcb_parts[6];
1642     xcb_void_cookie_t xcb_ret;
1643     xcb_render_change_picture_request_t xcb_out;
1644 
1645     xcb_out.picture = picture;
1646     xcb_out.value_mask = value_mask;
1647 
1648     xcb_parts[2].iov_base = (char *) &xcb_out;
1649     xcb_parts[2].iov_len = sizeof(xcb_out);
1650     xcb_parts[3].iov_base = 0;
1651     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1652     /* uint32_t value_list */
1653     xcb_parts[4].iov_base = (char *) value_list;
1654     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
1655     xcb_parts[5].iov_base = 0;
1656     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1657 
1658     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1659     return xcb_ret;
1660 }
1661 
1662 int
1663 xcb_render_set_picture_clip_rectangles_sizeof (const void  *_buffer  /**< */,
1664                                                uint32_t     rectangles_len  /**< */)
1665 {
1666     char *xcb_tmp = (char *)_buffer;
1667     unsigned int xcb_buffer_len = 0;
1668     unsigned int xcb_block_len = 0;
1669     unsigned int xcb_pad = 0;
1670     unsigned int xcb_align_to = 0;
1671 
1672 
1673     xcb_block_len += sizeof(xcb_render_set_picture_clip_rectangles_request_t);
1674     xcb_tmp += xcb_block_len;
1675     xcb_buffer_len += xcb_block_len;
1676     xcb_block_len = 0;
1677     /* rectangles */
1678     xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
1679     xcb_tmp += xcb_block_len;
1680     xcb_align_to = ALIGNOF(xcb_rectangle_t);
1681     /* insert padding */
1682     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1683     xcb_buffer_len += xcb_block_len + xcb_pad;
1684     if (0 != xcb_pad) {
1685         xcb_tmp += xcb_pad;
1686         xcb_pad = 0;
1687     }
1688     xcb_block_len = 0;
1689 
1690     return xcb_buffer_len;
1691 }
1692 
1693 
1694 /*****************************************************************************
1695  **
1696  ** xcb_void_cookie_t xcb_render_set_picture_clip_rectangles_checked
1697  **
1698  ** @param xcb_connection_t      *c
1699  ** @param xcb_render_picture_t   picture
1700  ** @param int16_t                clip_x_origin
1701  ** @param int16_t                clip_y_origin
1702  ** @param uint32_t               rectangles_len
1703  ** @param const xcb_rectangle_t *rectangles
1704  ** @returns xcb_void_cookie_t
1705  **
1706  *****************************************************************************/
1707 
1708 xcb_void_cookie_t
1709 xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t      *c  /**< */,
1710                                                 xcb_render_picture_t   picture  /**< */,
1711                                                 int16_t                clip_x_origin  /**< */,
1712                                                 int16_t                clip_y_origin  /**< */,
1713                                                 uint32_t               rectangles_len  /**< */,
1714                                                 const xcb_rectangle_t *rectangles  /**< */)
1715 {
1716     static const xcb_protocol_request_t xcb_req = {
1717         /* count */ 4,
1718         /* ext */ &xcb_render_id,
1719         /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES,
1720         /* isvoid */ 1
1721     };
1722 
1723     struct iovec xcb_parts[6];
1724     xcb_void_cookie_t xcb_ret;
1725     xcb_render_set_picture_clip_rectangles_request_t xcb_out;
1726 
1727     xcb_out.picture = picture;
1728     xcb_out.clip_x_origin = clip_x_origin;
1729     xcb_out.clip_y_origin = clip_y_origin;
1730 
1731     xcb_parts[2].iov_base = (char *) &xcb_out;
1732     xcb_parts[2].iov_len = sizeof(xcb_out);
1733     xcb_parts[3].iov_base = 0;
1734     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1735     /* xcb_rectangle_t rectangles */
1736     xcb_parts[4].iov_base = (char *) rectangles;
1737     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
1738     xcb_parts[5].iov_base = 0;
1739     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1740 
1741     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1742     return xcb_ret;
1743 }
1744 
1745 
1746 /*****************************************************************************
1747  **
1748  ** xcb_void_cookie_t xcb_render_set_picture_clip_rectangles
1749  **
1750  ** @param xcb_connection_t      *c
1751  ** @param xcb_render_picture_t   picture
1752  ** @param int16_t                clip_x_origin
1753  ** @param int16_t                clip_y_origin
1754  ** @param uint32_t               rectangles_len
1755  ** @param const xcb_rectangle_t *rectangles
1756  ** @returns xcb_void_cookie_t
1757  **
1758  *****************************************************************************/
1759 
1760 xcb_void_cookie_t
1761 xcb_render_set_picture_clip_rectangles (xcb_connection_t      *c  /**< */,
1762                                         xcb_render_picture_t   picture  /**< */,
1763                                         int16_t                clip_x_origin  /**< */,
1764                                         int16_t                clip_y_origin  /**< */,
1765                                         uint32_t               rectangles_len  /**< */,
1766                                         const xcb_rectangle_t *rectangles  /**< */)
1767 {
1768     static const xcb_protocol_request_t xcb_req = {
1769         /* count */ 4,
1770         /* ext */ &xcb_render_id,
1771         /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES,
1772         /* isvoid */ 1
1773     };
1774 
1775     struct iovec xcb_parts[6];
1776     xcb_void_cookie_t xcb_ret;
1777     xcb_render_set_picture_clip_rectangles_request_t xcb_out;
1778 
1779     xcb_out.picture = picture;
1780     xcb_out.clip_x_origin = clip_x_origin;
1781     xcb_out.clip_y_origin = clip_y_origin;
1782 
1783     xcb_parts[2].iov_base = (char *) &xcb_out;
1784     xcb_parts[2].iov_len = sizeof(xcb_out);
1785     xcb_parts[3].iov_base = 0;
1786     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1787     /* xcb_rectangle_t rectangles */
1788     xcb_parts[4].iov_base = (char *) rectangles;
1789     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
1790     xcb_parts[5].iov_base = 0;
1791     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1792 
1793     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1794     return xcb_ret;
1795 }
1796 
1797 
1798 /*****************************************************************************
1799  **
1800  ** xcb_void_cookie_t xcb_render_free_picture_checked
1801  **
1802  ** @param xcb_connection_t     *c
1803  ** @param xcb_render_picture_t  picture
1804  ** @returns xcb_void_cookie_t
1805  **
1806  *****************************************************************************/
1807 
1808 xcb_void_cookie_t
1809 xcb_render_free_picture_checked (xcb_connection_t     *c  /**< */,
1810                                  xcb_render_picture_t  picture  /**< */)
1811 {
1812     static const xcb_protocol_request_t xcb_req = {
1813         /* count */ 2,
1814         /* ext */ &xcb_render_id,
1815         /* opcode */ XCB_RENDER_FREE_PICTURE,
1816         /* isvoid */ 1
1817     };
1818 
1819     struct iovec xcb_parts[4];
1820     xcb_void_cookie_t xcb_ret;
1821     xcb_render_free_picture_request_t xcb_out;
1822 
1823     xcb_out.picture = picture;
1824 
1825     xcb_parts[2].iov_base = (char *) &xcb_out;
1826     xcb_parts[2].iov_len = sizeof(xcb_out);
1827     xcb_parts[3].iov_base = 0;
1828     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1829 
1830     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1831     return xcb_ret;
1832 }
1833 
1834 
1835 /*****************************************************************************
1836  **
1837  ** xcb_void_cookie_t xcb_render_free_picture
1838  **
1839  ** @param xcb_connection_t     *c
1840  ** @param xcb_render_picture_t  picture
1841  ** @returns xcb_void_cookie_t
1842  **
1843  *****************************************************************************/
1844 
1845 xcb_void_cookie_t
1846 xcb_render_free_picture (xcb_connection_t     *c  /**< */,
1847                          xcb_render_picture_t  picture  /**< */)
1848 {
1849     static const xcb_protocol_request_t xcb_req = {
1850         /* count */ 2,
1851         /* ext */ &xcb_render_id,
1852         /* opcode */ XCB_RENDER_FREE_PICTURE,
1853         /* isvoid */ 1
1854     };
1855 
1856     struct iovec xcb_parts[4];
1857     xcb_void_cookie_t xcb_ret;
1858     xcb_render_free_picture_request_t xcb_out;
1859 
1860     xcb_out.picture = picture;
1861 
1862     xcb_parts[2].iov_base = (char *) &xcb_out;
1863     xcb_parts[2].iov_len = sizeof(xcb_out);
1864     xcb_parts[3].iov_base = 0;
1865     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1866 
1867     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1868     return xcb_ret;
1869 }
1870 
1871 
1872 /*****************************************************************************
1873  **
1874  ** xcb_void_cookie_t xcb_render_composite_checked
1875  **
1876  ** @param xcb_connection_t     *c
1877  ** @param uint8_t               op
1878  ** @param xcb_render_picture_t  src
1879  ** @param xcb_render_picture_t  mask
1880  ** @param xcb_render_picture_t  dst
1881  ** @param int16_t               src_x
1882  ** @param int16_t               src_y
1883  ** @param int16_t               mask_x
1884  ** @param int16_t               mask_y
1885  ** @param int16_t               dst_x
1886  ** @param int16_t               dst_y
1887  ** @param uint16_t              width
1888  ** @param uint16_t              height
1889  ** @returns xcb_void_cookie_t
1890  **
1891  *****************************************************************************/
1892 
1893 xcb_void_cookie_t
1894 xcb_render_composite_checked (xcb_connection_t     *c  /**< */,
1895                               uint8_t               op  /**< */,
1896                               xcb_render_picture_t  src  /**< */,
1897                               xcb_render_picture_t  mask  /**< */,
1898                               xcb_render_picture_t  dst  /**< */,
1899                               int16_t               src_x  /**< */,
1900                               int16_t               src_y  /**< */,
1901                               int16_t               mask_x  /**< */,
1902                               int16_t               mask_y  /**< */,
1903                               int16_t               dst_x  /**< */,
1904                               int16_t               dst_y  /**< */,
1905                               uint16_t              width  /**< */,
1906                               uint16_t              height  /**< */)
1907 {
1908     static const xcb_protocol_request_t xcb_req = {
1909         /* count */ 2,
1910         /* ext */ &xcb_render_id,
1911         /* opcode */ XCB_RENDER_COMPOSITE,
1912         /* isvoid */ 1
1913     };
1914 
1915     struct iovec xcb_parts[4];
1916     xcb_void_cookie_t xcb_ret;
1917     xcb_render_composite_request_t xcb_out;
1918 
1919     xcb_out.op = op;
1920     memset(xcb_out.pad0, 0, 3);
1921     xcb_out.src = src;
1922     xcb_out.mask = mask;
1923     xcb_out.dst = dst;
1924     xcb_out.src_x = src_x;
1925     xcb_out.src_y = src_y;
1926     xcb_out.mask_x = mask_x;
1927     xcb_out.mask_y = mask_y;
1928     xcb_out.dst_x = dst_x;
1929     xcb_out.dst_y = dst_y;
1930     xcb_out.width = width;
1931     xcb_out.height = height;
1932 
1933     xcb_parts[2].iov_base = (char *) &xcb_out;
1934     xcb_parts[2].iov_len = sizeof(xcb_out);
1935     xcb_parts[3].iov_base = 0;
1936     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1937 
1938     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1939     return xcb_ret;
1940 }
1941 
1942 
1943 /*****************************************************************************
1944  **
1945  ** xcb_void_cookie_t xcb_render_composite
1946  **
1947  ** @param xcb_connection_t     *c
1948  ** @param uint8_t               op
1949  ** @param xcb_render_picture_t  src
1950  ** @param xcb_render_picture_t  mask
1951  ** @param xcb_render_picture_t  dst
1952  ** @param int16_t               src_x
1953  ** @param int16_t               src_y
1954  ** @param int16_t               mask_x
1955  ** @param int16_t               mask_y
1956  ** @param int16_t               dst_x
1957  ** @param int16_t               dst_y
1958  ** @param uint16_t              width
1959  ** @param uint16_t              height
1960  ** @returns xcb_void_cookie_t
1961  **
1962  *****************************************************************************/
1963 
1964 xcb_void_cookie_t
1965 xcb_render_composite (xcb_connection_t     *c  /**< */,
1966                       uint8_t               op  /**< */,
1967                       xcb_render_picture_t  src  /**< */,
1968                       xcb_render_picture_t  mask  /**< */,
1969                       xcb_render_picture_t  dst  /**< */,
1970                       int16_t               src_x  /**< */,
1971                       int16_t               src_y  /**< */,
1972                       int16_t               mask_x  /**< */,
1973                       int16_t               mask_y  /**< */,
1974                       int16_t               dst_x  /**< */,
1975                       int16_t               dst_y  /**< */,
1976                       uint16_t              width  /**< */,
1977                       uint16_t              height  /**< */)
1978 {
1979     static const xcb_protocol_request_t xcb_req = {
1980         /* count */ 2,
1981         /* ext */ &xcb_render_id,
1982         /* opcode */ XCB_RENDER_COMPOSITE,
1983         /* isvoid */ 1
1984     };
1985 
1986     struct iovec xcb_parts[4];
1987     xcb_void_cookie_t xcb_ret;
1988     xcb_render_composite_request_t xcb_out;
1989 
1990     xcb_out.op = op;
1991     memset(xcb_out.pad0, 0, 3);
1992     xcb_out.src = src;
1993     xcb_out.mask = mask;
1994     xcb_out.dst = dst;
1995     xcb_out.src_x = src_x;
1996     xcb_out.src_y = src_y;
1997     xcb_out.mask_x = mask_x;
1998     xcb_out.mask_y = mask_y;
1999     xcb_out.dst_x = dst_x;
2000     xcb_out.dst_y = dst_y;
2001     xcb_out.width = width;
2002     xcb_out.height = height;
2003 
2004     xcb_parts[2].iov_base = (char *) &xcb_out;
2005     xcb_parts[2].iov_len = sizeof(xcb_out);
2006     xcb_parts[3].iov_base = 0;
2007     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2008 
2009     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2010     return xcb_ret;
2011 }
2012 
2013 int
2014 xcb_render_trapezoids_sizeof (const void  *_buffer  /**< */,
2015                               uint32_t     traps_len  /**< */)
2016 {
2017     char *xcb_tmp = (char *)_buffer;
2018     unsigned int xcb_buffer_len = 0;
2019     unsigned int xcb_block_len = 0;
2020     unsigned int xcb_pad = 0;
2021     unsigned int xcb_align_to = 0;
2022 
2023 
2024     xcb_block_len += sizeof(xcb_render_trapezoids_request_t);
2025     xcb_tmp += xcb_block_len;
2026     xcb_buffer_len += xcb_block_len;
2027     xcb_block_len = 0;
2028     /* traps */
2029     xcb_block_len += traps_len * sizeof(xcb_render_trapezoid_t);
2030     xcb_tmp += xcb_block_len;
2031     xcb_align_to = ALIGNOF(xcb_render_trapezoid_t);
2032     /* insert padding */
2033     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2034     xcb_buffer_len += xcb_block_len + xcb_pad;
2035     if (0 != xcb_pad) {
2036         xcb_tmp += xcb_pad;
2037         xcb_pad = 0;
2038     }
2039     xcb_block_len = 0;
2040 
2041     return xcb_buffer_len;
2042 }
2043 
2044 
2045 /*****************************************************************************
2046  **
2047  ** xcb_void_cookie_t xcb_render_trapezoids_checked
2048  **
2049  ** @param xcb_connection_t             *c
2050  ** @param uint8_t                       op
2051  ** @param xcb_render_picture_t          src
2052  ** @param xcb_render_picture_t          dst
2053  ** @param xcb_render_pictformat_t       mask_format
2054  ** @param int16_t                       src_x
2055  ** @param int16_t                       src_y
2056  ** @param uint32_t                      traps_len
2057  ** @param const xcb_render_trapezoid_t *traps
2058  ** @returns xcb_void_cookie_t
2059  **
2060  *****************************************************************************/
2061 
2062 xcb_void_cookie_t
2063 xcb_render_trapezoids_checked (xcb_connection_t             *c  /**< */,
2064                                uint8_t                       op  /**< */,
2065                                xcb_render_picture_t          src  /**< */,
2066                                xcb_render_picture_t          dst  /**< */,
2067                                xcb_render_pictformat_t       mask_format  /**< */,
2068                                int16_t                       src_x  /**< */,
2069                                int16_t                       src_y  /**< */,
2070                                uint32_t                      traps_len  /**< */,
2071                                const xcb_render_trapezoid_t *traps  /**< */)
2072 {
2073     static const xcb_protocol_request_t xcb_req = {
2074         /* count */ 4,
2075         /* ext */ &xcb_render_id,
2076         /* opcode */ XCB_RENDER_TRAPEZOIDS,
2077         /* isvoid */ 1
2078     };
2079 
2080     struct iovec xcb_parts[6];
2081     xcb_void_cookie_t xcb_ret;
2082     xcb_render_trapezoids_request_t xcb_out;
2083 
2084     xcb_out.op = op;
2085     memset(xcb_out.pad0, 0, 3);
2086     xcb_out.src = src;
2087     xcb_out.dst = dst;
2088     xcb_out.mask_format = mask_format;
2089     xcb_out.src_x = src_x;
2090     xcb_out.src_y = src_y;
2091 
2092     xcb_parts[2].iov_base = (char *) &xcb_out;
2093     xcb_parts[2].iov_len = sizeof(xcb_out);
2094     xcb_parts[3].iov_base = 0;
2095     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2096     /* xcb_render_trapezoid_t traps */
2097     xcb_parts[4].iov_base = (char *) traps;
2098     xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t);
2099     xcb_parts[5].iov_base = 0;
2100     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2101 
2102     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2103     return xcb_ret;
2104 }
2105 
2106 
2107 /*****************************************************************************
2108  **
2109  ** xcb_void_cookie_t xcb_render_trapezoids
2110  **
2111  ** @param xcb_connection_t             *c
2112  ** @param uint8_t                       op
2113  ** @param xcb_render_picture_t          src
2114  ** @param xcb_render_picture_t          dst
2115  ** @param xcb_render_pictformat_t       mask_format
2116  ** @param int16_t                       src_x
2117  ** @param int16_t                       src_y
2118  ** @param uint32_t                      traps_len
2119  ** @param const xcb_render_trapezoid_t *traps
2120  ** @returns xcb_void_cookie_t
2121  **
2122  *****************************************************************************/
2123 
2124 xcb_void_cookie_t
2125 xcb_render_trapezoids (xcb_connection_t             *c  /**< */,
2126                        uint8_t                       op  /**< */,
2127                        xcb_render_picture_t          src  /**< */,
2128                        xcb_render_picture_t          dst  /**< */,
2129                        xcb_render_pictformat_t       mask_format  /**< */,
2130                        int16_t                       src_x  /**< */,
2131                        int16_t                       src_y  /**< */,
2132                        uint32_t                      traps_len  /**< */,
2133                        const xcb_render_trapezoid_t *traps  /**< */)
2134 {
2135     static const xcb_protocol_request_t xcb_req = {
2136         /* count */ 4,
2137         /* ext */ &xcb_render_id,
2138         /* opcode */ XCB_RENDER_TRAPEZOIDS,
2139         /* isvoid */ 1
2140     };
2141 
2142     struct iovec xcb_parts[6];
2143     xcb_void_cookie_t xcb_ret;
2144     xcb_render_trapezoids_request_t xcb_out;
2145 
2146     xcb_out.op = op;
2147     memset(xcb_out.pad0, 0, 3);
2148     xcb_out.src = src;
2149     xcb_out.dst = dst;
2150     xcb_out.mask_format = mask_format;
2151     xcb_out.src_x = src_x;
2152     xcb_out.src_y = src_y;
2153 
2154     xcb_parts[2].iov_base = (char *) &xcb_out;
2155     xcb_parts[2].iov_len = sizeof(xcb_out);
2156     xcb_parts[3].iov_base = 0;
2157     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2158     /* xcb_render_trapezoid_t traps */
2159     xcb_parts[4].iov_base = (char *) traps;
2160     xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t);
2161     xcb_parts[5].iov_base = 0;
2162     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2163 
2164     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2165     return xcb_ret;
2166 }
2167 
2168 int
2169 xcb_render_triangles_sizeof (const void  *_buffer  /**< */,
2170                              uint32_t     triangles_len  /**< */)
2171 {
2172     char *xcb_tmp = (char *)_buffer;
2173     unsigned int xcb_buffer_len = 0;
2174     unsigned int xcb_block_len = 0;
2175     unsigned int xcb_pad = 0;
2176     unsigned int xcb_align_to = 0;
2177 
2178 
2179     xcb_block_len += sizeof(xcb_render_triangles_request_t);
2180     xcb_tmp += xcb_block_len;
2181     xcb_buffer_len += xcb_block_len;
2182     xcb_block_len = 0;
2183     /* triangles */
2184     xcb_block_len += triangles_len * sizeof(xcb_render_triangle_t);
2185     xcb_tmp += xcb_block_len;
2186     xcb_align_to = ALIGNOF(xcb_render_triangle_t);
2187     /* insert padding */
2188     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2189     xcb_buffer_len += xcb_block_len + xcb_pad;
2190     if (0 != xcb_pad) {
2191         xcb_tmp += xcb_pad;
2192         xcb_pad = 0;
2193     }
2194     xcb_block_len = 0;
2195 
2196     return xcb_buffer_len;
2197 }
2198 
2199 
2200 /*****************************************************************************
2201  **
2202  ** xcb_void_cookie_t xcb_render_triangles_checked
2203  **
2204  ** @param xcb_connection_t            *c
2205  ** @param uint8_t                      op
2206  ** @param xcb_render_picture_t         src
2207  ** @param xcb_render_picture_t         dst
2208  ** @param xcb_render_pictformat_t      mask_format
2209  ** @param int16_t                      src_x
2210  ** @param int16_t                      src_y
2211  ** @param uint32_t                     triangles_len
2212  ** @param const xcb_render_triangle_t *triangles
2213  ** @returns xcb_void_cookie_t
2214  **
2215  *****************************************************************************/
2216 
2217 xcb_void_cookie_t
2218 xcb_render_triangles_checked (xcb_connection_t            *c  /**< */,
2219                               uint8_t                      op  /**< */,
2220                               xcb_render_picture_t         src  /**< */,
2221                               xcb_render_picture_t         dst  /**< */,
2222                               xcb_render_pictformat_t      mask_format  /**< */,
2223                               int16_t                      src_x  /**< */,
2224                               int16_t                      src_y  /**< */,
2225                               uint32_t                     triangles_len  /**< */,
2226                               const xcb_render_triangle_t *triangles  /**< */)
2227 {
2228     static const xcb_protocol_request_t xcb_req = {
2229         /* count */ 4,
2230         /* ext */ &xcb_render_id,
2231         /* opcode */ XCB_RENDER_TRIANGLES,
2232         /* isvoid */ 1
2233     };
2234 
2235     struct iovec xcb_parts[6];
2236     xcb_void_cookie_t xcb_ret;
2237     xcb_render_triangles_request_t xcb_out;
2238 
2239     xcb_out.op = op;
2240     memset(xcb_out.pad0, 0, 3);
2241     xcb_out.src = src;
2242     xcb_out.dst = dst;
2243     xcb_out.mask_format = mask_format;
2244     xcb_out.src_x = src_x;
2245     xcb_out.src_y = src_y;
2246 
2247     xcb_parts[2].iov_base = (char *) &xcb_out;
2248     xcb_parts[2].iov_len = sizeof(xcb_out);
2249     xcb_parts[3].iov_base = 0;
2250     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2251     /* xcb_render_triangle_t triangles */
2252     xcb_parts[4].iov_base = (char *) triangles;
2253     xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t);
2254     xcb_parts[5].iov_base = 0;
2255     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2256 
2257     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2258     return xcb_ret;
2259 }
2260 
2261 
2262 /*****************************************************************************
2263  **
2264  ** xcb_void_cookie_t xcb_render_triangles
2265  **
2266  ** @param xcb_connection_t            *c
2267  ** @param uint8_t                      op
2268  ** @param xcb_render_picture_t         src
2269  ** @param xcb_render_picture_t         dst
2270  ** @param xcb_render_pictformat_t      mask_format
2271  ** @param int16_t                      src_x
2272  ** @param int16_t                      src_y
2273  ** @param uint32_t                     triangles_len
2274  ** @param const xcb_render_triangle_t *triangles
2275  ** @returns xcb_void_cookie_t
2276  **
2277  *****************************************************************************/
2278 
2279 xcb_void_cookie_t
2280 xcb_render_triangles (xcb_connection_t            *c  /**< */,
2281                       uint8_t                      op  /**< */,
2282                       xcb_render_picture_t         src  /**< */,
2283                       xcb_render_picture_t         dst  /**< */,
2284                       xcb_render_pictformat_t      mask_format  /**< */,
2285                       int16_t                      src_x  /**< */,
2286                       int16_t                      src_y  /**< */,
2287                       uint32_t                     triangles_len  /**< */,
2288                       const xcb_render_triangle_t *triangles  /**< */)
2289 {
2290     static const xcb_protocol_request_t xcb_req = {
2291         /* count */ 4,
2292         /* ext */ &xcb_render_id,
2293         /* opcode */ XCB_RENDER_TRIANGLES,
2294         /* isvoid */ 1
2295     };
2296 
2297     struct iovec xcb_parts[6];
2298     xcb_void_cookie_t xcb_ret;
2299     xcb_render_triangles_request_t xcb_out;
2300 
2301     xcb_out.op = op;
2302     memset(xcb_out.pad0, 0, 3);
2303     xcb_out.src = src;
2304     xcb_out.dst = dst;
2305     xcb_out.mask_format = mask_format;
2306     xcb_out.src_x = src_x;
2307     xcb_out.src_y = src_y;
2308 
2309     xcb_parts[2].iov_base = (char *) &xcb_out;
2310     xcb_parts[2].iov_len = sizeof(xcb_out);
2311     xcb_parts[3].iov_base = 0;
2312     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2313     /* xcb_render_triangle_t triangles */
2314     xcb_parts[4].iov_base = (char *) triangles;
2315     xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t);
2316     xcb_parts[5].iov_base = 0;
2317     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2318 
2319     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2320     return xcb_ret;
2321 }
2322 
2323 int
2324 xcb_render_tri_strip_sizeof (const void  *_buffer  /**< */,
2325                              uint32_t     points_len  /**< */)
2326 {
2327     char *xcb_tmp = (char *)_buffer;
2328     unsigned int xcb_buffer_len = 0;
2329     unsigned int xcb_block_len = 0;
2330     unsigned int xcb_pad = 0;
2331     unsigned int xcb_align_to = 0;
2332 
2333 
2334     xcb_block_len += sizeof(xcb_render_tri_strip_request_t);
2335     xcb_tmp += xcb_block_len;
2336     xcb_buffer_len += xcb_block_len;
2337     xcb_block_len = 0;
2338     /* points */
2339     xcb_block_len += points_len * sizeof(xcb_render_pointfix_t);
2340     xcb_tmp += xcb_block_len;
2341     xcb_align_to = ALIGNOF(xcb_render_pointfix_t);
2342     /* insert padding */
2343     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2344     xcb_buffer_len += xcb_block_len + xcb_pad;
2345     if (0 != xcb_pad) {
2346         xcb_tmp += xcb_pad;
2347         xcb_pad = 0;
2348     }
2349     xcb_block_len = 0;
2350 
2351     return xcb_buffer_len;
2352 }
2353 
2354 
2355 /*****************************************************************************
2356  **
2357  ** xcb_void_cookie_t xcb_render_tri_strip_checked
2358  **
2359  ** @param xcb_connection_t            *c
2360  ** @param uint8_t                      op
2361  ** @param xcb_render_picture_t         src
2362  ** @param xcb_render_picture_t         dst
2363  ** @param xcb_render_pictformat_t      mask_format
2364  ** @param int16_t                      src_x
2365  ** @param int16_t                      src_y
2366  ** @param uint32_t                     points_len
2367  ** @param const xcb_render_pointfix_t *points
2368  ** @returns xcb_void_cookie_t
2369  **
2370  *****************************************************************************/
2371 
2372 xcb_void_cookie_t
2373 xcb_render_tri_strip_checked (xcb_connection_t            *c  /**< */,
2374                               uint8_t                      op  /**< */,
2375                               xcb_render_picture_t         src  /**< */,
2376                               xcb_render_picture_t         dst  /**< */,
2377                               xcb_render_pictformat_t      mask_format  /**< */,
2378                               int16_t                      src_x  /**< */,
2379                               int16_t                      src_y  /**< */,
2380                               uint32_t                     points_len  /**< */,
2381                               const xcb_render_pointfix_t *points  /**< */)
2382 {
2383     static const xcb_protocol_request_t xcb_req = {
2384         /* count */ 4,
2385         /* ext */ &xcb_render_id,
2386         /* opcode */ XCB_RENDER_TRI_STRIP,
2387         /* isvoid */ 1
2388     };
2389 
2390     struct iovec xcb_parts[6];
2391     xcb_void_cookie_t xcb_ret;
2392     xcb_render_tri_strip_request_t xcb_out;
2393 
2394     xcb_out.op = op;
2395     memset(xcb_out.pad0, 0, 3);
2396     xcb_out.src = src;
2397     xcb_out.dst = dst;
2398     xcb_out.mask_format = mask_format;
2399     xcb_out.src_x = src_x;
2400     xcb_out.src_y = src_y;
2401 
2402     xcb_parts[2].iov_base = (char *) &xcb_out;
2403     xcb_parts[2].iov_len = sizeof(xcb_out);
2404     xcb_parts[3].iov_base = 0;
2405     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2406     /* xcb_render_pointfix_t points */
2407     xcb_parts[4].iov_base = (char *) points;
2408     xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
2409     xcb_parts[5].iov_base = 0;
2410     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2411 
2412     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2413     return xcb_ret;
2414 }
2415 
2416 
2417 /*****************************************************************************
2418  **
2419  ** xcb_void_cookie_t xcb_render_tri_strip
2420  **
2421  ** @param xcb_connection_t            *c
2422  ** @param uint8_t                      op
2423  ** @param xcb_render_picture_t         src
2424  ** @param xcb_render_picture_t         dst
2425  ** @param xcb_render_pictformat_t      mask_format
2426  ** @param int16_t                      src_x
2427  ** @param int16_t                      src_y
2428  ** @param uint32_t                     points_len
2429  ** @param const xcb_render_pointfix_t *points
2430  ** @returns xcb_void_cookie_t
2431  **
2432  *****************************************************************************/
2433 
2434 xcb_void_cookie_t
2435 xcb_render_tri_strip (xcb_connection_t            *c  /**< */,
2436                       uint8_t                      op  /**< */,
2437                       xcb_render_picture_t         src  /**< */,
2438                       xcb_render_picture_t         dst  /**< */,
2439                       xcb_render_pictformat_t      mask_format  /**< */,
2440                       int16_t                      src_x  /**< */,
2441                       int16_t                      src_y  /**< */,
2442                       uint32_t                     points_len  /**< */,
2443                       const xcb_render_pointfix_t *points  /**< */)
2444 {
2445     static const xcb_protocol_request_t xcb_req = {
2446         /* count */ 4,
2447         /* ext */ &xcb_render_id,
2448         /* opcode */ XCB_RENDER_TRI_STRIP,
2449         /* isvoid */ 1
2450     };
2451 
2452     struct iovec xcb_parts[6];
2453     xcb_void_cookie_t xcb_ret;
2454     xcb_render_tri_strip_request_t xcb_out;
2455 
2456     xcb_out.op = op;
2457     memset(xcb_out.pad0, 0, 3);
2458     xcb_out.src = src;
2459     xcb_out.dst = dst;
2460     xcb_out.mask_format = mask_format;
2461     xcb_out.src_x = src_x;
2462     xcb_out.src_y = src_y;
2463 
2464     xcb_parts[2].iov_base = (char *) &xcb_out;
2465     xcb_parts[2].iov_len = sizeof(xcb_out);
2466     xcb_parts[3].iov_base = 0;
2467     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2468     /* xcb_render_pointfix_t points */
2469     xcb_parts[4].iov_base = (char *) points;
2470     xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
2471     xcb_parts[5].iov_base = 0;
2472     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2473 
2474     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2475     return xcb_ret;
2476 }
2477 
2478 int
2479 xcb_render_tri_fan_sizeof (const void  *_buffer  /**< */,
2480                            uint32_t     points_len  /**< */)
2481 {
2482     char *xcb_tmp = (char *)_buffer;
2483     unsigned int xcb_buffer_len = 0;
2484     unsigned int xcb_block_len = 0;
2485     unsigned int xcb_pad = 0;
2486     unsigned int xcb_align_to = 0;
2487 
2488 
2489     xcb_block_len += sizeof(xcb_render_tri_fan_request_t);
2490     xcb_tmp += xcb_block_len;
2491     xcb_buffer_len += xcb_block_len;
2492     xcb_block_len = 0;
2493     /* points */
2494     xcb_block_len += points_len * sizeof(xcb_render_pointfix_t);
2495     xcb_tmp += xcb_block_len;
2496     xcb_align_to = ALIGNOF(xcb_render_pointfix_t);
2497     /* insert padding */
2498     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2499     xcb_buffer_len += xcb_block_len + xcb_pad;
2500     if (0 != xcb_pad) {
2501         xcb_tmp += xcb_pad;
2502         xcb_pad = 0;
2503     }
2504     xcb_block_len = 0;
2505 
2506     return xcb_buffer_len;
2507 }
2508 
2509 
2510 /*****************************************************************************
2511  **
2512  ** xcb_void_cookie_t xcb_render_tri_fan_checked
2513  **
2514  ** @param xcb_connection_t            *c
2515  ** @param uint8_t                      op
2516  ** @param xcb_render_picture_t         src
2517  ** @param xcb_render_picture_t         dst
2518  ** @param xcb_render_pictformat_t      mask_format
2519  ** @param int16_t                      src_x
2520  ** @param int16_t                      src_y
2521  ** @param uint32_t                     points_len
2522  ** @param const xcb_render_pointfix_t *points
2523  ** @returns xcb_void_cookie_t
2524  **
2525  *****************************************************************************/
2526 
2527 xcb_void_cookie_t
2528 xcb_render_tri_fan_checked (xcb_connection_t            *c  /**< */,
2529                             uint8_t                      op  /**< */,
2530                             xcb_render_picture_t         src  /**< */,
2531                             xcb_render_picture_t         dst  /**< */,
2532                             xcb_render_pictformat_t      mask_format  /**< */,
2533                             int16_t                      src_x  /**< */,
2534                             int16_t                      src_y  /**< */,
2535                             uint32_t                     points_len  /**< */,
2536                             const xcb_render_pointfix_t *points  /**< */)
2537 {
2538     static const xcb_protocol_request_t xcb_req = {
2539         /* count */ 4,
2540         /* ext */ &xcb_render_id,
2541         /* opcode */ XCB_RENDER_TRI_FAN,
2542         /* isvoid */ 1
2543     };
2544 
2545     struct iovec xcb_parts[6];
2546     xcb_void_cookie_t xcb_ret;
2547     xcb_render_tri_fan_request_t xcb_out;
2548 
2549     xcb_out.op = op;
2550     memset(xcb_out.pad0, 0, 3);
2551     xcb_out.src = src;
2552     xcb_out.dst = dst;
2553     xcb_out.mask_format = mask_format;
2554     xcb_out.src_x = src_x;
2555     xcb_out.src_y = src_y;
2556 
2557     xcb_parts[2].iov_base = (char *) &xcb_out;
2558     xcb_parts[2].iov_len = sizeof(xcb_out);
2559     xcb_parts[3].iov_base = 0;
2560     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2561     /* xcb_render_pointfix_t points */
2562     xcb_parts[4].iov_base = (char *) points;
2563     xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
2564     xcb_parts[5].iov_base = 0;
2565     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2566 
2567     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2568     return xcb_ret;
2569 }
2570 
2571 
2572 /*****************************************************************************
2573  **
2574  ** xcb_void_cookie_t xcb_render_tri_fan
2575  **
2576  ** @param xcb_connection_t            *c
2577  ** @param uint8_t                      op
2578  ** @param xcb_render_picture_t         src
2579  ** @param xcb_render_picture_t         dst
2580  ** @param xcb_render_pictformat_t      mask_format
2581  ** @param int16_t                      src_x
2582  ** @param int16_t                      src_y
2583  ** @param uint32_t                     points_len
2584  ** @param const xcb_render_pointfix_t *points
2585  ** @returns xcb_void_cookie_t
2586  **
2587  *****************************************************************************/
2588 
2589 xcb_void_cookie_t
2590 xcb_render_tri_fan (xcb_connection_t            *c  /**< */,
2591                     uint8_t                      op  /**< */,
2592                     xcb_render_picture_t         src  /**< */,
2593                     xcb_render_picture_t         dst  /**< */,
2594                     xcb_render_pictformat_t      mask_format  /**< */,
2595                     int16_t                      src_x  /**< */,
2596                     int16_t                      src_y  /**< */,
2597                     uint32_t                     points_len  /**< */,
2598                     const xcb_render_pointfix_t *points  /**< */)
2599 {
2600     static const xcb_protocol_request_t xcb_req = {
2601         /* count */ 4,
2602         /* ext */ &xcb_render_id,
2603         /* opcode */ XCB_RENDER_TRI_FAN,
2604         /* isvoid */ 1
2605     };
2606 
2607     struct iovec xcb_parts[6];
2608     xcb_void_cookie_t xcb_ret;
2609     xcb_render_tri_fan_request_t xcb_out;
2610 
2611     xcb_out.op = op;
2612     memset(xcb_out.pad0, 0, 3);
2613     xcb_out.src = src;
2614     xcb_out.dst = dst;
2615     xcb_out.mask_format = mask_format;
2616     xcb_out.src_x = src_x;
2617     xcb_out.src_y = src_y;
2618 
2619     xcb_parts[2].iov_base = (char *) &xcb_out;
2620     xcb_parts[2].iov_len = sizeof(xcb_out);
2621     xcb_parts[3].iov_base = 0;
2622     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2623     /* xcb_render_pointfix_t points */
2624     xcb_parts[4].iov_base = (char *) points;
2625     xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
2626     xcb_parts[5].iov_base = 0;
2627     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2628 
2629     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2630     return xcb_ret;
2631 }
2632 
2633 
2634 /*****************************************************************************
2635  **
2636  ** xcb_void_cookie_t xcb_render_create_glyph_set_checked
2637  **
2638  ** @param xcb_connection_t        *c
2639  ** @param xcb_render_glyphset_t    gsid
2640  ** @param xcb_render_pictformat_t  format
2641  ** @returns xcb_void_cookie_t
2642  **
2643  *****************************************************************************/
2644 
2645 xcb_void_cookie_t
2646 xcb_render_create_glyph_set_checked (xcb_connection_t        *c  /**< */,
2647                                      xcb_render_glyphset_t    gsid  /**< */,
2648                                      xcb_render_pictformat_t  format  /**< */)
2649 {
2650     static const xcb_protocol_request_t xcb_req = {
2651         /* count */ 2,
2652         /* ext */ &xcb_render_id,
2653         /* opcode */ XCB_RENDER_CREATE_GLYPH_SET,
2654         /* isvoid */ 1
2655     };
2656 
2657     struct iovec xcb_parts[4];
2658     xcb_void_cookie_t xcb_ret;
2659     xcb_render_create_glyph_set_request_t xcb_out;
2660 
2661     xcb_out.gsid = gsid;
2662     xcb_out.format = format;
2663 
2664     xcb_parts[2].iov_base = (char *) &xcb_out;
2665     xcb_parts[2].iov_len = sizeof(xcb_out);
2666     xcb_parts[3].iov_base = 0;
2667     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2668 
2669     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2670     return xcb_ret;
2671 }
2672 
2673 
2674 /*****************************************************************************
2675  **
2676  ** xcb_void_cookie_t xcb_render_create_glyph_set
2677  **
2678  ** @param xcb_connection_t        *c
2679  ** @param xcb_render_glyphset_t    gsid
2680  ** @param xcb_render_pictformat_t  format
2681  ** @returns xcb_void_cookie_t
2682  **
2683  *****************************************************************************/
2684 
2685 xcb_void_cookie_t
2686 xcb_render_create_glyph_set (xcb_connection_t        *c  /**< */,
2687                              xcb_render_glyphset_t    gsid  /**< */,
2688                              xcb_render_pictformat_t  format  /**< */)
2689 {
2690     static const xcb_protocol_request_t xcb_req = {
2691         /* count */ 2,
2692         /* ext */ &xcb_render_id,
2693         /* opcode */ XCB_RENDER_CREATE_GLYPH_SET,
2694         /* isvoid */ 1
2695     };
2696 
2697     struct iovec xcb_parts[4];
2698     xcb_void_cookie_t xcb_ret;
2699     xcb_render_create_glyph_set_request_t xcb_out;
2700 
2701     xcb_out.gsid = gsid;
2702     xcb_out.format = format;
2703 
2704     xcb_parts[2].iov_base = (char *) &xcb_out;
2705     xcb_parts[2].iov_len = sizeof(xcb_out);
2706     xcb_parts[3].iov_base = 0;
2707     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2708 
2709     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2710     return xcb_ret;
2711 }
2712 
2713 
2714 /*****************************************************************************
2715  **
2716  ** xcb_void_cookie_t xcb_render_reference_glyph_set_checked
2717  **
2718  ** @param xcb_connection_t      *c
2719  ** @param xcb_render_glyphset_t  gsid
2720  ** @param xcb_render_glyphset_t  existing
2721  ** @returns xcb_void_cookie_t
2722  **
2723  *****************************************************************************/
2724 
2725 xcb_void_cookie_t
2726 xcb_render_reference_glyph_set_checked (xcb_connection_t      *c  /**< */,
2727                                         xcb_render_glyphset_t  gsid  /**< */,
2728                                         xcb_render_glyphset_t  existing  /**< */)
2729 {
2730     static const xcb_protocol_request_t xcb_req = {
2731         /* count */ 2,
2732         /* ext */ &xcb_render_id,
2733         /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET,
2734         /* isvoid */ 1
2735     };
2736 
2737     struct iovec xcb_parts[4];
2738     xcb_void_cookie_t xcb_ret;
2739     xcb_render_reference_glyph_set_request_t xcb_out;
2740 
2741     xcb_out.gsid = gsid;
2742     xcb_out.existing = existing;
2743 
2744     xcb_parts[2].iov_base = (char *) &xcb_out;
2745     xcb_parts[2].iov_len = sizeof(xcb_out);
2746     xcb_parts[3].iov_base = 0;
2747     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2748 
2749     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2750     return xcb_ret;
2751 }
2752 
2753 
2754 /*****************************************************************************
2755  **
2756  ** xcb_void_cookie_t xcb_render_reference_glyph_set
2757  **
2758  ** @param xcb_connection_t      *c
2759  ** @param xcb_render_glyphset_t  gsid
2760  ** @param xcb_render_glyphset_t  existing
2761  ** @returns xcb_void_cookie_t
2762  **
2763  *****************************************************************************/
2764 
2765 xcb_void_cookie_t
2766 xcb_render_reference_glyph_set (xcb_connection_t      *c  /**< */,
2767                                 xcb_render_glyphset_t  gsid  /**< */,
2768                                 xcb_render_glyphset_t  existing  /**< */)
2769 {
2770     static const xcb_protocol_request_t xcb_req = {
2771         /* count */ 2,
2772         /* ext */ &xcb_render_id,
2773         /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET,
2774         /* isvoid */ 1
2775     };
2776 
2777     struct iovec xcb_parts[4];
2778     xcb_void_cookie_t xcb_ret;
2779     xcb_render_reference_glyph_set_request_t xcb_out;
2780 
2781     xcb_out.gsid = gsid;
2782     xcb_out.existing = existing;
2783 
2784     xcb_parts[2].iov_base = (char *) &xcb_out;
2785     xcb_parts[2].iov_len = sizeof(xcb_out);
2786     xcb_parts[3].iov_base = 0;
2787     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2788 
2789     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2790     return xcb_ret;
2791 }
2792 
2793 
2794 /*****************************************************************************
2795  **
2796  ** xcb_void_cookie_t xcb_render_free_glyph_set_checked
2797  **
2798  ** @param xcb_connection_t      *c
2799  ** @param xcb_render_glyphset_t  glyphset
2800  ** @returns xcb_void_cookie_t
2801  **
2802  *****************************************************************************/
2803 
2804 xcb_void_cookie_t
2805 xcb_render_free_glyph_set_checked (xcb_connection_t      *c  /**< */,
2806                                    xcb_render_glyphset_t  glyphset  /**< */)
2807 {
2808     static const xcb_protocol_request_t xcb_req = {
2809         /* count */ 2,
2810         /* ext */ &xcb_render_id,
2811         /* opcode */ XCB_RENDER_FREE_GLYPH_SET,
2812         /* isvoid */ 1
2813     };
2814 
2815     struct iovec xcb_parts[4];
2816     xcb_void_cookie_t xcb_ret;
2817     xcb_render_free_glyph_set_request_t xcb_out;
2818 
2819     xcb_out.glyphset = glyphset;
2820 
2821     xcb_parts[2].iov_base = (char *) &xcb_out;
2822     xcb_parts[2].iov_len = sizeof(xcb_out);
2823     xcb_parts[3].iov_base = 0;
2824     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2825 
2826     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2827     return xcb_ret;
2828 }
2829 
2830 
2831 /*****************************************************************************
2832  **
2833  ** xcb_void_cookie_t xcb_render_free_glyph_set
2834  **
2835  ** @param xcb_connection_t      *c
2836  ** @param xcb_render_glyphset_t  glyphset
2837  ** @returns xcb_void_cookie_t
2838  **
2839  *****************************************************************************/
2840 
2841 xcb_void_cookie_t
2842 xcb_render_free_glyph_set (xcb_connection_t      *c  /**< */,
2843                            xcb_render_glyphset_t  glyphset  /**< */)
2844 {
2845     static const xcb_protocol_request_t xcb_req = {
2846         /* count */ 2,
2847         /* ext */ &xcb_render_id,
2848         /* opcode */ XCB_RENDER_FREE_GLYPH_SET,
2849         /* isvoid */ 1
2850     };
2851 
2852     struct iovec xcb_parts[4];
2853     xcb_void_cookie_t xcb_ret;
2854     xcb_render_free_glyph_set_request_t xcb_out;
2855 
2856     xcb_out.glyphset = glyphset;
2857 
2858     xcb_parts[2].iov_base = (char *) &xcb_out;
2859     xcb_parts[2].iov_len = sizeof(xcb_out);
2860     xcb_parts[3].iov_base = 0;
2861     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2862 
2863     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2864     return xcb_ret;
2865 }
2866 
2867 int
2868 xcb_render_add_glyphs_sizeof (const void  *_buffer  /**< */,
2869                               uint32_t     data_len  /**< */)
2870 {
2871     char *xcb_tmp = (char *)_buffer;
2872     const xcb_render_add_glyphs_request_t *_aux = (xcb_render_add_glyphs_request_t *)_buffer;
2873     unsigned int xcb_buffer_len = 0;
2874     unsigned int xcb_block_len = 0;
2875     unsigned int xcb_pad = 0;
2876     unsigned int xcb_align_to = 0;
2877 
2878 
2879     xcb_block_len += sizeof(xcb_render_add_glyphs_request_t);
2880     xcb_tmp += xcb_block_len;
2881     xcb_buffer_len += xcb_block_len;
2882     xcb_block_len = 0;
2883     /* glyphids */
2884     xcb_block_len += _aux->glyphs_len * sizeof(uint32_t);
2885     xcb_tmp += xcb_block_len;
2886     xcb_align_to = ALIGNOF(uint32_t);
2887     /* insert padding */
2888     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2889     xcb_buffer_len += xcb_block_len + xcb_pad;
2890     if (0 != xcb_pad) {
2891         xcb_tmp += xcb_pad;
2892         xcb_pad = 0;
2893     }
2894     xcb_block_len = 0;
2895     /* glyphs */
2896     xcb_block_len += _aux->glyphs_len * sizeof(xcb_render_glyphinfo_t);
2897     xcb_tmp += xcb_block_len;
2898     xcb_align_to = ALIGNOF(xcb_render_glyphinfo_t);
2899     /* insert padding */
2900     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2901     xcb_buffer_len += xcb_block_len + xcb_pad;
2902     if (0 != xcb_pad) {
2903         xcb_tmp += xcb_pad;
2904         xcb_pad = 0;
2905     }
2906     xcb_block_len = 0;
2907     /* data */
2908     xcb_block_len += data_len * sizeof(uint8_t);
2909     xcb_tmp += xcb_block_len;
2910     xcb_align_to = ALIGNOF(uint8_t);
2911     /* insert padding */
2912     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2913     xcb_buffer_len += xcb_block_len + xcb_pad;
2914     if (0 != xcb_pad) {
2915         xcb_tmp += xcb_pad;
2916         xcb_pad = 0;
2917     }
2918     xcb_block_len = 0;
2919 
2920     return xcb_buffer_len;
2921 }
2922 
2923 
2924 /*****************************************************************************
2925  **
2926  ** xcb_void_cookie_t xcb_render_add_glyphs_checked
2927  **
2928  ** @param xcb_connection_t             *c
2929  ** @param xcb_render_glyphset_t         glyphset
2930  ** @param uint32_t                      glyphs_len
2931  ** @param const uint32_t               *glyphids
2932  ** @param const xcb_render_glyphinfo_t *glyphs
2933  ** @param uint32_t                      data_len
2934  ** @param const uint8_t                *data
2935  ** @returns xcb_void_cookie_t
2936  **
2937  *****************************************************************************/
2938 
2939 xcb_void_cookie_t
2940 xcb_render_add_glyphs_checked (xcb_connection_t             *c  /**< */,
2941                                xcb_render_glyphset_t         glyphset  /**< */,
2942                                uint32_t                      glyphs_len  /**< */,
2943                                const uint32_t               *glyphids  /**< */,
2944                                const xcb_render_glyphinfo_t *glyphs  /**< */,
2945                                uint32_t                      data_len  /**< */,
2946                                const uint8_t                *data  /**< */)
2947 {
2948     static const xcb_protocol_request_t xcb_req = {
2949         /* count */ 8,
2950         /* ext */ &xcb_render_id,
2951         /* opcode */ XCB_RENDER_ADD_GLYPHS,
2952         /* isvoid */ 1
2953     };
2954 
2955     struct iovec xcb_parts[10];
2956     xcb_void_cookie_t xcb_ret;
2957     xcb_render_add_glyphs_request_t xcb_out;
2958 
2959     xcb_out.glyphset = glyphset;
2960     xcb_out.glyphs_len = glyphs_len;
2961 
2962     xcb_parts[2].iov_base = (char *) &xcb_out;
2963     xcb_parts[2].iov_len = sizeof(xcb_out);
2964     xcb_parts[3].iov_base = 0;
2965     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2966     /* uint32_t glyphids */
2967     xcb_parts[4].iov_base = (char *) glyphids;
2968     xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t);
2969     xcb_parts[5].iov_base = 0;
2970     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2971     /* xcb_render_glyphinfo_t glyphs */
2972     xcb_parts[6].iov_base = (char *) glyphs;
2973     xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t);
2974     xcb_parts[7].iov_base = 0;
2975     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
2976     /* uint8_t data */
2977     xcb_parts[8].iov_base = (char *) data;
2978     xcb_parts[8].iov_len = data_len * sizeof(uint8_t);
2979     xcb_parts[9].iov_base = 0;
2980     xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
2981 
2982     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2983     return xcb_ret;
2984 }
2985 
2986 
2987 /*****************************************************************************
2988  **
2989  ** xcb_void_cookie_t xcb_render_add_glyphs
2990  **
2991  ** @param xcb_connection_t             *c
2992  ** @param xcb_render_glyphset_t         glyphset
2993  ** @param uint32_t                      glyphs_len
2994  ** @param const uint32_t               *glyphids
2995  ** @param const xcb_render_glyphinfo_t *glyphs
2996  ** @param uint32_t                      data_len
2997  ** @param const uint8_t                *data
2998  ** @returns xcb_void_cookie_t
2999  **
3000  *****************************************************************************/
3001 
3002 xcb_void_cookie_t
3003 xcb_render_add_glyphs (xcb_connection_t             *c  /**< */,
3004                        xcb_render_glyphset_t         glyphset  /**< */,
3005                        uint32_t                      glyphs_len  /**< */,
3006                        const uint32_t               *glyphids  /**< */,
3007                        const xcb_render_glyphinfo_t *glyphs  /**< */,
3008                        uint32_t                      data_len  /**< */,
3009                        const uint8_t                *data  /**< */)
3010 {
3011     static const xcb_protocol_request_t xcb_req = {
3012         /* count */ 8,
3013         /* ext */ &xcb_render_id,
3014         /* opcode */ XCB_RENDER_ADD_GLYPHS,
3015         /* isvoid */ 1
3016     };
3017 
3018     struct iovec xcb_parts[10];
3019     xcb_void_cookie_t xcb_ret;
3020     xcb_render_add_glyphs_request_t xcb_out;
3021 
3022     xcb_out.glyphset = glyphset;
3023     xcb_out.glyphs_len = glyphs_len;
3024 
3025     xcb_parts[2].iov_base = (char *) &xcb_out;
3026     xcb_parts[2].iov_len = sizeof(xcb_out);
3027     xcb_parts[3].iov_base = 0;
3028     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3029     /* uint32_t glyphids */
3030     xcb_parts[4].iov_base = (char *) glyphids;
3031     xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t);
3032     xcb_parts[5].iov_base = 0;
3033     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3034     /* xcb_render_glyphinfo_t glyphs */
3035     xcb_parts[6].iov_base = (char *) glyphs;
3036     xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t);
3037     xcb_parts[7].iov_base = 0;
3038     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3039     /* uint8_t data */
3040     xcb_parts[8].iov_base = (char *) data;
3041     xcb_parts[8].iov_len = data_len * sizeof(uint8_t);
3042     xcb_parts[9].iov_base = 0;
3043     xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
3044 
3045     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3046     return xcb_ret;
3047 }
3048 
3049 int
3050 xcb_render_free_glyphs_sizeof (const void  *_buffer  /**< */,
3051                                uint32_t     glyphs_len  /**< */)
3052 {
3053     char *xcb_tmp = (char *)_buffer;
3054     unsigned int xcb_buffer_len = 0;
3055     unsigned int xcb_block_len = 0;
3056     unsigned int xcb_pad = 0;
3057     unsigned int xcb_align_to = 0;
3058 
3059 
3060     xcb_block_len += sizeof(xcb_render_free_glyphs_request_t);
3061     xcb_tmp += xcb_block_len;
3062     xcb_buffer_len += xcb_block_len;
3063     xcb_block_len = 0;
3064     /* glyphs */
3065     xcb_block_len += glyphs_len * sizeof(xcb_render_glyph_t);
3066     xcb_tmp += xcb_block_len;
3067     xcb_align_to = ALIGNOF(xcb_render_glyph_t);
3068     /* insert padding */
3069     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3070     xcb_buffer_len += xcb_block_len + xcb_pad;
3071     if (0 != xcb_pad) {
3072         xcb_tmp += xcb_pad;
3073         xcb_pad = 0;
3074     }
3075     xcb_block_len = 0;
3076 
3077     return xcb_buffer_len;
3078 }
3079 
3080 
3081 /*****************************************************************************
3082  **
3083  ** xcb_void_cookie_t xcb_render_free_glyphs_checked
3084  **
3085  ** @param xcb_connection_t         *c
3086  ** @param xcb_render_glyphset_t     glyphset
3087  ** @param uint32_t                  glyphs_len
3088  ** @param const xcb_render_glyph_t *glyphs
3089  ** @returns xcb_void_cookie_t
3090  **
3091  *****************************************************************************/
3092 
3093 xcb_void_cookie_t
3094 xcb_render_free_glyphs_checked (xcb_connection_t         *c  /**< */,
3095                                 xcb_render_glyphset_t     glyphset  /**< */,
3096                                 uint32_t                  glyphs_len  /**< */,
3097                                 const xcb_render_glyph_t *glyphs  /**< */)
3098 {
3099     static const xcb_protocol_request_t xcb_req = {
3100         /* count */ 4,
3101         /* ext */ &xcb_render_id,
3102         /* opcode */ XCB_RENDER_FREE_GLYPHS,
3103         /* isvoid */ 1
3104     };
3105 
3106     struct iovec xcb_parts[6];
3107     xcb_void_cookie_t xcb_ret;
3108     xcb_render_free_glyphs_request_t xcb_out;
3109 
3110     xcb_out.glyphset = glyphset;
3111 
3112     xcb_parts[2].iov_base = (char *) &xcb_out;
3113     xcb_parts[2].iov_len = sizeof(xcb_out);
3114     xcb_parts[3].iov_base = 0;
3115     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3116     /* xcb_render_glyph_t glyphs */
3117     xcb_parts[4].iov_base = (char *) glyphs;
3118     xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t);
3119     xcb_parts[5].iov_base = 0;
3120     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3121 
3122     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3123     return xcb_ret;
3124 }
3125 
3126 
3127 /*****************************************************************************
3128  **
3129  ** xcb_void_cookie_t xcb_render_free_glyphs
3130  **
3131  ** @param xcb_connection_t         *c
3132  ** @param xcb_render_glyphset_t     glyphset
3133  ** @param uint32_t                  glyphs_len
3134  ** @param const xcb_render_glyph_t *glyphs
3135  ** @returns xcb_void_cookie_t
3136  **
3137  *****************************************************************************/
3138 
3139 xcb_void_cookie_t
3140 xcb_render_free_glyphs (xcb_connection_t         *c  /**< */,
3141                         xcb_render_glyphset_t     glyphset  /**< */,
3142                         uint32_t                  glyphs_len  /**< */,
3143                         const xcb_render_glyph_t *glyphs  /**< */)
3144 {
3145     static const xcb_protocol_request_t xcb_req = {
3146         /* count */ 4,
3147         /* ext */ &xcb_render_id,
3148         /* opcode */ XCB_RENDER_FREE_GLYPHS,
3149         /* isvoid */ 1
3150     };
3151 
3152     struct iovec xcb_parts[6];
3153     xcb_void_cookie_t xcb_ret;
3154     xcb_render_free_glyphs_request_t xcb_out;
3155 
3156     xcb_out.glyphset = glyphset;
3157 
3158     xcb_parts[2].iov_base = (char *) &xcb_out;
3159     xcb_parts[2].iov_len = sizeof(xcb_out);
3160     xcb_parts[3].iov_base = 0;
3161     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3162     /* xcb_render_glyph_t glyphs */
3163     xcb_parts[4].iov_base = (char *) glyphs;
3164     xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t);
3165     xcb_parts[5].iov_base = 0;
3166     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3167 
3168     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3169     return xcb_ret;
3170 }
3171 
3172 int
3173 xcb_render_composite_glyphs_8_sizeof (const void  *_buffer  /**< */,
3174                                       uint32_t     glyphcmds_len  /**< */)
3175 {
3176     char *xcb_tmp = (char *)_buffer;
3177     unsigned int xcb_buffer_len = 0;
3178     unsigned int xcb_block_len = 0;
3179     unsigned int xcb_pad = 0;
3180     unsigned int xcb_align_to = 0;
3181 
3182 
3183     xcb_block_len += sizeof(xcb_render_composite_glyphs_8_request_t);
3184     xcb_tmp += xcb_block_len;
3185     xcb_buffer_len += xcb_block_len;
3186     xcb_block_len = 0;
3187     /* glyphcmds */
3188     xcb_block_len += glyphcmds_len * sizeof(uint8_t);
3189     xcb_tmp += xcb_block_len;
3190     xcb_align_to = ALIGNOF(uint8_t);
3191     /* insert padding */
3192     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3193     xcb_buffer_len += xcb_block_len + xcb_pad;
3194     if (0 != xcb_pad) {
3195         xcb_tmp += xcb_pad;
3196         xcb_pad = 0;
3197     }
3198     xcb_block_len = 0;
3199 
3200     return xcb_buffer_len;
3201 }
3202 
3203 
3204 /*****************************************************************************
3205  **
3206  ** xcb_void_cookie_t xcb_render_composite_glyphs_8_checked
3207  **
3208  ** @param xcb_connection_t        *c
3209  ** @param uint8_t                  op
3210  ** @param xcb_render_picture_t     src
3211  ** @param xcb_render_picture_t     dst
3212  ** @param xcb_render_pictformat_t  mask_format
3213  ** @param xcb_render_glyphset_t    glyphset
3214  ** @param int16_t                  src_x
3215  ** @param int16_t                  src_y
3216  ** @param uint32_t                 glyphcmds_len
3217  ** @param const uint8_t           *glyphcmds
3218  ** @returns xcb_void_cookie_t
3219  **
3220  *****************************************************************************/
3221 
3222 xcb_void_cookie_t
3223 xcb_render_composite_glyphs_8_checked (xcb_connection_t        *c  /**< */,
3224                                        uint8_t                  op  /**< */,
3225                                        xcb_render_picture_t     src  /**< */,
3226                                        xcb_render_picture_t     dst  /**< */,
3227                                        xcb_render_pictformat_t  mask_format  /**< */,
3228                                        xcb_render_glyphset_t    glyphset  /**< */,
3229                                        int16_t                  src_x  /**< */,
3230                                        int16_t                  src_y  /**< */,
3231                                        uint32_t                 glyphcmds_len  /**< */,
3232                                        const uint8_t           *glyphcmds  /**< */)
3233 {
3234     static const xcb_protocol_request_t xcb_req = {
3235         /* count */ 4,
3236         /* ext */ &xcb_render_id,
3237         /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8,
3238         /* isvoid */ 1
3239     };
3240 
3241     struct iovec xcb_parts[6];
3242     xcb_void_cookie_t xcb_ret;
3243     xcb_render_composite_glyphs_8_request_t xcb_out;
3244 
3245     xcb_out.op = op;
3246     memset(xcb_out.pad0, 0, 3);
3247     xcb_out.src = src;
3248     xcb_out.dst = dst;
3249     xcb_out.mask_format = mask_format;
3250     xcb_out.glyphset = glyphset;
3251     xcb_out.src_x = src_x;
3252     xcb_out.src_y = src_y;
3253 
3254     xcb_parts[2].iov_base = (char *) &xcb_out;
3255     xcb_parts[2].iov_len = sizeof(xcb_out);
3256     xcb_parts[3].iov_base = 0;
3257     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3258     /* uint8_t glyphcmds */
3259     xcb_parts[4].iov_base = (char *) glyphcmds;
3260     xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
3261     xcb_parts[5].iov_base = 0;
3262     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3263 
3264     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3265     return xcb_ret;
3266 }
3267 
3268 
3269 /*****************************************************************************
3270  **
3271  ** xcb_void_cookie_t xcb_render_composite_glyphs_8
3272  **
3273  ** @param xcb_connection_t        *c
3274  ** @param uint8_t                  op
3275  ** @param xcb_render_picture_t     src
3276  ** @param xcb_render_picture_t     dst
3277  ** @param xcb_render_pictformat_t  mask_format
3278  ** @param xcb_render_glyphset_t    glyphset
3279  ** @param int16_t                  src_x
3280  ** @param int16_t                  src_y
3281  ** @param uint32_t                 glyphcmds_len
3282  ** @param const uint8_t           *glyphcmds
3283  ** @returns xcb_void_cookie_t
3284  **
3285  *****************************************************************************/
3286 
3287 xcb_void_cookie_t
3288 xcb_render_composite_glyphs_8 (xcb_connection_t        *c  /**< */,
3289                                uint8_t                  op  /**< */,
3290                                xcb_render_picture_t     src  /**< */,
3291                                xcb_render_picture_t     dst  /**< */,
3292                                xcb_render_pictformat_t  mask_format  /**< */,
3293                                xcb_render_glyphset_t    glyphset  /**< */,
3294                                int16_t                  src_x  /**< */,
3295                                int16_t                  src_y  /**< */,
3296                                uint32_t                 glyphcmds_len  /**< */,
3297                                const uint8_t           *glyphcmds  /**< */)
3298 {
3299     static const xcb_protocol_request_t xcb_req = {
3300         /* count */ 4,
3301         /* ext */ &xcb_render_id,
3302         /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8,
3303         /* isvoid */ 1
3304     };
3305 
3306     struct iovec xcb_parts[6];
3307     xcb_void_cookie_t xcb_ret;
3308     xcb_render_composite_glyphs_8_request_t xcb_out;
3309 
3310     xcb_out.op = op;
3311     memset(xcb_out.pad0, 0, 3);
3312     xcb_out.src = src;
3313     xcb_out.dst = dst;
3314     xcb_out.mask_format = mask_format;
3315     xcb_out.glyphset = glyphset;
3316     xcb_out.src_x = src_x;
3317     xcb_out.src_y = src_y;
3318 
3319     xcb_parts[2].iov_base = (char *) &xcb_out;
3320     xcb_parts[2].iov_len = sizeof(xcb_out);
3321     xcb_parts[3].iov_base = 0;
3322     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3323     /* uint8_t glyphcmds */
3324     xcb_parts[4].iov_base = (char *) glyphcmds;
3325     xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
3326     xcb_parts[5].iov_base = 0;
3327     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3328 
3329     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3330     return xcb_ret;
3331 }
3332 
3333 int
3334 xcb_render_composite_glyphs_16_sizeof (const void  *_buffer  /**< */,
3335                                        uint32_t     glyphcmds_len  /**< */)
3336 {
3337     char *xcb_tmp = (char *)_buffer;
3338     unsigned int xcb_buffer_len = 0;
3339     unsigned int xcb_block_len = 0;
3340     unsigned int xcb_pad = 0;
3341     unsigned int xcb_align_to = 0;
3342 
3343 
3344     xcb_block_len += sizeof(xcb_render_composite_glyphs_16_request_t);
3345     xcb_tmp += xcb_block_len;
3346     xcb_buffer_len += xcb_block_len;
3347     xcb_block_len = 0;
3348     /* glyphcmds */
3349     xcb_block_len += glyphcmds_len * sizeof(uint8_t);
3350     xcb_tmp += xcb_block_len;
3351     xcb_align_to = ALIGNOF(uint8_t);
3352     /* insert padding */
3353     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3354     xcb_buffer_len += xcb_block_len + xcb_pad;
3355     if (0 != xcb_pad) {
3356         xcb_tmp += xcb_pad;
3357         xcb_pad = 0;
3358     }
3359     xcb_block_len = 0;
3360 
3361     return xcb_buffer_len;
3362 }
3363 
3364 
3365 /*****************************************************************************
3366  **
3367  ** xcb_void_cookie_t xcb_render_composite_glyphs_16_checked
3368  **
3369  ** @param xcb_connection_t        *c
3370  ** @param uint8_t                  op
3371  ** @param xcb_render_picture_t     src
3372  ** @param xcb_render_picture_t     dst
3373  ** @param xcb_render_pictformat_t  mask_format
3374  ** @param xcb_render_glyphset_t    glyphset
3375  ** @param int16_t                  src_x
3376  ** @param int16_t                  src_y
3377  ** @param uint32_t                 glyphcmds_len
3378  ** @param const uint8_t           *glyphcmds
3379  ** @returns xcb_void_cookie_t
3380  **
3381  *****************************************************************************/
3382 
3383 xcb_void_cookie_t
3384 xcb_render_composite_glyphs_16_checked (xcb_connection_t        *c  /**< */,
3385                                         uint8_t                  op  /**< */,
3386                                         xcb_render_picture_t     src  /**< */,
3387                                         xcb_render_picture_t     dst  /**< */,
3388                                         xcb_render_pictformat_t  mask_format  /**< */,
3389                                         xcb_render_glyphset_t    glyphset  /**< */,
3390                                         int16_t                  src_x  /**< */,
3391                                         int16_t                  src_y  /**< */,
3392                                         uint32_t                 glyphcmds_len  /**< */,
3393                                         const uint8_t           *glyphcmds  /**< */)
3394 {
3395     static const xcb_protocol_request_t xcb_req = {
3396         /* count */ 4,
3397         /* ext */ &xcb_render_id,
3398         /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16,
3399         /* isvoid */ 1
3400     };
3401 
3402     struct iovec xcb_parts[6];
3403     xcb_void_cookie_t xcb_ret;
3404     xcb_render_composite_glyphs_16_request_t xcb_out;
3405 
3406     xcb_out.op = op;
3407     memset(xcb_out.pad0, 0, 3);
3408     xcb_out.src = src;
3409     xcb_out.dst = dst;
3410     xcb_out.mask_format = mask_format;
3411     xcb_out.glyphset = glyphset;
3412     xcb_out.src_x = src_x;
3413     xcb_out.src_y = src_y;
3414 
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     /* uint8_t glyphcmds */
3420     xcb_parts[4].iov_base = (char *) glyphcmds;
3421     xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
3422     xcb_parts[5].iov_base = 0;
3423     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3424 
3425     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3426     return xcb_ret;
3427 }
3428 
3429 
3430 /*****************************************************************************
3431  **
3432  ** xcb_void_cookie_t xcb_render_composite_glyphs_16
3433  **
3434  ** @param xcb_connection_t        *c
3435  ** @param uint8_t                  op
3436  ** @param xcb_render_picture_t     src
3437  ** @param xcb_render_picture_t     dst
3438  ** @param xcb_render_pictformat_t  mask_format
3439  ** @param xcb_render_glyphset_t    glyphset
3440  ** @param int16_t                  src_x
3441  ** @param int16_t                  src_y
3442  ** @param uint32_t                 glyphcmds_len
3443  ** @param const uint8_t           *glyphcmds
3444  ** @returns xcb_void_cookie_t
3445  **
3446  *****************************************************************************/
3447 
3448 xcb_void_cookie_t
3449 xcb_render_composite_glyphs_16 (xcb_connection_t        *c  /**< */,
3450                                 uint8_t                  op  /**< */,
3451                                 xcb_render_picture_t     src  /**< */,
3452                                 xcb_render_picture_t     dst  /**< */,
3453                                 xcb_render_pictformat_t  mask_format  /**< */,
3454                                 xcb_render_glyphset_t    glyphset  /**< */,
3455                                 int16_t                  src_x  /**< */,
3456                                 int16_t                  src_y  /**< */,
3457                                 uint32_t                 glyphcmds_len  /**< */,
3458                                 const uint8_t           *glyphcmds  /**< */)
3459 {
3460     static const xcb_protocol_request_t xcb_req = {
3461         /* count */ 4,
3462         /* ext */ &xcb_render_id,
3463         /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16,
3464         /* isvoid */ 1
3465     };
3466 
3467     struct iovec xcb_parts[6];
3468     xcb_void_cookie_t xcb_ret;
3469     xcb_render_composite_glyphs_16_request_t xcb_out;
3470 
3471     xcb_out.op = op;
3472     memset(xcb_out.pad0, 0, 3);
3473     xcb_out.src = src;
3474     xcb_out.dst = dst;
3475     xcb_out.mask_format = mask_format;
3476     xcb_out.glyphset = glyphset;
3477     xcb_out.src_x = src_x;
3478     xcb_out.src_y = src_y;
3479 
3480     xcb_parts[2].iov_base = (char *) &xcb_out;
3481     xcb_parts[2].iov_len = sizeof(xcb_out);
3482     xcb_parts[3].iov_base = 0;
3483     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3484     /* uint8_t glyphcmds */
3485     xcb_parts[4].iov_base = (char *) glyphcmds;
3486     xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
3487     xcb_parts[5].iov_base = 0;
3488     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3489 
3490     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3491     return xcb_ret;
3492 }
3493 
3494 int
3495 xcb_render_composite_glyphs_32_sizeof (const void  *_buffer  /**< */,
3496                                        uint32_t     glyphcmds_len  /**< */)
3497 {
3498     char *xcb_tmp = (char *)_buffer;
3499     unsigned int xcb_buffer_len = 0;
3500     unsigned int xcb_block_len = 0;
3501     unsigned int xcb_pad = 0;
3502     unsigned int xcb_align_to = 0;
3503 
3504 
3505     xcb_block_len += sizeof(xcb_render_composite_glyphs_32_request_t);
3506     xcb_tmp += xcb_block_len;
3507     xcb_buffer_len += xcb_block_len;
3508     xcb_block_len = 0;
3509     /* glyphcmds */
3510     xcb_block_len += glyphcmds_len * sizeof(uint8_t);
3511     xcb_tmp += xcb_block_len;
3512     xcb_align_to = ALIGNOF(uint8_t);
3513     /* insert padding */
3514     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3515     xcb_buffer_len += xcb_block_len + xcb_pad;
3516     if (0 != xcb_pad) {
3517         xcb_tmp += xcb_pad;
3518         xcb_pad = 0;
3519     }
3520     xcb_block_len = 0;
3521 
3522     return xcb_buffer_len;
3523 }
3524 
3525 
3526 /*****************************************************************************
3527  **
3528  ** xcb_void_cookie_t xcb_render_composite_glyphs_32_checked
3529  **
3530  ** @param xcb_connection_t        *c
3531  ** @param uint8_t                  op
3532  ** @param xcb_render_picture_t     src
3533  ** @param xcb_render_picture_t     dst
3534  ** @param xcb_render_pictformat_t  mask_format
3535  ** @param xcb_render_glyphset_t    glyphset
3536  ** @param int16_t                  src_x
3537  ** @param int16_t                  src_y
3538  ** @param uint32_t                 glyphcmds_len
3539  ** @param const uint8_t           *glyphcmds
3540  ** @returns xcb_void_cookie_t
3541  **
3542  *****************************************************************************/
3543 
3544 xcb_void_cookie_t
3545 xcb_render_composite_glyphs_32_checked (xcb_connection_t        *c  /**< */,
3546                                         uint8_t                  op  /**< */,
3547                                         xcb_render_picture_t     src  /**< */,
3548                                         xcb_render_picture_t     dst  /**< */,
3549                                         xcb_render_pictformat_t  mask_format  /**< */,
3550                                         xcb_render_glyphset_t    glyphset  /**< */,
3551                                         int16_t                  src_x  /**< */,
3552                                         int16_t                  src_y  /**< */,
3553                                         uint32_t                 glyphcmds_len  /**< */,
3554                                         const uint8_t           *glyphcmds  /**< */)
3555 {
3556     static const xcb_protocol_request_t xcb_req = {
3557         /* count */ 4,
3558         /* ext */ &xcb_render_id,
3559         /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32,
3560         /* isvoid */ 1
3561     };
3562 
3563     struct iovec xcb_parts[6];
3564     xcb_void_cookie_t xcb_ret;
3565     xcb_render_composite_glyphs_32_request_t xcb_out;
3566 
3567     xcb_out.op = op;
3568     memset(xcb_out.pad0, 0, 3);
3569     xcb_out.src = src;
3570     xcb_out.dst = dst;
3571     xcb_out.mask_format = mask_format;
3572     xcb_out.glyphset = glyphset;
3573     xcb_out.src_x = src_x;
3574     xcb_out.src_y = src_y;
3575 
3576     xcb_parts[2].iov_base = (char *) &xcb_out;
3577     xcb_parts[2].iov_len = sizeof(xcb_out);
3578     xcb_parts[3].iov_base = 0;
3579     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3580     /* uint8_t glyphcmds */
3581     xcb_parts[4].iov_base = (char *) glyphcmds;
3582     xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
3583     xcb_parts[5].iov_base = 0;
3584     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3585 
3586     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3587     return xcb_ret;
3588 }
3589 
3590 
3591 /*****************************************************************************
3592  **
3593  ** xcb_void_cookie_t xcb_render_composite_glyphs_32
3594  **
3595  ** @param xcb_connection_t        *c
3596  ** @param uint8_t                  op
3597  ** @param xcb_render_picture_t     src
3598  ** @param xcb_render_picture_t     dst
3599  ** @param xcb_render_pictformat_t  mask_format
3600  ** @param xcb_render_glyphset_t    glyphset
3601  ** @param int16_t                  src_x
3602  ** @param int16_t                  src_y
3603  ** @param uint32_t                 glyphcmds_len
3604  ** @param const uint8_t           *glyphcmds
3605  ** @returns xcb_void_cookie_t
3606  **
3607  *****************************************************************************/
3608 
3609 xcb_void_cookie_t
3610 xcb_render_composite_glyphs_32 (xcb_connection_t        *c  /**< */,
3611                                 uint8_t                  op  /**< */,
3612                                 xcb_render_picture_t     src  /**< */,
3613                                 xcb_render_picture_t     dst  /**< */,
3614                                 xcb_render_pictformat_t  mask_format  /**< */,
3615                                 xcb_render_glyphset_t    glyphset  /**< */,
3616                                 int16_t                  src_x  /**< */,
3617                                 int16_t                  src_y  /**< */,
3618                                 uint32_t                 glyphcmds_len  /**< */,
3619                                 const uint8_t           *glyphcmds  /**< */)
3620 {
3621     static const xcb_protocol_request_t xcb_req = {
3622         /* count */ 4,
3623         /* ext */ &xcb_render_id,
3624         /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32,
3625         /* isvoid */ 1
3626     };
3627 
3628     struct iovec xcb_parts[6];
3629     xcb_void_cookie_t xcb_ret;
3630     xcb_render_composite_glyphs_32_request_t xcb_out;
3631 
3632     xcb_out.op = op;
3633     memset(xcb_out.pad0, 0, 3);
3634     xcb_out.src = src;
3635     xcb_out.dst = dst;
3636     xcb_out.mask_format = mask_format;
3637     xcb_out.glyphset = glyphset;
3638     xcb_out.src_x = src_x;
3639     xcb_out.src_y = src_y;
3640 
3641     xcb_parts[2].iov_base = (char *) &xcb_out;
3642     xcb_parts[2].iov_len = sizeof(xcb_out);
3643     xcb_parts[3].iov_base = 0;
3644     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3645     /* uint8_t glyphcmds */
3646     xcb_parts[4].iov_base = (char *) glyphcmds;
3647     xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
3648     xcb_parts[5].iov_base = 0;
3649     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3650 
3651     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3652     return xcb_ret;
3653 }
3654 
3655 int
3656 xcb_render_fill_rectangles_sizeof (const void  *_buffer  /**< */,
3657                                    uint32_t     rects_len  /**< */)
3658 {
3659     char *xcb_tmp = (char *)_buffer;
3660     unsigned int xcb_buffer_len = 0;
3661     unsigned int xcb_block_len = 0;
3662     unsigned int xcb_pad = 0;
3663     unsigned int xcb_align_to = 0;
3664 
3665 
3666     xcb_block_len += sizeof(xcb_render_fill_rectangles_request_t);
3667     xcb_tmp += xcb_block_len;
3668     xcb_buffer_len += xcb_block_len;
3669     xcb_block_len = 0;
3670     /* rects */
3671     xcb_block_len += rects_len * sizeof(xcb_rectangle_t);
3672     xcb_tmp += xcb_block_len;
3673     xcb_align_to = ALIGNOF(xcb_rectangle_t);
3674     /* insert padding */
3675     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3676     xcb_buffer_len += xcb_block_len + xcb_pad;
3677     if (0 != xcb_pad) {
3678         xcb_tmp += xcb_pad;
3679         xcb_pad = 0;
3680     }
3681     xcb_block_len = 0;
3682 
3683     return xcb_buffer_len;
3684 }
3685 
3686 
3687 /*****************************************************************************
3688  **
3689  ** xcb_void_cookie_t xcb_render_fill_rectangles_checked
3690  **
3691  ** @param xcb_connection_t      *c
3692  ** @param uint8_t                op
3693  ** @param xcb_render_picture_t   dst
3694  ** @param xcb_render_color_t     color
3695  ** @param uint32_t               rects_len
3696  ** @param const xcb_rectangle_t *rects
3697  ** @returns xcb_void_cookie_t
3698  **
3699  *****************************************************************************/
3700 
3701 xcb_void_cookie_t
3702 xcb_render_fill_rectangles_checked (xcb_connection_t      *c  /**< */,
3703                                     uint8_t                op  /**< */,
3704                                     xcb_render_picture_t   dst  /**< */,
3705                                     xcb_render_color_t     color  /**< */,
3706                                     uint32_t               rects_len  /**< */,
3707                                     const xcb_rectangle_t *rects  /**< */)
3708 {
3709     static const xcb_protocol_request_t xcb_req = {
3710         /* count */ 4,
3711         /* ext */ &xcb_render_id,
3712         /* opcode */ XCB_RENDER_FILL_RECTANGLES,
3713         /* isvoid */ 1
3714     };
3715 
3716     struct iovec xcb_parts[6];
3717     xcb_void_cookie_t xcb_ret;
3718     xcb_render_fill_rectangles_request_t xcb_out;
3719 
3720     xcb_out.op = op;
3721     memset(xcb_out.pad0, 0, 3);
3722     xcb_out.dst = dst;
3723     xcb_out.color = color;
3724 
3725     xcb_parts[2].iov_base = (char *) &xcb_out;
3726     xcb_parts[2].iov_len = sizeof(xcb_out);
3727     xcb_parts[3].iov_base = 0;
3728     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3729     /* xcb_rectangle_t rects */
3730     xcb_parts[4].iov_base = (char *) rects;
3731     xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t);
3732     xcb_parts[5].iov_base = 0;
3733     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3734 
3735     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3736     return xcb_ret;
3737 }
3738 
3739 
3740 /*****************************************************************************
3741  **
3742  ** xcb_void_cookie_t xcb_render_fill_rectangles
3743  **
3744  ** @param xcb_connection_t      *c
3745  ** @param uint8_t                op
3746  ** @param xcb_render_picture_t   dst
3747  ** @param xcb_render_color_t     color
3748  ** @param uint32_t               rects_len
3749  ** @param const xcb_rectangle_t *rects
3750  ** @returns xcb_void_cookie_t
3751  **
3752  *****************************************************************************/
3753 
3754 xcb_void_cookie_t
3755 xcb_render_fill_rectangles (xcb_connection_t      *c  /**< */,
3756                             uint8_t                op  /**< */,
3757                             xcb_render_picture_t   dst  /**< */,
3758                             xcb_render_color_t     color  /**< */,
3759                             uint32_t               rects_len  /**< */,
3760                             const xcb_rectangle_t *rects  /**< */)
3761 {
3762     static const xcb_protocol_request_t xcb_req = {
3763         /* count */ 4,
3764         /* ext */ &xcb_render_id,
3765         /* opcode */ XCB_RENDER_FILL_RECTANGLES,
3766         /* isvoid */ 1
3767     };
3768 
3769     struct iovec xcb_parts[6];
3770     xcb_void_cookie_t xcb_ret;
3771     xcb_render_fill_rectangles_request_t xcb_out;
3772 
3773     xcb_out.op = op;
3774     memset(xcb_out.pad0, 0, 3);
3775     xcb_out.dst = dst;
3776     xcb_out.color = color;
3777 
3778     xcb_parts[2].iov_base = (char *) &xcb_out;
3779     xcb_parts[2].iov_len = sizeof(xcb_out);
3780     xcb_parts[3].iov_base = 0;
3781     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3782     /* xcb_rectangle_t rects */
3783     xcb_parts[4].iov_base = (char *) rects;
3784     xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t);
3785     xcb_parts[5].iov_base = 0;
3786     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3787 
3788     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3789     return xcb_ret;
3790 }
3791 
3792 
3793 /*****************************************************************************
3794  **
3795  ** xcb_void_cookie_t xcb_render_create_cursor_checked
3796  **
3797  ** @param xcb_connection_t     *c
3798  ** @param xcb_cursor_t          cid
3799  ** @param xcb_render_picture_t  source
3800  ** @param uint16_t              x
3801  ** @param uint16_t              y
3802  ** @returns xcb_void_cookie_t
3803  **
3804  *****************************************************************************/
3805 
3806 xcb_void_cookie_t
3807 xcb_render_create_cursor_checked (xcb_connection_t     *c  /**< */,
3808                                   xcb_cursor_t          cid  /**< */,
3809                                   xcb_render_picture_t  source  /**< */,
3810                                   uint16_t              x  /**< */,
3811                                   uint16_t              y  /**< */)
3812 {
3813     static const xcb_protocol_request_t xcb_req = {
3814         /* count */ 2,
3815         /* ext */ &xcb_render_id,
3816         /* opcode */ XCB_RENDER_CREATE_CURSOR,
3817         /* isvoid */ 1
3818     };
3819 
3820     struct iovec xcb_parts[4];
3821     xcb_void_cookie_t xcb_ret;
3822     xcb_render_create_cursor_request_t xcb_out;
3823 
3824     xcb_out.cid = cid;
3825     xcb_out.source = source;
3826     xcb_out.x = x;
3827     xcb_out.y = y;
3828 
3829     xcb_parts[2].iov_base = (char *) &xcb_out;
3830     xcb_parts[2].iov_len = sizeof(xcb_out);
3831     xcb_parts[3].iov_base = 0;
3832     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3833 
3834     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3835     return xcb_ret;
3836 }
3837 
3838 
3839 /*****************************************************************************
3840  **
3841  ** xcb_void_cookie_t xcb_render_create_cursor
3842  **
3843  ** @param xcb_connection_t     *c
3844  ** @param xcb_cursor_t          cid
3845  ** @param xcb_render_picture_t  source
3846  ** @param uint16_t              x
3847  ** @param uint16_t              y
3848  ** @returns xcb_void_cookie_t
3849  **
3850  *****************************************************************************/
3851 
3852 xcb_void_cookie_t
3853 xcb_render_create_cursor (xcb_connection_t     *c  /**< */,
3854                           xcb_cursor_t          cid  /**< */,
3855                           xcb_render_picture_t  source  /**< */,
3856                           uint16_t              x  /**< */,
3857                           uint16_t              y  /**< */)
3858 {
3859     static const xcb_protocol_request_t xcb_req = {
3860         /* count */ 2,
3861         /* ext */ &xcb_render_id,
3862         /* opcode */ XCB_RENDER_CREATE_CURSOR,
3863         /* isvoid */ 1
3864     };
3865 
3866     struct iovec xcb_parts[4];
3867     xcb_void_cookie_t xcb_ret;
3868     xcb_render_create_cursor_request_t xcb_out;
3869 
3870     xcb_out.cid = cid;
3871     xcb_out.source = source;
3872     xcb_out.x = x;
3873     xcb_out.y = y;
3874 
3875     xcb_parts[2].iov_base = (char *) &xcb_out;
3876     xcb_parts[2].iov_len = sizeof(xcb_out);
3877     xcb_parts[3].iov_base = 0;
3878     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3879 
3880     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3881     return xcb_ret;
3882 }
3883 
3884 
3885 /*****************************************************************************
3886  **
3887  ** void xcb_render_transform_next
3888  **
3889  ** @param xcb_render_transform_iterator_t *i
3890  ** @returns void
3891  **
3892  *****************************************************************************/
3893 
3894 void
3895 xcb_render_transform_next (xcb_render_transform_iterator_t *i  /**< */)
3896 {
3897     --i->rem;
3898     ++i->data;
3899     i->index += sizeof(xcb_render_transform_t);
3900 }
3901 
3902 
3903 /*****************************************************************************
3904  **
3905  ** xcb_generic_iterator_t xcb_render_transform_end
3906  **
3907  ** @param xcb_render_transform_iterator_t i
3908  ** @returns xcb_generic_iterator_t
3909  **
3910  *****************************************************************************/
3911 
3912 xcb_generic_iterator_t
3913 xcb_render_transform_end (xcb_render_transform_iterator_t i  /**< */)
3914 {
3915     xcb_generic_iterator_t ret;
3916     ret.data = i.data + i.rem;
3917     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3918     ret.rem = 0;
3919     return ret;
3920 }
3921 
3922 
3923 /*****************************************************************************
3924  **
3925  ** xcb_void_cookie_t xcb_render_set_picture_transform_checked
3926  **
3927  ** @param xcb_connection_t       *c
3928  ** @param xcb_render_picture_t    picture
3929  ** @param xcb_render_transform_t  transform
3930  ** @returns xcb_void_cookie_t
3931  **
3932  *****************************************************************************/
3933 
3934 xcb_void_cookie_t
3935 xcb_render_set_picture_transform_checked (xcb_connection_t       *c  /**< */,
3936                                           xcb_render_picture_t    picture  /**< */,
3937                                           xcb_render_transform_t  transform  /**< */)
3938 {
3939     static const xcb_protocol_request_t xcb_req = {
3940         /* count */ 2,
3941         /* ext */ &xcb_render_id,
3942         /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM,
3943         /* isvoid */ 1
3944     };
3945 
3946     struct iovec xcb_parts[4];
3947     xcb_void_cookie_t xcb_ret;
3948     xcb_render_set_picture_transform_request_t xcb_out;
3949 
3950     xcb_out.picture = picture;
3951     xcb_out.transform = transform;
3952 
3953     xcb_parts[2].iov_base = (char *) &xcb_out;
3954     xcb_parts[2].iov_len = sizeof(xcb_out);
3955     xcb_parts[3].iov_base = 0;
3956     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3957 
3958     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3959     return xcb_ret;
3960 }
3961 
3962 
3963 /*****************************************************************************
3964  **
3965  ** xcb_void_cookie_t xcb_render_set_picture_transform
3966  **
3967  ** @param xcb_connection_t       *c
3968  ** @param xcb_render_picture_t    picture
3969  ** @param xcb_render_transform_t  transform
3970  ** @returns xcb_void_cookie_t
3971  **
3972  *****************************************************************************/
3973 
3974 xcb_void_cookie_t
3975 xcb_render_set_picture_transform (xcb_connection_t       *c  /**< */,
3976                                   xcb_render_picture_t    picture  /**< */,
3977                                   xcb_render_transform_t  transform  /**< */)
3978 {
3979     static const xcb_protocol_request_t xcb_req = {
3980         /* count */ 2,
3981         /* ext */ &xcb_render_id,
3982         /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM,
3983         /* isvoid */ 1
3984     };
3985 
3986     struct iovec xcb_parts[4];
3987     xcb_void_cookie_t xcb_ret;
3988     xcb_render_set_picture_transform_request_t xcb_out;
3989 
3990     xcb_out.picture = picture;
3991     xcb_out.transform = transform;
3992 
3993     xcb_parts[2].iov_base = (char *) &xcb_out;
3994     xcb_parts[2].iov_len = sizeof(xcb_out);
3995     xcb_parts[3].iov_base = 0;
3996     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3997 
3998     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3999     return xcb_ret;
4000 }
4001 
4002 int
4003 xcb_render_query_filters_sizeof (const void  *_buffer  /**< */)
4004 {
4005     char *xcb_tmp = (char *)_buffer;
4006     const xcb_render_query_filters_reply_t *_aux = (xcb_render_query_filters_reply_t *)_buffer;
4007     unsigned int xcb_buffer_len = 0;
4008     unsigned int xcb_block_len = 0;
4009     unsigned int xcb_pad = 0;
4010     unsigned int xcb_align_to = 0;
4011 
4012     unsigned int i;
4013     unsigned int xcb_tmp_len;
4014 
4015     xcb_block_len += sizeof(xcb_render_query_filters_reply_t);
4016     xcb_tmp += xcb_block_len;
4017     xcb_buffer_len += xcb_block_len;
4018     xcb_block_len = 0;
4019     /* aliases */
4020     xcb_block_len += _aux->num_aliases * sizeof(uint16_t);
4021     xcb_tmp += xcb_block_len;
4022     xcb_align_to = ALIGNOF(uint16_t);
4023     /* insert padding */
4024     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4025     xcb_buffer_len += xcb_block_len + xcb_pad;
4026     if (0 != xcb_pad) {
4027         xcb_tmp += xcb_pad;
4028         xcb_pad = 0;
4029     }
4030     xcb_block_len = 0;
4031     /* filters */
4032     for(i=0; i<_aux->num_filters; i++) {
4033         xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
4034         xcb_block_len += xcb_tmp_len;
4035         xcb_tmp += xcb_tmp_len;
4036     }
4037     xcb_align_to = ALIGNOF(xcb_str_t);
4038     /* insert padding */
4039     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4040     xcb_buffer_len += xcb_block_len + xcb_pad;
4041     if (0 != xcb_pad) {
4042         xcb_tmp += xcb_pad;
4043         xcb_pad = 0;
4044     }
4045     xcb_block_len = 0;
4046 
4047     return xcb_buffer_len;
4048 }
4049 
4050 
4051 /*****************************************************************************
4052  **
4053  ** xcb_render_query_filters_cookie_t xcb_render_query_filters
4054  **
4055  ** @param xcb_connection_t *c
4056  ** @param xcb_drawable_t    drawable
4057  ** @returns xcb_render_query_filters_cookie_t
4058  **
4059  *****************************************************************************/
4060 
4061 xcb_render_query_filters_cookie_t
4062 xcb_render_query_filters (xcb_connection_t *c  /**< */,
4063                           xcb_drawable_t    drawable  /**< */)
4064 {
4065     static const xcb_protocol_request_t xcb_req = {
4066         /* count */ 2,
4067         /* ext */ &xcb_render_id,
4068         /* opcode */ XCB_RENDER_QUERY_FILTERS,
4069         /* isvoid */ 0
4070     };
4071 
4072     struct iovec xcb_parts[4];
4073     xcb_render_query_filters_cookie_t xcb_ret;
4074     xcb_render_query_filters_request_t xcb_out;
4075 
4076     xcb_out.drawable = drawable;
4077 
4078     xcb_parts[2].iov_base = (char *) &xcb_out;
4079     xcb_parts[2].iov_len = sizeof(xcb_out);
4080     xcb_parts[3].iov_base = 0;
4081     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4082 
4083     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4084     return xcb_ret;
4085 }
4086 
4087 
4088 /*****************************************************************************
4089  **
4090  ** xcb_render_query_filters_cookie_t xcb_render_query_filters_unchecked
4091  **
4092  ** @param xcb_connection_t *c
4093  ** @param xcb_drawable_t    drawable
4094  ** @returns xcb_render_query_filters_cookie_t
4095  **
4096  *****************************************************************************/
4097 
4098 xcb_render_query_filters_cookie_t
4099 xcb_render_query_filters_unchecked (xcb_connection_t *c  /**< */,
4100                                     xcb_drawable_t    drawable  /**< */)
4101 {
4102     static const xcb_protocol_request_t xcb_req = {
4103         /* count */ 2,
4104         /* ext */ &xcb_render_id,
4105         /* opcode */ XCB_RENDER_QUERY_FILTERS,
4106         /* isvoid */ 0
4107     };
4108 
4109     struct iovec xcb_parts[4];
4110     xcb_render_query_filters_cookie_t xcb_ret;
4111     xcb_render_query_filters_request_t xcb_out;
4112 
4113     xcb_out.drawable = drawable;
4114 
4115     xcb_parts[2].iov_base = (char *) &xcb_out;
4116     xcb_parts[2].iov_len = sizeof(xcb_out);
4117     xcb_parts[3].iov_base = 0;
4118     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4119 
4120     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4121     return xcb_ret;
4122 }
4123 
4124 
4125 /*****************************************************************************
4126  **
4127  ** uint16_t * xcb_render_query_filters_aliases
4128  **
4129  ** @param const xcb_render_query_filters_reply_t *R
4130  ** @returns uint16_t *
4131  **
4132  *****************************************************************************/
4133 
4134 uint16_t *
4135 xcb_render_query_filters_aliases (const xcb_render_query_filters_reply_t *R  /**< */)
4136 {
4137     return (uint16_t *) (R + 1);
4138 }
4139 
4140 
4141 /*****************************************************************************
4142  **
4143  ** int xcb_render_query_filters_aliases_length
4144  **
4145  ** @param const xcb_render_query_filters_reply_t *R
4146  ** @returns int
4147  **
4148  *****************************************************************************/
4149 
4150 int
4151 xcb_render_query_filters_aliases_length (const xcb_render_query_filters_reply_t *R  /**< */)
4152 {
4153     return R->num_aliases;
4154 }
4155 
4156 
4157 /*****************************************************************************
4158  **
4159  ** xcb_generic_iterator_t xcb_render_query_filters_aliases_end
4160  **
4161  ** @param const xcb_render_query_filters_reply_t *R
4162  ** @returns xcb_generic_iterator_t
4163  **
4164  *****************************************************************************/
4165 
4166 xcb_generic_iterator_t
4167 xcb_render_query_filters_aliases_end (const xcb_render_query_filters_reply_t *R  /**< */)
4168 {
4169     xcb_generic_iterator_t i;
4170     i.data = ((uint16_t *) (R + 1)) + (R->num_aliases);
4171     i.rem = 0;
4172     i.index = (char *) i.data - (char *) R;
4173     return i;
4174 }
4175 
4176 
4177 /*****************************************************************************
4178  **
4179  ** int xcb_render_query_filters_filters_length
4180  **
4181  ** @param const xcb_render_query_filters_reply_t *R
4182  ** @returns int
4183  **
4184  *****************************************************************************/
4185 
4186 int
4187 xcb_render_query_filters_filters_length (const xcb_render_query_filters_reply_t *R  /**< */)
4188 {
4189     return R->num_filters;
4190 }
4191 
4192 
4193 /*****************************************************************************
4194  **
4195  ** xcb_str_iterator_t xcb_render_query_filters_filters_iterator
4196  **
4197  ** @param const xcb_render_query_filters_reply_t *R
4198  ** @returns xcb_str_iterator_t
4199  **
4200  *****************************************************************************/
4201 
4202 xcb_str_iterator_t
4203 xcb_render_query_filters_filters_iterator (const xcb_render_query_filters_reply_t *R  /**< */)
4204 {
4205     xcb_str_iterator_t i;
4206     xcb_generic_iterator_t prev = xcb_render_query_filters_aliases_end(R);
4207     i.data = (xcb_str_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_str_t, prev.index));
4208     i.rem = R->num_filters;
4209     i.index = (char *) i.data - (char *) R;
4210     return i;
4211 }
4212 
4213 
4214 /*****************************************************************************
4215  **
4216  ** xcb_render_query_filters_reply_t * xcb_render_query_filters_reply
4217  **
4218  ** @param xcb_connection_t                   *c
4219  ** @param xcb_render_query_filters_cookie_t   cookie
4220  ** @param xcb_generic_error_t               **e
4221  ** @returns xcb_render_query_filters_reply_t *
4222  **
4223  *****************************************************************************/
4224 
4225 xcb_render_query_filters_reply_t *
4226 xcb_render_query_filters_reply (xcb_connection_t                   *c  /**< */,
4227                                 xcb_render_query_filters_cookie_t   cookie  /**< */,
4228                                 xcb_generic_error_t               **e  /**< */)
4229 {
4230     return (xcb_render_query_filters_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4231 }
4232 
4233 int
4234 xcb_render_set_picture_filter_sizeof (const void  *_buffer  /**< */,
4235                                       uint32_t     values_len  /**< */)
4236 {
4237     char *xcb_tmp = (char *)_buffer;
4238     const xcb_render_set_picture_filter_request_t *_aux = (xcb_render_set_picture_filter_request_t *)_buffer;
4239     unsigned int xcb_buffer_len = 0;
4240     unsigned int xcb_block_len = 0;
4241     unsigned int xcb_pad = 0;
4242     unsigned int xcb_align_to = 0;
4243 
4244 
4245     xcb_block_len += sizeof(xcb_render_set_picture_filter_request_t);
4246     xcb_tmp += xcb_block_len;
4247     xcb_buffer_len += xcb_block_len;
4248     xcb_block_len = 0;
4249     /* filter */
4250     xcb_block_len += _aux->filter_len * sizeof(char);
4251     xcb_tmp += xcb_block_len;
4252     xcb_align_to = ALIGNOF(char);
4253     /* insert padding */
4254     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4255     xcb_buffer_len += xcb_block_len + xcb_pad;
4256     if (0 != xcb_pad) {
4257         xcb_tmp += xcb_pad;
4258         xcb_pad = 0;
4259     }
4260     xcb_block_len = 0;
4261     /* values */
4262     xcb_block_len += values_len * sizeof(xcb_render_fixed_t);
4263     xcb_tmp += xcb_block_len;
4264     xcb_align_to = ALIGNOF(xcb_render_fixed_t);
4265     /* insert padding */
4266     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4267     xcb_buffer_len += xcb_block_len + xcb_pad;
4268     if (0 != xcb_pad) {
4269         xcb_tmp += xcb_pad;
4270         xcb_pad = 0;
4271     }
4272     xcb_block_len = 0;
4273 
4274     return xcb_buffer_len;
4275 }
4276 
4277 
4278 /*****************************************************************************
4279  **
4280  ** xcb_void_cookie_t xcb_render_set_picture_filter_checked
4281  **
4282  ** @param xcb_connection_t         *c
4283  ** @param xcb_render_picture_t      picture
4284  ** @param uint16_t                  filter_len
4285  ** @param const char               *filter
4286  ** @param uint32_t                  values_len
4287  ** @param const xcb_render_fixed_t *values
4288  ** @returns xcb_void_cookie_t
4289  **
4290  *****************************************************************************/
4291 
4292 xcb_void_cookie_t
4293 xcb_render_set_picture_filter_checked (xcb_connection_t         *c  /**< */,
4294                                        xcb_render_picture_t      picture  /**< */,
4295                                        uint16_t                  filter_len  /**< */,
4296                                        const char               *filter  /**< */,
4297                                        uint32_t                  values_len  /**< */,
4298                                        const xcb_render_fixed_t *values  /**< */)
4299 {
4300     static const xcb_protocol_request_t xcb_req = {
4301         /* count */ 6,
4302         /* ext */ &xcb_render_id,
4303         /* opcode */ XCB_RENDER_SET_PICTURE_FILTER,
4304         /* isvoid */ 1
4305     };
4306 
4307     struct iovec xcb_parts[8];
4308     xcb_void_cookie_t xcb_ret;
4309     xcb_render_set_picture_filter_request_t xcb_out;
4310 
4311     xcb_out.picture = picture;
4312     xcb_out.filter_len = filter_len;
4313     memset(xcb_out.pad0, 0, 2);
4314 
4315     xcb_parts[2].iov_base = (char *) &xcb_out;
4316     xcb_parts[2].iov_len = sizeof(xcb_out);
4317     xcb_parts[3].iov_base = 0;
4318     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4319     /* char filter */
4320     xcb_parts[4].iov_base = (char *) filter;
4321     xcb_parts[4].iov_len = filter_len * sizeof(char);
4322     xcb_parts[5].iov_base = 0;
4323     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4324     /* xcb_render_fixed_t values */
4325     xcb_parts[6].iov_base = (char *) values;
4326     xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t);
4327     xcb_parts[7].iov_base = 0;
4328     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
4329 
4330     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4331     return xcb_ret;
4332 }
4333 
4334 
4335 /*****************************************************************************
4336  **
4337  ** xcb_void_cookie_t xcb_render_set_picture_filter
4338  **
4339  ** @param xcb_connection_t         *c
4340  ** @param xcb_render_picture_t      picture
4341  ** @param uint16_t                  filter_len
4342  ** @param const char               *filter
4343  ** @param uint32_t                  values_len
4344  ** @param const xcb_render_fixed_t *values
4345  ** @returns xcb_void_cookie_t
4346  **
4347  *****************************************************************************/
4348 
4349 xcb_void_cookie_t
4350 xcb_render_set_picture_filter (xcb_connection_t         *c  /**< */,
4351                                xcb_render_picture_t      picture  /**< */,
4352                                uint16_t                  filter_len  /**< */,
4353                                const char               *filter  /**< */,
4354                                uint32_t                  values_len  /**< */,
4355                                const xcb_render_fixed_t *values  /**< */)
4356 {
4357     static const xcb_protocol_request_t xcb_req = {
4358         /* count */ 6,
4359         /* ext */ &xcb_render_id,
4360         /* opcode */ XCB_RENDER_SET_PICTURE_FILTER,
4361         /* isvoid */ 1
4362     };
4363 
4364     struct iovec xcb_parts[8];
4365     xcb_void_cookie_t xcb_ret;
4366     xcb_render_set_picture_filter_request_t xcb_out;
4367 
4368     xcb_out.picture = picture;
4369     xcb_out.filter_len = filter_len;
4370     memset(xcb_out.pad0, 0, 2);
4371 
4372     xcb_parts[2].iov_base = (char *) &xcb_out;
4373     xcb_parts[2].iov_len = sizeof(xcb_out);
4374     xcb_parts[3].iov_base = 0;
4375     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4376     /* char filter */
4377     xcb_parts[4].iov_base = (char *) filter;
4378     xcb_parts[4].iov_len = filter_len * sizeof(char);
4379     xcb_parts[5].iov_base = 0;
4380     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4381     /* xcb_render_fixed_t values */
4382     xcb_parts[6].iov_base = (char *) values;
4383     xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t);
4384     xcb_parts[7].iov_base = 0;
4385     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
4386 
4387     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4388     return xcb_ret;
4389 }
4390 
4391 
4392 /*****************************************************************************
4393  **
4394  ** void xcb_render_animcursorelt_next
4395  **
4396  ** @param xcb_render_animcursorelt_iterator_t *i
4397  ** @returns void
4398  **
4399  *****************************************************************************/
4400 
4401 void
4402 xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i  /**< */)
4403 {
4404     --i->rem;
4405     ++i->data;
4406     i->index += sizeof(xcb_render_animcursorelt_t);
4407 }
4408 
4409 
4410 /*****************************************************************************
4411  **
4412  ** xcb_generic_iterator_t xcb_render_animcursorelt_end
4413  **
4414  ** @param xcb_render_animcursorelt_iterator_t i
4415  ** @returns xcb_generic_iterator_t
4416  **
4417  *****************************************************************************/
4418 
4419 xcb_generic_iterator_t
4420 xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i  /**< */)
4421 {
4422     xcb_generic_iterator_t ret;
4423     ret.data = i.data + i.rem;
4424     ret.index = i.index + ((char *) ret.data - (char *) i.data);
4425     ret.rem = 0;
4426     return ret;
4427 }
4428 
4429 int
4430 xcb_render_create_anim_cursor_sizeof (const void  *_buffer  /**< */,
4431                                       uint32_t     cursors_len  /**< */)
4432 {
4433     char *xcb_tmp = (char *)_buffer;
4434     unsigned int xcb_buffer_len = 0;
4435     unsigned int xcb_block_len = 0;
4436     unsigned int xcb_pad = 0;
4437     unsigned int xcb_align_to = 0;
4438 
4439 
4440     xcb_block_len += sizeof(xcb_render_create_anim_cursor_request_t);
4441     xcb_tmp += xcb_block_len;
4442     xcb_buffer_len += xcb_block_len;
4443     xcb_block_len = 0;
4444     /* cursors */
4445     xcb_block_len += cursors_len * sizeof(xcb_render_animcursorelt_t);
4446     xcb_tmp += xcb_block_len;
4447     xcb_align_to = ALIGNOF(xcb_render_animcursorelt_t);
4448     /* insert padding */
4449     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4450     xcb_buffer_len += xcb_block_len + xcb_pad;
4451     if (0 != xcb_pad) {
4452         xcb_tmp += xcb_pad;
4453         xcb_pad = 0;
4454     }
4455     xcb_block_len = 0;
4456 
4457     return xcb_buffer_len;
4458 }
4459 
4460 
4461 /*****************************************************************************
4462  **
4463  ** xcb_void_cookie_t xcb_render_create_anim_cursor_checked
4464  **
4465  ** @param xcb_connection_t                 *c
4466  ** @param xcb_cursor_t                      cid
4467  ** @param uint32_t                          cursors_len
4468  ** @param const xcb_render_animcursorelt_t *cursors
4469  ** @returns xcb_void_cookie_t
4470  **
4471  *****************************************************************************/
4472 
4473 xcb_void_cookie_t
4474 xcb_render_create_anim_cursor_checked (xcb_connection_t                 *c  /**< */,
4475                                        xcb_cursor_t                      cid  /**< */,
4476                                        uint32_t                          cursors_len  /**< */,
4477                                        const xcb_render_animcursorelt_t *cursors  /**< */)
4478 {
4479     static const xcb_protocol_request_t xcb_req = {
4480         /* count */ 4,
4481         /* ext */ &xcb_render_id,
4482         /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR,
4483         /* isvoid */ 1
4484     };
4485 
4486     struct iovec xcb_parts[6];
4487     xcb_void_cookie_t xcb_ret;
4488     xcb_render_create_anim_cursor_request_t xcb_out;
4489 
4490     xcb_out.cid = cid;
4491 
4492     xcb_parts[2].iov_base = (char *) &xcb_out;
4493     xcb_parts[2].iov_len = sizeof(xcb_out);
4494     xcb_parts[3].iov_base = 0;
4495     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4496     /* xcb_render_animcursorelt_t cursors */
4497     xcb_parts[4].iov_base = (char *) cursors;
4498     xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t);
4499     xcb_parts[5].iov_base = 0;
4500     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4501 
4502     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4503     return xcb_ret;
4504 }
4505 
4506 
4507 /*****************************************************************************
4508  **
4509  ** xcb_void_cookie_t xcb_render_create_anim_cursor
4510  **
4511  ** @param xcb_connection_t                 *c
4512  ** @param xcb_cursor_t                      cid
4513  ** @param uint32_t                          cursors_len
4514  ** @param const xcb_render_animcursorelt_t *cursors
4515  ** @returns xcb_void_cookie_t
4516  **
4517  *****************************************************************************/
4518 
4519 xcb_void_cookie_t
4520 xcb_render_create_anim_cursor (xcb_connection_t                 *c  /**< */,
4521                                xcb_cursor_t                      cid  /**< */,
4522                                uint32_t                          cursors_len  /**< */,
4523                                const xcb_render_animcursorelt_t *cursors  /**< */)
4524 {
4525     static const xcb_protocol_request_t xcb_req = {
4526         /* count */ 4,
4527         /* ext */ &xcb_render_id,
4528         /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR,
4529         /* isvoid */ 1
4530     };
4531 
4532     struct iovec xcb_parts[6];
4533     xcb_void_cookie_t xcb_ret;
4534     xcb_render_create_anim_cursor_request_t xcb_out;
4535 
4536     xcb_out.cid = cid;
4537 
4538     xcb_parts[2].iov_base = (char *) &xcb_out;
4539     xcb_parts[2].iov_len = sizeof(xcb_out);
4540     xcb_parts[3].iov_base = 0;
4541     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4542     /* xcb_render_animcursorelt_t cursors */
4543     xcb_parts[4].iov_base = (char *) cursors;
4544     xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t);
4545     xcb_parts[5].iov_base = 0;
4546     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4547 
4548     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4549     return xcb_ret;
4550 }
4551 
4552 
4553 /*****************************************************************************
4554  **
4555  ** void xcb_render_spanfix_next
4556  **
4557  ** @param xcb_render_spanfix_iterator_t *i
4558  ** @returns void
4559  **
4560  *****************************************************************************/
4561 
4562 void
4563 xcb_render_spanfix_next (xcb_render_spanfix_iterator_t *i  /**< */)
4564 {
4565     --i->rem;
4566     ++i->data;
4567     i->index += sizeof(xcb_render_spanfix_t);
4568 }
4569 
4570 
4571 /*****************************************************************************
4572  **
4573  ** xcb_generic_iterator_t xcb_render_spanfix_end
4574  **
4575  ** @param xcb_render_spanfix_iterator_t i
4576  ** @returns xcb_generic_iterator_t
4577  **
4578  *****************************************************************************/
4579 
4580 xcb_generic_iterator_t
4581 xcb_render_spanfix_end (xcb_render_spanfix_iterator_t i  /**< */)
4582 {
4583     xcb_generic_iterator_t ret;
4584     ret.data = i.data + i.rem;
4585     ret.index = i.index + ((char *) ret.data - (char *) i.data);
4586     ret.rem = 0;
4587     return ret;
4588 }
4589 
4590 
4591 /*****************************************************************************
4592  **
4593  ** void xcb_render_trap_next
4594  **
4595  ** @param xcb_render_trap_iterator_t *i
4596  ** @returns void
4597  **
4598  *****************************************************************************/
4599 
4600 void
4601 xcb_render_trap_next (xcb_render_trap_iterator_t *i  /**< */)
4602 {
4603     --i->rem;
4604     ++i->data;
4605     i->index += sizeof(xcb_render_trap_t);
4606 }
4607 
4608 
4609 /*****************************************************************************
4610  **
4611  ** xcb_generic_iterator_t xcb_render_trap_end
4612  **
4613  ** @param xcb_render_trap_iterator_t i
4614  ** @returns xcb_generic_iterator_t
4615  **
4616  *****************************************************************************/
4617 
4618 xcb_generic_iterator_t
4619 xcb_render_trap_end (xcb_render_trap_iterator_t i  /**< */)
4620 {
4621     xcb_generic_iterator_t ret;
4622     ret.data = i.data + i.rem;
4623     ret.index = i.index + ((char *) ret.data - (char *) i.data);
4624     ret.rem = 0;
4625     return ret;
4626 }
4627 
4628 int
4629 xcb_render_add_traps_sizeof (const void  *_buffer  /**< */,
4630                              uint32_t     traps_len  /**< */)
4631 {
4632     char *xcb_tmp = (char *)_buffer;
4633     unsigned int xcb_buffer_len = 0;
4634     unsigned int xcb_block_len = 0;
4635     unsigned int xcb_pad = 0;
4636     unsigned int xcb_align_to = 0;
4637 
4638 
4639     xcb_block_len += sizeof(xcb_render_add_traps_request_t);
4640     xcb_tmp += xcb_block_len;
4641     xcb_buffer_len += xcb_block_len;
4642     xcb_block_len = 0;
4643     /* traps */
4644     xcb_block_len += traps_len * sizeof(xcb_render_trap_t);
4645     xcb_tmp += xcb_block_len;
4646     xcb_align_to = ALIGNOF(xcb_render_trap_t);
4647     /* insert padding */
4648     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4649     xcb_buffer_len += xcb_block_len + xcb_pad;
4650     if (0 != xcb_pad) {
4651         xcb_tmp += xcb_pad;
4652         xcb_pad = 0;
4653     }
4654     xcb_block_len = 0;
4655 
4656     return xcb_buffer_len;
4657 }
4658 
4659 
4660 /*****************************************************************************
4661  **
4662  ** xcb_void_cookie_t xcb_render_add_traps_checked
4663  **
4664  ** @param xcb_connection_t        *c
4665  ** @param xcb_render_picture_t     picture
4666  ** @param int16_t                  x_off
4667  ** @param int16_t                  y_off
4668  ** @param uint32_t                 traps_len
4669  ** @param const xcb_render_trap_t *traps
4670  ** @returns xcb_void_cookie_t
4671  **
4672  *****************************************************************************/
4673 
4674 xcb_void_cookie_t
4675 xcb_render_add_traps_checked (xcb_connection_t        *c  /**< */,
4676                               xcb_render_picture_t     picture  /**< */,
4677                               int16_t                  x_off  /**< */,
4678                               int16_t                  y_off  /**< */,
4679                               uint32_t                 traps_len  /**< */,
4680                               const xcb_render_trap_t *traps  /**< */)
4681 {
4682     static const xcb_protocol_request_t xcb_req = {
4683         /* count */ 4,
4684         /* ext */ &xcb_render_id,
4685         /* opcode */ XCB_RENDER_ADD_TRAPS,
4686         /* isvoid */ 1
4687     };
4688 
4689     struct iovec xcb_parts[6];
4690     xcb_void_cookie_t xcb_ret;
4691     xcb_render_add_traps_request_t xcb_out;
4692 
4693     xcb_out.picture = picture;
4694     xcb_out.x_off = x_off;
4695     xcb_out.y_off = y_off;
4696 
4697     xcb_parts[2].iov_base = (char *) &xcb_out;
4698     xcb_parts[2].iov_len = sizeof(xcb_out);
4699     xcb_parts[3].iov_base = 0;
4700     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4701     /* xcb_render_trap_t traps */
4702     xcb_parts[4].iov_base = (char *) traps;
4703     xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t);
4704     xcb_parts[5].iov_base = 0;
4705     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4706 
4707     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4708     return xcb_ret;
4709 }
4710 
4711 
4712 /*****************************************************************************
4713  **
4714  ** xcb_void_cookie_t xcb_render_add_traps
4715  **
4716  ** @param xcb_connection_t        *c
4717  ** @param xcb_render_picture_t     picture
4718  ** @param int16_t                  x_off
4719  ** @param int16_t                  y_off
4720  ** @param uint32_t                 traps_len
4721  ** @param const xcb_render_trap_t *traps
4722  ** @returns xcb_void_cookie_t
4723  **
4724  *****************************************************************************/
4725 
4726 xcb_void_cookie_t
4727 xcb_render_add_traps (xcb_connection_t        *c  /**< */,
4728                       xcb_render_picture_t     picture  /**< */,
4729                       int16_t                  x_off  /**< */,
4730                       int16_t                  y_off  /**< */,
4731                       uint32_t                 traps_len  /**< */,
4732                       const xcb_render_trap_t *traps  /**< */)
4733 {
4734     static const xcb_protocol_request_t xcb_req = {
4735         /* count */ 4,
4736         /* ext */ &xcb_render_id,
4737         /* opcode */ XCB_RENDER_ADD_TRAPS,
4738         /* isvoid */ 1
4739     };
4740 
4741     struct iovec xcb_parts[6];
4742     xcb_void_cookie_t xcb_ret;
4743     xcb_render_add_traps_request_t xcb_out;
4744 
4745     xcb_out.picture = picture;
4746     xcb_out.x_off = x_off;
4747     xcb_out.y_off = y_off;
4748 
4749     xcb_parts[2].iov_base = (char *) &xcb_out;
4750     xcb_parts[2].iov_len = sizeof(xcb_out);
4751     xcb_parts[3].iov_base = 0;
4752     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4753     /* xcb_render_trap_t traps */
4754     xcb_parts[4].iov_base = (char *) traps;
4755     xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t);
4756     xcb_parts[5].iov_base = 0;
4757     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4758 
4759     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4760     return xcb_ret;
4761 }
4762 
4763 
4764 /*****************************************************************************
4765  **
4766  ** xcb_void_cookie_t xcb_render_create_solid_fill_checked
4767  **
4768  ** @param xcb_connection_t     *c
4769  ** @param xcb_render_picture_t  picture
4770  ** @param xcb_render_color_t    color
4771  ** @returns xcb_void_cookie_t
4772  **
4773  *****************************************************************************/
4774 
4775 xcb_void_cookie_t
4776 xcb_render_create_solid_fill_checked (xcb_connection_t     *c  /**< */,
4777                                       xcb_render_picture_t  picture  /**< */,
4778                                       xcb_render_color_t    color  /**< */)
4779 {
4780     static const xcb_protocol_request_t xcb_req = {
4781         /* count */ 2,
4782         /* ext */ &xcb_render_id,
4783         /* opcode */ XCB_RENDER_CREATE_SOLID_FILL,
4784         /* isvoid */ 1
4785     };
4786 
4787     struct iovec xcb_parts[4];
4788     xcb_void_cookie_t xcb_ret;
4789     xcb_render_create_solid_fill_request_t xcb_out;
4790 
4791     xcb_out.picture = picture;
4792     xcb_out.color = color;
4793 
4794     xcb_parts[2].iov_base = (char *) &xcb_out;
4795     xcb_parts[2].iov_len = sizeof(xcb_out);
4796     xcb_parts[3].iov_base = 0;
4797     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4798 
4799     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4800     return xcb_ret;
4801 }
4802 
4803 
4804 /*****************************************************************************
4805  **
4806  ** xcb_void_cookie_t xcb_render_create_solid_fill
4807  **
4808  ** @param xcb_connection_t     *c
4809  ** @param xcb_render_picture_t  picture
4810  ** @param xcb_render_color_t    color
4811  ** @returns xcb_void_cookie_t
4812  **
4813  *****************************************************************************/
4814 
4815 xcb_void_cookie_t
4816 xcb_render_create_solid_fill (xcb_connection_t     *c  /**< */,
4817                               xcb_render_picture_t  picture  /**< */,
4818                               xcb_render_color_t    color  /**< */)
4819 {
4820     static const xcb_protocol_request_t xcb_req = {
4821         /* count */ 2,
4822         /* ext */ &xcb_render_id,
4823         /* opcode */ XCB_RENDER_CREATE_SOLID_FILL,
4824         /* isvoid */ 1
4825     };
4826 
4827     struct iovec xcb_parts[4];
4828     xcb_void_cookie_t xcb_ret;
4829     xcb_render_create_solid_fill_request_t xcb_out;
4830 
4831     xcb_out.picture = picture;
4832     xcb_out.color = color;
4833 
4834     xcb_parts[2].iov_base = (char *) &xcb_out;
4835     xcb_parts[2].iov_len = sizeof(xcb_out);
4836     xcb_parts[3].iov_base = 0;
4837     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4838 
4839     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4840     return xcb_ret;
4841 }
4842 
4843 int
4844 xcb_render_create_linear_gradient_sizeof (const void  *_buffer  /**< */)
4845 {
4846     char *xcb_tmp = (char *)_buffer;
4847     const xcb_render_create_linear_gradient_request_t *_aux = (xcb_render_create_linear_gradient_request_t *)_buffer;
4848     unsigned int xcb_buffer_len = 0;
4849     unsigned int xcb_block_len = 0;
4850     unsigned int xcb_pad = 0;
4851     unsigned int xcb_align_to = 0;
4852 
4853 
4854     xcb_block_len += sizeof(xcb_render_create_linear_gradient_request_t);
4855     xcb_tmp += xcb_block_len;
4856     xcb_buffer_len += xcb_block_len;
4857     xcb_block_len = 0;
4858     /* stops */
4859     xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
4860     xcb_tmp += xcb_block_len;
4861     xcb_align_to = ALIGNOF(xcb_render_fixed_t);
4862     /* insert padding */
4863     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4864     xcb_buffer_len += xcb_block_len + xcb_pad;
4865     if (0 != xcb_pad) {
4866         xcb_tmp += xcb_pad;
4867         xcb_pad = 0;
4868     }
4869     xcb_block_len = 0;
4870     /* colors */
4871     xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
4872     xcb_tmp += xcb_block_len;
4873     xcb_align_to = ALIGNOF(xcb_render_color_t);
4874     /* insert padding */
4875     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4876     xcb_buffer_len += xcb_block_len + xcb_pad;
4877     if (0 != xcb_pad) {
4878         xcb_tmp += xcb_pad;
4879         xcb_pad = 0;
4880     }
4881     xcb_block_len = 0;
4882 
4883     return xcb_buffer_len;
4884 }
4885 
4886 
4887 /*****************************************************************************
4888  **
4889  ** xcb_void_cookie_t xcb_render_create_linear_gradient_checked
4890  **
4891  ** @param xcb_connection_t         *c
4892  ** @param xcb_render_picture_t      picture
4893  ** @param xcb_render_pointfix_t     p1
4894  ** @param xcb_render_pointfix_t     p2
4895  ** @param uint32_t                  num_stops
4896  ** @param const xcb_render_fixed_t *stops
4897  ** @param const xcb_render_color_t *colors
4898  ** @returns xcb_void_cookie_t
4899  **
4900  *****************************************************************************/
4901 
4902 xcb_void_cookie_t
4903 xcb_render_create_linear_gradient_checked (xcb_connection_t         *c  /**< */,
4904                                            xcb_render_picture_t      picture  /**< */,
4905                                            xcb_render_pointfix_t     p1  /**< */,
4906                                            xcb_render_pointfix_t     p2  /**< */,
4907                                            uint32_t                  num_stops  /**< */,
4908                                            const xcb_render_fixed_t *stops  /**< */,
4909                                            const xcb_render_color_t *colors  /**< */)
4910 {
4911     static const xcb_protocol_request_t xcb_req = {
4912         /* count */ 6,
4913         /* ext */ &xcb_render_id,
4914         /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT,
4915         /* isvoid */ 1
4916     };
4917 
4918     struct iovec xcb_parts[8];
4919     xcb_void_cookie_t xcb_ret;
4920     xcb_render_create_linear_gradient_request_t xcb_out;
4921 
4922     xcb_out.picture = picture;
4923     xcb_out.p1 = p1;
4924     xcb_out.p2 = p2;
4925     xcb_out.num_stops = num_stops;
4926 
4927     xcb_parts[2].iov_base = (char *) &xcb_out;
4928     xcb_parts[2].iov_len = sizeof(xcb_out);
4929     xcb_parts[3].iov_base = 0;
4930     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4931     /* xcb_render_fixed_t stops */
4932     xcb_parts[4].iov_base = (char *) stops;
4933     xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
4934     xcb_parts[5].iov_base = 0;
4935     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4936     /* xcb_render_color_t colors */
4937     xcb_parts[6].iov_base = (char *) colors;
4938     xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
4939     xcb_parts[7].iov_base = 0;
4940     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
4941 
4942     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4943     return xcb_ret;
4944 }
4945 
4946 
4947 /*****************************************************************************
4948  **
4949  ** xcb_void_cookie_t xcb_render_create_linear_gradient
4950  **
4951  ** @param xcb_connection_t         *c
4952  ** @param xcb_render_picture_t      picture
4953  ** @param xcb_render_pointfix_t     p1
4954  ** @param xcb_render_pointfix_t     p2
4955  ** @param uint32_t                  num_stops
4956  ** @param const xcb_render_fixed_t *stops
4957  ** @param const xcb_render_color_t *colors
4958  ** @returns xcb_void_cookie_t
4959  **
4960  *****************************************************************************/
4961 
4962 xcb_void_cookie_t
4963 xcb_render_create_linear_gradient (xcb_connection_t         *c  /**< */,
4964                                    xcb_render_picture_t      picture  /**< */,
4965                                    xcb_render_pointfix_t     p1  /**< */,
4966                                    xcb_render_pointfix_t     p2  /**< */,
4967                                    uint32_t                  num_stops  /**< */,
4968                                    const xcb_render_fixed_t *stops  /**< */,
4969                                    const xcb_render_color_t *colors  /**< */)
4970 {
4971     static const xcb_protocol_request_t xcb_req = {
4972         /* count */ 6,
4973         /* ext */ &xcb_render_id,
4974         /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT,
4975         /* isvoid */ 1
4976     };
4977 
4978     struct iovec xcb_parts[8];
4979     xcb_void_cookie_t xcb_ret;
4980     xcb_render_create_linear_gradient_request_t xcb_out;
4981 
4982     xcb_out.picture = picture;
4983     xcb_out.p1 = p1;
4984     xcb_out.p2 = p2;
4985     xcb_out.num_stops = num_stops;
4986 
4987     xcb_parts[2].iov_base = (char *) &xcb_out;
4988     xcb_parts[2].iov_len = sizeof(xcb_out);
4989     xcb_parts[3].iov_base = 0;
4990     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4991     /* xcb_render_fixed_t stops */
4992     xcb_parts[4].iov_base = (char *) stops;
4993     xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
4994     xcb_parts[5].iov_base = 0;
4995     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4996     /* xcb_render_color_t colors */
4997     xcb_parts[6].iov_base = (char *) colors;
4998     xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
4999     xcb_parts[7].iov_base = 0;
5000     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
5001 
5002     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5003     return xcb_ret;
5004 }
5005 
5006 int
5007 xcb_render_create_radial_gradient_sizeof (const void  *_buffer  /**< */)
5008 {
5009     char *xcb_tmp = (char *)_buffer;
5010     const xcb_render_create_radial_gradient_request_t *_aux = (xcb_render_create_radial_gradient_request_t *)_buffer;
5011     unsigned int xcb_buffer_len = 0;
5012     unsigned int xcb_block_len = 0;
5013     unsigned int xcb_pad = 0;
5014     unsigned int xcb_align_to = 0;
5015 
5016 
5017     xcb_block_len += sizeof(xcb_render_create_radial_gradient_request_t);
5018     xcb_tmp += xcb_block_len;
5019     xcb_buffer_len += xcb_block_len;
5020     xcb_block_len = 0;
5021     /* stops */
5022     xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
5023     xcb_tmp += xcb_block_len;
5024     xcb_align_to = ALIGNOF(xcb_render_fixed_t);
5025     /* insert padding */
5026     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5027     xcb_buffer_len += xcb_block_len + xcb_pad;
5028     if (0 != xcb_pad) {
5029         xcb_tmp += xcb_pad;
5030         xcb_pad = 0;
5031     }
5032     xcb_block_len = 0;
5033     /* colors */
5034     xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
5035     xcb_tmp += xcb_block_len;
5036     xcb_align_to = ALIGNOF(xcb_render_color_t);
5037     /* insert padding */
5038     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5039     xcb_buffer_len += xcb_block_len + xcb_pad;
5040     if (0 != xcb_pad) {
5041         xcb_tmp += xcb_pad;
5042         xcb_pad = 0;
5043     }
5044     xcb_block_len = 0;
5045 
5046     return xcb_buffer_len;
5047 }
5048 
5049 
5050 /*****************************************************************************
5051  **
5052  ** xcb_void_cookie_t xcb_render_create_radial_gradient_checked
5053  **
5054  ** @param xcb_connection_t         *c
5055  ** @param xcb_render_picture_t      picture
5056  ** @param xcb_render_pointfix_t     inner
5057  ** @param xcb_render_pointfix_t     outer
5058  ** @param xcb_render_fixed_t        inner_radius
5059  ** @param xcb_render_fixed_t        outer_radius
5060  ** @param uint32_t                  num_stops
5061  ** @param const xcb_render_fixed_t *stops
5062  ** @param const xcb_render_color_t *colors
5063  ** @returns xcb_void_cookie_t
5064  **
5065  *****************************************************************************/
5066 
5067 xcb_void_cookie_t
5068 xcb_render_create_radial_gradient_checked (xcb_connection_t         *c  /**< */,
5069                                            xcb_render_picture_t      picture  /**< */,
5070                                            xcb_render_pointfix_t     inner  /**< */,
5071                                            xcb_render_pointfix_t     outer  /**< */,
5072                                            xcb_render_fixed_t        inner_radius  /**< */,
5073                                            xcb_render_fixed_t        outer_radius  /**< */,
5074                                            uint32_t                  num_stops  /**< */,
5075                                            const xcb_render_fixed_t *stops  /**< */,
5076                                            const xcb_render_color_t *colors  /**< */)
5077 {
5078     static const xcb_protocol_request_t xcb_req = {
5079         /* count */ 6,
5080         /* ext */ &xcb_render_id,
5081         /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT,
5082         /* isvoid */ 1
5083     };
5084 
5085     struct iovec xcb_parts[8];
5086     xcb_void_cookie_t xcb_ret;
5087     xcb_render_create_radial_gradient_request_t xcb_out;
5088 
5089     xcb_out.picture = picture;
5090     xcb_out.inner = inner;
5091     xcb_out.outer = outer;
5092     xcb_out.inner_radius = inner_radius;
5093     xcb_out.outer_radius = outer_radius;
5094     xcb_out.num_stops = num_stops;
5095 
5096     xcb_parts[2].iov_base = (char *) &xcb_out;
5097     xcb_parts[2].iov_len = sizeof(xcb_out);
5098     xcb_parts[3].iov_base = 0;
5099     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5100     /* xcb_render_fixed_t stops */
5101     xcb_parts[4].iov_base = (char *) stops;
5102     xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
5103     xcb_parts[5].iov_base = 0;
5104     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
5105     /* xcb_render_color_t colors */
5106     xcb_parts[6].iov_base = (char *) colors;
5107     xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
5108     xcb_parts[7].iov_base = 0;
5109     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
5110 
5111     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5112     return xcb_ret;
5113 }
5114 
5115 
5116 /*****************************************************************************
5117  **
5118  ** xcb_void_cookie_t xcb_render_create_radial_gradient
5119  **
5120  ** @param xcb_connection_t         *c
5121  ** @param xcb_render_picture_t      picture
5122  ** @param xcb_render_pointfix_t     inner
5123  ** @param xcb_render_pointfix_t     outer
5124  ** @param xcb_render_fixed_t        inner_radius
5125  ** @param xcb_render_fixed_t        outer_radius
5126  ** @param uint32_t                  num_stops
5127  ** @param const xcb_render_fixed_t *stops
5128  ** @param const xcb_render_color_t *colors
5129  ** @returns xcb_void_cookie_t
5130  **
5131  *****************************************************************************/
5132 
5133 xcb_void_cookie_t
5134 xcb_render_create_radial_gradient (xcb_connection_t         *c  /**< */,
5135                                    xcb_render_picture_t      picture  /**< */,
5136                                    xcb_render_pointfix_t     inner  /**< */,
5137                                    xcb_render_pointfix_t     outer  /**< */,
5138                                    xcb_render_fixed_t        inner_radius  /**< */,
5139                                    xcb_render_fixed_t        outer_radius  /**< */,
5140                                    uint32_t                  num_stops  /**< */,
5141                                    const xcb_render_fixed_t *stops  /**< */,
5142                                    const xcb_render_color_t *colors  /**< */)
5143 {
5144     static const xcb_protocol_request_t xcb_req = {
5145         /* count */ 6,
5146         /* ext */ &xcb_render_id,
5147         /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT,
5148         /* isvoid */ 1
5149     };
5150 
5151     struct iovec xcb_parts[8];
5152     xcb_void_cookie_t xcb_ret;
5153     xcb_render_create_radial_gradient_request_t xcb_out;
5154 
5155     xcb_out.picture = picture;
5156     xcb_out.inner = inner;
5157     xcb_out.outer = outer;
5158     xcb_out.inner_radius = inner_radius;
5159     xcb_out.outer_radius = outer_radius;
5160     xcb_out.num_stops = num_stops;
5161 
5162     xcb_parts[2].iov_base = (char *) &xcb_out;
5163     xcb_parts[2].iov_len = sizeof(xcb_out);
5164     xcb_parts[3].iov_base = 0;
5165     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5166     /* xcb_render_fixed_t stops */
5167     xcb_parts[4].iov_base = (char *) stops;
5168     xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
5169     xcb_parts[5].iov_base = 0;
5170     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
5171     /* xcb_render_color_t colors */
5172     xcb_parts[6].iov_base = (char *) colors;
5173     xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
5174     xcb_parts[7].iov_base = 0;
5175     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
5176 
5177     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5178     return xcb_ret;
5179 }
5180 
5181 int
5182 xcb_render_create_conical_gradient_sizeof (const void  *_buffer  /**< */)
5183 {
5184     char *xcb_tmp = (char *)_buffer;
5185     const xcb_render_create_conical_gradient_request_t *_aux = (xcb_render_create_conical_gradient_request_t *)_buffer;
5186     unsigned int xcb_buffer_len = 0;
5187     unsigned int xcb_block_len = 0;
5188     unsigned int xcb_pad = 0;
5189     unsigned int xcb_align_to = 0;
5190 
5191 
5192     xcb_block_len += sizeof(xcb_render_create_conical_gradient_request_t);
5193     xcb_tmp += xcb_block_len;
5194     xcb_buffer_len += xcb_block_len;
5195     xcb_block_len = 0;
5196     /* stops */
5197     xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
5198     xcb_tmp += xcb_block_len;
5199     xcb_align_to = ALIGNOF(xcb_render_fixed_t);
5200     /* insert padding */
5201     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5202     xcb_buffer_len += xcb_block_len + xcb_pad;
5203     if (0 != xcb_pad) {
5204         xcb_tmp += xcb_pad;
5205         xcb_pad = 0;
5206     }
5207     xcb_block_len = 0;
5208     /* colors */
5209     xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
5210     xcb_tmp += xcb_block_len;
5211     xcb_align_to = ALIGNOF(xcb_render_color_t);
5212     /* insert padding */
5213     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5214     xcb_buffer_len += xcb_block_len + xcb_pad;
5215     if (0 != xcb_pad) {
5216         xcb_tmp += xcb_pad;
5217         xcb_pad = 0;
5218     }
5219     xcb_block_len = 0;
5220 
5221     return xcb_buffer_len;
5222 }
5223 
5224 
5225 /*****************************************************************************
5226  **
5227  ** xcb_void_cookie_t xcb_render_create_conical_gradient_checked
5228  **
5229  ** @param xcb_connection_t         *c
5230  ** @param xcb_render_picture_t      picture
5231  ** @param xcb_render_pointfix_t     center
5232  ** @param xcb_render_fixed_t        angle
5233  ** @param uint32_t                  num_stops
5234  ** @param const xcb_render_fixed_t *stops
5235  ** @param const xcb_render_color_t *colors
5236  ** @returns xcb_void_cookie_t
5237  **
5238  *****************************************************************************/
5239 
5240 xcb_void_cookie_t
5241 xcb_render_create_conical_gradient_checked (xcb_connection_t         *c  /**< */,
5242                                             xcb_render_picture_t      picture  /**< */,
5243                                             xcb_render_pointfix_t     center  /**< */,
5244                                             xcb_render_fixed_t        angle  /**< */,
5245                                             uint32_t                  num_stops  /**< */,
5246                                             const xcb_render_fixed_t *stops  /**< */,
5247                                             const xcb_render_color_t *colors  /**< */)
5248 {
5249     static const xcb_protocol_request_t xcb_req = {
5250         /* count */ 6,
5251         /* ext */ &xcb_render_id,
5252         /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT,
5253         /* isvoid */ 1
5254     };
5255 
5256     struct iovec xcb_parts[8];
5257     xcb_void_cookie_t xcb_ret;
5258     xcb_render_create_conical_gradient_request_t xcb_out;
5259 
5260     xcb_out.picture = picture;
5261     xcb_out.center = center;
5262     xcb_out.angle = angle;
5263     xcb_out.num_stops = num_stops;
5264 
5265     xcb_parts[2].iov_base = (char *) &xcb_out;
5266     xcb_parts[2].iov_len = sizeof(xcb_out);
5267     xcb_parts[3].iov_base = 0;
5268     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5269     /* xcb_render_fixed_t stops */
5270     xcb_parts[4].iov_base = (char *) stops;
5271     xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
5272     xcb_parts[5].iov_base = 0;
5273     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
5274     /* xcb_render_color_t colors */
5275     xcb_parts[6].iov_base = (char *) colors;
5276     xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
5277     xcb_parts[7].iov_base = 0;
5278     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
5279 
5280     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5281     return xcb_ret;
5282 }
5283 
5284 
5285 /*****************************************************************************
5286  **
5287  ** xcb_void_cookie_t xcb_render_create_conical_gradient
5288  **
5289  ** @param xcb_connection_t         *c
5290  ** @param xcb_render_picture_t      picture
5291  ** @param xcb_render_pointfix_t     center
5292  ** @param xcb_render_fixed_t        angle
5293  ** @param uint32_t                  num_stops
5294  ** @param const xcb_render_fixed_t *stops
5295  ** @param const xcb_render_color_t *colors
5296  ** @returns xcb_void_cookie_t
5297  **
5298  *****************************************************************************/
5299 
5300 xcb_void_cookie_t
5301 xcb_render_create_conical_gradient (xcb_connection_t         *c  /**< */,
5302                                     xcb_render_picture_t      picture  /**< */,
5303                                     xcb_render_pointfix_t     center  /**< */,
5304                                     xcb_render_fixed_t        angle  /**< */,
5305                                     uint32_t                  num_stops  /**< */,
5306                                     const xcb_render_fixed_t *stops  /**< */,
5307                                     const xcb_render_color_t *colors  /**< */)
5308 {
5309     static const xcb_protocol_request_t xcb_req = {
5310         /* count */ 6,
5311         /* ext */ &xcb_render_id,
5312         /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT,
5313         /* isvoid */ 1
5314     };
5315 
5316     struct iovec xcb_parts[8];
5317     xcb_void_cookie_t xcb_ret;
5318     xcb_render_create_conical_gradient_request_t xcb_out;
5319 
5320     xcb_out.picture = picture;
5321     xcb_out.center = center;
5322     xcb_out.angle = angle;
5323     xcb_out.num_stops = num_stops;
5324 
5325     xcb_parts[2].iov_base = (char *) &xcb_out;
5326     xcb_parts[2].iov_len = sizeof(xcb_out);
5327     xcb_parts[3].iov_base = 0;
5328     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5329     /* xcb_render_fixed_t stops */
5330     xcb_parts[4].iov_base = (char *) stops;
5331     xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
5332     xcb_parts[5].iov_base = 0;
5333     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
5334     /* xcb_render_color_t colors */
5335     xcb_parts[6].iov_base = (char *) colors;
5336     xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
5337     xcb_parts[7].iov_base = 0;
5338     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
5339 
5340     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5341     return xcb_ret;
5342 }
5343 
5344