xref: /netbsd-src/external/mit/xorg/lib/libxcb/files/xkb.c (revision b7b7574d3bf8eeb51a1fa3977b59142ec6434a55)
1 /*
2  * This file generated automatically from xkb.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 "xkb.h"
15 
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
18 
19 xcb_extension_t xcb_xkb_id = { "XKEYBOARD", 0 };
20 
21 
22 /*****************************************************************************
23  **
24  ** void xcb_xkb_device_spec_next
25  **
26  ** @param xcb_xkb_device_spec_iterator_t *i
27  ** @returns void
28  **
29  *****************************************************************************/
30 
31 void
32 xcb_xkb_device_spec_next (xcb_xkb_device_spec_iterator_t *i  /**< */)
33 {
34     --i->rem;
35     ++i->data;
36     i->index += sizeof(xcb_xkb_device_spec_t);
37 }
38 
39 
40 /*****************************************************************************
41  **
42  ** xcb_generic_iterator_t xcb_xkb_device_spec_end
43  **
44  ** @param xcb_xkb_device_spec_iterator_t i
45  ** @returns xcb_generic_iterator_t
46  **
47  *****************************************************************************/
48 
49 xcb_generic_iterator_t
50 xcb_xkb_device_spec_end (xcb_xkb_device_spec_iterator_t i  /**< */)
51 {
52     xcb_generic_iterator_t ret;
53     ret.data = i.data + i.rem;
54     ret.index = i.index + ((char *) ret.data - (char *) i.data);
55     ret.rem = 0;
56     return ret;
57 }
58 
59 
60 /*****************************************************************************
61  **
62  ** void xcb_xkb_led_class_spec_next
63  **
64  ** @param xcb_xkb_led_class_spec_iterator_t *i
65  ** @returns void
66  **
67  *****************************************************************************/
68 
69 void
70 xcb_xkb_led_class_spec_next (xcb_xkb_led_class_spec_iterator_t *i  /**< */)
71 {
72     --i->rem;
73     ++i->data;
74     i->index += sizeof(xcb_xkb_led_class_spec_t);
75 }
76 
77 
78 /*****************************************************************************
79  **
80  ** xcb_generic_iterator_t xcb_xkb_led_class_spec_end
81  **
82  ** @param xcb_xkb_led_class_spec_iterator_t i
83  ** @returns xcb_generic_iterator_t
84  **
85  *****************************************************************************/
86 
87 xcb_generic_iterator_t
88 xcb_xkb_led_class_spec_end (xcb_xkb_led_class_spec_iterator_t i  /**< */)
89 {
90     xcb_generic_iterator_t ret;
91     ret.data = i.data + i.rem;
92     ret.index = i.index + ((char *) ret.data - (char *) i.data);
93     ret.rem = 0;
94     return ret;
95 }
96 
97 
98 /*****************************************************************************
99  **
100  ** void xcb_xkb_bell_class_spec_next
101  **
102  ** @param xcb_xkb_bell_class_spec_iterator_t *i
103  ** @returns void
104  **
105  *****************************************************************************/
106 
107 void
108 xcb_xkb_bell_class_spec_next (xcb_xkb_bell_class_spec_iterator_t *i  /**< */)
109 {
110     --i->rem;
111     ++i->data;
112     i->index += sizeof(xcb_xkb_bell_class_spec_t);
113 }
114 
115 
116 /*****************************************************************************
117  **
118  ** xcb_generic_iterator_t xcb_xkb_bell_class_spec_end
119  **
120  ** @param xcb_xkb_bell_class_spec_iterator_t i
121  ** @returns xcb_generic_iterator_t
122  **
123  *****************************************************************************/
124 
125 xcb_generic_iterator_t
126 xcb_xkb_bell_class_spec_end (xcb_xkb_bell_class_spec_iterator_t i  /**< */)
127 {
128     xcb_generic_iterator_t ret;
129     ret.data = i.data + i.rem;
130     ret.index = i.index + ((char *) ret.data - (char *) i.data);
131     ret.rem = 0;
132     return ret;
133 }
134 
135 
136 /*****************************************************************************
137  **
138  ** void xcb_xkb_id_spec_next
139  **
140  ** @param xcb_xkb_id_spec_iterator_t *i
141  ** @returns void
142  **
143  *****************************************************************************/
144 
145 void
146 xcb_xkb_id_spec_next (xcb_xkb_id_spec_iterator_t *i  /**< */)
147 {
148     --i->rem;
149     ++i->data;
150     i->index += sizeof(xcb_xkb_id_spec_t);
151 }
152 
153 
154 /*****************************************************************************
155  **
156  ** xcb_generic_iterator_t xcb_xkb_id_spec_end
157  **
158  ** @param xcb_xkb_id_spec_iterator_t i
159  ** @returns xcb_generic_iterator_t
160  **
161  *****************************************************************************/
162 
163 xcb_generic_iterator_t
164 xcb_xkb_id_spec_end (xcb_xkb_id_spec_iterator_t i  /**< */)
165 {
166     xcb_generic_iterator_t ret;
167     ret.data = i.data + i.rem;
168     ret.index = i.index + ((char *) ret.data - (char *) i.data);
169     ret.rem = 0;
170     return ret;
171 }
172 
173 
174 /*****************************************************************************
175  **
176  ** void xcb_xkb_indicator_map_next
177  **
178  ** @param xcb_xkb_indicator_map_iterator_t *i
179  ** @returns void
180  **
181  *****************************************************************************/
182 
183 void
184 xcb_xkb_indicator_map_next (xcb_xkb_indicator_map_iterator_t *i  /**< */)
185 {
186     --i->rem;
187     ++i->data;
188     i->index += sizeof(xcb_xkb_indicator_map_t);
189 }
190 
191 
192 /*****************************************************************************
193  **
194  ** xcb_generic_iterator_t xcb_xkb_indicator_map_end
195  **
196  ** @param xcb_xkb_indicator_map_iterator_t i
197  ** @returns xcb_generic_iterator_t
198  **
199  *****************************************************************************/
200 
201 xcb_generic_iterator_t
202 xcb_xkb_indicator_map_end (xcb_xkb_indicator_map_iterator_t i  /**< */)
203 {
204     xcb_generic_iterator_t ret;
205     ret.data = i.data + i.rem;
206     ret.index = i.index + ((char *) ret.data - (char *) i.data);
207     ret.rem = 0;
208     return ret;
209 }
210 
211 
212 /*****************************************************************************
213  **
214  ** void xcb_xkb_mod_def_next
215  **
216  ** @param xcb_xkb_mod_def_iterator_t *i
217  ** @returns void
218  **
219  *****************************************************************************/
220 
221 void
222 xcb_xkb_mod_def_next (xcb_xkb_mod_def_iterator_t *i  /**< */)
223 {
224     --i->rem;
225     ++i->data;
226     i->index += sizeof(xcb_xkb_mod_def_t);
227 }
228 
229 
230 /*****************************************************************************
231  **
232  ** xcb_generic_iterator_t xcb_xkb_mod_def_end
233  **
234  ** @param xcb_xkb_mod_def_iterator_t i
235  ** @returns xcb_generic_iterator_t
236  **
237  *****************************************************************************/
238 
239 xcb_generic_iterator_t
240 xcb_xkb_mod_def_end (xcb_xkb_mod_def_iterator_t i  /**< */)
241 {
242     xcb_generic_iterator_t ret;
243     ret.data = i.data + i.rem;
244     ret.index = i.index + ((char *) ret.data - (char *) i.data);
245     ret.rem = 0;
246     return ret;
247 }
248 
249 
250 /*****************************************************************************
251  **
252  ** void xcb_xkb_key_name_next
253  **
254  ** @param xcb_xkb_key_name_iterator_t *i
255  ** @returns void
256  **
257  *****************************************************************************/
258 
259 void
260 xcb_xkb_key_name_next (xcb_xkb_key_name_iterator_t *i  /**< */)
261 {
262     --i->rem;
263     ++i->data;
264     i->index += sizeof(xcb_xkb_key_name_t);
265 }
266 
267 
268 /*****************************************************************************
269  **
270  ** xcb_generic_iterator_t xcb_xkb_key_name_end
271  **
272  ** @param xcb_xkb_key_name_iterator_t i
273  ** @returns xcb_generic_iterator_t
274  **
275  *****************************************************************************/
276 
277 xcb_generic_iterator_t
278 xcb_xkb_key_name_end (xcb_xkb_key_name_iterator_t i  /**< */)
279 {
280     xcb_generic_iterator_t ret;
281     ret.data = i.data + i.rem;
282     ret.index = i.index + ((char *) ret.data - (char *) i.data);
283     ret.rem = 0;
284     return ret;
285 }
286 
287 
288 /*****************************************************************************
289  **
290  ** void xcb_xkb_key_alias_next
291  **
292  ** @param xcb_xkb_key_alias_iterator_t *i
293  ** @returns void
294  **
295  *****************************************************************************/
296 
297 void
298 xcb_xkb_key_alias_next (xcb_xkb_key_alias_iterator_t *i  /**< */)
299 {
300     --i->rem;
301     ++i->data;
302     i->index += sizeof(xcb_xkb_key_alias_t);
303 }
304 
305 
306 /*****************************************************************************
307  **
308  ** xcb_generic_iterator_t xcb_xkb_key_alias_end
309  **
310  ** @param xcb_xkb_key_alias_iterator_t i
311  ** @returns xcb_generic_iterator_t
312  **
313  *****************************************************************************/
314 
315 xcb_generic_iterator_t
316 xcb_xkb_key_alias_end (xcb_xkb_key_alias_iterator_t i  /**< */)
317 {
318     xcb_generic_iterator_t ret;
319     ret.data = i.data + i.rem;
320     ret.index = i.index + ((char *) ret.data - (char *) i.data);
321     ret.rem = 0;
322     return ret;
323 }
324 
325 int
326 xcb_xkb_counted_string_16_sizeof (const void  *_buffer  /**< */)
327 {
328     char *xcb_tmp = (char *)_buffer;
329     const xcb_xkb_counted_string_16_t *_aux = (xcb_xkb_counted_string_16_t *)_buffer;
330     unsigned int xcb_buffer_len = 0;
331     unsigned int xcb_block_len = 0;
332     unsigned int xcb_pad = 0;
333     unsigned int xcb_align_to = 0;
334 
335 
336     xcb_block_len += sizeof(xcb_xkb_counted_string_16_t);
337     xcb_tmp += xcb_block_len;
338     xcb_buffer_len += xcb_block_len;
339     xcb_block_len = 0;
340     /* string */
341     xcb_block_len += _aux->length * sizeof(char);
342     xcb_tmp += xcb_block_len;
343     xcb_align_to = ALIGNOF(char);
344     /* insert padding */
345     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
346     xcb_buffer_len += xcb_block_len + xcb_pad;
347     if (0 != xcb_pad) {
348         xcb_tmp += xcb_pad;
349         xcb_pad = 0;
350     }
351     xcb_block_len = 0;
352     /* alignment_pad */
353     xcb_block_len += (((_aux->length + 5) & (~3)) - (_aux->length + 2)) * sizeof(char);
354     xcb_tmp += xcb_block_len;
355     xcb_align_to = ALIGNOF(char);
356     /* insert padding */
357     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
358     xcb_buffer_len += xcb_block_len + xcb_pad;
359     if (0 != xcb_pad) {
360         xcb_tmp += xcb_pad;
361         xcb_pad = 0;
362     }
363     xcb_block_len = 0;
364 
365     return xcb_buffer_len;
366 }
367 
368 
369 /*****************************************************************************
370  **
371  ** char * xcb_xkb_counted_string_16_string
372  **
373  ** @param const xcb_xkb_counted_string_16_t *R
374  ** @returns char *
375  **
376  *****************************************************************************/
377 
378 char *
379 xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R  /**< */)
380 {
381     return (char *) (R + 1);
382 }
383 
384 
385 /*****************************************************************************
386  **
387  ** int xcb_xkb_counted_string_16_string_length
388  **
389  ** @param const xcb_xkb_counted_string_16_t *R
390  ** @returns int
391  **
392  *****************************************************************************/
393 
394 int
395 xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R  /**< */)
396 {
397     return R->length;
398 }
399 
400 
401 /*****************************************************************************
402  **
403  ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end
404  **
405  ** @param const xcb_xkb_counted_string_16_t *R
406  ** @returns xcb_generic_iterator_t
407  **
408  *****************************************************************************/
409 
410 xcb_generic_iterator_t
411 xcb_xkb_counted_string_16_string_end (const xcb_xkb_counted_string_16_t *R  /**< */)
412 {
413     xcb_generic_iterator_t i;
414     i.data = ((char *) (R + 1)) + (R->length);
415     i.rem = 0;
416     i.index = (char *) i.data - (char *) R;
417     return i;
418 }
419 
420 
421 /*****************************************************************************
422  **
423  ** void * xcb_xkb_counted_string_16_alignment_pad
424  **
425  ** @param const xcb_xkb_counted_string_16_t *R
426  ** @returns void *
427  **
428  *****************************************************************************/
429 
430 void *
431 xcb_xkb_counted_string_16_alignment_pad (const xcb_xkb_counted_string_16_t *R  /**< */)
432 {
433     xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_string_end(R);
434     return (void *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0);
435 }
436 
437 
438 /*****************************************************************************
439  **
440  ** int xcb_xkb_counted_string_16_alignment_pad_length
441  **
442  ** @param const xcb_xkb_counted_string_16_t *R
443  ** @returns int
444  **
445  *****************************************************************************/
446 
447 int
448 xcb_xkb_counted_string_16_alignment_pad_length (const xcb_xkb_counted_string_16_t *R  /**< */)
449 {
450     return (((R->length + 5) & (~3)) - (R->length + 2));
451 }
452 
453 
454 /*****************************************************************************
455  **
456  ** xcb_generic_iterator_t xcb_xkb_counted_string_16_alignment_pad_end
457  **
458  ** @param const xcb_xkb_counted_string_16_t *R
459  ** @returns xcb_generic_iterator_t
460  **
461  *****************************************************************************/
462 
463 xcb_generic_iterator_t
464 xcb_xkb_counted_string_16_alignment_pad_end (const xcb_xkb_counted_string_16_t *R  /**< */)
465 {
466     xcb_generic_iterator_t i;
467     xcb_generic_iterator_t child = xcb_xkb_counted_string_16_string_end(R);
468     i.data = ((char *) child.data) + ((((R->length + 5) & (~3)) - (R->length + 2)));
469     i.rem = 0;
470     i.index = (char *) i.data - (char *) R;
471     return i;
472 }
473 
474 
475 /*****************************************************************************
476  **
477  ** void xcb_xkb_counted_string_16_next
478  **
479  ** @param xcb_xkb_counted_string_16_iterator_t *i
480  ** @returns void
481  **
482  *****************************************************************************/
483 
484 void
485 xcb_xkb_counted_string_16_next (xcb_xkb_counted_string_16_iterator_t *i  /**< */)
486 {
487     xcb_xkb_counted_string_16_t *R = i->data;
488     xcb_generic_iterator_t child;
489     child.data = (xcb_xkb_counted_string_16_t *)(((char *)R) + xcb_xkb_counted_string_16_sizeof(R));
490     i->index = (char *) child.data - (char *) i->data;
491     --i->rem;
492     i->data = (xcb_xkb_counted_string_16_t *) child.data;
493 }
494 
495 
496 /*****************************************************************************
497  **
498  ** xcb_generic_iterator_t xcb_xkb_counted_string_16_end
499  **
500  ** @param xcb_xkb_counted_string_16_iterator_t i
501  ** @returns xcb_generic_iterator_t
502  **
503  *****************************************************************************/
504 
505 xcb_generic_iterator_t
506 xcb_xkb_counted_string_16_end (xcb_xkb_counted_string_16_iterator_t i  /**< */)
507 {
508     xcb_generic_iterator_t ret;
509     while(i.rem > 0)
510         xcb_xkb_counted_string_16_next(&i);
511     ret.data = i.data;
512     ret.rem = i.rem;
513     ret.index = i.index;
514     return ret;
515 }
516 
517 
518 /*****************************************************************************
519  **
520  ** void xcb_xkb_kt_map_entry_next
521  **
522  ** @param xcb_xkb_kt_map_entry_iterator_t *i
523  ** @returns void
524  **
525  *****************************************************************************/
526 
527 void
528 xcb_xkb_kt_map_entry_next (xcb_xkb_kt_map_entry_iterator_t *i  /**< */)
529 {
530     --i->rem;
531     ++i->data;
532     i->index += sizeof(xcb_xkb_kt_map_entry_t);
533 }
534 
535 
536 /*****************************************************************************
537  **
538  ** xcb_generic_iterator_t xcb_xkb_kt_map_entry_end
539  **
540  ** @param xcb_xkb_kt_map_entry_iterator_t i
541  ** @returns xcb_generic_iterator_t
542  **
543  *****************************************************************************/
544 
545 xcb_generic_iterator_t
546 xcb_xkb_kt_map_entry_end (xcb_xkb_kt_map_entry_iterator_t i  /**< */)
547 {
548     xcb_generic_iterator_t ret;
549     ret.data = i.data + i.rem;
550     ret.index = i.index + ((char *) ret.data - (char *) i.data);
551     ret.rem = 0;
552     return ret;
553 }
554 
555 int
556 xcb_xkb_key_type_sizeof (const void  *_buffer  /**< */)
557 {
558     char *xcb_tmp = (char *)_buffer;
559     const xcb_xkb_key_type_t *_aux = (xcb_xkb_key_type_t *)_buffer;
560     unsigned int xcb_buffer_len = 0;
561     unsigned int xcb_block_len = 0;
562     unsigned int xcb_pad = 0;
563     unsigned int xcb_align_to = 0;
564 
565 
566     xcb_block_len += sizeof(xcb_xkb_key_type_t);
567     xcb_tmp += xcb_block_len;
568     xcb_buffer_len += xcb_block_len;
569     xcb_block_len = 0;
570     /* map */
571     xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_map_entry_t);
572     xcb_tmp += xcb_block_len;
573     xcb_align_to = ALIGNOF(xcb_xkb_kt_map_entry_t);
574     /* insert padding */
575     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
576     xcb_buffer_len += xcb_block_len + xcb_pad;
577     if (0 != xcb_pad) {
578         xcb_tmp += xcb_pad;
579         xcb_pad = 0;
580     }
581     xcb_block_len = 0;
582     /* preserve */
583     xcb_block_len += (_aux->hasPreserve * _aux->nMapEntries) * sizeof(xcb_xkb_mod_def_t);
584     xcb_tmp += xcb_block_len;
585     xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
586     /* insert padding */
587     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
588     xcb_buffer_len += xcb_block_len + xcb_pad;
589     if (0 != xcb_pad) {
590         xcb_tmp += xcb_pad;
591         xcb_pad = 0;
592     }
593     xcb_block_len = 0;
594 
595     return xcb_buffer_len;
596 }
597 
598 
599 /*****************************************************************************
600  **
601  ** xcb_xkb_kt_map_entry_t * xcb_xkb_key_type_map
602  **
603  ** @param const xcb_xkb_key_type_t *R
604  ** @returns xcb_xkb_kt_map_entry_t *
605  **
606  *****************************************************************************/
607 
608 xcb_xkb_kt_map_entry_t *
609 xcb_xkb_key_type_map (const xcb_xkb_key_type_t *R  /**< */)
610 {
611     return (xcb_xkb_kt_map_entry_t *) (R + 1);
612 }
613 
614 
615 /*****************************************************************************
616  **
617  ** int xcb_xkb_key_type_map_length
618  **
619  ** @param const xcb_xkb_key_type_t *R
620  ** @returns int
621  **
622  *****************************************************************************/
623 
624 int
625 xcb_xkb_key_type_map_length (const xcb_xkb_key_type_t *R  /**< */)
626 {
627     return R->nMapEntries;
628 }
629 
630 
631 /*****************************************************************************
632  **
633  ** xcb_xkb_kt_map_entry_iterator_t xcb_xkb_key_type_map_iterator
634  **
635  ** @param const xcb_xkb_key_type_t *R
636  ** @returns xcb_xkb_kt_map_entry_iterator_t
637  **
638  *****************************************************************************/
639 
640 xcb_xkb_kt_map_entry_iterator_t
641 xcb_xkb_key_type_map_iterator (const xcb_xkb_key_type_t *R  /**< */)
642 {
643     xcb_xkb_kt_map_entry_iterator_t i;
644     i.data = (xcb_xkb_kt_map_entry_t *) (R + 1);
645     i.rem = R->nMapEntries;
646     i.index = (char *) i.data - (char *) R;
647     return i;
648 }
649 
650 
651 /*****************************************************************************
652  **
653  ** xcb_xkb_mod_def_t * xcb_xkb_key_type_preserve
654  **
655  ** @param const xcb_xkb_key_type_t *R
656  ** @returns xcb_xkb_mod_def_t *
657  **
658  *****************************************************************************/
659 
660 xcb_xkb_mod_def_t *
661 xcb_xkb_key_type_preserve (const xcb_xkb_key_type_t *R  /**< */)
662 {
663     xcb_generic_iterator_t prev = xcb_xkb_kt_map_entry_end(xcb_xkb_key_type_map_iterator(R));
664     return (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index) + 0);
665 }
666 
667 
668 /*****************************************************************************
669  **
670  ** int xcb_xkb_key_type_preserve_length
671  **
672  ** @param const xcb_xkb_key_type_t *R
673  ** @returns int
674  **
675  *****************************************************************************/
676 
677 int
678 xcb_xkb_key_type_preserve_length (const xcb_xkb_key_type_t *R  /**< */)
679 {
680     return (R->hasPreserve * R->nMapEntries);
681 }
682 
683 
684 /*****************************************************************************
685  **
686  ** xcb_xkb_mod_def_iterator_t xcb_xkb_key_type_preserve_iterator
687  **
688  ** @param const xcb_xkb_key_type_t *R
689  ** @returns xcb_xkb_mod_def_iterator_t
690  **
691  *****************************************************************************/
692 
693 xcb_xkb_mod_def_iterator_t
694 xcb_xkb_key_type_preserve_iterator (const xcb_xkb_key_type_t *R  /**< */)
695 {
696     xcb_xkb_mod_def_iterator_t i;
697     xcb_generic_iterator_t prev = xcb_xkb_kt_map_entry_end(xcb_xkb_key_type_map_iterator(R));
698     i.data = (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index));
699     i.rem = (R->hasPreserve * R->nMapEntries);
700     i.index = (char *) i.data - (char *) R;
701     return i;
702 }
703 
704 
705 /*****************************************************************************
706  **
707  ** void xcb_xkb_key_type_next
708  **
709  ** @param xcb_xkb_key_type_iterator_t *i
710  ** @returns void
711  **
712  *****************************************************************************/
713 
714 void
715 xcb_xkb_key_type_next (xcb_xkb_key_type_iterator_t *i  /**< */)
716 {
717     xcb_xkb_key_type_t *R = i->data;
718     xcb_generic_iterator_t child;
719     child.data = (xcb_xkb_key_type_t *)(((char *)R) + xcb_xkb_key_type_sizeof(R));
720     i->index = (char *) child.data - (char *) i->data;
721     --i->rem;
722     i->data = (xcb_xkb_key_type_t *) child.data;
723 }
724 
725 
726 /*****************************************************************************
727  **
728  ** xcb_generic_iterator_t xcb_xkb_key_type_end
729  **
730  ** @param xcb_xkb_key_type_iterator_t i
731  ** @returns xcb_generic_iterator_t
732  **
733  *****************************************************************************/
734 
735 xcb_generic_iterator_t
736 xcb_xkb_key_type_end (xcb_xkb_key_type_iterator_t i  /**< */)
737 {
738     xcb_generic_iterator_t ret;
739     while(i.rem > 0)
740         xcb_xkb_key_type_next(&i);
741     ret.data = i.data;
742     ret.rem = i.rem;
743     ret.index = i.index;
744     return ret;
745 }
746 
747 int
748 xcb_xkb_key_sym_map_sizeof (const void  *_buffer  /**< */)
749 {
750     char *xcb_tmp = (char *)_buffer;
751     const xcb_xkb_key_sym_map_t *_aux = (xcb_xkb_key_sym_map_t *)_buffer;
752     unsigned int xcb_buffer_len = 0;
753     unsigned int xcb_block_len = 0;
754     unsigned int xcb_pad = 0;
755     unsigned int xcb_align_to = 0;
756 
757 
758     xcb_block_len += sizeof(xcb_xkb_key_sym_map_t);
759     xcb_tmp += xcb_block_len;
760     xcb_buffer_len += xcb_block_len;
761     xcb_block_len = 0;
762     /* syms */
763     xcb_block_len += _aux->nSyms * sizeof(xcb_keysym_t);
764     xcb_tmp += xcb_block_len;
765     xcb_align_to = ALIGNOF(xcb_keysym_t);
766     /* insert padding */
767     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
768     xcb_buffer_len += xcb_block_len + xcb_pad;
769     if (0 != xcb_pad) {
770         xcb_tmp += xcb_pad;
771         xcb_pad = 0;
772     }
773     xcb_block_len = 0;
774 
775     return xcb_buffer_len;
776 }
777 
778 
779 /*****************************************************************************
780  **
781  ** xcb_keysym_t * xcb_xkb_key_sym_map_syms
782  **
783  ** @param const xcb_xkb_key_sym_map_t *R
784  ** @returns xcb_keysym_t *
785  **
786  *****************************************************************************/
787 
788 xcb_keysym_t *
789 xcb_xkb_key_sym_map_syms (const xcb_xkb_key_sym_map_t *R  /**< */)
790 {
791     return (xcb_keysym_t *) (R + 1);
792 }
793 
794 
795 /*****************************************************************************
796  **
797  ** int xcb_xkb_key_sym_map_syms_length
798  **
799  ** @param const xcb_xkb_key_sym_map_t *R
800  ** @returns int
801  **
802  *****************************************************************************/
803 
804 int
805 xcb_xkb_key_sym_map_syms_length (const xcb_xkb_key_sym_map_t *R  /**< */)
806 {
807     return R->nSyms;
808 }
809 
810 
811 /*****************************************************************************
812  **
813  ** xcb_generic_iterator_t xcb_xkb_key_sym_map_syms_end
814  **
815  ** @param const xcb_xkb_key_sym_map_t *R
816  ** @returns xcb_generic_iterator_t
817  **
818  *****************************************************************************/
819 
820 xcb_generic_iterator_t
821 xcb_xkb_key_sym_map_syms_end (const xcb_xkb_key_sym_map_t *R  /**< */)
822 {
823     xcb_generic_iterator_t i;
824     i.data = ((xcb_keysym_t *) (R + 1)) + (R->nSyms);
825     i.rem = 0;
826     i.index = (char *) i.data - (char *) R;
827     return i;
828 }
829 
830 
831 /*****************************************************************************
832  **
833  ** void xcb_xkb_key_sym_map_next
834  **
835  ** @param xcb_xkb_key_sym_map_iterator_t *i
836  ** @returns void
837  **
838  *****************************************************************************/
839 
840 void
841 xcb_xkb_key_sym_map_next (xcb_xkb_key_sym_map_iterator_t *i  /**< */)
842 {
843     xcb_xkb_key_sym_map_t *R = i->data;
844     xcb_generic_iterator_t child;
845     child.data = (xcb_xkb_key_sym_map_t *)(((char *)R) + xcb_xkb_key_sym_map_sizeof(R));
846     i->index = (char *) child.data - (char *) i->data;
847     --i->rem;
848     i->data = (xcb_xkb_key_sym_map_t *) child.data;
849 }
850 
851 
852 /*****************************************************************************
853  **
854  ** xcb_generic_iterator_t xcb_xkb_key_sym_map_end
855  **
856  ** @param xcb_xkb_key_sym_map_iterator_t i
857  ** @returns xcb_generic_iterator_t
858  **
859  *****************************************************************************/
860 
861 xcb_generic_iterator_t
862 xcb_xkb_key_sym_map_end (xcb_xkb_key_sym_map_iterator_t i  /**< */)
863 {
864     xcb_generic_iterator_t ret;
865     while(i.rem > 0)
866         xcb_xkb_key_sym_map_next(&i);
867     ret.data = i.data;
868     ret.rem = i.rem;
869     ret.index = i.index;
870     return ret;
871 }
872 
873 
874 /*****************************************************************************
875  **
876  ** void xcb_xkb_common_behavior_next
877  **
878  ** @param xcb_xkb_common_behavior_iterator_t *i
879  ** @returns void
880  **
881  *****************************************************************************/
882 
883 void
884 xcb_xkb_common_behavior_next (xcb_xkb_common_behavior_iterator_t *i  /**< */)
885 {
886     --i->rem;
887     ++i->data;
888     i->index += sizeof(xcb_xkb_common_behavior_t);
889 }
890 
891 
892 /*****************************************************************************
893  **
894  ** xcb_generic_iterator_t xcb_xkb_common_behavior_end
895  **
896  ** @param xcb_xkb_common_behavior_iterator_t i
897  ** @returns xcb_generic_iterator_t
898  **
899  *****************************************************************************/
900 
901 xcb_generic_iterator_t
902 xcb_xkb_common_behavior_end (xcb_xkb_common_behavior_iterator_t i  /**< */)
903 {
904     xcb_generic_iterator_t ret;
905     ret.data = i.data + i.rem;
906     ret.index = i.index + ((char *) ret.data - (char *) i.data);
907     ret.rem = 0;
908     return ret;
909 }
910 
911 
912 /*****************************************************************************
913  **
914  ** void xcb_xkb_default_behavior_next
915  **
916  ** @param xcb_xkb_default_behavior_iterator_t *i
917  ** @returns void
918  **
919  *****************************************************************************/
920 
921 void
922 xcb_xkb_default_behavior_next (xcb_xkb_default_behavior_iterator_t *i  /**< */)
923 {
924     --i->rem;
925     ++i->data;
926     i->index += sizeof(xcb_xkb_default_behavior_t);
927 }
928 
929 
930 /*****************************************************************************
931  **
932  ** xcb_generic_iterator_t xcb_xkb_default_behavior_end
933  **
934  ** @param xcb_xkb_default_behavior_iterator_t i
935  ** @returns xcb_generic_iterator_t
936  **
937  *****************************************************************************/
938 
939 xcb_generic_iterator_t
940 xcb_xkb_default_behavior_end (xcb_xkb_default_behavior_iterator_t i  /**< */)
941 {
942     xcb_generic_iterator_t ret;
943     ret.data = i.data + i.rem;
944     ret.index = i.index + ((char *) ret.data - (char *) i.data);
945     ret.rem = 0;
946     return ret;
947 }
948 
949 
950 /*****************************************************************************
951  **
952  ** void xcb_xkb_lock_behavior_next
953  **
954  ** @param xcb_xkb_lock_behavior_iterator_t *i
955  ** @returns void
956  **
957  *****************************************************************************/
958 
959 void
960 xcb_xkb_lock_behavior_next (xcb_xkb_lock_behavior_iterator_t *i  /**< */)
961 {
962     --i->rem;
963     ++i->data;
964     i->index += sizeof(xcb_xkb_lock_behavior_t);
965 }
966 
967 
968 /*****************************************************************************
969  **
970  ** xcb_generic_iterator_t xcb_xkb_lock_behavior_end
971  **
972  ** @param xcb_xkb_lock_behavior_iterator_t i
973  ** @returns xcb_generic_iterator_t
974  **
975  *****************************************************************************/
976 
977 xcb_generic_iterator_t
978 xcb_xkb_lock_behavior_end (xcb_xkb_lock_behavior_iterator_t i  /**< */)
979 {
980     xcb_generic_iterator_t ret;
981     ret.data = i.data + i.rem;
982     ret.index = i.index + ((char *) ret.data - (char *) i.data);
983     ret.rem = 0;
984     return ret;
985 }
986 
987 
988 /*****************************************************************************
989  **
990  ** void xcb_xkb_radio_group_behavior_next
991  **
992  ** @param xcb_xkb_radio_group_behavior_iterator_t *i
993  ** @returns void
994  **
995  *****************************************************************************/
996 
997 void
998 xcb_xkb_radio_group_behavior_next (xcb_xkb_radio_group_behavior_iterator_t *i  /**< */)
999 {
1000     --i->rem;
1001     ++i->data;
1002     i->index += sizeof(xcb_xkb_radio_group_behavior_t);
1003 }
1004 
1005 
1006 /*****************************************************************************
1007  **
1008  ** xcb_generic_iterator_t xcb_xkb_radio_group_behavior_end
1009  **
1010  ** @param xcb_xkb_radio_group_behavior_iterator_t i
1011  ** @returns xcb_generic_iterator_t
1012  **
1013  *****************************************************************************/
1014 
1015 xcb_generic_iterator_t
1016 xcb_xkb_radio_group_behavior_end (xcb_xkb_radio_group_behavior_iterator_t i  /**< */)
1017 {
1018     xcb_generic_iterator_t ret;
1019     ret.data = i.data + i.rem;
1020     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1021     ret.rem = 0;
1022     return ret;
1023 }
1024 
1025 
1026 /*****************************************************************************
1027  **
1028  ** void xcb_xkb_overlay_behavior_next
1029  **
1030  ** @param xcb_xkb_overlay_behavior_iterator_t *i
1031  ** @returns void
1032  **
1033  *****************************************************************************/
1034 
1035 void
1036 xcb_xkb_overlay_behavior_next (xcb_xkb_overlay_behavior_iterator_t *i  /**< */)
1037 {
1038     --i->rem;
1039     ++i->data;
1040     i->index += sizeof(xcb_xkb_overlay_behavior_t);
1041 }
1042 
1043 
1044 /*****************************************************************************
1045  **
1046  ** xcb_generic_iterator_t xcb_xkb_overlay_behavior_end
1047  **
1048  ** @param xcb_xkb_overlay_behavior_iterator_t i
1049  ** @returns xcb_generic_iterator_t
1050  **
1051  *****************************************************************************/
1052 
1053 xcb_generic_iterator_t
1054 xcb_xkb_overlay_behavior_end (xcb_xkb_overlay_behavior_iterator_t i  /**< */)
1055 {
1056     xcb_generic_iterator_t ret;
1057     ret.data = i.data + i.rem;
1058     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1059     ret.rem = 0;
1060     return ret;
1061 }
1062 
1063 
1064 /*****************************************************************************
1065  **
1066  ** void xcb_xkb_permament_lock_behavior_next
1067  **
1068  ** @param xcb_xkb_permament_lock_behavior_iterator_t *i
1069  ** @returns void
1070  **
1071  *****************************************************************************/
1072 
1073 void
1074 xcb_xkb_permament_lock_behavior_next (xcb_xkb_permament_lock_behavior_iterator_t *i  /**< */)
1075 {
1076     --i->rem;
1077     ++i->data;
1078     i->index += sizeof(xcb_xkb_permament_lock_behavior_t);
1079 }
1080 
1081 
1082 /*****************************************************************************
1083  **
1084  ** xcb_generic_iterator_t xcb_xkb_permament_lock_behavior_end
1085  **
1086  ** @param xcb_xkb_permament_lock_behavior_iterator_t i
1087  ** @returns xcb_generic_iterator_t
1088  **
1089  *****************************************************************************/
1090 
1091 xcb_generic_iterator_t
1092 xcb_xkb_permament_lock_behavior_end (xcb_xkb_permament_lock_behavior_iterator_t i  /**< */)
1093 {
1094     xcb_generic_iterator_t ret;
1095     ret.data = i.data + i.rem;
1096     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1097     ret.rem = 0;
1098     return ret;
1099 }
1100 
1101 
1102 /*****************************************************************************
1103  **
1104  ** void xcb_xkb_permament_radio_group_behavior_next
1105  **
1106  ** @param xcb_xkb_permament_radio_group_behavior_iterator_t *i
1107  ** @returns void
1108  **
1109  *****************************************************************************/
1110 
1111 void
1112 xcb_xkb_permament_radio_group_behavior_next (xcb_xkb_permament_radio_group_behavior_iterator_t *i  /**< */)
1113 {
1114     --i->rem;
1115     ++i->data;
1116     i->index += sizeof(xcb_xkb_permament_radio_group_behavior_t);
1117 }
1118 
1119 
1120 /*****************************************************************************
1121  **
1122  ** xcb_generic_iterator_t xcb_xkb_permament_radio_group_behavior_end
1123  **
1124  ** @param xcb_xkb_permament_radio_group_behavior_iterator_t i
1125  ** @returns xcb_generic_iterator_t
1126  **
1127  *****************************************************************************/
1128 
1129 xcb_generic_iterator_t
1130 xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavior_iterator_t i  /**< */)
1131 {
1132     xcb_generic_iterator_t ret;
1133     ret.data = i.data + i.rem;
1134     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1135     ret.rem = 0;
1136     return ret;
1137 }
1138 
1139 
1140 /*****************************************************************************
1141  **
1142  ** void xcb_xkb_permament_overlay_behavior_next
1143  **
1144  ** @param xcb_xkb_permament_overlay_behavior_iterator_t *i
1145  ** @returns void
1146  **
1147  *****************************************************************************/
1148 
1149 void
1150 xcb_xkb_permament_overlay_behavior_next (xcb_xkb_permament_overlay_behavior_iterator_t *i  /**< */)
1151 {
1152     --i->rem;
1153     ++i->data;
1154     i->index += sizeof(xcb_xkb_permament_overlay_behavior_t);
1155 }
1156 
1157 
1158 /*****************************************************************************
1159  **
1160  ** xcb_generic_iterator_t xcb_xkb_permament_overlay_behavior_end
1161  **
1162  ** @param xcb_xkb_permament_overlay_behavior_iterator_t i
1163  ** @returns xcb_generic_iterator_t
1164  **
1165  *****************************************************************************/
1166 
1167 xcb_generic_iterator_t
1168 xcb_xkb_permament_overlay_behavior_end (xcb_xkb_permament_overlay_behavior_iterator_t i  /**< */)
1169 {
1170     xcb_generic_iterator_t ret;
1171     ret.data = i.data + i.rem;
1172     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1173     ret.rem = 0;
1174     return ret;
1175 }
1176 
1177 
1178 /*****************************************************************************
1179  **
1180  ** void xcb_xkb_behavior_next
1181  **
1182  ** @param xcb_xkb_behavior_iterator_t *i
1183  ** @returns void
1184  **
1185  *****************************************************************************/
1186 
1187 void
1188 xcb_xkb_behavior_next (xcb_xkb_behavior_iterator_t *i  /**< */)
1189 {
1190     --i->rem;
1191     ++i->data;
1192     i->index += sizeof(xcb_xkb_behavior_t);
1193 }
1194 
1195 
1196 /*****************************************************************************
1197  **
1198  ** xcb_generic_iterator_t xcb_xkb_behavior_end
1199  **
1200  ** @param xcb_xkb_behavior_iterator_t i
1201  ** @returns xcb_generic_iterator_t
1202  **
1203  *****************************************************************************/
1204 
1205 xcb_generic_iterator_t
1206 xcb_xkb_behavior_end (xcb_xkb_behavior_iterator_t i  /**< */)
1207 {
1208     xcb_generic_iterator_t ret;
1209     ret.data = i.data + i.rem;
1210     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1211     ret.rem = 0;
1212     return ret;
1213 }
1214 
1215 
1216 /*****************************************************************************
1217  **
1218  ** void xcb_xkb_set_behavior_next
1219  **
1220  ** @param xcb_xkb_set_behavior_iterator_t *i
1221  ** @returns void
1222  **
1223  *****************************************************************************/
1224 
1225 void
1226 xcb_xkb_set_behavior_next (xcb_xkb_set_behavior_iterator_t *i  /**< */)
1227 {
1228     --i->rem;
1229     ++i->data;
1230     i->index += sizeof(xcb_xkb_set_behavior_t);
1231 }
1232 
1233 
1234 /*****************************************************************************
1235  **
1236  ** xcb_generic_iterator_t xcb_xkb_set_behavior_end
1237  **
1238  ** @param xcb_xkb_set_behavior_iterator_t i
1239  ** @returns xcb_generic_iterator_t
1240  **
1241  *****************************************************************************/
1242 
1243 xcb_generic_iterator_t
1244 xcb_xkb_set_behavior_end (xcb_xkb_set_behavior_iterator_t i  /**< */)
1245 {
1246     xcb_generic_iterator_t ret;
1247     ret.data = i.data + i.rem;
1248     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1249     ret.rem = 0;
1250     return ret;
1251 }
1252 
1253 
1254 /*****************************************************************************
1255  **
1256  ** void xcb_xkb_set_explicit_next
1257  **
1258  ** @param xcb_xkb_set_explicit_iterator_t *i
1259  ** @returns void
1260  **
1261  *****************************************************************************/
1262 
1263 void
1264 xcb_xkb_set_explicit_next (xcb_xkb_set_explicit_iterator_t *i  /**< */)
1265 {
1266     --i->rem;
1267     ++i->data;
1268     i->index += sizeof(xcb_xkb_set_explicit_t);
1269 }
1270 
1271 
1272 /*****************************************************************************
1273  **
1274  ** xcb_generic_iterator_t xcb_xkb_set_explicit_end
1275  **
1276  ** @param xcb_xkb_set_explicit_iterator_t i
1277  ** @returns xcb_generic_iterator_t
1278  **
1279  *****************************************************************************/
1280 
1281 xcb_generic_iterator_t
1282 xcb_xkb_set_explicit_end (xcb_xkb_set_explicit_iterator_t i  /**< */)
1283 {
1284     xcb_generic_iterator_t ret;
1285     ret.data = i.data + i.rem;
1286     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1287     ret.rem = 0;
1288     return ret;
1289 }
1290 
1291 
1292 /*****************************************************************************
1293  **
1294  ** void xcb_xkb_key_mod_map_next
1295  **
1296  ** @param xcb_xkb_key_mod_map_iterator_t *i
1297  ** @returns void
1298  **
1299  *****************************************************************************/
1300 
1301 void
1302 xcb_xkb_key_mod_map_next (xcb_xkb_key_mod_map_iterator_t *i  /**< */)
1303 {
1304     --i->rem;
1305     ++i->data;
1306     i->index += sizeof(xcb_xkb_key_mod_map_t);
1307 }
1308 
1309 
1310 /*****************************************************************************
1311  **
1312  ** xcb_generic_iterator_t xcb_xkb_key_mod_map_end
1313  **
1314  ** @param xcb_xkb_key_mod_map_iterator_t i
1315  ** @returns xcb_generic_iterator_t
1316  **
1317  *****************************************************************************/
1318 
1319 xcb_generic_iterator_t
1320 xcb_xkb_key_mod_map_end (xcb_xkb_key_mod_map_iterator_t i  /**< */)
1321 {
1322     xcb_generic_iterator_t ret;
1323     ret.data = i.data + i.rem;
1324     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1325     ret.rem = 0;
1326     return ret;
1327 }
1328 
1329 
1330 /*****************************************************************************
1331  **
1332  ** void xcb_xkb_key_v_mod_map_next
1333  **
1334  ** @param xcb_xkb_key_v_mod_map_iterator_t *i
1335  ** @returns void
1336  **
1337  *****************************************************************************/
1338 
1339 void
1340 xcb_xkb_key_v_mod_map_next (xcb_xkb_key_v_mod_map_iterator_t *i  /**< */)
1341 {
1342     --i->rem;
1343     ++i->data;
1344     i->index += sizeof(xcb_xkb_key_v_mod_map_t);
1345 }
1346 
1347 
1348 /*****************************************************************************
1349  **
1350  ** xcb_generic_iterator_t xcb_xkb_key_v_mod_map_end
1351  **
1352  ** @param xcb_xkb_key_v_mod_map_iterator_t i
1353  ** @returns xcb_generic_iterator_t
1354  **
1355  *****************************************************************************/
1356 
1357 xcb_generic_iterator_t
1358 xcb_xkb_key_v_mod_map_end (xcb_xkb_key_v_mod_map_iterator_t i  /**< */)
1359 {
1360     xcb_generic_iterator_t ret;
1361     ret.data = i.data + i.rem;
1362     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1363     ret.rem = 0;
1364     return ret;
1365 }
1366 
1367 
1368 /*****************************************************************************
1369  **
1370  ** void xcb_xkb_kt_set_map_entry_next
1371  **
1372  ** @param xcb_xkb_kt_set_map_entry_iterator_t *i
1373  ** @returns void
1374  **
1375  *****************************************************************************/
1376 
1377 void
1378 xcb_xkb_kt_set_map_entry_next (xcb_xkb_kt_set_map_entry_iterator_t *i  /**< */)
1379 {
1380     --i->rem;
1381     ++i->data;
1382     i->index += sizeof(xcb_xkb_kt_set_map_entry_t);
1383 }
1384 
1385 
1386 /*****************************************************************************
1387  **
1388  ** xcb_generic_iterator_t xcb_xkb_kt_set_map_entry_end
1389  **
1390  ** @param xcb_xkb_kt_set_map_entry_iterator_t i
1391  ** @returns xcb_generic_iterator_t
1392  **
1393  *****************************************************************************/
1394 
1395 xcb_generic_iterator_t
1396 xcb_xkb_kt_set_map_entry_end (xcb_xkb_kt_set_map_entry_iterator_t i  /**< */)
1397 {
1398     xcb_generic_iterator_t ret;
1399     ret.data = i.data + i.rem;
1400     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1401     ret.rem = 0;
1402     return ret;
1403 }
1404 
1405 int
1406 xcb_xkb_set_key_type_sizeof (const void  *_buffer  /**< */)
1407 {
1408     char *xcb_tmp = (char *)_buffer;
1409     const xcb_xkb_set_key_type_t *_aux = (xcb_xkb_set_key_type_t *)_buffer;
1410     unsigned int xcb_buffer_len = 0;
1411     unsigned int xcb_block_len = 0;
1412     unsigned int xcb_pad = 0;
1413     unsigned int xcb_align_to = 0;
1414 
1415 
1416     xcb_block_len += sizeof(xcb_xkb_set_key_type_t);
1417     xcb_tmp += xcb_block_len;
1418     xcb_buffer_len += xcb_block_len;
1419     xcb_block_len = 0;
1420     /* entries */
1421     xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_set_map_entry_t);
1422     xcb_tmp += xcb_block_len;
1423     xcb_align_to = ALIGNOF(xcb_xkb_kt_set_map_entry_t);
1424     /* insert padding */
1425     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1426     xcb_buffer_len += xcb_block_len + xcb_pad;
1427     if (0 != xcb_pad) {
1428         xcb_tmp += xcb_pad;
1429         xcb_pad = 0;
1430     }
1431     xcb_block_len = 0;
1432     /* preserve_entries */
1433     xcb_block_len += (_aux->preserve * _aux->nMapEntries) * sizeof(xcb_xkb_kt_set_map_entry_t);
1434     xcb_tmp += xcb_block_len;
1435     xcb_align_to = ALIGNOF(xcb_xkb_kt_set_map_entry_t);
1436     /* insert padding */
1437     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1438     xcb_buffer_len += xcb_block_len + xcb_pad;
1439     if (0 != xcb_pad) {
1440         xcb_tmp += xcb_pad;
1441         xcb_pad = 0;
1442     }
1443     xcb_block_len = 0;
1444 
1445     return xcb_buffer_len;
1446 }
1447 
1448 
1449 /*****************************************************************************
1450  **
1451  ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_entries
1452  **
1453  ** @param const xcb_xkb_set_key_type_t *R
1454  ** @returns xcb_xkb_kt_set_map_entry_t *
1455  **
1456  *****************************************************************************/
1457 
1458 xcb_xkb_kt_set_map_entry_t *
1459 xcb_xkb_set_key_type_entries (const xcb_xkb_set_key_type_t *R  /**< */)
1460 {
1461     return (xcb_xkb_kt_set_map_entry_t *) (R + 1);
1462 }
1463 
1464 
1465 /*****************************************************************************
1466  **
1467  ** int xcb_xkb_set_key_type_entries_length
1468  **
1469  ** @param const xcb_xkb_set_key_type_t *R
1470  ** @returns int
1471  **
1472  *****************************************************************************/
1473 
1474 int
1475 xcb_xkb_set_key_type_entries_length (const xcb_xkb_set_key_type_t *R  /**< */)
1476 {
1477     return R->nMapEntries;
1478 }
1479 
1480 
1481 /*****************************************************************************
1482  **
1483  ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_entries_iterator
1484  **
1485  ** @param const xcb_xkb_set_key_type_t *R
1486  ** @returns xcb_xkb_kt_set_map_entry_iterator_t
1487  **
1488  *****************************************************************************/
1489 
1490 xcb_xkb_kt_set_map_entry_iterator_t
1491 xcb_xkb_set_key_type_entries_iterator (const xcb_xkb_set_key_type_t *R  /**< */)
1492 {
1493     xcb_xkb_kt_set_map_entry_iterator_t i;
1494     i.data = (xcb_xkb_kt_set_map_entry_t *) (R + 1);
1495     i.rem = R->nMapEntries;
1496     i.index = (char *) i.data - (char *) R;
1497     return i;
1498 }
1499 
1500 
1501 /*****************************************************************************
1502  **
1503  ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_preserve_entries
1504  **
1505  ** @param const xcb_xkb_set_key_type_t *R
1506  ** @returns xcb_xkb_kt_set_map_entry_t *
1507  **
1508  *****************************************************************************/
1509 
1510 xcb_xkb_kt_set_map_entry_t *
1511 xcb_xkb_set_key_type_preserve_entries (const xcb_xkb_set_key_type_t *R  /**< */)
1512 {
1513     xcb_generic_iterator_t prev = xcb_xkb_kt_set_map_entry_end(xcb_xkb_set_key_type_entries_iterator(R));
1514     return (xcb_xkb_kt_set_map_entry_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_kt_set_map_entry_t, prev.index) + 0);
1515 }
1516 
1517 
1518 /*****************************************************************************
1519  **
1520  ** int xcb_xkb_set_key_type_preserve_entries_length
1521  **
1522  ** @param const xcb_xkb_set_key_type_t *R
1523  ** @returns int
1524  **
1525  *****************************************************************************/
1526 
1527 int
1528 xcb_xkb_set_key_type_preserve_entries_length (const xcb_xkb_set_key_type_t *R  /**< */)
1529 {
1530     return (R->preserve * R->nMapEntries);
1531 }
1532 
1533 
1534 /*****************************************************************************
1535  **
1536  ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_preserve_entries_iterator
1537  **
1538  ** @param const xcb_xkb_set_key_type_t *R
1539  ** @returns xcb_xkb_kt_set_map_entry_iterator_t
1540  **
1541  *****************************************************************************/
1542 
1543 xcb_xkb_kt_set_map_entry_iterator_t
1544 xcb_xkb_set_key_type_preserve_entries_iterator (const xcb_xkb_set_key_type_t *R  /**< */)
1545 {
1546     xcb_xkb_kt_set_map_entry_iterator_t i;
1547     xcb_generic_iterator_t prev = xcb_xkb_kt_set_map_entry_end(xcb_xkb_set_key_type_entries_iterator(R));
1548     i.data = (xcb_xkb_kt_set_map_entry_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_kt_set_map_entry_t, prev.index));
1549     i.rem = (R->preserve * R->nMapEntries);
1550     i.index = (char *) i.data - (char *) R;
1551     return i;
1552 }
1553 
1554 
1555 /*****************************************************************************
1556  **
1557  ** void xcb_xkb_set_key_type_next
1558  **
1559  ** @param xcb_xkb_set_key_type_iterator_t *i
1560  ** @returns void
1561  **
1562  *****************************************************************************/
1563 
1564 void
1565 xcb_xkb_set_key_type_next (xcb_xkb_set_key_type_iterator_t *i  /**< */)
1566 {
1567     xcb_xkb_set_key_type_t *R = i->data;
1568     xcb_generic_iterator_t child;
1569     child.data = (xcb_xkb_set_key_type_t *)(((char *)R) + xcb_xkb_set_key_type_sizeof(R));
1570     i->index = (char *) child.data - (char *) i->data;
1571     --i->rem;
1572     i->data = (xcb_xkb_set_key_type_t *) child.data;
1573 }
1574 
1575 
1576 /*****************************************************************************
1577  **
1578  ** xcb_generic_iterator_t xcb_xkb_set_key_type_end
1579  **
1580  ** @param xcb_xkb_set_key_type_iterator_t i
1581  ** @returns xcb_generic_iterator_t
1582  **
1583  *****************************************************************************/
1584 
1585 xcb_generic_iterator_t
1586 xcb_xkb_set_key_type_end (xcb_xkb_set_key_type_iterator_t i  /**< */)
1587 {
1588     xcb_generic_iterator_t ret;
1589     while(i.rem > 0)
1590         xcb_xkb_set_key_type_next(&i);
1591     ret.data = i.data;
1592     ret.rem = i.rem;
1593     ret.index = i.index;
1594     return ret;
1595 }
1596 
1597 
1598 /*****************************************************************************
1599  **
1600  ** void xcb_xkb_string8_next
1601  **
1602  ** @param xcb_xkb_string8_iterator_t *i
1603  ** @returns void
1604  **
1605  *****************************************************************************/
1606 
1607 void
1608 xcb_xkb_string8_next (xcb_xkb_string8_iterator_t *i  /**< */)
1609 {
1610     --i->rem;
1611     ++i->data;
1612     i->index += sizeof(xcb_xkb_string8_t);
1613 }
1614 
1615 
1616 /*****************************************************************************
1617  **
1618  ** xcb_generic_iterator_t xcb_xkb_string8_end
1619  **
1620  ** @param xcb_xkb_string8_iterator_t i
1621  ** @returns xcb_generic_iterator_t
1622  **
1623  *****************************************************************************/
1624 
1625 xcb_generic_iterator_t
1626 xcb_xkb_string8_end (xcb_xkb_string8_iterator_t i  /**< */)
1627 {
1628     xcb_generic_iterator_t ret;
1629     ret.data = i.data + i.rem;
1630     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1631     ret.rem = 0;
1632     return ret;
1633 }
1634 
1635 int
1636 xcb_xkb_outline_sizeof (const void  *_buffer  /**< */)
1637 {
1638     char *xcb_tmp = (char *)_buffer;
1639     const xcb_xkb_outline_t *_aux = (xcb_xkb_outline_t *)_buffer;
1640     unsigned int xcb_buffer_len = 0;
1641     unsigned int xcb_block_len = 0;
1642     unsigned int xcb_pad = 0;
1643     unsigned int xcb_align_to = 0;
1644 
1645 
1646     xcb_block_len += sizeof(xcb_xkb_outline_t);
1647     xcb_tmp += xcb_block_len;
1648     xcb_buffer_len += xcb_block_len;
1649     xcb_block_len = 0;
1650     /* points */
1651     xcb_block_len += _aux->nPoints * sizeof(xcb_point_t);
1652     xcb_tmp += xcb_block_len;
1653     xcb_align_to = ALIGNOF(xcb_point_t);
1654     /* insert padding */
1655     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1656     xcb_buffer_len += xcb_block_len + xcb_pad;
1657     if (0 != xcb_pad) {
1658         xcb_tmp += xcb_pad;
1659         xcb_pad = 0;
1660     }
1661     xcb_block_len = 0;
1662 
1663     return xcb_buffer_len;
1664 }
1665 
1666 
1667 /*****************************************************************************
1668  **
1669  ** xcb_point_t * xcb_xkb_outline_points
1670  **
1671  ** @param const xcb_xkb_outline_t *R
1672  ** @returns xcb_point_t *
1673  **
1674  *****************************************************************************/
1675 
1676 xcb_point_t *
1677 xcb_xkb_outline_points (const xcb_xkb_outline_t *R  /**< */)
1678 {
1679     return (xcb_point_t *) (R + 1);
1680 }
1681 
1682 
1683 /*****************************************************************************
1684  **
1685  ** int xcb_xkb_outline_points_length
1686  **
1687  ** @param const xcb_xkb_outline_t *R
1688  ** @returns int
1689  **
1690  *****************************************************************************/
1691 
1692 int
1693 xcb_xkb_outline_points_length (const xcb_xkb_outline_t *R  /**< */)
1694 {
1695     return R->nPoints;
1696 }
1697 
1698 
1699 /*****************************************************************************
1700  **
1701  ** xcb_point_iterator_t xcb_xkb_outline_points_iterator
1702  **
1703  ** @param const xcb_xkb_outline_t *R
1704  ** @returns xcb_point_iterator_t
1705  **
1706  *****************************************************************************/
1707 
1708 xcb_point_iterator_t
1709 xcb_xkb_outline_points_iterator (const xcb_xkb_outline_t *R  /**< */)
1710 {
1711     xcb_point_iterator_t i;
1712     i.data = (xcb_point_t *) (R + 1);
1713     i.rem = R->nPoints;
1714     i.index = (char *) i.data - (char *) R;
1715     return i;
1716 }
1717 
1718 
1719 /*****************************************************************************
1720  **
1721  ** void xcb_xkb_outline_next
1722  **
1723  ** @param xcb_xkb_outline_iterator_t *i
1724  ** @returns void
1725  **
1726  *****************************************************************************/
1727 
1728 void
1729 xcb_xkb_outline_next (xcb_xkb_outline_iterator_t *i  /**< */)
1730 {
1731     xcb_xkb_outline_t *R = i->data;
1732     xcb_generic_iterator_t child;
1733     child.data = (xcb_xkb_outline_t *)(((char *)R) + xcb_xkb_outline_sizeof(R));
1734     i->index = (char *) child.data - (char *) i->data;
1735     --i->rem;
1736     i->data = (xcb_xkb_outline_t *) child.data;
1737 }
1738 
1739 
1740 /*****************************************************************************
1741  **
1742  ** xcb_generic_iterator_t xcb_xkb_outline_end
1743  **
1744  ** @param xcb_xkb_outline_iterator_t i
1745  ** @returns xcb_generic_iterator_t
1746  **
1747  *****************************************************************************/
1748 
1749 xcb_generic_iterator_t
1750 xcb_xkb_outline_end (xcb_xkb_outline_iterator_t i  /**< */)
1751 {
1752     xcb_generic_iterator_t ret;
1753     while(i.rem > 0)
1754         xcb_xkb_outline_next(&i);
1755     ret.data = i.data;
1756     ret.rem = i.rem;
1757     ret.index = i.index;
1758     return ret;
1759 }
1760 
1761 int
1762 xcb_xkb_shape_sizeof (const void  *_buffer  /**< */)
1763 {
1764     char *xcb_tmp = (char *)_buffer;
1765     const xcb_xkb_shape_t *_aux = (xcb_xkb_shape_t *)_buffer;
1766     unsigned int xcb_buffer_len = 0;
1767     unsigned int xcb_block_len = 0;
1768     unsigned int xcb_pad = 0;
1769     unsigned int xcb_align_to = 0;
1770 
1771     unsigned int i;
1772     unsigned int xcb_tmp_len;
1773 
1774     xcb_block_len += sizeof(xcb_xkb_shape_t);
1775     xcb_tmp += xcb_block_len;
1776     xcb_buffer_len += xcb_block_len;
1777     xcb_block_len = 0;
1778     /* outlines */
1779     for(i=0; i<_aux->nOutlines; i++) {
1780         xcb_tmp_len = xcb_xkb_outline_sizeof(xcb_tmp);
1781         xcb_block_len += xcb_tmp_len;
1782         xcb_tmp += xcb_tmp_len;
1783     }
1784     xcb_align_to = ALIGNOF(xcb_xkb_outline_t);
1785     /* insert padding */
1786     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1787     xcb_buffer_len += xcb_block_len + xcb_pad;
1788     if (0 != xcb_pad) {
1789         xcb_tmp += xcb_pad;
1790         xcb_pad = 0;
1791     }
1792     xcb_block_len = 0;
1793 
1794     return xcb_buffer_len;
1795 }
1796 
1797 
1798 /*****************************************************************************
1799  **
1800  ** int xcb_xkb_shape_outlines_length
1801  **
1802  ** @param const xcb_xkb_shape_t *R
1803  ** @returns int
1804  **
1805  *****************************************************************************/
1806 
1807 int
1808 xcb_xkb_shape_outlines_length (const xcb_xkb_shape_t *R  /**< */)
1809 {
1810     return R->nOutlines;
1811 }
1812 
1813 
1814 /*****************************************************************************
1815  **
1816  ** xcb_xkb_outline_iterator_t xcb_xkb_shape_outlines_iterator
1817  **
1818  ** @param const xcb_xkb_shape_t *R
1819  ** @returns xcb_xkb_outline_iterator_t
1820  **
1821  *****************************************************************************/
1822 
1823 xcb_xkb_outline_iterator_t
1824 xcb_xkb_shape_outlines_iterator (const xcb_xkb_shape_t *R  /**< */)
1825 {
1826     xcb_xkb_outline_iterator_t i;
1827     i.data = (xcb_xkb_outline_t *) (R + 1);
1828     i.rem = R->nOutlines;
1829     i.index = (char *) i.data - (char *) R;
1830     return i;
1831 }
1832 
1833 
1834 /*****************************************************************************
1835  **
1836  ** void xcb_xkb_shape_next
1837  **
1838  ** @param xcb_xkb_shape_iterator_t *i
1839  ** @returns void
1840  **
1841  *****************************************************************************/
1842 
1843 void
1844 xcb_xkb_shape_next (xcb_xkb_shape_iterator_t *i  /**< */)
1845 {
1846     xcb_xkb_shape_t *R = i->data;
1847     xcb_generic_iterator_t child;
1848     child.data = (xcb_xkb_shape_t *)(((char *)R) + xcb_xkb_shape_sizeof(R));
1849     i->index = (char *) child.data - (char *) i->data;
1850     --i->rem;
1851     i->data = (xcb_xkb_shape_t *) child.data;
1852 }
1853 
1854 
1855 /*****************************************************************************
1856  **
1857  ** xcb_generic_iterator_t xcb_xkb_shape_end
1858  **
1859  ** @param xcb_xkb_shape_iterator_t i
1860  ** @returns xcb_generic_iterator_t
1861  **
1862  *****************************************************************************/
1863 
1864 xcb_generic_iterator_t
1865 xcb_xkb_shape_end (xcb_xkb_shape_iterator_t i  /**< */)
1866 {
1867     xcb_generic_iterator_t ret;
1868     while(i.rem > 0)
1869         xcb_xkb_shape_next(&i);
1870     ret.data = i.data;
1871     ret.rem = i.rem;
1872     ret.index = i.index;
1873     return ret;
1874 }
1875 
1876 
1877 /*****************************************************************************
1878  **
1879  ** void xcb_xkb_key_next
1880  **
1881  ** @param xcb_xkb_key_iterator_t *i
1882  ** @returns void
1883  **
1884  *****************************************************************************/
1885 
1886 void
1887 xcb_xkb_key_next (xcb_xkb_key_iterator_t *i  /**< */)
1888 {
1889     --i->rem;
1890     ++i->data;
1891     i->index += sizeof(xcb_xkb_key_t);
1892 }
1893 
1894 
1895 /*****************************************************************************
1896  **
1897  ** xcb_generic_iterator_t xcb_xkb_key_end
1898  **
1899  ** @param xcb_xkb_key_iterator_t i
1900  ** @returns xcb_generic_iterator_t
1901  **
1902  *****************************************************************************/
1903 
1904 xcb_generic_iterator_t
1905 xcb_xkb_key_end (xcb_xkb_key_iterator_t i  /**< */)
1906 {
1907     xcb_generic_iterator_t ret;
1908     ret.data = i.data + i.rem;
1909     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1910     ret.rem = 0;
1911     return ret;
1912 }
1913 
1914 
1915 /*****************************************************************************
1916  **
1917  ** void xcb_xkb_overlay_key_next
1918  **
1919  ** @param xcb_xkb_overlay_key_iterator_t *i
1920  ** @returns void
1921  **
1922  *****************************************************************************/
1923 
1924 void
1925 xcb_xkb_overlay_key_next (xcb_xkb_overlay_key_iterator_t *i  /**< */)
1926 {
1927     --i->rem;
1928     ++i->data;
1929     i->index += sizeof(xcb_xkb_overlay_key_t);
1930 }
1931 
1932 
1933 /*****************************************************************************
1934  **
1935  ** xcb_generic_iterator_t xcb_xkb_overlay_key_end
1936  **
1937  ** @param xcb_xkb_overlay_key_iterator_t i
1938  ** @returns xcb_generic_iterator_t
1939  **
1940  *****************************************************************************/
1941 
1942 xcb_generic_iterator_t
1943 xcb_xkb_overlay_key_end (xcb_xkb_overlay_key_iterator_t i  /**< */)
1944 {
1945     xcb_generic_iterator_t ret;
1946     ret.data = i.data + i.rem;
1947     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1948     ret.rem = 0;
1949     return ret;
1950 }
1951 
1952 int
1953 xcb_xkb_overlay_row_sizeof (const void  *_buffer  /**< */)
1954 {
1955     char *xcb_tmp = (char *)_buffer;
1956     const xcb_xkb_overlay_row_t *_aux = (xcb_xkb_overlay_row_t *)_buffer;
1957     unsigned int xcb_buffer_len = 0;
1958     unsigned int xcb_block_len = 0;
1959     unsigned int xcb_pad = 0;
1960     unsigned int xcb_align_to = 0;
1961 
1962 
1963     xcb_block_len += sizeof(xcb_xkb_overlay_row_t);
1964     xcb_tmp += xcb_block_len;
1965     xcb_buffer_len += xcb_block_len;
1966     xcb_block_len = 0;
1967     /* keys */
1968     xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_overlay_key_t);
1969     xcb_tmp += xcb_block_len;
1970     xcb_align_to = ALIGNOF(xcb_xkb_overlay_key_t);
1971     /* insert padding */
1972     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1973     xcb_buffer_len += xcb_block_len + xcb_pad;
1974     if (0 != xcb_pad) {
1975         xcb_tmp += xcb_pad;
1976         xcb_pad = 0;
1977     }
1978     xcb_block_len = 0;
1979 
1980     return xcb_buffer_len;
1981 }
1982 
1983 
1984 /*****************************************************************************
1985  **
1986  ** xcb_xkb_overlay_key_t * xcb_xkb_overlay_row_keys
1987  **
1988  ** @param const xcb_xkb_overlay_row_t *R
1989  ** @returns xcb_xkb_overlay_key_t *
1990  **
1991  *****************************************************************************/
1992 
1993 xcb_xkb_overlay_key_t *
1994 xcb_xkb_overlay_row_keys (const xcb_xkb_overlay_row_t *R  /**< */)
1995 {
1996     return (xcb_xkb_overlay_key_t *) (R + 1);
1997 }
1998 
1999 
2000 /*****************************************************************************
2001  **
2002  ** int xcb_xkb_overlay_row_keys_length
2003  **
2004  ** @param const xcb_xkb_overlay_row_t *R
2005  ** @returns int
2006  **
2007  *****************************************************************************/
2008 
2009 int
2010 xcb_xkb_overlay_row_keys_length (const xcb_xkb_overlay_row_t *R  /**< */)
2011 {
2012     return R->nKeys;
2013 }
2014 
2015 
2016 /*****************************************************************************
2017  **
2018  ** xcb_xkb_overlay_key_iterator_t xcb_xkb_overlay_row_keys_iterator
2019  **
2020  ** @param const xcb_xkb_overlay_row_t *R
2021  ** @returns xcb_xkb_overlay_key_iterator_t
2022  **
2023  *****************************************************************************/
2024 
2025 xcb_xkb_overlay_key_iterator_t
2026 xcb_xkb_overlay_row_keys_iterator (const xcb_xkb_overlay_row_t *R  /**< */)
2027 {
2028     xcb_xkb_overlay_key_iterator_t i;
2029     i.data = (xcb_xkb_overlay_key_t *) (R + 1);
2030     i.rem = R->nKeys;
2031     i.index = (char *) i.data - (char *) R;
2032     return i;
2033 }
2034 
2035 
2036 /*****************************************************************************
2037  **
2038  ** void xcb_xkb_overlay_row_next
2039  **
2040  ** @param xcb_xkb_overlay_row_iterator_t *i
2041  ** @returns void
2042  **
2043  *****************************************************************************/
2044 
2045 void
2046 xcb_xkb_overlay_row_next (xcb_xkb_overlay_row_iterator_t *i  /**< */)
2047 {
2048     xcb_xkb_overlay_row_t *R = i->data;
2049     xcb_generic_iterator_t child;
2050     child.data = (xcb_xkb_overlay_row_t *)(((char *)R) + xcb_xkb_overlay_row_sizeof(R));
2051     i->index = (char *) child.data - (char *) i->data;
2052     --i->rem;
2053     i->data = (xcb_xkb_overlay_row_t *) child.data;
2054 }
2055 
2056 
2057 /*****************************************************************************
2058  **
2059  ** xcb_generic_iterator_t xcb_xkb_overlay_row_end
2060  **
2061  ** @param xcb_xkb_overlay_row_iterator_t i
2062  ** @returns xcb_generic_iterator_t
2063  **
2064  *****************************************************************************/
2065 
2066 xcb_generic_iterator_t
2067 xcb_xkb_overlay_row_end (xcb_xkb_overlay_row_iterator_t i  /**< */)
2068 {
2069     xcb_generic_iterator_t ret;
2070     while(i.rem > 0)
2071         xcb_xkb_overlay_row_next(&i);
2072     ret.data = i.data;
2073     ret.rem = i.rem;
2074     ret.index = i.index;
2075     return ret;
2076 }
2077 
2078 int
2079 xcb_xkb_overlay_sizeof (const void  *_buffer  /**< */)
2080 {
2081     char *xcb_tmp = (char *)_buffer;
2082     const xcb_xkb_overlay_t *_aux = (xcb_xkb_overlay_t *)_buffer;
2083     unsigned int xcb_buffer_len = 0;
2084     unsigned int xcb_block_len = 0;
2085     unsigned int xcb_pad = 0;
2086     unsigned int xcb_align_to = 0;
2087 
2088     unsigned int i;
2089     unsigned int xcb_tmp_len;
2090 
2091     xcb_block_len += sizeof(xcb_xkb_overlay_t);
2092     xcb_tmp += xcb_block_len;
2093     xcb_buffer_len += xcb_block_len;
2094     xcb_block_len = 0;
2095     /* rows */
2096     for(i=0; i<_aux->nRows; i++) {
2097         xcb_tmp_len = xcb_xkb_overlay_row_sizeof(xcb_tmp);
2098         xcb_block_len += xcb_tmp_len;
2099         xcb_tmp += xcb_tmp_len;
2100     }
2101     xcb_align_to = ALIGNOF(xcb_xkb_overlay_row_t);
2102     /* insert padding */
2103     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2104     xcb_buffer_len += xcb_block_len + xcb_pad;
2105     if (0 != xcb_pad) {
2106         xcb_tmp += xcb_pad;
2107         xcb_pad = 0;
2108     }
2109     xcb_block_len = 0;
2110 
2111     return xcb_buffer_len;
2112 }
2113 
2114 
2115 /*****************************************************************************
2116  **
2117  ** int xcb_xkb_overlay_rows_length
2118  **
2119  ** @param const xcb_xkb_overlay_t *R
2120  ** @returns int
2121  **
2122  *****************************************************************************/
2123 
2124 int
2125 xcb_xkb_overlay_rows_length (const xcb_xkb_overlay_t *R  /**< */)
2126 {
2127     return R->nRows;
2128 }
2129 
2130 
2131 /*****************************************************************************
2132  **
2133  ** xcb_xkb_overlay_row_iterator_t xcb_xkb_overlay_rows_iterator
2134  **
2135  ** @param const xcb_xkb_overlay_t *R
2136  ** @returns xcb_xkb_overlay_row_iterator_t
2137  **
2138  *****************************************************************************/
2139 
2140 xcb_xkb_overlay_row_iterator_t
2141 xcb_xkb_overlay_rows_iterator (const xcb_xkb_overlay_t *R  /**< */)
2142 {
2143     xcb_xkb_overlay_row_iterator_t i;
2144     i.data = (xcb_xkb_overlay_row_t *) (R + 1);
2145     i.rem = R->nRows;
2146     i.index = (char *) i.data - (char *) R;
2147     return i;
2148 }
2149 
2150 
2151 /*****************************************************************************
2152  **
2153  ** void xcb_xkb_overlay_next
2154  **
2155  ** @param xcb_xkb_overlay_iterator_t *i
2156  ** @returns void
2157  **
2158  *****************************************************************************/
2159 
2160 void
2161 xcb_xkb_overlay_next (xcb_xkb_overlay_iterator_t *i  /**< */)
2162 {
2163     xcb_xkb_overlay_t *R = i->data;
2164     xcb_generic_iterator_t child;
2165     child.data = (xcb_xkb_overlay_t *)(((char *)R) + xcb_xkb_overlay_sizeof(R));
2166     i->index = (char *) child.data - (char *) i->data;
2167     --i->rem;
2168     i->data = (xcb_xkb_overlay_t *) child.data;
2169 }
2170 
2171 
2172 /*****************************************************************************
2173  **
2174  ** xcb_generic_iterator_t xcb_xkb_overlay_end
2175  **
2176  ** @param xcb_xkb_overlay_iterator_t i
2177  ** @returns xcb_generic_iterator_t
2178  **
2179  *****************************************************************************/
2180 
2181 xcb_generic_iterator_t
2182 xcb_xkb_overlay_end (xcb_xkb_overlay_iterator_t i  /**< */)
2183 {
2184     xcb_generic_iterator_t ret;
2185     while(i.rem > 0)
2186         xcb_xkb_overlay_next(&i);
2187     ret.data = i.data;
2188     ret.rem = i.rem;
2189     ret.index = i.index;
2190     return ret;
2191 }
2192 
2193 int
2194 xcb_xkb_row_sizeof (const void  *_buffer  /**< */)
2195 {
2196     char *xcb_tmp = (char *)_buffer;
2197     const xcb_xkb_row_t *_aux = (xcb_xkb_row_t *)_buffer;
2198     unsigned int xcb_buffer_len = 0;
2199     unsigned int xcb_block_len = 0;
2200     unsigned int xcb_pad = 0;
2201     unsigned int xcb_align_to = 0;
2202 
2203 
2204     xcb_block_len += sizeof(xcb_xkb_row_t);
2205     xcb_tmp += xcb_block_len;
2206     xcb_buffer_len += xcb_block_len;
2207     xcb_block_len = 0;
2208     /* keys */
2209     xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_key_t);
2210     xcb_tmp += xcb_block_len;
2211     xcb_align_to = ALIGNOF(xcb_xkb_key_t);
2212     /* insert padding */
2213     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2214     xcb_buffer_len += xcb_block_len + xcb_pad;
2215     if (0 != xcb_pad) {
2216         xcb_tmp += xcb_pad;
2217         xcb_pad = 0;
2218     }
2219     xcb_block_len = 0;
2220 
2221     return xcb_buffer_len;
2222 }
2223 
2224 
2225 /*****************************************************************************
2226  **
2227  ** xcb_xkb_key_t * xcb_xkb_row_keys
2228  **
2229  ** @param const xcb_xkb_row_t *R
2230  ** @returns xcb_xkb_key_t *
2231  **
2232  *****************************************************************************/
2233 
2234 xcb_xkb_key_t *
2235 xcb_xkb_row_keys (const xcb_xkb_row_t *R  /**< */)
2236 {
2237     return (xcb_xkb_key_t *) (R + 1);
2238 }
2239 
2240 
2241 /*****************************************************************************
2242  **
2243  ** int xcb_xkb_row_keys_length
2244  **
2245  ** @param const xcb_xkb_row_t *R
2246  ** @returns int
2247  **
2248  *****************************************************************************/
2249 
2250 int
2251 xcb_xkb_row_keys_length (const xcb_xkb_row_t *R  /**< */)
2252 {
2253     return R->nKeys;
2254 }
2255 
2256 
2257 /*****************************************************************************
2258  **
2259  ** xcb_xkb_key_iterator_t xcb_xkb_row_keys_iterator
2260  **
2261  ** @param const xcb_xkb_row_t *R
2262  ** @returns xcb_xkb_key_iterator_t
2263  **
2264  *****************************************************************************/
2265 
2266 xcb_xkb_key_iterator_t
2267 xcb_xkb_row_keys_iterator (const xcb_xkb_row_t *R  /**< */)
2268 {
2269     xcb_xkb_key_iterator_t i;
2270     i.data = (xcb_xkb_key_t *) (R + 1);
2271     i.rem = R->nKeys;
2272     i.index = (char *) i.data - (char *) R;
2273     return i;
2274 }
2275 
2276 
2277 /*****************************************************************************
2278  **
2279  ** void xcb_xkb_row_next
2280  **
2281  ** @param xcb_xkb_row_iterator_t *i
2282  ** @returns void
2283  **
2284  *****************************************************************************/
2285 
2286 void
2287 xcb_xkb_row_next (xcb_xkb_row_iterator_t *i  /**< */)
2288 {
2289     xcb_xkb_row_t *R = i->data;
2290     xcb_generic_iterator_t child;
2291     child.data = (xcb_xkb_row_t *)(((char *)R) + xcb_xkb_row_sizeof(R));
2292     i->index = (char *) child.data - (char *) i->data;
2293     --i->rem;
2294     i->data = (xcb_xkb_row_t *) child.data;
2295 }
2296 
2297 
2298 /*****************************************************************************
2299  **
2300  ** xcb_generic_iterator_t xcb_xkb_row_end
2301  **
2302  ** @param xcb_xkb_row_iterator_t i
2303  ** @returns xcb_generic_iterator_t
2304  **
2305  *****************************************************************************/
2306 
2307 xcb_generic_iterator_t
2308 xcb_xkb_row_end (xcb_xkb_row_iterator_t i  /**< */)
2309 {
2310     xcb_generic_iterator_t ret;
2311     while(i.rem > 0)
2312         xcb_xkb_row_next(&i);
2313     ret.data = i.data;
2314     ret.rem = i.rem;
2315     ret.index = i.index;
2316     return ret;
2317 }
2318 
2319 int
2320 xcb_xkb_listing_sizeof (const void  *_buffer  /**< */)
2321 {
2322     char *xcb_tmp = (char *)_buffer;
2323     const xcb_xkb_listing_t *_aux = (xcb_xkb_listing_t *)_buffer;
2324     unsigned int xcb_buffer_len = 0;
2325     unsigned int xcb_block_len = 0;
2326     unsigned int xcb_pad = 0;
2327     unsigned int xcb_align_to = 0;
2328 
2329 
2330     xcb_block_len += sizeof(xcb_xkb_listing_t);
2331     xcb_tmp += xcb_block_len;
2332     xcb_buffer_len += xcb_block_len;
2333     xcb_block_len = 0;
2334     /* string */
2335     xcb_block_len += _aux->length * sizeof(xcb_xkb_string8_t);
2336     xcb_tmp += xcb_block_len;
2337     xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
2338     /* insert padding */
2339     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2340     xcb_buffer_len += xcb_block_len + xcb_pad;
2341     if (0 != xcb_pad) {
2342         xcb_tmp += xcb_pad;
2343         xcb_pad = 0;
2344     }
2345     xcb_block_len = 0;
2346 
2347     return xcb_buffer_len;
2348 }
2349 
2350 
2351 /*****************************************************************************
2352  **
2353  ** xcb_xkb_string8_t * xcb_xkb_listing_string
2354  **
2355  ** @param const xcb_xkb_listing_t *R
2356  ** @returns xcb_xkb_string8_t *
2357  **
2358  *****************************************************************************/
2359 
2360 xcb_xkb_string8_t *
2361 xcb_xkb_listing_string (const xcb_xkb_listing_t *R  /**< */)
2362 {
2363     return (xcb_xkb_string8_t *) (R + 1);
2364 }
2365 
2366 
2367 /*****************************************************************************
2368  **
2369  ** int xcb_xkb_listing_string_length
2370  **
2371  ** @param const xcb_xkb_listing_t *R
2372  ** @returns int
2373  **
2374  *****************************************************************************/
2375 
2376 int
2377 xcb_xkb_listing_string_length (const xcb_xkb_listing_t *R  /**< */)
2378 {
2379     return R->length;
2380 }
2381 
2382 
2383 /*****************************************************************************
2384  **
2385  ** xcb_generic_iterator_t xcb_xkb_listing_string_end
2386  **
2387  ** @param const xcb_xkb_listing_t *R
2388  ** @returns xcb_generic_iterator_t
2389  **
2390  *****************************************************************************/
2391 
2392 xcb_generic_iterator_t
2393 xcb_xkb_listing_string_end (const xcb_xkb_listing_t *R  /**< */)
2394 {
2395     xcb_generic_iterator_t i;
2396     i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->length);
2397     i.rem = 0;
2398     i.index = (char *) i.data - (char *) R;
2399     return i;
2400 }
2401 
2402 
2403 /*****************************************************************************
2404  **
2405  ** void xcb_xkb_listing_next
2406  **
2407  ** @param xcb_xkb_listing_iterator_t *i
2408  ** @returns void
2409  **
2410  *****************************************************************************/
2411 
2412 void
2413 xcb_xkb_listing_next (xcb_xkb_listing_iterator_t *i  /**< */)
2414 {
2415     xcb_xkb_listing_t *R = i->data;
2416     xcb_generic_iterator_t child;
2417     child.data = (xcb_xkb_listing_t *)(((char *)R) + xcb_xkb_listing_sizeof(R));
2418     i->index = (char *) child.data - (char *) i->data;
2419     --i->rem;
2420     i->data = (xcb_xkb_listing_t *) child.data;
2421 }
2422 
2423 
2424 /*****************************************************************************
2425  **
2426  ** xcb_generic_iterator_t xcb_xkb_listing_end
2427  **
2428  ** @param xcb_xkb_listing_iterator_t i
2429  ** @returns xcb_generic_iterator_t
2430  **
2431  *****************************************************************************/
2432 
2433 xcb_generic_iterator_t
2434 xcb_xkb_listing_end (xcb_xkb_listing_iterator_t i  /**< */)
2435 {
2436     xcb_generic_iterator_t ret;
2437     while(i.rem > 0)
2438         xcb_xkb_listing_next(&i);
2439     ret.data = i.data;
2440     ret.rem = i.rem;
2441     ret.index = i.index;
2442     return ret;
2443 }
2444 
2445 int
2446 xcb_xkb_device_led_info_sizeof (const void  *_buffer  /**< */)
2447 {
2448     char *xcb_tmp = (char *)_buffer;
2449     const xcb_xkb_device_led_info_t *_aux = (xcb_xkb_device_led_info_t *)_buffer;
2450     unsigned int xcb_buffer_len = 0;
2451     unsigned int xcb_block_len = 0;
2452     unsigned int xcb_pad = 0;
2453     unsigned int xcb_align_to = 0;
2454 
2455 
2456     xcb_block_len += sizeof(xcb_xkb_device_led_info_t);
2457     xcb_tmp += xcb_block_len;
2458     xcb_buffer_len += xcb_block_len;
2459     xcb_block_len = 0;
2460     /* names */
2461     xcb_block_len += xcb_popcount(_aux->namesPresent) * sizeof(uint32_t);
2462     xcb_tmp += xcb_block_len;
2463     xcb_align_to = ALIGNOF(xcb_atom_t);
2464     /* insert padding */
2465     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2466     xcb_buffer_len += xcb_block_len + xcb_pad;
2467     if (0 != xcb_pad) {
2468         xcb_tmp += xcb_pad;
2469         xcb_pad = 0;
2470     }
2471     xcb_block_len = 0;
2472     /* maps */
2473     xcb_block_len += xcb_popcount(_aux->mapsPresent) * sizeof(xcb_xkb_indicator_map_t);
2474     xcb_tmp += xcb_block_len;
2475     xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
2476     /* insert padding */
2477     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2478     xcb_buffer_len += xcb_block_len + xcb_pad;
2479     if (0 != xcb_pad) {
2480         xcb_tmp += xcb_pad;
2481         xcb_pad = 0;
2482     }
2483     xcb_block_len = 0;
2484 
2485     return xcb_buffer_len;
2486 }
2487 
2488 
2489 /*****************************************************************************
2490  **
2491  ** xcb_atom_t * xcb_xkb_device_led_info_names
2492  **
2493  ** @param const xcb_xkb_device_led_info_t *R
2494  ** @returns xcb_atom_t *
2495  **
2496  *****************************************************************************/
2497 
2498 xcb_atom_t *
2499 xcb_xkb_device_led_info_names (const xcb_xkb_device_led_info_t *R  /**< */)
2500 {
2501     return (xcb_atom_t *) (R + 1);
2502 }
2503 
2504 
2505 /*****************************************************************************
2506  **
2507  ** int xcb_xkb_device_led_info_names_length
2508  **
2509  ** @param const xcb_xkb_device_led_info_t *R
2510  ** @returns int
2511  **
2512  *****************************************************************************/
2513 
2514 int
2515 xcb_xkb_device_led_info_names_length (const xcb_xkb_device_led_info_t *R  /**< */)
2516 {
2517     return xcb_popcount(R->namesPresent);
2518 }
2519 
2520 
2521 /*****************************************************************************
2522  **
2523  ** xcb_generic_iterator_t xcb_xkb_device_led_info_names_end
2524  **
2525  ** @param const xcb_xkb_device_led_info_t *R
2526  ** @returns xcb_generic_iterator_t
2527  **
2528  *****************************************************************************/
2529 
2530 xcb_generic_iterator_t
2531 xcb_xkb_device_led_info_names_end (const xcb_xkb_device_led_info_t *R  /**< */)
2532 {
2533     xcb_generic_iterator_t i;
2534     i.data = ((xcb_atom_t *) (R + 1)) + (xcb_popcount(R->namesPresent));
2535     i.rem = 0;
2536     i.index = (char *) i.data - (char *) R;
2537     return i;
2538 }
2539 
2540 
2541 /*****************************************************************************
2542  **
2543  ** xcb_xkb_indicator_map_t * xcb_xkb_device_led_info_maps
2544  **
2545  ** @param const xcb_xkb_device_led_info_t *R
2546  ** @returns xcb_xkb_indicator_map_t *
2547  **
2548  *****************************************************************************/
2549 
2550 xcb_xkb_indicator_map_t *
2551 xcb_xkb_device_led_info_maps (const xcb_xkb_device_led_info_t *R  /**< */)
2552 {
2553     xcb_generic_iterator_t prev = xcb_xkb_device_led_info_names_end(R);
2554     return (xcb_xkb_indicator_map_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_indicator_map_t, prev.index) + 0);
2555 }
2556 
2557 
2558 /*****************************************************************************
2559  **
2560  ** int xcb_xkb_device_led_info_maps_length
2561  **
2562  ** @param const xcb_xkb_device_led_info_t *R
2563  ** @returns int
2564  **
2565  *****************************************************************************/
2566 
2567 int
2568 xcb_xkb_device_led_info_maps_length (const xcb_xkb_device_led_info_t *R  /**< */)
2569 {
2570     return xcb_popcount(R->mapsPresent);
2571 }
2572 
2573 
2574 /*****************************************************************************
2575  **
2576  ** xcb_xkb_indicator_map_iterator_t xcb_xkb_device_led_info_maps_iterator
2577  **
2578  ** @param const xcb_xkb_device_led_info_t *R
2579  ** @returns xcb_xkb_indicator_map_iterator_t
2580  **
2581  *****************************************************************************/
2582 
2583 xcb_xkb_indicator_map_iterator_t
2584 xcb_xkb_device_led_info_maps_iterator (const xcb_xkb_device_led_info_t *R  /**< */)
2585 {
2586     xcb_xkb_indicator_map_iterator_t i;
2587     xcb_generic_iterator_t prev = xcb_xkb_device_led_info_names_end(R);
2588     i.data = (xcb_xkb_indicator_map_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_indicator_map_t, prev.index));
2589     i.rem = xcb_popcount(R->mapsPresent);
2590     i.index = (char *) i.data - (char *) R;
2591     return i;
2592 }
2593 
2594 
2595 /*****************************************************************************
2596  **
2597  ** void xcb_xkb_device_led_info_next
2598  **
2599  ** @param xcb_xkb_device_led_info_iterator_t *i
2600  ** @returns void
2601  **
2602  *****************************************************************************/
2603 
2604 void
2605 xcb_xkb_device_led_info_next (xcb_xkb_device_led_info_iterator_t *i  /**< */)
2606 {
2607     xcb_xkb_device_led_info_t *R = i->data;
2608     xcb_generic_iterator_t child;
2609     child.data = (xcb_xkb_device_led_info_t *)(((char *)R) + xcb_xkb_device_led_info_sizeof(R));
2610     i->index = (char *) child.data - (char *) i->data;
2611     --i->rem;
2612     i->data = (xcb_xkb_device_led_info_t *) child.data;
2613 }
2614 
2615 
2616 /*****************************************************************************
2617  **
2618  ** xcb_generic_iterator_t xcb_xkb_device_led_info_end
2619  **
2620  ** @param xcb_xkb_device_led_info_iterator_t i
2621  ** @returns xcb_generic_iterator_t
2622  **
2623  *****************************************************************************/
2624 
2625 xcb_generic_iterator_t
2626 xcb_xkb_device_led_info_end (xcb_xkb_device_led_info_iterator_t i  /**< */)
2627 {
2628     xcb_generic_iterator_t ret;
2629     while(i.rem > 0)
2630         xcb_xkb_device_led_info_next(&i);
2631     ret.data = i.data;
2632     ret.rem = i.rem;
2633     ret.index = i.index;
2634     return ret;
2635 }
2636 
2637 
2638 /*****************************************************************************
2639  **
2640  ** void xcb_xkb_sa_no_action_next
2641  **
2642  ** @param xcb_xkb_sa_no_action_iterator_t *i
2643  ** @returns void
2644  **
2645  *****************************************************************************/
2646 
2647 void
2648 xcb_xkb_sa_no_action_next (xcb_xkb_sa_no_action_iterator_t *i  /**< */)
2649 {
2650     --i->rem;
2651     ++i->data;
2652     i->index += sizeof(xcb_xkb_sa_no_action_t);
2653 }
2654 
2655 
2656 /*****************************************************************************
2657  **
2658  ** xcb_generic_iterator_t xcb_xkb_sa_no_action_end
2659  **
2660  ** @param xcb_xkb_sa_no_action_iterator_t i
2661  ** @returns xcb_generic_iterator_t
2662  **
2663  *****************************************************************************/
2664 
2665 xcb_generic_iterator_t
2666 xcb_xkb_sa_no_action_end (xcb_xkb_sa_no_action_iterator_t i  /**< */)
2667 {
2668     xcb_generic_iterator_t ret;
2669     ret.data = i.data + i.rem;
2670     ret.index = i.index + ((char *) ret.data - (char *) i.data);
2671     ret.rem = 0;
2672     return ret;
2673 }
2674 
2675 
2676 /*****************************************************************************
2677  **
2678  ** void xcb_xkb_sa_set_mods_next
2679  **
2680  ** @param xcb_xkb_sa_set_mods_iterator_t *i
2681  ** @returns void
2682  **
2683  *****************************************************************************/
2684 
2685 void
2686 xcb_xkb_sa_set_mods_next (xcb_xkb_sa_set_mods_iterator_t *i  /**< */)
2687 {
2688     --i->rem;
2689     ++i->data;
2690     i->index += sizeof(xcb_xkb_sa_set_mods_t);
2691 }
2692 
2693 
2694 /*****************************************************************************
2695  **
2696  ** xcb_generic_iterator_t xcb_xkb_sa_set_mods_end
2697  **
2698  ** @param xcb_xkb_sa_set_mods_iterator_t i
2699  ** @returns xcb_generic_iterator_t
2700  **
2701  *****************************************************************************/
2702 
2703 xcb_generic_iterator_t
2704 xcb_xkb_sa_set_mods_end (xcb_xkb_sa_set_mods_iterator_t i  /**< */)
2705 {
2706     xcb_generic_iterator_t ret;
2707     ret.data = i.data + i.rem;
2708     ret.index = i.index + ((char *) ret.data - (char *) i.data);
2709     ret.rem = 0;
2710     return ret;
2711 }
2712 
2713 
2714 /*****************************************************************************
2715  **
2716  ** void xcb_xkb_sa_latch_mods_next
2717  **
2718  ** @param xcb_xkb_sa_latch_mods_iterator_t *i
2719  ** @returns void
2720  **
2721  *****************************************************************************/
2722 
2723 void
2724 xcb_xkb_sa_latch_mods_next (xcb_xkb_sa_latch_mods_iterator_t *i  /**< */)
2725 {
2726     --i->rem;
2727     ++i->data;
2728     i->index += sizeof(xcb_xkb_sa_latch_mods_t);
2729 }
2730 
2731 
2732 /*****************************************************************************
2733  **
2734  ** xcb_generic_iterator_t xcb_xkb_sa_latch_mods_end
2735  **
2736  ** @param xcb_xkb_sa_latch_mods_iterator_t i
2737  ** @returns xcb_generic_iterator_t
2738  **
2739  *****************************************************************************/
2740 
2741 xcb_generic_iterator_t
2742 xcb_xkb_sa_latch_mods_end (xcb_xkb_sa_latch_mods_iterator_t i  /**< */)
2743 {
2744     xcb_generic_iterator_t ret;
2745     ret.data = i.data + i.rem;
2746     ret.index = i.index + ((char *) ret.data - (char *) i.data);
2747     ret.rem = 0;
2748     return ret;
2749 }
2750 
2751 
2752 /*****************************************************************************
2753  **
2754  ** void xcb_xkb_sa_lock_mods_next
2755  **
2756  ** @param xcb_xkb_sa_lock_mods_iterator_t *i
2757  ** @returns void
2758  **
2759  *****************************************************************************/
2760 
2761 void
2762 xcb_xkb_sa_lock_mods_next (xcb_xkb_sa_lock_mods_iterator_t *i  /**< */)
2763 {
2764     --i->rem;
2765     ++i->data;
2766     i->index += sizeof(xcb_xkb_sa_lock_mods_t);
2767 }
2768 
2769 
2770 /*****************************************************************************
2771  **
2772  ** xcb_generic_iterator_t xcb_xkb_sa_lock_mods_end
2773  **
2774  ** @param xcb_xkb_sa_lock_mods_iterator_t i
2775  ** @returns xcb_generic_iterator_t
2776  **
2777  *****************************************************************************/
2778 
2779 xcb_generic_iterator_t
2780 xcb_xkb_sa_lock_mods_end (xcb_xkb_sa_lock_mods_iterator_t i  /**< */)
2781 {
2782     xcb_generic_iterator_t ret;
2783     ret.data = i.data + i.rem;
2784     ret.index = i.index + ((char *) ret.data - (char *) i.data);
2785     ret.rem = 0;
2786     return ret;
2787 }
2788 
2789 
2790 /*****************************************************************************
2791  **
2792  ** void xcb_xkb_sa_set_group_next
2793  **
2794  ** @param xcb_xkb_sa_set_group_iterator_t *i
2795  ** @returns void
2796  **
2797  *****************************************************************************/
2798 
2799 void
2800 xcb_xkb_sa_set_group_next (xcb_xkb_sa_set_group_iterator_t *i  /**< */)
2801 {
2802     --i->rem;
2803     ++i->data;
2804     i->index += sizeof(xcb_xkb_sa_set_group_t);
2805 }
2806 
2807 
2808 /*****************************************************************************
2809  **
2810  ** xcb_generic_iterator_t xcb_xkb_sa_set_group_end
2811  **
2812  ** @param xcb_xkb_sa_set_group_iterator_t i
2813  ** @returns xcb_generic_iterator_t
2814  **
2815  *****************************************************************************/
2816 
2817 xcb_generic_iterator_t
2818 xcb_xkb_sa_set_group_end (xcb_xkb_sa_set_group_iterator_t i  /**< */)
2819 {
2820     xcb_generic_iterator_t ret;
2821     ret.data = i.data + i.rem;
2822     ret.index = i.index + ((char *) ret.data - (char *) i.data);
2823     ret.rem = 0;
2824     return ret;
2825 }
2826 
2827 
2828 /*****************************************************************************
2829  **
2830  ** void xcb_xkb_sa_latch_group_next
2831  **
2832  ** @param xcb_xkb_sa_latch_group_iterator_t *i
2833  ** @returns void
2834  **
2835  *****************************************************************************/
2836 
2837 void
2838 xcb_xkb_sa_latch_group_next (xcb_xkb_sa_latch_group_iterator_t *i  /**< */)
2839 {
2840     --i->rem;
2841     ++i->data;
2842     i->index += sizeof(xcb_xkb_sa_latch_group_t);
2843 }
2844 
2845 
2846 /*****************************************************************************
2847  **
2848  ** xcb_generic_iterator_t xcb_xkb_sa_latch_group_end
2849  **
2850  ** @param xcb_xkb_sa_latch_group_iterator_t i
2851  ** @returns xcb_generic_iterator_t
2852  **
2853  *****************************************************************************/
2854 
2855 xcb_generic_iterator_t
2856 xcb_xkb_sa_latch_group_end (xcb_xkb_sa_latch_group_iterator_t i  /**< */)
2857 {
2858     xcb_generic_iterator_t ret;
2859     ret.data = i.data + i.rem;
2860     ret.index = i.index + ((char *) ret.data - (char *) i.data);
2861     ret.rem = 0;
2862     return ret;
2863 }
2864 
2865 
2866 /*****************************************************************************
2867  **
2868  ** void xcb_xkb_sa_lock_group_next
2869  **
2870  ** @param xcb_xkb_sa_lock_group_iterator_t *i
2871  ** @returns void
2872  **
2873  *****************************************************************************/
2874 
2875 void
2876 xcb_xkb_sa_lock_group_next (xcb_xkb_sa_lock_group_iterator_t *i  /**< */)
2877 {
2878     --i->rem;
2879     ++i->data;
2880     i->index += sizeof(xcb_xkb_sa_lock_group_t);
2881 }
2882 
2883 
2884 /*****************************************************************************
2885  **
2886  ** xcb_generic_iterator_t xcb_xkb_sa_lock_group_end
2887  **
2888  ** @param xcb_xkb_sa_lock_group_iterator_t i
2889  ** @returns xcb_generic_iterator_t
2890  **
2891  *****************************************************************************/
2892 
2893 xcb_generic_iterator_t
2894 xcb_xkb_sa_lock_group_end (xcb_xkb_sa_lock_group_iterator_t i  /**< */)
2895 {
2896     xcb_generic_iterator_t ret;
2897     ret.data = i.data + i.rem;
2898     ret.index = i.index + ((char *) ret.data - (char *) i.data);
2899     ret.rem = 0;
2900     return ret;
2901 }
2902 
2903 
2904 /*****************************************************************************
2905  **
2906  ** void xcb_xkb_sa_move_ptr_next
2907  **
2908  ** @param xcb_xkb_sa_move_ptr_iterator_t *i
2909  ** @returns void
2910  **
2911  *****************************************************************************/
2912 
2913 void
2914 xcb_xkb_sa_move_ptr_next (xcb_xkb_sa_move_ptr_iterator_t *i  /**< */)
2915 {
2916     --i->rem;
2917     ++i->data;
2918     i->index += sizeof(xcb_xkb_sa_move_ptr_t);
2919 }
2920 
2921 
2922 /*****************************************************************************
2923  **
2924  ** xcb_generic_iterator_t xcb_xkb_sa_move_ptr_end
2925  **
2926  ** @param xcb_xkb_sa_move_ptr_iterator_t i
2927  ** @returns xcb_generic_iterator_t
2928  **
2929  *****************************************************************************/
2930 
2931 xcb_generic_iterator_t
2932 xcb_xkb_sa_move_ptr_end (xcb_xkb_sa_move_ptr_iterator_t i  /**< */)
2933 {
2934     xcb_generic_iterator_t ret;
2935     ret.data = i.data + i.rem;
2936     ret.index = i.index + ((char *) ret.data - (char *) i.data);
2937     ret.rem = 0;
2938     return ret;
2939 }
2940 
2941 
2942 /*****************************************************************************
2943  **
2944  ** void xcb_xkb_sa_ptr_btn_next
2945  **
2946  ** @param xcb_xkb_sa_ptr_btn_iterator_t *i
2947  ** @returns void
2948  **
2949  *****************************************************************************/
2950 
2951 void
2952 xcb_xkb_sa_ptr_btn_next (xcb_xkb_sa_ptr_btn_iterator_t *i  /**< */)
2953 {
2954     --i->rem;
2955     ++i->data;
2956     i->index += sizeof(xcb_xkb_sa_ptr_btn_t);
2957 }
2958 
2959 
2960 /*****************************************************************************
2961  **
2962  ** xcb_generic_iterator_t xcb_xkb_sa_ptr_btn_end
2963  **
2964  ** @param xcb_xkb_sa_ptr_btn_iterator_t i
2965  ** @returns xcb_generic_iterator_t
2966  **
2967  *****************************************************************************/
2968 
2969 xcb_generic_iterator_t
2970 xcb_xkb_sa_ptr_btn_end (xcb_xkb_sa_ptr_btn_iterator_t i  /**< */)
2971 {
2972     xcb_generic_iterator_t ret;
2973     ret.data = i.data + i.rem;
2974     ret.index = i.index + ((char *) ret.data - (char *) i.data);
2975     ret.rem = 0;
2976     return ret;
2977 }
2978 
2979 
2980 /*****************************************************************************
2981  **
2982  ** void xcb_xkb_sa_lock_ptr_btn_next
2983  **
2984  ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t *i
2985  ** @returns void
2986  **
2987  *****************************************************************************/
2988 
2989 void
2990 xcb_xkb_sa_lock_ptr_btn_next (xcb_xkb_sa_lock_ptr_btn_iterator_t *i  /**< */)
2991 {
2992     --i->rem;
2993     ++i->data;
2994     i->index += sizeof(xcb_xkb_sa_lock_ptr_btn_t);
2995 }
2996 
2997 
2998 /*****************************************************************************
2999  **
3000  ** xcb_generic_iterator_t xcb_xkb_sa_lock_ptr_btn_end
3001  **
3002  ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t i
3003  ** @returns xcb_generic_iterator_t
3004  **
3005  *****************************************************************************/
3006 
3007 xcb_generic_iterator_t
3008 xcb_xkb_sa_lock_ptr_btn_end (xcb_xkb_sa_lock_ptr_btn_iterator_t i  /**< */)
3009 {
3010     xcb_generic_iterator_t ret;
3011     ret.data = i.data + i.rem;
3012     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3013     ret.rem = 0;
3014     return ret;
3015 }
3016 
3017 
3018 /*****************************************************************************
3019  **
3020  ** void xcb_xkb_sa_set_ptr_dflt_next
3021  **
3022  ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t *i
3023  ** @returns void
3024  **
3025  *****************************************************************************/
3026 
3027 void
3028 xcb_xkb_sa_set_ptr_dflt_next (xcb_xkb_sa_set_ptr_dflt_iterator_t *i  /**< */)
3029 {
3030     --i->rem;
3031     ++i->data;
3032     i->index += sizeof(xcb_xkb_sa_set_ptr_dflt_t);
3033 }
3034 
3035 
3036 /*****************************************************************************
3037  **
3038  ** xcb_generic_iterator_t xcb_xkb_sa_set_ptr_dflt_end
3039  **
3040  ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t i
3041  ** @returns xcb_generic_iterator_t
3042  **
3043  *****************************************************************************/
3044 
3045 xcb_generic_iterator_t
3046 xcb_xkb_sa_set_ptr_dflt_end (xcb_xkb_sa_set_ptr_dflt_iterator_t i  /**< */)
3047 {
3048     xcb_generic_iterator_t ret;
3049     ret.data = i.data + i.rem;
3050     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3051     ret.rem = 0;
3052     return ret;
3053 }
3054 
3055 
3056 /*****************************************************************************
3057  **
3058  ** void xcb_xkb_sa_iso_lock_next
3059  **
3060  ** @param xcb_xkb_sa_iso_lock_iterator_t *i
3061  ** @returns void
3062  **
3063  *****************************************************************************/
3064 
3065 void
3066 xcb_xkb_sa_iso_lock_next (xcb_xkb_sa_iso_lock_iterator_t *i  /**< */)
3067 {
3068     --i->rem;
3069     ++i->data;
3070     i->index += sizeof(xcb_xkb_sa_iso_lock_t);
3071 }
3072 
3073 
3074 /*****************************************************************************
3075  **
3076  ** xcb_generic_iterator_t xcb_xkb_sa_iso_lock_end
3077  **
3078  ** @param xcb_xkb_sa_iso_lock_iterator_t i
3079  ** @returns xcb_generic_iterator_t
3080  **
3081  *****************************************************************************/
3082 
3083 xcb_generic_iterator_t
3084 xcb_xkb_sa_iso_lock_end (xcb_xkb_sa_iso_lock_iterator_t i  /**< */)
3085 {
3086     xcb_generic_iterator_t ret;
3087     ret.data = i.data + i.rem;
3088     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3089     ret.rem = 0;
3090     return ret;
3091 }
3092 
3093 
3094 /*****************************************************************************
3095  **
3096  ** void xcb_xkb_sa_terminate_next
3097  **
3098  ** @param xcb_xkb_sa_terminate_iterator_t *i
3099  ** @returns void
3100  **
3101  *****************************************************************************/
3102 
3103 void
3104 xcb_xkb_sa_terminate_next (xcb_xkb_sa_terminate_iterator_t *i  /**< */)
3105 {
3106     --i->rem;
3107     ++i->data;
3108     i->index += sizeof(xcb_xkb_sa_terminate_t);
3109 }
3110 
3111 
3112 /*****************************************************************************
3113  **
3114  ** xcb_generic_iterator_t xcb_xkb_sa_terminate_end
3115  **
3116  ** @param xcb_xkb_sa_terminate_iterator_t i
3117  ** @returns xcb_generic_iterator_t
3118  **
3119  *****************************************************************************/
3120 
3121 xcb_generic_iterator_t
3122 xcb_xkb_sa_terminate_end (xcb_xkb_sa_terminate_iterator_t i  /**< */)
3123 {
3124     xcb_generic_iterator_t ret;
3125     ret.data = i.data + i.rem;
3126     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3127     ret.rem = 0;
3128     return ret;
3129 }
3130 
3131 
3132 /*****************************************************************************
3133  **
3134  ** void xcb_xkb_sa_switch_screen_next
3135  **
3136  ** @param xcb_xkb_sa_switch_screen_iterator_t *i
3137  ** @returns void
3138  **
3139  *****************************************************************************/
3140 
3141 void
3142 xcb_xkb_sa_switch_screen_next (xcb_xkb_sa_switch_screen_iterator_t *i  /**< */)
3143 {
3144     --i->rem;
3145     ++i->data;
3146     i->index += sizeof(xcb_xkb_sa_switch_screen_t);
3147 }
3148 
3149 
3150 /*****************************************************************************
3151  **
3152  ** xcb_generic_iterator_t xcb_xkb_sa_switch_screen_end
3153  **
3154  ** @param xcb_xkb_sa_switch_screen_iterator_t i
3155  ** @returns xcb_generic_iterator_t
3156  **
3157  *****************************************************************************/
3158 
3159 xcb_generic_iterator_t
3160 xcb_xkb_sa_switch_screen_end (xcb_xkb_sa_switch_screen_iterator_t i  /**< */)
3161 {
3162     xcb_generic_iterator_t ret;
3163     ret.data = i.data + i.rem;
3164     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3165     ret.rem = 0;
3166     return ret;
3167 }
3168 
3169 
3170 /*****************************************************************************
3171  **
3172  ** void xcb_xkb_sa_set_controls_next
3173  **
3174  ** @param xcb_xkb_sa_set_controls_iterator_t *i
3175  ** @returns void
3176  **
3177  *****************************************************************************/
3178 
3179 void
3180 xcb_xkb_sa_set_controls_next (xcb_xkb_sa_set_controls_iterator_t *i  /**< */)
3181 {
3182     --i->rem;
3183     ++i->data;
3184     i->index += sizeof(xcb_xkb_sa_set_controls_t);
3185 }
3186 
3187 
3188 /*****************************************************************************
3189  **
3190  ** xcb_generic_iterator_t xcb_xkb_sa_set_controls_end
3191  **
3192  ** @param xcb_xkb_sa_set_controls_iterator_t i
3193  ** @returns xcb_generic_iterator_t
3194  **
3195  *****************************************************************************/
3196 
3197 xcb_generic_iterator_t
3198 xcb_xkb_sa_set_controls_end (xcb_xkb_sa_set_controls_iterator_t i  /**< */)
3199 {
3200     xcb_generic_iterator_t ret;
3201     ret.data = i.data + i.rem;
3202     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3203     ret.rem = 0;
3204     return ret;
3205 }
3206 
3207 
3208 /*****************************************************************************
3209  **
3210  ** void xcb_xkb_sa_lock_controls_next
3211  **
3212  ** @param xcb_xkb_sa_lock_controls_iterator_t *i
3213  ** @returns void
3214  **
3215  *****************************************************************************/
3216 
3217 void
3218 xcb_xkb_sa_lock_controls_next (xcb_xkb_sa_lock_controls_iterator_t *i  /**< */)
3219 {
3220     --i->rem;
3221     ++i->data;
3222     i->index += sizeof(xcb_xkb_sa_lock_controls_t);
3223 }
3224 
3225 
3226 /*****************************************************************************
3227  **
3228  ** xcb_generic_iterator_t xcb_xkb_sa_lock_controls_end
3229  **
3230  ** @param xcb_xkb_sa_lock_controls_iterator_t i
3231  ** @returns xcb_generic_iterator_t
3232  **
3233  *****************************************************************************/
3234 
3235 xcb_generic_iterator_t
3236 xcb_xkb_sa_lock_controls_end (xcb_xkb_sa_lock_controls_iterator_t i  /**< */)
3237 {
3238     xcb_generic_iterator_t ret;
3239     ret.data = i.data + i.rem;
3240     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3241     ret.rem = 0;
3242     return ret;
3243 }
3244 
3245 
3246 /*****************************************************************************
3247  **
3248  ** void xcb_xkb_sa_action_message_next
3249  **
3250  ** @param xcb_xkb_sa_action_message_iterator_t *i
3251  ** @returns void
3252  **
3253  *****************************************************************************/
3254 
3255 void
3256 xcb_xkb_sa_action_message_next (xcb_xkb_sa_action_message_iterator_t *i  /**< */)
3257 {
3258     --i->rem;
3259     ++i->data;
3260     i->index += sizeof(xcb_xkb_sa_action_message_t);
3261 }
3262 
3263 
3264 /*****************************************************************************
3265  **
3266  ** xcb_generic_iterator_t xcb_xkb_sa_action_message_end
3267  **
3268  ** @param xcb_xkb_sa_action_message_iterator_t i
3269  ** @returns xcb_generic_iterator_t
3270  **
3271  *****************************************************************************/
3272 
3273 xcb_generic_iterator_t
3274 xcb_xkb_sa_action_message_end (xcb_xkb_sa_action_message_iterator_t i  /**< */)
3275 {
3276     xcb_generic_iterator_t ret;
3277     ret.data = i.data + i.rem;
3278     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3279     ret.rem = 0;
3280     return ret;
3281 }
3282 
3283 
3284 /*****************************************************************************
3285  **
3286  ** void xcb_xkb_sa_redirect_key_next
3287  **
3288  ** @param xcb_xkb_sa_redirect_key_iterator_t *i
3289  ** @returns void
3290  **
3291  *****************************************************************************/
3292 
3293 void
3294 xcb_xkb_sa_redirect_key_next (xcb_xkb_sa_redirect_key_iterator_t *i  /**< */)
3295 {
3296     --i->rem;
3297     ++i->data;
3298     i->index += sizeof(xcb_xkb_sa_redirect_key_t);
3299 }
3300 
3301 
3302 /*****************************************************************************
3303  **
3304  ** xcb_generic_iterator_t xcb_xkb_sa_redirect_key_end
3305  **
3306  ** @param xcb_xkb_sa_redirect_key_iterator_t i
3307  ** @returns xcb_generic_iterator_t
3308  **
3309  *****************************************************************************/
3310 
3311 xcb_generic_iterator_t
3312 xcb_xkb_sa_redirect_key_end (xcb_xkb_sa_redirect_key_iterator_t i  /**< */)
3313 {
3314     xcb_generic_iterator_t ret;
3315     ret.data = i.data + i.rem;
3316     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3317     ret.rem = 0;
3318     return ret;
3319 }
3320 
3321 
3322 /*****************************************************************************
3323  **
3324  ** void xcb_xkb_sa_device_btn_next
3325  **
3326  ** @param xcb_xkb_sa_device_btn_iterator_t *i
3327  ** @returns void
3328  **
3329  *****************************************************************************/
3330 
3331 void
3332 xcb_xkb_sa_device_btn_next (xcb_xkb_sa_device_btn_iterator_t *i  /**< */)
3333 {
3334     --i->rem;
3335     ++i->data;
3336     i->index += sizeof(xcb_xkb_sa_device_btn_t);
3337 }
3338 
3339 
3340 /*****************************************************************************
3341  **
3342  ** xcb_generic_iterator_t xcb_xkb_sa_device_btn_end
3343  **
3344  ** @param xcb_xkb_sa_device_btn_iterator_t i
3345  ** @returns xcb_generic_iterator_t
3346  **
3347  *****************************************************************************/
3348 
3349 xcb_generic_iterator_t
3350 xcb_xkb_sa_device_btn_end (xcb_xkb_sa_device_btn_iterator_t i  /**< */)
3351 {
3352     xcb_generic_iterator_t ret;
3353     ret.data = i.data + i.rem;
3354     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3355     ret.rem = 0;
3356     return ret;
3357 }
3358 
3359 
3360 /*****************************************************************************
3361  **
3362  ** void xcb_xkb_sa_lock_device_btn_next
3363  **
3364  ** @param xcb_xkb_sa_lock_device_btn_iterator_t *i
3365  ** @returns void
3366  **
3367  *****************************************************************************/
3368 
3369 void
3370 xcb_xkb_sa_lock_device_btn_next (xcb_xkb_sa_lock_device_btn_iterator_t *i  /**< */)
3371 {
3372     --i->rem;
3373     ++i->data;
3374     i->index += sizeof(xcb_xkb_sa_lock_device_btn_t);
3375 }
3376 
3377 
3378 /*****************************************************************************
3379  **
3380  ** xcb_generic_iterator_t xcb_xkb_sa_lock_device_btn_end
3381  **
3382  ** @param xcb_xkb_sa_lock_device_btn_iterator_t i
3383  ** @returns xcb_generic_iterator_t
3384  **
3385  *****************************************************************************/
3386 
3387 xcb_generic_iterator_t
3388 xcb_xkb_sa_lock_device_btn_end (xcb_xkb_sa_lock_device_btn_iterator_t i  /**< */)
3389 {
3390     xcb_generic_iterator_t ret;
3391     ret.data = i.data + i.rem;
3392     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3393     ret.rem = 0;
3394     return ret;
3395 }
3396 
3397 
3398 /*****************************************************************************
3399  **
3400  ** void xcb_xkb_sa_device_valuator_next
3401  **
3402  ** @param xcb_xkb_sa_device_valuator_iterator_t *i
3403  ** @returns void
3404  **
3405  *****************************************************************************/
3406 
3407 void
3408 xcb_xkb_sa_device_valuator_next (xcb_xkb_sa_device_valuator_iterator_t *i  /**< */)
3409 {
3410     --i->rem;
3411     ++i->data;
3412     i->index += sizeof(xcb_xkb_sa_device_valuator_t);
3413 }
3414 
3415 
3416 /*****************************************************************************
3417  **
3418  ** xcb_generic_iterator_t xcb_xkb_sa_device_valuator_end
3419  **
3420  ** @param xcb_xkb_sa_device_valuator_iterator_t i
3421  ** @returns xcb_generic_iterator_t
3422  **
3423  *****************************************************************************/
3424 
3425 xcb_generic_iterator_t
3426 xcb_xkb_sa_device_valuator_end (xcb_xkb_sa_device_valuator_iterator_t i  /**< */)
3427 {
3428     xcb_generic_iterator_t ret;
3429     ret.data = i.data + i.rem;
3430     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3431     ret.rem = 0;
3432     return ret;
3433 }
3434 
3435 
3436 /*****************************************************************************
3437  **
3438  ** void xcb_xkb_si_action_next
3439  **
3440  ** @param xcb_xkb_si_action_iterator_t *i
3441  ** @returns void
3442  **
3443  *****************************************************************************/
3444 
3445 void
3446 xcb_xkb_si_action_next (xcb_xkb_si_action_iterator_t *i  /**< */)
3447 {
3448     --i->rem;
3449     ++i->data;
3450     i->index += sizeof(xcb_xkb_si_action_t);
3451 }
3452 
3453 
3454 /*****************************************************************************
3455  **
3456  ** xcb_generic_iterator_t xcb_xkb_si_action_end
3457  **
3458  ** @param xcb_xkb_si_action_iterator_t i
3459  ** @returns xcb_generic_iterator_t
3460  **
3461  *****************************************************************************/
3462 
3463 xcb_generic_iterator_t
3464 xcb_xkb_si_action_end (xcb_xkb_si_action_iterator_t i  /**< */)
3465 {
3466     xcb_generic_iterator_t ret;
3467     ret.data = i.data + i.rem;
3468     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3469     ret.rem = 0;
3470     return ret;
3471 }
3472 
3473 
3474 /*****************************************************************************
3475  **
3476  ** void xcb_xkb_sym_interpret_next
3477  **
3478  ** @param xcb_xkb_sym_interpret_iterator_t *i
3479  ** @returns void
3480  **
3481  *****************************************************************************/
3482 
3483 void
3484 xcb_xkb_sym_interpret_next (xcb_xkb_sym_interpret_iterator_t *i  /**< */)
3485 {
3486     --i->rem;
3487     ++i->data;
3488     i->index += sizeof(xcb_xkb_sym_interpret_t);
3489 }
3490 
3491 
3492 /*****************************************************************************
3493  **
3494  ** xcb_generic_iterator_t xcb_xkb_sym_interpret_end
3495  **
3496  ** @param xcb_xkb_sym_interpret_iterator_t i
3497  ** @returns xcb_generic_iterator_t
3498  **
3499  *****************************************************************************/
3500 
3501 xcb_generic_iterator_t
3502 xcb_xkb_sym_interpret_end (xcb_xkb_sym_interpret_iterator_t i  /**< */)
3503 {
3504     xcb_generic_iterator_t ret;
3505     ret.data = i.data + i.rem;
3506     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3507     ret.rem = 0;
3508     return ret;
3509 }
3510 
3511 
3512 /*****************************************************************************
3513  **
3514  ** void xcb_xkb_action_next
3515  **
3516  ** @param xcb_xkb_action_iterator_t *i
3517  ** @returns void
3518  **
3519  *****************************************************************************/
3520 
3521 void
3522 xcb_xkb_action_next (xcb_xkb_action_iterator_t *i  /**< */)
3523 {
3524     --i->rem;
3525     ++i->data;
3526     i->index += sizeof(xcb_xkb_action_t);
3527 }
3528 
3529 
3530 /*****************************************************************************
3531  **
3532  ** xcb_generic_iterator_t xcb_xkb_action_end
3533  **
3534  ** @param xcb_xkb_action_iterator_t i
3535  ** @returns xcb_generic_iterator_t
3536  **
3537  *****************************************************************************/
3538 
3539 xcb_generic_iterator_t
3540 xcb_xkb_action_end (xcb_xkb_action_iterator_t i  /**< */)
3541 {
3542     xcb_generic_iterator_t ret;
3543     ret.data = i.data + i.rem;
3544     ret.index = i.index + ((char *) ret.data - (char *) i.data);
3545     ret.rem = 0;
3546     return ret;
3547 }
3548 
3549 
3550 /*****************************************************************************
3551  **
3552  ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension
3553  **
3554  ** @param xcb_connection_t *c
3555  ** @param uint16_t          wantedMajor
3556  ** @param uint16_t          wantedMinor
3557  ** @returns xcb_xkb_use_extension_cookie_t
3558  **
3559  *****************************************************************************/
3560 
3561 xcb_xkb_use_extension_cookie_t
3562 xcb_xkb_use_extension (xcb_connection_t *c  /**< */,
3563                        uint16_t          wantedMajor  /**< */,
3564                        uint16_t          wantedMinor  /**< */)
3565 {
3566     static const xcb_protocol_request_t xcb_req = {
3567         /* count */ 2,
3568         /* ext */ &xcb_xkb_id,
3569         /* opcode */ XCB_XKB_USE_EXTENSION,
3570         /* isvoid */ 0
3571     };
3572 
3573     struct iovec xcb_parts[4];
3574     xcb_xkb_use_extension_cookie_t xcb_ret;
3575     xcb_xkb_use_extension_request_t xcb_out;
3576 
3577     xcb_out.wantedMajor = wantedMajor;
3578     xcb_out.wantedMinor = wantedMinor;
3579 
3580     xcb_parts[2].iov_base = (char *) &xcb_out;
3581     xcb_parts[2].iov_len = sizeof(xcb_out);
3582     xcb_parts[3].iov_base = 0;
3583     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3584 
3585     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3586     return xcb_ret;
3587 }
3588 
3589 
3590 /*****************************************************************************
3591  **
3592  ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension_unchecked
3593  **
3594  ** @param xcb_connection_t *c
3595  ** @param uint16_t          wantedMajor
3596  ** @param uint16_t          wantedMinor
3597  ** @returns xcb_xkb_use_extension_cookie_t
3598  **
3599  *****************************************************************************/
3600 
3601 xcb_xkb_use_extension_cookie_t
3602 xcb_xkb_use_extension_unchecked (xcb_connection_t *c  /**< */,
3603                                  uint16_t          wantedMajor  /**< */,
3604                                  uint16_t          wantedMinor  /**< */)
3605 {
3606     static const xcb_protocol_request_t xcb_req = {
3607         /* count */ 2,
3608         /* ext */ &xcb_xkb_id,
3609         /* opcode */ XCB_XKB_USE_EXTENSION,
3610         /* isvoid */ 0
3611     };
3612 
3613     struct iovec xcb_parts[4];
3614     xcb_xkb_use_extension_cookie_t xcb_ret;
3615     xcb_xkb_use_extension_request_t xcb_out;
3616 
3617     xcb_out.wantedMajor = wantedMajor;
3618     xcb_out.wantedMinor = wantedMinor;
3619 
3620     xcb_parts[2].iov_base = (char *) &xcb_out;
3621     xcb_parts[2].iov_len = sizeof(xcb_out);
3622     xcb_parts[3].iov_base = 0;
3623     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3624 
3625     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3626     return xcb_ret;
3627 }
3628 
3629 
3630 /*****************************************************************************
3631  **
3632  ** xcb_xkb_use_extension_reply_t * xcb_xkb_use_extension_reply
3633  **
3634  ** @param xcb_connection_t                *c
3635  ** @param xcb_xkb_use_extension_cookie_t   cookie
3636  ** @param xcb_generic_error_t            **e
3637  ** @returns xcb_xkb_use_extension_reply_t *
3638  **
3639  *****************************************************************************/
3640 
3641 xcb_xkb_use_extension_reply_t *
3642 xcb_xkb_use_extension_reply (xcb_connection_t                *c  /**< */,
3643                              xcb_xkb_use_extension_cookie_t   cookie  /**< */,
3644                              xcb_generic_error_t            **e  /**< */)
3645 {
3646     return (xcb_xkb_use_extension_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3647 }
3648 
3649 int
3650 xcb_xkb_select_events_details_serialize (void                                  **_buffer  /**< */,
3651                                          uint16_t                                affectWhich  /**< */,
3652                                          uint16_t                                clear  /**< */,
3653                                          uint16_t                                selectAll  /**< */,
3654                                          const xcb_xkb_select_events_details_t  *_aux  /**< */)
3655 {
3656     char *xcb_out = *_buffer;
3657     unsigned int xcb_buffer_len = 0;
3658     unsigned int xcb_align_to = 0;
3659 
3660     unsigned int xcb_pad = 0;
3661     char xcb_pad0[3] = {0, 0, 0};
3662     struct iovec xcb_parts[23];
3663     unsigned int xcb_parts_idx = 0;
3664     unsigned int xcb_block_len = 0;
3665     unsigned int i;
3666     char *xcb_tmp;
3667 
3668     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY) {
3669         /* xcb_xkb_select_events_details_t.affectNewKeyboard */
3670         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectNewKeyboard;
3671         xcb_block_len += sizeof(uint16_t);
3672         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3673         xcb_parts_idx++;
3674         xcb_align_to = ALIGNOF(uint16_t);
3675         /* xcb_xkb_select_events_details_t.newKeyboardDetails */
3676         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->newKeyboardDetails;
3677         xcb_block_len += sizeof(uint16_t);
3678         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3679         xcb_parts_idx++;
3680         xcb_align_to = ALIGNOF(uint16_t);
3681     }
3682     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_STATE_NOTIFY) {
3683         /* xcb_xkb_select_events_details_t.affectState */
3684         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectState;
3685         xcb_block_len += sizeof(uint16_t);
3686         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3687         xcb_parts_idx++;
3688         xcb_align_to = ALIGNOF(uint16_t);
3689         /* xcb_xkb_select_events_details_t.stateDetails */
3690         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->stateDetails;
3691         xcb_block_len += sizeof(uint16_t);
3692         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3693         xcb_parts_idx++;
3694         xcb_align_to = ALIGNOF(uint16_t);
3695     }
3696     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY) {
3697         /* xcb_xkb_select_events_details_t.affectCtrls */
3698         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectCtrls;
3699         xcb_block_len += sizeof(uint32_t);
3700         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
3701         xcb_parts_idx++;
3702         xcb_align_to = ALIGNOF(uint32_t);
3703         /* xcb_xkb_select_events_details_t.ctrlDetails */
3704         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->ctrlDetails;
3705         xcb_block_len += sizeof(uint32_t);
3706         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
3707         xcb_parts_idx++;
3708         xcb_align_to = ALIGNOF(uint32_t);
3709     }
3710     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY) {
3711         /* xcb_xkb_select_events_details_t.affectIndicatorState */
3712         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectIndicatorState;
3713         xcb_block_len += sizeof(uint32_t);
3714         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
3715         xcb_parts_idx++;
3716         xcb_align_to = ALIGNOF(uint32_t);
3717         /* xcb_xkb_select_events_details_t.indicatorStateDetails */
3718         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicatorStateDetails;
3719         xcb_block_len += sizeof(uint32_t);
3720         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
3721         xcb_parts_idx++;
3722         xcb_align_to = ALIGNOF(uint32_t);
3723     }
3724     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY) {
3725         /* xcb_xkb_select_events_details_t.affectIndicatorMap */
3726         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectIndicatorMap;
3727         xcb_block_len += sizeof(uint32_t);
3728         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
3729         xcb_parts_idx++;
3730         xcb_align_to = ALIGNOF(uint32_t);
3731         /* xcb_xkb_select_events_details_t.indicatorMapDetails */
3732         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicatorMapDetails;
3733         xcb_block_len += sizeof(uint32_t);
3734         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
3735         xcb_parts_idx++;
3736         xcb_align_to = ALIGNOF(uint32_t);
3737     }
3738     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NAMES_NOTIFY) {
3739         /* xcb_xkb_select_events_details_t.affectNames */
3740         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectNames;
3741         xcb_block_len += sizeof(uint16_t);
3742         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3743         xcb_parts_idx++;
3744         xcb_align_to = ALIGNOF(uint16_t);
3745         /* xcb_xkb_select_events_details_t.namesDetails */
3746         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->namesDetails;
3747         xcb_block_len += sizeof(uint16_t);
3748         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3749         xcb_parts_idx++;
3750         xcb_align_to = ALIGNOF(uint16_t);
3751     }
3752     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY) {
3753         /* xcb_xkb_select_events_details_t.affectCompat */
3754         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectCompat;
3755         xcb_block_len += sizeof(uint8_t);
3756         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
3757         xcb_parts_idx++;
3758         xcb_align_to = ALIGNOF(uint8_t);
3759         /* xcb_xkb_select_events_details_t.compatDetails */
3760         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatDetails;
3761         xcb_block_len += sizeof(uint8_t);
3762         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
3763         xcb_parts_idx++;
3764         xcb_align_to = ALIGNOF(uint8_t);
3765     }
3766     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_BELL_NOTIFY) {
3767         /* xcb_xkb_select_events_details_t.affectBell */
3768         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectBell;
3769         xcb_block_len += sizeof(uint8_t);
3770         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
3771         xcb_parts_idx++;
3772         xcb_align_to = ALIGNOF(uint8_t);
3773         /* xcb_xkb_select_events_details_t.bellDetails */
3774         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bellDetails;
3775         xcb_block_len += sizeof(uint8_t);
3776         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
3777         xcb_parts_idx++;
3778         xcb_align_to = ALIGNOF(uint8_t);
3779     }
3780     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACTION_MESSAGE) {
3781         /* xcb_xkb_select_events_details_t.affectMsgDetails */
3782         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectMsgDetails;
3783         xcb_block_len += sizeof(uint8_t);
3784         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
3785         xcb_parts_idx++;
3786         xcb_align_to = ALIGNOF(uint8_t);
3787         /* xcb_xkb_select_events_details_t.msgDetails */
3788         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->msgDetails;
3789         xcb_block_len += sizeof(uint8_t);
3790         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
3791         xcb_parts_idx++;
3792         xcb_align_to = ALIGNOF(uint8_t);
3793     }
3794     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY) {
3795         /* xcb_xkb_select_events_details_t.affectAccessX */
3796         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectAccessX;
3797         xcb_block_len += sizeof(uint16_t);
3798         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3799         xcb_parts_idx++;
3800         xcb_align_to = ALIGNOF(uint16_t);
3801         /* xcb_xkb_select_events_details_t.accessXDetails */
3802         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->accessXDetails;
3803         xcb_block_len += sizeof(uint16_t);
3804         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3805         xcb_parts_idx++;
3806         xcb_align_to = ALIGNOF(uint16_t);
3807     }
3808     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY) {
3809         /* xcb_xkb_select_events_details_t.affectExtDev */
3810         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectExtDev;
3811         xcb_block_len += sizeof(uint16_t);
3812         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3813         xcb_parts_idx++;
3814         xcb_align_to = ALIGNOF(uint16_t);
3815         /* xcb_xkb_select_events_details_t.extdevDetails */
3816         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->extdevDetails;
3817         xcb_block_len += sizeof(uint16_t);
3818         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
3819         xcb_parts_idx++;
3820         xcb_align_to = ALIGNOF(uint16_t);
3821     }
3822     /* insert padding */
3823     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3824     xcb_buffer_len += xcb_block_len + xcb_pad;
3825     if (0 != xcb_pad) {
3826         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
3827         xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
3828         xcb_parts_idx++;
3829         xcb_pad = 0;
3830     }
3831     xcb_block_len = 0;
3832 
3833     if (NULL == xcb_out) {
3834         /* allocate memory */
3835         xcb_out = malloc(xcb_buffer_len);
3836         *_buffer = xcb_out;
3837     }
3838 
3839     xcb_tmp = xcb_out;
3840     for(i=0; i<xcb_parts_idx; i++) {
3841         if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
3842             memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
3843         if (0 != xcb_parts[i].iov_len)
3844             xcb_tmp += xcb_parts[i].iov_len;
3845     }
3846 
3847     return xcb_buffer_len;
3848 }
3849 
3850 int
3851 xcb_xkb_select_events_details_unpack (const void                       *_buffer  /**< */,
3852                                       uint16_t                          affectWhich  /**< */,
3853                                       uint16_t                          clear  /**< */,
3854                                       uint16_t                          selectAll  /**< */,
3855                                       xcb_xkb_select_events_details_t  *_aux  /**< */)
3856 {
3857     char *xcb_tmp = (char *)_buffer;
3858     unsigned int xcb_buffer_len = 0;
3859     unsigned int xcb_block_len = 0;
3860     unsigned int xcb_pad = 0;
3861     unsigned int xcb_align_to = 0;
3862 
3863 
3864     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY) {
3865         /* xcb_xkb_select_events_details_t.affectNewKeyboard */
3866         _aux->affectNewKeyboard = *(uint16_t *)xcb_tmp;
3867         xcb_block_len += sizeof(uint16_t);
3868         xcb_tmp += sizeof(uint16_t);
3869         xcb_align_to = ALIGNOF(uint16_t);
3870         /* xcb_xkb_select_events_details_t.newKeyboardDetails */
3871         _aux->newKeyboardDetails = *(uint16_t *)xcb_tmp;
3872         xcb_block_len += sizeof(uint16_t);
3873         xcb_tmp += sizeof(uint16_t);
3874         xcb_align_to = ALIGNOF(uint16_t);
3875     }
3876     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_STATE_NOTIFY) {
3877         /* xcb_xkb_select_events_details_t.affectState */
3878         _aux->affectState = *(uint16_t *)xcb_tmp;
3879         xcb_block_len += sizeof(uint16_t);
3880         xcb_tmp += sizeof(uint16_t);
3881         xcb_align_to = ALIGNOF(uint16_t);
3882         /* xcb_xkb_select_events_details_t.stateDetails */
3883         _aux->stateDetails = *(uint16_t *)xcb_tmp;
3884         xcb_block_len += sizeof(uint16_t);
3885         xcb_tmp += sizeof(uint16_t);
3886         xcb_align_to = ALIGNOF(uint16_t);
3887     }
3888     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY) {
3889         /* xcb_xkb_select_events_details_t.affectCtrls */
3890         _aux->affectCtrls = *(uint32_t *)xcb_tmp;
3891         xcb_block_len += sizeof(uint32_t);
3892         xcb_tmp += sizeof(uint32_t);
3893         xcb_align_to = ALIGNOF(uint32_t);
3894         /* xcb_xkb_select_events_details_t.ctrlDetails */
3895         _aux->ctrlDetails = *(uint32_t *)xcb_tmp;
3896         xcb_block_len += sizeof(uint32_t);
3897         xcb_tmp += sizeof(uint32_t);
3898         xcb_align_to = ALIGNOF(uint32_t);
3899     }
3900     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY) {
3901         /* xcb_xkb_select_events_details_t.affectIndicatorState */
3902         _aux->affectIndicatorState = *(uint32_t *)xcb_tmp;
3903         xcb_block_len += sizeof(uint32_t);
3904         xcb_tmp += sizeof(uint32_t);
3905         xcb_align_to = ALIGNOF(uint32_t);
3906         /* xcb_xkb_select_events_details_t.indicatorStateDetails */
3907         _aux->indicatorStateDetails = *(uint32_t *)xcb_tmp;
3908         xcb_block_len += sizeof(uint32_t);
3909         xcb_tmp += sizeof(uint32_t);
3910         xcb_align_to = ALIGNOF(uint32_t);
3911     }
3912     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY) {
3913         /* xcb_xkb_select_events_details_t.affectIndicatorMap */
3914         _aux->affectIndicatorMap = *(uint32_t *)xcb_tmp;
3915         xcb_block_len += sizeof(uint32_t);
3916         xcb_tmp += sizeof(uint32_t);
3917         xcb_align_to = ALIGNOF(uint32_t);
3918         /* xcb_xkb_select_events_details_t.indicatorMapDetails */
3919         _aux->indicatorMapDetails = *(uint32_t *)xcb_tmp;
3920         xcb_block_len += sizeof(uint32_t);
3921         xcb_tmp += sizeof(uint32_t);
3922         xcb_align_to = ALIGNOF(uint32_t);
3923     }
3924     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NAMES_NOTIFY) {
3925         /* xcb_xkb_select_events_details_t.affectNames */
3926         _aux->affectNames = *(uint16_t *)xcb_tmp;
3927         xcb_block_len += sizeof(uint16_t);
3928         xcb_tmp += sizeof(uint16_t);
3929         xcb_align_to = ALIGNOF(uint16_t);
3930         /* xcb_xkb_select_events_details_t.namesDetails */
3931         _aux->namesDetails = *(uint16_t *)xcb_tmp;
3932         xcb_block_len += sizeof(uint16_t);
3933         xcb_tmp += sizeof(uint16_t);
3934         xcb_align_to = ALIGNOF(uint16_t);
3935     }
3936     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY) {
3937         /* xcb_xkb_select_events_details_t.affectCompat */
3938         _aux->affectCompat = *(uint8_t *)xcb_tmp;
3939         xcb_block_len += sizeof(uint8_t);
3940         xcb_tmp += sizeof(uint8_t);
3941         xcb_align_to = ALIGNOF(uint8_t);
3942         /* xcb_xkb_select_events_details_t.compatDetails */
3943         _aux->compatDetails = *(uint8_t *)xcb_tmp;
3944         xcb_block_len += sizeof(uint8_t);
3945         xcb_tmp += sizeof(uint8_t);
3946         xcb_align_to = ALIGNOF(uint8_t);
3947     }
3948     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_BELL_NOTIFY) {
3949         /* xcb_xkb_select_events_details_t.affectBell */
3950         _aux->affectBell = *(uint8_t *)xcb_tmp;
3951         xcb_block_len += sizeof(uint8_t);
3952         xcb_tmp += sizeof(uint8_t);
3953         xcb_align_to = ALIGNOF(uint8_t);
3954         /* xcb_xkb_select_events_details_t.bellDetails */
3955         _aux->bellDetails = *(uint8_t *)xcb_tmp;
3956         xcb_block_len += sizeof(uint8_t);
3957         xcb_tmp += sizeof(uint8_t);
3958         xcb_align_to = ALIGNOF(uint8_t);
3959     }
3960     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACTION_MESSAGE) {
3961         /* xcb_xkb_select_events_details_t.affectMsgDetails */
3962         _aux->affectMsgDetails = *(uint8_t *)xcb_tmp;
3963         xcb_block_len += sizeof(uint8_t);
3964         xcb_tmp += sizeof(uint8_t);
3965         xcb_align_to = ALIGNOF(uint8_t);
3966         /* xcb_xkb_select_events_details_t.msgDetails */
3967         _aux->msgDetails = *(uint8_t *)xcb_tmp;
3968         xcb_block_len += sizeof(uint8_t);
3969         xcb_tmp += sizeof(uint8_t);
3970         xcb_align_to = ALIGNOF(uint8_t);
3971     }
3972     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY) {
3973         /* xcb_xkb_select_events_details_t.affectAccessX */
3974         _aux->affectAccessX = *(uint16_t *)xcb_tmp;
3975         xcb_block_len += sizeof(uint16_t);
3976         xcb_tmp += sizeof(uint16_t);
3977         xcb_align_to = ALIGNOF(uint16_t);
3978         /* xcb_xkb_select_events_details_t.accessXDetails */
3979         _aux->accessXDetails = *(uint16_t *)xcb_tmp;
3980         xcb_block_len += sizeof(uint16_t);
3981         xcb_tmp += sizeof(uint16_t);
3982         xcb_align_to = ALIGNOF(uint16_t);
3983     }
3984     if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY) {
3985         /* xcb_xkb_select_events_details_t.affectExtDev */
3986         _aux->affectExtDev = *(uint16_t *)xcb_tmp;
3987         xcb_block_len += sizeof(uint16_t);
3988         xcb_tmp += sizeof(uint16_t);
3989         xcb_align_to = ALIGNOF(uint16_t);
3990         /* xcb_xkb_select_events_details_t.extdevDetails */
3991         _aux->extdevDetails = *(uint16_t *)xcb_tmp;
3992         xcb_block_len += sizeof(uint16_t);
3993         xcb_tmp += sizeof(uint16_t);
3994         xcb_align_to = ALIGNOF(uint16_t);
3995     }
3996     /* insert padding */
3997     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3998     xcb_buffer_len += xcb_block_len + xcb_pad;
3999     if (0 != xcb_pad) {
4000         xcb_tmp += xcb_pad;
4001         xcb_pad = 0;
4002     }
4003     xcb_block_len = 0;
4004 
4005     return xcb_buffer_len;
4006 }
4007 
4008 int
4009 xcb_xkb_select_events_details_sizeof (const void  *_buffer  /**< */,
4010                                       uint16_t     affectWhich  /**< */,
4011                                       uint16_t     clear  /**< */,
4012                                       uint16_t     selectAll  /**< */)
4013 {
4014     xcb_xkb_select_events_details_t _aux;
4015     return xcb_xkb_select_events_details_unpack(_buffer, affectWhich, clear, selectAll, &_aux);
4016 }
4017 
4018 
4019 /*****************************************************************************
4020  **
4021  ** xcb_void_cookie_t xcb_xkb_select_events_checked
4022  **
4023  ** @param xcb_connection_t      *c
4024  ** @param xcb_xkb_device_spec_t  deviceSpec
4025  ** @param uint16_t               affectWhich
4026  ** @param uint16_t               clear
4027  ** @param uint16_t               selectAll
4028  ** @param uint16_t               affectMap
4029  ** @param uint16_t               map
4030  ** @param const void            *details
4031  ** @returns xcb_void_cookie_t
4032  **
4033  *****************************************************************************/
4034 
4035 xcb_void_cookie_t
4036 xcb_xkb_select_events_checked (xcb_connection_t      *c  /**< */,
4037                                xcb_xkb_device_spec_t  deviceSpec  /**< */,
4038                                uint16_t               affectWhich  /**< */,
4039                                uint16_t               clear  /**< */,
4040                                uint16_t               selectAll  /**< */,
4041                                uint16_t               affectMap  /**< */,
4042                                uint16_t               map  /**< */,
4043                                const void            *details  /**< */)
4044 {
4045     static const xcb_protocol_request_t xcb_req = {
4046         /* count */ 3,
4047         /* ext */ &xcb_xkb_id,
4048         /* opcode */ XCB_XKB_SELECT_EVENTS,
4049         /* isvoid */ 1
4050     };
4051 
4052     struct iovec xcb_parts[5];
4053     xcb_void_cookie_t xcb_ret;
4054     xcb_xkb_select_events_request_t xcb_out;
4055 
4056     xcb_out.deviceSpec = deviceSpec;
4057     xcb_out.affectWhich = affectWhich;
4058     xcb_out.clear = clear;
4059     xcb_out.selectAll = selectAll;
4060     xcb_out.affectMap = affectMap;
4061     xcb_out.map = map;
4062 
4063     xcb_parts[2].iov_base = (char *) &xcb_out;
4064     xcb_parts[2].iov_len = sizeof(xcb_out);
4065     xcb_parts[3].iov_base = 0;
4066     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4067     /* xcb_xkb_select_events_details_t details */
4068     xcb_parts[4].iov_base = (char *) details;
4069     xcb_parts[4].iov_len =
4070       xcb_xkb_select_events_details_sizeof (details, affectWhich, clear, selectAll);
4071 
4072     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4073     return xcb_ret;
4074 }
4075 
4076 
4077 /*****************************************************************************
4078  **
4079  ** xcb_void_cookie_t xcb_xkb_select_events
4080  **
4081  ** @param xcb_connection_t      *c
4082  ** @param xcb_xkb_device_spec_t  deviceSpec
4083  ** @param uint16_t               affectWhich
4084  ** @param uint16_t               clear
4085  ** @param uint16_t               selectAll
4086  ** @param uint16_t               affectMap
4087  ** @param uint16_t               map
4088  ** @param const void            *details
4089  ** @returns xcb_void_cookie_t
4090  **
4091  *****************************************************************************/
4092 
4093 xcb_void_cookie_t
4094 xcb_xkb_select_events (xcb_connection_t      *c  /**< */,
4095                        xcb_xkb_device_spec_t  deviceSpec  /**< */,
4096                        uint16_t               affectWhich  /**< */,
4097                        uint16_t               clear  /**< */,
4098                        uint16_t               selectAll  /**< */,
4099                        uint16_t               affectMap  /**< */,
4100                        uint16_t               map  /**< */,
4101                        const void            *details  /**< */)
4102 {
4103     static const xcb_protocol_request_t xcb_req = {
4104         /* count */ 3,
4105         /* ext */ &xcb_xkb_id,
4106         /* opcode */ XCB_XKB_SELECT_EVENTS,
4107         /* isvoid */ 1
4108     };
4109 
4110     struct iovec xcb_parts[5];
4111     xcb_void_cookie_t xcb_ret;
4112     xcb_xkb_select_events_request_t xcb_out;
4113 
4114     xcb_out.deviceSpec = deviceSpec;
4115     xcb_out.affectWhich = affectWhich;
4116     xcb_out.clear = clear;
4117     xcb_out.selectAll = selectAll;
4118     xcb_out.affectMap = affectMap;
4119     xcb_out.map = map;
4120 
4121     xcb_parts[2].iov_base = (char *) &xcb_out;
4122     xcb_parts[2].iov_len = sizeof(xcb_out);
4123     xcb_parts[3].iov_base = 0;
4124     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4125     /* xcb_xkb_select_events_details_t details */
4126     xcb_parts[4].iov_base = (char *) details;
4127     xcb_parts[4].iov_len =
4128       xcb_xkb_select_events_details_sizeof (details, affectWhich, clear, selectAll);
4129 
4130     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4131     return xcb_ret;
4132 }
4133 
4134 
4135 /*****************************************************************************
4136  **
4137  ** xcb_void_cookie_t xcb_xkb_select_events_aux_checked
4138  **
4139  ** @param xcb_connection_t                      *c
4140  ** @param xcb_xkb_device_spec_t                  deviceSpec
4141  ** @param uint16_t                               affectWhich
4142  ** @param uint16_t                               clear
4143  ** @param uint16_t                               selectAll
4144  ** @param uint16_t                               affectMap
4145  ** @param uint16_t                               map
4146  ** @param const xcb_xkb_select_events_details_t *details
4147  ** @returns xcb_void_cookie_t
4148  **
4149  *****************************************************************************/
4150 
4151 xcb_void_cookie_t
4152 xcb_xkb_select_events_aux_checked (xcb_connection_t                      *c  /**< */,
4153                                    xcb_xkb_device_spec_t                  deviceSpec  /**< */,
4154                                    uint16_t                               affectWhich  /**< */,
4155                                    uint16_t                               clear  /**< */,
4156                                    uint16_t                               selectAll  /**< */,
4157                                    uint16_t                               affectMap  /**< */,
4158                                    uint16_t                               map  /**< */,
4159                                    const xcb_xkb_select_events_details_t *details  /**< */)
4160 {
4161     static const xcb_protocol_request_t xcb_req = {
4162         /* count */ 3,
4163         /* ext */ &xcb_xkb_id,
4164         /* opcode */ XCB_XKB_SELECT_EVENTS,
4165         /* isvoid */ 1
4166     };
4167 
4168     struct iovec xcb_parts[5];
4169     xcb_void_cookie_t xcb_ret;
4170     xcb_xkb_select_events_request_t xcb_out;
4171     void *xcb_aux0 = 0;
4172 
4173     xcb_out.deviceSpec = deviceSpec;
4174     xcb_out.affectWhich = affectWhich;
4175     xcb_out.clear = clear;
4176     xcb_out.selectAll = selectAll;
4177     xcb_out.affectMap = affectMap;
4178     xcb_out.map = map;
4179 
4180     xcb_parts[2].iov_base = (char *) &xcb_out;
4181     xcb_parts[2].iov_len = sizeof(xcb_out);
4182     xcb_parts[3].iov_base = 0;
4183     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4184     /* xcb_xkb_select_events_details_t details */
4185     xcb_parts[4].iov_len =
4186       xcb_xkb_select_events_details_serialize (&xcb_aux0, affectWhich, clear, selectAll, details);
4187     xcb_parts[4].iov_base = xcb_aux0;
4188 
4189     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4190     free(xcb_aux0);
4191     return xcb_ret;
4192 }
4193 
4194 
4195 /*****************************************************************************
4196  **
4197  ** xcb_void_cookie_t xcb_xkb_select_events_aux
4198  **
4199  ** @param xcb_connection_t                      *c
4200  ** @param xcb_xkb_device_spec_t                  deviceSpec
4201  ** @param uint16_t                               affectWhich
4202  ** @param uint16_t                               clear
4203  ** @param uint16_t                               selectAll
4204  ** @param uint16_t                               affectMap
4205  ** @param uint16_t                               map
4206  ** @param const xcb_xkb_select_events_details_t *details
4207  ** @returns xcb_void_cookie_t
4208  **
4209  *****************************************************************************/
4210 
4211 xcb_void_cookie_t
4212 xcb_xkb_select_events_aux (xcb_connection_t                      *c  /**< */,
4213                            xcb_xkb_device_spec_t                  deviceSpec  /**< */,
4214                            uint16_t                               affectWhich  /**< */,
4215                            uint16_t                               clear  /**< */,
4216                            uint16_t                               selectAll  /**< */,
4217                            uint16_t                               affectMap  /**< */,
4218                            uint16_t                               map  /**< */,
4219                            const xcb_xkb_select_events_details_t *details  /**< */)
4220 {
4221     static const xcb_protocol_request_t xcb_req = {
4222         /* count */ 3,
4223         /* ext */ &xcb_xkb_id,
4224         /* opcode */ XCB_XKB_SELECT_EVENTS,
4225         /* isvoid */ 1
4226     };
4227 
4228     struct iovec xcb_parts[5];
4229     xcb_void_cookie_t xcb_ret;
4230     xcb_xkb_select_events_request_t xcb_out;
4231     void *xcb_aux0 = 0;
4232 
4233     xcb_out.deviceSpec = deviceSpec;
4234     xcb_out.affectWhich = affectWhich;
4235     xcb_out.clear = clear;
4236     xcb_out.selectAll = selectAll;
4237     xcb_out.affectMap = affectMap;
4238     xcb_out.map = map;
4239 
4240     xcb_parts[2].iov_base = (char *) &xcb_out;
4241     xcb_parts[2].iov_len = sizeof(xcb_out);
4242     xcb_parts[3].iov_base = 0;
4243     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4244     /* xcb_xkb_select_events_details_t details */
4245     xcb_parts[4].iov_len =
4246       xcb_xkb_select_events_details_serialize (&xcb_aux0, affectWhich, clear, selectAll, details);
4247     xcb_parts[4].iov_base = xcb_aux0;
4248 
4249     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4250     free(xcb_aux0);
4251     return xcb_ret;
4252 }
4253 
4254 
4255 /*****************************************************************************
4256  **
4257  ** xcb_void_cookie_t xcb_xkb_bell_checked
4258  **
4259  ** @param xcb_connection_t          *c
4260  ** @param xcb_xkb_device_spec_t      deviceSpec
4261  ** @param xcb_xkb_bell_class_spec_t  bellClass
4262  ** @param xcb_xkb_id_spec_t          bellID
4263  ** @param int8_t                     percent
4264  ** @param uint8_t                    forceSound
4265  ** @param uint8_t                    eventOnly
4266  ** @param int16_t                    pitch
4267  ** @param int16_t                    duration
4268  ** @param xcb_atom_t                 name
4269  ** @param xcb_window_t               window
4270  ** @returns xcb_void_cookie_t
4271  **
4272  *****************************************************************************/
4273 
4274 xcb_void_cookie_t
4275 xcb_xkb_bell_checked (xcb_connection_t          *c  /**< */,
4276                       xcb_xkb_device_spec_t      deviceSpec  /**< */,
4277                       xcb_xkb_bell_class_spec_t  bellClass  /**< */,
4278                       xcb_xkb_id_spec_t          bellID  /**< */,
4279                       int8_t                     percent  /**< */,
4280                       uint8_t                    forceSound  /**< */,
4281                       uint8_t                    eventOnly  /**< */,
4282                       int16_t                    pitch  /**< */,
4283                       int16_t                    duration  /**< */,
4284                       xcb_atom_t                 name  /**< */,
4285                       xcb_window_t               window  /**< */)
4286 {
4287     static const xcb_protocol_request_t xcb_req = {
4288         /* count */ 2,
4289         /* ext */ &xcb_xkb_id,
4290         /* opcode */ XCB_XKB_BELL,
4291         /* isvoid */ 1
4292     };
4293 
4294     struct iovec xcb_parts[4];
4295     xcb_void_cookie_t xcb_ret;
4296     xcb_xkb_bell_request_t xcb_out;
4297 
4298     xcb_out.deviceSpec = deviceSpec;
4299     xcb_out.bellClass = bellClass;
4300     xcb_out.bellID = bellID;
4301     xcb_out.percent = percent;
4302     xcb_out.forceSound = forceSound;
4303     xcb_out.eventOnly = eventOnly;
4304     xcb_out.pad0 = 0;
4305     xcb_out.pitch = pitch;
4306     xcb_out.duration = duration;
4307     memset(xcb_out.pad1, 0, 2);
4308     xcb_out.name = name;
4309     xcb_out.window = window;
4310 
4311     xcb_parts[2].iov_base = (char *) &xcb_out;
4312     xcb_parts[2].iov_len = sizeof(xcb_out);
4313     xcb_parts[3].iov_base = 0;
4314     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4315 
4316     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4317     return xcb_ret;
4318 }
4319 
4320 
4321 /*****************************************************************************
4322  **
4323  ** xcb_void_cookie_t xcb_xkb_bell
4324  **
4325  ** @param xcb_connection_t          *c
4326  ** @param xcb_xkb_device_spec_t      deviceSpec
4327  ** @param xcb_xkb_bell_class_spec_t  bellClass
4328  ** @param xcb_xkb_id_spec_t          bellID
4329  ** @param int8_t                     percent
4330  ** @param uint8_t                    forceSound
4331  ** @param uint8_t                    eventOnly
4332  ** @param int16_t                    pitch
4333  ** @param int16_t                    duration
4334  ** @param xcb_atom_t                 name
4335  ** @param xcb_window_t               window
4336  ** @returns xcb_void_cookie_t
4337  **
4338  *****************************************************************************/
4339 
4340 xcb_void_cookie_t
4341 xcb_xkb_bell (xcb_connection_t          *c  /**< */,
4342               xcb_xkb_device_spec_t      deviceSpec  /**< */,
4343               xcb_xkb_bell_class_spec_t  bellClass  /**< */,
4344               xcb_xkb_id_spec_t          bellID  /**< */,
4345               int8_t                     percent  /**< */,
4346               uint8_t                    forceSound  /**< */,
4347               uint8_t                    eventOnly  /**< */,
4348               int16_t                    pitch  /**< */,
4349               int16_t                    duration  /**< */,
4350               xcb_atom_t                 name  /**< */,
4351               xcb_window_t               window  /**< */)
4352 {
4353     static const xcb_protocol_request_t xcb_req = {
4354         /* count */ 2,
4355         /* ext */ &xcb_xkb_id,
4356         /* opcode */ XCB_XKB_BELL,
4357         /* isvoid */ 1
4358     };
4359 
4360     struct iovec xcb_parts[4];
4361     xcb_void_cookie_t xcb_ret;
4362     xcb_xkb_bell_request_t xcb_out;
4363 
4364     xcb_out.deviceSpec = deviceSpec;
4365     xcb_out.bellClass = bellClass;
4366     xcb_out.bellID = bellID;
4367     xcb_out.percent = percent;
4368     xcb_out.forceSound = forceSound;
4369     xcb_out.eventOnly = eventOnly;
4370     xcb_out.pad0 = 0;
4371     xcb_out.pitch = pitch;
4372     xcb_out.duration = duration;
4373     memset(xcb_out.pad1, 0, 2);
4374     xcb_out.name = name;
4375     xcb_out.window = window;
4376 
4377     xcb_parts[2].iov_base = (char *) &xcb_out;
4378     xcb_parts[2].iov_len = sizeof(xcb_out);
4379     xcb_parts[3].iov_base = 0;
4380     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4381 
4382     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4383     return xcb_ret;
4384 }
4385 
4386 
4387 /*****************************************************************************
4388  **
4389  ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state
4390  **
4391  ** @param xcb_connection_t      *c
4392  ** @param xcb_xkb_device_spec_t  deviceSpec
4393  ** @returns xcb_xkb_get_state_cookie_t
4394  **
4395  *****************************************************************************/
4396 
4397 xcb_xkb_get_state_cookie_t
4398 xcb_xkb_get_state (xcb_connection_t      *c  /**< */,
4399                    xcb_xkb_device_spec_t  deviceSpec  /**< */)
4400 {
4401     static const xcb_protocol_request_t xcb_req = {
4402         /* count */ 2,
4403         /* ext */ &xcb_xkb_id,
4404         /* opcode */ XCB_XKB_GET_STATE,
4405         /* isvoid */ 0
4406     };
4407 
4408     struct iovec xcb_parts[4];
4409     xcb_xkb_get_state_cookie_t xcb_ret;
4410     xcb_xkb_get_state_request_t xcb_out;
4411 
4412     xcb_out.deviceSpec = deviceSpec;
4413     memset(xcb_out.pad0, 0, 2);
4414 
4415     xcb_parts[2].iov_base = (char *) &xcb_out;
4416     xcb_parts[2].iov_len = sizeof(xcb_out);
4417     xcb_parts[3].iov_base = 0;
4418     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4419 
4420     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4421     return xcb_ret;
4422 }
4423 
4424 
4425 /*****************************************************************************
4426  **
4427  ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state_unchecked
4428  **
4429  ** @param xcb_connection_t      *c
4430  ** @param xcb_xkb_device_spec_t  deviceSpec
4431  ** @returns xcb_xkb_get_state_cookie_t
4432  **
4433  *****************************************************************************/
4434 
4435 xcb_xkb_get_state_cookie_t
4436 xcb_xkb_get_state_unchecked (xcb_connection_t      *c  /**< */,
4437                              xcb_xkb_device_spec_t  deviceSpec  /**< */)
4438 {
4439     static const xcb_protocol_request_t xcb_req = {
4440         /* count */ 2,
4441         /* ext */ &xcb_xkb_id,
4442         /* opcode */ XCB_XKB_GET_STATE,
4443         /* isvoid */ 0
4444     };
4445 
4446     struct iovec xcb_parts[4];
4447     xcb_xkb_get_state_cookie_t xcb_ret;
4448     xcb_xkb_get_state_request_t xcb_out;
4449 
4450     xcb_out.deviceSpec = deviceSpec;
4451     memset(xcb_out.pad0, 0, 2);
4452 
4453     xcb_parts[2].iov_base = (char *) &xcb_out;
4454     xcb_parts[2].iov_len = sizeof(xcb_out);
4455     xcb_parts[3].iov_base = 0;
4456     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4457 
4458     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4459     return xcb_ret;
4460 }
4461 
4462 
4463 /*****************************************************************************
4464  **
4465  ** xcb_xkb_get_state_reply_t * xcb_xkb_get_state_reply
4466  **
4467  ** @param xcb_connection_t            *c
4468  ** @param xcb_xkb_get_state_cookie_t   cookie
4469  ** @param xcb_generic_error_t        **e
4470  ** @returns xcb_xkb_get_state_reply_t *
4471  **
4472  *****************************************************************************/
4473 
4474 xcb_xkb_get_state_reply_t *
4475 xcb_xkb_get_state_reply (xcb_connection_t            *c  /**< */,
4476                          xcb_xkb_get_state_cookie_t   cookie  /**< */,
4477                          xcb_generic_error_t        **e  /**< */)
4478 {
4479     return (xcb_xkb_get_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4480 }
4481 
4482 
4483 /*****************************************************************************
4484  **
4485  ** xcb_void_cookie_t xcb_xkb_latch_lock_state_checked
4486  **
4487  ** @param xcb_connection_t      *c
4488  ** @param xcb_xkb_device_spec_t  deviceSpec
4489  ** @param uint8_t                affectModLocks
4490  ** @param uint8_t                modLocks
4491  ** @param uint8_t                lockGroup
4492  ** @param uint8_t                groupLock
4493  ** @param uint8_t                affectModLatches
4494  ** @param uint8_t                latchGroup
4495  ** @param uint16_t               groupLatch
4496  ** @returns xcb_void_cookie_t
4497  **
4498  *****************************************************************************/
4499 
4500 xcb_void_cookie_t
4501 xcb_xkb_latch_lock_state_checked (xcb_connection_t      *c  /**< */,
4502                                   xcb_xkb_device_spec_t  deviceSpec  /**< */,
4503                                   uint8_t                affectModLocks  /**< */,
4504                                   uint8_t                modLocks  /**< */,
4505                                   uint8_t                lockGroup  /**< */,
4506                                   uint8_t                groupLock  /**< */,
4507                                   uint8_t                affectModLatches  /**< */,
4508                                   uint8_t                latchGroup  /**< */,
4509                                   uint16_t               groupLatch  /**< */)
4510 {
4511     static const xcb_protocol_request_t xcb_req = {
4512         /* count */ 2,
4513         /* ext */ &xcb_xkb_id,
4514         /* opcode */ XCB_XKB_LATCH_LOCK_STATE,
4515         /* isvoid */ 1
4516     };
4517 
4518     struct iovec xcb_parts[4];
4519     xcb_void_cookie_t xcb_ret;
4520     xcb_xkb_latch_lock_state_request_t xcb_out;
4521 
4522     xcb_out.deviceSpec = deviceSpec;
4523     xcb_out.affectModLocks = affectModLocks;
4524     xcb_out.modLocks = modLocks;
4525     xcb_out.lockGroup = lockGroup;
4526     xcb_out.groupLock = groupLock;
4527     xcb_out.affectModLatches = affectModLatches;
4528     xcb_out.pad0 = 0;
4529     xcb_out.latchGroup = latchGroup;
4530     xcb_out.groupLatch = groupLatch;
4531 
4532     xcb_parts[2].iov_base = (char *) &xcb_out;
4533     xcb_parts[2].iov_len = sizeof(xcb_out);
4534     xcb_parts[3].iov_base = 0;
4535     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4536 
4537     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4538     return xcb_ret;
4539 }
4540 
4541 
4542 /*****************************************************************************
4543  **
4544  ** xcb_void_cookie_t xcb_xkb_latch_lock_state
4545  **
4546  ** @param xcb_connection_t      *c
4547  ** @param xcb_xkb_device_spec_t  deviceSpec
4548  ** @param uint8_t                affectModLocks
4549  ** @param uint8_t                modLocks
4550  ** @param uint8_t                lockGroup
4551  ** @param uint8_t                groupLock
4552  ** @param uint8_t                affectModLatches
4553  ** @param uint8_t                latchGroup
4554  ** @param uint16_t               groupLatch
4555  ** @returns xcb_void_cookie_t
4556  **
4557  *****************************************************************************/
4558 
4559 xcb_void_cookie_t
4560 xcb_xkb_latch_lock_state (xcb_connection_t      *c  /**< */,
4561                           xcb_xkb_device_spec_t  deviceSpec  /**< */,
4562                           uint8_t                affectModLocks  /**< */,
4563                           uint8_t                modLocks  /**< */,
4564                           uint8_t                lockGroup  /**< */,
4565                           uint8_t                groupLock  /**< */,
4566                           uint8_t                affectModLatches  /**< */,
4567                           uint8_t                latchGroup  /**< */,
4568                           uint16_t               groupLatch  /**< */)
4569 {
4570     static const xcb_protocol_request_t xcb_req = {
4571         /* count */ 2,
4572         /* ext */ &xcb_xkb_id,
4573         /* opcode */ XCB_XKB_LATCH_LOCK_STATE,
4574         /* isvoid */ 1
4575     };
4576 
4577     struct iovec xcb_parts[4];
4578     xcb_void_cookie_t xcb_ret;
4579     xcb_xkb_latch_lock_state_request_t xcb_out;
4580 
4581     xcb_out.deviceSpec = deviceSpec;
4582     xcb_out.affectModLocks = affectModLocks;
4583     xcb_out.modLocks = modLocks;
4584     xcb_out.lockGroup = lockGroup;
4585     xcb_out.groupLock = groupLock;
4586     xcb_out.affectModLatches = affectModLatches;
4587     xcb_out.pad0 = 0;
4588     xcb_out.latchGroup = latchGroup;
4589     xcb_out.groupLatch = groupLatch;
4590 
4591     xcb_parts[2].iov_base = (char *) &xcb_out;
4592     xcb_parts[2].iov_len = sizeof(xcb_out);
4593     xcb_parts[3].iov_base = 0;
4594     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4595 
4596     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4597     return xcb_ret;
4598 }
4599 
4600 
4601 /*****************************************************************************
4602  **
4603  ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls
4604  **
4605  ** @param xcb_connection_t      *c
4606  ** @param xcb_xkb_device_spec_t  deviceSpec
4607  ** @returns xcb_xkb_get_controls_cookie_t
4608  **
4609  *****************************************************************************/
4610 
4611 xcb_xkb_get_controls_cookie_t
4612 xcb_xkb_get_controls (xcb_connection_t      *c  /**< */,
4613                       xcb_xkb_device_spec_t  deviceSpec  /**< */)
4614 {
4615     static const xcb_protocol_request_t xcb_req = {
4616         /* count */ 2,
4617         /* ext */ &xcb_xkb_id,
4618         /* opcode */ XCB_XKB_GET_CONTROLS,
4619         /* isvoid */ 0
4620     };
4621 
4622     struct iovec xcb_parts[4];
4623     xcb_xkb_get_controls_cookie_t xcb_ret;
4624     xcb_xkb_get_controls_request_t xcb_out;
4625 
4626     xcb_out.deviceSpec = deviceSpec;
4627     memset(xcb_out.pad0, 0, 2);
4628 
4629     xcb_parts[2].iov_base = (char *) &xcb_out;
4630     xcb_parts[2].iov_len = sizeof(xcb_out);
4631     xcb_parts[3].iov_base = 0;
4632     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4633 
4634     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4635     return xcb_ret;
4636 }
4637 
4638 
4639 /*****************************************************************************
4640  **
4641  ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls_unchecked
4642  **
4643  ** @param xcb_connection_t      *c
4644  ** @param xcb_xkb_device_spec_t  deviceSpec
4645  ** @returns xcb_xkb_get_controls_cookie_t
4646  **
4647  *****************************************************************************/
4648 
4649 xcb_xkb_get_controls_cookie_t
4650 xcb_xkb_get_controls_unchecked (xcb_connection_t      *c  /**< */,
4651                                 xcb_xkb_device_spec_t  deviceSpec  /**< */)
4652 {
4653     static const xcb_protocol_request_t xcb_req = {
4654         /* count */ 2,
4655         /* ext */ &xcb_xkb_id,
4656         /* opcode */ XCB_XKB_GET_CONTROLS,
4657         /* isvoid */ 0
4658     };
4659 
4660     struct iovec xcb_parts[4];
4661     xcb_xkb_get_controls_cookie_t xcb_ret;
4662     xcb_xkb_get_controls_request_t xcb_out;
4663 
4664     xcb_out.deviceSpec = deviceSpec;
4665     memset(xcb_out.pad0, 0, 2);
4666 
4667     xcb_parts[2].iov_base = (char *) &xcb_out;
4668     xcb_parts[2].iov_len = sizeof(xcb_out);
4669     xcb_parts[3].iov_base = 0;
4670     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4671 
4672     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4673     return xcb_ret;
4674 }
4675 
4676 
4677 /*****************************************************************************
4678  **
4679  ** xcb_xkb_get_controls_reply_t * xcb_xkb_get_controls_reply
4680  **
4681  ** @param xcb_connection_t               *c
4682  ** @param xcb_xkb_get_controls_cookie_t   cookie
4683  ** @param xcb_generic_error_t           **e
4684  ** @returns xcb_xkb_get_controls_reply_t *
4685  **
4686  *****************************************************************************/
4687 
4688 xcb_xkb_get_controls_reply_t *
4689 xcb_xkb_get_controls_reply (xcb_connection_t               *c  /**< */,
4690                             xcb_xkb_get_controls_cookie_t   cookie  /**< */,
4691                             xcb_generic_error_t           **e  /**< */)
4692 {
4693     return (xcb_xkb_get_controls_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4694 }
4695 
4696 
4697 /*****************************************************************************
4698  **
4699  ** xcb_void_cookie_t xcb_xkb_set_controls_checked
4700  **
4701  ** @param xcb_connection_t      *c
4702  ** @param xcb_xkb_device_spec_t  deviceSpec
4703  ** @param uint8_t                affectInternalRealMods
4704  ** @param uint8_t                internalRealMods
4705  ** @param uint8_t                affectIgnoreLockRealMods
4706  ** @param uint8_t                ignoreLockRealMods
4707  ** @param uint16_t               affectInternalVirtualMods
4708  ** @param uint16_t               internalVirtualMods
4709  ** @param uint16_t               affectIgnoreLockVirtualMods
4710  ** @param uint16_t               ignoreLockVirtualMods
4711  ** @param uint8_t                mouseKeysDfltBtn
4712  ** @param uint8_t                groupsWrap
4713  ** @param uint16_t               accessXOptions
4714  ** @param uint32_t               affectEnabledControls
4715  ** @param uint32_t               enabledControls
4716  ** @param uint32_t               changeControls
4717  ** @param uint16_t               repeatDelay
4718  ** @param uint16_t               repeatInterval
4719  ** @param uint16_t               slowKeysDelay
4720  ** @param uint16_t               debounceDelay
4721  ** @param uint16_t               mouseKeysDelay
4722  ** @param uint16_t               mouseKeysInterval
4723  ** @param uint16_t               mouseKeysTimeToMax
4724  ** @param uint16_t               mouseKeysMaxSpeed
4725  ** @param int16_t                mouseKeysCurve
4726  ** @param uint16_t               accessXTimeout
4727  ** @param uint32_t               accessXTimeoutMask
4728  ** @param uint32_t               accessXTimeoutValues
4729  ** @param uint16_t               accessXTimeoutOptionsMask
4730  ** @param uint16_t               accessXTimeoutOptionsValues
4731  ** @param const uint8_t         *perKeyRepeat
4732  ** @returns xcb_void_cookie_t
4733  **
4734  *****************************************************************************/
4735 
4736 xcb_void_cookie_t
4737 xcb_xkb_set_controls_checked (xcb_connection_t      *c  /**< */,
4738                               xcb_xkb_device_spec_t  deviceSpec  /**< */,
4739                               uint8_t                affectInternalRealMods  /**< */,
4740                               uint8_t                internalRealMods  /**< */,
4741                               uint8_t                affectIgnoreLockRealMods  /**< */,
4742                               uint8_t                ignoreLockRealMods  /**< */,
4743                               uint16_t               affectInternalVirtualMods  /**< */,
4744                               uint16_t               internalVirtualMods  /**< */,
4745                               uint16_t               affectIgnoreLockVirtualMods  /**< */,
4746                               uint16_t               ignoreLockVirtualMods  /**< */,
4747                               uint8_t                mouseKeysDfltBtn  /**< */,
4748                               uint8_t                groupsWrap  /**< */,
4749                               uint16_t               accessXOptions  /**< */,
4750                               uint32_t               affectEnabledControls  /**< */,
4751                               uint32_t               enabledControls  /**< */,
4752                               uint32_t               changeControls  /**< */,
4753                               uint16_t               repeatDelay  /**< */,
4754                               uint16_t               repeatInterval  /**< */,
4755                               uint16_t               slowKeysDelay  /**< */,
4756                               uint16_t               debounceDelay  /**< */,
4757                               uint16_t               mouseKeysDelay  /**< */,
4758                               uint16_t               mouseKeysInterval  /**< */,
4759                               uint16_t               mouseKeysTimeToMax  /**< */,
4760                               uint16_t               mouseKeysMaxSpeed  /**< */,
4761                               int16_t                mouseKeysCurve  /**< */,
4762                               uint16_t               accessXTimeout  /**< */,
4763                               uint32_t               accessXTimeoutMask  /**< */,
4764                               uint32_t               accessXTimeoutValues  /**< */,
4765                               uint16_t               accessXTimeoutOptionsMask  /**< */,
4766                               uint16_t               accessXTimeoutOptionsValues  /**< */,
4767                               const uint8_t         *perKeyRepeat  /**< */)
4768 {
4769     static const xcb_protocol_request_t xcb_req = {
4770         /* count */ 2,
4771         /* ext */ &xcb_xkb_id,
4772         /* opcode */ XCB_XKB_SET_CONTROLS,
4773         /* isvoid */ 1
4774     };
4775 
4776     struct iovec xcb_parts[4];
4777     xcb_void_cookie_t xcb_ret;
4778     xcb_xkb_set_controls_request_t xcb_out;
4779 
4780     xcb_out.deviceSpec = deviceSpec;
4781     xcb_out.affectInternalRealMods = affectInternalRealMods;
4782     xcb_out.internalRealMods = internalRealMods;
4783     xcb_out.affectIgnoreLockRealMods = affectIgnoreLockRealMods;
4784     xcb_out.ignoreLockRealMods = ignoreLockRealMods;
4785     xcb_out.affectInternalVirtualMods = affectInternalVirtualMods;
4786     xcb_out.internalVirtualMods = internalVirtualMods;
4787     xcb_out.affectIgnoreLockVirtualMods = affectIgnoreLockVirtualMods;
4788     xcb_out.ignoreLockVirtualMods = ignoreLockVirtualMods;
4789     xcb_out.mouseKeysDfltBtn = mouseKeysDfltBtn;
4790     xcb_out.groupsWrap = groupsWrap;
4791     xcb_out.accessXOptions = accessXOptions;
4792     memset(xcb_out.pad0, 0, 2);
4793     xcb_out.affectEnabledControls = affectEnabledControls;
4794     xcb_out.enabledControls = enabledControls;
4795     xcb_out.changeControls = changeControls;
4796     xcb_out.repeatDelay = repeatDelay;
4797     xcb_out.repeatInterval = repeatInterval;
4798     xcb_out.slowKeysDelay = slowKeysDelay;
4799     xcb_out.debounceDelay = debounceDelay;
4800     xcb_out.mouseKeysDelay = mouseKeysDelay;
4801     xcb_out.mouseKeysInterval = mouseKeysInterval;
4802     xcb_out.mouseKeysTimeToMax = mouseKeysTimeToMax;
4803     xcb_out.mouseKeysMaxSpeed = mouseKeysMaxSpeed;
4804     xcb_out.mouseKeysCurve = mouseKeysCurve;
4805     xcb_out.accessXTimeout = accessXTimeout;
4806     xcb_out.accessXTimeoutMask = accessXTimeoutMask;
4807     xcb_out.accessXTimeoutValues = accessXTimeoutValues;
4808     xcb_out.accessXTimeoutOptionsMask = accessXTimeoutOptionsMask;
4809     xcb_out.accessXTimeoutOptionsValues = accessXTimeoutOptionsValues;
4810     memcpy(xcb_out.perKeyRepeat, perKeyRepeat, 32);
4811 
4812     xcb_parts[2].iov_base = (char *) &xcb_out;
4813     xcb_parts[2].iov_len = sizeof(xcb_out);
4814     xcb_parts[3].iov_base = 0;
4815     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4816 
4817     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4818     return xcb_ret;
4819 }
4820 
4821 
4822 /*****************************************************************************
4823  **
4824  ** xcb_void_cookie_t xcb_xkb_set_controls
4825  **
4826  ** @param xcb_connection_t      *c
4827  ** @param xcb_xkb_device_spec_t  deviceSpec
4828  ** @param uint8_t                affectInternalRealMods
4829  ** @param uint8_t                internalRealMods
4830  ** @param uint8_t                affectIgnoreLockRealMods
4831  ** @param uint8_t                ignoreLockRealMods
4832  ** @param uint16_t               affectInternalVirtualMods
4833  ** @param uint16_t               internalVirtualMods
4834  ** @param uint16_t               affectIgnoreLockVirtualMods
4835  ** @param uint16_t               ignoreLockVirtualMods
4836  ** @param uint8_t                mouseKeysDfltBtn
4837  ** @param uint8_t                groupsWrap
4838  ** @param uint16_t               accessXOptions
4839  ** @param uint32_t               affectEnabledControls
4840  ** @param uint32_t               enabledControls
4841  ** @param uint32_t               changeControls
4842  ** @param uint16_t               repeatDelay
4843  ** @param uint16_t               repeatInterval
4844  ** @param uint16_t               slowKeysDelay
4845  ** @param uint16_t               debounceDelay
4846  ** @param uint16_t               mouseKeysDelay
4847  ** @param uint16_t               mouseKeysInterval
4848  ** @param uint16_t               mouseKeysTimeToMax
4849  ** @param uint16_t               mouseKeysMaxSpeed
4850  ** @param int16_t                mouseKeysCurve
4851  ** @param uint16_t               accessXTimeout
4852  ** @param uint32_t               accessXTimeoutMask
4853  ** @param uint32_t               accessXTimeoutValues
4854  ** @param uint16_t               accessXTimeoutOptionsMask
4855  ** @param uint16_t               accessXTimeoutOptionsValues
4856  ** @param const uint8_t         *perKeyRepeat
4857  ** @returns xcb_void_cookie_t
4858  **
4859  *****************************************************************************/
4860 
4861 xcb_void_cookie_t
4862 xcb_xkb_set_controls (xcb_connection_t      *c  /**< */,
4863                       xcb_xkb_device_spec_t  deviceSpec  /**< */,
4864                       uint8_t                affectInternalRealMods  /**< */,
4865                       uint8_t                internalRealMods  /**< */,
4866                       uint8_t                affectIgnoreLockRealMods  /**< */,
4867                       uint8_t                ignoreLockRealMods  /**< */,
4868                       uint16_t               affectInternalVirtualMods  /**< */,
4869                       uint16_t               internalVirtualMods  /**< */,
4870                       uint16_t               affectIgnoreLockVirtualMods  /**< */,
4871                       uint16_t               ignoreLockVirtualMods  /**< */,
4872                       uint8_t                mouseKeysDfltBtn  /**< */,
4873                       uint8_t                groupsWrap  /**< */,
4874                       uint16_t               accessXOptions  /**< */,
4875                       uint32_t               affectEnabledControls  /**< */,
4876                       uint32_t               enabledControls  /**< */,
4877                       uint32_t               changeControls  /**< */,
4878                       uint16_t               repeatDelay  /**< */,
4879                       uint16_t               repeatInterval  /**< */,
4880                       uint16_t               slowKeysDelay  /**< */,
4881                       uint16_t               debounceDelay  /**< */,
4882                       uint16_t               mouseKeysDelay  /**< */,
4883                       uint16_t               mouseKeysInterval  /**< */,
4884                       uint16_t               mouseKeysTimeToMax  /**< */,
4885                       uint16_t               mouseKeysMaxSpeed  /**< */,
4886                       int16_t                mouseKeysCurve  /**< */,
4887                       uint16_t               accessXTimeout  /**< */,
4888                       uint32_t               accessXTimeoutMask  /**< */,
4889                       uint32_t               accessXTimeoutValues  /**< */,
4890                       uint16_t               accessXTimeoutOptionsMask  /**< */,
4891                       uint16_t               accessXTimeoutOptionsValues  /**< */,
4892                       const uint8_t         *perKeyRepeat  /**< */)
4893 {
4894     static const xcb_protocol_request_t xcb_req = {
4895         /* count */ 2,
4896         /* ext */ &xcb_xkb_id,
4897         /* opcode */ XCB_XKB_SET_CONTROLS,
4898         /* isvoid */ 1
4899     };
4900 
4901     struct iovec xcb_parts[4];
4902     xcb_void_cookie_t xcb_ret;
4903     xcb_xkb_set_controls_request_t xcb_out;
4904 
4905     xcb_out.deviceSpec = deviceSpec;
4906     xcb_out.affectInternalRealMods = affectInternalRealMods;
4907     xcb_out.internalRealMods = internalRealMods;
4908     xcb_out.affectIgnoreLockRealMods = affectIgnoreLockRealMods;
4909     xcb_out.ignoreLockRealMods = ignoreLockRealMods;
4910     xcb_out.affectInternalVirtualMods = affectInternalVirtualMods;
4911     xcb_out.internalVirtualMods = internalVirtualMods;
4912     xcb_out.affectIgnoreLockVirtualMods = affectIgnoreLockVirtualMods;
4913     xcb_out.ignoreLockVirtualMods = ignoreLockVirtualMods;
4914     xcb_out.mouseKeysDfltBtn = mouseKeysDfltBtn;
4915     xcb_out.groupsWrap = groupsWrap;
4916     xcb_out.accessXOptions = accessXOptions;
4917     memset(xcb_out.pad0, 0, 2);
4918     xcb_out.affectEnabledControls = affectEnabledControls;
4919     xcb_out.enabledControls = enabledControls;
4920     xcb_out.changeControls = changeControls;
4921     xcb_out.repeatDelay = repeatDelay;
4922     xcb_out.repeatInterval = repeatInterval;
4923     xcb_out.slowKeysDelay = slowKeysDelay;
4924     xcb_out.debounceDelay = debounceDelay;
4925     xcb_out.mouseKeysDelay = mouseKeysDelay;
4926     xcb_out.mouseKeysInterval = mouseKeysInterval;
4927     xcb_out.mouseKeysTimeToMax = mouseKeysTimeToMax;
4928     xcb_out.mouseKeysMaxSpeed = mouseKeysMaxSpeed;
4929     xcb_out.mouseKeysCurve = mouseKeysCurve;
4930     xcb_out.accessXTimeout = accessXTimeout;
4931     xcb_out.accessXTimeoutMask = accessXTimeoutMask;
4932     xcb_out.accessXTimeoutValues = accessXTimeoutValues;
4933     xcb_out.accessXTimeoutOptionsMask = accessXTimeoutOptionsMask;
4934     xcb_out.accessXTimeoutOptionsValues = accessXTimeoutOptionsValues;
4935     memcpy(xcb_out.perKeyRepeat, perKeyRepeat, 32);
4936 
4937     xcb_parts[2].iov_base = (char *) &xcb_out;
4938     xcb_parts[2].iov_len = sizeof(xcb_out);
4939     xcb_parts[3].iov_base = 0;
4940     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4941 
4942     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4943     return xcb_ret;
4944 }
4945 
4946 
4947 /*****************************************************************************
4948  **
4949  ** int xcb_xkb_get_map_map_types_rtrn_length
4950  **
4951  ** @param const xcb_xkb_get_map_map_t *R
4952  ** @returns int
4953  **
4954  *****************************************************************************/
4955 
4956 int
4957 xcb_xkb_get_map_map_types_rtrn_length (const xcb_xkb_get_map_reply_t *R  /**< */,
4958                                        const xcb_xkb_get_map_map_t *S  /**< */)
4959 {
4960     return R->nTypes;
4961 }
4962 
4963 
4964 /*****************************************************************************
4965  **
4966  ** xcb_xkb_key_type_iterator_t xcb_xkb_get_map_map_types_rtrn_iterator
4967  **
4968  ** @param const xcb_xkb_get_map_map_t *R
4969  ** @returns xcb_xkb_key_type_iterator_t
4970  **
4971  *****************************************************************************/
4972 
4973 xcb_xkb_key_type_iterator_t
4974 xcb_xkb_get_map_map_types_rtrn_iterator (const xcb_xkb_get_map_reply_t *R  /**< */,
4975                                          const xcb_xkb_get_map_map_t *S  /**< */)
4976 {
4977     xcb_xkb_key_type_iterator_t i;
4978     i.data = /* map */ S->types_rtrn;
4979     i.rem = R->nTypes;
4980     i.index = (char *) i.data - (char *) S;
4981     return i;
4982 }
4983 
4984 
4985 /*****************************************************************************
4986  **
4987  ** int xcb_xkb_get_map_map_syms_rtrn_length
4988  **
4989  ** @param const xcb_xkb_get_map_map_t *R
4990  ** @returns int
4991  **
4992  *****************************************************************************/
4993 
4994 int
4995 xcb_xkb_get_map_map_syms_rtrn_length (const xcb_xkb_get_map_reply_t *R  /**< */,
4996                                       const xcb_xkb_get_map_map_t *S  /**< */)
4997 {
4998     return R->nKeySyms;
4999 }
5000 
5001 
5002 /*****************************************************************************
5003  **
5004  ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_map_map_syms_rtrn_iterator
5005  **
5006  ** @param const xcb_xkb_get_map_map_t *R
5007  ** @returns xcb_xkb_key_sym_map_iterator_t
5008  **
5009  *****************************************************************************/
5010 
5011 xcb_xkb_key_sym_map_iterator_t
5012 xcb_xkb_get_map_map_syms_rtrn_iterator (const xcb_xkb_get_map_reply_t *R  /**< */,
5013                                         const xcb_xkb_get_map_map_t *S  /**< */)
5014 {
5015     xcb_xkb_key_sym_map_iterator_t i;
5016     i.data = /* map */ S->syms_rtrn;
5017     i.rem = R->nKeySyms;
5018     i.index = (char *) i.data - (char *) S;
5019     return i;
5020 }
5021 
5022 
5023 /*****************************************************************************
5024  **
5025  ** uint8_t * xcb_xkb_get_map_map_acts_rtrn_count
5026  **
5027  ** @param const xcb_xkb_get_map_map_t *S
5028  ** @returns uint8_t *
5029  **
5030  *****************************************************************************/
5031 
5032 uint8_t *
5033 xcb_xkb_get_map_map_acts_rtrn_count (const xcb_xkb_get_map_map_t *S  /**< */)
5034 {
5035     return /* map */ S->acts_rtrn_count;
5036 }
5037 
5038 
5039 /*****************************************************************************
5040  **
5041  ** int xcb_xkb_get_map_map_acts_rtrn_count_length
5042  **
5043  ** @param const xcb_xkb_get_map_map_t *R
5044  ** @returns int
5045  **
5046  *****************************************************************************/
5047 
5048 int
5049 xcb_xkb_get_map_map_acts_rtrn_count_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5050                                             const xcb_xkb_get_map_map_t *S  /**< */)
5051 {
5052     return R->nKeyActions;
5053 }
5054 
5055 
5056 /*****************************************************************************
5057  **
5058  ** xcb_generic_iterator_t xcb_xkb_get_map_map_acts_rtrn_count_end
5059  **
5060  ** @param const xcb_xkb_get_map_map_t *R
5061  ** @returns xcb_generic_iterator_t
5062  **
5063  *****************************************************************************/
5064 
5065 xcb_generic_iterator_t
5066 xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R  /**< */,
5067                                          const xcb_xkb_get_map_map_t *S  /**< */)
5068 {
5069     xcb_generic_iterator_t i;
5070     i.data = /* map */ S->acts_rtrn_count + R->nKeyActions;
5071     i.rem = 0;
5072     i.index = (char *) i.data - (char *) S;
5073     return i;
5074 }
5075 
5076 
5077 /*****************************************************************************
5078  **
5079  ** uint8_t * xcb_xkb_get_map_map_alignment_pad
5080  **
5081  ** @param const xcb_xkb_get_map_map_t *S
5082  ** @returns uint8_t *
5083  **
5084  *****************************************************************************/
5085 
5086 uint8_t *
5087 xcb_xkb_get_map_map_alignment_pad (const xcb_xkb_get_map_map_t *S  /**< */)
5088 {
5089     return /* map */ S->alignment_pad;
5090 }
5091 
5092 
5093 /*****************************************************************************
5094  **
5095  ** int xcb_xkb_get_map_map_alignment_pad_length
5096  **
5097  ** @param const xcb_xkb_get_map_map_t *R
5098  ** @returns int
5099  **
5100  *****************************************************************************/
5101 
5102 int
5103 xcb_xkb_get_map_map_alignment_pad_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5104                                           const xcb_xkb_get_map_map_t *S  /**< */)
5105 {
5106     return (((R->nKeyActions + 3) & (~3)) - R->nKeyActions);
5107 }
5108 
5109 
5110 /*****************************************************************************
5111  **
5112  ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_end
5113  **
5114  ** @param const xcb_xkb_get_map_map_t *R
5115  ** @returns xcb_generic_iterator_t
5116  **
5117  *****************************************************************************/
5118 
5119 xcb_generic_iterator_t
5120 xcb_xkb_get_map_map_alignment_pad_end (const xcb_xkb_get_map_reply_t *R  /**< */,
5121                                        const xcb_xkb_get_map_map_t *S  /**< */)
5122 {
5123     xcb_generic_iterator_t i;
5124     i.data = /* map */ S->alignment_pad + (((R->nKeyActions + 3) & (~3)) - R->nKeyActions);
5125     i.rem = 0;
5126     i.index = (char *) i.data - (char *) S;
5127     return i;
5128 }
5129 
5130 
5131 /*****************************************************************************
5132  **
5133  ** xcb_xkb_action_t * xcb_xkb_get_map_map_acts_rtrn_acts
5134  **
5135  ** @param const xcb_xkb_get_map_map_t *S
5136  ** @returns xcb_xkb_action_t *
5137  **
5138  *****************************************************************************/
5139 
5140 xcb_xkb_action_t *
5141 xcb_xkb_get_map_map_acts_rtrn_acts (const xcb_xkb_get_map_map_t *S  /**< */)
5142 {
5143     return /* map */ S->acts_rtrn_acts;
5144 }
5145 
5146 
5147 /*****************************************************************************
5148  **
5149  ** int xcb_xkb_get_map_map_acts_rtrn_acts_length
5150  **
5151  ** @param const xcb_xkb_get_map_map_t *R
5152  ** @returns int
5153  **
5154  *****************************************************************************/
5155 
5156 int
5157 xcb_xkb_get_map_map_acts_rtrn_acts_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5158                                            const xcb_xkb_get_map_map_t *S  /**< */)
5159 {
5160     return R->totalActions;
5161 }
5162 
5163 
5164 /*****************************************************************************
5165  **
5166  ** xcb_xkb_action_iterator_t xcb_xkb_get_map_map_acts_rtrn_acts_iterator
5167  **
5168  ** @param const xcb_xkb_get_map_map_t *R
5169  ** @returns xcb_xkb_action_iterator_t
5170  **
5171  *****************************************************************************/
5172 
5173 xcb_xkb_action_iterator_t
5174 xcb_xkb_get_map_map_acts_rtrn_acts_iterator (const xcb_xkb_get_map_reply_t *R  /**< */,
5175                                              const xcb_xkb_get_map_map_t *S  /**< */)
5176 {
5177     xcb_xkb_action_iterator_t i;
5178     i.data = /* map */ S->acts_rtrn_acts;
5179     i.rem = R->totalActions;
5180     i.index = (char *) i.data - (char *) S;
5181     return i;
5182 }
5183 
5184 
5185 /*****************************************************************************
5186  **
5187  ** xcb_xkb_set_behavior_t * xcb_xkb_get_map_map_behaviors_rtrn
5188  **
5189  ** @param const xcb_xkb_get_map_map_t *S
5190  ** @returns xcb_xkb_set_behavior_t *
5191  **
5192  *****************************************************************************/
5193 
5194 xcb_xkb_set_behavior_t *
5195 xcb_xkb_get_map_map_behaviors_rtrn (const xcb_xkb_get_map_map_t *S  /**< */)
5196 {
5197     return /* map */ S->behaviors_rtrn;
5198 }
5199 
5200 
5201 /*****************************************************************************
5202  **
5203  ** int xcb_xkb_get_map_map_behaviors_rtrn_length
5204  **
5205  ** @param const xcb_xkb_get_map_map_t *R
5206  ** @returns int
5207  **
5208  *****************************************************************************/
5209 
5210 int
5211 xcb_xkb_get_map_map_behaviors_rtrn_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5212                                            const xcb_xkb_get_map_map_t *S  /**< */)
5213 {
5214     return R->totalKeyBehaviors;
5215 }
5216 
5217 
5218 /*****************************************************************************
5219  **
5220  ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_map_map_behaviors_rtrn_iterator
5221  **
5222  ** @param const xcb_xkb_get_map_map_t *R
5223  ** @returns xcb_xkb_set_behavior_iterator_t
5224  **
5225  *****************************************************************************/
5226 
5227 xcb_xkb_set_behavior_iterator_t
5228 xcb_xkb_get_map_map_behaviors_rtrn_iterator (const xcb_xkb_get_map_reply_t *R  /**< */,
5229                                              const xcb_xkb_get_map_map_t *S  /**< */)
5230 {
5231     xcb_xkb_set_behavior_iterator_t i;
5232     i.data = /* map */ S->behaviors_rtrn;
5233     i.rem = R->totalKeyBehaviors;
5234     i.index = (char *) i.data - (char *) S;
5235     return i;
5236 }
5237 
5238 
5239 /*****************************************************************************
5240  **
5241  ** uint8_t * xcb_xkb_get_map_map_vmods_rtrn
5242  **
5243  ** @param const xcb_xkb_get_map_map_t *S
5244  ** @returns uint8_t *
5245  **
5246  *****************************************************************************/
5247 
5248 uint8_t *
5249 xcb_xkb_get_map_map_vmods_rtrn (const xcb_xkb_get_map_map_t *S  /**< */)
5250 {
5251     return /* map */ S->vmods_rtrn;
5252 }
5253 
5254 
5255 /*****************************************************************************
5256  **
5257  ** int xcb_xkb_get_map_map_vmods_rtrn_length
5258  **
5259  ** @param const xcb_xkb_get_map_map_t *R
5260  ** @returns int
5261  **
5262  *****************************************************************************/
5263 
5264 int
5265 xcb_xkb_get_map_map_vmods_rtrn_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5266                                        const xcb_xkb_get_map_map_t *S  /**< */)
5267 {
5268     return xcb_popcount(R->virtualMods);
5269 }
5270 
5271 
5272 /*****************************************************************************
5273  **
5274  ** xcb_generic_iterator_t xcb_xkb_get_map_map_vmods_rtrn_end
5275  **
5276  ** @param const xcb_xkb_get_map_map_t *R
5277  ** @returns xcb_generic_iterator_t
5278  **
5279  *****************************************************************************/
5280 
5281 xcb_generic_iterator_t
5282 xcb_xkb_get_map_map_vmods_rtrn_end (const xcb_xkb_get_map_reply_t *R  /**< */,
5283                                     const xcb_xkb_get_map_map_t *S  /**< */)
5284 {
5285     xcb_generic_iterator_t i;
5286     i.data = /* map */ S->vmods_rtrn + xcb_popcount(R->virtualMods);
5287     i.rem = 0;
5288     i.index = (char *) i.data - (char *) S;
5289     return i;
5290 }
5291 
5292 
5293 /*****************************************************************************
5294  **
5295  ** uint8_t * xcb_xkb_get_map_map_alignment_pad_2
5296  **
5297  ** @param const xcb_xkb_get_map_map_t *S
5298  ** @returns uint8_t *
5299  **
5300  *****************************************************************************/
5301 
5302 uint8_t *
5303 xcb_xkb_get_map_map_alignment_pad_2 (const xcb_xkb_get_map_map_t *S  /**< */)
5304 {
5305     return /* map */ S->alignment_pad2;
5306 }
5307 
5308 
5309 /*****************************************************************************
5310  **
5311  ** int xcb_xkb_get_map_map_alignment_pad_2_length
5312  **
5313  ** @param const xcb_xkb_get_map_map_t *R
5314  ** @returns int
5315  **
5316  *****************************************************************************/
5317 
5318 int
5319 xcb_xkb_get_map_map_alignment_pad_2_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5320                                             const xcb_xkb_get_map_map_t *S  /**< */)
5321 {
5322     return (((xcb_popcount(R->virtualMods) + 3) & (~3)) - xcb_popcount(R->virtualMods));
5323 }
5324 
5325 
5326 /*****************************************************************************
5327  **
5328  ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_2_end
5329  **
5330  ** @param const xcb_xkb_get_map_map_t *R
5331  ** @returns xcb_generic_iterator_t
5332  **
5333  *****************************************************************************/
5334 
5335 xcb_generic_iterator_t
5336 xcb_xkb_get_map_map_alignment_pad_2_end (const xcb_xkb_get_map_reply_t *R  /**< */,
5337                                          const xcb_xkb_get_map_map_t *S  /**< */)
5338 {
5339     xcb_generic_iterator_t i;
5340     i.data = /* map */ S->alignment_pad2 + (((xcb_popcount(R->virtualMods) + 3) & (~3)) - xcb_popcount(R->virtualMods));
5341     i.rem = 0;
5342     i.index = (char *) i.data - (char *) S;
5343     return i;
5344 }
5345 
5346 
5347 /*****************************************************************************
5348  **
5349  ** xcb_xkb_set_explicit_t * xcb_xkb_get_map_map_explicit_rtrn
5350  **
5351  ** @param const xcb_xkb_get_map_map_t *S
5352  ** @returns xcb_xkb_set_explicit_t *
5353  **
5354  *****************************************************************************/
5355 
5356 xcb_xkb_set_explicit_t *
5357 xcb_xkb_get_map_map_explicit_rtrn (const xcb_xkb_get_map_map_t *S  /**< */)
5358 {
5359     return /* map */ S->explicit_rtrn;
5360 }
5361 
5362 
5363 /*****************************************************************************
5364  **
5365  ** int xcb_xkb_get_map_map_explicit_rtrn_length
5366  **
5367  ** @param const xcb_xkb_get_map_map_t *R
5368  ** @returns int
5369  **
5370  *****************************************************************************/
5371 
5372 int
5373 xcb_xkb_get_map_map_explicit_rtrn_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5374                                           const xcb_xkb_get_map_map_t *S  /**< */)
5375 {
5376     return R->totalKeyExplicit;
5377 }
5378 
5379 
5380 /*****************************************************************************
5381  **
5382  ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_map_map_explicit_rtrn_iterator
5383  **
5384  ** @param const xcb_xkb_get_map_map_t *R
5385  ** @returns xcb_xkb_set_explicit_iterator_t
5386  **
5387  *****************************************************************************/
5388 
5389 xcb_xkb_set_explicit_iterator_t
5390 xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R  /**< */,
5391                                             const xcb_xkb_get_map_map_t *S  /**< */)
5392 {
5393     xcb_xkb_set_explicit_iterator_t i;
5394     i.data = /* map */ S->explicit_rtrn;
5395     i.rem = R->totalKeyExplicit;
5396     i.index = (char *) i.data - (char *) S;
5397     return i;
5398 }
5399 
5400 
5401 /*****************************************************************************
5402  **
5403  ** uint16_t * xcb_xkb_get_map_map_alignment_pad_3
5404  **
5405  ** @param const xcb_xkb_get_map_map_t *S
5406  ** @returns uint16_t *
5407  **
5408  *****************************************************************************/
5409 
5410 uint16_t *
5411 xcb_xkb_get_map_map_alignment_pad_3 (const xcb_xkb_get_map_map_t *S  /**< */)
5412 {
5413     return /* map */ S->alignment_pad3;
5414 }
5415 
5416 
5417 /*****************************************************************************
5418  **
5419  ** int xcb_xkb_get_map_map_alignment_pad_3_length
5420  **
5421  ** @param const xcb_xkb_get_map_map_t *R
5422  ** @returns int
5423  **
5424  *****************************************************************************/
5425 
5426 int
5427 xcb_xkb_get_map_map_alignment_pad_3_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5428                                             const xcb_xkb_get_map_map_t *S  /**< */)
5429 {
5430     return (((R->totalKeyExplicit + 1) & (~1)) - R->totalKeyExplicit);
5431 }
5432 
5433 
5434 /*****************************************************************************
5435  **
5436  ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_3_end
5437  **
5438  ** @param const xcb_xkb_get_map_map_t *R
5439  ** @returns xcb_generic_iterator_t
5440  **
5441  *****************************************************************************/
5442 
5443 xcb_generic_iterator_t
5444 xcb_xkb_get_map_map_alignment_pad_3_end (const xcb_xkb_get_map_reply_t *R  /**< */,
5445                                          const xcb_xkb_get_map_map_t *S  /**< */)
5446 {
5447     xcb_generic_iterator_t i;
5448     i.data = /* map */ S->alignment_pad3 + (((R->totalKeyExplicit + 1) & (~1)) - R->totalKeyExplicit);
5449     i.rem = 0;
5450     i.index = (char *) i.data - (char *) S;
5451     return i;
5452 }
5453 
5454 
5455 /*****************************************************************************
5456  **
5457  ** xcb_xkb_key_mod_map_t * xcb_xkb_get_map_map_modmap_rtrn
5458  **
5459  ** @param const xcb_xkb_get_map_map_t *S
5460  ** @returns xcb_xkb_key_mod_map_t *
5461  **
5462  *****************************************************************************/
5463 
5464 xcb_xkb_key_mod_map_t *
5465 xcb_xkb_get_map_map_modmap_rtrn (const xcb_xkb_get_map_map_t *S  /**< */)
5466 {
5467     return /* map */ S->modmap_rtrn;
5468 }
5469 
5470 
5471 /*****************************************************************************
5472  **
5473  ** int xcb_xkb_get_map_map_modmap_rtrn_length
5474  **
5475  ** @param const xcb_xkb_get_map_map_t *R
5476  ** @returns int
5477  **
5478  *****************************************************************************/
5479 
5480 int
5481 xcb_xkb_get_map_map_modmap_rtrn_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5482                                         const xcb_xkb_get_map_map_t *S  /**< */)
5483 {
5484     return R->totalModMapKeys;
5485 }
5486 
5487 
5488 /*****************************************************************************
5489  **
5490  ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_map_map_modmap_rtrn_iterator
5491  **
5492  ** @param const xcb_xkb_get_map_map_t *R
5493  ** @returns xcb_xkb_key_mod_map_iterator_t
5494  **
5495  *****************************************************************************/
5496 
5497 xcb_xkb_key_mod_map_iterator_t
5498 xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R  /**< */,
5499                                           const xcb_xkb_get_map_map_t *S  /**< */)
5500 {
5501     xcb_xkb_key_mod_map_iterator_t i;
5502     i.data = /* map */ S->modmap_rtrn;
5503     i.rem = R->totalModMapKeys;
5504     i.index = (char *) i.data - (char *) S;
5505     return i;
5506 }
5507 
5508 
5509 /*****************************************************************************
5510  **
5511  ** uint16_t * xcb_xkb_get_map_map_alignment_pad_4
5512  **
5513  ** @param const xcb_xkb_get_map_map_t *S
5514  ** @returns uint16_t *
5515  **
5516  *****************************************************************************/
5517 
5518 uint16_t *
5519 xcb_xkb_get_map_map_alignment_pad_4 (const xcb_xkb_get_map_map_t *S  /**< */)
5520 {
5521     return /* map */ S->alignment_pad4;
5522 }
5523 
5524 
5525 /*****************************************************************************
5526  **
5527  ** int xcb_xkb_get_map_map_alignment_pad_4_length
5528  **
5529  ** @param const xcb_xkb_get_map_map_t *R
5530  ** @returns int
5531  **
5532  *****************************************************************************/
5533 
5534 int
5535 xcb_xkb_get_map_map_alignment_pad_4_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5536                                             const xcb_xkb_get_map_map_t *S  /**< */)
5537 {
5538     return (((R->totalModMapKeys + 1) & (~1)) - R->totalModMapKeys);
5539 }
5540 
5541 
5542 /*****************************************************************************
5543  **
5544  ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_4_end
5545  **
5546  ** @param const xcb_xkb_get_map_map_t *R
5547  ** @returns xcb_generic_iterator_t
5548  **
5549  *****************************************************************************/
5550 
5551 xcb_generic_iterator_t
5552 xcb_xkb_get_map_map_alignment_pad_4_end (const xcb_xkb_get_map_reply_t *R  /**< */,
5553                                          const xcb_xkb_get_map_map_t *S  /**< */)
5554 {
5555     xcb_generic_iterator_t i;
5556     i.data = /* map */ S->alignment_pad4 + (((R->totalModMapKeys + 1) & (~1)) - R->totalModMapKeys);
5557     i.rem = 0;
5558     i.index = (char *) i.data - (char *) S;
5559     return i;
5560 }
5561 
5562 
5563 /*****************************************************************************
5564  **
5565  ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_map_map_vmodmap_rtrn
5566  **
5567  ** @param const xcb_xkb_get_map_map_t *S
5568  ** @returns xcb_xkb_key_v_mod_map_t *
5569  **
5570  *****************************************************************************/
5571 
5572 xcb_xkb_key_v_mod_map_t *
5573 xcb_xkb_get_map_map_vmodmap_rtrn (const xcb_xkb_get_map_map_t *S  /**< */)
5574 {
5575     return /* map */ S->vmodmap_rtrn;
5576 }
5577 
5578 
5579 /*****************************************************************************
5580  **
5581  ** int xcb_xkb_get_map_map_vmodmap_rtrn_length
5582  **
5583  ** @param const xcb_xkb_get_map_map_t *R
5584  ** @returns int
5585  **
5586  *****************************************************************************/
5587 
5588 int
5589 xcb_xkb_get_map_map_vmodmap_rtrn_length (const xcb_xkb_get_map_reply_t *R  /**< */,
5590                                          const xcb_xkb_get_map_map_t *S  /**< */)
5591 {
5592     return R->totalVModMapKeys;
5593 }
5594 
5595 
5596 /*****************************************************************************
5597  **
5598  ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_map_map_vmodmap_rtrn_iterator
5599  **
5600  ** @param const xcb_xkb_get_map_map_t *R
5601  ** @returns xcb_xkb_key_v_mod_map_iterator_t
5602  **
5603  *****************************************************************************/
5604 
5605 xcb_xkb_key_v_mod_map_iterator_t
5606 xcb_xkb_get_map_map_vmodmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R  /**< */,
5607                                            const xcb_xkb_get_map_map_t *S  /**< */)
5608 {
5609     xcb_xkb_key_v_mod_map_iterator_t i;
5610     i.data = /* map */ S->vmodmap_rtrn;
5611     i.rem = R->totalVModMapKeys;
5612     i.index = (char *) i.data - (char *) S;
5613     return i;
5614 }
5615 
5616 int
5617 xcb_xkb_get_map_map_serialize (void                        **_buffer  /**< */,
5618                                uint8_t                       nTypes  /**< */,
5619                                uint8_t                       nKeySyms  /**< */,
5620                                uint8_t                       nKeyActions  /**< */,
5621                                uint16_t                      totalActions  /**< */,
5622                                uint8_t                       totalKeyBehaviors  /**< */,
5623                                uint16_t                      virtualMods  /**< */,
5624                                uint8_t                       totalKeyExplicit  /**< */,
5625                                uint8_t                       totalModMapKeys  /**< */,
5626                                uint8_t                       totalVModMapKeys  /**< */,
5627                                uint16_t                      present  /**< */,
5628                                const xcb_xkb_get_map_map_t  *_aux  /**< */)
5629 {
5630     char *xcb_out = *_buffer;
5631     unsigned int xcb_buffer_len = 0;
5632     unsigned int xcb_align_to = 0;
5633 
5634     unsigned int xcb_pad = 0;
5635     char xcb_pad0[3] = {0, 0, 0};
5636     struct iovec xcb_parts[27];
5637     unsigned int xcb_parts_idx = 0;
5638     unsigned int xcb_block_len = 0;
5639     unsigned int i;
5640     char *xcb_tmp;
5641 
5642     if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
5643         /* insert padding */
5644         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5645         xcb_buffer_len += xcb_block_len + xcb_pad;
5646         if (0 != xcb_pad) {
5647             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5648             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5649             xcb_parts_idx++;
5650             xcb_pad = 0;
5651         }
5652         xcb_block_len = 0;
5653         /* types_rtrn */
5654         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn;
5655         xcb_parts[xcb_parts_idx].iov_len = 0;
5656         xcb_tmp = (char *) _aux->types_rtrn;
5657         for(i=0; i<nTypes; i++) {
5658             xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp);
5659             xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
5660         }
5661         xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
5662         xcb_parts_idx++;
5663         xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
5664     }
5665     if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
5666         /* insert padding */
5667         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5668         xcb_buffer_len += xcb_block_len + xcb_pad;
5669         if (0 != xcb_pad) {
5670             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5671             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5672             xcb_parts_idx++;
5673             xcb_pad = 0;
5674         }
5675         xcb_block_len = 0;
5676         /* syms_rtrn */
5677         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn;
5678         xcb_parts[xcb_parts_idx].iov_len = 0;
5679         xcb_tmp = (char *) _aux->syms_rtrn;
5680         for(i=0; i<nKeySyms; i++) {
5681             xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
5682             xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
5683         }
5684         xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
5685         xcb_parts_idx++;
5686         xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
5687     }
5688     if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
5689         /* insert padding */
5690         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5691         xcb_buffer_len += xcb_block_len + xcb_pad;
5692         if (0 != xcb_pad) {
5693             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5694             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5695             xcb_parts_idx++;
5696             xcb_pad = 0;
5697         }
5698         xcb_block_len = 0;
5699         /* acts_rtrn_count */
5700         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count;
5701         xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
5702         xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
5703         xcb_parts_idx++;
5704         xcb_align_to = ALIGNOF(uint8_t);
5705         /* insert padding */
5706         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5707         xcb_buffer_len += xcb_block_len + xcb_pad;
5708         if (0 != xcb_pad) {
5709             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5710             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5711             xcb_parts_idx++;
5712             xcb_pad = 0;
5713         }
5714         xcb_block_len = 0;
5715         /* alignment_pad */
5716         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad;
5717         xcb_block_len += (((nKeyActions + 3) & (~3)) - nKeyActions) * sizeof(xcb_keycode_t);
5718         xcb_parts[xcb_parts_idx].iov_len = (((nKeyActions + 3) & (~3)) - nKeyActions) * sizeof(xcb_keycode_t);
5719         xcb_parts_idx++;
5720         xcb_align_to = ALIGNOF(uint8_t);
5721         /* insert padding */
5722         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5723         xcb_buffer_len += xcb_block_len + xcb_pad;
5724         if (0 != xcb_pad) {
5725             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5726             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5727             xcb_parts_idx++;
5728             xcb_pad = 0;
5729         }
5730         xcb_block_len = 0;
5731         /* acts_rtrn_acts */
5732         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts;
5733         xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
5734         xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
5735         xcb_parts_idx++;
5736         xcb_align_to = ALIGNOF(xcb_xkb_action_t);
5737     }
5738     if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
5739         /* insert padding */
5740         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5741         xcb_buffer_len += xcb_block_len + xcb_pad;
5742         if (0 != xcb_pad) {
5743             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5744             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5745             xcb_parts_idx++;
5746             xcb_pad = 0;
5747         }
5748         xcb_block_len = 0;
5749         /* behaviors_rtrn */
5750         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn;
5751         xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
5752         xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
5753         xcb_parts_idx++;
5754         xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
5755     }
5756     if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
5757         /* insert padding */
5758         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5759         xcb_buffer_len += xcb_block_len + xcb_pad;
5760         if (0 != xcb_pad) {
5761             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5762             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5763             xcb_parts_idx++;
5764             xcb_pad = 0;
5765         }
5766         xcb_block_len = 0;
5767         /* vmods_rtrn */
5768         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn;
5769         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
5770         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
5771         xcb_parts_idx++;
5772         xcb_align_to = ALIGNOF(uint8_t);
5773         /* insert padding */
5774         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5775         xcb_buffer_len += xcb_block_len + xcb_pad;
5776         if (0 != xcb_pad) {
5777             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5778             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5779             xcb_parts_idx++;
5780             xcb_pad = 0;
5781         }
5782         xcb_block_len = 0;
5783         /* alignment_pad2 */
5784         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad2;
5785         xcb_block_len += (((xcb_popcount(virtualMods) + 3) & (~3)) - xcb_popcount(virtualMods)) * sizeof(xcb_keycode_t);
5786         xcb_parts[xcb_parts_idx].iov_len = (((xcb_popcount(virtualMods) + 3) & (~3)) - xcb_popcount(virtualMods)) * sizeof(xcb_keycode_t);
5787         xcb_parts_idx++;
5788         xcb_align_to = ALIGNOF(uint8_t);
5789     }
5790     if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
5791         /* insert padding */
5792         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5793         xcb_buffer_len += xcb_block_len + xcb_pad;
5794         if (0 != xcb_pad) {
5795             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5796             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5797             xcb_parts_idx++;
5798             xcb_pad = 0;
5799         }
5800         xcb_block_len = 0;
5801         /* explicit_rtrn */
5802         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn;
5803         xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
5804         xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
5805         xcb_parts_idx++;
5806         xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
5807         /* insert padding */
5808         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5809         xcb_buffer_len += xcb_block_len + xcb_pad;
5810         if (0 != xcb_pad) {
5811             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5812             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5813             xcb_parts_idx++;
5814             xcb_pad = 0;
5815         }
5816         xcb_block_len = 0;
5817         /* alignment_pad3 */
5818         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad3;
5819         xcb_block_len += (((totalKeyExplicit + 1) & (~1)) - totalKeyExplicit) * sizeof(uint16_t);
5820         xcb_parts[xcb_parts_idx].iov_len = (((totalKeyExplicit + 1) & (~1)) - totalKeyExplicit) * sizeof(uint16_t);
5821         xcb_parts_idx++;
5822         xcb_align_to = ALIGNOF(uint16_t);
5823     }
5824     if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
5825         /* insert padding */
5826         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5827         xcb_buffer_len += xcb_block_len + xcb_pad;
5828         if (0 != xcb_pad) {
5829             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5830             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5831             xcb_parts_idx++;
5832             xcb_pad = 0;
5833         }
5834         xcb_block_len = 0;
5835         /* modmap_rtrn */
5836         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn;
5837         xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
5838         xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
5839         xcb_parts_idx++;
5840         xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
5841         /* insert padding */
5842         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5843         xcb_buffer_len += xcb_block_len + xcb_pad;
5844         if (0 != xcb_pad) {
5845             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5846             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5847             xcb_parts_idx++;
5848             xcb_pad = 0;
5849         }
5850         xcb_block_len = 0;
5851         /* alignment_pad4 */
5852         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad4;
5853         xcb_block_len += (((totalModMapKeys + 1) & (~1)) - totalModMapKeys) * sizeof(uint16_t);
5854         xcb_parts[xcb_parts_idx].iov_len = (((totalModMapKeys + 1) & (~1)) - totalModMapKeys) * sizeof(uint16_t);
5855         xcb_parts_idx++;
5856         xcb_align_to = ALIGNOF(uint16_t);
5857     }
5858     if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
5859         /* insert padding */
5860         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5861         xcb_buffer_len += xcb_block_len + xcb_pad;
5862         if (0 != xcb_pad) {
5863             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5864             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5865             xcb_parts_idx++;
5866             xcb_pad = 0;
5867         }
5868         xcb_block_len = 0;
5869         /* vmodmap_rtrn */
5870         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn;
5871         xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
5872         xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
5873         xcb_parts_idx++;
5874         xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
5875     }
5876     /* insert padding */
5877     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5878     xcb_buffer_len += xcb_block_len + xcb_pad;
5879     if (0 != xcb_pad) {
5880         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
5881         xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
5882         xcb_parts_idx++;
5883         xcb_pad = 0;
5884     }
5885     xcb_block_len = 0;
5886 
5887     if (NULL == xcb_out) {
5888         /* allocate memory */
5889         xcb_out = malloc(xcb_buffer_len);
5890         *_buffer = xcb_out;
5891     }
5892 
5893     xcb_tmp = xcb_out;
5894     for(i=0; i<xcb_parts_idx; i++) {
5895         if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
5896             memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
5897         if (0 != xcb_parts[i].iov_len)
5898             xcb_tmp += xcb_parts[i].iov_len;
5899     }
5900 
5901     return xcb_buffer_len;
5902 }
5903 
5904 int
5905 xcb_xkb_get_map_map_unpack (const void             *_buffer  /**< */,
5906                             uint8_t                 nTypes  /**< */,
5907                             uint8_t                 nKeySyms  /**< */,
5908                             uint8_t                 nKeyActions  /**< */,
5909                             uint16_t                totalActions  /**< */,
5910                             uint8_t                 totalKeyBehaviors  /**< */,
5911                             uint16_t                virtualMods  /**< */,
5912                             uint8_t                 totalKeyExplicit  /**< */,
5913                             uint8_t                 totalModMapKeys  /**< */,
5914                             uint8_t                 totalVModMapKeys  /**< */,
5915                             uint16_t                present  /**< */,
5916                             xcb_xkb_get_map_map_t  *_aux  /**< */)
5917 {
5918     char *xcb_tmp = (char *)_buffer;
5919     unsigned int xcb_buffer_len = 0;
5920     unsigned int xcb_block_len = 0;
5921     unsigned int xcb_pad = 0;
5922     unsigned int xcb_align_to = 0;
5923 
5924     unsigned int i;
5925     unsigned int xcb_tmp_len;
5926 
5927     if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
5928         /* insert padding */
5929         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5930         xcb_buffer_len += xcb_block_len + xcb_pad;
5931         if (0 != xcb_pad) {
5932             xcb_tmp += xcb_pad;
5933             xcb_pad = 0;
5934         }
5935         xcb_block_len = 0;
5936         /* types_rtrn */
5937         _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp;
5938         for(i=0; i<nTypes; i++) {
5939             xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp);
5940             xcb_block_len += xcb_tmp_len;
5941             xcb_tmp += xcb_tmp_len;
5942         }
5943         xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
5944     }
5945     if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
5946         /* insert padding */
5947         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5948         xcb_buffer_len += xcb_block_len + xcb_pad;
5949         if (0 != xcb_pad) {
5950             xcb_tmp += xcb_pad;
5951             xcb_pad = 0;
5952         }
5953         xcb_block_len = 0;
5954         /* syms_rtrn */
5955         _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp;
5956         for(i=0; i<nKeySyms; i++) {
5957             xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
5958             xcb_block_len += xcb_tmp_len;
5959             xcb_tmp += xcb_tmp_len;
5960         }
5961         xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
5962     }
5963     if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
5964         /* insert padding */
5965         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5966         xcb_buffer_len += xcb_block_len + xcb_pad;
5967         if (0 != xcb_pad) {
5968             xcb_tmp += xcb_pad;
5969             xcb_pad = 0;
5970         }
5971         xcb_block_len = 0;
5972         /* acts_rtrn_count */
5973         _aux->acts_rtrn_count = (uint8_t *)xcb_tmp;
5974         xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
5975         xcb_tmp += xcb_block_len;
5976         xcb_align_to = ALIGNOF(uint8_t);
5977         /* insert padding */
5978         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5979         xcb_buffer_len += xcb_block_len + xcb_pad;
5980         if (0 != xcb_pad) {
5981             xcb_tmp += xcb_pad;
5982             xcb_pad = 0;
5983         }
5984         xcb_block_len = 0;
5985         /* alignment_pad */
5986         _aux->alignment_pad = (uint8_t *)xcb_tmp;
5987         xcb_block_len += (((nKeyActions + 3) & (~3)) - nKeyActions) * sizeof(xcb_keycode_t);
5988         xcb_tmp += xcb_block_len;
5989         xcb_align_to = ALIGNOF(uint8_t);
5990         /* insert padding */
5991         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5992         xcb_buffer_len += xcb_block_len + xcb_pad;
5993         if (0 != xcb_pad) {
5994             xcb_tmp += xcb_pad;
5995             xcb_pad = 0;
5996         }
5997         xcb_block_len = 0;
5998         /* acts_rtrn_acts */
5999         _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp;
6000         xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
6001         xcb_tmp += xcb_block_len;
6002         xcb_align_to = ALIGNOF(xcb_xkb_action_t);
6003     }
6004     if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
6005         /* insert padding */
6006         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6007         xcb_buffer_len += xcb_block_len + xcb_pad;
6008         if (0 != xcb_pad) {
6009             xcb_tmp += xcb_pad;
6010             xcb_pad = 0;
6011         }
6012         xcb_block_len = 0;
6013         /* behaviors_rtrn */
6014         _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp;
6015         xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
6016         xcb_tmp += xcb_block_len;
6017         xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
6018     }
6019     if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
6020         /* insert padding */
6021         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6022         xcb_buffer_len += xcb_block_len + xcb_pad;
6023         if (0 != xcb_pad) {
6024             xcb_tmp += xcb_pad;
6025             xcb_pad = 0;
6026         }
6027         xcb_block_len = 0;
6028         /* vmods_rtrn */
6029         _aux->vmods_rtrn = (uint8_t *)xcb_tmp;
6030         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
6031         xcb_tmp += xcb_block_len;
6032         xcb_align_to = ALIGNOF(uint8_t);
6033         /* insert padding */
6034         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6035         xcb_buffer_len += xcb_block_len + xcb_pad;
6036         if (0 != xcb_pad) {
6037             xcb_tmp += xcb_pad;
6038             xcb_pad = 0;
6039         }
6040         xcb_block_len = 0;
6041         /* alignment_pad2 */
6042         _aux->alignment_pad2 = (uint8_t *)xcb_tmp;
6043         xcb_block_len += (((xcb_popcount(virtualMods) + 3) & (~3)) - xcb_popcount(virtualMods)) * sizeof(xcb_keycode_t);
6044         xcb_tmp += xcb_block_len;
6045         xcb_align_to = ALIGNOF(uint8_t);
6046     }
6047     if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
6048         /* insert padding */
6049         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6050         xcb_buffer_len += xcb_block_len + xcb_pad;
6051         if (0 != xcb_pad) {
6052             xcb_tmp += xcb_pad;
6053             xcb_pad = 0;
6054         }
6055         xcb_block_len = 0;
6056         /* explicit_rtrn */
6057         _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp;
6058         xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
6059         xcb_tmp += xcb_block_len;
6060         xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
6061         /* insert padding */
6062         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6063         xcb_buffer_len += xcb_block_len + xcb_pad;
6064         if (0 != xcb_pad) {
6065             xcb_tmp += xcb_pad;
6066             xcb_pad = 0;
6067         }
6068         xcb_block_len = 0;
6069         /* alignment_pad3 */
6070         _aux->alignment_pad3 = (uint16_t *)xcb_tmp;
6071         xcb_block_len += (((totalKeyExplicit + 1) & (~1)) - totalKeyExplicit) * sizeof(uint16_t);
6072         xcb_tmp += xcb_block_len;
6073         xcb_align_to = ALIGNOF(uint16_t);
6074     }
6075     if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
6076         /* insert padding */
6077         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6078         xcb_buffer_len += xcb_block_len + xcb_pad;
6079         if (0 != xcb_pad) {
6080             xcb_tmp += xcb_pad;
6081             xcb_pad = 0;
6082         }
6083         xcb_block_len = 0;
6084         /* modmap_rtrn */
6085         _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp;
6086         xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
6087         xcb_tmp += xcb_block_len;
6088         xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
6089         /* insert padding */
6090         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6091         xcb_buffer_len += xcb_block_len + xcb_pad;
6092         if (0 != xcb_pad) {
6093             xcb_tmp += xcb_pad;
6094             xcb_pad = 0;
6095         }
6096         xcb_block_len = 0;
6097         /* alignment_pad4 */
6098         _aux->alignment_pad4 = (uint16_t *)xcb_tmp;
6099         xcb_block_len += (((totalModMapKeys + 1) & (~1)) - totalModMapKeys) * sizeof(uint16_t);
6100         xcb_tmp += xcb_block_len;
6101         xcb_align_to = ALIGNOF(uint16_t);
6102     }
6103     if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
6104         /* insert padding */
6105         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6106         xcb_buffer_len += xcb_block_len + xcb_pad;
6107         if (0 != xcb_pad) {
6108             xcb_tmp += xcb_pad;
6109             xcb_pad = 0;
6110         }
6111         xcb_block_len = 0;
6112         /* vmodmap_rtrn */
6113         _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
6114         xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
6115         xcb_tmp += xcb_block_len;
6116         xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
6117     }
6118     /* insert padding */
6119     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6120     xcb_buffer_len += xcb_block_len + xcb_pad;
6121     if (0 != xcb_pad) {
6122         xcb_tmp += xcb_pad;
6123         xcb_pad = 0;
6124     }
6125     xcb_block_len = 0;
6126 
6127     return xcb_buffer_len;
6128 }
6129 
6130 int
6131 xcb_xkb_get_map_map_sizeof (const void  *_buffer  /**< */,
6132                             uint8_t      nTypes  /**< */,
6133                             uint8_t      nKeySyms  /**< */,
6134                             uint8_t      nKeyActions  /**< */,
6135                             uint16_t     totalActions  /**< */,
6136                             uint8_t      totalKeyBehaviors  /**< */,
6137                             uint16_t     virtualMods  /**< */,
6138                             uint8_t      totalKeyExplicit  /**< */,
6139                             uint8_t      totalModMapKeys  /**< */,
6140                             uint8_t      totalVModMapKeys  /**< */,
6141                             uint16_t     present  /**< */)
6142 {
6143     xcb_xkb_get_map_map_t _aux;
6144     return xcb_xkb_get_map_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
6145 }
6146 
6147 
6148 /*****************************************************************************
6149  **
6150  ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map
6151  **
6152  ** @param xcb_connection_t      *c
6153  ** @param xcb_xkb_device_spec_t  deviceSpec
6154  ** @param uint16_t               full
6155  ** @param uint16_t               partial
6156  ** @param uint8_t                firstType
6157  ** @param uint8_t                nTypes
6158  ** @param xcb_keycode_t          firstKeySym
6159  ** @param uint8_t                nKeySyms
6160  ** @param xcb_keycode_t          firstKeyAction
6161  ** @param uint8_t                nKeyActions
6162  ** @param xcb_keycode_t          firstKeyBehavior
6163  ** @param uint8_t                nKeyBehaviors
6164  ** @param uint16_t               virtualMods
6165  ** @param xcb_keycode_t          firstKeyExplicit
6166  ** @param uint8_t                nKeyExplicit
6167  ** @param xcb_keycode_t          firstModMapKey
6168  ** @param uint8_t                nModMapKeys
6169  ** @param xcb_keycode_t          firstVModMapKey
6170  ** @param uint8_t                nVModMapKeys
6171  ** @returns xcb_xkb_get_map_cookie_t
6172  **
6173  *****************************************************************************/
6174 
6175 xcb_xkb_get_map_cookie_t
6176 xcb_xkb_get_map (xcb_connection_t      *c  /**< */,
6177                  xcb_xkb_device_spec_t  deviceSpec  /**< */,
6178                  uint16_t               full  /**< */,
6179                  uint16_t               partial  /**< */,
6180                  uint8_t                firstType  /**< */,
6181                  uint8_t                nTypes  /**< */,
6182                  xcb_keycode_t          firstKeySym  /**< */,
6183                  uint8_t                nKeySyms  /**< */,
6184                  xcb_keycode_t          firstKeyAction  /**< */,
6185                  uint8_t                nKeyActions  /**< */,
6186                  xcb_keycode_t          firstKeyBehavior  /**< */,
6187                  uint8_t                nKeyBehaviors  /**< */,
6188                  uint16_t               virtualMods  /**< */,
6189                  xcb_keycode_t          firstKeyExplicit  /**< */,
6190                  uint8_t                nKeyExplicit  /**< */,
6191                  xcb_keycode_t          firstModMapKey  /**< */,
6192                  uint8_t                nModMapKeys  /**< */,
6193                  xcb_keycode_t          firstVModMapKey  /**< */,
6194                  uint8_t                nVModMapKeys  /**< */)
6195 {
6196     static const xcb_protocol_request_t xcb_req = {
6197         /* count */ 2,
6198         /* ext */ &xcb_xkb_id,
6199         /* opcode */ XCB_XKB_GET_MAP,
6200         /* isvoid */ 0
6201     };
6202 
6203     struct iovec xcb_parts[4];
6204     xcb_xkb_get_map_cookie_t xcb_ret;
6205     xcb_xkb_get_map_request_t xcb_out;
6206 
6207     xcb_out.deviceSpec = deviceSpec;
6208     xcb_out.full = full;
6209     xcb_out.partial = partial;
6210     xcb_out.firstType = firstType;
6211     xcb_out.nTypes = nTypes;
6212     xcb_out.firstKeySym = firstKeySym;
6213     xcb_out.nKeySyms = nKeySyms;
6214     xcb_out.firstKeyAction = firstKeyAction;
6215     xcb_out.nKeyActions = nKeyActions;
6216     xcb_out.firstKeyBehavior = firstKeyBehavior;
6217     xcb_out.nKeyBehaviors = nKeyBehaviors;
6218     xcb_out.virtualMods = virtualMods;
6219     xcb_out.firstKeyExplicit = firstKeyExplicit;
6220     xcb_out.nKeyExplicit = nKeyExplicit;
6221     xcb_out.firstModMapKey = firstModMapKey;
6222     xcb_out.nModMapKeys = nModMapKeys;
6223     xcb_out.firstVModMapKey = firstVModMapKey;
6224     xcb_out.nVModMapKeys = nVModMapKeys;
6225     memset(xcb_out.pad0, 0, 2);
6226 
6227     xcb_parts[2].iov_base = (char *) &xcb_out;
6228     xcb_parts[2].iov_len = sizeof(xcb_out);
6229     xcb_parts[3].iov_base = 0;
6230     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6231 
6232     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6233     return xcb_ret;
6234 }
6235 
6236 
6237 /*****************************************************************************
6238  **
6239  ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map_unchecked
6240  **
6241  ** @param xcb_connection_t      *c
6242  ** @param xcb_xkb_device_spec_t  deviceSpec
6243  ** @param uint16_t               full
6244  ** @param uint16_t               partial
6245  ** @param uint8_t                firstType
6246  ** @param uint8_t                nTypes
6247  ** @param xcb_keycode_t          firstKeySym
6248  ** @param uint8_t                nKeySyms
6249  ** @param xcb_keycode_t          firstKeyAction
6250  ** @param uint8_t                nKeyActions
6251  ** @param xcb_keycode_t          firstKeyBehavior
6252  ** @param uint8_t                nKeyBehaviors
6253  ** @param uint16_t               virtualMods
6254  ** @param xcb_keycode_t          firstKeyExplicit
6255  ** @param uint8_t                nKeyExplicit
6256  ** @param xcb_keycode_t          firstModMapKey
6257  ** @param uint8_t                nModMapKeys
6258  ** @param xcb_keycode_t          firstVModMapKey
6259  ** @param uint8_t                nVModMapKeys
6260  ** @returns xcb_xkb_get_map_cookie_t
6261  **
6262  *****************************************************************************/
6263 
6264 xcb_xkb_get_map_cookie_t
6265 xcb_xkb_get_map_unchecked (xcb_connection_t      *c  /**< */,
6266                            xcb_xkb_device_spec_t  deviceSpec  /**< */,
6267                            uint16_t               full  /**< */,
6268                            uint16_t               partial  /**< */,
6269                            uint8_t                firstType  /**< */,
6270                            uint8_t                nTypes  /**< */,
6271                            xcb_keycode_t          firstKeySym  /**< */,
6272                            uint8_t                nKeySyms  /**< */,
6273                            xcb_keycode_t          firstKeyAction  /**< */,
6274                            uint8_t                nKeyActions  /**< */,
6275                            xcb_keycode_t          firstKeyBehavior  /**< */,
6276                            uint8_t                nKeyBehaviors  /**< */,
6277                            uint16_t               virtualMods  /**< */,
6278                            xcb_keycode_t          firstKeyExplicit  /**< */,
6279                            uint8_t                nKeyExplicit  /**< */,
6280                            xcb_keycode_t          firstModMapKey  /**< */,
6281                            uint8_t                nModMapKeys  /**< */,
6282                            xcb_keycode_t          firstVModMapKey  /**< */,
6283                            uint8_t                nVModMapKeys  /**< */)
6284 {
6285     static const xcb_protocol_request_t xcb_req = {
6286         /* count */ 2,
6287         /* ext */ &xcb_xkb_id,
6288         /* opcode */ XCB_XKB_GET_MAP,
6289         /* isvoid */ 0
6290     };
6291 
6292     struct iovec xcb_parts[4];
6293     xcb_xkb_get_map_cookie_t xcb_ret;
6294     xcb_xkb_get_map_request_t xcb_out;
6295 
6296     xcb_out.deviceSpec = deviceSpec;
6297     xcb_out.full = full;
6298     xcb_out.partial = partial;
6299     xcb_out.firstType = firstType;
6300     xcb_out.nTypes = nTypes;
6301     xcb_out.firstKeySym = firstKeySym;
6302     xcb_out.nKeySyms = nKeySyms;
6303     xcb_out.firstKeyAction = firstKeyAction;
6304     xcb_out.nKeyActions = nKeyActions;
6305     xcb_out.firstKeyBehavior = firstKeyBehavior;
6306     xcb_out.nKeyBehaviors = nKeyBehaviors;
6307     xcb_out.virtualMods = virtualMods;
6308     xcb_out.firstKeyExplicit = firstKeyExplicit;
6309     xcb_out.nKeyExplicit = nKeyExplicit;
6310     xcb_out.firstModMapKey = firstModMapKey;
6311     xcb_out.nModMapKeys = nModMapKeys;
6312     xcb_out.firstVModMapKey = firstVModMapKey;
6313     xcb_out.nVModMapKeys = nVModMapKeys;
6314     memset(xcb_out.pad0, 0, 2);
6315 
6316     xcb_parts[2].iov_base = (char *) &xcb_out;
6317     xcb_parts[2].iov_len = sizeof(xcb_out);
6318     xcb_parts[3].iov_base = 0;
6319     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6320 
6321     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6322     return xcb_ret;
6323 }
6324 
6325 
6326 /*****************************************************************************
6327  **
6328  ** xcb_xkb_get_map_map_t * xcb_xkb_get_map_map
6329  **
6330  ** @param const xcb_xkb_get_map_reply_t *R
6331  ** @returns xcb_xkb_get_map_map_t *
6332  **
6333  *****************************************************************************/
6334 
6335 void *
6336 xcb_xkb_get_map_map (const xcb_xkb_get_map_reply_t *R  /**< */)
6337 {
6338     return (void *) (R + 1);
6339 }
6340 
6341 
6342 /*****************************************************************************
6343  **
6344  ** xcb_xkb_get_map_reply_t * xcb_xkb_get_map_reply
6345  **
6346  ** @param xcb_connection_t          *c
6347  ** @param xcb_xkb_get_map_cookie_t   cookie
6348  ** @param xcb_generic_error_t      **e
6349  ** @returns xcb_xkb_get_map_reply_t *
6350  **
6351  *****************************************************************************/
6352 
6353 xcb_xkb_get_map_reply_t *
6354 xcb_xkb_get_map_reply (xcb_connection_t          *c  /**< */,
6355                        xcb_xkb_get_map_cookie_t   cookie  /**< */,
6356                        xcb_generic_error_t      **e  /**< */)
6357 {
6358     return (xcb_xkb_get_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6359 }
6360 
6361 
6362 /*****************************************************************************
6363  **
6364  ** int xcb_xkb_set_map_values_types_length
6365  **
6366  ** @param const xcb_xkb_set_map_values_t *R
6367  ** @returns int
6368  **
6369  *****************************************************************************/
6370 
6371 int
6372 xcb_xkb_set_map_values_types_length (const xcb_xkb_set_map_request_t *R  /**< */,
6373                                      const xcb_xkb_set_map_values_t *S  /**< */)
6374 {
6375     return R->nTypes;
6376 }
6377 
6378 
6379 /*****************************************************************************
6380  **
6381  ** xcb_xkb_set_key_type_iterator_t xcb_xkb_set_map_values_types_iterator
6382  **
6383  ** @param const xcb_xkb_set_map_values_t *R
6384  ** @returns xcb_xkb_set_key_type_iterator_t
6385  **
6386  *****************************************************************************/
6387 
6388 xcb_xkb_set_key_type_iterator_t
6389 xcb_xkb_set_map_values_types_iterator (const xcb_xkb_set_map_request_t *R  /**< */,
6390                                        const xcb_xkb_set_map_values_t *S  /**< */)
6391 {
6392     xcb_xkb_set_key_type_iterator_t i;
6393     i.data = /* values */ S->types;
6394     i.rem = R->nTypes;
6395     i.index = (char *) i.data - (char *) S;
6396     return i;
6397 }
6398 
6399 
6400 /*****************************************************************************
6401  **
6402  ** int xcb_xkb_set_map_values_syms_length
6403  **
6404  ** @param const xcb_xkb_set_map_values_t *R
6405  ** @returns int
6406  **
6407  *****************************************************************************/
6408 
6409 int
6410 xcb_xkb_set_map_values_syms_length (const xcb_xkb_set_map_request_t *R  /**< */,
6411                                     const xcb_xkb_set_map_values_t *S  /**< */)
6412 {
6413     return R->nKeySyms;
6414 }
6415 
6416 
6417 /*****************************************************************************
6418  **
6419  ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_set_map_values_syms_iterator
6420  **
6421  ** @param const xcb_xkb_set_map_values_t *R
6422  ** @returns xcb_xkb_key_sym_map_iterator_t
6423  **
6424  *****************************************************************************/
6425 
6426 xcb_xkb_key_sym_map_iterator_t
6427 xcb_xkb_set_map_values_syms_iterator (const xcb_xkb_set_map_request_t *R  /**< */,
6428                                       const xcb_xkb_set_map_values_t *S  /**< */)
6429 {
6430     xcb_xkb_key_sym_map_iterator_t i;
6431     i.data = /* values */ S->syms;
6432     i.rem = R->nKeySyms;
6433     i.index = (char *) i.data - (char *) S;
6434     return i;
6435 }
6436 
6437 
6438 /*****************************************************************************
6439  **
6440  ** uint8_t * xcb_xkb_set_map_values_actions_count
6441  **
6442  ** @param const xcb_xkb_set_map_values_t *S
6443  ** @returns uint8_t *
6444  **
6445  *****************************************************************************/
6446 
6447 uint8_t *
6448 xcb_xkb_set_map_values_actions_count (const xcb_xkb_set_map_values_t *S  /**< */)
6449 {
6450     return /* values */ S->actionsCount;
6451 }
6452 
6453 
6454 /*****************************************************************************
6455  **
6456  ** int xcb_xkb_set_map_values_actions_count_length
6457  **
6458  ** @param const xcb_xkb_set_map_values_t *R
6459  ** @returns int
6460  **
6461  *****************************************************************************/
6462 
6463 int
6464 xcb_xkb_set_map_values_actions_count_length (const xcb_xkb_set_map_request_t *R  /**< */,
6465                                              const xcb_xkb_set_map_values_t *S  /**< */)
6466 {
6467     return R->nKeyActions;
6468 }
6469 
6470 
6471 /*****************************************************************************
6472  **
6473  ** xcb_generic_iterator_t xcb_xkb_set_map_values_actions_count_end
6474  **
6475  ** @param const xcb_xkb_set_map_values_t *R
6476  ** @returns xcb_generic_iterator_t
6477  **
6478  *****************************************************************************/
6479 
6480 xcb_generic_iterator_t
6481 xcb_xkb_set_map_values_actions_count_end (const xcb_xkb_set_map_request_t *R  /**< */,
6482                                           const xcb_xkb_set_map_values_t *S  /**< */)
6483 {
6484     xcb_generic_iterator_t i;
6485     i.data = /* values */ S->actionsCount + R->nKeyActions;
6486     i.rem = 0;
6487     i.index = (char *) i.data - (char *) S;
6488     return i;
6489 }
6490 
6491 
6492 /*****************************************************************************
6493  **
6494  ** xcb_xkb_action_t * xcb_xkb_set_map_values_actions
6495  **
6496  ** @param const xcb_xkb_set_map_values_t *S
6497  ** @returns xcb_xkb_action_t *
6498  **
6499  *****************************************************************************/
6500 
6501 xcb_xkb_action_t *
6502 xcb_xkb_set_map_values_actions (const xcb_xkb_set_map_values_t *S  /**< */)
6503 {
6504     return /* values */ S->actions;
6505 }
6506 
6507 
6508 /*****************************************************************************
6509  **
6510  ** int xcb_xkb_set_map_values_actions_length
6511  **
6512  ** @param const xcb_xkb_set_map_values_t *R
6513  ** @returns int
6514  **
6515  *****************************************************************************/
6516 
6517 int
6518 xcb_xkb_set_map_values_actions_length (const xcb_xkb_set_map_request_t *R  /**< */,
6519                                        const xcb_xkb_set_map_values_t *S  /**< */)
6520 {
6521     return R->totalActions;
6522 }
6523 
6524 
6525 /*****************************************************************************
6526  **
6527  ** xcb_xkb_action_iterator_t xcb_xkb_set_map_values_actions_iterator
6528  **
6529  ** @param const xcb_xkb_set_map_values_t *R
6530  ** @returns xcb_xkb_action_iterator_t
6531  **
6532  *****************************************************************************/
6533 
6534 xcb_xkb_action_iterator_t
6535 xcb_xkb_set_map_values_actions_iterator (const xcb_xkb_set_map_request_t *R  /**< */,
6536                                          const xcb_xkb_set_map_values_t *S  /**< */)
6537 {
6538     xcb_xkb_action_iterator_t i;
6539     i.data = /* values */ S->actions;
6540     i.rem = R->totalActions;
6541     i.index = (char *) i.data - (char *) S;
6542     return i;
6543 }
6544 
6545 
6546 /*****************************************************************************
6547  **
6548  ** xcb_xkb_set_behavior_t * xcb_xkb_set_map_values_behaviors
6549  **
6550  ** @param const xcb_xkb_set_map_values_t *S
6551  ** @returns xcb_xkb_set_behavior_t *
6552  **
6553  *****************************************************************************/
6554 
6555 xcb_xkb_set_behavior_t *
6556 xcb_xkb_set_map_values_behaviors (const xcb_xkb_set_map_values_t *S  /**< */)
6557 {
6558     return /* values */ S->behaviors;
6559 }
6560 
6561 
6562 /*****************************************************************************
6563  **
6564  ** int xcb_xkb_set_map_values_behaviors_length
6565  **
6566  ** @param const xcb_xkb_set_map_values_t *R
6567  ** @returns int
6568  **
6569  *****************************************************************************/
6570 
6571 int
6572 xcb_xkb_set_map_values_behaviors_length (const xcb_xkb_set_map_request_t *R  /**< */,
6573                                          const xcb_xkb_set_map_values_t *S  /**< */)
6574 {
6575     return R->totalKeyBehaviors;
6576 }
6577 
6578 
6579 /*****************************************************************************
6580  **
6581  ** xcb_xkb_set_behavior_iterator_t xcb_xkb_set_map_values_behaviors_iterator
6582  **
6583  ** @param const xcb_xkb_set_map_values_t *R
6584  ** @returns xcb_xkb_set_behavior_iterator_t
6585  **
6586  *****************************************************************************/
6587 
6588 xcb_xkb_set_behavior_iterator_t
6589 xcb_xkb_set_map_values_behaviors_iterator (const xcb_xkb_set_map_request_t *R  /**< */,
6590                                            const xcb_xkb_set_map_values_t *S  /**< */)
6591 {
6592     xcb_xkb_set_behavior_iterator_t i;
6593     i.data = /* values */ S->behaviors;
6594     i.rem = R->totalKeyBehaviors;
6595     i.index = (char *) i.data - (char *) S;
6596     return i;
6597 }
6598 
6599 
6600 /*****************************************************************************
6601  **
6602  ** uint8_t * xcb_xkb_set_map_values_vmods
6603  **
6604  ** @param const xcb_xkb_set_map_values_t *S
6605  ** @returns uint8_t *
6606  **
6607  *****************************************************************************/
6608 
6609 uint8_t *
6610 xcb_xkb_set_map_values_vmods (const xcb_xkb_set_map_values_t *S  /**< */)
6611 {
6612     return /* values */ S->vmods;
6613 }
6614 
6615 
6616 /*****************************************************************************
6617  **
6618  ** int xcb_xkb_set_map_values_vmods_length
6619  **
6620  ** @param const xcb_xkb_set_map_values_t *R
6621  ** @returns int
6622  **
6623  *****************************************************************************/
6624 
6625 int
6626 xcb_xkb_set_map_values_vmods_length (const xcb_xkb_set_map_request_t *R  /**< */,
6627                                      const xcb_xkb_set_map_values_t *S  /**< */)
6628 {
6629     return xcb_popcount(R->virtualMods);
6630 }
6631 
6632 
6633 /*****************************************************************************
6634  **
6635  ** xcb_generic_iterator_t xcb_xkb_set_map_values_vmods_end
6636  **
6637  ** @param const xcb_xkb_set_map_values_t *R
6638  ** @returns xcb_generic_iterator_t
6639  **
6640  *****************************************************************************/
6641 
6642 xcb_generic_iterator_t
6643 xcb_xkb_set_map_values_vmods_end (const xcb_xkb_set_map_request_t *R  /**< */,
6644                                   const xcb_xkb_set_map_values_t *S  /**< */)
6645 {
6646     xcb_generic_iterator_t i;
6647     i.data = /* values */ S->vmods + xcb_popcount(R->virtualMods);
6648     i.rem = 0;
6649     i.index = (char *) i.data - (char *) S;
6650     return i;
6651 }
6652 
6653 
6654 /*****************************************************************************
6655  **
6656  ** xcb_xkb_set_explicit_t * xcb_xkb_set_map_values_explicit
6657  **
6658  ** @param const xcb_xkb_set_map_values_t *S
6659  ** @returns xcb_xkb_set_explicit_t *
6660  **
6661  *****************************************************************************/
6662 
6663 xcb_xkb_set_explicit_t *
6664 xcb_xkb_set_map_values_explicit (const xcb_xkb_set_map_values_t *S  /**< */)
6665 {
6666     return /* values */ S->explicit;
6667 }
6668 
6669 
6670 /*****************************************************************************
6671  **
6672  ** int xcb_xkb_set_map_values_explicit_length
6673  **
6674  ** @param const xcb_xkb_set_map_values_t *R
6675  ** @returns int
6676  **
6677  *****************************************************************************/
6678 
6679 int
6680 xcb_xkb_set_map_values_explicit_length (const xcb_xkb_set_map_request_t *R  /**< */,
6681                                         const xcb_xkb_set_map_values_t *S  /**< */)
6682 {
6683     return R->totalKeyExplicit;
6684 }
6685 
6686 
6687 /*****************************************************************************
6688  **
6689  ** xcb_xkb_set_explicit_iterator_t xcb_xkb_set_map_values_explicit_iterator
6690  **
6691  ** @param const xcb_xkb_set_map_values_t *R
6692  ** @returns xcb_xkb_set_explicit_iterator_t
6693  **
6694  *****************************************************************************/
6695 
6696 xcb_xkb_set_explicit_iterator_t
6697 xcb_xkb_set_map_values_explicit_iterator (const xcb_xkb_set_map_request_t *R  /**< */,
6698                                           const xcb_xkb_set_map_values_t *S  /**< */)
6699 {
6700     xcb_xkb_set_explicit_iterator_t i;
6701     i.data = /* values */ S->explicit;
6702     i.rem = R->totalKeyExplicit;
6703     i.index = (char *) i.data - (char *) S;
6704     return i;
6705 }
6706 
6707 
6708 /*****************************************************************************
6709  **
6710  ** xcb_xkb_key_mod_map_t * xcb_xkb_set_map_values_modmap
6711  **
6712  ** @param const xcb_xkb_set_map_values_t *S
6713  ** @returns xcb_xkb_key_mod_map_t *
6714  **
6715  *****************************************************************************/
6716 
6717 xcb_xkb_key_mod_map_t *
6718 xcb_xkb_set_map_values_modmap (const xcb_xkb_set_map_values_t *S  /**< */)
6719 {
6720     return /* values */ S->modmap;
6721 }
6722 
6723 
6724 /*****************************************************************************
6725  **
6726  ** int xcb_xkb_set_map_values_modmap_length
6727  **
6728  ** @param const xcb_xkb_set_map_values_t *R
6729  ** @returns int
6730  **
6731  *****************************************************************************/
6732 
6733 int
6734 xcb_xkb_set_map_values_modmap_length (const xcb_xkb_set_map_request_t *R  /**< */,
6735                                       const xcb_xkb_set_map_values_t *S  /**< */)
6736 {
6737     return R->totalModMapKeys;
6738 }
6739 
6740 
6741 /*****************************************************************************
6742  **
6743  ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_set_map_values_modmap_iterator
6744  **
6745  ** @param const xcb_xkb_set_map_values_t *R
6746  ** @returns xcb_xkb_key_mod_map_iterator_t
6747  **
6748  *****************************************************************************/
6749 
6750 xcb_xkb_key_mod_map_iterator_t
6751 xcb_xkb_set_map_values_modmap_iterator (const xcb_xkb_set_map_request_t *R  /**< */,
6752                                         const xcb_xkb_set_map_values_t *S  /**< */)
6753 {
6754     xcb_xkb_key_mod_map_iterator_t i;
6755     i.data = /* values */ S->modmap;
6756     i.rem = R->totalModMapKeys;
6757     i.index = (char *) i.data - (char *) S;
6758     return i;
6759 }
6760 
6761 
6762 /*****************************************************************************
6763  **
6764  ** xcb_xkb_key_v_mod_map_t * xcb_xkb_set_map_values_vmodmap
6765  **
6766  ** @param const xcb_xkb_set_map_values_t *S
6767  ** @returns xcb_xkb_key_v_mod_map_t *
6768  **
6769  *****************************************************************************/
6770 
6771 xcb_xkb_key_v_mod_map_t *
6772 xcb_xkb_set_map_values_vmodmap (const xcb_xkb_set_map_values_t *S  /**< */)
6773 {
6774     return /* values */ S->vmodmap;
6775 }
6776 
6777 
6778 /*****************************************************************************
6779  **
6780  ** int xcb_xkb_set_map_values_vmodmap_length
6781  **
6782  ** @param const xcb_xkb_set_map_values_t *R
6783  ** @returns int
6784  **
6785  *****************************************************************************/
6786 
6787 int
6788 xcb_xkb_set_map_values_vmodmap_length (const xcb_xkb_set_map_request_t *R  /**< */,
6789                                        const xcb_xkb_set_map_values_t *S  /**< */)
6790 {
6791     return R->totalVModMapKeys;
6792 }
6793 
6794 
6795 /*****************************************************************************
6796  **
6797  ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_set_map_values_vmodmap_iterator
6798  **
6799  ** @param const xcb_xkb_set_map_values_t *R
6800  ** @returns xcb_xkb_key_v_mod_map_iterator_t
6801  **
6802  *****************************************************************************/
6803 
6804 xcb_xkb_key_v_mod_map_iterator_t
6805 xcb_xkb_set_map_values_vmodmap_iterator (const xcb_xkb_set_map_request_t *R  /**< */,
6806                                          const xcb_xkb_set_map_values_t *S  /**< */)
6807 {
6808     xcb_xkb_key_v_mod_map_iterator_t i;
6809     i.data = /* values */ S->vmodmap;
6810     i.rem = R->totalVModMapKeys;
6811     i.index = (char *) i.data - (char *) S;
6812     return i;
6813 }
6814 
6815 int
6816 xcb_xkb_set_map_values_serialize (void                           **_buffer  /**< */,
6817                                   uint8_t                          nTypes  /**< */,
6818                                   uint8_t                          nKeySyms  /**< */,
6819                                   uint8_t                          nKeyActions  /**< */,
6820                                   uint16_t                         totalActions  /**< */,
6821                                   uint8_t                          totalKeyBehaviors  /**< */,
6822                                   uint16_t                         virtualMods  /**< */,
6823                                   uint8_t                          totalKeyExplicit  /**< */,
6824                                   uint8_t                          totalModMapKeys  /**< */,
6825                                   uint8_t                          totalVModMapKeys  /**< */,
6826                                   uint16_t                         present  /**< */,
6827                                   const xcb_xkb_set_map_values_t  *_aux  /**< */)
6828 {
6829     char *xcb_out = *_buffer;
6830     unsigned int xcb_buffer_len = 0;
6831     unsigned int xcb_align_to = 0;
6832 
6833     unsigned int xcb_pad = 0;
6834     char xcb_pad0[3] = {0, 0, 0};
6835     struct iovec xcb_parts[19];
6836     unsigned int xcb_parts_idx = 0;
6837     unsigned int xcb_block_len = 0;
6838     unsigned int i;
6839     char *xcb_tmp;
6840 
6841     if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
6842         /* insert padding */
6843         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6844         xcb_buffer_len += xcb_block_len + xcb_pad;
6845         if (0 != xcb_pad) {
6846             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
6847             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
6848             xcb_parts_idx++;
6849             xcb_pad = 0;
6850         }
6851         xcb_block_len = 0;
6852         /* types */
6853         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types;
6854         xcb_parts[xcb_parts_idx].iov_len = 0;
6855         xcb_tmp = (char *) _aux->types;
6856         for(i=0; i<nTypes; i++) {
6857             xcb_block_len = xcb_xkb_set_key_type_sizeof(xcb_tmp);
6858             xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
6859         }
6860         xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
6861         xcb_parts_idx++;
6862         xcb_align_to = ALIGNOF(xcb_xkb_set_key_type_t);
6863     }
6864     if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
6865         /* insert padding */
6866         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6867         xcb_buffer_len += xcb_block_len + xcb_pad;
6868         if (0 != xcb_pad) {
6869             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
6870             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
6871             xcb_parts_idx++;
6872             xcb_pad = 0;
6873         }
6874         xcb_block_len = 0;
6875         /* syms */
6876         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms;
6877         xcb_parts[xcb_parts_idx].iov_len = 0;
6878         xcb_tmp = (char *) _aux->syms;
6879         for(i=0; i<nKeySyms; i++) {
6880             xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
6881             xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
6882         }
6883         xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
6884         xcb_parts_idx++;
6885         xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
6886     }
6887     if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
6888         /* insert padding */
6889         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6890         xcb_buffer_len += xcb_block_len + xcb_pad;
6891         if (0 != xcb_pad) {
6892             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
6893             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
6894             xcb_parts_idx++;
6895             xcb_pad = 0;
6896         }
6897         xcb_block_len = 0;
6898         /* actionsCount */
6899         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->actionsCount;
6900         xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
6901         xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
6902         xcb_parts_idx++;
6903         xcb_align_to = ALIGNOF(uint8_t);
6904         /* insert padding */
6905         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6906         xcb_buffer_len += xcb_block_len + xcb_pad;
6907         if (0 != xcb_pad) {
6908             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
6909             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
6910             xcb_parts_idx++;
6911             xcb_pad = 0;
6912         }
6913         xcb_block_len = 0;
6914         /* actions */
6915         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->actions;
6916         xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
6917         xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
6918         xcb_parts_idx++;
6919         xcb_align_to = ALIGNOF(xcb_xkb_action_t);
6920     }
6921     if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
6922         /* insert padding */
6923         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6924         xcb_buffer_len += xcb_block_len + xcb_pad;
6925         if (0 != xcb_pad) {
6926             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
6927             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
6928             xcb_parts_idx++;
6929             xcb_pad = 0;
6930         }
6931         xcb_block_len = 0;
6932         /* behaviors */
6933         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors;
6934         xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
6935         xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
6936         xcb_parts_idx++;
6937         xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
6938     }
6939     if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
6940         /* insert padding */
6941         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6942         xcb_buffer_len += xcb_block_len + xcb_pad;
6943         if (0 != xcb_pad) {
6944             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
6945             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
6946             xcb_parts_idx++;
6947             xcb_pad = 0;
6948         }
6949         xcb_block_len = 0;
6950         /* vmods */
6951         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods;
6952         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
6953         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
6954         xcb_parts_idx++;
6955         xcb_align_to = ALIGNOF(uint8_t);
6956     }
6957     if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
6958         /* insert padding */
6959         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6960         xcb_buffer_len += xcb_block_len + xcb_pad;
6961         if (0 != xcb_pad) {
6962             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
6963             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
6964             xcb_parts_idx++;
6965             xcb_pad = 0;
6966         }
6967         xcb_block_len = 0;
6968         /* explicit */
6969         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit;
6970         xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
6971         xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
6972         xcb_parts_idx++;
6973         xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
6974     }
6975     if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
6976         /* insert padding */
6977         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6978         xcb_buffer_len += xcb_block_len + xcb_pad;
6979         if (0 != xcb_pad) {
6980             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
6981             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
6982             xcb_parts_idx++;
6983             xcb_pad = 0;
6984         }
6985         xcb_block_len = 0;
6986         /* modmap */
6987         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap;
6988         xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
6989         xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
6990         xcb_parts_idx++;
6991         xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
6992     }
6993     if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
6994         /* insert padding */
6995         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6996         xcb_buffer_len += xcb_block_len + xcb_pad;
6997         if (0 != xcb_pad) {
6998             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
6999             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
7000             xcb_parts_idx++;
7001             xcb_pad = 0;
7002         }
7003         xcb_block_len = 0;
7004         /* vmodmap */
7005         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap;
7006         xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
7007         xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
7008         xcb_parts_idx++;
7009         xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
7010     }
7011     /* insert padding */
7012     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7013     xcb_buffer_len += xcb_block_len + xcb_pad;
7014     if (0 != xcb_pad) {
7015         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
7016         xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
7017         xcb_parts_idx++;
7018         xcb_pad = 0;
7019     }
7020     xcb_block_len = 0;
7021 
7022     if (NULL == xcb_out) {
7023         /* allocate memory */
7024         xcb_out = malloc(xcb_buffer_len);
7025         *_buffer = xcb_out;
7026     }
7027 
7028     xcb_tmp = xcb_out;
7029     for(i=0; i<xcb_parts_idx; i++) {
7030         if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
7031             memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
7032         if (0 != xcb_parts[i].iov_len)
7033             xcb_tmp += xcb_parts[i].iov_len;
7034     }
7035 
7036     return xcb_buffer_len;
7037 }
7038 
7039 int
7040 xcb_xkb_set_map_values_unpack (const void                *_buffer  /**< */,
7041                                uint8_t                    nTypes  /**< */,
7042                                uint8_t                    nKeySyms  /**< */,
7043                                uint8_t                    nKeyActions  /**< */,
7044                                uint16_t                   totalActions  /**< */,
7045                                uint8_t                    totalKeyBehaviors  /**< */,
7046                                uint16_t                   virtualMods  /**< */,
7047                                uint8_t                    totalKeyExplicit  /**< */,
7048                                uint8_t                    totalModMapKeys  /**< */,
7049                                uint8_t                    totalVModMapKeys  /**< */,
7050                                uint16_t                   present  /**< */,
7051                                xcb_xkb_set_map_values_t  *_aux  /**< */)
7052 {
7053     char *xcb_tmp = (char *)_buffer;
7054     unsigned int xcb_buffer_len = 0;
7055     unsigned int xcb_block_len = 0;
7056     unsigned int xcb_pad = 0;
7057     unsigned int xcb_align_to = 0;
7058 
7059     unsigned int i;
7060     unsigned int xcb_tmp_len;
7061 
7062     if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
7063         /* insert padding */
7064         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7065         xcb_buffer_len += xcb_block_len + xcb_pad;
7066         if (0 != xcb_pad) {
7067             xcb_tmp += xcb_pad;
7068             xcb_pad = 0;
7069         }
7070         xcb_block_len = 0;
7071         /* types */
7072         _aux->types = (xcb_xkb_set_key_type_t *)xcb_tmp;
7073         for(i=0; i<nTypes; i++) {
7074             xcb_tmp_len = xcb_xkb_set_key_type_sizeof(xcb_tmp);
7075             xcb_block_len += xcb_tmp_len;
7076             xcb_tmp += xcb_tmp_len;
7077         }
7078         xcb_align_to = ALIGNOF(xcb_xkb_set_key_type_t);
7079     }
7080     if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
7081         /* insert padding */
7082         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7083         xcb_buffer_len += xcb_block_len + xcb_pad;
7084         if (0 != xcb_pad) {
7085             xcb_tmp += xcb_pad;
7086             xcb_pad = 0;
7087         }
7088         xcb_block_len = 0;
7089         /* syms */
7090         _aux->syms = (xcb_xkb_key_sym_map_t *)xcb_tmp;
7091         for(i=0; i<nKeySyms; i++) {
7092             xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
7093             xcb_block_len += xcb_tmp_len;
7094             xcb_tmp += xcb_tmp_len;
7095         }
7096         xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
7097     }
7098     if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
7099         /* insert padding */
7100         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7101         xcb_buffer_len += xcb_block_len + xcb_pad;
7102         if (0 != xcb_pad) {
7103             xcb_tmp += xcb_pad;
7104             xcb_pad = 0;
7105         }
7106         xcb_block_len = 0;
7107         /* actionsCount */
7108         _aux->actionsCount = (uint8_t *)xcb_tmp;
7109         xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
7110         xcb_tmp += xcb_block_len;
7111         xcb_align_to = ALIGNOF(uint8_t);
7112         /* insert padding */
7113         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7114         xcb_buffer_len += xcb_block_len + xcb_pad;
7115         if (0 != xcb_pad) {
7116             xcb_tmp += xcb_pad;
7117             xcb_pad = 0;
7118         }
7119         xcb_block_len = 0;
7120         /* actions */
7121         _aux->actions = (xcb_xkb_action_t *)xcb_tmp;
7122         xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
7123         xcb_tmp += xcb_block_len;
7124         xcb_align_to = ALIGNOF(xcb_xkb_action_t);
7125     }
7126     if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
7127         /* insert padding */
7128         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7129         xcb_buffer_len += xcb_block_len + xcb_pad;
7130         if (0 != xcb_pad) {
7131             xcb_tmp += xcb_pad;
7132             xcb_pad = 0;
7133         }
7134         xcb_block_len = 0;
7135         /* behaviors */
7136         _aux->behaviors = (xcb_xkb_set_behavior_t *)xcb_tmp;
7137         xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
7138         xcb_tmp += xcb_block_len;
7139         xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
7140     }
7141     if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
7142         /* insert padding */
7143         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7144         xcb_buffer_len += xcb_block_len + xcb_pad;
7145         if (0 != xcb_pad) {
7146             xcb_tmp += xcb_pad;
7147             xcb_pad = 0;
7148         }
7149         xcb_block_len = 0;
7150         /* vmods */
7151         _aux->vmods = (uint8_t *)xcb_tmp;
7152         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
7153         xcb_tmp += xcb_block_len;
7154         xcb_align_to = ALIGNOF(uint8_t);
7155     }
7156     if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
7157         /* insert padding */
7158         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7159         xcb_buffer_len += xcb_block_len + xcb_pad;
7160         if (0 != xcb_pad) {
7161             xcb_tmp += xcb_pad;
7162             xcb_pad = 0;
7163         }
7164         xcb_block_len = 0;
7165         /* explicit */
7166         _aux->explicit = (xcb_xkb_set_explicit_t *)xcb_tmp;
7167         xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
7168         xcb_tmp += xcb_block_len;
7169         xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
7170     }
7171     if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
7172         /* insert padding */
7173         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7174         xcb_buffer_len += xcb_block_len + xcb_pad;
7175         if (0 != xcb_pad) {
7176             xcb_tmp += xcb_pad;
7177             xcb_pad = 0;
7178         }
7179         xcb_block_len = 0;
7180         /* modmap */
7181         _aux->modmap = (xcb_xkb_key_mod_map_t *)xcb_tmp;
7182         xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
7183         xcb_tmp += xcb_block_len;
7184         xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
7185     }
7186     if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
7187         /* insert padding */
7188         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7189         xcb_buffer_len += xcb_block_len + xcb_pad;
7190         if (0 != xcb_pad) {
7191             xcb_tmp += xcb_pad;
7192             xcb_pad = 0;
7193         }
7194         xcb_block_len = 0;
7195         /* vmodmap */
7196         _aux->vmodmap = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
7197         xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
7198         xcb_tmp += xcb_block_len;
7199         xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
7200     }
7201     /* insert padding */
7202     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7203     xcb_buffer_len += xcb_block_len + xcb_pad;
7204     if (0 != xcb_pad) {
7205         xcb_tmp += xcb_pad;
7206         xcb_pad = 0;
7207     }
7208     xcb_block_len = 0;
7209 
7210     return xcb_buffer_len;
7211 }
7212 
7213 int
7214 xcb_xkb_set_map_values_sizeof (const void  *_buffer  /**< */,
7215                                uint8_t      nTypes  /**< */,
7216                                uint8_t      nKeySyms  /**< */,
7217                                uint8_t      nKeyActions  /**< */,
7218                                uint16_t     totalActions  /**< */,
7219                                uint8_t      totalKeyBehaviors  /**< */,
7220                                uint16_t     virtualMods  /**< */,
7221                                uint8_t      totalKeyExplicit  /**< */,
7222                                uint8_t      totalModMapKeys  /**< */,
7223                                uint8_t      totalVModMapKeys  /**< */,
7224                                uint16_t     present  /**< */)
7225 {
7226     xcb_xkb_set_map_values_t _aux;
7227     return xcb_xkb_set_map_values_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
7228 }
7229 
7230 
7231 /*****************************************************************************
7232  **
7233  ** xcb_void_cookie_t xcb_xkb_set_map_checked
7234  **
7235  ** @param xcb_connection_t      *c
7236  ** @param xcb_xkb_device_spec_t  deviceSpec
7237  ** @param uint16_t               present
7238  ** @param uint16_t               flags
7239  ** @param xcb_keycode_t          minKeyCode
7240  ** @param xcb_keycode_t          maxKeyCode
7241  ** @param uint8_t                firstType
7242  ** @param uint8_t                nTypes
7243  ** @param xcb_keycode_t          firstKeySym
7244  ** @param uint8_t                nKeySyms
7245  ** @param uint16_t               totalSyms
7246  ** @param xcb_keycode_t          firstKeyAction
7247  ** @param uint8_t                nKeyActions
7248  ** @param uint16_t               totalActions
7249  ** @param xcb_keycode_t          firstKeyBehavior
7250  ** @param uint8_t                nKeyBehaviors
7251  ** @param uint8_t                totalKeyBehaviors
7252  ** @param xcb_keycode_t          firstKeyExplicit
7253  ** @param uint8_t                nKeyExplicit
7254  ** @param uint8_t                totalKeyExplicit
7255  ** @param xcb_keycode_t          firstModMapKey
7256  ** @param uint8_t                nModMapKeys
7257  ** @param uint8_t                totalModMapKeys
7258  ** @param xcb_keycode_t          firstVModMapKey
7259  ** @param uint8_t                nVModMapKeys
7260  ** @param uint8_t                totalVModMapKeys
7261  ** @param uint16_t               virtualMods
7262  ** @param const void            *values
7263  ** @returns xcb_void_cookie_t
7264  **
7265  *****************************************************************************/
7266 
7267 xcb_void_cookie_t
7268 xcb_xkb_set_map_checked (xcb_connection_t      *c  /**< */,
7269                          xcb_xkb_device_spec_t  deviceSpec  /**< */,
7270                          uint16_t               present  /**< */,
7271                          uint16_t               flags  /**< */,
7272                          xcb_keycode_t          minKeyCode  /**< */,
7273                          xcb_keycode_t          maxKeyCode  /**< */,
7274                          uint8_t                firstType  /**< */,
7275                          uint8_t                nTypes  /**< */,
7276                          xcb_keycode_t          firstKeySym  /**< */,
7277                          uint8_t                nKeySyms  /**< */,
7278                          uint16_t               totalSyms  /**< */,
7279                          xcb_keycode_t          firstKeyAction  /**< */,
7280                          uint8_t                nKeyActions  /**< */,
7281                          uint16_t               totalActions  /**< */,
7282                          xcb_keycode_t          firstKeyBehavior  /**< */,
7283                          uint8_t                nKeyBehaviors  /**< */,
7284                          uint8_t                totalKeyBehaviors  /**< */,
7285                          xcb_keycode_t          firstKeyExplicit  /**< */,
7286                          uint8_t                nKeyExplicit  /**< */,
7287                          uint8_t                totalKeyExplicit  /**< */,
7288                          xcb_keycode_t          firstModMapKey  /**< */,
7289                          uint8_t                nModMapKeys  /**< */,
7290                          uint8_t                totalModMapKeys  /**< */,
7291                          xcb_keycode_t          firstVModMapKey  /**< */,
7292                          uint8_t                nVModMapKeys  /**< */,
7293                          uint8_t                totalVModMapKeys  /**< */,
7294                          uint16_t               virtualMods  /**< */,
7295                          const void            *values  /**< */)
7296 {
7297     static const xcb_protocol_request_t xcb_req = {
7298         /* count */ 3,
7299         /* ext */ &xcb_xkb_id,
7300         /* opcode */ XCB_XKB_SET_MAP,
7301         /* isvoid */ 1
7302     };
7303 
7304     struct iovec xcb_parts[5];
7305     xcb_void_cookie_t xcb_ret;
7306     xcb_xkb_set_map_request_t xcb_out;
7307 
7308     xcb_out.deviceSpec = deviceSpec;
7309     xcb_out.present = present;
7310     xcb_out.flags = flags;
7311     xcb_out.minKeyCode = minKeyCode;
7312     xcb_out.maxKeyCode = maxKeyCode;
7313     xcb_out.firstType = firstType;
7314     xcb_out.nTypes = nTypes;
7315     xcb_out.firstKeySym = firstKeySym;
7316     xcb_out.nKeySyms = nKeySyms;
7317     xcb_out.totalSyms = totalSyms;
7318     xcb_out.firstKeyAction = firstKeyAction;
7319     xcb_out.nKeyActions = nKeyActions;
7320     xcb_out.totalActions = totalActions;
7321     xcb_out.firstKeyBehavior = firstKeyBehavior;
7322     xcb_out.nKeyBehaviors = nKeyBehaviors;
7323     xcb_out.totalKeyBehaviors = totalKeyBehaviors;
7324     xcb_out.firstKeyExplicit = firstKeyExplicit;
7325     xcb_out.nKeyExplicit = nKeyExplicit;
7326     xcb_out.totalKeyExplicit = totalKeyExplicit;
7327     xcb_out.firstModMapKey = firstModMapKey;
7328     xcb_out.nModMapKeys = nModMapKeys;
7329     xcb_out.totalModMapKeys = totalModMapKeys;
7330     xcb_out.firstVModMapKey = firstVModMapKey;
7331     xcb_out.nVModMapKeys = nVModMapKeys;
7332     xcb_out.totalVModMapKeys = totalVModMapKeys;
7333     xcb_out.virtualMods = virtualMods;
7334 
7335     xcb_parts[2].iov_base = (char *) &xcb_out;
7336     xcb_parts[2].iov_len = sizeof(xcb_out);
7337     xcb_parts[3].iov_base = 0;
7338     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7339     /* xcb_xkb_set_map_values_t values */
7340     xcb_parts[4].iov_base = (char *) values;
7341     xcb_parts[4].iov_len =
7342       xcb_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present);
7343 
7344     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7345     return xcb_ret;
7346 }
7347 
7348 
7349 /*****************************************************************************
7350  **
7351  ** xcb_void_cookie_t xcb_xkb_set_map
7352  **
7353  ** @param xcb_connection_t      *c
7354  ** @param xcb_xkb_device_spec_t  deviceSpec
7355  ** @param uint16_t               present
7356  ** @param uint16_t               flags
7357  ** @param xcb_keycode_t          minKeyCode
7358  ** @param xcb_keycode_t          maxKeyCode
7359  ** @param uint8_t                firstType
7360  ** @param uint8_t                nTypes
7361  ** @param xcb_keycode_t          firstKeySym
7362  ** @param uint8_t                nKeySyms
7363  ** @param uint16_t               totalSyms
7364  ** @param xcb_keycode_t          firstKeyAction
7365  ** @param uint8_t                nKeyActions
7366  ** @param uint16_t               totalActions
7367  ** @param xcb_keycode_t          firstKeyBehavior
7368  ** @param uint8_t                nKeyBehaviors
7369  ** @param uint8_t                totalKeyBehaviors
7370  ** @param xcb_keycode_t          firstKeyExplicit
7371  ** @param uint8_t                nKeyExplicit
7372  ** @param uint8_t                totalKeyExplicit
7373  ** @param xcb_keycode_t          firstModMapKey
7374  ** @param uint8_t                nModMapKeys
7375  ** @param uint8_t                totalModMapKeys
7376  ** @param xcb_keycode_t          firstVModMapKey
7377  ** @param uint8_t                nVModMapKeys
7378  ** @param uint8_t                totalVModMapKeys
7379  ** @param uint16_t               virtualMods
7380  ** @param const void            *values
7381  ** @returns xcb_void_cookie_t
7382  **
7383  *****************************************************************************/
7384 
7385 xcb_void_cookie_t
7386 xcb_xkb_set_map (xcb_connection_t      *c  /**< */,
7387                  xcb_xkb_device_spec_t  deviceSpec  /**< */,
7388                  uint16_t               present  /**< */,
7389                  uint16_t               flags  /**< */,
7390                  xcb_keycode_t          minKeyCode  /**< */,
7391                  xcb_keycode_t          maxKeyCode  /**< */,
7392                  uint8_t                firstType  /**< */,
7393                  uint8_t                nTypes  /**< */,
7394                  xcb_keycode_t          firstKeySym  /**< */,
7395                  uint8_t                nKeySyms  /**< */,
7396                  uint16_t               totalSyms  /**< */,
7397                  xcb_keycode_t          firstKeyAction  /**< */,
7398                  uint8_t                nKeyActions  /**< */,
7399                  uint16_t               totalActions  /**< */,
7400                  xcb_keycode_t          firstKeyBehavior  /**< */,
7401                  uint8_t                nKeyBehaviors  /**< */,
7402                  uint8_t                totalKeyBehaviors  /**< */,
7403                  xcb_keycode_t          firstKeyExplicit  /**< */,
7404                  uint8_t                nKeyExplicit  /**< */,
7405                  uint8_t                totalKeyExplicit  /**< */,
7406                  xcb_keycode_t          firstModMapKey  /**< */,
7407                  uint8_t                nModMapKeys  /**< */,
7408                  uint8_t                totalModMapKeys  /**< */,
7409                  xcb_keycode_t          firstVModMapKey  /**< */,
7410                  uint8_t                nVModMapKeys  /**< */,
7411                  uint8_t                totalVModMapKeys  /**< */,
7412                  uint16_t               virtualMods  /**< */,
7413                  const void            *values  /**< */)
7414 {
7415     static const xcb_protocol_request_t xcb_req = {
7416         /* count */ 3,
7417         /* ext */ &xcb_xkb_id,
7418         /* opcode */ XCB_XKB_SET_MAP,
7419         /* isvoid */ 1
7420     };
7421 
7422     struct iovec xcb_parts[5];
7423     xcb_void_cookie_t xcb_ret;
7424     xcb_xkb_set_map_request_t xcb_out;
7425 
7426     xcb_out.deviceSpec = deviceSpec;
7427     xcb_out.present = present;
7428     xcb_out.flags = flags;
7429     xcb_out.minKeyCode = minKeyCode;
7430     xcb_out.maxKeyCode = maxKeyCode;
7431     xcb_out.firstType = firstType;
7432     xcb_out.nTypes = nTypes;
7433     xcb_out.firstKeySym = firstKeySym;
7434     xcb_out.nKeySyms = nKeySyms;
7435     xcb_out.totalSyms = totalSyms;
7436     xcb_out.firstKeyAction = firstKeyAction;
7437     xcb_out.nKeyActions = nKeyActions;
7438     xcb_out.totalActions = totalActions;
7439     xcb_out.firstKeyBehavior = firstKeyBehavior;
7440     xcb_out.nKeyBehaviors = nKeyBehaviors;
7441     xcb_out.totalKeyBehaviors = totalKeyBehaviors;
7442     xcb_out.firstKeyExplicit = firstKeyExplicit;
7443     xcb_out.nKeyExplicit = nKeyExplicit;
7444     xcb_out.totalKeyExplicit = totalKeyExplicit;
7445     xcb_out.firstModMapKey = firstModMapKey;
7446     xcb_out.nModMapKeys = nModMapKeys;
7447     xcb_out.totalModMapKeys = totalModMapKeys;
7448     xcb_out.firstVModMapKey = firstVModMapKey;
7449     xcb_out.nVModMapKeys = nVModMapKeys;
7450     xcb_out.totalVModMapKeys = totalVModMapKeys;
7451     xcb_out.virtualMods = virtualMods;
7452 
7453     xcb_parts[2].iov_base = (char *) &xcb_out;
7454     xcb_parts[2].iov_len = sizeof(xcb_out);
7455     xcb_parts[3].iov_base = 0;
7456     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7457     /* xcb_xkb_set_map_values_t values */
7458     xcb_parts[4].iov_base = (char *) values;
7459     xcb_parts[4].iov_len =
7460       xcb_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present);
7461 
7462     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7463     return xcb_ret;
7464 }
7465 
7466 
7467 /*****************************************************************************
7468  **
7469  ** xcb_void_cookie_t xcb_xkb_set_map_aux_checked
7470  **
7471  ** @param xcb_connection_t               *c
7472  ** @param xcb_xkb_device_spec_t           deviceSpec
7473  ** @param uint16_t                        present
7474  ** @param uint16_t                        flags
7475  ** @param xcb_keycode_t                   minKeyCode
7476  ** @param xcb_keycode_t                   maxKeyCode
7477  ** @param uint8_t                         firstType
7478  ** @param uint8_t                         nTypes
7479  ** @param xcb_keycode_t                   firstKeySym
7480  ** @param uint8_t                         nKeySyms
7481  ** @param uint16_t                        totalSyms
7482  ** @param xcb_keycode_t                   firstKeyAction
7483  ** @param uint8_t                         nKeyActions
7484  ** @param uint16_t                        totalActions
7485  ** @param xcb_keycode_t                   firstKeyBehavior
7486  ** @param uint8_t                         nKeyBehaviors
7487  ** @param uint8_t                         totalKeyBehaviors
7488  ** @param xcb_keycode_t                   firstKeyExplicit
7489  ** @param uint8_t                         nKeyExplicit
7490  ** @param uint8_t                         totalKeyExplicit
7491  ** @param xcb_keycode_t                   firstModMapKey
7492  ** @param uint8_t                         nModMapKeys
7493  ** @param uint8_t                         totalModMapKeys
7494  ** @param xcb_keycode_t                   firstVModMapKey
7495  ** @param uint8_t                         nVModMapKeys
7496  ** @param uint8_t                         totalVModMapKeys
7497  ** @param uint16_t                        virtualMods
7498  ** @param const xcb_xkb_set_map_values_t *values
7499  ** @returns xcb_void_cookie_t
7500  **
7501  *****************************************************************************/
7502 
7503 xcb_void_cookie_t
7504 xcb_xkb_set_map_aux_checked (xcb_connection_t               *c  /**< */,
7505                              xcb_xkb_device_spec_t           deviceSpec  /**< */,
7506                              uint16_t                        present  /**< */,
7507                              uint16_t                        flags  /**< */,
7508                              xcb_keycode_t                   minKeyCode  /**< */,
7509                              xcb_keycode_t                   maxKeyCode  /**< */,
7510                              uint8_t                         firstType  /**< */,
7511                              uint8_t                         nTypes  /**< */,
7512                              xcb_keycode_t                   firstKeySym  /**< */,
7513                              uint8_t                         nKeySyms  /**< */,
7514                              uint16_t                        totalSyms  /**< */,
7515                              xcb_keycode_t                   firstKeyAction  /**< */,
7516                              uint8_t                         nKeyActions  /**< */,
7517                              uint16_t                        totalActions  /**< */,
7518                              xcb_keycode_t                   firstKeyBehavior  /**< */,
7519                              uint8_t                         nKeyBehaviors  /**< */,
7520                              uint8_t                         totalKeyBehaviors  /**< */,
7521                              xcb_keycode_t                   firstKeyExplicit  /**< */,
7522                              uint8_t                         nKeyExplicit  /**< */,
7523                              uint8_t                         totalKeyExplicit  /**< */,
7524                              xcb_keycode_t                   firstModMapKey  /**< */,
7525                              uint8_t                         nModMapKeys  /**< */,
7526                              uint8_t                         totalModMapKeys  /**< */,
7527                              xcb_keycode_t                   firstVModMapKey  /**< */,
7528                              uint8_t                         nVModMapKeys  /**< */,
7529                              uint8_t                         totalVModMapKeys  /**< */,
7530                              uint16_t                        virtualMods  /**< */,
7531                              const xcb_xkb_set_map_values_t *values  /**< */)
7532 {
7533     static const xcb_protocol_request_t xcb_req = {
7534         /* count */ 3,
7535         /* ext */ &xcb_xkb_id,
7536         /* opcode */ XCB_XKB_SET_MAP,
7537         /* isvoid */ 1
7538     };
7539 
7540     struct iovec xcb_parts[5];
7541     xcb_void_cookie_t xcb_ret;
7542     xcb_xkb_set_map_request_t xcb_out;
7543     void *xcb_aux0 = 0;
7544 
7545     xcb_out.deviceSpec = deviceSpec;
7546     xcb_out.present = present;
7547     xcb_out.flags = flags;
7548     xcb_out.minKeyCode = minKeyCode;
7549     xcb_out.maxKeyCode = maxKeyCode;
7550     xcb_out.firstType = firstType;
7551     xcb_out.nTypes = nTypes;
7552     xcb_out.firstKeySym = firstKeySym;
7553     xcb_out.nKeySyms = nKeySyms;
7554     xcb_out.totalSyms = totalSyms;
7555     xcb_out.firstKeyAction = firstKeyAction;
7556     xcb_out.nKeyActions = nKeyActions;
7557     xcb_out.totalActions = totalActions;
7558     xcb_out.firstKeyBehavior = firstKeyBehavior;
7559     xcb_out.nKeyBehaviors = nKeyBehaviors;
7560     xcb_out.totalKeyBehaviors = totalKeyBehaviors;
7561     xcb_out.firstKeyExplicit = firstKeyExplicit;
7562     xcb_out.nKeyExplicit = nKeyExplicit;
7563     xcb_out.totalKeyExplicit = totalKeyExplicit;
7564     xcb_out.firstModMapKey = firstModMapKey;
7565     xcb_out.nModMapKeys = nModMapKeys;
7566     xcb_out.totalModMapKeys = totalModMapKeys;
7567     xcb_out.firstVModMapKey = firstVModMapKey;
7568     xcb_out.nVModMapKeys = nVModMapKeys;
7569     xcb_out.totalVModMapKeys = totalVModMapKeys;
7570     xcb_out.virtualMods = virtualMods;
7571 
7572     xcb_parts[2].iov_base = (char *) &xcb_out;
7573     xcb_parts[2].iov_len = sizeof(xcb_out);
7574     xcb_parts[3].iov_base = 0;
7575     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7576     /* xcb_xkb_set_map_values_t values */
7577     xcb_parts[4].iov_len =
7578       xcb_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, values);
7579     xcb_parts[4].iov_base = xcb_aux0;
7580 
7581     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7582     free(xcb_aux0);
7583     return xcb_ret;
7584 }
7585 
7586 
7587 /*****************************************************************************
7588  **
7589  ** xcb_void_cookie_t xcb_xkb_set_map_aux
7590  **
7591  ** @param xcb_connection_t               *c
7592  ** @param xcb_xkb_device_spec_t           deviceSpec
7593  ** @param uint16_t                        present
7594  ** @param uint16_t                        flags
7595  ** @param xcb_keycode_t                   minKeyCode
7596  ** @param xcb_keycode_t                   maxKeyCode
7597  ** @param uint8_t                         firstType
7598  ** @param uint8_t                         nTypes
7599  ** @param xcb_keycode_t                   firstKeySym
7600  ** @param uint8_t                         nKeySyms
7601  ** @param uint16_t                        totalSyms
7602  ** @param xcb_keycode_t                   firstKeyAction
7603  ** @param uint8_t                         nKeyActions
7604  ** @param uint16_t                        totalActions
7605  ** @param xcb_keycode_t                   firstKeyBehavior
7606  ** @param uint8_t                         nKeyBehaviors
7607  ** @param uint8_t                         totalKeyBehaviors
7608  ** @param xcb_keycode_t                   firstKeyExplicit
7609  ** @param uint8_t                         nKeyExplicit
7610  ** @param uint8_t                         totalKeyExplicit
7611  ** @param xcb_keycode_t                   firstModMapKey
7612  ** @param uint8_t                         nModMapKeys
7613  ** @param uint8_t                         totalModMapKeys
7614  ** @param xcb_keycode_t                   firstVModMapKey
7615  ** @param uint8_t                         nVModMapKeys
7616  ** @param uint8_t                         totalVModMapKeys
7617  ** @param uint16_t                        virtualMods
7618  ** @param const xcb_xkb_set_map_values_t *values
7619  ** @returns xcb_void_cookie_t
7620  **
7621  *****************************************************************************/
7622 
7623 xcb_void_cookie_t
7624 xcb_xkb_set_map_aux (xcb_connection_t               *c  /**< */,
7625                      xcb_xkb_device_spec_t           deviceSpec  /**< */,
7626                      uint16_t                        present  /**< */,
7627                      uint16_t                        flags  /**< */,
7628                      xcb_keycode_t                   minKeyCode  /**< */,
7629                      xcb_keycode_t                   maxKeyCode  /**< */,
7630                      uint8_t                         firstType  /**< */,
7631                      uint8_t                         nTypes  /**< */,
7632                      xcb_keycode_t                   firstKeySym  /**< */,
7633                      uint8_t                         nKeySyms  /**< */,
7634                      uint16_t                        totalSyms  /**< */,
7635                      xcb_keycode_t                   firstKeyAction  /**< */,
7636                      uint8_t                         nKeyActions  /**< */,
7637                      uint16_t                        totalActions  /**< */,
7638                      xcb_keycode_t                   firstKeyBehavior  /**< */,
7639                      uint8_t                         nKeyBehaviors  /**< */,
7640                      uint8_t                         totalKeyBehaviors  /**< */,
7641                      xcb_keycode_t                   firstKeyExplicit  /**< */,
7642                      uint8_t                         nKeyExplicit  /**< */,
7643                      uint8_t                         totalKeyExplicit  /**< */,
7644                      xcb_keycode_t                   firstModMapKey  /**< */,
7645                      uint8_t                         nModMapKeys  /**< */,
7646                      uint8_t                         totalModMapKeys  /**< */,
7647                      xcb_keycode_t                   firstVModMapKey  /**< */,
7648                      uint8_t                         nVModMapKeys  /**< */,
7649                      uint8_t                         totalVModMapKeys  /**< */,
7650                      uint16_t                        virtualMods  /**< */,
7651                      const xcb_xkb_set_map_values_t *values  /**< */)
7652 {
7653     static const xcb_protocol_request_t xcb_req = {
7654         /* count */ 3,
7655         /* ext */ &xcb_xkb_id,
7656         /* opcode */ XCB_XKB_SET_MAP,
7657         /* isvoid */ 1
7658     };
7659 
7660     struct iovec xcb_parts[5];
7661     xcb_void_cookie_t xcb_ret;
7662     xcb_xkb_set_map_request_t xcb_out;
7663     void *xcb_aux0 = 0;
7664 
7665     xcb_out.deviceSpec = deviceSpec;
7666     xcb_out.present = present;
7667     xcb_out.flags = flags;
7668     xcb_out.minKeyCode = minKeyCode;
7669     xcb_out.maxKeyCode = maxKeyCode;
7670     xcb_out.firstType = firstType;
7671     xcb_out.nTypes = nTypes;
7672     xcb_out.firstKeySym = firstKeySym;
7673     xcb_out.nKeySyms = nKeySyms;
7674     xcb_out.totalSyms = totalSyms;
7675     xcb_out.firstKeyAction = firstKeyAction;
7676     xcb_out.nKeyActions = nKeyActions;
7677     xcb_out.totalActions = totalActions;
7678     xcb_out.firstKeyBehavior = firstKeyBehavior;
7679     xcb_out.nKeyBehaviors = nKeyBehaviors;
7680     xcb_out.totalKeyBehaviors = totalKeyBehaviors;
7681     xcb_out.firstKeyExplicit = firstKeyExplicit;
7682     xcb_out.nKeyExplicit = nKeyExplicit;
7683     xcb_out.totalKeyExplicit = totalKeyExplicit;
7684     xcb_out.firstModMapKey = firstModMapKey;
7685     xcb_out.nModMapKeys = nModMapKeys;
7686     xcb_out.totalModMapKeys = totalModMapKeys;
7687     xcb_out.firstVModMapKey = firstVModMapKey;
7688     xcb_out.nVModMapKeys = nVModMapKeys;
7689     xcb_out.totalVModMapKeys = totalVModMapKeys;
7690     xcb_out.virtualMods = virtualMods;
7691 
7692     xcb_parts[2].iov_base = (char *) &xcb_out;
7693     xcb_parts[2].iov_len = sizeof(xcb_out);
7694     xcb_parts[3].iov_base = 0;
7695     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7696     /* xcb_xkb_set_map_values_t values */
7697     xcb_parts[4].iov_len =
7698       xcb_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, values);
7699     xcb_parts[4].iov_base = xcb_aux0;
7700 
7701     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7702     free(xcb_aux0);
7703     return xcb_ret;
7704 }
7705 
7706 int
7707 xcb_xkb_get_compat_map_sizeof (const void  *_buffer  /**< */)
7708 {
7709     char *xcb_tmp = (char *)_buffer;
7710     const xcb_xkb_get_compat_map_reply_t *_aux = (xcb_xkb_get_compat_map_reply_t *)_buffer;
7711     unsigned int xcb_buffer_len = 0;
7712     unsigned int xcb_block_len = 0;
7713     unsigned int xcb_pad = 0;
7714     unsigned int xcb_align_to = 0;
7715 
7716 
7717     xcb_block_len += sizeof(xcb_xkb_get_compat_map_reply_t);
7718     xcb_tmp += xcb_block_len;
7719     xcb_buffer_len += xcb_block_len;
7720     xcb_block_len = 0;
7721     /* si_rtrn */
7722     xcb_block_len += _aux->nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
7723     xcb_tmp += xcb_block_len;
7724     xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
7725     /* insert padding */
7726     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7727     xcb_buffer_len += xcb_block_len + xcb_pad;
7728     if (0 != xcb_pad) {
7729         xcb_tmp += xcb_pad;
7730         xcb_pad = 0;
7731     }
7732     xcb_block_len = 0;
7733     /* group_rtrn */
7734     xcb_block_len += xcb_popcount(_aux->groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
7735     xcb_tmp += xcb_block_len;
7736     xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
7737     /* insert padding */
7738     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7739     xcb_buffer_len += xcb_block_len + xcb_pad;
7740     if (0 != xcb_pad) {
7741         xcb_tmp += xcb_pad;
7742         xcb_pad = 0;
7743     }
7744     xcb_block_len = 0;
7745 
7746     return xcb_buffer_len;
7747 }
7748 
7749 
7750 /*****************************************************************************
7751  **
7752  ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map
7753  **
7754  ** @param xcb_connection_t      *c
7755  ** @param xcb_xkb_device_spec_t  deviceSpec
7756  ** @param uint8_t                groups
7757  ** @param uint8_t                getAllSI
7758  ** @param uint16_t               firstSI
7759  ** @param uint16_t               nSI
7760  ** @returns xcb_xkb_get_compat_map_cookie_t
7761  **
7762  *****************************************************************************/
7763 
7764 xcb_xkb_get_compat_map_cookie_t
7765 xcb_xkb_get_compat_map (xcb_connection_t      *c  /**< */,
7766                         xcb_xkb_device_spec_t  deviceSpec  /**< */,
7767                         uint8_t                groups  /**< */,
7768                         uint8_t                getAllSI  /**< */,
7769                         uint16_t               firstSI  /**< */,
7770                         uint16_t               nSI  /**< */)
7771 {
7772     static const xcb_protocol_request_t xcb_req = {
7773         /* count */ 2,
7774         /* ext */ &xcb_xkb_id,
7775         /* opcode */ XCB_XKB_GET_COMPAT_MAP,
7776         /* isvoid */ 0
7777     };
7778 
7779     struct iovec xcb_parts[4];
7780     xcb_xkb_get_compat_map_cookie_t xcb_ret;
7781     xcb_xkb_get_compat_map_request_t xcb_out;
7782 
7783     xcb_out.deviceSpec = deviceSpec;
7784     xcb_out.groups = groups;
7785     xcb_out.getAllSI = getAllSI;
7786     xcb_out.firstSI = firstSI;
7787     xcb_out.nSI = nSI;
7788 
7789     xcb_parts[2].iov_base = (char *) &xcb_out;
7790     xcb_parts[2].iov_len = sizeof(xcb_out);
7791     xcb_parts[3].iov_base = 0;
7792     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7793 
7794     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7795     return xcb_ret;
7796 }
7797 
7798 
7799 /*****************************************************************************
7800  **
7801  ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map_unchecked
7802  **
7803  ** @param xcb_connection_t      *c
7804  ** @param xcb_xkb_device_spec_t  deviceSpec
7805  ** @param uint8_t                groups
7806  ** @param uint8_t                getAllSI
7807  ** @param uint16_t               firstSI
7808  ** @param uint16_t               nSI
7809  ** @returns xcb_xkb_get_compat_map_cookie_t
7810  **
7811  *****************************************************************************/
7812 
7813 xcb_xkb_get_compat_map_cookie_t
7814 xcb_xkb_get_compat_map_unchecked (xcb_connection_t      *c  /**< */,
7815                                   xcb_xkb_device_spec_t  deviceSpec  /**< */,
7816                                   uint8_t                groups  /**< */,
7817                                   uint8_t                getAllSI  /**< */,
7818                                   uint16_t               firstSI  /**< */,
7819                                   uint16_t               nSI  /**< */)
7820 {
7821     static const xcb_protocol_request_t xcb_req = {
7822         /* count */ 2,
7823         /* ext */ &xcb_xkb_id,
7824         /* opcode */ XCB_XKB_GET_COMPAT_MAP,
7825         /* isvoid */ 0
7826     };
7827 
7828     struct iovec xcb_parts[4];
7829     xcb_xkb_get_compat_map_cookie_t xcb_ret;
7830     xcb_xkb_get_compat_map_request_t xcb_out;
7831 
7832     xcb_out.deviceSpec = deviceSpec;
7833     xcb_out.groups = groups;
7834     xcb_out.getAllSI = getAllSI;
7835     xcb_out.firstSI = firstSI;
7836     xcb_out.nSI = nSI;
7837 
7838     xcb_parts[2].iov_base = (char *) &xcb_out;
7839     xcb_parts[2].iov_len = sizeof(xcb_out);
7840     xcb_parts[3].iov_base = 0;
7841     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7842 
7843     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7844     return xcb_ret;
7845 }
7846 
7847 
7848 /*****************************************************************************
7849  **
7850  ** xcb_xkb_sym_interpret_t * xcb_xkb_get_compat_map_si_rtrn
7851  **
7852  ** @param const xcb_xkb_get_compat_map_reply_t *R
7853  ** @returns xcb_xkb_sym_interpret_t *
7854  **
7855  *****************************************************************************/
7856 
7857 xcb_xkb_sym_interpret_t *
7858 xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R  /**< */)
7859 {
7860     return (xcb_xkb_sym_interpret_t *) (R + 1);
7861 }
7862 
7863 
7864 /*****************************************************************************
7865  **
7866  ** int xcb_xkb_get_compat_map_si_rtrn_length
7867  **
7868  ** @param const xcb_xkb_get_compat_map_reply_t *R
7869  ** @returns int
7870  **
7871  *****************************************************************************/
7872 
7873 int
7874 xcb_xkb_get_compat_map_si_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R  /**< */)
7875 {
7876     return R->nSIRtrn;
7877 }
7878 
7879 
7880 /*****************************************************************************
7881  **
7882  ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_compat_map_si_rtrn_iterator
7883  **
7884  ** @param const xcb_xkb_get_compat_map_reply_t *R
7885  ** @returns xcb_xkb_sym_interpret_iterator_t
7886  **
7887  *****************************************************************************/
7888 
7889 xcb_xkb_sym_interpret_iterator_t
7890 xcb_xkb_get_compat_map_si_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R  /**< */)
7891 {
7892     xcb_xkb_sym_interpret_iterator_t i;
7893     i.data = (xcb_xkb_sym_interpret_t *) (R + 1);
7894     i.rem = R->nSIRtrn;
7895     i.index = (char *) i.data - (char *) R;
7896     return i;
7897 }
7898 
7899 
7900 /*****************************************************************************
7901  **
7902  ** xcb_xkb_mod_def_t * xcb_xkb_get_compat_map_group_rtrn
7903  **
7904  ** @param const xcb_xkb_get_compat_map_reply_t *R
7905  ** @returns xcb_xkb_mod_def_t *
7906  **
7907  *****************************************************************************/
7908 
7909 xcb_xkb_mod_def_t *
7910 xcb_xkb_get_compat_map_group_rtrn (const xcb_xkb_get_compat_map_reply_t *R  /**< */)
7911 {
7912     xcb_generic_iterator_t prev = xcb_xkb_sym_interpret_end(xcb_xkb_get_compat_map_si_rtrn_iterator(R));
7913     return (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index) + 0);
7914 }
7915 
7916 
7917 /*****************************************************************************
7918  **
7919  ** int xcb_xkb_get_compat_map_group_rtrn_length
7920  **
7921  ** @param const xcb_xkb_get_compat_map_reply_t *R
7922  ** @returns int
7923  **
7924  *****************************************************************************/
7925 
7926 int
7927 xcb_xkb_get_compat_map_group_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R  /**< */)
7928 {
7929     return xcb_popcount(R->groupsRtrn);
7930 }
7931 
7932 
7933 /*****************************************************************************
7934  **
7935  ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_compat_map_group_rtrn_iterator
7936  **
7937  ** @param const xcb_xkb_get_compat_map_reply_t *R
7938  ** @returns xcb_xkb_mod_def_iterator_t
7939  **
7940  *****************************************************************************/
7941 
7942 xcb_xkb_mod_def_iterator_t
7943 xcb_xkb_get_compat_map_group_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R  /**< */)
7944 {
7945     xcb_xkb_mod_def_iterator_t i;
7946     xcb_generic_iterator_t prev = xcb_xkb_sym_interpret_end(xcb_xkb_get_compat_map_si_rtrn_iterator(R));
7947     i.data = (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index));
7948     i.rem = xcb_popcount(R->groupsRtrn);
7949     i.index = (char *) i.data - (char *) R;
7950     return i;
7951 }
7952 
7953 
7954 /*****************************************************************************
7955  **
7956  ** xcb_xkb_get_compat_map_reply_t * xcb_xkb_get_compat_map_reply
7957  **
7958  ** @param xcb_connection_t                 *c
7959  ** @param xcb_xkb_get_compat_map_cookie_t   cookie
7960  ** @param xcb_generic_error_t             **e
7961  ** @returns xcb_xkb_get_compat_map_reply_t *
7962  **
7963  *****************************************************************************/
7964 
7965 xcb_xkb_get_compat_map_reply_t *
7966 xcb_xkb_get_compat_map_reply (xcb_connection_t                 *c  /**< */,
7967                               xcb_xkb_get_compat_map_cookie_t   cookie  /**< */,
7968                               xcb_generic_error_t             **e  /**< */)
7969 {
7970     return (xcb_xkb_get_compat_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7971 }
7972 
7973 int
7974 xcb_xkb_set_compat_map_sizeof (const void  *_buffer  /**< */)
7975 {
7976     char *xcb_tmp = (char *)_buffer;
7977     const xcb_xkb_set_compat_map_request_t *_aux = (xcb_xkb_set_compat_map_request_t *)_buffer;
7978     unsigned int xcb_buffer_len = 0;
7979     unsigned int xcb_block_len = 0;
7980     unsigned int xcb_pad = 0;
7981     unsigned int xcb_align_to = 0;
7982 
7983 
7984     xcb_block_len += sizeof(xcb_xkb_set_compat_map_request_t);
7985     xcb_tmp += xcb_block_len;
7986     xcb_buffer_len += xcb_block_len;
7987     xcb_block_len = 0;
7988     /* si */
7989     xcb_block_len += _aux->nSI * sizeof(xcb_xkb_sym_interpret_t);
7990     xcb_tmp += xcb_block_len;
7991     xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
7992     /* insert padding */
7993     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7994     xcb_buffer_len += xcb_block_len + xcb_pad;
7995     if (0 != xcb_pad) {
7996         xcb_tmp += xcb_pad;
7997         xcb_pad = 0;
7998     }
7999     xcb_block_len = 0;
8000     /* groupMaps */
8001     xcb_block_len += xcb_popcount(_aux->groups) * sizeof(xcb_xkb_mod_def_t);
8002     xcb_tmp += xcb_block_len;
8003     xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
8004     /* insert padding */
8005     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8006     xcb_buffer_len += xcb_block_len + xcb_pad;
8007     if (0 != xcb_pad) {
8008         xcb_tmp += xcb_pad;
8009         xcb_pad = 0;
8010     }
8011     xcb_block_len = 0;
8012 
8013     return xcb_buffer_len;
8014 }
8015 
8016 
8017 /*****************************************************************************
8018  **
8019  ** xcb_void_cookie_t xcb_xkb_set_compat_map_checked
8020  **
8021  ** @param xcb_connection_t              *c
8022  ** @param xcb_xkb_device_spec_t          deviceSpec
8023  ** @param uint8_t                        recomputeActions
8024  ** @param uint8_t                        truncateSI
8025  ** @param uint8_t                        groups
8026  ** @param uint16_t                       firstSI
8027  ** @param uint16_t                       nSI
8028  ** @param const xcb_xkb_sym_interpret_t *si
8029  ** @param const xcb_xkb_mod_def_t       *groupMaps
8030  ** @returns xcb_void_cookie_t
8031  **
8032  *****************************************************************************/
8033 
8034 xcb_void_cookie_t
8035 xcb_xkb_set_compat_map_checked (xcb_connection_t              *c  /**< */,
8036                                 xcb_xkb_device_spec_t          deviceSpec  /**< */,
8037                                 uint8_t                        recomputeActions  /**< */,
8038                                 uint8_t                        truncateSI  /**< */,
8039                                 uint8_t                        groups  /**< */,
8040                                 uint16_t                       firstSI  /**< */,
8041                                 uint16_t                       nSI  /**< */,
8042                                 const xcb_xkb_sym_interpret_t *si  /**< */,
8043                                 const xcb_xkb_mod_def_t       *groupMaps  /**< */)
8044 {
8045     static const xcb_protocol_request_t xcb_req = {
8046         /* count */ 6,
8047         /* ext */ &xcb_xkb_id,
8048         /* opcode */ XCB_XKB_SET_COMPAT_MAP,
8049         /* isvoid */ 1
8050     };
8051 
8052     struct iovec xcb_parts[8];
8053     xcb_void_cookie_t xcb_ret;
8054     xcb_xkb_set_compat_map_request_t xcb_out;
8055 
8056     xcb_out.deviceSpec = deviceSpec;
8057     xcb_out.pad0 = 0;
8058     xcb_out.recomputeActions = recomputeActions;
8059     xcb_out.truncateSI = truncateSI;
8060     xcb_out.groups = groups;
8061     xcb_out.firstSI = firstSI;
8062     xcb_out.nSI = nSI;
8063     memset(xcb_out.pad1, 0, 2);
8064 
8065     xcb_parts[2].iov_base = (char *) &xcb_out;
8066     xcb_parts[2].iov_len = sizeof(xcb_out);
8067     xcb_parts[3].iov_base = 0;
8068     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8069     /* xcb_xkb_sym_interpret_t si */
8070     xcb_parts[4].iov_base = (char *) si;
8071     xcb_parts[4].iov_len = nSI * sizeof(xcb_xkb_sym_interpret_t);
8072     xcb_parts[5].iov_base = 0;
8073     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8074     /* xcb_xkb_mod_def_t groupMaps */
8075     xcb_parts[6].iov_base = (char *) groupMaps;
8076     xcb_parts[6].iov_len = xcb_popcount(groups) * sizeof(xcb_xkb_mod_def_t);
8077     xcb_parts[7].iov_base = 0;
8078     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
8079 
8080     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8081     return xcb_ret;
8082 }
8083 
8084 
8085 /*****************************************************************************
8086  **
8087  ** xcb_void_cookie_t xcb_xkb_set_compat_map
8088  **
8089  ** @param xcb_connection_t              *c
8090  ** @param xcb_xkb_device_spec_t          deviceSpec
8091  ** @param uint8_t                        recomputeActions
8092  ** @param uint8_t                        truncateSI
8093  ** @param uint8_t                        groups
8094  ** @param uint16_t                       firstSI
8095  ** @param uint16_t                       nSI
8096  ** @param const xcb_xkb_sym_interpret_t *si
8097  ** @param const xcb_xkb_mod_def_t       *groupMaps
8098  ** @returns xcb_void_cookie_t
8099  **
8100  *****************************************************************************/
8101 
8102 xcb_void_cookie_t
8103 xcb_xkb_set_compat_map (xcb_connection_t              *c  /**< */,
8104                         xcb_xkb_device_spec_t          deviceSpec  /**< */,
8105                         uint8_t                        recomputeActions  /**< */,
8106                         uint8_t                        truncateSI  /**< */,
8107                         uint8_t                        groups  /**< */,
8108                         uint16_t                       firstSI  /**< */,
8109                         uint16_t                       nSI  /**< */,
8110                         const xcb_xkb_sym_interpret_t *si  /**< */,
8111                         const xcb_xkb_mod_def_t       *groupMaps  /**< */)
8112 {
8113     static const xcb_protocol_request_t xcb_req = {
8114         /* count */ 6,
8115         /* ext */ &xcb_xkb_id,
8116         /* opcode */ XCB_XKB_SET_COMPAT_MAP,
8117         /* isvoid */ 1
8118     };
8119 
8120     struct iovec xcb_parts[8];
8121     xcb_void_cookie_t xcb_ret;
8122     xcb_xkb_set_compat_map_request_t xcb_out;
8123 
8124     xcb_out.deviceSpec = deviceSpec;
8125     xcb_out.pad0 = 0;
8126     xcb_out.recomputeActions = recomputeActions;
8127     xcb_out.truncateSI = truncateSI;
8128     xcb_out.groups = groups;
8129     xcb_out.firstSI = firstSI;
8130     xcb_out.nSI = nSI;
8131     memset(xcb_out.pad1, 0, 2);
8132 
8133     xcb_parts[2].iov_base = (char *) &xcb_out;
8134     xcb_parts[2].iov_len = sizeof(xcb_out);
8135     xcb_parts[3].iov_base = 0;
8136     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8137     /* xcb_xkb_sym_interpret_t si */
8138     xcb_parts[4].iov_base = (char *) si;
8139     xcb_parts[4].iov_len = nSI * sizeof(xcb_xkb_sym_interpret_t);
8140     xcb_parts[5].iov_base = 0;
8141     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8142     /* xcb_xkb_mod_def_t groupMaps */
8143     xcb_parts[6].iov_base = (char *) groupMaps;
8144     xcb_parts[6].iov_len = xcb_popcount(groups) * sizeof(xcb_xkb_mod_def_t);
8145     xcb_parts[7].iov_base = 0;
8146     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
8147 
8148     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8149     return xcb_ret;
8150 }
8151 
8152 
8153 /*****************************************************************************
8154  **
8155  ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state
8156  **
8157  ** @param xcb_connection_t      *c
8158  ** @param xcb_xkb_device_spec_t  deviceSpec
8159  ** @returns xcb_xkb_get_indicator_state_cookie_t
8160  **
8161  *****************************************************************************/
8162 
8163 xcb_xkb_get_indicator_state_cookie_t
8164 xcb_xkb_get_indicator_state (xcb_connection_t      *c  /**< */,
8165                              xcb_xkb_device_spec_t  deviceSpec  /**< */)
8166 {
8167     static const xcb_protocol_request_t xcb_req = {
8168         /* count */ 2,
8169         /* ext */ &xcb_xkb_id,
8170         /* opcode */ XCB_XKB_GET_INDICATOR_STATE,
8171         /* isvoid */ 0
8172     };
8173 
8174     struct iovec xcb_parts[4];
8175     xcb_xkb_get_indicator_state_cookie_t xcb_ret;
8176     xcb_xkb_get_indicator_state_request_t xcb_out;
8177 
8178     xcb_out.deviceSpec = deviceSpec;
8179     memset(xcb_out.pad0, 0, 2);
8180 
8181     xcb_parts[2].iov_base = (char *) &xcb_out;
8182     xcb_parts[2].iov_len = sizeof(xcb_out);
8183     xcb_parts[3].iov_base = 0;
8184     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8185 
8186     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8187     return xcb_ret;
8188 }
8189 
8190 
8191 /*****************************************************************************
8192  **
8193  ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state_unchecked
8194  **
8195  ** @param xcb_connection_t      *c
8196  ** @param xcb_xkb_device_spec_t  deviceSpec
8197  ** @returns xcb_xkb_get_indicator_state_cookie_t
8198  **
8199  *****************************************************************************/
8200 
8201 xcb_xkb_get_indicator_state_cookie_t
8202 xcb_xkb_get_indicator_state_unchecked (xcb_connection_t      *c  /**< */,
8203                                        xcb_xkb_device_spec_t  deviceSpec  /**< */)
8204 {
8205     static const xcb_protocol_request_t xcb_req = {
8206         /* count */ 2,
8207         /* ext */ &xcb_xkb_id,
8208         /* opcode */ XCB_XKB_GET_INDICATOR_STATE,
8209         /* isvoid */ 0
8210     };
8211 
8212     struct iovec xcb_parts[4];
8213     xcb_xkb_get_indicator_state_cookie_t xcb_ret;
8214     xcb_xkb_get_indicator_state_request_t xcb_out;
8215 
8216     xcb_out.deviceSpec = deviceSpec;
8217     memset(xcb_out.pad0, 0, 2);
8218 
8219     xcb_parts[2].iov_base = (char *) &xcb_out;
8220     xcb_parts[2].iov_len = sizeof(xcb_out);
8221     xcb_parts[3].iov_base = 0;
8222     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8223 
8224     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8225     return xcb_ret;
8226 }
8227 
8228 
8229 /*****************************************************************************
8230  **
8231  ** xcb_xkb_get_indicator_state_reply_t * xcb_xkb_get_indicator_state_reply
8232  **
8233  ** @param xcb_connection_t                      *c
8234  ** @param xcb_xkb_get_indicator_state_cookie_t   cookie
8235  ** @param xcb_generic_error_t                  **e
8236  ** @returns xcb_xkb_get_indicator_state_reply_t *
8237  **
8238  *****************************************************************************/
8239 
8240 xcb_xkb_get_indicator_state_reply_t *
8241 xcb_xkb_get_indicator_state_reply (xcb_connection_t                      *c  /**< */,
8242                                    xcb_xkb_get_indicator_state_cookie_t   cookie  /**< */,
8243                                    xcb_generic_error_t                  **e  /**< */)
8244 {
8245     return (xcb_xkb_get_indicator_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8246 }
8247 
8248 int
8249 xcb_xkb_get_indicator_map_sizeof (const void  *_buffer  /**< */)
8250 {
8251     char *xcb_tmp = (char *)_buffer;
8252     const xcb_xkb_get_indicator_map_reply_t *_aux = (xcb_xkb_get_indicator_map_reply_t *)_buffer;
8253     unsigned int xcb_buffer_len = 0;
8254     unsigned int xcb_block_len = 0;
8255     unsigned int xcb_pad = 0;
8256     unsigned int xcb_align_to = 0;
8257 
8258 
8259     xcb_block_len += sizeof(xcb_xkb_get_indicator_map_reply_t);
8260     xcb_tmp += xcb_block_len;
8261     xcb_buffer_len += xcb_block_len;
8262     xcb_block_len = 0;
8263     /* maps */
8264     xcb_block_len += xcb_popcount(_aux->which) * sizeof(xcb_xkb_indicator_map_t);
8265     xcb_tmp += xcb_block_len;
8266     xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
8267     /* insert padding */
8268     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8269     xcb_buffer_len += xcb_block_len + xcb_pad;
8270     if (0 != xcb_pad) {
8271         xcb_tmp += xcb_pad;
8272         xcb_pad = 0;
8273     }
8274     xcb_block_len = 0;
8275 
8276     return xcb_buffer_len;
8277 }
8278 
8279 
8280 /*****************************************************************************
8281  **
8282  ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map
8283  **
8284  ** @param xcb_connection_t      *c
8285  ** @param xcb_xkb_device_spec_t  deviceSpec
8286  ** @param uint32_t               which
8287  ** @returns xcb_xkb_get_indicator_map_cookie_t
8288  **
8289  *****************************************************************************/
8290 
8291 xcb_xkb_get_indicator_map_cookie_t
8292 xcb_xkb_get_indicator_map (xcb_connection_t      *c  /**< */,
8293                            xcb_xkb_device_spec_t  deviceSpec  /**< */,
8294                            uint32_t               which  /**< */)
8295 {
8296     static const xcb_protocol_request_t xcb_req = {
8297         /* count */ 2,
8298         /* ext */ &xcb_xkb_id,
8299         /* opcode */ XCB_XKB_GET_INDICATOR_MAP,
8300         /* isvoid */ 0
8301     };
8302 
8303     struct iovec xcb_parts[4];
8304     xcb_xkb_get_indicator_map_cookie_t xcb_ret;
8305     xcb_xkb_get_indicator_map_request_t xcb_out;
8306 
8307     xcb_out.deviceSpec = deviceSpec;
8308     memset(xcb_out.pad0, 0, 2);
8309     xcb_out.which = which;
8310 
8311     xcb_parts[2].iov_base = (char *) &xcb_out;
8312     xcb_parts[2].iov_len = sizeof(xcb_out);
8313     xcb_parts[3].iov_base = 0;
8314     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8315 
8316     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8317     return xcb_ret;
8318 }
8319 
8320 
8321 /*****************************************************************************
8322  **
8323  ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map_unchecked
8324  **
8325  ** @param xcb_connection_t      *c
8326  ** @param xcb_xkb_device_spec_t  deviceSpec
8327  ** @param uint32_t               which
8328  ** @returns xcb_xkb_get_indicator_map_cookie_t
8329  **
8330  *****************************************************************************/
8331 
8332 xcb_xkb_get_indicator_map_cookie_t
8333 xcb_xkb_get_indicator_map_unchecked (xcb_connection_t      *c  /**< */,
8334                                      xcb_xkb_device_spec_t  deviceSpec  /**< */,
8335                                      uint32_t               which  /**< */)
8336 {
8337     static const xcb_protocol_request_t xcb_req = {
8338         /* count */ 2,
8339         /* ext */ &xcb_xkb_id,
8340         /* opcode */ XCB_XKB_GET_INDICATOR_MAP,
8341         /* isvoid */ 0
8342     };
8343 
8344     struct iovec xcb_parts[4];
8345     xcb_xkb_get_indicator_map_cookie_t xcb_ret;
8346     xcb_xkb_get_indicator_map_request_t xcb_out;
8347 
8348     xcb_out.deviceSpec = deviceSpec;
8349     memset(xcb_out.pad0, 0, 2);
8350     xcb_out.which = which;
8351 
8352     xcb_parts[2].iov_base = (char *) &xcb_out;
8353     xcb_parts[2].iov_len = sizeof(xcb_out);
8354     xcb_parts[3].iov_base = 0;
8355     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8356 
8357     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8358     return xcb_ret;
8359 }
8360 
8361 
8362 /*****************************************************************************
8363  **
8364  ** xcb_xkb_indicator_map_t * xcb_xkb_get_indicator_map_maps
8365  **
8366  ** @param const xcb_xkb_get_indicator_map_reply_t *R
8367  ** @returns xcb_xkb_indicator_map_t *
8368  **
8369  *****************************************************************************/
8370 
8371 xcb_xkb_indicator_map_t *
8372 xcb_xkb_get_indicator_map_maps (const xcb_xkb_get_indicator_map_reply_t *R  /**< */)
8373 {
8374     return (xcb_xkb_indicator_map_t *) (R + 1);
8375 }
8376 
8377 
8378 /*****************************************************************************
8379  **
8380  ** int xcb_xkb_get_indicator_map_maps_length
8381  **
8382  ** @param const xcb_xkb_get_indicator_map_reply_t *R
8383  ** @returns int
8384  **
8385  *****************************************************************************/
8386 
8387 int
8388 xcb_xkb_get_indicator_map_maps_length (const xcb_xkb_get_indicator_map_reply_t *R  /**< */)
8389 {
8390     return xcb_popcount(R->which);
8391 }
8392 
8393 
8394 /*****************************************************************************
8395  **
8396  ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_indicator_map_maps_iterator
8397  **
8398  ** @param const xcb_xkb_get_indicator_map_reply_t *R
8399  ** @returns xcb_xkb_indicator_map_iterator_t
8400  **
8401  *****************************************************************************/
8402 
8403 xcb_xkb_indicator_map_iterator_t
8404 xcb_xkb_get_indicator_map_maps_iterator (const xcb_xkb_get_indicator_map_reply_t *R  /**< */)
8405 {
8406     xcb_xkb_indicator_map_iterator_t i;
8407     i.data = (xcb_xkb_indicator_map_t *) (R + 1);
8408     i.rem = xcb_popcount(R->which);
8409     i.index = (char *) i.data - (char *) R;
8410     return i;
8411 }
8412 
8413 
8414 /*****************************************************************************
8415  **
8416  ** xcb_xkb_get_indicator_map_reply_t * xcb_xkb_get_indicator_map_reply
8417  **
8418  ** @param xcb_connection_t                    *c
8419  ** @param xcb_xkb_get_indicator_map_cookie_t   cookie
8420  ** @param xcb_generic_error_t                **e
8421  ** @returns xcb_xkb_get_indicator_map_reply_t *
8422  **
8423  *****************************************************************************/
8424 
8425 xcb_xkb_get_indicator_map_reply_t *
8426 xcb_xkb_get_indicator_map_reply (xcb_connection_t                    *c  /**< */,
8427                                  xcb_xkb_get_indicator_map_cookie_t   cookie  /**< */,
8428                                  xcb_generic_error_t                **e  /**< */)
8429 {
8430     return (xcb_xkb_get_indicator_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8431 }
8432 
8433 int
8434 xcb_xkb_set_indicator_map_sizeof (const void  *_buffer  /**< */)
8435 {
8436     char *xcb_tmp = (char *)_buffer;
8437     const xcb_xkb_set_indicator_map_request_t *_aux = (xcb_xkb_set_indicator_map_request_t *)_buffer;
8438     unsigned int xcb_buffer_len = 0;
8439     unsigned int xcb_block_len = 0;
8440     unsigned int xcb_pad = 0;
8441     unsigned int xcb_align_to = 0;
8442 
8443 
8444     xcb_block_len += sizeof(xcb_xkb_set_indicator_map_request_t);
8445     xcb_tmp += xcb_block_len;
8446     xcb_buffer_len += xcb_block_len;
8447     xcb_block_len = 0;
8448     /* maps */
8449     xcb_block_len += xcb_popcount(_aux->which) * sizeof(xcb_xkb_indicator_map_t);
8450     xcb_tmp += xcb_block_len;
8451     xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
8452     /* insert padding */
8453     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8454     xcb_buffer_len += xcb_block_len + xcb_pad;
8455     if (0 != xcb_pad) {
8456         xcb_tmp += xcb_pad;
8457         xcb_pad = 0;
8458     }
8459     xcb_block_len = 0;
8460 
8461     return xcb_buffer_len;
8462 }
8463 
8464 
8465 /*****************************************************************************
8466  **
8467  ** xcb_void_cookie_t xcb_xkb_set_indicator_map_checked
8468  **
8469  ** @param xcb_connection_t              *c
8470  ** @param xcb_xkb_device_spec_t          deviceSpec
8471  ** @param uint32_t                       which
8472  ** @param const xcb_xkb_indicator_map_t *maps
8473  ** @returns xcb_void_cookie_t
8474  **
8475  *****************************************************************************/
8476 
8477 xcb_void_cookie_t
8478 xcb_xkb_set_indicator_map_checked (xcb_connection_t              *c  /**< */,
8479                                    xcb_xkb_device_spec_t          deviceSpec  /**< */,
8480                                    uint32_t                       which  /**< */,
8481                                    const xcb_xkb_indicator_map_t *maps  /**< */)
8482 {
8483     static const xcb_protocol_request_t xcb_req = {
8484         /* count */ 4,
8485         /* ext */ &xcb_xkb_id,
8486         /* opcode */ XCB_XKB_SET_INDICATOR_MAP,
8487         /* isvoid */ 1
8488     };
8489 
8490     struct iovec xcb_parts[6];
8491     xcb_void_cookie_t xcb_ret;
8492     xcb_xkb_set_indicator_map_request_t xcb_out;
8493 
8494     xcb_out.deviceSpec = deviceSpec;
8495     memset(xcb_out.pad0, 0, 2);
8496     xcb_out.which = which;
8497 
8498     xcb_parts[2].iov_base = (char *) &xcb_out;
8499     xcb_parts[2].iov_len = sizeof(xcb_out);
8500     xcb_parts[3].iov_base = 0;
8501     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8502     /* xcb_xkb_indicator_map_t maps */
8503     xcb_parts[4].iov_base = (char *) maps;
8504     xcb_parts[4].iov_len = xcb_popcount(which) * sizeof(xcb_xkb_indicator_map_t);
8505     xcb_parts[5].iov_base = 0;
8506     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8507 
8508     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8509     return xcb_ret;
8510 }
8511 
8512 
8513 /*****************************************************************************
8514  **
8515  ** xcb_void_cookie_t xcb_xkb_set_indicator_map
8516  **
8517  ** @param xcb_connection_t              *c
8518  ** @param xcb_xkb_device_spec_t          deviceSpec
8519  ** @param uint32_t                       which
8520  ** @param const xcb_xkb_indicator_map_t *maps
8521  ** @returns xcb_void_cookie_t
8522  **
8523  *****************************************************************************/
8524 
8525 xcb_void_cookie_t
8526 xcb_xkb_set_indicator_map (xcb_connection_t              *c  /**< */,
8527                            xcb_xkb_device_spec_t          deviceSpec  /**< */,
8528                            uint32_t                       which  /**< */,
8529                            const xcb_xkb_indicator_map_t *maps  /**< */)
8530 {
8531     static const xcb_protocol_request_t xcb_req = {
8532         /* count */ 4,
8533         /* ext */ &xcb_xkb_id,
8534         /* opcode */ XCB_XKB_SET_INDICATOR_MAP,
8535         /* isvoid */ 1
8536     };
8537 
8538     struct iovec xcb_parts[6];
8539     xcb_void_cookie_t xcb_ret;
8540     xcb_xkb_set_indicator_map_request_t xcb_out;
8541 
8542     xcb_out.deviceSpec = deviceSpec;
8543     memset(xcb_out.pad0, 0, 2);
8544     xcb_out.which = which;
8545 
8546     xcb_parts[2].iov_base = (char *) &xcb_out;
8547     xcb_parts[2].iov_len = sizeof(xcb_out);
8548     xcb_parts[3].iov_base = 0;
8549     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8550     /* xcb_xkb_indicator_map_t maps */
8551     xcb_parts[4].iov_base = (char *) maps;
8552     xcb_parts[4].iov_len = xcb_popcount(which) * sizeof(xcb_xkb_indicator_map_t);
8553     xcb_parts[5].iov_base = 0;
8554     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
8555 
8556     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8557     return xcb_ret;
8558 }
8559 
8560 
8561 /*****************************************************************************
8562  **
8563  ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator
8564  **
8565  ** @param xcb_connection_t         *c
8566  ** @param xcb_xkb_device_spec_t     deviceSpec
8567  ** @param xcb_xkb_led_class_spec_t  ledClass
8568  ** @param xcb_xkb_id_spec_t         ledID
8569  ** @param xcb_atom_t                indicator
8570  ** @returns xcb_xkb_get_named_indicator_cookie_t
8571  **
8572  *****************************************************************************/
8573 
8574 xcb_xkb_get_named_indicator_cookie_t
8575 xcb_xkb_get_named_indicator (xcb_connection_t         *c  /**< */,
8576                              xcb_xkb_device_spec_t     deviceSpec  /**< */,
8577                              xcb_xkb_led_class_spec_t  ledClass  /**< */,
8578                              xcb_xkb_id_spec_t         ledID  /**< */,
8579                              xcb_atom_t                indicator  /**< */)
8580 {
8581     static const xcb_protocol_request_t xcb_req = {
8582         /* count */ 2,
8583         /* ext */ &xcb_xkb_id,
8584         /* opcode */ XCB_XKB_GET_NAMED_INDICATOR,
8585         /* isvoid */ 0
8586     };
8587 
8588     struct iovec xcb_parts[4];
8589     xcb_xkb_get_named_indicator_cookie_t xcb_ret;
8590     xcb_xkb_get_named_indicator_request_t xcb_out;
8591 
8592     xcb_out.deviceSpec = deviceSpec;
8593     xcb_out.ledClass = ledClass;
8594     xcb_out.ledID = ledID;
8595     memset(xcb_out.pad0, 0, 2);
8596     xcb_out.indicator = indicator;
8597 
8598     xcb_parts[2].iov_base = (char *) &xcb_out;
8599     xcb_parts[2].iov_len = sizeof(xcb_out);
8600     xcb_parts[3].iov_base = 0;
8601     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8602 
8603     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8604     return xcb_ret;
8605 }
8606 
8607 
8608 /*****************************************************************************
8609  **
8610  ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator_unchecked
8611  **
8612  ** @param xcb_connection_t         *c
8613  ** @param xcb_xkb_device_spec_t     deviceSpec
8614  ** @param xcb_xkb_led_class_spec_t  ledClass
8615  ** @param xcb_xkb_id_spec_t         ledID
8616  ** @param xcb_atom_t                indicator
8617  ** @returns xcb_xkb_get_named_indicator_cookie_t
8618  **
8619  *****************************************************************************/
8620 
8621 xcb_xkb_get_named_indicator_cookie_t
8622 xcb_xkb_get_named_indicator_unchecked (xcb_connection_t         *c  /**< */,
8623                                        xcb_xkb_device_spec_t     deviceSpec  /**< */,
8624                                        xcb_xkb_led_class_spec_t  ledClass  /**< */,
8625                                        xcb_xkb_id_spec_t         ledID  /**< */,
8626                                        xcb_atom_t                indicator  /**< */)
8627 {
8628     static const xcb_protocol_request_t xcb_req = {
8629         /* count */ 2,
8630         /* ext */ &xcb_xkb_id,
8631         /* opcode */ XCB_XKB_GET_NAMED_INDICATOR,
8632         /* isvoid */ 0
8633     };
8634 
8635     struct iovec xcb_parts[4];
8636     xcb_xkb_get_named_indicator_cookie_t xcb_ret;
8637     xcb_xkb_get_named_indicator_request_t xcb_out;
8638 
8639     xcb_out.deviceSpec = deviceSpec;
8640     xcb_out.ledClass = ledClass;
8641     xcb_out.ledID = ledID;
8642     memset(xcb_out.pad0, 0, 2);
8643     xcb_out.indicator = indicator;
8644 
8645     xcb_parts[2].iov_base = (char *) &xcb_out;
8646     xcb_parts[2].iov_len = sizeof(xcb_out);
8647     xcb_parts[3].iov_base = 0;
8648     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8649 
8650     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8651     return xcb_ret;
8652 }
8653 
8654 
8655 /*****************************************************************************
8656  **
8657  ** xcb_xkb_get_named_indicator_reply_t * xcb_xkb_get_named_indicator_reply
8658  **
8659  ** @param xcb_connection_t                      *c
8660  ** @param xcb_xkb_get_named_indicator_cookie_t   cookie
8661  ** @param xcb_generic_error_t                  **e
8662  ** @returns xcb_xkb_get_named_indicator_reply_t *
8663  **
8664  *****************************************************************************/
8665 
8666 xcb_xkb_get_named_indicator_reply_t *
8667 xcb_xkb_get_named_indicator_reply (xcb_connection_t                      *c  /**< */,
8668                                    xcb_xkb_get_named_indicator_cookie_t   cookie  /**< */,
8669                                    xcb_generic_error_t                  **e  /**< */)
8670 {
8671     return (xcb_xkb_get_named_indicator_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8672 }
8673 
8674 
8675 /*****************************************************************************
8676  **
8677  ** xcb_void_cookie_t xcb_xkb_set_named_indicator_checked
8678  **
8679  ** @param xcb_connection_t         *c
8680  ** @param xcb_xkb_device_spec_t     deviceSpec
8681  ** @param xcb_xkb_led_class_spec_t  ledClass
8682  ** @param xcb_xkb_id_spec_t         ledID
8683  ** @param xcb_atom_t                indicator
8684  ** @param uint8_t                   setState
8685  ** @param uint8_t                   on
8686  ** @param uint8_t                   setMap
8687  ** @param uint8_t                   createMap
8688  ** @param uint8_t                   map_flags
8689  ** @param uint8_t                   map_whichGroups
8690  ** @param uint8_t                   map_groups
8691  ** @param uint8_t                   map_whichMods
8692  ** @param uint8_t                   map_realMods
8693  ** @param uint16_t                  map_vmods
8694  ** @param uint32_t                  map_ctrls
8695  ** @returns xcb_void_cookie_t
8696  **
8697  *****************************************************************************/
8698 
8699 xcb_void_cookie_t
8700 xcb_xkb_set_named_indicator_checked (xcb_connection_t         *c  /**< */,
8701                                      xcb_xkb_device_spec_t     deviceSpec  /**< */,
8702                                      xcb_xkb_led_class_spec_t  ledClass  /**< */,
8703                                      xcb_xkb_id_spec_t         ledID  /**< */,
8704                                      xcb_atom_t                indicator  /**< */,
8705                                      uint8_t                   setState  /**< */,
8706                                      uint8_t                   on  /**< */,
8707                                      uint8_t                   setMap  /**< */,
8708                                      uint8_t                   createMap  /**< */,
8709                                      uint8_t                   map_flags  /**< */,
8710                                      uint8_t                   map_whichGroups  /**< */,
8711                                      uint8_t                   map_groups  /**< */,
8712                                      uint8_t                   map_whichMods  /**< */,
8713                                      uint8_t                   map_realMods  /**< */,
8714                                      uint16_t                  map_vmods  /**< */,
8715                                      uint32_t                  map_ctrls  /**< */)
8716 {
8717     static const xcb_protocol_request_t xcb_req = {
8718         /* count */ 2,
8719         /* ext */ &xcb_xkb_id,
8720         /* opcode */ XCB_XKB_SET_NAMED_INDICATOR,
8721         /* isvoid */ 1
8722     };
8723 
8724     struct iovec xcb_parts[4];
8725     xcb_void_cookie_t xcb_ret;
8726     xcb_xkb_set_named_indicator_request_t xcb_out;
8727 
8728     xcb_out.deviceSpec = deviceSpec;
8729     xcb_out.ledClass = ledClass;
8730     xcb_out.ledID = ledID;
8731     memset(xcb_out.pad0, 0, 2);
8732     xcb_out.indicator = indicator;
8733     xcb_out.setState = setState;
8734     xcb_out.on = on;
8735     xcb_out.setMap = setMap;
8736     xcb_out.createMap = createMap;
8737     xcb_out.pad1 = 0;
8738     xcb_out.map_flags = map_flags;
8739     xcb_out.map_whichGroups = map_whichGroups;
8740     xcb_out.map_groups = map_groups;
8741     xcb_out.map_whichMods = map_whichMods;
8742     xcb_out.map_realMods = map_realMods;
8743     xcb_out.map_vmods = map_vmods;
8744     xcb_out.map_ctrls = map_ctrls;
8745 
8746     xcb_parts[2].iov_base = (char *) &xcb_out;
8747     xcb_parts[2].iov_len = sizeof(xcb_out);
8748     xcb_parts[3].iov_base = 0;
8749     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8750 
8751     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8752     return xcb_ret;
8753 }
8754 
8755 
8756 /*****************************************************************************
8757  **
8758  ** xcb_void_cookie_t xcb_xkb_set_named_indicator
8759  **
8760  ** @param xcb_connection_t         *c
8761  ** @param xcb_xkb_device_spec_t     deviceSpec
8762  ** @param xcb_xkb_led_class_spec_t  ledClass
8763  ** @param xcb_xkb_id_spec_t         ledID
8764  ** @param xcb_atom_t                indicator
8765  ** @param uint8_t                   setState
8766  ** @param uint8_t                   on
8767  ** @param uint8_t                   setMap
8768  ** @param uint8_t                   createMap
8769  ** @param uint8_t                   map_flags
8770  ** @param uint8_t                   map_whichGroups
8771  ** @param uint8_t                   map_groups
8772  ** @param uint8_t                   map_whichMods
8773  ** @param uint8_t                   map_realMods
8774  ** @param uint16_t                  map_vmods
8775  ** @param uint32_t                  map_ctrls
8776  ** @returns xcb_void_cookie_t
8777  **
8778  *****************************************************************************/
8779 
8780 xcb_void_cookie_t
8781 xcb_xkb_set_named_indicator (xcb_connection_t         *c  /**< */,
8782                              xcb_xkb_device_spec_t     deviceSpec  /**< */,
8783                              xcb_xkb_led_class_spec_t  ledClass  /**< */,
8784                              xcb_xkb_id_spec_t         ledID  /**< */,
8785                              xcb_atom_t                indicator  /**< */,
8786                              uint8_t                   setState  /**< */,
8787                              uint8_t                   on  /**< */,
8788                              uint8_t                   setMap  /**< */,
8789                              uint8_t                   createMap  /**< */,
8790                              uint8_t                   map_flags  /**< */,
8791                              uint8_t                   map_whichGroups  /**< */,
8792                              uint8_t                   map_groups  /**< */,
8793                              uint8_t                   map_whichMods  /**< */,
8794                              uint8_t                   map_realMods  /**< */,
8795                              uint16_t                  map_vmods  /**< */,
8796                              uint32_t                  map_ctrls  /**< */)
8797 {
8798     static const xcb_protocol_request_t xcb_req = {
8799         /* count */ 2,
8800         /* ext */ &xcb_xkb_id,
8801         /* opcode */ XCB_XKB_SET_NAMED_INDICATOR,
8802         /* isvoid */ 1
8803     };
8804 
8805     struct iovec xcb_parts[4];
8806     xcb_void_cookie_t xcb_ret;
8807     xcb_xkb_set_named_indicator_request_t xcb_out;
8808 
8809     xcb_out.deviceSpec = deviceSpec;
8810     xcb_out.ledClass = ledClass;
8811     xcb_out.ledID = ledID;
8812     memset(xcb_out.pad0, 0, 2);
8813     xcb_out.indicator = indicator;
8814     xcb_out.setState = setState;
8815     xcb_out.on = on;
8816     xcb_out.setMap = setMap;
8817     xcb_out.createMap = createMap;
8818     xcb_out.pad1 = 0;
8819     xcb_out.map_flags = map_flags;
8820     xcb_out.map_whichGroups = map_whichGroups;
8821     xcb_out.map_groups = map_groups;
8822     xcb_out.map_whichMods = map_whichMods;
8823     xcb_out.map_realMods = map_realMods;
8824     xcb_out.map_vmods = map_vmods;
8825     xcb_out.map_ctrls = map_ctrls;
8826 
8827     xcb_parts[2].iov_base = (char *) &xcb_out;
8828     xcb_parts[2].iov_len = sizeof(xcb_out);
8829     xcb_parts[3].iov_base = 0;
8830     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8831 
8832     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8833     return xcb_ret;
8834 }
8835 
8836 
8837 /*****************************************************************************
8838  **
8839  ** xcb_atom_t * xcb_xkb_get_names_value_list_type_names
8840  **
8841  ** @param const xcb_xkb_get_names_value_list_t *S
8842  ** @returns xcb_atom_t *
8843  **
8844  *****************************************************************************/
8845 
8846 xcb_atom_t *
8847 xcb_xkb_get_names_value_list_type_names (const xcb_xkb_get_names_value_list_t *S  /**< */)
8848 {
8849     return /* valueList */ S->typeNames;
8850 }
8851 
8852 
8853 /*****************************************************************************
8854  **
8855  ** int xcb_xkb_get_names_value_list_type_names_length
8856  **
8857  ** @param const xcb_xkb_get_names_value_list_t *R
8858  ** @returns int
8859  **
8860  *****************************************************************************/
8861 
8862 int
8863 xcb_xkb_get_names_value_list_type_names_length (const xcb_xkb_get_names_reply_t *R  /**< */,
8864                                                 const xcb_xkb_get_names_value_list_t *S  /**< */)
8865 {
8866     return R->nTypes;
8867 }
8868 
8869 
8870 /*****************************************************************************
8871  **
8872  ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_type_names_end
8873  **
8874  ** @param const xcb_xkb_get_names_value_list_t *R
8875  ** @returns xcb_generic_iterator_t
8876  **
8877  *****************************************************************************/
8878 
8879 xcb_generic_iterator_t
8880 xcb_xkb_get_names_value_list_type_names_end (const xcb_xkb_get_names_reply_t *R  /**< */,
8881                                              const xcb_xkb_get_names_value_list_t *S  /**< */)
8882 {
8883     xcb_generic_iterator_t i;
8884     i.data = /* valueList */ S->typeNames + R->nTypes;
8885     i.rem = 0;
8886     i.index = (char *) i.data - (char *) S;
8887     return i;
8888 }
8889 
8890 
8891 /*****************************************************************************
8892  **
8893  ** uint8_t * xcb_xkb_get_names_value_list_n_levels_per_type
8894  **
8895  ** @param const xcb_xkb_get_names_value_list_t *S
8896  ** @returns uint8_t *
8897  **
8898  *****************************************************************************/
8899 
8900 uint8_t *
8901 xcb_xkb_get_names_value_list_n_levels_per_type (const xcb_xkb_get_names_value_list_t *S  /**< */)
8902 {
8903     return /* valueList */ S->nLevelsPerType;
8904 }
8905 
8906 
8907 /*****************************************************************************
8908  **
8909  ** int xcb_xkb_get_names_value_list_n_levels_per_type_length
8910  **
8911  ** @param const xcb_xkb_get_names_value_list_t *R
8912  ** @returns int
8913  **
8914  *****************************************************************************/
8915 
8916 int
8917 xcb_xkb_get_names_value_list_n_levels_per_type_length (const xcb_xkb_get_names_reply_t *R  /**< */,
8918                                                        const xcb_xkb_get_names_value_list_t *S  /**< */)
8919 {
8920     return R->nTypes;
8921 }
8922 
8923 
8924 /*****************************************************************************
8925  **
8926  ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_n_levels_per_type_end
8927  **
8928  ** @param const xcb_xkb_get_names_value_list_t *R
8929  ** @returns xcb_generic_iterator_t
8930  **
8931  *****************************************************************************/
8932 
8933 xcb_generic_iterator_t
8934 xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_reply_t *R  /**< */,
8935                                                     const xcb_xkb_get_names_value_list_t *S  /**< */)
8936 {
8937     xcb_generic_iterator_t i;
8938     i.data = /* valueList */ S->nLevelsPerType + R->nTypes;
8939     i.rem = 0;
8940     i.index = (char *) i.data - (char *) S;
8941     return i;
8942 }
8943 
8944 
8945 /*****************************************************************************
8946  **
8947  ** uint8_t * xcb_xkb_get_names_value_list_alignment_pad
8948  **
8949  ** @param const xcb_xkb_get_names_value_list_t *S
8950  ** @returns uint8_t *
8951  **
8952  *****************************************************************************/
8953 
8954 uint8_t *
8955 xcb_xkb_get_names_value_list_alignment_pad (const xcb_xkb_get_names_value_list_t *S  /**< */)
8956 {
8957     return /* valueList */ S->alignment_pad;
8958 }
8959 
8960 
8961 /*****************************************************************************
8962  **
8963  ** int xcb_xkb_get_names_value_list_alignment_pad_length
8964  **
8965  ** @param const xcb_xkb_get_names_value_list_t *R
8966  ** @returns int
8967  **
8968  *****************************************************************************/
8969 
8970 int
8971 xcb_xkb_get_names_value_list_alignment_pad_length (const xcb_xkb_get_names_reply_t *R  /**< */,
8972                                                    const xcb_xkb_get_names_value_list_t *S  /**< */)
8973 {
8974     return (((R->nTypes + 3) & (~3)) - R->nTypes);
8975 }
8976 
8977 
8978 /*****************************************************************************
8979  **
8980  ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_alignment_pad_end
8981  **
8982  ** @param const xcb_xkb_get_names_value_list_t *R
8983  ** @returns xcb_generic_iterator_t
8984  **
8985  *****************************************************************************/
8986 
8987 xcb_generic_iterator_t
8988 xcb_xkb_get_names_value_list_alignment_pad_end (const xcb_xkb_get_names_reply_t *R  /**< */,
8989                                                 const xcb_xkb_get_names_value_list_t *S  /**< */)
8990 {
8991     xcb_generic_iterator_t i;
8992     i.data = /* valueList */ S->alignment_pad + (((R->nTypes + 3) & (~3)) - R->nTypes);
8993     i.rem = 0;
8994     i.index = (char *) i.data - (char *) S;
8995     return i;
8996 }
8997 
8998 
8999 /*****************************************************************************
9000  **
9001  ** xcb_atom_t * xcb_xkb_get_names_value_list_kt_level_names
9002  **
9003  ** @param const xcb_xkb_get_names_value_list_t *S
9004  ** @returns xcb_atom_t *
9005  **
9006  *****************************************************************************/
9007 
9008 xcb_atom_t *
9009 xcb_xkb_get_names_value_list_kt_level_names (const xcb_xkb_get_names_value_list_t *S  /**< */)
9010 {
9011     return /* valueList */ S->ktLevelNames;
9012 }
9013 
9014 
9015 /*****************************************************************************
9016  **
9017  ** int xcb_xkb_get_names_value_list_kt_level_names_length
9018  **
9019  ** @param const xcb_xkb_get_names_value_list_t *R
9020  ** @returns int
9021  **
9022  *****************************************************************************/
9023 
9024 int
9025 xcb_xkb_get_names_value_list_kt_level_names_length (const xcb_xkb_get_names_reply_t *R  /**< */,
9026                                                     const xcb_xkb_get_names_value_list_t *S  /**< */)
9027 {
9028     return xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
9029 }
9030 
9031 
9032 /*****************************************************************************
9033  **
9034  ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_kt_level_names_end
9035  **
9036  ** @param const xcb_xkb_get_names_value_list_t *R
9037  ** @returns xcb_generic_iterator_t
9038  **
9039  *****************************************************************************/
9040 
9041 xcb_generic_iterator_t
9042 xcb_xkb_get_names_value_list_kt_level_names_end (const xcb_xkb_get_names_reply_t *R  /**< */,
9043                                                  const xcb_xkb_get_names_value_list_t *S  /**< */)
9044 {
9045     xcb_generic_iterator_t i;
9046     i.data = /* valueList */ S->ktLevelNames + xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
9047     i.rem = 0;
9048     i.index = (char *) i.data - (char *) S;
9049     return i;
9050 }
9051 
9052 
9053 /*****************************************************************************
9054  **
9055  ** xcb_atom_t * xcb_xkb_get_names_value_list_indicator_names
9056  **
9057  ** @param const xcb_xkb_get_names_value_list_t *S
9058  ** @returns xcb_atom_t *
9059  **
9060  *****************************************************************************/
9061 
9062 xcb_atom_t *
9063 xcb_xkb_get_names_value_list_indicator_names (const xcb_xkb_get_names_value_list_t *S  /**< */)
9064 {
9065     return /* valueList */ S->indicatorNames;
9066 }
9067 
9068 
9069 /*****************************************************************************
9070  **
9071  ** int xcb_xkb_get_names_value_list_indicator_names_length
9072  **
9073  ** @param const xcb_xkb_get_names_value_list_t *R
9074  ** @returns int
9075  **
9076  *****************************************************************************/
9077 
9078 int
9079 xcb_xkb_get_names_value_list_indicator_names_length (const xcb_xkb_get_names_reply_t *R  /**< */,
9080                                                      const xcb_xkb_get_names_value_list_t *S  /**< */)
9081 {
9082     return xcb_popcount(R->indicators);
9083 }
9084 
9085 
9086 /*****************************************************************************
9087  **
9088  ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_indicator_names_end
9089  **
9090  ** @param const xcb_xkb_get_names_value_list_t *R
9091  ** @returns xcb_generic_iterator_t
9092  **
9093  *****************************************************************************/
9094 
9095 xcb_generic_iterator_t
9096 xcb_xkb_get_names_value_list_indicator_names_end (const xcb_xkb_get_names_reply_t *R  /**< */,
9097                                                   const xcb_xkb_get_names_value_list_t *S  /**< */)
9098 {
9099     xcb_generic_iterator_t i;
9100     i.data = /* valueList */ S->indicatorNames + xcb_popcount(R->indicators);
9101     i.rem = 0;
9102     i.index = (char *) i.data - (char *) S;
9103     return i;
9104 }
9105 
9106 
9107 /*****************************************************************************
9108  **
9109  ** xcb_atom_t * xcb_xkb_get_names_value_list_virtual_mod_names
9110  **
9111  ** @param const xcb_xkb_get_names_value_list_t *S
9112  ** @returns xcb_atom_t *
9113  **
9114  *****************************************************************************/
9115 
9116 xcb_atom_t *
9117 xcb_xkb_get_names_value_list_virtual_mod_names (const xcb_xkb_get_names_value_list_t *S  /**< */)
9118 {
9119     return /* valueList */ S->virtualModNames;
9120 }
9121 
9122 
9123 /*****************************************************************************
9124  **
9125  ** int xcb_xkb_get_names_value_list_virtual_mod_names_length
9126  **
9127  ** @param const xcb_xkb_get_names_value_list_t *R
9128  ** @returns int
9129  **
9130  *****************************************************************************/
9131 
9132 int
9133 xcb_xkb_get_names_value_list_virtual_mod_names_length (const xcb_xkb_get_names_reply_t *R  /**< */,
9134                                                        const xcb_xkb_get_names_value_list_t *S  /**< */)
9135 {
9136     return xcb_popcount(R->virtualMods);
9137 }
9138 
9139 
9140 /*****************************************************************************
9141  **
9142  ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_virtual_mod_names_end
9143  **
9144  ** @param const xcb_xkb_get_names_value_list_t *R
9145  ** @returns xcb_generic_iterator_t
9146  **
9147  *****************************************************************************/
9148 
9149 xcb_generic_iterator_t
9150 xcb_xkb_get_names_value_list_virtual_mod_names_end (const xcb_xkb_get_names_reply_t *R  /**< */,
9151                                                     const xcb_xkb_get_names_value_list_t *S  /**< */)
9152 {
9153     xcb_generic_iterator_t i;
9154     i.data = /* valueList */ S->virtualModNames + xcb_popcount(R->virtualMods);
9155     i.rem = 0;
9156     i.index = (char *) i.data - (char *) S;
9157     return i;
9158 }
9159 
9160 
9161 /*****************************************************************************
9162  **
9163  ** xcb_atom_t * xcb_xkb_get_names_value_list_groups
9164  **
9165  ** @param const xcb_xkb_get_names_value_list_t *S
9166  ** @returns xcb_atom_t *
9167  **
9168  *****************************************************************************/
9169 
9170 xcb_atom_t *
9171 xcb_xkb_get_names_value_list_groups (const xcb_xkb_get_names_value_list_t *S  /**< */)
9172 {
9173     return /* valueList */ S->groups;
9174 }
9175 
9176 
9177 /*****************************************************************************
9178  **
9179  ** int xcb_xkb_get_names_value_list_groups_length
9180  **
9181  ** @param const xcb_xkb_get_names_value_list_t *R
9182  ** @returns int
9183  **
9184  *****************************************************************************/
9185 
9186 int
9187 xcb_xkb_get_names_value_list_groups_length (const xcb_xkb_get_names_reply_t *R  /**< */,
9188                                             const xcb_xkb_get_names_value_list_t *S  /**< */)
9189 {
9190     return xcb_popcount(R->groupNames);
9191 }
9192 
9193 
9194 /*****************************************************************************
9195  **
9196  ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_groups_end
9197  **
9198  ** @param const xcb_xkb_get_names_value_list_t *R
9199  ** @returns xcb_generic_iterator_t
9200  **
9201  *****************************************************************************/
9202 
9203 xcb_generic_iterator_t
9204 xcb_xkb_get_names_value_list_groups_end (const xcb_xkb_get_names_reply_t *R  /**< */,
9205                                          const xcb_xkb_get_names_value_list_t *S  /**< */)
9206 {
9207     xcb_generic_iterator_t i;
9208     i.data = /* valueList */ S->groups + xcb_popcount(R->groupNames);
9209     i.rem = 0;
9210     i.index = (char *) i.data - (char *) S;
9211     return i;
9212 }
9213 
9214 
9215 /*****************************************************************************
9216  **
9217  ** xcb_xkb_key_name_t * xcb_xkb_get_names_value_list_key_names
9218  **
9219  ** @param const xcb_xkb_get_names_value_list_t *S
9220  ** @returns xcb_xkb_key_name_t *
9221  **
9222  *****************************************************************************/
9223 
9224 xcb_xkb_key_name_t *
9225 xcb_xkb_get_names_value_list_key_names (const xcb_xkb_get_names_value_list_t *S  /**< */)
9226 {
9227     return /* valueList */ S->keyNames;
9228 }
9229 
9230 
9231 /*****************************************************************************
9232  **
9233  ** int xcb_xkb_get_names_value_list_key_names_length
9234  **
9235  ** @param const xcb_xkb_get_names_value_list_t *R
9236  ** @returns int
9237  **
9238  *****************************************************************************/
9239 
9240 int
9241 xcb_xkb_get_names_value_list_key_names_length (const xcb_xkb_get_names_reply_t *R  /**< */,
9242                                                const xcb_xkb_get_names_value_list_t *S  /**< */)
9243 {
9244     return R->nKeys;
9245 }
9246 
9247 
9248 /*****************************************************************************
9249  **
9250  ** xcb_xkb_key_name_iterator_t xcb_xkb_get_names_value_list_key_names_iterator
9251  **
9252  ** @param const xcb_xkb_get_names_value_list_t *R
9253  ** @returns xcb_xkb_key_name_iterator_t
9254  **
9255  *****************************************************************************/
9256 
9257 xcb_xkb_key_name_iterator_t
9258 xcb_xkb_get_names_value_list_key_names_iterator (const xcb_xkb_get_names_reply_t *R  /**< */,
9259                                                  const xcb_xkb_get_names_value_list_t *S  /**< */)
9260 {
9261     xcb_xkb_key_name_iterator_t i;
9262     i.data = /* valueList */ S->keyNames;
9263     i.rem = R->nKeys;
9264     i.index = (char *) i.data - (char *) S;
9265     return i;
9266 }
9267 
9268 
9269 /*****************************************************************************
9270  **
9271  ** xcb_xkb_key_alias_t * xcb_xkb_get_names_value_list_key_aliases
9272  **
9273  ** @param const xcb_xkb_get_names_value_list_t *S
9274  ** @returns xcb_xkb_key_alias_t *
9275  **
9276  *****************************************************************************/
9277 
9278 xcb_xkb_key_alias_t *
9279 xcb_xkb_get_names_value_list_key_aliases (const xcb_xkb_get_names_value_list_t *S  /**< */)
9280 {
9281     return /* valueList */ S->keyAliases;
9282 }
9283 
9284 
9285 /*****************************************************************************
9286  **
9287  ** int xcb_xkb_get_names_value_list_key_aliases_length
9288  **
9289  ** @param const xcb_xkb_get_names_value_list_t *R
9290  ** @returns int
9291  **
9292  *****************************************************************************/
9293 
9294 int
9295 xcb_xkb_get_names_value_list_key_aliases_length (const xcb_xkb_get_names_reply_t *R  /**< */,
9296                                                  const xcb_xkb_get_names_value_list_t *S  /**< */)
9297 {
9298     return R->nKeyAliases;
9299 }
9300 
9301 
9302 /*****************************************************************************
9303  **
9304  ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_names_value_list_key_aliases_iterator
9305  **
9306  ** @param const xcb_xkb_get_names_value_list_t *R
9307  ** @returns xcb_xkb_key_alias_iterator_t
9308  **
9309  *****************************************************************************/
9310 
9311 xcb_xkb_key_alias_iterator_t
9312 xcb_xkb_get_names_value_list_key_aliases_iterator (const xcb_xkb_get_names_reply_t *R  /**< */,
9313                                                    const xcb_xkb_get_names_value_list_t *S  /**< */)
9314 {
9315     xcb_xkb_key_alias_iterator_t i;
9316     i.data = /* valueList */ S->keyAliases;
9317     i.rem = R->nKeyAliases;
9318     i.index = (char *) i.data - (char *) S;
9319     return i;
9320 }
9321 
9322 
9323 /*****************************************************************************
9324  **
9325  ** xcb_atom_t * xcb_xkb_get_names_value_list_radio_group_names
9326  **
9327  ** @param const xcb_xkb_get_names_value_list_t *S
9328  ** @returns xcb_atom_t *
9329  **
9330  *****************************************************************************/
9331 
9332 xcb_atom_t *
9333 xcb_xkb_get_names_value_list_radio_group_names (const xcb_xkb_get_names_value_list_t *S  /**< */)
9334 {
9335     return /* valueList */ S->radioGroupNames;
9336 }
9337 
9338 
9339 /*****************************************************************************
9340  **
9341  ** int xcb_xkb_get_names_value_list_radio_group_names_length
9342  **
9343  ** @param const xcb_xkb_get_names_value_list_t *R
9344  ** @returns int
9345  **
9346  *****************************************************************************/
9347 
9348 int
9349 xcb_xkb_get_names_value_list_radio_group_names_length (const xcb_xkb_get_names_reply_t *R  /**< */,
9350                                                        const xcb_xkb_get_names_value_list_t *S  /**< */)
9351 {
9352     return R->nRadioGroups;
9353 }
9354 
9355 
9356 /*****************************************************************************
9357  **
9358  ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_radio_group_names_end
9359  **
9360  ** @param const xcb_xkb_get_names_value_list_t *R
9361  ** @returns xcb_generic_iterator_t
9362  **
9363  *****************************************************************************/
9364 
9365 xcb_generic_iterator_t
9366 xcb_xkb_get_names_value_list_radio_group_names_end (const xcb_xkb_get_names_reply_t *R  /**< */,
9367                                                     const xcb_xkb_get_names_value_list_t *S  /**< */)
9368 {
9369     xcb_generic_iterator_t i;
9370     i.data = /* valueList */ S->radioGroupNames + R->nRadioGroups;
9371     i.rem = 0;
9372     i.index = (char *) i.data - (char *) S;
9373     return i;
9374 }
9375 
9376 int
9377 xcb_xkb_get_names_value_list_serialize (void                                 **_buffer  /**< */,
9378                                         uint8_t                                nTypes  /**< */,
9379                                         uint32_t                               indicators  /**< */,
9380                                         uint16_t                               virtualMods  /**< */,
9381                                         uint8_t                                groupNames  /**< */,
9382                                         uint8_t                                nKeys  /**< */,
9383                                         uint8_t                                nKeyAliases  /**< */,
9384                                         uint8_t                                nRadioGroups  /**< */,
9385                                         uint32_t                               which  /**< */,
9386                                         const xcb_xkb_get_names_value_list_t  *_aux  /**< */)
9387 {
9388     char *xcb_out = *_buffer;
9389     unsigned int xcb_buffer_len = 0;
9390     unsigned int xcb_align_to = 0;
9391 
9392     unsigned int xcb_pad = 0;
9393     char xcb_pad0[3] = {0, 0, 0};
9394     struct iovec xcb_parts[27];
9395     unsigned int xcb_parts_idx = 0;
9396     unsigned int xcb_block_len = 0;
9397     unsigned int i;
9398     char *xcb_tmp;
9399 
9400     if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
9401         /* xcb_xkb_get_names_value_list_t.keycodesName */
9402         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
9403         xcb_block_len += sizeof(xcb_atom_t);
9404         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
9405         xcb_parts_idx++;
9406         xcb_align_to = ALIGNOF(xcb_atom_t);
9407     }
9408     if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
9409         /* xcb_xkb_get_names_value_list_t.geometryName */
9410         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
9411         xcb_block_len += sizeof(xcb_atom_t);
9412         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
9413         xcb_parts_idx++;
9414         xcb_align_to = ALIGNOF(xcb_atom_t);
9415     }
9416     if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
9417         /* xcb_xkb_get_names_value_list_t.symbolsName */
9418         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
9419         xcb_block_len += sizeof(xcb_atom_t);
9420         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
9421         xcb_parts_idx++;
9422         xcb_align_to = ALIGNOF(xcb_atom_t);
9423     }
9424     if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
9425         /* xcb_xkb_get_names_value_list_t.physSymbolsName */
9426         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
9427         xcb_block_len += sizeof(xcb_atom_t);
9428         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
9429         xcb_parts_idx++;
9430         xcb_align_to = ALIGNOF(xcb_atom_t);
9431     }
9432     if(which & XCB_XKB_NAME_DETAIL_TYPES) {
9433         /* xcb_xkb_get_names_value_list_t.typesName */
9434         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
9435         xcb_block_len += sizeof(xcb_atom_t);
9436         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
9437         xcb_parts_idx++;
9438         xcb_align_to = ALIGNOF(xcb_atom_t);
9439     }
9440     if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
9441         /* xcb_xkb_get_names_value_list_t.compatName */
9442         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
9443         xcb_block_len += sizeof(xcb_atom_t);
9444         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
9445         xcb_parts_idx++;
9446         xcb_align_to = ALIGNOF(xcb_atom_t);
9447     }
9448     if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
9449         /* insert padding */
9450         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9451         xcb_buffer_len += xcb_block_len + xcb_pad;
9452         if (0 != xcb_pad) {
9453             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9454             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9455             xcb_parts_idx++;
9456             xcb_pad = 0;
9457         }
9458         xcb_block_len = 0;
9459         /* typeNames */
9460         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
9461         xcb_block_len += nTypes * sizeof(xcb_atom_t);
9462         xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
9463         xcb_parts_idx++;
9464         xcb_align_to = ALIGNOF(xcb_atom_t);
9465     }
9466     if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
9467         /* insert padding */
9468         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9469         xcb_buffer_len += xcb_block_len + xcb_pad;
9470         if (0 != xcb_pad) {
9471             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9472             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9473             xcb_parts_idx++;
9474             xcb_pad = 0;
9475         }
9476         xcb_block_len = 0;
9477         /* nLevelsPerType */
9478         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
9479         xcb_block_len += nTypes * sizeof(uint8_t);
9480         xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(uint8_t);
9481         xcb_parts_idx++;
9482         xcb_align_to = ALIGNOF(uint8_t);
9483         /* insert padding */
9484         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9485         xcb_buffer_len += xcb_block_len + xcb_pad;
9486         if (0 != xcb_pad) {
9487             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9488             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9489             xcb_parts_idx++;
9490             xcb_pad = 0;
9491         }
9492         xcb_block_len = 0;
9493         /* alignment_pad */
9494         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad;
9495         xcb_block_len += (((nTypes + 3) & (~3)) - nTypes) * sizeof(uint8_t);
9496         xcb_parts[xcb_parts_idx].iov_len = (((nTypes + 3) & (~3)) - nTypes) * sizeof(uint8_t);
9497         xcb_parts_idx++;
9498         xcb_align_to = ALIGNOF(uint8_t);
9499         /* insert padding */
9500         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9501         xcb_buffer_len += xcb_block_len + xcb_pad;
9502         if (0 != xcb_pad) {
9503             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9504             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9505             xcb_parts_idx++;
9506             xcb_pad = 0;
9507         }
9508         xcb_block_len = 0;
9509         /* ktLevelNames */
9510         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
9511         xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
9512         xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
9513         xcb_parts_idx++;
9514         xcb_align_to = ALIGNOF(xcb_atom_t);
9515     }
9516     if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
9517         /* insert padding */
9518         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9519         xcb_buffer_len += xcb_block_len + xcb_pad;
9520         if (0 != xcb_pad) {
9521             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9522             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9523             xcb_parts_idx++;
9524             xcb_pad = 0;
9525         }
9526         xcb_block_len = 0;
9527         /* indicatorNames */
9528         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
9529         xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
9530         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
9531         xcb_parts_idx++;
9532         xcb_align_to = ALIGNOF(xcb_atom_t);
9533     }
9534     if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
9535         /* insert padding */
9536         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9537         xcb_buffer_len += xcb_block_len + xcb_pad;
9538         if (0 != xcb_pad) {
9539             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9540             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9541             xcb_parts_idx++;
9542             xcb_pad = 0;
9543         }
9544         xcb_block_len = 0;
9545         /* virtualModNames */
9546         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
9547         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
9548         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
9549         xcb_parts_idx++;
9550         xcb_align_to = ALIGNOF(xcb_atom_t);
9551     }
9552     if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
9553         /* insert padding */
9554         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9555         xcb_buffer_len += xcb_block_len + xcb_pad;
9556         if (0 != xcb_pad) {
9557             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9558             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9559             xcb_parts_idx++;
9560             xcb_pad = 0;
9561         }
9562         xcb_block_len = 0;
9563         /* groups */
9564         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
9565         xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
9566         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
9567         xcb_parts_idx++;
9568         xcb_align_to = ALIGNOF(xcb_atom_t);
9569     }
9570     if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
9571         /* insert padding */
9572         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9573         xcb_buffer_len += xcb_block_len + xcb_pad;
9574         if (0 != xcb_pad) {
9575             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9576             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9577             xcb_parts_idx++;
9578             xcb_pad = 0;
9579         }
9580         xcb_block_len = 0;
9581         /* keyNames */
9582         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
9583         xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
9584         xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
9585         xcb_parts_idx++;
9586         xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
9587     }
9588     if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
9589         /* insert padding */
9590         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9591         xcb_buffer_len += xcb_block_len + xcb_pad;
9592         if (0 != xcb_pad) {
9593             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9594             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9595             xcb_parts_idx++;
9596             xcb_pad = 0;
9597         }
9598         xcb_block_len = 0;
9599         /* keyAliases */
9600         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
9601         xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
9602         xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
9603         xcb_parts_idx++;
9604         xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
9605     }
9606     if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
9607         /* insert padding */
9608         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9609         xcb_buffer_len += xcb_block_len + xcb_pad;
9610         if (0 != xcb_pad) {
9611             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9612             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9613             xcb_parts_idx++;
9614             xcb_pad = 0;
9615         }
9616         xcb_block_len = 0;
9617         /* radioGroupNames */
9618         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
9619         xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
9620         xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
9621         xcb_parts_idx++;
9622         xcb_align_to = ALIGNOF(xcb_atom_t);
9623     }
9624     /* insert padding */
9625     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9626     xcb_buffer_len += xcb_block_len + xcb_pad;
9627     if (0 != xcb_pad) {
9628         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
9629         xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
9630         xcb_parts_idx++;
9631         xcb_pad = 0;
9632     }
9633     xcb_block_len = 0;
9634 
9635     if (NULL == xcb_out) {
9636         /* allocate memory */
9637         xcb_out = malloc(xcb_buffer_len);
9638         *_buffer = xcb_out;
9639     }
9640 
9641     xcb_tmp = xcb_out;
9642     for(i=0; i<xcb_parts_idx; i++) {
9643         if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
9644             memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
9645         if (0 != xcb_parts[i].iov_len)
9646             xcb_tmp += xcb_parts[i].iov_len;
9647     }
9648 
9649     return xcb_buffer_len;
9650 }
9651 
9652 int
9653 xcb_xkb_get_names_value_list_unpack (const void                      *_buffer  /**< */,
9654                                      uint8_t                          nTypes  /**< */,
9655                                      uint32_t                         indicators  /**< */,
9656                                      uint16_t                         virtualMods  /**< */,
9657                                      uint8_t                          groupNames  /**< */,
9658                                      uint8_t                          nKeys  /**< */,
9659                                      uint8_t                          nKeyAliases  /**< */,
9660                                      uint8_t                          nRadioGroups  /**< */,
9661                                      uint32_t                         which  /**< */,
9662                                      xcb_xkb_get_names_value_list_t  *_aux  /**< */)
9663 {
9664     char *xcb_tmp = (char *)_buffer;
9665     unsigned int xcb_buffer_len = 0;
9666     unsigned int xcb_block_len = 0;
9667     unsigned int xcb_pad = 0;
9668     unsigned int xcb_align_to = 0;
9669 
9670 
9671     if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
9672         /* xcb_xkb_get_names_value_list_t.keycodesName */
9673         _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
9674         xcb_block_len += sizeof(xcb_atom_t);
9675         xcb_tmp += sizeof(xcb_atom_t);
9676         xcb_align_to = ALIGNOF(xcb_atom_t);
9677     }
9678     if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
9679         /* xcb_xkb_get_names_value_list_t.geometryName */
9680         _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
9681         xcb_block_len += sizeof(xcb_atom_t);
9682         xcb_tmp += sizeof(xcb_atom_t);
9683         xcb_align_to = ALIGNOF(xcb_atom_t);
9684     }
9685     if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
9686         /* xcb_xkb_get_names_value_list_t.symbolsName */
9687         _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
9688         xcb_block_len += sizeof(xcb_atom_t);
9689         xcb_tmp += sizeof(xcb_atom_t);
9690         xcb_align_to = ALIGNOF(xcb_atom_t);
9691     }
9692     if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
9693         /* xcb_xkb_get_names_value_list_t.physSymbolsName */
9694         _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
9695         xcb_block_len += sizeof(xcb_atom_t);
9696         xcb_tmp += sizeof(xcb_atom_t);
9697         xcb_align_to = ALIGNOF(xcb_atom_t);
9698     }
9699     if(which & XCB_XKB_NAME_DETAIL_TYPES) {
9700         /* xcb_xkb_get_names_value_list_t.typesName */
9701         _aux->typesName = *(xcb_atom_t *)xcb_tmp;
9702         xcb_block_len += sizeof(xcb_atom_t);
9703         xcb_tmp += sizeof(xcb_atom_t);
9704         xcb_align_to = ALIGNOF(xcb_atom_t);
9705     }
9706     if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
9707         /* xcb_xkb_get_names_value_list_t.compatName */
9708         _aux->compatName = *(xcb_atom_t *)xcb_tmp;
9709         xcb_block_len += sizeof(xcb_atom_t);
9710         xcb_tmp += sizeof(xcb_atom_t);
9711         xcb_align_to = ALIGNOF(xcb_atom_t);
9712     }
9713     if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
9714         /* insert padding */
9715         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9716         xcb_buffer_len += xcb_block_len + xcb_pad;
9717         if (0 != xcb_pad) {
9718             xcb_tmp += xcb_pad;
9719             xcb_pad = 0;
9720         }
9721         xcb_block_len = 0;
9722         /* typeNames */
9723         _aux->typeNames = (xcb_atom_t *)xcb_tmp;
9724         xcb_block_len += nTypes * sizeof(xcb_atom_t);
9725         xcb_tmp += xcb_block_len;
9726         xcb_align_to = ALIGNOF(xcb_atom_t);
9727     }
9728     if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
9729         /* insert padding */
9730         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9731         xcb_buffer_len += xcb_block_len + xcb_pad;
9732         if (0 != xcb_pad) {
9733             xcb_tmp += xcb_pad;
9734             xcb_pad = 0;
9735         }
9736         xcb_block_len = 0;
9737         /* nLevelsPerType */
9738         _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
9739         xcb_block_len += nTypes * sizeof(uint8_t);
9740         xcb_tmp += xcb_block_len;
9741         xcb_align_to = ALIGNOF(uint8_t);
9742         /* insert padding */
9743         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9744         xcb_buffer_len += xcb_block_len + xcb_pad;
9745         if (0 != xcb_pad) {
9746             xcb_tmp += xcb_pad;
9747             xcb_pad = 0;
9748         }
9749         xcb_block_len = 0;
9750         /* alignment_pad */
9751         _aux->alignment_pad = (uint8_t *)xcb_tmp;
9752         xcb_block_len += (((nTypes + 3) & (~3)) - nTypes) * sizeof(uint8_t);
9753         xcb_tmp += xcb_block_len;
9754         xcb_align_to = ALIGNOF(uint8_t);
9755         /* insert padding */
9756         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9757         xcb_buffer_len += xcb_block_len + xcb_pad;
9758         if (0 != xcb_pad) {
9759             xcb_tmp += xcb_pad;
9760             xcb_pad = 0;
9761         }
9762         xcb_block_len = 0;
9763         /* ktLevelNames */
9764         _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
9765         xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
9766         xcb_tmp += xcb_block_len;
9767         xcb_align_to = ALIGNOF(xcb_atom_t);
9768     }
9769     if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
9770         /* insert padding */
9771         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9772         xcb_buffer_len += xcb_block_len + xcb_pad;
9773         if (0 != xcb_pad) {
9774             xcb_tmp += xcb_pad;
9775             xcb_pad = 0;
9776         }
9777         xcb_block_len = 0;
9778         /* indicatorNames */
9779         _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
9780         xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
9781         xcb_tmp += xcb_block_len;
9782         xcb_align_to = ALIGNOF(xcb_atom_t);
9783     }
9784     if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
9785         /* insert padding */
9786         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9787         xcb_buffer_len += xcb_block_len + xcb_pad;
9788         if (0 != xcb_pad) {
9789             xcb_tmp += xcb_pad;
9790             xcb_pad = 0;
9791         }
9792         xcb_block_len = 0;
9793         /* virtualModNames */
9794         _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
9795         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
9796         xcb_tmp += xcb_block_len;
9797         xcb_align_to = ALIGNOF(xcb_atom_t);
9798     }
9799     if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
9800         /* insert padding */
9801         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9802         xcb_buffer_len += xcb_block_len + xcb_pad;
9803         if (0 != xcb_pad) {
9804             xcb_tmp += xcb_pad;
9805             xcb_pad = 0;
9806         }
9807         xcb_block_len = 0;
9808         /* groups */
9809         _aux->groups = (xcb_atom_t *)xcb_tmp;
9810         xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
9811         xcb_tmp += xcb_block_len;
9812         xcb_align_to = ALIGNOF(xcb_atom_t);
9813     }
9814     if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
9815         /* insert padding */
9816         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9817         xcb_buffer_len += xcb_block_len + xcb_pad;
9818         if (0 != xcb_pad) {
9819             xcb_tmp += xcb_pad;
9820             xcb_pad = 0;
9821         }
9822         xcb_block_len = 0;
9823         /* keyNames */
9824         _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
9825         xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
9826         xcb_tmp += xcb_block_len;
9827         xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
9828     }
9829     if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
9830         /* insert padding */
9831         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9832         xcb_buffer_len += xcb_block_len + xcb_pad;
9833         if (0 != xcb_pad) {
9834             xcb_tmp += xcb_pad;
9835             xcb_pad = 0;
9836         }
9837         xcb_block_len = 0;
9838         /* keyAliases */
9839         _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
9840         xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
9841         xcb_tmp += xcb_block_len;
9842         xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
9843     }
9844     if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
9845         /* insert padding */
9846         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9847         xcb_buffer_len += xcb_block_len + xcb_pad;
9848         if (0 != xcb_pad) {
9849             xcb_tmp += xcb_pad;
9850             xcb_pad = 0;
9851         }
9852         xcb_block_len = 0;
9853         /* radioGroupNames */
9854         _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
9855         xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
9856         xcb_tmp += xcb_block_len;
9857         xcb_align_to = ALIGNOF(xcb_atom_t);
9858     }
9859     /* insert padding */
9860     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9861     xcb_buffer_len += xcb_block_len + xcb_pad;
9862     if (0 != xcb_pad) {
9863         xcb_tmp += xcb_pad;
9864         xcb_pad = 0;
9865     }
9866     xcb_block_len = 0;
9867 
9868     return xcb_buffer_len;
9869 }
9870 
9871 int
9872 xcb_xkb_get_names_value_list_sizeof (const void  *_buffer  /**< */,
9873                                      uint8_t      nTypes  /**< */,
9874                                      uint32_t     indicators  /**< */,
9875                                      uint16_t     virtualMods  /**< */,
9876                                      uint8_t      groupNames  /**< */,
9877                                      uint8_t      nKeys  /**< */,
9878                                      uint8_t      nKeyAliases  /**< */,
9879                                      uint8_t      nRadioGroups  /**< */,
9880                                      uint32_t     which  /**< */)
9881 {
9882     xcb_xkb_get_names_value_list_t _aux;
9883     return xcb_xkb_get_names_value_list_unpack(_buffer, nTypes, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
9884 }
9885 
9886 
9887 /*****************************************************************************
9888  **
9889  ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names
9890  **
9891  ** @param xcb_connection_t      *c
9892  ** @param xcb_xkb_device_spec_t  deviceSpec
9893  ** @param uint32_t               which
9894  ** @returns xcb_xkb_get_names_cookie_t
9895  **
9896  *****************************************************************************/
9897 
9898 xcb_xkb_get_names_cookie_t
9899 xcb_xkb_get_names (xcb_connection_t      *c  /**< */,
9900                    xcb_xkb_device_spec_t  deviceSpec  /**< */,
9901                    uint32_t               which  /**< */)
9902 {
9903     static const xcb_protocol_request_t xcb_req = {
9904         /* count */ 2,
9905         /* ext */ &xcb_xkb_id,
9906         /* opcode */ XCB_XKB_GET_NAMES,
9907         /* isvoid */ 0
9908     };
9909 
9910     struct iovec xcb_parts[4];
9911     xcb_xkb_get_names_cookie_t xcb_ret;
9912     xcb_xkb_get_names_request_t xcb_out;
9913 
9914     xcb_out.deviceSpec = deviceSpec;
9915     memset(xcb_out.pad0, 0, 2);
9916     xcb_out.which = which;
9917 
9918     xcb_parts[2].iov_base = (char *) &xcb_out;
9919     xcb_parts[2].iov_len = sizeof(xcb_out);
9920     xcb_parts[3].iov_base = 0;
9921     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9922 
9923     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9924     return xcb_ret;
9925 }
9926 
9927 
9928 /*****************************************************************************
9929  **
9930  ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names_unchecked
9931  **
9932  ** @param xcb_connection_t      *c
9933  ** @param xcb_xkb_device_spec_t  deviceSpec
9934  ** @param uint32_t               which
9935  ** @returns xcb_xkb_get_names_cookie_t
9936  **
9937  *****************************************************************************/
9938 
9939 xcb_xkb_get_names_cookie_t
9940 xcb_xkb_get_names_unchecked (xcb_connection_t      *c  /**< */,
9941                              xcb_xkb_device_spec_t  deviceSpec  /**< */,
9942                              uint32_t               which  /**< */)
9943 {
9944     static const xcb_protocol_request_t xcb_req = {
9945         /* count */ 2,
9946         /* ext */ &xcb_xkb_id,
9947         /* opcode */ XCB_XKB_GET_NAMES,
9948         /* isvoid */ 0
9949     };
9950 
9951     struct iovec xcb_parts[4];
9952     xcb_xkb_get_names_cookie_t xcb_ret;
9953     xcb_xkb_get_names_request_t xcb_out;
9954 
9955     xcb_out.deviceSpec = deviceSpec;
9956     memset(xcb_out.pad0, 0, 2);
9957     xcb_out.which = which;
9958 
9959     xcb_parts[2].iov_base = (char *) &xcb_out;
9960     xcb_parts[2].iov_len = sizeof(xcb_out);
9961     xcb_parts[3].iov_base = 0;
9962     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9963 
9964     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9965     return xcb_ret;
9966 }
9967 
9968 
9969 /*****************************************************************************
9970  **
9971  ** xcb_xkb_get_names_value_list_t * xcb_xkb_get_names_value_list
9972  **
9973  ** @param const xcb_xkb_get_names_reply_t *R
9974  ** @returns xcb_xkb_get_names_value_list_t *
9975  **
9976  *****************************************************************************/
9977 
9978 void *
9979 xcb_xkb_get_names_value_list (const xcb_xkb_get_names_reply_t *R  /**< */)
9980 {
9981     return (void *) (R + 1);
9982 }
9983 
9984 
9985 /*****************************************************************************
9986  **
9987  ** xcb_xkb_get_names_reply_t * xcb_xkb_get_names_reply
9988  **
9989  ** @param xcb_connection_t            *c
9990  ** @param xcb_xkb_get_names_cookie_t   cookie
9991  ** @param xcb_generic_error_t        **e
9992  ** @returns xcb_xkb_get_names_reply_t *
9993  **
9994  *****************************************************************************/
9995 
9996 xcb_xkb_get_names_reply_t *
9997 xcb_xkb_get_names_reply (xcb_connection_t            *c  /**< */,
9998                          xcb_xkb_get_names_cookie_t   cookie  /**< */,
9999                          xcb_generic_error_t        **e  /**< */)
10000 {
10001     return (xcb_xkb_get_names_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
10002 }
10003 
10004 
10005 /*****************************************************************************
10006  **
10007  ** xcb_atom_t * xcb_xkb_set_names_values_type_names
10008  **
10009  ** @param const xcb_xkb_set_names_values_t *S
10010  ** @returns xcb_atom_t *
10011  **
10012  *****************************************************************************/
10013 
10014 xcb_atom_t *
10015 xcb_xkb_set_names_values_type_names (const xcb_xkb_set_names_values_t *S  /**< */)
10016 {
10017     return /* values */ S->typeNames;
10018 }
10019 
10020 
10021 /*****************************************************************************
10022  **
10023  ** int xcb_xkb_set_names_values_type_names_length
10024  **
10025  ** @param const xcb_xkb_set_names_values_t *R
10026  ** @returns int
10027  **
10028  *****************************************************************************/
10029 
10030 int
10031 xcb_xkb_set_names_values_type_names_length (const xcb_xkb_set_names_request_t *R  /**< */,
10032                                             const xcb_xkb_set_names_values_t *S  /**< */)
10033 {
10034     return R->nTypes;
10035 }
10036 
10037 
10038 /*****************************************************************************
10039  **
10040  ** xcb_generic_iterator_t xcb_xkb_set_names_values_type_names_end
10041  **
10042  ** @param const xcb_xkb_set_names_values_t *R
10043  ** @returns xcb_generic_iterator_t
10044  **
10045  *****************************************************************************/
10046 
10047 xcb_generic_iterator_t
10048 xcb_xkb_set_names_values_type_names_end (const xcb_xkb_set_names_request_t *R  /**< */,
10049                                          const xcb_xkb_set_names_values_t *S  /**< */)
10050 {
10051     xcb_generic_iterator_t i;
10052     i.data = /* values */ S->typeNames + R->nTypes;
10053     i.rem = 0;
10054     i.index = (char *) i.data - (char *) S;
10055     return i;
10056 }
10057 
10058 
10059 /*****************************************************************************
10060  **
10061  ** uint8_t * xcb_xkb_set_names_values_n_levels_per_type
10062  **
10063  ** @param const xcb_xkb_set_names_values_t *S
10064  ** @returns uint8_t *
10065  **
10066  *****************************************************************************/
10067 
10068 uint8_t *
10069 xcb_xkb_set_names_values_n_levels_per_type (const xcb_xkb_set_names_values_t *S  /**< */)
10070 {
10071     return /* values */ S->nLevelsPerType;
10072 }
10073 
10074 
10075 /*****************************************************************************
10076  **
10077  ** int xcb_xkb_set_names_values_n_levels_per_type_length
10078  **
10079  ** @param const xcb_xkb_set_names_values_t *R
10080  ** @returns int
10081  **
10082  *****************************************************************************/
10083 
10084 int
10085 xcb_xkb_set_names_values_n_levels_per_type_length (const xcb_xkb_set_names_request_t *R  /**< */,
10086                                                    const xcb_xkb_set_names_values_t *S  /**< */)
10087 {
10088     return R->nKTLevels;
10089 }
10090 
10091 
10092 /*****************************************************************************
10093  **
10094  ** xcb_generic_iterator_t xcb_xkb_set_names_values_n_levels_per_type_end
10095  **
10096  ** @param const xcb_xkb_set_names_values_t *R
10097  ** @returns xcb_generic_iterator_t
10098  **
10099  *****************************************************************************/
10100 
10101 xcb_generic_iterator_t
10102 xcb_xkb_set_names_values_n_levels_per_type_end (const xcb_xkb_set_names_request_t *R  /**< */,
10103                                                 const xcb_xkb_set_names_values_t *S  /**< */)
10104 {
10105     xcb_generic_iterator_t i;
10106     i.data = /* values */ S->nLevelsPerType + R->nKTLevels;
10107     i.rem = 0;
10108     i.index = (char *) i.data - (char *) S;
10109     return i;
10110 }
10111 
10112 
10113 /*****************************************************************************
10114  **
10115  ** xcb_atom_t * xcb_xkb_set_names_values_kt_level_names
10116  **
10117  ** @param const xcb_xkb_set_names_values_t *S
10118  ** @returns xcb_atom_t *
10119  **
10120  *****************************************************************************/
10121 
10122 xcb_atom_t *
10123 xcb_xkb_set_names_values_kt_level_names (const xcb_xkb_set_names_values_t *S  /**< */)
10124 {
10125     return /* values */ S->ktLevelNames;
10126 }
10127 
10128 
10129 /*****************************************************************************
10130  **
10131  ** int xcb_xkb_set_names_values_kt_level_names_length
10132  **
10133  ** @param const xcb_xkb_set_names_values_t *R
10134  ** @returns int
10135  **
10136  *****************************************************************************/
10137 
10138 int
10139 xcb_xkb_set_names_values_kt_level_names_length (const xcb_xkb_set_names_request_t *R  /**< */,
10140                                                 const xcb_xkb_set_names_values_t *S  /**< */)
10141 {
10142     return xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
10143 }
10144 
10145 
10146 /*****************************************************************************
10147  **
10148  ** xcb_generic_iterator_t xcb_xkb_set_names_values_kt_level_names_end
10149  **
10150  ** @param const xcb_xkb_set_names_values_t *R
10151  ** @returns xcb_generic_iterator_t
10152  **
10153  *****************************************************************************/
10154 
10155 xcb_generic_iterator_t
10156 xcb_xkb_set_names_values_kt_level_names_end (const xcb_xkb_set_names_request_t *R  /**< */,
10157                                              const xcb_xkb_set_names_values_t *S  /**< */)
10158 {
10159     xcb_generic_iterator_t i;
10160     i.data = /* values */ S->ktLevelNames + xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
10161     i.rem = 0;
10162     i.index = (char *) i.data - (char *) S;
10163     return i;
10164 }
10165 
10166 
10167 /*****************************************************************************
10168  **
10169  ** xcb_atom_t * xcb_xkb_set_names_values_indicator_names
10170  **
10171  ** @param const xcb_xkb_set_names_values_t *S
10172  ** @returns xcb_atom_t *
10173  **
10174  *****************************************************************************/
10175 
10176 xcb_atom_t *
10177 xcb_xkb_set_names_values_indicator_names (const xcb_xkb_set_names_values_t *S  /**< */)
10178 {
10179     return /* values */ S->indicatorNames;
10180 }
10181 
10182 
10183 /*****************************************************************************
10184  **
10185  ** int xcb_xkb_set_names_values_indicator_names_length
10186  **
10187  ** @param const xcb_xkb_set_names_values_t *R
10188  ** @returns int
10189  **
10190  *****************************************************************************/
10191 
10192 int
10193 xcb_xkb_set_names_values_indicator_names_length (const xcb_xkb_set_names_request_t *R  /**< */,
10194                                                  const xcb_xkb_set_names_values_t *S  /**< */)
10195 {
10196     return xcb_popcount(R->indicators);
10197 }
10198 
10199 
10200 /*****************************************************************************
10201  **
10202  ** xcb_generic_iterator_t xcb_xkb_set_names_values_indicator_names_end
10203  **
10204  ** @param const xcb_xkb_set_names_values_t *R
10205  ** @returns xcb_generic_iterator_t
10206  **
10207  *****************************************************************************/
10208 
10209 xcb_generic_iterator_t
10210 xcb_xkb_set_names_values_indicator_names_end (const xcb_xkb_set_names_request_t *R  /**< */,
10211                                               const xcb_xkb_set_names_values_t *S  /**< */)
10212 {
10213     xcb_generic_iterator_t i;
10214     i.data = /* values */ S->indicatorNames + xcb_popcount(R->indicators);
10215     i.rem = 0;
10216     i.index = (char *) i.data - (char *) S;
10217     return i;
10218 }
10219 
10220 
10221 /*****************************************************************************
10222  **
10223  ** xcb_atom_t * xcb_xkb_set_names_values_virtual_mod_names
10224  **
10225  ** @param const xcb_xkb_set_names_values_t *S
10226  ** @returns xcb_atom_t *
10227  **
10228  *****************************************************************************/
10229 
10230 xcb_atom_t *
10231 xcb_xkb_set_names_values_virtual_mod_names (const xcb_xkb_set_names_values_t *S  /**< */)
10232 {
10233     return /* values */ S->virtualModNames;
10234 }
10235 
10236 
10237 /*****************************************************************************
10238  **
10239  ** int xcb_xkb_set_names_values_virtual_mod_names_length
10240  **
10241  ** @param const xcb_xkb_set_names_values_t *R
10242  ** @returns int
10243  **
10244  *****************************************************************************/
10245 
10246 int
10247 xcb_xkb_set_names_values_virtual_mod_names_length (const xcb_xkb_set_names_request_t *R  /**< */,
10248                                                    const xcb_xkb_set_names_values_t *S  /**< */)
10249 {
10250     return xcb_popcount(R->virtualMods);
10251 }
10252 
10253 
10254 /*****************************************************************************
10255  **
10256  ** xcb_generic_iterator_t xcb_xkb_set_names_values_virtual_mod_names_end
10257  **
10258  ** @param const xcb_xkb_set_names_values_t *R
10259  ** @returns xcb_generic_iterator_t
10260  **
10261  *****************************************************************************/
10262 
10263 xcb_generic_iterator_t
10264 xcb_xkb_set_names_values_virtual_mod_names_end (const xcb_xkb_set_names_request_t *R  /**< */,
10265                                                 const xcb_xkb_set_names_values_t *S  /**< */)
10266 {
10267     xcb_generic_iterator_t i;
10268     i.data = /* values */ S->virtualModNames + xcb_popcount(R->virtualMods);
10269     i.rem = 0;
10270     i.index = (char *) i.data - (char *) S;
10271     return i;
10272 }
10273 
10274 
10275 /*****************************************************************************
10276  **
10277  ** xcb_atom_t * xcb_xkb_set_names_values_groups
10278  **
10279  ** @param const xcb_xkb_set_names_values_t *S
10280  ** @returns xcb_atom_t *
10281  **
10282  *****************************************************************************/
10283 
10284 xcb_atom_t *
10285 xcb_xkb_set_names_values_groups (const xcb_xkb_set_names_values_t *S  /**< */)
10286 {
10287     return /* values */ S->groups;
10288 }
10289 
10290 
10291 /*****************************************************************************
10292  **
10293  ** int xcb_xkb_set_names_values_groups_length
10294  **
10295  ** @param const xcb_xkb_set_names_values_t *R
10296  ** @returns int
10297  **
10298  *****************************************************************************/
10299 
10300 int
10301 xcb_xkb_set_names_values_groups_length (const xcb_xkb_set_names_request_t *R  /**< */,
10302                                         const xcb_xkb_set_names_values_t *S  /**< */)
10303 {
10304     return xcb_popcount(R->groupNames);
10305 }
10306 
10307 
10308 /*****************************************************************************
10309  **
10310  ** xcb_generic_iterator_t xcb_xkb_set_names_values_groups_end
10311  **
10312  ** @param const xcb_xkb_set_names_values_t *R
10313  ** @returns xcb_generic_iterator_t
10314  **
10315  *****************************************************************************/
10316 
10317 xcb_generic_iterator_t
10318 xcb_xkb_set_names_values_groups_end (const xcb_xkb_set_names_request_t *R  /**< */,
10319                                      const xcb_xkb_set_names_values_t *S  /**< */)
10320 {
10321     xcb_generic_iterator_t i;
10322     i.data = /* values */ S->groups + xcb_popcount(R->groupNames);
10323     i.rem = 0;
10324     i.index = (char *) i.data - (char *) S;
10325     return i;
10326 }
10327 
10328 
10329 /*****************************************************************************
10330  **
10331  ** xcb_xkb_key_name_t * xcb_xkb_set_names_values_key_names
10332  **
10333  ** @param const xcb_xkb_set_names_values_t *S
10334  ** @returns xcb_xkb_key_name_t *
10335  **
10336  *****************************************************************************/
10337 
10338 xcb_xkb_key_name_t *
10339 xcb_xkb_set_names_values_key_names (const xcb_xkb_set_names_values_t *S  /**< */)
10340 {
10341     return /* values */ S->keyNames;
10342 }
10343 
10344 
10345 /*****************************************************************************
10346  **
10347  ** int xcb_xkb_set_names_values_key_names_length
10348  **
10349  ** @param const xcb_xkb_set_names_values_t *R
10350  ** @returns int
10351  **
10352  *****************************************************************************/
10353 
10354 int
10355 xcb_xkb_set_names_values_key_names_length (const xcb_xkb_set_names_request_t *R  /**< */,
10356                                            const xcb_xkb_set_names_values_t *S  /**< */)
10357 {
10358     return R->nKeys;
10359 }
10360 
10361 
10362 /*****************************************************************************
10363  **
10364  ** xcb_xkb_key_name_iterator_t xcb_xkb_set_names_values_key_names_iterator
10365  **
10366  ** @param const xcb_xkb_set_names_values_t *R
10367  ** @returns xcb_xkb_key_name_iterator_t
10368  **
10369  *****************************************************************************/
10370 
10371 xcb_xkb_key_name_iterator_t
10372 xcb_xkb_set_names_values_key_names_iterator (const xcb_xkb_set_names_request_t *R  /**< */,
10373                                              const xcb_xkb_set_names_values_t *S  /**< */)
10374 {
10375     xcb_xkb_key_name_iterator_t i;
10376     i.data = /* values */ S->keyNames;
10377     i.rem = R->nKeys;
10378     i.index = (char *) i.data - (char *) S;
10379     return i;
10380 }
10381 
10382 
10383 /*****************************************************************************
10384  **
10385  ** xcb_xkb_key_alias_t * xcb_xkb_set_names_values_key_aliases
10386  **
10387  ** @param const xcb_xkb_set_names_values_t *S
10388  ** @returns xcb_xkb_key_alias_t *
10389  **
10390  *****************************************************************************/
10391 
10392 xcb_xkb_key_alias_t *
10393 xcb_xkb_set_names_values_key_aliases (const xcb_xkb_set_names_values_t *S  /**< */)
10394 {
10395     return /* values */ S->keyAliases;
10396 }
10397 
10398 
10399 /*****************************************************************************
10400  **
10401  ** int xcb_xkb_set_names_values_key_aliases_length
10402  **
10403  ** @param const xcb_xkb_set_names_values_t *R
10404  ** @returns int
10405  **
10406  *****************************************************************************/
10407 
10408 int
10409 xcb_xkb_set_names_values_key_aliases_length (const xcb_xkb_set_names_request_t *R  /**< */,
10410                                              const xcb_xkb_set_names_values_t *S  /**< */)
10411 {
10412     return R->nKeyAliases;
10413 }
10414 
10415 
10416 /*****************************************************************************
10417  **
10418  ** xcb_xkb_key_alias_iterator_t xcb_xkb_set_names_values_key_aliases_iterator
10419  **
10420  ** @param const xcb_xkb_set_names_values_t *R
10421  ** @returns xcb_xkb_key_alias_iterator_t
10422  **
10423  *****************************************************************************/
10424 
10425 xcb_xkb_key_alias_iterator_t
10426 xcb_xkb_set_names_values_key_aliases_iterator (const xcb_xkb_set_names_request_t *R  /**< */,
10427                                                const xcb_xkb_set_names_values_t *S  /**< */)
10428 {
10429     xcb_xkb_key_alias_iterator_t i;
10430     i.data = /* values */ S->keyAliases;
10431     i.rem = R->nKeyAliases;
10432     i.index = (char *) i.data - (char *) S;
10433     return i;
10434 }
10435 
10436 
10437 /*****************************************************************************
10438  **
10439  ** xcb_atom_t * xcb_xkb_set_names_values_radio_group_names
10440  **
10441  ** @param const xcb_xkb_set_names_values_t *S
10442  ** @returns xcb_atom_t *
10443  **
10444  *****************************************************************************/
10445 
10446 xcb_atom_t *
10447 xcb_xkb_set_names_values_radio_group_names (const xcb_xkb_set_names_values_t *S  /**< */)
10448 {
10449     return /* values */ S->radioGroupNames;
10450 }
10451 
10452 
10453 /*****************************************************************************
10454  **
10455  ** int xcb_xkb_set_names_values_radio_group_names_length
10456  **
10457  ** @param const xcb_xkb_set_names_values_t *R
10458  ** @returns int
10459  **
10460  *****************************************************************************/
10461 
10462 int
10463 xcb_xkb_set_names_values_radio_group_names_length (const xcb_xkb_set_names_request_t *R  /**< */,
10464                                                    const xcb_xkb_set_names_values_t *S  /**< */)
10465 {
10466     return R->nRadioGroups;
10467 }
10468 
10469 
10470 /*****************************************************************************
10471  **
10472  ** xcb_generic_iterator_t xcb_xkb_set_names_values_radio_group_names_end
10473  **
10474  ** @param const xcb_xkb_set_names_values_t *R
10475  ** @returns xcb_generic_iterator_t
10476  **
10477  *****************************************************************************/
10478 
10479 xcb_generic_iterator_t
10480 xcb_xkb_set_names_values_radio_group_names_end (const xcb_xkb_set_names_request_t *R  /**< */,
10481                                                 const xcb_xkb_set_names_values_t *S  /**< */)
10482 {
10483     xcb_generic_iterator_t i;
10484     i.data = /* values */ S->radioGroupNames + R->nRadioGroups;
10485     i.rem = 0;
10486     i.index = (char *) i.data - (char *) S;
10487     return i;
10488 }
10489 
10490 int
10491 xcb_xkb_set_names_values_serialize (void                             **_buffer  /**< */,
10492                                     uint8_t                            nTypes  /**< */,
10493                                     uint8_t                            nKTLevels  /**< */,
10494                                     uint32_t                           indicators  /**< */,
10495                                     uint16_t                           virtualMods  /**< */,
10496                                     uint8_t                            groupNames  /**< */,
10497                                     uint8_t                            nKeys  /**< */,
10498                                     uint8_t                            nKeyAliases  /**< */,
10499                                     uint8_t                            nRadioGroups  /**< */,
10500                                     uint32_t                           which  /**< */,
10501                                     const xcb_xkb_set_names_values_t  *_aux  /**< */)
10502 {
10503     char *xcb_out = *_buffer;
10504     unsigned int xcb_buffer_len = 0;
10505     unsigned int xcb_align_to = 0;
10506 
10507     unsigned int xcb_pad = 0;
10508     char xcb_pad0[3] = {0, 0, 0};
10509     struct iovec xcb_parts[25];
10510     unsigned int xcb_parts_idx = 0;
10511     unsigned int xcb_block_len = 0;
10512     unsigned int i;
10513     char *xcb_tmp;
10514 
10515     if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
10516         /* xcb_xkb_set_names_values_t.keycodesName */
10517         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
10518         xcb_block_len += sizeof(xcb_atom_t);
10519         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
10520         xcb_parts_idx++;
10521         xcb_align_to = ALIGNOF(xcb_atom_t);
10522     }
10523     if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
10524         /* xcb_xkb_set_names_values_t.geometryName */
10525         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
10526         xcb_block_len += sizeof(xcb_atom_t);
10527         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
10528         xcb_parts_idx++;
10529         xcb_align_to = ALIGNOF(xcb_atom_t);
10530     }
10531     if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
10532         /* xcb_xkb_set_names_values_t.symbolsName */
10533         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
10534         xcb_block_len += sizeof(xcb_atom_t);
10535         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
10536         xcb_parts_idx++;
10537         xcb_align_to = ALIGNOF(xcb_atom_t);
10538     }
10539     if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
10540         /* xcb_xkb_set_names_values_t.physSymbolsName */
10541         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
10542         xcb_block_len += sizeof(xcb_atom_t);
10543         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
10544         xcb_parts_idx++;
10545         xcb_align_to = ALIGNOF(xcb_atom_t);
10546     }
10547     if(which & XCB_XKB_NAME_DETAIL_TYPES) {
10548         /* xcb_xkb_set_names_values_t.typesName */
10549         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
10550         xcb_block_len += sizeof(xcb_atom_t);
10551         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
10552         xcb_parts_idx++;
10553         xcb_align_to = ALIGNOF(xcb_atom_t);
10554     }
10555     if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
10556         /* xcb_xkb_set_names_values_t.compatName */
10557         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
10558         xcb_block_len += sizeof(xcb_atom_t);
10559         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
10560         xcb_parts_idx++;
10561         xcb_align_to = ALIGNOF(xcb_atom_t);
10562     }
10563     if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
10564         /* insert padding */
10565         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10566         xcb_buffer_len += xcb_block_len + xcb_pad;
10567         if (0 != xcb_pad) {
10568             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10569             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10570             xcb_parts_idx++;
10571             xcb_pad = 0;
10572         }
10573         xcb_block_len = 0;
10574         /* typeNames */
10575         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
10576         xcb_block_len += nTypes * sizeof(xcb_atom_t);
10577         xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
10578         xcb_parts_idx++;
10579         xcb_align_to = ALIGNOF(xcb_atom_t);
10580     }
10581     if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
10582         /* insert padding */
10583         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10584         xcb_buffer_len += xcb_block_len + xcb_pad;
10585         if (0 != xcb_pad) {
10586             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10587             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10588             xcb_parts_idx++;
10589             xcb_pad = 0;
10590         }
10591         xcb_block_len = 0;
10592         /* nLevelsPerType */
10593         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
10594         xcb_block_len += nKTLevels * sizeof(uint8_t);
10595         xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t);
10596         xcb_parts_idx++;
10597         xcb_align_to = ALIGNOF(uint8_t);
10598         /* insert padding */
10599         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10600         xcb_buffer_len += xcb_block_len + xcb_pad;
10601         if (0 != xcb_pad) {
10602             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10603             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10604             xcb_parts_idx++;
10605             xcb_pad = 0;
10606         }
10607         xcb_block_len = 0;
10608         /* ktLevelNames */
10609         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
10610         xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
10611         xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
10612         xcb_parts_idx++;
10613         xcb_align_to = ALIGNOF(xcb_atom_t);
10614     }
10615     if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
10616         /* insert padding */
10617         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10618         xcb_buffer_len += xcb_block_len + xcb_pad;
10619         if (0 != xcb_pad) {
10620             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10621             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10622             xcb_parts_idx++;
10623             xcb_pad = 0;
10624         }
10625         xcb_block_len = 0;
10626         /* indicatorNames */
10627         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
10628         xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
10629         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
10630         xcb_parts_idx++;
10631         xcb_align_to = ALIGNOF(xcb_atom_t);
10632     }
10633     if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
10634         /* insert padding */
10635         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10636         xcb_buffer_len += xcb_block_len + xcb_pad;
10637         if (0 != xcb_pad) {
10638             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10639             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10640             xcb_parts_idx++;
10641             xcb_pad = 0;
10642         }
10643         xcb_block_len = 0;
10644         /* virtualModNames */
10645         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
10646         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
10647         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
10648         xcb_parts_idx++;
10649         xcb_align_to = ALIGNOF(xcb_atom_t);
10650     }
10651     if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
10652         /* insert padding */
10653         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10654         xcb_buffer_len += xcb_block_len + xcb_pad;
10655         if (0 != xcb_pad) {
10656             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10657             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10658             xcb_parts_idx++;
10659             xcb_pad = 0;
10660         }
10661         xcb_block_len = 0;
10662         /* groups */
10663         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
10664         xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
10665         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
10666         xcb_parts_idx++;
10667         xcb_align_to = ALIGNOF(xcb_atom_t);
10668     }
10669     if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
10670         /* insert padding */
10671         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10672         xcb_buffer_len += xcb_block_len + xcb_pad;
10673         if (0 != xcb_pad) {
10674             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10675             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10676             xcb_parts_idx++;
10677             xcb_pad = 0;
10678         }
10679         xcb_block_len = 0;
10680         /* keyNames */
10681         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
10682         xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
10683         xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
10684         xcb_parts_idx++;
10685         xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
10686     }
10687     if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
10688         /* insert padding */
10689         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10690         xcb_buffer_len += xcb_block_len + xcb_pad;
10691         if (0 != xcb_pad) {
10692             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10693             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10694             xcb_parts_idx++;
10695             xcb_pad = 0;
10696         }
10697         xcb_block_len = 0;
10698         /* keyAliases */
10699         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
10700         xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
10701         xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
10702         xcb_parts_idx++;
10703         xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
10704     }
10705     if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
10706         /* insert padding */
10707         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10708         xcb_buffer_len += xcb_block_len + xcb_pad;
10709         if (0 != xcb_pad) {
10710             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10711             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10712             xcb_parts_idx++;
10713             xcb_pad = 0;
10714         }
10715         xcb_block_len = 0;
10716         /* radioGroupNames */
10717         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
10718         xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
10719         xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
10720         xcb_parts_idx++;
10721         xcb_align_to = ALIGNOF(xcb_atom_t);
10722     }
10723     /* insert padding */
10724     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10725     xcb_buffer_len += xcb_block_len + xcb_pad;
10726     if (0 != xcb_pad) {
10727         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
10728         xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
10729         xcb_parts_idx++;
10730         xcb_pad = 0;
10731     }
10732     xcb_block_len = 0;
10733 
10734     if (NULL == xcb_out) {
10735         /* allocate memory */
10736         xcb_out = malloc(xcb_buffer_len);
10737         *_buffer = xcb_out;
10738     }
10739 
10740     xcb_tmp = xcb_out;
10741     for(i=0; i<xcb_parts_idx; i++) {
10742         if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
10743             memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
10744         if (0 != xcb_parts[i].iov_len)
10745             xcb_tmp += xcb_parts[i].iov_len;
10746     }
10747 
10748     return xcb_buffer_len;
10749 }
10750 
10751 int
10752 xcb_xkb_set_names_values_unpack (const void                  *_buffer  /**< */,
10753                                  uint8_t                      nTypes  /**< */,
10754                                  uint8_t                      nKTLevels  /**< */,
10755                                  uint32_t                     indicators  /**< */,
10756                                  uint16_t                     virtualMods  /**< */,
10757                                  uint8_t                      groupNames  /**< */,
10758                                  uint8_t                      nKeys  /**< */,
10759                                  uint8_t                      nKeyAliases  /**< */,
10760                                  uint8_t                      nRadioGroups  /**< */,
10761                                  uint32_t                     which  /**< */,
10762                                  xcb_xkb_set_names_values_t  *_aux  /**< */)
10763 {
10764     char *xcb_tmp = (char *)_buffer;
10765     unsigned int xcb_buffer_len = 0;
10766     unsigned int xcb_block_len = 0;
10767     unsigned int xcb_pad = 0;
10768     unsigned int xcb_align_to = 0;
10769 
10770 
10771     if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
10772         /* xcb_xkb_set_names_values_t.keycodesName */
10773         _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
10774         xcb_block_len += sizeof(xcb_atom_t);
10775         xcb_tmp += sizeof(xcb_atom_t);
10776         xcb_align_to = ALIGNOF(xcb_atom_t);
10777     }
10778     if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
10779         /* xcb_xkb_set_names_values_t.geometryName */
10780         _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
10781         xcb_block_len += sizeof(xcb_atom_t);
10782         xcb_tmp += sizeof(xcb_atom_t);
10783         xcb_align_to = ALIGNOF(xcb_atom_t);
10784     }
10785     if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
10786         /* xcb_xkb_set_names_values_t.symbolsName */
10787         _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
10788         xcb_block_len += sizeof(xcb_atom_t);
10789         xcb_tmp += sizeof(xcb_atom_t);
10790         xcb_align_to = ALIGNOF(xcb_atom_t);
10791     }
10792     if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
10793         /* xcb_xkb_set_names_values_t.physSymbolsName */
10794         _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
10795         xcb_block_len += sizeof(xcb_atom_t);
10796         xcb_tmp += sizeof(xcb_atom_t);
10797         xcb_align_to = ALIGNOF(xcb_atom_t);
10798     }
10799     if(which & XCB_XKB_NAME_DETAIL_TYPES) {
10800         /* xcb_xkb_set_names_values_t.typesName */
10801         _aux->typesName = *(xcb_atom_t *)xcb_tmp;
10802         xcb_block_len += sizeof(xcb_atom_t);
10803         xcb_tmp += sizeof(xcb_atom_t);
10804         xcb_align_to = ALIGNOF(xcb_atom_t);
10805     }
10806     if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
10807         /* xcb_xkb_set_names_values_t.compatName */
10808         _aux->compatName = *(xcb_atom_t *)xcb_tmp;
10809         xcb_block_len += sizeof(xcb_atom_t);
10810         xcb_tmp += sizeof(xcb_atom_t);
10811         xcb_align_to = ALIGNOF(xcb_atom_t);
10812     }
10813     if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
10814         /* insert padding */
10815         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10816         xcb_buffer_len += xcb_block_len + xcb_pad;
10817         if (0 != xcb_pad) {
10818             xcb_tmp += xcb_pad;
10819             xcb_pad = 0;
10820         }
10821         xcb_block_len = 0;
10822         /* typeNames */
10823         _aux->typeNames = (xcb_atom_t *)xcb_tmp;
10824         xcb_block_len += nTypes * sizeof(xcb_atom_t);
10825         xcb_tmp += xcb_block_len;
10826         xcb_align_to = ALIGNOF(xcb_atom_t);
10827     }
10828     if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
10829         /* insert padding */
10830         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10831         xcb_buffer_len += xcb_block_len + xcb_pad;
10832         if (0 != xcb_pad) {
10833             xcb_tmp += xcb_pad;
10834             xcb_pad = 0;
10835         }
10836         xcb_block_len = 0;
10837         /* nLevelsPerType */
10838         _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
10839         xcb_block_len += nKTLevels * sizeof(uint8_t);
10840         xcb_tmp += xcb_block_len;
10841         xcb_align_to = ALIGNOF(uint8_t);
10842         /* insert padding */
10843         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10844         xcb_buffer_len += xcb_block_len + xcb_pad;
10845         if (0 != xcb_pad) {
10846             xcb_tmp += xcb_pad;
10847             xcb_pad = 0;
10848         }
10849         xcb_block_len = 0;
10850         /* ktLevelNames */
10851         _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
10852         xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
10853         xcb_tmp += xcb_block_len;
10854         xcb_align_to = ALIGNOF(xcb_atom_t);
10855     }
10856     if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
10857         /* insert padding */
10858         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10859         xcb_buffer_len += xcb_block_len + xcb_pad;
10860         if (0 != xcb_pad) {
10861             xcb_tmp += xcb_pad;
10862             xcb_pad = 0;
10863         }
10864         xcb_block_len = 0;
10865         /* indicatorNames */
10866         _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
10867         xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
10868         xcb_tmp += xcb_block_len;
10869         xcb_align_to = ALIGNOF(xcb_atom_t);
10870     }
10871     if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
10872         /* insert padding */
10873         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10874         xcb_buffer_len += xcb_block_len + xcb_pad;
10875         if (0 != xcb_pad) {
10876             xcb_tmp += xcb_pad;
10877             xcb_pad = 0;
10878         }
10879         xcb_block_len = 0;
10880         /* virtualModNames */
10881         _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
10882         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
10883         xcb_tmp += xcb_block_len;
10884         xcb_align_to = ALIGNOF(xcb_atom_t);
10885     }
10886     if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
10887         /* insert padding */
10888         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10889         xcb_buffer_len += xcb_block_len + xcb_pad;
10890         if (0 != xcb_pad) {
10891             xcb_tmp += xcb_pad;
10892             xcb_pad = 0;
10893         }
10894         xcb_block_len = 0;
10895         /* groups */
10896         _aux->groups = (xcb_atom_t *)xcb_tmp;
10897         xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
10898         xcb_tmp += xcb_block_len;
10899         xcb_align_to = ALIGNOF(xcb_atom_t);
10900     }
10901     if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
10902         /* insert padding */
10903         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10904         xcb_buffer_len += xcb_block_len + xcb_pad;
10905         if (0 != xcb_pad) {
10906             xcb_tmp += xcb_pad;
10907             xcb_pad = 0;
10908         }
10909         xcb_block_len = 0;
10910         /* keyNames */
10911         _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
10912         xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
10913         xcb_tmp += xcb_block_len;
10914         xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
10915     }
10916     if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
10917         /* insert padding */
10918         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10919         xcb_buffer_len += xcb_block_len + xcb_pad;
10920         if (0 != xcb_pad) {
10921             xcb_tmp += xcb_pad;
10922             xcb_pad = 0;
10923         }
10924         xcb_block_len = 0;
10925         /* keyAliases */
10926         _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
10927         xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
10928         xcb_tmp += xcb_block_len;
10929         xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
10930     }
10931     if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
10932         /* insert padding */
10933         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10934         xcb_buffer_len += xcb_block_len + xcb_pad;
10935         if (0 != xcb_pad) {
10936             xcb_tmp += xcb_pad;
10937             xcb_pad = 0;
10938         }
10939         xcb_block_len = 0;
10940         /* radioGroupNames */
10941         _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
10942         xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
10943         xcb_tmp += xcb_block_len;
10944         xcb_align_to = ALIGNOF(xcb_atom_t);
10945     }
10946     /* insert padding */
10947     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10948     xcb_buffer_len += xcb_block_len + xcb_pad;
10949     if (0 != xcb_pad) {
10950         xcb_tmp += xcb_pad;
10951         xcb_pad = 0;
10952     }
10953     xcb_block_len = 0;
10954 
10955     return xcb_buffer_len;
10956 }
10957 
10958 int
10959 xcb_xkb_set_names_values_sizeof (const void  *_buffer  /**< */,
10960                                  uint8_t      nTypes  /**< */,
10961                                  uint8_t      nKTLevels  /**< */,
10962                                  uint32_t     indicators  /**< */,
10963                                  uint16_t     virtualMods  /**< */,
10964                                  uint8_t      groupNames  /**< */,
10965                                  uint8_t      nKeys  /**< */,
10966                                  uint8_t      nKeyAliases  /**< */,
10967                                  uint8_t      nRadioGroups  /**< */,
10968                                  uint32_t     which  /**< */)
10969 {
10970     xcb_xkb_set_names_values_t _aux;
10971     return xcb_xkb_set_names_values_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
10972 }
10973 
10974 
10975 /*****************************************************************************
10976  **
10977  ** xcb_void_cookie_t xcb_xkb_set_names_checked
10978  **
10979  ** @param xcb_connection_t      *c
10980  ** @param xcb_xkb_device_spec_t  deviceSpec
10981  ** @param uint16_t               virtualMods
10982  ** @param uint32_t               which
10983  ** @param uint8_t                firstType
10984  ** @param uint8_t                nTypes
10985  ** @param uint8_t                firstKTLevelt
10986  ** @param uint8_t                nKTLevels
10987  ** @param uint32_t               indicators
10988  ** @param uint8_t                groupNames
10989  ** @param uint8_t                nRadioGroups
10990  ** @param xcb_keycode_t          firstKey
10991  ** @param uint8_t                nKeys
10992  ** @param uint8_t                nKeyAliases
10993  ** @param uint16_t               totalKTLevelNames
10994  ** @param const void            *values
10995  ** @returns xcb_void_cookie_t
10996  **
10997  *****************************************************************************/
10998 
10999 xcb_void_cookie_t
11000 xcb_xkb_set_names_checked (xcb_connection_t      *c  /**< */,
11001                            xcb_xkb_device_spec_t  deviceSpec  /**< */,
11002                            uint16_t               virtualMods  /**< */,
11003                            uint32_t               which  /**< */,
11004                            uint8_t                firstType  /**< */,
11005                            uint8_t                nTypes  /**< */,
11006                            uint8_t                firstKTLevelt  /**< */,
11007                            uint8_t                nKTLevels  /**< */,
11008                            uint32_t               indicators  /**< */,
11009                            uint8_t                groupNames  /**< */,
11010                            uint8_t                nRadioGroups  /**< */,
11011                            xcb_keycode_t          firstKey  /**< */,
11012                            uint8_t                nKeys  /**< */,
11013                            uint8_t                nKeyAliases  /**< */,
11014                            uint16_t               totalKTLevelNames  /**< */,
11015                            const void            *values  /**< */)
11016 {
11017     static const xcb_protocol_request_t xcb_req = {
11018         /* count */ 3,
11019         /* ext */ &xcb_xkb_id,
11020         /* opcode */ XCB_XKB_SET_NAMES,
11021         /* isvoid */ 1
11022     };
11023 
11024     struct iovec xcb_parts[5];
11025     xcb_void_cookie_t xcb_ret;
11026     xcb_xkb_set_names_request_t xcb_out;
11027 
11028     xcb_out.deviceSpec = deviceSpec;
11029     xcb_out.virtualMods = virtualMods;
11030     xcb_out.which = which;
11031     xcb_out.firstType = firstType;
11032     xcb_out.nTypes = nTypes;
11033     xcb_out.firstKTLevelt = firstKTLevelt;
11034     xcb_out.nKTLevels = nKTLevels;
11035     xcb_out.indicators = indicators;
11036     xcb_out.groupNames = groupNames;
11037     xcb_out.nRadioGroups = nRadioGroups;
11038     xcb_out.firstKey = firstKey;
11039     xcb_out.nKeys = nKeys;
11040     xcb_out.nKeyAliases = nKeyAliases;
11041     xcb_out.pad0 = 0;
11042     xcb_out.totalKTLevelNames = totalKTLevelNames;
11043 
11044     xcb_parts[2].iov_base = (char *) &xcb_out;
11045     xcb_parts[2].iov_len = sizeof(xcb_out);
11046     xcb_parts[3].iov_base = 0;
11047     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11048     /* xcb_xkb_set_names_values_t values */
11049     xcb_parts[4].iov_base = (char *) values;
11050     xcb_parts[4].iov_len =
11051       xcb_xkb_set_names_values_sizeof (values, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which);
11052 
11053     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11054     return xcb_ret;
11055 }
11056 
11057 
11058 /*****************************************************************************
11059  **
11060  ** xcb_void_cookie_t xcb_xkb_set_names
11061  **
11062  ** @param xcb_connection_t      *c
11063  ** @param xcb_xkb_device_spec_t  deviceSpec
11064  ** @param uint16_t               virtualMods
11065  ** @param uint32_t               which
11066  ** @param uint8_t                firstType
11067  ** @param uint8_t                nTypes
11068  ** @param uint8_t                firstKTLevelt
11069  ** @param uint8_t                nKTLevels
11070  ** @param uint32_t               indicators
11071  ** @param uint8_t                groupNames
11072  ** @param uint8_t                nRadioGroups
11073  ** @param xcb_keycode_t          firstKey
11074  ** @param uint8_t                nKeys
11075  ** @param uint8_t                nKeyAliases
11076  ** @param uint16_t               totalKTLevelNames
11077  ** @param const void            *values
11078  ** @returns xcb_void_cookie_t
11079  **
11080  *****************************************************************************/
11081 
11082 xcb_void_cookie_t
11083 xcb_xkb_set_names (xcb_connection_t      *c  /**< */,
11084                    xcb_xkb_device_spec_t  deviceSpec  /**< */,
11085                    uint16_t               virtualMods  /**< */,
11086                    uint32_t               which  /**< */,
11087                    uint8_t                firstType  /**< */,
11088                    uint8_t                nTypes  /**< */,
11089                    uint8_t                firstKTLevelt  /**< */,
11090                    uint8_t                nKTLevels  /**< */,
11091                    uint32_t               indicators  /**< */,
11092                    uint8_t                groupNames  /**< */,
11093                    uint8_t                nRadioGroups  /**< */,
11094                    xcb_keycode_t          firstKey  /**< */,
11095                    uint8_t                nKeys  /**< */,
11096                    uint8_t                nKeyAliases  /**< */,
11097                    uint16_t               totalKTLevelNames  /**< */,
11098                    const void            *values  /**< */)
11099 {
11100     static const xcb_protocol_request_t xcb_req = {
11101         /* count */ 3,
11102         /* ext */ &xcb_xkb_id,
11103         /* opcode */ XCB_XKB_SET_NAMES,
11104         /* isvoid */ 1
11105     };
11106 
11107     struct iovec xcb_parts[5];
11108     xcb_void_cookie_t xcb_ret;
11109     xcb_xkb_set_names_request_t xcb_out;
11110 
11111     xcb_out.deviceSpec = deviceSpec;
11112     xcb_out.virtualMods = virtualMods;
11113     xcb_out.which = which;
11114     xcb_out.firstType = firstType;
11115     xcb_out.nTypes = nTypes;
11116     xcb_out.firstKTLevelt = firstKTLevelt;
11117     xcb_out.nKTLevels = nKTLevels;
11118     xcb_out.indicators = indicators;
11119     xcb_out.groupNames = groupNames;
11120     xcb_out.nRadioGroups = nRadioGroups;
11121     xcb_out.firstKey = firstKey;
11122     xcb_out.nKeys = nKeys;
11123     xcb_out.nKeyAliases = nKeyAliases;
11124     xcb_out.pad0 = 0;
11125     xcb_out.totalKTLevelNames = totalKTLevelNames;
11126 
11127     xcb_parts[2].iov_base = (char *) &xcb_out;
11128     xcb_parts[2].iov_len = sizeof(xcb_out);
11129     xcb_parts[3].iov_base = 0;
11130     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11131     /* xcb_xkb_set_names_values_t values */
11132     xcb_parts[4].iov_base = (char *) values;
11133     xcb_parts[4].iov_len =
11134       xcb_xkb_set_names_values_sizeof (values, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which);
11135 
11136     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11137     return xcb_ret;
11138 }
11139 
11140 
11141 /*****************************************************************************
11142  **
11143  ** xcb_void_cookie_t xcb_xkb_set_names_aux_checked
11144  **
11145  ** @param xcb_connection_t                 *c
11146  ** @param xcb_xkb_device_spec_t             deviceSpec
11147  ** @param uint16_t                          virtualMods
11148  ** @param uint32_t                          which
11149  ** @param uint8_t                           firstType
11150  ** @param uint8_t                           nTypes
11151  ** @param uint8_t                           firstKTLevelt
11152  ** @param uint8_t                           nKTLevels
11153  ** @param uint32_t                          indicators
11154  ** @param uint8_t                           groupNames
11155  ** @param uint8_t                           nRadioGroups
11156  ** @param xcb_keycode_t                     firstKey
11157  ** @param uint8_t                           nKeys
11158  ** @param uint8_t                           nKeyAliases
11159  ** @param uint16_t                          totalKTLevelNames
11160  ** @param const xcb_xkb_set_names_values_t *values
11161  ** @returns xcb_void_cookie_t
11162  **
11163  *****************************************************************************/
11164 
11165 xcb_void_cookie_t
11166 xcb_xkb_set_names_aux_checked (xcb_connection_t                 *c  /**< */,
11167                                xcb_xkb_device_spec_t             deviceSpec  /**< */,
11168                                uint16_t                          virtualMods  /**< */,
11169                                uint32_t                          which  /**< */,
11170                                uint8_t                           firstType  /**< */,
11171                                uint8_t                           nTypes  /**< */,
11172                                uint8_t                           firstKTLevelt  /**< */,
11173                                uint8_t                           nKTLevels  /**< */,
11174                                uint32_t                          indicators  /**< */,
11175                                uint8_t                           groupNames  /**< */,
11176                                uint8_t                           nRadioGroups  /**< */,
11177                                xcb_keycode_t                     firstKey  /**< */,
11178                                uint8_t                           nKeys  /**< */,
11179                                uint8_t                           nKeyAliases  /**< */,
11180                                uint16_t                          totalKTLevelNames  /**< */,
11181                                const xcb_xkb_set_names_values_t *values  /**< */)
11182 {
11183     static const xcb_protocol_request_t xcb_req = {
11184         /* count */ 3,
11185         /* ext */ &xcb_xkb_id,
11186         /* opcode */ XCB_XKB_SET_NAMES,
11187         /* isvoid */ 1
11188     };
11189 
11190     struct iovec xcb_parts[5];
11191     xcb_void_cookie_t xcb_ret;
11192     xcb_xkb_set_names_request_t xcb_out;
11193     void *xcb_aux0 = 0;
11194 
11195     xcb_out.deviceSpec = deviceSpec;
11196     xcb_out.virtualMods = virtualMods;
11197     xcb_out.which = which;
11198     xcb_out.firstType = firstType;
11199     xcb_out.nTypes = nTypes;
11200     xcb_out.firstKTLevelt = firstKTLevelt;
11201     xcb_out.nKTLevels = nKTLevels;
11202     xcb_out.indicators = indicators;
11203     xcb_out.groupNames = groupNames;
11204     xcb_out.nRadioGroups = nRadioGroups;
11205     xcb_out.firstKey = firstKey;
11206     xcb_out.nKeys = nKeys;
11207     xcb_out.nKeyAliases = nKeyAliases;
11208     xcb_out.pad0 = 0;
11209     xcb_out.totalKTLevelNames = totalKTLevelNames;
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     /* xcb_xkb_set_names_values_t values */
11216     xcb_parts[4].iov_len =
11217       xcb_xkb_set_names_values_serialize (&xcb_aux0, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, values);
11218     xcb_parts[4].iov_base = xcb_aux0;
11219 
11220     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11221     free(xcb_aux0);
11222     return xcb_ret;
11223 }
11224 
11225 
11226 /*****************************************************************************
11227  **
11228  ** xcb_void_cookie_t xcb_xkb_set_names_aux
11229  **
11230  ** @param xcb_connection_t                 *c
11231  ** @param xcb_xkb_device_spec_t             deviceSpec
11232  ** @param uint16_t                          virtualMods
11233  ** @param uint32_t                          which
11234  ** @param uint8_t                           firstType
11235  ** @param uint8_t                           nTypes
11236  ** @param uint8_t                           firstKTLevelt
11237  ** @param uint8_t                           nKTLevels
11238  ** @param uint32_t                          indicators
11239  ** @param uint8_t                           groupNames
11240  ** @param uint8_t                           nRadioGroups
11241  ** @param xcb_keycode_t                     firstKey
11242  ** @param uint8_t                           nKeys
11243  ** @param uint8_t                           nKeyAliases
11244  ** @param uint16_t                          totalKTLevelNames
11245  ** @param const xcb_xkb_set_names_values_t *values
11246  ** @returns xcb_void_cookie_t
11247  **
11248  *****************************************************************************/
11249 
11250 xcb_void_cookie_t
11251 xcb_xkb_set_names_aux (xcb_connection_t                 *c  /**< */,
11252                        xcb_xkb_device_spec_t             deviceSpec  /**< */,
11253                        uint16_t                          virtualMods  /**< */,
11254                        uint32_t                          which  /**< */,
11255                        uint8_t                           firstType  /**< */,
11256                        uint8_t                           nTypes  /**< */,
11257                        uint8_t                           firstKTLevelt  /**< */,
11258                        uint8_t                           nKTLevels  /**< */,
11259                        uint32_t                          indicators  /**< */,
11260                        uint8_t                           groupNames  /**< */,
11261                        uint8_t                           nRadioGroups  /**< */,
11262                        xcb_keycode_t                     firstKey  /**< */,
11263                        uint8_t                           nKeys  /**< */,
11264                        uint8_t                           nKeyAliases  /**< */,
11265                        uint16_t                          totalKTLevelNames  /**< */,
11266                        const xcb_xkb_set_names_values_t *values  /**< */)
11267 {
11268     static const xcb_protocol_request_t xcb_req = {
11269         /* count */ 3,
11270         /* ext */ &xcb_xkb_id,
11271         /* opcode */ XCB_XKB_SET_NAMES,
11272         /* isvoid */ 1
11273     };
11274 
11275     struct iovec xcb_parts[5];
11276     xcb_void_cookie_t xcb_ret;
11277     xcb_xkb_set_names_request_t xcb_out;
11278     void *xcb_aux0 = 0;
11279 
11280     xcb_out.deviceSpec = deviceSpec;
11281     xcb_out.virtualMods = virtualMods;
11282     xcb_out.which = which;
11283     xcb_out.firstType = firstType;
11284     xcb_out.nTypes = nTypes;
11285     xcb_out.firstKTLevelt = firstKTLevelt;
11286     xcb_out.nKTLevels = nKTLevels;
11287     xcb_out.indicators = indicators;
11288     xcb_out.groupNames = groupNames;
11289     xcb_out.nRadioGroups = nRadioGroups;
11290     xcb_out.firstKey = firstKey;
11291     xcb_out.nKeys = nKeys;
11292     xcb_out.nKeyAliases = nKeyAliases;
11293     xcb_out.pad0 = 0;
11294     xcb_out.totalKTLevelNames = totalKTLevelNames;
11295 
11296     xcb_parts[2].iov_base = (char *) &xcb_out;
11297     xcb_parts[2].iov_len = sizeof(xcb_out);
11298     xcb_parts[3].iov_base = 0;
11299     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11300     /* xcb_xkb_set_names_values_t values */
11301     xcb_parts[4].iov_len =
11302       xcb_xkb_set_names_values_serialize (&xcb_aux0, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, values);
11303     xcb_parts[4].iov_base = xcb_aux0;
11304 
11305     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11306     free(xcb_aux0);
11307     return xcb_ret;
11308 }
11309 
11310 
11311 /*****************************************************************************
11312  **
11313  ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags
11314  **
11315  ** @param xcb_connection_t      *c
11316  ** @param xcb_xkb_device_spec_t  deviceSpec
11317  ** @param uint32_t               change
11318  ** @param uint32_t               value
11319  ** @param uint32_t               ctrlsToChange
11320  ** @param uint32_t               autoCtrls
11321  ** @param uint32_t               autoCtrlsValues
11322  ** @returns xcb_xkb_per_client_flags_cookie_t
11323  **
11324  *****************************************************************************/
11325 
11326 xcb_xkb_per_client_flags_cookie_t
11327 xcb_xkb_per_client_flags (xcb_connection_t      *c  /**< */,
11328                           xcb_xkb_device_spec_t  deviceSpec  /**< */,
11329                           uint32_t               change  /**< */,
11330                           uint32_t               value  /**< */,
11331                           uint32_t               ctrlsToChange  /**< */,
11332                           uint32_t               autoCtrls  /**< */,
11333                           uint32_t               autoCtrlsValues  /**< */)
11334 {
11335     static const xcb_protocol_request_t xcb_req = {
11336         /* count */ 2,
11337         /* ext */ &xcb_xkb_id,
11338         /* opcode */ XCB_XKB_PER_CLIENT_FLAGS,
11339         /* isvoid */ 0
11340     };
11341 
11342     struct iovec xcb_parts[4];
11343     xcb_xkb_per_client_flags_cookie_t xcb_ret;
11344     xcb_xkb_per_client_flags_request_t xcb_out;
11345 
11346     xcb_out.deviceSpec = deviceSpec;
11347     memset(xcb_out.pad0, 0, 2);
11348     xcb_out.change = change;
11349     xcb_out.value = value;
11350     xcb_out.ctrlsToChange = ctrlsToChange;
11351     xcb_out.autoCtrls = autoCtrls;
11352     xcb_out.autoCtrlsValues = autoCtrlsValues;
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 
11359     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11360     return xcb_ret;
11361 }
11362 
11363 
11364 /*****************************************************************************
11365  **
11366  ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags_unchecked
11367  **
11368  ** @param xcb_connection_t      *c
11369  ** @param xcb_xkb_device_spec_t  deviceSpec
11370  ** @param uint32_t               change
11371  ** @param uint32_t               value
11372  ** @param uint32_t               ctrlsToChange
11373  ** @param uint32_t               autoCtrls
11374  ** @param uint32_t               autoCtrlsValues
11375  ** @returns xcb_xkb_per_client_flags_cookie_t
11376  **
11377  *****************************************************************************/
11378 
11379 xcb_xkb_per_client_flags_cookie_t
11380 xcb_xkb_per_client_flags_unchecked (xcb_connection_t      *c  /**< */,
11381                                     xcb_xkb_device_spec_t  deviceSpec  /**< */,
11382                                     uint32_t               change  /**< */,
11383                                     uint32_t               value  /**< */,
11384                                     uint32_t               ctrlsToChange  /**< */,
11385                                     uint32_t               autoCtrls  /**< */,
11386                                     uint32_t               autoCtrlsValues  /**< */)
11387 {
11388     static const xcb_protocol_request_t xcb_req = {
11389         /* count */ 2,
11390         /* ext */ &xcb_xkb_id,
11391         /* opcode */ XCB_XKB_PER_CLIENT_FLAGS,
11392         /* isvoid */ 0
11393     };
11394 
11395     struct iovec xcb_parts[4];
11396     xcb_xkb_per_client_flags_cookie_t xcb_ret;
11397     xcb_xkb_per_client_flags_request_t xcb_out;
11398 
11399     xcb_out.deviceSpec = deviceSpec;
11400     memset(xcb_out.pad0, 0, 2);
11401     xcb_out.change = change;
11402     xcb_out.value = value;
11403     xcb_out.ctrlsToChange = ctrlsToChange;
11404     xcb_out.autoCtrls = autoCtrls;
11405     xcb_out.autoCtrlsValues = autoCtrlsValues;
11406 
11407     xcb_parts[2].iov_base = (char *) &xcb_out;
11408     xcb_parts[2].iov_len = sizeof(xcb_out);
11409     xcb_parts[3].iov_base = 0;
11410     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11411 
11412     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11413     return xcb_ret;
11414 }
11415 
11416 
11417 /*****************************************************************************
11418  **
11419  ** xcb_xkb_per_client_flags_reply_t * xcb_xkb_per_client_flags_reply
11420  **
11421  ** @param xcb_connection_t                   *c
11422  ** @param xcb_xkb_per_client_flags_cookie_t   cookie
11423  ** @param xcb_generic_error_t               **e
11424  ** @returns xcb_xkb_per_client_flags_reply_t *
11425  **
11426  *****************************************************************************/
11427 
11428 xcb_xkb_per_client_flags_reply_t *
11429 xcb_xkb_per_client_flags_reply (xcb_connection_t                   *c  /**< */,
11430                                 xcb_xkb_per_client_flags_cookie_t   cookie  /**< */,
11431                                 xcb_generic_error_t               **e  /**< */)
11432 {
11433     return (xcb_xkb_per_client_flags_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
11434 }
11435 
11436 int
11437 xcb_xkb_list_components_sizeof (const void  *_buffer  /**< */)
11438 {
11439     char *xcb_tmp = (char *)_buffer;
11440     const xcb_xkb_list_components_reply_t *_aux = (xcb_xkb_list_components_reply_t *)_buffer;
11441     unsigned int xcb_buffer_len = 0;
11442     unsigned int xcb_block_len = 0;
11443     unsigned int xcb_pad = 0;
11444     unsigned int xcb_align_to = 0;
11445 
11446     unsigned int i;
11447     unsigned int xcb_tmp_len;
11448 
11449     xcb_block_len += sizeof(xcb_xkb_list_components_reply_t);
11450     xcb_tmp += xcb_block_len;
11451     xcb_buffer_len += xcb_block_len;
11452     xcb_block_len = 0;
11453     /* keymaps */
11454     for(i=0; i<_aux->nKeymaps; i++) {
11455         xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
11456         xcb_block_len += xcb_tmp_len;
11457         xcb_tmp += xcb_tmp_len;
11458     }
11459     xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
11460     /* insert padding */
11461     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
11462     xcb_buffer_len += xcb_block_len + xcb_pad;
11463     if (0 != xcb_pad) {
11464         xcb_tmp += xcb_pad;
11465         xcb_pad = 0;
11466     }
11467     xcb_block_len = 0;
11468     /* keycodes */
11469     for(i=0; i<_aux->nKeycodes; i++) {
11470         xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
11471         xcb_block_len += xcb_tmp_len;
11472         xcb_tmp += xcb_tmp_len;
11473     }
11474     xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
11475     /* insert padding */
11476     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
11477     xcb_buffer_len += xcb_block_len + xcb_pad;
11478     if (0 != xcb_pad) {
11479         xcb_tmp += xcb_pad;
11480         xcb_pad = 0;
11481     }
11482     xcb_block_len = 0;
11483     /* types */
11484     for(i=0; i<_aux->nTypes; i++) {
11485         xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
11486         xcb_block_len += xcb_tmp_len;
11487         xcb_tmp += xcb_tmp_len;
11488     }
11489     xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
11490     /* insert padding */
11491     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
11492     xcb_buffer_len += xcb_block_len + xcb_pad;
11493     if (0 != xcb_pad) {
11494         xcb_tmp += xcb_pad;
11495         xcb_pad = 0;
11496     }
11497     xcb_block_len = 0;
11498     /* compatMaps */
11499     for(i=0; i<_aux->nCompatMaps; i++) {
11500         xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
11501         xcb_block_len += xcb_tmp_len;
11502         xcb_tmp += xcb_tmp_len;
11503     }
11504     xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
11505     /* insert padding */
11506     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
11507     xcb_buffer_len += xcb_block_len + xcb_pad;
11508     if (0 != xcb_pad) {
11509         xcb_tmp += xcb_pad;
11510         xcb_pad = 0;
11511     }
11512     xcb_block_len = 0;
11513     /* symbols */
11514     for(i=0; i<_aux->nSymbols; i++) {
11515         xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
11516         xcb_block_len += xcb_tmp_len;
11517         xcb_tmp += xcb_tmp_len;
11518     }
11519     xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
11520     /* insert padding */
11521     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
11522     xcb_buffer_len += xcb_block_len + xcb_pad;
11523     if (0 != xcb_pad) {
11524         xcb_tmp += xcb_pad;
11525         xcb_pad = 0;
11526     }
11527     xcb_block_len = 0;
11528     /* geometries */
11529     for(i=0; i<_aux->nGeometries; i++) {
11530         xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
11531         xcb_block_len += xcb_tmp_len;
11532         xcb_tmp += xcb_tmp_len;
11533     }
11534     xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
11535     /* insert padding */
11536     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
11537     xcb_buffer_len += xcb_block_len + xcb_pad;
11538     if (0 != xcb_pad) {
11539         xcb_tmp += xcb_pad;
11540         xcb_pad = 0;
11541     }
11542     xcb_block_len = 0;
11543 
11544     return xcb_buffer_len;
11545 }
11546 
11547 
11548 /*****************************************************************************
11549  **
11550  ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components
11551  **
11552  ** @param xcb_connection_t      *c
11553  ** @param xcb_xkb_device_spec_t  deviceSpec
11554  ** @param uint16_t               maxNames
11555  ** @returns xcb_xkb_list_components_cookie_t
11556  **
11557  *****************************************************************************/
11558 
11559 xcb_xkb_list_components_cookie_t
11560 xcb_xkb_list_components (xcb_connection_t      *c  /**< */,
11561                          xcb_xkb_device_spec_t  deviceSpec  /**< */,
11562                          uint16_t               maxNames  /**< */)
11563 {
11564     static const xcb_protocol_request_t xcb_req = {
11565         /* count */ 2,
11566         /* ext */ &xcb_xkb_id,
11567         /* opcode */ XCB_XKB_LIST_COMPONENTS,
11568         /* isvoid */ 0
11569     };
11570 
11571     struct iovec xcb_parts[4];
11572     xcb_xkb_list_components_cookie_t xcb_ret;
11573     xcb_xkb_list_components_request_t xcb_out;
11574 
11575     xcb_out.deviceSpec = deviceSpec;
11576     xcb_out.maxNames = maxNames;
11577 
11578     xcb_parts[2].iov_base = (char *) &xcb_out;
11579     xcb_parts[2].iov_len = sizeof(xcb_out);
11580     xcb_parts[3].iov_base = 0;
11581     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11582 
11583     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
11584     return xcb_ret;
11585 }
11586 
11587 
11588 /*****************************************************************************
11589  **
11590  ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components_unchecked
11591  **
11592  ** @param xcb_connection_t      *c
11593  ** @param xcb_xkb_device_spec_t  deviceSpec
11594  ** @param uint16_t               maxNames
11595  ** @returns xcb_xkb_list_components_cookie_t
11596  **
11597  *****************************************************************************/
11598 
11599 xcb_xkb_list_components_cookie_t
11600 xcb_xkb_list_components_unchecked (xcb_connection_t      *c  /**< */,
11601                                    xcb_xkb_device_spec_t  deviceSpec  /**< */,
11602                                    uint16_t               maxNames  /**< */)
11603 {
11604     static const xcb_protocol_request_t xcb_req = {
11605         /* count */ 2,
11606         /* ext */ &xcb_xkb_id,
11607         /* opcode */ XCB_XKB_LIST_COMPONENTS,
11608         /* isvoid */ 0
11609     };
11610 
11611     struct iovec xcb_parts[4];
11612     xcb_xkb_list_components_cookie_t xcb_ret;
11613     xcb_xkb_list_components_request_t xcb_out;
11614 
11615     xcb_out.deviceSpec = deviceSpec;
11616     xcb_out.maxNames = maxNames;
11617 
11618     xcb_parts[2].iov_base = (char *) &xcb_out;
11619     xcb_parts[2].iov_len = sizeof(xcb_out);
11620     xcb_parts[3].iov_base = 0;
11621     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
11622 
11623     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
11624     return xcb_ret;
11625 }
11626 
11627 
11628 /*****************************************************************************
11629  **
11630  ** int xcb_xkb_list_components_keymaps_length
11631  **
11632  ** @param const xcb_xkb_list_components_reply_t *R
11633  ** @returns int
11634  **
11635  *****************************************************************************/
11636 
11637 int
11638 xcb_xkb_list_components_keymaps_length (const xcb_xkb_list_components_reply_t *R  /**< */)
11639 {
11640     return R->nKeymaps;
11641 }
11642 
11643 
11644 /*****************************************************************************
11645  **
11646  ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keymaps_iterator
11647  **
11648  ** @param const xcb_xkb_list_components_reply_t *R
11649  ** @returns xcb_xkb_listing_iterator_t
11650  **
11651  *****************************************************************************/
11652 
11653 xcb_xkb_listing_iterator_t
11654 xcb_xkb_list_components_keymaps_iterator (const xcb_xkb_list_components_reply_t *R  /**< */)
11655 {
11656     xcb_xkb_listing_iterator_t i;
11657     i.data = (xcb_xkb_listing_t *) (R + 1);
11658     i.rem = R->nKeymaps;
11659     i.index = (char *) i.data - (char *) R;
11660     return i;
11661 }
11662 
11663 
11664 /*****************************************************************************
11665  **
11666  ** int xcb_xkb_list_components_keycodes_length
11667  **
11668  ** @param const xcb_xkb_list_components_reply_t *R
11669  ** @returns int
11670  **
11671  *****************************************************************************/
11672 
11673 int
11674 xcb_xkb_list_components_keycodes_length (const xcb_xkb_list_components_reply_t *R  /**< */)
11675 {
11676     return R->nKeycodes;
11677 }
11678 
11679 
11680 /*****************************************************************************
11681  **
11682  ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keycodes_iterator
11683  **
11684  ** @param const xcb_xkb_list_components_reply_t *R
11685  ** @returns xcb_xkb_listing_iterator_t
11686  **
11687  *****************************************************************************/
11688 
11689 xcb_xkb_listing_iterator_t
11690 xcb_xkb_list_components_keycodes_iterator (const xcb_xkb_list_components_reply_t *R  /**< */)
11691 {
11692     xcb_xkb_listing_iterator_t i;
11693     xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_keymaps_iterator(R));
11694     i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
11695     i.rem = R->nKeycodes;
11696     i.index = (char *) i.data - (char *) R;
11697     return i;
11698 }
11699 
11700 
11701 /*****************************************************************************
11702  **
11703  ** int xcb_xkb_list_components_types_length
11704  **
11705  ** @param const xcb_xkb_list_components_reply_t *R
11706  ** @returns int
11707  **
11708  *****************************************************************************/
11709 
11710 int
11711 xcb_xkb_list_components_types_length (const xcb_xkb_list_components_reply_t *R  /**< */)
11712 {
11713     return R->nTypes;
11714 }
11715 
11716 
11717 /*****************************************************************************
11718  **
11719  ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_types_iterator
11720  **
11721  ** @param const xcb_xkb_list_components_reply_t *R
11722  ** @returns xcb_xkb_listing_iterator_t
11723  **
11724  *****************************************************************************/
11725 
11726 xcb_xkb_listing_iterator_t
11727 xcb_xkb_list_components_types_iterator (const xcb_xkb_list_components_reply_t *R  /**< */)
11728 {
11729     xcb_xkb_listing_iterator_t i;
11730     xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_keycodes_iterator(R));
11731     i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
11732     i.rem = R->nTypes;
11733     i.index = (char *) i.data - (char *) R;
11734     return i;
11735 }
11736 
11737 
11738 /*****************************************************************************
11739  **
11740  ** int xcb_xkb_list_components_compat_maps_length
11741  **
11742  ** @param const xcb_xkb_list_components_reply_t *R
11743  ** @returns int
11744  **
11745  *****************************************************************************/
11746 
11747 int
11748 xcb_xkb_list_components_compat_maps_length (const xcb_xkb_list_components_reply_t *R  /**< */)
11749 {
11750     return R->nCompatMaps;
11751 }
11752 
11753 
11754 /*****************************************************************************
11755  **
11756  ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_compat_maps_iterator
11757  **
11758  ** @param const xcb_xkb_list_components_reply_t *R
11759  ** @returns xcb_xkb_listing_iterator_t
11760  **
11761  *****************************************************************************/
11762 
11763 xcb_xkb_listing_iterator_t
11764 xcb_xkb_list_components_compat_maps_iterator (const xcb_xkb_list_components_reply_t *R  /**< */)
11765 {
11766     xcb_xkb_listing_iterator_t i;
11767     xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_types_iterator(R));
11768     i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
11769     i.rem = R->nCompatMaps;
11770     i.index = (char *) i.data - (char *) R;
11771     return i;
11772 }
11773 
11774 
11775 /*****************************************************************************
11776  **
11777  ** int xcb_xkb_list_components_symbols_length
11778  **
11779  ** @param const xcb_xkb_list_components_reply_t *R
11780  ** @returns int
11781  **
11782  *****************************************************************************/
11783 
11784 int
11785 xcb_xkb_list_components_symbols_length (const xcb_xkb_list_components_reply_t *R  /**< */)
11786 {
11787     return R->nSymbols;
11788 }
11789 
11790 
11791 /*****************************************************************************
11792  **
11793  ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_symbols_iterator
11794  **
11795  ** @param const xcb_xkb_list_components_reply_t *R
11796  ** @returns xcb_xkb_listing_iterator_t
11797  **
11798  *****************************************************************************/
11799 
11800 xcb_xkb_listing_iterator_t
11801 xcb_xkb_list_components_symbols_iterator (const xcb_xkb_list_components_reply_t *R  /**< */)
11802 {
11803     xcb_xkb_listing_iterator_t i;
11804     xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_compat_maps_iterator(R));
11805     i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
11806     i.rem = R->nSymbols;
11807     i.index = (char *) i.data - (char *) R;
11808     return i;
11809 }
11810 
11811 
11812 /*****************************************************************************
11813  **
11814  ** int xcb_xkb_list_components_geometries_length
11815  **
11816  ** @param const xcb_xkb_list_components_reply_t *R
11817  ** @returns int
11818  **
11819  *****************************************************************************/
11820 
11821 int
11822 xcb_xkb_list_components_geometries_length (const xcb_xkb_list_components_reply_t *R  /**< */)
11823 {
11824     return R->nGeometries;
11825 }
11826 
11827 
11828 /*****************************************************************************
11829  **
11830  ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_geometries_iterator
11831  **
11832  ** @param const xcb_xkb_list_components_reply_t *R
11833  ** @returns xcb_xkb_listing_iterator_t
11834  **
11835  *****************************************************************************/
11836 
11837 xcb_xkb_listing_iterator_t
11838 xcb_xkb_list_components_geometries_iterator (const xcb_xkb_list_components_reply_t *R  /**< */)
11839 {
11840     xcb_xkb_listing_iterator_t i;
11841     xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_symbols_iterator(R));
11842     i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
11843     i.rem = R->nGeometries;
11844     i.index = (char *) i.data - (char *) R;
11845     return i;
11846 }
11847 
11848 
11849 /*****************************************************************************
11850  **
11851  ** xcb_xkb_list_components_reply_t * xcb_xkb_list_components_reply
11852  **
11853  ** @param xcb_connection_t                  *c
11854  ** @param xcb_xkb_list_components_cookie_t   cookie
11855  ** @param xcb_generic_error_t              **e
11856  ** @returns xcb_xkb_list_components_reply_t *
11857  **
11858  *****************************************************************************/
11859 
11860 xcb_xkb_list_components_reply_t *
11861 xcb_xkb_list_components_reply (xcb_connection_t                  *c  /**< */,
11862                                xcb_xkb_list_components_cookie_t   cookie  /**< */,
11863                                xcb_generic_error_t              **e  /**< */)
11864 {
11865     return (xcb_xkb_list_components_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
11866 }
11867 
11868 
11869 /*****************************************************************************
11870  **
11871  ** int xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length
11872  **
11873  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
11874  ** @returns int
11875  **
11876  *****************************************************************************/
11877 
11878 int
11879 xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
11880                                                              const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
11881 {
11882     return /* replies */ S->types.nTypes;
11883 }
11884 
11885 
11886 /*****************************************************************************
11887  **
11888  ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator
11889  **
11890  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
11891  ** @returns xcb_xkb_key_type_iterator_t
11892  **
11893  *****************************************************************************/
11894 
11895 xcb_xkb_key_type_iterator_t
11896 xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
11897                                                                const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
11898 {
11899     xcb_xkb_key_type_iterator_t i;
11900     i.data = /* replies */ S->types.map.types_rtrn;
11901     i.rem = /* replies */ S->types.nTypes;
11902     i.index = (char *) i.data - (char *) S;
11903     return i;
11904 }
11905 
11906 
11907 /*****************************************************************************
11908  **
11909  ** int xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length
11910  **
11911  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
11912  ** @returns int
11913  **
11914  *****************************************************************************/
11915 
11916 int
11917 xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
11918                                                             const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
11919 {
11920     return /* replies */ S->types.nKeySyms;
11921 }
11922 
11923 
11924 /*****************************************************************************
11925  **
11926  ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator
11927  **
11928  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
11929  ** @returns xcb_xkb_key_sym_map_iterator_t
11930  **
11931  *****************************************************************************/
11932 
11933 xcb_xkb_key_sym_map_iterator_t
11934 xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
11935                                                               const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
11936 {
11937     xcb_xkb_key_sym_map_iterator_t i;
11938     i.data = /* replies */ S->types.map.syms_rtrn;
11939     i.rem = /* replies */ S->types.nKeySyms;
11940     i.index = (char *) i.data - (char *) S;
11941     return i;
11942 }
11943 
11944 
11945 /*****************************************************************************
11946  **
11947  ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count
11948  **
11949  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
11950  ** @returns uint8_t *
11951  **
11952  *****************************************************************************/
11953 
11954 uint8_t *
11955 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
11956 {
11957     return /* replies */ S->types.map.acts_rtrn_count;
11958 }
11959 
11960 
11961 /*****************************************************************************
11962  **
11963  ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length
11964  **
11965  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
11966  ** @returns int
11967  **
11968  *****************************************************************************/
11969 
11970 int
11971 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
11972                                                                   const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
11973 {
11974     return /* replies */ S->types.nKeyActions;
11975 }
11976 
11977 
11978 /*****************************************************************************
11979  **
11980  ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end
11981  **
11982  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
11983  ** @returns xcb_generic_iterator_t
11984  **
11985  *****************************************************************************/
11986 
11987 xcb_generic_iterator_t
11988 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
11989                                                                const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
11990 {
11991     xcb_generic_iterator_t i;
11992     i.data = /* replies */ S->types.map.acts_rtrn_count + /* replies */ S->types.nKeyActions;
11993     i.rem = 0;
11994     i.index = (char *) i.data - (char *) S;
11995     return i;
11996 }
11997 
11998 
11999 /*****************************************************************************
12000  **
12001  ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts
12002  **
12003  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12004  ** @returns xcb_xkb_action_t *
12005  **
12006  *****************************************************************************/
12007 
12008 xcb_xkb_action_t *
12009 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12010 {
12011     return /* replies */ S->types.map.acts_rtrn_acts;
12012 }
12013 
12014 
12015 /*****************************************************************************
12016  **
12017  ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length
12018  **
12019  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12020  ** @returns int
12021  **
12022  *****************************************************************************/
12023 
12024 int
12025 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12026                                                                  const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12027 {
12028     return /* replies */ S->types.totalActions;
12029 }
12030 
12031 
12032 /*****************************************************************************
12033  **
12034  ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator
12035  **
12036  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12037  ** @returns xcb_xkb_action_iterator_t
12038  **
12039  *****************************************************************************/
12040 
12041 xcb_xkb_action_iterator_t
12042 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12043                                                                    const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12044 {
12045     xcb_xkb_action_iterator_t i;
12046     i.data = /* replies */ S->types.map.acts_rtrn_acts;
12047     i.rem = /* replies */ S->types.totalActions;
12048     i.index = (char *) i.data - (char *) S;
12049     return i;
12050 }
12051 
12052 
12053 /*****************************************************************************
12054  **
12055  ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn
12056  **
12057  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12058  ** @returns xcb_xkb_set_behavior_t *
12059  **
12060  *****************************************************************************/
12061 
12062 xcb_xkb_set_behavior_t *
12063 xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12064 {
12065     return /* replies */ S->types.map.behaviors_rtrn;
12066 }
12067 
12068 
12069 /*****************************************************************************
12070  **
12071  ** int xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length
12072  **
12073  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12074  ** @returns int
12075  **
12076  *****************************************************************************/
12077 
12078 int
12079 xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12080                                                                  const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12081 {
12082     return /* replies */ S->types.totalKeyBehaviors;
12083 }
12084 
12085 
12086 /*****************************************************************************
12087  **
12088  ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator
12089  **
12090  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12091  ** @returns xcb_xkb_set_behavior_iterator_t
12092  **
12093  *****************************************************************************/
12094 
12095 xcb_xkb_set_behavior_iterator_t
12096 xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12097                                                                    const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12098 {
12099     xcb_xkb_set_behavior_iterator_t i;
12100     i.data = /* replies */ S->types.map.behaviors_rtrn;
12101     i.rem = /* replies */ S->types.totalKeyBehaviors;
12102     i.index = (char *) i.data - (char *) S;
12103     return i;
12104 }
12105 
12106 
12107 /*****************************************************************************
12108  **
12109  ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn
12110  **
12111  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12112  ** @returns uint8_t *
12113  **
12114  *****************************************************************************/
12115 
12116 uint8_t *
12117 xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12118 {
12119     return /* replies */ S->types.map.vmods_rtrn;
12120 }
12121 
12122 
12123 /*****************************************************************************
12124  **
12125  ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length
12126  **
12127  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12128  ** @returns int
12129  **
12130  *****************************************************************************/
12131 
12132 int
12133 xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12134                                                              const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12135 {
12136     return xcb_popcount(/* replies */ S->types.virtualMods);
12137 }
12138 
12139 
12140 /*****************************************************************************
12141  **
12142  ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end
12143  **
12144  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12145  ** @returns xcb_generic_iterator_t
12146  **
12147  *****************************************************************************/
12148 
12149 xcb_generic_iterator_t
12150 xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12151                                                           const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12152 {
12153     xcb_generic_iterator_t i;
12154     i.data = /* replies */ S->types.map.vmods_rtrn + xcb_popcount(/* replies */ S->types.virtualMods);
12155     i.rem = 0;
12156     i.index = (char *) i.data - (char *) S;
12157     return i;
12158 }
12159 
12160 
12161 /*****************************************************************************
12162  **
12163  ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn
12164  **
12165  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12166  ** @returns xcb_xkb_set_explicit_t *
12167  **
12168  *****************************************************************************/
12169 
12170 xcb_xkb_set_explicit_t *
12171 xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12172 {
12173     return /* replies */ S->types.map.explicit_rtrn;
12174 }
12175 
12176 
12177 /*****************************************************************************
12178  **
12179  ** int xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length
12180  **
12181  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12182  ** @returns int
12183  **
12184  *****************************************************************************/
12185 
12186 int
12187 xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12188                                                                 const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12189 {
12190     return /* replies */ S->types.totalKeyExplicit;
12191 }
12192 
12193 
12194 /*****************************************************************************
12195  **
12196  ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator
12197  **
12198  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12199  ** @returns xcb_xkb_set_explicit_iterator_t
12200  **
12201  *****************************************************************************/
12202 
12203 xcb_xkb_set_explicit_iterator_t
12204 xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12205                                                                   const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12206 {
12207     xcb_xkb_set_explicit_iterator_t i;
12208     i.data = /* replies */ S->types.map.explicit_rtrn;
12209     i.rem = /* replies */ S->types.totalKeyExplicit;
12210     i.index = (char *) i.data - (char *) S;
12211     return i;
12212 }
12213 
12214 
12215 /*****************************************************************************
12216  **
12217  ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn
12218  **
12219  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12220  ** @returns xcb_xkb_key_mod_map_t *
12221  **
12222  *****************************************************************************/
12223 
12224 xcb_xkb_key_mod_map_t *
12225 xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12226 {
12227     return /* replies */ S->types.map.modmap_rtrn;
12228 }
12229 
12230 
12231 /*****************************************************************************
12232  **
12233  ** int xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length
12234  **
12235  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12236  ** @returns int
12237  **
12238  *****************************************************************************/
12239 
12240 int
12241 xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12242                                                               const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12243 {
12244     return /* replies */ S->types.totalModMapKeys;
12245 }
12246 
12247 
12248 /*****************************************************************************
12249  **
12250  ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator
12251  **
12252  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12253  ** @returns xcb_xkb_key_mod_map_iterator_t
12254  **
12255  *****************************************************************************/
12256 
12257 xcb_xkb_key_mod_map_iterator_t
12258 xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12259                                                                 const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12260 {
12261     xcb_xkb_key_mod_map_iterator_t i;
12262     i.data = /* replies */ S->types.map.modmap_rtrn;
12263     i.rem = /* replies */ S->types.totalModMapKeys;
12264     i.index = (char *) i.data - (char *) S;
12265     return i;
12266 }
12267 
12268 
12269 /*****************************************************************************
12270  **
12271  ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn
12272  **
12273  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12274  ** @returns xcb_xkb_key_v_mod_map_t *
12275  **
12276  *****************************************************************************/
12277 
12278 xcb_xkb_key_v_mod_map_t *
12279 xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12280 {
12281     return /* replies */ S->types.map.vmodmap_rtrn;
12282 }
12283 
12284 
12285 /*****************************************************************************
12286  **
12287  ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length
12288  **
12289  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12290  ** @returns int
12291  **
12292  *****************************************************************************/
12293 
12294 int
12295 xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12296                                                                const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12297 {
12298     return /* replies */ S->types.totalVModMapKeys;
12299 }
12300 
12301 
12302 /*****************************************************************************
12303  **
12304  ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator
12305  **
12306  ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
12307  ** @returns xcb_xkb_key_v_mod_map_iterator_t
12308  **
12309  *****************************************************************************/
12310 
12311 xcb_xkb_key_v_mod_map_iterator_t
12312 xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12313                                                                  const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12314 {
12315     xcb_xkb_key_v_mod_map_iterator_t i;
12316     i.data = /* replies */ S->types.map.vmodmap_rtrn;
12317     i.rem = /* replies */ S->types.totalVModMapKeys;
12318     i.index = (char *) i.data - (char *) S;
12319     return i;
12320 }
12321 
12322 int
12323 xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void                                              **_buffer  /**< */,
12324                                                      uint8_t                                             nTypes  /**< */,
12325                                                      uint8_t                                             nKeySyms  /**< */,
12326                                                      uint8_t                                             nKeyActions  /**< */,
12327                                                      uint16_t                                            totalActions  /**< */,
12328                                                      uint8_t                                             totalKeyBehaviors  /**< */,
12329                                                      uint16_t                                            virtualMods  /**< */,
12330                                                      uint8_t                                             totalKeyExplicit  /**< */,
12331                                                      uint8_t                                             totalModMapKeys  /**< */,
12332                                                      uint8_t                                             totalVModMapKeys  /**< */,
12333                                                      uint16_t                                            present  /**< */,
12334                                                      const xcb_xkb_get_kbd_by_name_replies_types_map_t  *_aux  /**< */)
12335 {
12336     char *xcb_out = *_buffer;
12337     unsigned int xcb_buffer_len = 0;
12338     unsigned int xcb_align_to = 0;
12339 
12340     unsigned int xcb_pad = 0;
12341     char xcb_pad0[3] = {0, 0, 0};
12342     struct iovec xcb_parts[19];
12343     unsigned int xcb_parts_idx = 0;
12344     unsigned int xcb_block_len = 0;
12345     unsigned int i;
12346     char *xcb_tmp;
12347 
12348     if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
12349         /* insert padding */
12350         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12351         xcb_buffer_len += xcb_block_len + xcb_pad;
12352         if (0 != xcb_pad) {
12353             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12354             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12355             xcb_parts_idx++;
12356             xcb_pad = 0;
12357         }
12358         xcb_block_len = 0;
12359         /* types_rtrn */
12360         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn;
12361         xcb_parts[xcb_parts_idx].iov_len = 0;
12362         xcb_tmp = (char *) _aux->types_rtrn;
12363         for(i=0; i<nTypes; i++) {
12364             xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp);
12365             xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
12366         }
12367         xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
12368         xcb_parts_idx++;
12369         xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
12370     }
12371     if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
12372         /* insert padding */
12373         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12374         xcb_buffer_len += xcb_block_len + xcb_pad;
12375         if (0 != xcb_pad) {
12376             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12377             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12378             xcb_parts_idx++;
12379             xcb_pad = 0;
12380         }
12381         xcb_block_len = 0;
12382         /* syms_rtrn */
12383         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn;
12384         xcb_parts[xcb_parts_idx].iov_len = 0;
12385         xcb_tmp = (char *) _aux->syms_rtrn;
12386         for(i=0; i<nKeySyms; i++) {
12387             xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
12388             xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
12389         }
12390         xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
12391         xcb_parts_idx++;
12392         xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
12393     }
12394     if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
12395         /* insert padding */
12396         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12397         xcb_buffer_len += xcb_block_len + xcb_pad;
12398         if (0 != xcb_pad) {
12399             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12400             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12401             xcb_parts_idx++;
12402             xcb_pad = 0;
12403         }
12404         xcb_block_len = 0;
12405         /* acts_rtrn_count */
12406         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count;
12407         xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
12408         xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
12409         xcb_parts_idx++;
12410         xcb_align_to = ALIGNOF(uint8_t);
12411         /* insert padding */
12412         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12413         xcb_buffer_len += xcb_block_len + xcb_pad;
12414         if (0 != xcb_pad) {
12415             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12416             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12417             xcb_parts_idx++;
12418             xcb_pad = 0;
12419         }
12420         xcb_block_len = 0;
12421         /* acts_rtrn_acts */
12422         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts;
12423         xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
12424         xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
12425         xcb_parts_idx++;
12426         xcb_align_to = ALIGNOF(xcb_xkb_action_t);
12427     }
12428     if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
12429         /* insert padding */
12430         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12431         xcb_buffer_len += xcb_block_len + xcb_pad;
12432         if (0 != xcb_pad) {
12433             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12434             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12435             xcb_parts_idx++;
12436             xcb_pad = 0;
12437         }
12438         xcb_block_len = 0;
12439         /* behaviors_rtrn */
12440         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn;
12441         xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
12442         xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
12443         xcb_parts_idx++;
12444         xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
12445     }
12446     if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
12447         /* insert padding */
12448         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12449         xcb_buffer_len += xcb_block_len + xcb_pad;
12450         if (0 != xcb_pad) {
12451             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12452             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12453             xcb_parts_idx++;
12454             xcb_pad = 0;
12455         }
12456         xcb_block_len = 0;
12457         /* vmods_rtrn */
12458         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn;
12459         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
12460         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
12461         xcb_parts_idx++;
12462         xcb_align_to = ALIGNOF(uint8_t);
12463     }
12464     if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
12465         /* insert padding */
12466         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12467         xcb_buffer_len += xcb_block_len + xcb_pad;
12468         if (0 != xcb_pad) {
12469             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12470             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12471             xcb_parts_idx++;
12472             xcb_pad = 0;
12473         }
12474         xcb_block_len = 0;
12475         /* explicit_rtrn */
12476         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn;
12477         xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
12478         xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
12479         xcb_parts_idx++;
12480         xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
12481     }
12482     if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
12483         /* insert padding */
12484         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12485         xcb_buffer_len += xcb_block_len + xcb_pad;
12486         if (0 != xcb_pad) {
12487             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12488             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12489             xcb_parts_idx++;
12490             xcb_pad = 0;
12491         }
12492         xcb_block_len = 0;
12493         /* modmap_rtrn */
12494         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn;
12495         xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
12496         xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
12497         xcb_parts_idx++;
12498         xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
12499     }
12500     if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
12501         /* insert padding */
12502         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12503         xcb_buffer_len += xcb_block_len + xcb_pad;
12504         if (0 != xcb_pad) {
12505             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12506             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12507             xcb_parts_idx++;
12508             xcb_pad = 0;
12509         }
12510         xcb_block_len = 0;
12511         /* vmodmap_rtrn */
12512         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn;
12513         xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
12514         xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
12515         xcb_parts_idx++;
12516         xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
12517     }
12518     /* insert padding */
12519     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12520     xcb_buffer_len += xcb_block_len + xcb_pad;
12521     if (0 != xcb_pad) {
12522         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
12523         xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
12524         xcb_parts_idx++;
12525         xcb_pad = 0;
12526     }
12527     xcb_block_len = 0;
12528 
12529     if (NULL == xcb_out) {
12530         /* allocate memory */
12531         xcb_out = malloc(xcb_buffer_len);
12532         *_buffer = xcb_out;
12533     }
12534 
12535     xcb_tmp = xcb_out;
12536     for(i=0; i<xcb_parts_idx; i++) {
12537         if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
12538             memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
12539         if (0 != xcb_parts[i].iov_len)
12540             xcb_tmp += xcb_parts[i].iov_len;
12541     }
12542 
12543     return xcb_buffer_len;
12544 }
12545 
12546 int
12547 xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void                                   *_buffer  /**< */,
12548                                                   uint8_t                                       nTypes  /**< */,
12549                                                   uint8_t                                       nKeySyms  /**< */,
12550                                                   uint8_t                                       nKeyActions  /**< */,
12551                                                   uint16_t                                      totalActions  /**< */,
12552                                                   uint8_t                                       totalKeyBehaviors  /**< */,
12553                                                   uint16_t                                      virtualMods  /**< */,
12554                                                   uint8_t                                       totalKeyExplicit  /**< */,
12555                                                   uint8_t                                       totalModMapKeys  /**< */,
12556                                                   uint8_t                                       totalVModMapKeys  /**< */,
12557                                                   uint16_t                                      present  /**< */,
12558                                                   xcb_xkb_get_kbd_by_name_replies_types_map_t  *_aux  /**< */)
12559 {
12560     char *xcb_tmp = (char *)_buffer;
12561     unsigned int xcb_buffer_len = 0;
12562     unsigned int xcb_block_len = 0;
12563     unsigned int xcb_pad = 0;
12564     unsigned int xcb_align_to = 0;
12565 
12566     unsigned int i;
12567     unsigned int xcb_tmp_len;
12568 
12569     if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
12570         /* insert padding */
12571         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12572         xcb_buffer_len += xcb_block_len + xcb_pad;
12573         if (0 != xcb_pad) {
12574             xcb_tmp += xcb_pad;
12575             xcb_pad = 0;
12576         }
12577         xcb_block_len = 0;
12578         /* types_rtrn */
12579         _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp;
12580         for(i=0; i<nTypes; i++) {
12581             xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp);
12582             xcb_block_len += xcb_tmp_len;
12583             xcb_tmp += xcb_tmp_len;
12584         }
12585         xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
12586     }
12587     if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
12588         /* insert padding */
12589         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12590         xcb_buffer_len += xcb_block_len + xcb_pad;
12591         if (0 != xcb_pad) {
12592             xcb_tmp += xcb_pad;
12593             xcb_pad = 0;
12594         }
12595         xcb_block_len = 0;
12596         /* syms_rtrn */
12597         _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp;
12598         for(i=0; i<nKeySyms; i++) {
12599             xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
12600             xcb_block_len += xcb_tmp_len;
12601             xcb_tmp += xcb_tmp_len;
12602         }
12603         xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
12604     }
12605     if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
12606         /* insert padding */
12607         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12608         xcb_buffer_len += xcb_block_len + xcb_pad;
12609         if (0 != xcb_pad) {
12610             xcb_tmp += xcb_pad;
12611             xcb_pad = 0;
12612         }
12613         xcb_block_len = 0;
12614         /* acts_rtrn_count */
12615         _aux->acts_rtrn_count = (uint8_t *)xcb_tmp;
12616         xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
12617         xcb_tmp += xcb_block_len;
12618         xcb_align_to = ALIGNOF(uint8_t);
12619         /* insert padding */
12620         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12621         xcb_buffer_len += xcb_block_len + xcb_pad;
12622         if (0 != xcb_pad) {
12623             xcb_tmp += xcb_pad;
12624             xcb_pad = 0;
12625         }
12626         xcb_block_len = 0;
12627         /* acts_rtrn_acts */
12628         _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp;
12629         xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
12630         xcb_tmp += xcb_block_len;
12631         xcb_align_to = ALIGNOF(xcb_xkb_action_t);
12632     }
12633     if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
12634         /* insert padding */
12635         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12636         xcb_buffer_len += xcb_block_len + xcb_pad;
12637         if (0 != xcb_pad) {
12638             xcb_tmp += xcb_pad;
12639             xcb_pad = 0;
12640         }
12641         xcb_block_len = 0;
12642         /* behaviors_rtrn */
12643         _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp;
12644         xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
12645         xcb_tmp += xcb_block_len;
12646         xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
12647     }
12648     if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
12649         /* insert padding */
12650         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12651         xcb_buffer_len += xcb_block_len + xcb_pad;
12652         if (0 != xcb_pad) {
12653             xcb_tmp += xcb_pad;
12654             xcb_pad = 0;
12655         }
12656         xcb_block_len = 0;
12657         /* vmods_rtrn */
12658         _aux->vmods_rtrn = (uint8_t *)xcb_tmp;
12659         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
12660         xcb_tmp += xcb_block_len;
12661         xcb_align_to = ALIGNOF(uint8_t);
12662     }
12663     if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
12664         /* insert padding */
12665         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12666         xcb_buffer_len += xcb_block_len + xcb_pad;
12667         if (0 != xcb_pad) {
12668             xcb_tmp += xcb_pad;
12669             xcb_pad = 0;
12670         }
12671         xcb_block_len = 0;
12672         /* explicit_rtrn */
12673         _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp;
12674         xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
12675         xcb_tmp += xcb_block_len;
12676         xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
12677     }
12678     if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
12679         /* insert padding */
12680         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12681         xcb_buffer_len += xcb_block_len + xcb_pad;
12682         if (0 != xcb_pad) {
12683             xcb_tmp += xcb_pad;
12684             xcb_pad = 0;
12685         }
12686         xcb_block_len = 0;
12687         /* modmap_rtrn */
12688         _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp;
12689         xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
12690         xcb_tmp += xcb_block_len;
12691         xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
12692     }
12693     if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
12694         /* insert padding */
12695         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12696         xcb_buffer_len += xcb_block_len + xcb_pad;
12697         if (0 != xcb_pad) {
12698             xcb_tmp += xcb_pad;
12699             xcb_pad = 0;
12700         }
12701         xcb_block_len = 0;
12702         /* vmodmap_rtrn */
12703         _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
12704         xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
12705         xcb_tmp += xcb_block_len;
12706         xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
12707     }
12708     /* insert padding */
12709     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
12710     xcb_buffer_len += xcb_block_len + xcb_pad;
12711     if (0 != xcb_pad) {
12712         xcb_tmp += xcb_pad;
12713         xcb_pad = 0;
12714     }
12715     xcb_block_len = 0;
12716 
12717     return xcb_buffer_len;
12718 }
12719 
12720 int
12721 xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void  *_buffer  /**< */,
12722                                                   uint8_t      nTypes  /**< */,
12723                                                   uint8_t      nKeySyms  /**< */,
12724                                                   uint8_t      nKeyActions  /**< */,
12725                                                   uint16_t     totalActions  /**< */,
12726                                                   uint8_t      totalKeyBehaviors  /**< */,
12727                                                   uint16_t     virtualMods  /**< */,
12728                                                   uint8_t      totalKeyExplicit  /**< */,
12729                                                   uint8_t      totalModMapKeys  /**< */,
12730                                                   uint8_t      totalVModMapKeys  /**< */,
12731                                                   uint16_t     present  /**< */)
12732 {
12733     xcb_xkb_get_kbd_by_name_replies_types_map_t _aux;
12734     return xcb_xkb_get_kbd_by_name_replies_types_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
12735 }
12736 
12737 
12738 /*****************************************************************************
12739  **
12740  ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names
12741  **
12742  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12743  ** @returns xcb_atom_t *
12744  **
12745  *****************************************************************************/
12746 
12747 xcb_atom_t *
12748 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12749 {
12750     return /* replies */ S->key_names.valueList.typeNames;
12751 }
12752 
12753 
12754 /*****************************************************************************
12755  **
12756  ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length
12757  **
12758  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12759  ** @returns int
12760  **
12761  *****************************************************************************/
12762 
12763 int
12764 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12765                                                                         const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12766 {
12767     return /* replies */ S->key_names.nTypes;
12768 }
12769 
12770 
12771 /*****************************************************************************
12772  **
12773  ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end
12774  **
12775  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12776  ** @returns xcb_generic_iterator_t
12777  **
12778  *****************************************************************************/
12779 
12780 xcb_generic_iterator_t
12781 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12782                                                                      const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12783 {
12784     xcb_generic_iterator_t i;
12785     i.data = /* replies */ S->key_names.valueList.typeNames + /* replies */ S->key_names.nTypes;
12786     i.rem = 0;
12787     i.index = (char *) i.data - (char *) S;
12788     return i;
12789 }
12790 
12791 
12792 /*****************************************************************************
12793  **
12794  ** uint8_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type
12795  **
12796  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12797  ** @returns uint8_t *
12798  **
12799  *****************************************************************************/
12800 
12801 uint8_t *
12802 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12803 {
12804     return /* replies */ S->key_names.valueList.nLevelsPerType;
12805 }
12806 
12807 
12808 /*****************************************************************************
12809  **
12810  ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length
12811  **
12812  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12813  ** @returns int
12814  **
12815  *****************************************************************************/
12816 
12817 int
12818 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12819                                                                                const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12820 {
12821     return /* replies */ S->key_names.nKTLevels;
12822 }
12823 
12824 
12825 /*****************************************************************************
12826  **
12827  ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end
12828  **
12829  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12830  ** @returns xcb_generic_iterator_t
12831  **
12832  *****************************************************************************/
12833 
12834 xcb_generic_iterator_t
12835 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12836                                                                             const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12837 {
12838     xcb_generic_iterator_t i;
12839     i.data = /* replies */ S->key_names.valueList.nLevelsPerType + /* replies */ S->key_names.nKTLevels;
12840     i.rem = 0;
12841     i.index = (char *) i.data - (char *) S;
12842     return i;
12843 }
12844 
12845 
12846 /*****************************************************************************
12847  **
12848  ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names
12849  **
12850  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12851  ** @returns xcb_atom_t *
12852  **
12853  *****************************************************************************/
12854 
12855 xcb_atom_t *
12856 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12857 {
12858     return /* replies */ S->key_names.valueList.ktLevelNames;
12859 }
12860 
12861 
12862 /*****************************************************************************
12863  **
12864  ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length
12865  **
12866  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12867  ** @returns int
12868  **
12869  *****************************************************************************/
12870 
12871 int
12872 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12873                                                                             const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12874 {
12875     return xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
12876 }
12877 
12878 
12879 /*****************************************************************************
12880  **
12881  ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end
12882  **
12883  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12884  ** @returns xcb_generic_iterator_t
12885  **
12886  *****************************************************************************/
12887 
12888 xcb_generic_iterator_t
12889 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12890                                                                          const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12891 {
12892     xcb_generic_iterator_t i;
12893     i.data = /* replies */ S->key_names.valueList.ktLevelNames + xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
12894     i.rem = 0;
12895     i.index = (char *) i.data - (char *) S;
12896     return i;
12897 }
12898 
12899 
12900 /*****************************************************************************
12901  **
12902  ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names
12903  **
12904  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12905  ** @returns xcb_atom_t *
12906  **
12907  *****************************************************************************/
12908 
12909 xcb_atom_t *
12910 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12911 {
12912     return /* replies */ S->key_names.valueList.indicatorNames;
12913 }
12914 
12915 
12916 /*****************************************************************************
12917  **
12918  ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length
12919  **
12920  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12921  ** @returns int
12922  **
12923  *****************************************************************************/
12924 
12925 int
12926 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12927                                                                              const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12928 {
12929     return xcb_popcount(/* replies */ S->key_names.indicators);
12930 }
12931 
12932 
12933 /*****************************************************************************
12934  **
12935  ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end
12936  **
12937  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12938  ** @returns xcb_generic_iterator_t
12939  **
12940  *****************************************************************************/
12941 
12942 xcb_generic_iterator_t
12943 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12944                                                                           const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12945 {
12946     xcb_generic_iterator_t i;
12947     i.data = /* replies */ S->key_names.valueList.indicatorNames + xcb_popcount(/* replies */ S->key_names.indicators);
12948     i.rem = 0;
12949     i.index = (char *) i.data - (char *) S;
12950     return i;
12951 }
12952 
12953 
12954 /*****************************************************************************
12955  **
12956  ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names
12957  **
12958  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
12959  ** @returns xcb_atom_t *
12960  **
12961  *****************************************************************************/
12962 
12963 xcb_atom_t *
12964 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12965 {
12966     return /* replies */ S->key_names.valueList.virtualModNames;
12967 }
12968 
12969 
12970 /*****************************************************************************
12971  **
12972  ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length
12973  **
12974  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12975  ** @returns int
12976  **
12977  *****************************************************************************/
12978 
12979 int
12980 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12981                                                                                const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12982 {
12983     return xcb_popcount(/* replies */ S->key_names.virtualMods);
12984 }
12985 
12986 
12987 /*****************************************************************************
12988  **
12989  ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end
12990  **
12991  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
12992  ** @returns xcb_generic_iterator_t
12993  **
12994  *****************************************************************************/
12995 
12996 xcb_generic_iterator_t
12997 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
12998                                                                             const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
12999 {
13000     xcb_generic_iterator_t i;
13001     i.data = /* replies */ S->key_names.valueList.virtualModNames + xcb_popcount(/* replies */ S->key_names.virtualMods);
13002     i.rem = 0;
13003     i.index = (char *) i.data - (char *) S;
13004     return i;
13005 }
13006 
13007 
13008 /*****************************************************************************
13009  **
13010  ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups
13011  **
13012  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
13013  ** @returns xcb_atom_t *
13014  **
13015  *****************************************************************************/
13016 
13017 xcb_atom_t *
13018 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13019 {
13020     return /* replies */ S->key_names.valueList.groups;
13021 }
13022 
13023 
13024 /*****************************************************************************
13025  **
13026  ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length
13027  **
13028  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
13029  ** @returns int
13030  **
13031  *****************************************************************************/
13032 
13033 int
13034 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13035                                                                     const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13036 {
13037     return xcb_popcount(/* replies */ S->key_names.groupNames);
13038 }
13039 
13040 
13041 /*****************************************************************************
13042  **
13043  ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end
13044  **
13045  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
13046  ** @returns xcb_generic_iterator_t
13047  **
13048  *****************************************************************************/
13049 
13050 xcb_generic_iterator_t
13051 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13052                                                                  const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13053 {
13054     xcb_generic_iterator_t i;
13055     i.data = /* replies */ S->key_names.valueList.groups + xcb_popcount(/* replies */ S->key_names.groupNames);
13056     i.rem = 0;
13057     i.index = (char *) i.data - (char *) S;
13058     return i;
13059 }
13060 
13061 
13062 /*****************************************************************************
13063  **
13064  ** xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names
13065  **
13066  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
13067  ** @returns xcb_xkb_key_name_t *
13068  **
13069  *****************************************************************************/
13070 
13071 xcb_xkb_key_name_t *
13072 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13073 {
13074     return /* replies */ S->key_names.valueList.keyNames;
13075 }
13076 
13077 
13078 /*****************************************************************************
13079  **
13080  ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length
13081  **
13082  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
13083  ** @returns int
13084  **
13085  *****************************************************************************/
13086 
13087 int
13088 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13089                                                                        const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13090 {
13091     return /* replies */ S->key_names.nKeys;
13092 }
13093 
13094 
13095 /*****************************************************************************
13096  **
13097  ** xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator
13098  **
13099  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
13100  ** @returns xcb_xkb_key_name_iterator_t
13101  **
13102  *****************************************************************************/
13103 
13104 xcb_xkb_key_name_iterator_t
13105 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13106                                                                          const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13107 {
13108     xcb_xkb_key_name_iterator_t i;
13109     i.data = /* replies */ S->key_names.valueList.keyNames;
13110     i.rem = /* replies */ S->key_names.nKeys;
13111     i.index = (char *) i.data - (char *) S;
13112     return i;
13113 }
13114 
13115 
13116 /*****************************************************************************
13117  **
13118  ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases
13119  **
13120  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
13121  ** @returns xcb_xkb_key_alias_t *
13122  **
13123  *****************************************************************************/
13124 
13125 xcb_xkb_key_alias_t *
13126 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13127 {
13128     return /* replies */ S->key_names.valueList.keyAliases;
13129 }
13130 
13131 
13132 /*****************************************************************************
13133  **
13134  ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length
13135  **
13136  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
13137  ** @returns int
13138  **
13139  *****************************************************************************/
13140 
13141 int
13142 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13143                                                                          const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13144 {
13145     return /* replies */ S->key_names.nKeyAliases;
13146 }
13147 
13148 
13149 /*****************************************************************************
13150  **
13151  ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator
13152  **
13153  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
13154  ** @returns xcb_xkb_key_alias_iterator_t
13155  **
13156  *****************************************************************************/
13157 
13158 xcb_xkb_key_alias_iterator_t
13159 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13160                                                                            const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13161 {
13162     xcb_xkb_key_alias_iterator_t i;
13163     i.data = /* replies */ S->key_names.valueList.keyAliases;
13164     i.rem = /* replies */ S->key_names.nKeyAliases;
13165     i.index = (char *) i.data - (char *) S;
13166     return i;
13167 }
13168 
13169 
13170 /*****************************************************************************
13171  **
13172  ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names
13173  **
13174  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
13175  ** @returns xcb_atom_t *
13176  **
13177  *****************************************************************************/
13178 
13179 xcb_atom_t *
13180 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13181 {
13182     return /* replies */ S->key_names.valueList.radioGroupNames;
13183 }
13184 
13185 
13186 /*****************************************************************************
13187  **
13188  ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length
13189  **
13190  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
13191  ** @returns int
13192  **
13193  *****************************************************************************/
13194 
13195 int
13196 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13197                                                                                const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13198 {
13199     return /* replies */ S->key_names.nRadioGroups;
13200 }
13201 
13202 
13203 /*****************************************************************************
13204  **
13205  ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end
13206  **
13207  ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
13208  ** @returns xcb_generic_iterator_t
13209  **
13210  *****************************************************************************/
13211 
13212 xcb_generic_iterator_t
13213 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13214                                                                             const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13215 {
13216     xcb_generic_iterator_t i;
13217     i.data = /* replies */ S->key_names.valueList.radioGroupNames + /* replies */ S->key_names.nRadioGroups;
13218     i.rem = 0;
13219     i.index = (char *) i.data - (char *) S;
13220     return i;
13221 }
13222 
13223 int
13224 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void                                                         **_buffer  /**< */,
13225                                                                 uint8_t                                                        nTypes  /**< */,
13226                                                                 uint16_t                                                       nKTLevels  /**< */,
13227                                                                 uint32_t                                                       indicators  /**< */,
13228                                                                 uint16_t                                                       virtualMods  /**< */,
13229                                                                 uint8_t                                                        groupNames  /**< */,
13230                                                                 uint8_t                                                        nKeys  /**< */,
13231                                                                 uint8_t                                                        nKeyAliases  /**< */,
13232                                                                 uint8_t                                                        nRadioGroups  /**< */,
13233                                                                 uint32_t                                                       which  /**< */,
13234                                                                 const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t  *_aux  /**< */)
13235 {
13236     char *xcb_out = *_buffer;
13237     unsigned int xcb_buffer_len = 0;
13238     unsigned int xcb_align_to = 0;
13239 
13240     unsigned int xcb_pad = 0;
13241     char xcb_pad0[3] = {0, 0, 0};
13242     struct iovec xcb_parts[25];
13243     unsigned int xcb_parts_idx = 0;
13244     unsigned int xcb_block_len = 0;
13245     unsigned int i;
13246     char *xcb_tmp;
13247 
13248     if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
13249         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.keycodesName */
13250         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
13251         xcb_block_len += sizeof(xcb_atom_t);
13252         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
13253         xcb_parts_idx++;
13254         xcb_align_to = ALIGNOF(xcb_atom_t);
13255     }
13256     if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
13257         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.geometryName */
13258         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
13259         xcb_block_len += sizeof(xcb_atom_t);
13260         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
13261         xcb_parts_idx++;
13262         xcb_align_to = ALIGNOF(xcb_atom_t);
13263     }
13264     if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
13265         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.symbolsName */
13266         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
13267         xcb_block_len += sizeof(xcb_atom_t);
13268         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
13269         xcb_parts_idx++;
13270         xcb_align_to = ALIGNOF(xcb_atom_t);
13271     }
13272     if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
13273         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.physSymbolsName */
13274         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
13275         xcb_block_len += sizeof(xcb_atom_t);
13276         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
13277         xcb_parts_idx++;
13278         xcb_align_to = ALIGNOF(xcb_atom_t);
13279     }
13280     if(which & XCB_XKB_NAME_DETAIL_TYPES) {
13281         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.typesName */
13282         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
13283         xcb_block_len += sizeof(xcb_atom_t);
13284         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
13285         xcb_parts_idx++;
13286         xcb_align_to = ALIGNOF(xcb_atom_t);
13287     }
13288     if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
13289         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.compatName */
13290         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
13291         xcb_block_len += sizeof(xcb_atom_t);
13292         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
13293         xcb_parts_idx++;
13294         xcb_align_to = ALIGNOF(xcb_atom_t);
13295     }
13296     if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
13297         /* insert padding */
13298         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13299         xcb_buffer_len += xcb_block_len + xcb_pad;
13300         if (0 != xcb_pad) {
13301             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13302             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13303             xcb_parts_idx++;
13304             xcb_pad = 0;
13305         }
13306         xcb_block_len = 0;
13307         /* typeNames */
13308         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
13309         xcb_block_len += nTypes * sizeof(xcb_atom_t);
13310         xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
13311         xcb_parts_idx++;
13312         xcb_align_to = ALIGNOF(xcb_atom_t);
13313     }
13314     if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
13315         /* insert padding */
13316         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13317         xcb_buffer_len += xcb_block_len + xcb_pad;
13318         if (0 != xcb_pad) {
13319             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13320             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13321             xcb_parts_idx++;
13322             xcb_pad = 0;
13323         }
13324         xcb_block_len = 0;
13325         /* nLevelsPerType */
13326         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
13327         xcb_block_len += nKTLevels * sizeof(uint8_t);
13328         xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t);
13329         xcb_parts_idx++;
13330         xcb_align_to = ALIGNOF(uint8_t);
13331         /* insert padding */
13332         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13333         xcb_buffer_len += xcb_block_len + xcb_pad;
13334         if (0 != xcb_pad) {
13335             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13336             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13337             xcb_parts_idx++;
13338             xcb_pad = 0;
13339         }
13340         xcb_block_len = 0;
13341         /* ktLevelNames */
13342         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
13343         xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
13344         xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
13345         xcb_parts_idx++;
13346         xcb_align_to = ALIGNOF(xcb_atom_t);
13347     }
13348     if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
13349         /* insert padding */
13350         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13351         xcb_buffer_len += xcb_block_len + xcb_pad;
13352         if (0 != xcb_pad) {
13353             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13354             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13355             xcb_parts_idx++;
13356             xcb_pad = 0;
13357         }
13358         xcb_block_len = 0;
13359         /* indicatorNames */
13360         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
13361         xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
13362         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
13363         xcb_parts_idx++;
13364         xcb_align_to = ALIGNOF(xcb_atom_t);
13365     }
13366     if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
13367         /* insert padding */
13368         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13369         xcb_buffer_len += xcb_block_len + xcb_pad;
13370         if (0 != xcb_pad) {
13371             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13372             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13373             xcb_parts_idx++;
13374             xcb_pad = 0;
13375         }
13376         xcb_block_len = 0;
13377         /* virtualModNames */
13378         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
13379         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
13380         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
13381         xcb_parts_idx++;
13382         xcb_align_to = ALIGNOF(xcb_atom_t);
13383     }
13384     if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
13385         /* insert padding */
13386         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13387         xcb_buffer_len += xcb_block_len + xcb_pad;
13388         if (0 != xcb_pad) {
13389             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13390             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13391             xcb_parts_idx++;
13392             xcb_pad = 0;
13393         }
13394         xcb_block_len = 0;
13395         /* groups */
13396         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
13397         xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
13398         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
13399         xcb_parts_idx++;
13400         xcb_align_to = ALIGNOF(xcb_atom_t);
13401     }
13402     if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
13403         /* insert padding */
13404         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13405         xcb_buffer_len += xcb_block_len + xcb_pad;
13406         if (0 != xcb_pad) {
13407             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13408             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13409             xcb_parts_idx++;
13410             xcb_pad = 0;
13411         }
13412         xcb_block_len = 0;
13413         /* keyNames */
13414         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
13415         xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
13416         xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
13417         xcb_parts_idx++;
13418         xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
13419     }
13420     if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
13421         /* insert padding */
13422         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13423         xcb_buffer_len += xcb_block_len + xcb_pad;
13424         if (0 != xcb_pad) {
13425             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13426             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13427             xcb_parts_idx++;
13428             xcb_pad = 0;
13429         }
13430         xcb_block_len = 0;
13431         /* keyAliases */
13432         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
13433         xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
13434         xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
13435         xcb_parts_idx++;
13436         xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
13437     }
13438     if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
13439         /* insert padding */
13440         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13441         xcb_buffer_len += xcb_block_len + xcb_pad;
13442         if (0 != xcb_pad) {
13443             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13444             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13445             xcb_parts_idx++;
13446             xcb_pad = 0;
13447         }
13448         xcb_block_len = 0;
13449         /* radioGroupNames */
13450         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
13451         xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
13452         xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
13453         xcb_parts_idx++;
13454         xcb_align_to = ALIGNOF(xcb_atom_t);
13455     }
13456     /* insert padding */
13457     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13458     xcb_buffer_len += xcb_block_len + xcb_pad;
13459     if (0 != xcb_pad) {
13460         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13461         xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
13462         xcb_parts_idx++;
13463         xcb_pad = 0;
13464     }
13465     xcb_block_len = 0;
13466 
13467     if (NULL == xcb_out) {
13468         /* allocate memory */
13469         xcb_out = malloc(xcb_buffer_len);
13470         *_buffer = xcb_out;
13471     }
13472 
13473     xcb_tmp = xcb_out;
13474     for(i=0; i<xcb_parts_idx; i++) {
13475         if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
13476             memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
13477         if (0 != xcb_parts[i].iov_len)
13478             xcb_tmp += xcb_parts[i].iov_len;
13479     }
13480 
13481     return xcb_buffer_len;
13482 }
13483 
13484 int
13485 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void                                              *_buffer  /**< */,
13486                                                              uint8_t                                                  nTypes  /**< */,
13487                                                              uint16_t                                                 nKTLevels  /**< */,
13488                                                              uint32_t                                                 indicators  /**< */,
13489                                                              uint16_t                                                 virtualMods  /**< */,
13490                                                              uint8_t                                                  groupNames  /**< */,
13491                                                              uint8_t                                                  nKeys  /**< */,
13492                                                              uint8_t                                                  nKeyAliases  /**< */,
13493                                                              uint8_t                                                  nRadioGroups  /**< */,
13494                                                              uint32_t                                                 which  /**< */,
13495                                                              xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t  *_aux  /**< */)
13496 {
13497     char *xcb_tmp = (char *)_buffer;
13498     unsigned int xcb_buffer_len = 0;
13499     unsigned int xcb_block_len = 0;
13500     unsigned int xcb_pad = 0;
13501     unsigned int xcb_align_to = 0;
13502 
13503 
13504     if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
13505         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.keycodesName */
13506         _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
13507         xcb_block_len += sizeof(xcb_atom_t);
13508         xcb_tmp += sizeof(xcb_atom_t);
13509         xcb_align_to = ALIGNOF(xcb_atom_t);
13510     }
13511     if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
13512         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.geometryName */
13513         _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
13514         xcb_block_len += sizeof(xcb_atom_t);
13515         xcb_tmp += sizeof(xcb_atom_t);
13516         xcb_align_to = ALIGNOF(xcb_atom_t);
13517     }
13518     if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
13519         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.symbolsName */
13520         _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
13521         xcb_block_len += sizeof(xcb_atom_t);
13522         xcb_tmp += sizeof(xcb_atom_t);
13523         xcb_align_to = ALIGNOF(xcb_atom_t);
13524     }
13525     if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
13526         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.physSymbolsName */
13527         _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
13528         xcb_block_len += sizeof(xcb_atom_t);
13529         xcb_tmp += sizeof(xcb_atom_t);
13530         xcb_align_to = ALIGNOF(xcb_atom_t);
13531     }
13532     if(which & XCB_XKB_NAME_DETAIL_TYPES) {
13533         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.typesName */
13534         _aux->typesName = *(xcb_atom_t *)xcb_tmp;
13535         xcb_block_len += sizeof(xcb_atom_t);
13536         xcb_tmp += sizeof(xcb_atom_t);
13537         xcb_align_to = ALIGNOF(xcb_atom_t);
13538     }
13539     if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
13540         /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.compatName */
13541         _aux->compatName = *(xcb_atom_t *)xcb_tmp;
13542         xcb_block_len += sizeof(xcb_atom_t);
13543         xcb_tmp += sizeof(xcb_atom_t);
13544         xcb_align_to = ALIGNOF(xcb_atom_t);
13545     }
13546     if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
13547         /* insert padding */
13548         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13549         xcb_buffer_len += xcb_block_len + xcb_pad;
13550         if (0 != xcb_pad) {
13551             xcb_tmp += xcb_pad;
13552             xcb_pad = 0;
13553         }
13554         xcb_block_len = 0;
13555         /* typeNames */
13556         _aux->typeNames = (xcb_atom_t *)xcb_tmp;
13557         xcb_block_len += nTypes * sizeof(xcb_atom_t);
13558         xcb_tmp += xcb_block_len;
13559         xcb_align_to = ALIGNOF(xcb_atom_t);
13560     }
13561     if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
13562         /* insert padding */
13563         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13564         xcb_buffer_len += xcb_block_len + xcb_pad;
13565         if (0 != xcb_pad) {
13566             xcb_tmp += xcb_pad;
13567             xcb_pad = 0;
13568         }
13569         xcb_block_len = 0;
13570         /* nLevelsPerType */
13571         _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
13572         xcb_block_len += nKTLevels * sizeof(uint8_t);
13573         xcb_tmp += xcb_block_len;
13574         xcb_align_to = ALIGNOF(uint8_t);
13575         /* insert padding */
13576         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13577         xcb_buffer_len += xcb_block_len + xcb_pad;
13578         if (0 != xcb_pad) {
13579             xcb_tmp += xcb_pad;
13580             xcb_pad = 0;
13581         }
13582         xcb_block_len = 0;
13583         /* ktLevelNames */
13584         _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
13585         xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
13586         xcb_tmp += xcb_block_len;
13587         xcb_align_to = ALIGNOF(xcb_atom_t);
13588     }
13589     if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
13590         /* insert padding */
13591         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13592         xcb_buffer_len += xcb_block_len + xcb_pad;
13593         if (0 != xcb_pad) {
13594             xcb_tmp += xcb_pad;
13595             xcb_pad = 0;
13596         }
13597         xcb_block_len = 0;
13598         /* indicatorNames */
13599         _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
13600         xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
13601         xcb_tmp += xcb_block_len;
13602         xcb_align_to = ALIGNOF(xcb_atom_t);
13603     }
13604     if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
13605         /* insert padding */
13606         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13607         xcb_buffer_len += xcb_block_len + xcb_pad;
13608         if (0 != xcb_pad) {
13609             xcb_tmp += xcb_pad;
13610             xcb_pad = 0;
13611         }
13612         xcb_block_len = 0;
13613         /* virtualModNames */
13614         _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
13615         xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
13616         xcb_tmp += xcb_block_len;
13617         xcb_align_to = ALIGNOF(xcb_atom_t);
13618     }
13619     if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
13620         /* insert padding */
13621         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13622         xcb_buffer_len += xcb_block_len + xcb_pad;
13623         if (0 != xcb_pad) {
13624             xcb_tmp += xcb_pad;
13625             xcb_pad = 0;
13626         }
13627         xcb_block_len = 0;
13628         /* groups */
13629         _aux->groups = (xcb_atom_t *)xcb_tmp;
13630         xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
13631         xcb_tmp += xcb_block_len;
13632         xcb_align_to = ALIGNOF(xcb_atom_t);
13633     }
13634     if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
13635         /* insert padding */
13636         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13637         xcb_buffer_len += xcb_block_len + xcb_pad;
13638         if (0 != xcb_pad) {
13639             xcb_tmp += xcb_pad;
13640             xcb_pad = 0;
13641         }
13642         xcb_block_len = 0;
13643         /* keyNames */
13644         _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
13645         xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
13646         xcb_tmp += xcb_block_len;
13647         xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
13648     }
13649     if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
13650         /* insert padding */
13651         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13652         xcb_buffer_len += xcb_block_len + xcb_pad;
13653         if (0 != xcb_pad) {
13654             xcb_tmp += xcb_pad;
13655             xcb_pad = 0;
13656         }
13657         xcb_block_len = 0;
13658         /* keyAliases */
13659         _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
13660         xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
13661         xcb_tmp += xcb_block_len;
13662         xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
13663     }
13664     if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
13665         /* insert padding */
13666         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13667         xcb_buffer_len += xcb_block_len + xcb_pad;
13668         if (0 != xcb_pad) {
13669             xcb_tmp += xcb_pad;
13670             xcb_pad = 0;
13671         }
13672         xcb_block_len = 0;
13673         /* radioGroupNames */
13674         _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
13675         xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
13676         xcb_tmp += xcb_block_len;
13677         xcb_align_to = ALIGNOF(xcb_atom_t);
13678     }
13679     /* insert padding */
13680     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
13681     xcb_buffer_len += xcb_block_len + xcb_pad;
13682     if (0 != xcb_pad) {
13683         xcb_tmp += xcb_pad;
13684         xcb_pad = 0;
13685     }
13686     xcb_block_len = 0;
13687 
13688     return xcb_buffer_len;
13689 }
13690 
13691 int
13692 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void  *_buffer  /**< */,
13693                                                              uint8_t      nTypes  /**< */,
13694                                                              uint16_t     nKTLevels  /**< */,
13695                                                              uint32_t     indicators  /**< */,
13696                                                              uint16_t     virtualMods  /**< */,
13697                                                              uint8_t      groupNames  /**< */,
13698                                                              uint8_t      nKeys  /**< */,
13699                                                              uint8_t      nKeyAliases  /**< */,
13700                                                              uint8_t      nRadioGroups  /**< */,
13701                                                              uint32_t     which  /**< */)
13702 {
13703     xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t _aux;
13704     return xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
13705 }
13706 
13707 
13708 /*****************************************************************************
13709  **
13710  ** xcb_xkb_get_kbd_by_name_replies_types_map_t * xcb_xkb_get_kbd_by_name_replies_types_map
13711  **
13712  ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
13713  ** @returns xcb_xkb_get_kbd_by_name_replies_types_map_t *
13714  **
13715  *****************************************************************************/
13716 
13717 xcb_xkb_get_kbd_by_name_replies_types_map_t *
13718 xcb_xkb_get_kbd_by_name_replies_types_map (const xcb_xkb_get_kbd_by_name_replies_t *R  /**< */)
13719 {
13720     return (xcb_xkb_get_kbd_by_name_replies_types_map_t *) (R + 1);
13721 }
13722 
13723 
13724 /*****************************************************************************
13725  **
13726  ** xcb_xkb_sym_interpret_t * xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn
13727  **
13728  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
13729  ** @returns xcb_xkb_sym_interpret_t *
13730  **
13731  *****************************************************************************/
13732 
13733 xcb_xkb_sym_interpret_t *
13734 xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13735 {
13736     return /* replies */ S->compat_map.si_rtrn;
13737 }
13738 
13739 
13740 /*****************************************************************************
13741  **
13742  ** int xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length
13743  **
13744  ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
13745  ** @returns int
13746  **
13747  *****************************************************************************/
13748 
13749 int
13750 xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13751                                                            const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13752 {
13753     return /* replies */ S->compat_map.nSIRtrn;
13754 }
13755 
13756 
13757 /*****************************************************************************
13758  **
13759  ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator
13760  **
13761  ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
13762  ** @returns xcb_xkb_sym_interpret_iterator_t
13763  **
13764  *****************************************************************************/
13765 
13766 xcb_xkb_sym_interpret_iterator_t
13767 xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13768                                                              const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13769 {
13770     xcb_xkb_sym_interpret_iterator_t i;
13771     i.data = /* replies */ S->compat_map.si_rtrn;
13772     i.rem = /* replies */ S->compat_map.nSIRtrn;
13773     i.index = (char *) i.data - (char *) S;
13774     return i;
13775 }
13776 
13777 
13778 /*****************************************************************************
13779  **
13780  ** xcb_xkb_mod_def_t * xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn
13781  **
13782  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
13783  ** @returns xcb_xkb_mod_def_t *
13784  **
13785  *****************************************************************************/
13786 
13787 xcb_xkb_mod_def_t *
13788 xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13789 {
13790     return /* replies */ S->compat_map.group_rtrn;
13791 }
13792 
13793 
13794 /*****************************************************************************
13795  **
13796  ** int xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length
13797  **
13798  ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
13799  ** @returns int
13800  **
13801  *****************************************************************************/
13802 
13803 int
13804 xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13805                                                               const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13806 {
13807     return xcb_popcount(/* replies */ S->compat_map.groupsRtrn);
13808 }
13809 
13810 
13811 /*****************************************************************************
13812  **
13813  ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator
13814  **
13815  ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
13816  ** @returns xcb_xkb_mod_def_iterator_t
13817  **
13818  *****************************************************************************/
13819 
13820 xcb_xkb_mod_def_iterator_t
13821 xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13822                                                                 const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13823 {
13824     xcb_xkb_mod_def_iterator_t i;
13825     i.data = /* replies */ S->compat_map.group_rtrn;
13826     i.rem = xcb_popcount(/* replies */ S->compat_map.groupsRtrn);
13827     i.index = (char *) i.data - (char *) S;
13828     return i;
13829 }
13830 
13831 
13832 /*****************************************************************************
13833  **
13834  ** xcb_xkb_indicator_map_t * xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps
13835  **
13836  ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
13837  ** @returns xcb_xkb_indicator_map_t *
13838  **
13839  *****************************************************************************/
13840 
13841 xcb_xkb_indicator_map_t *
13842 xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps (const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13843 {
13844     return /* replies */ S->indicator_maps.maps;
13845 }
13846 
13847 
13848 /*****************************************************************************
13849  **
13850  ** int xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length
13851  **
13852  ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
13853  ** @returns int
13854  **
13855  *****************************************************************************/
13856 
13857 int
13858 xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13859                                                             const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13860 {
13861     return /* replies */ S->indicator_maps.nIndicators;
13862 }
13863 
13864 
13865 /*****************************************************************************
13866  **
13867  ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator
13868  **
13869  ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
13870  ** @returns xcb_xkb_indicator_map_iterator_t
13871  **
13872  *****************************************************************************/
13873 
13874 xcb_xkb_indicator_map_iterator_t
13875 xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */,
13876                                                               const xcb_xkb_get_kbd_by_name_replies_t *S  /**< */)
13877 {
13878     xcb_xkb_indicator_map_iterator_t i;
13879     i.data = /* replies */ S->indicator_maps.maps;
13880     i.rem = /* replies */ S->indicator_maps.nIndicators;
13881     i.index = (char *) i.data - (char *) S;
13882     return i;
13883 }
13884 
13885 
13886 /*****************************************************************************
13887  **
13888  ** xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list
13889  **
13890  ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
13891  ** @returns xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
13892  **
13893  *****************************************************************************/
13894 
13895 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
13896 xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R  /**< */)
13897 {
13898     return (xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *) (R + 1);
13899 }
13900 
13901 
13902 /*****************************************************************************
13903  **
13904  ** xcb_xkb_counted_string_16_t * xcb_xkb_get_kbd_by_name_replies_geometry_label_font
13905  **
13906  ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
13907  ** @returns xcb_xkb_counted_string_16_t *
13908  **
13909  *****************************************************************************/
13910 
13911 xcb_xkb_counted_string_16_t *
13912 xcb_xkb_get_kbd_by_name_replies_geometry_label_font (const xcb_xkb_get_kbd_by_name_replies_t *R  /**< */)
13913 {
13914     return (xcb_xkb_counted_string_16_t *) (R + 1);
13915 }
13916 
13917 int
13918 xcb_xkb_get_kbd_by_name_replies_serialize (void                                    **_buffer  /**< */,
13919                                            uint16_t                                  reported  /**< */,
13920                                            const xcb_xkb_get_kbd_by_name_replies_t  *_aux  /**< */)
13921 {
13922     char *xcb_out = *_buffer;
13923     unsigned int xcb_buffer_len = 0;
13924     unsigned int xcb_align_to = 0;
13925 
13926     unsigned int xcb_pad = 0;
13927     char xcb_pad0[3] = {0, 0, 0};
13928     struct iovec xcb_parts[96];
13929     unsigned int xcb_parts_idx = 0;
13930     unsigned int xcb_block_len = 0;
13931     unsigned int i;
13932     char *xcb_tmp;
13933 
13934     if((reported & XCB_XKB_GBN_DETAIL_TYPES) ||
13935        (reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) ||
13936        (reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS)) {
13937         /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_type */
13938         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_type;
13939         xcb_block_len += sizeof(uint8_t);
13940         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
13941         xcb_parts_idx++;
13942         xcb_align_to = ALIGNOF(uint8_t);
13943         /* xcb_xkb_get_kbd_by_name_replies_t.types.typeDeviceID */
13944         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeDeviceID;
13945         xcb_block_len += sizeof(uint8_t);
13946         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
13947         xcb_parts_idx++;
13948         xcb_align_to = ALIGNOF(uint8_t);
13949         /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_sequence */
13950         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_sequence;
13951         xcb_block_len += sizeof(uint16_t);
13952         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
13953         xcb_parts_idx++;
13954         xcb_align_to = ALIGNOF(uint16_t);
13955         /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_length */
13956         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_length;
13957         xcb_block_len += sizeof(uint32_t);
13958         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
13959         xcb_parts_idx++;
13960         xcb_align_to = ALIGNOF(uint32_t);
13961         /* xcb_xkb_get_kbd_by_name_replies_t.types.pad0 */
13962         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
13963         xcb_block_len += sizeof(uint8_t)*2;
13964         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*2;
13965         xcb_parts_idx++;
13966         xcb_align_to = ALIGNOF(uint8_t);
13967         /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMinKeyCode */
13968         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeMinKeyCode;
13969         xcb_block_len += sizeof(xcb_keycode_t);
13970         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
13971         xcb_parts_idx++;
13972         xcb_align_to = ALIGNOF(xcb_keycode_t);
13973         /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMaxKeyCode */
13974         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeMaxKeyCode;
13975         xcb_block_len += sizeof(xcb_keycode_t);
13976         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
13977         xcb_parts_idx++;
13978         xcb_align_to = ALIGNOF(xcb_keycode_t);
13979         /* xcb_xkb_get_kbd_by_name_replies_t.types.present */
13980         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.present;
13981         xcb_block_len += sizeof(uint16_t);
13982         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
13983         xcb_parts_idx++;
13984         xcb_align_to = ALIGNOF(uint16_t);
13985         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstType */
13986         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstType;
13987         xcb_block_len += sizeof(uint8_t);
13988         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
13989         xcb_parts_idx++;
13990         xcb_align_to = ALIGNOF(uint8_t);
13991         /* xcb_xkb_get_kbd_by_name_replies_t.types.nTypes */
13992         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nTypes;
13993         xcb_block_len += sizeof(uint8_t);
13994         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
13995         xcb_parts_idx++;
13996         xcb_align_to = ALIGNOF(uint8_t);
13997         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalTypes */
13998         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalTypes;
13999         xcb_block_len += sizeof(uint8_t);
14000         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14001         xcb_parts_idx++;
14002         xcb_align_to = ALIGNOF(uint8_t);
14003         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeySym */
14004         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeySym;
14005         xcb_block_len += sizeof(xcb_keycode_t);
14006         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
14007         xcb_parts_idx++;
14008         xcb_align_to = ALIGNOF(xcb_keycode_t);
14009         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalSyms */
14010         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalSyms;
14011         xcb_block_len += sizeof(uint16_t);
14012         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14013         xcb_parts_idx++;
14014         xcb_align_to = ALIGNOF(uint16_t);
14015         /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeySyms */
14016         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeySyms;
14017         xcb_block_len += sizeof(uint8_t);
14018         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14019         xcb_parts_idx++;
14020         xcb_align_to = ALIGNOF(uint8_t);
14021         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyAction */
14022         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyAction;
14023         xcb_block_len += sizeof(xcb_keycode_t);
14024         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
14025         xcb_parts_idx++;
14026         xcb_align_to = ALIGNOF(xcb_keycode_t);
14027         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalActions */
14028         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalActions;
14029         xcb_block_len += sizeof(uint16_t);
14030         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14031         xcb_parts_idx++;
14032         xcb_align_to = ALIGNOF(uint16_t);
14033         /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyActions */
14034         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyActions;
14035         xcb_block_len += sizeof(uint8_t);
14036         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14037         xcb_parts_idx++;
14038         xcb_align_to = ALIGNOF(uint8_t);
14039         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyBehavior */
14040         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyBehavior;
14041         xcb_block_len += sizeof(xcb_keycode_t);
14042         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
14043         xcb_parts_idx++;
14044         xcb_align_to = ALIGNOF(xcb_keycode_t);
14045         /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyBehaviors */
14046         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyBehaviors;
14047         xcb_block_len += sizeof(uint8_t);
14048         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14049         xcb_parts_idx++;
14050         xcb_align_to = ALIGNOF(uint8_t);
14051         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyBehaviors */
14052         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalKeyBehaviors;
14053         xcb_block_len += sizeof(uint8_t);
14054         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14055         xcb_parts_idx++;
14056         xcb_align_to = ALIGNOF(uint8_t);
14057         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyExplicit */
14058         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyExplicit;
14059         xcb_block_len += sizeof(xcb_keycode_t);
14060         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
14061         xcb_parts_idx++;
14062         xcb_align_to = ALIGNOF(xcb_keycode_t);
14063         /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyExplicit */
14064         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyExplicit;
14065         xcb_block_len += sizeof(uint8_t);
14066         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14067         xcb_parts_idx++;
14068         xcb_align_to = ALIGNOF(uint8_t);
14069         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyExplicit */
14070         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalKeyExplicit;
14071         xcb_block_len += sizeof(uint8_t);
14072         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14073         xcb_parts_idx++;
14074         xcb_align_to = ALIGNOF(uint8_t);
14075         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstModMapKey */
14076         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstModMapKey;
14077         xcb_block_len += sizeof(xcb_keycode_t);
14078         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
14079         xcb_parts_idx++;
14080         xcb_align_to = ALIGNOF(xcb_keycode_t);
14081         /* xcb_xkb_get_kbd_by_name_replies_t.types.nModMapKeys */
14082         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nModMapKeys;
14083         xcb_block_len += sizeof(uint8_t);
14084         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14085         xcb_parts_idx++;
14086         xcb_align_to = ALIGNOF(uint8_t);
14087         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalModMapKeys */
14088         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalModMapKeys;
14089         xcb_block_len += sizeof(uint8_t);
14090         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14091         xcb_parts_idx++;
14092         xcb_align_to = ALIGNOF(uint8_t);
14093         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstVModMapKey */
14094         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstVModMapKey;
14095         xcb_block_len += sizeof(xcb_keycode_t);
14096         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
14097         xcb_parts_idx++;
14098         xcb_align_to = ALIGNOF(xcb_keycode_t);
14099         /* xcb_xkb_get_kbd_by_name_replies_t.types.nVModMapKeys */
14100         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nVModMapKeys;
14101         xcb_block_len += sizeof(uint8_t);
14102         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14103         xcb_parts_idx++;
14104         xcb_align_to = ALIGNOF(uint8_t);
14105         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalVModMapKeys */
14106         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalVModMapKeys;
14107         xcb_block_len += sizeof(uint8_t);
14108         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14109         xcb_parts_idx++;
14110         xcb_align_to = ALIGNOF(uint8_t);
14111         /* xcb_xkb_get_kbd_by_name_replies_t.types.pad1 */
14112         xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
14113         xcb_block_len += sizeof(uint8_t);
14114         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14115         xcb_parts_idx++;
14116         xcb_align_to = ALIGNOF(uint8_t);
14117         /* xcb_xkb_get_kbd_by_name_replies_t.types.virtualMods */
14118         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.virtualMods;
14119         xcb_block_len += sizeof(uint16_t);
14120         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14121         xcb_parts_idx++;
14122         xcb_align_to = ALIGNOF(uint16_t);
14123         /* insert padding */
14124         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14125         xcb_buffer_len += xcb_block_len + xcb_pad;
14126         if (0 != xcb_pad) {
14127             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14128             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
14129             xcb_parts_idx++;
14130             xcb_pad = 0;
14131         }
14132         xcb_block_len = 0;
14133         /* map */
14134         xcb_parts[xcb_parts_idx].iov_base = (char *)0;
14135         xcb_block_len += xcb_xkb_get_kbd_by_name_replies_types_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.virtualMods, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map);
14136         xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_types_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.virtualMods, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map);
14137         xcb_parts_idx++;
14138         xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_types_map_t);
14139     }
14140     if(reported & XCB_XKB_GBN_DETAIL_COMPAT_MAP) {
14141         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_type */
14142         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatmap_type;
14143         xcb_block_len += sizeof(uint8_t);
14144         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14145         xcb_parts_idx++;
14146         xcb_align_to = ALIGNOF(uint8_t);
14147         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatDeviceID */
14148         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatDeviceID;
14149         xcb_block_len += sizeof(uint8_t);
14150         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14151         xcb_parts_idx++;
14152         xcb_align_to = ALIGNOF(uint8_t);
14153         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_sequence */
14154         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatmap_sequence;
14155         xcb_block_len += sizeof(uint16_t);
14156         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14157         xcb_parts_idx++;
14158         xcb_align_to = ALIGNOF(uint16_t);
14159         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_length */
14160         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatmap_length;
14161         xcb_block_len += sizeof(uint32_t);
14162         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
14163         xcb_parts_idx++;
14164         xcb_align_to = ALIGNOF(uint32_t);
14165         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.groupsRtrn */
14166         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.groupsRtrn;
14167         xcb_block_len += sizeof(uint8_t);
14168         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14169         xcb_parts_idx++;
14170         xcb_align_to = ALIGNOF(uint8_t);
14171         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad0 */
14172         xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
14173         xcb_block_len += sizeof(uint8_t);
14174         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14175         xcb_parts_idx++;
14176         xcb_align_to = ALIGNOF(uint8_t);
14177         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.firstSIRtrn */
14178         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.firstSIRtrn;
14179         xcb_block_len += sizeof(uint16_t);
14180         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14181         xcb_parts_idx++;
14182         xcb_align_to = ALIGNOF(uint16_t);
14183         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nSIRtrn */
14184         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.nSIRtrn;
14185         xcb_block_len += sizeof(uint16_t);
14186         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14187         xcb_parts_idx++;
14188         xcb_align_to = ALIGNOF(uint16_t);
14189         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nTotalSI */
14190         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.nTotalSI;
14191         xcb_block_len += sizeof(uint16_t);
14192         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14193         xcb_parts_idx++;
14194         xcb_align_to = ALIGNOF(uint16_t);
14195         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad1 */
14196         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14197         xcb_block_len += sizeof(uint8_t)*16;
14198         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*16;
14199         xcb_parts_idx++;
14200         xcb_align_to = ALIGNOF(uint8_t);
14201         /* insert padding */
14202         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14203         xcb_buffer_len += xcb_block_len + xcb_pad;
14204         if (0 != xcb_pad) {
14205             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14206             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
14207             xcb_parts_idx++;
14208             xcb_pad = 0;
14209         }
14210         xcb_block_len = 0;
14211         /* si_rtrn */
14212         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->compat_map.si_rtrn;
14213         xcb_block_len += _aux->compat_map.nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
14214         xcb_parts[xcb_parts_idx].iov_len = _aux->compat_map.nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
14215         xcb_parts_idx++;
14216         xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
14217         /* insert padding */
14218         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14219         xcb_buffer_len += xcb_block_len + xcb_pad;
14220         if (0 != xcb_pad) {
14221             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14222             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
14223             xcb_parts_idx++;
14224             xcb_pad = 0;
14225         }
14226         xcb_block_len = 0;
14227         /* group_rtrn */
14228         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->compat_map.group_rtrn;
14229         xcb_block_len += xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
14230         xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
14231         xcb_parts_idx++;
14232         xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
14233     }
14234     if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) {
14235         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_type */
14236         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatormap_type;
14237         xcb_block_len += sizeof(uint8_t);
14238         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14239         xcb_parts_idx++;
14240         xcb_align_to = ALIGNOF(uint8_t);
14241         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatorDeviceID */
14242         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatorDeviceID;
14243         xcb_block_len += sizeof(uint8_t);
14244         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14245         xcb_parts_idx++;
14246         xcb_align_to = ALIGNOF(uint8_t);
14247         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_sequence */
14248         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatormap_sequence;
14249         xcb_block_len += sizeof(uint16_t);
14250         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14251         xcb_parts_idx++;
14252         xcb_align_to = ALIGNOF(uint16_t);
14253         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_length */
14254         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatormap_length;
14255         xcb_block_len += sizeof(uint32_t);
14256         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
14257         xcb_parts_idx++;
14258         xcb_align_to = ALIGNOF(uint32_t);
14259         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.which */
14260         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.which;
14261         xcb_block_len += sizeof(uint32_t);
14262         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
14263         xcb_parts_idx++;
14264         xcb_align_to = ALIGNOF(uint32_t);
14265         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.realIndicators */
14266         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.realIndicators;
14267         xcb_block_len += sizeof(uint32_t);
14268         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
14269         xcb_parts_idx++;
14270         xcb_align_to = ALIGNOF(uint32_t);
14271         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.nIndicators */
14272         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.nIndicators;
14273         xcb_block_len += sizeof(uint8_t);
14274         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14275         xcb_parts_idx++;
14276         xcb_align_to = ALIGNOF(uint8_t);
14277         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.pad0 */
14278         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14279         xcb_block_len += sizeof(uint8_t)*15;
14280         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*15;
14281         xcb_parts_idx++;
14282         xcb_align_to = ALIGNOF(uint8_t);
14283         /* insert padding */
14284         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14285         xcb_buffer_len += xcb_block_len + xcb_pad;
14286         if (0 != xcb_pad) {
14287             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14288             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
14289             xcb_parts_idx++;
14290             xcb_pad = 0;
14291         }
14292         xcb_block_len = 0;
14293         /* maps */
14294         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicator_maps.maps;
14295         xcb_block_len += _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t);
14296         xcb_parts[xcb_parts_idx].iov_len = _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t);
14297         xcb_parts_idx++;
14298         xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
14299     }
14300     if((reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) ||
14301        (reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES)) {
14302         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_type */
14303         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyname_type;
14304         xcb_block_len += sizeof(uint8_t);
14305         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14306         xcb_parts_idx++;
14307         xcb_align_to = ALIGNOF(uint8_t);
14308         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyDeviceID */
14309         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyDeviceID;
14310         xcb_block_len += sizeof(uint8_t);
14311         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14312         xcb_parts_idx++;
14313         xcb_align_to = ALIGNOF(uint8_t);
14314         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_sequence */
14315         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyname_sequence;
14316         xcb_block_len += sizeof(uint16_t);
14317         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14318         xcb_parts_idx++;
14319         xcb_align_to = ALIGNOF(uint16_t);
14320         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_length */
14321         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyname_length;
14322         xcb_block_len += sizeof(uint32_t);
14323         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
14324         xcb_parts_idx++;
14325         xcb_align_to = ALIGNOF(uint32_t);
14326         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.which */
14327         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.which;
14328         xcb_block_len += sizeof(uint32_t);
14329         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
14330         xcb_parts_idx++;
14331         xcb_align_to = ALIGNOF(uint32_t);
14332         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMinKeyCode */
14333         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyMinKeyCode;
14334         xcb_block_len += sizeof(xcb_keycode_t);
14335         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
14336         xcb_parts_idx++;
14337         xcb_align_to = ALIGNOF(xcb_keycode_t);
14338         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMaxKeyCode */
14339         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyMaxKeyCode;
14340         xcb_block_len += sizeof(xcb_keycode_t);
14341         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
14342         xcb_parts_idx++;
14343         xcb_align_to = ALIGNOF(xcb_keycode_t);
14344         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nTypes */
14345         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nTypes;
14346         xcb_block_len += sizeof(uint8_t);
14347         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14348         xcb_parts_idx++;
14349         xcb_align_to = ALIGNOF(uint8_t);
14350         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.groupNames */
14351         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.groupNames;
14352         xcb_block_len += sizeof(uint8_t);
14353         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14354         xcb_parts_idx++;
14355         xcb_align_to = ALIGNOF(uint8_t);
14356         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.virtualMods */
14357         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.virtualMods;
14358         xcb_block_len += sizeof(uint16_t);
14359         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14360         xcb_parts_idx++;
14361         xcb_align_to = ALIGNOF(uint16_t);
14362         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.firstKey */
14363         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.firstKey;
14364         xcb_block_len += sizeof(xcb_keycode_t);
14365         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
14366         xcb_parts_idx++;
14367         xcb_align_to = ALIGNOF(xcb_keycode_t);
14368         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeys */
14369         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKeys;
14370         xcb_block_len += sizeof(uint8_t);
14371         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14372         xcb_parts_idx++;
14373         xcb_align_to = ALIGNOF(uint8_t);
14374         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.indicators */
14375         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.indicators;
14376         xcb_block_len += sizeof(uint32_t);
14377         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
14378         xcb_parts_idx++;
14379         xcb_align_to = ALIGNOF(uint32_t);
14380         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nRadioGroups */
14381         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nRadioGroups;
14382         xcb_block_len += sizeof(uint8_t);
14383         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14384         xcb_parts_idx++;
14385         xcb_align_to = ALIGNOF(uint8_t);
14386         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeyAliases */
14387         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKeyAliases;
14388         xcb_block_len += sizeof(uint8_t);
14389         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14390         xcb_parts_idx++;
14391         xcb_align_to = ALIGNOF(uint8_t);
14392         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKTLevels */
14393         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKTLevels;
14394         xcb_block_len += sizeof(uint16_t);
14395         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14396         xcb_parts_idx++;
14397         xcb_align_to = ALIGNOF(uint16_t);
14398         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.pad0 */
14399         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14400         xcb_block_len += sizeof(uint8_t)*4;
14401         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*4;
14402         xcb_parts_idx++;
14403         xcb_align_to = ALIGNOF(uint8_t);
14404         /* insert padding */
14405         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14406         xcb_buffer_len += xcb_block_len + xcb_pad;
14407         if (0 != xcb_pad) {
14408             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14409             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
14410             xcb_parts_idx++;
14411             xcb_pad = 0;
14412         }
14413         xcb_block_len = 0;
14414         /* valueList */
14415         xcb_parts[xcb_parts_idx].iov_base = (char *)0;
14416         xcb_block_len += xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList);
14417         xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList);
14418         xcb_parts_idx++;
14419         xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t);
14420     }
14421     if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) {
14422         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_type */
14423         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometry_type;
14424         xcb_block_len += sizeof(uint8_t);
14425         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14426         xcb_parts_idx++;
14427         xcb_align_to = ALIGNOF(uint8_t);
14428         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryDeviceID */
14429         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometryDeviceID;
14430         xcb_block_len += sizeof(uint8_t);
14431         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14432         xcb_parts_idx++;
14433         xcb_align_to = ALIGNOF(uint8_t);
14434         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_sequence */
14435         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometry_sequence;
14436         xcb_block_len += sizeof(uint16_t);
14437         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14438         xcb_parts_idx++;
14439         xcb_align_to = ALIGNOF(uint16_t);
14440         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_length */
14441         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometry_length;
14442         xcb_block_len += sizeof(uint32_t);
14443         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
14444         xcb_parts_idx++;
14445         xcb_align_to = ALIGNOF(uint32_t);
14446         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.name */
14447         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.name;
14448         xcb_block_len += sizeof(xcb_atom_t);
14449         xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
14450         xcb_parts_idx++;
14451         xcb_align_to = ALIGNOF(xcb_atom_t);
14452         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryFound */
14453         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometryFound;
14454         xcb_block_len += sizeof(uint8_t);
14455         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14456         xcb_parts_idx++;
14457         xcb_align_to = ALIGNOF(uint8_t);
14458         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.pad0 */
14459         xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
14460         xcb_block_len += sizeof(uint8_t);
14461         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14462         xcb_parts_idx++;
14463         xcb_align_to = ALIGNOF(uint8_t);
14464         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.widthMM */
14465         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.widthMM;
14466         xcb_block_len += sizeof(uint16_t);
14467         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14468         xcb_parts_idx++;
14469         xcb_align_to = ALIGNOF(uint16_t);
14470         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.heightMM */
14471         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.heightMM;
14472         xcb_block_len += sizeof(uint16_t);
14473         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14474         xcb_parts_idx++;
14475         xcb_align_to = ALIGNOF(uint16_t);
14476         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nProperties */
14477         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nProperties;
14478         xcb_block_len += sizeof(uint16_t);
14479         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14480         xcb_parts_idx++;
14481         xcb_align_to = ALIGNOF(uint16_t);
14482         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nColors */
14483         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nColors;
14484         xcb_block_len += sizeof(uint16_t);
14485         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14486         xcb_parts_idx++;
14487         xcb_align_to = ALIGNOF(uint16_t);
14488         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nShapes */
14489         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nShapes;
14490         xcb_block_len += sizeof(uint16_t);
14491         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14492         xcb_parts_idx++;
14493         xcb_align_to = ALIGNOF(uint16_t);
14494         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nSections */
14495         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nSections;
14496         xcb_block_len += sizeof(uint16_t);
14497         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14498         xcb_parts_idx++;
14499         xcb_align_to = ALIGNOF(uint16_t);
14500         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nDoodads */
14501         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nDoodads;
14502         xcb_block_len += sizeof(uint16_t);
14503         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14504         xcb_parts_idx++;
14505         xcb_align_to = ALIGNOF(uint16_t);
14506         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nKeyAliases */
14507         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nKeyAliases;
14508         xcb_block_len += sizeof(uint16_t);
14509         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
14510         xcb_parts_idx++;
14511         xcb_align_to = ALIGNOF(uint16_t);
14512         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.baseColorNdx */
14513         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.baseColorNdx;
14514         xcb_block_len += sizeof(uint8_t);
14515         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14516         xcb_parts_idx++;
14517         xcb_align_to = ALIGNOF(uint8_t);
14518         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.labelColorNdx */
14519         xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.labelColorNdx;
14520         xcb_block_len += sizeof(uint8_t);
14521         xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
14522         xcb_parts_idx++;
14523         xcb_align_to = ALIGNOF(uint8_t);
14524         /* insert padding */
14525         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14526         xcb_buffer_len += xcb_block_len + xcb_pad;
14527         if (0 != xcb_pad) {
14528             xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14529             xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
14530             xcb_parts_idx++;
14531             xcb_pad = 0;
14532         }
14533         xcb_block_len = 0;
14534         /* labelFont */
14535         xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.labelFont;
14536         xcb_block_len += xcb_xkb_counted_string_16_sizeof(_aux->geometry.labelFont);
14537         xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_counted_string_16_sizeof(_aux->geometry.labelFont);
14538         xcb_parts_idx++;
14539         xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
14540     }
14541     /* insert padding */
14542     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14543     xcb_buffer_len += xcb_block_len + xcb_pad;
14544     if (0 != xcb_pad) {
14545         xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
14546         xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
14547         xcb_parts_idx++;
14548         xcb_pad = 0;
14549     }
14550     xcb_block_len = 0;
14551 
14552     if (NULL == xcb_out) {
14553         /* allocate memory */
14554         xcb_out = malloc(xcb_buffer_len);
14555         *_buffer = xcb_out;
14556     }
14557 
14558     xcb_tmp = xcb_out;
14559     for(i=0; i<xcb_parts_idx; i++) {
14560         if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
14561             memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
14562         if (0 != xcb_parts[i].iov_len)
14563             xcb_tmp += xcb_parts[i].iov_len;
14564     }
14565 
14566     return xcb_buffer_len;
14567 }
14568 
14569 int
14570 xcb_xkb_get_kbd_by_name_replies_unpack (const void                         *_buffer  /**< */,
14571                                         uint16_t                            reported  /**< */,
14572                                         xcb_xkb_get_kbd_by_name_replies_t  *_aux  /**< */)
14573 {
14574     char *xcb_tmp = (char *)_buffer;
14575     unsigned int xcb_buffer_len = 0;
14576     unsigned int xcb_block_len = 0;
14577     unsigned int xcb_pad = 0;
14578     unsigned int xcb_align_to = 0;
14579 
14580 
14581     if((reported & XCB_XKB_GBN_DETAIL_TYPES) ||
14582        (reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) ||
14583        (reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS)) {
14584         /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_type */
14585         _aux->types.getmap_type = *(uint8_t *)xcb_tmp;
14586         xcb_block_len += sizeof(uint8_t);
14587         xcb_tmp += sizeof(uint8_t);
14588         xcb_align_to = ALIGNOF(uint8_t);
14589         /* xcb_xkb_get_kbd_by_name_replies_t.types.typeDeviceID */
14590         _aux->types.typeDeviceID = *(uint8_t *)xcb_tmp;
14591         xcb_block_len += sizeof(uint8_t);
14592         xcb_tmp += sizeof(uint8_t);
14593         xcb_align_to = ALIGNOF(uint8_t);
14594         /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_sequence */
14595         _aux->types.getmap_sequence = *(uint16_t *)xcb_tmp;
14596         xcb_block_len += sizeof(uint16_t);
14597         xcb_tmp += sizeof(uint16_t);
14598         xcb_align_to = ALIGNOF(uint16_t);
14599         /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_length */
14600         _aux->types.getmap_length = *(uint32_t *)xcb_tmp;
14601         xcb_block_len += sizeof(uint32_t);
14602         xcb_tmp += sizeof(uint32_t);
14603         xcb_align_to = ALIGNOF(uint32_t);
14604         /* xcb_xkb_get_kbd_by_name_replies_t.types.pad0 */
14605         _aux->types.pad0[0] = *(uint8_t *)xcb_tmp;
14606         _aux->types.pad0[1] = *(uint8_t *)xcb_tmp;
14607         xcb_block_len += sizeof(uint8_t) * 2;
14608         xcb_tmp += sizeof(uint8_t) * 2;
14609         xcb_align_to = ALIGNOF(uint8_t);
14610         /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMinKeyCode */
14611         _aux->types.typeMinKeyCode = *(xcb_keycode_t *)xcb_tmp;
14612         xcb_block_len += sizeof(xcb_keycode_t);
14613         xcb_tmp += sizeof(xcb_keycode_t);
14614         xcb_align_to = ALIGNOF(xcb_keycode_t);
14615         /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMaxKeyCode */
14616         _aux->types.typeMaxKeyCode = *(xcb_keycode_t *)xcb_tmp;
14617         xcb_block_len += sizeof(xcb_keycode_t);
14618         xcb_tmp += sizeof(xcb_keycode_t);
14619         xcb_align_to = ALIGNOF(xcb_keycode_t);
14620         /* xcb_xkb_get_kbd_by_name_replies_t.types.present */
14621         _aux->types.present = *(uint16_t *)xcb_tmp;
14622         xcb_block_len += sizeof(uint16_t);
14623         xcb_tmp += sizeof(uint16_t);
14624         xcb_align_to = ALIGNOF(uint16_t);
14625         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstType */
14626         _aux->types.firstType = *(uint8_t *)xcb_tmp;
14627         xcb_block_len += sizeof(uint8_t);
14628         xcb_tmp += sizeof(uint8_t);
14629         xcb_align_to = ALIGNOF(uint8_t);
14630         /* xcb_xkb_get_kbd_by_name_replies_t.types.nTypes */
14631         _aux->types.nTypes = *(uint8_t *)xcb_tmp;
14632         xcb_block_len += sizeof(uint8_t);
14633         xcb_tmp += sizeof(uint8_t);
14634         xcb_align_to = ALIGNOF(uint8_t);
14635         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalTypes */
14636         _aux->types.totalTypes = *(uint8_t *)xcb_tmp;
14637         xcb_block_len += sizeof(uint8_t);
14638         xcb_tmp += sizeof(uint8_t);
14639         xcb_align_to = ALIGNOF(uint8_t);
14640         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeySym */
14641         _aux->types.firstKeySym = *(xcb_keycode_t *)xcb_tmp;
14642         xcb_block_len += sizeof(xcb_keycode_t);
14643         xcb_tmp += sizeof(xcb_keycode_t);
14644         xcb_align_to = ALIGNOF(xcb_keycode_t);
14645         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalSyms */
14646         _aux->types.totalSyms = *(uint16_t *)xcb_tmp;
14647         xcb_block_len += sizeof(uint16_t);
14648         xcb_tmp += sizeof(uint16_t);
14649         xcb_align_to = ALIGNOF(uint16_t);
14650         /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeySyms */
14651         _aux->types.nKeySyms = *(uint8_t *)xcb_tmp;
14652         xcb_block_len += sizeof(uint8_t);
14653         xcb_tmp += sizeof(uint8_t);
14654         xcb_align_to = ALIGNOF(uint8_t);
14655         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyAction */
14656         _aux->types.firstKeyAction = *(xcb_keycode_t *)xcb_tmp;
14657         xcb_block_len += sizeof(xcb_keycode_t);
14658         xcb_tmp += sizeof(xcb_keycode_t);
14659         xcb_align_to = ALIGNOF(xcb_keycode_t);
14660         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalActions */
14661         _aux->types.totalActions = *(uint16_t *)xcb_tmp;
14662         xcb_block_len += sizeof(uint16_t);
14663         xcb_tmp += sizeof(uint16_t);
14664         xcb_align_to = ALIGNOF(uint16_t);
14665         /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyActions */
14666         _aux->types.nKeyActions = *(uint8_t *)xcb_tmp;
14667         xcb_block_len += sizeof(uint8_t);
14668         xcb_tmp += sizeof(uint8_t);
14669         xcb_align_to = ALIGNOF(uint8_t);
14670         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyBehavior */
14671         _aux->types.firstKeyBehavior = *(xcb_keycode_t *)xcb_tmp;
14672         xcb_block_len += sizeof(xcb_keycode_t);
14673         xcb_tmp += sizeof(xcb_keycode_t);
14674         xcb_align_to = ALIGNOF(xcb_keycode_t);
14675         /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyBehaviors */
14676         _aux->types.nKeyBehaviors = *(uint8_t *)xcb_tmp;
14677         xcb_block_len += sizeof(uint8_t);
14678         xcb_tmp += sizeof(uint8_t);
14679         xcb_align_to = ALIGNOF(uint8_t);
14680         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyBehaviors */
14681         _aux->types.totalKeyBehaviors = *(uint8_t *)xcb_tmp;
14682         xcb_block_len += sizeof(uint8_t);
14683         xcb_tmp += sizeof(uint8_t);
14684         xcb_align_to = ALIGNOF(uint8_t);
14685         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyExplicit */
14686         _aux->types.firstKeyExplicit = *(xcb_keycode_t *)xcb_tmp;
14687         xcb_block_len += sizeof(xcb_keycode_t);
14688         xcb_tmp += sizeof(xcb_keycode_t);
14689         xcb_align_to = ALIGNOF(xcb_keycode_t);
14690         /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyExplicit */
14691         _aux->types.nKeyExplicit = *(uint8_t *)xcb_tmp;
14692         xcb_block_len += sizeof(uint8_t);
14693         xcb_tmp += sizeof(uint8_t);
14694         xcb_align_to = ALIGNOF(uint8_t);
14695         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyExplicit */
14696         _aux->types.totalKeyExplicit = *(uint8_t *)xcb_tmp;
14697         xcb_block_len += sizeof(uint8_t);
14698         xcb_tmp += sizeof(uint8_t);
14699         xcb_align_to = ALIGNOF(uint8_t);
14700         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstModMapKey */
14701         _aux->types.firstModMapKey = *(xcb_keycode_t *)xcb_tmp;
14702         xcb_block_len += sizeof(xcb_keycode_t);
14703         xcb_tmp += sizeof(xcb_keycode_t);
14704         xcb_align_to = ALIGNOF(xcb_keycode_t);
14705         /* xcb_xkb_get_kbd_by_name_replies_t.types.nModMapKeys */
14706         _aux->types.nModMapKeys = *(uint8_t *)xcb_tmp;
14707         xcb_block_len += sizeof(uint8_t);
14708         xcb_tmp += sizeof(uint8_t);
14709         xcb_align_to = ALIGNOF(uint8_t);
14710         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalModMapKeys */
14711         _aux->types.totalModMapKeys = *(uint8_t *)xcb_tmp;
14712         xcb_block_len += sizeof(uint8_t);
14713         xcb_tmp += sizeof(uint8_t);
14714         xcb_align_to = ALIGNOF(uint8_t);
14715         /* xcb_xkb_get_kbd_by_name_replies_t.types.firstVModMapKey */
14716         _aux->types.firstVModMapKey = *(xcb_keycode_t *)xcb_tmp;
14717         xcb_block_len += sizeof(xcb_keycode_t);
14718         xcb_tmp += sizeof(xcb_keycode_t);
14719         xcb_align_to = ALIGNOF(xcb_keycode_t);
14720         /* xcb_xkb_get_kbd_by_name_replies_t.types.nVModMapKeys */
14721         _aux->types.nVModMapKeys = *(uint8_t *)xcb_tmp;
14722         xcb_block_len += sizeof(uint8_t);
14723         xcb_tmp += sizeof(uint8_t);
14724         xcb_align_to = ALIGNOF(uint8_t);
14725         /* xcb_xkb_get_kbd_by_name_replies_t.types.totalVModMapKeys */
14726         _aux->types.totalVModMapKeys = *(uint8_t *)xcb_tmp;
14727         xcb_block_len += sizeof(uint8_t);
14728         xcb_tmp += sizeof(uint8_t);
14729         xcb_align_to = ALIGNOF(uint8_t);
14730         /* xcb_xkb_get_kbd_by_name_replies_t.types.pad1 */
14731         _aux->types.pad1 = *(uint8_t *)xcb_tmp;
14732         xcb_block_len += sizeof(uint8_t);
14733         xcb_tmp += sizeof(uint8_t);
14734         xcb_align_to = ALIGNOF(uint8_t);
14735         /* xcb_xkb_get_kbd_by_name_replies_t.types.virtualMods */
14736         _aux->types.virtualMods = *(uint16_t *)xcb_tmp;
14737         xcb_block_len += sizeof(uint16_t);
14738         xcb_tmp += sizeof(uint16_t);
14739         xcb_align_to = ALIGNOF(uint16_t);
14740         /* insert padding */
14741         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14742         xcb_buffer_len += xcb_block_len + xcb_pad;
14743         if (0 != xcb_pad) {
14744             xcb_tmp += xcb_pad;
14745             xcb_pad = 0;
14746         }
14747         xcb_block_len = 0;
14748         /* map */
14749         xcb_block_len += xcb_xkb_get_kbd_by_name_replies_types_map_unpack(xcb_tmp, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.virtualMods, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map);
14750         xcb_tmp += xcb_block_len;
14751         xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_types_map_t);
14752     }
14753     if(reported & XCB_XKB_GBN_DETAIL_COMPAT_MAP) {
14754         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_type */
14755         _aux->compat_map.compatmap_type = *(uint8_t *)xcb_tmp;
14756         xcb_block_len += sizeof(uint8_t);
14757         xcb_tmp += sizeof(uint8_t);
14758         xcb_align_to = ALIGNOF(uint8_t);
14759         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatDeviceID */
14760         _aux->compat_map.compatDeviceID = *(uint8_t *)xcb_tmp;
14761         xcb_block_len += sizeof(uint8_t);
14762         xcb_tmp += sizeof(uint8_t);
14763         xcb_align_to = ALIGNOF(uint8_t);
14764         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_sequence */
14765         _aux->compat_map.compatmap_sequence = *(uint16_t *)xcb_tmp;
14766         xcb_block_len += sizeof(uint16_t);
14767         xcb_tmp += sizeof(uint16_t);
14768         xcb_align_to = ALIGNOF(uint16_t);
14769         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_length */
14770         _aux->compat_map.compatmap_length = *(uint32_t *)xcb_tmp;
14771         xcb_block_len += sizeof(uint32_t);
14772         xcb_tmp += sizeof(uint32_t);
14773         xcb_align_to = ALIGNOF(uint32_t);
14774         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.groupsRtrn */
14775         _aux->compat_map.groupsRtrn = *(uint8_t *)xcb_tmp;
14776         xcb_block_len += sizeof(uint8_t);
14777         xcb_tmp += sizeof(uint8_t);
14778         xcb_align_to = ALIGNOF(uint8_t);
14779         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad0 */
14780         _aux->compat_map.pad0 = *(uint8_t *)xcb_tmp;
14781         xcb_block_len += sizeof(uint8_t);
14782         xcb_tmp += sizeof(uint8_t);
14783         xcb_align_to = ALIGNOF(uint8_t);
14784         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.firstSIRtrn */
14785         _aux->compat_map.firstSIRtrn = *(uint16_t *)xcb_tmp;
14786         xcb_block_len += sizeof(uint16_t);
14787         xcb_tmp += sizeof(uint16_t);
14788         xcb_align_to = ALIGNOF(uint16_t);
14789         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nSIRtrn */
14790         _aux->compat_map.nSIRtrn = *(uint16_t *)xcb_tmp;
14791         xcb_block_len += sizeof(uint16_t);
14792         xcb_tmp += sizeof(uint16_t);
14793         xcb_align_to = ALIGNOF(uint16_t);
14794         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nTotalSI */
14795         _aux->compat_map.nTotalSI = *(uint16_t *)xcb_tmp;
14796         xcb_block_len += sizeof(uint16_t);
14797         xcb_tmp += sizeof(uint16_t);
14798         xcb_align_to = ALIGNOF(uint16_t);
14799         /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad1 */
14800         _aux->compat_map.pad1[0] = *(uint8_t *)xcb_tmp;
14801         _aux->compat_map.pad1[1] = *(uint8_t *)xcb_tmp;
14802         _aux->compat_map.pad1[2] = *(uint8_t *)xcb_tmp;
14803         _aux->compat_map.pad1[3] = *(uint8_t *)xcb_tmp;
14804         _aux->compat_map.pad1[4] = *(uint8_t *)xcb_tmp;
14805         _aux->compat_map.pad1[5] = *(uint8_t *)xcb_tmp;
14806         _aux->compat_map.pad1[6] = *(uint8_t *)xcb_tmp;
14807         _aux->compat_map.pad1[7] = *(uint8_t *)xcb_tmp;
14808         _aux->compat_map.pad1[8] = *(uint8_t *)xcb_tmp;
14809         _aux->compat_map.pad1[9] = *(uint8_t *)xcb_tmp;
14810         _aux->compat_map.pad1[10] = *(uint8_t *)xcb_tmp;
14811         _aux->compat_map.pad1[11] = *(uint8_t *)xcb_tmp;
14812         _aux->compat_map.pad1[12] = *(uint8_t *)xcb_tmp;
14813         _aux->compat_map.pad1[13] = *(uint8_t *)xcb_tmp;
14814         _aux->compat_map.pad1[14] = *(uint8_t *)xcb_tmp;
14815         _aux->compat_map.pad1[15] = *(uint8_t *)xcb_tmp;
14816         xcb_block_len += sizeof(uint8_t) * 16;
14817         xcb_tmp += sizeof(uint8_t) * 16;
14818         xcb_align_to = ALIGNOF(uint8_t);
14819         /* insert padding */
14820         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14821         xcb_buffer_len += xcb_block_len + xcb_pad;
14822         if (0 != xcb_pad) {
14823             xcb_tmp += xcb_pad;
14824             xcb_pad = 0;
14825         }
14826         xcb_block_len = 0;
14827         /* si_rtrn */
14828         _aux->compat_map.si_rtrn = (xcb_xkb_sym_interpret_t *)xcb_tmp;
14829         xcb_block_len += _aux->compat_map.nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
14830         xcb_tmp += xcb_block_len;
14831         xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
14832         /* insert padding */
14833         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14834         xcb_buffer_len += xcb_block_len + xcb_pad;
14835         if (0 != xcb_pad) {
14836             xcb_tmp += xcb_pad;
14837             xcb_pad = 0;
14838         }
14839         xcb_block_len = 0;
14840         /* group_rtrn */
14841         _aux->compat_map.group_rtrn = (xcb_xkb_mod_def_t *)xcb_tmp;
14842         xcb_block_len += xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
14843         xcb_tmp += xcb_block_len;
14844         xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
14845     }
14846     if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) {
14847         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_type */
14848         _aux->indicator_maps.indicatormap_type = *(uint8_t *)xcb_tmp;
14849         xcb_block_len += sizeof(uint8_t);
14850         xcb_tmp += sizeof(uint8_t);
14851         xcb_align_to = ALIGNOF(uint8_t);
14852         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatorDeviceID */
14853         _aux->indicator_maps.indicatorDeviceID = *(uint8_t *)xcb_tmp;
14854         xcb_block_len += sizeof(uint8_t);
14855         xcb_tmp += sizeof(uint8_t);
14856         xcb_align_to = ALIGNOF(uint8_t);
14857         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_sequence */
14858         _aux->indicator_maps.indicatormap_sequence = *(uint16_t *)xcb_tmp;
14859         xcb_block_len += sizeof(uint16_t);
14860         xcb_tmp += sizeof(uint16_t);
14861         xcb_align_to = ALIGNOF(uint16_t);
14862         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_length */
14863         _aux->indicator_maps.indicatormap_length = *(uint32_t *)xcb_tmp;
14864         xcb_block_len += sizeof(uint32_t);
14865         xcb_tmp += sizeof(uint32_t);
14866         xcb_align_to = ALIGNOF(uint32_t);
14867         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.which */
14868         _aux->indicator_maps.which = *(uint32_t *)xcb_tmp;
14869         xcb_block_len += sizeof(uint32_t);
14870         xcb_tmp += sizeof(uint32_t);
14871         xcb_align_to = ALIGNOF(uint32_t);
14872         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.realIndicators */
14873         _aux->indicator_maps.realIndicators = *(uint32_t *)xcb_tmp;
14874         xcb_block_len += sizeof(uint32_t);
14875         xcb_tmp += sizeof(uint32_t);
14876         xcb_align_to = ALIGNOF(uint32_t);
14877         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.nIndicators */
14878         _aux->indicator_maps.nIndicators = *(uint8_t *)xcb_tmp;
14879         xcb_block_len += sizeof(uint8_t);
14880         xcb_tmp += sizeof(uint8_t);
14881         xcb_align_to = ALIGNOF(uint8_t);
14882         /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.pad0 */
14883         _aux->indicator_maps.pad0[0] = *(uint8_t *)xcb_tmp;
14884         _aux->indicator_maps.pad0[1] = *(uint8_t *)xcb_tmp;
14885         _aux->indicator_maps.pad0[2] = *(uint8_t *)xcb_tmp;
14886         _aux->indicator_maps.pad0[3] = *(uint8_t *)xcb_tmp;
14887         _aux->indicator_maps.pad0[4] = *(uint8_t *)xcb_tmp;
14888         _aux->indicator_maps.pad0[5] = *(uint8_t *)xcb_tmp;
14889         _aux->indicator_maps.pad0[6] = *(uint8_t *)xcb_tmp;
14890         _aux->indicator_maps.pad0[7] = *(uint8_t *)xcb_tmp;
14891         _aux->indicator_maps.pad0[8] = *(uint8_t *)xcb_tmp;
14892         _aux->indicator_maps.pad0[9] = *(uint8_t *)xcb_tmp;
14893         _aux->indicator_maps.pad0[10] = *(uint8_t *)xcb_tmp;
14894         _aux->indicator_maps.pad0[11] = *(uint8_t *)xcb_tmp;
14895         _aux->indicator_maps.pad0[12] = *(uint8_t *)xcb_tmp;
14896         _aux->indicator_maps.pad0[13] = *(uint8_t *)xcb_tmp;
14897         _aux->indicator_maps.pad0[14] = *(uint8_t *)xcb_tmp;
14898         xcb_block_len += sizeof(uint8_t) * 15;
14899         xcb_tmp += sizeof(uint8_t) * 15;
14900         xcb_align_to = ALIGNOF(uint8_t);
14901         /* insert padding */
14902         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
14903         xcb_buffer_len += xcb_block_len + xcb_pad;
14904         if (0 != xcb_pad) {
14905             xcb_tmp += xcb_pad;
14906             xcb_pad = 0;
14907         }
14908         xcb_block_len = 0;
14909         /* maps */
14910         _aux->indicator_maps.maps = (xcb_xkb_indicator_map_t *)xcb_tmp;
14911         xcb_block_len += _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t);
14912         xcb_tmp += xcb_block_len;
14913         xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
14914     }
14915     if((reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) ||
14916        (reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES)) {
14917         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_type */
14918         _aux->key_names.keyname_type = *(uint8_t *)xcb_tmp;
14919         xcb_block_len += sizeof(uint8_t);
14920         xcb_tmp += sizeof(uint8_t);
14921         xcb_align_to = ALIGNOF(uint8_t);
14922         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyDeviceID */
14923         _aux->key_names.keyDeviceID = *(uint8_t *)xcb_tmp;
14924         xcb_block_len += sizeof(uint8_t);
14925         xcb_tmp += sizeof(uint8_t);
14926         xcb_align_to = ALIGNOF(uint8_t);
14927         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_sequence */
14928         _aux->key_names.keyname_sequence = *(uint16_t *)xcb_tmp;
14929         xcb_block_len += sizeof(uint16_t);
14930         xcb_tmp += sizeof(uint16_t);
14931         xcb_align_to = ALIGNOF(uint16_t);
14932         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_length */
14933         _aux->key_names.keyname_length = *(uint32_t *)xcb_tmp;
14934         xcb_block_len += sizeof(uint32_t);
14935         xcb_tmp += sizeof(uint32_t);
14936         xcb_align_to = ALIGNOF(uint32_t);
14937         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.which */
14938         _aux->key_names.which = *(uint32_t *)xcb_tmp;
14939         xcb_block_len += sizeof(uint32_t);
14940         xcb_tmp += sizeof(uint32_t);
14941         xcb_align_to = ALIGNOF(uint32_t);
14942         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMinKeyCode */
14943         _aux->key_names.keyMinKeyCode = *(xcb_keycode_t *)xcb_tmp;
14944         xcb_block_len += sizeof(xcb_keycode_t);
14945         xcb_tmp += sizeof(xcb_keycode_t);
14946         xcb_align_to = ALIGNOF(xcb_keycode_t);
14947         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMaxKeyCode */
14948         _aux->key_names.keyMaxKeyCode = *(xcb_keycode_t *)xcb_tmp;
14949         xcb_block_len += sizeof(xcb_keycode_t);
14950         xcb_tmp += sizeof(xcb_keycode_t);
14951         xcb_align_to = ALIGNOF(xcb_keycode_t);
14952         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nTypes */
14953         _aux->key_names.nTypes = *(uint8_t *)xcb_tmp;
14954         xcb_block_len += sizeof(uint8_t);
14955         xcb_tmp += sizeof(uint8_t);
14956         xcb_align_to = ALIGNOF(uint8_t);
14957         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.groupNames */
14958         _aux->key_names.groupNames = *(uint8_t *)xcb_tmp;
14959         xcb_block_len += sizeof(uint8_t);
14960         xcb_tmp += sizeof(uint8_t);
14961         xcb_align_to = ALIGNOF(uint8_t);
14962         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.virtualMods */
14963         _aux->key_names.virtualMods = *(uint16_t *)xcb_tmp;
14964         xcb_block_len += sizeof(uint16_t);
14965         xcb_tmp += sizeof(uint16_t);
14966         xcb_align_to = ALIGNOF(uint16_t);
14967         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.firstKey */
14968         _aux->key_names.firstKey = *(xcb_keycode_t *)xcb_tmp;
14969         xcb_block_len += sizeof(xcb_keycode_t);
14970         xcb_tmp += sizeof(xcb_keycode_t);
14971         xcb_align_to = ALIGNOF(xcb_keycode_t);
14972         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeys */
14973         _aux->key_names.nKeys = *(uint8_t *)xcb_tmp;
14974         xcb_block_len += sizeof(uint8_t);
14975         xcb_tmp += sizeof(uint8_t);
14976         xcb_align_to = ALIGNOF(uint8_t);
14977         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.indicators */
14978         _aux->key_names.indicators = *(uint32_t *)xcb_tmp;
14979         xcb_block_len += sizeof(uint32_t);
14980         xcb_tmp += sizeof(uint32_t);
14981         xcb_align_to = ALIGNOF(uint32_t);
14982         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nRadioGroups */
14983         _aux->key_names.nRadioGroups = *(uint8_t *)xcb_tmp;
14984         xcb_block_len += sizeof(uint8_t);
14985         xcb_tmp += sizeof(uint8_t);
14986         xcb_align_to = ALIGNOF(uint8_t);
14987         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeyAliases */
14988         _aux->key_names.nKeyAliases = *(uint8_t *)xcb_tmp;
14989         xcb_block_len += sizeof(uint8_t);
14990         xcb_tmp += sizeof(uint8_t);
14991         xcb_align_to = ALIGNOF(uint8_t);
14992         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKTLevels */
14993         _aux->key_names.nKTLevels = *(uint16_t *)xcb_tmp;
14994         xcb_block_len += sizeof(uint16_t);
14995         xcb_tmp += sizeof(uint16_t);
14996         xcb_align_to = ALIGNOF(uint16_t);
14997         /* xcb_xkb_get_kbd_by_name_replies_t.key_names.pad0 */
14998         _aux->key_names.pad0[0] = *(uint8_t *)xcb_tmp;
14999         _aux->key_names.pad0[1] = *(uint8_t *)xcb_tmp;
15000         _aux->key_names.pad0[2] = *(uint8_t *)xcb_tmp;
15001         _aux->key_names.pad0[3] = *(uint8_t *)xcb_tmp;
15002         xcb_block_len += sizeof(uint8_t) * 4;
15003         xcb_tmp += sizeof(uint8_t) * 4;
15004         xcb_align_to = ALIGNOF(uint8_t);
15005         /* insert padding */
15006         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15007         xcb_buffer_len += xcb_block_len + xcb_pad;
15008         if (0 != xcb_pad) {
15009             xcb_tmp += xcb_pad;
15010             xcb_pad = 0;
15011         }
15012         xcb_block_len = 0;
15013         /* valueList */
15014         xcb_block_len += xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack(xcb_tmp, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList);
15015         xcb_tmp += xcb_block_len;
15016         xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t);
15017     }
15018     if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) {
15019         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_type */
15020         _aux->geometry.geometry_type = *(uint8_t *)xcb_tmp;
15021         xcb_block_len += sizeof(uint8_t);
15022         xcb_tmp += sizeof(uint8_t);
15023         xcb_align_to = ALIGNOF(uint8_t);
15024         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryDeviceID */
15025         _aux->geometry.geometryDeviceID = *(uint8_t *)xcb_tmp;
15026         xcb_block_len += sizeof(uint8_t);
15027         xcb_tmp += sizeof(uint8_t);
15028         xcb_align_to = ALIGNOF(uint8_t);
15029         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_sequence */
15030         _aux->geometry.geometry_sequence = *(uint16_t *)xcb_tmp;
15031         xcb_block_len += sizeof(uint16_t);
15032         xcb_tmp += sizeof(uint16_t);
15033         xcb_align_to = ALIGNOF(uint16_t);
15034         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_length */
15035         _aux->geometry.geometry_length = *(uint32_t *)xcb_tmp;
15036         xcb_block_len += sizeof(uint32_t);
15037         xcb_tmp += sizeof(uint32_t);
15038         xcb_align_to = ALIGNOF(uint32_t);
15039         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.name */
15040         _aux->geometry.name = *(xcb_atom_t *)xcb_tmp;
15041         xcb_block_len += sizeof(xcb_atom_t);
15042         xcb_tmp += sizeof(xcb_atom_t);
15043         xcb_align_to = ALIGNOF(xcb_atom_t);
15044         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryFound */
15045         _aux->geometry.geometryFound = *(uint8_t *)xcb_tmp;
15046         xcb_block_len += sizeof(uint8_t);
15047         xcb_tmp += sizeof(uint8_t);
15048         xcb_align_to = ALIGNOF(uint8_t);
15049         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.pad0 */
15050         _aux->geometry.pad0 = *(uint8_t *)xcb_tmp;
15051         xcb_block_len += sizeof(uint8_t);
15052         xcb_tmp += sizeof(uint8_t);
15053         xcb_align_to = ALIGNOF(uint8_t);
15054         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.widthMM */
15055         _aux->geometry.widthMM = *(uint16_t *)xcb_tmp;
15056         xcb_block_len += sizeof(uint16_t);
15057         xcb_tmp += sizeof(uint16_t);
15058         xcb_align_to = ALIGNOF(uint16_t);
15059         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.heightMM */
15060         _aux->geometry.heightMM = *(uint16_t *)xcb_tmp;
15061         xcb_block_len += sizeof(uint16_t);
15062         xcb_tmp += sizeof(uint16_t);
15063         xcb_align_to = ALIGNOF(uint16_t);
15064         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nProperties */
15065         _aux->geometry.nProperties = *(uint16_t *)xcb_tmp;
15066         xcb_block_len += sizeof(uint16_t);
15067         xcb_tmp += sizeof(uint16_t);
15068         xcb_align_to = ALIGNOF(uint16_t);
15069         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nColors */
15070         _aux->geometry.nColors = *(uint16_t *)xcb_tmp;
15071         xcb_block_len += sizeof(uint16_t);
15072         xcb_tmp += sizeof(uint16_t);
15073         xcb_align_to = ALIGNOF(uint16_t);
15074         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nShapes */
15075         _aux->geometry.nShapes = *(uint16_t *)xcb_tmp;
15076         xcb_block_len += sizeof(uint16_t);
15077         xcb_tmp += sizeof(uint16_t);
15078         xcb_align_to = ALIGNOF(uint16_t);
15079         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nSections */
15080         _aux->geometry.nSections = *(uint16_t *)xcb_tmp;
15081         xcb_block_len += sizeof(uint16_t);
15082         xcb_tmp += sizeof(uint16_t);
15083         xcb_align_to = ALIGNOF(uint16_t);
15084         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nDoodads */
15085         _aux->geometry.nDoodads = *(uint16_t *)xcb_tmp;
15086         xcb_block_len += sizeof(uint16_t);
15087         xcb_tmp += sizeof(uint16_t);
15088         xcb_align_to = ALIGNOF(uint16_t);
15089         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nKeyAliases */
15090         _aux->geometry.nKeyAliases = *(uint16_t *)xcb_tmp;
15091         xcb_block_len += sizeof(uint16_t);
15092         xcb_tmp += sizeof(uint16_t);
15093         xcb_align_to = ALIGNOF(uint16_t);
15094         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.baseColorNdx */
15095         _aux->geometry.baseColorNdx = *(uint8_t *)xcb_tmp;
15096         xcb_block_len += sizeof(uint8_t);
15097         xcb_tmp += sizeof(uint8_t);
15098         xcb_align_to = ALIGNOF(uint8_t);
15099         /* xcb_xkb_get_kbd_by_name_replies_t.geometry.labelColorNdx */
15100         _aux->geometry.labelColorNdx = *(uint8_t *)xcb_tmp;
15101         xcb_block_len += sizeof(uint8_t);
15102         xcb_tmp += sizeof(uint8_t);
15103         xcb_align_to = ALIGNOF(uint8_t);
15104         /* insert padding */
15105         xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15106         xcb_buffer_len += xcb_block_len + xcb_pad;
15107         if (0 != xcb_pad) {
15108             xcb_tmp += xcb_pad;
15109             xcb_pad = 0;
15110         }
15111         xcb_block_len = 0;
15112         /* labelFont */
15113         _aux->geometry.labelFont = (xcb_xkb_counted_string_16_t *)xcb_tmp;
15114         xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp);
15115         xcb_tmp += xcb_block_len;
15116         xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
15117     }
15118     /* insert padding */
15119     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15120     xcb_buffer_len += xcb_block_len + xcb_pad;
15121     if (0 != xcb_pad) {
15122         xcb_tmp += xcb_pad;
15123         xcb_pad = 0;
15124     }
15125     xcb_block_len = 0;
15126 
15127     return xcb_buffer_len;
15128 }
15129 
15130 int
15131 xcb_xkb_get_kbd_by_name_replies_sizeof (const void  *_buffer  /**< */,
15132                                         uint16_t     reported  /**< */)
15133 {
15134     xcb_xkb_get_kbd_by_name_replies_t _aux;
15135     return xcb_xkb_get_kbd_by_name_replies_unpack(_buffer, reported, &_aux);
15136 }
15137 
15138 
15139 /*****************************************************************************
15140  **
15141  ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name
15142  **
15143  ** @param xcb_connection_t      *c
15144  ** @param xcb_xkb_device_spec_t  deviceSpec
15145  ** @param uint16_t               need
15146  ** @param uint16_t               want
15147  ** @param uint8_t                load
15148  ** @returns xcb_xkb_get_kbd_by_name_cookie_t
15149  **
15150  *****************************************************************************/
15151 
15152 xcb_xkb_get_kbd_by_name_cookie_t
15153 xcb_xkb_get_kbd_by_name (xcb_connection_t      *c  /**< */,
15154                          xcb_xkb_device_spec_t  deviceSpec  /**< */,
15155                          uint16_t               need  /**< */,
15156                          uint16_t               want  /**< */,
15157                          uint8_t                load  /**< */)
15158 {
15159     static const xcb_protocol_request_t xcb_req = {
15160         /* count */ 2,
15161         /* ext */ &xcb_xkb_id,
15162         /* opcode */ XCB_XKB_GET_KBD_BY_NAME,
15163         /* isvoid */ 0
15164     };
15165 
15166     struct iovec xcb_parts[4];
15167     xcb_xkb_get_kbd_by_name_cookie_t xcb_ret;
15168     xcb_xkb_get_kbd_by_name_request_t xcb_out;
15169 
15170     xcb_out.deviceSpec = deviceSpec;
15171     xcb_out.need = need;
15172     xcb_out.want = want;
15173     xcb_out.load = load;
15174     xcb_out.pad0 = 0;
15175 
15176     xcb_parts[2].iov_base = (char *) &xcb_out;
15177     xcb_parts[2].iov_len = sizeof(xcb_out);
15178     xcb_parts[3].iov_base = 0;
15179     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15180 
15181     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15182     return xcb_ret;
15183 }
15184 
15185 
15186 /*****************************************************************************
15187  **
15188  ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name_unchecked
15189  **
15190  ** @param xcb_connection_t      *c
15191  ** @param xcb_xkb_device_spec_t  deviceSpec
15192  ** @param uint16_t               need
15193  ** @param uint16_t               want
15194  ** @param uint8_t                load
15195  ** @returns xcb_xkb_get_kbd_by_name_cookie_t
15196  **
15197  *****************************************************************************/
15198 
15199 xcb_xkb_get_kbd_by_name_cookie_t
15200 xcb_xkb_get_kbd_by_name_unchecked (xcb_connection_t      *c  /**< */,
15201                                    xcb_xkb_device_spec_t  deviceSpec  /**< */,
15202                                    uint16_t               need  /**< */,
15203                                    uint16_t               want  /**< */,
15204                                    uint8_t                load  /**< */)
15205 {
15206     static const xcb_protocol_request_t xcb_req = {
15207         /* count */ 2,
15208         /* ext */ &xcb_xkb_id,
15209         /* opcode */ XCB_XKB_GET_KBD_BY_NAME,
15210         /* isvoid */ 0
15211     };
15212 
15213     struct iovec xcb_parts[4];
15214     xcb_xkb_get_kbd_by_name_cookie_t xcb_ret;
15215     xcb_xkb_get_kbd_by_name_request_t xcb_out;
15216 
15217     xcb_out.deviceSpec = deviceSpec;
15218     xcb_out.need = need;
15219     xcb_out.want = want;
15220     xcb_out.load = load;
15221     xcb_out.pad0 = 0;
15222 
15223     xcb_parts[2].iov_base = (char *) &xcb_out;
15224     xcb_parts[2].iov_len = sizeof(xcb_out);
15225     xcb_parts[3].iov_base = 0;
15226     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15227 
15228     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15229     return xcb_ret;
15230 }
15231 
15232 
15233 /*****************************************************************************
15234  **
15235  ** xcb_xkb_get_kbd_by_name_replies_t * xcb_xkb_get_kbd_by_name_replies
15236  **
15237  ** @param const xcb_xkb_get_kbd_by_name_reply_t *R
15238  ** @returns xcb_xkb_get_kbd_by_name_replies_t *
15239  **
15240  *****************************************************************************/
15241 
15242 void *
15243 xcb_xkb_get_kbd_by_name_replies (const xcb_xkb_get_kbd_by_name_reply_t *R  /**< */)
15244 {
15245     return (void *) (R + 1);
15246 }
15247 
15248 
15249 /*****************************************************************************
15250  **
15251  ** xcb_xkb_get_kbd_by_name_reply_t * xcb_xkb_get_kbd_by_name_reply
15252  **
15253  ** @param xcb_connection_t                  *c
15254  ** @param xcb_xkb_get_kbd_by_name_cookie_t   cookie
15255  ** @param xcb_generic_error_t              **e
15256  ** @returns xcb_xkb_get_kbd_by_name_reply_t *
15257  **
15258  *****************************************************************************/
15259 
15260 xcb_xkb_get_kbd_by_name_reply_t *
15261 xcb_xkb_get_kbd_by_name_reply (xcb_connection_t                  *c  /**< */,
15262                                xcb_xkb_get_kbd_by_name_cookie_t   cookie  /**< */,
15263                                xcb_generic_error_t              **e  /**< */)
15264 {
15265     return (xcb_xkb_get_kbd_by_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
15266 }
15267 
15268 int
15269 xcb_xkb_get_device_info_sizeof (const void  *_buffer  /**< */)
15270 {
15271     char *xcb_tmp = (char *)_buffer;
15272     const xcb_xkb_get_device_info_reply_t *_aux = (xcb_xkb_get_device_info_reply_t *)_buffer;
15273     unsigned int xcb_buffer_len = 0;
15274     unsigned int xcb_block_len = 0;
15275     unsigned int xcb_pad = 0;
15276     unsigned int xcb_align_to = 0;
15277 
15278     unsigned int i;
15279     unsigned int xcb_tmp_len;
15280 
15281     xcb_block_len += sizeof(xcb_xkb_get_device_info_reply_t);
15282     xcb_tmp += xcb_block_len;
15283     xcb_buffer_len += xcb_block_len;
15284     xcb_block_len = 0;
15285     /* name */
15286     xcb_block_len += _aux->nameLen * sizeof(xcb_xkb_string8_t);
15287     xcb_tmp += xcb_block_len;
15288     xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
15289     /* insert padding */
15290     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15291     xcb_buffer_len += xcb_block_len + xcb_pad;
15292     if (0 != xcb_pad) {
15293         xcb_tmp += xcb_pad;
15294         xcb_pad = 0;
15295     }
15296     xcb_block_len = 0;
15297     /* btnActions */
15298     xcb_block_len += _aux->nBtnsRtrn * sizeof(xcb_xkb_action_t);
15299     xcb_tmp += xcb_block_len;
15300     xcb_align_to = ALIGNOF(xcb_xkb_action_t);
15301     /* insert padding */
15302     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15303     xcb_buffer_len += xcb_block_len + xcb_pad;
15304     if (0 != xcb_pad) {
15305         xcb_tmp += xcb_pad;
15306         xcb_pad = 0;
15307     }
15308     xcb_block_len = 0;
15309     /* leds */
15310     for(i=0; i<_aux->nDeviceLedFBs; i++) {
15311         xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
15312         xcb_block_len += xcb_tmp_len;
15313         xcb_tmp += xcb_tmp_len;
15314     }
15315     xcb_align_to = ALIGNOF(xcb_xkb_device_led_info_t);
15316     /* insert padding */
15317     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15318     xcb_buffer_len += xcb_block_len + xcb_pad;
15319     if (0 != xcb_pad) {
15320         xcb_tmp += xcb_pad;
15321         xcb_pad = 0;
15322     }
15323     xcb_block_len = 0;
15324 
15325     return xcb_buffer_len;
15326 }
15327 
15328 
15329 /*****************************************************************************
15330  **
15331  ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info
15332  **
15333  ** @param xcb_connection_t         *c
15334  ** @param xcb_xkb_device_spec_t     deviceSpec
15335  ** @param uint16_t                  wanted
15336  ** @param uint8_t                   allButtons
15337  ** @param uint8_t                   firstButton
15338  ** @param uint8_t                   nButtons
15339  ** @param xcb_xkb_led_class_spec_t  ledClass
15340  ** @param xcb_xkb_id_spec_t         ledID
15341  ** @returns xcb_xkb_get_device_info_cookie_t
15342  **
15343  *****************************************************************************/
15344 
15345 xcb_xkb_get_device_info_cookie_t
15346 xcb_xkb_get_device_info (xcb_connection_t         *c  /**< */,
15347                          xcb_xkb_device_spec_t     deviceSpec  /**< */,
15348                          uint16_t                  wanted  /**< */,
15349                          uint8_t                   allButtons  /**< */,
15350                          uint8_t                   firstButton  /**< */,
15351                          uint8_t                   nButtons  /**< */,
15352                          xcb_xkb_led_class_spec_t  ledClass  /**< */,
15353                          xcb_xkb_id_spec_t         ledID  /**< */)
15354 {
15355     static const xcb_protocol_request_t xcb_req = {
15356         /* count */ 2,
15357         /* ext */ &xcb_xkb_id,
15358         /* opcode */ XCB_XKB_GET_DEVICE_INFO,
15359         /* isvoid */ 0
15360     };
15361 
15362     struct iovec xcb_parts[4];
15363     xcb_xkb_get_device_info_cookie_t xcb_ret;
15364     xcb_xkb_get_device_info_request_t xcb_out;
15365 
15366     xcb_out.deviceSpec = deviceSpec;
15367     xcb_out.wanted = wanted;
15368     xcb_out.allButtons = allButtons;
15369     xcb_out.firstButton = firstButton;
15370     xcb_out.nButtons = nButtons;
15371     xcb_out.pad0 = 0;
15372     xcb_out.ledClass = ledClass;
15373     xcb_out.ledID = ledID;
15374 
15375     xcb_parts[2].iov_base = (char *) &xcb_out;
15376     xcb_parts[2].iov_len = sizeof(xcb_out);
15377     xcb_parts[3].iov_base = 0;
15378     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15379 
15380     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15381     return xcb_ret;
15382 }
15383 
15384 
15385 /*****************************************************************************
15386  **
15387  ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info_unchecked
15388  **
15389  ** @param xcb_connection_t         *c
15390  ** @param xcb_xkb_device_spec_t     deviceSpec
15391  ** @param uint16_t                  wanted
15392  ** @param uint8_t                   allButtons
15393  ** @param uint8_t                   firstButton
15394  ** @param uint8_t                   nButtons
15395  ** @param xcb_xkb_led_class_spec_t  ledClass
15396  ** @param xcb_xkb_id_spec_t         ledID
15397  ** @returns xcb_xkb_get_device_info_cookie_t
15398  **
15399  *****************************************************************************/
15400 
15401 xcb_xkb_get_device_info_cookie_t
15402 xcb_xkb_get_device_info_unchecked (xcb_connection_t         *c  /**< */,
15403                                    xcb_xkb_device_spec_t     deviceSpec  /**< */,
15404                                    uint16_t                  wanted  /**< */,
15405                                    uint8_t                   allButtons  /**< */,
15406                                    uint8_t                   firstButton  /**< */,
15407                                    uint8_t                   nButtons  /**< */,
15408                                    xcb_xkb_led_class_spec_t  ledClass  /**< */,
15409                                    xcb_xkb_id_spec_t         ledID  /**< */)
15410 {
15411     static const xcb_protocol_request_t xcb_req = {
15412         /* count */ 2,
15413         /* ext */ &xcb_xkb_id,
15414         /* opcode */ XCB_XKB_GET_DEVICE_INFO,
15415         /* isvoid */ 0
15416     };
15417 
15418     struct iovec xcb_parts[4];
15419     xcb_xkb_get_device_info_cookie_t xcb_ret;
15420     xcb_xkb_get_device_info_request_t xcb_out;
15421 
15422     xcb_out.deviceSpec = deviceSpec;
15423     xcb_out.wanted = wanted;
15424     xcb_out.allButtons = allButtons;
15425     xcb_out.firstButton = firstButton;
15426     xcb_out.nButtons = nButtons;
15427     xcb_out.pad0 = 0;
15428     xcb_out.ledClass = ledClass;
15429     xcb_out.ledID = ledID;
15430 
15431     xcb_parts[2].iov_base = (char *) &xcb_out;
15432     xcb_parts[2].iov_len = sizeof(xcb_out);
15433     xcb_parts[3].iov_base = 0;
15434     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15435 
15436     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15437     return xcb_ret;
15438 }
15439 
15440 
15441 /*****************************************************************************
15442  **
15443  ** xcb_xkb_string8_t * xcb_xkb_get_device_info_name
15444  **
15445  ** @param const xcb_xkb_get_device_info_reply_t *R
15446  ** @returns xcb_xkb_string8_t *
15447  **
15448  *****************************************************************************/
15449 
15450 xcb_xkb_string8_t *
15451 xcb_xkb_get_device_info_name (const xcb_xkb_get_device_info_reply_t *R  /**< */)
15452 {
15453     return (xcb_xkb_string8_t *) (R + 1);
15454 }
15455 
15456 
15457 /*****************************************************************************
15458  **
15459  ** int xcb_xkb_get_device_info_name_length
15460  **
15461  ** @param const xcb_xkb_get_device_info_reply_t *R
15462  ** @returns int
15463  **
15464  *****************************************************************************/
15465 
15466 int
15467 xcb_xkb_get_device_info_name_length (const xcb_xkb_get_device_info_reply_t *R  /**< */)
15468 {
15469     return R->nameLen;
15470 }
15471 
15472 
15473 /*****************************************************************************
15474  **
15475  ** xcb_generic_iterator_t xcb_xkb_get_device_info_name_end
15476  **
15477  ** @param const xcb_xkb_get_device_info_reply_t *R
15478  ** @returns xcb_generic_iterator_t
15479  **
15480  *****************************************************************************/
15481 
15482 xcb_generic_iterator_t
15483 xcb_xkb_get_device_info_name_end (const xcb_xkb_get_device_info_reply_t *R  /**< */)
15484 {
15485     xcb_generic_iterator_t i;
15486     i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->nameLen);
15487     i.rem = 0;
15488     i.index = (char *) i.data - (char *) R;
15489     return i;
15490 }
15491 
15492 
15493 /*****************************************************************************
15494  **
15495  ** xcb_xkb_action_t * xcb_xkb_get_device_info_btn_actions
15496  **
15497  ** @param const xcb_xkb_get_device_info_reply_t *R
15498  ** @returns xcb_xkb_action_t *
15499  **
15500  *****************************************************************************/
15501 
15502 xcb_xkb_action_t *
15503 xcb_xkb_get_device_info_btn_actions (const xcb_xkb_get_device_info_reply_t *R  /**< */)
15504 {
15505     xcb_generic_iterator_t prev = xcb_xkb_get_device_info_name_end(R);
15506     return (xcb_xkb_action_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_action_t, prev.index) + 0);
15507 }
15508 
15509 
15510 /*****************************************************************************
15511  **
15512  ** int xcb_xkb_get_device_info_btn_actions_length
15513  **
15514  ** @param const xcb_xkb_get_device_info_reply_t *R
15515  ** @returns int
15516  **
15517  *****************************************************************************/
15518 
15519 int
15520 xcb_xkb_get_device_info_btn_actions_length (const xcb_xkb_get_device_info_reply_t *R  /**< */)
15521 {
15522     return R->nBtnsRtrn;
15523 }
15524 
15525 
15526 /*****************************************************************************
15527  **
15528  ** xcb_xkb_action_iterator_t xcb_xkb_get_device_info_btn_actions_iterator
15529  **
15530  ** @param const xcb_xkb_get_device_info_reply_t *R
15531  ** @returns xcb_xkb_action_iterator_t
15532  **
15533  *****************************************************************************/
15534 
15535 xcb_xkb_action_iterator_t
15536 xcb_xkb_get_device_info_btn_actions_iterator (const xcb_xkb_get_device_info_reply_t *R  /**< */)
15537 {
15538     xcb_xkb_action_iterator_t i;
15539     xcb_generic_iterator_t prev = xcb_xkb_get_device_info_name_end(R);
15540     i.data = (xcb_xkb_action_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_action_t, prev.index));
15541     i.rem = R->nBtnsRtrn;
15542     i.index = (char *) i.data - (char *) R;
15543     return i;
15544 }
15545 
15546 
15547 /*****************************************************************************
15548  **
15549  ** int xcb_xkb_get_device_info_leds_length
15550  **
15551  ** @param const xcb_xkb_get_device_info_reply_t *R
15552  ** @returns int
15553  **
15554  *****************************************************************************/
15555 
15556 int
15557 xcb_xkb_get_device_info_leds_length (const xcb_xkb_get_device_info_reply_t *R  /**< */)
15558 {
15559     return R->nDeviceLedFBs;
15560 }
15561 
15562 
15563 /*****************************************************************************
15564  **
15565  ** xcb_xkb_device_led_info_iterator_t xcb_xkb_get_device_info_leds_iterator
15566  **
15567  ** @param const xcb_xkb_get_device_info_reply_t *R
15568  ** @returns xcb_xkb_device_led_info_iterator_t
15569  **
15570  *****************************************************************************/
15571 
15572 xcb_xkb_device_led_info_iterator_t
15573 xcb_xkb_get_device_info_leds_iterator (const xcb_xkb_get_device_info_reply_t *R  /**< */)
15574 {
15575     xcb_xkb_device_led_info_iterator_t i;
15576     xcb_generic_iterator_t prev = xcb_xkb_action_end(xcb_xkb_get_device_info_btn_actions_iterator(R));
15577     i.data = (xcb_xkb_device_led_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_device_led_info_t, prev.index));
15578     i.rem = R->nDeviceLedFBs;
15579     i.index = (char *) i.data - (char *) R;
15580     return i;
15581 }
15582 
15583 
15584 /*****************************************************************************
15585  **
15586  ** xcb_xkb_get_device_info_reply_t * xcb_xkb_get_device_info_reply
15587  **
15588  ** @param xcb_connection_t                  *c
15589  ** @param xcb_xkb_get_device_info_cookie_t   cookie
15590  ** @param xcb_generic_error_t              **e
15591  ** @returns xcb_xkb_get_device_info_reply_t *
15592  **
15593  *****************************************************************************/
15594 
15595 xcb_xkb_get_device_info_reply_t *
15596 xcb_xkb_get_device_info_reply (xcb_connection_t                  *c  /**< */,
15597                                xcb_xkb_get_device_info_cookie_t   cookie  /**< */,
15598                                xcb_generic_error_t              **e  /**< */)
15599 {
15600     return (xcb_xkb_get_device_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
15601 }
15602 
15603 int
15604 xcb_xkb_set_device_info_sizeof (const void  *_buffer  /**< */)
15605 {
15606     char *xcb_tmp = (char *)_buffer;
15607     const xcb_xkb_set_device_info_request_t *_aux = (xcb_xkb_set_device_info_request_t *)_buffer;
15608     unsigned int xcb_buffer_len = 0;
15609     unsigned int xcb_block_len = 0;
15610     unsigned int xcb_pad = 0;
15611     unsigned int xcb_align_to = 0;
15612 
15613     unsigned int i;
15614     unsigned int xcb_tmp_len;
15615 
15616     xcb_block_len += sizeof(xcb_xkb_set_device_info_request_t);
15617     xcb_tmp += xcb_block_len;
15618     xcb_buffer_len += xcb_block_len;
15619     xcb_block_len = 0;
15620     /* btnActions */
15621     xcb_block_len += _aux->nBtns * sizeof(xcb_xkb_action_t);
15622     xcb_tmp += xcb_block_len;
15623     xcb_align_to = ALIGNOF(xcb_xkb_action_t);
15624     /* insert padding */
15625     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15626     xcb_buffer_len += xcb_block_len + xcb_pad;
15627     if (0 != xcb_pad) {
15628         xcb_tmp += xcb_pad;
15629         xcb_pad = 0;
15630     }
15631     xcb_block_len = 0;
15632     /* leds */
15633     for(i=0; i<_aux->nDeviceLedFBs; i++) {
15634         xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
15635         xcb_block_len += xcb_tmp_len;
15636         xcb_tmp += xcb_tmp_len;
15637     }
15638     xcb_align_to = ALIGNOF(xcb_xkb_device_led_info_t);
15639     /* insert padding */
15640     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15641     xcb_buffer_len += xcb_block_len + xcb_pad;
15642     if (0 != xcb_pad) {
15643         xcb_tmp += xcb_pad;
15644         xcb_pad = 0;
15645     }
15646     xcb_block_len = 0;
15647 
15648     return xcb_buffer_len;
15649 }
15650 
15651 
15652 /*****************************************************************************
15653  **
15654  ** xcb_void_cookie_t xcb_xkb_set_device_info_checked
15655  **
15656  ** @param xcb_connection_t                *c
15657  ** @param xcb_xkb_device_spec_t            deviceSpec
15658  ** @param uint8_t                          firstBtn
15659  ** @param uint8_t                          nBtns
15660  ** @param uint16_t                         change
15661  ** @param uint16_t                         nDeviceLedFBs
15662  ** @param const xcb_xkb_action_t          *btnActions
15663  ** @param const xcb_xkb_device_led_info_t *leds
15664  ** @returns xcb_void_cookie_t
15665  **
15666  *****************************************************************************/
15667 
15668 xcb_void_cookie_t
15669 xcb_xkb_set_device_info_checked (xcb_connection_t                *c  /**< */,
15670                                  xcb_xkb_device_spec_t            deviceSpec  /**< */,
15671                                  uint8_t                          firstBtn  /**< */,
15672                                  uint8_t                          nBtns  /**< */,
15673                                  uint16_t                         change  /**< */,
15674                                  uint16_t                         nDeviceLedFBs  /**< */,
15675                                  const xcb_xkb_action_t          *btnActions  /**< */,
15676                                  const xcb_xkb_device_led_info_t *leds  /**< */)
15677 {
15678     static const xcb_protocol_request_t xcb_req = {
15679         /* count */ 6,
15680         /* ext */ &xcb_xkb_id,
15681         /* opcode */ XCB_XKB_SET_DEVICE_INFO,
15682         /* isvoid */ 1
15683     };
15684 
15685     struct iovec xcb_parts[8];
15686     xcb_void_cookie_t xcb_ret;
15687     xcb_xkb_set_device_info_request_t xcb_out;
15688     unsigned int i;
15689     unsigned int xcb_tmp_len;
15690     char *xcb_tmp;
15691 
15692     xcb_out.deviceSpec = deviceSpec;
15693     xcb_out.firstBtn = firstBtn;
15694     xcb_out.nBtns = nBtns;
15695     xcb_out.change = change;
15696     xcb_out.nDeviceLedFBs = nDeviceLedFBs;
15697 
15698     xcb_parts[2].iov_base = (char *) &xcb_out;
15699     xcb_parts[2].iov_len = sizeof(xcb_out);
15700     xcb_parts[3].iov_base = 0;
15701     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15702     /* xcb_xkb_action_t btnActions */
15703     xcb_parts[4].iov_base = (char *) btnActions;
15704     xcb_parts[4].iov_len = nBtns * sizeof(xcb_xkb_action_t);
15705     xcb_parts[5].iov_base = 0;
15706     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
15707     /* xcb_xkb_device_led_info_t leds */
15708     xcb_parts[6].iov_base = (char *) leds;
15709     xcb_parts[6].iov_len = 0;
15710     xcb_tmp = (char *)leds;
15711     for(i=0; i<nDeviceLedFBs; i++) {
15712         xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
15713         xcb_parts[6].iov_len += xcb_tmp_len;
15714         xcb_tmp += xcb_tmp_len;
15715     }
15716     xcb_parts[7].iov_base = 0;
15717     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
15718 
15719     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15720     return xcb_ret;
15721 }
15722 
15723 
15724 /*****************************************************************************
15725  **
15726  ** xcb_void_cookie_t xcb_xkb_set_device_info
15727  **
15728  ** @param xcb_connection_t                *c
15729  ** @param xcb_xkb_device_spec_t            deviceSpec
15730  ** @param uint8_t                          firstBtn
15731  ** @param uint8_t                          nBtns
15732  ** @param uint16_t                         change
15733  ** @param uint16_t                         nDeviceLedFBs
15734  ** @param const xcb_xkb_action_t          *btnActions
15735  ** @param const xcb_xkb_device_led_info_t *leds
15736  ** @returns xcb_void_cookie_t
15737  **
15738  *****************************************************************************/
15739 
15740 xcb_void_cookie_t
15741 xcb_xkb_set_device_info (xcb_connection_t                *c  /**< */,
15742                          xcb_xkb_device_spec_t            deviceSpec  /**< */,
15743                          uint8_t                          firstBtn  /**< */,
15744                          uint8_t                          nBtns  /**< */,
15745                          uint16_t                         change  /**< */,
15746                          uint16_t                         nDeviceLedFBs  /**< */,
15747                          const xcb_xkb_action_t          *btnActions  /**< */,
15748                          const xcb_xkb_device_led_info_t *leds  /**< */)
15749 {
15750     static const xcb_protocol_request_t xcb_req = {
15751         /* count */ 6,
15752         /* ext */ &xcb_xkb_id,
15753         /* opcode */ XCB_XKB_SET_DEVICE_INFO,
15754         /* isvoid */ 1
15755     };
15756 
15757     struct iovec xcb_parts[8];
15758     xcb_void_cookie_t xcb_ret;
15759     xcb_xkb_set_device_info_request_t xcb_out;
15760     unsigned int i;
15761     unsigned int xcb_tmp_len;
15762     char *xcb_tmp;
15763 
15764     xcb_out.deviceSpec = deviceSpec;
15765     xcb_out.firstBtn = firstBtn;
15766     xcb_out.nBtns = nBtns;
15767     xcb_out.change = change;
15768     xcb_out.nDeviceLedFBs = nDeviceLedFBs;
15769 
15770     xcb_parts[2].iov_base = (char *) &xcb_out;
15771     xcb_parts[2].iov_len = sizeof(xcb_out);
15772     xcb_parts[3].iov_base = 0;
15773     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15774     /* xcb_xkb_action_t btnActions */
15775     xcb_parts[4].iov_base = (char *) btnActions;
15776     xcb_parts[4].iov_len = nBtns * sizeof(xcb_xkb_action_t);
15777     xcb_parts[5].iov_base = 0;
15778     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
15779     /* xcb_xkb_device_led_info_t leds */
15780     xcb_parts[6].iov_base = (char *) leds;
15781     xcb_parts[6].iov_len = 0;
15782     xcb_tmp = (char *)leds;
15783     for(i=0; i<nDeviceLedFBs; i++) {
15784         xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
15785         xcb_parts[6].iov_len += xcb_tmp_len;
15786         xcb_tmp += xcb_tmp_len;
15787     }
15788     xcb_parts[7].iov_base = 0;
15789     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
15790 
15791     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15792     return xcb_ret;
15793 }
15794 
15795 int
15796 xcb_xkb_set_debugging_flags_sizeof (const void  *_buffer  /**< */)
15797 {
15798     char *xcb_tmp = (char *)_buffer;
15799     const xcb_xkb_set_debugging_flags_request_t *_aux = (xcb_xkb_set_debugging_flags_request_t *)_buffer;
15800     unsigned int xcb_buffer_len = 0;
15801     unsigned int xcb_block_len = 0;
15802     unsigned int xcb_pad = 0;
15803     unsigned int xcb_align_to = 0;
15804 
15805 
15806     xcb_block_len += sizeof(xcb_xkb_set_debugging_flags_request_t);
15807     xcb_tmp += xcb_block_len;
15808     xcb_buffer_len += xcb_block_len;
15809     xcb_block_len = 0;
15810     /* message */
15811     xcb_block_len += _aux->msgLength * sizeof(xcb_xkb_string8_t);
15812     xcb_tmp += xcb_block_len;
15813     xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
15814     /* insert padding */
15815     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
15816     xcb_buffer_len += xcb_block_len + xcb_pad;
15817     if (0 != xcb_pad) {
15818         xcb_tmp += xcb_pad;
15819         xcb_pad = 0;
15820     }
15821     xcb_block_len = 0;
15822 
15823     return xcb_buffer_len;
15824 }
15825 
15826 
15827 /*****************************************************************************
15828  **
15829  ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags
15830  **
15831  ** @param xcb_connection_t        *c
15832  ** @param uint16_t                 msgLength
15833  ** @param uint32_t                 affectFlags
15834  ** @param uint32_t                 flags
15835  ** @param uint32_t                 affectCtrls
15836  ** @param uint32_t                 ctrls
15837  ** @param const xcb_xkb_string8_t *message
15838  ** @returns xcb_xkb_set_debugging_flags_cookie_t
15839  **
15840  *****************************************************************************/
15841 
15842 xcb_xkb_set_debugging_flags_cookie_t
15843 xcb_xkb_set_debugging_flags (xcb_connection_t        *c  /**< */,
15844                              uint16_t                 msgLength  /**< */,
15845                              uint32_t                 affectFlags  /**< */,
15846                              uint32_t                 flags  /**< */,
15847                              uint32_t                 affectCtrls  /**< */,
15848                              uint32_t                 ctrls  /**< */,
15849                              const xcb_xkb_string8_t *message  /**< */)
15850 {
15851     static const xcb_protocol_request_t xcb_req = {
15852         /* count */ 4,
15853         /* ext */ &xcb_xkb_id,
15854         /* opcode */ XCB_XKB_SET_DEBUGGING_FLAGS,
15855         /* isvoid */ 0
15856     };
15857 
15858     struct iovec xcb_parts[6];
15859     xcb_xkb_set_debugging_flags_cookie_t xcb_ret;
15860     xcb_xkb_set_debugging_flags_request_t xcb_out;
15861 
15862     xcb_out.msgLength = msgLength;
15863     memset(xcb_out.pad0, 0, 2);
15864     xcb_out.affectFlags = affectFlags;
15865     xcb_out.flags = flags;
15866     xcb_out.affectCtrls = affectCtrls;
15867     xcb_out.ctrls = ctrls;
15868 
15869     xcb_parts[2].iov_base = (char *) &xcb_out;
15870     xcb_parts[2].iov_len = sizeof(xcb_out);
15871     xcb_parts[3].iov_base = 0;
15872     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15873     /* xcb_xkb_string8_t message */
15874     xcb_parts[4].iov_base = (char *) message;
15875     xcb_parts[4].iov_len = msgLength * sizeof(xcb_xkb_string8_t);
15876     xcb_parts[5].iov_base = 0;
15877     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
15878 
15879     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
15880     return xcb_ret;
15881 }
15882 
15883 
15884 /*****************************************************************************
15885  **
15886  ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags_unchecked
15887  **
15888  ** @param xcb_connection_t        *c
15889  ** @param uint16_t                 msgLength
15890  ** @param uint32_t                 affectFlags
15891  ** @param uint32_t                 flags
15892  ** @param uint32_t                 affectCtrls
15893  ** @param uint32_t                 ctrls
15894  ** @param const xcb_xkb_string8_t *message
15895  ** @returns xcb_xkb_set_debugging_flags_cookie_t
15896  **
15897  *****************************************************************************/
15898 
15899 xcb_xkb_set_debugging_flags_cookie_t
15900 xcb_xkb_set_debugging_flags_unchecked (xcb_connection_t        *c  /**< */,
15901                                        uint16_t                 msgLength  /**< */,
15902                                        uint32_t                 affectFlags  /**< */,
15903                                        uint32_t                 flags  /**< */,
15904                                        uint32_t                 affectCtrls  /**< */,
15905                                        uint32_t                 ctrls  /**< */,
15906                                        const xcb_xkb_string8_t *message  /**< */)
15907 {
15908     static const xcb_protocol_request_t xcb_req = {
15909         /* count */ 4,
15910         /* ext */ &xcb_xkb_id,
15911         /* opcode */ XCB_XKB_SET_DEBUGGING_FLAGS,
15912         /* isvoid */ 0
15913     };
15914 
15915     struct iovec xcb_parts[6];
15916     xcb_xkb_set_debugging_flags_cookie_t xcb_ret;
15917     xcb_xkb_set_debugging_flags_request_t xcb_out;
15918 
15919     xcb_out.msgLength = msgLength;
15920     memset(xcb_out.pad0, 0, 2);
15921     xcb_out.affectFlags = affectFlags;
15922     xcb_out.flags = flags;
15923     xcb_out.affectCtrls = affectCtrls;
15924     xcb_out.ctrls = ctrls;
15925 
15926     xcb_parts[2].iov_base = (char *) &xcb_out;
15927     xcb_parts[2].iov_len = sizeof(xcb_out);
15928     xcb_parts[3].iov_base = 0;
15929     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
15930     /* xcb_xkb_string8_t message */
15931     xcb_parts[4].iov_base = (char *) message;
15932     xcb_parts[4].iov_len = msgLength * sizeof(xcb_xkb_string8_t);
15933     xcb_parts[5].iov_base = 0;
15934     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
15935 
15936     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
15937     return xcb_ret;
15938 }
15939 
15940 
15941 /*****************************************************************************
15942  **
15943  ** xcb_xkb_set_debugging_flags_reply_t * xcb_xkb_set_debugging_flags_reply
15944  **
15945  ** @param xcb_connection_t                      *c
15946  ** @param xcb_xkb_set_debugging_flags_cookie_t   cookie
15947  ** @param xcb_generic_error_t                  **e
15948  ** @returns xcb_xkb_set_debugging_flags_reply_t *
15949  **
15950  *****************************************************************************/
15951 
15952 xcb_xkb_set_debugging_flags_reply_t *
15953 xcb_xkb_set_debugging_flags_reply (xcb_connection_t                      *c  /**< */,
15954                                    xcb_xkb_set_debugging_flags_cookie_t   cookie  /**< */,
15955                                    xcb_generic_error_t                  **e  /**< */)
15956 {
15957     return (xcb_xkb_set_debugging_flags_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
15958 }
15959 
15960