xref: /minix/external/mit/xorg/lib/libxcb/files/xv.c (revision ebfedea0)
1 /*
2  * This file generated automatically from xv.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 "xv.h"
15 
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
18 #include "shm.h"
19 
20 xcb_extension_t xcb_xv_id = { "XVideo", 0 };
21 
22 
23 /*****************************************************************************
24  **
25  ** void xcb_xv_port_next
26  **
27  ** @param xcb_xv_port_iterator_t *i
28  ** @returns void
29  **
30  *****************************************************************************/
31 
32 void
33 xcb_xv_port_next (xcb_xv_port_iterator_t *i  /**< */)
34 {
35     --i->rem;
36     ++i->data;
37     i->index += sizeof(xcb_xv_port_t);
38 }
39 
40 
41 /*****************************************************************************
42  **
43  ** xcb_generic_iterator_t xcb_xv_port_end
44  **
45  ** @param xcb_xv_port_iterator_t i
46  ** @returns xcb_generic_iterator_t
47  **
48  *****************************************************************************/
49 
50 xcb_generic_iterator_t
51 xcb_xv_port_end (xcb_xv_port_iterator_t i  /**< */)
52 {
53     xcb_generic_iterator_t ret;
54     ret.data = i.data + i.rem;
55     ret.index = i.index + ((char *) ret.data - (char *) i.data);
56     ret.rem = 0;
57     return ret;
58 }
59 
60 
61 /*****************************************************************************
62  **
63  ** void xcb_xv_encoding_next
64  **
65  ** @param xcb_xv_encoding_iterator_t *i
66  ** @returns void
67  **
68  *****************************************************************************/
69 
70 void
71 xcb_xv_encoding_next (xcb_xv_encoding_iterator_t *i  /**< */)
72 {
73     --i->rem;
74     ++i->data;
75     i->index += sizeof(xcb_xv_encoding_t);
76 }
77 
78 
79 /*****************************************************************************
80  **
81  ** xcb_generic_iterator_t xcb_xv_encoding_end
82  **
83  ** @param xcb_xv_encoding_iterator_t i
84  ** @returns xcb_generic_iterator_t
85  **
86  *****************************************************************************/
87 
88 xcb_generic_iterator_t
89 xcb_xv_encoding_end (xcb_xv_encoding_iterator_t i  /**< */)
90 {
91     xcb_generic_iterator_t ret;
92     ret.data = i.data + i.rem;
93     ret.index = i.index + ((char *) ret.data - (char *) i.data);
94     ret.rem = 0;
95     return ret;
96 }
97 
98 
99 /*****************************************************************************
100  **
101  ** void xcb_xv_rational_next
102  **
103  ** @param xcb_xv_rational_iterator_t *i
104  ** @returns void
105  **
106  *****************************************************************************/
107 
108 void
109 xcb_xv_rational_next (xcb_xv_rational_iterator_t *i  /**< */)
110 {
111     --i->rem;
112     ++i->data;
113     i->index += sizeof(xcb_xv_rational_t);
114 }
115 
116 
117 /*****************************************************************************
118  **
119  ** xcb_generic_iterator_t xcb_xv_rational_end
120  **
121  ** @param xcb_xv_rational_iterator_t i
122  ** @returns xcb_generic_iterator_t
123  **
124  *****************************************************************************/
125 
126 xcb_generic_iterator_t
127 xcb_xv_rational_end (xcb_xv_rational_iterator_t i  /**< */)
128 {
129     xcb_generic_iterator_t ret;
130     ret.data = i.data + i.rem;
131     ret.index = i.index + ((char *) ret.data - (char *) i.data);
132     ret.rem = 0;
133     return ret;
134 }
135 
136 
137 /*****************************************************************************
138  **
139  ** void xcb_xv_format_next
140  **
141  ** @param xcb_xv_format_iterator_t *i
142  ** @returns void
143  **
144  *****************************************************************************/
145 
146 void
147 xcb_xv_format_next (xcb_xv_format_iterator_t *i  /**< */)
148 {
149     --i->rem;
150     ++i->data;
151     i->index += sizeof(xcb_xv_format_t);
152 }
153 
154 
155 /*****************************************************************************
156  **
157  ** xcb_generic_iterator_t xcb_xv_format_end
158  **
159  ** @param xcb_xv_format_iterator_t i
160  ** @returns xcb_generic_iterator_t
161  **
162  *****************************************************************************/
163 
164 xcb_generic_iterator_t
165 xcb_xv_format_end (xcb_xv_format_iterator_t i  /**< */)
166 {
167     xcb_generic_iterator_t ret;
168     ret.data = i.data + i.rem;
169     ret.index = i.index + ((char *) ret.data - (char *) i.data);
170     ret.rem = 0;
171     return ret;
172 }
173 
174 int
175 xcb_xv_adaptor_info_sizeof (const void  *_buffer  /**< */)
176 {
177     char *xcb_tmp = (char *)_buffer;
178     const xcb_xv_adaptor_info_t *_aux = (xcb_xv_adaptor_info_t *)_buffer;
179     unsigned int xcb_buffer_len = 0;
180     unsigned int xcb_block_len = 0;
181     unsigned int xcb_pad = 0;
182     unsigned int xcb_align_to;
183 
184 
185     xcb_block_len += sizeof(xcb_xv_adaptor_info_t);
186     xcb_tmp += xcb_block_len;
187     /* name */
188     xcb_block_len += _aux->name_size * sizeof(char);
189     xcb_tmp += xcb_block_len;
190     xcb_align_to = ALIGNOF(char);
191     /* insert padding */
192     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
193     xcb_buffer_len += xcb_block_len + xcb_pad;
194     if (0 != xcb_pad) {
195         xcb_tmp += xcb_pad;
196         xcb_pad = 0;
197     }
198     xcb_block_len = 0;
199     /* formats */
200     xcb_block_len += _aux->num_formats * sizeof(xcb_xv_format_t);
201     xcb_tmp += xcb_block_len;
202     xcb_align_to = ALIGNOF(xcb_xv_format_t);
203     /* insert padding */
204     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
205     xcb_buffer_len += xcb_block_len + xcb_pad;
206     if (0 != xcb_pad) {
207         xcb_tmp += xcb_pad;
208         xcb_pad = 0;
209     }
210     xcb_block_len = 0;
211 
212     return xcb_buffer_len;
213 }
214 
215 
216 /*****************************************************************************
217  **
218  ** char * xcb_xv_adaptor_info_name
219  **
220  ** @param const xcb_xv_adaptor_info_t *R
221  ** @returns char *
222  **
223  *****************************************************************************/
224 
225 char *
226 xcb_xv_adaptor_info_name (const xcb_xv_adaptor_info_t *R  /**< */)
227 {
228     return (char *) (R + 1);
229 }
230 
231 
232 /*****************************************************************************
233  **
234  ** int xcb_xv_adaptor_info_name_length
235  **
236  ** @param const xcb_xv_adaptor_info_t *R
237  ** @returns int
238  **
239  *****************************************************************************/
240 
241 int
242 xcb_xv_adaptor_info_name_length (const xcb_xv_adaptor_info_t *R  /**< */)
243 {
244     return R->name_size;
245 }
246 
247 
248 /*****************************************************************************
249  **
250  ** xcb_generic_iterator_t xcb_xv_adaptor_info_name_end
251  **
252  ** @param const xcb_xv_adaptor_info_t *R
253  ** @returns xcb_generic_iterator_t
254  **
255  *****************************************************************************/
256 
257 xcb_generic_iterator_t
258 xcb_xv_adaptor_info_name_end (const xcb_xv_adaptor_info_t *R  /**< */)
259 {
260     xcb_generic_iterator_t i;
261     i.data = ((char *) (R + 1)) + (R->name_size);
262     i.rem = 0;
263     i.index = (char *) i.data - (char *) R;
264     return i;
265 }
266 
267 
268 /*****************************************************************************
269  **
270  ** xcb_xv_format_t * xcb_xv_adaptor_info_formats
271  **
272  ** @param const xcb_xv_adaptor_info_t *R
273  ** @returns xcb_xv_format_t *
274  **
275  *****************************************************************************/
276 
277 xcb_xv_format_t *
278 xcb_xv_adaptor_info_formats (const xcb_xv_adaptor_info_t *R  /**< */)
279 {
280     xcb_generic_iterator_t prev = xcb_xv_adaptor_info_name_end(R);
281     return (xcb_xv_format_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xv_format_t, prev.index) + 0);
282 }
283 
284 
285 /*****************************************************************************
286  **
287  ** int xcb_xv_adaptor_info_formats_length
288  **
289  ** @param const xcb_xv_adaptor_info_t *R
290  ** @returns int
291  **
292  *****************************************************************************/
293 
294 int
295 xcb_xv_adaptor_info_formats_length (const xcb_xv_adaptor_info_t *R  /**< */)
296 {
297     return R->num_formats;
298 }
299 
300 
301 /*****************************************************************************
302  **
303  ** xcb_xv_format_iterator_t xcb_xv_adaptor_info_formats_iterator
304  **
305  ** @param const xcb_xv_adaptor_info_t *R
306  ** @returns xcb_xv_format_iterator_t
307  **
308  *****************************************************************************/
309 
310 xcb_xv_format_iterator_t
311 xcb_xv_adaptor_info_formats_iterator (const xcb_xv_adaptor_info_t *R  /**< */)
312 {
313     xcb_xv_format_iterator_t i;
314     xcb_generic_iterator_t prev = xcb_xv_adaptor_info_name_end(R);
315     i.data = (xcb_xv_format_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xv_format_t, prev.index));
316     i.rem = R->num_formats;
317     i.index = (char *) i.data - (char *) R;
318     return i;
319 }
320 
321 
322 /*****************************************************************************
323  **
324  ** void xcb_xv_adaptor_info_next
325  **
326  ** @param xcb_xv_adaptor_info_iterator_t *i
327  ** @returns void
328  **
329  *****************************************************************************/
330 
331 void
332 xcb_xv_adaptor_info_next (xcb_xv_adaptor_info_iterator_t *i  /**< */)
333 {
334     xcb_xv_adaptor_info_t *R = i->data;
335     xcb_generic_iterator_t child;
336     child.data = (xcb_xv_adaptor_info_t *)(((char *)R) + xcb_xv_adaptor_info_sizeof(R));
337     i->index = (char *) child.data - (char *) i->data;
338     --i->rem;
339     i->data = (xcb_xv_adaptor_info_t *) child.data;
340 }
341 
342 
343 /*****************************************************************************
344  **
345  ** xcb_generic_iterator_t xcb_xv_adaptor_info_end
346  **
347  ** @param xcb_xv_adaptor_info_iterator_t i
348  ** @returns xcb_generic_iterator_t
349  **
350  *****************************************************************************/
351 
352 xcb_generic_iterator_t
353 xcb_xv_adaptor_info_end (xcb_xv_adaptor_info_iterator_t i  /**< */)
354 {
355     xcb_generic_iterator_t ret;
356     while(i.rem > 0)
357         xcb_xv_adaptor_info_next(&i);
358     ret.data = i.data;
359     ret.rem = i.rem;
360     ret.index = i.index;
361     return ret;
362 }
363 
364 int
365 xcb_xv_encoding_info_sizeof (const void  *_buffer  /**< */)
366 {
367     char *xcb_tmp = (char *)_buffer;
368     const xcb_xv_encoding_info_t *_aux = (xcb_xv_encoding_info_t *)_buffer;
369     unsigned int xcb_buffer_len = 0;
370     unsigned int xcb_block_len = 0;
371     unsigned int xcb_pad = 0;
372     unsigned int xcb_align_to;
373 
374 
375     xcb_block_len += sizeof(xcb_xv_encoding_info_t);
376     xcb_tmp += xcb_block_len;
377     /* name */
378     xcb_block_len += _aux->name_size * sizeof(char);
379     xcb_tmp += xcb_block_len;
380     xcb_align_to = ALIGNOF(char);
381     /* insert padding */
382     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
383     xcb_buffer_len += xcb_block_len + xcb_pad;
384     if (0 != xcb_pad) {
385         xcb_tmp += xcb_pad;
386         xcb_pad = 0;
387     }
388     xcb_block_len = 0;
389 
390     return xcb_buffer_len;
391 }
392 
393 
394 /*****************************************************************************
395  **
396  ** char * xcb_xv_encoding_info_name
397  **
398  ** @param const xcb_xv_encoding_info_t *R
399  ** @returns char *
400  **
401  *****************************************************************************/
402 
403 char *
404 xcb_xv_encoding_info_name (const xcb_xv_encoding_info_t *R  /**< */)
405 {
406     return (char *) (R + 1);
407 }
408 
409 
410 /*****************************************************************************
411  **
412  ** int xcb_xv_encoding_info_name_length
413  **
414  ** @param const xcb_xv_encoding_info_t *R
415  ** @returns int
416  **
417  *****************************************************************************/
418 
419 int
420 xcb_xv_encoding_info_name_length (const xcb_xv_encoding_info_t *R  /**< */)
421 {
422     return R->name_size;
423 }
424 
425 
426 /*****************************************************************************
427  **
428  ** xcb_generic_iterator_t xcb_xv_encoding_info_name_end
429  **
430  ** @param const xcb_xv_encoding_info_t *R
431  ** @returns xcb_generic_iterator_t
432  **
433  *****************************************************************************/
434 
435 xcb_generic_iterator_t
436 xcb_xv_encoding_info_name_end (const xcb_xv_encoding_info_t *R  /**< */)
437 {
438     xcb_generic_iterator_t i;
439     i.data = ((char *) (R + 1)) + (R->name_size);
440     i.rem = 0;
441     i.index = (char *) i.data - (char *) R;
442     return i;
443 }
444 
445 
446 /*****************************************************************************
447  **
448  ** void xcb_xv_encoding_info_next
449  **
450  ** @param xcb_xv_encoding_info_iterator_t *i
451  ** @returns void
452  **
453  *****************************************************************************/
454 
455 void
456 xcb_xv_encoding_info_next (xcb_xv_encoding_info_iterator_t *i  /**< */)
457 {
458     xcb_xv_encoding_info_t *R = i->data;
459     xcb_generic_iterator_t child;
460     child.data = (xcb_xv_encoding_info_t *)(((char *)R) + xcb_xv_encoding_info_sizeof(R));
461     i->index = (char *) child.data - (char *) i->data;
462     --i->rem;
463     i->data = (xcb_xv_encoding_info_t *) child.data;
464 }
465 
466 
467 /*****************************************************************************
468  **
469  ** xcb_generic_iterator_t xcb_xv_encoding_info_end
470  **
471  ** @param xcb_xv_encoding_info_iterator_t i
472  ** @returns xcb_generic_iterator_t
473  **
474  *****************************************************************************/
475 
476 xcb_generic_iterator_t
477 xcb_xv_encoding_info_end (xcb_xv_encoding_info_iterator_t i  /**< */)
478 {
479     xcb_generic_iterator_t ret;
480     while(i.rem > 0)
481         xcb_xv_encoding_info_next(&i);
482     ret.data = i.data;
483     ret.rem = i.rem;
484     ret.index = i.index;
485     return ret;
486 }
487 
488 int
489 xcb_xv_image_sizeof (const void  *_buffer  /**< */)
490 {
491     char *xcb_tmp = (char *)_buffer;
492     const xcb_xv_image_t *_aux = (xcb_xv_image_t *)_buffer;
493     unsigned int xcb_buffer_len = 0;
494     unsigned int xcb_block_len = 0;
495     unsigned int xcb_pad = 0;
496     unsigned int xcb_align_to;
497 
498 
499     xcb_block_len += sizeof(xcb_xv_image_t);
500     xcb_tmp += xcb_block_len;
501     /* pitches */
502     xcb_block_len += _aux->num_planes * sizeof(uint32_t);
503     xcb_tmp += xcb_block_len;
504     xcb_align_to = ALIGNOF(uint32_t);
505     /* insert padding */
506     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
507     xcb_buffer_len += xcb_block_len + xcb_pad;
508     if (0 != xcb_pad) {
509         xcb_tmp += xcb_pad;
510         xcb_pad = 0;
511     }
512     xcb_block_len = 0;
513     /* offsets */
514     xcb_block_len += _aux->num_planes * sizeof(uint32_t);
515     xcb_tmp += xcb_block_len;
516     xcb_align_to = ALIGNOF(uint32_t);
517     /* insert padding */
518     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
519     xcb_buffer_len += xcb_block_len + xcb_pad;
520     if (0 != xcb_pad) {
521         xcb_tmp += xcb_pad;
522         xcb_pad = 0;
523     }
524     xcb_block_len = 0;
525     /* data */
526     xcb_block_len += _aux->data_size * sizeof(uint8_t);
527     xcb_tmp += xcb_block_len;
528     xcb_align_to = ALIGNOF(uint8_t);
529     /* insert padding */
530     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
531     xcb_buffer_len += xcb_block_len + xcb_pad;
532     if (0 != xcb_pad) {
533         xcb_tmp += xcb_pad;
534         xcb_pad = 0;
535     }
536     xcb_block_len = 0;
537 
538     return xcb_buffer_len;
539 }
540 
541 
542 /*****************************************************************************
543  **
544  ** uint32_t * xcb_xv_image_pitches
545  **
546  ** @param const xcb_xv_image_t *R
547  ** @returns uint32_t *
548  **
549  *****************************************************************************/
550 
551 uint32_t *
552 xcb_xv_image_pitches (const xcb_xv_image_t *R  /**< */)
553 {
554     return (uint32_t *) (R + 1);
555 }
556 
557 
558 /*****************************************************************************
559  **
560  ** int xcb_xv_image_pitches_length
561  **
562  ** @param const xcb_xv_image_t *R
563  ** @returns int
564  **
565  *****************************************************************************/
566 
567 int
568 xcb_xv_image_pitches_length (const xcb_xv_image_t *R  /**< */)
569 {
570     return R->num_planes;
571 }
572 
573 
574 /*****************************************************************************
575  **
576  ** xcb_generic_iterator_t xcb_xv_image_pitches_end
577  **
578  ** @param const xcb_xv_image_t *R
579  ** @returns xcb_generic_iterator_t
580  **
581  *****************************************************************************/
582 
583 xcb_generic_iterator_t
584 xcb_xv_image_pitches_end (const xcb_xv_image_t *R  /**< */)
585 {
586     xcb_generic_iterator_t i;
587     i.data = ((uint32_t *) (R + 1)) + (R->num_planes);
588     i.rem = 0;
589     i.index = (char *) i.data - (char *) R;
590     return i;
591 }
592 
593 
594 /*****************************************************************************
595  **
596  ** uint32_t * xcb_xv_image_offsets
597  **
598  ** @param const xcb_xv_image_t *R
599  ** @returns uint32_t *
600  **
601  *****************************************************************************/
602 
603 uint32_t *
604 xcb_xv_image_offsets (const xcb_xv_image_t *R  /**< */)
605 {
606     xcb_generic_iterator_t prev = xcb_xv_image_pitches_end(R);
607     return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
608 }
609 
610 
611 /*****************************************************************************
612  **
613  ** int xcb_xv_image_offsets_length
614  **
615  ** @param const xcb_xv_image_t *R
616  ** @returns int
617  **
618  *****************************************************************************/
619 
620 int
621 xcb_xv_image_offsets_length (const xcb_xv_image_t *R  /**< */)
622 {
623     return R->num_planes;
624 }
625 
626 
627 /*****************************************************************************
628  **
629  ** xcb_generic_iterator_t xcb_xv_image_offsets_end
630  **
631  ** @param const xcb_xv_image_t *R
632  ** @returns xcb_generic_iterator_t
633  **
634  *****************************************************************************/
635 
636 xcb_generic_iterator_t
637 xcb_xv_image_offsets_end (const xcb_xv_image_t *R  /**< */)
638 {
639     xcb_generic_iterator_t i;
640     xcb_generic_iterator_t child = xcb_xv_image_pitches_end(R);
641     i.data = ((uint32_t *) child.data) + (R->num_planes);
642     i.rem = 0;
643     i.index = (char *) i.data - (char *) R;
644     return i;
645 }
646 
647 
648 /*****************************************************************************
649  **
650  ** uint8_t * xcb_xv_image_data
651  **
652  ** @param const xcb_xv_image_t *R
653  ** @returns uint8_t *
654  **
655  *****************************************************************************/
656 
657 uint8_t *
658 xcb_xv_image_data (const xcb_xv_image_t *R  /**< */)
659 {
660     xcb_generic_iterator_t prev = xcb_xv_image_offsets_end(R);
661     return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0);
662 }
663 
664 
665 /*****************************************************************************
666  **
667  ** int xcb_xv_image_data_length
668  **
669  ** @param const xcb_xv_image_t *R
670  ** @returns int
671  **
672  *****************************************************************************/
673 
674 int
675 xcb_xv_image_data_length (const xcb_xv_image_t *R  /**< */)
676 {
677     return R->data_size;
678 }
679 
680 
681 /*****************************************************************************
682  **
683  ** xcb_generic_iterator_t xcb_xv_image_data_end
684  **
685  ** @param const xcb_xv_image_t *R
686  ** @returns xcb_generic_iterator_t
687  **
688  *****************************************************************************/
689 
690 xcb_generic_iterator_t
691 xcb_xv_image_data_end (const xcb_xv_image_t *R  /**< */)
692 {
693     xcb_generic_iterator_t i;
694     xcb_generic_iterator_t child = xcb_xv_image_offsets_end(R);
695     i.data = ((uint8_t *) child.data) + (R->data_size);
696     i.rem = 0;
697     i.index = (char *) i.data - (char *) R;
698     return i;
699 }
700 
701 
702 /*****************************************************************************
703  **
704  ** void xcb_xv_image_next
705  **
706  ** @param xcb_xv_image_iterator_t *i
707  ** @returns void
708  **
709  *****************************************************************************/
710 
711 void
712 xcb_xv_image_next (xcb_xv_image_iterator_t *i  /**< */)
713 {
714     xcb_xv_image_t *R = i->data;
715     xcb_generic_iterator_t child;
716     child.data = (xcb_xv_image_t *)(((char *)R) + xcb_xv_image_sizeof(R));
717     i->index = (char *) child.data - (char *) i->data;
718     --i->rem;
719     i->data = (xcb_xv_image_t *) child.data;
720 }
721 
722 
723 /*****************************************************************************
724  **
725  ** xcb_generic_iterator_t xcb_xv_image_end
726  **
727  ** @param xcb_xv_image_iterator_t i
728  ** @returns xcb_generic_iterator_t
729  **
730  *****************************************************************************/
731 
732 xcb_generic_iterator_t
733 xcb_xv_image_end (xcb_xv_image_iterator_t i  /**< */)
734 {
735     xcb_generic_iterator_t ret;
736     while(i.rem > 0)
737         xcb_xv_image_next(&i);
738     ret.data = i.data;
739     ret.rem = i.rem;
740     ret.index = i.index;
741     return ret;
742 }
743 
744 int
745 xcb_xv_attribute_info_sizeof (const void  *_buffer  /**< */)
746 {
747     char *xcb_tmp = (char *)_buffer;
748     const xcb_xv_attribute_info_t *_aux = (xcb_xv_attribute_info_t *)_buffer;
749     unsigned int xcb_buffer_len = 0;
750     unsigned int xcb_block_len = 0;
751     unsigned int xcb_pad = 0;
752     unsigned int xcb_align_to;
753 
754 
755     xcb_block_len += sizeof(xcb_xv_attribute_info_t);
756     xcb_tmp += xcb_block_len;
757     /* name */
758     xcb_block_len += _aux->size * sizeof(char);
759     xcb_tmp += xcb_block_len;
760     xcb_align_to = ALIGNOF(char);
761     /* insert padding */
762     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
763     xcb_buffer_len += xcb_block_len + xcb_pad;
764     if (0 != xcb_pad) {
765         xcb_tmp += xcb_pad;
766         xcb_pad = 0;
767     }
768     xcb_block_len = 0;
769 
770     return xcb_buffer_len;
771 }
772 
773 
774 /*****************************************************************************
775  **
776  ** char * xcb_xv_attribute_info_name
777  **
778  ** @param const xcb_xv_attribute_info_t *R
779  ** @returns char *
780  **
781  *****************************************************************************/
782 
783 char *
784 xcb_xv_attribute_info_name (const xcb_xv_attribute_info_t *R  /**< */)
785 {
786     return (char *) (R + 1);
787 }
788 
789 
790 /*****************************************************************************
791  **
792  ** int xcb_xv_attribute_info_name_length
793  **
794  ** @param const xcb_xv_attribute_info_t *R
795  ** @returns int
796  **
797  *****************************************************************************/
798 
799 int
800 xcb_xv_attribute_info_name_length (const xcb_xv_attribute_info_t *R  /**< */)
801 {
802     return R->size;
803 }
804 
805 
806 /*****************************************************************************
807  **
808  ** xcb_generic_iterator_t xcb_xv_attribute_info_name_end
809  **
810  ** @param const xcb_xv_attribute_info_t *R
811  ** @returns xcb_generic_iterator_t
812  **
813  *****************************************************************************/
814 
815 xcb_generic_iterator_t
816 xcb_xv_attribute_info_name_end (const xcb_xv_attribute_info_t *R  /**< */)
817 {
818     xcb_generic_iterator_t i;
819     i.data = ((char *) (R + 1)) + (R->size);
820     i.rem = 0;
821     i.index = (char *) i.data - (char *) R;
822     return i;
823 }
824 
825 
826 /*****************************************************************************
827  **
828  ** void xcb_xv_attribute_info_next
829  **
830  ** @param xcb_xv_attribute_info_iterator_t *i
831  ** @returns void
832  **
833  *****************************************************************************/
834 
835 void
836 xcb_xv_attribute_info_next (xcb_xv_attribute_info_iterator_t *i  /**< */)
837 {
838     xcb_xv_attribute_info_t *R = i->data;
839     xcb_generic_iterator_t child;
840     child.data = (xcb_xv_attribute_info_t *)(((char *)R) + xcb_xv_attribute_info_sizeof(R));
841     i->index = (char *) child.data - (char *) i->data;
842     --i->rem;
843     i->data = (xcb_xv_attribute_info_t *) child.data;
844 }
845 
846 
847 /*****************************************************************************
848  **
849  ** xcb_generic_iterator_t xcb_xv_attribute_info_end
850  **
851  ** @param xcb_xv_attribute_info_iterator_t i
852  ** @returns xcb_generic_iterator_t
853  **
854  *****************************************************************************/
855 
856 xcb_generic_iterator_t
857 xcb_xv_attribute_info_end (xcb_xv_attribute_info_iterator_t i  /**< */)
858 {
859     xcb_generic_iterator_t ret;
860     while(i.rem > 0)
861         xcb_xv_attribute_info_next(&i);
862     ret.data = i.data;
863     ret.rem = i.rem;
864     ret.index = i.index;
865     return ret;
866 }
867 
868 
869 /*****************************************************************************
870  **
871  ** void xcb_xv_image_format_info_next
872  **
873  ** @param xcb_xv_image_format_info_iterator_t *i
874  ** @returns void
875  **
876  *****************************************************************************/
877 
878 void
879 xcb_xv_image_format_info_next (xcb_xv_image_format_info_iterator_t *i  /**< */)
880 {
881     --i->rem;
882     ++i->data;
883     i->index += sizeof(xcb_xv_image_format_info_t);
884 }
885 
886 
887 /*****************************************************************************
888  **
889  ** xcb_generic_iterator_t xcb_xv_image_format_info_end
890  **
891  ** @param xcb_xv_image_format_info_iterator_t i
892  ** @returns xcb_generic_iterator_t
893  **
894  *****************************************************************************/
895 
896 xcb_generic_iterator_t
897 xcb_xv_image_format_info_end (xcb_xv_image_format_info_iterator_t i  /**< */)
898 {
899     xcb_generic_iterator_t ret;
900     ret.data = i.data + i.rem;
901     ret.index = i.index + ((char *) ret.data - (char *) i.data);
902     ret.rem = 0;
903     return ret;
904 }
905 
906 
907 /*****************************************************************************
908  **
909  ** xcb_xv_query_extension_cookie_t xcb_xv_query_extension
910  **
911  ** @param xcb_connection_t *c
912  ** @returns xcb_xv_query_extension_cookie_t
913  **
914  *****************************************************************************/
915 
916 xcb_xv_query_extension_cookie_t
917 xcb_xv_query_extension (xcb_connection_t *c  /**< */)
918 {
919     static const xcb_protocol_request_t xcb_req = {
920         /* count */ 2,
921         /* ext */ &xcb_xv_id,
922         /* opcode */ XCB_XV_QUERY_EXTENSION,
923         /* isvoid */ 0
924     };
925 
926     struct iovec xcb_parts[4];
927     xcb_xv_query_extension_cookie_t xcb_ret;
928     xcb_xv_query_extension_request_t xcb_out;
929 
930 
931     xcb_parts[2].iov_base = (char *) &xcb_out;
932     xcb_parts[2].iov_len = sizeof(xcb_out);
933     xcb_parts[3].iov_base = 0;
934     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
935 
936     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
937     return xcb_ret;
938 }
939 
940 
941 /*****************************************************************************
942  **
943  ** xcb_xv_query_extension_cookie_t xcb_xv_query_extension_unchecked
944  **
945  ** @param xcb_connection_t *c
946  ** @returns xcb_xv_query_extension_cookie_t
947  **
948  *****************************************************************************/
949 
950 xcb_xv_query_extension_cookie_t
951 xcb_xv_query_extension_unchecked (xcb_connection_t *c  /**< */)
952 {
953     static const xcb_protocol_request_t xcb_req = {
954         /* count */ 2,
955         /* ext */ &xcb_xv_id,
956         /* opcode */ XCB_XV_QUERY_EXTENSION,
957         /* isvoid */ 0
958     };
959 
960     struct iovec xcb_parts[4];
961     xcb_xv_query_extension_cookie_t xcb_ret;
962     xcb_xv_query_extension_request_t xcb_out;
963 
964 
965     xcb_parts[2].iov_base = (char *) &xcb_out;
966     xcb_parts[2].iov_len = sizeof(xcb_out);
967     xcb_parts[3].iov_base = 0;
968     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
969 
970     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
971     return xcb_ret;
972 }
973 
974 
975 /*****************************************************************************
976  **
977  ** xcb_xv_query_extension_reply_t * xcb_xv_query_extension_reply
978  **
979  ** @param xcb_connection_t                 *c
980  ** @param xcb_xv_query_extension_cookie_t   cookie
981  ** @param xcb_generic_error_t             **e
982  ** @returns xcb_xv_query_extension_reply_t *
983  **
984  *****************************************************************************/
985 
986 xcb_xv_query_extension_reply_t *
987 xcb_xv_query_extension_reply (xcb_connection_t                 *c  /**< */,
988                               xcb_xv_query_extension_cookie_t   cookie  /**< */,
989                               xcb_generic_error_t             **e  /**< */)
990 {
991     return (xcb_xv_query_extension_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
992 }
993 
994 int
995 xcb_xv_query_adaptors_sizeof (const void  *_buffer  /**< */)
996 {
997     char *xcb_tmp = (char *)_buffer;
998     const xcb_xv_query_adaptors_reply_t *_aux = (xcb_xv_query_adaptors_reply_t *)_buffer;
999     unsigned int xcb_buffer_len = 0;
1000     unsigned int xcb_block_len = 0;
1001     unsigned int xcb_pad = 0;
1002     unsigned int xcb_align_to;
1003 
1004     unsigned int i;
1005     unsigned int xcb_tmp_len;
1006 
1007     xcb_block_len += sizeof(xcb_xv_query_adaptors_reply_t);
1008     xcb_tmp += xcb_block_len;
1009     /* info */
1010     for(i=0; i<_aux->num_adaptors; i++) {
1011         xcb_tmp_len = xcb_xv_adaptor_info_sizeof(xcb_tmp);
1012         xcb_block_len += xcb_tmp_len;
1013         xcb_tmp += xcb_tmp_len;
1014     }
1015     xcb_align_to = ALIGNOF(xcb_xv_adaptor_info_t);
1016     /* insert padding */
1017     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1018     xcb_buffer_len += xcb_block_len + xcb_pad;
1019     if (0 != xcb_pad) {
1020         xcb_tmp += xcb_pad;
1021         xcb_pad = 0;
1022     }
1023     xcb_block_len = 0;
1024 
1025     return xcb_buffer_len;
1026 }
1027 
1028 
1029 /*****************************************************************************
1030  **
1031  ** xcb_xv_query_adaptors_cookie_t xcb_xv_query_adaptors
1032  **
1033  ** @param xcb_connection_t *c
1034  ** @param xcb_window_t      window
1035  ** @returns xcb_xv_query_adaptors_cookie_t
1036  **
1037  *****************************************************************************/
1038 
1039 xcb_xv_query_adaptors_cookie_t
1040 xcb_xv_query_adaptors (xcb_connection_t *c  /**< */,
1041                        xcb_window_t      window  /**< */)
1042 {
1043     static const xcb_protocol_request_t xcb_req = {
1044         /* count */ 2,
1045         /* ext */ &xcb_xv_id,
1046         /* opcode */ XCB_XV_QUERY_ADAPTORS,
1047         /* isvoid */ 0
1048     };
1049 
1050     struct iovec xcb_parts[4];
1051     xcb_xv_query_adaptors_cookie_t xcb_ret;
1052     xcb_xv_query_adaptors_request_t xcb_out;
1053 
1054     xcb_out.window = window;
1055 
1056     xcb_parts[2].iov_base = (char *) &xcb_out;
1057     xcb_parts[2].iov_len = sizeof(xcb_out);
1058     xcb_parts[3].iov_base = 0;
1059     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1060 
1061     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1062     return xcb_ret;
1063 }
1064 
1065 
1066 /*****************************************************************************
1067  **
1068  ** xcb_xv_query_adaptors_cookie_t xcb_xv_query_adaptors_unchecked
1069  **
1070  ** @param xcb_connection_t *c
1071  ** @param xcb_window_t      window
1072  ** @returns xcb_xv_query_adaptors_cookie_t
1073  **
1074  *****************************************************************************/
1075 
1076 xcb_xv_query_adaptors_cookie_t
1077 xcb_xv_query_adaptors_unchecked (xcb_connection_t *c  /**< */,
1078                                  xcb_window_t      window  /**< */)
1079 {
1080     static const xcb_protocol_request_t xcb_req = {
1081         /* count */ 2,
1082         /* ext */ &xcb_xv_id,
1083         /* opcode */ XCB_XV_QUERY_ADAPTORS,
1084         /* isvoid */ 0
1085     };
1086 
1087     struct iovec xcb_parts[4];
1088     xcb_xv_query_adaptors_cookie_t xcb_ret;
1089     xcb_xv_query_adaptors_request_t xcb_out;
1090 
1091     xcb_out.window = window;
1092 
1093     xcb_parts[2].iov_base = (char *) &xcb_out;
1094     xcb_parts[2].iov_len = sizeof(xcb_out);
1095     xcb_parts[3].iov_base = 0;
1096     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1097 
1098     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1099     return xcb_ret;
1100 }
1101 
1102 
1103 /*****************************************************************************
1104  **
1105  ** int xcb_xv_query_adaptors_info_length
1106  **
1107  ** @param const xcb_xv_query_adaptors_reply_t *R
1108  ** @returns int
1109  **
1110  *****************************************************************************/
1111 
1112 int
1113 xcb_xv_query_adaptors_info_length (const xcb_xv_query_adaptors_reply_t *R  /**< */)
1114 {
1115     return R->num_adaptors;
1116 }
1117 
1118 
1119 /*****************************************************************************
1120  **
1121  ** xcb_xv_adaptor_info_iterator_t xcb_xv_query_adaptors_info_iterator
1122  **
1123  ** @param const xcb_xv_query_adaptors_reply_t *R
1124  ** @returns xcb_xv_adaptor_info_iterator_t
1125  **
1126  *****************************************************************************/
1127 
1128 xcb_xv_adaptor_info_iterator_t
1129 xcb_xv_query_adaptors_info_iterator (const xcb_xv_query_adaptors_reply_t *R  /**< */)
1130 {
1131     xcb_xv_adaptor_info_iterator_t i;
1132     i.data = (xcb_xv_adaptor_info_t *) (R + 1);
1133     i.rem = R->num_adaptors;
1134     i.index = (char *) i.data - (char *) R;
1135     return i;
1136 }
1137 
1138 
1139 /*****************************************************************************
1140  **
1141  ** xcb_xv_query_adaptors_reply_t * xcb_xv_query_adaptors_reply
1142  **
1143  ** @param xcb_connection_t                *c
1144  ** @param xcb_xv_query_adaptors_cookie_t   cookie
1145  ** @param xcb_generic_error_t            **e
1146  ** @returns xcb_xv_query_adaptors_reply_t *
1147  **
1148  *****************************************************************************/
1149 
1150 xcb_xv_query_adaptors_reply_t *
1151 xcb_xv_query_adaptors_reply (xcb_connection_t                *c  /**< */,
1152                              xcb_xv_query_adaptors_cookie_t   cookie  /**< */,
1153                              xcb_generic_error_t            **e  /**< */)
1154 {
1155     return (xcb_xv_query_adaptors_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1156 }
1157 
1158 int
1159 xcb_xv_query_encodings_sizeof (const void  *_buffer  /**< */)
1160 {
1161     char *xcb_tmp = (char *)_buffer;
1162     const xcb_xv_query_encodings_reply_t *_aux = (xcb_xv_query_encodings_reply_t *)_buffer;
1163     unsigned int xcb_buffer_len = 0;
1164     unsigned int xcb_block_len = 0;
1165     unsigned int xcb_pad = 0;
1166     unsigned int xcb_align_to;
1167 
1168     unsigned int i;
1169     unsigned int xcb_tmp_len;
1170 
1171     xcb_block_len += sizeof(xcb_xv_query_encodings_reply_t);
1172     xcb_tmp += xcb_block_len;
1173     /* info */
1174     for(i=0; i<_aux->num_encodings; i++) {
1175         xcb_tmp_len = xcb_xv_encoding_info_sizeof(xcb_tmp);
1176         xcb_block_len += xcb_tmp_len;
1177         xcb_tmp += xcb_tmp_len;
1178     }
1179     xcb_align_to = ALIGNOF(xcb_xv_encoding_info_t);
1180     /* insert padding */
1181     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1182     xcb_buffer_len += xcb_block_len + xcb_pad;
1183     if (0 != xcb_pad) {
1184         xcb_tmp += xcb_pad;
1185         xcb_pad = 0;
1186     }
1187     xcb_block_len = 0;
1188 
1189     return xcb_buffer_len;
1190 }
1191 
1192 
1193 /*****************************************************************************
1194  **
1195  ** xcb_xv_query_encodings_cookie_t xcb_xv_query_encodings
1196  **
1197  ** @param xcb_connection_t *c
1198  ** @param xcb_xv_port_t     port
1199  ** @returns xcb_xv_query_encodings_cookie_t
1200  **
1201  *****************************************************************************/
1202 
1203 xcb_xv_query_encodings_cookie_t
1204 xcb_xv_query_encodings (xcb_connection_t *c  /**< */,
1205                         xcb_xv_port_t     port  /**< */)
1206 {
1207     static const xcb_protocol_request_t xcb_req = {
1208         /* count */ 2,
1209         /* ext */ &xcb_xv_id,
1210         /* opcode */ XCB_XV_QUERY_ENCODINGS,
1211         /* isvoid */ 0
1212     };
1213 
1214     struct iovec xcb_parts[4];
1215     xcb_xv_query_encodings_cookie_t xcb_ret;
1216     xcb_xv_query_encodings_request_t xcb_out;
1217 
1218     xcb_out.port = port;
1219 
1220     xcb_parts[2].iov_base = (char *) &xcb_out;
1221     xcb_parts[2].iov_len = sizeof(xcb_out);
1222     xcb_parts[3].iov_base = 0;
1223     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1224 
1225     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1226     return xcb_ret;
1227 }
1228 
1229 
1230 /*****************************************************************************
1231  **
1232  ** xcb_xv_query_encodings_cookie_t xcb_xv_query_encodings_unchecked
1233  **
1234  ** @param xcb_connection_t *c
1235  ** @param xcb_xv_port_t     port
1236  ** @returns xcb_xv_query_encodings_cookie_t
1237  **
1238  *****************************************************************************/
1239 
1240 xcb_xv_query_encodings_cookie_t
1241 xcb_xv_query_encodings_unchecked (xcb_connection_t *c  /**< */,
1242                                   xcb_xv_port_t     port  /**< */)
1243 {
1244     static const xcb_protocol_request_t xcb_req = {
1245         /* count */ 2,
1246         /* ext */ &xcb_xv_id,
1247         /* opcode */ XCB_XV_QUERY_ENCODINGS,
1248         /* isvoid */ 0
1249     };
1250 
1251     struct iovec xcb_parts[4];
1252     xcb_xv_query_encodings_cookie_t xcb_ret;
1253     xcb_xv_query_encodings_request_t xcb_out;
1254 
1255     xcb_out.port = port;
1256 
1257     xcb_parts[2].iov_base = (char *) &xcb_out;
1258     xcb_parts[2].iov_len = sizeof(xcb_out);
1259     xcb_parts[3].iov_base = 0;
1260     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1261 
1262     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1263     return xcb_ret;
1264 }
1265 
1266 
1267 /*****************************************************************************
1268  **
1269  ** int xcb_xv_query_encodings_info_length
1270  **
1271  ** @param const xcb_xv_query_encodings_reply_t *R
1272  ** @returns int
1273  **
1274  *****************************************************************************/
1275 
1276 int
1277 xcb_xv_query_encodings_info_length (const xcb_xv_query_encodings_reply_t *R  /**< */)
1278 {
1279     return R->num_encodings;
1280 }
1281 
1282 
1283 /*****************************************************************************
1284  **
1285  ** xcb_xv_encoding_info_iterator_t xcb_xv_query_encodings_info_iterator
1286  **
1287  ** @param const xcb_xv_query_encodings_reply_t *R
1288  ** @returns xcb_xv_encoding_info_iterator_t
1289  **
1290  *****************************************************************************/
1291 
1292 xcb_xv_encoding_info_iterator_t
1293 xcb_xv_query_encodings_info_iterator (const xcb_xv_query_encodings_reply_t *R  /**< */)
1294 {
1295     xcb_xv_encoding_info_iterator_t i;
1296     i.data = (xcb_xv_encoding_info_t *) (R + 1);
1297     i.rem = R->num_encodings;
1298     i.index = (char *) i.data - (char *) R;
1299     return i;
1300 }
1301 
1302 
1303 /*****************************************************************************
1304  **
1305  ** xcb_xv_query_encodings_reply_t * xcb_xv_query_encodings_reply
1306  **
1307  ** @param xcb_connection_t                 *c
1308  ** @param xcb_xv_query_encodings_cookie_t   cookie
1309  ** @param xcb_generic_error_t             **e
1310  ** @returns xcb_xv_query_encodings_reply_t *
1311  **
1312  *****************************************************************************/
1313 
1314 xcb_xv_query_encodings_reply_t *
1315 xcb_xv_query_encodings_reply (xcb_connection_t                 *c  /**< */,
1316                               xcb_xv_query_encodings_cookie_t   cookie  /**< */,
1317                               xcb_generic_error_t             **e  /**< */)
1318 {
1319     return (xcb_xv_query_encodings_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1320 }
1321 
1322 
1323 /*****************************************************************************
1324  **
1325  ** xcb_xv_grab_port_cookie_t xcb_xv_grab_port
1326  **
1327  ** @param xcb_connection_t *c
1328  ** @param xcb_xv_port_t     port
1329  ** @param xcb_timestamp_t   time
1330  ** @returns xcb_xv_grab_port_cookie_t
1331  **
1332  *****************************************************************************/
1333 
1334 xcb_xv_grab_port_cookie_t
1335 xcb_xv_grab_port (xcb_connection_t *c  /**< */,
1336                   xcb_xv_port_t     port  /**< */,
1337                   xcb_timestamp_t   time  /**< */)
1338 {
1339     static const xcb_protocol_request_t xcb_req = {
1340         /* count */ 2,
1341         /* ext */ &xcb_xv_id,
1342         /* opcode */ XCB_XV_GRAB_PORT,
1343         /* isvoid */ 0
1344     };
1345 
1346     struct iovec xcb_parts[4];
1347     xcb_xv_grab_port_cookie_t xcb_ret;
1348     xcb_xv_grab_port_request_t xcb_out;
1349 
1350     xcb_out.port = port;
1351     xcb_out.time = time;
1352 
1353     xcb_parts[2].iov_base = (char *) &xcb_out;
1354     xcb_parts[2].iov_len = sizeof(xcb_out);
1355     xcb_parts[3].iov_base = 0;
1356     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1357 
1358     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1359     return xcb_ret;
1360 }
1361 
1362 
1363 /*****************************************************************************
1364  **
1365  ** xcb_xv_grab_port_cookie_t xcb_xv_grab_port_unchecked
1366  **
1367  ** @param xcb_connection_t *c
1368  ** @param xcb_xv_port_t     port
1369  ** @param xcb_timestamp_t   time
1370  ** @returns xcb_xv_grab_port_cookie_t
1371  **
1372  *****************************************************************************/
1373 
1374 xcb_xv_grab_port_cookie_t
1375 xcb_xv_grab_port_unchecked (xcb_connection_t *c  /**< */,
1376                             xcb_xv_port_t     port  /**< */,
1377                             xcb_timestamp_t   time  /**< */)
1378 {
1379     static const xcb_protocol_request_t xcb_req = {
1380         /* count */ 2,
1381         /* ext */ &xcb_xv_id,
1382         /* opcode */ XCB_XV_GRAB_PORT,
1383         /* isvoid */ 0
1384     };
1385 
1386     struct iovec xcb_parts[4];
1387     xcb_xv_grab_port_cookie_t xcb_ret;
1388     xcb_xv_grab_port_request_t xcb_out;
1389 
1390     xcb_out.port = port;
1391     xcb_out.time = time;
1392 
1393     xcb_parts[2].iov_base = (char *) &xcb_out;
1394     xcb_parts[2].iov_len = sizeof(xcb_out);
1395     xcb_parts[3].iov_base = 0;
1396     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1397 
1398     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1399     return xcb_ret;
1400 }
1401 
1402 
1403 /*****************************************************************************
1404  **
1405  ** xcb_xv_grab_port_reply_t * xcb_xv_grab_port_reply
1406  **
1407  ** @param xcb_connection_t           *c
1408  ** @param xcb_xv_grab_port_cookie_t   cookie
1409  ** @param xcb_generic_error_t       **e
1410  ** @returns xcb_xv_grab_port_reply_t *
1411  **
1412  *****************************************************************************/
1413 
1414 xcb_xv_grab_port_reply_t *
1415 xcb_xv_grab_port_reply (xcb_connection_t           *c  /**< */,
1416                         xcb_xv_grab_port_cookie_t   cookie  /**< */,
1417                         xcb_generic_error_t       **e  /**< */)
1418 {
1419     return (xcb_xv_grab_port_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1420 }
1421 
1422 
1423 /*****************************************************************************
1424  **
1425  ** xcb_void_cookie_t xcb_xv_ungrab_port_checked
1426  **
1427  ** @param xcb_connection_t *c
1428  ** @param xcb_xv_port_t     port
1429  ** @param xcb_timestamp_t   time
1430  ** @returns xcb_void_cookie_t
1431  **
1432  *****************************************************************************/
1433 
1434 xcb_void_cookie_t
1435 xcb_xv_ungrab_port_checked (xcb_connection_t *c  /**< */,
1436                             xcb_xv_port_t     port  /**< */,
1437                             xcb_timestamp_t   time  /**< */)
1438 {
1439     static const xcb_protocol_request_t xcb_req = {
1440         /* count */ 2,
1441         /* ext */ &xcb_xv_id,
1442         /* opcode */ XCB_XV_UNGRAB_PORT,
1443         /* isvoid */ 1
1444     };
1445 
1446     struct iovec xcb_parts[4];
1447     xcb_void_cookie_t xcb_ret;
1448     xcb_xv_ungrab_port_request_t xcb_out;
1449 
1450     xcb_out.port = port;
1451     xcb_out.time = time;
1452 
1453     xcb_parts[2].iov_base = (char *) &xcb_out;
1454     xcb_parts[2].iov_len = sizeof(xcb_out);
1455     xcb_parts[3].iov_base = 0;
1456     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1457 
1458     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1459     return xcb_ret;
1460 }
1461 
1462 
1463 /*****************************************************************************
1464  **
1465  ** xcb_void_cookie_t xcb_xv_ungrab_port
1466  **
1467  ** @param xcb_connection_t *c
1468  ** @param xcb_xv_port_t     port
1469  ** @param xcb_timestamp_t   time
1470  ** @returns xcb_void_cookie_t
1471  **
1472  *****************************************************************************/
1473 
1474 xcb_void_cookie_t
1475 xcb_xv_ungrab_port (xcb_connection_t *c  /**< */,
1476                     xcb_xv_port_t     port  /**< */,
1477                     xcb_timestamp_t   time  /**< */)
1478 {
1479     static const xcb_protocol_request_t xcb_req = {
1480         /* count */ 2,
1481         /* ext */ &xcb_xv_id,
1482         /* opcode */ XCB_XV_UNGRAB_PORT,
1483         /* isvoid */ 1
1484     };
1485 
1486     struct iovec xcb_parts[4];
1487     xcb_void_cookie_t xcb_ret;
1488     xcb_xv_ungrab_port_request_t xcb_out;
1489 
1490     xcb_out.port = port;
1491     xcb_out.time = time;
1492 
1493     xcb_parts[2].iov_base = (char *) &xcb_out;
1494     xcb_parts[2].iov_len = sizeof(xcb_out);
1495     xcb_parts[3].iov_base = 0;
1496     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1497 
1498     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1499     return xcb_ret;
1500 }
1501 
1502 
1503 /*****************************************************************************
1504  **
1505  ** xcb_void_cookie_t xcb_xv_put_video_checked
1506  **
1507  ** @param xcb_connection_t *c
1508  ** @param xcb_xv_port_t     port
1509  ** @param xcb_drawable_t    drawable
1510  ** @param xcb_gcontext_t    gc
1511  ** @param int16_t           vid_x
1512  ** @param int16_t           vid_y
1513  ** @param uint16_t          vid_w
1514  ** @param uint16_t          vid_h
1515  ** @param int16_t           drw_x
1516  ** @param int16_t           drw_y
1517  ** @param uint16_t          drw_w
1518  ** @param uint16_t          drw_h
1519  ** @returns xcb_void_cookie_t
1520  **
1521  *****************************************************************************/
1522 
1523 xcb_void_cookie_t
1524 xcb_xv_put_video_checked (xcb_connection_t *c  /**< */,
1525                           xcb_xv_port_t     port  /**< */,
1526                           xcb_drawable_t    drawable  /**< */,
1527                           xcb_gcontext_t    gc  /**< */,
1528                           int16_t           vid_x  /**< */,
1529                           int16_t           vid_y  /**< */,
1530                           uint16_t          vid_w  /**< */,
1531                           uint16_t          vid_h  /**< */,
1532                           int16_t           drw_x  /**< */,
1533                           int16_t           drw_y  /**< */,
1534                           uint16_t          drw_w  /**< */,
1535                           uint16_t          drw_h  /**< */)
1536 {
1537     static const xcb_protocol_request_t xcb_req = {
1538         /* count */ 2,
1539         /* ext */ &xcb_xv_id,
1540         /* opcode */ XCB_XV_PUT_VIDEO,
1541         /* isvoid */ 1
1542     };
1543 
1544     struct iovec xcb_parts[4];
1545     xcb_void_cookie_t xcb_ret;
1546     xcb_xv_put_video_request_t xcb_out;
1547 
1548     xcb_out.port = port;
1549     xcb_out.drawable = drawable;
1550     xcb_out.gc = gc;
1551     xcb_out.vid_x = vid_x;
1552     xcb_out.vid_y = vid_y;
1553     xcb_out.vid_w = vid_w;
1554     xcb_out.vid_h = vid_h;
1555     xcb_out.drw_x = drw_x;
1556     xcb_out.drw_y = drw_y;
1557     xcb_out.drw_w = drw_w;
1558     xcb_out.drw_h = drw_h;
1559 
1560     xcb_parts[2].iov_base = (char *) &xcb_out;
1561     xcb_parts[2].iov_len = sizeof(xcb_out);
1562     xcb_parts[3].iov_base = 0;
1563     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1564 
1565     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1566     return xcb_ret;
1567 }
1568 
1569 
1570 /*****************************************************************************
1571  **
1572  ** xcb_void_cookie_t xcb_xv_put_video
1573  **
1574  ** @param xcb_connection_t *c
1575  ** @param xcb_xv_port_t     port
1576  ** @param xcb_drawable_t    drawable
1577  ** @param xcb_gcontext_t    gc
1578  ** @param int16_t           vid_x
1579  ** @param int16_t           vid_y
1580  ** @param uint16_t          vid_w
1581  ** @param uint16_t          vid_h
1582  ** @param int16_t           drw_x
1583  ** @param int16_t           drw_y
1584  ** @param uint16_t          drw_w
1585  ** @param uint16_t          drw_h
1586  ** @returns xcb_void_cookie_t
1587  **
1588  *****************************************************************************/
1589 
1590 xcb_void_cookie_t
1591 xcb_xv_put_video (xcb_connection_t *c  /**< */,
1592                   xcb_xv_port_t     port  /**< */,
1593                   xcb_drawable_t    drawable  /**< */,
1594                   xcb_gcontext_t    gc  /**< */,
1595                   int16_t           vid_x  /**< */,
1596                   int16_t           vid_y  /**< */,
1597                   uint16_t          vid_w  /**< */,
1598                   uint16_t          vid_h  /**< */,
1599                   int16_t           drw_x  /**< */,
1600                   int16_t           drw_y  /**< */,
1601                   uint16_t          drw_w  /**< */,
1602                   uint16_t          drw_h  /**< */)
1603 {
1604     static const xcb_protocol_request_t xcb_req = {
1605         /* count */ 2,
1606         /* ext */ &xcb_xv_id,
1607         /* opcode */ XCB_XV_PUT_VIDEO,
1608         /* isvoid */ 1
1609     };
1610 
1611     struct iovec xcb_parts[4];
1612     xcb_void_cookie_t xcb_ret;
1613     xcb_xv_put_video_request_t xcb_out;
1614 
1615     xcb_out.port = port;
1616     xcb_out.drawable = drawable;
1617     xcb_out.gc = gc;
1618     xcb_out.vid_x = vid_x;
1619     xcb_out.vid_y = vid_y;
1620     xcb_out.vid_w = vid_w;
1621     xcb_out.vid_h = vid_h;
1622     xcb_out.drw_x = drw_x;
1623     xcb_out.drw_y = drw_y;
1624     xcb_out.drw_w = drw_w;
1625     xcb_out.drw_h = drw_h;
1626 
1627     xcb_parts[2].iov_base = (char *) &xcb_out;
1628     xcb_parts[2].iov_len = sizeof(xcb_out);
1629     xcb_parts[3].iov_base = 0;
1630     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1631 
1632     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1633     return xcb_ret;
1634 }
1635 
1636 
1637 /*****************************************************************************
1638  **
1639  ** xcb_void_cookie_t xcb_xv_put_still_checked
1640  **
1641  ** @param xcb_connection_t *c
1642  ** @param xcb_xv_port_t     port
1643  ** @param xcb_drawable_t    drawable
1644  ** @param xcb_gcontext_t    gc
1645  ** @param int16_t           vid_x
1646  ** @param int16_t           vid_y
1647  ** @param uint16_t          vid_w
1648  ** @param uint16_t          vid_h
1649  ** @param int16_t           drw_x
1650  ** @param int16_t           drw_y
1651  ** @param uint16_t          drw_w
1652  ** @param uint16_t          drw_h
1653  ** @returns xcb_void_cookie_t
1654  **
1655  *****************************************************************************/
1656 
1657 xcb_void_cookie_t
1658 xcb_xv_put_still_checked (xcb_connection_t *c  /**< */,
1659                           xcb_xv_port_t     port  /**< */,
1660                           xcb_drawable_t    drawable  /**< */,
1661                           xcb_gcontext_t    gc  /**< */,
1662                           int16_t           vid_x  /**< */,
1663                           int16_t           vid_y  /**< */,
1664                           uint16_t          vid_w  /**< */,
1665                           uint16_t          vid_h  /**< */,
1666                           int16_t           drw_x  /**< */,
1667                           int16_t           drw_y  /**< */,
1668                           uint16_t          drw_w  /**< */,
1669                           uint16_t          drw_h  /**< */)
1670 {
1671     static const xcb_protocol_request_t xcb_req = {
1672         /* count */ 2,
1673         /* ext */ &xcb_xv_id,
1674         /* opcode */ XCB_XV_PUT_STILL,
1675         /* isvoid */ 1
1676     };
1677 
1678     struct iovec xcb_parts[4];
1679     xcb_void_cookie_t xcb_ret;
1680     xcb_xv_put_still_request_t xcb_out;
1681 
1682     xcb_out.port = port;
1683     xcb_out.drawable = drawable;
1684     xcb_out.gc = gc;
1685     xcb_out.vid_x = vid_x;
1686     xcb_out.vid_y = vid_y;
1687     xcb_out.vid_w = vid_w;
1688     xcb_out.vid_h = vid_h;
1689     xcb_out.drw_x = drw_x;
1690     xcb_out.drw_y = drw_y;
1691     xcb_out.drw_w = drw_w;
1692     xcb_out.drw_h = drw_h;
1693 
1694     xcb_parts[2].iov_base = (char *) &xcb_out;
1695     xcb_parts[2].iov_len = sizeof(xcb_out);
1696     xcb_parts[3].iov_base = 0;
1697     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1698 
1699     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1700     return xcb_ret;
1701 }
1702 
1703 
1704 /*****************************************************************************
1705  **
1706  ** xcb_void_cookie_t xcb_xv_put_still
1707  **
1708  ** @param xcb_connection_t *c
1709  ** @param xcb_xv_port_t     port
1710  ** @param xcb_drawable_t    drawable
1711  ** @param xcb_gcontext_t    gc
1712  ** @param int16_t           vid_x
1713  ** @param int16_t           vid_y
1714  ** @param uint16_t          vid_w
1715  ** @param uint16_t          vid_h
1716  ** @param int16_t           drw_x
1717  ** @param int16_t           drw_y
1718  ** @param uint16_t          drw_w
1719  ** @param uint16_t          drw_h
1720  ** @returns xcb_void_cookie_t
1721  **
1722  *****************************************************************************/
1723 
1724 xcb_void_cookie_t
1725 xcb_xv_put_still (xcb_connection_t *c  /**< */,
1726                   xcb_xv_port_t     port  /**< */,
1727                   xcb_drawable_t    drawable  /**< */,
1728                   xcb_gcontext_t    gc  /**< */,
1729                   int16_t           vid_x  /**< */,
1730                   int16_t           vid_y  /**< */,
1731                   uint16_t          vid_w  /**< */,
1732                   uint16_t          vid_h  /**< */,
1733                   int16_t           drw_x  /**< */,
1734                   int16_t           drw_y  /**< */,
1735                   uint16_t          drw_w  /**< */,
1736                   uint16_t          drw_h  /**< */)
1737 {
1738     static const xcb_protocol_request_t xcb_req = {
1739         /* count */ 2,
1740         /* ext */ &xcb_xv_id,
1741         /* opcode */ XCB_XV_PUT_STILL,
1742         /* isvoid */ 1
1743     };
1744 
1745     struct iovec xcb_parts[4];
1746     xcb_void_cookie_t xcb_ret;
1747     xcb_xv_put_still_request_t xcb_out;
1748 
1749     xcb_out.port = port;
1750     xcb_out.drawable = drawable;
1751     xcb_out.gc = gc;
1752     xcb_out.vid_x = vid_x;
1753     xcb_out.vid_y = vid_y;
1754     xcb_out.vid_w = vid_w;
1755     xcb_out.vid_h = vid_h;
1756     xcb_out.drw_x = drw_x;
1757     xcb_out.drw_y = drw_y;
1758     xcb_out.drw_w = drw_w;
1759     xcb_out.drw_h = drw_h;
1760 
1761     xcb_parts[2].iov_base = (char *) &xcb_out;
1762     xcb_parts[2].iov_len = sizeof(xcb_out);
1763     xcb_parts[3].iov_base = 0;
1764     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1765 
1766     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1767     return xcb_ret;
1768 }
1769 
1770 
1771 /*****************************************************************************
1772  **
1773  ** xcb_void_cookie_t xcb_xv_get_video_checked
1774  **
1775  ** @param xcb_connection_t *c
1776  ** @param xcb_xv_port_t     port
1777  ** @param xcb_drawable_t    drawable
1778  ** @param xcb_gcontext_t    gc
1779  ** @param int16_t           vid_x
1780  ** @param int16_t           vid_y
1781  ** @param uint16_t          vid_w
1782  ** @param uint16_t          vid_h
1783  ** @param int16_t           drw_x
1784  ** @param int16_t           drw_y
1785  ** @param uint16_t          drw_w
1786  ** @param uint16_t          drw_h
1787  ** @returns xcb_void_cookie_t
1788  **
1789  *****************************************************************************/
1790 
1791 xcb_void_cookie_t
1792 xcb_xv_get_video_checked (xcb_connection_t *c  /**< */,
1793                           xcb_xv_port_t     port  /**< */,
1794                           xcb_drawable_t    drawable  /**< */,
1795                           xcb_gcontext_t    gc  /**< */,
1796                           int16_t           vid_x  /**< */,
1797                           int16_t           vid_y  /**< */,
1798                           uint16_t          vid_w  /**< */,
1799                           uint16_t          vid_h  /**< */,
1800                           int16_t           drw_x  /**< */,
1801                           int16_t           drw_y  /**< */,
1802                           uint16_t          drw_w  /**< */,
1803                           uint16_t          drw_h  /**< */)
1804 {
1805     static const xcb_protocol_request_t xcb_req = {
1806         /* count */ 2,
1807         /* ext */ &xcb_xv_id,
1808         /* opcode */ XCB_XV_GET_VIDEO,
1809         /* isvoid */ 1
1810     };
1811 
1812     struct iovec xcb_parts[4];
1813     xcb_void_cookie_t xcb_ret;
1814     xcb_xv_get_video_request_t xcb_out;
1815 
1816     xcb_out.port = port;
1817     xcb_out.drawable = drawable;
1818     xcb_out.gc = gc;
1819     xcb_out.vid_x = vid_x;
1820     xcb_out.vid_y = vid_y;
1821     xcb_out.vid_w = vid_w;
1822     xcb_out.vid_h = vid_h;
1823     xcb_out.drw_x = drw_x;
1824     xcb_out.drw_y = drw_y;
1825     xcb_out.drw_w = drw_w;
1826     xcb_out.drw_h = drw_h;
1827 
1828     xcb_parts[2].iov_base = (char *) &xcb_out;
1829     xcb_parts[2].iov_len = sizeof(xcb_out);
1830     xcb_parts[3].iov_base = 0;
1831     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1832 
1833     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1834     return xcb_ret;
1835 }
1836 
1837 
1838 /*****************************************************************************
1839  **
1840  ** xcb_void_cookie_t xcb_xv_get_video
1841  **
1842  ** @param xcb_connection_t *c
1843  ** @param xcb_xv_port_t     port
1844  ** @param xcb_drawable_t    drawable
1845  ** @param xcb_gcontext_t    gc
1846  ** @param int16_t           vid_x
1847  ** @param int16_t           vid_y
1848  ** @param uint16_t          vid_w
1849  ** @param uint16_t          vid_h
1850  ** @param int16_t           drw_x
1851  ** @param int16_t           drw_y
1852  ** @param uint16_t          drw_w
1853  ** @param uint16_t          drw_h
1854  ** @returns xcb_void_cookie_t
1855  **
1856  *****************************************************************************/
1857 
1858 xcb_void_cookie_t
1859 xcb_xv_get_video (xcb_connection_t *c  /**< */,
1860                   xcb_xv_port_t     port  /**< */,
1861                   xcb_drawable_t    drawable  /**< */,
1862                   xcb_gcontext_t    gc  /**< */,
1863                   int16_t           vid_x  /**< */,
1864                   int16_t           vid_y  /**< */,
1865                   uint16_t          vid_w  /**< */,
1866                   uint16_t          vid_h  /**< */,
1867                   int16_t           drw_x  /**< */,
1868                   int16_t           drw_y  /**< */,
1869                   uint16_t          drw_w  /**< */,
1870                   uint16_t          drw_h  /**< */)
1871 {
1872     static const xcb_protocol_request_t xcb_req = {
1873         /* count */ 2,
1874         /* ext */ &xcb_xv_id,
1875         /* opcode */ XCB_XV_GET_VIDEO,
1876         /* isvoid */ 1
1877     };
1878 
1879     struct iovec xcb_parts[4];
1880     xcb_void_cookie_t xcb_ret;
1881     xcb_xv_get_video_request_t xcb_out;
1882 
1883     xcb_out.port = port;
1884     xcb_out.drawable = drawable;
1885     xcb_out.gc = gc;
1886     xcb_out.vid_x = vid_x;
1887     xcb_out.vid_y = vid_y;
1888     xcb_out.vid_w = vid_w;
1889     xcb_out.vid_h = vid_h;
1890     xcb_out.drw_x = drw_x;
1891     xcb_out.drw_y = drw_y;
1892     xcb_out.drw_w = drw_w;
1893     xcb_out.drw_h = drw_h;
1894 
1895     xcb_parts[2].iov_base = (char *) &xcb_out;
1896     xcb_parts[2].iov_len = sizeof(xcb_out);
1897     xcb_parts[3].iov_base = 0;
1898     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1899 
1900     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1901     return xcb_ret;
1902 }
1903 
1904 
1905 /*****************************************************************************
1906  **
1907  ** xcb_void_cookie_t xcb_xv_get_still_checked
1908  **
1909  ** @param xcb_connection_t *c
1910  ** @param xcb_xv_port_t     port
1911  ** @param xcb_drawable_t    drawable
1912  ** @param xcb_gcontext_t    gc
1913  ** @param int16_t           vid_x
1914  ** @param int16_t           vid_y
1915  ** @param uint16_t          vid_w
1916  ** @param uint16_t          vid_h
1917  ** @param int16_t           drw_x
1918  ** @param int16_t           drw_y
1919  ** @param uint16_t          drw_w
1920  ** @param uint16_t          drw_h
1921  ** @returns xcb_void_cookie_t
1922  **
1923  *****************************************************************************/
1924 
1925 xcb_void_cookie_t
1926 xcb_xv_get_still_checked (xcb_connection_t *c  /**< */,
1927                           xcb_xv_port_t     port  /**< */,
1928                           xcb_drawable_t    drawable  /**< */,
1929                           xcb_gcontext_t    gc  /**< */,
1930                           int16_t           vid_x  /**< */,
1931                           int16_t           vid_y  /**< */,
1932                           uint16_t          vid_w  /**< */,
1933                           uint16_t          vid_h  /**< */,
1934                           int16_t           drw_x  /**< */,
1935                           int16_t           drw_y  /**< */,
1936                           uint16_t          drw_w  /**< */,
1937                           uint16_t          drw_h  /**< */)
1938 {
1939     static const xcb_protocol_request_t xcb_req = {
1940         /* count */ 2,
1941         /* ext */ &xcb_xv_id,
1942         /* opcode */ XCB_XV_GET_STILL,
1943         /* isvoid */ 1
1944     };
1945 
1946     struct iovec xcb_parts[4];
1947     xcb_void_cookie_t xcb_ret;
1948     xcb_xv_get_still_request_t xcb_out;
1949 
1950     xcb_out.port = port;
1951     xcb_out.drawable = drawable;
1952     xcb_out.gc = gc;
1953     xcb_out.vid_x = vid_x;
1954     xcb_out.vid_y = vid_y;
1955     xcb_out.vid_w = vid_w;
1956     xcb_out.vid_h = vid_h;
1957     xcb_out.drw_x = drw_x;
1958     xcb_out.drw_y = drw_y;
1959     xcb_out.drw_w = drw_w;
1960     xcb_out.drw_h = drw_h;
1961 
1962     xcb_parts[2].iov_base = (char *) &xcb_out;
1963     xcb_parts[2].iov_len = sizeof(xcb_out);
1964     xcb_parts[3].iov_base = 0;
1965     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1966 
1967     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1968     return xcb_ret;
1969 }
1970 
1971 
1972 /*****************************************************************************
1973  **
1974  ** xcb_void_cookie_t xcb_xv_get_still
1975  **
1976  ** @param xcb_connection_t *c
1977  ** @param xcb_xv_port_t     port
1978  ** @param xcb_drawable_t    drawable
1979  ** @param xcb_gcontext_t    gc
1980  ** @param int16_t           vid_x
1981  ** @param int16_t           vid_y
1982  ** @param uint16_t          vid_w
1983  ** @param uint16_t          vid_h
1984  ** @param int16_t           drw_x
1985  ** @param int16_t           drw_y
1986  ** @param uint16_t          drw_w
1987  ** @param uint16_t          drw_h
1988  ** @returns xcb_void_cookie_t
1989  **
1990  *****************************************************************************/
1991 
1992 xcb_void_cookie_t
1993 xcb_xv_get_still (xcb_connection_t *c  /**< */,
1994                   xcb_xv_port_t     port  /**< */,
1995                   xcb_drawable_t    drawable  /**< */,
1996                   xcb_gcontext_t    gc  /**< */,
1997                   int16_t           vid_x  /**< */,
1998                   int16_t           vid_y  /**< */,
1999                   uint16_t          vid_w  /**< */,
2000                   uint16_t          vid_h  /**< */,
2001                   int16_t           drw_x  /**< */,
2002                   int16_t           drw_y  /**< */,
2003                   uint16_t          drw_w  /**< */,
2004                   uint16_t          drw_h  /**< */)
2005 {
2006     static const xcb_protocol_request_t xcb_req = {
2007         /* count */ 2,
2008         /* ext */ &xcb_xv_id,
2009         /* opcode */ XCB_XV_GET_STILL,
2010         /* isvoid */ 1
2011     };
2012 
2013     struct iovec xcb_parts[4];
2014     xcb_void_cookie_t xcb_ret;
2015     xcb_xv_get_still_request_t xcb_out;
2016 
2017     xcb_out.port = port;
2018     xcb_out.drawable = drawable;
2019     xcb_out.gc = gc;
2020     xcb_out.vid_x = vid_x;
2021     xcb_out.vid_y = vid_y;
2022     xcb_out.vid_w = vid_w;
2023     xcb_out.vid_h = vid_h;
2024     xcb_out.drw_x = drw_x;
2025     xcb_out.drw_y = drw_y;
2026     xcb_out.drw_w = drw_w;
2027     xcb_out.drw_h = drw_h;
2028 
2029     xcb_parts[2].iov_base = (char *) &xcb_out;
2030     xcb_parts[2].iov_len = sizeof(xcb_out);
2031     xcb_parts[3].iov_base = 0;
2032     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2033 
2034     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2035     return xcb_ret;
2036 }
2037 
2038 
2039 /*****************************************************************************
2040  **
2041  ** xcb_void_cookie_t xcb_xv_stop_video_checked
2042  **
2043  ** @param xcb_connection_t *c
2044  ** @param xcb_xv_port_t     port
2045  ** @param xcb_drawable_t    drawable
2046  ** @returns xcb_void_cookie_t
2047  **
2048  *****************************************************************************/
2049 
2050 xcb_void_cookie_t
2051 xcb_xv_stop_video_checked (xcb_connection_t *c  /**< */,
2052                            xcb_xv_port_t     port  /**< */,
2053                            xcb_drawable_t    drawable  /**< */)
2054 {
2055     static const xcb_protocol_request_t xcb_req = {
2056         /* count */ 2,
2057         /* ext */ &xcb_xv_id,
2058         /* opcode */ XCB_XV_STOP_VIDEO,
2059         /* isvoid */ 1
2060     };
2061 
2062     struct iovec xcb_parts[4];
2063     xcb_void_cookie_t xcb_ret;
2064     xcb_xv_stop_video_request_t xcb_out;
2065 
2066     xcb_out.port = port;
2067     xcb_out.drawable = drawable;
2068 
2069     xcb_parts[2].iov_base = (char *) &xcb_out;
2070     xcb_parts[2].iov_len = sizeof(xcb_out);
2071     xcb_parts[3].iov_base = 0;
2072     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2073 
2074     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2075     return xcb_ret;
2076 }
2077 
2078 
2079 /*****************************************************************************
2080  **
2081  ** xcb_void_cookie_t xcb_xv_stop_video
2082  **
2083  ** @param xcb_connection_t *c
2084  ** @param xcb_xv_port_t     port
2085  ** @param xcb_drawable_t    drawable
2086  ** @returns xcb_void_cookie_t
2087  **
2088  *****************************************************************************/
2089 
2090 xcb_void_cookie_t
2091 xcb_xv_stop_video (xcb_connection_t *c  /**< */,
2092                    xcb_xv_port_t     port  /**< */,
2093                    xcb_drawable_t    drawable  /**< */)
2094 {
2095     static const xcb_protocol_request_t xcb_req = {
2096         /* count */ 2,
2097         /* ext */ &xcb_xv_id,
2098         /* opcode */ XCB_XV_STOP_VIDEO,
2099         /* isvoid */ 1
2100     };
2101 
2102     struct iovec xcb_parts[4];
2103     xcb_void_cookie_t xcb_ret;
2104     xcb_xv_stop_video_request_t xcb_out;
2105 
2106     xcb_out.port = port;
2107     xcb_out.drawable = drawable;
2108 
2109     xcb_parts[2].iov_base = (char *) &xcb_out;
2110     xcb_parts[2].iov_len = sizeof(xcb_out);
2111     xcb_parts[3].iov_base = 0;
2112     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2113 
2114     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2115     return xcb_ret;
2116 }
2117 
2118 
2119 /*****************************************************************************
2120  **
2121  ** xcb_void_cookie_t xcb_xv_select_video_notify_checked
2122  **
2123  ** @param xcb_connection_t *c
2124  ** @param xcb_drawable_t    drawable
2125  ** @param uint8_t           onoff
2126  ** @returns xcb_void_cookie_t
2127  **
2128  *****************************************************************************/
2129 
2130 xcb_void_cookie_t
2131 xcb_xv_select_video_notify_checked (xcb_connection_t *c  /**< */,
2132                                     xcb_drawable_t    drawable  /**< */,
2133                                     uint8_t           onoff  /**< */)
2134 {
2135     static const xcb_protocol_request_t xcb_req = {
2136         /* count */ 2,
2137         /* ext */ &xcb_xv_id,
2138         /* opcode */ XCB_XV_SELECT_VIDEO_NOTIFY,
2139         /* isvoid */ 1
2140     };
2141 
2142     struct iovec xcb_parts[4];
2143     xcb_void_cookie_t xcb_ret;
2144     xcb_xv_select_video_notify_request_t xcb_out;
2145 
2146     xcb_out.drawable = drawable;
2147     xcb_out.onoff = onoff;
2148     memset(xcb_out.pad0, 0, 3);
2149 
2150     xcb_parts[2].iov_base = (char *) &xcb_out;
2151     xcb_parts[2].iov_len = sizeof(xcb_out);
2152     xcb_parts[3].iov_base = 0;
2153     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2154 
2155     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2156     return xcb_ret;
2157 }
2158 
2159 
2160 /*****************************************************************************
2161  **
2162  ** xcb_void_cookie_t xcb_xv_select_video_notify
2163  **
2164  ** @param xcb_connection_t *c
2165  ** @param xcb_drawable_t    drawable
2166  ** @param uint8_t           onoff
2167  ** @returns xcb_void_cookie_t
2168  **
2169  *****************************************************************************/
2170 
2171 xcb_void_cookie_t
2172 xcb_xv_select_video_notify (xcb_connection_t *c  /**< */,
2173                             xcb_drawable_t    drawable  /**< */,
2174                             uint8_t           onoff  /**< */)
2175 {
2176     static const xcb_protocol_request_t xcb_req = {
2177         /* count */ 2,
2178         /* ext */ &xcb_xv_id,
2179         /* opcode */ XCB_XV_SELECT_VIDEO_NOTIFY,
2180         /* isvoid */ 1
2181     };
2182 
2183     struct iovec xcb_parts[4];
2184     xcb_void_cookie_t xcb_ret;
2185     xcb_xv_select_video_notify_request_t xcb_out;
2186 
2187     xcb_out.drawable = drawable;
2188     xcb_out.onoff = onoff;
2189     memset(xcb_out.pad0, 0, 3);
2190 
2191     xcb_parts[2].iov_base = (char *) &xcb_out;
2192     xcb_parts[2].iov_len = sizeof(xcb_out);
2193     xcb_parts[3].iov_base = 0;
2194     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2195 
2196     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2197     return xcb_ret;
2198 }
2199 
2200 
2201 /*****************************************************************************
2202  **
2203  ** xcb_void_cookie_t xcb_xv_select_port_notify_checked
2204  **
2205  ** @param xcb_connection_t *c
2206  ** @param xcb_xv_port_t     port
2207  ** @param uint8_t           onoff
2208  ** @returns xcb_void_cookie_t
2209  **
2210  *****************************************************************************/
2211 
2212 xcb_void_cookie_t
2213 xcb_xv_select_port_notify_checked (xcb_connection_t *c  /**< */,
2214                                    xcb_xv_port_t     port  /**< */,
2215                                    uint8_t           onoff  /**< */)
2216 {
2217     static const xcb_protocol_request_t xcb_req = {
2218         /* count */ 2,
2219         /* ext */ &xcb_xv_id,
2220         /* opcode */ XCB_XV_SELECT_PORT_NOTIFY,
2221         /* isvoid */ 1
2222     };
2223 
2224     struct iovec xcb_parts[4];
2225     xcb_void_cookie_t xcb_ret;
2226     xcb_xv_select_port_notify_request_t xcb_out;
2227 
2228     xcb_out.port = port;
2229     xcb_out.onoff = onoff;
2230     memset(xcb_out.pad0, 0, 3);
2231 
2232     xcb_parts[2].iov_base = (char *) &xcb_out;
2233     xcb_parts[2].iov_len = sizeof(xcb_out);
2234     xcb_parts[3].iov_base = 0;
2235     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2236 
2237     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2238     return xcb_ret;
2239 }
2240 
2241 
2242 /*****************************************************************************
2243  **
2244  ** xcb_void_cookie_t xcb_xv_select_port_notify
2245  **
2246  ** @param xcb_connection_t *c
2247  ** @param xcb_xv_port_t     port
2248  ** @param uint8_t           onoff
2249  ** @returns xcb_void_cookie_t
2250  **
2251  *****************************************************************************/
2252 
2253 xcb_void_cookie_t
2254 xcb_xv_select_port_notify (xcb_connection_t *c  /**< */,
2255                            xcb_xv_port_t     port  /**< */,
2256                            uint8_t           onoff  /**< */)
2257 {
2258     static const xcb_protocol_request_t xcb_req = {
2259         /* count */ 2,
2260         /* ext */ &xcb_xv_id,
2261         /* opcode */ XCB_XV_SELECT_PORT_NOTIFY,
2262         /* isvoid */ 1
2263     };
2264 
2265     struct iovec xcb_parts[4];
2266     xcb_void_cookie_t xcb_ret;
2267     xcb_xv_select_port_notify_request_t xcb_out;
2268 
2269     xcb_out.port = port;
2270     xcb_out.onoff = onoff;
2271     memset(xcb_out.pad0, 0, 3);
2272 
2273     xcb_parts[2].iov_base = (char *) &xcb_out;
2274     xcb_parts[2].iov_len = sizeof(xcb_out);
2275     xcb_parts[3].iov_base = 0;
2276     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2277 
2278     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2279     return xcb_ret;
2280 }
2281 
2282 
2283 /*****************************************************************************
2284  **
2285  ** xcb_xv_query_best_size_cookie_t xcb_xv_query_best_size
2286  **
2287  ** @param xcb_connection_t *c
2288  ** @param xcb_xv_port_t     port
2289  ** @param uint16_t          vid_w
2290  ** @param uint16_t          vid_h
2291  ** @param uint16_t          drw_w
2292  ** @param uint16_t          drw_h
2293  ** @param uint8_t           motion
2294  ** @returns xcb_xv_query_best_size_cookie_t
2295  **
2296  *****************************************************************************/
2297 
2298 xcb_xv_query_best_size_cookie_t
2299 xcb_xv_query_best_size (xcb_connection_t *c  /**< */,
2300                         xcb_xv_port_t     port  /**< */,
2301                         uint16_t          vid_w  /**< */,
2302                         uint16_t          vid_h  /**< */,
2303                         uint16_t          drw_w  /**< */,
2304                         uint16_t          drw_h  /**< */,
2305                         uint8_t           motion  /**< */)
2306 {
2307     static const xcb_protocol_request_t xcb_req = {
2308         /* count */ 2,
2309         /* ext */ &xcb_xv_id,
2310         /* opcode */ XCB_XV_QUERY_BEST_SIZE,
2311         /* isvoid */ 0
2312     };
2313 
2314     struct iovec xcb_parts[4];
2315     xcb_xv_query_best_size_cookie_t xcb_ret;
2316     xcb_xv_query_best_size_request_t xcb_out;
2317 
2318     xcb_out.port = port;
2319     xcb_out.vid_w = vid_w;
2320     xcb_out.vid_h = vid_h;
2321     xcb_out.drw_w = drw_w;
2322     xcb_out.drw_h = drw_h;
2323     xcb_out.motion = motion;
2324     memset(xcb_out.pad0, 0, 3);
2325 
2326     xcb_parts[2].iov_base = (char *) &xcb_out;
2327     xcb_parts[2].iov_len = sizeof(xcb_out);
2328     xcb_parts[3].iov_base = 0;
2329     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2330 
2331     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2332     return xcb_ret;
2333 }
2334 
2335 
2336 /*****************************************************************************
2337  **
2338  ** xcb_xv_query_best_size_cookie_t xcb_xv_query_best_size_unchecked
2339  **
2340  ** @param xcb_connection_t *c
2341  ** @param xcb_xv_port_t     port
2342  ** @param uint16_t          vid_w
2343  ** @param uint16_t          vid_h
2344  ** @param uint16_t          drw_w
2345  ** @param uint16_t          drw_h
2346  ** @param uint8_t           motion
2347  ** @returns xcb_xv_query_best_size_cookie_t
2348  **
2349  *****************************************************************************/
2350 
2351 xcb_xv_query_best_size_cookie_t
2352 xcb_xv_query_best_size_unchecked (xcb_connection_t *c  /**< */,
2353                                   xcb_xv_port_t     port  /**< */,
2354                                   uint16_t          vid_w  /**< */,
2355                                   uint16_t          vid_h  /**< */,
2356                                   uint16_t          drw_w  /**< */,
2357                                   uint16_t          drw_h  /**< */,
2358                                   uint8_t           motion  /**< */)
2359 {
2360     static const xcb_protocol_request_t xcb_req = {
2361         /* count */ 2,
2362         /* ext */ &xcb_xv_id,
2363         /* opcode */ XCB_XV_QUERY_BEST_SIZE,
2364         /* isvoid */ 0
2365     };
2366 
2367     struct iovec xcb_parts[4];
2368     xcb_xv_query_best_size_cookie_t xcb_ret;
2369     xcb_xv_query_best_size_request_t xcb_out;
2370 
2371     xcb_out.port = port;
2372     xcb_out.vid_w = vid_w;
2373     xcb_out.vid_h = vid_h;
2374     xcb_out.drw_w = drw_w;
2375     xcb_out.drw_h = drw_h;
2376     xcb_out.motion = motion;
2377     memset(xcb_out.pad0, 0, 3);
2378 
2379     xcb_parts[2].iov_base = (char *) &xcb_out;
2380     xcb_parts[2].iov_len = sizeof(xcb_out);
2381     xcb_parts[3].iov_base = 0;
2382     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2383 
2384     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2385     return xcb_ret;
2386 }
2387 
2388 
2389 /*****************************************************************************
2390  **
2391  ** xcb_xv_query_best_size_reply_t * xcb_xv_query_best_size_reply
2392  **
2393  ** @param xcb_connection_t                 *c
2394  ** @param xcb_xv_query_best_size_cookie_t   cookie
2395  ** @param xcb_generic_error_t             **e
2396  ** @returns xcb_xv_query_best_size_reply_t *
2397  **
2398  *****************************************************************************/
2399 
2400 xcb_xv_query_best_size_reply_t *
2401 xcb_xv_query_best_size_reply (xcb_connection_t                 *c  /**< */,
2402                               xcb_xv_query_best_size_cookie_t   cookie  /**< */,
2403                               xcb_generic_error_t             **e  /**< */)
2404 {
2405     return (xcb_xv_query_best_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2406 }
2407 
2408 
2409 /*****************************************************************************
2410  **
2411  ** xcb_void_cookie_t xcb_xv_set_port_attribute_checked
2412  **
2413  ** @param xcb_connection_t *c
2414  ** @param xcb_xv_port_t     port
2415  ** @param xcb_atom_t        attribute
2416  ** @param int32_t           value
2417  ** @returns xcb_void_cookie_t
2418  **
2419  *****************************************************************************/
2420 
2421 xcb_void_cookie_t
2422 xcb_xv_set_port_attribute_checked (xcb_connection_t *c  /**< */,
2423                                    xcb_xv_port_t     port  /**< */,
2424                                    xcb_atom_t        attribute  /**< */,
2425                                    int32_t           value  /**< */)
2426 {
2427     static const xcb_protocol_request_t xcb_req = {
2428         /* count */ 2,
2429         /* ext */ &xcb_xv_id,
2430         /* opcode */ XCB_XV_SET_PORT_ATTRIBUTE,
2431         /* isvoid */ 1
2432     };
2433 
2434     struct iovec xcb_parts[4];
2435     xcb_void_cookie_t xcb_ret;
2436     xcb_xv_set_port_attribute_request_t xcb_out;
2437 
2438     xcb_out.port = port;
2439     xcb_out.attribute = attribute;
2440     xcb_out.value = value;
2441 
2442     xcb_parts[2].iov_base = (char *) &xcb_out;
2443     xcb_parts[2].iov_len = sizeof(xcb_out);
2444     xcb_parts[3].iov_base = 0;
2445     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2446 
2447     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2448     return xcb_ret;
2449 }
2450 
2451 
2452 /*****************************************************************************
2453  **
2454  ** xcb_void_cookie_t xcb_xv_set_port_attribute
2455  **
2456  ** @param xcb_connection_t *c
2457  ** @param xcb_xv_port_t     port
2458  ** @param xcb_atom_t        attribute
2459  ** @param int32_t           value
2460  ** @returns xcb_void_cookie_t
2461  **
2462  *****************************************************************************/
2463 
2464 xcb_void_cookie_t
2465 xcb_xv_set_port_attribute (xcb_connection_t *c  /**< */,
2466                            xcb_xv_port_t     port  /**< */,
2467                            xcb_atom_t        attribute  /**< */,
2468                            int32_t           value  /**< */)
2469 {
2470     static const xcb_protocol_request_t xcb_req = {
2471         /* count */ 2,
2472         /* ext */ &xcb_xv_id,
2473         /* opcode */ XCB_XV_SET_PORT_ATTRIBUTE,
2474         /* isvoid */ 1
2475     };
2476 
2477     struct iovec xcb_parts[4];
2478     xcb_void_cookie_t xcb_ret;
2479     xcb_xv_set_port_attribute_request_t xcb_out;
2480 
2481     xcb_out.port = port;
2482     xcb_out.attribute = attribute;
2483     xcb_out.value = value;
2484 
2485     xcb_parts[2].iov_base = (char *) &xcb_out;
2486     xcb_parts[2].iov_len = sizeof(xcb_out);
2487     xcb_parts[3].iov_base = 0;
2488     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2489 
2490     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2491     return xcb_ret;
2492 }
2493 
2494 
2495 /*****************************************************************************
2496  **
2497  ** xcb_xv_get_port_attribute_cookie_t xcb_xv_get_port_attribute
2498  **
2499  ** @param xcb_connection_t *c
2500  ** @param xcb_xv_port_t     port
2501  ** @param xcb_atom_t        attribute
2502  ** @returns xcb_xv_get_port_attribute_cookie_t
2503  **
2504  *****************************************************************************/
2505 
2506 xcb_xv_get_port_attribute_cookie_t
2507 xcb_xv_get_port_attribute (xcb_connection_t *c  /**< */,
2508                            xcb_xv_port_t     port  /**< */,
2509                            xcb_atom_t        attribute  /**< */)
2510 {
2511     static const xcb_protocol_request_t xcb_req = {
2512         /* count */ 2,
2513         /* ext */ &xcb_xv_id,
2514         /* opcode */ XCB_XV_GET_PORT_ATTRIBUTE,
2515         /* isvoid */ 0
2516     };
2517 
2518     struct iovec xcb_parts[4];
2519     xcb_xv_get_port_attribute_cookie_t xcb_ret;
2520     xcb_xv_get_port_attribute_request_t xcb_out;
2521 
2522     xcb_out.port = port;
2523     xcb_out.attribute = attribute;
2524 
2525     xcb_parts[2].iov_base = (char *) &xcb_out;
2526     xcb_parts[2].iov_len = sizeof(xcb_out);
2527     xcb_parts[3].iov_base = 0;
2528     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2529 
2530     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2531     return xcb_ret;
2532 }
2533 
2534 
2535 /*****************************************************************************
2536  **
2537  ** xcb_xv_get_port_attribute_cookie_t xcb_xv_get_port_attribute_unchecked
2538  **
2539  ** @param xcb_connection_t *c
2540  ** @param xcb_xv_port_t     port
2541  ** @param xcb_atom_t        attribute
2542  ** @returns xcb_xv_get_port_attribute_cookie_t
2543  **
2544  *****************************************************************************/
2545 
2546 xcb_xv_get_port_attribute_cookie_t
2547 xcb_xv_get_port_attribute_unchecked (xcb_connection_t *c  /**< */,
2548                                      xcb_xv_port_t     port  /**< */,
2549                                      xcb_atom_t        attribute  /**< */)
2550 {
2551     static const xcb_protocol_request_t xcb_req = {
2552         /* count */ 2,
2553         /* ext */ &xcb_xv_id,
2554         /* opcode */ XCB_XV_GET_PORT_ATTRIBUTE,
2555         /* isvoid */ 0
2556     };
2557 
2558     struct iovec xcb_parts[4];
2559     xcb_xv_get_port_attribute_cookie_t xcb_ret;
2560     xcb_xv_get_port_attribute_request_t xcb_out;
2561 
2562     xcb_out.port = port;
2563     xcb_out.attribute = attribute;
2564 
2565     xcb_parts[2].iov_base = (char *) &xcb_out;
2566     xcb_parts[2].iov_len = sizeof(xcb_out);
2567     xcb_parts[3].iov_base = 0;
2568     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2569 
2570     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2571     return xcb_ret;
2572 }
2573 
2574 
2575 /*****************************************************************************
2576  **
2577  ** xcb_xv_get_port_attribute_reply_t * xcb_xv_get_port_attribute_reply
2578  **
2579  ** @param xcb_connection_t                    *c
2580  ** @param xcb_xv_get_port_attribute_cookie_t   cookie
2581  ** @param xcb_generic_error_t                **e
2582  ** @returns xcb_xv_get_port_attribute_reply_t *
2583  **
2584  *****************************************************************************/
2585 
2586 xcb_xv_get_port_attribute_reply_t *
2587 xcb_xv_get_port_attribute_reply (xcb_connection_t                    *c  /**< */,
2588                                  xcb_xv_get_port_attribute_cookie_t   cookie  /**< */,
2589                                  xcb_generic_error_t                **e  /**< */)
2590 {
2591     return (xcb_xv_get_port_attribute_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2592 }
2593 
2594 int
2595 xcb_xv_query_port_attributes_sizeof (const void  *_buffer  /**< */)
2596 {
2597     char *xcb_tmp = (char *)_buffer;
2598     const xcb_xv_query_port_attributes_reply_t *_aux = (xcb_xv_query_port_attributes_reply_t *)_buffer;
2599     unsigned int xcb_buffer_len = 0;
2600     unsigned int xcb_block_len = 0;
2601     unsigned int xcb_pad = 0;
2602     unsigned int xcb_align_to;
2603 
2604     unsigned int i;
2605     unsigned int xcb_tmp_len;
2606 
2607     xcb_block_len += sizeof(xcb_xv_query_port_attributes_reply_t);
2608     xcb_tmp += xcb_block_len;
2609     /* attributes */
2610     for(i=0; i<_aux->num_attributes; i++) {
2611         xcb_tmp_len = xcb_xv_attribute_info_sizeof(xcb_tmp);
2612         xcb_block_len += xcb_tmp_len;
2613         xcb_tmp += xcb_tmp_len;
2614     }
2615     xcb_align_to = ALIGNOF(xcb_xv_attribute_info_t);
2616     /* insert padding */
2617     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2618     xcb_buffer_len += xcb_block_len + xcb_pad;
2619     if (0 != xcb_pad) {
2620         xcb_tmp += xcb_pad;
2621         xcb_pad = 0;
2622     }
2623     xcb_block_len = 0;
2624 
2625     return xcb_buffer_len;
2626 }
2627 
2628 
2629 /*****************************************************************************
2630  **
2631  ** xcb_xv_query_port_attributes_cookie_t xcb_xv_query_port_attributes
2632  **
2633  ** @param xcb_connection_t *c
2634  ** @param xcb_xv_port_t     port
2635  ** @returns xcb_xv_query_port_attributes_cookie_t
2636  **
2637  *****************************************************************************/
2638 
2639 xcb_xv_query_port_attributes_cookie_t
2640 xcb_xv_query_port_attributes (xcb_connection_t *c  /**< */,
2641                               xcb_xv_port_t     port  /**< */)
2642 {
2643     static const xcb_protocol_request_t xcb_req = {
2644         /* count */ 2,
2645         /* ext */ &xcb_xv_id,
2646         /* opcode */ XCB_XV_QUERY_PORT_ATTRIBUTES,
2647         /* isvoid */ 0
2648     };
2649 
2650     struct iovec xcb_parts[4];
2651     xcb_xv_query_port_attributes_cookie_t xcb_ret;
2652     xcb_xv_query_port_attributes_request_t xcb_out;
2653 
2654     xcb_out.port = port;
2655 
2656     xcb_parts[2].iov_base = (char *) &xcb_out;
2657     xcb_parts[2].iov_len = sizeof(xcb_out);
2658     xcb_parts[3].iov_base = 0;
2659     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2660 
2661     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2662     return xcb_ret;
2663 }
2664 
2665 
2666 /*****************************************************************************
2667  **
2668  ** xcb_xv_query_port_attributes_cookie_t xcb_xv_query_port_attributes_unchecked
2669  **
2670  ** @param xcb_connection_t *c
2671  ** @param xcb_xv_port_t     port
2672  ** @returns xcb_xv_query_port_attributes_cookie_t
2673  **
2674  *****************************************************************************/
2675 
2676 xcb_xv_query_port_attributes_cookie_t
2677 xcb_xv_query_port_attributes_unchecked (xcb_connection_t *c  /**< */,
2678                                         xcb_xv_port_t     port  /**< */)
2679 {
2680     static const xcb_protocol_request_t xcb_req = {
2681         /* count */ 2,
2682         /* ext */ &xcb_xv_id,
2683         /* opcode */ XCB_XV_QUERY_PORT_ATTRIBUTES,
2684         /* isvoid */ 0
2685     };
2686 
2687     struct iovec xcb_parts[4];
2688     xcb_xv_query_port_attributes_cookie_t xcb_ret;
2689     xcb_xv_query_port_attributes_request_t xcb_out;
2690 
2691     xcb_out.port = port;
2692 
2693     xcb_parts[2].iov_base = (char *) &xcb_out;
2694     xcb_parts[2].iov_len = sizeof(xcb_out);
2695     xcb_parts[3].iov_base = 0;
2696     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2697 
2698     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2699     return xcb_ret;
2700 }
2701 
2702 
2703 /*****************************************************************************
2704  **
2705  ** int xcb_xv_query_port_attributes_attributes_length
2706  **
2707  ** @param const xcb_xv_query_port_attributes_reply_t *R
2708  ** @returns int
2709  **
2710  *****************************************************************************/
2711 
2712 int
2713 xcb_xv_query_port_attributes_attributes_length (const xcb_xv_query_port_attributes_reply_t *R  /**< */)
2714 {
2715     return R->num_attributes;
2716 }
2717 
2718 
2719 /*****************************************************************************
2720  **
2721  ** xcb_xv_attribute_info_iterator_t xcb_xv_query_port_attributes_attributes_iterator
2722  **
2723  ** @param const xcb_xv_query_port_attributes_reply_t *R
2724  ** @returns xcb_xv_attribute_info_iterator_t
2725  **
2726  *****************************************************************************/
2727 
2728 xcb_xv_attribute_info_iterator_t
2729 xcb_xv_query_port_attributes_attributes_iterator (const xcb_xv_query_port_attributes_reply_t *R  /**< */)
2730 {
2731     xcb_xv_attribute_info_iterator_t i;
2732     i.data = (xcb_xv_attribute_info_t *) (R + 1);
2733     i.rem = R->num_attributes;
2734     i.index = (char *) i.data - (char *) R;
2735     return i;
2736 }
2737 
2738 
2739 /*****************************************************************************
2740  **
2741  ** xcb_xv_query_port_attributes_reply_t * xcb_xv_query_port_attributes_reply
2742  **
2743  ** @param xcb_connection_t                       *c
2744  ** @param xcb_xv_query_port_attributes_cookie_t   cookie
2745  ** @param xcb_generic_error_t                   **e
2746  ** @returns xcb_xv_query_port_attributes_reply_t *
2747  **
2748  *****************************************************************************/
2749 
2750 xcb_xv_query_port_attributes_reply_t *
2751 xcb_xv_query_port_attributes_reply (xcb_connection_t                       *c  /**< */,
2752                                     xcb_xv_query_port_attributes_cookie_t   cookie  /**< */,
2753                                     xcb_generic_error_t                   **e  /**< */)
2754 {
2755     return (xcb_xv_query_port_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2756 }
2757 
2758 int
2759 xcb_xv_list_image_formats_sizeof (const void  *_buffer  /**< */)
2760 {
2761     char *xcb_tmp = (char *)_buffer;
2762     const xcb_xv_list_image_formats_reply_t *_aux = (xcb_xv_list_image_formats_reply_t *)_buffer;
2763     unsigned int xcb_buffer_len = 0;
2764     unsigned int xcb_block_len = 0;
2765     unsigned int xcb_pad = 0;
2766     unsigned int xcb_align_to;
2767 
2768 
2769     xcb_block_len += sizeof(xcb_xv_list_image_formats_reply_t);
2770     xcb_tmp += xcb_block_len;
2771     /* format */
2772     xcb_block_len += _aux->num_formats * sizeof(xcb_xv_image_format_info_t);
2773     xcb_tmp += xcb_block_len;
2774     xcb_align_to = ALIGNOF(xcb_xv_image_format_info_t);
2775     /* insert padding */
2776     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2777     xcb_buffer_len += xcb_block_len + xcb_pad;
2778     if (0 != xcb_pad) {
2779         xcb_tmp += xcb_pad;
2780         xcb_pad = 0;
2781     }
2782     xcb_block_len = 0;
2783 
2784     return xcb_buffer_len;
2785 }
2786 
2787 
2788 /*****************************************************************************
2789  **
2790  ** xcb_xv_list_image_formats_cookie_t xcb_xv_list_image_formats
2791  **
2792  ** @param xcb_connection_t *c
2793  ** @param xcb_xv_port_t     port
2794  ** @returns xcb_xv_list_image_formats_cookie_t
2795  **
2796  *****************************************************************************/
2797 
2798 xcb_xv_list_image_formats_cookie_t
2799 xcb_xv_list_image_formats (xcb_connection_t *c  /**< */,
2800                            xcb_xv_port_t     port  /**< */)
2801 {
2802     static const xcb_protocol_request_t xcb_req = {
2803         /* count */ 2,
2804         /* ext */ &xcb_xv_id,
2805         /* opcode */ XCB_XV_LIST_IMAGE_FORMATS,
2806         /* isvoid */ 0
2807     };
2808 
2809     struct iovec xcb_parts[4];
2810     xcb_xv_list_image_formats_cookie_t xcb_ret;
2811     xcb_xv_list_image_formats_request_t xcb_out;
2812 
2813     xcb_out.port = port;
2814 
2815     xcb_parts[2].iov_base = (char *) &xcb_out;
2816     xcb_parts[2].iov_len = sizeof(xcb_out);
2817     xcb_parts[3].iov_base = 0;
2818     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2819 
2820     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2821     return xcb_ret;
2822 }
2823 
2824 
2825 /*****************************************************************************
2826  **
2827  ** xcb_xv_list_image_formats_cookie_t xcb_xv_list_image_formats_unchecked
2828  **
2829  ** @param xcb_connection_t *c
2830  ** @param xcb_xv_port_t     port
2831  ** @returns xcb_xv_list_image_formats_cookie_t
2832  **
2833  *****************************************************************************/
2834 
2835 xcb_xv_list_image_formats_cookie_t
2836 xcb_xv_list_image_formats_unchecked (xcb_connection_t *c  /**< */,
2837                                      xcb_xv_port_t     port  /**< */)
2838 {
2839     static const xcb_protocol_request_t xcb_req = {
2840         /* count */ 2,
2841         /* ext */ &xcb_xv_id,
2842         /* opcode */ XCB_XV_LIST_IMAGE_FORMATS,
2843         /* isvoid */ 0
2844     };
2845 
2846     struct iovec xcb_parts[4];
2847     xcb_xv_list_image_formats_cookie_t xcb_ret;
2848     xcb_xv_list_image_formats_request_t xcb_out;
2849 
2850     xcb_out.port = port;
2851 
2852     xcb_parts[2].iov_base = (char *) &xcb_out;
2853     xcb_parts[2].iov_len = sizeof(xcb_out);
2854     xcb_parts[3].iov_base = 0;
2855     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2856 
2857     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2858     return xcb_ret;
2859 }
2860 
2861 
2862 /*****************************************************************************
2863  **
2864  ** xcb_xv_image_format_info_t * xcb_xv_list_image_formats_format
2865  **
2866  ** @param const xcb_xv_list_image_formats_reply_t *R
2867  ** @returns xcb_xv_image_format_info_t *
2868  **
2869  *****************************************************************************/
2870 
2871 xcb_xv_image_format_info_t *
2872 xcb_xv_list_image_formats_format (const xcb_xv_list_image_formats_reply_t *R  /**< */)
2873 {
2874     return (xcb_xv_image_format_info_t *) (R + 1);
2875 }
2876 
2877 
2878 /*****************************************************************************
2879  **
2880  ** int xcb_xv_list_image_formats_format_length
2881  **
2882  ** @param const xcb_xv_list_image_formats_reply_t *R
2883  ** @returns int
2884  **
2885  *****************************************************************************/
2886 
2887 int
2888 xcb_xv_list_image_formats_format_length (const xcb_xv_list_image_formats_reply_t *R  /**< */)
2889 {
2890     return R->num_formats;
2891 }
2892 
2893 
2894 /*****************************************************************************
2895  **
2896  ** xcb_xv_image_format_info_iterator_t xcb_xv_list_image_formats_format_iterator
2897  **
2898  ** @param const xcb_xv_list_image_formats_reply_t *R
2899  ** @returns xcb_xv_image_format_info_iterator_t
2900  **
2901  *****************************************************************************/
2902 
2903 xcb_xv_image_format_info_iterator_t
2904 xcb_xv_list_image_formats_format_iterator (const xcb_xv_list_image_formats_reply_t *R  /**< */)
2905 {
2906     xcb_xv_image_format_info_iterator_t i;
2907     i.data = (xcb_xv_image_format_info_t *) (R + 1);
2908     i.rem = R->num_formats;
2909     i.index = (char *) i.data - (char *) R;
2910     return i;
2911 }
2912 
2913 
2914 /*****************************************************************************
2915  **
2916  ** xcb_xv_list_image_formats_reply_t * xcb_xv_list_image_formats_reply
2917  **
2918  ** @param xcb_connection_t                    *c
2919  ** @param xcb_xv_list_image_formats_cookie_t   cookie
2920  ** @param xcb_generic_error_t                **e
2921  ** @returns xcb_xv_list_image_formats_reply_t *
2922  **
2923  *****************************************************************************/
2924 
2925 xcb_xv_list_image_formats_reply_t *
2926 xcb_xv_list_image_formats_reply (xcb_connection_t                    *c  /**< */,
2927                                  xcb_xv_list_image_formats_cookie_t   cookie  /**< */,
2928                                  xcb_generic_error_t                **e  /**< */)
2929 {
2930     return (xcb_xv_list_image_formats_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2931 }
2932 
2933 int
2934 xcb_xv_query_image_attributes_sizeof (const void  *_buffer  /**< */)
2935 {
2936     char *xcb_tmp = (char *)_buffer;
2937     const xcb_xv_query_image_attributes_reply_t *_aux = (xcb_xv_query_image_attributes_reply_t *)_buffer;
2938     unsigned int xcb_buffer_len = 0;
2939     unsigned int xcb_block_len = 0;
2940     unsigned int xcb_pad = 0;
2941     unsigned int xcb_align_to;
2942 
2943 
2944     xcb_block_len += sizeof(xcb_xv_query_image_attributes_reply_t);
2945     xcb_tmp += xcb_block_len;
2946     /* pitches */
2947     xcb_block_len += _aux->num_planes * sizeof(uint32_t);
2948     xcb_tmp += xcb_block_len;
2949     xcb_align_to = ALIGNOF(uint32_t);
2950     /* insert padding */
2951     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2952     xcb_buffer_len += xcb_block_len + xcb_pad;
2953     if (0 != xcb_pad) {
2954         xcb_tmp += xcb_pad;
2955         xcb_pad = 0;
2956     }
2957     xcb_block_len = 0;
2958     /* offsets */
2959     xcb_block_len += _aux->num_planes * sizeof(uint32_t);
2960     xcb_tmp += xcb_block_len;
2961     xcb_align_to = ALIGNOF(uint32_t);
2962     /* insert padding */
2963     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2964     xcb_buffer_len += xcb_block_len + xcb_pad;
2965     if (0 != xcb_pad) {
2966         xcb_tmp += xcb_pad;
2967         xcb_pad = 0;
2968     }
2969     xcb_block_len = 0;
2970 
2971     return xcb_buffer_len;
2972 }
2973 
2974 
2975 /*****************************************************************************
2976  **
2977  ** xcb_xv_query_image_attributes_cookie_t xcb_xv_query_image_attributes
2978  **
2979  ** @param xcb_connection_t *c
2980  ** @param xcb_xv_port_t     port
2981  ** @param uint32_t          id
2982  ** @param uint16_t          width
2983  ** @param uint16_t          height
2984  ** @returns xcb_xv_query_image_attributes_cookie_t
2985  **
2986  *****************************************************************************/
2987 
2988 xcb_xv_query_image_attributes_cookie_t
2989 xcb_xv_query_image_attributes (xcb_connection_t *c  /**< */,
2990                                xcb_xv_port_t     port  /**< */,
2991                                uint32_t          id  /**< */,
2992                                uint16_t          width  /**< */,
2993                                uint16_t          height  /**< */)
2994 {
2995     static const xcb_protocol_request_t xcb_req = {
2996         /* count */ 2,
2997         /* ext */ &xcb_xv_id,
2998         /* opcode */ XCB_XV_QUERY_IMAGE_ATTRIBUTES,
2999         /* isvoid */ 0
3000     };
3001 
3002     struct iovec xcb_parts[4];
3003     xcb_xv_query_image_attributes_cookie_t xcb_ret;
3004     xcb_xv_query_image_attributes_request_t xcb_out;
3005 
3006     xcb_out.port = port;
3007     xcb_out.id = id;
3008     xcb_out.width = width;
3009     xcb_out.height = height;
3010 
3011     xcb_parts[2].iov_base = (char *) &xcb_out;
3012     xcb_parts[2].iov_len = sizeof(xcb_out);
3013     xcb_parts[3].iov_base = 0;
3014     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3015 
3016     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3017     return xcb_ret;
3018 }
3019 
3020 
3021 /*****************************************************************************
3022  **
3023  ** xcb_xv_query_image_attributes_cookie_t xcb_xv_query_image_attributes_unchecked
3024  **
3025  ** @param xcb_connection_t *c
3026  ** @param xcb_xv_port_t     port
3027  ** @param uint32_t          id
3028  ** @param uint16_t          width
3029  ** @param uint16_t          height
3030  ** @returns xcb_xv_query_image_attributes_cookie_t
3031  **
3032  *****************************************************************************/
3033 
3034 xcb_xv_query_image_attributes_cookie_t
3035 xcb_xv_query_image_attributes_unchecked (xcb_connection_t *c  /**< */,
3036                                          xcb_xv_port_t     port  /**< */,
3037                                          uint32_t          id  /**< */,
3038                                          uint16_t          width  /**< */,
3039                                          uint16_t          height  /**< */)
3040 {
3041     static const xcb_protocol_request_t xcb_req = {
3042         /* count */ 2,
3043         /* ext */ &xcb_xv_id,
3044         /* opcode */ XCB_XV_QUERY_IMAGE_ATTRIBUTES,
3045         /* isvoid */ 0
3046     };
3047 
3048     struct iovec xcb_parts[4];
3049     xcb_xv_query_image_attributes_cookie_t xcb_ret;
3050     xcb_xv_query_image_attributes_request_t xcb_out;
3051 
3052     xcb_out.port = port;
3053     xcb_out.id = id;
3054     xcb_out.width = width;
3055     xcb_out.height = height;
3056 
3057     xcb_parts[2].iov_base = (char *) &xcb_out;
3058     xcb_parts[2].iov_len = sizeof(xcb_out);
3059     xcb_parts[3].iov_base = 0;
3060     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3061 
3062     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3063     return xcb_ret;
3064 }
3065 
3066 
3067 /*****************************************************************************
3068  **
3069  ** uint32_t * xcb_xv_query_image_attributes_pitches
3070  **
3071  ** @param const xcb_xv_query_image_attributes_reply_t *R
3072  ** @returns uint32_t *
3073  **
3074  *****************************************************************************/
3075 
3076 uint32_t *
3077 xcb_xv_query_image_attributes_pitches (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
3078 {
3079     return (uint32_t *) (R + 1);
3080 }
3081 
3082 
3083 /*****************************************************************************
3084  **
3085  ** int xcb_xv_query_image_attributes_pitches_length
3086  **
3087  ** @param const xcb_xv_query_image_attributes_reply_t *R
3088  ** @returns int
3089  **
3090  *****************************************************************************/
3091 
3092 int
3093 xcb_xv_query_image_attributes_pitches_length (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
3094 {
3095     return R->num_planes;
3096 }
3097 
3098 
3099 /*****************************************************************************
3100  **
3101  ** xcb_generic_iterator_t xcb_xv_query_image_attributes_pitches_end
3102  **
3103  ** @param const xcb_xv_query_image_attributes_reply_t *R
3104  ** @returns xcb_generic_iterator_t
3105  **
3106  *****************************************************************************/
3107 
3108 xcb_generic_iterator_t
3109 xcb_xv_query_image_attributes_pitches_end (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
3110 {
3111     xcb_generic_iterator_t i;
3112     i.data = ((uint32_t *) (R + 1)) + (R->num_planes);
3113     i.rem = 0;
3114     i.index = (char *) i.data - (char *) R;
3115     return i;
3116 }
3117 
3118 
3119 /*****************************************************************************
3120  **
3121  ** uint32_t * xcb_xv_query_image_attributes_offsets
3122  **
3123  ** @param const xcb_xv_query_image_attributes_reply_t *R
3124  ** @returns uint32_t *
3125  **
3126  *****************************************************************************/
3127 
3128 uint32_t *
3129 xcb_xv_query_image_attributes_offsets (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
3130 {
3131     xcb_generic_iterator_t prev = xcb_xv_query_image_attributes_pitches_end(R);
3132     return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
3133 }
3134 
3135 
3136 /*****************************************************************************
3137  **
3138  ** int xcb_xv_query_image_attributes_offsets_length
3139  **
3140  ** @param const xcb_xv_query_image_attributes_reply_t *R
3141  ** @returns int
3142  **
3143  *****************************************************************************/
3144 
3145 int
3146 xcb_xv_query_image_attributes_offsets_length (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
3147 {
3148     return R->num_planes;
3149 }
3150 
3151 
3152 /*****************************************************************************
3153  **
3154  ** xcb_generic_iterator_t xcb_xv_query_image_attributes_offsets_end
3155  **
3156  ** @param const xcb_xv_query_image_attributes_reply_t *R
3157  ** @returns xcb_generic_iterator_t
3158  **
3159  *****************************************************************************/
3160 
3161 xcb_generic_iterator_t
3162 xcb_xv_query_image_attributes_offsets_end (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
3163 {
3164     xcb_generic_iterator_t i;
3165     xcb_generic_iterator_t child = xcb_xv_query_image_attributes_pitches_end(R);
3166     i.data = ((uint32_t *) child.data) + (R->num_planes);
3167     i.rem = 0;
3168     i.index = (char *) i.data - (char *) R;
3169     return i;
3170 }
3171 
3172 
3173 /*****************************************************************************
3174  **
3175  ** xcb_xv_query_image_attributes_reply_t * xcb_xv_query_image_attributes_reply
3176  **
3177  ** @param xcb_connection_t                        *c
3178  ** @param xcb_xv_query_image_attributes_cookie_t   cookie
3179  ** @param xcb_generic_error_t                    **e
3180  ** @returns xcb_xv_query_image_attributes_reply_t *
3181  **
3182  *****************************************************************************/
3183 
3184 xcb_xv_query_image_attributes_reply_t *
3185 xcb_xv_query_image_attributes_reply (xcb_connection_t                        *c  /**< */,
3186                                      xcb_xv_query_image_attributes_cookie_t   cookie  /**< */,
3187                                      xcb_generic_error_t                    **e  /**< */)
3188 {
3189     return (xcb_xv_query_image_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3190 }
3191 
3192 int
3193 xcb_xv_put_image_sizeof (const void  *_buffer  /**< */,
3194                          uint32_t     data_len  /**< */)
3195 {
3196     char *xcb_tmp = (char *)_buffer;
3197     unsigned int xcb_buffer_len = 0;
3198     unsigned int xcb_block_len = 0;
3199     unsigned int xcb_pad = 0;
3200     unsigned int xcb_align_to;
3201 
3202 
3203     xcb_block_len += sizeof(xcb_xv_put_image_request_t);
3204     xcb_tmp += xcb_block_len;
3205     /* data */
3206     xcb_block_len += data_len * sizeof(uint8_t);
3207     xcb_tmp += xcb_block_len;
3208     xcb_align_to = ALIGNOF(uint8_t);
3209     /* insert padding */
3210     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3211     xcb_buffer_len += xcb_block_len + xcb_pad;
3212     if (0 != xcb_pad) {
3213         xcb_tmp += xcb_pad;
3214         xcb_pad = 0;
3215     }
3216     xcb_block_len = 0;
3217 
3218     return xcb_buffer_len;
3219 }
3220 
3221 
3222 /*****************************************************************************
3223  **
3224  ** xcb_void_cookie_t xcb_xv_put_image_checked
3225  **
3226  ** @param xcb_connection_t *c
3227  ** @param xcb_xv_port_t     port
3228  ** @param xcb_drawable_t    drawable
3229  ** @param xcb_gcontext_t    gc
3230  ** @param uint32_t          id
3231  ** @param int16_t           src_x
3232  ** @param int16_t           src_y
3233  ** @param uint16_t          src_w
3234  ** @param uint16_t          src_h
3235  ** @param int16_t           drw_x
3236  ** @param int16_t           drw_y
3237  ** @param uint16_t          drw_w
3238  ** @param uint16_t          drw_h
3239  ** @param uint16_t          width
3240  ** @param uint16_t          height
3241  ** @param uint32_t          data_len
3242  ** @param const uint8_t    *data
3243  ** @returns xcb_void_cookie_t
3244  **
3245  *****************************************************************************/
3246 
3247 xcb_void_cookie_t
3248 xcb_xv_put_image_checked (xcb_connection_t *c  /**< */,
3249                           xcb_xv_port_t     port  /**< */,
3250                           xcb_drawable_t    drawable  /**< */,
3251                           xcb_gcontext_t    gc  /**< */,
3252                           uint32_t          id  /**< */,
3253                           int16_t           src_x  /**< */,
3254                           int16_t           src_y  /**< */,
3255                           uint16_t          src_w  /**< */,
3256                           uint16_t          src_h  /**< */,
3257                           int16_t           drw_x  /**< */,
3258                           int16_t           drw_y  /**< */,
3259                           uint16_t          drw_w  /**< */,
3260                           uint16_t          drw_h  /**< */,
3261                           uint16_t          width  /**< */,
3262                           uint16_t          height  /**< */,
3263                           uint32_t          data_len  /**< */,
3264                           const uint8_t    *data  /**< */)
3265 {
3266     static const xcb_protocol_request_t xcb_req = {
3267         /* count */ 4,
3268         /* ext */ &xcb_xv_id,
3269         /* opcode */ XCB_XV_PUT_IMAGE,
3270         /* isvoid */ 1
3271     };
3272 
3273     struct iovec xcb_parts[6];
3274     xcb_void_cookie_t xcb_ret;
3275     xcb_xv_put_image_request_t xcb_out;
3276 
3277     xcb_out.port = port;
3278     xcb_out.drawable = drawable;
3279     xcb_out.gc = gc;
3280     xcb_out.id = id;
3281     xcb_out.src_x = src_x;
3282     xcb_out.src_y = src_y;
3283     xcb_out.src_w = src_w;
3284     xcb_out.src_h = src_h;
3285     xcb_out.drw_x = drw_x;
3286     xcb_out.drw_y = drw_y;
3287     xcb_out.drw_w = drw_w;
3288     xcb_out.drw_h = drw_h;
3289     xcb_out.width = width;
3290     xcb_out.height = height;
3291 
3292     xcb_parts[2].iov_base = (char *) &xcb_out;
3293     xcb_parts[2].iov_len = sizeof(xcb_out);
3294     xcb_parts[3].iov_base = 0;
3295     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3296     /* uint8_t data */
3297     xcb_parts[4].iov_base = (char *) data;
3298     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
3299     xcb_parts[5].iov_base = 0;
3300     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3301 
3302     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3303     return xcb_ret;
3304 }
3305 
3306 
3307 /*****************************************************************************
3308  **
3309  ** xcb_void_cookie_t xcb_xv_put_image
3310  **
3311  ** @param xcb_connection_t *c
3312  ** @param xcb_xv_port_t     port
3313  ** @param xcb_drawable_t    drawable
3314  ** @param xcb_gcontext_t    gc
3315  ** @param uint32_t          id
3316  ** @param int16_t           src_x
3317  ** @param int16_t           src_y
3318  ** @param uint16_t          src_w
3319  ** @param uint16_t          src_h
3320  ** @param int16_t           drw_x
3321  ** @param int16_t           drw_y
3322  ** @param uint16_t          drw_w
3323  ** @param uint16_t          drw_h
3324  ** @param uint16_t          width
3325  ** @param uint16_t          height
3326  ** @param uint32_t          data_len
3327  ** @param const uint8_t    *data
3328  ** @returns xcb_void_cookie_t
3329  **
3330  *****************************************************************************/
3331 
3332 xcb_void_cookie_t
3333 xcb_xv_put_image (xcb_connection_t *c  /**< */,
3334                   xcb_xv_port_t     port  /**< */,
3335                   xcb_drawable_t    drawable  /**< */,
3336                   xcb_gcontext_t    gc  /**< */,
3337                   uint32_t          id  /**< */,
3338                   int16_t           src_x  /**< */,
3339                   int16_t           src_y  /**< */,
3340                   uint16_t          src_w  /**< */,
3341                   uint16_t          src_h  /**< */,
3342                   int16_t           drw_x  /**< */,
3343                   int16_t           drw_y  /**< */,
3344                   uint16_t          drw_w  /**< */,
3345                   uint16_t          drw_h  /**< */,
3346                   uint16_t          width  /**< */,
3347                   uint16_t          height  /**< */,
3348                   uint32_t          data_len  /**< */,
3349                   const uint8_t    *data  /**< */)
3350 {
3351     static const xcb_protocol_request_t xcb_req = {
3352         /* count */ 4,
3353         /* ext */ &xcb_xv_id,
3354         /* opcode */ XCB_XV_PUT_IMAGE,
3355         /* isvoid */ 1
3356     };
3357 
3358     struct iovec xcb_parts[6];
3359     xcb_void_cookie_t xcb_ret;
3360     xcb_xv_put_image_request_t xcb_out;
3361 
3362     xcb_out.port = port;
3363     xcb_out.drawable = drawable;
3364     xcb_out.gc = gc;
3365     xcb_out.id = id;
3366     xcb_out.src_x = src_x;
3367     xcb_out.src_y = src_y;
3368     xcb_out.src_w = src_w;
3369     xcb_out.src_h = src_h;
3370     xcb_out.drw_x = drw_x;
3371     xcb_out.drw_y = drw_y;
3372     xcb_out.drw_w = drw_w;
3373     xcb_out.drw_h = drw_h;
3374     xcb_out.width = width;
3375     xcb_out.height = height;
3376 
3377     xcb_parts[2].iov_base = (char *) &xcb_out;
3378     xcb_parts[2].iov_len = sizeof(xcb_out);
3379     xcb_parts[3].iov_base = 0;
3380     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3381     /* uint8_t data */
3382     xcb_parts[4].iov_base = (char *) data;
3383     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
3384     xcb_parts[5].iov_base = 0;
3385     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3386 
3387     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3388     return xcb_ret;
3389 }
3390 
3391 
3392 /*****************************************************************************
3393  **
3394  ** xcb_void_cookie_t xcb_xv_shm_put_image_checked
3395  **
3396  ** @param xcb_connection_t *c
3397  ** @param xcb_xv_port_t     port
3398  ** @param xcb_drawable_t    drawable
3399  ** @param xcb_gcontext_t    gc
3400  ** @param xcb_shm_seg_t     shmseg
3401  ** @param uint32_t          id
3402  ** @param uint32_t          offset
3403  ** @param int16_t           src_x
3404  ** @param int16_t           src_y
3405  ** @param uint16_t          src_w
3406  ** @param uint16_t          src_h
3407  ** @param int16_t           drw_x
3408  ** @param int16_t           drw_y
3409  ** @param uint16_t          drw_w
3410  ** @param uint16_t          drw_h
3411  ** @param uint16_t          width
3412  ** @param uint16_t          height
3413  ** @param uint8_t           send_event
3414  ** @returns xcb_void_cookie_t
3415  **
3416  *****************************************************************************/
3417 
3418 xcb_void_cookie_t
3419 xcb_xv_shm_put_image_checked (xcb_connection_t *c  /**< */,
3420                               xcb_xv_port_t     port  /**< */,
3421                               xcb_drawable_t    drawable  /**< */,
3422                               xcb_gcontext_t    gc  /**< */,
3423                               xcb_shm_seg_t     shmseg  /**< */,
3424                               uint32_t          id  /**< */,
3425                               uint32_t          offset  /**< */,
3426                               int16_t           src_x  /**< */,
3427                               int16_t           src_y  /**< */,
3428                               uint16_t          src_w  /**< */,
3429                               uint16_t          src_h  /**< */,
3430                               int16_t           drw_x  /**< */,
3431                               int16_t           drw_y  /**< */,
3432                               uint16_t          drw_w  /**< */,
3433                               uint16_t          drw_h  /**< */,
3434                               uint16_t          width  /**< */,
3435                               uint16_t          height  /**< */,
3436                               uint8_t           send_event  /**< */)
3437 {
3438     static const xcb_protocol_request_t xcb_req = {
3439         /* count */ 2,
3440         /* ext */ &xcb_xv_id,
3441         /* opcode */ XCB_XV_SHM_PUT_IMAGE,
3442         /* isvoid */ 1
3443     };
3444 
3445     struct iovec xcb_parts[4];
3446     xcb_void_cookie_t xcb_ret;
3447     xcb_xv_shm_put_image_request_t xcb_out;
3448 
3449     xcb_out.port = port;
3450     xcb_out.drawable = drawable;
3451     xcb_out.gc = gc;
3452     xcb_out.shmseg = shmseg;
3453     xcb_out.id = id;
3454     xcb_out.offset = offset;
3455     xcb_out.src_x = src_x;
3456     xcb_out.src_y = src_y;
3457     xcb_out.src_w = src_w;
3458     xcb_out.src_h = src_h;
3459     xcb_out.drw_x = drw_x;
3460     xcb_out.drw_y = drw_y;
3461     xcb_out.drw_w = drw_w;
3462     xcb_out.drw_h = drw_h;
3463     xcb_out.width = width;
3464     xcb_out.height = height;
3465     xcb_out.send_event = send_event;
3466     memset(xcb_out.pad0, 0, 3);
3467 
3468     xcb_parts[2].iov_base = (char *) &xcb_out;
3469     xcb_parts[2].iov_len = sizeof(xcb_out);
3470     xcb_parts[3].iov_base = 0;
3471     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3472 
3473     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3474     return xcb_ret;
3475 }
3476 
3477 
3478 /*****************************************************************************
3479  **
3480  ** xcb_void_cookie_t xcb_xv_shm_put_image
3481  **
3482  ** @param xcb_connection_t *c
3483  ** @param xcb_xv_port_t     port
3484  ** @param xcb_drawable_t    drawable
3485  ** @param xcb_gcontext_t    gc
3486  ** @param xcb_shm_seg_t     shmseg
3487  ** @param uint32_t          id
3488  ** @param uint32_t          offset
3489  ** @param int16_t           src_x
3490  ** @param int16_t           src_y
3491  ** @param uint16_t          src_w
3492  ** @param uint16_t          src_h
3493  ** @param int16_t           drw_x
3494  ** @param int16_t           drw_y
3495  ** @param uint16_t          drw_w
3496  ** @param uint16_t          drw_h
3497  ** @param uint16_t          width
3498  ** @param uint16_t          height
3499  ** @param uint8_t           send_event
3500  ** @returns xcb_void_cookie_t
3501  **
3502  *****************************************************************************/
3503 
3504 xcb_void_cookie_t
3505 xcb_xv_shm_put_image (xcb_connection_t *c  /**< */,
3506                       xcb_xv_port_t     port  /**< */,
3507                       xcb_drawable_t    drawable  /**< */,
3508                       xcb_gcontext_t    gc  /**< */,
3509                       xcb_shm_seg_t     shmseg  /**< */,
3510                       uint32_t          id  /**< */,
3511                       uint32_t          offset  /**< */,
3512                       int16_t           src_x  /**< */,
3513                       int16_t           src_y  /**< */,
3514                       uint16_t          src_w  /**< */,
3515                       uint16_t          src_h  /**< */,
3516                       int16_t           drw_x  /**< */,
3517                       int16_t           drw_y  /**< */,
3518                       uint16_t          drw_w  /**< */,
3519                       uint16_t          drw_h  /**< */,
3520                       uint16_t          width  /**< */,
3521                       uint16_t          height  /**< */,
3522                       uint8_t           send_event  /**< */)
3523 {
3524     static const xcb_protocol_request_t xcb_req = {
3525         /* count */ 2,
3526         /* ext */ &xcb_xv_id,
3527         /* opcode */ XCB_XV_SHM_PUT_IMAGE,
3528         /* isvoid */ 1
3529     };
3530 
3531     struct iovec xcb_parts[4];
3532     xcb_void_cookie_t xcb_ret;
3533     xcb_xv_shm_put_image_request_t xcb_out;
3534 
3535     xcb_out.port = port;
3536     xcb_out.drawable = drawable;
3537     xcb_out.gc = gc;
3538     xcb_out.shmseg = shmseg;
3539     xcb_out.id = id;
3540     xcb_out.offset = offset;
3541     xcb_out.src_x = src_x;
3542     xcb_out.src_y = src_y;
3543     xcb_out.src_w = src_w;
3544     xcb_out.src_h = src_h;
3545     xcb_out.drw_x = drw_x;
3546     xcb_out.drw_y = drw_y;
3547     xcb_out.drw_w = drw_w;
3548     xcb_out.drw_h = drw_h;
3549     xcb_out.width = width;
3550     xcb_out.height = height;
3551     xcb_out.send_event = send_event;
3552     memset(xcb_out.pad0, 0, 3);
3553 
3554     xcb_parts[2].iov_base = (char *) &xcb_out;
3555     xcb_parts[2].iov_len = sizeof(xcb_out);
3556     xcb_parts[3].iov_base = 0;
3557     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3558 
3559     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3560     return xcb_ret;
3561 }
3562 
3563