xref: /netbsd-src/external/mit/xorg/lib/libxcb/files/xproto.c (revision b7b7574d3bf8eeb51a1fa3977b59142ec6434a55)
1 /*
2  * This file generated automatically from xproto.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 "xproto.h"
15 
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 
18 
19 /*****************************************************************************
20  **
21  ** void xcb_char2b_next
22  **
23  ** @param xcb_char2b_iterator_t *i
24  ** @returns void
25  **
26  *****************************************************************************/
27 
28 void
29 xcb_char2b_next (xcb_char2b_iterator_t *i  /**< */)
30 {
31     --i->rem;
32     ++i->data;
33     i->index += sizeof(xcb_char2b_t);
34 }
35 
36 
37 /*****************************************************************************
38  **
39  ** xcb_generic_iterator_t xcb_char2b_end
40  **
41  ** @param xcb_char2b_iterator_t i
42  ** @returns xcb_generic_iterator_t
43  **
44  *****************************************************************************/
45 
46 xcb_generic_iterator_t
47 xcb_char2b_end (xcb_char2b_iterator_t i  /**< */)
48 {
49     xcb_generic_iterator_t ret;
50     ret.data = i.data + i.rem;
51     ret.index = i.index + ((char *) ret.data - (char *) i.data);
52     ret.rem = 0;
53     return ret;
54 }
55 
56 
57 /*****************************************************************************
58  **
59  ** void xcb_window_next
60  **
61  ** @param xcb_window_iterator_t *i
62  ** @returns void
63  **
64  *****************************************************************************/
65 
66 void
67 xcb_window_next (xcb_window_iterator_t *i  /**< */)
68 {
69     --i->rem;
70     ++i->data;
71     i->index += sizeof(xcb_window_t);
72 }
73 
74 
75 /*****************************************************************************
76  **
77  ** xcb_generic_iterator_t xcb_window_end
78  **
79  ** @param xcb_window_iterator_t i
80  ** @returns xcb_generic_iterator_t
81  **
82  *****************************************************************************/
83 
84 xcb_generic_iterator_t
85 xcb_window_end (xcb_window_iterator_t i  /**< */)
86 {
87     xcb_generic_iterator_t ret;
88     ret.data = i.data + i.rem;
89     ret.index = i.index + ((char *) ret.data - (char *) i.data);
90     ret.rem = 0;
91     return ret;
92 }
93 
94 
95 /*****************************************************************************
96  **
97  ** void xcb_pixmap_next
98  **
99  ** @param xcb_pixmap_iterator_t *i
100  ** @returns void
101  **
102  *****************************************************************************/
103 
104 void
105 xcb_pixmap_next (xcb_pixmap_iterator_t *i  /**< */)
106 {
107     --i->rem;
108     ++i->data;
109     i->index += sizeof(xcb_pixmap_t);
110 }
111 
112 
113 /*****************************************************************************
114  **
115  ** xcb_generic_iterator_t xcb_pixmap_end
116  **
117  ** @param xcb_pixmap_iterator_t i
118  ** @returns xcb_generic_iterator_t
119  **
120  *****************************************************************************/
121 
122 xcb_generic_iterator_t
123 xcb_pixmap_end (xcb_pixmap_iterator_t i  /**< */)
124 {
125     xcb_generic_iterator_t ret;
126     ret.data = i.data + i.rem;
127     ret.index = i.index + ((char *) ret.data - (char *) i.data);
128     ret.rem = 0;
129     return ret;
130 }
131 
132 
133 /*****************************************************************************
134  **
135  ** void xcb_cursor_next
136  **
137  ** @param xcb_cursor_iterator_t *i
138  ** @returns void
139  **
140  *****************************************************************************/
141 
142 void
143 xcb_cursor_next (xcb_cursor_iterator_t *i  /**< */)
144 {
145     --i->rem;
146     ++i->data;
147     i->index += sizeof(xcb_cursor_t);
148 }
149 
150 
151 /*****************************************************************************
152  **
153  ** xcb_generic_iterator_t xcb_cursor_end
154  **
155  ** @param xcb_cursor_iterator_t i
156  ** @returns xcb_generic_iterator_t
157  **
158  *****************************************************************************/
159 
160 xcb_generic_iterator_t
161 xcb_cursor_end (xcb_cursor_iterator_t i  /**< */)
162 {
163     xcb_generic_iterator_t ret;
164     ret.data = i.data + i.rem;
165     ret.index = i.index + ((char *) ret.data - (char *) i.data);
166     ret.rem = 0;
167     return ret;
168 }
169 
170 
171 /*****************************************************************************
172  **
173  ** void xcb_font_next
174  **
175  ** @param xcb_font_iterator_t *i
176  ** @returns void
177  **
178  *****************************************************************************/
179 
180 void
181 xcb_font_next (xcb_font_iterator_t *i  /**< */)
182 {
183     --i->rem;
184     ++i->data;
185     i->index += sizeof(xcb_font_t);
186 }
187 
188 
189 /*****************************************************************************
190  **
191  ** xcb_generic_iterator_t xcb_font_end
192  **
193  ** @param xcb_font_iterator_t i
194  ** @returns xcb_generic_iterator_t
195  **
196  *****************************************************************************/
197 
198 xcb_generic_iterator_t
199 xcb_font_end (xcb_font_iterator_t i  /**< */)
200 {
201     xcb_generic_iterator_t ret;
202     ret.data = i.data + i.rem;
203     ret.index = i.index + ((char *) ret.data - (char *) i.data);
204     ret.rem = 0;
205     return ret;
206 }
207 
208 
209 /*****************************************************************************
210  **
211  ** void xcb_gcontext_next
212  **
213  ** @param xcb_gcontext_iterator_t *i
214  ** @returns void
215  **
216  *****************************************************************************/
217 
218 void
219 xcb_gcontext_next (xcb_gcontext_iterator_t *i  /**< */)
220 {
221     --i->rem;
222     ++i->data;
223     i->index += sizeof(xcb_gcontext_t);
224 }
225 
226 
227 /*****************************************************************************
228  **
229  ** xcb_generic_iterator_t xcb_gcontext_end
230  **
231  ** @param xcb_gcontext_iterator_t i
232  ** @returns xcb_generic_iterator_t
233  **
234  *****************************************************************************/
235 
236 xcb_generic_iterator_t
237 xcb_gcontext_end (xcb_gcontext_iterator_t i  /**< */)
238 {
239     xcb_generic_iterator_t ret;
240     ret.data = i.data + i.rem;
241     ret.index = i.index + ((char *) ret.data - (char *) i.data);
242     ret.rem = 0;
243     return ret;
244 }
245 
246 
247 /*****************************************************************************
248  **
249  ** void xcb_colormap_next
250  **
251  ** @param xcb_colormap_iterator_t *i
252  ** @returns void
253  **
254  *****************************************************************************/
255 
256 void
257 xcb_colormap_next (xcb_colormap_iterator_t *i  /**< */)
258 {
259     --i->rem;
260     ++i->data;
261     i->index += sizeof(xcb_colormap_t);
262 }
263 
264 
265 /*****************************************************************************
266  **
267  ** xcb_generic_iterator_t xcb_colormap_end
268  **
269  ** @param xcb_colormap_iterator_t i
270  ** @returns xcb_generic_iterator_t
271  **
272  *****************************************************************************/
273 
274 xcb_generic_iterator_t
275 xcb_colormap_end (xcb_colormap_iterator_t i  /**< */)
276 {
277     xcb_generic_iterator_t ret;
278     ret.data = i.data + i.rem;
279     ret.index = i.index + ((char *) ret.data - (char *) i.data);
280     ret.rem = 0;
281     return ret;
282 }
283 
284 
285 /*****************************************************************************
286  **
287  ** void xcb_atom_next
288  **
289  ** @param xcb_atom_iterator_t *i
290  ** @returns void
291  **
292  *****************************************************************************/
293 
294 void
295 xcb_atom_next (xcb_atom_iterator_t *i  /**< */)
296 {
297     --i->rem;
298     ++i->data;
299     i->index += sizeof(xcb_atom_t);
300 }
301 
302 
303 /*****************************************************************************
304  **
305  ** xcb_generic_iterator_t xcb_atom_end
306  **
307  ** @param xcb_atom_iterator_t i
308  ** @returns xcb_generic_iterator_t
309  **
310  *****************************************************************************/
311 
312 xcb_generic_iterator_t
313 xcb_atom_end (xcb_atom_iterator_t i  /**< */)
314 {
315     xcb_generic_iterator_t ret;
316     ret.data = i.data + i.rem;
317     ret.index = i.index + ((char *) ret.data - (char *) i.data);
318     ret.rem = 0;
319     return ret;
320 }
321 
322 
323 /*****************************************************************************
324  **
325  ** void xcb_drawable_next
326  **
327  ** @param xcb_drawable_iterator_t *i
328  ** @returns void
329  **
330  *****************************************************************************/
331 
332 void
333 xcb_drawable_next (xcb_drawable_iterator_t *i  /**< */)
334 {
335     --i->rem;
336     ++i->data;
337     i->index += sizeof(xcb_drawable_t);
338 }
339 
340 
341 /*****************************************************************************
342  **
343  ** xcb_generic_iterator_t xcb_drawable_end
344  **
345  ** @param xcb_drawable_iterator_t i
346  ** @returns xcb_generic_iterator_t
347  **
348  *****************************************************************************/
349 
350 xcb_generic_iterator_t
351 xcb_drawable_end (xcb_drawable_iterator_t i  /**< */)
352 {
353     xcb_generic_iterator_t ret;
354     ret.data = i.data + i.rem;
355     ret.index = i.index + ((char *) ret.data - (char *) i.data);
356     ret.rem = 0;
357     return ret;
358 }
359 
360 
361 /*****************************************************************************
362  **
363  ** void xcb_fontable_next
364  **
365  ** @param xcb_fontable_iterator_t *i
366  ** @returns void
367  **
368  *****************************************************************************/
369 
370 void
371 xcb_fontable_next (xcb_fontable_iterator_t *i  /**< */)
372 {
373     --i->rem;
374     ++i->data;
375     i->index += sizeof(xcb_fontable_t);
376 }
377 
378 
379 /*****************************************************************************
380  **
381  ** xcb_generic_iterator_t xcb_fontable_end
382  **
383  ** @param xcb_fontable_iterator_t i
384  ** @returns xcb_generic_iterator_t
385  **
386  *****************************************************************************/
387 
388 xcb_generic_iterator_t
389 xcb_fontable_end (xcb_fontable_iterator_t i  /**< */)
390 {
391     xcb_generic_iterator_t ret;
392     ret.data = i.data + i.rem;
393     ret.index = i.index + ((char *) ret.data - (char *) i.data);
394     ret.rem = 0;
395     return ret;
396 }
397 
398 
399 /*****************************************************************************
400  **
401  ** void xcb_visualid_next
402  **
403  ** @param xcb_visualid_iterator_t *i
404  ** @returns void
405  **
406  *****************************************************************************/
407 
408 void
409 xcb_visualid_next (xcb_visualid_iterator_t *i  /**< */)
410 {
411     --i->rem;
412     ++i->data;
413     i->index += sizeof(xcb_visualid_t);
414 }
415 
416 
417 /*****************************************************************************
418  **
419  ** xcb_generic_iterator_t xcb_visualid_end
420  **
421  ** @param xcb_visualid_iterator_t i
422  ** @returns xcb_generic_iterator_t
423  **
424  *****************************************************************************/
425 
426 xcb_generic_iterator_t
427 xcb_visualid_end (xcb_visualid_iterator_t i  /**< */)
428 {
429     xcb_generic_iterator_t ret;
430     ret.data = i.data + i.rem;
431     ret.index = i.index + ((char *) ret.data - (char *) i.data);
432     ret.rem = 0;
433     return ret;
434 }
435 
436 
437 /*****************************************************************************
438  **
439  ** void xcb_timestamp_next
440  **
441  ** @param xcb_timestamp_iterator_t *i
442  ** @returns void
443  **
444  *****************************************************************************/
445 
446 void
447 xcb_timestamp_next (xcb_timestamp_iterator_t *i  /**< */)
448 {
449     --i->rem;
450     ++i->data;
451     i->index += sizeof(xcb_timestamp_t);
452 }
453 
454 
455 /*****************************************************************************
456  **
457  ** xcb_generic_iterator_t xcb_timestamp_end
458  **
459  ** @param xcb_timestamp_iterator_t i
460  ** @returns xcb_generic_iterator_t
461  **
462  *****************************************************************************/
463 
464 xcb_generic_iterator_t
465 xcb_timestamp_end (xcb_timestamp_iterator_t i  /**< */)
466 {
467     xcb_generic_iterator_t ret;
468     ret.data = i.data + i.rem;
469     ret.index = i.index + ((char *) ret.data - (char *) i.data);
470     ret.rem = 0;
471     return ret;
472 }
473 
474 
475 /*****************************************************************************
476  **
477  ** void xcb_keysym_next
478  **
479  ** @param xcb_keysym_iterator_t *i
480  ** @returns void
481  **
482  *****************************************************************************/
483 
484 void
485 xcb_keysym_next (xcb_keysym_iterator_t *i  /**< */)
486 {
487     --i->rem;
488     ++i->data;
489     i->index += sizeof(xcb_keysym_t);
490 }
491 
492 
493 /*****************************************************************************
494  **
495  ** xcb_generic_iterator_t xcb_keysym_end
496  **
497  ** @param xcb_keysym_iterator_t i
498  ** @returns xcb_generic_iterator_t
499  **
500  *****************************************************************************/
501 
502 xcb_generic_iterator_t
503 xcb_keysym_end (xcb_keysym_iterator_t i  /**< */)
504 {
505     xcb_generic_iterator_t ret;
506     ret.data = i.data + i.rem;
507     ret.index = i.index + ((char *) ret.data - (char *) i.data);
508     ret.rem = 0;
509     return ret;
510 }
511 
512 
513 /*****************************************************************************
514  **
515  ** void xcb_keycode_next
516  **
517  ** @param xcb_keycode_iterator_t *i
518  ** @returns void
519  **
520  *****************************************************************************/
521 
522 void
523 xcb_keycode_next (xcb_keycode_iterator_t *i  /**< */)
524 {
525     --i->rem;
526     ++i->data;
527     i->index += sizeof(xcb_keycode_t);
528 }
529 
530 
531 /*****************************************************************************
532  **
533  ** xcb_generic_iterator_t xcb_keycode_end
534  **
535  ** @param xcb_keycode_iterator_t i
536  ** @returns xcb_generic_iterator_t
537  **
538  *****************************************************************************/
539 
540 xcb_generic_iterator_t
541 xcb_keycode_end (xcb_keycode_iterator_t i  /**< */)
542 {
543     xcb_generic_iterator_t ret;
544     ret.data = i.data + i.rem;
545     ret.index = i.index + ((char *) ret.data - (char *) i.data);
546     ret.rem = 0;
547     return ret;
548 }
549 
550 
551 /*****************************************************************************
552  **
553  ** void xcb_button_next
554  **
555  ** @param xcb_button_iterator_t *i
556  ** @returns void
557  **
558  *****************************************************************************/
559 
560 void
561 xcb_button_next (xcb_button_iterator_t *i  /**< */)
562 {
563     --i->rem;
564     ++i->data;
565     i->index += sizeof(xcb_button_t);
566 }
567 
568 
569 /*****************************************************************************
570  **
571  ** xcb_generic_iterator_t xcb_button_end
572  **
573  ** @param xcb_button_iterator_t i
574  ** @returns xcb_generic_iterator_t
575  **
576  *****************************************************************************/
577 
578 xcb_generic_iterator_t
579 xcb_button_end (xcb_button_iterator_t i  /**< */)
580 {
581     xcb_generic_iterator_t ret;
582     ret.data = i.data + i.rem;
583     ret.index = i.index + ((char *) ret.data - (char *) i.data);
584     ret.rem = 0;
585     return ret;
586 }
587 
588 
589 /*****************************************************************************
590  **
591  ** void xcb_point_next
592  **
593  ** @param xcb_point_iterator_t *i
594  ** @returns void
595  **
596  *****************************************************************************/
597 
598 void
599 xcb_point_next (xcb_point_iterator_t *i  /**< */)
600 {
601     --i->rem;
602     ++i->data;
603     i->index += sizeof(xcb_point_t);
604 }
605 
606 
607 /*****************************************************************************
608  **
609  ** xcb_generic_iterator_t xcb_point_end
610  **
611  ** @param xcb_point_iterator_t i
612  ** @returns xcb_generic_iterator_t
613  **
614  *****************************************************************************/
615 
616 xcb_generic_iterator_t
617 xcb_point_end (xcb_point_iterator_t i  /**< */)
618 {
619     xcb_generic_iterator_t ret;
620     ret.data = i.data + i.rem;
621     ret.index = i.index + ((char *) ret.data - (char *) i.data);
622     ret.rem = 0;
623     return ret;
624 }
625 
626 
627 /*****************************************************************************
628  **
629  ** void xcb_rectangle_next
630  **
631  ** @param xcb_rectangle_iterator_t *i
632  ** @returns void
633  **
634  *****************************************************************************/
635 
636 void
637 xcb_rectangle_next (xcb_rectangle_iterator_t *i  /**< */)
638 {
639     --i->rem;
640     ++i->data;
641     i->index += sizeof(xcb_rectangle_t);
642 }
643 
644 
645 /*****************************************************************************
646  **
647  ** xcb_generic_iterator_t xcb_rectangle_end
648  **
649  ** @param xcb_rectangle_iterator_t i
650  ** @returns xcb_generic_iterator_t
651  **
652  *****************************************************************************/
653 
654 xcb_generic_iterator_t
655 xcb_rectangle_end (xcb_rectangle_iterator_t i  /**< */)
656 {
657     xcb_generic_iterator_t ret;
658     ret.data = i.data + i.rem;
659     ret.index = i.index + ((char *) ret.data - (char *) i.data);
660     ret.rem = 0;
661     return ret;
662 }
663 
664 
665 /*****************************************************************************
666  **
667  ** void xcb_arc_next
668  **
669  ** @param xcb_arc_iterator_t *i
670  ** @returns void
671  **
672  *****************************************************************************/
673 
674 void
675 xcb_arc_next (xcb_arc_iterator_t *i  /**< */)
676 {
677     --i->rem;
678     ++i->data;
679     i->index += sizeof(xcb_arc_t);
680 }
681 
682 
683 /*****************************************************************************
684  **
685  ** xcb_generic_iterator_t xcb_arc_end
686  **
687  ** @param xcb_arc_iterator_t i
688  ** @returns xcb_generic_iterator_t
689  **
690  *****************************************************************************/
691 
692 xcb_generic_iterator_t
693 xcb_arc_end (xcb_arc_iterator_t i  /**< */)
694 {
695     xcb_generic_iterator_t ret;
696     ret.data = i.data + i.rem;
697     ret.index = i.index + ((char *) ret.data - (char *) i.data);
698     ret.rem = 0;
699     return ret;
700 }
701 
702 
703 /*****************************************************************************
704  **
705  ** void xcb_format_next
706  **
707  ** @param xcb_format_iterator_t *i
708  ** @returns void
709  **
710  *****************************************************************************/
711 
712 void
713 xcb_format_next (xcb_format_iterator_t *i  /**< */)
714 {
715     --i->rem;
716     ++i->data;
717     i->index += sizeof(xcb_format_t);
718 }
719 
720 
721 /*****************************************************************************
722  **
723  ** xcb_generic_iterator_t xcb_format_end
724  **
725  ** @param xcb_format_iterator_t i
726  ** @returns xcb_generic_iterator_t
727  **
728  *****************************************************************************/
729 
730 xcb_generic_iterator_t
731 xcb_format_end (xcb_format_iterator_t i  /**< */)
732 {
733     xcb_generic_iterator_t ret;
734     ret.data = i.data + i.rem;
735     ret.index = i.index + ((char *) ret.data - (char *) i.data);
736     ret.rem = 0;
737     return ret;
738 }
739 
740 
741 /*****************************************************************************
742  **
743  ** void xcb_visualtype_next
744  **
745  ** @param xcb_visualtype_iterator_t *i
746  ** @returns void
747  **
748  *****************************************************************************/
749 
750 void
751 xcb_visualtype_next (xcb_visualtype_iterator_t *i  /**< */)
752 {
753     --i->rem;
754     ++i->data;
755     i->index += sizeof(xcb_visualtype_t);
756 }
757 
758 
759 /*****************************************************************************
760  **
761  ** xcb_generic_iterator_t xcb_visualtype_end
762  **
763  ** @param xcb_visualtype_iterator_t i
764  ** @returns xcb_generic_iterator_t
765  **
766  *****************************************************************************/
767 
768 xcb_generic_iterator_t
769 xcb_visualtype_end (xcb_visualtype_iterator_t i  /**< */)
770 {
771     xcb_generic_iterator_t ret;
772     ret.data = i.data + i.rem;
773     ret.index = i.index + ((char *) ret.data - (char *) i.data);
774     ret.rem = 0;
775     return ret;
776 }
777 
778 int
779 xcb_depth_sizeof (const void  *_buffer  /**< */)
780 {
781     char *xcb_tmp = (char *)_buffer;
782     const xcb_depth_t *_aux = (xcb_depth_t *)_buffer;
783     unsigned int xcb_buffer_len = 0;
784     unsigned int xcb_block_len = 0;
785     unsigned int xcb_pad = 0;
786     unsigned int xcb_align_to = 0;
787 
788 
789     xcb_block_len += sizeof(xcb_depth_t);
790     xcb_tmp += xcb_block_len;
791     xcb_buffer_len += xcb_block_len;
792     xcb_block_len = 0;
793     /* visuals */
794     xcb_block_len += _aux->visuals_len * sizeof(xcb_visualtype_t);
795     xcb_tmp += xcb_block_len;
796     xcb_align_to = ALIGNOF(xcb_visualtype_t);
797     /* insert padding */
798     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
799     xcb_buffer_len += xcb_block_len + xcb_pad;
800     if (0 != xcb_pad) {
801         xcb_tmp += xcb_pad;
802         xcb_pad = 0;
803     }
804     xcb_block_len = 0;
805 
806     return xcb_buffer_len;
807 }
808 
809 
810 /*****************************************************************************
811  **
812  ** xcb_visualtype_t * xcb_depth_visuals
813  **
814  ** @param const xcb_depth_t *R
815  ** @returns xcb_visualtype_t *
816  **
817  *****************************************************************************/
818 
819 xcb_visualtype_t *
820 xcb_depth_visuals (const xcb_depth_t *R  /**< */)
821 {
822     return (xcb_visualtype_t *) (R + 1);
823 }
824 
825 
826 /*****************************************************************************
827  **
828  ** int xcb_depth_visuals_length
829  **
830  ** @param const xcb_depth_t *R
831  ** @returns int
832  **
833  *****************************************************************************/
834 
835 int
836 xcb_depth_visuals_length (const xcb_depth_t *R  /**< */)
837 {
838     return R->visuals_len;
839 }
840 
841 
842 /*****************************************************************************
843  **
844  ** xcb_visualtype_iterator_t xcb_depth_visuals_iterator
845  **
846  ** @param const xcb_depth_t *R
847  ** @returns xcb_visualtype_iterator_t
848  **
849  *****************************************************************************/
850 
851 xcb_visualtype_iterator_t
852 xcb_depth_visuals_iterator (const xcb_depth_t *R  /**< */)
853 {
854     xcb_visualtype_iterator_t i;
855     i.data = (xcb_visualtype_t *) (R + 1);
856     i.rem = R->visuals_len;
857     i.index = (char *) i.data - (char *) R;
858     return i;
859 }
860 
861 
862 /*****************************************************************************
863  **
864  ** void xcb_depth_next
865  **
866  ** @param xcb_depth_iterator_t *i
867  ** @returns void
868  **
869  *****************************************************************************/
870 
871 void
872 xcb_depth_next (xcb_depth_iterator_t *i  /**< */)
873 {
874     xcb_depth_t *R = i->data;
875     xcb_generic_iterator_t child;
876     child.data = (xcb_depth_t *)(((char *)R) + xcb_depth_sizeof(R));
877     i->index = (char *) child.data - (char *) i->data;
878     --i->rem;
879     i->data = (xcb_depth_t *) child.data;
880 }
881 
882 
883 /*****************************************************************************
884  **
885  ** xcb_generic_iterator_t xcb_depth_end
886  **
887  ** @param xcb_depth_iterator_t i
888  ** @returns xcb_generic_iterator_t
889  **
890  *****************************************************************************/
891 
892 xcb_generic_iterator_t
893 xcb_depth_end (xcb_depth_iterator_t i  /**< */)
894 {
895     xcb_generic_iterator_t ret;
896     while(i.rem > 0)
897         xcb_depth_next(&i);
898     ret.data = i.data;
899     ret.rem = i.rem;
900     ret.index = i.index;
901     return ret;
902 }
903 
904 int
905 xcb_screen_sizeof (const void  *_buffer  /**< */)
906 {
907     char *xcb_tmp = (char *)_buffer;
908     const xcb_screen_t *_aux = (xcb_screen_t *)_buffer;
909     unsigned int xcb_buffer_len = 0;
910     unsigned int xcb_block_len = 0;
911     unsigned int xcb_pad = 0;
912     unsigned int xcb_align_to = 0;
913 
914     unsigned int i;
915     unsigned int xcb_tmp_len;
916 
917     xcb_block_len += sizeof(xcb_screen_t);
918     xcb_tmp += xcb_block_len;
919     xcb_buffer_len += xcb_block_len;
920     xcb_block_len = 0;
921     /* allowed_depths */
922     for(i=0; i<_aux->allowed_depths_len; i++) {
923         xcb_tmp_len = xcb_depth_sizeof(xcb_tmp);
924         xcb_block_len += xcb_tmp_len;
925         xcb_tmp += xcb_tmp_len;
926     }
927     xcb_align_to = ALIGNOF(xcb_depth_t);
928     /* insert padding */
929     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
930     xcb_buffer_len += xcb_block_len + xcb_pad;
931     if (0 != xcb_pad) {
932         xcb_tmp += xcb_pad;
933         xcb_pad = 0;
934     }
935     xcb_block_len = 0;
936 
937     return xcb_buffer_len;
938 }
939 
940 
941 /*****************************************************************************
942  **
943  ** int xcb_screen_allowed_depths_length
944  **
945  ** @param const xcb_screen_t *R
946  ** @returns int
947  **
948  *****************************************************************************/
949 
950 int
951 xcb_screen_allowed_depths_length (const xcb_screen_t *R  /**< */)
952 {
953     return R->allowed_depths_len;
954 }
955 
956 
957 /*****************************************************************************
958  **
959  ** xcb_depth_iterator_t xcb_screen_allowed_depths_iterator
960  **
961  ** @param const xcb_screen_t *R
962  ** @returns xcb_depth_iterator_t
963  **
964  *****************************************************************************/
965 
966 xcb_depth_iterator_t
967 xcb_screen_allowed_depths_iterator (const xcb_screen_t *R  /**< */)
968 {
969     xcb_depth_iterator_t i;
970     i.data = (xcb_depth_t *) (R + 1);
971     i.rem = R->allowed_depths_len;
972     i.index = (char *) i.data - (char *) R;
973     return i;
974 }
975 
976 
977 /*****************************************************************************
978  **
979  ** void xcb_screen_next
980  **
981  ** @param xcb_screen_iterator_t *i
982  ** @returns void
983  **
984  *****************************************************************************/
985 
986 void
987 xcb_screen_next (xcb_screen_iterator_t *i  /**< */)
988 {
989     xcb_screen_t *R = i->data;
990     xcb_generic_iterator_t child;
991     child.data = (xcb_screen_t *)(((char *)R) + xcb_screen_sizeof(R));
992     i->index = (char *) child.data - (char *) i->data;
993     --i->rem;
994     i->data = (xcb_screen_t *) child.data;
995 }
996 
997 
998 /*****************************************************************************
999  **
1000  ** xcb_generic_iterator_t xcb_screen_end
1001  **
1002  ** @param xcb_screen_iterator_t i
1003  ** @returns xcb_generic_iterator_t
1004  **
1005  *****************************************************************************/
1006 
1007 xcb_generic_iterator_t
1008 xcb_screen_end (xcb_screen_iterator_t i  /**< */)
1009 {
1010     xcb_generic_iterator_t ret;
1011     while(i.rem > 0)
1012         xcb_screen_next(&i);
1013     ret.data = i.data;
1014     ret.rem = i.rem;
1015     ret.index = i.index;
1016     return ret;
1017 }
1018 
1019 int
1020 xcb_setup_request_sizeof (const void  *_buffer  /**< */)
1021 {
1022     char *xcb_tmp = (char *)_buffer;
1023     const xcb_setup_request_t *_aux = (xcb_setup_request_t *)_buffer;
1024     unsigned int xcb_buffer_len = 0;
1025     unsigned int xcb_block_len = 0;
1026     unsigned int xcb_pad = 0;
1027     unsigned int xcb_align_to = 0;
1028 
1029 
1030     xcb_block_len += sizeof(xcb_setup_request_t);
1031     xcb_tmp += xcb_block_len;
1032     xcb_buffer_len += xcb_block_len;
1033     xcb_block_len = 0;
1034     /* authorization_protocol_name */
1035     xcb_block_len += _aux->authorization_protocol_name_len * sizeof(char);
1036     xcb_tmp += xcb_block_len;
1037     xcb_align_to = ALIGNOF(char);
1038     /* insert padding */
1039     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1040     xcb_buffer_len += xcb_block_len + xcb_pad;
1041     if (0 != xcb_pad) {
1042         xcb_tmp += xcb_pad;
1043         xcb_pad = 0;
1044     }
1045     xcb_block_len = 0;
1046     /* authorization_protocol_data */
1047     xcb_block_len += _aux->authorization_protocol_data_len * sizeof(char);
1048     xcb_tmp += xcb_block_len;
1049     xcb_align_to = ALIGNOF(char);
1050     /* insert padding */
1051     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1052     xcb_buffer_len += xcb_block_len + xcb_pad;
1053     if (0 != xcb_pad) {
1054         xcb_tmp += xcb_pad;
1055         xcb_pad = 0;
1056     }
1057     xcb_block_len = 0;
1058 
1059     return xcb_buffer_len;
1060 }
1061 
1062 
1063 /*****************************************************************************
1064  **
1065  ** char * xcb_setup_request_authorization_protocol_name
1066  **
1067  ** @param const xcb_setup_request_t *R
1068  ** @returns char *
1069  **
1070  *****************************************************************************/
1071 
1072 char *
1073 xcb_setup_request_authorization_protocol_name (const xcb_setup_request_t *R  /**< */)
1074 {
1075     return (char *) (R + 1);
1076 }
1077 
1078 
1079 /*****************************************************************************
1080  **
1081  ** int xcb_setup_request_authorization_protocol_name_length
1082  **
1083  ** @param const xcb_setup_request_t *R
1084  ** @returns int
1085  **
1086  *****************************************************************************/
1087 
1088 int
1089 xcb_setup_request_authorization_protocol_name_length (const xcb_setup_request_t *R  /**< */)
1090 {
1091     return R->authorization_protocol_name_len;
1092 }
1093 
1094 
1095 /*****************************************************************************
1096  **
1097  ** xcb_generic_iterator_t xcb_setup_request_authorization_protocol_name_end
1098  **
1099  ** @param const xcb_setup_request_t *R
1100  ** @returns xcb_generic_iterator_t
1101  **
1102  *****************************************************************************/
1103 
1104 xcb_generic_iterator_t
1105 xcb_setup_request_authorization_protocol_name_end (const xcb_setup_request_t *R  /**< */)
1106 {
1107     xcb_generic_iterator_t i;
1108     i.data = ((char *) (R + 1)) + (R->authorization_protocol_name_len);
1109     i.rem = 0;
1110     i.index = (char *) i.data - (char *) R;
1111     return i;
1112 }
1113 
1114 
1115 /*****************************************************************************
1116  **
1117  ** char * xcb_setup_request_authorization_protocol_data
1118  **
1119  ** @param const xcb_setup_request_t *R
1120  ** @returns char *
1121  **
1122  *****************************************************************************/
1123 
1124 char *
1125 xcb_setup_request_authorization_protocol_data (const xcb_setup_request_t *R  /**< */)
1126 {
1127     xcb_generic_iterator_t prev = xcb_setup_request_authorization_protocol_name_end(R);
1128     return (char *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0);
1129 }
1130 
1131 
1132 /*****************************************************************************
1133  **
1134  ** int xcb_setup_request_authorization_protocol_data_length
1135  **
1136  ** @param const xcb_setup_request_t *R
1137  ** @returns int
1138  **
1139  *****************************************************************************/
1140 
1141 int
1142 xcb_setup_request_authorization_protocol_data_length (const xcb_setup_request_t *R  /**< */)
1143 {
1144     return R->authorization_protocol_data_len;
1145 }
1146 
1147 
1148 /*****************************************************************************
1149  **
1150  ** xcb_generic_iterator_t xcb_setup_request_authorization_protocol_data_end
1151  **
1152  ** @param const xcb_setup_request_t *R
1153  ** @returns xcb_generic_iterator_t
1154  **
1155  *****************************************************************************/
1156 
1157 xcb_generic_iterator_t
1158 xcb_setup_request_authorization_protocol_data_end (const xcb_setup_request_t *R  /**< */)
1159 {
1160     xcb_generic_iterator_t i;
1161     xcb_generic_iterator_t child = xcb_setup_request_authorization_protocol_name_end(R);
1162     i.data = ((char *) child.data) + (R->authorization_protocol_data_len);
1163     i.rem = 0;
1164     i.index = (char *) i.data - (char *) R;
1165     return i;
1166 }
1167 
1168 
1169 /*****************************************************************************
1170  **
1171  ** void xcb_setup_request_next
1172  **
1173  ** @param xcb_setup_request_iterator_t *i
1174  ** @returns void
1175  **
1176  *****************************************************************************/
1177 
1178 void
1179 xcb_setup_request_next (xcb_setup_request_iterator_t *i  /**< */)
1180 {
1181     xcb_setup_request_t *R = i->data;
1182     xcb_generic_iterator_t child;
1183     child.data = (xcb_setup_request_t *)(((char *)R) + xcb_setup_request_sizeof(R));
1184     i->index = (char *) child.data - (char *) i->data;
1185     --i->rem;
1186     i->data = (xcb_setup_request_t *) child.data;
1187 }
1188 
1189 
1190 /*****************************************************************************
1191  **
1192  ** xcb_generic_iterator_t xcb_setup_request_end
1193  **
1194  ** @param xcb_setup_request_iterator_t i
1195  ** @returns xcb_generic_iterator_t
1196  **
1197  *****************************************************************************/
1198 
1199 xcb_generic_iterator_t
1200 xcb_setup_request_end (xcb_setup_request_iterator_t i  /**< */)
1201 {
1202     xcb_generic_iterator_t ret;
1203     while(i.rem > 0)
1204         xcb_setup_request_next(&i);
1205     ret.data = i.data;
1206     ret.rem = i.rem;
1207     ret.index = i.index;
1208     return ret;
1209 }
1210 
1211 int
1212 xcb_setup_failed_sizeof (const void  *_buffer  /**< */)
1213 {
1214     char *xcb_tmp = (char *)_buffer;
1215     const xcb_setup_failed_t *_aux = (xcb_setup_failed_t *)_buffer;
1216     unsigned int xcb_buffer_len = 0;
1217     unsigned int xcb_block_len = 0;
1218     unsigned int xcb_pad = 0;
1219     unsigned int xcb_align_to = 0;
1220 
1221 
1222     xcb_block_len += sizeof(xcb_setup_failed_t);
1223     xcb_tmp += xcb_block_len;
1224     xcb_buffer_len += xcb_block_len;
1225     xcb_block_len = 0;
1226     /* reason */
1227     xcb_block_len += _aux->reason_len * sizeof(char);
1228     xcb_tmp += xcb_block_len;
1229     xcb_align_to = ALIGNOF(char);
1230     /* insert padding */
1231     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1232     xcb_buffer_len += xcb_block_len + xcb_pad;
1233     if (0 != xcb_pad) {
1234         xcb_tmp += xcb_pad;
1235         xcb_pad = 0;
1236     }
1237     xcb_block_len = 0;
1238 
1239     return xcb_buffer_len;
1240 }
1241 
1242 
1243 /*****************************************************************************
1244  **
1245  ** char * xcb_setup_failed_reason
1246  **
1247  ** @param const xcb_setup_failed_t *R
1248  ** @returns char *
1249  **
1250  *****************************************************************************/
1251 
1252 char *
1253 xcb_setup_failed_reason (const xcb_setup_failed_t *R  /**< */)
1254 {
1255     return (char *) (R + 1);
1256 }
1257 
1258 
1259 /*****************************************************************************
1260  **
1261  ** int xcb_setup_failed_reason_length
1262  **
1263  ** @param const xcb_setup_failed_t *R
1264  ** @returns int
1265  **
1266  *****************************************************************************/
1267 
1268 int
1269 xcb_setup_failed_reason_length (const xcb_setup_failed_t *R  /**< */)
1270 {
1271     return R->reason_len;
1272 }
1273 
1274 
1275 /*****************************************************************************
1276  **
1277  ** xcb_generic_iterator_t xcb_setup_failed_reason_end
1278  **
1279  ** @param const xcb_setup_failed_t *R
1280  ** @returns xcb_generic_iterator_t
1281  **
1282  *****************************************************************************/
1283 
1284 xcb_generic_iterator_t
1285 xcb_setup_failed_reason_end (const xcb_setup_failed_t *R  /**< */)
1286 {
1287     xcb_generic_iterator_t i;
1288     i.data = ((char *) (R + 1)) + (R->reason_len);
1289     i.rem = 0;
1290     i.index = (char *) i.data - (char *) R;
1291     return i;
1292 }
1293 
1294 
1295 /*****************************************************************************
1296  **
1297  ** void xcb_setup_failed_next
1298  **
1299  ** @param xcb_setup_failed_iterator_t *i
1300  ** @returns void
1301  **
1302  *****************************************************************************/
1303 
1304 void
1305 xcb_setup_failed_next (xcb_setup_failed_iterator_t *i  /**< */)
1306 {
1307     xcb_setup_failed_t *R = i->data;
1308     xcb_generic_iterator_t child;
1309     child.data = (xcb_setup_failed_t *)(((char *)R) + xcb_setup_failed_sizeof(R));
1310     i->index = (char *) child.data - (char *) i->data;
1311     --i->rem;
1312     i->data = (xcb_setup_failed_t *) child.data;
1313 }
1314 
1315 
1316 /*****************************************************************************
1317  **
1318  ** xcb_generic_iterator_t xcb_setup_failed_end
1319  **
1320  ** @param xcb_setup_failed_iterator_t i
1321  ** @returns xcb_generic_iterator_t
1322  **
1323  *****************************************************************************/
1324 
1325 xcb_generic_iterator_t
1326 xcb_setup_failed_end (xcb_setup_failed_iterator_t i  /**< */)
1327 {
1328     xcb_generic_iterator_t ret;
1329     while(i.rem > 0)
1330         xcb_setup_failed_next(&i);
1331     ret.data = i.data;
1332     ret.rem = i.rem;
1333     ret.index = i.index;
1334     return ret;
1335 }
1336 
1337 int
1338 xcb_setup_authenticate_sizeof (const void  *_buffer  /**< */)
1339 {
1340     char *xcb_tmp = (char *)_buffer;
1341     const xcb_setup_authenticate_t *_aux = (xcb_setup_authenticate_t *)_buffer;
1342     unsigned int xcb_buffer_len = 0;
1343     unsigned int xcb_block_len = 0;
1344     unsigned int xcb_pad = 0;
1345     unsigned int xcb_align_to = 0;
1346 
1347 
1348     xcb_block_len += sizeof(xcb_setup_authenticate_t);
1349     xcb_tmp += xcb_block_len;
1350     xcb_buffer_len += xcb_block_len;
1351     xcb_block_len = 0;
1352     /* reason */
1353     xcb_block_len += (_aux->length * 4) * sizeof(char);
1354     xcb_tmp += xcb_block_len;
1355     xcb_align_to = ALIGNOF(char);
1356     /* insert padding */
1357     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1358     xcb_buffer_len += xcb_block_len + xcb_pad;
1359     if (0 != xcb_pad) {
1360         xcb_tmp += xcb_pad;
1361         xcb_pad = 0;
1362     }
1363     xcb_block_len = 0;
1364 
1365     return xcb_buffer_len;
1366 }
1367 
1368 
1369 /*****************************************************************************
1370  **
1371  ** char * xcb_setup_authenticate_reason
1372  **
1373  ** @param const xcb_setup_authenticate_t *R
1374  ** @returns char *
1375  **
1376  *****************************************************************************/
1377 
1378 char *
1379 xcb_setup_authenticate_reason (const xcb_setup_authenticate_t *R  /**< */)
1380 {
1381     return (char *) (R + 1);
1382 }
1383 
1384 
1385 /*****************************************************************************
1386  **
1387  ** int xcb_setup_authenticate_reason_length
1388  **
1389  ** @param const xcb_setup_authenticate_t *R
1390  ** @returns int
1391  **
1392  *****************************************************************************/
1393 
1394 int
1395 xcb_setup_authenticate_reason_length (const xcb_setup_authenticate_t *R  /**< */)
1396 {
1397     return (R->length * 4);
1398 }
1399 
1400 
1401 /*****************************************************************************
1402  **
1403  ** xcb_generic_iterator_t xcb_setup_authenticate_reason_end
1404  **
1405  ** @param const xcb_setup_authenticate_t *R
1406  ** @returns xcb_generic_iterator_t
1407  **
1408  *****************************************************************************/
1409 
1410 xcb_generic_iterator_t
1411 xcb_setup_authenticate_reason_end (const xcb_setup_authenticate_t *R  /**< */)
1412 {
1413     xcb_generic_iterator_t i;
1414     i.data = ((char *) (R + 1)) + ((R->length * 4));
1415     i.rem = 0;
1416     i.index = (char *) i.data - (char *) R;
1417     return i;
1418 }
1419 
1420 
1421 /*****************************************************************************
1422  **
1423  ** void xcb_setup_authenticate_next
1424  **
1425  ** @param xcb_setup_authenticate_iterator_t *i
1426  ** @returns void
1427  **
1428  *****************************************************************************/
1429 
1430 void
1431 xcb_setup_authenticate_next (xcb_setup_authenticate_iterator_t *i  /**< */)
1432 {
1433     xcb_setup_authenticate_t *R = i->data;
1434     xcb_generic_iterator_t child;
1435     child.data = (xcb_setup_authenticate_t *)(((char *)R) + xcb_setup_authenticate_sizeof(R));
1436     i->index = (char *) child.data - (char *) i->data;
1437     --i->rem;
1438     i->data = (xcb_setup_authenticate_t *) child.data;
1439 }
1440 
1441 
1442 /*****************************************************************************
1443  **
1444  ** xcb_generic_iterator_t xcb_setup_authenticate_end
1445  **
1446  ** @param xcb_setup_authenticate_iterator_t i
1447  ** @returns xcb_generic_iterator_t
1448  **
1449  *****************************************************************************/
1450 
1451 xcb_generic_iterator_t
1452 xcb_setup_authenticate_end (xcb_setup_authenticate_iterator_t i  /**< */)
1453 {
1454     xcb_generic_iterator_t ret;
1455     while(i.rem > 0)
1456         xcb_setup_authenticate_next(&i);
1457     ret.data = i.data;
1458     ret.rem = i.rem;
1459     ret.index = i.index;
1460     return ret;
1461 }
1462 
1463 int
1464 xcb_setup_sizeof (const void  *_buffer  /**< */)
1465 {
1466     char *xcb_tmp = (char *)_buffer;
1467     const xcb_setup_t *_aux = (xcb_setup_t *)_buffer;
1468     unsigned int xcb_buffer_len = 0;
1469     unsigned int xcb_block_len = 0;
1470     unsigned int xcb_pad = 0;
1471     unsigned int xcb_align_to = 0;
1472 
1473     unsigned int i;
1474     unsigned int xcb_tmp_len;
1475 
1476     xcb_block_len += sizeof(xcb_setup_t);
1477     xcb_tmp += xcb_block_len;
1478     xcb_buffer_len += xcb_block_len;
1479     xcb_block_len = 0;
1480     /* vendor */
1481     xcb_block_len += _aux->vendor_len * sizeof(char);
1482     xcb_tmp += xcb_block_len;
1483     xcb_align_to = ALIGNOF(char);
1484     /* insert padding */
1485     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1486     xcb_buffer_len += xcb_block_len + xcb_pad;
1487     if (0 != xcb_pad) {
1488         xcb_tmp += xcb_pad;
1489         xcb_pad = 0;
1490     }
1491     xcb_block_len = 0;
1492     /* pixmap_formats */
1493     xcb_block_len += _aux->pixmap_formats_len * sizeof(xcb_format_t);
1494     xcb_tmp += xcb_block_len;
1495     xcb_align_to = ALIGNOF(xcb_format_t);
1496     /* insert padding */
1497     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1498     xcb_buffer_len += xcb_block_len + xcb_pad;
1499     if (0 != xcb_pad) {
1500         xcb_tmp += xcb_pad;
1501         xcb_pad = 0;
1502     }
1503     xcb_block_len = 0;
1504     /* roots */
1505     for(i=0; i<_aux->roots_len; i++) {
1506         xcb_tmp_len = xcb_screen_sizeof(xcb_tmp);
1507         xcb_block_len += xcb_tmp_len;
1508         xcb_tmp += xcb_tmp_len;
1509     }
1510     xcb_align_to = ALIGNOF(xcb_screen_t);
1511     /* insert padding */
1512     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1513     xcb_buffer_len += xcb_block_len + xcb_pad;
1514     if (0 != xcb_pad) {
1515         xcb_tmp += xcb_pad;
1516         xcb_pad = 0;
1517     }
1518     xcb_block_len = 0;
1519 
1520     return xcb_buffer_len;
1521 }
1522 
1523 
1524 /*****************************************************************************
1525  **
1526  ** char * xcb_setup_vendor
1527  **
1528  ** @param const xcb_setup_t *R
1529  ** @returns char *
1530  **
1531  *****************************************************************************/
1532 
1533 char *
1534 xcb_setup_vendor (const xcb_setup_t *R  /**< */)
1535 {
1536     return (char *) (R + 1);
1537 }
1538 
1539 
1540 /*****************************************************************************
1541  **
1542  ** int xcb_setup_vendor_length
1543  **
1544  ** @param const xcb_setup_t *R
1545  ** @returns int
1546  **
1547  *****************************************************************************/
1548 
1549 int
1550 xcb_setup_vendor_length (const xcb_setup_t *R  /**< */)
1551 {
1552     return R->vendor_len;
1553 }
1554 
1555 
1556 /*****************************************************************************
1557  **
1558  ** xcb_generic_iterator_t xcb_setup_vendor_end
1559  **
1560  ** @param const xcb_setup_t *R
1561  ** @returns xcb_generic_iterator_t
1562  **
1563  *****************************************************************************/
1564 
1565 xcb_generic_iterator_t
1566 xcb_setup_vendor_end (const xcb_setup_t *R  /**< */)
1567 {
1568     xcb_generic_iterator_t i;
1569     i.data = ((char *) (R + 1)) + (R->vendor_len);
1570     i.rem = 0;
1571     i.index = (char *) i.data - (char *) R;
1572     return i;
1573 }
1574 
1575 
1576 /*****************************************************************************
1577  **
1578  ** xcb_format_t * xcb_setup_pixmap_formats
1579  **
1580  ** @param const xcb_setup_t *R
1581  ** @returns xcb_format_t *
1582  **
1583  *****************************************************************************/
1584 
1585 xcb_format_t *
1586 xcb_setup_pixmap_formats (const xcb_setup_t *R  /**< */)
1587 {
1588     xcb_generic_iterator_t prev = xcb_setup_vendor_end(R);
1589     return (xcb_format_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_format_t, prev.index) + 0);
1590 }
1591 
1592 
1593 /*****************************************************************************
1594  **
1595  ** int xcb_setup_pixmap_formats_length
1596  **
1597  ** @param const xcb_setup_t *R
1598  ** @returns int
1599  **
1600  *****************************************************************************/
1601 
1602 int
1603 xcb_setup_pixmap_formats_length (const xcb_setup_t *R  /**< */)
1604 {
1605     return R->pixmap_formats_len;
1606 }
1607 
1608 
1609 /*****************************************************************************
1610  **
1611  ** xcb_format_iterator_t xcb_setup_pixmap_formats_iterator
1612  **
1613  ** @param const xcb_setup_t *R
1614  ** @returns xcb_format_iterator_t
1615  **
1616  *****************************************************************************/
1617 
1618 xcb_format_iterator_t
1619 xcb_setup_pixmap_formats_iterator (const xcb_setup_t *R  /**< */)
1620 {
1621     xcb_format_iterator_t i;
1622     xcb_generic_iterator_t prev = xcb_setup_vendor_end(R);
1623     i.data = (xcb_format_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_format_t, prev.index));
1624     i.rem = R->pixmap_formats_len;
1625     i.index = (char *) i.data - (char *) R;
1626     return i;
1627 }
1628 
1629 
1630 /*****************************************************************************
1631  **
1632  ** int xcb_setup_roots_length
1633  **
1634  ** @param const xcb_setup_t *R
1635  ** @returns int
1636  **
1637  *****************************************************************************/
1638 
1639 int
1640 xcb_setup_roots_length (const xcb_setup_t *R  /**< */)
1641 {
1642     return R->roots_len;
1643 }
1644 
1645 
1646 /*****************************************************************************
1647  **
1648  ** xcb_screen_iterator_t xcb_setup_roots_iterator
1649  **
1650  ** @param const xcb_setup_t *R
1651  ** @returns xcb_screen_iterator_t
1652  **
1653  *****************************************************************************/
1654 
1655 xcb_screen_iterator_t
1656 xcb_setup_roots_iterator (const xcb_setup_t *R  /**< */)
1657 {
1658     xcb_screen_iterator_t i;
1659     xcb_generic_iterator_t prev = xcb_format_end(xcb_setup_pixmap_formats_iterator(R));
1660     i.data = (xcb_screen_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_screen_t, prev.index));
1661     i.rem = R->roots_len;
1662     i.index = (char *) i.data - (char *) R;
1663     return i;
1664 }
1665 
1666 
1667 /*****************************************************************************
1668  **
1669  ** void xcb_setup_next
1670  **
1671  ** @param xcb_setup_iterator_t *i
1672  ** @returns void
1673  **
1674  *****************************************************************************/
1675 
1676 void
1677 xcb_setup_next (xcb_setup_iterator_t *i  /**< */)
1678 {
1679     xcb_setup_t *R = i->data;
1680     xcb_generic_iterator_t child;
1681     child.data = (xcb_setup_t *)(((char *)R) + xcb_setup_sizeof(R));
1682     i->index = (char *) child.data - (char *) i->data;
1683     --i->rem;
1684     i->data = (xcb_setup_t *) child.data;
1685 }
1686 
1687 
1688 /*****************************************************************************
1689  **
1690  ** xcb_generic_iterator_t xcb_setup_end
1691  **
1692  ** @param xcb_setup_iterator_t i
1693  ** @returns xcb_generic_iterator_t
1694  **
1695  *****************************************************************************/
1696 
1697 xcb_generic_iterator_t
1698 xcb_setup_end (xcb_setup_iterator_t i  /**< */)
1699 {
1700     xcb_generic_iterator_t ret;
1701     while(i.rem > 0)
1702         xcb_setup_next(&i);
1703     ret.data = i.data;
1704     ret.rem = i.rem;
1705     ret.index = i.index;
1706     return ret;
1707 }
1708 
1709 
1710 /*****************************************************************************
1711  **
1712  ** void xcb_client_message_data_next
1713  **
1714  ** @param xcb_client_message_data_iterator_t *i
1715  ** @returns void
1716  **
1717  *****************************************************************************/
1718 
1719 void
1720 xcb_client_message_data_next (xcb_client_message_data_iterator_t *i  /**< */)
1721 {
1722     --i->rem;
1723     ++i->data;
1724     i->index += sizeof(xcb_client_message_data_t);
1725 }
1726 
1727 
1728 /*****************************************************************************
1729  **
1730  ** xcb_generic_iterator_t xcb_client_message_data_end
1731  **
1732  ** @param xcb_client_message_data_iterator_t i
1733  ** @returns xcb_generic_iterator_t
1734  **
1735  *****************************************************************************/
1736 
1737 xcb_generic_iterator_t
1738 xcb_client_message_data_end (xcb_client_message_data_iterator_t i  /**< */)
1739 {
1740     xcb_generic_iterator_t ret;
1741     ret.data = i.data + i.rem;
1742     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1743     ret.rem = 0;
1744     return ret;
1745 }
1746 
1747 int
1748 xcb_create_window_sizeof (const void  *_buffer  /**< */)
1749 {
1750     char *xcb_tmp = (char *)_buffer;
1751     const xcb_create_window_request_t *_aux = (xcb_create_window_request_t *)_buffer;
1752     unsigned int xcb_buffer_len = 0;
1753     unsigned int xcb_block_len = 0;
1754     unsigned int xcb_pad = 0;
1755     unsigned int xcb_align_to = 0;
1756 
1757 
1758     xcb_block_len += sizeof(xcb_create_window_request_t);
1759     xcb_tmp += xcb_block_len;
1760     xcb_buffer_len += xcb_block_len;
1761     xcb_block_len = 0;
1762     /* value_list */
1763     xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
1764     xcb_tmp += xcb_block_len;
1765     xcb_align_to = ALIGNOF(uint32_t);
1766     /* insert padding */
1767     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1768     xcb_buffer_len += xcb_block_len + xcb_pad;
1769     if (0 != xcb_pad) {
1770         xcb_tmp += xcb_pad;
1771         xcb_pad = 0;
1772     }
1773     xcb_block_len = 0;
1774 
1775     return xcb_buffer_len;
1776 }
1777 
1778 
1779 /*****************************************************************************
1780  **
1781  ** xcb_void_cookie_t xcb_create_window_checked
1782  **
1783  ** @param xcb_connection_t *c
1784  ** @param uint8_t           depth
1785  ** @param xcb_window_t      wid
1786  ** @param xcb_window_t      parent
1787  ** @param int16_t           x
1788  ** @param int16_t           y
1789  ** @param uint16_t          width
1790  ** @param uint16_t          height
1791  ** @param uint16_t          border_width
1792  ** @param uint16_t          _class
1793  ** @param xcb_visualid_t    visual
1794  ** @param uint32_t          value_mask
1795  ** @param const uint32_t   *value_list
1796  ** @returns xcb_void_cookie_t
1797  **
1798  *****************************************************************************/
1799 
1800 xcb_void_cookie_t
1801 xcb_create_window_checked (xcb_connection_t *c  /**< */,
1802                            uint8_t           depth  /**< */,
1803                            xcb_window_t      wid  /**< */,
1804                            xcb_window_t      parent  /**< */,
1805                            int16_t           x  /**< */,
1806                            int16_t           y  /**< */,
1807                            uint16_t          width  /**< */,
1808                            uint16_t          height  /**< */,
1809                            uint16_t          border_width  /**< */,
1810                            uint16_t          _class  /**< */,
1811                            xcb_visualid_t    visual  /**< */,
1812                            uint32_t          value_mask  /**< */,
1813                            const uint32_t   *value_list  /**< */)
1814 {
1815     static const xcb_protocol_request_t xcb_req = {
1816         /* count */ 4,
1817         /* ext */ 0,
1818         /* opcode */ XCB_CREATE_WINDOW,
1819         /* isvoid */ 1
1820     };
1821 
1822     struct iovec xcb_parts[6];
1823     xcb_void_cookie_t xcb_ret;
1824     xcb_create_window_request_t xcb_out;
1825 
1826     xcb_out.depth = depth;
1827     xcb_out.wid = wid;
1828     xcb_out.parent = parent;
1829     xcb_out.x = x;
1830     xcb_out.y = y;
1831     xcb_out.width = width;
1832     xcb_out.height = height;
1833     xcb_out.border_width = border_width;
1834     xcb_out._class = _class;
1835     xcb_out.visual = visual;
1836     xcb_out.value_mask = value_mask;
1837 
1838     xcb_parts[2].iov_base = (char *) &xcb_out;
1839     xcb_parts[2].iov_len = sizeof(xcb_out);
1840     xcb_parts[3].iov_base = 0;
1841     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1842     /* uint32_t value_list */
1843     xcb_parts[4].iov_base = (char *) value_list;
1844     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
1845     xcb_parts[5].iov_base = 0;
1846     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1847 
1848     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1849     return xcb_ret;
1850 }
1851 
1852 
1853 /*****************************************************************************
1854  **
1855  ** xcb_void_cookie_t xcb_create_window
1856  **
1857  ** @param xcb_connection_t *c
1858  ** @param uint8_t           depth
1859  ** @param xcb_window_t      wid
1860  ** @param xcb_window_t      parent
1861  ** @param int16_t           x
1862  ** @param int16_t           y
1863  ** @param uint16_t          width
1864  ** @param uint16_t          height
1865  ** @param uint16_t          border_width
1866  ** @param uint16_t          _class
1867  ** @param xcb_visualid_t    visual
1868  ** @param uint32_t          value_mask
1869  ** @param const uint32_t   *value_list
1870  ** @returns xcb_void_cookie_t
1871  **
1872  *****************************************************************************/
1873 
1874 xcb_void_cookie_t
1875 xcb_create_window (xcb_connection_t *c  /**< */,
1876                    uint8_t           depth  /**< */,
1877                    xcb_window_t      wid  /**< */,
1878                    xcb_window_t      parent  /**< */,
1879                    int16_t           x  /**< */,
1880                    int16_t           y  /**< */,
1881                    uint16_t          width  /**< */,
1882                    uint16_t          height  /**< */,
1883                    uint16_t          border_width  /**< */,
1884                    uint16_t          _class  /**< */,
1885                    xcb_visualid_t    visual  /**< */,
1886                    uint32_t          value_mask  /**< */,
1887                    const uint32_t   *value_list  /**< */)
1888 {
1889     static const xcb_protocol_request_t xcb_req = {
1890         /* count */ 4,
1891         /* ext */ 0,
1892         /* opcode */ XCB_CREATE_WINDOW,
1893         /* isvoid */ 1
1894     };
1895 
1896     struct iovec xcb_parts[6];
1897     xcb_void_cookie_t xcb_ret;
1898     xcb_create_window_request_t xcb_out;
1899 
1900     xcb_out.depth = depth;
1901     xcb_out.wid = wid;
1902     xcb_out.parent = parent;
1903     xcb_out.x = x;
1904     xcb_out.y = y;
1905     xcb_out.width = width;
1906     xcb_out.height = height;
1907     xcb_out.border_width = border_width;
1908     xcb_out._class = _class;
1909     xcb_out.visual = visual;
1910     xcb_out.value_mask = value_mask;
1911 
1912     xcb_parts[2].iov_base = (char *) &xcb_out;
1913     xcb_parts[2].iov_len = sizeof(xcb_out);
1914     xcb_parts[3].iov_base = 0;
1915     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1916     /* uint32_t value_list */
1917     xcb_parts[4].iov_base = (char *) value_list;
1918     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
1919     xcb_parts[5].iov_base = 0;
1920     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1921 
1922     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1923     return xcb_ret;
1924 }
1925 
1926 int
1927 xcb_change_window_attributes_sizeof (const void  *_buffer  /**< */)
1928 {
1929     char *xcb_tmp = (char *)_buffer;
1930     const xcb_change_window_attributes_request_t *_aux = (xcb_change_window_attributes_request_t *)_buffer;
1931     unsigned int xcb_buffer_len = 0;
1932     unsigned int xcb_block_len = 0;
1933     unsigned int xcb_pad = 0;
1934     unsigned int xcb_align_to = 0;
1935 
1936 
1937     xcb_block_len += sizeof(xcb_change_window_attributes_request_t);
1938     xcb_tmp += xcb_block_len;
1939     xcb_buffer_len += xcb_block_len;
1940     xcb_block_len = 0;
1941     /* value_list */
1942     xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
1943     xcb_tmp += xcb_block_len;
1944     xcb_align_to = ALIGNOF(uint32_t);
1945     /* insert padding */
1946     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1947     xcb_buffer_len += xcb_block_len + xcb_pad;
1948     if (0 != xcb_pad) {
1949         xcb_tmp += xcb_pad;
1950         xcb_pad = 0;
1951     }
1952     xcb_block_len = 0;
1953 
1954     return xcb_buffer_len;
1955 }
1956 
1957 
1958 /*****************************************************************************
1959  **
1960  ** xcb_void_cookie_t xcb_change_window_attributes_checked
1961  **
1962  ** @param xcb_connection_t *c
1963  ** @param xcb_window_t      window
1964  ** @param uint32_t          value_mask
1965  ** @param const uint32_t   *value_list
1966  ** @returns xcb_void_cookie_t
1967  **
1968  *****************************************************************************/
1969 
1970 xcb_void_cookie_t
1971 xcb_change_window_attributes_checked (xcb_connection_t *c  /**< */,
1972                                       xcb_window_t      window  /**< */,
1973                                       uint32_t          value_mask  /**< */,
1974                                       const uint32_t   *value_list  /**< */)
1975 {
1976     static const xcb_protocol_request_t xcb_req = {
1977         /* count */ 4,
1978         /* ext */ 0,
1979         /* opcode */ XCB_CHANGE_WINDOW_ATTRIBUTES,
1980         /* isvoid */ 1
1981     };
1982 
1983     struct iovec xcb_parts[6];
1984     xcb_void_cookie_t xcb_ret;
1985     xcb_change_window_attributes_request_t xcb_out;
1986 
1987     xcb_out.pad0 = 0;
1988     xcb_out.window = window;
1989     xcb_out.value_mask = value_mask;
1990 
1991     xcb_parts[2].iov_base = (char *) &xcb_out;
1992     xcb_parts[2].iov_len = sizeof(xcb_out);
1993     xcb_parts[3].iov_base = 0;
1994     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1995     /* uint32_t value_list */
1996     xcb_parts[4].iov_base = (char *) value_list;
1997     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
1998     xcb_parts[5].iov_base = 0;
1999     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2000 
2001     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2002     return xcb_ret;
2003 }
2004 
2005 
2006 /*****************************************************************************
2007  **
2008  ** xcb_void_cookie_t xcb_change_window_attributes
2009  **
2010  ** @param xcb_connection_t *c
2011  ** @param xcb_window_t      window
2012  ** @param uint32_t          value_mask
2013  ** @param const uint32_t   *value_list
2014  ** @returns xcb_void_cookie_t
2015  **
2016  *****************************************************************************/
2017 
2018 xcb_void_cookie_t
2019 xcb_change_window_attributes (xcb_connection_t *c  /**< */,
2020                               xcb_window_t      window  /**< */,
2021                               uint32_t          value_mask  /**< */,
2022                               const uint32_t   *value_list  /**< */)
2023 {
2024     static const xcb_protocol_request_t xcb_req = {
2025         /* count */ 4,
2026         /* ext */ 0,
2027         /* opcode */ XCB_CHANGE_WINDOW_ATTRIBUTES,
2028         /* isvoid */ 1
2029     };
2030 
2031     struct iovec xcb_parts[6];
2032     xcb_void_cookie_t xcb_ret;
2033     xcb_change_window_attributes_request_t xcb_out;
2034 
2035     xcb_out.pad0 = 0;
2036     xcb_out.window = window;
2037     xcb_out.value_mask = value_mask;
2038 
2039     xcb_parts[2].iov_base = (char *) &xcb_out;
2040     xcb_parts[2].iov_len = sizeof(xcb_out);
2041     xcb_parts[3].iov_base = 0;
2042     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2043     /* uint32_t value_list */
2044     xcb_parts[4].iov_base = (char *) value_list;
2045     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
2046     xcb_parts[5].iov_base = 0;
2047     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2048 
2049     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2050     return xcb_ret;
2051 }
2052 
2053 
2054 /*****************************************************************************
2055  **
2056  ** xcb_get_window_attributes_cookie_t xcb_get_window_attributes
2057  **
2058  ** @param xcb_connection_t *c
2059  ** @param xcb_window_t      window
2060  ** @returns xcb_get_window_attributes_cookie_t
2061  **
2062  *****************************************************************************/
2063 
2064 xcb_get_window_attributes_cookie_t
2065 xcb_get_window_attributes (xcb_connection_t *c  /**< */,
2066                            xcb_window_t      window  /**< */)
2067 {
2068     static const xcb_protocol_request_t xcb_req = {
2069         /* count */ 2,
2070         /* ext */ 0,
2071         /* opcode */ XCB_GET_WINDOW_ATTRIBUTES,
2072         /* isvoid */ 0
2073     };
2074 
2075     struct iovec xcb_parts[4];
2076     xcb_get_window_attributes_cookie_t xcb_ret;
2077     xcb_get_window_attributes_request_t xcb_out;
2078 
2079     xcb_out.pad0 = 0;
2080     xcb_out.window = window;
2081 
2082     xcb_parts[2].iov_base = (char *) &xcb_out;
2083     xcb_parts[2].iov_len = sizeof(xcb_out);
2084     xcb_parts[3].iov_base = 0;
2085     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2086 
2087     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2088     return xcb_ret;
2089 }
2090 
2091 
2092 /*****************************************************************************
2093  **
2094  ** xcb_get_window_attributes_cookie_t xcb_get_window_attributes_unchecked
2095  **
2096  ** @param xcb_connection_t *c
2097  ** @param xcb_window_t      window
2098  ** @returns xcb_get_window_attributes_cookie_t
2099  **
2100  *****************************************************************************/
2101 
2102 xcb_get_window_attributes_cookie_t
2103 xcb_get_window_attributes_unchecked (xcb_connection_t *c  /**< */,
2104                                      xcb_window_t      window  /**< */)
2105 {
2106     static const xcb_protocol_request_t xcb_req = {
2107         /* count */ 2,
2108         /* ext */ 0,
2109         /* opcode */ XCB_GET_WINDOW_ATTRIBUTES,
2110         /* isvoid */ 0
2111     };
2112 
2113     struct iovec xcb_parts[4];
2114     xcb_get_window_attributes_cookie_t xcb_ret;
2115     xcb_get_window_attributes_request_t xcb_out;
2116 
2117     xcb_out.pad0 = 0;
2118     xcb_out.window = window;
2119 
2120     xcb_parts[2].iov_base = (char *) &xcb_out;
2121     xcb_parts[2].iov_len = sizeof(xcb_out);
2122     xcb_parts[3].iov_base = 0;
2123     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2124 
2125     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2126     return xcb_ret;
2127 }
2128 
2129 
2130 /*****************************************************************************
2131  **
2132  ** xcb_get_window_attributes_reply_t * xcb_get_window_attributes_reply
2133  **
2134  ** @param xcb_connection_t                    *c
2135  ** @param xcb_get_window_attributes_cookie_t   cookie
2136  ** @param xcb_generic_error_t                **e
2137  ** @returns xcb_get_window_attributes_reply_t *
2138  **
2139  *****************************************************************************/
2140 
2141 xcb_get_window_attributes_reply_t *
2142 xcb_get_window_attributes_reply (xcb_connection_t                    *c  /**< */,
2143                                  xcb_get_window_attributes_cookie_t   cookie  /**< */,
2144                                  xcb_generic_error_t                **e  /**< */)
2145 {
2146     return (xcb_get_window_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2147 }
2148 
2149 
2150 /*****************************************************************************
2151  **
2152  ** xcb_void_cookie_t xcb_destroy_window_checked
2153  **
2154  ** @param xcb_connection_t *c
2155  ** @param xcb_window_t      window
2156  ** @returns xcb_void_cookie_t
2157  **
2158  *****************************************************************************/
2159 
2160 xcb_void_cookie_t
2161 xcb_destroy_window_checked (xcb_connection_t *c  /**< */,
2162                             xcb_window_t      window  /**< */)
2163 {
2164     static const xcb_protocol_request_t xcb_req = {
2165         /* count */ 2,
2166         /* ext */ 0,
2167         /* opcode */ XCB_DESTROY_WINDOW,
2168         /* isvoid */ 1
2169     };
2170 
2171     struct iovec xcb_parts[4];
2172     xcb_void_cookie_t xcb_ret;
2173     xcb_destroy_window_request_t xcb_out;
2174 
2175     xcb_out.pad0 = 0;
2176     xcb_out.window = window;
2177 
2178     xcb_parts[2].iov_base = (char *) &xcb_out;
2179     xcb_parts[2].iov_len = sizeof(xcb_out);
2180     xcb_parts[3].iov_base = 0;
2181     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2182 
2183     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2184     return xcb_ret;
2185 }
2186 
2187 
2188 /*****************************************************************************
2189  **
2190  ** xcb_void_cookie_t xcb_destroy_window
2191  **
2192  ** @param xcb_connection_t *c
2193  ** @param xcb_window_t      window
2194  ** @returns xcb_void_cookie_t
2195  **
2196  *****************************************************************************/
2197 
2198 xcb_void_cookie_t
2199 xcb_destroy_window (xcb_connection_t *c  /**< */,
2200                     xcb_window_t      window  /**< */)
2201 {
2202     static const xcb_protocol_request_t xcb_req = {
2203         /* count */ 2,
2204         /* ext */ 0,
2205         /* opcode */ XCB_DESTROY_WINDOW,
2206         /* isvoid */ 1
2207     };
2208 
2209     struct iovec xcb_parts[4];
2210     xcb_void_cookie_t xcb_ret;
2211     xcb_destroy_window_request_t xcb_out;
2212 
2213     xcb_out.pad0 = 0;
2214     xcb_out.window = window;
2215 
2216     xcb_parts[2].iov_base = (char *) &xcb_out;
2217     xcb_parts[2].iov_len = sizeof(xcb_out);
2218     xcb_parts[3].iov_base = 0;
2219     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2220 
2221     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2222     return xcb_ret;
2223 }
2224 
2225 
2226 /*****************************************************************************
2227  **
2228  ** xcb_void_cookie_t xcb_destroy_subwindows_checked
2229  **
2230  ** @param xcb_connection_t *c
2231  ** @param xcb_window_t      window
2232  ** @returns xcb_void_cookie_t
2233  **
2234  *****************************************************************************/
2235 
2236 xcb_void_cookie_t
2237 xcb_destroy_subwindows_checked (xcb_connection_t *c  /**< */,
2238                                 xcb_window_t      window  /**< */)
2239 {
2240     static const xcb_protocol_request_t xcb_req = {
2241         /* count */ 2,
2242         /* ext */ 0,
2243         /* opcode */ XCB_DESTROY_SUBWINDOWS,
2244         /* isvoid */ 1
2245     };
2246 
2247     struct iovec xcb_parts[4];
2248     xcb_void_cookie_t xcb_ret;
2249     xcb_destroy_subwindows_request_t xcb_out;
2250 
2251     xcb_out.pad0 = 0;
2252     xcb_out.window = window;
2253 
2254     xcb_parts[2].iov_base = (char *) &xcb_out;
2255     xcb_parts[2].iov_len = sizeof(xcb_out);
2256     xcb_parts[3].iov_base = 0;
2257     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2258 
2259     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2260     return xcb_ret;
2261 }
2262 
2263 
2264 /*****************************************************************************
2265  **
2266  ** xcb_void_cookie_t xcb_destroy_subwindows
2267  **
2268  ** @param xcb_connection_t *c
2269  ** @param xcb_window_t      window
2270  ** @returns xcb_void_cookie_t
2271  **
2272  *****************************************************************************/
2273 
2274 xcb_void_cookie_t
2275 xcb_destroy_subwindows (xcb_connection_t *c  /**< */,
2276                         xcb_window_t      window  /**< */)
2277 {
2278     static const xcb_protocol_request_t xcb_req = {
2279         /* count */ 2,
2280         /* ext */ 0,
2281         /* opcode */ XCB_DESTROY_SUBWINDOWS,
2282         /* isvoid */ 1
2283     };
2284 
2285     struct iovec xcb_parts[4];
2286     xcb_void_cookie_t xcb_ret;
2287     xcb_destroy_subwindows_request_t xcb_out;
2288 
2289     xcb_out.pad0 = 0;
2290     xcb_out.window = window;
2291 
2292     xcb_parts[2].iov_base = (char *) &xcb_out;
2293     xcb_parts[2].iov_len = sizeof(xcb_out);
2294     xcb_parts[3].iov_base = 0;
2295     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2296 
2297     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2298     return xcb_ret;
2299 }
2300 
2301 
2302 /*****************************************************************************
2303  **
2304  ** xcb_void_cookie_t xcb_change_save_set_checked
2305  **
2306  ** @param xcb_connection_t *c
2307  ** @param uint8_t           mode
2308  ** @param xcb_window_t      window
2309  ** @returns xcb_void_cookie_t
2310  **
2311  *****************************************************************************/
2312 
2313 xcb_void_cookie_t
2314 xcb_change_save_set_checked (xcb_connection_t *c  /**< */,
2315                              uint8_t           mode  /**< */,
2316                              xcb_window_t      window  /**< */)
2317 {
2318     static const xcb_protocol_request_t xcb_req = {
2319         /* count */ 2,
2320         /* ext */ 0,
2321         /* opcode */ XCB_CHANGE_SAVE_SET,
2322         /* isvoid */ 1
2323     };
2324 
2325     struct iovec xcb_parts[4];
2326     xcb_void_cookie_t xcb_ret;
2327     xcb_change_save_set_request_t xcb_out;
2328 
2329     xcb_out.mode = mode;
2330     xcb_out.window = window;
2331 
2332     xcb_parts[2].iov_base = (char *) &xcb_out;
2333     xcb_parts[2].iov_len = sizeof(xcb_out);
2334     xcb_parts[3].iov_base = 0;
2335     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2336 
2337     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2338     return xcb_ret;
2339 }
2340 
2341 
2342 /*****************************************************************************
2343  **
2344  ** xcb_void_cookie_t xcb_change_save_set
2345  **
2346  ** @param xcb_connection_t *c
2347  ** @param uint8_t           mode
2348  ** @param xcb_window_t      window
2349  ** @returns xcb_void_cookie_t
2350  **
2351  *****************************************************************************/
2352 
2353 xcb_void_cookie_t
2354 xcb_change_save_set (xcb_connection_t *c  /**< */,
2355                      uint8_t           mode  /**< */,
2356                      xcb_window_t      window  /**< */)
2357 {
2358     static const xcb_protocol_request_t xcb_req = {
2359         /* count */ 2,
2360         /* ext */ 0,
2361         /* opcode */ XCB_CHANGE_SAVE_SET,
2362         /* isvoid */ 1
2363     };
2364 
2365     struct iovec xcb_parts[4];
2366     xcb_void_cookie_t xcb_ret;
2367     xcb_change_save_set_request_t xcb_out;
2368 
2369     xcb_out.mode = mode;
2370     xcb_out.window = window;
2371 
2372     xcb_parts[2].iov_base = (char *) &xcb_out;
2373     xcb_parts[2].iov_len = sizeof(xcb_out);
2374     xcb_parts[3].iov_base = 0;
2375     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2376 
2377     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2378     return xcb_ret;
2379 }
2380 
2381 
2382 /*****************************************************************************
2383  **
2384  ** xcb_void_cookie_t xcb_reparent_window_checked
2385  **
2386  ** @param xcb_connection_t *c
2387  ** @param xcb_window_t      window
2388  ** @param xcb_window_t      parent
2389  ** @param int16_t           x
2390  ** @param int16_t           y
2391  ** @returns xcb_void_cookie_t
2392  **
2393  *****************************************************************************/
2394 
2395 xcb_void_cookie_t
2396 xcb_reparent_window_checked (xcb_connection_t *c  /**< */,
2397                              xcb_window_t      window  /**< */,
2398                              xcb_window_t      parent  /**< */,
2399                              int16_t           x  /**< */,
2400                              int16_t           y  /**< */)
2401 {
2402     static const xcb_protocol_request_t xcb_req = {
2403         /* count */ 2,
2404         /* ext */ 0,
2405         /* opcode */ XCB_REPARENT_WINDOW,
2406         /* isvoid */ 1
2407     };
2408 
2409     struct iovec xcb_parts[4];
2410     xcb_void_cookie_t xcb_ret;
2411     xcb_reparent_window_request_t xcb_out;
2412 
2413     xcb_out.pad0 = 0;
2414     xcb_out.window = window;
2415     xcb_out.parent = parent;
2416     xcb_out.x = x;
2417     xcb_out.y = y;
2418 
2419     xcb_parts[2].iov_base = (char *) &xcb_out;
2420     xcb_parts[2].iov_len = sizeof(xcb_out);
2421     xcb_parts[3].iov_base = 0;
2422     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2423 
2424     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2425     return xcb_ret;
2426 }
2427 
2428 
2429 /*****************************************************************************
2430  **
2431  ** xcb_void_cookie_t xcb_reparent_window
2432  **
2433  ** @param xcb_connection_t *c
2434  ** @param xcb_window_t      window
2435  ** @param xcb_window_t      parent
2436  ** @param int16_t           x
2437  ** @param int16_t           y
2438  ** @returns xcb_void_cookie_t
2439  **
2440  *****************************************************************************/
2441 
2442 xcb_void_cookie_t
2443 xcb_reparent_window (xcb_connection_t *c  /**< */,
2444                      xcb_window_t      window  /**< */,
2445                      xcb_window_t      parent  /**< */,
2446                      int16_t           x  /**< */,
2447                      int16_t           y  /**< */)
2448 {
2449     static const xcb_protocol_request_t xcb_req = {
2450         /* count */ 2,
2451         /* ext */ 0,
2452         /* opcode */ XCB_REPARENT_WINDOW,
2453         /* isvoid */ 1
2454     };
2455 
2456     struct iovec xcb_parts[4];
2457     xcb_void_cookie_t xcb_ret;
2458     xcb_reparent_window_request_t xcb_out;
2459 
2460     xcb_out.pad0 = 0;
2461     xcb_out.window = window;
2462     xcb_out.parent = parent;
2463     xcb_out.x = x;
2464     xcb_out.y = y;
2465 
2466     xcb_parts[2].iov_base = (char *) &xcb_out;
2467     xcb_parts[2].iov_len = sizeof(xcb_out);
2468     xcb_parts[3].iov_base = 0;
2469     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2470 
2471     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2472     return xcb_ret;
2473 }
2474 
2475 
2476 /*****************************************************************************
2477  **
2478  ** xcb_void_cookie_t xcb_map_window_checked
2479  **
2480  ** @param xcb_connection_t *c
2481  ** @param xcb_window_t      window
2482  ** @returns xcb_void_cookie_t
2483  **
2484  *****************************************************************************/
2485 
2486 xcb_void_cookie_t
2487 xcb_map_window_checked (xcb_connection_t *c  /**< */,
2488                         xcb_window_t      window  /**< */)
2489 {
2490     static const xcb_protocol_request_t xcb_req = {
2491         /* count */ 2,
2492         /* ext */ 0,
2493         /* opcode */ XCB_MAP_WINDOW,
2494         /* isvoid */ 1
2495     };
2496 
2497     struct iovec xcb_parts[4];
2498     xcb_void_cookie_t xcb_ret;
2499     xcb_map_window_request_t xcb_out;
2500 
2501     xcb_out.pad0 = 0;
2502     xcb_out.window = window;
2503 
2504     xcb_parts[2].iov_base = (char *) &xcb_out;
2505     xcb_parts[2].iov_len = sizeof(xcb_out);
2506     xcb_parts[3].iov_base = 0;
2507     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2508 
2509     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2510     return xcb_ret;
2511 }
2512 
2513 
2514 /*****************************************************************************
2515  **
2516  ** xcb_void_cookie_t xcb_map_window
2517  **
2518  ** @param xcb_connection_t *c
2519  ** @param xcb_window_t      window
2520  ** @returns xcb_void_cookie_t
2521  **
2522  *****************************************************************************/
2523 
2524 xcb_void_cookie_t
2525 xcb_map_window (xcb_connection_t *c  /**< */,
2526                 xcb_window_t      window  /**< */)
2527 {
2528     static const xcb_protocol_request_t xcb_req = {
2529         /* count */ 2,
2530         /* ext */ 0,
2531         /* opcode */ XCB_MAP_WINDOW,
2532         /* isvoid */ 1
2533     };
2534 
2535     struct iovec xcb_parts[4];
2536     xcb_void_cookie_t xcb_ret;
2537     xcb_map_window_request_t xcb_out;
2538 
2539     xcb_out.pad0 = 0;
2540     xcb_out.window = window;
2541 
2542     xcb_parts[2].iov_base = (char *) &xcb_out;
2543     xcb_parts[2].iov_len = sizeof(xcb_out);
2544     xcb_parts[3].iov_base = 0;
2545     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2546 
2547     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2548     return xcb_ret;
2549 }
2550 
2551 
2552 /*****************************************************************************
2553  **
2554  ** xcb_void_cookie_t xcb_map_subwindows_checked
2555  **
2556  ** @param xcb_connection_t *c
2557  ** @param xcb_window_t      window
2558  ** @returns xcb_void_cookie_t
2559  **
2560  *****************************************************************************/
2561 
2562 xcb_void_cookie_t
2563 xcb_map_subwindows_checked (xcb_connection_t *c  /**< */,
2564                             xcb_window_t      window  /**< */)
2565 {
2566     static const xcb_protocol_request_t xcb_req = {
2567         /* count */ 2,
2568         /* ext */ 0,
2569         /* opcode */ XCB_MAP_SUBWINDOWS,
2570         /* isvoid */ 1
2571     };
2572 
2573     struct iovec xcb_parts[4];
2574     xcb_void_cookie_t xcb_ret;
2575     xcb_map_subwindows_request_t xcb_out;
2576 
2577     xcb_out.pad0 = 0;
2578     xcb_out.window = window;
2579 
2580     xcb_parts[2].iov_base = (char *) &xcb_out;
2581     xcb_parts[2].iov_len = sizeof(xcb_out);
2582     xcb_parts[3].iov_base = 0;
2583     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2584 
2585     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2586     return xcb_ret;
2587 }
2588 
2589 
2590 /*****************************************************************************
2591  **
2592  ** xcb_void_cookie_t xcb_map_subwindows
2593  **
2594  ** @param xcb_connection_t *c
2595  ** @param xcb_window_t      window
2596  ** @returns xcb_void_cookie_t
2597  **
2598  *****************************************************************************/
2599 
2600 xcb_void_cookie_t
2601 xcb_map_subwindows (xcb_connection_t *c  /**< */,
2602                     xcb_window_t      window  /**< */)
2603 {
2604     static const xcb_protocol_request_t xcb_req = {
2605         /* count */ 2,
2606         /* ext */ 0,
2607         /* opcode */ XCB_MAP_SUBWINDOWS,
2608         /* isvoid */ 1
2609     };
2610 
2611     struct iovec xcb_parts[4];
2612     xcb_void_cookie_t xcb_ret;
2613     xcb_map_subwindows_request_t xcb_out;
2614 
2615     xcb_out.pad0 = 0;
2616     xcb_out.window = window;
2617 
2618     xcb_parts[2].iov_base = (char *) &xcb_out;
2619     xcb_parts[2].iov_len = sizeof(xcb_out);
2620     xcb_parts[3].iov_base = 0;
2621     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2622 
2623     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2624     return xcb_ret;
2625 }
2626 
2627 
2628 /*****************************************************************************
2629  **
2630  ** xcb_void_cookie_t xcb_unmap_window_checked
2631  **
2632  ** @param xcb_connection_t *c
2633  ** @param xcb_window_t      window
2634  ** @returns xcb_void_cookie_t
2635  **
2636  *****************************************************************************/
2637 
2638 xcb_void_cookie_t
2639 xcb_unmap_window_checked (xcb_connection_t *c  /**< */,
2640                           xcb_window_t      window  /**< */)
2641 {
2642     static const xcb_protocol_request_t xcb_req = {
2643         /* count */ 2,
2644         /* ext */ 0,
2645         /* opcode */ XCB_UNMAP_WINDOW,
2646         /* isvoid */ 1
2647     };
2648 
2649     struct iovec xcb_parts[4];
2650     xcb_void_cookie_t xcb_ret;
2651     xcb_unmap_window_request_t xcb_out;
2652 
2653     xcb_out.pad0 = 0;
2654     xcb_out.window = window;
2655 
2656     xcb_parts[2].iov_base = (char *) &xcb_out;
2657     xcb_parts[2].iov_len = sizeof(xcb_out);
2658     xcb_parts[3].iov_base = 0;
2659     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2660 
2661     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2662     return xcb_ret;
2663 }
2664 
2665 
2666 /*****************************************************************************
2667  **
2668  ** xcb_void_cookie_t xcb_unmap_window
2669  **
2670  ** @param xcb_connection_t *c
2671  ** @param xcb_window_t      window
2672  ** @returns xcb_void_cookie_t
2673  **
2674  *****************************************************************************/
2675 
2676 xcb_void_cookie_t
2677 xcb_unmap_window (xcb_connection_t *c  /**< */,
2678                   xcb_window_t      window  /**< */)
2679 {
2680     static const xcb_protocol_request_t xcb_req = {
2681         /* count */ 2,
2682         /* ext */ 0,
2683         /* opcode */ XCB_UNMAP_WINDOW,
2684         /* isvoid */ 1
2685     };
2686 
2687     struct iovec xcb_parts[4];
2688     xcb_void_cookie_t xcb_ret;
2689     xcb_unmap_window_request_t xcb_out;
2690 
2691     xcb_out.pad0 = 0;
2692     xcb_out.window = window;
2693 
2694     xcb_parts[2].iov_base = (char *) &xcb_out;
2695     xcb_parts[2].iov_len = sizeof(xcb_out);
2696     xcb_parts[3].iov_base = 0;
2697     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2698 
2699     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2700     return xcb_ret;
2701 }
2702 
2703 
2704 /*****************************************************************************
2705  **
2706  ** xcb_void_cookie_t xcb_unmap_subwindows_checked
2707  **
2708  ** @param xcb_connection_t *c
2709  ** @param xcb_window_t      window
2710  ** @returns xcb_void_cookie_t
2711  **
2712  *****************************************************************************/
2713 
2714 xcb_void_cookie_t
2715 xcb_unmap_subwindows_checked (xcb_connection_t *c  /**< */,
2716                               xcb_window_t      window  /**< */)
2717 {
2718     static const xcb_protocol_request_t xcb_req = {
2719         /* count */ 2,
2720         /* ext */ 0,
2721         /* opcode */ XCB_UNMAP_SUBWINDOWS,
2722         /* isvoid */ 1
2723     };
2724 
2725     struct iovec xcb_parts[4];
2726     xcb_void_cookie_t xcb_ret;
2727     xcb_unmap_subwindows_request_t xcb_out;
2728 
2729     xcb_out.pad0 = 0;
2730     xcb_out.window = window;
2731 
2732     xcb_parts[2].iov_base = (char *) &xcb_out;
2733     xcb_parts[2].iov_len = sizeof(xcb_out);
2734     xcb_parts[3].iov_base = 0;
2735     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2736 
2737     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2738     return xcb_ret;
2739 }
2740 
2741 
2742 /*****************************************************************************
2743  **
2744  ** xcb_void_cookie_t xcb_unmap_subwindows
2745  **
2746  ** @param xcb_connection_t *c
2747  ** @param xcb_window_t      window
2748  ** @returns xcb_void_cookie_t
2749  **
2750  *****************************************************************************/
2751 
2752 xcb_void_cookie_t
2753 xcb_unmap_subwindows (xcb_connection_t *c  /**< */,
2754                       xcb_window_t      window  /**< */)
2755 {
2756     static const xcb_protocol_request_t xcb_req = {
2757         /* count */ 2,
2758         /* ext */ 0,
2759         /* opcode */ XCB_UNMAP_SUBWINDOWS,
2760         /* isvoid */ 1
2761     };
2762 
2763     struct iovec xcb_parts[4];
2764     xcb_void_cookie_t xcb_ret;
2765     xcb_unmap_subwindows_request_t xcb_out;
2766 
2767     xcb_out.pad0 = 0;
2768     xcb_out.window = window;
2769 
2770     xcb_parts[2].iov_base = (char *) &xcb_out;
2771     xcb_parts[2].iov_len = sizeof(xcb_out);
2772     xcb_parts[3].iov_base = 0;
2773     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2774 
2775     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2776     return xcb_ret;
2777 }
2778 
2779 int
2780 xcb_configure_window_sizeof (const void  *_buffer  /**< */)
2781 {
2782     char *xcb_tmp = (char *)_buffer;
2783     const xcb_configure_window_request_t *_aux = (xcb_configure_window_request_t *)_buffer;
2784     unsigned int xcb_buffer_len = 0;
2785     unsigned int xcb_block_len = 0;
2786     unsigned int xcb_pad = 0;
2787     unsigned int xcb_align_to = 0;
2788 
2789 
2790     xcb_block_len += sizeof(xcb_configure_window_request_t);
2791     xcb_tmp += xcb_block_len;
2792     xcb_buffer_len += xcb_block_len;
2793     xcb_block_len = 0;
2794     /* value_list */
2795     xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
2796     xcb_tmp += xcb_block_len;
2797     xcb_align_to = ALIGNOF(uint32_t);
2798     /* insert padding */
2799     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2800     xcb_buffer_len += xcb_block_len + xcb_pad;
2801     if (0 != xcb_pad) {
2802         xcb_tmp += xcb_pad;
2803         xcb_pad = 0;
2804     }
2805     xcb_block_len = 0;
2806 
2807     return xcb_buffer_len;
2808 }
2809 
2810 
2811 /*****************************************************************************
2812  **
2813  ** xcb_void_cookie_t xcb_configure_window_checked
2814  **
2815  ** @param xcb_connection_t *c
2816  ** @param xcb_window_t      window
2817  ** @param uint16_t          value_mask
2818  ** @param const uint32_t   *value_list
2819  ** @returns xcb_void_cookie_t
2820  **
2821  *****************************************************************************/
2822 
2823 xcb_void_cookie_t
2824 xcb_configure_window_checked (xcb_connection_t *c  /**< */,
2825                               xcb_window_t      window  /**< */,
2826                               uint16_t          value_mask  /**< */,
2827                               const uint32_t   *value_list  /**< */)
2828 {
2829     static const xcb_protocol_request_t xcb_req = {
2830         /* count */ 4,
2831         /* ext */ 0,
2832         /* opcode */ XCB_CONFIGURE_WINDOW,
2833         /* isvoid */ 1
2834     };
2835 
2836     struct iovec xcb_parts[6];
2837     xcb_void_cookie_t xcb_ret;
2838     xcb_configure_window_request_t xcb_out;
2839 
2840     xcb_out.pad0 = 0;
2841     xcb_out.window = window;
2842     xcb_out.value_mask = value_mask;
2843     memset(xcb_out.pad1, 0, 2);
2844 
2845     xcb_parts[2].iov_base = (char *) &xcb_out;
2846     xcb_parts[2].iov_len = sizeof(xcb_out);
2847     xcb_parts[3].iov_base = 0;
2848     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2849     /* uint32_t value_list */
2850     xcb_parts[4].iov_base = (char *) value_list;
2851     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
2852     xcb_parts[5].iov_base = 0;
2853     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2854 
2855     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2856     return xcb_ret;
2857 }
2858 
2859 
2860 /*****************************************************************************
2861  **
2862  ** xcb_void_cookie_t xcb_configure_window
2863  **
2864  ** @param xcb_connection_t *c
2865  ** @param xcb_window_t      window
2866  ** @param uint16_t          value_mask
2867  ** @param const uint32_t   *value_list
2868  ** @returns xcb_void_cookie_t
2869  **
2870  *****************************************************************************/
2871 
2872 xcb_void_cookie_t
2873 xcb_configure_window (xcb_connection_t *c  /**< */,
2874                       xcb_window_t      window  /**< */,
2875                       uint16_t          value_mask  /**< */,
2876                       const uint32_t   *value_list  /**< */)
2877 {
2878     static const xcb_protocol_request_t xcb_req = {
2879         /* count */ 4,
2880         /* ext */ 0,
2881         /* opcode */ XCB_CONFIGURE_WINDOW,
2882         /* isvoid */ 1
2883     };
2884 
2885     struct iovec xcb_parts[6];
2886     xcb_void_cookie_t xcb_ret;
2887     xcb_configure_window_request_t xcb_out;
2888 
2889     xcb_out.pad0 = 0;
2890     xcb_out.window = window;
2891     xcb_out.value_mask = value_mask;
2892     memset(xcb_out.pad1, 0, 2);
2893 
2894     xcb_parts[2].iov_base = (char *) &xcb_out;
2895     xcb_parts[2].iov_len = sizeof(xcb_out);
2896     xcb_parts[3].iov_base = 0;
2897     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2898     /* uint32_t value_list */
2899     xcb_parts[4].iov_base = (char *) value_list;
2900     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
2901     xcb_parts[5].iov_base = 0;
2902     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2903 
2904     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2905     return xcb_ret;
2906 }
2907 
2908 
2909 /*****************************************************************************
2910  **
2911  ** xcb_void_cookie_t xcb_circulate_window_checked
2912  **
2913  ** @param xcb_connection_t *c
2914  ** @param uint8_t           direction
2915  ** @param xcb_window_t      window
2916  ** @returns xcb_void_cookie_t
2917  **
2918  *****************************************************************************/
2919 
2920 xcb_void_cookie_t
2921 xcb_circulate_window_checked (xcb_connection_t *c  /**< */,
2922                               uint8_t           direction  /**< */,
2923                               xcb_window_t      window  /**< */)
2924 {
2925     static const xcb_protocol_request_t xcb_req = {
2926         /* count */ 2,
2927         /* ext */ 0,
2928         /* opcode */ XCB_CIRCULATE_WINDOW,
2929         /* isvoid */ 1
2930     };
2931 
2932     struct iovec xcb_parts[4];
2933     xcb_void_cookie_t xcb_ret;
2934     xcb_circulate_window_request_t xcb_out;
2935 
2936     xcb_out.direction = direction;
2937     xcb_out.window = window;
2938 
2939     xcb_parts[2].iov_base = (char *) &xcb_out;
2940     xcb_parts[2].iov_len = sizeof(xcb_out);
2941     xcb_parts[3].iov_base = 0;
2942     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2943 
2944     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2945     return xcb_ret;
2946 }
2947 
2948 
2949 /*****************************************************************************
2950  **
2951  ** xcb_void_cookie_t xcb_circulate_window
2952  **
2953  ** @param xcb_connection_t *c
2954  ** @param uint8_t           direction
2955  ** @param xcb_window_t      window
2956  ** @returns xcb_void_cookie_t
2957  **
2958  *****************************************************************************/
2959 
2960 xcb_void_cookie_t
2961 xcb_circulate_window (xcb_connection_t *c  /**< */,
2962                       uint8_t           direction  /**< */,
2963                       xcb_window_t      window  /**< */)
2964 {
2965     static const xcb_protocol_request_t xcb_req = {
2966         /* count */ 2,
2967         /* ext */ 0,
2968         /* opcode */ XCB_CIRCULATE_WINDOW,
2969         /* isvoid */ 1
2970     };
2971 
2972     struct iovec xcb_parts[4];
2973     xcb_void_cookie_t xcb_ret;
2974     xcb_circulate_window_request_t xcb_out;
2975 
2976     xcb_out.direction = direction;
2977     xcb_out.window = window;
2978 
2979     xcb_parts[2].iov_base = (char *) &xcb_out;
2980     xcb_parts[2].iov_len = sizeof(xcb_out);
2981     xcb_parts[3].iov_base = 0;
2982     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2983 
2984     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2985     return xcb_ret;
2986 }
2987 
2988 
2989 /*****************************************************************************
2990  **
2991  ** xcb_get_geometry_cookie_t xcb_get_geometry
2992  **
2993  ** @param xcb_connection_t *c
2994  ** @param xcb_drawable_t    drawable
2995  ** @returns xcb_get_geometry_cookie_t
2996  **
2997  *****************************************************************************/
2998 
2999 xcb_get_geometry_cookie_t
3000 xcb_get_geometry (xcb_connection_t *c  /**< */,
3001                   xcb_drawable_t    drawable  /**< */)
3002 {
3003     static const xcb_protocol_request_t xcb_req = {
3004         /* count */ 2,
3005         /* ext */ 0,
3006         /* opcode */ XCB_GET_GEOMETRY,
3007         /* isvoid */ 0
3008     };
3009 
3010     struct iovec xcb_parts[4];
3011     xcb_get_geometry_cookie_t xcb_ret;
3012     xcb_get_geometry_request_t xcb_out;
3013 
3014     xcb_out.pad0 = 0;
3015     xcb_out.drawable = drawable;
3016 
3017     xcb_parts[2].iov_base = (char *) &xcb_out;
3018     xcb_parts[2].iov_len = sizeof(xcb_out);
3019     xcb_parts[3].iov_base = 0;
3020     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3021 
3022     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3023     return xcb_ret;
3024 }
3025 
3026 
3027 /*****************************************************************************
3028  **
3029  ** xcb_get_geometry_cookie_t xcb_get_geometry_unchecked
3030  **
3031  ** @param xcb_connection_t *c
3032  ** @param xcb_drawable_t    drawable
3033  ** @returns xcb_get_geometry_cookie_t
3034  **
3035  *****************************************************************************/
3036 
3037 xcb_get_geometry_cookie_t
3038 xcb_get_geometry_unchecked (xcb_connection_t *c  /**< */,
3039                             xcb_drawable_t    drawable  /**< */)
3040 {
3041     static const xcb_protocol_request_t xcb_req = {
3042         /* count */ 2,
3043         /* ext */ 0,
3044         /* opcode */ XCB_GET_GEOMETRY,
3045         /* isvoid */ 0
3046     };
3047 
3048     struct iovec xcb_parts[4];
3049     xcb_get_geometry_cookie_t xcb_ret;
3050     xcb_get_geometry_request_t xcb_out;
3051 
3052     xcb_out.pad0 = 0;
3053     xcb_out.drawable = drawable;
3054 
3055     xcb_parts[2].iov_base = (char *) &xcb_out;
3056     xcb_parts[2].iov_len = sizeof(xcb_out);
3057     xcb_parts[3].iov_base = 0;
3058     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3059 
3060     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3061     return xcb_ret;
3062 }
3063 
3064 
3065 /*****************************************************************************
3066  **
3067  ** xcb_get_geometry_reply_t * xcb_get_geometry_reply
3068  **
3069  ** @param xcb_connection_t           *c
3070  ** @param xcb_get_geometry_cookie_t   cookie
3071  ** @param xcb_generic_error_t       **e
3072  ** @returns xcb_get_geometry_reply_t *
3073  **
3074  *****************************************************************************/
3075 
3076 xcb_get_geometry_reply_t *
3077 xcb_get_geometry_reply (xcb_connection_t           *c  /**< */,
3078                         xcb_get_geometry_cookie_t   cookie  /**< */,
3079                         xcb_generic_error_t       **e  /**< */)
3080 {
3081     return (xcb_get_geometry_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3082 }
3083 
3084 int
3085 xcb_query_tree_sizeof (const void  *_buffer  /**< */)
3086 {
3087     char *xcb_tmp = (char *)_buffer;
3088     const xcb_query_tree_reply_t *_aux = (xcb_query_tree_reply_t *)_buffer;
3089     unsigned int xcb_buffer_len = 0;
3090     unsigned int xcb_block_len = 0;
3091     unsigned int xcb_pad = 0;
3092     unsigned int xcb_align_to = 0;
3093 
3094 
3095     xcb_block_len += sizeof(xcb_query_tree_reply_t);
3096     xcb_tmp += xcb_block_len;
3097     xcb_buffer_len += xcb_block_len;
3098     xcb_block_len = 0;
3099     /* children */
3100     xcb_block_len += _aux->children_len * sizeof(xcb_window_t);
3101     xcb_tmp += xcb_block_len;
3102     xcb_align_to = ALIGNOF(xcb_window_t);
3103     /* insert padding */
3104     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3105     xcb_buffer_len += xcb_block_len + xcb_pad;
3106     if (0 != xcb_pad) {
3107         xcb_tmp += xcb_pad;
3108         xcb_pad = 0;
3109     }
3110     xcb_block_len = 0;
3111 
3112     return xcb_buffer_len;
3113 }
3114 
3115 
3116 /*****************************************************************************
3117  **
3118  ** xcb_query_tree_cookie_t xcb_query_tree
3119  **
3120  ** @param xcb_connection_t *c
3121  ** @param xcb_window_t      window
3122  ** @returns xcb_query_tree_cookie_t
3123  **
3124  *****************************************************************************/
3125 
3126 xcb_query_tree_cookie_t
3127 xcb_query_tree (xcb_connection_t *c  /**< */,
3128                 xcb_window_t      window  /**< */)
3129 {
3130     static const xcb_protocol_request_t xcb_req = {
3131         /* count */ 2,
3132         /* ext */ 0,
3133         /* opcode */ XCB_QUERY_TREE,
3134         /* isvoid */ 0
3135     };
3136 
3137     struct iovec xcb_parts[4];
3138     xcb_query_tree_cookie_t xcb_ret;
3139     xcb_query_tree_request_t xcb_out;
3140 
3141     xcb_out.pad0 = 0;
3142     xcb_out.window = window;
3143 
3144     xcb_parts[2].iov_base = (char *) &xcb_out;
3145     xcb_parts[2].iov_len = sizeof(xcb_out);
3146     xcb_parts[3].iov_base = 0;
3147     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3148 
3149     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3150     return xcb_ret;
3151 }
3152 
3153 
3154 /*****************************************************************************
3155  **
3156  ** xcb_query_tree_cookie_t xcb_query_tree_unchecked
3157  **
3158  ** @param xcb_connection_t *c
3159  ** @param xcb_window_t      window
3160  ** @returns xcb_query_tree_cookie_t
3161  **
3162  *****************************************************************************/
3163 
3164 xcb_query_tree_cookie_t
3165 xcb_query_tree_unchecked (xcb_connection_t *c  /**< */,
3166                           xcb_window_t      window  /**< */)
3167 {
3168     static const xcb_protocol_request_t xcb_req = {
3169         /* count */ 2,
3170         /* ext */ 0,
3171         /* opcode */ XCB_QUERY_TREE,
3172         /* isvoid */ 0
3173     };
3174 
3175     struct iovec xcb_parts[4];
3176     xcb_query_tree_cookie_t xcb_ret;
3177     xcb_query_tree_request_t xcb_out;
3178 
3179     xcb_out.pad0 = 0;
3180     xcb_out.window = window;
3181 
3182     xcb_parts[2].iov_base = (char *) &xcb_out;
3183     xcb_parts[2].iov_len = sizeof(xcb_out);
3184     xcb_parts[3].iov_base = 0;
3185     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3186 
3187     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3188     return xcb_ret;
3189 }
3190 
3191 
3192 /*****************************************************************************
3193  **
3194  ** xcb_window_t * xcb_query_tree_children
3195  **
3196  ** @param const xcb_query_tree_reply_t *R
3197  ** @returns xcb_window_t *
3198  **
3199  *****************************************************************************/
3200 
3201 xcb_window_t *
3202 xcb_query_tree_children (const xcb_query_tree_reply_t *R  /**< */)
3203 {
3204     return (xcb_window_t *) (R + 1);
3205 }
3206 
3207 
3208 /*****************************************************************************
3209  **
3210  ** int xcb_query_tree_children_length
3211  **
3212  ** @param const xcb_query_tree_reply_t *R
3213  ** @returns int
3214  **
3215  *****************************************************************************/
3216 
3217 int
3218 xcb_query_tree_children_length (const xcb_query_tree_reply_t *R  /**< */)
3219 {
3220     return R->children_len;
3221 }
3222 
3223 
3224 /*****************************************************************************
3225  **
3226  ** xcb_generic_iterator_t xcb_query_tree_children_end
3227  **
3228  ** @param const xcb_query_tree_reply_t *R
3229  ** @returns xcb_generic_iterator_t
3230  **
3231  *****************************************************************************/
3232 
3233 xcb_generic_iterator_t
3234 xcb_query_tree_children_end (const xcb_query_tree_reply_t *R  /**< */)
3235 {
3236     xcb_generic_iterator_t i;
3237     i.data = ((xcb_window_t *) (R + 1)) + (R->children_len);
3238     i.rem = 0;
3239     i.index = (char *) i.data - (char *) R;
3240     return i;
3241 }
3242 
3243 
3244 /*****************************************************************************
3245  **
3246  ** xcb_query_tree_reply_t * xcb_query_tree_reply
3247  **
3248  ** @param xcb_connection_t         *c
3249  ** @param xcb_query_tree_cookie_t   cookie
3250  ** @param xcb_generic_error_t     **e
3251  ** @returns xcb_query_tree_reply_t *
3252  **
3253  *****************************************************************************/
3254 
3255 xcb_query_tree_reply_t *
3256 xcb_query_tree_reply (xcb_connection_t         *c  /**< */,
3257                       xcb_query_tree_cookie_t   cookie  /**< */,
3258                       xcb_generic_error_t     **e  /**< */)
3259 {
3260     return (xcb_query_tree_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3261 }
3262 
3263 int
3264 xcb_intern_atom_sizeof (const void  *_buffer  /**< */)
3265 {
3266     char *xcb_tmp = (char *)_buffer;
3267     const xcb_intern_atom_request_t *_aux = (xcb_intern_atom_request_t *)_buffer;
3268     unsigned int xcb_buffer_len = 0;
3269     unsigned int xcb_block_len = 0;
3270     unsigned int xcb_pad = 0;
3271     unsigned int xcb_align_to = 0;
3272 
3273 
3274     xcb_block_len += sizeof(xcb_intern_atom_request_t);
3275     xcb_tmp += xcb_block_len;
3276     xcb_buffer_len += xcb_block_len;
3277     xcb_block_len = 0;
3278     /* name */
3279     xcb_block_len += _aux->name_len * sizeof(char);
3280     xcb_tmp += xcb_block_len;
3281     xcb_align_to = ALIGNOF(char);
3282     /* insert padding */
3283     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3284     xcb_buffer_len += xcb_block_len + xcb_pad;
3285     if (0 != xcb_pad) {
3286         xcb_tmp += xcb_pad;
3287         xcb_pad = 0;
3288     }
3289     xcb_block_len = 0;
3290 
3291     return xcb_buffer_len;
3292 }
3293 
3294 
3295 /*****************************************************************************
3296  **
3297  ** xcb_intern_atom_cookie_t xcb_intern_atom
3298  **
3299  ** @param xcb_connection_t *c
3300  ** @param uint8_t           only_if_exists
3301  ** @param uint16_t          name_len
3302  ** @param const char       *name
3303  ** @returns xcb_intern_atom_cookie_t
3304  **
3305  *****************************************************************************/
3306 
3307 xcb_intern_atom_cookie_t
3308 xcb_intern_atom (xcb_connection_t *c  /**< */,
3309                  uint8_t           only_if_exists  /**< */,
3310                  uint16_t          name_len  /**< */,
3311                  const char       *name  /**< */)
3312 {
3313     static const xcb_protocol_request_t xcb_req = {
3314         /* count */ 4,
3315         /* ext */ 0,
3316         /* opcode */ XCB_INTERN_ATOM,
3317         /* isvoid */ 0
3318     };
3319 
3320     struct iovec xcb_parts[6];
3321     xcb_intern_atom_cookie_t xcb_ret;
3322     xcb_intern_atom_request_t xcb_out;
3323 
3324     xcb_out.only_if_exists = only_if_exists;
3325     xcb_out.name_len = name_len;
3326     memset(xcb_out.pad0, 0, 2);
3327 
3328     xcb_parts[2].iov_base = (char *) &xcb_out;
3329     xcb_parts[2].iov_len = sizeof(xcb_out);
3330     xcb_parts[3].iov_base = 0;
3331     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3332     /* char name */
3333     xcb_parts[4].iov_base = (char *) name;
3334     xcb_parts[4].iov_len = name_len * sizeof(char);
3335     xcb_parts[5].iov_base = 0;
3336     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3337 
3338     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3339     return xcb_ret;
3340 }
3341 
3342 
3343 /*****************************************************************************
3344  **
3345  ** xcb_intern_atom_cookie_t xcb_intern_atom_unchecked
3346  **
3347  ** @param xcb_connection_t *c
3348  ** @param uint8_t           only_if_exists
3349  ** @param uint16_t          name_len
3350  ** @param const char       *name
3351  ** @returns xcb_intern_atom_cookie_t
3352  **
3353  *****************************************************************************/
3354 
3355 xcb_intern_atom_cookie_t
3356 xcb_intern_atom_unchecked (xcb_connection_t *c  /**< */,
3357                            uint8_t           only_if_exists  /**< */,
3358                            uint16_t          name_len  /**< */,
3359                            const char       *name  /**< */)
3360 {
3361     static const xcb_protocol_request_t xcb_req = {
3362         /* count */ 4,
3363         /* ext */ 0,
3364         /* opcode */ XCB_INTERN_ATOM,
3365         /* isvoid */ 0
3366     };
3367 
3368     struct iovec xcb_parts[6];
3369     xcb_intern_atom_cookie_t xcb_ret;
3370     xcb_intern_atom_request_t xcb_out;
3371 
3372     xcb_out.only_if_exists = only_if_exists;
3373     xcb_out.name_len = name_len;
3374     memset(xcb_out.pad0, 0, 2);
3375 
3376     xcb_parts[2].iov_base = (char *) &xcb_out;
3377     xcb_parts[2].iov_len = sizeof(xcb_out);
3378     xcb_parts[3].iov_base = 0;
3379     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3380     /* char name */
3381     xcb_parts[4].iov_base = (char *) name;
3382     xcb_parts[4].iov_len = name_len * sizeof(char);
3383     xcb_parts[5].iov_base = 0;
3384     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3385 
3386     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3387     return xcb_ret;
3388 }
3389 
3390 
3391 /*****************************************************************************
3392  **
3393  ** xcb_intern_atom_reply_t * xcb_intern_atom_reply
3394  **
3395  ** @param xcb_connection_t          *c
3396  ** @param xcb_intern_atom_cookie_t   cookie
3397  ** @param xcb_generic_error_t      **e
3398  ** @returns xcb_intern_atom_reply_t *
3399  **
3400  *****************************************************************************/
3401 
3402 xcb_intern_atom_reply_t *
3403 xcb_intern_atom_reply (xcb_connection_t          *c  /**< */,
3404                        xcb_intern_atom_cookie_t   cookie  /**< */,
3405                        xcb_generic_error_t      **e  /**< */)
3406 {
3407     return (xcb_intern_atom_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3408 }
3409 
3410 int
3411 xcb_get_atom_name_sizeof (const void  *_buffer  /**< */)
3412 {
3413     char *xcb_tmp = (char *)_buffer;
3414     const xcb_get_atom_name_reply_t *_aux = (xcb_get_atom_name_reply_t *)_buffer;
3415     unsigned int xcb_buffer_len = 0;
3416     unsigned int xcb_block_len = 0;
3417     unsigned int xcb_pad = 0;
3418     unsigned int xcb_align_to = 0;
3419 
3420 
3421     xcb_block_len += sizeof(xcb_get_atom_name_reply_t);
3422     xcb_tmp += xcb_block_len;
3423     xcb_buffer_len += xcb_block_len;
3424     xcb_block_len = 0;
3425     /* name */
3426     xcb_block_len += _aux->name_len * sizeof(char);
3427     xcb_tmp += xcb_block_len;
3428     xcb_align_to = ALIGNOF(char);
3429     /* insert padding */
3430     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3431     xcb_buffer_len += xcb_block_len + xcb_pad;
3432     if (0 != xcb_pad) {
3433         xcb_tmp += xcb_pad;
3434         xcb_pad = 0;
3435     }
3436     xcb_block_len = 0;
3437 
3438     return xcb_buffer_len;
3439 }
3440 
3441 
3442 /*****************************************************************************
3443  **
3444  ** xcb_get_atom_name_cookie_t xcb_get_atom_name
3445  **
3446  ** @param xcb_connection_t *c
3447  ** @param xcb_atom_t        atom
3448  ** @returns xcb_get_atom_name_cookie_t
3449  **
3450  *****************************************************************************/
3451 
3452 xcb_get_atom_name_cookie_t
3453 xcb_get_atom_name (xcb_connection_t *c  /**< */,
3454                    xcb_atom_t        atom  /**< */)
3455 {
3456     static const xcb_protocol_request_t xcb_req = {
3457         /* count */ 2,
3458         /* ext */ 0,
3459         /* opcode */ XCB_GET_ATOM_NAME,
3460         /* isvoid */ 0
3461     };
3462 
3463     struct iovec xcb_parts[4];
3464     xcb_get_atom_name_cookie_t xcb_ret;
3465     xcb_get_atom_name_request_t xcb_out;
3466 
3467     xcb_out.pad0 = 0;
3468     xcb_out.atom = atom;
3469 
3470     xcb_parts[2].iov_base = (char *) &xcb_out;
3471     xcb_parts[2].iov_len = sizeof(xcb_out);
3472     xcb_parts[3].iov_base = 0;
3473     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3474 
3475     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3476     return xcb_ret;
3477 }
3478 
3479 
3480 /*****************************************************************************
3481  **
3482  ** xcb_get_atom_name_cookie_t xcb_get_atom_name_unchecked
3483  **
3484  ** @param xcb_connection_t *c
3485  ** @param xcb_atom_t        atom
3486  ** @returns xcb_get_atom_name_cookie_t
3487  **
3488  *****************************************************************************/
3489 
3490 xcb_get_atom_name_cookie_t
3491 xcb_get_atom_name_unchecked (xcb_connection_t *c  /**< */,
3492                              xcb_atom_t        atom  /**< */)
3493 {
3494     static const xcb_protocol_request_t xcb_req = {
3495         /* count */ 2,
3496         /* ext */ 0,
3497         /* opcode */ XCB_GET_ATOM_NAME,
3498         /* isvoid */ 0
3499     };
3500 
3501     struct iovec xcb_parts[4];
3502     xcb_get_atom_name_cookie_t xcb_ret;
3503     xcb_get_atom_name_request_t xcb_out;
3504 
3505     xcb_out.pad0 = 0;
3506     xcb_out.atom = atom;
3507 
3508     xcb_parts[2].iov_base = (char *) &xcb_out;
3509     xcb_parts[2].iov_len = sizeof(xcb_out);
3510     xcb_parts[3].iov_base = 0;
3511     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3512 
3513     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3514     return xcb_ret;
3515 }
3516 
3517 
3518 /*****************************************************************************
3519  **
3520  ** char * xcb_get_atom_name_name
3521  **
3522  ** @param const xcb_get_atom_name_reply_t *R
3523  ** @returns char *
3524  **
3525  *****************************************************************************/
3526 
3527 char *
3528 xcb_get_atom_name_name (const xcb_get_atom_name_reply_t *R  /**< */)
3529 {
3530     return (char *) (R + 1);
3531 }
3532 
3533 
3534 /*****************************************************************************
3535  **
3536  ** int xcb_get_atom_name_name_length
3537  **
3538  ** @param const xcb_get_atom_name_reply_t *R
3539  ** @returns int
3540  **
3541  *****************************************************************************/
3542 
3543 int
3544 xcb_get_atom_name_name_length (const xcb_get_atom_name_reply_t *R  /**< */)
3545 {
3546     return R->name_len;
3547 }
3548 
3549 
3550 /*****************************************************************************
3551  **
3552  ** xcb_generic_iterator_t xcb_get_atom_name_name_end
3553  **
3554  ** @param const xcb_get_atom_name_reply_t *R
3555  ** @returns xcb_generic_iterator_t
3556  **
3557  *****************************************************************************/
3558 
3559 xcb_generic_iterator_t
3560 xcb_get_atom_name_name_end (const xcb_get_atom_name_reply_t *R  /**< */)
3561 {
3562     xcb_generic_iterator_t i;
3563     i.data = ((char *) (R + 1)) + (R->name_len);
3564     i.rem = 0;
3565     i.index = (char *) i.data - (char *) R;
3566     return i;
3567 }
3568 
3569 
3570 /*****************************************************************************
3571  **
3572  ** xcb_get_atom_name_reply_t * xcb_get_atom_name_reply
3573  **
3574  ** @param xcb_connection_t            *c
3575  ** @param xcb_get_atom_name_cookie_t   cookie
3576  ** @param xcb_generic_error_t        **e
3577  ** @returns xcb_get_atom_name_reply_t *
3578  **
3579  *****************************************************************************/
3580 
3581 xcb_get_atom_name_reply_t *
3582 xcb_get_atom_name_reply (xcb_connection_t            *c  /**< */,
3583                          xcb_get_atom_name_cookie_t   cookie  /**< */,
3584                          xcb_generic_error_t        **e  /**< */)
3585 {
3586     return (xcb_get_atom_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3587 }
3588 
3589 int
3590 xcb_change_property_sizeof (const void  *_buffer  /**< */)
3591 {
3592     char *xcb_tmp = (char *)_buffer;
3593     const xcb_change_property_request_t *_aux = (xcb_change_property_request_t *)_buffer;
3594     unsigned int xcb_buffer_len = 0;
3595     unsigned int xcb_block_len = 0;
3596     unsigned int xcb_pad = 0;
3597     unsigned int xcb_align_to = 0;
3598 
3599 
3600     xcb_block_len += sizeof(xcb_change_property_request_t);
3601     xcb_tmp += xcb_block_len;
3602     xcb_buffer_len += xcb_block_len;
3603     xcb_block_len = 0;
3604     /* data */
3605     xcb_block_len += ((_aux->data_len * _aux->format) / 8) * sizeof(char);
3606     xcb_tmp += xcb_block_len;
3607     xcb_align_to = ALIGNOF(char);
3608     /* insert padding */
3609     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3610     xcb_buffer_len += xcb_block_len + xcb_pad;
3611     if (0 != xcb_pad) {
3612         xcb_tmp += xcb_pad;
3613         xcb_pad = 0;
3614     }
3615     xcb_block_len = 0;
3616 
3617     return xcb_buffer_len;
3618 }
3619 
3620 
3621 /*****************************************************************************
3622  **
3623  ** xcb_void_cookie_t xcb_change_property_checked
3624  **
3625  ** @param xcb_connection_t *c
3626  ** @param uint8_t           mode
3627  ** @param xcb_window_t      window
3628  ** @param xcb_atom_t        property
3629  ** @param xcb_atom_t        type
3630  ** @param uint8_t           format
3631  ** @param uint32_t          data_len
3632  ** @param const void       *data
3633  ** @returns xcb_void_cookie_t
3634  **
3635  *****************************************************************************/
3636 
3637 xcb_void_cookie_t
3638 xcb_change_property_checked (xcb_connection_t *c  /**< */,
3639                              uint8_t           mode  /**< */,
3640                              xcb_window_t      window  /**< */,
3641                              xcb_atom_t        property  /**< */,
3642                              xcb_atom_t        type  /**< */,
3643                              uint8_t           format  /**< */,
3644                              uint32_t          data_len  /**< */,
3645                              const void       *data  /**< */)
3646 {
3647     static const xcb_protocol_request_t xcb_req = {
3648         /* count */ 4,
3649         /* ext */ 0,
3650         /* opcode */ XCB_CHANGE_PROPERTY,
3651         /* isvoid */ 1
3652     };
3653 
3654     struct iovec xcb_parts[6];
3655     xcb_void_cookie_t xcb_ret;
3656     xcb_change_property_request_t xcb_out;
3657 
3658     xcb_out.mode = mode;
3659     xcb_out.window = window;
3660     xcb_out.property = property;
3661     xcb_out.type = type;
3662     xcb_out.format = format;
3663     memset(xcb_out.pad0, 0, 3);
3664     xcb_out.data_len = data_len;
3665 
3666     xcb_parts[2].iov_base = (char *) &xcb_out;
3667     xcb_parts[2].iov_len = sizeof(xcb_out);
3668     xcb_parts[3].iov_base = 0;
3669     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3670     /* void data */
3671     xcb_parts[4].iov_base = (char *) data;
3672     xcb_parts[4].iov_len = ((data_len * format) / 8) * sizeof(char);
3673     xcb_parts[5].iov_base = 0;
3674     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3675 
3676     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3677     return xcb_ret;
3678 }
3679 
3680 
3681 /*****************************************************************************
3682  **
3683  ** xcb_void_cookie_t xcb_change_property
3684  **
3685  ** @param xcb_connection_t *c
3686  ** @param uint8_t           mode
3687  ** @param xcb_window_t      window
3688  ** @param xcb_atom_t        property
3689  ** @param xcb_atom_t        type
3690  ** @param uint8_t           format
3691  ** @param uint32_t          data_len
3692  ** @param const void       *data
3693  ** @returns xcb_void_cookie_t
3694  **
3695  *****************************************************************************/
3696 
3697 xcb_void_cookie_t
3698 xcb_change_property (xcb_connection_t *c  /**< */,
3699                      uint8_t           mode  /**< */,
3700                      xcb_window_t      window  /**< */,
3701                      xcb_atom_t        property  /**< */,
3702                      xcb_atom_t        type  /**< */,
3703                      uint8_t           format  /**< */,
3704                      uint32_t          data_len  /**< */,
3705                      const void       *data  /**< */)
3706 {
3707     static const xcb_protocol_request_t xcb_req = {
3708         /* count */ 4,
3709         /* ext */ 0,
3710         /* opcode */ XCB_CHANGE_PROPERTY,
3711         /* isvoid */ 1
3712     };
3713 
3714     struct iovec xcb_parts[6];
3715     xcb_void_cookie_t xcb_ret;
3716     xcb_change_property_request_t xcb_out;
3717 
3718     xcb_out.mode = mode;
3719     xcb_out.window = window;
3720     xcb_out.property = property;
3721     xcb_out.type = type;
3722     xcb_out.format = format;
3723     memset(xcb_out.pad0, 0, 3);
3724     xcb_out.data_len = data_len;
3725 
3726     xcb_parts[2].iov_base = (char *) &xcb_out;
3727     xcb_parts[2].iov_len = sizeof(xcb_out);
3728     xcb_parts[3].iov_base = 0;
3729     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3730     /* void data */
3731     xcb_parts[4].iov_base = (char *) data;
3732     xcb_parts[4].iov_len = ((data_len * format) / 8) * sizeof(char);
3733     xcb_parts[5].iov_base = 0;
3734     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3735 
3736     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3737     return xcb_ret;
3738 }
3739 
3740 
3741 /*****************************************************************************
3742  **
3743  ** xcb_void_cookie_t xcb_delete_property_checked
3744  **
3745  ** @param xcb_connection_t *c
3746  ** @param xcb_window_t      window
3747  ** @param xcb_atom_t        property
3748  ** @returns xcb_void_cookie_t
3749  **
3750  *****************************************************************************/
3751 
3752 xcb_void_cookie_t
3753 xcb_delete_property_checked (xcb_connection_t *c  /**< */,
3754                              xcb_window_t      window  /**< */,
3755                              xcb_atom_t        property  /**< */)
3756 {
3757     static const xcb_protocol_request_t xcb_req = {
3758         /* count */ 2,
3759         /* ext */ 0,
3760         /* opcode */ XCB_DELETE_PROPERTY,
3761         /* isvoid */ 1
3762     };
3763 
3764     struct iovec xcb_parts[4];
3765     xcb_void_cookie_t xcb_ret;
3766     xcb_delete_property_request_t xcb_out;
3767 
3768     xcb_out.pad0 = 0;
3769     xcb_out.window = window;
3770     xcb_out.property = property;
3771 
3772     xcb_parts[2].iov_base = (char *) &xcb_out;
3773     xcb_parts[2].iov_len = sizeof(xcb_out);
3774     xcb_parts[3].iov_base = 0;
3775     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3776 
3777     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3778     return xcb_ret;
3779 }
3780 
3781 
3782 /*****************************************************************************
3783  **
3784  ** xcb_void_cookie_t xcb_delete_property
3785  **
3786  ** @param xcb_connection_t *c
3787  ** @param xcb_window_t      window
3788  ** @param xcb_atom_t        property
3789  ** @returns xcb_void_cookie_t
3790  **
3791  *****************************************************************************/
3792 
3793 xcb_void_cookie_t
3794 xcb_delete_property (xcb_connection_t *c  /**< */,
3795                      xcb_window_t      window  /**< */,
3796                      xcb_atom_t        property  /**< */)
3797 {
3798     static const xcb_protocol_request_t xcb_req = {
3799         /* count */ 2,
3800         /* ext */ 0,
3801         /* opcode */ XCB_DELETE_PROPERTY,
3802         /* isvoid */ 1
3803     };
3804 
3805     struct iovec xcb_parts[4];
3806     xcb_void_cookie_t xcb_ret;
3807     xcb_delete_property_request_t xcb_out;
3808 
3809     xcb_out.pad0 = 0;
3810     xcb_out.window = window;
3811     xcb_out.property = property;
3812 
3813     xcb_parts[2].iov_base = (char *) &xcb_out;
3814     xcb_parts[2].iov_len = sizeof(xcb_out);
3815     xcb_parts[3].iov_base = 0;
3816     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3817 
3818     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3819     return xcb_ret;
3820 }
3821 
3822 int
3823 xcb_get_property_sizeof (const void  *_buffer  /**< */)
3824 {
3825     char *xcb_tmp = (char *)_buffer;
3826     const xcb_get_property_reply_t *_aux = (xcb_get_property_reply_t *)_buffer;
3827     unsigned int xcb_buffer_len = 0;
3828     unsigned int xcb_block_len = 0;
3829     unsigned int xcb_pad = 0;
3830     unsigned int xcb_align_to = 0;
3831 
3832 
3833     xcb_block_len += sizeof(xcb_get_property_reply_t);
3834     xcb_tmp += xcb_block_len;
3835     xcb_buffer_len += xcb_block_len;
3836     xcb_block_len = 0;
3837     /* value */
3838     xcb_block_len += (_aux->value_len * (_aux->format / 8)) * sizeof(char);
3839     xcb_tmp += xcb_block_len;
3840     xcb_align_to = ALIGNOF(char);
3841     /* insert padding */
3842     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3843     xcb_buffer_len += xcb_block_len + xcb_pad;
3844     if (0 != xcb_pad) {
3845         xcb_tmp += xcb_pad;
3846         xcb_pad = 0;
3847     }
3848     xcb_block_len = 0;
3849 
3850     return xcb_buffer_len;
3851 }
3852 
3853 
3854 /*****************************************************************************
3855  **
3856  ** xcb_get_property_cookie_t xcb_get_property
3857  **
3858  ** @param xcb_connection_t *c
3859  ** @param uint8_t           _delete
3860  ** @param xcb_window_t      window
3861  ** @param xcb_atom_t        property
3862  ** @param xcb_atom_t        type
3863  ** @param uint32_t          long_offset
3864  ** @param uint32_t          long_length
3865  ** @returns xcb_get_property_cookie_t
3866  **
3867  *****************************************************************************/
3868 
3869 xcb_get_property_cookie_t
3870 xcb_get_property (xcb_connection_t *c  /**< */,
3871                   uint8_t           _delete  /**< */,
3872                   xcb_window_t      window  /**< */,
3873                   xcb_atom_t        property  /**< */,
3874                   xcb_atom_t        type  /**< */,
3875                   uint32_t          long_offset  /**< */,
3876                   uint32_t          long_length  /**< */)
3877 {
3878     static const xcb_protocol_request_t xcb_req = {
3879         /* count */ 2,
3880         /* ext */ 0,
3881         /* opcode */ XCB_GET_PROPERTY,
3882         /* isvoid */ 0
3883     };
3884 
3885     struct iovec xcb_parts[4];
3886     xcb_get_property_cookie_t xcb_ret;
3887     xcb_get_property_request_t xcb_out;
3888 
3889     xcb_out._delete = _delete;
3890     xcb_out.window = window;
3891     xcb_out.property = property;
3892     xcb_out.type = type;
3893     xcb_out.long_offset = long_offset;
3894     xcb_out.long_length = long_length;
3895 
3896     xcb_parts[2].iov_base = (char *) &xcb_out;
3897     xcb_parts[2].iov_len = sizeof(xcb_out);
3898     xcb_parts[3].iov_base = 0;
3899     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3900 
3901     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3902     return xcb_ret;
3903 }
3904 
3905 
3906 /*****************************************************************************
3907  **
3908  ** xcb_get_property_cookie_t xcb_get_property_unchecked
3909  **
3910  ** @param xcb_connection_t *c
3911  ** @param uint8_t           _delete
3912  ** @param xcb_window_t      window
3913  ** @param xcb_atom_t        property
3914  ** @param xcb_atom_t        type
3915  ** @param uint32_t          long_offset
3916  ** @param uint32_t          long_length
3917  ** @returns xcb_get_property_cookie_t
3918  **
3919  *****************************************************************************/
3920 
3921 xcb_get_property_cookie_t
3922 xcb_get_property_unchecked (xcb_connection_t *c  /**< */,
3923                             uint8_t           _delete  /**< */,
3924                             xcb_window_t      window  /**< */,
3925                             xcb_atom_t        property  /**< */,
3926                             xcb_atom_t        type  /**< */,
3927                             uint32_t          long_offset  /**< */,
3928                             uint32_t          long_length  /**< */)
3929 {
3930     static const xcb_protocol_request_t xcb_req = {
3931         /* count */ 2,
3932         /* ext */ 0,
3933         /* opcode */ XCB_GET_PROPERTY,
3934         /* isvoid */ 0
3935     };
3936 
3937     struct iovec xcb_parts[4];
3938     xcb_get_property_cookie_t xcb_ret;
3939     xcb_get_property_request_t xcb_out;
3940 
3941     xcb_out._delete = _delete;
3942     xcb_out.window = window;
3943     xcb_out.property = property;
3944     xcb_out.type = type;
3945     xcb_out.long_offset = long_offset;
3946     xcb_out.long_length = long_length;
3947 
3948     xcb_parts[2].iov_base = (char *) &xcb_out;
3949     xcb_parts[2].iov_len = sizeof(xcb_out);
3950     xcb_parts[3].iov_base = 0;
3951     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3952 
3953     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3954     return xcb_ret;
3955 }
3956 
3957 
3958 /*****************************************************************************
3959  **
3960  ** void * xcb_get_property_value
3961  **
3962  ** @param const xcb_get_property_reply_t *R
3963  ** @returns void *
3964  **
3965  *****************************************************************************/
3966 
3967 void *
3968 xcb_get_property_value (const xcb_get_property_reply_t *R  /**< */)
3969 {
3970     return (void *) (R + 1);
3971 }
3972 
3973 
3974 /*****************************************************************************
3975  **
3976  ** int xcb_get_property_value_length
3977  **
3978  ** @param const xcb_get_property_reply_t *R
3979  ** @returns int
3980  **
3981  *****************************************************************************/
3982 
3983 int
3984 xcb_get_property_value_length (const xcb_get_property_reply_t *R  /**< */)
3985 {
3986     return (R->value_len * (R->format / 8));
3987 }
3988 
3989 
3990 /*****************************************************************************
3991  **
3992  ** xcb_generic_iterator_t xcb_get_property_value_end
3993  **
3994  ** @param const xcb_get_property_reply_t *R
3995  ** @returns xcb_generic_iterator_t
3996  **
3997  *****************************************************************************/
3998 
3999 xcb_generic_iterator_t
4000 xcb_get_property_value_end (const xcb_get_property_reply_t *R  /**< */)
4001 {
4002     xcb_generic_iterator_t i;
4003     i.data = ((char *) (R + 1)) + ((R->value_len * (R->format / 8)));
4004     i.rem = 0;
4005     i.index = (char *) i.data - (char *) R;
4006     return i;
4007 }
4008 
4009 
4010 /*****************************************************************************
4011  **
4012  ** xcb_get_property_reply_t * xcb_get_property_reply
4013  **
4014  ** @param xcb_connection_t           *c
4015  ** @param xcb_get_property_cookie_t   cookie
4016  ** @param xcb_generic_error_t       **e
4017  ** @returns xcb_get_property_reply_t *
4018  **
4019  *****************************************************************************/
4020 
4021 xcb_get_property_reply_t *
4022 xcb_get_property_reply (xcb_connection_t           *c  /**< */,
4023                         xcb_get_property_cookie_t   cookie  /**< */,
4024                         xcb_generic_error_t       **e  /**< */)
4025 {
4026     return (xcb_get_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4027 }
4028 
4029 int
4030 xcb_list_properties_sizeof (const void  *_buffer  /**< */)
4031 {
4032     char *xcb_tmp = (char *)_buffer;
4033     const xcb_list_properties_reply_t *_aux = (xcb_list_properties_reply_t *)_buffer;
4034     unsigned int xcb_buffer_len = 0;
4035     unsigned int xcb_block_len = 0;
4036     unsigned int xcb_pad = 0;
4037     unsigned int xcb_align_to = 0;
4038 
4039 
4040     xcb_block_len += sizeof(xcb_list_properties_reply_t);
4041     xcb_tmp += xcb_block_len;
4042     xcb_buffer_len += xcb_block_len;
4043     xcb_block_len = 0;
4044     /* atoms */
4045     xcb_block_len += _aux->atoms_len * sizeof(xcb_atom_t);
4046     xcb_tmp += xcb_block_len;
4047     xcb_align_to = ALIGNOF(xcb_atom_t);
4048     /* insert padding */
4049     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4050     xcb_buffer_len += xcb_block_len + xcb_pad;
4051     if (0 != xcb_pad) {
4052         xcb_tmp += xcb_pad;
4053         xcb_pad = 0;
4054     }
4055     xcb_block_len = 0;
4056 
4057     return xcb_buffer_len;
4058 }
4059 
4060 
4061 /*****************************************************************************
4062  **
4063  ** xcb_list_properties_cookie_t xcb_list_properties
4064  **
4065  ** @param xcb_connection_t *c
4066  ** @param xcb_window_t      window
4067  ** @returns xcb_list_properties_cookie_t
4068  **
4069  *****************************************************************************/
4070 
4071 xcb_list_properties_cookie_t
4072 xcb_list_properties (xcb_connection_t *c  /**< */,
4073                      xcb_window_t      window  /**< */)
4074 {
4075     static const xcb_protocol_request_t xcb_req = {
4076         /* count */ 2,
4077         /* ext */ 0,
4078         /* opcode */ XCB_LIST_PROPERTIES,
4079         /* isvoid */ 0
4080     };
4081 
4082     struct iovec xcb_parts[4];
4083     xcb_list_properties_cookie_t xcb_ret;
4084     xcb_list_properties_request_t xcb_out;
4085 
4086     xcb_out.pad0 = 0;
4087     xcb_out.window = window;
4088 
4089     xcb_parts[2].iov_base = (char *) &xcb_out;
4090     xcb_parts[2].iov_len = sizeof(xcb_out);
4091     xcb_parts[3].iov_base = 0;
4092     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4093 
4094     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4095     return xcb_ret;
4096 }
4097 
4098 
4099 /*****************************************************************************
4100  **
4101  ** xcb_list_properties_cookie_t xcb_list_properties_unchecked
4102  **
4103  ** @param xcb_connection_t *c
4104  ** @param xcb_window_t      window
4105  ** @returns xcb_list_properties_cookie_t
4106  **
4107  *****************************************************************************/
4108 
4109 xcb_list_properties_cookie_t
4110 xcb_list_properties_unchecked (xcb_connection_t *c  /**< */,
4111                                xcb_window_t      window  /**< */)
4112 {
4113     static const xcb_protocol_request_t xcb_req = {
4114         /* count */ 2,
4115         /* ext */ 0,
4116         /* opcode */ XCB_LIST_PROPERTIES,
4117         /* isvoid */ 0
4118     };
4119 
4120     struct iovec xcb_parts[4];
4121     xcb_list_properties_cookie_t xcb_ret;
4122     xcb_list_properties_request_t xcb_out;
4123 
4124     xcb_out.pad0 = 0;
4125     xcb_out.window = window;
4126 
4127     xcb_parts[2].iov_base = (char *) &xcb_out;
4128     xcb_parts[2].iov_len = sizeof(xcb_out);
4129     xcb_parts[3].iov_base = 0;
4130     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4131 
4132     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4133     return xcb_ret;
4134 }
4135 
4136 
4137 /*****************************************************************************
4138  **
4139  ** xcb_atom_t * xcb_list_properties_atoms
4140  **
4141  ** @param const xcb_list_properties_reply_t *R
4142  ** @returns xcb_atom_t *
4143  **
4144  *****************************************************************************/
4145 
4146 xcb_atom_t *
4147 xcb_list_properties_atoms (const xcb_list_properties_reply_t *R  /**< */)
4148 {
4149     return (xcb_atom_t *) (R + 1);
4150 }
4151 
4152 
4153 /*****************************************************************************
4154  **
4155  ** int xcb_list_properties_atoms_length
4156  **
4157  ** @param const xcb_list_properties_reply_t *R
4158  ** @returns int
4159  **
4160  *****************************************************************************/
4161 
4162 int
4163 xcb_list_properties_atoms_length (const xcb_list_properties_reply_t *R  /**< */)
4164 {
4165     return R->atoms_len;
4166 }
4167 
4168 
4169 /*****************************************************************************
4170  **
4171  ** xcb_generic_iterator_t xcb_list_properties_atoms_end
4172  **
4173  ** @param const xcb_list_properties_reply_t *R
4174  ** @returns xcb_generic_iterator_t
4175  **
4176  *****************************************************************************/
4177 
4178 xcb_generic_iterator_t
4179 xcb_list_properties_atoms_end (const xcb_list_properties_reply_t *R  /**< */)
4180 {
4181     xcb_generic_iterator_t i;
4182     i.data = ((xcb_atom_t *) (R + 1)) + (R->atoms_len);
4183     i.rem = 0;
4184     i.index = (char *) i.data - (char *) R;
4185     return i;
4186 }
4187 
4188 
4189 /*****************************************************************************
4190  **
4191  ** xcb_list_properties_reply_t * xcb_list_properties_reply
4192  **
4193  ** @param xcb_connection_t              *c
4194  ** @param xcb_list_properties_cookie_t   cookie
4195  ** @param xcb_generic_error_t          **e
4196  ** @returns xcb_list_properties_reply_t *
4197  **
4198  *****************************************************************************/
4199 
4200 xcb_list_properties_reply_t *
4201 xcb_list_properties_reply (xcb_connection_t              *c  /**< */,
4202                            xcb_list_properties_cookie_t   cookie  /**< */,
4203                            xcb_generic_error_t          **e  /**< */)
4204 {
4205     return (xcb_list_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4206 }
4207 
4208 
4209 /*****************************************************************************
4210  **
4211  ** xcb_void_cookie_t xcb_set_selection_owner_checked
4212  **
4213  ** @param xcb_connection_t *c
4214  ** @param xcb_window_t      owner
4215  ** @param xcb_atom_t        selection
4216  ** @param xcb_timestamp_t   time
4217  ** @returns xcb_void_cookie_t
4218  **
4219  *****************************************************************************/
4220 
4221 xcb_void_cookie_t
4222 xcb_set_selection_owner_checked (xcb_connection_t *c  /**< */,
4223                                  xcb_window_t      owner  /**< */,
4224                                  xcb_atom_t        selection  /**< */,
4225                                  xcb_timestamp_t   time  /**< */)
4226 {
4227     static const xcb_protocol_request_t xcb_req = {
4228         /* count */ 2,
4229         /* ext */ 0,
4230         /* opcode */ XCB_SET_SELECTION_OWNER,
4231         /* isvoid */ 1
4232     };
4233 
4234     struct iovec xcb_parts[4];
4235     xcb_void_cookie_t xcb_ret;
4236     xcb_set_selection_owner_request_t xcb_out;
4237 
4238     xcb_out.pad0 = 0;
4239     xcb_out.owner = owner;
4240     xcb_out.selection = selection;
4241     xcb_out.time = time;
4242 
4243     xcb_parts[2].iov_base = (char *) &xcb_out;
4244     xcb_parts[2].iov_len = sizeof(xcb_out);
4245     xcb_parts[3].iov_base = 0;
4246     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4247 
4248     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4249     return xcb_ret;
4250 }
4251 
4252 
4253 /*****************************************************************************
4254  **
4255  ** xcb_void_cookie_t xcb_set_selection_owner
4256  **
4257  ** @param xcb_connection_t *c
4258  ** @param xcb_window_t      owner
4259  ** @param xcb_atom_t        selection
4260  ** @param xcb_timestamp_t   time
4261  ** @returns xcb_void_cookie_t
4262  **
4263  *****************************************************************************/
4264 
4265 xcb_void_cookie_t
4266 xcb_set_selection_owner (xcb_connection_t *c  /**< */,
4267                          xcb_window_t      owner  /**< */,
4268                          xcb_atom_t        selection  /**< */,
4269                          xcb_timestamp_t   time  /**< */)
4270 {
4271     static const xcb_protocol_request_t xcb_req = {
4272         /* count */ 2,
4273         /* ext */ 0,
4274         /* opcode */ XCB_SET_SELECTION_OWNER,
4275         /* isvoid */ 1
4276     };
4277 
4278     struct iovec xcb_parts[4];
4279     xcb_void_cookie_t xcb_ret;
4280     xcb_set_selection_owner_request_t xcb_out;
4281 
4282     xcb_out.pad0 = 0;
4283     xcb_out.owner = owner;
4284     xcb_out.selection = selection;
4285     xcb_out.time = time;
4286 
4287     xcb_parts[2].iov_base = (char *) &xcb_out;
4288     xcb_parts[2].iov_len = sizeof(xcb_out);
4289     xcb_parts[3].iov_base = 0;
4290     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4291 
4292     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4293     return xcb_ret;
4294 }
4295 
4296 
4297 /*****************************************************************************
4298  **
4299  ** xcb_get_selection_owner_cookie_t xcb_get_selection_owner
4300  **
4301  ** @param xcb_connection_t *c
4302  ** @param xcb_atom_t        selection
4303  ** @returns xcb_get_selection_owner_cookie_t
4304  **
4305  *****************************************************************************/
4306 
4307 xcb_get_selection_owner_cookie_t
4308 xcb_get_selection_owner (xcb_connection_t *c  /**< */,
4309                          xcb_atom_t        selection  /**< */)
4310 {
4311     static const xcb_protocol_request_t xcb_req = {
4312         /* count */ 2,
4313         /* ext */ 0,
4314         /* opcode */ XCB_GET_SELECTION_OWNER,
4315         /* isvoid */ 0
4316     };
4317 
4318     struct iovec xcb_parts[4];
4319     xcb_get_selection_owner_cookie_t xcb_ret;
4320     xcb_get_selection_owner_request_t xcb_out;
4321 
4322     xcb_out.pad0 = 0;
4323     xcb_out.selection = selection;
4324 
4325     xcb_parts[2].iov_base = (char *) &xcb_out;
4326     xcb_parts[2].iov_len = sizeof(xcb_out);
4327     xcb_parts[3].iov_base = 0;
4328     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4329 
4330     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4331     return xcb_ret;
4332 }
4333 
4334 
4335 /*****************************************************************************
4336  **
4337  ** xcb_get_selection_owner_cookie_t xcb_get_selection_owner_unchecked
4338  **
4339  ** @param xcb_connection_t *c
4340  ** @param xcb_atom_t        selection
4341  ** @returns xcb_get_selection_owner_cookie_t
4342  **
4343  *****************************************************************************/
4344 
4345 xcb_get_selection_owner_cookie_t
4346 xcb_get_selection_owner_unchecked (xcb_connection_t *c  /**< */,
4347                                    xcb_atom_t        selection  /**< */)
4348 {
4349     static const xcb_protocol_request_t xcb_req = {
4350         /* count */ 2,
4351         /* ext */ 0,
4352         /* opcode */ XCB_GET_SELECTION_OWNER,
4353         /* isvoid */ 0
4354     };
4355 
4356     struct iovec xcb_parts[4];
4357     xcb_get_selection_owner_cookie_t xcb_ret;
4358     xcb_get_selection_owner_request_t xcb_out;
4359 
4360     xcb_out.pad0 = 0;
4361     xcb_out.selection = selection;
4362 
4363     xcb_parts[2].iov_base = (char *) &xcb_out;
4364     xcb_parts[2].iov_len = sizeof(xcb_out);
4365     xcb_parts[3].iov_base = 0;
4366     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4367 
4368     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4369     return xcb_ret;
4370 }
4371 
4372 
4373 /*****************************************************************************
4374  **
4375  ** xcb_get_selection_owner_reply_t * xcb_get_selection_owner_reply
4376  **
4377  ** @param xcb_connection_t                  *c
4378  ** @param xcb_get_selection_owner_cookie_t   cookie
4379  ** @param xcb_generic_error_t              **e
4380  ** @returns xcb_get_selection_owner_reply_t *
4381  **
4382  *****************************************************************************/
4383 
4384 xcb_get_selection_owner_reply_t *
4385 xcb_get_selection_owner_reply (xcb_connection_t                  *c  /**< */,
4386                                xcb_get_selection_owner_cookie_t   cookie  /**< */,
4387                                xcb_generic_error_t              **e  /**< */)
4388 {
4389     return (xcb_get_selection_owner_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4390 }
4391 
4392 
4393 /*****************************************************************************
4394  **
4395  ** xcb_void_cookie_t xcb_convert_selection_checked
4396  **
4397  ** @param xcb_connection_t *c
4398  ** @param xcb_window_t      requestor
4399  ** @param xcb_atom_t        selection
4400  ** @param xcb_atom_t        target
4401  ** @param xcb_atom_t        property
4402  ** @param xcb_timestamp_t   time
4403  ** @returns xcb_void_cookie_t
4404  **
4405  *****************************************************************************/
4406 
4407 xcb_void_cookie_t
4408 xcb_convert_selection_checked (xcb_connection_t *c  /**< */,
4409                                xcb_window_t      requestor  /**< */,
4410                                xcb_atom_t        selection  /**< */,
4411                                xcb_atom_t        target  /**< */,
4412                                xcb_atom_t        property  /**< */,
4413                                xcb_timestamp_t   time  /**< */)
4414 {
4415     static const xcb_protocol_request_t xcb_req = {
4416         /* count */ 2,
4417         /* ext */ 0,
4418         /* opcode */ XCB_CONVERT_SELECTION,
4419         /* isvoid */ 1
4420     };
4421 
4422     struct iovec xcb_parts[4];
4423     xcb_void_cookie_t xcb_ret;
4424     xcb_convert_selection_request_t xcb_out;
4425 
4426     xcb_out.pad0 = 0;
4427     xcb_out.requestor = requestor;
4428     xcb_out.selection = selection;
4429     xcb_out.target = target;
4430     xcb_out.property = property;
4431     xcb_out.time = time;
4432 
4433     xcb_parts[2].iov_base = (char *) &xcb_out;
4434     xcb_parts[2].iov_len = sizeof(xcb_out);
4435     xcb_parts[3].iov_base = 0;
4436     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4437 
4438     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4439     return xcb_ret;
4440 }
4441 
4442 
4443 /*****************************************************************************
4444  **
4445  ** xcb_void_cookie_t xcb_convert_selection
4446  **
4447  ** @param xcb_connection_t *c
4448  ** @param xcb_window_t      requestor
4449  ** @param xcb_atom_t        selection
4450  ** @param xcb_atom_t        target
4451  ** @param xcb_atom_t        property
4452  ** @param xcb_timestamp_t   time
4453  ** @returns xcb_void_cookie_t
4454  **
4455  *****************************************************************************/
4456 
4457 xcb_void_cookie_t
4458 xcb_convert_selection (xcb_connection_t *c  /**< */,
4459                        xcb_window_t      requestor  /**< */,
4460                        xcb_atom_t        selection  /**< */,
4461                        xcb_atom_t        target  /**< */,
4462                        xcb_atom_t        property  /**< */,
4463                        xcb_timestamp_t   time  /**< */)
4464 {
4465     static const xcb_protocol_request_t xcb_req = {
4466         /* count */ 2,
4467         /* ext */ 0,
4468         /* opcode */ XCB_CONVERT_SELECTION,
4469         /* isvoid */ 1
4470     };
4471 
4472     struct iovec xcb_parts[4];
4473     xcb_void_cookie_t xcb_ret;
4474     xcb_convert_selection_request_t xcb_out;
4475 
4476     xcb_out.pad0 = 0;
4477     xcb_out.requestor = requestor;
4478     xcb_out.selection = selection;
4479     xcb_out.target = target;
4480     xcb_out.property = property;
4481     xcb_out.time = time;
4482 
4483     xcb_parts[2].iov_base = (char *) &xcb_out;
4484     xcb_parts[2].iov_len = sizeof(xcb_out);
4485     xcb_parts[3].iov_base = 0;
4486     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4487 
4488     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4489     return xcb_ret;
4490 }
4491 
4492 
4493 /*****************************************************************************
4494  **
4495  ** xcb_void_cookie_t xcb_send_event_checked
4496  **
4497  ** @param xcb_connection_t *c
4498  ** @param uint8_t           propagate
4499  ** @param xcb_window_t      destination
4500  ** @param uint32_t          event_mask
4501  ** @param const char       *event
4502  ** @returns xcb_void_cookie_t
4503  **
4504  *****************************************************************************/
4505 
4506 xcb_void_cookie_t
4507 xcb_send_event_checked (xcb_connection_t *c  /**< */,
4508                         uint8_t           propagate  /**< */,
4509                         xcb_window_t      destination  /**< */,
4510                         uint32_t          event_mask  /**< */,
4511                         const char       *event  /**< */)
4512 {
4513     static const xcb_protocol_request_t xcb_req = {
4514         /* count */ 2,
4515         /* ext */ 0,
4516         /* opcode */ XCB_SEND_EVENT,
4517         /* isvoid */ 1
4518     };
4519 
4520     struct iovec xcb_parts[4];
4521     xcb_void_cookie_t xcb_ret;
4522     xcb_send_event_request_t xcb_out;
4523 
4524     xcb_out.propagate = propagate;
4525     xcb_out.destination = destination;
4526     xcb_out.event_mask = event_mask;
4527     memcpy(xcb_out.event, event, 32);
4528 
4529     xcb_parts[2].iov_base = (char *) &xcb_out;
4530     xcb_parts[2].iov_len = sizeof(xcb_out);
4531     xcb_parts[3].iov_base = 0;
4532     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4533 
4534     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4535     return xcb_ret;
4536 }
4537 
4538 
4539 /*****************************************************************************
4540  **
4541  ** xcb_void_cookie_t xcb_send_event
4542  **
4543  ** @param xcb_connection_t *c
4544  ** @param uint8_t           propagate
4545  ** @param xcb_window_t      destination
4546  ** @param uint32_t          event_mask
4547  ** @param const char       *event
4548  ** @returns xcb_void_cookie_t
4549  **
4550  *****************************************************************************/
4551 
4552 xcb_void_cookie_t
4553 xcb_send_event (xcb_connection_t *c  /**< */,
4554                 uint8_t           propagate  /**< */,
4555                 xcb_window_t      destination  /**< */,
4556                 uint32_t          event_mask  /**< */,
4557                 const char       *event  /**< */)
4558 {
4559     static const xcb_protocol_request_t xcb_req = {
4560         /* count */ 2,
4561         /* ext */ 0,
4562         /* opcode */ XCB_SEND_EVENT,
4563         /* isvoid */ 1
4564     };
4565 
4566     struct iovec xcb_parts[4];
4567     xcb_void_cookie_t xcb_ret;
4568     xcb_send_event_request_t xcb_out;
4569 
4570     xcb_out.propagate = propagate;
4571     xcb_out.destination = destination;
4572     xcb_out.event_mask = event_mask;
4573     memcpy(xcb_out.event, event, 32);
4574 
4575     xcb_parts[2].iov_base = (char *) &xcb_out;
4576     xcb_parts[2].iov_len = sizeof(xcb_out);
4577     xcb_parts[3].iov_base = 0;
4578     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4579 
4580     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4581     return xcb_ret;
4582 }
4583 
4584 
4585 /*****************************************************************************
4586  **
4587  ** xcb_grab_pointer_cookie_t xcb_grab_pointer
4588  **
4589  ** @param xcb_connection_t *c
4590  ** @param uint8_t           owner_events
4591  ** @param xcb_window_t      grab_window
4592  ** @param uint16_t          event_mask
4593  ** @param uint8_t           pointer_mode
4594  ** @param uint8_t           keyboard_mode
4595  ** @param xcb_window_t      confine_to
4596  ** @param xcb_cursor_t      cursor
4597  ** @param xcb_timestamp_t   time
4598  ** @returns xcb_grab_pointer_cookie_t
4599  **
4600  *****************************************************************************/
4601 
4602 xcb_grab_pointer_cookie_t
4603 xcb_grab_pointer (xcb_connection_t *c  /**< */,
4604                   uint8_t           owner_events  /**< */,
4605                   xcb_window_t      grab_window  /**< */,
4606                   uint16_t          event_mask  /**< */,
4607                   uint8_t           pointer_mode  /**< */,
4608                   uint8_t           keyboard_mode  /**< */,
4609                   xcb_window_t      confine_to  /**< */,
4610                   xcb_cursor_t      cursor  /**< */,
4611                   xcb_timestamp_t   time  /**< */)
4612 {
4613     static const xcb_protocol_request_t xcb_req = {
4614         /* count */ 2,
4615         /* ext */ 0,
4616         /* opcode */ XCB_GRAB_POINTER,
4617         /* isvoid */ 0
4618     };
4619 
4620     struct iovec xcb_parts[4];
4621     xcb_grab_pointer_cookie_t xcb_ret;
4622     xcb_grab_pointer_request_t xcb_out;
4623 
4624     xcb_out.owner_events = owner_events;
4625     xcb_out.grab_window = grab_window;
4626     xcb_out.event_mask = event_mask;
4627     xcb_out.pointer_mode = pointer_mode;
4628     xcb_out.keyboard_mode = keyboard_mode;
4629     xcb_out.confine_to = confine_to;
4630     xcb_out.cursor = cursor;
4631     xcb_out.time = time;
4632 
4633     xcb_parts[2].iov_base = (char *) &xcb_out;
4634     xcb_parts[2].iov_len = sizeof(xcb_out);
4635     xcb_parts[3].iov_base = 0;
4636     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4637 
4638     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4639     return xcb_ret;
4640 }
4641 
4642 
4643 /*****************************************************************************
4644  **
4645  ** xcb_grab_pointer_cookie_t xcb_grab_pointer_unchecked
4646  **
4647  ** @param xcb_connection_t *c
4648  ** @param uint8_t           owner_events
4649  ** @param xcb_window_t      grab_window
4650  ** @param uint16_t          event_mask
4651  ** @param uint8_t           pointer_mode
4652  ** @param uint8_t           keyboard_mode
4653  ** @param xcb_window_t      confine_to
4654  ** @param xcb_cursor_t      cursor
4655  ** @param xcb_timestamp_t   time
4656  ** @returns xcb_grab_pointer_cookie_t
4657  **
4658  *****************************************************************************/
4659 
4660 xcb_grab_pointer_cookie_t
4661 xcb_grab_pointer_unchecked (xcb_connection_t *c  /**< */,
4662                             uint8_t           owner_events  /**< */,
4663                             xcb_window_t      grab_window  /**< */,
4664                             uint16_t          event_mask  /**< */,
4665                             uint8_t           pointer_mode  /**< */,
4666                             uint8_t           keyboard_mode  /**< */,
4667                             xcb_window_t      confine_to  /**< */,
4668                             xcb_cursor_t      cursor  /**< */,
4669                             xcb_timestamp_t   time  /**< */)
4670 {
4671     static const xcb_protocol_request_t xcb_req = {
4672         /* count */ 2,
4673         /* ext */ 0,
4674         /* opcode */ XCB_GRAB_POINTER,
4675         /* isvoid */ 0
4676     };
4677 
4678     struct iovec xcb_parts[4];
4679     xcb_grab_pointer_cookie_t xcb_ret;
4680     xcb_grab_pointer_request_t xcb_out;
4681 
4682     xcb_out.owner_events = owner_events;
4683     xcb_out.grab_window = grab_window;
4684     xcb_out.event_mask = event_mask;
4685     xcb_out.pointer_mode = pointer_mode;
4686     xcb_out.keyboard_mode = keyboard_mode;
4687     xcb_out.confine_to = confine_to;
4688     xcb_out.cursor = cursor;
4689     xcb_out.time = time;
4690 
4691     xcb_parts[2].iov_base = (char *) &xcb_out;
4692     xcb_parts[2].iov_len = sizeof(xcb_out);
4693     xcb_parts[3].iov_base = 0;
4694     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4695 
4696     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4697     return xcb_ret;
4698 }
4699 
4700 
4701 /*****************************************************************************
4702  **
4703  ** xcb_grab_pointer_reply_t * xcb_grab_pointer_reply
4704  **
4705  ** @param xcb_connection_t           *c
4706  ** @param xcb_grab_pointer_cookie_t   cookie
4707  ** @param xcb_generic_error_t       **e
4708  ** @returns xcb_grab_pointer_reply_t *
4709  **
4710  *****************************************************************************/
4711 
4712 xcb_grab_pointer_reply_t *
4713 xcb_grab_pointer_reply (xcb_connection_t           *c  /**< */,
4714                         xcb_grab_pointer_cookie_t   cookie  /**< */,
4715                         xcb_generic_error_t       **e  /**< */)
4716 {
4717     return (xcb_grab_pointer_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4718 }
4719 
4720 
4721 /*****************************************************************************
4722  **
4723  ** xcb_void_cookie_t xcb_ungrab_pointer_checked
4724  **
4725  ** @param xcb_connection_t *c
4726  ** @param xcb_timestamp_t   time
4727  ** @returns xcb_void_cookie_t
4728  **
4729  *****************************************************************************/
4730 
4731 xcb_void_cookie_t
4732 xcb_ungrab_pointer_checked (xcb_connection_t *c  /**< */,
4733                             xcb_timestamp_t   time  /**< */)
4734 {
4735     static const xcb_protocol_request_t xcb_req = {
4736         /* count */ 2,
4737         /* ext */ 0,
4738         /* opcode */ XCB_UNGRAB_POINTER,
4739         /* isvoid */ 1
4740     };
4741 
4742     struct iovec xcb_parts[4];
4743     xcb_void_cookie_t xcb_ret;
4744     xcb_ungrab_pointer_request_t xcb_out;
4745 
4746     xcb_out.pad0 = 0;
4747     xcb_out.time = time;
4748 
4749     xcb_parts[2].iov_base = (char *) &xcb_out;
4750     xcb_parts[2].iov_len = sizeof(xcb_out);
4751     xcb_parts[3].iov_base = 0;
4752     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4753 
4754     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4755     return xcb_ret;
4756 }
4757 
4758 
4759 /*****************************************************************************
4760  **
4761  ** xcb_void_cookie_t xcb_ungrab_pointer
4762  **
4763  ** @param xcb_connection_t *c
4764  ** @param xcb_timestamp_t   time
4765  ** @returns xcb_void_cookie_t
4766  **
4767  *****************************************************************************/
4768 
4769 xcb_void_cookie_t
4770 xcb_ungrab_pointer (xcb_connection_t *c  /**< */,
4771                     xcb_timestamp_t   time  /**< */)
4772 {
4773     static const xcb_protocol_request_t xcb_req = {
4774         /* count */ 2,
4775         /* ext */ 0,
4776         /* opcode */ XCB_UNGRAB_POINTER,
4777         /* isvoid */ 1
4778     };
4779 
4780     struct iovec xcb_parts[4];
4781     xcb_void_cookie_t xcb_ret;
4782     xcb_ungrab_pointer_request_t xcb_out;
4783 
4784     xcb_out.pad0 = 0;
4785     xcb_out.time = time;
4786 
4787     xcb_parts[2].iov_base = (char *) &xcb_out;
4788     xcb_parts[2].iov_len = sizeof(xcb_out);
4789     xcb_parts[3].iov_base = 0;
4790     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4791 
4792     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4793     return xcb_ret;
4794 }
4795 
4796 
4797 /*****************************************************************************
4798  **
4799  ** xcb_void_cookie_t xcb_grab_button_checked
4800  **
4801  ** @param xcb_connection_t *c
4802  ** @param uint8_t           owner_events
4803  ** @param xcb_window_t      grab_window
4804  ** @param uint16_t          event_mask
4805  ** @param uint8_t           pointer_mode
4806  ** @param uint8_t           keyboard_mode
4807  ** @param xcb_window_t      confine_to
4808  ** @param xcb_cursor_t      cursor
4809  ** @param uint8_t           button
4810  ** @param uint16_t          modifiers
4811  ** @returns xcb_void_cookie_t
4812  **
4813  *****************************************************************************/
4814 
4815 xcb_void_cookie_t
4816 xcb_grab_button_checked (xcb_connection_t *c  /**< */,
4817                          uint8_t           owner_events  /**< */,
4818                          xcb_window_t      grab_window  /**< */,
4819                          uint16_t          event_mask  /**< */,
4820                          uint8_t           pointer_mode  /**< */,
4821                          uint8_t           keyboard_mode  /**< */,
4822                          xcb_window_t      confine_to  /**< */,
4823                          xcb_cursor_t      cursor  /**< */,
4824                          uint8_t           button  /**< */,
4825                          uint16_t          modifiers  /**< */)
4826 {
4827     static const xcb_protocol_request_t xcb_req = {
4828         /* count */ 2,
4829         /* ext */ 0,
4830         /* opcode */ XCB_GRAB_BUTTON,
4831         /* isvoid */ 1
4832     };
4833 
4834     struct iovec xcb_parts[4];
4835     xcb_void_cookie_t xcb_ret;
4836     xcb_grab_button_request_t xcb_out;
4837 
4838     xcb_out.owner_events = owner_events;
4839     xcb_out.grab_window = grab_window;
4840     xcb_out.event_mask = event_mask;
4841     xcb_out.pointer_mode = pointer_mode;
4842     xcb_out.keyboard_mode = keyboard_mode;
4843     xcb_out.confine_to = confine_to;
4844     xcb_out.cursor = cursor;
4845     xcb_out.button = button;
4846     xcb_out.pad0 = 0;
4847     xcb_out.modifiers = modifiers;
4848 
4849     xcb_parts[2].iov_base = (char *) &xcb_out;
4850     xcb_parts[2].iov_len = sizeof(xcb_out);
4851     xcb_parts[3].iov_base = 0;
4852     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4853 
4854     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4855     return xcb_ret;
4856 }
4857 
4858 
4859 /*****************************************************************************
4860  **
4861  ** xcb_void_cookie_t xcb_grab_button
4862  **
4863  ** @param xcb_connection_t *c
4864  ** @param uint8_t           owner_events
4865  ** @param xcb_window_t      grab_window
4866  ** @param uint16_t          event_mask
4867  ** @param uint8_t           pointer_mode
4868  ** @param uint8_t           keyboard_mode
4869  ** @param xcb_window_t      confine_to
4870  ** @param xcb_cursor_t      cursor
4871  ** @param uint8_t           button
4872  ** @param uint16_t          modifiers
4873  ** @returns xcb_void_cookie_t
4874  **
4875  *****************************************************************************/
4876 
4877 xcb_void_cookie_t
4878 xcb_grab_button (xcb_connection_t *c  /**< */,
4879                  uint8_t           owner_events  /**< */,
4880                  xcb_window_t      grab_window  /**< */,
4881                  uint16_t          event_mask  /**< */,
4882                  uint8_t           pointer_mode  /**< */,
4883                  uint8_t           keyboard_mode  /**< */,
4884                  xcb_window_t      confine_to  /**< */,
4885                  xcb_cursor_t      cursor  /**< */,
4886                  uint8_t           button  /**< */,
4887                  uint16_t          modifiers  /**< */)
4888 {
4889     static const xcb_protocol_request_t xcb_req = {
4890         /* count */ 2,
4891         /* ext */ 0,
4892         /* opcode */ XCB_GRAB_BUTTON,
4893         /* isvoid */ 1
4894     };
4895 
4896     struct iovec xcb_parts[4];
4897     xcb_void_cookie_t xcb_ret;
4898     xcb_grab_button_request_t xcb_out;
4899 
4900     xcb_out.owner_events = owner_events;
4901     xcb_out.grab_window = grab_window;
4902     xcb_out.event_mask = event_mask;
4903     xcb_out.pointer_mode = pointer_mode;
4904     xcb_out.keyboard_mode = keyboard_mode;
4905     xcb_out.confine_to = confine_to;
4906     xcb_out.cursor = cursor;
4907     xcb_out.button = button;
4908     xcb_out.pad0 = 0;
4909     xcb_out.modifiers = modifiers;
4910 
4911     xcb_parts[2].iov_base = (char *) &xcb_out;
4912     xcb_parts[2].iov_len = sizeof(xcb_out);
4913     xcb_parts[3].iov_base = 0;
4914     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4915 
4916     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4917     return xcb_ret;
4918 }
4919 
4920 
4921 /*****************************************************************************
4922  **
4923  ** xcb_void_cookie_t xcb_ungrab_button_checked
4924  **
4925  ** @param xcb_connection_t *c
4926  ** @param uint8_t           button
4927  ** @param xcb_window_t      grab_window
4928  ** @param uint16_t          modifiers
4929  ** @returns xcb_void_cookie_t
4930  **
4931  *****************************************************************************/
4932 
4933 xcb_void_cookie_t
4934 xcb_ungrab_button_checked (xcb_connection_t *c  /**< */,
4935                            uint8_t           button  /**< */,
4936                            xcb_window_t      grab_window  /**< */,
4937                            uint16_t          modifiers  /**< */)
4938 {
4939     static const xcb_protocol_request_t xcb_req = {
4940         /* count */ 2,
4941         /* ext */ 0,
4942         /* opcode */ XCB_UNGRAB_BUTTON,
4943         /* isvoid */ 1
4944     };
4945 
4946     struct iovec xcb_parts[4];
4947     xcb_void_cookie_t xcb_ret;
4948     xcb_ungrab_button_request_t xcb_out;
4949 
4950     xcb_out.button = button;
4951     xcb_out.grab_window = grab_window;
4952     xcb_out.modifiers = modifiers;
4953     memset(xcb_out.pad0, 0, 2);
4954 
4955     xcb_parts[2].iov_base = (char *) &xcb_out;
4956     xcb_parts[2].iov_len = sizeof(xcb_out);
4957     xcb_parts[3].iov_base = 0;
4958     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4959 
4960     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4961     return xcb_ret;
4962 }
4963 
4964 
4965 /*****************************************************************************
4966  **
4967  ** xcb_void_cookie_t xcb_ungrab_button
4968  **
4969  ** @param xcb_connection_t *c
4970  ** @param uint8_t           button
4971  ** @param xcb_window_t      grab_window
4972  ** @param uint16_t          modifiers
4973  ** @returns xcb_void_cookie_t
4974  **
4975  *****************************************************************************/
4976 
4977 xcb_void_cookie_t
4978 xcb_ungrab_button (xcb_connection_t *c  /**< */,
4979                    uint8_t           button  /**< */,
4980                    xcb_window_t      grab_window  /**< */,
4981                    uint16_t          modifiers  /**< */)
4982 {
4983     static const xcb_protocol_request_t xcb_req = {
4984         /* count */ 2,
4985         /* ext */ 0,
4986         /* opcode */ XCB_UNGRAB_BUTTON,
4987         /* isvoid */ 1
4988     };
4989 
4990     struct iovec xcb_parts[4];
4991     xcb_void_cookie_t xcb_ret;
4992     xcb_ungrab_button_request_t xcb_out;
4993 
4994     xcb_out.button = button;
4995     xcb_out.grab_window = grab_window;
4996     xcb_out.modifiers = modifiers;
4997     memset(xcb_out.pad0, 0, 2);
4998 
4999     xcb_parts[2].iov_base = (char *) &xcb_out;
5000     xcb_parts[2].iov_len = sizeof(xcb_out);
5001     xcb_parts[3].iov_base = 0;
5002     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5003 
5004     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5005     return xcb_ret;
5006 }
5007 
5008 
5009 /*****************************************************************************
5010  **
5011  ** xcb_void_cookie_t xcb_change_active_pointer_grab_checked
5012  **
5013  ** @param xcb_connection_t *c
5014  ** @param xcb_cursor_t      cursor
5015  ** @param xcb_timestamp_t   time
5016  ** @param uint16_t          event_mask
5017  ** @returns xcb_void_cookie_t
5018  **
5019  *****************************************************************************/
5020 
5021 xcb_void_cookie_t
5022 xcb_change_active_pointer_grab_checked (xcb_connection_t *c  /**< */,
5023                                         xcb_cursor_t      cursor  /**< */,
5024                                         xcb_timestamp_t   time  /**< */,
5025                                         uint16_t          event_mask  /**< */)
5026 {
5027     static const xcb_protocol_request_t xcb_req = {
5028         /* count */ 2,
5029         /* ext */ 0,
5030         /* opcode */ XCB_CHANGE_ACTIVE_POINTER_GRAB,
5031         /* isvoid */ 1
5032     };
5033 
5034     struct iovec xcb_parts[4];
5035     xcb_void_cookie_t xcb_ret;
5036     xcb_change_active_pointer_grab_request_t xcb_out;
5037 
5038     xcb_out.pad0 = 0;
5039     xcb_out.cursor = cursor;
5040     xcb_out.time = time;
5041     xcb_out.event_mask = event_mask;
5042     memset(xcb_out.pad1, 0, 2);
5043 
5044     xcb_parts[2].iov_base = (char *) &xcb_out;
5045     xcb_parts[2].iov_len = sizeof(xcb_out);
5046     xcb_parts[3].iov_base = 0;
5047     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5048 
5049     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5050     return xcb_ret;
5051 }
5052 
5053 
5054 /*****************************************************************************
5055  **
5056  ** xcb_void_cookie_t xcb_change_active_pointer_grab
5057  **
5058  ** @param xcb_connection_t *c
5059  ** @param xcb_cursor_t      cursor
5060  ** @param xcb_timestamp_t   time
5061  ** @param uint16_t          event_mask
5062  ** @returns xcb_void_cookie_t
5063  **
5064  *****************************************************************************/
5065 
5066 xcb_void_cookie_t
5067 xcb_change_active_pointer_grab (xcb_connection_t *c  /**< */,
5068                                 xcb_cursor_t      cursor  /**< */,
5069                                 xcb_timestamp_t   time  /**< */,
5070                                 uint16_t          event_mask  /**< */)
5071 {
5072     static const xcb_protocol_request_t xcb_req = {
5073         /* count */ 2,
5074         /* ext */ 0,
5075         /* opcode */ XCB_CHANGE_ACTIVE_POINTER_GRAB,
5076         /* isvoid */ 1
5077     };
5078 
5079     struct iovec xcb_parts[4];
5080     xcb_void_cookie_t xcb_ret;
5081     xcb_change_active_pointer_grab_request_t xcb_out;
5082 
5083     xcb_out.pad0 = 0;
5084     xcb_out.cursor = cursor;
5085     xcb_out.time = time;
5086     xcb_out.event_mask = event_mask;
5087     memset(xcb_out.pad1, 0, 2);
5088 
5089     xcb_parts[2].iov_base = (char *) &xcb_out;
5090     xcb_parts[2].iov_len = sizeof(xcb_out);
5091     xcb_parts[3].iov_base = 0;
5092     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5093 
5094     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5095     return xcb_ret;
5096 }
5097 
5098 
5099 /*****************************************************************************
5100  **
5101  ** xcb_grab_keyboard_cookie_t xcb_grab_keyboard
5102  **
5103  ** @param xcb_connection_t *c
5104  ** @param uint8_t           owner_events
5105  ** @param xcb_window_t      grab_window
5106  ** @param xcb_timestamp_t   time
5107  ** @param uint8_t           pointer_mode
5108  ** @param uint8_t           keyboard_mode
5109  ** @returns xcb_grab_keyboard_cookie_t
5110  **
5111  *****************************************************************************/
5112 
5113 xcb_grab_keyboard_cookie_t
5114 xcb_grab_keyboard (xcb_connection_t *c  /**< */,
5115                    uint8_t           owner_events  /**< */,
5116                    xcb_window_t      grab_window  /**< */,
5117                    xcb_timestamp_t   time  /**< */,
5118                    uint8_t           pointer_mode  /**< */,
5119                    uint8_t           keyboard_mode  /**< */)
5120 {
5121     static const xcb_protocol_request_t xcb_req = {
5122         /* count */ 2,
5123         /* ext */ 0,
5124         /* opcode */ XCB_GRAB_KEYBOARD,
5125         /* isvoid */ 0
5126     };
5127 
5128     struct iovec xcb_parts[4];
5129     xcb_grab_keyboard_cookie_t xcb_ret;
5130     xcb_grab_keyboard_request_t xcb_out;
5131 
5132     xcb_out.owner_events = owner_events;
5133     xcb_out.grab_window = grab_window;
5134     xcb_out.time = time;
5135     xcb_out.pointer_mode = pointer_mode;
5136     xcb_out.keyboard_mode = keyboard_mode;
5137     memset(xcb_out.pad0, 0, 2);
5138 
5139     xcb_parts[2].iov_base = (char *) &xcb_out;
5140     xcb_parts[2].iov_len = sizeof(xcb_out);
5141     xcb_parts[3].iov_base = 0;
5142     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5143 
5144     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5145     return xcb_ret;
5146 }
5147 
5148 
5149 /*****************************************************************************
5150  **
5151  ** xcb_grab_keyboard_cookie_t xcb_grab_keyboard_unchecked
5152  **
5153  ** @param xcb_connection_t *c
5154  ** @param uint8_t           owner_events
5155  ** @param xcb_window_t      grab_window
5156  ** @param xcb_timestamp_t   time
5157  ** @param uint8_t           pointer_mode
5158  ** @param uint8_t           keyboard_mode
5159  ** @returns xcb_grab_keyboard_cookie_t
5160  **
5161  *****************************************************************************/
5162 
5163 xcb_grab_keyboard_cookie_t
5164 xcb_grab_keyboard_unchecked (xcb_connection_t *c  /**< */,
5165                              uint8_t           owner_events  /**< */,
5166                              xcb_window_t      grab_window  /**< */,
5167                              xcb_timestamp_t   time  /**< */,
5168                              uint8_t           pointer_mode  /**< */,
5169                              uint8_t           keyboard_mode  /**< */)
5170 {
5171     static const xcb_protocol_request_t xcb_req = {
5172         /* count */ 2,
5173         /* ext */ 0,
5174         /* opcode */ XCB_GRAB_KEYBOARD,
5175         /* isvoid */ 0
5176     };
5177 
5178     struct iovec xcb_parts[4];
5179     xcb_grab_keyboard_cookie_t xcb_ret;
5180     xcb_grab_keyboard_request_t xcb_out;
5181 
5182     xcb_out.owner_events = owner_events;
5183     xcb_out.grab_window = grab_window;
5184     xcb_out.time = time;
5185     xcb_out.pointer_mode = pointer_mode;
5186     xcb_out.keyboard_mode = keyboard_mode;
5187     memset(xcb_out.pad0, 0, 2);
5188 
5189     xcb_parts[2].iov_base = (char *) &xcb_out;
5190     xcb_parts[2].iov_len = sizeof(xcb_out);
5191     xcb_parts[3].iov_base = 0;
5192     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5193 
5194     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5195     return xcb_ret;
5196 }
5197 
5198 
5199 /*****************************************************************************
5200  **
5201  ** xcb_grab_keyboard_reply_t * xcb_grab_keyboard_reply
5202  **
5203  ** @param xcb_connection_t            *c
5204  ** @param xcb_grab_keyboard_cookie_t   cookie
5205  ** @param xcb_generic_error_t        **e
5206  ** @returns xcb_grab_keyboard_reply_t *
5207  **
5208  *****************************************************************************/
5209 
5210 xcb_grab_keyboard_reply_t *
5211 xcb_grab_keyboard_reply (xcb_connection_t            *c  /**< */,
5212                          xcb_grab_keyboard_cookie_t   cookie  /**< */,
5213                          xcb_generic_error_t        **e  /**< */)
5214 {
5215     return (xcb_grab_keyboard_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5216 }
5217 
5218 
5219 /*****************************************************************************
5220  **
5221  ** xcb_void_cookie_t xcb_ungrab_keyboard_checked
5222  **
5223  ** @param xcb_connection_t *c
5224  ** @param xcb_timestamp_t   time
5225  ** @returns xcb_void_cookie_t
5226  **
5227  *****************************************************************************/
5228 
5229 xcb_void_cookie_t
5230 xcb_ungrab_keyboard_checked (xcb_connection_t *c  /**< */,
5231                              xcb_timestamp_t   time  /**< */)
5232 {
5233     static const xcb_protocol_request_t xcb_req = {
5234         /* count */ 2,
5235         /* ext */ 0,
5236         /* opcode */ XCB_UNGRAB_KEYBOARD,
5237         /* isvoid */ 1
5238     };
5239 
5240     struct iovec xcb_parts[4];
5241     xcb_void_cookie_t xcb_ret;
5242     xcb_ungrab_keyboard_request_t xcb_out;
5243 
5244     xcb_out.pad0 = 0;
5245     xcb_out.time = time;
5246 
5247     xcb_parts[2].iov_base = (char *) &xcb_out;
5248     xcb_parts[2].iov_len = sizeof(xcb_out);
5249     xcb_parts[3].iov_base = 0;
5250     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5251 
5252     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5253     return xcb_ret;
5254 }
5255 
5256 
5257 /*****************************************************************************
5258  **
5259  ** xcb_void_cookie_t xcb_ungrab_keyboard
5260  **
5261  ** @param xcb_connection_t *c
5262  ** @param xcb_timestamp_t   time
5263  ** @returns xcb_void_cookie_t
5264  **
5265  *****************************************************************************/
5266 
5267 xcb_void_cookie_t
5268 xcb_ungrab_keyboard (xcb_connection_t *c  /**< */,
5269                      xcb_timestamp_t   time  /**< */)
5270 {
5271     static const xcb_protocol_request_t xcb_req = {
5272         /* count */ 2,
5273         /* ext */ 0,
5274         /* opcode */ XCB_UNGRAB_KEYBOARD,
5275         /* isvoid */ 1
5276     };
5277 
5278     struct iovec xcb_parts[4];
5279     xcb_void_cookie_t xcb_ret;
5280     xcb_ungrab_keyboard_request_t xcb_out;
5281 
5282     xcb_out.pad0 = 0;
5283     xcb_out.time = time;
5284 
5285     xcb_parts[2].iov_base = (char *) &xcb_out;
5286     xcb_parts[2].iov_len = sizeof(xcb_out);
5287     xcb_parts[3].iov_base = 0;
5288     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5289 
5290     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5291     return xcb_ret;
5292 }
5293 
5294 
5295 /*****************************************************************************
5296  **
5297  ** xcb_void_cookie_t xcb_grab_key_checked
5298  **
5299  ** @param xcb_connection_t *c
5300  ** @param uint8_t           owner_events
5301  ** @param xcb_window_t      grab_window
5302  ** @param uint16_t          modifiers
5303  ** @param xcb_keycode_t     key
5304  ** @param uint8_t           pointer_mode
5305  ** @param uint8_t           keyboard_mode
5306  ** @returns xcb_void_cookie_t
5307  **
5308  *****************************************************************************/
5309 
5310 xcb_void_cookie_t
5311 xcb_grab_key_checked (xcb_connection_t *c  /**< */,
5312                       uint8_t           owner_events  /**< */,
5313                       xcb_window_t      grab_window  /**< */,
5314                       uint16_t          modifiers  /**< */,
5315                       xcb_keycode_t     key  /**< */,
5316                       uint8_t           pointer_mode  /**< */,
5317                       uint8_t           keyboard_mode  /**< */)
5318 {
5319     static const xcb_protocol_request_t xcb_req = {
5320         /* count */ 2,
5321         /* ext */ 0,
5322         /* opcode */ XCB_GRAB_KEY,
5323         /* isvoid */ 1
5324     };
5325 
5326     struct iovec xcb_parts[4];
5327     xcb_void_cookie_t xcb_ret;
5328     xcb_grab_key_request_t xcb_out;
5329 
5330     xcb_out.owner_events = owner_events;
5331     xcb_out.grab_window = grab_window;
5332     xcb_out.modifiers = modifiers;
5333     xcb_out.key = key;
5334     xcb_out.pointer_mode = pointer_mode;
5335     xcb_out.keyboard_mode = keyboard_mode;
5336     memset(xcb_out.pad0, 0, 3);
5337 
5338     xcb_parts[2].iov_base = (char *) &xcb_out;
5339     xcb_parts[2].iov_len = sizeof(xcb_out);
5340     xcb_parts[3].iov_base = 0;
5341     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5342 
5343     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5344     return xcb_ret;
5345 }
5346 
5347 
5348 /*****************************************************************************
5349  **
5350  ** xcb_void_cookie_t xcb_grab_key
5351  **
5352  ** @param xcb_connection_t *c
5353  ** @param uint8_t           owner_events
5354  ** @param xcb_window_t      grab_window
5355  ** @param uint16_t          modifiers
5356  ** @param xcb_keycode_t     key
5357  ** @param uint8_t           pointer_mode
5358  ** @param uint8_t           keyboard_mode
5359  ** @returns xcb_void_cookie_t
5360  **
5361  *****************************************************************************/
5362 
5363 xcb_void_cookie_t
5364 xcb_grab_key (xcb_connection_t *c  /**< */,
5365               uint8_t           owner_events  /**< */,
5366               xcb_window_t      grab_window  /**< */,
5367               uint16_t          modifiers  /**< */,
5368               xcb_keycode_t     key  /**< */,
5369               uint8_t           pointer_mode  /**< */,
5370               uint8_t           keyboard_mode  /**< */)
5371 {
5372     static const xcb_protocol_request_t xcb_req = {
5373         /* count */ 2,
5374         /* ext */ 0,
5375         /* opcode */ XCB_GRAB_KEY,
5376         /* isvoid */ 1
5377     };
5378 
5379     struct iovec xcb_parts[4];
5380     xcb_void_cookie_t xcb_ret;
5381     xcb_grab_key_request_t xcb_out;
5382 
5383     xcb_out.owner_events = owner_events;
5384     xcb_out.grab_window = grab_window;
5385     xcb_out.modifiers = modifiers;
5386     xcb_out.key = key;
5387     xcb_out.pointer_mode = pointer_mode;
5388     xcb_out.keyboard_mode = keyboard_mode;
5389     memset(xcb_out.pad0, 0, 3);
5390 
5391     xcb_parts[2].iov_base = (char *) &xcb_out;
5392     xcb_parts[2].iov_len = sizeof(xcb_out);
5393     xcb_parts[3].iov_base = 0;
5394     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5395 
5396     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5397     return xcb_ret;
5398 }
5399 
5400 
5401 /*****************************************************************************
5402  **
5403  ** xcb_void_cookie_t xcb_ungrab_key_checked
5404  **
5405  ** @param xcb_connection_t *c
5406  ** @param xcb_keycode_t     key
5407  ** @param xcb_window_t      grab_window
5408  ** @param uint16_t          modifiers
5409  ** @returns xcb_void_cookie_t
5410  **
5411  *****************************************************************************/
5412 
5413 xcb_void_cookie_t
5414 xcb_ungrab_key_checked (xcb_connection_t *c  /**< */,
5415                         xcb_keycode_t     key  /**< */,
5416                         xcb_window_t      grab_window  /**< */,
5417                         uint16_t          modifiers  /**< */)
5418 {
5419     static const xcb_protocol_request_t xcb_req = {
5420         /* count */ 2,
5421         /* ext */ 0,
5422         /* opcode */ XCB_UNGRAB_KEY,
5423         /* isvoid */ 1
5424     };
5425 
5426     struct iovec xcb_parts[4];
5427     xcb_void_cookie_t xcb_ret;
5428     xcb_ungrab_key_request_t xcb_out;
5429 
5430     xcb_out.key = key;
5431     xcb_out.grab_window = grab_window;
5432     xcb_out.modifiers = modifiers;
5433     memset(xcb_out.pad0, 0, 2);
5434 
5435     xcb_parts[2].iov_base = (char *) &xcb_out;
5436     xcb_parts[2].iov_len = sizeof(xcb_out);
5437     xcb_parts[3].iov_base = 0;
5438     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5439 
5440     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5441     return xcb_ret;
5442 }
5443 
5444 
5445 /*****************************************************************************
5446  **
5447  ** xcb_void_cookie_t xcb_ungrab_key
5448  **
5449  ** @param xcb_connection_t *c
5450  ** @param xcb_keycode_t     key
5451  ** @param xcb_window_t      grab_window
5452  ** @param uint16_t          modifiers
5453  ** @returns xcb_void_cookie_t
5454  **
5455  *****************************************************************************/
5456 
5457 xcb_void_cookie_t
5458 xcb_ungrab_key (xcb_connection_t *c  /**< */,
5459                 xcb_keycode_t     key  /**< */,
5460                 xcb_window_t      grab_window  /**< */,
5461                 uint16_t          modifiers  /**< */)
5462 {
5463     static const xcb_protocol_request_t xcb_req = {
5464         /* count */ 2,
5465         /* ext */ 0,
5466         /* opcode */ XCB_UNGRAB_KEY,
5467         /* isvoid */ 1
5468     };
5469 
5470     struct iovec xcb_parts[4];
5471     xcb_void_cookie_t xcb_ret;
5472     xcb_ungrab_key_request_t xcb_out;
5473 
5474     xcb_out.key = key;
5475     xcb_out.grab_window = grab_window;
5476     xcb_out.modifiers = modifiers;
5477     memset(xcb_out.pad0, 0, 2);
5478 
5479     xcb_parts[2].iov_base = (char *) &xcb_out;
5480     xcb_parts[2].iov_len = sizeof(xcb_out);
5481     xcb_parts[3].iov_base = 0;
5482     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5483 
5484     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5485     return xcb_ret;
5486 }
5487 
5488 
5489 /*****************************************************************************
5490  **
5491  ** xcb_void_cookie_t xcb_allow_events_checked
5492  **
5493  ** @param xcb_connection_t *c
5494  ** @param uint8_t           mode
5495  ** @param xcb_timestamp_t   time
5496  ** @returns xcb_void_cookie_t
5497  **
5498  *****************************************************************************/
5499 
5500 xcb_void_cookie_t
5501 xcb_allow_events_checked (xcb_connection_t *c  /**< */,
5502                           uint8_t           mode  /**< */,
5503                           xcb_timestamp_t   time  /**< */)
5504 {
5505     static const xcb_protocol_request_t xcb_req = {
5506         /* count */ 2,
5507         /* ext */ 0,
5508         /* opcode */ XCB_ALLOW_EVENTS,
5509         /* isvoid */ 1
5510     };
5511 
5512     struct iovec xcb_parts[4];
5513     xcb_void_cookie_t xcb_ret;
5514     xcb_allow_events_request_t xcb_out;
5515 
5516     xcb_out.mode = mode;
5517     xcb_out.time = time;
5518 
5519     xcb_parts[2].iov_base = (char *) &xcb_out;
5520     xcb_parts[2].iov_len = sizeof(xcb_out);
5521     xcb_parts[3].iov_base = 0;
5522     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5523 
5524     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5525     return xcb_ret;
5526 }
5527 
5528 
5529 /*****************************************************************************
5530  **
5531  ** xcb_void_cookie_t xcb_allow_events
5532  **
5533  ** @param xcb_connection_t *c
5534  ** @param uint8_t           mode
5535  ** @param xcb_timestamp_t   time
5536  ** @returns xcb_void_cookie_t
5537  **
5538  *****************************************************************************/
5539 
5540 xcb_void_cookie_t
5541 xcb_allow_events (xcb_connection_t *c  /**< */,
5542                   uint8_t           mode  /**< */,
5543                   xcb_timestamp_t   time  /**< */)
5544 {
5545     static const xcb_protocol_request_t xcb_req = {
5546         /* count */ 2,
5547         /* ext */ 0,
5548         /* opcode */ XCB_ALLOW_EVENTS,
5549         /* isvoid */ 1
5550     };
5551 
5552     struct iovec xcb_parts[4];
5553     xcb_void_cookie_t xcb_ret;
5554     xcb_allow_events_request_t xcb_out;
5555 
5556     xcb_out.mode = mode;
5557     xcb_out.time = time;
5558 
5559     xcb_parts[2].iov_base = (char *) &xcb_out;
5560     xcb_parts[2].iov_len = sizeof(xcb_out);
5561     xcb_parts[3].iov_base = 0;
5562     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5563 
5564     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5565     return xcb_ret;
5566 }
5567 
5568 
5569 /*****************************************************************************
5570  **
5571  ** xcb_void_cookie_t xcb_grab_server_checked
5572  **
5573  ** @param xcb_connection_t *c
5574  ** @returns xcb_void_cookie_t
5575  **
5576  *****************************************************************************/
5577 
5578 xcb_void_cookie_t
5579 xcb_grab_server_checked (xcb_connection_t *c  /**< */)
5580 {
5581     static const xcb_protocol_request_t xcb_req = {
5582         /* count */ 2,
5583         /* ext */ 0,
5584         /* opcode */ XCB_GRAB_SERVER,
5585         /* isvoid */ 1
5586     };
5587 
5588     struct iovec xcb_parts[4];
5589     xcb_void_cookie_t xcb_ret;
5590     xcb_grab_server_request_t xcb_out;
5591 
5592     xcb_out.pad0 = 0;
5593 
5594     xcb_parts[2].iov_base = (char *) &xcb_out;
5595     xcb_parts[2].iov_len = sizeof(xcb_out);
5596     xcb_parts[3].iov_base = 0;
5597     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5598 
5599     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5600     return xcb_ret;
5601 }
5602 
5603 
5604 /*****************************************************************************
5605  **
5606  ** xcb_void_cookie_t xcb_grab_server
5607  **
5608  ** @param xcb_connection_t *c
5609  ** @returns xcb_void_cookie_t
5610  **
5611  *****************************************************************************/
5612 
5613 xcb_void_cookie_t
5614 xcb_grab_server (xcb_connection_t *c  /**< */)
5615 {
5616     static const xcb_protocol_request_t xcb_req = {
5617         /* count */ 2,
5618         /* ext */ 0,
5619         /* opcode */ XCB_GRAB_SERVER,
5620         /* isvoid */ 1
5621     };
5622 
5623     struct iovec xcb_parts[4];
5624     xcb_void_cookie_t xcb_ret;
5625     xcb_grab_server_request_t xcb_out;
5626 
5627     xcb_out.pad0 = 0;
5628 
5629     xcb_parts[2].iov_base = (char *) &xcb_out;
5630     xcb_parts[2].iov_len = sizeof(xcb_out);
5631     xcb_parts[3].iov_base = 0;
5632     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5633 
5634     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5635     return xcb_ret;
5636 }
5637 
5638 
5639 /*****************************************************************************
5640  **
5641  ** xcb_void_cookie_t xcb_ungrab_server_checked
5642  **
5643  ** @param xcb_connection_t *c
5644  ** @returns xcb_void_cookie_t
5645  **
5646  *****************************************************************************/
5647 
5648 xcb_void_cookie_t
5649 xcb_ungrab_server_checked (xcb_connection_t *c  /**< */)
5650 {
5651     static const xcb_protocol_request_t xcb_req = {
5652         /* count */ 2,
5653         /* ext */ 0,
5654         /* opcode */ XCB_UNGRAB_SERVER,
5655         /* isvoid */ 1
5656     };
5657 
5658     struct iovec xcb_parts[4];
5659     xcb_void_cookie_t xcb_ret;
5660     xcb_ungrab_server_request_t xcb_out;
5661 
5662     xcb_out.pad0 = 0;
5663 
5664     xcb_parts[2].iov_base = (char *) &xcb_out;
5665     xcb_parts[2].iov_len = sizeof(xcb_out);
5666     xcb_parts[3].iov_base = 0;
5667     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5668 
5669     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5670     return xcb_ret;
5671 }
5672 
5673 
5674 /*****************************************************************************
5675  **
5676  ** xcb_void_cookie_t xcb_ungrab_server
5677  **
5678  ** @param xcb_connection_t *c
5679  ** @returns xcb_void_cookie_t
5680  **
5681  *****************************************************************************/
5682 
5683 xcb_void_cookie_t
5684 xcb_ungrab_server (xcb_connection_t *c  /**< */)
5685 {
5686     static const xcb_protocol_request_t xcb_req = {
5687         /* count */ 2,
5688         /* ext */ 0,
5689         /* opcode */ XCB_UNGRAB_SERVER,
5690         /* isvoid */ 1
5691     };
5692 
5693     struct iovec xcb_parts[4];
5694     xcb_void_cookie_t xcb_ret;
5695     xcb_ungrab_server_request_t xcb_out;
5696 
5697     xcb_out.pad0 = 0;
5698 
5699     xcb_parts[2].iov_base = (char *) &xcb_out;
5700     xcb_parts[2].iov_len = sizeof(xcb_out);
5701     xcb_parts[3].iov_base = 0;
5702     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5703 
5704     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5705     return xcb_ret;
5706 }
5707 
5708 
5709 /*****************************************************************************
5710  **
5711  ** xcb_query_pointer_cookie_t xcb_query_pointer
5712  **
5713  ** @param xcb_connection_t *c
5714  ** @param xcb_window_t      window
5715  ** @returns xcb_query_pointer_cookie_t
5716  **
5717  *****************************************************************************/
5718 
5719 xcb_query_pointer_cookie_t
5720 xcb_query_pointer (xcb_connection_t *c  /**< */,
5721                    xcb_window_t      window  /**< */)
5722 {
5723     static const xcb_protocol_request_t xcb_req = {
5724         /* count */ 2,
5725         /* ext */ 0,
5726         /* opcode */ XCB_QUERY_POINTER,
5727         /* isvoid */ 0
5728     };
5729 
5730     struct iovec xcb_parts[4];
5731     xcb_query_pointer_cookie_t xcb_ret;
5732     xcb_query_pointer_request_t xcb_out;
5733 
5734     xcb_out.pad0 = 0;
5735     xcb_out.window = window;
5736 
5737     xcb_parts[2].iov_base = (char *) &xcb_out;
5738     xcb_parts[2].iov_len = sizeof(xcb_out);
5739     xcb_parts[3].iov_base = 0;
5740     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5741 
5742     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5743     return xcb_ret;
5744 }
5745 
5746 
5747 /*****************************************************************************
5748  **
5749  ** xcb_query_pointer_cookie_t xcb_query_pointer_unchecked
5750  **
5751  ** @param xcb_connection_t *c
5752  ** @param xcb_window_t      window
5753  ** @returns xcb_query_pointer_cookie_t
5754  **
5755  *****************************************************************************/
5756 
5757 xcb_query_pointer_cookie_t
5758 xcb_query_pointer_unchecked (xcb_connection_t *c  /**< */,
5759                              xcb_window_t      window  /**< */)
5760 {
5761     static const xcb_protocol_request_t xcb_req = {
5762         /* count */ 2,
5763         /* ext */ 0,
5764         /* opcode */ XCB_QUERY_POINTER,
5765         /* isvoid */ 0
5766     };
5767 
5768     struct iovec xcb_parts[4];
5769     xcb_query_pointer_cookie_t xcb_ret;
5770     xcb_query_pointer_request_t xcb_out;
5771 
5772     xcb_out.pad0 = 0;
5773     xcb_out.window = window;
5774 
5775     xcb_parts[2].iov_base = (char *) &xcb_out;
5776     xcb_parts[2].iov_len = sizeof(xcb_out);
5777     xcb_parts[3].iov_base = 0;
5778     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5779 
5780     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5781     return xcb_ret;
5782 }
5783 
5784 
5785 /*****************************************************************************
5786  **
5787  ** xcb_query_pointer_reply_t * xcb_query_pointer_reply
5788  **
5789  ** @param xcb_connection_t            *c
5790  ** @param xcb_query_pointer_cookie_t   cookie
5791  ** @param xcb_generic_error_t        **e
5792  ** @returns xcb_query_pointer_reply_t *
5793  **
5794  *****************************************************************************/
5795 
5796 xcb_query_pointer_reply_t *
5797 xcb_query_pointer_reply (xcb_connection_t            *c  /**< */,
5798                          xcb_query_pointer_cookie_t   cookie  /**< */,
5799                          xcb_generic_error_t        **e  /**< */)
5800 {
5801     return (xcb_query_pointer_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5802 }
5803 
5804 
5805 /*****************************************************************************
5806  **
5807  ** void xcb_timecoord_next
5808  **
5809  ** @param xcb_timecoord_iterator_t *i
5810  ** @returns void
5811  **
5812  *****************************************************************************/
5813 
5814 void
5815 xcb_timecoord_next (xcb_timecoord_iterator_t *i  /**< */)
5816 {
5817     --i->rem;
5818     ++i->data;
5819     i->index += sizeof(xcb_timecoord_t);
5820 }
5821 
5822 
5823 /*****************************************************************************
5824  **
5825  ** xcb_generic_iterator_t xcb_timecoord_end
5826  **
5827  ** @param xcb_timecoord_iterator_t i
5828  ** @returns xcb_generic_iterator_t
5829  **
5830  *****************************************************************************/
5831 
5832 xcb_generic_iterator_t
5833 xcb_timecoord_end (xcb_timecoord_iterator_t i  /**< */)
5834 {
5835     xcb_generic_iterator_t ret;
5836     ret.data = i.data + i.rem;
5837     ret.index = i.index + ((char *) ret.data - (char *) i.data);
5838     ret.rem = 0;
5839     return ret;
5840 }
5841 
5842 int
5843 xcb_get_motion_events_sizeof (const void  *_buffer  /**< */)
5844 {
5845     char *xcb_tmp = (char *)_buffer;
5846     const xcb_get_motion_events_reply_t *_aux = (xcb_get_motion_events_reply_t *)_buffer;
5847     unsigned int xcb_buffer_len = 0;
5848     unsigned int xcb_block_len = 0;
5849     unsigned int xcb_pad = 0;
5850     unsigned int xcb_align_to = 0;
5851 
5852 
5853     xcb_block_len += sizeof(xcb_get_motion_events_reply_t);
5854     xcb_tmp += xcb_block_len;
5855     xcb_buffer_len += xcb_block_len;
5856     xcb_block_len = 0;
5857     /* events */
5858     xcb_block_len += _aux->events_len * sizeof(xcb_timecoord_t);
5859     xcb_tmp += xcb_block_len;
5860     xcb_align_to = ALIGNOF(xcb_timecoord_t);
5861     /* insert padding */
5862     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5863     xcb_buffer_len += xcb_block_len + xcb_pad;
5864     if (0 != xcb_pad) {
5865         xcb_tmp += xcb_pad;
5866         xcb_pad = 0;
5867     }
5868     xcb_block_len = 0;
5869 
5870     return xcb_buffer_len;
5871 }
5872 
5873 
5874 /*****************************************************************************
5875  **
5876  ** xcb_get_motion_events_cookie_t xcb_get_motion_events
5877  **
5878  ** @param xcb_connection_t *c
5879  ** @param xcb_window_t      window
5880  ** @param xcb_timestamp_t   start
5881  ** @param xcb_timestamp_t   stop
5882  ** @returns xcb_get_motion_events_cookie_t
5883  **
5884  *****************************************************************************/
5885 
5886 xcb_get_motion_events_cookie_t
5887 xcb_get_motion_events (xcb_connection_t *c  /**< */,
5888                        xcb_window_t      window  /**< */,
5889                        xcb_timestamp_t   start  /**< */,
5890                        xcb_timestamp_t   stop  /**< */)
5891 {
5892     static const xcb_protocol_request_t xcb_req = {
5893         /* count */ 2,
5894         /* ext */ 0,
5895         /* opcode */ XCB_GET_MOTION_EVENTS,
5896         /* isvoid */ 0
5897     };
5898 
5899     struct iovec xcb_parts[4];
5900     xcb_get_motion_events_cookie_t xcb_ret;
5901     xcb_get_motion_events_request_t xcb_out;
5902 
5903     xcb_out.pad0 = 0;
5904     xcb_out.window = window;
5905     xcb_out.start = start;
5906     xcb_out.stop = stop;
5907 
5908     xcb_parts[2].iov_base = (char *) &xcb_out;
5909     xcb_parts[2].iov_len = sizeof(xcb_out);
5910     xcb_parts[3].iov_base = 0;
5911     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5912 
5913     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5914     return xcb_ret;
5915 }
5916 
5917 
5918 /*****************************************************************************
5919  **
5920  ** xcb_get_motion_events_cookie_t xcb_get_motion_events_unchecked
5921  **
5922  ** @param xcb_connection_t *c
5923  ** @param xcb_window_t      window
5924  ** @param xcb_timestamp_t   start
5925  ** @param xcb_timestamp_t   stop
5926  ** @returns xcb_get_motion_events_cookie_t
5927  **
5928  *****************************************************************************/
5929 
5930 xcb_get_motion_events_cookie_t
5931 xcb_get_motion_events_unchecked (xcb_connection_t *c  /**< */,
5932                                  xcb_window_t      window  /**< */,
5933                                  xcb_timestamp_t   start  /**< */,
5934                                  xcb_timestamp_t   stop  /**< */)
5935 {
5936     static const xcb_protocol_request_t xcb_req = {
5937         /* count */ 2,
5938         /* ext */ 0,
5939         /* opcode */ XCB_GET_MOTION_EVENTS,
5940         /* isvoid */ 0
5941     };
5942 
5943     struct iovec xcb_parts[4];
5944     xcb_get_motion_events_cookie_t xcb_ret;
5945     xcb_get_motion_events_request_t xcb_out;
5946 
5947     xcb_out.pad0 = 0;
5948     xcb_out.window = window;
5949     xcb_out.start = start;
5950     xcb_out.stop = stop;
5951 
5952     xcb_parts[2].iov_base = (char *) &xcb_out;
5953     xcb_parts[2].iov_len = sizeof(xcb_out);
5954     xcb_parts[3].iov_base = 0;
5955     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5956 
5957     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5958     return xcb_ret;
5959 }
5960 
5961 
5962 /*****************************************************************************
5963  **
5964  ** xcb_timecoord_t * xcb_get_motion_events_events
5965  **
5966  ** @param const xcb_get_motion_events_reply_t *R
5967  ** @returns xcb_timecoord_t *
5968  **
5969  *****************************************************************************/
5970 
5971 xcb_timecoord_t *
5972 xcb_get_motion_events_events (const xcb_get_motion_events_reply_t *R  /**< */)
5973 {
5974     return (xcb_timecoord_t *) (R + 1);
5975 }
5976 
5977 
5978 /*****************************************************************************
5979  **
5980  ** int xcb_get_motion_events_events_length
5981  **
5982  ** @param const xcb_get_motion_events_reply_t *R
5983  ** @returns int
5984  **
5985  *****************************************************************************/
5986 
5987 int
5988 xcb_get_motion_events_events_length (const xcb_get_motion_events_reply_t *R  /**< */)
5989 {
5990     return R->events_len;
5991 }
5992 
5993 
5994 /*****************************************************************************
5995  **
5996  ** xcb_timecoord_iterator_t xcb_get_motion_events_events_iterator
5997  **
5998  ** @param const xcb_get_motion_events_reply_t *R
5999  ** @returns xcb_timecoord_iterator_t
6000  **
6001  *****************************************************************************/
6002 
6003 xcb_timecoord_iterator_t
6004 xcb_get_motion_events_events_iterator (const xcb_get_motion_events_reply_t *R  /**< */)
6005 {
6006     xcb_timecoord_iterator_t i;
6007     i.data = (xcb_timecoord_t *) (R + 1);
6008     i.rem = R->events_len;
6009     i.index = (char *) i.data - (char *) R;
6010     return i;
6011 }
6012 
6013 
6014 /*****************************************************************************
6015  **
6016  ** xcb_get_motion_events_reply_t * xcb_get_motion_events_reply
6017  **
6018  ** @param xcb_connection_t                *c
6019  ** @param xcb_get_motion_events_cookie_t   cookie
6020  ** @param xcb_generic_error_t            **e
6021  ** @returns xcb_get_motion_events_reply_t *
6022  **
6023  *****************************************************************************/
6024 
6025 xcb_get_motion_events_reply_t *
6026 xcb_get_motion_events_reply (xcb_connection_t                *c  /**< */,
6027                              xcb_get_motion_events_cookie_t   cookie  /**< */,
6028                              xcb_generic_error_t            **e  /**< */)
6029 {
6030     return (xcb_get_motion_events_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6031 }
6032 
6033 
6034 /*****************************************************************************
6035  **
6036  ** xcb_translate_coordinates_cookie_t xcb_translate_coordinates
6037  **
6038  ** @param xcb_connection_t *c
6039  ** @param xcb_window_t      src_window
6040  ** @param xcb_window_t      dst_window
6041  ** @param int16_t           src_x
6042  ** @param int16_t           src_y
6043  ** @returns xcb_translate_coordinates_cookie_t
6044  **
6045  *****************************************************************************/
6046 
6047 xcb_translate_coordinates_cookie_t
6048 xcb_translate_coordinates (xcb_connection_t *c  /**< */,
6049                            xcb_window_t      src_window  /**< */,
6050                            xcb_window_t      dst_window  /**< */,
6051                            int16_t           src_x  /**< */,
6052                            int16_t           src_y  /**< */)
6053 {
6054     static const xcb_protocol_request_t xcb_req = {
6055         /* count */ 2,
6056         /* ext */ 0,
6057         /* opcode */ XCB_TRANSLATE_COORDINATES,
6058         /* isvoid */ 0
6059     };
6060 
6061     struct iovec xcb_parts[4];
6062     xcb_translate_coordinates_cookie_t xcb_ret;
6063     xcb_translate_coordinates_request_t xcb_out;
6064 
6065     xcb_out.pad0 = 0;
6066     xcb_out.src_window = src_window;
6067     xcb_out.dst_window = dst_window;
6068     xcb_out.src_x = src_x;
6069     xcb_out.src_y = src_y;
6070 
6071     xcb_parts[2].iov_base = (char *) &xcb_out;
6072     xcb_parts[2].iov_len = sizeof(xcb_out);
6073     xcb_parts[3].iov_base = 0;
6074     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6075 
6076     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6077     return xcb_ret;
6078 }
6079 
6080 
6081 /*****************************************************************************
6082  **
6083  ** xcb_translate_coordinates_cookie_t xcb_translate_coordinates_unchecked
6084  **
6085  ** @param xcb_connection_t *c
6086  ** @param xcb_window_t      src_window
6087  ** @param xcb_window_t      dst_window
6088  ** @param int16_t           src_x
6089  ** @param int16_t           src_y
6090  ** @returns xcb_translate_coordinates_cookie_t
6091  **
6092  *****************************************************************************/
6093 
6094 xcb_translate_coordinates_cookie_t
6095 xcb_translate_coordinates_unchecked (xcb_connection_t *c  /**< */,
6096                                      xcb_window_t      src_window  /**< */,
6097                                      xcb_window_t      dst_window  /**< */,
6098                                      int16_t           src_x  /**< */,
6099                                      int16_t           src_y  /**< */)
6100 {
6101     static const xcb_protocol_request_t xcb_req = {
6102         /* count */ 2,
6103         /* ext */ 0,
6104         /* opcode */ XCB_TRANSLATE_COORDINATES,
6105         /* isvoid */ 0
6106     };
6107 
6108     struct iovec xcb_parts[4];
6109     xcb_translate_coordinates_cookie_t xcb_ret;
6110     xcb_translate_coordinates_request_t xcb_out;
6111 
6112     xcb_out.pad0 = 0;
6113     xcb_out.src_window = src_window;
6114     xcb_out.dst_window = dst_window;
6115     xcb_out.src_x = src_x;
6116     xcb_out.src_y = src_y;
6117 
6118     xcb_parts[2].iov_base = (char *) &xcb_out;
6119     xcb_parts[2].iov_len = sizeof(xcb_out);
6120     xcb_parts[3].iov_base = 0;
6121     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6122 
6123     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6124     return xcb_ret;
6125 }
6126 
6127 
6128 /*****************************************************************************
6129  **
6130  ** xcb_translate_coordinates_reply_t * xcb_translate_coordinates_reply
6131  **
6132  ** @param xcb_connection_t                    *c
6133  ** @param xcb_translate_coordinates_cookie_t   cookie
6134  ** @param xcb_generic_error_t                **e
6135  ** @returns xcb_translate_coordinates_reply_t *
6136  **
6137  *****************************************************************************/
6138 
6139 xcb_translate_coordinates_reply_t *
6140 xcb_translate_coordinates_reply (xcb_connection_t                    *c  /**< */,
6141                                  xcb_translate_coordinates_cookie_t   cookie  /**< */,
6142                                  xcb_generic_error_t                **e  /**< */)
6143 {
6144     return (xcb_translate_coordinates_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6145 }
6146 
6147 
6148 /*****************************************************************************
6149  **
6150  ** xcb_void_cookie_t xcb_warp_pointer_checked
6151  **
6152  ** @param xcb_connection_t *c
6153  ** @param xcb_window_t      src_window
6154  ** @param xcb_window_t      dst_window
6155  ** @param int16_t           src_x
6156  ** @param int16_t           src_y
6157  ** @param uint16_t          src_width
6158  ** @param uint16_t          src_height
6159  ** @param int16_t           dst_x
6160  ** @param int16_t           dst_y
6161  ** @returns xcb_void_cookie_t
6162  **
6163  *****************************************************************************/
6164 
6165 xcb_void_cookie_t
6166 xcb_warp_pointer_checked (xcb_connection_t *c  /**< */,
6167                           xcb_window_t      src_window  /**< */,
6168                           xcb_window_t      dst_window  /**< */,
6169                           int16_t           src_x  /**< */,
6170                           int16_t           src_y  /**< */,
6171                           uint16_t          src_width  /**< */,
6172                           uint16_t          src_height  /**< */,
6173                           int16_t           dst_x  /**< */,
6174                           int16_t           dst_y  /**< */)
6175 {
6176     static const xcb_protocol_request_t xcb_req = {
6177         /* count */ 2,
6178         /* ext */ 0,
6179         /* opcode */ XCB_WARP_POINTER,
6180         /* isvoid */ 1
6181     };
6182 
6183     struct iovec xcb_parts[4];
6184     xcb_void_cookie_t xcb_ret;
6185     xcb_warp_pointer_request_t xcb_out;
6186 
6187     xcb_out.pad0 = 0;
6188     xcb_out.src_window = src_window;
6189     xcb_out.dst_window = dst_window;
6190     xcb_out.src_x = src_x;
6191     xcb_out.src_y = src_y;
6192     xcb_out.src_width = src_width;
6193     xcb_out.src_height = src_height;
6194     xcb_out.dst_x = dst_x;
6195     xcb_out.dst_y = dst_y;
6196 
6197     xcb_parts[2].iov_base = (char *) &xcb_out;
6198     xcb_parts[2].iov_len = sizeof(xcb_out);
6199     xcb_parts[3].iov_base = 0;
6200     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6201 
6202     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6203     return xcb_ret;
6204 }
6205 
6206 
6207 /*****************************************************************************
6208  **
6209  ** xcb_void_cookie_t xcb_warp_pointer
6210  **
6211  ** @param xcb_connection_t *c
6212  ** @param xcb_window_t      src_window
6213  ** @param xcb_window_t      dst_window
6214  ** @param int16_t           src_x
6215  ** @param int16_t           src_y
6216  ** @param uint16_t          src_width
6217  ** @param uint16_t          src_height
6218  ** @param int16_t           dst_x
6219  ** @param int16_t           dst_y
6220  ** @returns xcb_void_cookie_t
6221  **
6222  *****************************************************************************/
6223 
6224 xcb_void_cookie_t
6225 xcb_warp_pointer (xcb_connection_t *c  /**< */,
6226                   xcb_window_t      src_window  /**< */,
6227                   xcb_window_t      dst_window  /**< */,
6228                   int16_t           src_x  /**< */,
6229                   int16_t           src_y  /**< */,
6230                   uint16_t          src_width  /**< */,
6231                   uint16_t          src_height  /**< */,
6232                   int16_t           dst_x  /**< */,
6233                   int16_t           dst_y  /**< */)
6234 {
6235     static const xcb_protocol_request_t xcb_req = {
6236         /* count */ 2,
6237         /* ext */ 0,
6238         /* opcode */ XCB_WARP_POINTER,
6239         /* isvoid */ 1
6240     };
6241 
6242     struct iovec xcb_parts[4];
6243     xcb_void_cookie_t xcb_ret;
6244     xcb_warp_pointer_request_t xcb_out;
6245 
6246     xcb_out.pad0 = 0;
6247     xcb_out.src_window = src_window;
6248     xcb_out.dst_window = dst_window;
6249     xcb_out.src_x = src_x;
6250     xcb_out.src_y = src_y;
6251     xcb_out.src_width = src_width;
6252     xcb_out.src_height = src_height;
6253     xcb_out.dst_x = dst_x;
6254     xcb_out.dst_y = dst_y;
6255 
6256     xcb_parts[2].iov_base = (char *) &xcb_out;
6257     xcb_parts[2].iov_len = sizeof(xcb_out);
6258     xcb_parts[3].iov_base = 0;
6259     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6260 
6261     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6262     return xcb_ret;
6263 }
6264 
6265 
6266 /*****************************************************************************
6267  **
6268  ** xcb_void_cookie_t xcb_set_input_focus_checked
6269  **
6270  ** @param xcb_connection_t *c
6271  ** @param uint8_t           revert_to
6272  ** @param xcb_window_t      focus
6273  ** @param xcb_timestamp_t   time
6274  ** @returns xcb_void_cookie_t
6275  **
6276  *****************************************************************************/
6277 
6278 xcb_void_cookie_t
6279 xcb_set_input_focus_checked (xcb_connection_t *c  /**< */,
6280                              uint8_t           revert_to  /**< */,
6281                              xcb_window_t      focus  /**< */,
6282                              xcb_timestamp_t   time  /**< */)
6283 {
6284     static const xcb_protocol_request_t xcb_req = {
6285         /* count */ 2,
6286         /* ext */ 0,
6287         /* opcode */ XCB_SET_INPUT_FOCUS,
6288         /* isvoid */ 1
6289     };
6290 
6291     struct iovec xcb_parts[4];
6292     xcb_void_cookie_t xcb_ret;
6293     xcb_set_input_focus_request_t xcb_out;
6294 
6295     xcb_out.revert_to = revert_to;
6296     xcb_out.focus = focus;
6297     xcb_out.time = time;
6298 
6299     xcb_parts[2].iov_base = (char *) &xcb_out;
6300     xcb_parts[2].iov_len = sizeof(xcb_out);
6301     xcb_parts[3].iov_base = 0;
6302     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6303 
6304     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6305     return xcb_ret;
6306 }
6307 
6308 
6309 /*****************************************************************************
6310  **
6311  ** xcb_void_cookie_t xcb_set_input_focus
6312  **
6313  ** @param xcb_connection_t *c
6314  ** @param uint8_t           revert_to
6315  ** @param xcb_window_t      focus
6316  ** @param xcb_timestamp_t   time
6317  ** @returns xcb_void_cookie_t
6318  **
6319  *****************************************************************************/
6320 
6321 xcb_void_cookie_t
6322 xcb_set_input_focus (xcb_connection_t *c  /**< */,
6323                      uint8_t           revert_to  /**< */,
6324                      xcb_window_t      focus  /**< */,
6325                      xcb_timestamp_t   time  /**< */)
6326 {
6327     static const xcb_protocol_request_t xcb_req = {
6328         /* count */ 2,
6329         /* ext */ 0,
6330         /* opcode */ XCB_SET_INPUT_FOCUS,
6331         /* isvoid */ 1
6332     };
6333 
6334     struct iovec xcb_parts[4];
6335     xcb_void_cookie_t xcb_ret;
6336     xcb_set_input_focus_request_t xcb_out;
6337 
6338     xcb_out.revert_to = revert_to;
6339     xcb_out.focus = focus;
6340     xcb_out.time = time;
6341 
6342     xcb_parts[2].iov_base = (char *) &xcb_out;
6343     xcb_parts[2].iov_len = sizeof(xcb_out);
6344     xcb_parts[3].iov_base = 0;
6345     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6346 
6347     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6348     return xcb_ret;
6349 }
6350 
6351 
6352 /*****************************************************************************
6353  **
6354  ** xcb_get_input_focus_cookie_t xcb_get_input_focus
6355  **
6356  ** @param xcb_connection_t *c
6357  ** @returns xcb_get_input_focus_cookie_t
6358  **
6359  *****************************************************************************/
6360 
6361 xcb_get_input_focus_cookie_t
6362 xcb_get_input_focus (xcb_connection_t *c  /**< */)
6363 {
6364     static const xcb_protocol_request_t xcb_req = {
6365         /* count */ 2,
6366         /* ext */ 0,
6367         /* opcode */ XCB_GET_INPUT_FOCUS,
6368         /* isvoid */ 0
6369     };
6370 
6371     struct iovec xcb_parts[4];
6372     xcb_get_input_focus_cookie_t xcb_ret;
6373     xcb_get_input_focus_request_t xcb_out;
6374 
6375     xcb_out.pad0 = 0;
6376 
6377     xcb_parts[2].iov_base = (char *) &xcb_out;
6378     xcb_parts[2].iov_len = sizeof(xcb_out);
6379     xcb_parts[3].iov_base = 0;
6380     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6381 
6382     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6383     return xcb_ret;
6384 }
6385 
6386 
6387 /*****************************************************************************
6388  **
6389  ** xcb_get_input_focus_cookie_t xcb_get_input_focus_unchecked
6390  **
6391  ** @param xcb_connection_t *c
6392  ** @returns xcb_get_input_focus_cookie_t
6393  **
6394  *****************************************************************************/
6395 
6396 xcb_get_input_focus_cookie_t
6397 xcb_get_input_focus_unchecked (xcb_connection_t *c  /**< */)
6398 {
6399     static const xcb_protocol_request_t xcb_req = {
6400         /* count */ 2,
6401         /* ext */ 0,
6402         /* opcode */ XCB_GET_INPUT_FOCUS,
6403         /* isvoid */ 0
6404     };
6405 
6406     struct iovec xcb_parts[4];
6407     xcb_get_input_focus_cookie_t xcb_ret;
6408     xcb_get_input_focus_request_t xcb_out;
6409 
6410     xcb_out.pad0 = 0;
6411 
6412     xcb_parts[2].iov_base = (char *) &xcb_out;
6413     xcb_parts[2].iov_len = sizeof(xcb_out);
6414     xcb_parts[3].iov_base = 0;
6415     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6416 
6417     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6418     return xcb_ret;
6419 }
6420 
6421 
6422 /*****************************************************************************
6423  **
6424  ** xcb_get_input_focus_reply_t * xcb_get_input_focus_reply
6425  **
6426  ** @param xcb_connection_t              *c
6427  ** @param xcb_get_input_focus_cookie_t   cookie
6428  ** @param xcb_generic_error_t          **e
6429  ** @returns xcb_get_input_focus_reply_t *
6430  **
6431  *****************************************************************************/
6432 
6433 xcb_get_input_focus_reply_t *
6434 xcb_get_input_focus_reply (xcb_connection_t              *c  /**< */,
6435                            xcb_get_input_focus_cookie_t   cookie  /**< */,
6436                            xcb_generic_error_t          **e  /**< */)
6437 {
6438     return (xcb_get_input_focus_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6439 }
6440 
6441 
6442 /*****************************************************************************
6443  **
6444  ** xcb_query_keymap_cookie_t xcb_query_keymap
6445  **
6446  ** @param xcb_connection_t *c
6447  ** @returns xcb_query_keymap_cookie_t
6448  **
6449  *****************************************************************************/
6450 
6451 xcb_query_keymap_cookie_t
6452 xcb_query_keymap (xcb_connection_t *c  /**< */)
6453 {
6454     static const xcb_protocol_request_t xcb_req = {
6455         /* count */ 2,
6456         /* ext */ 0,
6457         /* opcode */ XCB_QUERY_KEYMAP,
6458         /* isvoid */ 0
6459     };
6460 
6461     struct iovec xcb_parts[4];
6462     xcb_query_keymap_cookie_t xcb_ret;
6463     xcb_query_keymap_request_t xcb_out;
6464 
6465     xcb_out.pad0 = 0;
6466 
6467     xcb_parts[2].iov_base = (char *) &xcb_out;
6468     xcb_parts[2].iov_len = sizeof(xcb_out);
6469     xcb_parts[3].iov_base = 0;
6470     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6471 
6472     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6473     return xcb_ret;
6474 }
6475 
6476 
6477 /*****************************************************************************
6478  **
6479  ** xcb_query_keymap_cookie_t xcb_query_keymap_unchecked
6480  **
6481  ** @param xcb_connection_t *c
6482  ** @returns xcb_query_keymap_cookie_t
6483  **
6484  *****************************************************************************/
6485 
6486 xcb_query_keymap_cookie_t
6487 xcb_query_keymap_unchecked (xcb_connection_t *c  /**< */)
6488 {
6489     static const xcb_protocol_request_t xcb_req = {
6490         /* count */ 2,
6491         /* ext */ 0,
6492         /* opcode */ XCB_QUERY_KEYMAP,
6493         /* isvoid */ 0
6494     };
6495 
6496     struct iovec xcb_parts[4];
6497     xcb_query_keymap_cookie_t xcb_ret;
6498     xcb_query_keymap_request_t xcb_out;
6499 
6500     xcb_out.pad0 = 0;
6501 
6502     xcb_parts[2].iov_base = (char *) &xcb_out;
6503     xcb_parts[2].iov_len = sizeof(xcb_out);
6504     xcb_parts[3].iov_base = 0;
6505     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6506 
6507     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6508     return xcb_ret;
6509 }
6510 
6511 
6512 /*****************************************************************************
6513  **
6514  ** xcb_query_keymap_reply_t * xcb_query_keymap_reply
6515  **
6516  ** @param xcb_connection_t           *c
6517  ** @param xcb_query_keymap_cookie_t   cookie
6518  ** @param xcb_generic_error_t       **e
6519  ** @returns xcb_query_keymap_reply_t *
6520  **
6521  *****************************************************************************/
6522 
6523 xcb_query_keymap_reply_t *
6524 xcb_query_keymap_reply (xcb_connection_t           *c  /**< */,
6525                         xcb_query_keymap_cookie_t   cookie  /**< */,
6526                         xcb_generic_error_t       **e  /**< */)
6527 {
6528     return (xcb_query_keymap_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6529 }
6530 
6531 int
6532 xcb_open_font_sizeof (const void  *_buffer  /**< */)
6533 {
6534     char *xcb_tmp = (char *)_buffer;
6535     const xcb_open_font_request_t *_aux = (xcb_open_font_request_t *)_buffer;
6536     unsigned int xcb_buffer_len = 0;
6537     unsigned int xcb_block_len = 0;
6538     unsigned int xcb_pad = 0;
6539     unsigned int xcb_align_to = 0;
6540 
6541 
6542     xcb_block_len += sizeof(xcb_open_font_request_t);
6543     xcb_tmp += xcb_block_len;
6544     xcb_buffer_len += xcb_block_len;
6545     xcb_block_len = 0;
6546     /* name */
6547     xcb_block_len += _aux->name_len * sizeof(char);
6548     xcb_tmp += xcb_block_len;
6549     xcb_align_to = ALIGNOF(char);
6550     /* insert padding */
6551     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6552     xcb_buffer_len += xcb_block_len + xcb_pad;
6553     if (0 != xcb_pad) {
6554         xcb_tmp += xcb_pad;
6555         xcb_pad = 0;
6556     }
6557     xcb_block_len = 0;
6558 
6559     return xcb_buffer_len;
6560 }
6561 
6562 
6563 /*****************************************************************************
6564  **
6565  ** xcb_void_cookie_t xcb_open_font_checked
6566  **
6567  ** @param xcb_connection_t *c
6568  ** @param xcb_font_t        fid
6569  ** @param uint16_t          name_len
6570  ** @param const char       *name
6571  ** @returns xcb_void_cookie_t
6572  **
6573  *****************************************************************************/
6574 
6575 xcb_void_cookie_t
6576 xcb_open_font_checked (xcb_connection_t *c  /**< */,
6577                        xcb_font_t        fid  /**< */,
6578                        uint16_t          name_len  /**< */,
6579                        const char       *name  /**< */)
6580 {
6581     static const xcb_protocol_request_t xcb_req = {
6582         /* count */ 4,
6583         /* ext */ 0,
6584         /* opcode */ XCB_OPEN_FONT,
6585         /* isvoid */ 1
6586     };
6587 
6588     struct iovec xcb_parts[6];
6589     xcb_void_cookie_t xcb_ret;
6590     xcb_open_font_request_t xcb_out;
6591 
6592     xcb_out.pad0 = 0;
6593     xcb_out.fid = fid;
6594     xcb_out.name_len = name_len;
6595     memset(xcb_out.pad1, 0, 2);
6596 
6597     xcb_parts[2].iov_base = (char *) &xcb_out;
6598     xcb_parts[2].iov_len = sizeof(xcb_out);
6599     xcb_parts[3].iov_base = 0;
6600     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6601     /* char name */
6602     xcb_parts[4].iov_base = (char *) name;
6603     xcb_parts[4].iov_len = name_len * sizeof(char);
6604     xcb_parts[5].iov_base = 0;
6605     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
6606 
6607     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6608     return xcb_ret;
6609 }
6610 
6611 
6612 /*****************************************************************************
6613  **
6614  ** xcb_void_cookie_t xcb_open_font
6615  **
6616  ** @param xcb_connection_t *c
6617  ** @param xcb_font_t        fid
6618  ** @param uint16_t          name_len
6619  ** @param const char       *name
6620  ** @returns xcb_void_cookie_t
6621  **
6622  *****************************************************************************/
6623 
6624 xcb_void_cookie_t
6625 xcb_open_font (xcb_connection_t *c  /**< */,
6626                xcb_font_t        fid  /**< */,
6627                uint16_t          name_len  /**< */,
6628                const char       *name  /**< */)
6629 {
6630     static const xcb_protocol_request_t xcb_req = {
6631         /* count */ 4,
6632         /* ext */ 0,
6633         /* opcode */ XCB_OPEN_FONT,
6634         /* isvoid */ 1
6635     };
6636 
6637     struct iovec xcb_parts[6];
6638     xcb_void_cookie_t xcb_ret;
6639     xcb_open_font_request_t xcb_out;
6640 
6641     xcb_out.pad0 = 0;
6642     xcb_out.fid = fid;
6643     xcb_out.name_len = name_len;
6644     memset(xcb_out.pad1, 0, 2);
6645 
6646     xcb_parts[2].iov_base = (char *) &xcb_out;
6647     xcb_parts[2].iov_len = sizeof(xcb_out);
6648     xcb_parts[3].iov_base = 0;
6649     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6650     /* char name */
6651     xcb_parts[4].iov_base = (char *) name;
6652     xcb_parts[4].iov_len = name_len * sizeof(char);
6653     xcb_parts[5].iov_base = 0;
6654     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
6655 
6656     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6657     return xcb_ret;
6658 }
6659 
6660 
6661 /*****************************************************************************
6662  **
6663  ** xcb_void_cookie_t xcb_close_font_checked
6664  **
6665  ** @param xcb_connection_t *c
6666  ** @param xcb_font_t        font
6667  ** @returns xcb_void_cookie_t
6668  **
6669  *****************************************************************************/
6670 
6671 xcb_void_cookie_t
6672 xcb_close_font_checked (xcb_connection_t *c  /**< */,
6673                         xcb_font_t        font  /**< */)
6674 {
6675     static const xcb_protocol_request_t xcb_req = {
6676         /* count */ 2,
6677         /* ext */ 0,
6678         /* opcode */ XCB_CLOSE_FONT,
6679         /* isvoid */ 1
6680     };
6681 
6682     struct iovec xcb_parts[4];
6683     xcb_void_cookie_t xcb_ret;
6684     xcb_close_font_request_t xcb_out;
6685 
6686     xcb_out.pad0 = 0;
6687     xcb_out.font = font;
6688 
6689     xcb_parts[2].iov_base = (char *) &xcb_out;
6690     xcb_parts[2].iov_len = sizeof(xcb_out);
6691     xcb_parts[3].iov_base = 0;
6692     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6693 
6694     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6695     return xcb_ret;
6696 }
6697 
6698 
6699 /*****************************************************************************
6700  **
6701  ** xcb_void_cookie_t xcb_close_font
6702  **
6703  ** @param xcb_connection_t *c
6704  ** @param xcb_font_t        font
6705  ** @returns xcb_void_cookie_t
6706  **
6707  *****************************************************************************/
6708 
6709 xcb_void_cookie_t
6710 xcb_close_font (xcb_connection_t *c  /**< */,
6711                 xcb_font_t        font  /**< */)
6712 {
6713     static const xcb_protocol_request_t xcb_req = {
6714         /* count */ 2,
6715         /* ext */ 0,
6716         /* opcode */ XCB_CLOSE_FONT,
6717         /* isvoid */ 1
6718     };
6719 
6720     struct iovec xcb_parts[4];
6721     xcb_void_cookie_t xcb_ret;
6722     xcb_close_font_request_t xcb_out;
6723 
6724     xcb_out.pad0 = 0;
6725     xcb_out.font = font;
6726 
6727     xcb_parts[2].iov_base = (char *) &xcb_out;
6728     xcb_parts[2].iov_len = sizeof(xcb_out);
6729     xcb_parts[3].iov_base = 0;
6730     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6731 
6732     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6733     return xcb_ret;
6734 }
6735 
6736 
6737 /*****************************************************************************
6738  **
6739  ** void xcb_fontprop_next
6740  **
6741  ** @param xcb_fontprop_iterator_t *i
6742  ** @returns void
6743  **
6744  *****************************************************************************/
6745 
6746 void
6747 xcb_fontprop_next (xcb_fontprop_iterator_t *i  /**< */)
6748 {
6749     --i->rem;
6750     ++i->data;
6751     i->index += sizeof(xcb_fontprop_t);
6752 }
6753 
6754 
6755 /*****************************************************************************
6756  **
6757  ** xcb_generic_iterator_t xcb_fontprop_end
6758  **
6759  ** @param xcb_fontprop_iterator_t i
6760  ** @returns xcb_generic_iterator_t
6761  **
6762  *****************************************************************************/
6763 
6764 xcb_generic_iterator_t
6765 xcb_fontprop_end (xcb_fontprop_iterator_t i  /**< */)
6766 {
6767     xcb_generic_iterator_t ret;
6768     ret.data = i.data + i.rem;
6769     ret.index = i.index + ((char *) ret.data - (char *) i.data);
6770     ret.rem = 0;
6771     return ret;
6772 }
6773 
6774 
6775 /*****************************************************************************
6776  **
6777  ** void xcb_charinfo_next
6778  **
6779  ** @param xcb_charinfo_iterator_t *i
6780  ** @returns void
6781  **
6782  *****************************************************************************/
6783 
6784 void
6785 xcb_charinfo_next (xcb_charinfo_iterator_t *i  /**< */)
6786 {
6787     --i->rem;
6788     ++i->data;
6789     i->index += sizeof(xcb_charinfo_t);
6790 }
6791 
6792 
6793 /*****************************************************************************
6794  **
6795  ** xcb_generic_iterator_t xcb_charinfo_end
6796  **
6797  ** @param xcb_charinfo_iterator_t i
6798  ** @returns xcb_generic_iterator_t
6799  **
6800  *****************************************************************************/
6801 
6802 xcb_generic_iterator_t
6803 xcb_charinfo_end (xcb_charinfo_iterator_t i  /**< */)
6804 {
6805     xcb_generic_iterator_t ret;
6806     ret.data = i.data + i.rem;
6807     ret.index = i.index + ((char *) ret.data - (char *) i.data);
6808     ret.rem = 0;
6809     return ret;
6810 }
6811 
6812 int
6813 xcb_query_font_sizeof (const void  *_buffer  /**< */)
6814 {
6815     char *xcb_tmp = (char *)_buffer;
6816     const xcb_query_font_reply_t *_aux = (xcb_query_font_reply_t *)_buffer;
6817     unsigned int xcb_buffer_len = 0;
6818     unsigned int xcb_block_len = 0;
6819     unsigned int xcb_pad = 0;
6820     unsigned int xcb_align_to = 0;
6821 
6822 
6823     xcb_block_len += sizeof(xcb_query_font_reply_t);
6824     xcb_tmp += xcb_block_len;
6825     xcb_buffer_len += xcb_block_len;
6826     xcb_block_len = 0;
6827     /* properties */
6828     xcb_block_len += _aux->properties_len * sizeof(xcb_fontprop_t);
6829     xcb_tmp += xcb_block_len;
6830     xcb_align_to = ALIGNOF(xcb_fontprop_t);
6831     /* insert padding */
6832     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6833     xcb_buffer_len += xcb_block_len + xcb_pad;
6834     if (0 != xcb_pad) {
6835         xcb_tmp += xcb_pad;
6836         xcb_pad = 0;
6837     }
6838     xcb_block_len = 0;
6839     /* char_infos */
6840     xcb_block_len += _aux->char_infos_len * sizeof(xcb_charinfo_t);
6841     xcb_tmp += xcb_block_len;
6842     xcb_align_to = ALIGNOF(xcb_charinfo_t);
6843     /* insert padding */
6844     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6845     xcb_buffer_len += xcb_block_len + xcb_pad;
6846     if (0 != xcb_pad) {
6847         xcb_tmp += xcb_pad;
6848         xcb_pad = 0;
6849     }
6850     xcb_block_len = 0;
6851 
6852     return xcb_buffer_len;
6853 }
6854 
6855 
6856 /*****************************************************************************
6857  **
6858  ** xcb_query_font_cookie_t xcb_query_font
6859  **
6860  ** @param xcb_connection_t *c
6861  ** @param xcb_fontable_t    font
6862  ** @returns xcb_query_font_cookie_t
6863  **
6864  *****************************************************************************/
6865 
6866 xcb_query_font_cookie_t
6867 xcb_query_font (xcb_connection_t *c  /**< */,
6868                 xcb_fontable_t    font  /**< */)
6869 {
6870     static const xcb_protocol_request_t xcb_req = {
6871         /* count */ 2,
6872         /* ext */ 0,
6873         /* opcode */ XCB_QUERY_FONT,
6874         /* isvoid */ 0
6875     };
6876 
6877     struct iovec xcb_parts[4];
6878     xcb_query_font_cookie_t xcb_ret;
6879     xcb_query_font_request_t xcb_out;
6880 
6881     xcb_out.pad0 = 0;
6882     xcb_out.font = font;
6883 
6884     xcb_parts[2].iov_base = (char *) &xcb_out;
6885     xcb_parts[2].iov_len = sizeof(xcb_out);
6886     xcb_parts[3].iov_base = 0;
6887     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6888 
6889     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6890     return xcb_ret;
6891 }
6892 
6893 
6894 /*****************************************************************************
6895  **
6896  ** xcb_query_font_cookie_t xcb_query_font_unchecked
6897  **
6898  ** @param xcb_connection_t *c
6899  ** @param xcb_fontable_t    font
6900  ** @returns xcb_query_font_cookie_t
6901  **
6902  *****************************************************************************/
6903 
6904 xcb_query_font_cookie_t
6905 xcb_query_font_unchecked (xcb_connection_t *c  /**< */,
6906                           xcb_fontable_t    font  /**< */)
6907 {
6908     static const xcb_protocol_request_t xcb_req = {
6909         /* count */ 2,
6910         /* ext */ 0,
6911         /* opcode */ XCB_QUERY_FONT,
6912         /* isvoid */ 0
6913     };
6914 
6915     struct iovec xcb_parts[4];
6916     xcb_query_font_cookie_t xcb_ret;
6917     xcb_query_font_request_t xcb_out;
6918 
6919     xcb_out.pad0 = 0;
6920     xcb_out.font = font;
6921 
6922     xcb_parts[2].iov_base = (char *) &xcb_out;
6923     xcb_parts[2].iov_len = sizeof(xcb_out);
6924     xcb_parts[3].iov_base = 0;
6925     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6926 
6927     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6928     return xcb_ret;
6929 }
6930 
6931 
6932 /*****************************************************************************
6933  **
6934  ** xcb_fontprop_t * xcb_query_font_properties
6935  **
6936  ** @param const xcb_query_font_reply_t *R
6937  ** @returns xcb_fontprop_t *
6938  **
6939  *****************************************************************************/
6940 
6941 xcb_fontprop_t *
6942 xcb_query_font_properties (const xcb_query_font_reply_t *R  /**< */)
6943 {
6944     return (xcb_fontprop_t *) (R + 1);
6945 }
6946 
6947 
6948 /*****************************************************************************
6949  **
6950  ** int xcb_query_font_properties_length
6951  **
6952  ** @param const xcb_query_font_reply_t *R
6953  ** @returns int
6954  **
6955  *****************************************************************************/
6956 
6957 int
6958 xcb_query_font_properties_length (const xcb_query_font_reply_t *R  /**< */)
6959 {
6960     return R->properties_len;
6961 }
6962 
6963 
6964 /*****************************************************************************
6965  **
6966  ** xcb_fontprop_iterator_t xcb_query_font_properties_iterator
6967  **
6968  ** @param const xcb_query_font_reply_t *R
6969  ** @returns xcb_fontprop_iterator_t
6970  **
6971  *****************************************************************************/
6972 
6973 xcb_fontprop_iterator_t
6974 xcb_query_font_properties_iterator (const xcb_query_font_reply_t *R  /**< */)
6975 {
6976     xcb_fontprop_iterator_t i;
6977     i.data = (xcb_fontprop_t *) (R + 1);
6978     i.rem = R->properties_len;
6979     i.index = (char *) i.data - (char *) R;
6980     return i;
6981 }
6982 
6983 
6984 /*****************************************************************************
6985  **
6986  ** xcb_charinfo_t * xcb_query_font_char_infos
6987  **
6988  ** @param const xcb_query_font_reply_t *R
6989  ** @returns xcb_charinfo_t *
6990  **
6991  *****************************************************************************/
6992 
6993 xcb_charinfo_t *
6994 xcb_query_font_char_infos (const xcb_query_font_reply_t *R  /**< */)
6995 {
6996     xcb_generic_iterator_t prev = xcb_fontprop_end(xcb_query_font_properties_iterator(R));
6997     return (xcb_charinfo_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_charinfo_t, prev.index) + 0);
6998 }
6999 
7000 
7001 /*****************************************************************************
7002  **
7003  ** int xcb_query_font_char_infos_length
7004  **
7005  ** @param const xcb_query_font_reply_t *R
7006  ** @returns int
7007  **
7008  *****************************************************************************/
7009 
7010 int
7011 xcb_query_font_char_infos_length (const xcb_query_font_reply_t *R  /**< */)
7012 {
7013     return R->char_infos_len;
7014 }
7015 
7016 
7017 /*****************************************************************************
7018  **
7019  ** xcb_charinfo_iterator_t xcb_query_font_char_infos_iterator
7020  **
7021  ** @param const xcb_query_font_reply_t *R
7022  ** @returns xcb_charinfo_iterator_t
7023  **
7024  *****************************************************************************/
7025 
7026 xcb_charinfo_iterator_t
7027 xcb_query_font_char_infos_iterator (const xcb_query_font_reply_t *R  /**< */)
7028 {
7029     xcb_charinfo_iterator_t i;
7030     xcb_generic_iterator_t prev = xcb_fontprop_end(xcb_query_font_properties_iterator(R));
7031     i.data = (xcb_charinfo_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_charinfo_t, prev.index));
7032     i.rem = R->char_infos_len;
7033     i.index = (char *) i.data - (char *) R;
7034     return i;
7035 }
7036 
7037 
7038 /*****************************************************************************
7039  **
7040  ** xcb_query_font_reply_t * xcb_query_font_reply
7041  **
7042  ** @param xcb_connection_t         *c
7043  ** @param xcb_query_font_cookie_t   cookie
7044  ** @param xcb_generic_error_t     **e
7045  ** @returns xcb_query_font_reply_t *
7046  **
7047  *****************************************************************************/
7048 
7049 xcb_query_font_reply_t *
7050 xcb_query_font_reply (xcb_connection_t         *c  /**< */,
7051                       xcb_query_font_cookie_t   cookie  /**< */,
7052                       xcb_generic_error_t     **e  /**< */)
7053 {
7054     return (xcb_query_font_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7055 }
7056 
7057 int
7058 xcb_query_text_extents_sizeof (const void  *_buffer  /**< */,
7059                                uint32_t     string_len  /**< */)
7060 {
7061     char *xcb_tmp = (char *)_buffer;
7062     unsigned int xcb_buffer_len = 0;
7063     unsigned int xcb_block_len = 0;
7064     unsigned int xcb_pad = 0;
7065     unsigned int xcb_align_to = 0;
7066 
7067 
7068     xcb_block_len += sizeof(xcb_query_text_extents_request_t);
7069     xcb_tmp += xcb_block_len;
7070     xcb_buffer_len += xcb_block_len;
7071     xcb_block_len = 0;
7072     /* string */
7073     xcb_block_len += string_len * sizeof(xcb_char2b_t);
7074     xcb_tmp += xcb_block_len;
7075     xcb_align_to = ALIGNOF(xcb_char2b_t);
7076     /* insert padding */
7077     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7078     xcb_buffer_len += xcb_block_len + xcb_pad;
7079     if (0 != xcb_pad) {
7080         xcb_tmp += xcb_pad;
7081         xcb_pad = 0;
7082     }
7083     xcb_block_len = 0;
7084 
7085     return xcb_buffer_len;
7086 }
7087 
7088 
7089 /*****************************************************************************
7090  **
7091  ** xcb_query_text_extents_cookie_t xcb_query_text_extents
7092  **
7093  ** @param xcb_connection_t   *c
7094  ** @param xcb_fontable_t      font
7095  ** @param uint32_t            string_len
7096  ** @param const xcb_char2b_t *string
7097  ** @returns xcb_query_text_extents_cookie_t
7098  **
7099  *****************************************************************************/
7100 
7101 xcb_query_text_extents_cookie_t
7102 xcb_query_text_extents (xcb_connection_t   *c  /**< */,
7103                         xcb_fontable_t      font  /**< */,
7104                         uint32_t            string_len  /**< */,
7105                         const xcb_char2b_t *string  /**< */)
7106 {
7107     static const xcb_protocol_request_t xcb_req = {
7108         /* count */ 4,
7109         /* ext */ 0,
7110         /* opcode */ XCB_QUERY_TEXT_EXTENTS,
7111         /* isvoid */ 0
7112     };
7113 
7114     struct iovec xcb_parts[6];
7115     xcb_query_text_extents_cookie_t xcb_ret;
7116     xcb_query_text_extents_request_t xcb_out;
7117 
7118     xcb_out.odd_length = (string_len & 1);
7119     xcb_out.font = font;
7120 
7121     xcb_parts[2].iov_base = (char *) &xcb_out;
7122     xcb_parts[2].iov_len = sizeof(xcb_out);
7123     xcb_parts[3].iov_base = 0;
7124     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7125     /* xcb_char2b_t string */
7126     xcb_parts[4].iov_base = (char *) string;
7127     xcb_parts[4].iov_len = string_len * sizeof(xcb_char2b_t);
7128     xcb_parts[5].iov_base = 0;
7129     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7130 
7131     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7132     return xcb_ret;
7133 }
7134 
7135 
7136 /*****************************************************************************
7137  **
7138  ** xcb_query_text_extents_cookie_t xcb_query_text_extents_unchecked
7139  **
7140  ** @param xcb_connection_t   *c
7141  ** @param xcb_fontable_t      font
7142  ** @param uint32_t            string_len
7143  ** @param const xcb_char2b_t *string
7144  ** @returns xcb_query_text_extents_cookie_t
7145  **
7146  *****************************************************************************/
7147 
7148 xcb_query_text_extents_cookie_t
7149 xcb_query_text_extents_unchecked (xcb_connection_t   *c  /**< */,
7150                                   xcb_fontable_t      font  /**< */,
7151                                   uint32_t            string_len  /**< */,
7152                                   const xcb_char2b_t *string  /**< */)
7153 {
7154     static const xcb_protocol_request_t xcb_req = {
7155         /* count */ 4,
7156         /* ext */ 0,
7157         /* opcode */ XCB_QUERY_TEXT_EXTENTS,
7158         /* isvoid */ 0
7159     };
7160 
7161     struct iovec xcb_parts[6];
7162     xcb_query_text_extents_cookie_t xcb_ret;
7163     xcb_query_text_extents_request_t xcb_out;
7164 
7165     xcb_out.odd_length = (string_len & 1);
7166     xcb_out.font = font;
7167 
7168     xcb_parts[2].iov_base = (char *) &xcb_out;
7169     xcb_parts[2].iov_len = sizeof(xcb_out);
7170     xcb_parts[3].iov_base = 0;
7171     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7172     /* xcb_char2b_t string */
7173     xcb_parts[4].iov_base = (char *) string;
7174     xcb_parts[4].iov_len = string_len * sizeof(xcb_char2b_t);
7175     xcb_parts[5].iov_base = 0;
7176     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7177 
7178     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7179     return xcb_ret;
7180 }
7181 
7182 
7183 /*****************************************************************************
7184  **
7185  ** xcb_query_text_extents_reply_t * xcb_query_text_extents_reply
7186  **
7187  ** @param xcb_connection_t                 *c
7188  ** @param xcb_query_text_extents_cookie_t   cookie
7189  ** @param xcb_generic_error_t             **e
7190  ** @returns xcb_query_text_extents_reply_t *
7191  **
7192  *****************************************************************************/
7193 
7194 xcb_query_text_extents_reply_t *
7195 xcb_query_text_extents_reply (xcb_connection_t                 *c  /**< */,
7196                               xcb_query_text_extents_cookie_t   cookie  /**< */,
7197                               xcb_generic_error_t             **e  /**< */)
7198 {
7199     return (xcb_query_text_extents_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7200 }
7201 
7202 int
7203 xcb_str_sizeof (const void  *_buffer  /**< */)
7204 {
7205     char *xcb_tmp = (char *)_buffer;
7206     const xcb_str_t *_aux = (xcb_str_t *)_buffer;
7207     unsigned int xcb_buffer_len = 0;
7208     unsigned int xcb_block_len = 0;
7209     unsigned int xcb_pad = 0;
7210     unsigned int xcb_align_to = 0;
7211 
7212 
7213     xcb_block_len += sizeof(xcb_str_t);
7214     xcb_tmp += xcb_block_len;
7215     xcb_buffer_len += xcb_block_len;
7216     xcb_block_len = 0;
7217     /* name */
7218     xcb_block_len += _aux->name_len * sizeof(char);
7219     xcb_tmp += xcb_block_len;
7220     xcb_align_to = ALIGNOF(char);
7221     /* insert padding */
7222     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7223     xcb_buffer_len += xcb_block_len + xcb_pad;
7224     if (0 != xcb_pad) {
7225         xcb_tmp += xcb_pad;
7226         xcb_pad = 0;
7227     }
7228     xcb_block_len = 0;
7229 
7230     return xcb_buffer_len;
7231 }
7232 
7233 
7234 /*****************************************************************************
7235  **
7236  ** char * xcb_str_name
7237  **
7238  ** @param const xcb_str_t *R
7239  ** @returns char *
7240  **
7241  *****************************************************************************/
7242 
7243 char *
7244 xcb_str_name (const xcb_str_t *R  /**< */)
7245 {
7246     return (char *) (R + 1);
7247 }
7248 
7249 
7250 /*****************************************************************************
7251  **
7252  ** int xcb_str_name_length
7253  **
7254  ** @param const xcb_str_t *R
7255  ** @returns int
7256  **
7257  *****************************************************************************/
7258 
7259 int
7260 xcb_str_name_length (const xcb_str_t *R  /**< */)
7261 {
7262     return R->name_len;
7263 }
7264 
7265 
7266 /*****************************************************************************
7267  **
7268  ** xcb_generic_iterator_t xcb_str_name_end
7269  **
7270  ** @param const xcb_str_t *R
7271  ** @returns xcb_generic_iterator_t
7272  **
7273  *****************************************************************************/
7274 
7275 xcb_generic_iterator_t
7276 xcb_str_name_end (const xcb_str_t *R  /**< */)
7277 {
7278     xcb_generic_iterator_t i;
7279     i.data = ((char *) (R + 1)) + (R->name_len);
7280     i.rem = 0;
7281     i.index = (char *) i.data - (char *) R;
7282     return i;
7283 }
7284 
7285 
7286 /*****************************************************************************
7287  **
7288  ** void xcb_str_next
7289  **
7290  ** @param xcb_str_iterator_t *i
7291  ** @returns void
7292  **
7293  *****************************************************************************/
7294 
7295 void
7296 xcb_str_next (xcb_str_iterator_t *i  /**< */)
7297 {
7298     xcb_str_t *R = i->data;
7299     xcb_generic_iterator_t child;
7300     child.data = (xcb_str_t *)(((char *)R) + xcb_str_sizeof(R));
7301     i->index = (char *) child.data - (char *) i->data;
7302     --i->rem;
7303     i->data = (xcb_str_t *) child.data;
7304 }
7305 
7306 
7307 /*****************************************************************************
7308  **
7309  ** xcb_generic_iterator_t xcb_str_end
7310  **
7311  ** @param xcb_str_iterator_t i
7312  ** @returns xcb_generic_iterator_t
7313  **
7314  *****************************************************************************/
7315 
7316 xcb_generic_iterator_t
7317 xcb_str_end (xcb_str_iterator_t i  /**< */)
7318 {
7319     xcb_generic_iterator_t ret;
7320     while(i.rem > 0)
7321         xcb_str_next(&i);
7322     ret.data = i.data;
7323     ret.rem = i.rem;
7324     ret.index = i.index;
7325     return ret;
7326 }
7327 
7328 int
7329 xcb_list_fonts_sizeof (const void  *_buffer  /**< */)
7330 {
7331     char *xcb_tmp = (char *)_buffer;
7332     const xcb_list_fonts_request_t *_aux = (xcb_list_fonts_request_t *)_buffer;
7333     unsigned int xcb_buffer_len = 0;
7334     unsigned int xcb_block_len = 0;
7335     unsigned int xcb_pad = 0;
7336     unsigned int xcb_align_to = 0;
7337 
7338 
7339     xcb_block_len += sizeof(xcb_list_fonts_request_t);
7340     xcb_tmp += xcb_block_len;
7341     xcb_buffer_len += xcb_block_len;
7342     xcb_block_len = 0;
7343     /* pattern */
7344     xcb_block_len += _aux->pattern_len * sizeof(char);
7345     xcb_tmp += xcb_block_len;
7346     xcb_align_to = ALIGNOF(char);
7347     /* insert padding */
7348     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7349     xcb_buffer_len += xcb_block_len + xcb_pad;
7350     if (0 != xcb_pad) {
7351         xcb_tmp += xcb_pad;
7352         xcb_pad = 0;
7353     }
7354     xcb_block_len = 0;
7355 
7356     return xcb_buffer_len;
7357 }
7358 
7359 
7360 /*****************************************************************************
7361  **
7362  ** xcb_list_fonts_cookie_t xcb_list_fonts
7363  **
7364  ** @param xcb_connection_t *c
7365  ** @param uint16_t          max_names
7366  ** @param uint16_t          pattern_len
7367  ** @param const char       *pattern
7368  ** @returns xcb_list_fonts_cookie_t
7369  **
7370  *****************************************************************************/
7371 
7372 xcb_list_fonts_cookie_t
7373 xcb_list_fonts (xcb_connection_t *c  /**< */,
7374                 uint16_t          max_names  /**< */,
7375                 uint16_t          pattern_len  /**< */,
7376                 const char       *pattern  /**< */)
7377 {
7378     static const xcb_protocol_request_t xcb_req = {
7379         /* count */ 4,
7380         /* ext */ 0,
7381         /* opcode */ XCB_LIST_FONTS,
7382         /* isvoid */ 0
7383     };
7384 
7385     struct iovec xcb_parts[6];
7386     xcb_list_fonts_cookie_t xcb_ret;
7387     xcb_list_fonts_request_t xcb_out;
7388 
7389     xcb_out.pad0 = 0;
7390     xcb_out.max_names = max_names;
7391     xcb_out.pattern_len = pattern_len;
7392 
7393     xcb_parts[2].iov_base = (char *) &xcb_out;
7394     xcb_parts[2].iov_len = sizeof(xcb_out);
7395     xcb_parts[3].iov_base = 0;
7396     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7397     /* char pattern */
7398     xcb_parts[4].iov_base = (char *) pattern;
7399     xcb_parts[4].iov_len = pattern_len * sizeof(char);
7400     xcb_parts[5].iov_base = 0;
7401     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7402 
7403     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7404     return xcb_ret;
7405 }
7406 
7407 
7408 /*****************************************************************************
7409  **
7410  ** xcb_list_fonts_cookie_t xcb_list_fonts_unchecked
7411  **
7412  ** @param xcb_connection_t *c
7413  ** @param uint16_t          max_names
7414  ** @param uint16_t          pattern_len
7415  ** @param const char       *pattern
7416  ** @returns xcb_list_fonts_cookie_t
7417  **
7418  *****************************************************************************/
7419 
7420 xcb_list_fonts_cookie_t
7421 xcb_list_fonts_unchecked (xcb_connection_t *c  /**< */,
7422                           uint16_t          max_names  /**< */,
7423                           uint16_t          pattern_len  /**< */,
7424                           const char       *pattern  /**< */)
7425 {
7426     static const xcb_protocol_request_t xcb_req = {
7427         /* count */ 4,
7428         /* ext */ 0,
7429         /* opcode */ XCB_LIST_FONTS,
7430         /* isvoid */ 0
7431     };
7432 
7433     struct iovec xcb_parts[6];
7434     xcb_list_fonts_cookie_t xcb_ret;
7435     xcb_list_fonts_request_t xcb_out;
7436 
7437     xcb_out.pad0 = 0;
7438     xcb_out.max_names = max_names;
7439     xcb_out.pattern_len = pattern_len;
7440 
7441     xcb_parts[2].iov_base = (char *) &xcb_out;
7442     xcb_parts[2].iov_len = sizeof(xcb_out);
7443     xcb_parts[3].iov_base = 0;
7444     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7445     /* char pattern */
7446     xcb_parts[4].iov_base = (char *) pattern;
7447     xcb_parts[4].iov_len = pattern_len * sizeof(char);
7448     xcb_parts[5].iov_base = 0;
7449     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7450 
7451     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7452     return xcb_ret;
7453 }
7454 
7455 
7456 /*****************************************************************************
7457  **
7458  ** int xcb_list_fonts_names_length
7459  **
7460  ** @param const xcb_list_fonts_reply_t *R
7461  ** @returns int
7462  **
7463  *****************************************************************************/
7464 
7465 int
7466 xcb_list_fonts_names_length (const xcb_list_fonts_reply_t *R  /**< */)
7467 {
7468     return R->names_len;
7469 }
7470 
7471 
7472 /*****************************************************************************
7473  **
7474  ** xcb_str_iterator_t xcb_list_fonts_names_iterator
7475  **
7476  ** @param const xcb_list_fonts_reply_t *R
7477  ** @returns xcb_str_iterator_t
7478  **
7479  *****************************************************************************/
7480 
7481 xcb_str_iterator_t
7482 xcb_list_fonts_names_iterator (const xcb_list_fonts_reply_t *R  /**< */)
7483 {
7484     xcb_str_iterator_t i;
7485     i.data = (xcb_str_t *) (R + 1);
7486     i.rem = R->names_len;
7487     i.index = (char *) i.data - (char *) R;
7488     return i;
7489 }
7490 
7491 
7492 /*****************************************************************************
7493  **
7494  ** xcb_list_fonts_reply_t * xcb_list_fonts_reply
7495  **
7496  ** @param xcb_connection_t         *c
7497  ** @param xcb_list_fonts_cookie_t   cookie
7498  ** @param xcb_generic_error_t     **e
7499  ** @returns xcb_list_fonts_reply_t *
7500  **
7501  *****************************************************************************/
7502 
7503 xcb_list_fonts_reply_t *
7504 xcb_list_fonts_reply (xcb_connection_t         *c  /**< */,
7505                       xcb_list_fonts_cookie_t   cookie  /**< */,
7506                       xcb_generic_error_t     **e  /**< */)
7507 {
7508     return (xcb_list_fonts_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7509 }
7510 
7511 int
7512 xcb_list_fonts_with_info_sizeof (const void  *_buffer  /**< */)
7513 {
7514     char *xcb_tmp = (char *)_buffer;
7515     const xcb_list_fonts_with_info_request_t *_aux = (xcb_list_fonts_with_info_request_t *)_buffer;
7516     unsigned int xcb_buffer_len = 0;
7517     unsigned int xcb_block_len = 0;
7518     unsigned int xcb_pad = 0;
7519     unsigned int xcb_align_to = 0;
7520 
7521 
7522     xcb_block_len += sizeof(xcb_list_fonts_with_info_request_t);
7523     xcb_tmp += xcb_block_len;
7524     xcb_buffer_len += xcb_block_len;
7525     xcb_block_len = 0;
7526     /* pattern */
7527     xcb_block_len += _aux->pattern_len * sizeof(char);
7528     xcb_tmp += xcb_block_len;
7529     xcb_align_to = ALIGNOF(char);
7530     /* insert padding */
7531     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7532     xcb_buffer_len += xcb_block_len + xcb_pad;
7533     if (0 != xcb_pad) {
7534         xcb_tmp += xcb_pad;
7535         xcb_pad = 0;
7536     }
7537     xcb_block_len = 0;
7538 
7539     return xcb_buffer_len;
7540 }
7541 
7542 
7543 /*****************************************************************************
7544  **
7545  ** xcb_list_fonts_with_info_cookie_t xcb_list_fonts_with_info
7546  **
7547  ** @param xcb_connection_t *c
7548  ** @param uint16_t          max_names
7549  ** @param uint16_t          pattern_len
7550  ** @param const char       *pattern
7551  ** @returns xcb_list_fonts_with_info_cookie_t
7552  **
7553  *****************************************************************************/
7554 
7555 xcb_list_fonts_with_info_cookie_t
7556 xcb_list_fonts_with_info (xcb_connection_t *c  /**< */,
7557                           uint16_t          max_names  /**< */,
7558                           uint16_t          pattern_len  /**< */,
7559                           const char       *pattern  /**< */)
7560 {
7561     static const xcb_protocol_request_t xcb_req = {
7562         /* count */ 4,
7563         /* ext */ 0,
7564         /* opcode */ XCB_LIST_FONTS_WITH_INFO,
7565         /* isvoid */ 0
7566     };
7567 
7568     struct iovec xcb_parts[6];
7569     xcb_list_fonts_with_info_cookie_t xcb_ret;
7570     xcb_list_fonts_with_info_request_t xcb_out;
7571 
7572     xcb_out.pad0 = 0;
7573     xcb_out.max_names = max_names;
7574     xcb_out.pattern_len = pattern_len;
7575 
7576     xcb_parts[2].iov_base = (char *) &xcb_out;
7577     xcb_parts[2].iov_len = sizeof(xcb_out);
7578     xcb_parts[3].iov_base = 0;
7579     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7580     /* char pattern */
7581     xcb_parts[4].iov_base = (char *) pattern;
7582     xcb_parts[4].iov_len = pattern_len * sizeof(char);
7583     xcb_parts[5].iov_base = 0;
7584     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7585 
7586     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7587     return xcb_ret;
7588 }
7589 
7590 
7591 /*****************************************************************************
7592  **
7593  ** xcb_list_fonts_with_info_cookie_t xcb_list_fonts_with_info_unchecked
7594  **
7595  ** @param xcb_connection_t *c
7596  ** @param uint16_t          max_names
7597  ** @param uint16_t          pattern_len
7598  ** @param const char       *pattern
7599  ** @returns xcb_list_fonts_with_info_cookie_t
7600  **
7601  *****************************************************************************/
7602 
7603 xcb_list_fonts_with_info_cookie_t
7604 xcb_list_fonts_with_info_unchecked (xcb_connection_t *c  /**< */,
7605                                     uint16_t          max_names  /**< */,
7606                                     uint16_t          pattern_len  /**< */,
7607                                     const char       *pattern  /**< */)
7608 {
7609     static const xcb_protocol_request_t xcb_req = {
7610         /* count */ 4,
7611         /* ext */ 0,
7612         /* opcode */ XCB_LIST_FONTS_WITH_INFO,
7613         /* isvoid */ 0
7614     };
7615 
7616     struct iovec xcb_parts[6];
7617     xcb_list_fonts_with_info_cookie_t xcb_ret;
7618     xcb_list_fonts_with_info_request_t xcb_out;
7619 
7620     xcb_out.pad0 = 0;
7621     xcb_out.max_names = max_names;
7622     xcb_out.pattern_len = pattern_len;
7623 
7624     xcb_parts[2].iov_base = (char *) &xcb_out;
7625     xcb_parts[2].iov_len = sizeof(xcb_out);
7626     xcb_parts[3].iov_base = 0;
7627     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7628     /* char pattern */
7629     xcb_parts[4].iov_base = (char *) pattern;
7630     xcb_parts[4].iov_len = pattern_len * sizeof(char);
7631     xcb_parts[5].iov_base = 0;
7632     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7633 
7634     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7635     return xcb_ret;
7636 }
7637 
7638 
7639 /*****************************************************************************
7640  **
7641  ** xcb_fontprop_t * xcb_list_fonts_with_info_properties
7642  **
7643  ** @param const xcb_list_fonts_with_info_reply_t *R
7644  ** @returns xcb_fontprop_t *
7645  **
7646  *****************************************************************************/
7647 
7648 xcb_fontprop_t *
7649 xcb_list_fonts_with_info_properties (const xcb_list_fonts_with_info_reply_t *R  /**< */)
7650 {
7651     return (xcb_fontprop_t *) (R + 1);
7652 }
7653 
7654 
7655 /*****************************************************************************
7656  **
7657  ** int xcb_list_fonts_with_info_properties_length
7658  **
7659  ** @param const xcb_list_fonts_with_info_reply_t *R
7660  ** @returns int
7661  **
7662  *****************************************************************************/
7663 
7664 int
7665 xcb_list_fonts_with_info_properties_length (const xcb_list_fonts_with_info_reply_t *R  /**< */)
7666 {
7667     return R->properties_len;
7668 }
7669 
7670 
7671 /*****************************************************************************
7672  **
7673  ** xcb_fontprop_iterator_t xcb_list_fonts_with_info_properties_iterator
7674  **
7675  ** @param const xcb_list_fonts_with_info_reply_t *R
7676  ** @returns xcb_fontprop_iterator_t
7677  **
7678  *****************************************************************************/
7679 
7680 xcb_fontprop_iterator_t
7681 xcb_list_fonts_with_info_properties_iterator (const xcb_list_fonts_with_info_reply_t *R  /**< */)
7682 {
7683     xcb_fontprop_iterator_t i;
7684     i.data = (xcb_fontprop_t *) (R + 1);
7685     i.rem = R->properties_len;
7686     i.index = (char *) i.data - (char *) R;
7687     return i;
7688 }
7689 
7690 
7691 /*****************************************************************************
7692  **
7693  ** char * xcb_list_fonts_with_info_name
7694  **
7695  ** @param const xcb_list_fonts_with_info_reply_t *R
7696  ** @returns char *
7697  **
7698  *****************************************************************************/
7699 
7700 char *
7701 xcb_list_fonts_with_info_name (const xcb_list_fonts_with_info_reply_t *R  /**< */)
7702 {
7703     xcb_generic_iterator_t prev = xcb_fontprop_end(xcb_list_fonts_with_info_properties_iterator(R));
7704     return (char *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0);
7705 }
7706 
7707 
7708 /*****************************************************************************
7709  **
7710  ** int xcb_list_fonts_with_info_name_length
7711  **
7712  ** @param const xcb_list_fonts_with_info_reply_t *R
7713  ** @returns int
7714  **
7715  *****************************************************************************/
7716 
7717 int
7718 xcb_list_fonts_with_info_name_length (const xcb_list_fonts_with_info_reply_t *R  /**< */)
7719 {
7720     return R->name_len;
7721 }
7722 
7723 
7724 /*****************************************************************************
7725  **
7726  ** xcb_generic_iterator_t xcb_list_fonts_with_info_name_end
7727  **
7728  ** @param const xcb_list_fonts_with_info_reply_t *R
7729  ** @returns xcb_generic_iterator_t
7730  **
7731  *****************************************************************************/
7732 
7733 xcb_generic_iterator_t
7734 xcb_list_fonts_with_info_name_end (const xcb_list_fonts_with_info_reply_t *R  /**< */)
7735 {
7736     xcb_generic_iterator_t i;
7737     xcb_generic_iterator_t child = xcb_fontprop_end(xcb_list_fonts_with_info_properties_iterator(R));
7738     i.data = ((char *) child.data) + (R->name_len);
7739     i.rem = 0;
7740     i.index = (char *) i.data - (char *) R;
7741     return i;
7742 }
7743 
7744 
7745 /*****************************************************************************
7746  **
7747  ** xcb_list_fonts_with_info_reply_t * xcb_list_fonts_with_info_reply
7748  **
7749  ** @param xcb_connection_t                   *c
7750  ** @param xcb_list_fonts_with_info_cookie_t   cookie
7751  ** @param xcb_generic_error_t               **e
7752  ** @returns xcb_list_fonts_with_info_reply_t *
7753  **
7754  *****************************************************************************/
7755 
7756 xcb_list_fonts_with_info_reply_t *
7757 xcb_list_fonts_with_info_reply (xcb_connection_t                   *c  /**< */,
7758                                 xcb_list_fonts_with_info_cookie_t   cookie  /**< */,
7759                                 xcb_generic_error_t               **e  /**< */)
7760 {
7761     return (xcb_list_fonts_with_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7762 }
7763 
7764 int
7765 xcb_set_font_path_sizeof (const void  *_buffer  /**< */)
7766 {
7767     char *xcb_tmp = (char *)_buffer;
7768     const xcb_set_font_path_request_t *_aux = (xcb_set_font_path_request_t *)_buffer;
7769     unsigned int xcb_buffer_len = 0;
7770     unsigned int xcb_block_len = 0;
7771     unsigned int xcb_pad = 0;
7772     unsigned int xcb_align_to = 0;
7773 
7774     unsigned int i;
7775     unsigned int xcb_tmp_len;
7776 
7777     xcb_block_len += sizeof(xcb_set_font_path_request_t);
7778     xcb_tmp += xcb_block_len;
7779     xcb_buffer_len += xcb_block_len;
7780     xcb_block_len = 0;
7781     /* font */
7782     for(i=0; i<_aux->font_qty; i++) {
7783         xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
7784         xcb_block_len += xcb_tmp_len;
7785         xcb_tmp += xcb_tmp_len;
7786     }
7787     xcb_align_to = ALIGNOF(xcb_str_t);
7788     /* insert padding */
7789     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7790     xcb_buffer_len += xcb_block_len + xcb_pad;
7791     if (0 != xcb_pad) {
7792         xcb_tmp += xcb_pad;
7793         xcb_pad = 0;
7794     }
7795     xcb_block_len = 0;
7796 
7797     return xcb_buffer_len;
7798 }
7799 
7800 
7801 /*****************************************************************************
7802  **
7803  ** xcb_void_cookie_t xcb_set_font_path_checked
7804  **
7805  ** @param xcb_connection_t *c
7806  ** @param uint16_t          font_qty
7807  ** @param const xcb_str_t  *font
7808  ** @returns xcb_void_cookie_t
7809  **
7810  *****************************************************************************/
7811 
7812 xcb_void_cookie_t
7813 xcb_set_font_path_checked (xcb_connection_t *c  /**< */,
7814                            uint16_t          font_qty  /**< */,
7815                            const xcb_str_t  *font  /**< */)
7816 {
7817     static const xcb_protocol_request_t xcb_req = {
7818         /* count */ 4,
7819         /* ext */ 0,
7820         /* opcode */ XCB_SET_FONT_PATH,
7821         /* isvoid */ 1
7822     };
7823 
7824     struct iovec xcb_parts[6];
7825     xcb_void_cookie_t xcb_ret;
7826     xcb_set_font_path_request_t xcb_out;
7827     unsigned int i;
7828     unsigned int xcb_tmp_len;
7829     char *xcb_tmp;
7830 
7831     xcb_out.pad0 = 0;
7832     xcb_out.font_qty = font_qty;
7833     memset(xcb_out.pad1, 0, 2);
7834 
7835     xcb_parts[2].iov_base = (char *) &xcb_out;
7836     xcb_parts[2].iov_len = sizeof(xcb_out);
7837     xcb_parts[3].iov_base = 0;
7838     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7839     /* xcb_str_t font */
7840     xcb_parts[4].iov_base = (char *) font;
7841     xcb_parts[4].iov_len = 0;
7842     xcb_tmp = (char *)font;
7843     for(i=0; i<font_qty; i++) {
7844         xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
7845         xcb_parts[4].iov_len += xcb_tmp_len;
7846         xcb_tmp += xcb_tmp_len;
7847     }
7848     xcb_parts[5].iov_base = 0;
7849     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7850 
7851     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7852     return xcb_ret;
7853 }
7854 
7855 
7856 /*****************************************************************************
7857  **
7858  ** xcb_void_cookie_t xcb_set_font_path
7859  **
7860  ** @param xcb_connection_t *c
7861  ** @param uint16_t          font_qty
7862  ** @param const xcb_str_t  *font
7863  ** @returns xcb_void_cookie_t
7864  **
7865  *****************************************************************************/
7866 
7867 xcb_void_cookie_t
7868 xcb_set_font_path (xcb_connection_t *c  /**< */,
7869                    uint16_t          font_qty  /**< */,
7870                    const xcb_str_t  *font  /**< */)
7871 {
7872     static const xcb_protocol_request_t xcb_req = {
7873         /* count */ 4,
7874         /* ext */ 0,
7875         /* opcode */ XCB_SET_FONT_PATH,
7876         /* isvoid */ 1
7877     };
7878 
7879     struct iovec xcb_parts[6];
7880     xcb_void_cookie_t xcb_ret;
7881     xcb_set_font_path_request_t xcb_out;
7882     unsigned int i;
7883     unsigned int xcb_tmp_len;
7884     char *xcb_tmp;
7885 
7886     xcb_out.pad0 = 0;
7887     xcb_out.font_qty = font_qty;
7888     memset(xcb_out.pad1, 0, 2);
7889 
7890     xcb_parts[2].iov_base = (char *) &xcb_out;
7891     xcb_parts[2].iov_len = sizeof(xcb_out);
7892     xcb_parts[3].iov_base = 0;
7893     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7894     /* xcb_str_t font */
7895     xcb_parts[4].iov_base = (char *) font;
7896     xcb_parts[4].iov_len = 0;
7897     xcb_tmp = (char *)font;
7898     for(i=0; i<font_qty; i++) {
7899         xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
7900         xcb_parts[4].iov_len += xcb_tmp_len;
7901         xcb_tmp += xcb_tmp_len;
7902     }
7903     xcb_parts[5].iov_base = 0;
7904     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7905 
7906     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7907     return xcb_ret;
7908 }
7909 
7910 int
7911 xcb_get_font_path_sizeof (const void  *_buffer  /**< */)
7912 {
7913     char *xcb_tmp = (char *)_buffer;
7914     const xcb_get_font_path_reply_t *_aux = (xcb_get_font_path_reply_t *)_buffer;
7915     unsigned int xcb_buffer_len = 0;
7916     unsigned int xcb_block_len = 0;
7917     unsigned int xcb_pad = 0;
7918     unsigned int xcb_align_to = 0;
7919 
7920     unsigned int i;
7921     unsigned int xcb_tmp_len;
7922 
7923     xcb_block_len += sizeof(xcb_get_font_path_reply_t);
7924     xcb_tmp += xcb_block_len;
7925     xcb_buffer_len += xcb_block_len;
7926     xcb_block_len = 0;
7927     /* path */
7928     for(i=0; i<_aux->path_len; i++) {
7929         xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
7930         xcb_block_len += xcb_tmp_len;
7931         xcb_tmp += xcb_tmp_len;
7932     }
7933     xcb_align_to = ALIGNOF(xcb_str_t);
7934     /* insert padding */
7935     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7936     xcb_buffer_len += xcb_block_len + xcb_pad;
7937     if (0 != xcb_pad) {
7938         xcb_tmp += xcb_pad;
7939         xcb_pad = 0;
7940     }
7941     xcb_block_len = 0;
7942 
7943     return xcb_buffer_len;
7944 }
7945 
7946 
7947 /*****************************************************************************
7948  **
7949  ** xcb_get_font_path_cookie_t xcb_get_font_path
7950  **
7951  ** @param xcb_connection_t *c
7952  ** @returns xcb_get_font_path_cookie_t
7953  **
7954  *****************************************************************************/
7955 
7956 xcb_get_font_path_cookie_t
7957 xcb_get_font_path (xcb_connection_t *c  /**< */)
7958 {
7959     static const xcb_protocol_request_t xcb_req = {
7960         /* count */ 2,
7961         /* ext */ 0,
7962         /* opcode */ XCB_GET_FONT_PATH,
7963         /* isvoid */ 0
7964     };
7965 
7966     struct iovec xcb_parts[4];
7967     xcb_get_font_path_cookie_t xcb_ret;
7968     xcb_get_font_path_request_t xcb_out;
7969 
7970     xcb_out.pad0 = 0;
7971 
7972     xcb_parts[2].iov_base = (char *) &xcb_out;
7973     xcb_parts[2].iov_len = sizeof(xcb_out);
7974     xcb_parts[3].iov_base = 0;
7975     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7976 
7977     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7978     return xcb_ret;
7979 }
7980 
7981 
7982 /*****************************************************************************
7983  **
7984  ** xcb_get_font_path_cookie_t xcb_get_font_path_unchecked
7985  **
7986  ** @param xcb_connection_t *c
7987  ** @returns xcb_get_font_path_cookie_t
7988  **
7989  *****************************************************************************/
7990 
7991 xcb_get_font_path_cookie_t
7992 xcb_get_font_path_unchecked (xcb_connection_t *c  /**< */)
7993 {
7994     static const xcb_protocol_request_t xcb_req = {
7995         /* count */ 2,
7996         /* ext */ 0,
7997         /* opcode */ XCB_GET_FONT_PATH,
7998         /* isvoid */ 0
7999     };
8000 
8001     struct iovec xcb_parts[4];
8002     xcb_get_font_path_cookie_t xcb_ret;
8003     xcb_get_font_path_request_t xcb_out;
8004 
8005     xcb_out.pad0 = 0;
8006 
8007     xcb_parts[2].iov_base = (char *) &xcb_out;
8008     xcb_parts[2].iov_len = sizeof(xcb_out);
8009     xcb_parts[3].iov_base = 0;
8010     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8011 
8012     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8013     return xcb_ret;
8014 }
8015 
8016 
8017 /*****************************************************************************
8018  **
8019  ** int xcb_get_font_path_path_length
8020  **
8021  ** @param const xcb_get_font_path_reply_t *R
8022  ** @returns int
8023  **
8024  *****************************************************************************/
8025 
8026 int
8027 xcb_get_font_path_path_length (const xcb_get_font_path_reply_t *R  /**< */)
8028 {
8029     return R->path_len;
8030 }
8031 
8032 
8033 /*****************************************************************************
8034  **
8035  ** xcb_str_iterator_t xcb_get_font_path_path_iterator
8036  **
8037  ** @param const xcb_get_font_path_reply_t *R
8038  ** @returns xcb_str_iterator_t
8039  **
8040  *****************************************************************************/
8041 
8042 xcb_str_iterator_t
8043 xcb_get_font_path_path_iterator (const xcb_get_font_path_reply_t *R  /**< */)
8044 {
8045     xcb_str_iterator_t i;
8046     i.data = (xcb_str_t *) (R + 1);
8047     i.rem = R->path_len;
8048     i.index = (char *) i.data - (char *) R;
8049     return i;
8050 }
8051 
8052 
8053 /*****************************************************************************
8054  **
8055  ** xcb_get_font_path_reply_t * xcb_get_font_path_reply
8056  **
8057  ** @param xcb_connection_t            *c
8058  ** @param xcb_get_font_path_cookie_t   cookie
8059  ** @param xcb_generic_error_t        **e
8060  ** @returns xcb_get_font_path_reply_t *
8061  **
8062  *****************************************************************************/
8063 
8064 xcb_get_font_path_reply_t *
8065 xcb_get_font_path_reply (xcb_connection_t            *c  /**< */,
8066                          xcb_get_font_path_cookie_t   cookie  /**< */,
8067                          xcb_generic_error_t        **e  /**< */)
8068 {
8069     return (xcb_get_font_path_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8070 }
8071 
8072 
8073 /*****************************************************************************
8074  **
8075  ** xcb_void_cookie_t xcb_create_pixmap_checked
8076  **
8077  ** @param xcb_connection_t *c
8078  ** @param uint8_t           depth
8079  ** @param xcb_pixmap_t      pid
8080  ** @param xcb_drawable_t    drawable
8081  ** @param uint16_t          width
8082  ** @param uint16_t          height
8083  ** @returns xcb_void_cookie_t
8084  **
8085  *****************************************************************************/
8086 
8087 xcb_void_cookie_t
8088 xcb_create_pixmap_checked (xcb_connection_t *c  /**< */,
8089                            uint8_t           depth  /**< */,
8090                            xcb_pixmap_t      pid  /**< */,
8091                            xcb_drawable_t    drawable  /**< */,
8092                            uint16_t          width  /**< */,
8093                            uint16_t          height  /**< */)
8094 {
8095     static const xcb_protocol_request_t xcb_req = {
8096         /* count */ 2,
8097         /* ext */ 0,
8098         /* opcode */ XCB_CREATE_PIXMAP,
8099         /* isvoid */ 1
8100     };
8101 
8102     struct iovec xcb_parts[4];
8103     xcb_void_cookie_t xcb_ret;
8104     xcb_create_pixmap_request_t xcb_out;
8105 
8106     xcb_out.depth = depth;
8107     xcb_out.pid = pid;
8108     xcb_out.drawable = drawable;
8109     xcb_out.width = width;
8110     xcb_out.height = height;
8111 
8112     xcb_parts[2].iov_base = (char *) &xcb_out;
8113     xcb_parts[2].iov_len = sizeof(xcb_out);
8114     xcb_parts[3].iov_base = 0;
8115     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8116 
8117     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8118     return xcb_ret;
8119 }
8120 
8121 
8122 /*****************************************************************************
8123  **
8124  ** xcb_void_cookie_t xcb_create_pixmap
8125  **
8126  ** @param xcb_connection_t *c
8127  ** @param uint8_t           depth
8128  ** @param xcb_pixmap_t      pid
8129  ** @param xcb_drawable_t    drawable
8130  ** @param uint16_t          width
8131  ** @param uint16_t          height
8132  ** @returns xcb_void_cookie_t
8133  **
8134  *****************************************************************************/
8135 
8136 xcb_void_cookie_t
8137 xcb_create_pixmap (xcb_connection_t *c  /**< */,
8138                    uint8_t           depth  /**< */,
8139                    xcb_pixmap_t      pid  /**< */,
8140                    xcb_drawable_t    drawable  /**< */,
8141                    uint16_t          width  /**< */,
8142                    uint16_t          height  /**< */)
8143 {
8144     static const xcb_protocol_request_t xcb_req = {
8145         /* count */ 2,
8146         /* ext */ 0,
8147         /* opcode */ XCB_CREATE_PIXMAP,
8148         /* isvoid */ 1
8149     };
8150 
8151     struct iovec xcb_parts[4];
8152     xcb_void_cookie_t xcb_ret;
8153     xcb_create_pixmap_request_t xcb_out;
8154 
8155     xcb_out.depth = depth;
8156     xcb_out.pid = pid;
8157     xcb_out.drawable = drawable;
8158     xcb_out.width = width;
8159     xcb_out.height = height;
8160 
8161     xcb_parts[2].iov_base = (char *) &xcb_out;
8162     xcb_parts[2].iov_len = sizeof(xcb_out);
8163     xcb_parts[3].iov_base = 0;
8164     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8165 
8166     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8167     return xcb_ret;
8168 }
8169 
8170 
8171 /*****************************************************************************
8172  **
8173  ** xcb_void_cookie_t xcb_free_pixmap_checked
8174  **
8175  ** @param xcb_connection_t *c
8176  ** @param xcb_pixmap_t      pixmap
8177  ** @returns xcb_void_cookie_t
8178  **
8179  *****************************************************************************/
8180 
8181 xcb_void_cookie_t
8182 xcb_free_pixmap_checked (xcb_connection_t *c  /**< */,
8183                          xcb_pixmap_t      pixmap  /**< */)
8184 {
8185     static const xcb_protocol_request_t xcb_req = {
8186         /* count */ 2,
8187         /* ext */ 0,
8188         /* opcode */ XCB_FREE_PIXMAP,
8189         /* isvoid */ 1
8190     };
8191 
8192     struct iovec xcb_parts[4];
8193     xcb_void_cookie_t xcb_ret;
8194     xcb_free_pixmap_request_t xcb_out;
8195 
8196     xcb_out.pad0 = 0;
8197     xcb_out.pixmap = pixmap;
8198 
8199     xcb_parts[2].iov_base = (char *) &xcb_out;
8200     xcb_parts[2].iov_len = sizeof(xcb_out);
8201     xcb_parts[3].iov_base = 0;
8202     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8203 
8204     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8205     return xcb_ret;
8206 }
8207 
8208 
8209 /*****************************************************************************
8210  **
8211  ** xcb_void_cookie_t xcb_free_pixmap
8212  **
8213  ** @param xcb_connection_t *c
8214  ** @param xcb_pixmap_t      pixmap
8215  ** @returns xcb_void_cookie_t
8216  **
8217  *****************************************************************************/
8218 
8219 xcb_void_cookie_t
8220 xcb_free_pixmap (xcb_connection_t *c  /**< */,
8221                  xcb_pixmap_t      pixmap  /**< */)
8222 {
8223     static const xcb_protocol_request_t xcb_req = {
8224         /* count */ 2,
8225         /* ext */ 0,
8226         /* opcode */ XCB_FREE_PIXMAP,
8227         /* isvoid */ 1
8228     };
8229 
8230     struct iovec xcb_parts[4];
8231     xcb_void_cookie_t xcb_ret;
8232     xcb_free_pixmap_request_t xcb_out;
8233 
8234     xcb_out.pad0 = 0;
8235     xcb_out.pixmap = pixmap;
8236 
8237     xcb_parts[2].iov_base = (char *) &xcb_out;
8238     xcb_parts[2].iov_len = sizeof(xcb_out);
8239     xcb_parts[3].iov_base = 0;
8240     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8241 
8242     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8243     return xcb_ret;
8244 }
8245 
8246 int
8247 xcb_create_gc_sizeof (const void  *_buffer  /**< */)
8248 {
8249     char *xcb_tmp = (char *)_buffer;
8250     const xcb_create_gc_request_t *_aux = (xcb_create_gc_request_t *)_buffer;
8251     unsigned int xcb_buffer_len = 0;
8252     unsigned int xcb_block_len = 0;
8253     unsigned int xcb_pad = 0;
8254     unsigned int xcb_align_to = 0;
8255 
8256 
8257     xcb_block_len += sizeof(xcb_create_gc_request_t);
8258     xcb_tmp += xcb_block_len;
8259     xcb_buffer_len += xcb_block_len;
8260     xcb_block_len = 0;
8261     /* value_list */
8262     xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
8263     xcb_tmp += xcb_block_len;
8264     xcb_align_to = ALIGNOF(uint32_t);
8265     /* insert padding */
8266     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8267     xcb_buffer_len += xcb_block_len + xcb_pad;
8268     if (0 != xcb_pad) {
8269         xcb_tmp += xcb_pad;
8270         xcb_pad = 0;
8271     }
8272     xcb_block_len = 0;
8273 
8274     return xcb_buffer_len;
8275 }
8276 
8277 
8278 /*****************************************************************************
8279  **
8280  ** xcb_void_cookie_t xcb_create_gc_checked
8281  **
8282  ** @param xcb_connection_t *c
8283  ** @param xcb_gcontext_t    cid
8284  ** @param xcb_drawable_t    drawable
8285  ** @param uint32_t          value_mask
8286  ** @param const uint32_t   *value_list
8287  ** @returns xcb_void_cookie_t
8288  **
8289  *****************************************************************************/
8290 
8291 xcb_void_cookie_t
8292 xcb_create_gc_checked (xcb_connection_t *c  /**< */,
8293                        xcb_gcontext_t    cid  /**< */,
8294                        xcb_drawable_t    drawable  /**< */,
8295                        uint32_t          value_mask  /**< */,
8296                        const uint32_t   *value_list  /**< */)
8297 {
8298     static const xcb_protocol_request_t xcb_req = {
8299         /* count */ 4,
8300         /* ext */ 0,
8301         /* opcode */ XCB_CREATE_GC,
8302         /* isvoid */ 1
8303     };
8304 
8305     struct iovec xcb_parts[6];
8306     xcb_void_cookie_t xcb_ret;
8307     xcb_create_gc_request_t xcb_out;
8308 
8309     xcb_out.pad0 = 0;
8310     xcb_out.cid = cid;
8311     xcb_out.drawable = drawable;
8312     xcb_out.value_mask = value_mask;
8313 
8314     xcb_parts[2].iov_base = (char *) &xcb_out;
8315     xcb_parts[2].iov_len = sizeof(xcb_out);
8316     xcb_parts[3].iov_base = 0;
8317     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8318     /* uint32_t value_list */
8319     xcb_parts[4].iov_base = (char *) value_list;
8320     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
8321     xcb_parts[5].iov_base = 0;
8322     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8323 
8324     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8325     return xcb_ret;
8326 }
8327 
8328 
8329 /*****************************************************************************
8330  **
8331  ** xcb_void_cookie_t xcb_create_gc
8332  **
8333  ** @param xcb_connection_t *c
8334  ** @param xcb_gcontext_t    cid
8335  ** @param xcb_drawable_t    drawable
8336  ** @param uint32_t          value_mask
8337  ** @param const uint32_t   *value_list
8338  ** @returns xcb_void_cookie_t
8339  **
8340  *****************************************************************************/
8341 
8342 xcb_void_cookie_t
8343 xcb_create_gc (xcb_connection_t *c  /**< */,
8344                xcb_gcontext_t    cid  /**< */,
8345                xcb_drawable_t    drawable  /**< */,
8346                uint32_t          value_mask  /**< */,
8347                const uint32_t   *value_list  /**< */)
8348 {
8349     static const xcb_protocol_request_t xcb_req = {
8350         /* count */ 4,
8351         /* ext */ 0,
8352         /* opcode */ XCB_CREATE_GC,
8353         /* isvoid */ 1
8354     };
8355 
8356     struct iovec xcb_parts[6];
8357     xcb_void_cookie_t xcb_ret;
8358     xcb_create_gc_request_t xcb_out;
8359 
8360     xcb_out.pad0 = 0;
8361     xcb_out.cid = cid;
8362     xcb_out.drawable = drawable;
8363     xcb_out.value_mask = value_mask;
8364 
8365     xcb_parts[2].iov_base = (char *) &xcb_out;
8366     xcb_parts[2].iov_len = sizeof(xcb_out);
8367     xcb_parts[3].iov_base = 0;
8368     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8369     /* uint32_t value_list */
8370     xcb_parts[4].iov_base = (char *) value_list;
8371     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
8372     xcb_parts[5].iov_base = 0;
8373     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8374 
8375     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8376     return xcb_ret;
8377 }
8378 
8379 int
8380 xcb_change_gc_sizeof (const void  *_buffer  /**< */)
8381 {
8382     char *xcb_tmp = (char *)_buffer;
8383     const xcb_change_gc_request_t *_aux = (xcb_change_gc_request_t *)_buffer;
8384     unsigned int xcb_buffer_len = 0;
8385     unsigned int xcb_block_len = 0;
8386     unsigned int xcb_pad = 0;
8387     unsigned int xcb_align_to = 0;
8388 
8389 
8390     xcb_block_len += sizeof(xcb_change_gc_request_t);
8391     xcb_tmp += xcb_block_len;
8392     xcb_buffer_len += xcb_block_len;
8393     xcb_block_len = 0;
8394     /* value_list */
8395     xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
8396     xcb_tmp += xcb_block_len;
8397     xcb_align_to = ALIGNOF(uint32_t);
8398     /* insert padding */
8399     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8400     xcb_buffer_len += xcb_block_len + xcb_pad;
8401     if (0 != xcb_pad) {
8402         xcb_tmp += xcb_pad;
8403         xcb_pad = 0;
8404     }
8405     xcb_block_len = 0;
8406 
8407     return xcb_buffer_len;
8408 }
8409 
8410 
8411 /*****************************************************************************
8412  **
8413  ** xcb_void_cookie_t xcb_change_gc_checked
8414  **
8415  ** @param xcb_connection_t *c
8416  ** @param xcb_gcontext_t    gc
8417  ** @param uint32_t          value_mask
8418  ** @param const uint32_t   *value_list
8419  ** @returns xcb_void_cookie_t
8420  **
8421  *****************************************************************************/
8422 
8423 xcb_void_cookie_t
8424 xcb_change_gc_checked (xcb_connection_t *c  /**< */,
8425                        xcb_gcontext_t    gc  /**< */,
8426                        uint32_t          value_mask  /**< */,
8427                        const uint32_t   *value_list  /**< */)
8428 {
8429     static const xcb_protocol_request_t xcb_req = {
8430         /* count */ 4,
8431         /* ext */ 0,
8432         /* opcode */ XCB_CHANGE_GC,
8433         /* isvoid */ 1
8434     };
8435 
8436     struct iovec xcb_parts[6];
8437     xcb_void_cookie_t xcb_ret;
8438     xcb_change_gc_request_t xcb_out;
8439 
8440     xcb_out.pad0 = 0;
8441     xcb_out.gc = gc;
8442     xcb_out.value_mask = value_mask;
8443 
8444     xcb_parts[2].iov_base = (char *) &xcb_out;
8445     xcb_parts[2].iov_len = sizeof(xcb_out);
8446     xcb_parts[3].iov_base = 0;
8447     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8448     /* uint32_t value_list */
8449     xcb_parts[4].iov_base = (char *) value_list;
8450     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
8451     xcb_parts[5].iov_base = 0;
8452     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8453 
8454     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8455     return xcb_ret;
8456 }
8457 
8458 
8459 /*****************************************************************************
8460  **
8461  ** xcb_void_cookie_t xcb_change_gc
8462  **
8463  ** @param xcb_connection_t *c
8464  ** @param xcb_gcontext_t    gc
8465  ** @param uint32_t          value_mask
8466  ** @param const uint32_t   *value_list
8467  ** @returns xcb_void_cookie_t
8468  **
8469  *****************************************************************************/
8470 
8471 xcb_void_cookie_t
8472 xcb_change_gc (xcb_connection_t *c  /**< */,
8473                xcb_gcontext_t    gc  /**< */,
8474                uint32_t          value_mask  /**< */,
8475                const uint32_t   *value_list  /**< */)
8476 {
8477     static const xcb_protocol_request_t xcb_req = {
8478         /* count */ 4,
8479         /* ext */ 0,
8480         /* opcode */ XCB_CHANGE_GC,
8481         /* isvoid */ 1
8482     };
8483 
8484     struct iovec xcb_parts[6];
8485     xcb_void_cookie_t xcb_ret;
8486     xcb_change_gc_request_t xcb_out;
8487 
8488     xcb_out.pad0 = 0;
8489     xcb_out.gc = gc;
8490     xcb_out.value_mask = value_mask;
8491 
8492     xcb_parts[2].iov_base = (char *) &xcb_out;
8493     xcb_parts[2].iov_len = sizeof(xcb_out);
8494     xcb_parts[3].iov_base = 0;
8495     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8496     /* uint32_t value_list */
8497     xcb_parts[4].iov_base = (char *) value_list;
8498     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
8499     xcb_parts[5].iov_base = 0;
8500     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8501 
8502     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8503     return xcb_ret;
8504 }
8505 
8506 
8507 /*****************************************************************************
8508  **
8509  ** xcb_void_cookie_t xcb_copy_gc_checked
8510  **
8511  ** @param xcb_connection_t *c
8512  ** @param xcb_gcontext_t    src_gc
8513  ** @param xcb_gcontext_t    dst_gc
8514  ** @param uint32_t          value_mask
8515  ** @returns xcb_void_cookie_t
8516  **
8517  *****************************************************************************/
8518 
8519 xcb_void_cookie_t
8520 xcb_copy_gc_checked (xcb_connection_t *c  /**< */,
8521                      xcb_gcontext_t    src_gc  /**< */,
8522                      xcb_gcontext_t    dst_gc  /**< */,
8523                      uint32_t          value_mask  /**< */)
8524 {
8525     static const xcb_protocol_request_t xcb_req = {
8526         /* count */ 2,
8527         /* ext */ 0,
8528         /* opcode */ XCB_COPY_GC,
8529         /* isvoid */ 1
8530     };
8531 
8532     struct iovec xcb_parts[4];
8533     xcb_void_cookie_t xcb_ret;
8534     xcb_copy_gc_request_t xcb_out;
8535 
8536     xcb_out.pad0 = 0;
8537     xcb_out.src_gc = src_gc;
8538     xcb_out.dst_gc = dst_gc;
8539     xcb_out.value_mask = value_mask;
8540 
8541     xcb_parts[2].iov_base = (char *) &xcb_out;
8542     xcb_parts[2].iov_len = sizeof(xcb_out);
8543     xcb_parts[3].iov_base = 0;
8544     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8545 
8546     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8547     return xcb_ret;
8548 }
8549 
8550 
8551 /*****************************************************************************
8552  **
8553  ** xcb_void_cookie_t xcb_copy_gc
8554  **
8555  ** @param xcb_connection_t *c
8556  ** @param xcb_gcontext_t    src_gc
8557  ** @param xcb_gcontext_t    dst_gc
8558  ** @param uint32_t          value_mask
8559  ** @returns xcb_void_cookie_t
8560  **
8561  *****************************************************************************/
8562 
8563 xcb_void_cookie_t
8564 xcb_copy_gc (xcb_connection_t *c  /**< */,
8565              xcb_gcontext_t    src_gc  /**< */,
8566              xcb_gcontext_t    dst_gc  /**< */,
8567              uint32_t          value_mask  /**< */)
8568 {
8569     static const xcb_protocol_request_t xcb_req = {
8570         /* count */ 2,
8571         /* ext */ 0,
8572         /* opcode */ XCB_COPY_GC,
8573         /* isvoid */ 1
8574     };
8575 
8576     struct iovec xcb_parts[4];
8577     xcb_void_cookie_t xcb_ret;
8578     xcb_copy_gc_request_t xcb_out;
8579 
8580     xcb_out.pad0 = 0;
8581     xcb_out.src_gc = src_gc;
8582     xcb_out.dst_gc = dst_gc;
8583     xcb_out.value_mask = value_mask;
8584 
8585     xcb_parts[2].iov_base = (char *) &xcb_out;
8586     xcb_parts[2].iov_len = sizeof(xcb_out);
8587     xcb_parts[3].iov_base = 0;
8588     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8589 
8590     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8591     return xcb_ret;
8592 }
8593 
8594 int
8595 xcb_set_dashes_sizeof (const void  *_buffer  /**< */)
8596 {
8597     char *xcb_tmp = (char *)_buffer;
8598     const xcb_set_dashes_request_t *_aux = (xcb_set_dashes_request_t *)_buffer;
8599     unsigned int xcb_buffer_len = 0;
8600     unsigned int xcb_block_len = 0;
8601     unsigned int xcb_pad = 0;
8602     unsigned int xcb_align_to = 0;
8603 
8604 
8605     xcb_block_len += sizeof(xcb_set_dashes_request_t);
8606     xcb_tmp += xcb_block_len;
8607     xcb_buffer_len += xcb_block_len;
8608     xcb_block_len = 0;
8609     /* dashes */
8610     xcb_block_len += _aux->dashes_len * sizeof(uint8_t);
8611     xcb_tmp += xcb_block_len;
8612     xcb_align_to = ALIGNOF(uint8_t);
8613     /* insert padding */
8614     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8615     xcb_buffer_len += xcb_block_len + xcb_pad;
8616     if (0 != xcb_pad) {
8617         xcb_tmp += xcb_pad;
8618         xcb_pad = 0;
8619     }
8620     xcb_block_len = 0;
8621 
8622     return xcb_buffer_len;
8623 }
8624 
8625 
8626 /*****************************************************************************
8627  **
8628  ** xcb_void_cookie_t xcb_set_dashes_checked
8629  **
8630  ** @param xcb_connection_t *c
8631  ** @param xcb_gcontext_t    gc
8632  ** @param uint16_t          dash_offset
8633  ** @param uint16_t          dashes_len
8634  ** @param const uint8_t    *dashes
8635  ** @returns xcb_void_cookie_t
8636  **
8637  *****************************************************************************/
8638 
8639 xcb_void_cookie_t
8640 xcb_set_dashes_checked (xcb_connection_t *c  /**< */,
8641                         xcb_gcontext_t    gc  /**< */,
8642                         uint16_t          dash_offset  /**< */,
8643                         uint16_t          dashes_len  /**< */,
8644                         const uint8_t    *dashes  /**< */)
8645 {
8646     static const xcb_protocol_request_t xcb_req = {
8647         /* count */ 4,
8648         /* ext */ 0,
8649         /* opcode */ XCB_SET_DASHES,
8650         /* isvoid */ 1
8651     };
8652 
8653     struct iovec xcb_parts[6];
8654     xcb_void_cookie_t xcb_ret;
8655     xcb_set_dashes_request_t xcb_out;
8656 
8657     xcb_out.pad0 = 0;
8658     xcb_out.gc = gc;
8659     xcb_out.dash_offset = dash_offset;
8660     xcb_out.dashes_len = dashes_len;
8661 
8662     xcb_parts[2].iov_base = (char *) &xcb_out;
8663     xcb_parts[2].iov_len = sizeof(xcb_out);
8664     xcb_parts[3].iov_base = 0;
8665     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8666     /* uint8_t dashes */
8667     xcb_parts[4].iov_base = (char *) dashes;
8668     xcb_parts[4].iov_len = dashes_len * sizeof(uint8_t);
8669     xcb_parts[5].iov_base = 0;
8670     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8671 
8672     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8673     return xcb_ret;
8674 }
8675 
8676 
8677 /*****************************************************************************
8678  **
8679  ** xcb_void_cookie_t xcb_set_dashes
8680  **
8681  ** @param xcb_connection_t *c
8682  ** @param xcb_gcontext_t    gc
8683  ** @param uint16_t          dash_offset
8684  ** @param uint16_t          dashes_len
8685  ** @param const uint8_t    *dashes
8686  ** @returns xcb_void_cookie_t
8687  **
8688  *****************************************************************************/
8689 
8690 xcb_void_cookie_t
8691 xcb_set_dashes (xcb_connection_t *c  /**< */,
8692                 xcb_gcontext_t    gc  /**< */,
8693                 uint16_t          dash_offset  /**< */,
8694                 uint16_t          dashes_len  /**< */,
8695                 const uint8_t    *dashes  /**< */)
8696 {
8697     static const xcb_protocol_request_t xcb_req = {
8698         /* count */ 4,
8699         /* ext */ 0,
8700         /* opcode */ XCB_SET_DASHES,
8701         /* isvoid */ 1
8702     };
8703 
8704     struct iovec xcb_parts[6];
8705     xcb_void_cookie_t xcb_ret;
8706     xcb_set_dashes_request_t xcb_out;
8707 
8708     xcb_out.pad0 = 0;
8709     xcb_out.gc = gc;
8710     xcb_out.dash_offset = dash_offset;
8711     xcb_out.dashes_len = dashes_len;
8712 
8713     xcb_parts[2].iov_base = (char *) &xcb_out;
8714     xcb_parts[2].iov_len = sizeof(xcb_out);
8715     xcb_parts[3].iov_base = 0;
8716     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8717     /* uint8_t dashes */
8718     xcb_parts[4].iov_base = (char *) dashes;
8719     xcb_parts[4].iov_len = dashes_len * sizeof(uint8_t);
8720     xcb_parts[5].iov_base = 0;
8721     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8722 
8723     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8724     return xcb_ret;
8725 }
8726 
8727 int
8728 xcb_set_clip_rectangles_sizeof (const void  *_buffer  /**< */,
8729                                 uint32_t     rectangles_len  /**< */)
8730 {
8731     char *xcb_tmp = (char *)_buffer;
8732     unsigned int xcb_buffer_len = 0;
8733     unsigned int xcb_block_len = 0;
8734     unsigned int xcb_pad = 0;
8735     unsigned int xcb_align_to = 0;
8736 
8737 
8738     xcb_block_len += sizeof(xcb_set_clip_rectangles_request_t);
8739     xcb_tmp += xcb_block_len;
8740     xcb_buffer_len += xcb_block_len;
8741     xcb_block_len = 0;
8742     /* rectangles */
8743     xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
8744     xcb_tmp += xcb_block_len;
8745     xcb_align_to = ALIGNOF(xcb_rectangle_t);
8746     /* insert padding */
8747     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8748     xcb_buffer_len += xcb_block_len + xcb_pad;
8749     if (0 != xcb_pad) {
8750         xcb_tmp += xcb_pad;
8751         xcb_pad = 0;
8752     }
8753     xcb_block_len = 0;
8754 
8755     return xcb_buffer_len;
8756 }
8757 
8758 
8759 /*****************************************************************************
8760  **
8761  ** xcb_void_cookie_t xcb_set_clip_rectangles_checked
8762  **
8763  ** @param xcb_connection_t      *c
8764  ** @param uint8_t                ordering
8765  ** @param xcb_gcontext_t         gc
8766  ** @param int16_t                clip_x_origin
8767  ** @param int16_t                clip_y_origin
8768  ** @param uint32_t               rectangles_len
8769  ** @param const xcb_rectangle_t *rectangles
8770  ** @returns xcb_void_cookie_t
8771  **
8772  *****************************************************************************/
8773 
8774 xcb_void_cookie_t
8775 xcb_set_clip_rectangles_checked (xcb_connection_t      *c  /**< */,
8776                                  uint8_t                ordering  /**< */,
8777                                  xcb_gcontext_t         gc  /**< */,
8778                                  int16_t                clip_x_origin  /**< */,
8779                                  int16_t                clip_y_origin  /**< */,
8780                                  uint32_t               rectangles_len  /**< */,
8781                                  const xcb_rectangle_t *rectangles  /**< */)
8782 {
8783     static const xcb_protocol_request_t xcb_req = {
8784         /* count */ 4,
8785         /* ext */ 0,
8786         /* opcode */ XCB_SET_CLIP_RECTANGLES,
8787         /* isvoid */ 1
8788     };
8789 
8790     struct iovec xcb_parts[6];
8791     xcb_void_cookie_t xcb_ret;
8792     xcb_set_clip_rectangles_request_t xcb_out;
8793 
8794     xcb_out.ordering = ordering;
8795     xcb_out.gc = gc;
8796     xcb_out.clip_x_origin = clip_x_origin;
8797     xcb_out.clip_y_origin = clip_y_origin;
8798 
8799     xcb_parts[2].iov_base = (char *) &xcb_out;
8800     xcb_parts[2].iov_len = sizeof(xcb_out);
8801     xcb_parts[3].iov_base = 0;
8802     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8803     /* xcb_rectangle_t rectangles */
8804     xcb_parts[4].iov_base = (char *) rectangles;
8805     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
8806     xcb_parts[5].iov_base = 0;
8807     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8808 
8809     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8810     return xcb_ret;
8811 }
8812 
8813 
8814 /*****************************************************************************
8815  **
8816  ** xcb_void_cookie_t xcb_set_clip_rectangles
8817  **
8818  ** @param xcb_connection_t      *c
8819  ** @param uint8_t                ordering
8820  ** @param xcb_gcontext_t         gc
8821  ** @param int16_t                clip_x_origin
8822  ** @param int16_t                clip_y_origin
8823  ** @param uint32_t               rectangles_len
8824  ** @param const xcb_rectangle_t *rectangles
8825  ** @returns xcb_void_cookie_t
8826  **
8827  *****************************************************************************/
8828 
8829 xcb_void_cookie_t
8830 xcb_set_clip_rectangles (xcb_connection_t      *c  /**< */,
8831                          uint8_t                ordering  /**< */,
8832                          xcb_gcontext_t         gc  /**< */,
8833                          int16_t                clip_x_origin  /**< */,
8834                          int16_t                clip_y_origin  /**< */,
8835                          uint32_t               rectangles_len  /**< */,
8836                          const xcb_rectangle_t *rectangles  /**< */)
8837 {
8838     static const xcb_protocol_request_t xcb_req = {
8839         /* count */ 4,
8840         /* ext */ 0,
8841         /* opcode */ XCB_SET_CLIP_RECTANGLES,
8842         /* isvoid */ 1
8843     };
8844 
8845     struct iovec xcb_parts[6];
8846     xcb_void_cookie_t xcb_ret;
8847     xcb_set_clip_rectangles_request_t xcb_out;
8848 
8849     xcb_out.ordering = ordering;
8850     xcb_out.gc = gc;
8851     xcb_out.clip_x_origin = clip_x_origin;
8852     xcb_out.clip_y_origin = clip_y_origin;
8853 
8854     xcb_parts[2].iov_base = (char *) &xcb_out;
8855     xcb_parts[2].iov_len = sizeof(xcb_out);
8856     xcb_parts[3].iov_base = 0;
8857     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8858     /* xcb_rectangle_t rectangles */
8859     xcb_parts[4].iov_base = (char *) rectangles;
8860     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
8861     xcb_parts[5].iov_base = 0;
8862     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8863 
8864     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8865     return xcb_ret;
8866 }
8867 
8868 
8869 /*****************************************************************************
8870  **
8871  ** xcb_void_cookie_t xcb_free_gc_checked
8872  **
8873  ** @param xcb_connection_t *c
8874  ** @param xcb_gcontext_t    gc
8875  ** @returns xcb_void_cookie_t
8876  **
8877  *****************************************************************************/
8878 
8879 xcb_void_cookie_t
8880 xcb_free_gc_checked (xcb_connection_t *c  /**< */,
8881                      xcb_gcontext_t    gc  /**< */)
8882 {
8883     static const xcb_protocol_request_t xcb_req = {
8884         /* count */ 2,
8885         /* ext */ 0,
8886         /* opcode */ XCB_FREE_GC,
8887         /* isvoid */ 1
8888     };
8889 
8890     struct iovec xcb_parts[4];
8891     xcb_void_cookie_t xcb_ret;
8892     xcb_free_gc_request_t xcb_out;
8893 
8894     xcb_out.pad0 = 0;
8895     xcb_out.gc = gc;
8896 
8897     xcb_parts[2].iov_base = (char *) &xcb_out;
8898     xcb_parts[2].iov_len = sizeof(xcb_out);
8899     xcb_parts[3].iov_base = 0;
8900     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8901 
8902     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8903     return xcb_ret;
8904 }
8905 
8906 
8907 /*****************************************************************************
8908  **
8909  ** xcb_void_cookie_t xcb_free_gc
8910  **
8911  ** @param xcb_connection_t *c
8912  ** @param xcb_gcontext_t    gc
8913  ** @returns xcb_void_cookie_t
8914  **
8915  *****************************************************************************/
8916 
8917 xcb_void_cookie_t
8918 xcb_free_gc (xcb_connection_t *c  /**< */,
8919              xcb_gcontext_t    gc  /**< */)
8920 {
8921     static const xcb_protocol_request_t xcb_req = {
8922         /* count */ 2,
8923         /* ext */ 0,
8924         /* opcode */ XCB_FREE_GC,
8925         /* isvoid */ 1
8926     };
8927 
8928     struct iovec xcb_parts[4];
8929     xcb_void_cookie_t xcb_ret;
8930     xcb_free_gc_request_t xcb_out;
8931 
8932     xcb_out.pad0 = 0;
8933     xcb_out.gc = gc;
8934 
8935     xcb_parts[2].iov_base = (char *) &xcb_out;
8936     xcb_parts[2].iov_len = sizeof(xcb_out);
8937     xcb_parts[3].iov_base = 0;
8938     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8939 
8940     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8941     return xcb_ret;
8942 }
8943 
8944 
8945 /*****************************************************************************
8946  **
8947  ** xcb_void_cookie_t xcb_clear_area_checked
8948  **
8949  ** @param xcb_connection_t *c
8950  ** @param uint8_t           exposures
8951  ** @param xcb_window_t      window
8952  ** @param int16_t           x
8953  ** @param int16_t           y
8954  ** @param uint16_t          width
8955  ** @param uint16_t          height
8956  ** @returns xcb_void_cookie_t
8957  **
8958  *****************************************************************************/
8959 
8960 xcb_void_cookie_t
8961 xcb_clear_area_checked (xcb_connection_t *c  /**< */,
8962                         uint8_t           exposures  /**< */,
8963                         xcb_window_t      window  /**< */,
8964                         int16_t           x  /**< */,
8965                         int16_t           y  /**< */,
8966                         uint16_t          width  /**< */,
8967                         uint16_t          height  /**< */)
8968 {
8969     static const xcb_protocol_request_t xcb_req = {
8970         /* count */ 2,
8971         /* ext */ 0,
8972         /* opcode */ XCB_CLEAR_AREA,
8973         /* isvoid */ 1
8974     };
8975 
8976     struct iovec xcb_parts[4];
8977     xcb_void_cookie_t xcb_ret;
8978     xcb_clear_area_request_t xcb_out;
8979 
8980     xcb_out.exposures = exposures;
8981     xcb_out.window = window;
8982     xcb_out.x = x;
8983     xcb_out.y = y;
8984     xcb_out.width = width;
8985     xcb_out.height = height;
8986 
8987     xcb_parts[2].iov_base = (char *) &xcb_out;
8988     xcb_parts[2].iov_len = sizeof(xcb_out);
8989     xcb_parts[3].iov_base = 0;
8990     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8991 
8992     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8993     return xcb_ret;
8994 }
8995 
8996 
8997 /*****************************************************************************
8998  **
8999  ** xcb_void_cookie_t xcb_clear_area
9000  **
9001  ** @param xcb_connection_t *c
9002  ** @param uint8_t           exposures
9003  ** @param xcb_window_t      window
9004  ** @param int16_t           x
9005  ** @param int16_t           y
9006  ** @param uint16_t          width
9007  ** @param uint16_t          height
9008  ** @returns xcb_void_cookie_t
9009  **
9010  *****************************************************************************/
9011 
9012 xcb_void_cookie_t
9013 xcb_clear_area (xcb_connection_t *c  /**< */,
9014                 uint8_t           exposures  /**< */,
9015                 xcb_window_t      window  /**< */,
9016                 int16_t           x  /**< */,
9017                 int16_t           y  /**< */,
9018                 uint16_t          width  /**< */,
9019                 uint16_t          height  /**< */)
9020 {
9021     static const xcb_protocol_request_t xcb_req = {
9022         /* count */ 2,
9023         /* ext */ 0,
9024         /* opcode */ XCB_CLEAR_AREA,
9025         /* isvoid */ 1
9026     };
9027 
9028     struct iovec xcb_parts[4];
9029     xcb_void_cookie_t xcb_ret;
9030     xcb_clear_area_request_t xcb_out;
9031 
9032     xcb_out.exposures = exposures;
9033     xcb_out.window = window;
9034     xcb_out.x = x;
9035     xcb_out.y = y;
9036     xcb_out.width = width;
9037     xcb_out.height = height;
9038 
9039     xcb_parts[2].iov_base = (char *) &xcb_out;
9040     xcb_parts[2].iov_len = sizeof(xcb_out);
9041     xcb_parts[3].iov_base = 0;
9042     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9043 
9044     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9045     return xcb_ret;
9046 }
9047 
9048 
9049 /*****************************************************************************
9050  **
9051  ** xcb_void_cookie_t xcb_copy_area_checked
9052  **
9053  ** @param xcb_connection_t *c
9054  ** @param xcb_drawable_t    src_drawable
9055  ** @param xcb_drawable_t    dst_drawable
9056  ** @param xcb_gcontext_t    gc
9057  ** @param int16_t           src_x
9058  ** @param int16_t           src_y
9059  ** @param int16_t           dst_x
9060  ** @param int16_t           dst_y
9061  ** @param uint16_t          width
9062  ** @param uint16_t          height
9063  ** @returns xcb_void_cookie_t
9064  **
9065  *****************************************************************************/
9066 
9067 xcb_void_cookie_t
9068 xcb_copy_area_checked (xcb_connection_t *c  /**< */,
9069                        xcb_drawable_t    src_drawable  /**< */,
9070                        xcb_drawable_t    dst_drawable  /**< */,
9071                        xcb_gcontext_t    gc  /**< */,
9072                        int16_t           src_x  /**< */,
9073                        int16_t           src_y  /**< */,
9074                        int16_t           dst_x  /**< */,
9075                        int16_t           dst_y  /**< */,
9076                        uint16_t          width  /**< */,
9077                        uint16_t          height  /**< */)
9078 {
9079     static const xcb_protocol_request_t xcb_req = {
9080         /* count */ 2,
9081         /* ext */ 0,
9082         /* opcode */ XCB_COPY_AREA,
9083         /* isvoid */ 1
9084     };
9085 
9086     struct iovec xcb_parts[4];
9087     xcb_void_cookie_t xcb_ret;
9088     xcb_copy_area_request_t xcb_out;
9089 
9090     xcb_out.pad0 = 0;
9091     xcb_out.src_drawable = src_drawable;
9092     xcb_out.dst_drawable = dst_drawable;
9093     xcb_out.gc = gc;
9094     xcb_out.src_x = src_x;
9095     xcb_out.src_y = src_y;
9096     xcb_out.dst_x = dst_x;
9097     xcb_out.dst_y = dst_y;
9098     xcb_out.width = width;
9099     xcb_out.height = height;
9100 
9101     xcb_parts[2].iov_base = (char *) &xcb_out;
9102     xcb_parts[2].iov_len = sizeof(xcb_out);
9103     xcb_parts[3].iov_base = 0;
9104     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9105 
9106     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9107     return xcb_ret;
9108 }
9109 
9110 
9111 /*****************************************************************************
9112  **
9113  ** xcb_void_cookie_t xcb_copy_area
9114  **
9115  ** @param xcb_connection_t *c
9116  ** @param xcb_drawable_t    src_drawable
9117  ** @param xcb_drawable_t    dst_drawable
9118  ** @param xcb_gcontext_t    gc
9119  ** @param int16_t           src_x
9120  ** @param int16_t           src_y
9121  ** @param int16_t           dst_x
9122  ** @param int16_t           dst_y
9123  ** @param uint16_t          width
9124  ** @param uint16_t          height
9125  ** @returns xcb_void_cookie_t
9126  **
9127  *****************************************************************************/
9128 
9129 xcb_void_cookie_t
9130 xcb_copy_area (xcb_connection_t *c  /**< */,
9131                xcb_drawable_t    src_drawable  /**< */,
9132                xcb_drawable_t    dst_drawable  /**< */,
9133                xcb_gcontext_t    gc  /**< */,
9134                int16_t           src_x  /**< */,
9135                int16_t           src_y  /**< */,
9136                int16_t           dst_x  /**< */,
9137                int16_t           dst_y  /**< */,
9138                uint16_t          width  /**< */,
9139                uint16_t          height  /**< */)
9140 {
9141     static const xcb_protocol_request_t xcb_req = {
9142         /* count */ 2,
9143         /* ext */ 0,
9144         /* opcode */ XCB_COPY_AREA,
9145         /* isvoid */ 1
9146     };
9147 
9148     struct iovec xcb_parts[4];
9149     xcb_void_cookie_t xcb_ret;
9150     xcb_copy_area_request_t xcb_out;
9151 
9152     xcb_out.pad0 = 0;
9153     xcb_out.src_drawable = src_drawable;
9154     xcb_out.dst_drawable = dst_drawable;
9155     xcb_out.gc = gc;
9156     xcb_out.src_x = src_x;
9157     xcb_out.src_y = src_y;
9158     xcb_out.dst_x = dst_x;
9159     xcb_out.dst_y = dst_y;
9160     xcb_out.width = width;
9161     xcb_out.height = height;
9162 
9163     xcb_parts[2].iov_base = (char *) &xcb_out;
9164     xcb_parts[2].iov_len = sizeof(xcb_out);
9165     xcb_parts[3].iov_base = 0;
9166     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9167 
9168     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9169     return xcb_ret;
9170 }
9171 
9172 
9173 /*****************************************************************************
9174  **
9175  ** xcb_void_cookie_t xcb_copy_plane_checked
9176  **
9177  ** @param xcb_connection_t *c
9178  ** @param xcb_drawable_t    src_drawable
9179  ** @param xcb_drawable_t    dst_drawable
9180  ** @param xcb_gcontext_t    gc
9181  ** @param int16_t           src_x
9182  ** @param int16_t           src_y
9183  ** @param int16_t           dst_x
9184  ** @param int16_t           dst_y
9185  ** @param uint16_t          width
9186  ** @param uint16_t          height
9187  ** @param uint32_t          bit_plane
9188  ** @returns xcb_void_cookie_t
9189  **
9190  *****************************************************************************/
9191 
9192 xcb_void_cookie_t
9193 xcb_copy_plane_checked (xcb_connection_t *c  /**< */,
9194                         xcb_drawable_t    src_drawable  /**< */,
9195                         xcb_drawable_t    dst_drawable  /**< */,
9196                         xcb_gcontext_t    gc  /**< */,
9197                         int16_t           src_x  /**< */,
9198                         int16_t           src_y  /**< */,
9199                         int16_t           dst_x  /**< */,
9200                         int16_t           dst_y  /**< */,
9201                         uint16_t          width  /**< */,
9202                         uint16_t          height  /**< */,
9203                         uint32_t          bit_plane  /**< */)
9204 {
9205     static const xcb_protocol_request_t xcb_req = {
9206         /* count */ 2,
9207         /* ext */ 0,
9208         /* opcode */ XCB_COPY_PLANE,
9209         /* isvoid */ 1
9210     };
9211 
9212     struct iovec xcb_parts[4];
9213     xcb_void_cookie_t xcb_ret;
9214     xcb_copy_plane_request_t xcb_out;
9215 
9216     xcb_out.pad0 = 0;
9217     xcb_out.src_drawable = src_drawable;
9218     xcb_out.dst_drawable = dst_drawable;
9219     xcb_out.gc = gc;
9220     xcb_out.src_x = src_x;
9221     xcb_out.src_y = src_y;
9222     xcb_out.dst_x = dst_x;
9223     xcb_out.dst_y = dst_y;
9224     xcb_out.width = width;
9225     xcb_out.height = height;
9226     xcb_out.bit_plane = bit_plane;
9227 
9228     xcb_parts[2].iov_base = (char *) &xcb_out;
9229     xcb_parts[2].iov_len = sizeof(xcb_out);
9230     xcb_parts[3].iov_base = 0;
9231     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9232 
9233     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9234     return xcb_ret;
9235 }
9236 
9237 
9238 /*****************************************************************************
9239  **
9240  ** xcb_void_cookie_t xcb_copy_plane
9241  **
9242  ** @param xcb_connection_t *c
9243  ** @param xcb_drawable_t    src_drawable
9244  ** @param xcb_drawable_t    dst_drawable
9245  ** @param xcb_gcontext_t    gc
9246  ** @param int16_t           src_x
9247  ** @param int16_t           src_y
9248  ** @param int16_t           dst_x
9249  ** @param int16_t           dst_y
9250  ** @param uint16_t          width
9251  ** @param uint16_t          height
9252  ** @param uint32_t          bit_plane
9253  ** @returns xcb_void_cookie_t
9254  **
9255  *****************************************************************************/
9256 
9257 xcb_void_cookie_t
9258 xcb_copy_plane (xcb_connection_t *c  /**< */,
9259                 xcb_drawable_t    src_drawable  /**< */,
9260                 xcb_drawable_t    dst_drawable  /**< */,
9261                 xcb_gcontext_t    gc  /**< */,
9262                 int16_t           src_x  /**< */,
9263                 int16_t           src_y  /**< */,
9264                 int16_t           dst_x  /**< */,
9265                 int16_t           dst_y  /**< */,
9266                 uint16_t          width  /**< */,
9267                 uint16_t          height  /**< */,
9268                 uint32_t          bit_plane  /**< */)
9269 {
9270     static const xcb_protocol_request_t xcb_req = {
9271         /* count */ 2,
9272         /* ext */ 0,
9273         /* opcode */ XCB_COPY_PLANE,
9274         /* isvoid */ 1
9275     };
9276 
9277     struct iovec xcb_parts[4];
9278     xcb_void_cookie_t xcb_ret;
9279     xcb_copy_plane_request_t xcb_out;
9280 
9281     xcb_out.pad0 = 0;
9282     xcb_out.src_drawable = src_drawable;
9283     xcb_out.dst_drawable = dst_drawable;
9284     xcb_out.gc = gc;
9285     xcb_out.src_x = src_x;
9286     xcb_out.src_y = src_y;
9287     xcb_out.dst_x = dst_x;
9288     xcb_out.dst_y = dst_y;
9289     xcb_out.width = width;
9290     xcb_out.height = height;
9291     xcb_out.bit_plane = bit_plane;
9292 
9293     xcb_parts[2].iov_base = (char *) &xcb_out;
9294     xcb_parts[2].iov_len = sizeof(xcb_out);
9295     xcb_parts[3].iov_base = 0;
9296     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9297 
9298     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9299     return xcb_ret;
9300 }
9301 
9302 int
9303 xcb_poly_point_sizeof (const void  *_buffer  /**< */,
9304                        uint32_t     points_len  /**< */)
9305 {
9306     char *xcb_tmp = (char *)_buffer;
9307     unsigned int xcb_buffer_len = 0;
9308     unsigned int xcb_block_len = 0;
9309     unsigned int xcb_pad = 0;
9310     unsigned int xcb_align_to = 0;
9311 
9312 
9313     xcb_block_len += sizeof(xcb_poly_point_request_t);
9314     xcb_tmp += xcb_block_len;
9315     xcb_buffer_len += xcb_block_len;
9316     xcb_block_len = 0;
9317     /* points */
9318     xcb_block_len += points_len * sizeof(xcb_point_t);
9319     xcb_tmp += xcb_block_len;
9320     xcb_align_to = ALIGNOF(xcb_point_t);
9321     /* insert padding */
9322     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9323     xcb_buffer_len += xcb_block_len + xcb_pad;
9324     if (0 != xcb_pad) {
9325         xcb_tmp += xcb_pad;
9326         xcb_pad = 0;
9327     }
9328     xcb_block_len = 0;
9329 
9330     return xcb_buffer_len;
9331 }
9332 
9333 
9334 /*****************************************************************************
9335  **
9336  ** xcb_void_cookie_t xcb_poly_point_checked
9337  **
9338  ** @param xcb_connection_t  *c
9339  ** @param uint8_t            coordinate_mode
9340  ** @param xcb_drawable_t     drawable
9341  ** @param xcb_gcontext_t     gc
9342  ** @param uint32_t           points_len
9343  ** @param const xcb_point_t *points
9344  ** @returns xcb_void_cookie_t
9345  **
9346  *****************************************************************************/
9347 
9348 xcb_void_cookie_t
9349 xcb_poly_point_checked (xcb_connection_t  *c  /**< */,
9350                         uint8_t            coordinate_mode  /**< */,
9351                         xcb_drawable_t     drawable  /**< */,
9352                         xcb_gcontext_t     gc  /**< */,
9353                         uint32_t           points_len  /**< */,
9354                         const xcb_point_t *points  /**< */)
9355 {
9356     static const xcb_protocol_request_t xcb_req = {
9357         /* count */ 4,
9358         /* ext */ 0,
9359         /* opcode */ XCB_POLY_POINT,
9360         /* isvoid */ 1
9361     };
9362 
9363     struct iovec xcb_parts[6];
9364     xcb_void_cookie_t xcb_ret;
9365     xcb_poly_point_request_t xcb_out;
9366 
9367     xcb_out.coordinate_mode = coordinate_mode;
9368     xcb_out.drawable = drawable;
9369     xcb_out.gc = gc;
9370 
9371     xcb_parts[2].iov_base = (char *) &xcb_out;
9372     xcb_parts[2].iov_len = sizeof(xcb_out);
9373     xcb_parts[3].iov_base = 0;
9374     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9375     /* xcb_point_t points */
9376     xcb_parts[4].iov_base = (char *) points;
9377     xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t);
9378     xcb_parts[5].iov_base = 0;
9379     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9380 
9381     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9382     return xcb_ret;
9383 }
9384 
9385 
9386 /*****************************************************************************
9387  **
9388  ** xcb_void_cookie_t xcb_poly_point
9389  **
9390  ** @param xcb_connection_t  *c
9391  ** @param uint8_t            coordinate_mode
9392  ** @param xcb_drawable_t     drawable
9393  ** @param xcb_gcontext_t     gc
9394  ** @param uint32_t           points_len
9395  ** @param const xcb_point_t *points
9396  ** @returns xcb_void_cookie_t
9397  **
9398  *****************************************************************************/
9399 
9400 xcb_void_cookie_t
9401 xcb_poly_point (xcb_connection_t  *c  /**< */,
9402                 uint8_t            coordinate_mode  /**< */,
9403                 xcb_drawable_t     drawable  /**< */,
9404                 xcb_gcontext_t     gc  /**< */,
9405                 uint32_t           points_len  /**< */,
9406                 const xcb_point_t *points  /**< */)
9407 {
9408     static const xcb_protocol_request_t xcb_req = {
9409         /* count */ 4,
9410         /* ext */ 0,
9411         /* opcode */ XCB_POLY_POINT,
9412         /* isvoid */ 1
9413     };
9414 
9415     struct iovec xcb_parts[6];
9416     xcb_void_cookie_t xcb_ret;
9417     xcb_poly_point_request_t xcb_out;
9418 
9419     xcb_out.coordinate_mode = coordinate_mode;
9420     xcb_out.drawable = drawable;
9421     xcb_out.gc = gc;
9422 
9423     xcb_parts[2].iov_base = (char *) &xcb_out;
9424     xcb_parts[2].iov_len = sizeof(xcb_out);
9425     xcb_parts[3].iov_base = 0;
9426     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9427     /* xcb_point_t points */
9428     xcb_parts[4].iov_base = (char *) points;
9429     xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t);
9430     xcb_parts[5].iov_base = 0;
9431     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9432 
9433     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9434     return xcb_ret;
9435 }
9436 
9437 int
9438 xcb_poly_line_sizeof (const void  *_buffer  /**< */,
9439                       uint32_t     points_len  /**< */)
9440 {
9441     char *xcb_tmp = (char *)_buffer;
9442     unsigned int xcb_buffer_len = 0;
9443     unsigned int xcb_block_len = 0;
9444     unsigned int xcb_pad = 0;
9445     unsigned int xcb_align_to = 0;
9446 
9447 
9448     xcb_block_len += sizeof(xcb_poly_line_request_t);
9449     xcb_tmp += xcb_block_len;
9450     xcb_buffer_len += xcb_block_len;
9451     xcb_block_len = 0;
9452     /* points */
9453     xcb_block_len += points_len * sizeof(xcb_point_t);
9454     xcb_tmp += xcb_block_len;
9455     xcb_align_to = ALIGNOF(xcb_point_t);
9456     /* insert padding */
9457     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9458     xcb_buffer_len += xcb_block_len + xcb_pad;
9459     if (0 != xcb_pad) {
9460         xcb_tmp += xcb_pad;
9461         xcb_pad = 0;
9462     }
9463     xcb_block_len = 0;
9464 
9465     return xcb_buffer_len;
9466 }
9467 
9468 
9469 /*****************************************************************************
9470  **
9471  ** xcb_void_cookie_t xcb_poly_line_checked
9472  **
9473  ** @param xcb_connection_t  *c
9474  ** @param uint8_t            coordinate_mode
9475  ** @param xcb_drawable_t     drawable
9476  ** @param xcb_gcontext_t     gc
9477  ** @param uint32_t           points_len
9478  ** @param const xcb_point_t *points
9479  ** @returns xcb_void_cookie_t
9480  **
9481  *****************************************************************************/
9482 
9483 xcb_void_cookie_t
9484 xcb_poly_line_checked (xcb_connection_t  *c  /**< */,
9485                        uint8_t            coordinate_mode  /**< */,
9486                        xcb_drawable_t     drawable  /**< */,
9487                        xcb_gcontext_t     gc  /**< */,
9488                        uint32_t           points_len  /**< */,
9489                        const xcb_point_t *points  /**< */)
9490 {
9491     static const xcb_protocol_request_t xcb_req = {
9492         /* count */ 4,
9493         /* ext */ 0,
9494         /* opcode */ XCB_POLY_LINE,
9495         /* isvoid */ 1
9496     };
9497 
9498     struct iovec xcb_parts[6];
9499     xcb_void_cookie_t xcb_ret;
9500     xcb_poly_line_request_t xcb_out;
9501 
9502     xcb_out.coordinate_mode = coordinate_mode;
9503     xcb_out.drawable = drawable;
9504     xcb_out.gc = gc;
9505 
9506     xcb_parts[2].iov_base = (char *) &xcb_out;
9507     xcb_parts[2].iov_len = sizeof(xcb_out);
9508     xcb_parts[3].iov_base = 0;
9509     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9510     /* xcb_point_t points */
9511     xcb_parts[4].iov_base = (char *) points;
9512     xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t);
9513     xcb_parts[5].iov_base = 0;
9514     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9515 
9516     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9517     return xcb_ret;
9518 }
9519 
9520 
9521 /*****************************************************************************
9522  **
9523  ** xcb_void_cookie_t xcb_poly_line
9524  **
9525  ** @param xcb_connection_t  *c
9526  ** @param uint8_t            coordinate_mode
9527  ** @param xcb_drawable_t     drawable
9528  ** @param xcb_gcontext_t     gc
9529  ** @param uint32_t           points_len
9530  ** @param const xcb_point_t *points
9531  ** @returns xcb_void_cookie_t
9532  **
9533  *****************************************************************************/
9534 
9535 xcb_void_cookie_t
9536 xcb_poly_line (xcb_connection_t  *c  /**< */,
9537                uint8_t            coordinate_mode  /**< */,
9538                xcb_drawable_t     drawable  /**< */,
9539                xcb_gcontext_t     gc  /**< */,
9540                uint32_t           points_len  /**< */,
9541                const xcb_point_t *points  /**< */)
9542 {
9543     static const xcb_protocol_request_t xcb_req = {
9544         /* count */ 4,
9545         /* ext */ 0,
9546         /* opcode */ XCB_POLY_LINE,
9547         /* isvoid */ 1
9548     };
9549 
9550     struct iovec xcb_parts[6];
9551     xcb_void_cookie_t xcb_ret;
9552     xcb_poly_line_request_t xcb_out;
9553 
9554     xcb_out.coordinate_mode = coordinate_mode;
9555     xcb_out.drawable = drawable;
9556     xcb_out.gc = gc;
9557 
9558     xcb_parts[2].iov_base = (char *) &xcb_out;
9559     xcb_parts[2].iov_len = sizeof(xcb_out);
9560     xcb_parts[3].iov_base = 0;
9561     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9562     /* xcb_point_t points */
9563     xcb_parts[4].iov_base = (char *) points;
9564     xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t);
9565     xcb_parts[5].iov_base = 0;
9566     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9567 
9568     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9569     return xcb_ret;
9570 }
9571 
9572 
9573 /*****************************************************************************
9574  **
9575  ** void xcb_segment_next
9576  **
9577  ** @param xcb_segment_iterator_t *i
9578  ** @returns void
9579  **
9580  *****************************************************************************/
9581 
9582 void
9583 xcb_segment_next (xcb_segment_iterator_t *i  /**< */)
9584 {
9585     --i->rem;
9586     ++i->data;
9587     i->index += sizeof(xcb_segment_t);
9588 }
9589 
9590 
9591 /*****************************************************************************
9592  **
9593  ** xcb_generic_iterator_t xcb_segment_end
9594  **
9595  ** @param xcb_segment_iterator_t i
9596  ** @returns xcb_generic_iterator_t
9597  **
9598  *****************************************************************************/
9599 
9600 xcb_generic_iterator_t
9601 xcb_segment_end (xcb_segment_iterator_t i  /**< */)
9602 {
9603     xcb_generic_iterator_t ret;
9604     ret.data = i.data + i.rem;
9605     ret.index = i.index + ((char *) ret.data - (char *) i.data);
9606     ret.rem = 0;
9607     return ret;
9608 }
9609 
9610 int
9611 xcb_poly_segment_sizeof (const void  *_buffer  /**< */,
9612                          uint32_t     segments_len  /**< */)
9613 {
9614     char *xcb_tmp = (char *)_buffer;
9615     unsigned int xcb_buffer_len = 0;
9616     unsigned int xcb_block_len = 0;
9617     unsigned int xcb_pad = 0;
9618     unsigned int xcb_align_to = 0;
9619 
9620 
9621     xcb_block_len += sizeof(xcb_poly_segment_request_t);
9622     xcb_tmp += xcb_block_len;
9623     xcb_buffer_len += xcb_block_len;
9624     xcb_block_len = 0;
9625     /* segments */
9626     xcb_block_len += segments_len * sizeof(xcb_segment_t);
9627     xcb_tmp += xcb_block_len;
9628     xcb_align_to = ALIGNOF(xcb_segment_t);
9629     /* insert padding */
9630     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9631     xcb_buffer_len += xcb_block_len + xcb_pad;
9632     if (0 != xcb_pad) {
9633         xcb_tmp += xcb_pad;
9634         xcb_pad = 0;
9635     }
9636     xcb_block_len = 0;
9637 
9638     return xcb_buffer_len;
9639 }
9640 
9641 
9642 /*****************************************************************************
9643  **
9644  ** xcb_void_cookie_t xcb_poly_segment_checked
9645  **
9646  ** @param xcb_connection_t    *c
9647  ** @param xcb_drawable_t       drawable
9648  ** @param xcb_gcontext_t       gc
9649  ** @param uint32_t             segments_len
9650  ** @param const xcb_segment_t *segments
9651  ** @returns xcb_void_cookie_t
9652  **
9653  *****************************************************************************/
9654 
9655 xcb_void_cookie_t
9656 xcb_poly_segment_checked (xcb_connection_t    *c  /**< */,
9657                           xcb_drawable_t       drawable  /**< */,
9658                           xcb_gcontext_t       gc  /**< */,
9659                           uint32_t             segments_len  /**< */,
9660                           const xcb_segment_t *segments  /**< */)
9661 {
9662     static const xcb_protocol_request_t xcb_req = {
9663         /* count */ 4,
9664         /* ext */ 0,
9665         /* opcode */ XCB_POLY_SEGMENT,
9666         /* isvoid */ 1
9667     };
9668 
9669     struct iovec xcb_parts[6];
9670     xcb_void_cookie_t xcb_ret;
9671     xcb_poly_segment_request_t xcb_out;
9672 
9673     xcb_out.pad0 = 0;
9674     xcb_out.drawable = drawable;
9675     xcb_out.gc = gc;
9676 
9677     xcb_parts[2].iov_base = (char *) &xcb_out;
9678     xcb_parts[2].iov_len = sizeof(xcb_out);
9679     xcb_parts[3].iov_base = 0;
9680     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9681     /* xcb_segment_t segments */
9682     xcb_parts[4].iov_base = (char *) segments;
9683     xcb_parts[4].iov_len = segments_len * sizeof(xcb_segment_t);
9684     xcb_parts[5].iov_base = 0;
9685     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9686 
9687     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9688     return xcb_ret;
9689 }
9690 
9691 
9692 /*****************************************************************************
9693  **
9694  ** xcb_void_cookie_t xcb_poly_segment
9695  **
9696  ** @param xcb_connection_t    *c
9697  ** @param xcb_drawable_t       drawable
9698  ** @param xcb_gcontext_t       gc
9699  ** @param uint32_t             segments_len
9700  ** @param const xcb_segment_t *segments
9701  ** @returns xcb_void_cookie_t
9702  **
9703  *****************************************************************************/
9704 
9705 xcb_void_cookie_t
9706 xcb_poly_segment (xcb_connection_t    *c  /**< */,
9707                   xcb_drawable_t       drawable  /**< */,
9708                   xcb_gcontext_t       gc  /**< */,
9709                   uint32_t             segments_len  /**< */,
9710                   const xcb_segment_t *segments  /**< */)
9711 {
9712     static const xcb_protocol_request_t xcb_req = {
9713         /* count */ 4,
9714         /* ext */ 0,
9715         /* opcode */ XCB_POLY_SEGMENT,
9716         /* isvoid */ 1
9717     };
9718 
9719     struct iovec xcb_parts[6];
9720     xcb_void_cookie_t xcb_ret;
9721     xcb_poly_segment_request_t xcb_out;
9722 
9723     xcb_out.pad0 = 0;
9724     xcb_out.drawable = drawable;
9725     xcb_out.gc = gc;
9726 
9727     xcb_parts[2].iov_base = (char *) &xcb_out;
9728     xcb_parts[2].iov_len = sizeof(xcb_out);
9729     xcb_parts[3].iov_base = 0;
9730     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9731     /* xcb_segment_t segments */
9732     xcb_parts[4].iov_base = (char *) segments;
9733     xcb_parts[4].iov_len = segments_len * sizeof(xcb_segment_t);
9734     xcb_parts[5].iov_base = 0;
9735     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9736 
9737     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9738     return xcb_ret;
9739 }
9740 
9741 int
9742 xcb_poly_rectangle_sizeof (const void  *_buffer  /**< */,
9743                            uint32_t     rectangles_len  /**< */)
9744 {
9745     char *xcb_tmp = (char *)_buffer;
9746     unsigned int xcb_buffer_len = 0;
9747     unsigned int xcb_block_len = 0;
9748     unsigned int xcb_pad = 0;
9749     unsigned int xcb_align_to = 0;
9750 
9751 
9752     xcb_block_len += sizeof(xcb_poly_rectangle_request_t);
9753     xcb_tmp += xcb_block_len;
9754     xcb_buffer_len += xcb_block_len;
9755     xcb_block_len = 0;
9756     /* rectangles */
9757     xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
9758     xcb_tmp += xcb_block_len;
9759     xcb_align_to = ALIGNOF(xcb_rectangle_t);
9760     /* insert padding */
9761     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9762     xcb_buffer_len += xcb_block_len + xcb_pad;
9763     if (0 != xcb_pad) {
9764         xcb_tmp += xcb_pad;
9765         xcb_pad = 0;
9766     }
9767     xcb_block_len = 0;
9768 
9769     return xcb_buffer_len;
9770 }
9771 
9772 
9773 /*****************************************************************************
9774  **
9775  ** xcb_void_cookie_t xcb_poly_rectangle_checked
9776  **
9777  ** @param xcb_connection_t      *c
9778  ** @param xcb_drawable_t         drawable
9779  ** @param xcb_gcontext_t         gc
9780  ** @param uint32_t               rectangles_len
9781  ** @param const xcb_rectangle_t *rectangles
9782  ** @returns xcb_void_cookie_t
9783  **
9784  *****************************************************************************/
9785 
9786 xcb_void_cookie_t
9787 xcb_poly_rectangle_checked (xcb_connection_t      *c  /**< */,
9788                             xcb_drawable_t         drawable  /**< */,
9789                             xcb_gcontext_t         gc  /**< */,
9790                             uint32_t               rectangles_len  /**< */,
9791                             const xcb_rectangle_t *rectangles  /**< */)
9792 {
9793     static const xcb_protocol_request_t xcb_req = {
9794         /* count */ 4,
9795         /* ext */ 0,
9796         /* opcode */ XCB_POLY_RECTANGLE,
9797         /* isvoid */ 1
9798     };
9799 
9800     struct iovec xcb_parts[6];
9801     xcb_void_cookie_t xcb_ret;
9802     xcb_poly_rectangle_request_t xcb_out;
9803 
9804     xcb_out.pad0 = 0;
9805     xcb_out.drawable = drawable;
9806     xcb_out.gc = gc;
9807 
9808     xcb_parts[2].iov_base = (char *) &xcb_out;
9809     xcb_parts[2].iov_len = sizeof(xcb_out);
9810     xcb_parts[3].iov_base = 0;
9811     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9812     /* xcb_rectangle_t rectangles */
9813     xcb_parts[4].iov_base = (char *) rectangles;
9814     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
9815     xcb_parts[5].iov_base = 0;
9816     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9817 
9818     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9819     return xcb_ret;
9820 }
9821 
9822 
9823 /*****************************************************************************
9824  **
9825  ** xcb_void_cookie_t xcb_poly_rectangle
9826  **
9827  ** @param xcb_connection_t      *c
9828  ** @param xcb_drawable_t         drawable
9829  ** @param xcb_gcontext_t         gc
9830  ** @param uint32_t               rectangles_len
9831  ** @param const xcb_rectangle_t *rectangles
9832  ** @returns xcb_void_cookie_t
9833  **
9834  *****************************************************************************/
9835 
9836 xcb_void_cookie_t
9837 xcb_poly_rectangle (xcb_connection_t      *c  /**< */,
9838                     xcb_drawable_t         drawable  /**< */,
9839                     xcb_gcontext_t         gc  /**< */,
9840                     uint32_t               rectangles_len  /**< */,
9841                     const xcb_rectangle_t *rectangles  /**< */)
9842 {
9843     static const xcb_protocol_request_t xcb_req = {
9844         /* count */ 4,
9845         /* ext */ 0,
9846         /* opcode */ XCB_POLY_RECTANGLE,
9847         /* isvoid */ 1
9848     };
9849 
9850     struct iovec xcb_parts[6];
9851     xcb_void_cookie_t xcb_ret;
9852     xcb_poly_rectangle_request_t xcb_out;
9853 
9854     xcb_out.pad0 = 0;
9855     xcb_out.drawable = drawable;
9856     xcb_out.gc = gc;
9857 
9858     xcb_parts[2].iov_base = (char *) &xcb_out;
9859     xcb_parts[2].iov_len = sizeof(xcb_out);
9860     xcb_parts[3].iov_base = 0;
9861     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9862     /* xcb_rectangle_t rectangles */
9863     xcb_parts[4].iov_base = (char *) rectangles;
9864     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
9865     xcb_parts[5].iov_base = 0;
9866     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9867 
9868     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9869     return xcb_ret;
9870 }
9871 
9872 int
9873 xcb_poly_arc_sizeof (const void  *_buffer  /**< */,
9874                      uint32_t     arcs_len  /**< */)
9875 {
9876     char *xcb_tmp = (char *)_buffer;
9877     unsigned int xcb_buffer_len = 0;
9878     unsigned int xcb_block_len = 0;
9879     unsigned int xcb_pad = 0;
9880     unsigned int xcb_align_to = 0;
9881 
9882 
9883     xcb_block_len += sizeof(xcb_poly_arc_request_t);
9884     xcb_tmp += xcb_block_len;
9885     xcb_buffer_len += xcb_block_len;
9886     xcb_block_len = 0;
9887     /* arcs */
9888     xcb_block_len += arcs_len * sizeof(xcb_arc_t);
9889     xcb_tmp += xcb_block_len;
9890     xcb_align_to = ALIGNOF(xcb_arc_t);
9891     /* insert padding */
9892     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9893     xcb_buffer_len += xcb_block_len + xcb_pad;
9894     if (0 != xcb_pad) {
9895         xcb_tmp += xcb_pad;
9896         xcb_pad = 0;
9897     }
9898     xcb_block_len = 0;
9899 
9900     return xcb_buffer_len;
9901 }
9902 
9903 
9904 /*****************************************************************************
9905  **
9906  ** xcb_void_cookie_t xcb_poly_arc_checked
9907  **
9908  ** @param xcb_connection_t *c
9909  ** @param xcb_drawable_t    drawable
9910  ** @param xcb_gcontext_t    gc
9911  ** @param uint32_t          arcs_len
9912  ** @param const xcb_arc_t  *arcs
9913  ** @returns xcb_void_cookie_t
9914  **
9915  *****************************************************************************/
9916 
9917 xcb_void_cookie_t
9918 xcb_poly_arc_checked (xcb_connection_t *c  /**< */,
9919                       xcb_drawable_t    drawable  /**< */,
9920                       xcb_gcontext_t    gc  /**< */,
9921                       uint32_t          arcs_len  /**< */,
9922                       const xcb_arc_t  *arcs  /**< */)
9923 {
9924     static const xcb_protocol_request_t xcb_req = {
9925         /* count */ 4,
9926         /* ext */ 0,
9927         /* opcode */ XCB_POLY_ARC,
9928         /* isvoid */ 1
9929     };
9930 
9931     struct iovec xcb_parts[6];
9932     xcb_void_cookie_t xcb_ret;
9933     xcb_poly_arc_request_t xcb_out;
9934 
9935     xcb_out.pad0 = 0;
9936     xcb_out.drawable = drawable;
9937     xcb_out.gc = gc;
9938 
9939     xcb_parts[2].iov_base = (char *) &xcb_out;
9940     xcb_parts[2].iov_len = sizeof(xcb_out);
9941     xcb_parts[3].iov_base = 0;
9942     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9943     /* xcb_arc_t arcs */
9944     xcb_parts[4].iov_base = (char *) arcs;
9945     xcb_parts[4].iov_len = arcs_len * sizeof(xcb_arc_t);
9946     xcb_parts[5].iov_base = 0;
9947     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9948 
9949     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9950     return xcb_ret;
9951 }
9952 
9953 
9954 /*****************************************************************************
9955  **
9956  ** xcb_void_cookie_t xcb_poly_arc
9957  **
9958  ** @param xcb_connection_t *c
9959  ** @param xcb_drawable_t    drawable
9960  ** @param xcb_gcontext_t    gc
9961  ** @param uint32_t          arcs_len
9962  ** @param const xcb_arc_t  *arcs
9963  ** @returns xcb_void_cookie_t
9964  **
9965  *****************************************************************************/
9966 
9967 xcb_void_cookie_t
9968 xcb_poly_arc (xcb_connection_t *c  /**< */,
9969               xcb_drawable_t    drawable  /**< */,
9970               xcb_gcontext_t    gc  /**< */,
9971               uint32_t          arcs_len  /**< */,
9972               const xcb_arc_t  *arcs  /**< */)
9973 {
9974     static const xcb_protocol_request_t xcb_req = {
9975         /* count */ 4,
9976         /* ext */ 0,
9977         /* opcode */ XCB_POLY_ARC,
9978         /* isvoid */ 1
9979     };
9980 
9981     struct iovec xcb_parts[6];
9982     xcb_void_cookie_t xcb_ret;
9983     xcb_poly_arc_request_t xcb_out;
9984 
9985     xcb_out.pad0 = 0;
9986     xcb_out.drawable = drawable;
9987     xcb_out.gc = gc;
9988 
9989     xcb_parts[2].iov_base = (char *) &xcb_out;
9990     xcb_parts[2].iov_len = sizeof(xcb_out);
9991     xcb_parts[3].iov_base = 0;
9992     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9993     /* xcb_arc_t arcs */
9994     xcb_parts[4].iov_base = (char *) arcs;
9995     xcb_parts[4].iov_len = arcs_len * sizeof(xcb_arc_t);
9996     xcb_parts[5].iov_base = 0;
9997     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9998 
9999     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
10000     return xcb_ret;
10001 }
10002 
10003 int
10004 xcb_fill_poly_sizeof (const void  *_buffer  /**< */,
10005                       uint32_t     points_len  /**< */)
10006 {
10007     char *xcb_tmp = (char *)_buffer;
10008     unsigned int xcb_buffer_len = 0;
10009     unsigned int xcb_block_len = 0;
10010     unsigned int xcb_pad = 0;
10011     unsigned int xcb_align_to = 0;
10012 
10013 
10014     xcb_block_len += sizeof(xcb_fill_poly_request_t);
10015     xcb_tmp += xcb_block_len;
10016     xcb_buffer_len += xcb_block_len;
10017     xcb_block_len = 0;
10018     /* points */
10019     xcb_block_len += points_len * sizeof(xcb_point_t);
10020     xcb_tmp += xcb_block_len;
10021     xcb_align_to = ALIGNOF(xcb_point_t);
10022     /* insert padding */
10023     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10024     xcb_buffer_len += xcb_block_len + xcb_pad;
10025     if (0 != xcb_pad) {
10026         xcb_tmp += xcb_pad;
10027         xcb_pad = 0;
10028     }
10029     xcb_block_len = 0;
10030 
10031     return xcb_buffer_len;
10032 }
10033 
10034 
10035 /*****************************************************************************
10036  **
10037  ** xcb_void_cookie_t xcb_fill_poly_checked
10038  **
10039  ** @param xcb_connection_t  *c
10040  ** @param xcb_drawable_t     drawable
10041  ** @param xcb_gcontext_t     gc
10042  ** @param uint8_t            shape
10043  ** @param uint8_t            coordinate_mode
10044  ** @param uint32_t           points_len
10045  ** @param const xcb_point_t *points
10046  ** @returns xcb_void_cookie_t
10047  **
10048  *****************************************************************************/
10049 
10050 xcb_void_cookie_t
10051 xcb_fill_poly_checked (xcb_connection_t  *c  /**< */,
10052                        xcb_drawable_t     drawable  /**< */,
10053                        xcb_gcontext_t     gc  /**< */,
10054                        uint8_t            shape  /**< */,
10055                        uint8_t            coordinate_mode  /**< */,
10056                        uint32_t           points_len  /**< */,
10057                        const xcb_point_t *points  /**< */)
10058 {
10059     static const xcb_protocol_request_t xcb_req = {
10060         /* count */ 4,
10061         /* ext */ 0,
10062         /* opcode */ XCB_FILL_POLY,
10063         /* isvoid */ 1
10064     };
10065 
10066     struct iovec xcb_parts[6];
10067     xcb_void_cookie_t xcb_ret;
10068     xcb_fill_poly_request_t xcb_out;
10069 
10070     xcb_out.pad0 = 0;
10071     xcb_out.drawable = drawable;
10072     xcb_out.gc = gc;
10073     xcb_out.shape = shape;
10074     xcb_out.coordinate_mode = coordinate_mode;
10075     memset(xcb_out.pad1, 0, 2);
10076 
10077     xcb_parts[2].iov_base = (char *) &xcb_out;
10078     xcb_parts[2].iov_len = sizeof(xcb_out);
10079     xcb_parts[3].iov_base = 0;
10080     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10081     /* xcb_point_t points */
10082     xcb_parts[4].iov_base = (char *) points;
10083     xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t);
10084     xcb_parts[5].iov_base = 0;
10085     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10086 
10087     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
10088     return xcb_ret;
10089 }
10090 
10091 
10092 /*****************************************************************************
10093  **
10094  ** xcb_void_cookie_t xcb_fill_poly
10095  **
10096  ** @param xcb_connection_t  *c
10097  ** @param xcb_drawable_t     drawable
10098  ** @param xcb_gcontext_t     gc
10099  ** @param uint8_t            shape
10100  ** @param uint8_t            coordinate_mode
10101  ** @param uint32_t           points_len
10102  ** @param const xcb_point_t *points
10103  ** @returns xcb_void_cookie_t
10104  **
10105  *****************************************************************************/
10106 
10107 xcb_void_cookie_t
10108 xcb_fill_poly (xcb_connection_t  *c  /**< */,
10109                xcb_drawable_t     drawable  /**< */,
10110                xcb_gcontext_t     gc  /**< */,
10111                uint8_t            shape  /**< */,
10112                uint8_t            coordinate_mode  /**< */,
10113                uint32_t           points_len  /**< */,
10114                const xcb_point_t *points  /**< */)
10115 {
10116     static const xcb_protocol_request_t xcb_req = {
10117         /* count */ 4,
10118         /* ext */ 0,
10119         /* opcode */ XCB_FILL_POLY,
10120         /* isvoid */ 1
10121     };
10122 
10123     struct iovec xcb_parts[6];
10124     xcb_void_cookie_t xcb_ret;
10125     xcb_fill_poly_request_t xcb_out;
10126 
10127     xcb_out.pad0 = 0;
10128     xcb_out.drawable = drawable;
10129     xcb_out.gc = gc;
10130     xcb_out.shape = shape;
10131     xcb_out.coordinate_mode = coordinate_mode;
10132     memset(xcb_out.pad1, 0, 2);
10133 
10134     xcb_parts[2].iov_base = (char *) &xcb_out;
10135     xcb_parts[2].iov_len = sizeof(xcb_out);
10136     xcb_parts[3].iov_base = 0;
10137     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10138     /* xcb_point_t points */
10139     xcb_parts[4].iov_base = (char *) points;
10140     xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t);
10141     xcb_parts[5].iov_base = 0;
10142     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10143 
10144     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
10145     return xcb_ret;
10146 }
10147 
10148 int
10149 xcb_poly_fill_rectangle_sizeof (const void  *_buffer  /**< */,
10150                                 uint32_t     rectangles_len  /**< */)
10151 {
10152     char *xcb_tmp = (char *)_buffer;
10153     unsigned int xcb_buffer_len = 0;
10154     unsigned int xcb_block_len = 0;
10155     unsigned int xcb_pad = 0;
10156     unsigned int xcb_align_to = 0;
10157 
10158 
10159     xcb_block_len += sizeof(xcb_poly_fill_rectangle_request_t);
10160     xcb_tmp += xcb_block_len;
10161     xcb_buffer_len += xcb_block_len;
10162     xcb_block_len = 0;
10163     /* rectangles */
10164     xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
10165     xcb_tmp += xcb_block_len;
10166     xcb_align_to = ALIGNOF(xcb_rectangle_t);
10167     /* insert padding */
10168     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10169     xcb_buffer_len += xcb_block_len + xcb_pad;
10170     if (0 != xcb_pad) {
10171         xcb_tmp += xcb_pad;
10172         xcb_pad = 0;
10173     }
10174     xcb_block_len = 0;
10175 
10176     return xcb_buffer_len;
10177 }
10178 
10179 
10180 /*****************************************************************************
10181  **
10182  ** xcb_void_cookie_t xcb_poly_fill_rectangle_checked
10183  **
10184  ** @param xcb_connection_t      *c
10185  ** @param xcb_drawable_t         drawable
10186  ** @param xcb_gcontext_t         gc
10187  ** @param uint32_t               rectangles_len
10188  ** @param const xcb_rectangle_t *rectangles
10189  ** @returns xcb_void_cookie_t
10190  **
10191  *****************************************************************************/
10192 
10193 xcb_void_cookie_t
10194 xcb_poly_fill_rectangle_checked (xcb_connection_t      *c  /**< */,
10195                                  xcb_drawable_t         drawable  /**< */,
10196                                  xcb_gcontext_t         gc  /**< */,
10197                                  uint32_t               rectangles_len  /**< */,
10198                                  const xcb_rectangle_t *rectangles  /**< */)
10199 {
10200     static const xcb_protocol_request_t xcb_req = {
10201         /* count */ 4,
10202         /* ext */ 0,
10203         /* opcode */ XCB_POLY_FILL_RECTANGLE,
10204         /* isvoid */ 1
10205     };
10206 
10207     struct iovec xcb_parts[6];
10208     xcb_void_cookie_t xcb_ret;
10209     xcb_poly_fill_rectangle_request_t xcb_out;
10210 
10211     xcb_out.pad0 = 0;
10212     xcb_out.drawable = drawable;
10213     xcb_out.gc = gc;
10214 
10215     xcb_parts[2].iov_base = (char *) &xcb_out;
10216     xcb_parts[2].iov_len = sizeof(xcb_out);
10217     xcb_parts[3].iov_base = 0;
10218     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10219     /* xcb_rectangle_t rectangles */
10220     xcb_parts[4].iov_base = (char *) rectangles;
10221     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
10222     xcb_parts[5].iov_base = 0;
10223     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10224 
10225     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
10226     return xcb_ret;
10227 }
10228 
10229 
10230 /*****************************************************************************
10231  **
10232  ** xcb_void_cookie_t xcb_poly_fill_rectangle
10233  **
10234  ** @param xcb_connection_t      *c
10235  ** @param xcb_drawable_t         drawable
10236  ** @param xcb_gcontext_t         gc
10237  ** @param uint32_t               rectangles_len
10238  ** @param const xcb_rectangle_t *rectangles
10239  ** @returns xcb_void_cookie_t
10240  **
10241  *****************************************************************************/
10242 
10243 xcb_void_cookie_t
10244 xcb_poly_fill_rectangle (xcb_connection_t      *c  /**< */,
10245                          xcb_drawable_t         drawable  /**< */,
10246                          xcb_gcontext_t         gc  /**< */,
10247                          uint32_t               rectangles_len  /**< */,
10248                          const xcb_rectangle_t *rectangles  /**< */)
10249 {
10250     static const xcb_protocol_request_t xcb_req = {
10251         /* count */ 4,
10252         /* ext */ 0,
10253         /* opcode */ XCB_POLY_FILL_RECTANGLE,
10254         /* isvoid */ 1
10255     };
10256 
10257     struct iovec xcb_parts[6];
10258     xcb_void_cookie_t xcb_ret;
10259     xcb_poly_fill_rectangle_request_t xcb_out;
10260 
10261     xcb_out.pad0 = 0;
10262     xcb_out.drawable = drawable;
10263     xcb_out.gc = gc;
10264 
10265     xcb_parts[2].iov_base = (char *) &xcb_out;
10266     xcb_parts[2].iov_len = sizeof(xcb_out);
10267     xcb_parts[3].iov_base = 0;
10268     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10269     /* xcb_rectangle_t rectangles */
10270     xcb_parts[4].iov_base = (char *) rectangles;
10271     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
10272     xcb_parts[5].iov_base = 0;
10273     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10274 
10275     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
10276     return xcb_ret;
10277 }
10278 
10279 int
10280 xcb_poly_fill_arc_sizeof (const void  *_buffer  /**< */,
10281                           uint32_t     arcs_len  /**< */)
10282 {
10283     char *xcb_tmp = (char *)_buffer;
10284     unsigned int xcb_buffer_len = 0;
10285     unsigned int xcb_block_len = 0;
10286     unsigned int xcb_pad = 0;
10287     unsigned int xcb_align_to = 0;
10288 
10289 
10290     xcb_block_len += sizeof(xcb_poly_fill_arc_request_t);
10291     xcb_tmp += xcb_block_len;
10292     xcb_buffer_len += xcb_block_len;
10293     xcb_block_len = 0;
10294     /* arcs */
10295     xcb_block_len += arcs_len * sizeof(xcb_arc_t);
10296     xcb_tmp += xcb_block_len;
10297     xcb_align_to = ALIGNOF(xcb_arc_t);
10298     /* insert padding */
10299     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10300     xcb_buffer_len += xcb_block_len + xcb_pad;
10301     if (0 != xcb_pad) {
10302         xcb_tmp += xcb_pad;
10303         xcb_pad = 0;
10304     }
10305     xcb_block_len = 0;
10306 
10307     return xcb_buffer_len;
10308 }
10309 
10310 
10311 /*****************************************************************************
10312  **
10313  ** xcb_void_cookie_t xcb_poly_fill_arc_checked
10314  **
10315  ** @param xcb_connection_t *c
10316  ** @param xcb_drawable_t    drawable
10317  ** @param xcb_gcontext_t    gc
10318  ** @param uint32_t          arcs_len
10319  ** @param const xcb_arc_t  *arcs
10320  ** @returns xcb_void_cookie_t
10321  **
10322  *****************************************************************************/
10323 
10324 xcb_void_cookie_t
10325 xcb_poly_fill_arc_checked (xcb_connection_t *c  /**< */,
10326                            xcb_drawable_t    drawable  /**< */,
10327                            xcb_gcontext_t    gc  /**< */,
10328                            uint32_t          arcs_len  /**< */,
10329                            const xcb_arc_t  *arcs  /**< */)
10330 {
10331     static const xcb_protocol_request_t xcb_req = {
10332         /* count */ 4,
10333         /* ext */ 0,
10334         /* opcode */ XCB_POLY_FILL_ARC,
10335         /* isvoid */ 1
10336     };
10337 
10338     struct iovec xcb_parts[6];
10339     xcb_void_cookie_t xcb_ret;
10340     xcb_poly_fill_arc_request_t xcb_out;
10341 
10342     xcb_out.pad0 = 0;
10343     xcb_out.drawable = drawable;
10344     xcb_out.gc = gc;
10345 
10346     xcb_parts[2].iov_base = (char *) &xcb_out;
10347     xcb_parts[2].iov_len = sizeof(xcb_out);
10348     xcb_parts[3].iov_base = 0;
10349     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10350     /* xcb_arc_t arcs */
10351     xcb_parts[4].iov_base = (char *) arcs;
10352     xcb_parts[4].iov_len = arcs_len * sizeof(xcb_arc_t);
10353     xcb_parts[5].iov_base = 0;
10354     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10355 
10356     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
10357     return xcb_ret;
10358 }
10359 
10360 
10361 /*****************************************************************************
10362  **
10363  ** xcb_void_cookie_t xcb_poly_fill_arc
10364  **
10365  ** @param xcb_connection_t *c
10366  ** @param xcb_drawable_t    drawable
10367  ** @param xcb_gcontext_t    gc
10368  ** @param uint32_t          arcs_len
10369  ** @param const xcb_arc_t  *arcs
10370  ** @returns xcb_void_cookie_t
10371  **
10372  *****************************************************************************/
10373 
10374 xcb_void_cookie_t
10375 xcb_poly_fill_arc (xcb_connection_t *c  /**< */,
10376                    xcb_drawable_t    drawable  /**< */,
10377                    xcb_gcontext_t    gc  /**< */,
10378                    uint32_t          arcs_len  /**< */,
10379                    const xcb_arc_t  *arcs  /**< */)
10380 {
10381     static const xcb_protocol_request_t xcb_req = {
10382         /* count */ 4,
10383         /* ext */ 0,
10384         /* opcode */ XCB_POLY_FILL_ARC,
10385         /* isvoid */ 1
10386     };
10387 
10388     struct iovec xcb_parts[6];
10389     xcb_void_cookie_t xcb_ret;
10390     xcb_poly_fill_arc_request_t xcb_out;
10391 
10392     xcb_out.pad0 = 0;
10393     xcb_out.drawable = drawable;
10394     xcb_out.gc = gc;
10395 
10396     xcb_parts[2].iov_base = (char *) &xcb_out;
10397     xcb_parts[2].iov_len = sizeof(xcb_out);
10398     xcb_parts[3].iov_base = 0;
10399     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10400     /* xcb_arc_t arcs */
10401     xcb_parts[4].iov_base = (char *) arcs;
10402     xcb_parts[4].iov_len = arcs_len * sizeof(xcb_arc_t);
10403     xcb_parts[5].iov_base = 0;
10404     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10405 
10406     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
10407     return xcb_ret;
10408 }
10409 
10410 int
10411 xcb_put_image_sizeof (const void  *_buffer  /**< */,
10412                       uint32_t     data_len  /**< */)
10413 {
10414     char *xcb_tmp = (char *)_buffer;
10415     unsigned int xcb_buffer_len = 0;
10416     unsigned int xcb_block_len = 0;
10417     unsigned int xcb_pad = 0;
10418     unsigned int xcb_align_to = 0;
10419 
10420 
10421     xcb_block_len += sizeof(xcb_put_image_request_t);
10422     xcb_tmp += xcb_block_len;
10423     xcb_buffer_len += xcb_block_len;
10424     xcb_block_len = 0;
10425     /* data */
10426     xcb_block_len += data_len * sizeof(uint8_t);
10427     xcb_tmp += xcb_block_len;
10428     xcb_align_to = ALIGNOF(uint8_t);
10429     /* insert padding */
10430     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10431     xcb_buffer_len += xcb_block_len + xcb_pad;
10432     if (0 != xcb_pad) {
10433         xcb_tmp += xcb_pad;
10434         xcb_pad = 0;
10435     }
10436     xcb_block_len = 0;
10437 
10438     return xcb_buffer_len;
10439 }
10440 
10441 
10442 /*****************************************************************************
10443  **
10444  ** xcb_void_cookie_t xcb_put_image_checked
10445  **
10446  ** @param xcb_connection_t *c
10447  ** @param uint8_t           format
10448  ** @param xcb_drawable_t    drawable
10449  ** @param xcb_gcontext_t    gc
10450  ** @param uint16_t          width
10451  ** @param uint16_t          height
10452  ** @param int16_t           dst_x
10453  ** @param int16_t           dst_y
10454  ** @param uint8_t           left_pad
10455  ** @param uint8_t           depth
10456  ** @param uint32_t          data_len
10457  ** @param const uint8_t    *data
10458  ** @returns xcb_void_cookie_t
10459  **
10460  *****************************************************************************/
10461 
10462 xcb_void_cookie_t
10463 xcb_put_image_checked (xcb_connection_t *c  /**< */,
10464                        uint8_t           format  /**< */,
10465                        xcb_drawable_t    drawable  /**< */,
10466                        xcb_gcontext_t    gc  /**< */,
10467                        uint16_t          width  /**< */,
10468                        uint16_t          height  /**< */,
10469                        int16_t           dst_x  /**< */,
10470                        int16_t           dst_y  /**< */,
10471                        uint8_t           left_pad  /**< */,
10472                        uint8_t           depth  /**< */,
10473                        uint32_t          data_len  /**< */,
10474                        const uint8_t    *data  /**< */)
10475 {
10476     static const xcb_protocol_request_t xcb_req = {
10477         /* count */ 4,
10478         /* ext */ 0,
10479         /* opcode */ XCB_PUT_IMAGE,
10480         /* isvoid */ 1
10481     };
10482 
10483     struct iovec xcb_parts[6];
10484     xcb_void_cookie_t xcb_ret;
10485     xcb_put_image_request_t xcb_out;
10486 
10487     xcb_out.format = format;
10488     xcb_out.drawable = drawable;
10489     xcb_out.gc = gc;
10490     xcb_out.width = width;
10491     xcb_out.height = height;
10492     xcb_out.dst_x = dst_x;
10493     xcb_out.dst_y = dst_y;
10494     xcb_out.left_pad = left_pad;
10495     xcb_out.depth = depth;
10496     memset(xcb_out.pad0, 0, 2);
10497 
10498     xcb_parts[2].iov_base = (char *) &xcb_out;
10499     xcb_parts[2].iov_len = sizeof(xcb_out);
10500     xcb_parts[3].iov_base = 0;
10501     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10502     /* uint8_t data */
10503     xcb_parts[4].iov_base = (char *) data;
10504     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
10505     xcb_parts[5].iov_base = 0;
10506     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10507 
10508     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
10509     return xcb_ret;
10510 }
10511 
10512 
10513 /*****************************************************************************
10514  **
10515  ** xcb_void_cookie_t xcb_put_image
10516  **
10517  ** @param xcb_connection_t *c
10518  ** @param uint8_t           format
10519  ** @param xcb_drawable_t    drawable
10520  ** @param xcb_gcontext_t    gc
10521  ** @param uint16_t          width
10522  ** @param uint16_t          height
10523  ** @param int16_t           dst_x
10524  ** @param int16_t           dst_y
10525  ** @param uint8_t           left_pad
10526  ** @param uint8_t           depth
10527  ** @param uint32_t          data_len
10528  ** @param const uint8_t    *data
10529  ** @returns xcb_void_cookie_t
10530  **
10531  *****************************************************************************/
10532 
10533 xcb_void_cookie_t
10534 xcb_put_image (xcb_connection_t *c  /**< */,
10535                uint8_t           format  /**< */,
10536                xcb_drawable_t    drawable  /**< */,
10537                xcb_gcontext_t    gc  /**< */,
10538                uint16_t          width  /**< */,
10539                uint16_t          height  /**< */,
10540                int16_t           dst_x  /**< */,
10541                int16_t           dst_y  /**< */,
10542                uint8_t           left_pad  /**< */,
10543                uint8_t           depth  /**< */,
10544                uint32_t          data_len  /**< */,
10545                const uint8_t    *data  /**< */)
10546 {
10547     static const xcb_protocol_request_t xcb_req = {
10548         /* count */ 4,
10549         /* ext */ 0,
10550         /* opcode */ XCB_PUT_IMAGE,
10551         /* isvoid */ 1
10552     };
10553 
10554     struct iovec xcb_parts[6];
10555     xcb_void_cookie_t xcb_ret;
10556     xcb_put_image_request_t xcb_out;
10557 
10558     xcb_out.format = format;
10559     xcb_out.drawable = drawable;
10560     xcb_out.gc = gc;
10561     xcb_out.width = width;
10562     xcb_out.height = height;
10563     xcb_out.dst_x = dst_x;
10564     xcb_out.dst_y = dst_y;
10565     xcb_out.left_pad = left_pad;
10566     xcb_out.depth = depth;
10567     memset(xcb_out.pad0, 0, 2);
10568 
10569     xcb_parts[2].iov_base = (char *) &xcb_out;
10570     xcb_parts[2].iov_len = sizeof(xcb_out);
10571     xcb_parts[3].iov_base = 0;
10572     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10573     /* uint8_t data */
10574     xcb_parts[4].iov_base = (char *) data;
10575     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
10576     xcb_parts[5].iov_base = 0;
10577     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10578 
10579     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
10580     return xcb_ret;
10581 }
10582 
10583 int
10584 xcb_get_image_sizeof (const void  *_buffer  /**< */)
10585 {
10586     char *xcb_tmp = (char *)_buffer;
10587     const xcb_get_image_reply_t *_aux = (xcb_get_image_reply_t *)_buffer;
10588     unsigned int xcb_buffer_len = 0;
10589     unsigned int xcb_block_len = 0;
10590     unsigned int xcb_pad = 0;
10591     unsigned int xcb_align_to = 0;
10592 
10593 
10594     xcb_block_len += sizeof(xcb_get_image_reply_t);
10595     xcb_tmp += xcb_block_len;
10596     xcb_buffer_len += xcb_block_len;
10597     xcb_block_len = 0;
10598     /* data */
10599     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
10600     xcb_tmp += xcb_block_len;
10601     xcb_align_to = ALIGNOF(uint8_t);
10602     /* insert padding */
10603     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10604     xcb_buffer_len += xcb_block_len + xcb_pad;
10605     if (0 != xcb_pad) {
10606         xcb_tmp += xcb_pad;
10607         xcb_pad = 0;
10608     }
10609     xcb_block_len = 0;
10610 
10611     return xcb_buffer_len;
10612 }
10613 
10614 
10615 /*****************************************************************************
10616  **
10617  ** xcb_get_image_cookie_t xcb_get_image
10618  **
10619  ** @param xcb_connection_t *c
10620  ** @param uint8_t           format
10621  ** @param xcb_drawable_t    drawable
10622  ** @param int16_t           x
10623  ** @param int16_t           y
10624  ** @param uint16_t          width
10625  ** @param uint16_t          height
10626  ** @param uint32_t          plane_mask
10627  ** @returns xcb_get_image_cookie_t
10628  **
10629  *****************************************************************************/
10630 
10631 xcb_get_image_cookie_t
10632 xcb_get_image (xcb_connection_t *c  /**< */,
10633                uint8_t           format  /**< */,
10634                xcb_drawable_t    drawable  /**< */,
10635                int16_t           x  /**< */,
10636                int16_t           y  /**< */,
10637                uint16_t          width  /**< */,
10638                uint16_t          height  /**< */,
10639                uint32_t          plane_mask  /**< */)
10640 {
10641     static const xcb_protocol_request_t xcb_req = {
10642         /* count */ 2,
10643         /* ext */ 0,
10644         /* opcode */ XCB_GET_IMAGE,
10645         /* isvoid */ 0
10646     };
10647 
10648     struct iovec xcb_parts[4];
10649     xcb_get_image_cookie_t xcb_ret;
10650     xcb_get_image_request_t xcb_out;
10651 
10652     xcb_out.format = format;
10653     xcb_out.drawable = drawable;
10654     xcb_out.x = x;
10655     xcb_out.y = y;
10656     xcb_out.width = width;
10657     xcb_out.height = height;
10658     xcb_out.plane_mask = plane_mask;
10659 
10660     xcb_parts[2].iov_base = (char *) &xcb_out;
10661     xcb_parts[2].iov_len = sizeof(xcb_out);
10662     xcb_parts[3].iov_base = 0;
10663     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10664 
10665     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
10666     return xcb_ret;
10667 }
10668 
10669 
10670 /*****************************************************************************
10671  **
10672  ** xcb_get_image_cookie_t xcb_get_image_unchecked
10673  **
10674  ** @param xcb_connection_t *c
10675  ** @param uint8_t           format
10676  ** @param xcb_drawable_t    drawable
10677  ** @param int16_t           x
10678  ** @param int16_t           y
10679  ** @param uint16_t          width
10680  ** @param uint16_t          height
10681  ** @param uint32_t          plane_mask
10682  ** @returns xcb_get_image_cookie_t
10683  **
10684  *****************************************************************************/
10685 
10686 xcb_get_image_cookie_t
10687 xcb_get_image_unchecked (xcb_connection_t *c  /**< */,
10688                          uint8_t           format  /**< */,
10689                          xcb_drawable_t    drawable  /**< */,
10690                          int16_t           x  /**< */,
10691                          int16_t           y  /**< */,
10692                          uint16_t          width  /**< */,
10693                          uint16_t          height  /**< */,
10694                          uint32_t          plane_mask  /**< */)
10695 {
10696     static const xcb_protocol_request_t xcb_req = {
10697         /* count */ 2,
10698         /* ext */ 0,
10699         /* opcode */ XCB_GET_IMAGE,
10700         /* isvoid */ 0
10701     };
10702 
10703     struct iovec xcb_parts[4];
10704     xcb_get_image_cookie_t xcb_ret;
10705     xcb_get_image_request_t xcb_out;
10706 
10707     xcb_out.format = format;
10708     xcb_out.drawable = drawable;
10709     xcb_out.x = x;
10710     xcb_out.y = y;
10711     xcb_out.width = width;
10712     xcb_out.height = height;
10713     xcb_out.plane_mask = plane_mask;
10714 
10715     xcb_parts[2].iov_base = (char *) &xcb_out;
10716     xcb_parts[2].iov_len = sizeof(xcb_out);
10717     xcb_parts[3].iov_base = 0;
10718     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10719 
10720     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
10721     return xcb_ret;
10722 }
10723 
10724 
10725 /*****************************************************************************
10726  **
10727  ** uint8_t * xcb_get_image_data
10728  **
10729  ** @param const xcb_get_image_reply_t *R
10730  ** @returns uint8_t *
10731  **
10732  *****************************************************************************/
10733 
10734 uint8_t *
10735 xcb_get_image_data (const xcb_get_image_reply_t *R  /**< */)
10736 {
10737     return (uint8_t *) (R + 1);
10738 }
10739 
10740 
10741 /*****************************************************************************
10742  **
10743  ** int xcb_get_image_data_length
10744  **
10745  ** @param const xcb_get_image_reply_t *R
10746  ** @returns int
10747  **
10748  *****************************************************************************/
10749 
10750 int
10751 xcb_get_image_data_length (const xcb_get_image_reply_t *R  /**< */)
10752 {
10753     return (R->length * 4);
10754 }
10755 
10756 
10757 /*****************************************************************************
10758  **
10759  ** xcb_generic_iterator_t xcb_get_image_data_end
10760  **
10761  ** @param const xcb_get_image_reply_t *R
10762  ** @returns xcb_generic_iterator_t
10763  **
10764  *****************************************************************************/
10765 
10766 xcb_generic_iterator_t
10767 xcb_get_image_data_end (const xcb_get_image_reply_t *R  /**< */)
10768 {
10769     xcb_generic_iterator_t i;
10770     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
10771     i.rem = 0;
10772     i.index = (char *) i.data - (char *) R;
10773     return i;
10774 }
10775 
10776 
10777 /*****************************************************************************
10778  **
10779  ** xcb_get_image_reply_t * xcb_get_image_reply
10780  **
10781  ** @param xcb_connection_t        *c
10782  ** @param xcb_get_image_cookie_t   cookie
10783  ** @param xcb_generic_error_t    **e
10784  ** @returns xcb_get_image_reply_t *
10785  **
10786  *****************************************************************************/
10787 
10788 xcb_get_image_reply_t *
10789 xcb_get_image_reply (xcb_connection_t        *c  /**< */,
10790                      xcb_get_image_cookie_t   cookie  /**< */,
10791                      xcb_generic_error_t    **e  /**< */)
10792 {
10793     return (xcb_get_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
10794 }
10795 
10796 int
10797 xcb_poly_text_8_sizeof (const void  *_buffer  /**< */,
10798                         uint32_t     items_len  /**< */)
10799 {
10800     char *xcb_tmp = (char *)_buffer;
10801     unsigned int xcb_buffer_len = 0;
10802     unsigned int xcb_block_len = 0;
10803     unsigned int xcb_pad = 0;
10804     unsigned int xcb_align_to = 0;
10805 
10806 
10807     xcb_block_len += sizeof(xcb_poly_text_8_request_t);
10808     xcb_tmp += xcb_block_len;
10809     xcb_buffer_len += xcb_block_len;
10810     xcb_block_len = 0;
10811     /* items */
10812     xcb_block_len += items_len * sizeof(uint8_t);
10813     xcb_tmp += xcb_block_len;
10814     xcb_align_to = ALIGNOF(uint8_t);
10815     /* insert padding */
10816     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10817     xcb_buffer_len += xcb_block_len + xcb_pad;
10818     if (0 != xcb_pad) {
10819         xcb_tmp += xcb_pad;
10820         xcb_pad = 0;
10821     }
10822     xcb_block_len = 0;
10823 
10824     return xcb_buffer_len;
10825 }
10826 
10827 
10828 /*****************************************************************************
10829  **
10830  ** xcb_void_cookie_t xcb_poly_text_8_checked
10831  **
10832  ** @param xcb_connection_t *c
10833  ** @param xcb_drawable_t    drawable
10834  ** @param xcb_gcontext_t    gc
10835  ** @param int16_t           x
10836  ** @param int16_t           y
10837  ** @param uint32_t          items_len
10838  ** @param const uint8_t    *items
10839  ** @returns xcb_void_cookie_t
10840  **
10841  *****************************************************************************/
10842 
10843 xcb_void_cookie_t
10844 xcb_poly_text_8_checked (xcb_connection_t *c  /**< */,
10845                          xcb_drawable_t    drawable  /**< */,
10846                          xcb_gcontext_t    gc  /**< */,
10847                          int16_t           x  /**< */,
10848                          int16_t           y  /**< */,
10849                          uint32_t          items_len  /**< */,
10850                          const uint8_t    *items  /**< */)
10851 {
10852     static const xcb_protocol_request_t xcb_req = {
10853         /* count */ 4,
10854         /* ext */ 0,
10855         /* opcode */ XCB_POLY_TEXT_8,
10856         /* isvoid */ 1
10857     };
10858 
10859     struct iovec xcb_parts[6];
10860     xcb_void_cookie_t xcb_ret;
10861     xcb_poly_text_8_request_t xcb_out;
10862 
10863     xcb_out.pad0 = 0;
10864     xcb_out.drawable = drawable;
10865     xcb_out.gc = gc;
10866     xcb_out.x = x;
10867     xcb_out.y = y;
10868 
10869     xcb_parts[2].iov_base = (char *) &xcb_out;
10870     xcb_parts[2].iov_len = sizeof(xcb_out);
10871     xcb_parts[3].iov_base = 0;
10872     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10873     /* uint8_t items */
10874     xcb_parts[4].iov_base = (char *) items;
10875     xcb_parts[4].iov_len = items_len * sizeof(uint8_t);
10876     xcb_parts[5].iov_base = 0;
10877     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10878 
10879     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
10880     return xcb_ret;
10881 }
10882 
10883 
10884 /*****************************************************************************
10885  **
10886  ** xcb_void_cookie_t xcb_poly_text_8
10887  **
10888  ** @param xcb_connection_t *c
10889  ** @param xcb_drawable_t    drawable
10890  ** @param xcb_gcontext_t    gc
10891  ** @param int16_t           x
10892  ** @param int16_t           y
10893  ** @param uint32_t          items_len
10894  ** @param const uint8_t    *items
10895  ** @returns xcb_void_cookie_t
10896  **
10897  *****************************************************************************/
10898 
10899 xcb_void_cookie_t
10900 xcb_poly_text_8 (xcb_connection_t *c  /**< */,
10901                  xcb_drawable_t    drawable  /**< */,
10902                  xcb_gcontext_t    gc  /**< */,
10903                  int16_t           x  /**< */,
10904                  int16_t           y  /**< */,
10905                  uint32_t          items_len  /**< */,
10906                  const uint8_t    *items  /**< */)
10907 {
10908     static const xcb_protocol_request_t xcb_req = {
10909         /* count */ 4,
10910         /* ext */ 0,
10911         /* opcode */ XCB_POLY_TEXT_8,
10912         /* isvoid */ 1
10913     };
10914 
10915     struct iovec xcb_parts[6];
10916     xcb_void_cookie_t xcb_ret;
10917     xcb_poly_text_8_request_t xcb_out;
10918 
10919     xcb_out.pad0 = 0;
10920     xcb_out.drawable = drawable;
10921     xcb_out.gc = gc;
10922     xcb_out.x = x;
10923     xcb_out.y = y;
10924 
10925     xcb_parts[2].iov_base = (char *) &xcb_out;
10926     xcb_parts[2].iov_len = sizeof(xcb_out);
10927     xcb_parts[3].iov_base = 0;
10928     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10929     /* uint8_t items */
10930     xcb_parts[4].iov_base = (char *) items;
10931     xcb_parts[4].iov_len = items_len * sizeof(uint8_t);
10932     xcb_parts[5].iov_base = 0;
10933     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
10934 
10935     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
10936     return xcb_ret;
10937 }
10938 
10939 int
10940 xcb_poly_text_16_sizeof (const void  *_buffer  /**< */,
10941                          uint32_t     items_len  /**< */)
10942 {
10943     char *xcb_tmp = (char *)_buffer;
10944     unsigned int xcb_buffer_len = 0;
10945     unsigned int xcb_block_len = 0;
10946     unsigned int xcb_pad = 0;
10947     unsigned int xcb_align_to = 0;
10948 
10949 
10950     xcb_block_len += sizeof(xcb_poly_text_16_request_t);
10951     xcb_tmp += xcb_block_len;
10952     xcb_buffer_len += xcb_block_len;
10953     xcb_block_len = 0;
10954     /* items */
10955     xcb_block_len += items_len * sizeof(uint8_t);
10956     xcb_tmp += xcb_block_len;
10957     xcb_align_to = ALIGNOF(uint8_t);
10958     /* insert padding */
10959     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10960     xcb_buffer_len += xcb_block_len + xcb_pad;
10961     if (0 != xcb_pad) {
10962         xcb_tmp += xcb_pad;
10963         xcb_pad = 0;
10964     }
10965     xcb_block_len = 0;
10966 
10967     return xcb_buffer_len;
10968 }
10969 
10970 
10971 /*****************************************************************************
10972  **
10973  ** xcb_void_cookie_t xcb_poly_text_16_checked
10974  **
10975  ** @param xcb_connection_t *c
10976  ** @param xcb_drawable_t    drawable
10977  ** @param xcb_gcontext_t    gc
10978  ** @param int16_t           x
10979  ** @param int16_t           y
10980  ** @param uint32_t          items_len
10981  ** @param const uint8_t    *items
10982  ** @returns xcb_void_cookie_t
10983  **
10984  *****************************************************************************/
10985 
10986 xcb_void_cookie_t
10987 xcb_poly_text_16_checked (xcb_connection_t *c  /**< */,
10988                           xcb_drawable_t    drawable  /**< */,
10989                           xcb_gcontext_t    gc  /**< */,
10990                           int16_t           x  /**< */,
10991                           int16_t           y  /**< */,
10992                           uint32_t          items_len  /**< */,
10993                           const uint8_t    *items  /**< */)
10994 {
10995     static const xcb_protocol_request_t xcb_req = {
10996         /* count */ 4,
10997         /* ext */ 0,
10998         /* opcode */ XCB_POLY_TEXT_16,
10999         /* isvoid */ 1
11000     };
11001 
11002     struct iovec xcb_parts[6];
11003     xcb_void_cookie_t xcb_ret;
11004     xcb_poly_text_16_request_t xcb_out;
11005 
11006     xcb_out.pad0 = 0;
11007     xcb_out.drawable = drawable;
11008     xcb_out.gc = gc;
11009     xcb_out.x = x;
11010     xcb_out.y = y;
11011 
11012     xcb_parts[2].iov_base = (char *) &xcb_out;
11013     xcb_parts[2].iov_len = sizeof(xcb_out);
11014     xcb_parts[3].iov_base = 0;
11015     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11016     /* uint8_t items */
11017     xcb_parts[4].iov_base = (char *) items;
11018     xcb_parts[4].iov_len = items_len * sizeof(uint8_t);
11019     xcb_parts[5].iov_base = 0;
11020     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
11021 
11022     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11023     return xcb_ret;
11024 }
11025 
11026 
11027 /*****************************************************************************
11028  **
11029  ** xcb_void_cookie_t xcb_poly_text_16
11030  **
11031  ** @param xcb_connection_t *c
11032  ** @param xcb_drawable_t    drawable
11033  ** @param xcb_gcontext_t    gc
11034  ** @param int16_t           x
11035  ** @param int16_t           y
11036  ** @param uint32_t          items_len
11037  ** @param const uint8_t    *items
11038  ** @returns xcb_void_cookie_t
11039  **
11040  *****************************************************************************/
11041 
11042 xcb_void_cookie_t
11043 xcb_poly_text_16 (xcb_connection_t *c  /**< */,
11044                   xcb_drawable_t    drawable  /**< */,
11045                   xcb_gcontext_t    gc  /**< */,
11046                   int16_t           x  /**< */,
11047                   int16_t           y  /**< */,
11048                   uint32_t          items_len  /**< */,
11049                   const uint8_t    *items  /**< */)
11050 {
11051     static const xcb_protocol_request_t xcb_req = {
11052         /* count */ 4,
11053         /* ext */ 0,
11054         /* opcode */ XCB_POLY_TEXT_16,
11055         /* isvoid */ 1
11056     };
11057 
11058     struct iovec xcb_parts[6];
11059     xcb_void_cookie_t xcb_ret;
11060     xcb_poly_text_16_request_t xcb_out;
11061 
11062     xcb_out.pad0 = 0;
11063     xcb_out.drawable = drawable;
11064     xcb_out.gc = gc;
11065     xcb_out.x = x;
11066     xcb_out.y = y;
11067 
11068     xcb_parts[2].iov_base = (char *) &xcb_out;
11069     xcb_parts[2].iov_len = sizeof(xcb_out);
11070     xcb_parts[3].iov_base = 0;
11071     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11072     /* uint8_t items */
11073     xcb_parts[4].iov_base = (char *) items;
11074     xcb_parts[4].iov_len = items_len * sizeof(uint8_t);
11075     xcb_parts[5].iov_base = 0;
11076     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
11077 
11078     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11079     return xcb_ret;
11080 }
11081 
11082 int
11083 xcb_image_text_8_sizeof (const void  *_buffer  /**< */)
11084 {
11085     char *xcb_tmp = (char *)_buffer;
11086     const xcb_image_text_8_request_t *_aux = (xcb_image_text_8_request_t *)_buffer;
11087     unsigned int xcb_buffer_len = 0;
11088     unsigned int xcb_block_len = 0;
11089     unsigned int xcb_pad = 0;
11090     unsigned int xcb_align_to = 0;
11091 
11092 
11093     xcb_block_len += sizeof(xcb_image_text_8_request_t);
11094     xcb_tmp += xcb_block_len;
11095     xcb_buffer_len += xcb_block_len;
11096     xcb_block_len = 0;
11097     /* string */
11098     xcb_block_len += _aux->string_len * sizeof(char);
11099     xcb_tmp += xcb_block_len;
11100     xcb_align_to = ALIGNOF(char);
11101     /* insert padding */
11102     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
11103     xcb_buffer_len += xcb_block_len + xcb_pad;
11104     if (0 != xcb_pad) {
11105         xcb_tmp += xcb_pad;
11106         xcb_pad = 0;
11107     }
11108     xcb_block_len = 0;
11109 
11110     return xcb_buffer_len;
11111 }
11112 
11113 
11114 /*****************************************************************************
11115  **
11116  ** xcb_void_cookie_t xcb_image_text_8_checked
11117  **
11118  ** @param xcb_connection_t *c
11119  ** @param uint8_t           string_len
11120  ** @param xcb_drawable_t    drawable
11121  ** @param xcb_gcontext_t    gc
11122  ** @param int16_t           x
11123  ** @param int16_t           y
11124  ** @param const char       *string
11125  ** @returns xcb_void_cookie_t
11126  **
11127  *****************************************************************************/
11128 
11129 xcb_void_cookie_t
11130 xcb_image_text_8_checked (xcb_connection_t *c  /**< */,
11131                           uint8_t           string_len  /**< */,
11132                           xcb_drawable_t    drawable  /**< */,
11133                           xcb_gcontext_t    gc  /**< */,
11134                           int16_t           x  /**< */,
11135                           int16_t           y  /**< */,
11136                           const char       *string  /**< */)
11137 {
11138     static const xcb_protocol_request_t xcb_req = {
11139         /* count */ 4,
11140         /* ext */ 0,
11141         /* opcode */ XCB_IMAGE_TEXT_8,
11142         /* isvoid */ 1
11143     };
11144 
11145     struct iovec xcb_parts[6];
11146     xcb_void_cookie_t xcb_ret;
11147     xcb_image_text_8_request_t xcb_out;
11148 
11149     xcb_out.string_len = string_len;
11150     xcb_out.drawable = drawable;
11151     xcb_out.gc = gc;
11152     xcb_out.x = x;
11153     xcb_out.y = y;
11154 
11155     xcb_parts[2].iov_base = (char *) &xcb_out;
11156     xcb_parts[2].iov_len = sizeof(xcb_out);
11157     xcb_parts[3].iov_base = 0;
11158     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11159     /* char string */
11160     xcb_parts[4].iov_base = (char *) string;
11161     xcb_parts[4].iov_len = string_len * sizeof(char);
11162     xcb_parts[5].iov_base = 0;
11163     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
11164 
11165     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11166     return xcb_ret;
11167 }
11168 
11169 
11170 /*****************************************************************************
11171  **
11172  ** xcb_void_cookie_t xcb_image_text_8
11173  **
11174  ** @param xcb_connection_t *c
11175  ** @param uint8_t           string_len
11176  ** @param xcb_drawable_t    drawable
11177  ** @param xcb_gcontext_t    gc
11178  ** @param int16_t           x
11179  ** @param int16_t           y
11180  ** @param const char       *string
11181  ** @returns xcb_void_cookie_t
11182  **
11183  *****************************************************************************/
11184 
11185 xcb_void_cookie_t
11186 xcb_image_text_8 (xcb_connection_t *c  /**< */,
11187                   uint8_t           string_len  /**< */,
11188                   xcb_drawable_t    drawable  /**< */,
11189                   xcb_gcontext_t    gc  /**< */,
11190                   int16_t           x  /**< */,
11191                   int16_t           y  /**< */,
11192                   const char       *string  /**< */)
11193 {
11194     static const xcb_protocol_request_t xcb_req = {
11195         /* count */ 4,
11196         /* ext */ 0,
11197         /* opcode */ XCB_IMAGE_TEXT_8,
11198         /* isvoid */ 1
11199     };
11200 
11201     struct iovec xcb_parts[6];
11202     xcb_void_cookie_t xcb_ret;
11203     xcb_image_text_8_request_t xcb_out;
11204 
11205     xcb_out.string_len = string_len;
11206     xcb_out.drawable = drawable;
11207     xcb_out.gc = gc;
11208     xcb_out.x = x;
11209     xcb_out.y = y;
11210 
11211     xcb_parts[2].iov_base = (char *) &xcb_out;
11212     xcb_parts[2].iov_len = sizeof(xcb_out);
11213     xcb_parts[3].iov_base = 0;
11214     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11215     /* char string */
11216     xcb_parts[4].iov_base = (char *) string;
11217     xcb_parts[4].iov_len = string_len * sizeof(char);
11218     xcb_parts[5].iov_base = 0;
11219     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
11220 
11221     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11222     return xcb_ret;
11223 }
11224 
11225 int
11226 xcb_image_text_16_sizeof (const void  *_buffer  /**< */)
11227 {
11228     char *xcb_tmp = (char *)_buffer;
11229     const xcb_image_text_16_request_t *_aux = (xcb_image_text_16_request_t *)_buffer;
11230     unsigned int xcb_buffer_len = 0;
11231     unsigned int xcb_block_len = 0;
11232     unsigned int xcb_pad = 0;
11233     unsigned int xcb_align_to = 0;
11234 
11235 
11236     xcb_block_len += sizeof(xcb_image_text_16_request_t);
11237     xcb_tmp += xcb_block_len;
11238     xcb_buffer_len += xcb_block_len;
11239     xcb_block_len = 0;
11240     /* string */
11241     xcb_block_len += _aux->string_len * sizeof(xcb_char2b_t);
11242     xcb_tmp += xcb_block_len;
11243     xcb_align_to = ALIGNOF(xcb_char2b_t);
11244     /* insert padding */
11245     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
11246     xcb_buffer_len += xcb_block_len + xcb_pad;
11247     if (0 != xcb_pad) {
11248         xcb_tmp += xcb_pad;
11249         xcb_pad = 0;
11250     }
11251     xcb_block_len = 0;
11252 
11253     return xcb_buffer_len;
11254 }
11255 
11256 
11257 /*****************************************************************************
11258  **
11259  ** xcb_void_cookie_t xcb_image_text_16_checked
11260  **
11261  ** @param xcb_connection_t   *c
11262  ** @param uint8_t             string_len
11263  ** @param xcb_drawable_t      drawable
11264  ** @param xcb_gcontext_t      gc
11265  ** @param int16_t             x
11266  ** @param int16_t             y
11267  ** @param const xcb_char2b_t *string
11268  ** @returns xcb_void_cookie_t
11269  **
11270  *****************************************************************************/
11271 
11272 xcb_void_cookie_t
11273 xcb_image_text_16_checked (xcb_connection_t   *c  /**< */,
11274                            uint8_t             string_len  /**< */,
11275                            xcb_drawable_t      drawable  /**< */,
11276                            xcb_gcontext_t      gc  /**< */,
11277                            int16_t             x  /**< */,
11278                            int16_t             y  /**< */,
11279                            const xcb_char2b_t *string  /**< */)
11280 {
11281     static const xcb_protocol_request_t xcb_req = {
11282         /* count */ 4,
11283         /* ext */ 0,
11284         /* opcode */ XCB_IMAGE_TEXT_16,
11285         /* isvoid */ 1
11286     };
11287 
11288     struct iovec xcb_parts[6];
11289     xcb_void_cookie_t xcb_ret;
11290     xcb_image_text_16_request_t xcb_out;
11291 
11292     xcb_out.string_len = string_len;
11293     xcb_out.drawable = drawable;
11294     xcb_out.gc = gc;
11295     xcb_out.x = x;
11296     xcb_out.y = y;
11297 
11298     xcb_parts[2].iov_base = (char *) &xcb_out;
11299     xcb_parts[2].iov_len = sizeof(xcb_out);
11300     xcb_parts[3].iov_base = 0;
11301     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11302     /* xcb_char2b_t string */
11303     xcb_parts[4].iov_base = (char *) string;
11304     xcb_parts[4].iov_len = string_len * sizeof(xcb_char2b_t);
11305     xcb_parts[5].iov_base = 0;
11306     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
11307 
11308     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11309     return xcb_ret;
11310 }
11311 
11312 
11313 /*****************************************************************************
11314  **
11315  ** xcb_void_cookie_t xcb_image_text_16
11316  **
11317  ** @param xcb_connection_t   *c
11318  ** @param uint8_t             string_len
11319  ** @param xcb_drawable_t      drawable
11320  ** @param xcb_gcontext_t      gc
11321  ** @param int16_t             x
11322  ** @param int16_t             y
11323  ** @param const xcb_char2b_t *string
11324  ** @returns xcb_void_cookie_t
11325  **
11326  *****************************************************************************/
11327 
11328 xcb_void_cookie_t
11329 xcb_image_text_16 (xcb_connection_t   *c  /**< */,
11330                    uint8_t             string_len  /**< */,
11331                    xcb_drawable_t      drawable  /**< */,
11332                    xcb_gcontext_t      gc  /**< */,
11333                    int16_t             x  /**< */,
11334                    int16_t             y  /**< */,
11335                    const xcb_char2b_t *string  /**< */)
11336 {
11337     static const xcb_protocol_request_t xcb_req = {
11338         /* count */ 4,
11339         /* ext */ 0,
11340         /* opcode */ XCB_IMAGE_TEXT_16,
11341         /* isvoid */ 1
11342     };
11343 
11344     struct iovec xcb_parts[6];
11345     xcb_void_cookie_t xcb_ret;
11346     xcb_image_text_16_request_t xcb_out;
11347 
11348     xcb_out.string_len = string_len;
11349     xcb_out.drawable = drawable;
11350     xcb_out.gc = gc;
11351     xcb_out.x = x;
11352     xcb_out.y = y;
11353 
11354     xcb_parts[2].iov_base = (char *) &xcb_out;
11355     xcb_parts[2].iov_len = sizeof(xcb_out);
11356     xcb_parts[3].iov_base = 0;
11357     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11358     /* xcb_char2b_t string */
11359     xcb_parts[4].iov_base = (char *) string;
11360     xcb_parts[4].iov_len = string_len * sizeof(xcb_char2b_t);
11361     xcb_parts[5].iov_base = 0;
11362     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
11363 
11364     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11365     return xcb_ret;
11366 }
11367 
11368 
11369 /*****************************************************************************
11370  **
11371  ** xcb_void_cookie_t xcb_create_colormap_checked
11372  **
11373  ** @param xcb_connection_t *c
11374  ** @param uint8_t           alloc
11375  ** @param xcb_colormap_t    mid
11376  ** @param xcb_window_t      window
11377  ** @param xcb_visualid_t    visual
11378  ** @returns xcb_void_cookie_t
11379  **
11380  *****************************************************************************/
11381 
11382 xcb_void_cookie_t
11383 xcb_create_colormap_checked (xcb_connection_t *c  /**< */,
11384                              uint8_t           alloc  /**< */,
11385                              xcb_colormap_t    mid  /**< */,
11386                              xcb_window_t      window  /**< */,
11387                              xcb_visualid_t    visual  /**< */)
11388 {
11389     static const xcb_protocol_request_t xcb_req = {
11390         /* count */ 2,
11391         /* ext */ 0,
11392         /* opcode */ XCB_CREATE_COLORMAP,
11393         /* isvoid */ 1
11394     };
11395 
11396     struct iovec xcb_parts[4];
11397     xcb_void_cookie_t xcb_ret;
11398     xcb_create_colormap_request_t xcb_out;
11399 
11400     xcb_out.alloc = alloc;
11401     xcb_out.mid = mid;
11402     xcb_out.window = window;
11403     xcb_out.visual = visual;
11404 
11405     xcb_parts[2].iov_base = (char *) &xcb_out;
11406     xcb_parts[2].iov_len = sizeof(xcb_out);
11407     xcb_parts[3].iov_base = 0;
11408     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11409 
11410     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11411     return xcb_ret;
11412 }
11413 
11414 
11415 /*****************************************************************************
11416  **
11417  ** xcb_void_cookie_t xcb_create_colormap
11418  **
11419  ** @param xcb_connection_t *c
11420  ** @param uint8_t           alloc
11421  ** @param xcb_colormap_t    mid
11422  ** @param xcb_window_t      window
11423  ** @param xcb_visualid_t    visual
11424  ** @returns xcb_void_cookie_t
11425  **
11426  *****************************************************************************/
11427 
11428 xcb_void_cookie_t
11429 xcb_create_colormap (xcb_connection_t *c  /**< */,
11430                      uint8_t           alloc  /**< */,
11431                      xcb_colormap_t    mid  /**< */,
11432                      xcb_window_t      window  /**< */,
11433                      xcb_visualid_t    visual  /**< */)
11434 {
11435     static const xcb_protocol_request_t xcb_req = {
11436         /* count */ 2,
11437         /* ext */ 0,
11438         /* opcode */ XCB_CREATE_COLORMAP,
11439         /* isvoid */ 1
11440     };
11441 
11442     struct iovec xcb_parts[4];
11443     xcb_void_cookie_t xcb_ret;
11444     xcb_create_colormap_request_t xcb_out;
11445 
11446     xcb_out.alloc = alloc;
11447     xcb_out.mid = mid;
11448     xcb_out.window = window;
11449     xcb_out.visual = visual;
11450 
11451     xcb_parts[2].iov_base = (char *) &xcb_out;
11452     xcb_parts[2].iov_len = sizeof(xcb_out);
11453     xcb_parts[3].iov_base = 0;
11454     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11455 
11456     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11457     return xcb_ret;
11458 }
11459 
11460 
11461 /*****************************************************************************
11462  **
11463  ** xcb_void_cookie_t xcb_free_colormap_checked
11464  **
11465  ** @param xcb_connection_t *c
11466  ** @param xcb_colormap_t    cmap
11467  ** @returns xcb_void_cookie_t
11468  **
11469  *****************************************************************************/
11470 
11471 xcb_void_cookie_t
11472 xcb_free_colormap_checked (xcb_connection_t *c  /**< */,
11473                            xcb_colormap_t    cmap  /**< */)
11474 {
11475     static const xcb_protocol_request_t xcb_req = {
11476         /* count */ 2,
11477         /* ext */ 0,
11478         /* opcode */ XCB_FREE_COLORMAP,
11479         /* isvoid */ 1
11480     };
11481 
11482     struct iovec xcb_parts[4];
11483     xcb_void_cookie_t xcb_ret;
11484     xcb_free_colormap_request_t xcb_out;
11485 
11486     xcb_out.pad0 = 0;
11487     xcb_out.cmap = cmap;
11488 
11489     xcb_parts[2].iov_base = (char *) &xcb_out;
11490     xcb_parts[2].iov_len = sizeof(xcb_out);
11491     xcb_parts[3].iov_base = 0;
11492     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11493 
11494     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11495     return xcb_ret;
11496 }
11497 
11498 
11499 /*****************************************************************************
11500  **
11501  ** xcb_void_cookie_t xcb_free_colormap
11502  **
11503  ** @param xcb_connection_t *c
11504  ** @param xcb_colormap_t    cmap
11505  ** @returns xcb_void_cookie_t
11506  **
11507  *****************************************************************************/
11508 
11509 xcb_void_cookie_t
11510 xcb_free_colormap (xcb_connection_t *c  /**< */,
11511                    xcb_colormap_t    cmap  /**< */)
11512 {
11513     static const xcb_protocol_request_t xcb_req = {
11514         /* count */ 2,
11515         /* ext */ 0,
11516         /* opcode */ XCB_FREE_COLORMAP,
11517         /* isvoid */ 1
11518     };
11519 
11520     struct iovec xcb_parts[4];
11521     xcb_void_cookie_t xcb_ret;
11522     xcb_free_colormap_request_t xcb_out;
11523 
11524     xcb_out.pad0 = 0;
11525     xcb_out.cmap = cmap;
11526 
11527     xcb_parts[2].iov_base = (char *) &xcb_out;
11528     xcb_parts[2].iov_len = sizeof(xcb_out);
11529     xcb_parts[3].iov_base = 0;
11530     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11531 
11532     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11533     return xcb_ret;
11534 }
11535 
11536 
11537 /*****************************************************************************
11538  **
11539  ** xcb_void_cookie_t xcb_copy_colormap_and_free_checked
11540  **
11541  ** @param xcb_connection_t *c
11542  ** @param xcb_colormap_t    mid
11543  ** @param xcb_colormap_t    src_cmap
11544  ** @returns xcb_void_cookie_t
11545  **
11546  *****************************************************************************/
11547 
11548 xcb_void_cookie_t
11549 xcb_copy_colormap_and_free_checked (xcb_connection_t *c  /**< */,
11550                                     xcb_colormap_t    mid  /**< */,
11551                                     xcb_colormap_t    src_cmap  /**< */)
11552 {
11553     static const xcb_protocol_request_t xcb_req = {
11554         /* count */ 2,
11555         /* ext */ 0,
11556         /* opcode */ XCB_COPY_COLORMAP_AND_FREE,
11557         /* isvoid */ 1
11558     };
11559 
11560     struct iovec xcb_parts[4];
11561     xcb_void_cookie_t xcb_ret;
11562     xcb_copy_colormap_and_free_request_t xcb_out;
11563 
11564     xcb_out.pad0 = 0;
11565     xcb_out.mid = mid;
11566     xcb_out.src_cmap = src_cmap;
11567 
11568     xcb_parts[2].iov_base = (char *) &xcb_out;
11569     xcb_parts[2].iov_len = sizeof(xcb_out);
11570     xcb_parts[3].iov_base = 0;
11571     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11572 
11573     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11574     return xcb_ret;
11575 }
11576 
11577 
11578 /*****************************************************************************
11579  **
11580  ** xcb_void_cookie_t xcb_copy_colormap_and_free
11581  **
11582  ** @param xcb_connection_t *c
11583  ** @param xcb_colormap_t    mid
11584  ** @param xcb_colormap_t    src_cmap
11585  ** @returns xcb_void_cookie_t
11586  **
11587  *****************************************************************************/
11588 
11589 xcb_void_cookie_t
11590 xcb_copy_colormap_and_free (xcb_connection_t *c  /**< */,
11591                             xcb_colormap_t    mid  /**< */,
11592                             xcb_colormap_t    src_cmap  /**< */)
11593 {
11594     static const xcb_protocol_request_t xcb_req = {
11595         /* count */ 2,
11596         /* ext */ 0,
11597         /* opcode */ XCB_COPY_COLORMAP_AND_FREE,
11598         /* isvoid */ 1
11599     };
11600 
11601     struct iovec xcb_parts[4];
11602     xcb_void_cookie_t xcb_ret;
11603     xcb_copy_colormap_and_free_request_t xcb_out;
11604 
11605     xcb_out.pad0 = 0;
11606     xcb_out.mid = mid;
11607     xcb_out.src_cmap = src_cmap;
11608 
11609     xcb_parts[2].iov_base = (char *) &xcb_out;
11610     xcb_parts[2].iov_len = sizeof(xcb_out);
11611     xcb_parts[3].iov_base = 0;
11612     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11613 
11614     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11615     return xcb_ret;
11616 }
11617 
11618 
11619 /*****************************************************************************
11620  **
11621  ** xcb_void_cookie_t xcb_install_colormap_checked
11622  **
11623  ** @param xcb_connection_t *c
11624  ** @param xcb_colormap_t    cmap
11625  ** @returns xcb_void_cookie_t
11626  **
11627  *****************************************************************************/
11628 
11629 xcb_void_cookie_t
11630 xcb_install_colormap_checked (xcb_connection_t *c  /**< */,
11631                               xcb_colormap_t    cmap  /**< */)
11632 {
11633     static const xcb_protocol_request_t xcb_req = {
11634         /* count */ 2,
11635         /* ext */ 0,
11636         /* opcode */ XCB_INSTALL_COLORMAP,
11637         /* isvoid */ 1
11638     };
11639 
11640     struct iovec xcb_parts[4];
11641     xcb_void_cookie_t xcb_ret;
11642     xcb_install_colormap_request_t xcb_out;
11643 
11644     xcb_out.pad0 = 0;
11645     xcb_out.cmap = cmap;
11646 
11647     xcb_parts[2].iov_base = (char *) &xcb_out;
11648     xcb_parts[2].iov_len = sizeof(xcb_out);
11649     xcb_parts[3].iov_base = 0;
11650     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11651 
11652     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11653     return xcb_ret;
11654 }
11655 
11656 
11657 /*****************************************************************************
11658  **
11659  ** xcb_void_cookie_t xcb_install_colormap
11660  **
11661  ** @param xcb_connection_t *c
11662  ** @param xcb_colormap_t    cmap
11663  ** @returns xcb_void_cookie_t
11664  **
11665  *****************************************************************************/
11666 
11667 xcb_void_cookie_t
11668 xcb_install_colormap (xcb_connection_t *c  /**< */,
11669                       xcb_colormap_t    cmap  /**< */)
11670 {
11671     static const xcb_protocol_request_t xcb_req = {
11672         /* count */ 2,
11673         /* ext */ 0,
11674         /* opcode */ XCB_INSTALL_COLORMAP,
11675         /* isvoid */ 1
11676     };
11677 
11678     struct iovec xcb_parts[4];
11679     xcb_void_cookie_t xcb_ret;
11680     xcb_install_colormap_request_t xcb_out;
11681 
11682     xcb_out.pad0 = 0;
11683     xcb_out.cmap = cmap;
11684 
11685     xcb_parts[2].iov_base = (char *) &xcb_out;
11686     xcb_parts[2].iov_len = sizeof(xcb_out);
11687     xcb_parts[3].iov_base = 0;
11688     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11689 
11690     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11691     return xcb_ret;
11692 }
11693 
11694 
11695 /*****************************************************************************
11696  **
11697  ** xcb_void_cookie_t xcb_uninstall_colormap_checked
11698  **
11699  ** @param xcb_connection_t *c
11700  ** @param xcb_colormap_t    cmap
11701  ** @returns xcb_void_cookie_t
11702  **
11703  *****************************************************************************/
11704 
11705 xcb_void_cookie_t
11706 xcb_uninstall_colormap_checked (xcb_connection_t *c  /**< */,
11707                                 xcb_colormap_t    cmap  /**< */)
11708 {
11709     static const xcb_protocol_request_t xcb_req = {
11710         /* count */ 2,
11711         /* ext */ 0,
11712         /* opcode */ XCB_UNINSTALL_COLORMAP,
11713         /* isvoid */ 1
11714     };
11715 
11716     struct iovec xcb_parts[4];
11717     xcb_void_cookie_t xcb_ret;
11718     xcb_uninstall_colormap_request_t xcb_out;
11719 
11720     xcb_out.pad0 = 0;
11721     xcb_out.cmap = cmap;
11722 
11723     xcb_parts[2].iov_base = (char *) &xcb_out;
11724     xcb_parts[2].iov_len = sizeof(xcb_out);
11725     xcb_parts[3].iov_base = 0;
11726     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11727 
11728     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11729     return xcb_ret;
11730 }
11731 
11732 
11733 /*****************************************************************************
11734  **
11735  ** xcb_void_cookie_t xcb_uninstall_colormap
11736  **
11737  ** @param xcb_connection_t *c
11738  ** @param xcb_colormap_t    cmap
11739  ** @returns xcb_void_cookie_t
11740  **
11741  *****************************************************************************/
11742 
11743 xcb_void_cookie_t
11744 xcb_uninstall_colormap (xcb_connection_t *c  /**< */,
11745                         xcb_colormap_t    cmap  /**< */)
11746 {
11747     static const xcb_protocol_request_t xcb_req = {
11748         /* count */ 2,
11749         /* ext */ 0,
11750         /* opcode */ XCB_UNINSTALL_COLORMAP,
11751         /* isvoid */ 1
11752     };
11753 
11754     struct iovec xcb_parts[4];
11755     xcb_void_cookie_t xcb_ret;
11756     xcb_uninstall_colormap_request_t xcb_out;
11757 
11758     xcb_out.pad0 = 0;
11759     xcb_out.cmap = cmap;
11760 
11761     xcb_parts[2].iov_base = (char *) &xcb_out;
11762     xcb_parts[2].iov_len = sizeof(xcb_out);
11763     xcb_parts[3].iov_base = 0;
11764     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11765 
11766     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11767     return xcb_ret;
11768 }
11769 
11770 int
11771 xcb_list_installed_colormaps_sizeof (const void  *_buffer  /**< */)
11772 {
11773     char *xcb_tmp = (char *)_buffer;
11774     const xcb_list_installed_colormaps_reply_t *_aux = (xcb_list_installed_colormaps_reply_t *)_buffer;
11775     unsigned int xcb_buffer_len = 0;
11776     unsigned int xcb_block_len = 0;
11777     unsigned int xcb_pad = 0;
11778     unsigned int xcb_align_to = 0;
11779 
11780 
11781     xcb_block_len += sizeof(xcb_list_installed_colormaps_reply_t);
11782     xcb_tmp += xcb_block_len;
11783     xcb_buffer_len += xcb_block_len;
11784     xcb_block_len = 0;
11785     /* cmaps */
11786     xcb_block_len += _aux->cmaps_len * sizeof(xcb_colormap_t);
11787     xcb_tmp += xcb_block_len;
11788     xcb_align_to = ALIGNOF(xcb_colormap_t);
11789     /* insert padding */
11790     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
11791     xcb_buffer_len += xcb_block_len + xcb_pad;
11792     if (0 != xcb_pad) {
11793         xcb_tmp += xcb_pad;
11794         xcb_pad = 0;
11795     }
11796     xcb_block_len = 0;
11797 
11798     return xcb_buffer_len;
11799 }
11800 
11801 
11802 /*****************************************************************************
11803  **
11804  ** xcb_list_installed_colormaps_cookie_t xcb_list_installed_colormaps
11805  **
11806  ** @param xcb_connection_t *c
11807  ** @param xcb_window_t      window
11808  ** @returns xcb_list_installed_colormaps_cookie_t
11809  **
11810  *****************************************************************************/
11811 
11812 xcb_list_installed_colormaps_cookie_t
11813 xcb_list_installed_colormaps (xcb_connection_t *c  /**< */,
11814                               xcb_window_t      window  /**< */)
11815 {
11816     static const xcb_protocol_request_t xcb_req = {
11817         /* count */ 2,
11818         /* ext */ 0,
11819         /* opcode */ XCB_LIST_INSTALLED_COLORMAPS,
11820         /* isvoid */ 0
11821     };
11822 
11823     struct iovec xcb_parts[4];
11824     xcb_list_installed_colormaps_cookie_t xcb_ret;
11825     xcb_list_installed_colormaps_request_t xcb_out;
11826 
11827     xcb_out.pad0 = 0;
11828     xcb_out.window = window;
11829 
11830     xcb_parts[2].iov_base = (char *) &xcb_out;
11831     xcb_parts[2].iov_len = sizeof(xcb_out);
11832     xcb_parts[3].iov_base = 0;
11833     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11834 
11835     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11836     return xcb_ret;
11837 }
11838 
11839 
11840 /*****************************************************************************
11841  **
11842  ** xcb_list_installed_colormaps_cookie_t xcb_list_installed_colormaps_unchecked
11843  **
11844  ** @param xcb_connection_t *c
11845  ** @param xcb_window_t      window
11846  ** @returns xcb_list_installed_colormaps_cookie_t
11847  **
11848  *****************************************************************************/
11849 
11850 xcb_list_installed_colormaps_cookie_t
11851 xcb_list_installed_colormaps_unchecked (xcb_connection_t *c  /**< */,
11852                                         xcb_window_t      window  /**< */)
11853 {
11854     static const xcb_protocol_request_t xcb_req = {
11855         /* count */ 2,
11856         /* ext */ 0,
11857         /* opcode */ XCB_LIST_INSTALLED_COLORMAPS,
11858         /* isvoid */ 0
11859     };
11860 
11861     struct iovec xcb_parts[4];
11862     xcb_list_installed_colormaps_cookie_t xcb_ret;
11863     xcb_list_installed_colormaps_request_t xcb_out;
11864 
11865     xcb_out.pad0 = 0;
11866     xcb_out.window = window;
11867 
11868     xcb_parts[2].iov_base = (char *) &xcb_out;
11869     xcb_parts[2].iov_len = sizeof(xcb_out);
11870     xcb_parts[3].iov_base = 0;
11871     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11872 
11873     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11874     return xcb_ret;
11875 }
11876 
11877 
11878 /*****************************************************************************
11879  **
11880  ** xcb_colormap_t * xcb_list_installed_colormaps_cmaps
11881  **
11882  ** @param const xcb_list_installed_colormaps_reply_t *R
11883  ** @returns xcb_colormap_t *
11884  **
11885  *****************************************************************************/
11886 
11887 xcb_colormap_t *
11888 xcb_list_installed_colormaps_cmaps (const xcb_list_installed_colormaps_reply_t *R  /**< */)
11889 {
11890     return (xcb_colormap_t *) (R + 1);
11891 }
11892 
11893 
11894 /*****************************************************************************
11895  **
11896  ** int xcb_list_installed_colormaps_cmaps_length
11897  **
11898  ** @param const xcb_list_installed_colormaps_reply_t *R
11899  ** @returns int
11900  **
11901  *****************************************************************************/
11902 
11903 int
11904 xcb_list_installed_colormaps_cmaps_length (const xcb_list_installed_colormaps_reply_t *R  /**< */)
11905 {
11906     return R->cmaps_len;
11907 }
11908 
11909 
11910 /*****************************************************************************
11911  **
11912  ** xcb_generic_iterator_t xcb_list_installed_colormaps_cmaps_end
11913  **
11914  ** @param const xcb_list_installed_colormaps_reply_t *R
11915  ** @returns xcb_generic_iterator_t
11916  **
11917  *****************************************************************************/
11918 
11919 xcb_generic_iterator_t
11920 xcb_list_installed_colormaps_cmaps_end (const xcb_list_installed_colormaps_reply_t *R  /**< */)
11921 {
11922     xcb_generic_iterator_t i;
11923     i.data = ((xcb_colormap_t *) (R + 1)) + (R->cmaps_len);
11924     i.rem = 0;
11925     i.index = (char *) i.data - (char *) R;
11926     return i;
11927 }
11928 
11929 
11930 /*****************************************************************************
11931  **
11932  ** xcb_list_installed_colormaps_reply_t * xcb_list_installed_colormaps_reply
11933  **
11934  ** @param xcb_connection_t                       *c
11935  ** @param xcb_list_installed_colormaps_cookie_t   cookie
11936  ** @param xcb_generic_error_t                   **e
11937  ** @returns xcb_list_installed_colormaps_reply_t *
11938  **
11939  *****************************************************************************/
11940 
11941 xcb_list_installed_colormaps_reply_t *
11942 xcb_list_installed_colormaps_reply (xcb_connection_t                       *c  /**< */,
11943                                     xcb_list_installed_colormaps_cookie_t   cookie  /**< */,
11944                                     xcb_generic_error_t                   **e  /**< */)
11945 {
11946     return (xcb_list_installed_colormaps_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
11947 }
11948 
11949 
11950 /*****************************************************************************
11951  **
11952  ** xcb_alloc_color_cookie_t xcb_alloc_color
11953  **
11954  ** @param xcb_connection_t *c
11955  ** @param xcb_colormap_t    cmap
11956  ** @param uint16_t          red
11957  ** @param uint16_t          green
11958  ** @param uint16_t          blue
11959  ** @returns xcb_alloc_color_cookie_t
11960  **
11961  *****************************************************************************/
11962 
11963 xcb_alloc_color_cookie_t
11964 xcb_alloc_color (xcb_connection_t *c  /**< */,
11965                  xcb_colormap_t    cmap  /**< */,
11966                  uint16_t          red  /**< */,
11967                  uint16_t          green  /**< */,
11968                  uint16_t          blue  /**< */)
11969 {
11970     static const xcb_protocol_request_t xcb_req = {
11971         /* count */ 2,
11972         /* ext */ 0,
11973         /* opcode */ XCB_ALLOC_COLOR,
11974         /* isvoid */ 0
11975     };
11976 
11977     struct iovec xcb_parts[4];
11978     xcb_alloc_color_cookie_t xcb_ret;
11979     xcb_alloc_color_request_t xcb_out;
11980 
11981     xcb_out.pad0 = 0;
11982     xcb_out.cmap = cmap;
11983     xcb_out.red = red;
11984     xcb_out.green = green;
11985     xcb_out.blue = blue;
11986     memset(xcb_out.pad1, 0, 2);
11987 
11988     xcb_parts[2].iov_base = (char *) &xcb_out;
11989     xcb_parts[2].iov_len = sizeof(xcb_out);
11990     xcb_parts[3].iov_base = 0;
11991     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11992 
11993     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11994     return xcb_ret;
11995 }
11996 
11997 
11998 /*****************************************************************************
11999  **
12000  ** xcb_alloc_color_cookie_t xcb_alloc_color_unchecked
12001  **
12002  ** @param xcb_connection_t *c
12003  ** @param xcb_colormap_t    cmap
12004  ** @param uint16_t          red
12005  ** @param uint16_t          green
12006  ** @param uint16_t          blue
12007  ** @returns xcb_alloc_color_cookie_t
12008  **
12009  *****************************************************************************/
12010 
12011 xcb_alloc_color_cookie_t
12012 xcb_alloc_color_unchecked (xcb_connection_t *c  /**< */,
12013                            xcb_colormap_t    cmap  /**< */,
12014                            uint16_t          red  /**< */,
12015                            uint16_t          green  /**< */,
12016                            uint16_t          blue  /**< */)
12017 {
12018     static const xcb_protocol_request_t xcb_req = {
12019         /* count */ 2,
12020         /* ext */ 0,
12021         /* opcode */ XCB_ALLOC_COLOR,
12022         /* isvoid */ 0
12023     };
12024 
12025     struct iovec xcb_parts[4];
12026     xcb_alloc_color_cookie_t xcb_ret;
12027     xcb_alloc_color_request_t xcb_out;
12028 
12029     xcb_out.pad0 = 0;
12030     xcb_out.cmap = cmap;
12031     xcb_out.red = red;
12032     xcb_out.green = green;
12033     xcb_out.blue = blue;
12034     memset(xcb_out.pad1, 0, 2);
12035 
12036     xcb_parts[2].iov_base = (char *) &xcb_out;
12037     xcb_parts[2].iov_len = sizeof(xcb_out);
12038     xcb_parts[3].iov_base = 0;
12039     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12040 
12041     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
12042     return xcb_ret;
12043 }
12044 
12045 
12046 /*****************************************************************************
12047  **
12048  ** xcb_alloc_color_reply_t * xcb_alloc_color_reply
12049  **
12050  ** @param xcb_connection_t          *c
12051  ** @param xcb_alloc_color_cookie_t   cookie
12052  ** @param xcb_generic_error_t      **e
12053  ** @returns xcb_alloc_color_reply_t *
12054  **
12055  *****************************************************************************/
12056 
12057 xcb_alloc_color_reply_t *
12058 xcb_alloc_color_reply (xcb_connection_t          *c  /**< */,
12059                        xcb_alloc_color_cookie_t   cookie  /**< */,
12060                        xcb_generic_error_t      **e  /**< */)
12061 {
12062     return (xcb_alloc_color_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
12063 }
12064 
12065 int
12066 xcb_alloc_named_color_sizeof (const void  *_buffer  /**< */)
12067 {
12068     char *xcb_tmp = (char *)_buffer;
12069     const xcb_alloc_named_color_request_t *_aux = (xcb_alloc_named_color_request_t *)_buffer;
12070     unsigned int xcb_buffer_len = 0;
12071     unsigned int xcb_block_len = 0;
12072     unsigned int xcb_pad = 0;
12073     unsigned int xcb_align_to = 0;
12074 
12075 
12076     xcb_block_len += sizeof(xcb_alloc_named_color_request_t);
12077     xcb_tmp += xcb_block_len;
12078     xcb_buffer_len += xcb_block_len;
12079     xcb_block_len = 0;
12080     /* name */
12081     xcb_block_len += _aux->name_len * sizeof(char);
12082     xcb_tmp += xcb_block_len;
12083     xcb_align_to = ALIGNOF(char);
12084     /* insert padding */
12085     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12086     xcb_buffer_len += xcb_block_len + xcb_pad;
12087     if (0 != xcb_pad) {
12088         xcb_tmp += xcb_pad;
12089         xcb_pad = 0;
12090     }
12091     xcb_block_len = 0;
12092 
12093     return xcb_buffer_len;
12094 }
12095 
12096 
12097 /*****************************************************************************
12098  **
12099  ** xcb_alloc_named_color_cookie_t xcb_alloc_named_color
12100  **
12101  ** @param xcb_connection_t *c
12102  ** @param xcb_colormap_t    cmap
12103  ** @param uint16_t          name_len
12104  ** @param const char       *name
12105  ** @returns xcb_alloc_named_color_cookie_t
12106  **
12107  *****************************************************************************/
12108 
12109 xcb_alloc_named_color_cookie_t
12110 xcb_alloc_named_color (xcb_connection_t *c  /**< */,
12111                        xcb_colormap_t    cmap  /**< */,
12112                        uint16_t          name_len  /**< */,
12113                        const char       *name  /**< */)
12114 {
12115     static const xcb_protocol_request_t xcb_req = {
12116         /* count */ 4,
12117         /* ext */ 0,
12118         /* opcode */ XCB_ALLOC_NAMED_COLOR,
12119         /* isvoid */ 0
12120     };
12121 
12122     struct iovec xcb_parts[6];
12123     xcb_alloc_named_color_cookie_t xcb_ret;
12124     xcb_alloc_named_color_request_t xcb_out;
12125 
12126     xcb_out.pad0 = 0;
12127     xcb_out.cmap = cmap;
12128     xcb_out.name_len = name_len;
12129     memset(xcb_out.pad1, 0, 2);
12130 
12131     xcb_parts[2].iov_base = (char *) &xcb_out;
12132     xcb_parts[2].iov_len = sizeof(xcb_out);
12133     xcb_parts[3].iov_base = 0;
12134     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12135     /* char name */
12136     xcb_parts[4].iov_base = (char *) name;
12137     xcb_parts[4].iov_len = name_len * sizeof(char);
12138     xcb_parts[5].iov_base = 0;
12139     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
12140 
12141     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
12142     return xcb_ret;
12143 }
12144 
12145 
12146 /*****************************************************************************
12147  **
12148  ** xcb_alloc_named_color_cookie_t xcb_alloc_named_color_unchecked
12149  **
12150  ** @param xcb_connection_t *c
12151  ** @param xcb_colormap_t    cmap
12152  ** @param uint16_t          name_len
12153  ** @param const char       *name
12154  ** @returns xcb_alloc_named_color_cookie_t
12155  **
12156  *****************************************************************************/
12157 
12158 xcb_alloc_named_color_cookie_t
12159 xcb_alloc_named_color_unchecked (xcb_connection_t *c  /**< */,
12160                                  xcb_colormap_t    cmap  /**< */,
12161                                  uint16_t          name_len  /**< */,
12162                                  const char       *name  /**< */)
12163 {
12164     static const xcb_protocol_request_t xcb_req = {
12165         /* count */ 4,
12166         /* ext */ 0,
12167         /* opcode */ XCB_ALLOC_NAMED_COLOR,
12168         /* isvoid */ 0
12169     };
12170 
12171     struct iovec xcb_parts[6];
12172     xcb_alloc_named_color_cookie_t xcb_ret;
12173     xcb_alloc_named_color_request_t xcb_out;
12174 
12175     xcb_out.pad0 = 0;
12176     xcb_out.cmap = cmap;
12177     xcb_out.name_len = name_len;
12178     memset(xcb_out.pad1, 0, 2);
12179 
12180     xcb_parts[2].iov_base = (char *) &xcb_out;
12181     xcb_parts[2].iov_len = sizeof(xcb_out);
12182     xcb_parts[3].iov_base = 0;
12183     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12184     /* char name */
12185     xcb_parts[4].iov_base = (char *) name;
12186     xcb_parts[4].iov_len = name_len * sizeof(char);
12187     xcb_parts[5].iov_base = 0;
12188     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
12189 
12190     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
12191     return xcb_ret;
12192 }
12193 
12194 
12195 /*****************************************************************************
12196  **
12197  ** xcb_alloc_named_color_reply_t * xcb_alloc_named_color_reply
12198  **
12199  ** @param xcb_connection_t                *c
12200  ** @param xcb_alloc_named_color_cookie_t   cookie
12201  ** @param xcb_generic_error_t            **e
12202  ** @returns xcb_alloc_named_color_reply_t *
12203  **
12204  *****************************************************************************/
12205 
12206 xcb_alloc_named_color_reply_t *
12207 xcb_alloc_named_color_reply (xcb_connection_t                *c  /**< */,
12208                              xcb_alloc_named_color_cookie_t   cookie  /**< */,
12209                              xcb_generic_error_t            **e  /**< */)
12210 {
12211     return (xcb_alloc_named_color_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
12212 }
12213 
12214 int
12215 xcb_alloc_color_cells_sizeof (const void  *_buffer  /**< */)
12216 {
12217     char *xcb_tmp = (char *)_buffer;
12218     const xcb_alloc_color_cells_reply_t *_aux = (xcb_alloc_color_cells_reply_t *)_buffer;
12219     unsigned int xcb_buffer_len = 0;
12220     unsigned int xcb_block_len = 0;
12221     unsigned int xcb_pad = 0;
12222     unsigned int xcb_align_to = 0;
12223 
12224 
12225     xcb_block_len += sizeof(xcb_alloc_color_cells_reply_t);
12226     xcb_tmp += xcb_block_len;
12227     xcb_buffer_len += xcb_block_len;
12228     xcb_block_len = 0;
12229     /* pixels */
12230     xcb_block_len += _aux->pixels_len * sizeof(uint32_t);
12231     xcb_tmp += xcb_block_len;
12232     xcb_align_to = ALIGNOF(uint32_t);
12233     /* insert padding */
12234     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12235     xcb_buffer_len += xcb_block_len + xcb_pad;
12236     if (0 != xcb_pad) {
12237         xcb_tmp += xcb_pad;
12238         xcb_pad = 0;
12239     }
12240     xcb_block_len = 0;
12241     /* masks */
12242     xcb_block_len += _aux->masks_len * sizeof(uint32_t);
12243     xcb_tmp += xcb_block_len;
12244     xcb_align_to = ALIGNOF(uint32_t);
12245     /* insert padding */
12246     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12247     xcb_buffer_len += xcb_block_len + xcb_pad;
12248     if (0 != xcb_pad) {
12249         xcb_tmp += xcb_pad;
12250         xcb_pad = 0;
12251     }
12252     xcb_block_len = 0;
12253 
12254     return xcb_buffer_len;
12255 }
12256 
12257 
12258 /*****************************************************************************
12259  **
12260  ** xcb_alloc_color_cells_cookie_t xcb_alloc_color_cells
12261  **
12262  ** @param xcb_connection_t *c
12263  ** @param uint8_t           contiguous
12264  ** @param xcb_colormap_t    cmap
12265  ** @param uint16_t          colors
12266  ** @param uint16_t          planes
12267  ** @returns xcb_alloc_color_cells_cookie_t
12268  **
12269  *****************************************************************************/
12270 
12271 xcb_alloc_color_cells_cookie_t
12272 xcb_alloc_color_cells (xcb_connection_t *c  /**< */,
12273                        uint8_t           contiguous  /**< */,
12274                        xcb_colormap_t    cmap  /**< */,
12275                        uint16_t          colors  /**< */,
12276                        uint16_t          planes  /**< */)
12277 {
12278     static const xcb_protocol_request_t xcb_req = {
12279         /* count */ 2,
12280         /* ext */ 0,
12281         /* opcode */ XCB_ALLOC_COLOR_CELLS,
12282         /* isvoid */ 0
12283     };
12284 
12285     struct iovec xcb_parts[4];
12286     xcb_alloc_color_cells_cookie_t xcb_ret;
12287     xcb_alloc_color_cells_request_t xcb_out;
12288 
12289     xcb_out.contiguous = contiguous;
12290     xcb_out.cmap = cmap;
12291     xcb_out.colors = colors;
12292     xcb_out.planes = planes;
12293 
12294     xcb_parts[2].iov_base = (char *) &xcb_out;
12295     xcb_parts[2].iov_len = sizeof(xcb_out);
12296     xcb_parts[3].iov_base = 0;
12297     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12298 
12299     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
12300     return xcb_ret;
12301 }
12302 
12303 
12304 /*****************************************************************************
12305  **
12306  ** xcb_alloc_color_cells_cookie_t xcb_alloc_color_cells_unchecked
12307  **
12308  ** @param xcb_connection_t *c
12309  ** @param uint8_t           contiguous
12310  ** @param xcb_colormap_t    cmap
12311  ** @param uint16_t          colors
12312  ** @param uint16_t          planes
12313  ** @returns xcb_alloc_color_cells_cookie_t
12314  **
12315  *****************************************************************************/
12316 
12317 xcb_alloc_color_cells_cookie_t
12318 xcb_alloc_color_cells_unchecked (xcb_connection_t *c  /**< */,
12319                                  uint8_t           contiguous  /**< */,
12320                                  xcb_colormap_t    cmap  /**< */,
12321                                  uint16_t          colors  /**< */,
12322                                  uint16_t          planes  /**< */)
12323 {
12324     static const xcb_protocol_request_t xcb_req = {
12325         /* count */ 2,
12326         /* ext */ 0,
12327         /* opcode */ XCB_ALLOC_COLOR_CELLS,
12328         /* isvoid */ 0
12329     };
12330 
12331     struct iovec xcb_parts[4];
12332     xcb_alloc_color_cells_cookie_t xcb_ret;
12333     xcb_alloc_color_cells_request_t xcb_out;
12334 
12335     xcb_out.contiguous = contiguous;
12336     xcb_out.cmap = cmap;
12337     xcb_out.colors = colors;
12338     xcb_out.planes = planes;
12339 
12340     xcb_parts[2].iov_base = (char *) &xcb_out;
12341     xcb_parts[2].iov_len = sizeof(xcb_out);
12342     xcb_parts[3].iov_base = 0;
12343     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12344 
12345     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
12346     return xcb_ret;
12347 }
12348 
12349 
12350 /*****************************************************************************
12351  **
12352  ** uint32_t * xcb_alloc_color_cells_pixels
12353  **
12354  ** @param const xcb_alloc_color_cells_reply_t *R
12355  ** @returns uint32_t *
12356  **
12357  *****************************************************************************/
12358 
12359 uint32_t *
12360 xcb_alloc_color_cells_pixels (const xcb_alloc_color_cells_reply_t *R  /**< */)
12361 {
12362     return (uint32_t *) (R + 1);
12363 }
12364 
12365 
12366 /*****************************************************************************
12367  **
12368  ** int xcb_alloc_color_cells_pixels_length
12369  **
12370  ** @param const xcb_alloc_color_cells_reply_t *R
12371  ** @returns int
12372  **
12373  *****************************************************************************/
12374 
12375 int
12376 xcb_alloc_color_cells_pixels_length (const xcb_alloc_color_cells_reply_t *R  /**< */)
12377 {
12378     return R->pixels_len;
12379 }
12380 
12381 
12382 /*****************************************************************************
12383  **
12384  ** xcb_generic_iterator_t xcb_alloc_color_cells_pixels_end
12385  **
12386  ** @param const xcb_alloc_color_cells_reply_t *R
12387  ** @returns xcb_generic_iterator_t
12388  **
12389  *****************************************************************************/
12390 
12391 xcb_generic_iterator_t
12392 xcb_alloc_color_cells_pixels_end (const xcb_alloc_color_cells_reply_t *R  /**< */)
12393 {
12394     xcb_generic_iterator_t i;
12395     i.data = ((uint32_t *) (R + 1)) + (R->pixels_len);
12396     i.rem = 0;
12397     i.index = (char *) i.data - (char *) R;
12398     return i;
12399 }
12400 
12401 
12402 /*****************************************************************************
12403  **
12404  ** uint32_t * xcb_alloc_color_cells_masks
12405  **
12406  ** @param const xcb_alloc_color_cells_reply_t *R
12407  ** @returns uint32_t *
12408  **
12409  *****************************************************************************/
12410 
12411 uint32_t *
12412 xcb_alloc_color_cells_masks (const xcb_alloc_color_cells_reply_t *R  /**< */)
12413 {
12414     xcb_generic_iterator_t prev = xcb_alloc_color_cells_pixels_end(R);
12415     return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
12416 }
12417 
12418 
12419 /*****************************************************************************
12420  **
12421  ** int xcb_alloc_color_cells_masks_length
12422  **
12423  ** @param const xcb_alloc_color_cells_reply_t *R
12424  ** @returns int
12425  **
12426  *****************************************************************************/
12427 
12428 int
12429 xcb_alloc_color_cells_masks_length (const xcb_alloc_color_cells_reply_t *R  /**< */)
12430 {
12431     return R->masks_len;
12432 }
12433 
12434 
12435 /*****************************************************************************
12436  **
12437  ** xcb_generic_iterator_t xcb_alloc_color_cells_masks_end
12438  **
12439  ** @param const xcb_alloc_color_cells_reply_t *R
12440  ** @returns xcb_generic_iterator_t
12441  **
12442  *****************************************************************************/
12443 
12444 xcb_generic_iterator_t
12445 xcb_alloc_color_cells_masks_end (const xcb_alloc_color_cells_reply_t *R  /**< */)
12446 {
12447     xcb_generic_iterator_t i;
12448     xcb_generic_iterator_t child = xcb_alloc_color_cells_pixels_end(R);
12449     i.data = ((uint32_t *) child.data) + (R->masks_len);
12450     i.rem = 0;
12451     i.index = (char *) i.data - (char *) R;
12452     return i;
12453 }
12454 
12455 
12456 /*****************************************************************************
12457  **
12458  ** xcb_alloc_color_cells_reply_t * xcb_alloc_color_cells_reply
12459  **
12460  ** @param xcb_connection_t                *c
12461  ** @param xcb_alloc_color_cells_cookie_t   cookie
12462  ** @param xcb_generic_error_t            **e
12463  ** @returns xcb_alloc_color_cells_reply_t *
12464  **
12465  *****************************************************************************/
12466 
12467 xcb_alloc_color_cells_reply_t *
12468 xcb_alloc_color_cells_reply (xcb_connection_t                *c  /**< */,
12469                              xcb_alloc_color_cells_cookie_t   cookie  /**< */,
12470                              xcb_generic_error_t            **e  /**< */)
12471 {
12472     return (xcb_alloc_color_cells_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
12473 }
12474 
12475 int
12476 xcb_alloc_color_planes_sizeof (const void  *_buffer  /**< */)
12477 {
12478     char *xcb_tmp = (char *)_buffer;
12479     const xcb_alloc_color_planes_reply_t *_aux = (xcb_alloc_color_planes_reply_t *)_buffer;
12480     unsigned int xcb_buffer_len = 0;
12481     unsigned int xcb_block_len = 0;
12482     unsigned int xcb_pad = 0;
12483     unsigned int xcb_align_to = 0;
12484 
12485 
12486     xcb_block_len += sizeof(xcb_alloc_color_planes_reply_t);
12487     xcb_tmp += xcb_block_len;
12488     xcb_buffer_len += xcb_block_len;
12489     xcb_block_len = 0;
12490     /* pixels */
12491     xcb_block_len += _aux->pixels_len * sizeof(uint32_t);
12492     xcb_tmp += xcb_block_len;
12493     xcb_align_to = ALIGNOF(uint32_t);
12494     /* insert padding */
12495     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12496     xcb_buffer_len += xcb_block_len + xcb_pad;
12497     if (0 != xcb_pad) {
12498         xcb_tmp += xcb_pad;
12499         xcb_pad = 0;
12500     }
12501     xcb_block_len = 0;
12502 
12503     return xcb_buffer_len;
12504 }
12505 
12506 
12507 /*****************************************************************************
12508  **
12509  ** xcb_alloc_color_planes_cookie_t xcb_alloc_color_planes
12510  **
12511  ** @param xcb_connection_t *c
12512  ** @param uint8_t           contiguous
12513  ** @param xcb_colormap_t    cmap
12514  ** @param uint16_t          colors
12515  ** @param uint16_t          reds
12516  ** @param uint16_t          greens
12517  ** @param uint16_t          blues
12518  ** @returns xcb_alloc_color_planes_cookie_t
12519  **
12520  *****************************************************************************/
12521 
12522 xcb_alloc_color_planes_cookie_t
12523 xcb_alloc_color_planes (xcb_connection_t *c  /**< */,
12524                         uint8_t           contiguous  /**< */,
12525                         xcb_colormap_t    cmap  /**< */,
12526                         uint16_t          colors  /**< */,
12527                         uint16_t          reds  /**< */,
12528                         uint16_t          greens  /**< */,
12529                         uint16_t          blues  /**< */)
12530 {
12531     static const xcb_protocol_request_t xcb_req = {
12532         /* count */ 2,
12533         /* ext */ 0,
12534         /* opcode */ XCB_ALLOC_COLOR_PLANES,
12535         /* isvoid */ 0
12536     };
12537 
12538     struct iovec xcb_parts[4];
12539     xcb_alloc_color_planes_cookie_t xcb_ret;
12540     xcb_alloc_color_planes_request_t xcb_out;
12541 
12542     xcb_out.contiguous = contiguous;
12543     xcb_out.cmap = cmap;
12544     xcb_out.colors = colors;
12545     xcb_out.reds = reds;
12546     xcb_out.greens = greens;
12547     xcb_out.blues = blues;
12548 
12549     xcb_parts[2].iov_base = (char *) &xcb_out;
12550     xcb_parts[2].iov_len = sizeof(xcb_out);
12551     xcb_parts[3].iov_base = 0;
12552     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12553 
12554     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
12555     return xcb_ret;
12556 }
12557 
12558 
12559 /*****************************************************************************
12560  **
12561  ** xcb_alloc_color_planes_cookie_t xcb_alloc_color_planes_unchecked
12562  **
12563  ** @param xcb_connection_t *c
12564  ** @param uint8_t           contiguous
12565  ** @param xcb_colormap_t    cmap
12566  ** @param uint16_t          colors
12567  ** @param uint16_t          reds
12568  ** @param uint16_t          greens
12569  ** @param uint16_t          blues
12570  ** @returns xcb_alloc_color_planes_cookie_t
12571  **
12572  *****************************************************************************/
12573 
12574 xcb_alloc_color_planes_cookie_t
12575 xcb_alloc_color_planes_unchecked (xcb_connection_t *c  /**< */,
12576                                   uint8_t           contiguous  /**< */,
12577                                   xcb_colormap_t    cmap  /**< */,
12578                                   uint16_t          colors  /**< */,
12579                                   uint16_t          reds  /**< */,
12580                                   uint16_t          greens  /**< */,
12581                                   uint16_t          blues  /**< */)
12582 {
12583     static const xcb_protocol_request_t xcb_req = {
12584         /* count */ 2,
12585         /* ext */ 0,
12586         /* opcode */ XCB_ALLOC_COLOR_PLANES,
12587         /* isvoid */ 0
12588     };
12589 
12590     struct iovec xcb_parts[4];
12591     xcb_alloc_color_planes_cookie_t xcb_ret;
12592     xcb_alloc_color_planes_request_t xcb_out;
12593 
12594     xcb_out.contiguous = contiguous;
12595     xcb_out.cmap = cmap;
12596     xcb_out.colors = colors;
12597     xcb_out.reds = reds;
12598     xcb_out.greens = greens;
12599     xcb_out.blues = blues;
12600 
12601     xcb_parts[2].iov_base = (char *) &xcb_out;
12602     xcb_parts[2].iov_len = sizeof(xcb_out);
12603     xcb_parts[3].iov_base = 0;
12604     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12605 
12606     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
12607     return xcb_ret;
12608 }
12609 
12610 
12611 /*****************************************************************************
12612  **
12613  ** uint32_t * xcb_alloc_color_planes_pixels
12614  **
12615  ** @param const xcb_alloc_color_planes_reply_t *R
12616  ** @returns uint32_t *
12617  **
12618  *****************************************************************************/
12619 
12620 uint32_t *
12621 xcb_alloc_color_planes_pixels (const xcb_alloc_color_planes_reply_t *R  /**< */)
12622 {
12623     return (uint32_t *) (R + 1);
12624 }
12625 
12626 
12627 /*****************************************************************************
12628  **
12629  ** int xcb_alloc_color_planes_pixels_length
12630  **
12631  ** @param const xcb_alloc_color_planes_reply_t *R
12632  ** @returns int
12633  **
12634  *****************************************************************************/
12635 
12636 int
12637 xcb_alloc_color_planes_pixels_length (const xcb_alloc_color_planes_reply_t *R  /**< */)
12638 {
12639     return R->pixels_len;
12640 }
12641 
12642 
12643 /*****************************************************************************
12644  **
12645  ** xcb_generic_iterator_t xcb_alloc_color_planes_pixels_end
12646  **
12647  ** @param const xcb_alloc_color_planes_reply_t *R
12648  ** @returns xcb_generic_iterator_t
12649  **
12650  *****************************************************************************/
12651 
12652 xcb_generic_iterator_t
12653 xcb_alloc_color_planes_pixels_end (const xcb_alloc_color_planes_reply_t *R  /**< */)
12654 {
12655     xcb_generic_iterator_t i;
12656     i.data = ((uint32_t *) (R + 1)) + (R->pixels_len);
12657     i.rem = 0;
12658     i.index = (char *) i.data - (char *) R;
12659     return i;
12660 }
12661 
12662 
12663 /*****************************************************************************
12664  **
12665  ** xcb_alloc_color_planes_reply_t * xcb_alloc_color_planes_reply
12666  **
12667  ** @param xcb_connection_t                 *c
12668  ** @param xcb_alloc_color_planes_cookie_t   cookie
12669  ** @param xcb_generic_error_t             **e
12670  ** @returns xcb_alloc_color_planes_reply_t *
12671  **
12672  *****************************************************************************/
12673 
12674 xcb_alloc_color_planes_reply_t *
12675 xcb_alloc_color_planes_reply (xcb_connection_t                 *c  /**< */,
12676                               xcb_alloc_color_planes_cookie_t   cookie  /**< */,
12677                               xcb_generic_error_t             **e  /**< */)
12678 {
12679     return (xcb_alloc_color_planes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
12680 }
12681 
12682 int
12683 xcb_free_colors_sizeof (const void  *_buffer  /**< */,
12684                         uint32_t     pixels_len  /**< */)
12685 {
12686     char *xcb_tmp = (char *)_buffer;
12687     unsigned int xcb_buffer_len = 0;
12688     unsigned int xcb_block_len = 0;
12689     unsigned int xcb_pad = 0;
12690     unsigned int xcb_align_to = 0;
12691 
12692 
12693     xcb_block_len += sizeof(xcb_free_colors_request_t);
12694     xcb_tmp += xcb_block_len;
12695     xcb_buffer_len += xcb_block_len;
12696     xcb_block_len = 0;
12697     /* pixels */
12698     xcb_block_len += pixels_len * sizeof(uint32_t);
12699     xcb_tmp += xcb_block_len;
12700     xcb_align_to = ALIGNOF(uint32_t);
12701     /* insert padding */
12702     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12703     xcb_buffer_len += xcb_block_len + xcb_pad;
12704     if (0 != xcb_pad) {
12705         xcb_tmp += xcb_pad;
12706         xcb_pad = 0;
12707     }
12708     xcb_block_len = 0;
12709 
12710     return xcb_buffer_len;
12711 }
12712 
12713 
12714 /*****************************************************************************
12715  **
12716  ** xcb_void_cookie_t xcb_free_colors_checked
12717  **
12718  ** @param xcb_connection_t *c
12719  ** @param xcb_colormap_t    cmap
12720  ** @param uint32_t          plane_mask
12721  ** @param uint32_t          pixels_len
12722  ** @param const uint32_t   *pixels
12723  ** @returns xcb_void_cookie_t
12724  **
12725  *****************************************************************************/
12726 
12727 xcb_void_cookie_t
12728 xcb_free_colors_checked (xcb_connection_t *c  /**< */,
12729                          xcb_colormap_t    cmap  /**< */,
12730                          uint32_t          plane_mask  /**< */,
12731                          uint32_t          pixels_len  /**< */,
12732                          const uint32_t   *pixels  /**< */)
12733 {
12734     static const xcb_protocol_request_t xcb_req = {
12735         /* count */ 4,
12736         /* ext */ 0,
12737         /* opcode */ XCB_FREE_COLORS,
12738         /* isvoid */ 1
12739     };
12740 
12741     struct iovec xcb_parts[6];
12742     xcb_void_cookie_t xcb_ret;
12743     xcb_free_colors_request_t xcb_out;
12744 
12745     xcb_out.pad0 = 0;
12746     xcb_out.cmap = cmap;
12747     xcb_out.plane_mask = plane_mask;
12748 
12749     xcb_parts[2].iov_base = (char *) &xcb_out;
12750     xcb_parts[2].iov_len = sizeof(xcb_out);
12751     xcb_parts[3].iov_base = 0;
12752     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12753     /* uint32_t pixels */
12754     xcb_parts[4].iov_base = (char *) pixels;
12755     xcb_parts[4].iov_len = pixels_len * sizeof(uint32_t);
12756     xcb_parts[5].iov_base = 0;
12757     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
12758 
12759     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
12760     return xcb_ret;
12761 }
12762 
12763 
12764 /*****************************************************************************
12765  **
12766  ** xcb_void_cookie_t xcb_free_colors
12767  **
12768  ** @param xcb_connection_t *c
12769  ** @param xcb_colormap_t    cmap
12770  ** @param uint32_t          plane_mask
12771  ** @param uint32_t          pixels_len
12772  ** @param const uint32_t   *pixels
12773  ** @returns xcb_void_cookie_t
12774  **
12775  *****************************************************************************/
12776 
12777 xcb_void_cookie_t
12778 xcb_free_colors (xcb_connection_t *c  /**< */,
12779                  xcb_colormap_t    cmap  /**< */,
12780                  uint32_t          plane_mask  /**< */,
12781                  uint32_t          pixels_len  /**< */,
12782                  const uint32_t   *pixels  /**< */)
12783 {
12784     static const xcb_protocol_request_t xcb_req = {
12785         /* count */ 4,
12786         /* ext */ 0,
12787         /* opcode */ XCB_FREE_COLORS,
12788         /* isvoid */ 1
12789     };
12790 
12791     struct iovec xcb_parts[6];
12792     xcb_void_cookie_t xcb_ret;
12793     xcb_free_colors_request_t xcb_out;
12794 
12795     xcb_out.pad0 = 0;
12796     xcb_out.cmap = cmap;
12797     xcb_out.plane_mask = plane_mask;
12798 
12799     xcb_parts[2].iov_base = (char *) &xcb_out;
12800     xcb_parts[2].iov_len = sizeof(xcb_out);
12801     xcb_parts[3].iov_base = 0;
12802     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12803     /* uint32_t pixels */
12804     xcb_parts[4].iov_base = (char *) pixels;
12805     xcb_parts[4].iov_len = pixels_len * sizeof(uint32_t);
12806     xcb_parts[5].iov_base = 0;
12807     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
12808 
12809     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
12810     return xcb_ret;
12811 }
12812 
12813 
12814 /*****************************************************************************
12815  **
12816  ** void xcb_coloritem_next
12817  **
12818  ** @param xcb_coloritem_iterator_t *i
12819  ** @returns void
12820  **
12821  *****************************************************************************/
12822 
12823 void
12824 xcb_coloritem_next (xcb_coloritem_iterator_t *i  /**< */)
12825 {
12826     --i->rem;
12827     ++i->data;
12828     i->index += sizeof(xcb_coloritem_t);
12829 }
12830 
12831 
12832 /*****************************************************************************
12833  **
12834  ** xcb_generic_iterator_t xcb_coloritem_end
12835  **
12836  ** @param xcb_coloritem_iterator_t i
12837  ** @returns xcb_generic_iterator_t
12838  **
12839  *****************************************************************************/
12840 
12841 xcb_generic_iterator_t
12842 xcb_coloritem_end (xcb_coloritem_iterator_t i  /**< */)
12843 {
12844     xcb_generic_iterator_t ret;
12845     ret.data = i.data + i.rem;
12846     ret.index = i.index + ((char *) ret.data - (char *) i.data);
12847     ret.rem = 0;
12848     return ret;
12849 }
12850 
12851 int
12852 xcb_store_colors_sizeof (const void  *_buffer  /**< */,
12853                          uint32_t     items_len  /**< */)
12854 {
12855     char *xcb_tmp = (char *)_buffer;
12856     unsigned int xcb_buffer_len = 0;
12857     unsigned int xcb_block_len = 0;
12858     unsigned int xcb_pad = 0;
12859     unsigned int xcb_align_to = 0;
12860 
12861 
12862     xcb_block_len += sizeof(xcb_store_colors_request_t);
12863     xcb_tmp += xcb_block_len;
12864     xcb_buffer_len += xcb_block_len;
12865     xcb_block_len = 0;
12866     /* items */
12867     xcb_block_len += items_len * sizeof(xcb_coloritem_t);
12868     xcb_tmp += xcb_block_len;
12869     xcb_align_to = ALIGNOF(xcb_coloritem_t);
12870     /* insert padding */
12871     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12872     xcb_buffer_len += xcb_block_len + xcb_pad;
12873     if (0 != xcb_pad) {
12874         xcb_tmp += xcb_pad;
12875         xcb_pad = 0;
12876     }
12877     xcb_block_len = 0;
12878 
12879     return xcb_buffer_len;
12880 }
12881 
12882 
12883 /*****************************************************************************
12884  **
12885  ** xcb_void_cookie_t xcb_store_colors_checked
12886  **
12887  ** @param xcb_connection_t      *c
12888  ** @param xcb_colormap_t         cmap
12889  ** @param uint32_t               items_len
12890  ** @param const xcb_coloritem_t *items
12891  ** @returns xcb_void_cookie_t
12892  **
12893  *****************************************************************************/
12894 
12895 xcb_void_cookie_t
12896 xcb_store_colors_checked (xcb_connection_t      *c  /**< */,
12897                           xcb_colormap_t         cmap  /**< */,
12898                           uint32_t               items_len  /**< */,
12899                           const xcb_coloritem_t *items  /**< */)
12900 {
12901     static const xcb_protocol_request_t xcb_req = {
12902         /* count */ 4,
12903         /* ext */ 0,
12904         /* opcode */ XCB_STORE_COLORS,
12905         /* isvoid */ 1
12906     };
12907 
12908     struct iovec xcb_parts[6];
12909     xcb_void_cookie_t xcb_ret;
12910     xcb_store_colors_request_t xcb_out;
12911 
12912     xcb_out.pad0 = 0;
12913     xcb_out.cmap = cmap;
12914 
12915     xcb_parts[2].iov_base = (char *) &xcb_out;
12916     xcb_parts[2].iov_len = sizeof(xcb_out);
12917     xcb_parts[3].iov_base = 0;
12918     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12919     /* xcb_coloritem_t items */
12920     xcb_parts[4].iov_base = (char *) items;
12921     xcb_parts[4].iov_len = items_len * sizeof(xcb_coloritem_t);
12922     xcb_parts[5].iov_base = 0;
12923     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
12924 
12925     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
12926     return xcb_ret;
12927 }
12928 
12929 
12930 /*****************************************************************************
12931  **
12932  ** xcb_void_cookie_t xcb_store_colors
12933  **
12934  ** @param xcb_connection_t      *c
12935  ** @param xcb_colormap_t         cmap
12936  ** @param uint32_t               items_len
12937  ** @param const xcb_coloritem_t *items
12938  ** @returns xcb_void_cookie_t
12939  **
12940  *****************************************************************************/
12941 
12942 xcb_void_cookie_t
12943 xcb_store_colors (xcb_connection_t      *c  /**< */,
12944                   xcb_colormap_t         cmap  /**< */,
12945                   uint32_t               items_len  /**< */,
12946                   const xcb_coloritem_t *items  /**< */)
12947 {
12948     static const xcb_protocol_request_t xcb_req = {
12949         /* count */ 4,
12950         /* ext */ 0,
12951         /* opcode */ XCB_STORE_COLORS,
12952         /* isvoid */ 1
12953     };
12954 
12955     struct iovec xcb_parts[6];
12956     xcb_void_cookie_t xcb_ret;
12957     xcb_store_colors_request_t xcb_out;
12958 
12959     xcb_out.pad0 = 0;
12960     xcb_out.cmap = cmap;
12961 
12962     xcb_parts[2].iov_base = (char *) &xcb_out;
12963     xcb_parts[2].iov_len = sizeof(xcb_out);
12964     xcb_parts[3].iov_base = 0;
12965     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
12966     /* xcb_coloritem_t items */
12967     xcb_parts[4].iov_base = (char *) items;
12968     xcb_parts[4].iov_len = items_len * sizeof(xcb_coloritem_t);
12969     xcb_parts[5].iov_base = 0;
12970     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
12971 
12972     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
12973     return xcb_ret;
12974 }
12975 
12976 int
12977 xcb_store_named_color_sizeof (const void  *_buffer  /**< */)
12978 {
12979     char *xcb_tmp = (char *)_buffer;
12980     const xcb_store_named_color_request_t *_aux = (xcb_store_named_color_request_t *)_buffer;
12981     unsigned int xcb_buffer_len = 0;
12982     unsigned int xcb_block_len = 0;
12983     unsigned int xcb_pad = 0;
12984     unsigned int xcb_align_to = 0;
12985 
12986 
12987     xcb_block_len += sizeof(xcb_store_named_color_request_t);
12988     xcb_tmp += xcb_block_len;
12989     xcb_buffer_len += xcb_block_len;
12990     xcb_block_len = 0;
12991     /* name */
12992     xcb_block_len += _aux->name_len * sizeof(char);
12993     xcb_tmp += xcb_block_len;
12994     xcb_align_to = ALIGNOF(char);
12995     /* insert padding */
12996     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12997     xcb_buffer_len += xcb_block_len + xcb_pad;
12998     if (0 != xcb_pad) {
12999         xcb_tmp += xcb_pad;
13000         xcb_pad = 0;
13001     }
13002     xcb_block_len = 0;
13003 
13004     return xcb_buffer_len;
13005 }
13006 
13007 
13008 /*****************************************************************************
13009  **
13010  ** xcb_void_cookie_t xcb_store_named_color_checked
13011  **
13012  ** @param xcb_connection_t *c
13013  ** @param uint8_t           flags
13014  ** @param xcb_colormap_t    cmap
13015  ** @param uint32_t          pixel
13016  ** @param uint16_t          name_len
13017  ** @param const char       *name
13018  ** @returns xcb_void_cookie_t
13019  **
13020  *****************************************************************************/
13021 
13022 xcb_void_cookie_t
13023 xcb_store_named_color_checked (xcb_connection_t *c  /**< */,
13024                                uint8_t           flags  /**< */,
13025                                xcb_colormap_t    cmap  /**< */,
13026                                uint32_t          pixel  /**< */,
13027                                uint16_t          name_len  /**< */,
13028                                const char       *name  /**< */)
13029 {
13030     static const xcb_protocol_request_t xcb_req = {
13031         /* count */ 4,
13032         /* ext */ 0,
13033         /* opcode */ XCB_STORE_NAMED_COLOR,
13034         /* isvoid */ 1
13035     };
13036 
13037     struct iovec xcb_parts[6];
13038     xcb_void_cookie_t xcb_ret;
13039     xcb_store_named_color_request_t xcb_out;
13040 
13041     xcb_out.flags = flags;
13042     xcb_out.cmap = cmap;
13043     xcb_out.pixel = pixel;
13044     xcb_out.name_len = name_len;
13045     memset(xcb_out.pad0, 0, 2);
13046 
13047     xcb_parts[2].iov_base = (char *) &xcb_out;
13048     xcb_parts[2].iov_len = sizeof(xcb_out);
13049     xcb_parts[3].iov_base = 0;
13050     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13051     /* char name */
13052     xcb_parts[4].iov_base = (char *) name;
13053     xcb_parts[4].iov_len = name_len * sizeof(char);
13054     xcb_parts[5].iov_base = 0;
13055     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
13056 
13057     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
13058     return xcb_ret;
13059 }
13060 
13061 
13062 /*****************************************************************************
13063  **
13064  ** xcb_void_cookie_t xcb_store_named_color
13065  **
13066  ** @param xcb_connection_t *c
13067  ** @param uint8_t           flags
13068  ** @param xcb_colormap_t    cmap
13069  ** @param uint32_t          pixel
13070  ** @param uint16_t          name_len
13071  ** @param const char       *name
13072  ** @returns xcb_void_cookie_t
13073  **
13074  *****************************************************************************/
13075 
13076 xcb_void_cookie_t
13077 xcb_store_named_color (xcb_connection_t *c  /**< */,
13078                        uint8_t           flags  /**< */,
13079                        xcb_colormap_t    cmap  /**< */,
13080                        uint32_t          pixel  /**< */,
13081                        uint16_t          name_len  /**< */,
13082                        const char       *name  /**< */)
13083 {
13084     static const xcb_protocol_request_t xcb_req = {
13085         /* count */ 4,
13086         /* ext */ 0,
13087         /* opcode */ XCB_STORE_NAMED_COLOR,
13088         /* isvoid */ 1
13089     };
13090 
13091     struct iovec xcb_parts[6];
13092     xcb_void_cookie_t xcb_ret;
13093     xcb_store_named_color_request_t xcb_out;
13094 
13095     xcb_out.flags = flags;
13096     xcb_out.cmap = cmap;
13097     xcb_out.pixel = pixel;
13098     xcb_out.name_len = name_len;
13099     memset(xcb_out.pad0, 0, 2);
13100 
13101     xcb_parts[2].iov_base = (char *) &xcb_out;
13102     xcb_parts[2].iov_len = sizeof(xcb_out);
13103     xcb_parts[3].iov_base = 0;
13104     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13105     /* char name */
13106     xcb_parts[4].iov_base = (char *) name;
13107     xcb_parts[4].iov_len = name_len * sizeof(char);
13108     xcb_parts[5].iov_base = 0;
13109     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
13110 
13111     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
13112     return xcb_ret;
13113 }
13114 
13115 
13116 /*****************************************************************************
13117  **
13118  ** void xcb_rgb_next
13119  **
13120  ** @param xcb_rgb_iterator_t *i
13121  ** @returns void
13122  **
13123  *****************************************************************************/
13124 
13125 void
13126 xcb_rgb_next (xcb_rgb_iterator_t *i  /**< */)
13127 {
13128     --i->rem;
13129     ++i->data;
13130     i->index += sizeof(xcb_rgb_t);
13131 }
13132 
13133 
13134 /*****************************************************************************
13135  **
13136  ** xcb_generic_iterator_t xcb_rgb_end
13137  **
13138  ** @param xcb_rgb_iterator_t i
13139  ** @returns xcb_generic_iterator_t
13140  **
13141  *****************************************************************************/
13142 
13143 xcb_generic_iterator_t
13144 xcb_rgb_end (xcb_rgb_iterator_t i  /**< */)
13145 {
13146     xcb_generic_iterator_t ret;
13147     ret.data = i.data + i.rem;
13148     ret.index = i.index + ((char *) ret.data - (char *) i.data);
13149     ret.rem = 0;
13150     return ret;
13151 }
13152 
13153 int
13154 xcb_query_colors_sizeof (const void  *_buffer  /**< */,
13155                          uint32_t     pixels_len  /**< */)
13156 {
13157     char *xcb_tmp = (char *)_buffer;
13158     unsigned int xcb_buffer_len = 0;
13159     unsigned int xcb_block_len = 0;
13160     unsigned int xcb_pad = 0;
13161     unsigned int xcb_align_to = 0;
13162 
13163 
13164     xcb_block_len += sizeof(xcb_query_colors_request_t);
13165     xcb_tmp += xcb_block_len;
13166     xcb_buffer_len += xcb_block_len;
13167     xcb_block_len = 0;
13168     /* pixels */
13169     xcb_block_len += pixels_len * sizeof(uint32_t);
13170     xcb_tmp += xcb_block_len;
13171     xcb_align_to = ALIGNOF(uint32_t);
13172     /* insert padding */
13173     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13174     xcb_buffer_len += xcb_block_len + xcb_pad;
13175     if (0 != xcb_pad) {
13176         xcb_tmp += xcb_pad;
13177         xcb_pad = 0;
13178     }
13179     xcb_block_len = 0;
13180 
13181     return xcb_buffer_len;
13182 }
13183 
13184 
13185 /*****************************************************************************
13186  **
13187  ** xcb_query_colors_cookie_t xcb_query_colors
13188  **
13189  ** @param xcb_connection_t *c
13190  ** @param xcb_colormap_t    cmap
13191  ** @param uint32_t          pixels_len
13192  ** @param const uint32_t   *pixels
13193  ** @returns xcb_query_colors_cookie_t
13194  **
13195  *****************************************************************************/
13196 
13197 xcb_query_colors_cookie_t
13198 xcb_query_colors (xcb_connection_t *c  /**< */,
13199                   xcb_colormap_t    cmap  /**< */,
13200                   uint32_t          pixels_len  /**< */,
13201                   const uint32_t   *pixels  /**< */)
13202 {
13203     static const xcb_protocol_request_t xcb_req = {
13204         /* count */ 4,
13205         /* ext */ 0,
13206         /* opcode */ XCB_QUERY_COLORS,
13207         /* isvoid */ 0
13208     };
13209 
13210     struct iovec xcb_parts[6];
13211     xcb_query_colors_cookie_t xcb_ret;
13212     xcb_query_colors_request_t xcb_out;
13213 
13214     xcb_out.pad0 = 0;
13215     xcb_out.cmap = cmap;
13216 
13217     xcb_parts[2].iov_base = (char *) &xcb_out;
13218     xcb_parts[2].iov_len = sizeof(xcb_out);
13219     xcb_parts[3].iov_base = 0;
13220     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13221     /* uint32_t pixels */
13222     xcb_parts[4].iov_base = (char *) pixels;
13223     xcb_parts[4].iov_len = pixels_len * sizeof(uint32_t);
13224     xcb_parts[5].iov_base = 0;
13225     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
13226 
13227     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
13228     return xcb_ret;
13229 }
13230 
13231 
13232 /*****************************************************************************
13233  **
13234  ** xcb_query_colors_cookie_t xcb_query_colors_unchecked
13235  **
13236  ** @param xcb_connection_t *c
13237  ** @param xcb_colormap_t    cmap
13238  ** @param uint32_t          pixels_len
13239  ** @param const uint32_t   *pixels
13240  ** @returns xcb_query_colors_cookie_t
13241  **
13242  *****************************************************************************/
13243 
13244 xcb_query_colors_cookie_t
13245 xcb_query_colors_unchecked (xcb_connection_t *c  /**< */,
13246                             xcb_colormap_t    cmap  /**< */,
13247                             uint32_t          pixels_len  /**< */,
13248                             const uint32_t   *pixels  /**< */)
13249 {
13250     static const xcb_protocol_request_t xcb_req = {
13251         /* count */ 4,
13252         /* ext */ 0,
13253         /* opcode */ XCB_QUERY_COLORS,
13254         /* isvoid */ 0
13255     };
13256 
13257     struct iovec xcb_parts[6];
13258     xcb_query_colors_cookie_t xcb_ret;
13259     xcb_query_colors_request_t xcb_out;
13260 
13261     xcb_out.pad0 = 0;
13262     xcb_out.cmap = cmap;
13263 
13264     xcb_parts[2].iov_base = (char *) &xcb_out;
13265     xcb_parts[2].iov_len = sizeof(xcb_out);
13266     xcb_parts[3].iov_base = 0;
13267     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13268     /* uint32_t pixels */
13269     xcb_parts[4].iov_base = (char *) pixels;
13270     xcb_parts[4].iov_len = pixels_len * sizeof(uint32_t);
13271     xcb_parts[5].iov_base = 0;
13272     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
13273 
13274     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
13275     return xcb_ret;
13276 }
13277 
13278 
13279 /*****************************************************************************
13280  **
13281  ** xcb_rgb_t * xcb_query_colors_colors
13282  **
13283  ** @param const xcb_query_colors_reply_t *R
13284  ** @returns xcb_rgb_t *
13285  **
13286  *****************************************************************************/
13287 
13288 xcb_rgb_t *
13289 xcb_query_colors_colors (const xcb_query_colors_reply_t *R  /**< */)
13290 {
13291     return (xcb_rgb_t *) (R + 1);
13292 }
13293 
13294 
13295 /*****************************************************************************
13296  **
13297  ** int xcb_query_colors_colors_length
13298  **
13299  ** @param const xcb_query_colors_reply_t *R
13300  ** @returns int
13301  **
13302  *****************************************************************************/
13303 
13304 int
13305 xcb_query_colors_colors_length (const xcb_query_colors_reply_t *R  /**< */)
13306 {
13307     return R->colors_len;
13308 }
13309 
13310 
13311 /*****************************************************************************
13312  **
13313  ** xcb_rgb_iterator_t xcb_query_colors_colors_iterator
13314  **
13315  ** @param const xcb_query_colors_reply_t *R
13316  ** @returns xcb_rgb_iterator_t
13317  **
13318  *****************************************************************************/
13319 
13320 xcb_rgb_iterator_t
13321 xcb_query_colors_colors_iterator (const xcb_query_colors_reply_t *R  /**< */)
13322 {
13323     xcb_rgb_iterator_t i;
13324     i.data = (xcb_rgb_t *) (R + 1);
13325     i.rem = R->colors_len;
13326     i.index = (char *) i.data - (char *) R;
13327     return i;
13328 }
13329 
13330 
13331 /*****************************************************************************
13332  **
13333  ** xcb_query_colors_reply_t * xcb_query_colors_reply
13334  **
13335  ** @param xcb_connection_t           *c
13336  ** @param xcb_query_colors_cookie_t   cookie
13337  ** @param xcb_generic_error_t       **e
13338  ** @returns xcb_query_colors_reply_t *
13339  **
13340  *****************************************************************************/
13341 
13342 xcb_query_colors_reply_t *
13343 xcb_query_colors_reply (xcb_connection_t           *c  /**< */,
13344                         xcb_query_colors_cookie_t   cookie  /**< */,
13345                         xcb_generic_error_t       **e  /**< */)
13346 {
13347     return (xcb_query_colors_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
13348 }
13349 
13350 int
13351 xcb_lookup_color_sizeof (const void  *_buffer  /**< */)
13352 {
13353     char *xcb_tmp = (char *)_buffer;
13354     const xcb_lookup_color_request_t *_aux = (xcb_lookup_color_request_t *)_buffer;
13355     unsigned int xcb_buffer_len = 0;
13356     unsigned int xcb_block_len = 0;
13357     unsigned int xcb_pad = 0;
13358     unsigned int xcb_align_to = 0;
13359 
13360 
13361     xcb_block_len += sizeof(xcb_lookup_color_request_t);
13362     xcb_tmp += xcb_block_len;
13363     xcb_buffer_len += xcb_block_len;
13364     xcb_block_len = 0;
13365     /* name */
13366     xcb_block_len += _aux->name_len * sizeof(char);
13367     xcb_tmp += xcb_block_len;
13368     xcb_align_to = ALIGNOF(char);
13369     /* insert padding */
13370     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13371     xcb_buffer_len += xcb_block_len + xcb_pad;
13372     if (0 != xcb_pad) {
13373         xcb_tmp += xcb_pad;
13374         xcb_pad = 0;
13375     }
13376     xcb_block_len = 0;
13377 
13378     return xcb_buffer_len;
13379 }
13380 
13381 
13382 /*****************************************************************************
13383  **
13384  ** xcb_lookup_color_cookie_t xcb_lookup_color
13385  **
13386  ** @param xcb_connection_t *c
13387  ** @param xcb_colormap_t    cmap
13388  ** @param uint16_t          name_len
13389  ** @param const char       *name
13390  ** @returns xcb_lookup_color_cookie_t
13391  **
13392  *****************************************************************************/
13393 
13394 xcb_lookup_color_cookie_t
13395 xcb_lookup_color (xcb_connection_t *c  /**< */,
13396                   xcb_colormap_t    cmap  /**< */,
13397                   uint16_t          name_len  /**< */,
13398                   const char       *name  /**< */)
13399 {
13400     static const xcb_protocol_request_t xcb_req = {
13401         /* count */ 4,
13402         /* ext */ 0,
13403         /* opcode */ XCB_LOOKUP_COLOR,
13404         /* isvoid */ 0
13405     };
13406 
13407     struct iovec xcb_parts[6];
13408     xcb_lookup_color_cookie_t xcb_ret;
13409     xcb_lookup_color_request_t xcb_out;
13410 
13411     xcb_out.pad0 = 0;
13412     xcb_out.cmap = cmap;
13413     xcb_out.name_len = name_len;
13414     memset(xcb_out.pad1, 0, 2);
13415 
13416     xcb_parts[2].iov_base = (char *) &xcb_out;
13417     xcb_parts[2].iov_len = sizeof(xcb_out);
13418     xcb_parts[3].iov_base = 0;
13419     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13420     /* char name */
13421     xcb_parts[4].iov_base = (char *) name;
13422     xcb_parts[4].iov_len = name_len * sizeof(char);
13423     xcb_parts[5].iov_base = 0;
13424     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
13425 
13426     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
13427     return xcb_ret;
13428 }
13429 
13430 
13431 /*****************************************************************************
13432  **
13433  ** xcb_lookup_color_cookie_t xcb_lookup_color_unchecked
13434  **
13435  ** @param xcb_connection_t *c
13436  ** @param xcb_colormap_t    cmap
13437  ** @param uint16_t          name_len
13438  ** @param const char       *name
13439  ** @returns xcb_lookup_color_cookie_t
13440  **
13441  *****************************************************************************/
13442 
13443 xcb_lookup_color_cookie_t
13444 xcb_lookup_color_unchecked (xcb_connection_t *c  /**< */,
13445                             xcb_colormap_t    cmap  /**< */,
13446                             uint16_t          name_len  /**< */,
13447                             const char       *name  /**< */)
13448 {
13449     static const xcb_protocol_request_t xcb_req = {
13450         /* count */ 4,
13451         /* ext */ 0,
13452         /* opcode */ XCB_LOOKUP_COLOR,
13453         /* isvoid */ 0
13454     };
13455 
13456     struct iovec xcb_parts[6];
13457     xcb_lookup_color_cookie_t xcb_ret;
13458     xcb_lookup_color_request_t xcb_out;
13459 
13460     xcb_out.pad0 = 0;
13461     xcb_out.cmap = cmap;
13462     xcb_out.name_len = name_len;
13463     memset(xcb_out.pad1, 0, 2);
13464 
13465     xcb_parts[2].iov_base = (char *) &xcb_out;
13466     xcb_parts[2].iov_len = sizeof(xcb_out);
13467     xcb_parts[3].iov_base = 0;
13468     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13469     /* char name */
13470     xcb_parts[4].iov_base = (char *) name;
13471     xcb_parts[4].iov_len = name_len * sizeof(char);
13472     xcb_parts[5].iov_base = 0;
13473     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
13474 
13475     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
13476     return xcb_ret;
13477 }
13478 
13479 
13480 /*****************************************************************************
13481  **
13482  ** xcb_lookup_color_reply_t * xcb_lookup_color_reply
13483  **
13484  ** @param xcb_connection_t           *c
13485  ** @param xcb_lookup_color_cookie_t   cookie
13486  ** @param xcb_generic_error_t       **e
13487  ** @returns xcb_lookup_color_reply_t *
13488  **
13489  *****************************************************************************/
13490 
13491 xcb_lookup_color_reply_t *
13492 xcb_lookup_color_reply (xcb_connection_t           *c  /**< */,
13493                         xcb_lookup_color_cookie_t   cookie  /**< */,
13494                         xcb_generic_error_t       **e  /**< */)
13495 {
13496     return (xcb_lookup_color_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
13497 }
13498 
13499 
13500 /*****************************************************************************
13501  **
13502  ** xcb_void_cookie_t xcb_create_cursor_checked
13503  **
13504  ** @param xcb_connection_t *c
13505  ** @param xcb_cursor_t      cid
13506  ** @param xcb_pixmap_t      source
13507  ** @param xcb_pixmap_t      mask
13508  ** @param uint16_t          fore_red
13509  ** @param uint16_t          fore_green
13510  ** @param uint16_t          fore_blue
13511  ** @param uint16_t          back_red
13512  ** @param uint16_t          back_green
13513  ** @param uint16_t          back_blue
13514  ** @param uint16_t          x
13515  ** @param uint16_t          y
13516  ** @returns xcb_void_cookie_t
13517  **
13518  *****************************************************************************/
13519 
13520 xcb_void_cookie_t
13521 xcb_create_cursor_checked (xcb_connection_t *c  /**< */,
13522                            xcb_cursor_t      cid  /**< */,
13523                            xcb_pixmap_t      source  /**< */,
13524                            xcb_pixmap_t      mask  /**< */,
13525                            uint16_t          fore_red  /**< */,
13526                            uint16_t          fore_green  /**< */,
13527                            uint16_t          fore_blue  /**< */,
13528                            uint16_t          back_red  /**< */,
13529                            uint16_t          back_green  /**< */,
13530                            uint16_t          back_blue  /**< */,
13531                            uint16_t          x  /**< */,
13532                            uint16_t          y  /**< */)
13533 {
13534     static const xcb_protocol_request_t xcb_req = {
13535         /* count */ 2,
13536         /* ext */ 0,
13537         /* opcode */ XCB_CREATE_CURSOR,
13538         /* isvoid */ 1
13539     };
13540 
13541     struct iovec xcb_parts[4];
13542     xcb_void_cookie_t xcb_ret;
13543     xcb_create_cursor_request_t xcb_out;
13544 
13545     xcb_out.pad0 = 0;
13546     xcb_out.cid = cid;
13547     xcb_out.source = source;
13548     xcb_out.mask = mask;
13549     xcb_out.fore_red = fore_red;
13550     xcb_out.fore_green = fore_green;
13551     xcb_out.fore_blue = fore_blue;
13552     xcb_out.back_red = back_red;
13553     xcb_out.back_green = back_green;
13554     xcb_out.back_blue = back_blue;
13555     xcb_out.x = x;
13556     xcb_out.y = y;
13557 
13558     xcb_parts[2].iov_base = (char *) &xcb_out;
13559     xcb_parts[2].iov_len = sizeof(xcb_out);
13560     xcb_parts[3].iov_base = 0;
13561     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13562 
13563     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
13564     return xcb_ret;
13565 }
13566 
13567 
13568 /*****************************************************************************
13569  **
13570  ** xcb_void_cookie_t xcb_create_cursor
13571  **
13572  ** @param xcb_connection_t *c
13573  ** @param xcb_cursor_t      cid
13574  ** @param xcb_pixmap_t      source
13575  ** @param xcb_pixmap_t      mask
13576  ** @param uint16_t          fore_red
13577  ** @param uint16_t          fore_green
13578  ** @param uint16_t          fore_blue
13579  ** @param uint16_t          back_red
13580  ** @param uint16_t          back_green
13581  ** @param uint16_t          back_blue
13582  ** @param uint16_t          x
13583  ** @param uint16_t          y
13584  ** @returns xcb_void_cookie_t
13585  **
13586  *****************************************************************************/
13587 
13588 xcb_void_cookie_t
13589 xcb_create_cursor (xcb_connection_t *c  /**< */,
13590                    xcb_cursor_t      cid  /**< */,
13591                    xcb_pixmap_t      source  /**< */,
13592                    xcb_pixmap_t      mask  /**< */,
13593                    uint16_t          fore_red  /**< */,
13594                    uint16_t          fore_green  /**< */,
13595                    uint16_t          fore_blue  /**< */,
13596                    uint16_t          back_red  /**< */,
13597                    uint16_t          back_green  /**< */,
13598                    uint16_t          back_blue  /**< */,
13599                    uint16_t          x  /**< */,
13600                    uint16_t          y  /**< */)
13601 {
13602     static const xcb_protocol_request_t xcb_req = {
13603         /* count */ 2,
13604         /* ext */ 0,
13605         /* opcode */ XCB_CREATE_CURSOR,
13606         /* isvoid */ 1
13607     };
13608 
13609     struct iovec xcb_parts[4];
13610     xcb_void_cookie_t xcb_ret;
13611     xcb_create_cursor_request_t xcb_out;
13612 
13613     xcb_out.pad0 = 0;
13614     xcb_out.cid = cid;
13615     xcb_out.source = source;
13616     xcb_out.mask = mask;
13617     xcb_out.fore_red = fore_red;
13618     xcb_out.fore_green = fore_green;
13619     xcb_out.fore_blue = fore_blue;
13620     xcb_out.back_red = back_red;
13621     xcb_out.back_green = back_green;
13622     xcb_out.back_blue = back_blue;
13623     xcb_out.x = x;
13624     xcb_out.y = y;
13625 
13626     xcb_parts[2].iov_base = (char *) &xcb_out;
13627     xcb_parts[2].iov_len = sizeof(xcb_out);
13628     xcb_parts[3].iov_base = 0;
13629     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13630 
13631     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
13632     return xcb_ret;
13633 }
13634 
13635 
13636 /*****************************************************************************
13637  **
13638  ** xcb_void_cookie_t xcb_create_glyph_cursor_checked
13639  **
13640  ** @param xcb_connection_t *c
13641  ** @param xcb_cursor_t      cid
13642  ** @param xcb_font_t        source_font
13643  ** @param xcb_font_t        mask_font
13644  ** @param uint16_t          source_char
13645  ** @param uint16_t          mask_char
13646  ** @param uint16_t          fore_red
13647  ** @param uint16_t          fore_green
13648  ** @param uint16_t          fore_blue
13649  ** @param uint16_t          back_red
13650  ** @param uint16_t          back_green
13651  ** @param uint16_t          back_blue
13652  ** @returns xcb_void_cookie_t
13653  **
13654  *****************************************************************************/
13655 
13656 xcb_void_cookie_t
13657 xcb_create_glyph_cursor_checked (xcb_connection_t *c  /**< */,
13658                                  xcb_cursor_t      cid  /**< */,
13659                                  xcb_font_t        source_font  /**< */,
13660                                  xcb_font_t        mask_font  /**< */,
13661                                  uint16_t          source_char  /**< */,
13662                                  uint16_t          mask_char  /**< */,
13663                                  uint16_t          fore_red  /**< */,
13664                                  uint16_t          fore_green  /**< */,
13665                                  uint16_t          fore_blue  /**< */,
13666                                  uint16_t          back_red  /**< */,
13667                                  uint16_t          back_green  /**< */,
13668                                  uint16_t          back_blue  /**< */)
13669 {
13670     static const xcb_protocol_request_t xcb_req = {
13671         /* count */ 2,
13672         /* ext */ 0,
13673         /* opcode */ XCB_CREATE_GLYPH_CURSOR,
13674         /* isvoid */ 1
13675     };
13676 
13677     struct iovec xcb_parts[4];
13678     xcb_void_cookie_t xcb_ret;
13679     xcb_create_glyph_cursor_request_t xcb_out;
13680 
13681     xcb_out.pad0 = 0;
13682     xcb_out.cid = cid;
13683     xcb_out.source_font = source_font;
13684     xcb_out.mask_font = mask_font;
13685     xcb_out.source_char = source_char;
13686     xcb_out.mask_char = mask_char;
13687     xcb_out.fore_red = fore_red;
13688     xcb_out.fore_green = fore_green;
13689     xcb_out.fore_blue = fore_blue;
13690     xcb_out.back_red = back_red;
13691     xcb_out.back_green = back_green;
13692     xcb_out.back_blue = back_blue;
13693 
13694     xcb_parts[2].iov_base = (char *) &xcb_out;
13695     xcb_parts[2].iov_len = sizeof(xcb_out);
13696     xcb_parts[3].iov_base = 0;
13697     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13698 
13699     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
13700     return xcb_ret;
13701 }
13702 
13703 
13704 /*****************************************************************************
13705  **
13706  ** xcb_void_cookie_t xcb_create_glyph_cursor
13707  **
13708  ** @param xcb_connection_t *c
13709  ** @param xcb_cursor_t      cid
13710  ** @param xcb_font_t        source_font
13711  ** @param xcb_font_t        mask_font
13712  ** @param uint16_t          source_char
13713  ** @param uint16_t          mask_char
13714  ** @param uint16_t          fore_red
13715  ** @param uint16_t          fore_green
13716  ** @param uint16_t          fore_blue
13717  ** @param uint16_t          back_red
13718  ** @param uint16_t          back_green
13719  ** @param uint16_t          back_blue
13720  ** @returns xcb_void_cookie_t
13721  **
13722  *****************************************************************************/
13723 
13724 xcb_void_cookie_t
13725 xcb_create_glyph_cursor (xcb_connection_t *c  /**< */,
13726                          xcb_cursor_t      cid  /**< */,
13727                          xcb_font_t        source_font  /**< */,
13728                          xcb_font_t        mask_font  /**< */,
13729                          uint16_t          source_char  /**< */,
13730                          uint16_t          mask_char  /**< */,
13731                          uint16_t          fore_red  /**< */,
13732                          uint16_t          fore_green  /**< */,
13733                          uint16_t          fore_blue  /**< */,
13734                          uint16_t          back_red  /**< */,
13735                          uint16_t          back_green  /**< */,
13736                          uint16_t          back_blue  /**< */)
13737 {
13738     static const xcb_protocol_request_t xcb_req = {
13739         /* count */ 2,
13740         /* ext */ 0,
13741         /* opcode */ XCB_CREATE_GLYPH_CURSOR,
13742         /* isvoid */ 1
13743     };
13744 
13745     struct iovec xcb_parts[4];
13746     xcb_void_cookie_t xcb_ret;
13747     xcb_create_glyph_cursor_request_t xcb_out;
13748 
13749     xcb_out.pad0 = 0;
13750     xcb_out.cid = cid;
13751     xcb_out.source_font = source_font;
13752     xcb_out.mask_font = mask_font;
13753     xcb_out.source_char = source_char;
13754     xcb_out.mask_char = mask_char;
13755     xcb_out.fore_red = fore_red;
13756     xcb_out.fore_green = fore_green;
13757     xcb_out.fore_blue = fore_blue;
13758     xcb_out.back_red = back_red;
13759     xcb_out.back_green = back_green;
13760     xcb_out.back_blue = back_blue;
13761 
13762     xcb_parts[2].iov_base = (char *) &xcb_out;
13763     xcb_parts[2].iov_len = sizeof(xcb_out);
13764     xcb_parts[3].iov_base = 0;
13765     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13766 
13767     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
13768     return xcb_ret;
13769 }
13770 
13771 
13772 /*****************************************************************************
13773  **
13774  ** xcb_void_cookie_t xcb_free_cursor_checked
13775  **
13776  ** @param xcb_connection_t *c
13777  ** @param xcb_cursor_t      cursor
13778  ** @returns xcb_void_cookie_t
13779  **
13780  *****************************************************************************/
13781 
13782 xcb_void_cookie_t
13783 xcb_free_cursor_checked (xcb_connection_t *c  /**< */,
13784                          xcb_cursor_t      cursor  /**< */)
13785 {
13786     static const xcb_protocol_request_t xcb_req = {
13787         /* count */ 2,
13788         /* ext */ 0,
13789         /* opcode */ XCB_FREE_CURSOR,
13790         /* isvoid */ 1
13791     };
13792 
13793     struct iovec xcb_parts[4];
13794     xcb_void_cookie_t xcb_ret;
13795     xcb_free_cursor_request_t xcb_out;
13796 
13797     xcb_out.pad0 = 0;
13798     xcb_out.cursor = cursor;
13799 
13800     xcb_parts[2].iov_base = (char *) &xcb_out;
13801     xcb_parts[2].iov_len = sizeof(xcb_out);
13802     xcb_parts[3].iov_base = 0;
13803     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13804 
13805     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
13806     return xcb_ret;
13807 }
13808 
13809 
13810 /*****************************************************************************
13811  **
13812  ** xcb_void_cookie_t xcb_free_cursor
13813  **
13814  ** @param xcb_connection_t *c
13815  ** @param xcb_cursor_t      cursor
13816  ** @returns xcb_void_cookie_t
13817  **
13818  *****************************************************************************/
13819 
13820 xcb_void_cookie_t
13821 xcb_free_cursor (xcb_connection_t *c  /**< */,
13822                  xcb_cursor_t      cursor  /**< */)
13823 {
13824     static const xcb_protocol_request_t xcb_req = {
13825         /* count */ 2,
13826         /* ext */ 0,
13827         /* opcode */ XCB_FREE_CURSOR,
13828         /* isvoid */ 1
13829     };
13830 
13831     struct iovec xcb_parts[4];
13832     xcb_void_cookie_t xcb_ret;
13833     xcb_free_cursor_request_t xcb_out;
13834 
13835     xcb_out.pad0 = 0;
13836     xcb_out.cursor = cursor;
13837 
13838     xcb_parts[2].iov_base = (char *) &xcb_out;
13839     xcb_parts[2].iov_len = sizeof(xcb_out);
13840     xcb_parts[3].iov_base = 0;
13841     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13842 
13843     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
13844     return xcb_ret;
13845 }
13846 
13847 
13848 /*****************************************************************************
13849  **
13850  ** xcb_void_cookie_t xcb_recolor_cursor_checked
13851  **
13852  ** @param xcb_connection_t *c
13853  ** @param xcb_cursor_t      cursor
13854  ** @param uint16_t          fore_red
13855  ** @param uint16_t          fore_green
13856  ** @param uint16_t          fore_blue
13857  ** @param uint16_t          back_red
13858  ** @param uint16_t          back_green
13859  ** @param uint16_t          back_blue
13860  ** @returns xcb_void_cookie_t
13861  **
13862  *****************************************************************************/
13863 
13864 xcb_void_cookie_t
13865 xcb_recolor_cursor_checked (xcb_connection_t *c  /**< */,
13866                             xcb_cursor_t      cursor  /**< */,
13867                             uint16_t          fore_red  /**< */,
13868                             uint16_t          fore_green  /**< */,
13869                             uint16_t          fore_blue  /**< */,
13870                             uint16_t          back_red  /**< */,
13871                             uint16_t          back_green  /**< */,
13872                             uint16_t          back_blue  /**< */)
13873 {
13874     static const xcb_protocol_request_t xcb_req = {
13875         /* count */ 2,
13876         /* ext */ 0,
13877         /* opcode */ XCB_RECOLOR_CURSOR,
13878         /* isvoid */ 1
13879     };
13880 
13881     struct iovec xcb_parts[4];
13882     xcb_void_cookie_t xcb_ret;
13883     xcb_recolor_cursor_request_t xcb_out;
13884 
13885     xcb_out.pad0 = 0;
13886     xcb_out.cursor = cursor;
13887     xcb_out.fore_red = fore_red;
13888     xcb_out.fore_green = fore_green;
13889     xcb_out.fore_blue = fore_blue;
13890     xcb_out.back_red = back_red;
13891     xcb_out.back_green = back_green;
13892     xcb_out.back_blue = back_blue;
13893 
13894     xcb_parts[2].iov_base = (char *) &xcb_out;
13895     xcb_parts[2].iov_len = sizeof(xcb_out);
13896     xcb_parts[3].iov_base = 0;
13897     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13898 
13899     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
13900     return xcb_ret;
13901 }
13902 
13903 
13904 /*****************************************************************************
13905  **
13906  ** xcb_void_cookie_t xcb_recolor_cursor
13907  **
13908  ** @param xcb_connection_t *c
13909  ** @param xcb_cursor_t      cursor
13910  ** @param uint16_t          fore_red
13911  ** @param uint16_t          fore_green
13912  ** @param uint16_t          fore_blue
13913  ** @param uint16_t          back_red
13914  ** @param uint16_t          back_green
13915  ** @param uint16_t          back_blue
13916  ** @returns xcb_void_cookie_t
13917  **
13918  *****************************************************************************/
13919 
13920 xcb_void_cookie_t
13921 xcb_recolor_cursor (xcb_connection_t *c  /**< */,
13922                     xcb_cursor_t      cursor  /**< */,
13923                     uint16_t          fore_red  /**< */,
13924                     uint16_t          fore_green  /**< */,
13925                     uint16_t          fore_blue  /**< */,
13926                     uint16_t          back_red  /**< */,
13927                     uint16_t          back_green  /**< */,
13928                     uint16_t          back_blue  /**< */)
13929 {
13930     static const xcb_protocol_request_t xcb_req = {
13931         /* count */ 2,
13932         /* ext */ 0,
13933         /* opcode */ XCB_RECOLOR_CURSOR,
13934         /* isvoid */ 1
13935     };
13936 
13937     struct iovec xcb_parts[4];
13938     xcb_void_cookie_t xcb_ret;
13939     xcb_recolor_cursor_request_t xcb_out;
13940 
13941     xcb_out.pad0 = 0;
13942     xcb_out.cursor = cursor;
13943     xcb_out.fore_red = fore_red;
13944     xcb_out.fore_green = fore_green;
13945     xcb_out.fore_blue = fore_blue;
13946     xcb_out.back_red = back_red;
13947     xcb_out.back_green = back_green;
13948     xcb_out.back_blue = back_blue;
13949 
13950     xcb_parts[2].iov_base = (char *) &xcb_out;
13951     xcb_parts[2].iov_len = sizeof(xcb_out);
13952     xcb_parts[3].iov_base = 0;
13953     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
13954 
13955     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
13956     return xcb_ret;
13957 }
13958 
13959 
13960 /*****************************************************************************
13961  **
13962  ** xcb_query_best_size_cookie_t xcb_query_best_size
13963  **
13964  ** @param xcb_connection_t *c
13965  ** @param uint8_t           _class
13966  ** @param xcb_drawable_t    drawable
13967  ** @param uint16_t          width
13968  ** @param uint16_t          height
13969  ** @returns xcb_query_best_size_cookie_t
13970  **
13971  *****************************************************************************/
13972 
13973 xcb_query_best_size_cookie_t
13974 xcb_query_best_size (xcb_connection_t *c  /**< */,
13975                      uint8_t           _class  /**< */,
13976                      xcb_drawable_t    drawable  /**< */,
13977                      uint16_t          width  /**< */,
13978                      uint16_t          height  /**< */)
13979 {
13980     static const xcb_protocol_request_t xcb_req = {
13981         /* count */ 2,
13982         /* ext */ 0,
13983         /* opcode */ XCB_QUERY_BEST_SIZE,
13984         /* isvoid */ 0
13985     };
13986 
13987     struct iovec xcb_parts[4];
13988     xcb_query_best_size_cookie_t xcb_ret;
13989     xcb_query_best_size_request_t xcb_out;
13990 
13991     xcb_out._class = _class;
13992     xcb_out.drawable = drawable;
13993     xcb_out.width = width;
13994     xcb_out.height = height;
13995 
13996     xcb_parts[2].iov_base = (char *) &xcb_out;
13997     xcb_parts[2].iov_len = sizeof(xcb_out);
13998     xcb_parts[3].iov_base = 0;
13999     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14000 
14001     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
14002     return xcb_ret;
14003 }
14004 
14005 
14006 /*****************************************************************************
14007  **
14008  ** xcb_query_best_size_cookie_t xcb_query_best_size_unchecked
14009  **
14010  ** @param xcb_connection_t *c
14011  ** @param uint8_t           _class
14012  ** @param xcb_drawable_t    drawable
14013  ** @param uint16_t          width
14014  ** @param uint16_t          height
14015  ** @returns xcb_query_best_size_cookie_t
14016  **
14017  *****************************************************************************/
14018 
14019 xcb_query_best_size_cookie_t
14020 xcb_query_best_size_unchecked (xcb_connection_t *c  /**< */,
14021                                uint8_t           _class  /**< */,
14022                                xcb_drawable_t    drawable  /**< */,
14023                                uint16_t          width  /**< */,
14024                                uint16_t          height  /**< */)
14025 {
14026     static const xcb_protocol_request_t xcb_req = {
14027         /* count */ 2,
14028         /* ext */ 0,
14029         /* opcode */ XCB_QUERY_BEST_SIZE,
14030         /* isvoid */ 0
14031     };
14032 
14033     struct iovec xcb_parts[4];
14034     xcb_query_best_size_cookie_t xcb_ret;
14035     xcb_query_best_size_request_t xcb_out;
14036 
14037     xcb_out._class = _class;
14038     xcb_out.drawable = drawable;
14039     xcb_out.width = width;
14040     xcb_out.height = height;
14041 
14042     xcb_parts[2].iov_base = (char *) &xcb_out;
14043     xcb_parts[2].iov_len = sizeof(xcb_out);
14044     xcb_parts[3].iov_base = 0;
14045     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14046 
14047     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
14048     return xcb_ret;
14049 }
14050 
14051 
14052 /*****************************************************************************
14053  **
14054  ** xcb_query_best_size_reply_t * xcb_query_best_size_reply
14055  **
14056  ** @param xcb_connection_t              *c
14057  ** @param xcb_query_best_size_cookie_t   cookie
14058  ** @param xcb_generic_error_t          **e
14059  ** @returns xcb_query_best_size_reply_t *
14060  **
14061  *****************************************************************************/
14062 
14063 xcb_query_best_size_reply_t *
14064 xcb_query_best_size_reply (xcb_connection_t              *c  /**< */,
14065                            xcb_query_best_size_cookie_t   cookie  /**< */,
14066                            xcb_generic_error_t          **e  /**< */)
14067 {
14068     return (xcb_query_best_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
14069 }
14070 
14071 int
14072 xcb_query_extension_sizeof (const void  *_buffer  /**< */)
14073 {
14074     char *xcb_tmp = (char *)_buffer;
14075     const xcb_query_extension_request_t *_aux = (xcb_query_extension_request_t *)_buffer;
14076     unsigned int xcb_buffer_len = 0;
14077     unsigned int xcb_block_len = 0;
14078     unsigned int xcb_pad = 0;
14079     unsigned int xcb_align_to = 0;
14080 
14081 
14082     xcb_block_len += sizeof(xcb_query_extension_request_t);
14083     xcb_tmp += xcb_block_len;
14084     xcb_buffer_len += xcb_block_len;
14085     xcb_block_len = 0;
14086     /* name */
14087     xcb_block_len += _aux->name_len * sizeof(char);
14088     xcb_tmp += xcb_block_len;
14089     xcb_align_to = ALIGNOF(char);
14090     /* insert padding */
14091     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14092     xcb_buffer_len += xcb_block_len + xcb_pad;
14093     if (0 != xcb_pad) {
14094         xcb_tmp += xcb_pad;
14095         xcb_pad = 0;
14096     }
14097     xcb_block_len = 0;
14098 
14099     return xcb_buffer_len;
14100 }
14101 
14102 
14103 /*****************************************************************************
14104  **
14105  ** xcb_query_extension_cookie_t xcb_query_extension
14106  **
14107  ** @param xcb_connection_t *c
14108  ** @param uint16_t          name_len
14109  ** @param const char       *name
14110  ** @returns xcb_query_extension_cookie_t
14111  **
14112  *****************************************************************************/
14113 
14114 xcb_query_extension_cookie_t
14115 xcb_query_extension (xcb_connection_t *c  /**< */,
14116                      uint16_t          name_len  /**< */,
14117                      const char       *name  /**< */)
14118 {
14119     static const xcb_protocol_request_t xcb_req = {
14120         /* count */ 4,
14121         /* ext */ 0,
14122         /* opcode */ XCB_QUERY_EXTENSION,
14123         /* isvoid */ 0
14124     };
14125 
14126     struct iovec xcb_parts[6];
14127     xcb_query_extension_cookie_t xcb_ret;
14128     xcb_query_extension_request_t xcb_out;
14129 
14130     xcb_out.pad0 = 0;
14131     xcb_out.name_len = name_len;
14132     memset(xcb_out.pad1, 0, 2);
14133 
14134     xcb_parts[2].iov_base = (char *) &xcb_out;
14135     xcb_parts[2].iov_len = sizeof(xcb_out);
14136     xcb_parts[3].iov_base = 0;
14137     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14138     /* char name */
14139     xcb_parts[4].iov_base = (char *) name;
14140     xcb_parts[4].iov_len = name_len * sizeof(char);
14141     xcb_parts[5].iov_base = 0;
14142     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
14143 
14144     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
14145     return xcb_ret;
14146 }
14147 
14148 
14149 /*****************************************************************************
14150  **
14151  ** xcb_query_extension_cookie_t xcb_query_extension_unchecked
14152  **
14153  ** @param xcb_connection_t *c
14154  ** @param uint16_t          name_len
14155  ** @param const char       *name
14156  ** @returns xcb_query_extension_cookie_t
14157  **
14158  *****************************************************************************/
14159 
14160 xcb_query_extension_cookie_t
14161 xcb_query_extension_unchecked (xcb_connection_t *c  /**< */,
14162                                uint16_t          name_len  /**< */,
14163                                const char       *name  /**< */)
14164 {
14165     static const xcb_protocol_request_t xcb_req = {
14166         /* count */ 4,
14167         /* ext */ 0,
14168         /* opcode */ XCB_QUERY_EXTENSION,
14169         /* isvoid */ 0
14170     };
14171 
14172     struct iovec xcb_parts[6];
14173     xcb_query_extension_cookie_t xcb_ret;
14174     xcb_query_extension_request_t xcb_out;
14175 
14176     xcb_out.pad0 = 0;
14177     xcb_out.name_len = name_len;
14178     memset(xcb_out.pad1, 0, 2);
14179 
14180     xcb_parts[2].iov_base = (char *) &xcb_out;
14181     xcb_parts[2].iov_len = sizeof(xcb_out);
14182     xcb_parts[3].iov_base = 0;
14183     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14184     /* char name */
14185     xcb_parts[4].iov_base = (char *) name;
14186     xcb_parts[4].iov_len = name_len * sizeof(char);
14187     xcb_parts[5].iov_base = 0;
14188     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
14189 
14190     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
14191     return xcb_ret;
14192 }
14193 
14194 
14195 /*****************************************************************************
14196  **
14197  ** xcb_query_extension_reply_t * xcb_query_extension_reply
14198  **
14199  ** @param xcb_connection_t              *c
14200  ** @param xcb_query_extension_cookie_t   cookie
14201  ** @param xcb_generic_error_t          **e
14202  ** @returns xcb_query_extension_reply_t *
14203  **
14204  *****************************************************************************/
14205 
14206 xcb_query_extension_reply_t *
14207 xcb_query_extension_reply (xcb_connection_t              *c  /**< */,
14208                            xcb_query_extension_cookie_t   cookie  /**< */,
14209                            xcb_generic_error_t          **e  /**< */)
14210 {
14211     return (xcb_query_extension_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
14212 }
14213 
14214 int
14215 xcb_list_extensions_sizeof (const void  *_buffer  /**< */)
14216 {
14217     char *xcb_tmp = (char *)_buffer;
14218     const xcb_list_extensions_reply_t *_aux = (xcb_list_extensions_reply_t *)_buffer;
14219     unsigned int xcb_buffer_len = 0;
14220     unsigned int xcb_block_len = 0;
14221     unsigned int xcb_pad = 0;
14222     unsigned int xcb_align_to = 0;
14223 
14224     unsigned int i;
14225     unsigned int xcb_tmp_len;
14226 
14227     xcb_block_len += sizeof(xcb_list_extensions_reply_t);
14228     xcb_tmp += xcb_block_len;
14229     xcb_buffer_len += xcb_block_len;
14230     xcb_block_len = 0;
14231     /* names */
14232     for(i=0; i<_aux->names_len; i++) {
14233         xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
14234         xcb_block_len += xcb_tmp_len;
14235         xcb_tmp += xcb_tmp_len;
14236     }
14237     xcb_align_to = ALIGNOF(xcb_str_t);
14238     /* insert padding */
14239     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14240     xcb_buffer_len += xcb_block_len + xcb_pad;
14241     if (0 != xcb_pad) {
14242         xcb_tmp += xcb_pad;
14243         xcb_pad = 0;
14244     }
14245     xcb_block_len = 0;
14246 
14247     return xcb_buffer_len;
14248 }
14249 
14250 
14251 /*****************************************************************************
14252  **
14253  ** xcb_list_extensions_cookie_t xcb_list_extensions
14254  **
14255  ** @param xcb_connection_t *c
14256  ** @returns xcb_list_extensions_cookie_t
14257  **
14258  *****************************************************************************/
14259 
14260 xcb_list_extensions_cookie_t
14261 xcb_list_extensions (xcb_connection_t *c  /**< */)
14262 {
14263     static const xcb_protocol_request_t xcb_req = {
14264         /* count */ 2,
14265         /* ext */ 0,
14266         /* opcode */ XCB_LIST_EXTENSIONS,
14267         /* isvoid */ 0
14268     };
14269 
14270     struct iovec xcb_parts[4];
14271     xcb_list_extensions_cookie_t xcb_ret;
14272     xcb_list_extensions_request_t xcb_out;
14273 
14274     xcb_out.pad0 = 0;
14275 
14276     xcb_parts[2].iov_base = (char *) &xcb_out;
14277     xcb_parts[2].iov_len = sizeof(xcb_out);
14278     xcb_parts[3].iov_base = 0;
14279     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14280 
14281     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
14282     return xcb_ret;
14283 }
14284 
14285 
14286 /*****************************************************************************
14287  **
14288  ** xcb_list_extensions_cookie_t xcb_list_extensions_unchecked
14289  **
14290  ** @param xcb_connection_t *c
14291  ** @returns xcb_list_extensions_cookie_t
14292  **
14293  *****************************************************************************/
14294 
14295 xcb_list_extensions_cookie_t
14296 xcb_list_extensions_unchecked (xcb_connection_t *c  /**< */)
14297 {
14298     static const xcb_protocol_request_t xcb_req = {
14299         /* count */ 2,
14300         /* ext */ 0,
14301         /* opcode */ XCB_LIST_EXTENSIONS,
14302         /* isvoid */ 0
14303     };
14304 
14305     struct iovec xcb_parts[4];
14306     xcb_list_extensions_cookie_t xcb_ret;
14307     xcb_list_extensions_request_t xcb_out;
14308 
14309     xcb_out.pad0 = 0;
14310 
14311     xcb_parts[2].iov_base = (char *) &xcb_out;
14312     xcb_parts[2].iov_len = sizeof(xcb_out);
14313     xcb_parts[3].iov_base = 0;
14314     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14315 
14316     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
14317     return xcb_ret;
14318 }
14319 
14320 
14321 /*****************************************************************************
14322  **
14323  ** int xcb_list_extensions_names_length
14324  **
14325  ** @param const xcb_list_extensions_reply_t *R
14326  ** @returns int
14327  **
14328  *****************************************************************************/
14329 
14330 int
14331 xcb_list_extensions_names_length (const xcb_list_extensions_reply_t *R  /**< */)
14332 {
14333     return R->names_len;
14334 }
14335 
14336 
14337 /*****************************************************************************
14338  **
14339  ** xcb_str_iterator_t xcb_list_extensions_names_iterator
14340  **
14341  ** @param const xcb_list_extensions_reply_t *R
14342  ** @returns xcb_str_iterator_t
14343  **
14344  *****************************************************************************/
14345 
14346 xcb_str_iterator_t
14347 xcb_list_extensions_names_iterator (const xcb_list_extensions_reply_t *R  /**< */)
14348 {
14349     xcb_str_iterator_t i;
14350     i.data = (xcb_str_t *) (R + 1);
14351     i.rem = R->names_len;
14352     i.index = (char *) i.data - (char *) R;
14353     return i;
14354 }
14355 
14356 
14357 /*****************************************************************************
14358  **
14359  ** xcb_list_extensions_reply_t * xcb_list_extensions_reply
14360  **
14361  ** @param xcb_connection_t              *c
14362  ** @param xcb_list_extensions_cookie_t   cookie
14363  ** @param xcb_generic_error_t          **e
14364  ** @returns xcb_list_extensions_reply_t *
14365  **
14366  *****************************************************************************/
14367 
14368 xcb_list_extensions_reply_t *
14369 xcb_list_extensions_reply (xcb_connection_t              *c  /**< */,
14370                            xcb_list_extensions_cookie_t   cookie  /**< */,
14371                            xcb_generic_error_t          **e  /**< */)
14372 {
14373     return (xcb_list_extensions_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
14374 }
14375 
14376 int
14377 xcb_change_keyboard_mapping_sizeof (const void  *_buffer  /**< */)
14378 {
14379     char *xcb_tmp = (char *)_buffer;
14380     const xcb_change_keyboard_mapping_request_t *_aux = (xcb_change_keyboard_mapping_request_t *)_buffer;
14381     unsigned int xcb_buffer_len = 0;
14382     unsigned int xcb_block_len = 0;
14383     unsigned int xcb_pad = 0;
14384     unsigned int xcb_align_to = 0;
14385 
14386 
14387     xcb_block_len += sizeof(xcb_change_keyboard_mapping_request_t);
14388     xcb_tmp += xcb_block_len;
14389     xcb_buffer_len += xcb_block_len;
14390     xcb_block_len = 0;
14391     /* keysyms */
14392     xcb_block_len += (_aux->keycode_count * _aux->keysyms_per_keycode) * sizeof(xcb_keysym_t);
14393     xcb_tmp += xcb_block_len;
14394     xcb_align_to = ALIGNOF(xcb_keysym_t);
14395     /* insert padding */
14396     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14397     xcb_buffer_len += xcb_block_len + xcb_pad;
14398     if (0 != xcb_pad) {
14399         xcb_tmp += xcb_pad;
14400         xcb_pad = 0;
14401     }
14402     xcb_block_len = 0;
14403 
14404     return xcb_buffer_len;
14405 }
14406 
14407 
14408 /*****************************************************************************
14409  **
14410  ** xcb_void_cookie_t xcb_change_keyboard_mapping_checked
14411  **
14412  ** @param xcb_connection_t   *c
14413  ** @param uint8_t             keycode_count
14414  ** @param xcb_keycode_t       first_keycode
14415  ** @param uint8_t             keysyms_per_keycode
14416  ** @param const xcb_keysym_t *keysyms
14417  ** @returns xcb_void_cookie_t
14418  **
14419  *****************************************************************************/
14420 
14421 xcb_void_cookie_t
14422 xcb_change_keyboard_mapping_checked (xcb_connection_t   *c  /**< */,
14423                                      uint8_t             keycode_count  /**< */,
14424                                      xcb_keycode_t       first_keycode  /**< */,
14425                                      uint8_t             keysyms_per_keycode  /**< */,
14426                                      const xcb_keysym_t *keysyms  /**< */)
14427 {
14428     static const xcb_protocol_request_t xcb_req = {
14429         /* count */ 4,
14430         /* ext */ 0,
14431         /* opcode */ XCB_CHANGE_KEYBOARD_MAPPING,
14432         /* isvoid */ 1
14433     };
14434 
14435     struct iovec xcb_parts[6];
14436     xcb_void_cookie_t xcb_ret;
14437     xcb_change_keyboard_mapping_request_t xcb_out;
14438 
14439     xcb_out.keycode_count = keycode_count;
14440     xcb_out.first_keycode = first_keycode;
14441     xcb_out.keysyms_per_keycode = keysyms_per_keycode;
14442     memset(xcb_out.pad0, 0, 2);
14443 
14444     xcb_parts[2].iov_base = (char *) &xcb_out;
14445     xcb_parts[2].iov_len = sizeof(xcb_out);
14446     xcb_parts[3].iov_base = 0;
14447     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14448     /* xcb_keysym_t keysyms */
14449     xcb_parts[4].iov_base = (char *) keysyms;
14450     xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t);
14451     xcb_parts[5].iov_base = 0;
14452     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
14453 
14454     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
14455     return xcb_ret;
14456 }
14457 
14458 
14459 /*****************************************************************************
14460  **
14461  ** xcb_void_cookie_t xcb_change_keyboard_mapping
14462  **
14463  ** @param xcb_connection_t   *c
14464  ** @param uint8_t             keycode_count
14465  ** @param xcb_keycode_t       first_keycode
14466  ** @param uint8_t             keysyms_per_keycode
14467  ** @param const xcb_keysym_t *keysyms
14468  ** @returns xcb_void_cookie_t
14469  **
14470  *****************************************************************************/
14471 
14472 xcb_void_cookie_t
14473 xcb_change_keyboard_mapping (xcb_connection_t   *c  /**< */,
14474                              uint8_t             keycode_count  /**< */,
14475                              xcb_keycode_t       first_keycode  /**< */,
14476                              uint8_t             keysyms_per_keycode  /**< */,
14477                              const xcb_keysym_t *keysyms  /**< */)
14478 {
14479     static const xcb_protocol_request_t xcb_req = {
14480         /* count */ 4,
14481         /* ext */ 0,
14482         /* opcode */ XCB_CHANGE_KEYBOARD_MAPPING,
14483         /* isvoid */ 1
14484     };
14485 
14486     struct iovec xcb_parts[6];
14487     xcb_void_cookie_t xcb_ret;
14488     xcb_change_keyboard_mapping_request_t xcb_out;
14489 
14490     xcb_out.keycode_count = keycode_count;
14491     xcb_out.first_keycode = first_keycode;
14492     xcb_out.keysyms_per_keycode = keysyms_per_keycode;
14493     memset(xcb_out.pad0, 0, 2);
14494 
14495     xcb_parts[2].iov_base = (char *) &xcb_out;
14496     xcb_parts[2].iov_len = sizeof(xcb_out);
14497     xcb_parts[3].iov_base = 0;
14498     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14499     /* xcb_keysym_t keysyms */
14500     xcb_parts[4].iov_base = (char *) keysyms;
14501     xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t);
14502     xcb_parts[5].iov_base = 0;
14503     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
14504 
14505     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
14506     return xcb_ret;
14507 }
14508 
14509 int
14510 xcb_get_keyboard_mapping_sizeof (const void  *_buffer  /**< */)
14511 {
14512     char *xcb_tmp = (char *)_buffer;
14513     const xcb_get_keyboard_mapping_reply_t *_aux = (xcb_get_keyboard_mapping_reply_t *)_buffer;
14514     unsigned int xcb_buffer_len = 0;
14515     unsigned int xcb_block_len = 0;
14516     unsigned int xcb_pad = 0;
14517     unsigned int xcb_align_to = 0;
14518 
14519 
14520     xcb_block_len += sizeof(xcb_get_keyboard_mapping_reply_t);
14521     xcb_tmp += xcb_block_len;
14522     xcb_buffer_len += xcb_block_len;
14523     xcb_block_len = 0;
14524     /* keysyms */
14525     xcb_block_len += _aux->length * sizeof(xcb_keysym_t);
14526     xcb_tmp += xcb_block_len;
14527     xcb_align_to = ALIGNOF(xcb_keysym_t);
14528     /* insert padding */
14529     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14530     xcb_buffer_len += xcb_block_len + xcb_pad;
14531     if (0 != xcb_pad) {
14532         xcb_tmp += xcb_pad;
14533         xcb_pad = 0;
14534     }
14535     xcb_block_len = 0;
14536 
14537     return xcb_buffer_len;
14538 }
14539 
14540 
14541 /*****************************************************************************
14542  **
14543  ** xcb_get_keyboard_mapping_cookie_t xcb_get_keyboard_mapping
14544  **
14545  ** @param xcb_connection_t *c
14546  ** @param xcb_keycode_t     first_keycode
14547  ** @param uint8_t           count
14548  ** @returns xcb_get_keyboard_mapping_cookie_t
14549  **
14550  *****************************************************************************/
14551 
14552 xcb_get_keyboard_mapping_cookie_t
14553 xcb_get_keyboard_mapping (xcb_connection_t *c  /**< */,
14554                           xcb_keycode_t     first_keycode  /**< */,
14555                           uint8_t           count  /**< */)
14556 {
14557     static const xcb_protocol_request_t xcb_req = {
14558         /* count */ 2,
14559         /* ext */ 0,
14560         /* opcode */ XCB_GET_KEYBOARD_MAPPING,
14561         /* isvoid */ 0
14562     };
14563 
14564     struct iovec xcb_parts[4];
14565     xcb_get_keyboard_mapping_cookie_t xcb_ret;
14566     xcb_get_keyboard_mapping_request_t xcb_out;
14567 
14568     xcb_out.pad0 = 0;
14569     xcb_out.first_keycode = first_keycode;
14570     xcb_out.count = count;
14571 
14572     xcb_parts[2].iov_base = (char *) &xcb_out;
14573     xcb_parts[2].iov_len = sizeof(xcb_out);
14574     xcb_parts[3].iov_base = 0;
14575     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14576 
14577     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
14578     return xcb_ret;
14579 }
14580 
14581 
14582 /*****************************************************************************
14583  **
14584  ** xcb_get_keyboard_mapping_cookie_t xcb_get_keyboard_mapping_unchecked
14585  **
14586  ** @param xcb_connection_t *c
14587  ** @param xcb_keycode_t     first_keycode
14588  ** @param uint8_t           count
14589  ** @returns xcb_get_keyboard_mapping_cookie_t
14590  **
14591  *****************************************************************************/
14592 
14593 xcb_get_keyboard_mapping_cookie_t
14594 xcb_get_keyboard_mapping_unchecked (xcb_connection_t *c  /**< */,
14595                                     xcb_keycode_t     first_keycode  /**< */,
14596                                     uint8_t           count  /**< */)
14597 {
14598     static const xcb_protocol_request_t xcb_req = {
14599         /* count */ 2,
14600         /* ext */ 0,
14601         /* opcode */ XCB_GET_KEYBOARD_MAPPING,
14602         /* isvoid */ 0
14603     };
14604 
14605     struct iovec xcb_parts[4];
14606     xcb_get_keyboard_mapping_cookie_t xcb_ret;
14607     xcb_get_keyboard_mapping_request_t xcb_out;
14608 
14609     xcb_out.pad0 = 0;
14610     xcb_out.first_keycode = first_keycode;
14611     xcb_out.count = count;
14612 
14613     xcb_parts[2].iov_base = (char *) &xcb_out;
14614     xcb_parts[2].iov_len = sizeof(xcb_out);
14615     xcb_parts[3].iov_base = 0;
14616     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14617 
14618     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
14619     return xcb_ret;
14620 }
14621 
14622 
14623 /*****************************************************************************
14624  **
14625  ** xcb_keysym_t * xcb_get_keyboard_mapping_keysyms
14626  **
14627  ** @param const xcb_get_keyboard_mapping_reply_t *R
14628  ** @returns xcb_keysym_t *
14629  **
14630  *****************************************************************************/
14631 
14632 xcb_keysym_t *
14633 xcb_get_keyboard_mapping_keysyms (const xcb_get_keyboard_mapping_reply_t *R  /**< */)
14634 {
14635     return (xcb_keysym_t *) (R + 1);
14636 }
14637 
14638 
14639 /*****************************************************************************
14640  **
14641  ** int xcb_get_keyboard_mapping_keysyms_length
14642  **
14643  ** @param const xcb_get_keyboard_mapping_reply_t *R
14644  ** @returns int
14645  **
14646  *****************************************************************************/
14647 
14648 int
14649 xcb_get_keyboard_mapping_keysyms_length (const xcb_get_keyboard_mapping_reply_t *R  /**< */)
14650 {
14651     return R->length;
14652 }
14653 
14654 
14655 /*****************************************************************************
14656  **
14657  ** xcb_generic_iterator_t xcb_get_keyboard_mapping_keysyms_end
14658  **
14659  ** @param const xcb_get_keyboard_mapping_reply_t *R
14660  ** @returns xcb_generic_iterator_t
14661  **
14662  *****************************************************************************/
14663 
14664 xcb_generic_iterator_t
14665 xcb_get_keyboard_mapping_keysyms_end (const xcb_get_keyboard_mapping_reply_t *R  /**< */)
14666 {
14667     xcb_generic_iterator_t i;
14668     i.data = ((xcb_keysym_t *) (R + 1)) + (R->length);
14669     i.rem = 0;
14670     i.index = (char *) i.data - (char *) R;
14671     return i;
14672 }
14673 
14674 
14675 /*****************************************************************************
14676  **
14677  ** xcb_get_keyboard_mapping_reply_t * xcb_get_keyboard_mapping_reply
14678  **
14679  ** @param xcb_connection_t                   *c
14680  ** @param xcb_get_keyboard_mapping_cookie_t   cookie
14681  ** @param xcb_generic_error_t               **e
14682  ** @returns xcb_get_keyboard_mapping_reply_t *
14683  **
14684  *****************************************************************************/
14685 
14686 xcb_get_keyboard_mapping_reply_t *
14687 xcb_get_keyboard_mapping_reply (xcb_connection_t                   *c  /**< */,
14688                                 xcb_get_keyboard_mapping_cookie_t   cookie  /**< */,
14689                                 xcb_generic_error_t               **e  /**< */)
14690 {
14691     return (xcb_get_keyboard_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
14692 }
14693 
14694 int
14695 xcb_change_keyboard_control_sizeof (const void  *_buffer  /**< */)
14696 {
14697     char *xcb_tmp = (char *)_buffer;
14698     const xcb_change_keyboard_control_request_t *_aux = (xcb_change_keyboard_control_request_t *)_buffer;
14699     unsigned int xcb_buffer_len = 0;
14700     unsigned int xcb_block_len = 0;
14701     unsigned int xcb_pad = 0;
14702     unsigned int xcb_align_to = 0;
14703 
14704 
14705     xcb_block_len += sizeof(xcb_change_keyboard_control_request_t);
14706     xcb_tmp += xcb_block_len;
14707     xcb_buffer_len += xcb_block_len;
14708     xcb_block_len = 0;
14709     /* value_list */
14710     xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
14711     xcb_tmp += xcb_block_len;
14712     xcb_align_to = ALIGNOF(uint32_t);
14713     /* insert padding */
14714     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14715     xcb_buffer_len += xcb_block_len + xcb_pad;
14716     if (0 != xcb_pad) {
14717         xcb_tmp += xcb_pad;
14718         xcb_pad = 0;
14719     }
14720     xcb_block_len = 0;
14721 
14722     return xcb_buffer_len;
14723 }
14724 
14725 
14726 /*****************************************************************************
14727  **
14728  ** xcb_void_cookie_t xcb_change_keyboard_control_checked
14729  **
14730  ** @param xcb_connection_t *c
14731  ** @param uint32_t          value_mask
14732  ** @param const uint32_t   *value_list
14733  ** @returns xcb_void_cookie_t
14734  **
14735  *****************************************************************************/
14736 
14737 xcb_void_cookie_t
14738 xcb_change_keyboard_control_checked (xcb_connection_t *c  /**< */,
14739                                      uint32_t          value_mask  /**< */,
14740                                      const uint32_t   *value_list  /**< */)
14741 {
14742     static const xcb_protocol_request_t xcb_req = {
14743         /* count */ 4,
14744         /* ext */ 0,
14745         /* opcode */ XCB_CHANGE_KEYBOARD_CONTROL,
14746         /* isvoid */ 1
14747     };
14748 
14749     struct iovec xcb_parts[6];
14750     xcb_void_cookie_t xcb_ret;
14751     xcb_change_keyboard_control_request_t xcb_out;
14752 
14753     xcb_out.pad0 = 0;
14754     xcb_out.value_mask = value_mask;
14755 
14756     xcb_parts[2].iov_base = (char *) &xcb_out;
14757     xcb_parts[2].iov_len = sizeof(xcb_out);
14758     xcb_parts[3].iov_base = 0;
14759     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14760     /* uint32_t value_list */
14761     xcb_parts[4].iov_base = (char *) value_list;
14762     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
14763     xcb_parts[5].iov_base = 0;
14764     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
14765 
14766     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
14767     return xcb_ret;
14768 }
14769 
14770 
14771 /*****************************************************************************
14772  **
14773  ** xcb_void_cookie_t xcb_change_keyboard_control
14774  **
14775  ** @param xcb_connection_t *c
14776  ** @param uint32_t          value_mask
14777  ** @param const uint32_t   *value_list
14778  ** @returns xcb_void_cookie_t
14779  **
14780  *****************************************************************************/
14781 
14782 xcb_void_cookie_t
14783 xcb_change_keyboard_control (xcb_connection_t *c  /**< */,
14784                              uint32_t          value_mask  /**< */,
14785                              const uint32_t   *value_list  /**< */)
14786 {
14787     static const xcb_protocol_request_t xcb_req = {
14788         /* count */ 4,
14789         /* ext */ 0,
14790         /* opcode */ XCB_CHANGE_KEYBOARD_CONTROL,
14791         /* isvoid */ 1
14792     };
14793 
14794     struct iovec xcb_parts[6];
14795     xcb_void_cookie_t xcb_ret;
14796     xcb_change_keyboard_control_request_t xcb_out;
14797 
14798     xcb_out.pad0 = 0;
14799     xcb_out.value_mask = value_mask;
14800 
14801     xcb_parts[2].iov_base = (char *) &xcb_out;
14802     xcb_parts[2].iov_len = sizeof(xcb_out);
14803     xcb_parts[3].iov_base = 0;
14804     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14805     /* uint32_t value_list */
14806     xcb_parts[4].iov_base = (char *) value_list;
14807     xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
14808     xcb_parts[5].iov_base = 0;
14809     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
14810 
14811     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
14812     return xcb_ret;
14813 }
14814 
14815 
14816 /*****************************************************************************
14817  **
14818  ** xcb_get_keyboard_control_cookie_t xcb_get_keyboard_control
14819  **
14820  ** @param xcb_connection_t *c
14821  ** @returns xcb_get_keyboard_control_cookie_t
14822  **
14823  *****************************************************************************/
14824 
14825 xcb_get_keyboard_control_cookie_t
14826 xcb_get_keyboard_control (xcb_connection_t *c  /**< */)
14827 {
14828     static const xcb_protocol_request_t xcb_req = {
14829         /* count */ 2,
14830         /* ext */ 0,
14831         /* opcode */ XCB_GET_KEYBOARD_CONTROL,
14832         /* isvoid */ 0
14833     };
14834 
14835     struct iovec xcb_parts[4];
14836     xcb_get_keyboard_control_cookie_t xcb_ret;
14837     xcb_get_keyboard_control_request_t xcb_out;
14838 
14839     xcb_out.pad0 = 0;
14840 
14841     xcb_parts[2].iov_base = (char *) &xcb_out;
14842     xcb_parts[2].iov_len = sizeof(xcb_out);
14843     xcb_parts[3].iov_base = 0;
14844     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14845 
14846     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
14847     return xcb_ret;
14848 }
14849 
14850 
14851 /*****************************************************************************
14852  **
14853  ** xcb_get_keyboard_control_cookie_t xcb_get_keyboard_control_unchecked
14854  **
14855  ** @param xcb_connection_t *c
14856  ** @returns xcb_get_keyboard_control_cookie_t
14857  **
14858  *****************************************************************************/
14859 
14860 xcb_get_keyboard_control_cookie_t
14861 xcb_get_keyboard_control_unchecked (xcb_connection_t *c  /**< */)
14862 {
14863     static const xcb_protocol_request_t xcb_req = {
14864         /* count */ 2,
14865         /* ext */ 0,
14866         /* opcode */ XCB_GET_KEYBOARD_CONTROL,
14867         /* isvoid */ 0
14868     };
14869 
14870     struct iovec xcb_parts[4];
14871     xcb_get_keyboard_control_cookie_t xcb_ret;
14872     xcb_get_keyboard_control_request_t xcb_out;
14873 
14874     xcb_out.pad0 = 0;
14875 
14876     xcb_parts[2].iov_base = (char *) &xcb_out;
14877     xcb_parts[2].iov_len = sizeof(xcb_out);
14878     xcb_parts[3].iov_base = 0;
14879     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14880 
14881     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
14882     return xcb_ret;
14883 }
14884 
14885 
14886 /*****************************************************************************
14887  **
14888  ** xcb_get_keyboard_control_reply_t * xcb_get_keyboard_control_reply
14889  **
14890  ** @param xcb_connection_t                   *c
14891  ** @param xcb_get_keyboard_control_cookie_t   cookie
14892  ** @param xcb_generic_error_t               **e
14893  ** @returns xcb_get_keyboard_control_reply_t *
14894  **
14895  *****************************************************************************/
14896 
14897 xcb_get_keyboard_control_reply_t *
14898 xcb_get_keyboard_control_reply (xcb_connection_t                   *c  /**< */,
14899                                 xcb_get_keyboard_control_cookie_t   cookie  /**< */,
14900                                 xcb_generic_error_t               **e  /**< */)
14901 {
14902     return (xcb_get_keyboard_control_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
14903 }
14904 
14905 
14906 /*****************************************************************************
14907  **
14908  ** xcb_void_cookie_t xcb_bell_checked
14909  **
14910  ** @param xcb_connection_t *c
14911  ** @param int8_t            percent
14912  ** @returns xcb_void_cookie_t
14913  **
14914  *****************************************************************************/
14915 
14916 xcb_void_cookie_t
14917 xcb_bell_checked (xcb_connection_t *c  /**< */,
14918                   int8_t            percent  /**< */)
14919 {
14920     static const xcb_protocol_request_t xcb_req = {
14921         /* count */ 2,
14922         /* ext */ 0,
14923         /* opcode */ XCB_BELL,
14924         /* isvoid */ 1
14925     };
14926 
14927     struct iovec xcb_parts[4];
14928     xcb_void_cookie_t xcb_ret;
14929     xcb_bell_request_t xcb_out;
14930 
14931     xcb_out.percent = percent;
14932 
14933     xcb_parts[2].iov_base = (char *) &xcb_out;
14934     xcb_parts[2].iov_len = sizeof(xcb_out);
14935     xcb_parts[3].iov_base = 0;
14936     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14937 
14938     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
14939     return xcb_ret;
14940 }
14941 
14942 
14943 /*****************************************************************************
14944  **
14945  ** xcb_void_cookie_t xcb_bell
14946  **
14947  ** @param xcb_connection_t *c
14948  ** @param int8_t            percent
14949  ** @returns xcb_void_cookie_t
14950  **
14951  *****************************************************************************/
14952 
14953 xcb_void_cookie_t
14954 xcb_bell (xcb_connection_t *c  /**< */,
14955           int8_t            percent  /**< */)
14956 {
14957     static const xcb_protocol_request_t xcb_req = {
14958         /* count */ 2,
14959         /* ext */ 0,
14960         /* opcode */ XCB_BELL,
14961         /* isvoid */ 1
14962     };
14963 
14964     struct iovec xcb_parts[4];
14965     xcb_void_cookie_t xcb_ret;
14966     xcb_bell_request_t xcb_out;
14967 
14968     xcb_out.percent = percent;
14969 
14970     xcb_parts[2].iov_base = (char *) &xcb_out;
14971     xcb_parts[2].iov_len = sizeof(xcb_out);
14972     xcb_parts[3].iov_base = 0;
14973     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
14974 
14975     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
14976     return xcb_ret;
14977 }
14978 
14979 
14980 /*****************************************************************************
14981  **
14982  ** xcb_void_cookie_t xcb_change_pointer_control_checked
14983  **
14984  ** @param xcb_connection_t *c
14985  ** @param int16_t           acceleration_numerator
14986  ** @param int16_t           acceleration_denominator
14987  ** @param int16_t           threshold
14988  ** @param uint8_t           do_acceleration
14989  ** @param uint8_t           do_threshold
14990  ** @returns xcb_void_cookie_t
14991  **
14992  *****************************************************************************/
14993 
14994 xcb_void_cookie_t
14995 xcb_change_pointer_control_checked (xcb_connection_t *c  /**< */,
14996                                     int16_t           acceleration_numerator  /**< */,
14997                                     int16_t           acceleration_denominator  /**< */,
14998                                     int16_t           threshold  /**< */,
14999                                     uint8_t           do_acceleration  /**< */,
15000                                     uint8_t           do_threshold  /**< */)
15001 {
15002     static const xcb_protocol_request_t xcb_req = {
15003         /* count */ 2,
15004         /* ext */ 0,
15005         /* opcode */ XCB_CHANGE_POINTER_CONTROL,
15006         /* isvoid */ 1
15007     };
15008 
15009     struct iovec xcb_parts[4];
15010     xcb_void_cookie_t xcb_ret;
15011     xcb_change_pointer_control_request_t xcb_out;
15012 
15013     xcb_out.pad0 = 0;
15014     xcb_out.acceleration_numerator = acceleration_numerator;
15015     xcb_out.acceleration_denominator = acceleration_denominator;
15016     xcb_out.threshold = threshold;
15017     xcb_out.do_acceleration = do_acceleration;
15018     xcb_out.do_threshold = do_threshold;
15019 
15020     xcb_parts[2].iov_base = (char *) &xcb_out;
15021     xcb_parts[2].iov_len = sizeof(xcb_out);
15022     xcb_parts[3].iov_base = 0;
15023     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15024 
15025     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15026     return xcb_ret;
15027 }
15028 
15029 
15030 /*****************************************************************************
15031  **
15032  ** xcb_void_cookie_t xcb_change_pointer_control
15033  **
15034  ** @param xcb_connection_t *c
15035  ** @param int16_t           acceleration_numerator
15036  ** @param int16_t           acceleration_denominator
15037  ** @param int16_t           threshold
15038  ** @param uint8_t           do_acceleration
15039  ** @param uint8_t           do_threshold
15040  ** @returns xcb_void_cookie_t
15041  **
15042  *****************************************************************************/
15043 
15044 xcb_void_cookie_t
15045 xcb_change_pointer_control (xcb_connection_t *c  /**< */,
15046                             int16_t           acceleration_numerator  /**< */,
15047                             int16_t           acceleration_denominator  /**< */,
15048                             int16_t           threshold  /**< */,
15049                             uint8_t           do_acceleration  /**< */,
15050                             uint8_t           do_threshold  /**< */)
15051 {
15052     static const xcb_protocol_request_t xcb_req = {
15053         /* count */ 2,
15054         /* ext */ 0,
15055         /* opcode */ XCB_CHANGE_POINTER_CONTROL,
15056         /* isvoid */ 1
15057     };
15058 
15059     struct iovec xcb_parts[4];
15060     xcb_void_cookie_t xcb_ret;
15061     xcb_change_pointer_control_request_t xcb_out;
15062 
15063     xcb_out.pad0 = 0;
15064     xcb_out.acceleration_numerator = acceleration_numerator;
15065     xcb_out.acceleration_denominator = acceleration_denominator;
15066     xcb_out.threshold = threshold;
15067     xcb_out.do_acceleration = do_acceleration;
15068     xcb_out.do_threshold = do_threshold;
15069 
15070     xcb_parts[2].iov_base = (char *) &xcb_out;
15071     xcb_parts[2].iov_len = sizeof(xcb_out);
15072     xcb_parts[3].iov_base = 0;
15073     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15074 
15075     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15076     return xcb_ret;
15077 }
15078 
15079 
15080 /*****************************************************************************
15081  **
15082  ** xcb_get_pointer_control_cookie_t xcb_get_pointer_control
15083  **
15084  ** @param xcb_connection_t *c
15085  ** @returns xcb_get_pointer_control_cookie_t
15086  **
15087  *****************************************************************************/
15088 
15089 xcb_get_pointer_control_cookie_t
15090 xcb_get_pointer_control (xcb_connection_t *c  /**< */)
15091 {
15092     static const xcb_protocol_request_t xcb_req = {
15093         /* count */ 2,
15094         /* ext */ 0,
15095         /* opcode */ XCB_GET_POINTER_CONTROL,
15096         /* isvoid */ 0
15097     };
15098 
15099     struct iovec xcb_parts[4];
15100     xcb_get_pointer_control_cookie_t xcb_ret;
15101     xcb_get_pointer_control_request_t xcb_out;
15102 
15103     xcb_out.pad0 = 0;
15104 
15105     xcb_parts[2].iov_base = (char *) &xcb_out;
15106     xcb_parts[2].iov_len = sizeof(xcb_out);
15107     xcb_parts[3].iov_base = 0;
15108     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15109 
15110     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15111     return xcb_ret;
15112 }
15113 
15114 
15115 /*****************************************************************************
15116  **
15117  ** xcb_get_pointer_control_cookie_t xcb_get_pointer_control_unchecked
15118  **
15119  ** @param xcb_connection_t *c
15120  ** @returns xcb_get_pointer_control_cookie_t
15121  **
15122  *****************************************************************************/
15123 
15124 xcb_get_pointer_control_cookie_t
15125 xcb_get_pointer_control_unchecked (xcb_connection_t *c  /**< */)
15126 {
15127     static const xcb_protocol_request_t xcb_req = {
15128         /* count */ 2,
15129         /* ext */ 0,
15130         /* opcode */ XCB_GET_POINTER_CONTROL,
15131         /* isvoid */ 0
15132     };
15133 
15134     struct iovec xcb_parts[4];
15135     xcb_get_pointer_control_cookie_t xcb_ret;
15136     xcb_get_pointer_control_request_t xcb_out;
15137 
15138     xcb_out.pad0 = 0;
15139 
15140     xcb_parts[2].iov_base = (char *) &xcb_out;
15141     xcb_parts[2].iov_len = sizeof(xcb_out);
15142     xcb_parts[3].iov_base = 0;
15143     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15144 
15145     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15146     return xcb_ret;
15147 }
15148 
15149 
15150 /*****************************************************************************
15151  **
15152  ** xcb_get_pointer_control_reply_t * xcb_get_pointer_control_reply
15153  **
15154  ** @param xcb_connection_t                  *c
15155  ** @param xcb_get_pointer_control_cookie_t   cookie
15156  ** @param xcb_generic_error_t              **e
15157  ** @returns xcb_get_pointer_control_reply_t *
15158  **
15159  *****************************************************************************/
15160 
15161 xcb_get_pointer_control_reply_t *
15162 xcb_get_pointer_control_reply (xcb_connection_t                  *c  /**< */,
15163                                xcb_get_pointer_control_cookie_t   cookie  /**< */,
15164                                xcb_generic_error_t              **e  /**< */)
15165 {
15166     return (xcb_get_pointer_control_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
15167 }
15168 
15169 
15170 /*****************************************************************************
15171  **
15172  ** xcb_void_cookie_t xcb_set_screen_saver_checked
15173  **
15174  ** @param xcb_connection_t *c
15175  ** @param int16_t           timeout
15176  ** @param int16_t           interval
15177  ** @param uint8_t           prefer_blanking
15178  ** @param uint8_t           allow_exposures
15179  ** @returns xcb_void_cookie_t
15180  **
15181  *****************************************************************************/
15182 
15183 xcb_void_cookie_t
15184 xcb_set_screen_saver_checked (xcb_connection_t *c  /**< */,
15185                               int16_t           timeout  /**< */,
15186                               int16_t           interval  /**< */,
15187                               uint8_t           prefer_blanking  /**< */,
15188                               uint8_t           allow_exposures  /**< */)
15189 {
15190     static const xcb_protocol_request_t xcb_req = {
15191         /* count */ 2,
15192         /* ext */ 0,
15193         /* opcode */ XCB_SET_SCREEN_SAVER,
15194         /* isvoid */ 1
15195     };
15196 
15197     struct iovec xcb_parts[4];
15198     xcb_void_cookie_t xcb_ret;
15199     xcb_set_screen_saver_request_t xcb_out;
15200 
15201     xcb_out.pad0 = 0;
15202     xcb_out.timeout = timeout;
15203     xcb_out.interval = interval;
15204     xcb_out.prefer_blanking = prefer_blanking;
15205     xcb_out.allow_exposures = allow_exposures;
15206 
15207     xcb_parts[2].iov_base = (char *) &xcb_out;
15208     xcb_parts[2].iov_len = sizeof(xcb_out);
15209     xcb_parts[3].iov_base = 0;
15210     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15211 
15212     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15213     return xcb_ret;
15214 }
15215 
15216 
15217 /*****************************************************************************
15218  **
15219  ** xcb_void_cookie_t xcb_set_screen_saver
15220  **
15221  ** @param xcb_connection_t *c
15222  ** @param int16_t           timeout
15223  ** @param int16_t           interval
15224  ** @param uint8_t           prefer_blanking
15225  ** @param uint8_t           allow_exposures
15226  ** @returns xcb_void_cookie_t
15227  **
15228  *****************************************************************************/
15229 
15230 xcb_void_cookie_t
15231 xcb_set_screen_saver (xcb_connection_t *c  /**< */,
15232                       int16_t           timeout  /**< */,
15233                       int16_t           interval  /**< */,
15234                       uint8_t           prefer_blanking  /**< */,
15235                       uint8_t           allow_exposures  /**< */)
15236 {
15237     static const xcb_protocol_request_t xcb_req = {
15238         /* count */ 2,
15239         /* ext */ 0,
15240         /* opcode */ XCB_SET_SCREEN_SAVER,
15241         /* isvoid */ 1
15242     };
15243 
15244     struct iovec xcb_parts[4];
15245     xcb_void_cookie_t xcb_ret;
15246     xcb_set_screen_saver_request_t xcb_out;
15247 
15248     xcb_out.pad0 = 0;
15249     xcb_out.timeout = timeout;
15250     xcb_out.interval = interval;
15251     xcb_out.prefer_blanking = prefer_blanking;
15252     xcb_out.allow_exposures = allow_exposures;
15253 
15254     xcb_parts[2].iov_base = (char *) &xcb_out;
15255     xcb_parts[2].iov_len = sizeof(xcb_out);
15256     xcb_parts[3].iov_base = 0;
15257     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15258 
15259     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15260     return xcb_ret;
15261 }
15262 
15263 
15264 /*****************************************************************************
15265  **
15266  ** xcb_get_screen_saver_cookie_t xcb_get_screen_saver
15267  **
15268  ** @param xcb_connection_t *c
15269  ** @returns xcb_get_screen_saver_cookie_t
15270  **
15271  *****************************************************************************/
15272 
15273 xcb_get_screen_saver_cookie_t
15274 xcb_get_screen_saver (xcb_connection_t *c  /**< */)
15275 {
15276     static const xcb_protocol_request_t xcb_req = {
15277         /* count */ 2,
15278         /* ext */ 0,
15279         /* opcode */ XCB_GET_SCREEN_SAVER,
15280         /* isvoid */ 0
15281     };
15282 
15283     struct iovec xcb_parts[4];
15284     xcb_get_screen_saver_cookie_t xcb_ret;
15285     xcb_get_screen_saver_request_t xcb_out;
15286 
15287     xcb_out.pad0 = 0;
15288 
15289     xcb_parts[2].iov_base = (char *) &xcb_out;
15290     xcb_parts[2].iov_len = sizeof(xcb_out);
15291     xcb_parts[3].iov_base = 0;
15292     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15293 
15294     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15295     return xcb_ret;
15296 }
15297 
15298 
15299 /*****************************************************************************
15300  **
15301  ** xcb_get_screen_saver_cookie_t xcb_get_screen_saver_unchecked
15302  **
15303  ** @param xcb_connection_t *c
15304  ** @returns xcb_get_screen_saver_cookie_t
15305  **
15306  *****************************************************************************/
15307 
15308 xcb_get_screen_saver_cookie_t
15309 xcb_get_screen_saver_unchecked (xcb_connection_t *c  /**< */)
15310 {
15311     static const xcb_protocol_request_t xcb_req = {
15312         /* count */ 2,
15313         /* ext */ 0,
15314         /* opcode */ XCB_GET_SCREEN_SAVER,
15315         /* isvoid */ 0
15316     };
15317 
15318     struct iovec xcb_parts[4];
15319     xcb_get_screen_saver_cookie_t xcb_ret;
15320     xcb_get_screen_saver_request_t xcb_out;
15321 
15322     xcb_out.pad0 = 0;
15323 
15324     xcb_parts[2].iov_base = (char *) &xcb_out;
15325     xcb_parts[2].iov_len = sizeof(xcb_out);
15326     xcb_parts[3].iov_base = 0;
15327     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15328 
15329     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15330     return xcb_ret;
15331 }
15332 
15333 
15334 /*****************************************************************************
15335  **
15336  ** xcb_get_screen_saver_reply_t * xcb_get_screen_saver_reply
15337  **
15338  ** @param xcb_connection_t               *c
15339  ** @param xcb_get_screen_saver_cookie_t   cookie
15340  ** @param xcb_generic_error_t           **e
15341  ** @returns xcb_get_screen_saver_reply_t *
15342  **
15343  *****************************************************************************/
15344 
15345 xcb_get_screen_saver_reply_t *
15346 xcb_get_screen_saver_reply (xcb_connection_t               *c  /**< */,
15347                             xcb_get_screen_saver_cookie_t   cookie  /**< */,
15348                             xcb_generic_error_t           **e  /**< */)
15349 {
15350     return (xcb_get_screen_saver_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
15351 }
15352 
15353 int
15354 xcb_change_hosts_sizeof (const void  *_buffer  /**< */)
15355 {
15356     char *xcb_tmp = (char *)_buffer;
15357     const xcb_change_hosts_request_t *_aux = (xcb_change_hosts_request_t *)_buffer;
15358     unsigned int xcb_buffer_len = 0;
15359     unsigned int xcb_block_len = 0;
15360     unsigned int xcb_pad = 0;
15361     unsigned int xcb_align_to = 0;
15362 
15363 
15364     xcb_block_len += sizeof(xcb_change_hosts_request_t);
15365     xcb_tmp += xcb_block_len;
15366     xcb_buffer_len += xcb_block_len;
15367     xcb_block_len = 0;
15368     /* address */
15369     xcb_block_len += _aux->address_len * sizeof(uint8_t);
15370     xcb_tmp += xcb_block_len;
15371     xcb_align_to = ALIGNOF(uint8_t);
15372     /* insert padding */
15373     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15374     xcb_buffer_len += xcb_block_len + xcb_pad;
15375     if (0 != xcb_pad) {
15376         xcb_tmp += xcb_pad;
15377         xcb_pad = 0;
15378     }
15379     xcb_block_len = 0;
15380 
15381     return xcb_buffer_len;
15382 }
15383 
15384 
15385 /*****************************************************************************
15386  **
15387  ** xcb_void_cookie_t xcb_change_hosts_checked
15388  **
15389  ** @param xcb_connection_t *c
15390  ** @param uint8_t           mode
15391  ** @param uint8_t           family
15392  ** @param uint16_t          address_len
15393  ** @param const uint8_t    *address
15394  ** @returns xcb_void_cookie_t
15395  **
15396  *****************************************************************************/
15397 
15398 xcb_void_cookie_t
15399 xcb_change_hosts_checked (xcb_connection_t *c  /**< */,
15400                           uint8_t           mode  /**< */,
15401                           uint8_t           family  /**< */,
15402                           uint16_t          address_len  /**< */,
15403                           const uint8_t    *address  /**< */)
15404 {
15405     static const xcb_protocol_request_t xcb_req = {
15406         /* count */ 4,
15407         /* ext */ 0,
15408         /* opcode */ XCB_CHANGE_HOSTS,
15409         /* isvoid */ 1
15410     };
15411 
15412     struct iovec xcb_parts[6];
15413     xcb_void_cookie_t xcb_ret;
15414     xcb_change_hosts_request_t xcb_out;
15415 
15416     xcb_out.mode = mode;
15417     xcb_out.family = family;
15418     xcb_out.pad0 = 0;
15419     xcb_out.address_len = address_len;
15420 
15421     xcb_parts[2].iov_base = (char *) &xcb_out;
15422     xcb_parts[2].iov_len = sizeof(xcb_out);
15423     xcb_parts[3].iov_base = 0;
15424     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15425     /* uint8_t address */
15426     xcb_parts[4].iov_base = (char *) address;
15427     xcb_parts[4].iov_len = address_len * sizeof(uint8_t);
15428     xcb_parts[5].iov_base = 0;
15429     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
15430 
15431     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15432     return xcb_ret;
15433 }
15434 
15435 
15436 /*****************************************************************************
15437  **
15438  ** xcb_void_cookie_t xcb_change_hosts
15439  **
15440  ** @param xcb_connection_t *c
15441  ** @param uint8_t           mode
15442  ** @param uint8_t           family
15443  ** @param uint16_t          address_len
15444  ** @param const uint8_t    *address
15445  ** @returns xcb_void_cookie_t
15446  **
15447  *****************************************************************************/
15448 
15449 xcb_void_cookie_t
15450 xcb_change_hosts (xcb_connection_t *c  /**< */,
15451                   uint8_t           mode  /**< */,
15452                   uint8_t           family  /**< */,
15453                   uint16_t          address_len  /**< */,
15454                   const uint8_t    *address  /**< */)
15455 {
15456     static const xcb_protocol_request_t xcb_req = {
15457         /* count */ 4,
15458         /* ext */ 0,
15459         /* opcode */ XCB_CHANGE_HOSTS,
15460         /* isvoid */ 1
15461     };
15462 
15463     struct iovec xcb_parts[6];
15464     xcb_void_cookie_t xcb_ret;
15465     xcb_change_hosts_request_t xcb_out;
15466 
15467     xcb_out.mode = mode;
15468     xcb_out.family = family;
15469     xcb_out.pad0 = 0;
15470     xcb_out.address_len = address_len;
15471 
15472     xcb_parts[2].iov_base = (char *) &xcb_out;
15473     xcb_parts[2].iov_len = sizeof(xcb_out);
15474     xcb_parts[3].iov_base = 0;
15475     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15476     /* uint8_t address */
15477     xcb_parts[4].iov_base = (char *) address;
15478     xcb_parts[4].iov_len = address_len * sizeof(uint8_t);
15479     xcb_parts[5].iov_base = 0;
15480     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
15481 
15482     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15483     return xcb_ret;
15484 }
15485 
15486 int
15487 xcb_host_sizeof (const void  *_buffer  /**< */)
15488 {
15489     char *xcb_tmp = (char *)_buffer;
15490     const xcb_host_t *_aux = (xcb_host_t *)_buffer;
15491     unsigned int xcb_buffer_len = 0;
15492     unsigned int xcb_block_len = 0;
15493     unsigned int xcb_pad = 0;
15494     unsigned int xcb_align_to = 0;
15495 
15496 
15497     xcb_block_len += sizeof(xcb_host_t);
15498     xcb_tmp += xcb_block_len;
15499     xcb_buffer_len += xcb_block_len;
15500     xcb_block_len = 0;
15501     /* address */
15502     xcb_block_len += _aux->address_len * sizeof(uint8_t);
15503     xcb_tmp += xcb_block_len;
15504     xcb_align_to = ALIGNOF(uint8_t);
15505     /* insert padding */
15506     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15507     xcb_buffer_len += xcb_block_len + xcb_pad;
15508     if (0 != xcb_pad) {
15509         xcb_tmp += xcb_pad;
15510         xcb_pad = 0;
15511     }
15512     xcb_block_len = 0;
15513 
15514     return xcb_buffer_len;
15515 }
15516 
15517 
15518 /*****************************************************************************
15519  **
15520  ** uint8_t * xcb_host_address
15521  **
15522  ** @param const xcb_host_t *R
15523  ** @returns uint8_t *
15524  **
15525  *****************************************************************************/
15526 
15527 uint8_t *
15528 xcb_host_address (const xcb_host_t *R  /**< */)
15529 {
15530     return (uint8_t *) (R + 1);
15531 }
15532 
15533 
15534 /*****************************************************************************
15535  **
15536  ** int xcb_host_address_length
15537  **
15538  ** @param const xcb_host_t *R
15539  ** @returns int
15540  **
15541  *****************************************************************************/
15542 
15543 int
15544 xcb_host_address_length (const xcb_host_t *R  /**< */)
15545 {
15546     return R->address_len;
15547 }
15548 
15549 
15550 /*****************************************************************************
15551  **
15552  ** xcb_generic_iterator_t xcb_host_address_end
15553  **
15554  ** @param const xcb_host_t *R
15555  ** @returns xcb_generic_iterator_t
15556  **
15557  *****************************************************************************/
15558 
15559 xcb_generic_iterator_t
15560 xcb_host_address_end (const xcb_host_t *R  /**< */)
15561 {
15562     xcb_generic_iterator_t i;
15563     i.data = ((uint8_t *) (R + 1)) + (R->address_len);
15564     i.rem = 0;
15565     i.index = (char *) i.data - (char *) R;
15566     return i;
15567 }
15568 
15569 
15570 /*****************************************************************************
15571  **
15572  ** void xcb_host_next
15573  **
15574  ** @param xcb_host_iterator_t *i
15575  ** @returns void
15576  **
15577  *****************************************************************************/
15578 
15579 void
15580 xcb_host_next (xcb_host_iterator_t *i  /**< */)
15581 {
15582     xcb_host_t *R = i->data;
15583     xcb_generic_iterator_t child;
15584     child.data = (xcb_host_t *)(((char *)R) + xcb_host_sizeof(R));
15585     i->index = (char *) child.data - (char *) i->data;
15586     --i->rem;
15587     i->data = (xcb_host_t *) child.data;
15588 }
15589 
15590 
15591 /*****************************************************************************
15592  **
15593  ** xcb_generic_iterator_t xcb_host_end
15594  **
15595  ** @param xcb_host_iterator_t i
15596  ** @returns xcb_generic_iterator_t
15597  **
15598  *****************************************************************************/
15599 
15600 xcb_generic_iterator_t
15601 xcb_host_end (xcb_host_iterator_t i  /**< */)
15602 {
15603     xcb_generic_iterator_t ret;
15604     while(i.rem > 0)
15605         xcb_host_next(&i);
15606     ret.data = i.data;
15607     ret.rem = i.rem;
15608     ret.index = i.index;
15609     return ret;
15610 }
15611 
15612 int
15613 xcb_list_hosts_sizeof (const void  *_buffer  /**< */)
15614 {
15615     char *xcb_tmp = (char *)_buffer;
15616     const xcb_list_hosts_reply_t *_aux = (xcb_list_hosts_reply_t *)_buffer;
15617     unsigned int xcb_buffer_len = 0;
15618     unsigned int xcb_block_len = 0;
15619     unsigned int xcb_pad = 0;
15620     unsigned int xcb_align_to = 0;
15621 
15622     unsigned int i;
15623     unsigned int xcb_tmp_len;
15624 
15625     xcb_block_len += sizeof(xcb_list_hosts_reply_t);
15626     xcb_tmp += xcb_block_len;
15627     xcb_buffer_len += xcb_block_len;
15628     xcb_block_len = 0;
15629     /* hosts */
15630     for(i=0; i<_aux->hosts_len; i++) {
15631         xcb_tmp_len = xcb_host_sizeof(xcb_tmp);
15632         xcb_block_len += xcb_tmp_len;
15633         xcb_tmp += xcb_tmp_len;
15634     }
15635     xcb_align_to = ALIGNOF(xcb_host_t);
15636     /* insert padding */
15637     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15638     xcb_buffer_len += xcb_block_len + xcb_pad;
15639     if (0 != xcb_pad) {
15640         xcb_tmp += xcb_pad;
15641         xcb_pad = 0;
15642     }
15643     xcb_block_len = 0;
15644 
15645     return xcb_buffer_len;
15646 }
15647 
15648 
15649 /*****************************************************************************
15650  **
15651  ** xcb_list_hosts_cookie_t xcb_list_hosts
15652  **
15653  ** @param xcb_connection_t *c
15654  ** @returns xcb_list_hosts_cookie_t
15655  **
15656  *****************************************************************************/
15657 
15658 xcb_list_hosts_cookie_t
15659 xcb_list_hosts (xcb_connection_t *c  /**< */)
15660 {
15661     static const xcb_protocol_request_t xcb_req = {
15662         /* count */ 2,
15663         /* ext */ 0,
15664         /* opcode */ XCB_LIST_HOSTS,
15665         /* isvoid */ 0
15666     };
15667 
15668     struct iovec xcb_parts[4];
15669     xcb_list_hosts_cookie_t xcb_ret;
15670     xcb_list_hosts_request_t xcb_out;
15671 
15672     xcb_out.pad0 = 0;
15673 
15674     xcb_parts[2].iov_base = (char *) &xcb_out;
15675     xcb_parts[2].iov_len = sizeof(xcb_out);
15676     xcb_parts[3].iov_base = 0;
15677     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15678 
15679     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15680     return xcb_ret;
15681 }
15682 
15683 
15684 /*****************************************************************************
15685  **
15686  ** xcb_list_hosts_cookie_t xcb_list_hosts_unchecked
15687  **
15688  ** @param xcb_connection_t *c
15689  ** @returns xcb_list_hosts_cookie_t
15690  **
15691  *****************************************************************************/
15692 
15693 xcb_list_hosts_cookie_t
15694 xcb_list_hosts_unchecked (xcb_connection_t *c  /**< */)
15695 {
15696     static const xcb_protocol_request_t xcb_req = {
15697         /* count */ 2,
15698         /* ext */ 0,
15699         /* opcode */ XCB_LIST_HOSTS,
15700         /* isvoid */ 0
15701     };
15702 
15703     struct iovec xcb_parts[4];
15704     xcb_list_hosts_cookie_t xcb_ret;
15705     xcb_list_hosts_request_t xcb_out;
15706 
15707     xcb_out.pad0 = 0;
15708 
15709     xcb_parts[2].iov_base = (char *) &xcb_out;
15710     xcb_parts[2].iov_len = sizeof(xcb_out);
15711     xcb_parts[3].iov_base = 0;
15712     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15713 
15714     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15715     return xcb_ret;
15716 }
15717 
15718 
15719 /*****************************************************************************
15720  **
15721  ** int xcb_list_hosts_hosts_length
15722  **
15723  ** @param const xcb_list_hosts_reply_t *R
15724  ** @returns int
15725  **
15726  *****************************************************************************/
15727 
15728 int
15729 xcb_list_hosts_hosts_length (const xcb_list_hosts_reply_t *R  /**< */)
15730 {
15731     return R->hosts_len;
15732 }
15733 
15734 
15735 /*****************************************************************************
15736  **
15737  ** xcb_host_iterator_t xcb_list_hosts_hosts_iterator
15738  **
15739  ** @param const xcb_list_hosts_reply_t *R
15740  ** @returns xcb_host_iterator_t
15741  **
15742  *****************************************************************************/
15743 
15744 xcb_host_iterator_t
15745 xcb_list_hosts_hosts_iterator (const xcb_list_hosts_reply_t *R  /**< */)
15746 {
15747     xcb_host_iterator_t i;
15748     i.data = (xcb_host_t *) (R + 1);
15749     i.rem = R->hosts_len;
15750     i.index = (char *) i.data - (char *) R;
15751     return i;
15752 }
15753 
15754 
15755 /*****************************************************************************
15756  **
15757  ** xcb_list_hosts_reply_t * xcb_list_hosts_reply
15758  **
15759  ** @param xcb_connection_t         *c
15760  ** @param xcb_list_hosts_cookie_t   cookie
15761  ** @param xcb_generic_error_t     **e
15762  ** @returns xcb_list_hosts_reply_t *
15763  **
15764  *****************************************************************************/
15765 
15766 xcb_list_hosts_reply_t *
15767 xcb_list_hosts_reply (xcb_connection_t         *c  /**< */,
15768                       xcb_list_hosts_cookie_t   cookie  /**< */,
15769                       xcb_generic_error_t     **e  /**< */)
15770 {
15771     return (xcb_list_hosts_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
15772 }
15773 
15774 
15775 /*****************************************************************************
15776  **
15777  ** xcb_void_cookie_t xcb_set_access_control_checked
15778  **
15779  ** @param xcb_connection_t *c
15780  ** @param uint8_t           mode
15781  ** @returns xcb_void_cookie_t
15782  **
15783  *****************************************************************************/
15784 
15785 xcb_void_cookie_t
15786 xcb_set_access_control_checked (xcb_connection_t *c  /**< */,
15787                                 uint8_t           mode  /**< */)
15788 {
15789     static const xcb_protocol_request_t xcb_req = {
15790         /* count */ 2,
15791         /* ext */ 0,
15792         /* opcode */ XCB_SET_ACCESS_CONTROL,
15793         /* isvoid */ 1
15794     };
15795 
15796     struct iovec xcb_parts[4];
15797     xcb_void_cookie_t xcb_ret;
15798     xcb_set_access_control_request_t xcb_out;
15799 
15800     xcb_out.mode = mode;
15801 
15802     xcb_parts[2].iov_base = (char *) &xcb_out;
15803     xcb_parts[2].iov_len = sizeof(xcb_out);
15804     xcb_parts[3].iov_base = 0;
15805     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15806 
15807     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15808     return xcb_ret;
15809 }
15810 
15811 
15812 /*****************************************************************************
15813  **
15814  ** xcb_void_cookie_t xcb_set_access_control
15815  **
15816  ** @param xcb_connection_t *c
15817  ** @param uint8_t           mode
15818  ** @returns xcb_void_cookie_t
15819  **
15820  *****************************************************************************/
15821 
15822 xcb_void_cookie_t
15823 xcb_set_access_control (xcb_connection_t *c  /**< */,
15824                         uint8_t           mode  /**< */)
15825 {
15826     static const xcb_protocol_request_t xcb_req = {
15827         /* count */ 2,
15828         /* ext */ 0,
15829         /* opcode */ XCB_SET_ACCESS_CONTROL,
15830         /* isvoid */ 1
15831     };
15832 
15833     struct iovec xcb_parts[4];
15834     xcb_void_cookie_t xcb_ret;
15835     xcb_set_access_control_request_t xcb_out;
15836 
15837     xcb_out.mode = mode;
15838 
15839     xcb_parts[2].iov_base = (char *) &xcb_out;
15840     xcb_parts[2].iov_len = sizeof(xcb_out);
15841     xcb_parts[3].iov_base = 0;
15842     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15843 
15844     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15845     return xcb_ret;
15846 }
15847 
15848 
15849 /*****************************************************************************
15850  **
15851  ** xcb_void_cookie_t xcb_set_close_down_mode_checked
15852  **
15853  ** @param xcb_connection_t *c
15854  ** @param uint8_t           mode
15855  ** @returns xcb_void_cookie_t
15856  **
15857  *****************************************************************************/
15858 
15859 xcb_void_cookie_t
15860 xcb_set_close_down_mode_checked (xcb_connection_t *c  /**< */,
15861                                  uint8_t           mode  /**< */)
15862 {
15863     static const xcb_protocol_request_t xcb_req = {
15864         /* count */ 2,
15865         /* ext */ 0,
15866         /* opcode */ XCB_SET_CLOSE_DOWN_MODE,
15867         /* isvoid */ 1
15868     };
15869 
15870     struct iovec xcb_parts[4];
15871     xcb_void_cookie_t xcb_ret;
15872     xcb_set_close_down_mode_request_t xcb_out;
15873 
15874     xcb_out.mode = mode;
15875 
15876     xcb_parts[2].iov_base = (char *) &xcb_out;
15877     xcb_parts[2].iov_len = sizeof(xcb_out);
15878     xcb_parts[3].iov_base = 0;
15879     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15880 
15881     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15882     return xcb_ret;
15883 }
15884 
15885 
15886 /*****************************************************************************
15887  **
15888  ** xcb_void_cookie_t xcb_set_close_down_mode
15889  **
15890  ** @param xcb_connection_t *c
15891  ** @param uint8_t           mode
15892  ** @returns xcb_void_cookie_t
15893  **
15894  *****************************************************************************/
15895 
15896 xcb_void_cookie_t
15897 xcb_set_close_down_mode (xcb_connection_t *c  /**< */,
15898                          uint8_t           mode  /**< */)
15899 {
15900     static const xcb_protocol_request_t xcb_req = {
15901         /* count */ 2,
15902         /* ext */ 0,
15903         /* opcode */ XCB_SET_CLOSE_DOWN_MODE,
15904         /* isvoid */ 1
15905     };
15906 
15907     struct iovec xcb_parts[4];
15908     xcb_void_cookie_t xcb_ret;
15909     xcb_set_close_down_mode_request_t xcb_out;
15910 
15911     xcb_out.mode = mode;
15912 
15913     xcb_parts[2].iov_base = (char *) &xcb_out;
15914     xcb_parts[2].iov_len = sizeof(xcb_out);
15915     xcb_parts[3].iov_base = 0;
15916     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15917 
15918     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15919     return xcb_ret;
15920 }
15921 
15922 
15923 /*****************************************************************************
15924  **
15925  ** xcb_void_cookie_t xcb_kill_client_checked
15926  **
15927  ** @param xcb_connection_t *c
15928  ** @param uint32_t          resource
15929  ** @returns xcb_void_cookie_t
15930  **
15931  *****************************************************************************/
15932 
15933 xcb_void_cookie_t
15934 xcb_kill_client_checked (xcb_connection_t *c  /**< */,
15935                          uint32_t          resource  /**< */)
15936 {
15937     static const xcb_protocol_request_t xcb_req = {
15938         /* count */ 2,
15939         /* ext */ 0,
15940         /* opcode */ XCB_KILL_CLIENT,
15941         /* isvoid */ 1
15942     };
15943 
15944     struct iovec xcb_parts[4];
15945     xcb_void_cookie_t xcb_ret;
15946     xcb_kill_client_request_t xcb_out;
15947 
15948     xcb_out.pad0 = 0;
15949     xcb_out.resource = resource;
15950 
15951     xcb_parts[2].iov_base = (char *) &xcb_out;
15952     xcb_parts[2].iov_len = sizeof(xcb_out);
15953     xcb_parts[3].iov_base = 0;
15954     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15955 
15956     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15957     return xcb_ret;
15958 }
15959 
15960 
15961 /*****************************************************************************
15962  **
15963  ** xcb_void_cookie_t xcb_kill_client
15964  **
15965  ** @param xcb_connection_t *c
15966  ** @param uint32_t          resource
15967  ** @returns xcb_void_cookie_t
15968  **
15969  *****************************************************************************/
15970 
15971 xcb_void_cookie_t
15972 xcb_kill_client (xcb_connection_t *c  /**< */,
15973                  uint32_t          resource  /**< */)
15974 {
15975     static const xcb_protocol_request_t xcb_req = {
15976         /* count */ 2,
15977         /* ext */ 0,
15978         /* opcode */ XCB_KILL_CLIENT,
15979         /* isvoid */ 1
15980     };
15981 
15982     struct iovec xcb_parts[4];
15983     xcb_void_cookie_t xcb_ret;
15984     xcb_kill_client_request_t xcb_out;
15985 
15986     xcb_out.pad0 = 0;
15987     xcb_out.resource = resource;
15988 
15989     xcb_parts[2].iov_base = (char *) &xcb_out;
15990     xcb_parts[2].iov_len = sizeof(xcb_out);
15991     xcb_parts[3].iov_base = 0;
15992     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15993 
15994     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15995     return xcb_ret;
15996 }
15997 
15998 int
15999 xcb_rotate_properties_sizeof (const void  *_buffer  /**< */)
16000 {
16001     char *xcb_tmp = (char *)_buffer;
16002     const xcb_rotate_properties_request_t *_aux = (xcb_rotate_properties_request_t *)_buffer;
16003     unsigned int xcb_buffer_len = 0;
16004     unsigned int xcb_block_len = 0;
16005     unsigned int xcb_pad = 0;
16006     unsigned int xcb_align_to = 0;
16007 
16008 
16009     xcb_block_len += sizeof(xcb_rotate_properties_request_t);
16010     xcb_tmp += xcb_block_len;
16011     xcb_buffer_len += xcb_block_len;
16012     xcb_block_len = 0;
16013     /* atoms */
16014     xcb_block_len += _aux->atoms_len * sizeof(xcb_atom_t);
16015     xcb_tmp += xcb_block_len;
16016     xcb_align_to = ALIGNOF(xcb_atom_t);
16017     /* insert padding */
16018     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
16019     xcb_buffer_len += xcb_block_len + xcb_pad;
16020     if (0 != xcb_pad) {
16021         xcb_tmp += xcb_pad;
16022         xcb_pad = 0;
16023     }
16024     xcb_block_len = 0;
16025 
16026     return xcb_buffer_len;
16027 }
16028 
16029 
16030 /*****************************************************************************
16031  **
16032  ** xcb_void_cookie_t xcb_rotate_properties_checked
16033  **
16034  ** @param xcb_connection_t *c
16035  ** @param xcb_window_t      window
16036  ** @param uint16_t          atoms_len
16037  ** @param int16_t           delta
16038  ** @param const xcb_atom_t *atoms
16039  ** @returns xcb_void_cookie_t
16040  **
16041  *****************************************************************************/
16042 
16043 xcb_void_cookie_t
16044 xcb_rotate_properties_checked (xcb_connection_t *c  /**< */,
16045                                xcb_window_t      window  /**< */,
16046                                uint16_t          atoms_len  /**< */,
16047                                int16_t           delta  /**< */,
16048                                const xcb_atom_t *atoms  /**< */)
16049 {
16050     static const xcb_protocol_request_t xcb_req = {
16051         /* count */ 4,
16052         /* ext */ 0,
16053         /* opcode */ XCB_ROTATE_PROPERTIES,
16054         /* isvoid */ 1
16055     };
16056 
16057     struct iovec xcb_parts[6];
16058     xcb_void_cookie_t xcb_ret;
16059     xcb_rotate_properties_request_t xcb_out;
16060 
16061     xcb_out.pad0 = 0;
16062     xcb_out.window = window;
16063     xcb_out.atoms_len = atoms_len;
16064     xcb_out.delta = delta;
16065 
16066     xcb_parts[2].iov_base = (char *) &xcb_out;
16067     xcb_parts[2].iov_len = sizeof(xcb_out);
16068     xcb_parts[3].iov_base = 0;
16069     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16070     /* xcb_atom_t atoms */
16071     xcb_parts[4].iov_base = (char *) atoms;
16072     xcb_parts[4].iov_len = atoms_len * sizeof(xcb_atom_t);
16073     xcb_parts[5].iov_base = 0;
16074     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
16075 
16076     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
16077     return xcb_ret;
16078 }
16079 
16080 
16081 /*****************************************************************************
16082  **
16083  ** xcb_void_cookie_t xcb_rotate_properties
16084  **
16085  ** @param xcb_connection_t *c
16086  ** @param xcb_window_t      window
16087  ** @param uint16_t          atoms_len
16088  ** @param int16_t           delta
16089  ** @param const xcb_atom_t *atoms
16090  ** @returns xcb_void_cookie_t
16091  **
16092  *****************************************************************************/
16093 
16094 xcb_void_cookie_t
16095 xcb_rotate_properties (xcb_connection_t *c  /**< */,
16096                        xcb_window_t      window  /**< */,
16097                        uint16_t          atoms_len  /**< */,
16098                        int16_t           delta  /**< */,
16099                        const xcb_atom_t *atoms  /**< */)
16100 {
16101     static const xcb_protocol_request_t xcb_req = {
16102         /* count */ 4,
16103         /* ext */ 0,
16104         /* opcode */ XCB_ROTATE_PROPERTIES,
16105         /* isvoid */ 1
16106     };
16107 
16108     struct iovec xcb_parts[6];
16109     xcb_void_cookie_t xcb_ret;
16110     xcb_rotate_properties_request_t xcb_out;
16111 
16112     xcb_out.pad0 = 0;
16113     xcb_out.window = window;
16114     xcb_out.atoms_len = atoms_len;
16115     xcb_out.delta = delta;
16116 
16117     xcb_parts[2].iov_base = (char *) &xcb_out;
16118     xcb_parts[2].iov_len = sizeof(xcb_out);
16119     xcb_parts[3].iov_base = 0;
16120     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16121     /* xcb_atom_t atoms */
16122     xcb_parts[4].iov_base = (char *) atoms;
16123     xcb_parts[4].iov_len = atoms_len * sizeof(xcb_atom_t);
16124     xcb_parts[5].iov_base = 0;
16125     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
16126 
16127     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
16128     return xcb_ret;
16129 }
16130 
16131 
16132 /*****************************************************************************
16133  **
16134  ** xcb_void_cookie_t xcb_force_screen_saver_checked
16135  **
16136  ** @param xcb_connection_t *c
16137  ** @param uint8_t           mode
16138  ** @returns xcb_void_cookie_t
16139  **
16140  *****************************************************************************/
16141 
16142 xcb_void_cookie_t
16143 xcb_force_screen_saver_checked (xcb_connection_t *c  /**< */,
16144                                 uint8_t           mode  /**< */)
16145 {
16146     static const xcb_protocol_request_t xcb_req = {
16147         /* count */ 2,
16148         /* ext */ 0,
16149         /* opcode */ XCB_FORCE_SCREEN_SAVER,
16150         /* isvoid */ 1
16151     };
16152 
16153     struct iovec xcb_parts[4];
16154     xcb_void_cookie_t xcb_ret;
16155     xcb_force_screen_saver_request_t xcb_out;
16156 
16157     xcb_out.mode = mode;
16158 
16159     xcb_parts[2].iov_base = (char *) &xcb_out;
16160     xcb_parts[2].iov_len = sizeof(xcb_out);
16161     xcb_parts[3].iov_base = 0;
16162     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16163 
16164     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
16165     return xcb_ret;
16166 }
16167 
16168 
16169 /*****************************************************************************
16170  **
16171  ** xcb_void_cookie_t xcb_force_screen_saver
16172  **
16173  ** @param xcb_connection_t *c
16174  ** @param uint8_t           mode
16175  ** @returns xcb_void_cookie_t
16176  **
16177  *****************************************************************************/
16178 
16179 xcb_void_cookie_t
16180 xcb_force_screen_saver (xcb_connection_t *c  /**< */,
16181                         uint8_t           mode  /**< */)
16182 {
16183     static const xcb_protocol_request_t xcb_req = {
16184         /* count */ 2,
16185         /* ext */ 0,
16186         /* opcode */ XCB_FORCE_SCREEN_SAVER,
16187         /* isvoid */ 1
16188     };
16189 
16190     struct iovec xcb_parts[4];
16191     xcb_void_cookie_t xcb_ret;
16192     xcb_force_screen_saver_request_t xcb_out;
16193 
16194     xcb_out.mode = mode;
16195 
16196     xcb_parts[2].iov_base = (char *) &xcb_out;
16197     xcb_parts[2].iov_len = sizeof(xcb_out);
16198     xcb_parts[3].iov_base = 0;
16199     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16200 
16201     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
16202     return xcb_ret;
16203 }
16204 
16205 int
16206 xcb_set_pointer_mapping_sizeof (const void  *_buffer  /**< */)
16207 {
16208     char *xcb_tmp = (char *)_buffer;
16209     const xcb_set_pointer_mapping_request_t *_aux = (xcb_set_pointer_mapping_request_t *)_buffer;
16210     unsigned int xcb_buffer_len = 0;
16211     unsigned int xcb_block_len = 0;
16212     unsigned int xcb_pad = 0;
16213     unsigned int xcb_align_to = 0;
16214 
16215 
16216     xcb_block_len += sizeof(xcb_set_pointer_mapping_request_t);
16217     xcb_tmp += xcb_block_len;
16218     xcb_buffer_len += xcb_block_len;
16219     xcb_block_len = 0;
16220     /* map */
16221     xcb_block_len += _aux->map_len * sizeof(uint8_t);
16222     xcb_tmp += xcb_block_len;
16223     xcb_align_to = ALIGNOF(uint8_t);
16224     /* insert padding */
16225     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
16226     xcb_buffer_len += xcb_block_len + xcb_pad;
16227     if (0 != xcb_pad) {
16228         xcb_tmp += xcb_pad;
16229         xcb_pad = 0;
16230     }
16231     xcb_block_len = 0;
16232 
16233     return xcb_buffer_len;
16234 }
16235 
16236 
16237 /*****************************************************************************
16238  **
16239  ** xcb_set_pointer_mapping_cookie_t xcb_set_pointer_mapping
16240  **
16241  ** @param xcb_connection_t *c
16242  ** @param uint8_t           map_len
16243  ** @param const uint8_t    *map
16244  ** @returns xcb_set_pointer_mapping_cookie_t
16245  **
16246  *****************************************************************************/
16247 
16248 xcb_set_pointer_mapping_cookie_t
16249 xcb_set_pointer_mapping (xcb_connection_t *c  /**< */,
16250                          uint8_t           map_len  /**< */,
16251                          const uint8_t    *map  /**< */)
16252 {
16253     static const xcb_protocol_request_t xcb_req = {
16254         /* count */ 4,
16255         /* ext */ 0,
16256         /* opcode */ XCB_SET_POINTER_MAPPING,
16257         /* isvoid */ 0
16258     };
16259 
16260     struct iovec xcb_parts[6];
16261     xcb_set_pointer_mapping_cookie_t xcb_ret;
16262     xcb_set_pointer_mapping_request_t xcb_out;
16263 
16264     xcb_out.map_len = map_len;
16265 
16266     xcb_parts[2].iov_base = (char *) &xcb_out;
16267     xcb_parts[2].iov_len = sizeof(xcb_out);
16268     xcb_parts[3].iov_base = 0;
16269     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16270     /* uint8_t map */
16271     xcb_parts[4].iov_base = (char *) map;
16272     xcb_parts[4].iov_len = map_len * sizeof(uint8_t);
16273     xcb_parts[5].iov_base = 0;
16274     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
16275 
16276     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
16277     return xcb_ret;
16278 }
16279 
16280 
16281 /*****************************************************************************
16282  **
16283  ** xcb_set_pointer_mapping_cookie_t xcb_set_pointer_mapping_unchecked
16284  **
16285  ** @param xcb_connection_t *c
16286  ** @param uint8_t           map_len
16287  ** @param const uint8_t    *map
16288  ** @returns xcb_set_pointer_mapping_cookie_t
16289  **
16290  *****************************************************************************/
16291 
16292 xcb_set_pointer_mapping_cookie_t
16293 xcb_set_pointer_mapping_unchecked (xcb_connection_t *c  /**< */,
16294                                    uint8_t           map_len  /**< */,
16295                                    const uint8_t    *map  /**< */)
16296 {
16297     static const xcb_protocol_request_t xcb_req = {
16298         /* count */ 4,
16299         /* ext */ 0,
16300         /* opcode */ XCB_SET_POINTER_MAPPING,
16301         /* isvoid */ 0
16302     };
16303 
16304     struct iovec xcb_parts[6];
16305     xcb_set_pointer_mapping_cookie_t xcb_ret;
16306     xcb_set_pointer_mapping_request_t xcb_out;
16307 
16308     xcb_out.map_len = map_len;
16309 
16310     xcb_parts[2].iov_base = (char *) &xcb_out;
16311     xcb_parts[2].iov_len = sizeof(xcb_out);
16312     xcb_parts[3].iov_base = 0;
16313     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16314     /* uint8_t map */
16315     xcb_parts[4].iov_base = (char *) map;
16316     xcb_parts[4].iov_len = map_len * sizeof(uint8_t);
16317     xcb_parts[5].iov_base = 0;
16318     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
16319 
16320     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
16321     return xcb_ret;
16322 }
16323 
16324 
16325 /*****************************************************************************
16326  **
16327  ** xcb_set_pointer_mapping_reply_t * xcb_set_pointer_mapping_reply
16328  **
16329  ** @param xcb_connection_t                  *c
16330  ** @param xcb_set_pointer_mapping_cookie_t   cookie
16331  ** @param xcb_generic_error_t              **e
16332  ** @returns xcb_set_pointer_mapping_reply_t *
16333  **
16334  *****************************************************************************/
16335 
16336 xcb_set_pointer_mapping_reply_t *
16337 xcb_set_pointer_mapping_reply (xcb_connection_t                  *c  /**< */,
16338                                xcb_set_pointer_mapping_cookie_t   cookie  /**< */,
16339                                xcb_generic_error_t              **e  /**< */)
16340 {
16341     return (xcb_set_pointer_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
16342 }
16343 
16344 int
16345 xcb_get_pointer_mapping_sizeof (const void  *_buffer  /**< */)
16346 {
16347     char *xcb_tmp = (char *)_buffer;
16348     const xcb_get_pointer_mapping_reply_t *_aux = (xcb_get_pointer_mapping_reply_t *)_buffer;
16349     unsigned int xcb_buffer_len = 0;
16350     unsigned int xcb_block_len = 0;
16351     unsigned int xcb_pad = 0;
16352     unsigned int xcb_align_to = 0;
16353 
16354 
16355     xcb_block_len += sizeof(xcb_get_pointer_mapping_reply_t);
16356     xcb_tmp += xcb_block_len;
16357     xcb_buffer_len += xcb_block_len;
16358     xcb_block_len = 0;
16359     /* map */
16360     xcb_block_len += _aux->map_len * sizeof(uint8_t);
16361     xcb_tmp += xcb_block_len;
16362     xcb_align_to = ALIGNOF(uint8_t);
16363     /* insert padding */
16364     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
16365     xcb_buffer_len += xcb_block_len + xcb_pad;
16366     if (0 != xcb_pad) {
16367         xcb_tmp += xcb_pad;
16368         xcb_pad = 0;
16369     }
16370     xcb_block_len = 0;
16371 
16372     return xcb_buffer_len;
16373 }
16374 
16375 
16376 /*****************************************************************************
16377  **
16378  ** xcb_get_pointer_mapping_cookie_t xcb_get_pointer_mapping
16379  **
16380  ** @param xcb_connection_t *c
16381  ** @returns xcb_get_pointer_mapping_cookie_t
16382  **
16383  *****************************************************************************/
16384 
16385 xcb_get_pointer_mapping_cookie_t
16386 xcb_get_pointer_mapping (xcb_connection_t *c  /**< */)
16387 {
16388     static const xcb_protocol_request_t xcb_req = {
16389         /* count */ 2,
16390         /* ext */ 0,
16391         /* opcode */ XCB_GET_POINTER_MAPPING,
16392         /* isvoid */ 0
16393     };
16394 
16395     struct iovec xcb_parts[4];
16396     xcb_get_pointer_mapping_cookie_t xcb_ret;
16397     xcb_get_pointer_mapping_request_t xcb_out;
16398 
16399     xcb_out.pad0 = 0;
16400 
16401     xcb_parts[2].iov_base = (char *) &xcb_out;
16402     xcb_parts[2].iov_len = sizeof(xcb_out);
16403     xcb_parts[3].iov_base = 0;
16404     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16405 
16406     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
16407     return xcb_ret;
16408 }
16409 
16410 
16411 /*****************************************************************************
16412  **
16413  ** xcb_get_pointer_mapping_cookie_t xcb_get_pointer_mapping_unchecked
16414  **
16415  ** @param xcb_connection_t *c
16416  ** @returns xcb_get_pointer_mapping_cookie_t
16417  **
16418  *****************************************************************************/
16419 
16420 xcb_get_pointer_mapping_cookie_t
16421 xcb_get_pointer_mapping_unchecked (xcb_connection_t *c  /**< */)
16422 {
16423     static const xcb_protocol_request_t xcb_req = {
16424         /* count */ 2,
16425         /* ext */ 0,
16426         /* opcode */ XCB_GET_POINTER_MAPPING,
16427         /* isvoid */ 0
16428     };
16429 
16430     struct iovec xcb_parts[4];
16431     xcb_get_pointer_mapping_cookie_t xcb_ret;
16432     xcb_get_pointer_mapping_request_t xcb_out;
16433 
16434     xcb_out.pad0 = 0;
16435 
16436     xcb_parts[2].iov_base = (char *) &xcb_out;
16437     xcb_parts[2].iov_len = sizeof(xcb_out);
16438     xcb_parts[3].iov_base = 0;
16439     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16440 
16441     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
16442     return xcb_ret;
16443 }
16444 
16445 
16446 /*****************************************************************************
16447  **
16448  ** uint8_t * xcb_get_pointer_mapping_map
16449  **
16450  ** @param const xcb_get_pointer_mapping_reply_t *R
16451  ** @returns uint8_t *
16452  **
16453  *****************************************************************************/
16454 
16455 uint8_t *
16456 xcb_get_pointer_mapping_map (const xcb_get_pointer_mapping_reply_t *R  /**< */)
16457 {
16458     return (uint8_t *) (R + 1);
16459 }
16460 
16461 
16462 /*****************************************************************************
16463  **
16464  ** int xcb_get_pointer_mapping_map_length
16465  **
16466  ** @param const xcb_get_pointer_mapping_reply_t *R
16467  ** @returns int
16468  **
16469  *****************************************************************************/
16470 
16471 int
16472 xcb_get_pointer_mapping_map_length (const xcb_get_pointer_mapping_reply_t *R  /**< */)
16473 {
16474     return R->map_len;
16475 }
16476 
16477 
16478 /*****************************************************************************
16479  **
16480  ** xcb_generic_iterator_t xcb_get_pointer_mapping_map_end
16481  **
16482  ** @param const xcb_get_pointer_mapping_reply_t *R
16483  ** @returns xcb_generic_iterator_t
16484  **
16485  *****************************************************************************/
16486 
16487 xcb_generic_iterator_t
16488 xcb_get_pointer_mapping_map_end (const xcb_get_pointer_mapping_reply_t *R  /**< */)
16489 {
16490     xcb_generic_iterator_t i;
16491     i.data = ((uint8_t *) (R + 1)) + (R->map_len);
16492     i.rem = 0;
16493     i.index = (char *) i.data - (char *) R;
16494     return i;
16495 }
16496 
16497 
16498 /*****************************************************************************
16499  **
16500  ** xcb_get_pointer_mapping_reply_t * xcb_get_pointer_mapping_reply
16501  **
16502  ** @param xcb_connection_t                  *c
16503  ** @param xcb_get_pointer_mapping_cookie_t   cookie
16504  ** @param xcb_generic_error_t              **e
16505  ** @returns xcb_get_pointer_mapping_reply_t *
16506  **
16507  *****************************************************************************/
16508 
16509 xcb_get_pointer_mapping_reply_t *
16510 xcb_get_pointer_mapping_reply (xcb_connection_t                  *c  /**< */,
16511                                xcb_get_pointer_mapping_cookie_t   cookie  /**< */,
16512                                xcb_generic_error_t              **e  /**< */)
16513 {
16514     return (xcb_get_pointer_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
16515 }
16516 
16517 int
16518 xcb_set_modifier_mapping_sizeof (const void  *_buffer  /**< */)
16519 {
16520     char *xcb_tmp = (char *)_buffer;
16521     const xcb_set_modifier_mapping_request_t *_aux = (xcb_set_modifier_mapping_request_t *)_buffer;
16522     unsigned int xcb_buffer_len = 0;
16523     unsigned int xcb_block_len = 0;
16524     unsigned int xcb_pad = 0;
16525     unsigned int xcb_align_to = 0;
16526 
16527 
16528     xcb_block_len += sizeof(xcb_set_modifier_mapping_request_t);
16529     xcb_tmp += xcb_block_len;
16530     xcb_buffer_len += xcb_block_len;
16531     xcb_block_len = 0;
16532     /* keycodes */
16533     xcb_block_len += (_aux->keycodes_per_modifier * 8) * sizeof(xcb_keycode_t);
16534     xcb_tmp += xcb_block_len;
16535     xcb_align_to = ALIGNOF(xcb_keycode_t);
16536     /* insert padding */
16537     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
16538     xcb_buffer_len += xcb_block_len + xcb_pad;
16539     if (0 != xcb_pad) {
16540         xcb_tmp += xcb_pad;
16541         xcb_pad = 0;
16542     }
16543     xcb_block_len = 0;
16544 
16545     return xcb_buffer_len;
16546 }
16547 
16548 
16549 /*****************************************************************************
16550  **
16551  ** xcb_set_modifier_mapping_cookie_t xcb_set_modifier_mapping
16552  **
16553  ** @param xcb_connection_t    *c
16554  ** @param uint8_t              keycodes_per_modifier
16555  ** @param const xcb_keycode_t *keycodes
16556  ** @returns xcb_set_modifier_mapping_cookie_t
16557  **
16558  *****************************************************************************/
16559 
16560 xcb_set_modifier_mapping_cookie_t
16561 xcb_set_modifier_mapping (xcb_connection_t    *c  /**< */,
16562                           uint8_t              keycodes_per_modifier  /**< */,
16563                           const xcb_keycode_t *keycodes  /**< */)
16564 {
16565     static const xcb_protocol_request_t xcb_req = {
16566         /* count */ 4,
16567         /* ext */ 0,
16568         /* opcode */ XCB_SET_MODIFIER_MAPPING,
16569         /* isvoid */ 0
16570     };
16571 
16572     struct iovec xcb_parts[6];
16573     xcb_set_modifier_mapping_cookie_t xcb_ret;
16574     xcb_set_modifier_mapping_request_t xcb_out;
16575 
16576     xcb_out.keycodes_per_modifier = keycodes_per_modifier;
16577 
16578     xcb_parts[2].iov_base = (char *) &xcb_out;
16579     xcb_parts[2].iov_len = sizeof(xcb_out);
16580     xcb_parts[3].iov_base = 0;
16581     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16582     /* xcb_keycode_t keycodes */
16583     xcb_parts[4].iov_base = (char *) keycodes;
16584     xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t);
16585     xcb_parts[5].iov_base = 0;
16586     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
16587 
16588     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
16589     return xcb_ret;
16590 }
16591 
16592 
16593 /*****************************************************************************
16594  **
16595  ** xcb_set_modifier_mapping_cookie_t xcb_set_modifier_mapping_unchecked
16596  **
16597  ** @param xcb_connection_t    *c
16598  ** @param uint8_t              keycodes_per_modifier
16599  ** @param const xcb_keycode_t *keycodes
16600  ** @returns xcb_set_modifier_mapping_cookie_t
16601  **
16602  *****************************************************************************/
16603 
16604 xcb_set_modifier_mapping_cookie_t
16605 xcb_set_modifier_mapping_unchecked (xcb_connection_t    *c  /**< */,
16606                                     uint8_t              keycodes_per_modifier  /**< */,
16607                                     const xcb_keycode_t *keycodes  /**< */)
16608 {
16609     static const xcb_protocol_request_t xcb_req = {
16610         /* count */ 4,
16611         /* ext */ 0,
16612         /* opcode */ XCB_SET_MODIFIER_MAPPING,
16613         /* isvoid */ 0
16614     };
16615 
16616     struct iovec xcb_parts[6];
16617     xcb_set_modifier_mapping_cookie_t xcb_ret;
16618     xcb_set_modifier_mapping_request_t xcb_out;
16619 
16620     xcb_out.keycodes_per_modifier = keycodes_per_modifier;
16621 
16622     xcb_parts[2].iov_base = (char *) &xcb_out;
16623     xcb_parts[2].iov_len = sizeof(xcb_out);
16624     xcb_parts[3].iov_base = 0;
16625     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16626     /* xcb_keycode_t keycodes */
16627     xcb_parts[4].iov_base = (char *) keycodes;
16628     xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t);
16629     xcb_parts[5].iov_base = 0;
16630     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
16631 
16632     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
16633     return xcb_ret;
16634 }
16635 
16636 
16637 /*****************************************************************************
16638  **
16639  ** xcb_set_modifier_mapping_reply_t * xcb_set_modifier_mapping_reply
16640  **
16641  ** @param xcb_connection_t                   *c
16642  ** @param xcb_set_modifier_mapping_cookie_t   cookie
16643  ** @param xcb_generic_error_t               **e
16644  ** @returns xcb_set_modifier_mapping_reply_t *
16645  **
16646  *****************************************************************************/
16647 
16648 xcb_set_modifier_mapping_reply_t *
16649 xcb_set_modifier_mapping_reply (xcb_connection_t                   *c  /**< */,
16650                                 xcb_set_modifier_mapping_cookie_t   cookie  /**< */,
16651                                 xcb_generic_error_t               **e  /**< */)
16652 {
16653     return (xcb_set_modifier_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
16654 }
16655 
16656 int
16657 xcb_get_modifier_mapping_sizeof (const void  *_buffer  /**< */)
16658 {
16659     char *xcb_tmp = (char *)_buffer;
16660     const xcb_get_modifier_mapping_reply_t *_aux = (xcb_get_modifier_mapping_reply_t *)_buffer;
16661     unsigned int xcb_buffer_len = 0;
16662     unsigned int xcb_block_len = 0;
16663     unsigned int xcb_pad = 0;
16664     unsigned int xcb_align_to = 0;
16665 
16666 
16667     xcb_block_len += sizeof(xcb_get_modifier_mapping_reply_t);
16668     xcb_tmp += xcb_block_len;
16669     xcb_buffer_len += xcb_block_len;
16670     xcb_block_len = 0;
16671     /* keycodes */
16672     xcb_block_len += (_aux->keycodes_per_modifier * 8) * sizeof(xcb_keycode_t);
16673     xcb_tmp += xcb_block_len;
16674     xcb_align_to = ALIGNOF(xcb_keycode_t);
16675     /* insert padding */
16676     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
16677     xcb_buffer_len += xcb_block_len + xcb_pad;
16678     if (0 != xcb_pad) {
16679         xcb_tmp += xcb_pad;
16680         xcb_pad = 0;
16681     }
16682     xcb_block_len = 0;
16683 
16684     return xcb_buffer_len;
16685 }
16686 
16687 
16688 /*****************************************************************************
16689  **
16690  ** xcb_get_modifier_mapping_cookie_t xcb_get_modifier_mapping
16691  **
16692  ** @param xcb_connection_t *c
16693  ** @returns xcb_get_modifier_mapping_cookie_t
16694  **
16695  *****************************************************************************/
16696 
16697 xcb_get_modifier_mapping_cookie_t
16698 xcb_get_modifier_mapping (xcb_connection_t *c  /**< */)
16699 {
16700     static const xcb_protocol_request_t xcb_req = {
16701         /* count */ 2,
16702         /* ext */ 0,
16703         /* opcode */ XCB_GET_MODIFIER_MAPPING,
16704         /* isvoid */ 0
16705     };
16706 
16707     struct iovec xcb_parts[4];
16708     xcb_get_modifier_mapping_cookie_t xcb_ret;
16709     xcb_get_modifier_mapping_request_t xcb_out;
16710 
16711     xcb_out.pad0 = 0;
16712 
16713     xcb_parts[2].iov_base = (char *) &xcb_out;
16714     xcb_parts[2].iov_len = sizeof(xcb_out);
16715     xcb_parts[3].iov_base = 0;
16716     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16717 
16718     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
16719     return xcb_ret;
16720 }
16721 
16722 
16723 /*****************************************************************************
16724  **
16725  ** xcb_get_modifier_mapping_cookie_t xcb_get_modifier_mapping_unchecked
16726  **
16727  ** @param xcb_connection_t *c
16728  ** @returns xcb_get_modifier_mapping_cookie_t
16729  **
16730  *****************************************************************************/
16731 
16732 xcb_get_modifier_mapping_cookie_t
16733 xcb_get_modifier_mapping_unchecked (xcb_connection_t *c  /**< */)
16734 {
16735     static const xcb_protocol_request_t xcb_req = {
16736         /* count */ 2,
16737         /* ext */ 0,
16738         /* opcode */ XCB_GET_MODIFIER_MAPPING,
16739         /* isvoid */ 0
16740     };
16741 
16742     struct iovec xcb_parts[4];
16743     xcb_get_modifier_mapping_cookie_t xcb_ret;
16744     xcb_get_modifier_mapping_request_t xcb_out;
16745 
16746     xcb_out.pad0 = 0;
16747 
16748     xcb_parts[2].iov_base = (char *) &xcb_out;
16749     xcb_parts[2].iov_len = sizeof(xcb_out);
16750     xcb_parts[3].iov_base = 0;
16751     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16752 
16753     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
16754     return xcb_ret;
16755 }
16756 
16757 
16758 /*****************************************************************************
16759  **
16760  ** xcb_keycode_t * xcb_get_modifier_mapping_keycodes
16761  **
16762  ** @param const xcb_get_modifier_mapping_reply_t *R
16763  ** @returns xcb_keycode_t *
16764  **
16765  *****************************************************************************/
16766 
16767 xcb_keycode_t *
16768 xcb_get_modifier_mapping_keycodes (const xcb_get_modifier_mapping_reply_t *R  /**< */)
16769 {
16770     return (xcb_keycode_t *) (R + 1);
16771 }
16772 
16773 
16774 /*****************************************************************************
16775  **
16776  ** int xcb_get_modifier_mapping_keycodes_length
16777  **
16778  ** @param const xcb_get_modifier_mapping_reply_t *R
16779  ** @returns int
16780  **
16781  *****************************************************************************/
16782 
16783 int
16784 xcb_get_modifier_mapping_keycodes_length (const xcb_get_modifier_mapping_reply_t *R  /**< */)
16785 {
16786     return (R->keycodes_per_modifier * 8);
16787 }
16788 
16789 
16790 /*****************************************************************************
16791  **
16792  ** xcb_generic_iterator_t xcb_get_modifier_mapping_keycodes_end
16793  **
16794  ** @param const xcb_get_modifier_mapping_reply_t *R
16795  ** @returns xcb_generic_iterator_t
16796  **
16797  *****************************************************************************/
16798 
16799 xcb_generic_iterator_t
16800 xcb_get_modifier_mapping_keycodes_end (const xcb_get_modifier_mapping_reply_t *R  /**< */)
16801 {
16802     xcb_generic_iterator_t i;
16803     i.data = ((xcb_keycode_t *) (R + 1)) + ((R->keycodes_per_modifier * 8));
16804     i.rem = 0;
16805     i.index = (char *) i.data - (char *) R;
16806     return i;
16807 }
16808 
16809 
16810 /*****************************************************************************
16811  **
16812  ** xcb_get_modifier_mapping_reply_t * xcb_get_modifier_mapping_reply
16813  **
16814  ** @param xcb_connection_t                   *c
16815  ** @param xcb_get_modifier_mapping_cookie_t   cookie
16816  ** @param xcb_generic_error_t               **e
16817  ** @returns xcb_get_modifier_mapping_reply_t *
16818  **
16819  *****************************************************************************/
16820 
16821 xcb_get_modifier_mapping_reply_t *
16822 xcb_get_modifier_mapping_reply (xcb_connection_t                   *c  /**< */,
16823                                 xcb_get_modifier_mapping_cookie_t   cookie  /**< */,
16824                                 xcb_generic_error_t               **e  /**< */)
16825 {
16826     return (xcb_get_modifier_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
16827 }
16828 
16829 
16830 /*****************************************************************************
16831  **
16832  ** xcb_void_cookie_t xcb_no_operation_checked
16833  **
16834  ** @param xcb_connection_t *c
16835  ** @returns xcb_void_cookie_t
16836  **
16837  *****************************************************************************/
16838 
16839 xcb_void_cookie_t
16840 xcb_no_operation_checked (xcb_connection_t *c  /**< */)
16841 {
16842     static const xcb_protocol_request_t xcb_req = {
16843         /* count */ 2,
16844         /* ext */ 0,
16845         /* opcode */ XCB_NO_OPERATION,
16846         /* isvoid */ 1
16847     };
16848 
16849     struct iovec xcb_parts[4];
16850     xcb_void_cookie_t xcb_ret;
16851     xcb_no_operation_request_t xcb_out;
16852 
16853     xcb_out.pad0 = 0;
16854 
16855     xcb_parts[2].iov_base = (char *) &xcb_out;
16856     xcb_parts[2].iov_len = sizeof(xcb_out);
16857     xcb_parts[3].iov_base = 0;
16858     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16859 
16860     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
16861     return xcb_ret;
16862 }
16863 
16864 
16865 /*****************************************************************************
16866  **
16867  ** xcb_void_cookie_t xcb_no_operation
16868  **
16869  ** @param xcb_connection_t *c
16870  ** @returns xcb_void_cookie_t
16871  **
16872  *****************************************************************************/
16873 
16874 xcb_void_cookie_t
16875 xcb_no_operation (xcb_connection_t *c  /**< */)
16876 {
16877     static const xcb_protocol_request_t xcb_req = {
16878         /* count */ 2,
16879         /* ext */ 0,
16880         /* opcode */ XCB_NO_OPERATION,
16881         /* isvoid */ 1
16882     };
16883 
16884     struct iovec xcb_parts[4];
16885     xcb_void_cookie_t xcb_ret;
16886     xcb_no_operation_request_t xcb_out;
16887 
16888     xcb_out.pad0 = 0;
16889 
16890     xcb_parts[2].iov_base = (char *) &xcb_out;
16891     xcb_parts[2].iov_len = sizeof(xcb_out);
16892     xcb_parts[3].iov_base = 0;
16893     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
16894 
16895     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
16896     return xcb_ret;
16897 }
16898 
16899