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