xref: /minix3/external/mit/xorg/lib/libxcb/files/xv.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1971bb1a5SLionel Sambuc /*
2971bb1a5SLionel Sambuc  * This file generated automatically from xv.xml by c_client.py.
3971bb1a5SLionel Sambuc  * Edit at your peril.
4971bb1a5SLionel Sambuc  */
5971bb1a5SLionel Sambuc 
6971bb1a5SLionel Sambuc #ifdef HAVE_CONFIG_H
7971bb1a5SLionel Sambuc #include "config.h"
8971bb1a5SLionel Sambuc #endif
9971bb1a5SLionel Sambuc #include <stdlib.h>
10971bb1a5SLionel Sambuc #include <string.h>
11971bb1a5SLionel Sambuc #include <assert.h>
12971bb1a5SLionel Sambuc #include <stddef.h>  /* for offsetof() */
13971bb1a5SLionel Sambuc #include "xcbext.h"
14971bb1a5SLionel Sambuc #include "xv.h"
15971bb1a5SLionel Sambuc 
16971bb1a5SLionel Sambuc #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17971bb1a5SLionel Sambuc #include "xproto.h"
18971bb1a5SLionel Sambuc #include "shm.h"
19971bb1a5SLionel Sambuc 
20971bb1a5SLionel Sambuc xcb_extension_t xcb_xv_id = { "XVideo", 0 };
21971bb1a5SLionel Sambuc 
22971bb1a5SLionel Sambuc void
xcb_xv_port_next(xcb_xv_port_iterator_t * i)23971bb1a5SLionel Sambuc xcb_xv_port_next (xcb_xv_port_iterator_t *i  /**< */)
24971bb1a5SLionel Sambuc {
25971bb1a5SLionel Sambuc     --i->rem;
26971bb1a5SLionel Sambuc     ++i->data;
27971bb1a5SLionel Sambuc     i->index += sizeof(xcb_xv_port_t);
28971bb1a5SLionel Sambuc }
29971bb1a5SLionel Sambuc 
30971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_port_end(xcb_xv_port_iterator_t i)31971bb1a5SLionel Sambuc xcb_xv_port_end (xcb_xv_port_iterator_t i  /**< */)
32971bb1a5SLionel Sambuc {
33971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
34971bb1a5SLionel Sambuc     ret.data = i.data + i.rem;
35971bb1a5SLionel Sambuc     ret.index = i.index + ((char *) ret.data - (char *) i.data);
36971bb1a5SLionel Sambuc     ret.rem = 0;
37971bb1a5SLionel Sambuc     return ret;
38971bb1a5SLionel Sambuc }
39971bb1a5SLionel Sambuc 
40971bb1a5SLionel Sambuc void
xcb_xv_encoding_next(xcb_xv_encoding_iterator_t * i)41971bb1a5SLionel Sambuc xcb_xv_encoding_next (xcb_xv_encoding_iterator_t *i  /**< */)
42971bb1a5SLionel Sambuc {
43971bb1a5SLionel Sambuc     --i->rem;
44971bb1a5SLionel Sambuc     ++i->data;
45971bb1a5SLionel Sambuc     i->index += sizeof(xcb_xv_encoding_t);
46971bb1a5SLionel Sambuc }
47971bb1a5SLionel Sambuc 
48971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_encoding_end(xcb_xv_encoding_iterator_t i)49971bb1a5SLionel Sambuc xcb_xv_encoding_end (xcb_xv_encoding_iterator_t i  /**< */)
50971bb1a5SLionel Sambuc {
51971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
52971bb1a5SLionel Sambuc     ret.data = i.data + i.rem;
53971bb1a5SLionel Sambuc     ret.index = i.index + ((char *) ret.data - (char *) i.data);
54971bb1a5SLionel Sambuc     ret.rem = 0;
55971bb1a5SLionel Sambuc     return ret;
56971bb1a5SLionel Sambuc }
57971bb1a5SLionel Sambuc 
58971bb1a5SLionel Sambuc void
xcb_xv_rational_next(xcb_xv_rational_iterator_t * i)59971bb1a5SLionel Sambuc xcb_xv_rational_next (xcb_xv_rational_iterator_t *i  /**< */)
60971bb1a5SLionel Sambuc {
61971bb1a5SLionel Sambuc     --i->rem;
62971bb1a5SLionel Sambuc     ++i->data;
63971bb1a5SLionel Sambuc     i->index += sizeof(xcb_xv_rational_t);
64971bb1a5SLionel Sambuc }
65971bb1a5SLionel Sambuc 
66971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_rational_end(xcb_xv_rational_iterator_t i)67971bb1a5SLionel Sambuc xcb_xv_rational_end (xcb_xv_rational_iterator_t i  /**< */)
68971bb1a5SLionel Sambuc {
69971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
70971bb1a5SLionel Sambuc     ret.data = i.data + i.rem;
71971bb1a5SLionel Sambuc     ret.index = i.index + ((char *) ret.data - (char *) i.data);
72971bb1a5SLionel Sambuc     ret.rem = 0;
73971bb1a5SLionel Sambuc     return ret;
74971bb1a5SLionel Sambuc }
75971bb1a5SLionel Sambuc 
76971bb1a5SLionel Sambuc void
xcb_xv_format_next(xcb_xv_format_iterator_t * i)77971bb1a5SLionel Sambuc xcb_xv_format_next (xcb_xv_format_iterator_t *i  /**< */)
78971bb1a5SLionel Sambuc {
79971bb1a5SLionel Sambuc     --i->rem;
80971bb1a5SLionel Sambuc     ++i->data;
81971bb1a5SLionel Sambuc     i->index += sizeof(xcb_xv_format_t);
82971bb1a5SLionel Sambuc }
83971bb1a5SLionel Sambuc 
84971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_format_end(xcb_xv_format_iterator_t i)85971bb1a5SLionel Sambuc xcb_xv_format_end (xcb_xv_format_iterator_t i  /**< */)
86971bb1a5SLionel Sambuc {
87971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
88971bb1a5SLionel Sambuc     ret.data = i.data + i.rem;
89971bb1a5SLionel Sambuc     ret.index = i.index + ((char *) ret.data - (char *) i.data);
90971bb1a5SLionel Sambuc     ret.rem = 0;
91971bb1a5SLionel Sambuc     return ret;
92971bb1a5SLionel Sambuc }
93971bb1a5SLionel Sambuc 
94971bb1a5SLionel Sambuc int
xcb_xv_adaptor_info_sizeof(const void * _buffer)95971bb1a5SLionel Sambuc xcb_xv_adaptor_info_sizeof (const void  *_buffer  /**< */)
96971bb1a5SLionel Sambuc {
97971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
98971bb1a5SLionel Sambuc     const xcb_xv_adaptor_info_t *_aux = (xcb_xv_adaptor_info_t *)_buffer;
99971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
100971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
101971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
102*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
103971bb1a5SLionel Sambuc 
104971bb1a5SLionel Sambuc 
105971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_adaptor_info_t);
106971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
107*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
108*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
109971bb1a5SLionel Sambuc     /* name */
110971bb1a5SLionel Sambuc     xcb_block_len += _aux->name_size * sizeof(char);
111971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
112971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(char);
113*0a6a1f1dSLionel Sambuc     xcb_align_to = 4;
114*0a6a1f1dSLionel Sambuc     /* insert padding */
115*0a6a1f1dSLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
116*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
117*0a6a1f1dSLionel Sambuc     if (0 != xcb_pad) {
118*0a6a1f1dSLionel Sambuc         xcb_tmp += xcb_pad;
119*0a6a1f1dSLionel Sambuc         xcb_pad = 0;
120*0a6a1f1dSLionel Sambuc     }
121*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
122971bb1a5SLionel Sambuc     /* insert padding */
123971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
124971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
125971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
126971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
127971bb1a5SLionel Sambuc         xcb_pad = 0;
128971bb1a5SLionel Sambuc     }
129971bb1a5SLionel Sambuc     xcb_block_len = 0;
130971bb1a5SLionel Sambuc     /* formats */
131971bb1a5SLionel Sambuc     xcb_block_len += _aux->num_formats * sizeof(xcb_xv_format_t);
132971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
133971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(xcb_xv_format_t);
134971bb1a5SLionel Sambuc     /* insert padding */
135971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
136971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
137971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
138971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
139971bb1a5SLionel Sambuc         xcb_pad = 0;
140971bb1a5SLionel Sambuc     }
141971bb1a5SLionel Sambuc     xcb_block_len = 0;
142971bb1a5SLionel Sambuc 
143971bb1a5SLionel Sambuc     return xcb_buffer_len;
144971bb1a5SLionel Sambuc }
145971bb1a5SLionel Sambuc 
146971bb1a5SLionel Sambuc char *
xcb_xv_adaptor_info_name(const xcb_xv_adaptor_info_t * R)147971bb1a5SLionel Sambuc xcb_xv_adaptor_info_name (const xcb_xv_adaptor_info_t *R  /**< */)
148971bb1a5SLionel Sambuc {
149971bb1a5SLionel Sambuc     return (char *) (R + 1);
150971bb1a5SLionel Sambuc }
151971bb1a5SLionel Sambuc 
152971bb1a5SLionel Sambuc int
xcb_xv_adaptor_info_name_length(const xcb_xv_adaptor_info_t * R)153971bb1a5SLionel Sambuc xcb_xv_adaptor_info_name_length (const xcb_xv_adaptor_info_t *R  /**< */)
154971bb1a5SLionel Sambuc {
155971bb1a5SLionel Sambuc     return R->name_size;
156971bb1a5SLionel Sambuc }
157971bb1a5SLionel Sambuc 
158971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_adaptor_info_name_end(const xcb_xv_adaptor_info_t * R)159971bb1a5SLionel Sambuc xcb_xv_adaptor_info_name_end (const xcb_xv_adaptor_info_t *R  /**< */)
160971bb1a5SLionel Sambuc {
161971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
162971bb1a5SLionel Sambuc     i.data = ((char *) (R + 1)) + (R->name_size);
163971bb1a5SLionel Sambuc     i.rem = 0;
164971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
165971bb1a5SLionel Sambuc     return i;
166971bb1a5SLionel Sambuc }
167971bb1a5SLionel Sambuc 
168971bb1a5SLionel Sambuc xcb_xv_format_t *
xcb_xv_adaptor_info_formats(const xcb_xv_adaptor_info_t * R)169971bb1a5SLionel Sambuc xcb_xv_adaptor_info_formats (const xcb_xv_adaptor_info_t *R  /**< */)
170971bb1a5SLionel Sambuc {
171971bb1a5SLionel Sambuc     xcb_generic_iterator_t prev = xcb_xv_adaptor_info_name_end(R);
172*0a6a1f1dSLionel Sambuc     return (xcb_xv_format_t *) ((char *) prev.data + ((-prev.index) & (4 - 1)) + 0);
173971bb1a5SLionel Sambuc }
174971bb1a5SLionel Sambuc 
175971bb1a5SLionel Sambuc int
xcb_xv_adaptor_info_formats_length(const xcb_xv_adaptor_info_t * R)176971bb1a5SLionel Sambuc xcb_xv_adaptor_info_formats_length (const xcb_xv_adaptor_info_t *R  /**< */)
177971bb1a5SLionel Sambuc {
178971bb1a5SLionel Sambuc     return R->num_formats;
179971bb1a5SLionel Sambuc }
180971bb1a5SLionel Sambuc 
181971bb1a5SLionel Sambuc xcb_xv_format_iterator_t
xcb_xv_adaptor_info_formats_iterator(const xcb_xv_adaptor_info_t * R)182971bb1a5SLionel Sambuc xcb_xv_adaptor_info_formats_iterator (const xcb_xv_adaptor_info_t *R  /**< */)
183971bb1a5SLionel Sambuc {
184971bb1a5SLionel Sambuc     xcb_xv_format_iterator_t i;
185971bb1a5SLionel Sambuc     xcb_generic_iterator_t prev = xcb_xv_adaptor_info_name_end(R);
186*0a6a1f1dSLionel Sambuc     i.data = (xcb_xv_format_t *) ((char *) prev.data + ((-prev.index) & (4 - 1)));
187971bb1a5SLionel Sambuc     i.rem = R->num_formats;
188971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
189971bb1a5SLionel Sambuc     return i;
190971bb1a5SLionel Sambuc }
191971bb1a5SLionel Sambuc 
192971bb1a5SLionel Sambuc void
xcb_xv_adaptor_info_next(xcb_xv_adaptor_info_iterator_t * i)193971bb1a5SLionel Sambuc xcb_xv_adaptor_info_next (xcb_xv_adaptor_info_iterator_t *i  /**< */)
194971bb1a5SLionel Sambuc {
195971bb1a5SLionel Sambuc     xcb_xv_adaptor_info_t *R = i->data;
196971bb1a5SLionel Sambuc     xcb_generic_iterator_t child;
197971bb1a5SLionel Sambuc     child.data = (xcb_xv_adaptor_info_t *)(((char *)R) + xcb_xv_adaptor_info_sizeof(R));
198971bb1a5SLionel Sambuc     i->index = (char *) child.data - (char *) i->data;
199971bb1a5SLionel Sambuc     --i->rem;
200971bb1a5SLionel Sambuc     i->data = (xcb_xv_adaptor_info_t *) child.data;
201971bb1a5SLionel Sambuc }
202971bb1a5SLionel Sambuc 
203971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_adaptor_info_end(xcb_xv_adaptor_info_iterator_t i)204971bb1a5SLionel Sambuc xcb_xv_adaptor_info_end (xcb_xv_adaptor_info_iterator_t i  /**< */)
205971bb1a5SLionel Sambuc {
206971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
207971bb1a5SLionel Sambuc     while(i.rem > 0)
208971bb1a5SLionel Sambuc         xcb_xv_adaptor_info_next(&i);
209971bb1a5SLionel Sambuc     ret.data = i.data;
210971bb1a5SLionel Sambuc     ret.rem = i.rem;
211971bb1a5SLionel Sambuc     ret.index = i.index;
212971bb1a5SLionel Sambuc     return ret;
213971bb1a5SLionel Sambuc }
214971bb1a5SLionel Sambuc 
215971bb1a5SLionel Sambuc int
xcb_xv_encoding_info_sizeof(const void * _buffer)216971bb1a5SLionel Sambuc xcb_xv_encoding_info_sizeof (const void  *_buffer  /**< */)
217971bb1a5SLionel Sambuc {
218971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
219971bb1a5SLionel Sambuc     const xcb_xv_encoding_info_t *_aux = (xcb_xv_encoding_info_t *)_buffer;
220971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
221971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
222971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
223*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
224971bb1a5SLionel Sambuc 
225971bb1a5SLionel Sambuc 
226971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_encoding_info_t);
227971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
228*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
229*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
230971bb1a5SLionel Sambuc     /* name */
231971bb1a5SLionel Sambuc     xcb_block_len += _aux->name_size * sizeof(char);
232971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
233971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(char);
234971bb1a5SLionel Sambuc     /* insert padding */
235971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
236971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
237971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
238971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
239971bb1a5SLionel Sambuc         xcb_pad = 0;
240971bb1a5SLionel Sambuc     }
241971bb1a5SLionel Sambuc     xcb_block_len = 0;
242971bb1a5SLionel Sambuc 
243971bb1a5SLionel Sambuc     return xcb_buffer_len;
244971bb1a5SLionel Sambuc }
245971bb1a5SLionel Sambuc 
246971bb1a5SLionel Sambuc char *
xcb_xv_encoding_info_name(const xcb_xv_encoding_info_t * R)247971bb1a5SLionel Sambuc xcb_xv_encoding_info_name (const xcb_xv_encoding_info_t *R  /**< */)
248971bb1a5SLionel Sambuc {
249971bb1a5SLionel Sambuc     return (char *) (R + 1);
250971bb1a5SLionel Sambuc }
251971bb1a5SLionel Sambuc 
252971bb1a5SLionel Sambuc int
xcb_xv_encoding_info_name_length(const xcb_xv_encoding_info_t * R)253971bb1a5SLionel Sambuc xcb_xv_encoding_info_name_length (const xcb_xv_encoding_info_t *R  /**< */)
254971bb1a5SLionel Sambuc {
255971bb1a5SLionel Sambuc     return R->name_size;
256971bb1a5SLionel Sambuc }
257971bb1a5SLionel Sambuc 
258971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_encoding_info_name_end(const xcb_xv_encoding_info_t * R)259971bb1a5SLionel Sambuc xcb_xv_encoding_info_name_end (const xcb_xv_encoding_info_t *R  /**< */)
260971bb1a5SLionel Sambuc {
261971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
262971bb1a5SLionel Sambuc     i.data = ((char *) (R + 1)) + (R->name_size);
263971bb1a5SLionel Sambuc     i.rem = 0;
264971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
265971bb1a5SLionel Sambuc     return i;
266971bb1a5SLionel Sambuc }
267971bb1a5SLionel Sambuc 
268971bb1a5SLionel Sambuc void
xcb_xv_encoding_info_next(xcb_xv_encoding_info_iterator_t * i)269971bb1a5SLionel Sambuc xcb_xv_encoding_info_next (xcb_xv_encoding_info_iterator_t *i  /**< */)
270971bb1a5SLionel Sambuc {
271971bb1a5SLionel Sambuc     xcb_xv_encoding_info_t *R = i->data;
272971bb1a5SLionel Sambuc     xcb_generic_iterator_t child;
273971bb1a5SLionel Sambuc     child.data = (xcb_xv_encoding_info_t *)(((char *)R) + xcb_xv_encoding_info_sizeof(R));
274971bb1a5SLionel Sambuc     i->index = (char *) child.data - (char *) i->data;
275971bb1a5SLionel Sambuc     --i->rem;
276971bb1a5SLionel Sambuc     i->data = (xcb_xv_encoding_info_t *) child.data;
277971bb1a5SLionel Sambuc }
278971bb1a5SLionel Sambuc 
279971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_encoding_info_end(xcb_xv_encoding_info_iterator_t i)280971bb1a5SLionel Sambuc xcb_xv_encoding_info_end (xcb_xv_encoding_info_iterator_t i  /**< */)
281971bb1a5SLionel Sambuc {
282971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
283971bb1a5SLionel Sambuc     while(i.rem > 0)
284971bb1a5SLionel Sambuc         xcb_xv_encoding_info_next(&i);
285971bb1a5SLionel Sambuc     ret.data = i.data;
286971bb1a5SLionel Sambuc     ret.rem = i.rem;
287971bb1a5SLionel Sambuc     ret.index = i.index;
288971bb1a5SLionel Sambuc     return ret;
289971bb1a5SLionel Sambuc }
290971bb1a5SLionel Sambuc 
291971bb1a5SLionel Sambuc int
xcb_xv_image_sizeof(const void * _buffer)292971bb1a5SLionel Sambuc xcb_xv_image_sizeof (const void  *_buffer  /**< */)
293971bb1a5SLionel Sambuc {
294971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
295971bb1a5SLionel Sambuc     const xcb_xv_image_t *_aux = (xcb_xv_image_t *)_buffer;
296971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
297971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
298971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
299*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
300971bb1a5SLionel Sambuc 
301971bb1a5SLionel Sambuc 
302971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_image_t);
303971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
304*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
305*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
306971bb1a5SLionel Sambuc     /* pitches */
307971bb1a5SLionel Sambuc     xcb_block_len += _aux->num_planes * sizeof(uint32_t);
308971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
309971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(uint32_t);
310971bb1a5SLionel Sambuc     /* insert padding */
311971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
312971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
313971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
314971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
315971bb1a5SLionel Sambuc         xcb_pad = 0;
316971bb1a5SLionel Sambuc     }
317971bb1a5SLionel Sambuc     xcb_block_len = 0;
318971bb1a5SLionel Sambuc     /* offsets */
319971bb1a5SLionel Sambuc     xcb_block_len += _aux->num_planes * sizeof(uint32_t);
320971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
321971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(uint32_t);
322971bb1a5SLionel Sambuc     /* insert padding */
323971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
324971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
325971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
326971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
327971bb1a5SLionel Sambuc         xcb_pad = 0;
328971bb1a5SLionel Sambuc     }
329971bb1a5SLionel Sambuc     xcb_block_len = 0;
330971bb1a5SLionel Sambuc     /* data */
331971bb1a5SLionel Sambuc     xcb_block_len += _aux->data_size * sizeof(uint8_t);
332971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
333971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(uint8_t);
334971bb1a5SLionel Sambuc     /* insert padding */
335971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
336971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
337971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
338971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
339971bb1a5SLionel Sambuc         xcb_pad = 0;
340971bb1a5SLionel Sambuc     }
341971bb1a5SLionel Sambuc     xcb_block_len = 0;
342971bb1a5SLionel Sambuc 
343971bb1a5SLionel Sambuc     return xcb_buffer_len;
344971bb1a5SLionel Sambuc }
345971bb1a5SLionel Sambuc 
346971bb1a5SLionel Sambuc uint32_t *
xcb_xv_image_pitches(const xcb_xv_image_t * R)347971bb1a5SLionel Sambuc xcb_xv_image_pitches (const xcb_xv_image_t *R  /**< */)
348971bb1a5SLionel Sambuc {
349971bb1a5SLionel Sambuc     return (uint32_t *) (R + 1);
350971bb1a5SLionel Sambuc }
351971bb1a5SLionel Sambuc 
352971bb1a5SLionel Sambuc int
xcb_xv_image_pitches_length(const xcb_xv_image_t * R)353971bb1a5SLionel Sambuc xcb_xv_image_pitches_length (const xcb_xv_image_t *R  /**< */)
354971bb1a5SLionel Sambuc {
355971bb1a5SLionel Sambuc     return R->num_planes;
356971bb1a5SLionel Sambuc }
357971bb1a5SLionel Sambuc 
358971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_image_pitches_end(const xcb_xv_image_t * R)359971bb1a5SLionel Sambuc xcb_xv_image_pitches_end (const xcb_xv_image_t *R  /**< */)
360971bb1a5SLionel Sambuc {
361971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
362971bb1a5SLionel Sambuc     i.data = ((uint32_t *) (R + 1)) + (R->num_planes);
363971bb1a5SLionel Sambuc     i.rem = 0;
364971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
365971bb1a5SLionel Sambuc     return i;
366971bb1a5SLionel Sambuc }
367971bb1a5SLionel Sambuc 
368971bb1a5SLionel Sambuc uint32_t *
xcb_xv_image_offsets(const xcb_xv_image_t * R)369971bb1a5SLionel Sambuc xcb_xv_image_offsets (const xcb_xv_image_t *R  /**< */)
370971bb1a5SLionel Sambuc {
371971bb1a5SLionel Sambuc     xcb_generic_iterator_t prev = xcb_xv_image_pitches_end(R);
372971bb1a5SLionel Sambuc     return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
373971bb1a5SLionel Sambuc }
374971bb1a5SLionel Sambuc 
375971bb1a5SLionel Sambuc int
xcb_xv_image_offsets_length(const xcb_xv_image_t * R)376971bb1a5SLionel Sambuc xcb_xv_image_offsets_length (const xcb_xv_image_t *R  /**< */)
377971bb1a5SLionel Sambuc {
378971bb1a5SLionel Sambuc     return R->num_planes;
379971bb1a5SLionel Sambuc }
380971bb1a5SLionel Sambuc 
381971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_image_offsets_end(const xcb_xv_image_t * R)382971bb1a5SLionel Sambuc xcb_xv_image_offsets_end (const xcb_xv_image_t *R  /**< */)
383971bb1a5SLionel Sambuc {
384971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
385971bb1a5SLionel Sambuc     xcb_generic_iterator_t child = xcb_xv_image_pitches_end(R);
386971bb1a5SLionel Sambuc     i.data = ((uint32_t *) child.data) + (R->num_planes);
387971bb1a5SLionel Sambuc     i.rem = 0;
388971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
389971bb1a5SLionel Sambuc     return i;
390971bb1a5SLionel Sambuc }
391971bb1a5SLionel Sambuc 
392971bb1a5SLionel Sambuc uint8_t *
xcb_xv_image_data(const xcb_xv_image_t * R)393971bb1a5SLionel Sambuc xcb_xv_image_data (const xcb_xv_image_t *R  /**< */)
394971bb1a5SLionel Sambuc {
395971bb1a5SLionel Sambuc     xcb_generic_iterator_t prev = xcb_xv_image_offsets_end(R);
396971bb1a5SLionel Sambuc     return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0);
397971bb1a5SLionel Sambuc }
398971bb1a5SLionel Sambuc 
399971bb1a5SLionel Sambuc int
xcb_xv_image_data_length(const xcb_xv_image_t * R)400971bb1a5SLionel Sambuc xcb_xv_image_data_length (const xcb_xv_image_t *R  /**< */)
401971bb1a5SLionel Sambuc {
402971bb1a5SLionel Sambuc     return R->data_size;
403971bb1a5SLionel Sambuc }
404971bb1a5SLionel Sambuc 
405971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_image_data_end(const xcb_xv_image_t * R)406971bb1a5SLionel Sambuc xcb_xv_image_data_end (const xcb_xv_image_t *R  /**< */)
407971bb1a5SLionel Sambuc {
408971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
409971bb1a5SLionel Sambuc     xcb_generic_iterator_t child = xcb_xv_image_offsets_end(R);
410971bb1a5SLionel Sambuc     i.data = ((uint8_t *) child.data) + (R->data_size);
411971bb1a5SLionel Sambuc     i.rem = 0;
412971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
413971bb1a5SLionel Sambuc     return i;
414971bb1a5SLionel Sambuc }
415971bb1a5SLionel Sambuc 
416971bb1a5SLionel Sambuc void
xcb_xv_image_next(xcb_xv_image_iterator_t * i)417971bb1a5SLionel Sambuc xcb_xv_image_next (xcb_xv_image_iterator_t *i  /**< */)
418971bb1a5SLionel Sambuc {
419971bb1a5SLionel Sambuc     xcb_xv_image_t *R = i->data;
420971bb1a5SLionel Sambuc     xcb_generic_iterator_t child;
421971bb1a5SLionel Sambuc     child.data = (xcb_xv_image_t *)(((char *)R) + xcb_xv_image_sizeof(R));
422971bb1a5SLionel Sambuc     i->index = (char *) child.data - (char *) i->data;
423971bb1a5SLionel Sambuc     --i->rem;
424971bb1a5SLionel Sambuc     i->data = (xcb_xv_image_t *) child.data;
425971bb1a5SLionel Sambuc }
426971bb1a5SLionel Sambuc 
427971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_image_end(xcb_xv_image_iterator_t i)428971bb1a5SLionel Sambuc xcb_xv_image_end (xcb_xv_image_iterator_t i  /**< */)
429971bb1a5SLionel Sambuc {
430971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
431971bb1a5SLionel Sambuc     while(i.rem > 0)
432971bb1a5SLionel Sambuc         xcb_xv_image_next(&i);
433971bb1a5SLionel Sambuc     ret.data = i.data;
434971bb1a5SLionel Sambuc     ret.rem = i.rem;
435971bb1a5SLionel Sambuc     ret.index = i.index;
436971bb1a5SLionel Sambuc     return ret;
437971bb1a5SLionel Sambuc }
438971bb1a5SLionel Sambuc 
439971bb1a5SLionel Sambuc int
xcb_xv_attribute_info_sizeof(const void * _buffer)440971bb1a5SLionel Sambuc xcb_xv_attribute_info_sizeof (const void  *_buffer  /**< */)
441971bb1a5SLionel Sambuc {
442971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
443971bb1a5SLionel Sambuc     const xcb_xv_attribute_info_t *_aux = (xcb_xv_attribute_info_t *)_buffer;
444971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
445971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
446971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
447*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
448971bb1a5SLionel Sambuc 
449971bb1a5SLionel Sambuc 
450971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_attribute_info_t);
451971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
452*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
453*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
454971bb1a5SLionel Sambuc     /* name */
455971bb1a5SLionel Sambuc     xcb_block_len += _aux->size * sizeof(char);
456971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
457971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(char);
458971bb1a5SLionel Sambuc     /* insert padding */
459971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
460971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
461971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
462971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
463971bb1a5SLionel Sambuc         xcb_pad = 0;
464971bb1a5SLionel Sambuc     }
465971bb1a5SLionel Sambuc     xcb_block_len = 0;
466971bb1a5SLionel Sambuc 
467971bb1a5SLionel Sambuc     return xcb_buffer_len;
468971bb1a5SLionel Sambuc }
469971bb1a5SLionel Sambuc 
470971bb1a5SLionel Sambuc char *
xcb_xv_attribute_info_name(const xcb_xv_attribute_info_t * R)471971bb1a5SLionel Sambuc xcb_xv_attribute_info_name (const xcb_xv_attribute_info_t *R  /**< */)
472971bb1a5SLionel Sambuc {
473971bb1a5SLionel Sambuc     return (char *) (R + 1);
474971bb1a5SLionel Sambuc }
475971bb1a5SLionel Sambuc 
476971bb1a5SLionel Sambuc int
xcb_xv_attribute_info_name_length(const xcb_xv_attribute_info_t * R)477971bb1a5SLionel Sambuc xcb_xv_attribute_info_name_length (const xcb_xv_attribute_info_t *R  /**< */)
478971bb1a5SLionel Sambuc {
479971bb1a5SLionel Sambuc     return R->size;
480971bb1a5SLionel Sambuc }
481971bb1a5SLionel Sambuc 
482971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_attribute_info_name_end(const xcb_xv_attribute_info_t * R)483971bb1a5SLionel Sambuc xcb_xv_attribute_info_name_end (const xcb_xv_attribute_info_t *R  /**< */)
484971bb1a5SLionel Sambuc {
485971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
486971bb1a5SLionel Sambuc     i.data = ((char *) (R + 1)) + (R->size);
487971bb1a5SLionel Sambuc     i.rem = 0;
488971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
489971bb1a5SLionel Sambuc     return i;
490971bb1a5SLionel Sambuc }
491971bb1a5SLionel Sambuc 
492971bb1a5SLionel Sambuc void
xcb_xv_attribute_info_next(xcb_xv_attribute_info_iterator_t * i)493971bb1a5SLionel Sambuc xcb_xv_attribute_info_next (xcb_xv_attribute_info_iterator_t *i  /**< */)
494971bb1a5SLionel Sambuc {
495971bb1a5SLionel Sambuc     xcb_xv_attribute_info_t *R = i->data;
496971bb1a5SLionel Sambuc     xcb_generic_iterator_t child;
497971bb1a5SLionel Sambuc     child.data = (xcb_xv_attribute_info_t *)(((char *)R) + xcb_xv_attribute_info_sizeof(R));
498971bb1a5SLionel Sambuc     i->index = (char *) child.data - (char *) i->data;
499971bb1a5SLionel Sambuc     --i->rem;
500971bb1a5SLionel Sambuc     i->data = (xcb_xv_attribute_info_t *) child.data;
501971bb1a5SLionel Sambuc }
502971bb1a5SLionel Sambuc 
503971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_attribute_info_end(xcb_xv_attribute_info_iterator_t i)504971bb1a5SLionel Sambuc xcb_xv_attribute_info_end (xcb_xv_attribute_info_iterator_t i  /**< */)
505971bb1a5SLionel Sambuc {
506971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
507971bb1a5SLionel Sambuc     while(i.rem > 0)
508971bb1a5SLionel Sambuc         xcb_xv_attribute_info_next(&i);
509971bb1a5SLionel Sambuc     ret.data = i.data;
510971bb1a5SLionel Sambuc     ret.rem = i.rem;
511971bb1a5SLionel Sambuc     ret.index = i.index;
512971bb1a5SLionel Sambuc     return ret;
513971bb1a5SLionel Sambuc }
514971bb1a5SLionel Sambuc 
515971bb1a5SLionel Sambuc void
xcb_xv_image_format_info_next(xcb_xv_image_format_info_iterator_t * i)516971bb1a5SLionel Sambuc xcb_xv_image_format_info_next (xcb_xv_image_format_info_iterator_t *i  /**< */)
517971bb1a5SLionel Sambuc {
518971bb1a5SLionel Sambuc     --i->rem;
519971bb1a5SLionel Sambuc     ++i->data;
520971bb1a5SLionel Sambuc     i->index += sizeof(xcb_xv_image_format_info_t);
521971bb1a5SLionel Sambuc }
522971bb1a5SLionel Sambuc 
523971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_image_format_info_end(xcb_xv_image_format_info_iterator_t i)524971bb1a5SLionel Sambuc xcb_xv_image_format_info_end (xcb_xv_image_format_info_iterator_t i  /**< */)
525971bb1a5SLionel Sambuc {
526971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
527971bb1a5SLionel Sambuc     ret.data = i.data + i.rem;
528971bb1a5SLionel Sambuc     ret.index = i.index + ((char *) ret.data - (char *) i.data);
529971bb1a5SLionel Sambuc     ret.rem = 0;
530971bb1a5SLionel Sambuc     return ret;
531971bb1a5SLionel Sambuc }
532971bb1a5SLionel Sambuc 
533971bb1a5SLionel Sambuc xcb_xv_query_extension_cookie_t
xcb_xv_query_extension(xcb_connection_t * c)534971bb1a5SLionel Sambuc xcb_xv_query_extension (xcb_connection_t *c  /**< */)
535971bb1a5SLionel Sambuc {
536971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
537971bb1a5SLionel Sambuc         /* count */ 2,
538971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
539971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_EXTENSION,
540971bb1a5SLionel Sambuc         /* isvoid */ 0
541971bb1a5SLionel Sambuc     };
542971bb1a5SLionel Sambuc 
543971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
544971bb1a5SLionel Sambuc     xcb_xv_query_extension_cookie_t xcb_ret;
545971bb1a5SLionel Sambuc     xcb_xv_query_extension_request_t xcb_out;
546971bb1a5SLionel Sambuc 
547971bb1a5SLionel Sambuc 
548971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
549971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
550971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
551971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
552971bb1a5SLionel Sambuc 
553971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
554971bb1a5SLionel Sambuc     return xcb_ret;
555971bb1a5SLionel Sambuc }
556971bb1a5SLionel Sambuc 
557971bb1a5SLionel Sambuc xcb_xv_query_extension_cookie_t
xcb_xv_query_extension_unchecked(xcb_connection_t * c)558971bb1a5SLionel Sambuc xcb_xv_query_extension_unchecked (xcb_connection_t *c  /**< */)
559971bb1a5SLionel Sambuc {
560971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
561971bb1a5SLionel Sambuc         /* count */ 2,
562971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
563971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_EXTENSION,
564971bb1a5SLionel Sambuc         /* isvoid */ 0
565971bb1a5SLionel Sambuc     };
566971bb1a5SLionel Sambuc 
567971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
568971bb1a5SLionel Sambuc     xcb_xv_query_extension_cookie_t xcb_ret;
569971bb1a5SLionel Sambuc     xcb_xv_query_extension_request_t xcb_out;
570971bb1a5SLionel Sambuc 
571971bb1a5SLionel Sambuc 
572971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
573971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
574971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
575971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
576971bb1a5SLionel Sambuc 
577971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
578971bb1a5SLionel Sambuc     return xcb_ret;
579971bb1a5SLionel Sambuc }
580971bb1a5SLionel Sambuc 
581971bb1a5SLionel Sambuc xcb_xv_query_extension_reply_t *
xcb_xv_query_extension_reply(xcb_connection_t * c,xcb_xv_query_extension_cookie_t cookie,xcb_generic_error_t ** e)582971bb1a5SLionel Sambuc xcb_xv_query_extension_reply (xcb_connection_t                 *c  /**< */,
583971bb1a5SLionel Sambuc                               xcb_xv_query_extension_cookie_t   cookie  /**< */,
584971bb1a5SLionel Sambuc                               xcb_generic_error_t             **e  /**< */)
585971bb1a5SLionel Sambuc {
586971bb1a5SLionel Sambuc     return (xcb_xv_query_extension_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
587971bb1a5SLionel Sambuc }
588971bb1a5SLionel Sambuc 
589971bb1a5SLionel Sambuc int
xcb_xv_query_adaptors_sizeof(const void * _buffer)590971bb1a5SLionel Sambuc xcb_xv_query_adaptors_sizeof (const void  *_buffer  /**< */)
591971bb1a5SLionel Sambuc {
592971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
593971bb1a5SLionel Sambuc     const xcb_xv_query_adaptors_reply_t *_aux = (xcb_xv_query_adaptors_reply_t *)_buffer;
594971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
595971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
596971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
597*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
598971bb1a5SLionel Sambuc 
599971bb1a5SLionel Sambuc     unsigned int i;
600971bb1a5SLionel Sambuc     unsigned int xcb_tmp_len;
601971bb1a5SLionel Sambuc 
602971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_query_adaptors_reply_t);
603971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
604*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
605*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
606971bb1a5SLionel Sambuc     /* info */
607971bb1a5SLionel Sambuc     for(i=0; i<_aux->num_adaptors; i++) {
608971bb1a5SLionel Sambuc         xcb_tmp_len = xcb_xv_adaptor_info_sizeof(xcb_tmp);
609971bb1a5SLionel Sambuc         xcb_block_len += xcb_tmp_len;
610971bb1a5SLionel Sambuc         xcb_tmp += xcb_tmp_len;
611971bb1a5SLionel Sambuc     }
612971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(xcb_xv_adaptor_info_t);
613971bb1a5SLionel Sambuc     /* insert padding */
614971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
615971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
616971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
617971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
618971bb1a5SLionel Sambuc         xcb_pad = 0;
619971bb1a5SLionel Sambuc     }
620971bb1a5SLionel Sambuc     xcb_block_len = 0;
621971bb1a5SLionel Sambuc 
622971bb1a5SLionel Sambuc     return xcb_buffer_len;
623971bb1a5SLionel Sambuc }
624971bb1a5SLionel Sambuc 
625971bb1a5SLionel Sambuc xcb_xv_query_adaptors_cookie_t
xcb_xv_query_adaptors(xcb_connection_t * c,xcb_window_t window)626971bb1a5SLionel Sambuc xcb_xv_query_adaptors (xcb_connection_t *c  /**< */,
627971bb1a5SLionel Sambuc                        xcb_window_t      window  /**< */)
628971bb1a5SLionel Sambuc {
629971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
630971bb1a5SLionel Sambuc         /* count */ 2,
631971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
632971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_ADAPTORS,
633971bb1a5SLionel Sambuc         /* isvoid */ 0
634971bb1a5SLionel Sambuc     };
635971bb1a5SLionel Sambuc 
636971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
637971bb1a5SLionel Sambuc     xcb_xv_query_adaptors_cookie_t xcb_ret;
638971bb1a5SLionel Sambuc     xcb_xv_query_adaptors_request_t xcb_out;
639971bb1a5SLionel Sambuc 
640971bb1a5SLionel Sambuc     xcb_out.window = window;
641971bb1a5SLionel Sambuc 
642971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
643971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
644971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
645971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
646971bb1a5SLionel Sambuc 
647971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
648971bb1a5SLionel Sambuc     return xcb_ret;
649971bb1a5SLionel Sambuc }
650971bb1a5SLionel Sambuc 
651971bb1a5SLionel Sambuc xcb_xv_query_adaptors_cookie_t
xcb_xv_query_adaptors_unchecked(xcb_connection_t * c,xcb_window_t window)652971bb1a5SLionel Sambuc xcb_xv_query_adaptors_unchecked (xcb_connection_t *c  /**< */,
653971bb1a5SLionel Sambuc                                  xcb_window_t      window  /**< */)
654971bb1a5SLionel Sambuc {
655971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
656971bb1a5SLionel Sambuc         /* count */ 2,
657971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
658971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_ADAPTORS,
659971bb1a5SLionel Sambuc         /* isvoid */ 0
660971bb1a5SLionel Sambuc     };
661971bb1a5SLionel Sambuc 
662971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
663971bb1a5SLionel Sambuc     xcb_xv_query_adaptors_cookie_t xcb_ret;
664971bb1a5SLionel Sambuc     xcb_xv_query_adaptors_request_t xcb_out;
665971bb1a5SLionel Sambuc 
666971bb1a5SLionel Sambuc     xcb_out.window = window;
667971bb1a5SLionel Sambuc 
668971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
669971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
670971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
671971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
672971bb1a5SLionel Sambuc 
673971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
674971bb1a5SLionel Sambuc     return xcb_ret;
675971bb1a5SLionel Sambuc }
676971bb1a5SLionel Sambuc 
677971bb1a5SLionel Sambuc int
xcb_xv_query_adaptors_info_length(const xcb_xv_query_adaptors_reply_t * R)678971bb1a5SLionel Sambuc xcb_xv_query_adaptors_info_length (const xcb_xv_query_adaptors_reply_t *R  /**< */)
679971bb1a5SLionel Sambuc {
680971bb1a5SLionel Sambuc     return R->num_adaptors;
681971bb1a5SLionel Sambuc }
682971bb1a5SLionel Sambuc 
683971bb1a5SLionel Sambuc xcb_xv_adaptor_info_iterator_t
xcb_xv_query_adaptors_info_iterator(const xcb_xv_query_adaptors_reply_t * R)684971bb1a5SLionel Sambuc xcb_xv_query_adaptors_info_iterator (const xcb_xv_query_adaptors_reply_t *R  /**< */)
685971bb1a5SLionel Sambuc {
686971bb1a5SLionel Sambuc     xcb_xv_adaptor_info_iterator_t i;
687971bb1a5SLionel Sambuc     i.data = (xcb_xv_adaptor_info_t *) (R + 1);
688971bb1a5SLionel Sambuc     i.rem = R->num_adaptors;
689971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
690971bb1a5SLionel Sambuc     return i;
691971bb1a5SLionel Sambuc }
692971bb1a5SLionel Sambuc 
693971bb1a5SLionel Sambuc xcb_xv_query_adaptors_reply_t *
xcb_xv_query_adaptors_reply(xcb_connection_t * c,xcb_xv_query_adaptors_cookie_t cookie,xcb_generic_error_t ** e)694971bb1a5SLionel Sambuc xcb_xv_query_adaptors_reply (xcb_connection_t                *c  /**< */,
695971bb1a5SLionel Sambuc                              xcb_xv_query_adaptors_cookie_t   cookie  /**< */,
696971bb1a5SLionel Sambuc                              xcb_generic_error_t            **e  /**< */)
697971bb1a5SLionel Sambuc {
698971bb1a5SLionel Sambuc     return (xcb_xv_query_adaptors_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
699971bb1a5SLionel Sambuc }
700971bb1a5SLionel Sambuc 
701971bb1a5SLionel Sambuc int
xcb_xv_query_encodings_sizeof(const void * _buffer)702971bb1a5SLionel Sambuc xcb_xv_query_encodings_sizeof (const void  *_buffer  /**< */)
703971bb1a5SLionel Sambuc {
704971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
705971bb1a5SLionel Sambuc     const xcb_xv_query_encodings_reply_t *_aux = (xcb_xv_query_encodings_reply_t *)_buffer;
706971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
707971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
708971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
709*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
710971bb1a5SLionel Sambuc 
711971bb1a5SLionel Sambuc     unsigned int i;
712971bb1a5SLionel Sambuc     unsigned int xcb_tmp_len;
713971bb1a5SLionel Sambuc 
714971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_query_encodings_reply_t);
715971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
716*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
717*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
718971bb1a5SLionel Sambuc     /* info */
719971bb1a5SLionel Sambuc     for(i=0; i<_aux->num_encodings; i++) {
720971bb1a5SLionel Sambuc         xcb_tmp_len = xcb_xv_encoding_info_sizeof(xcb_tmp);
721971bb1a5SLionel Sambuc         xcb_block_len += xcb_tmp_len;
722971bb1a5SLionel Sambuc         xcb_tmp += xcb_tmp_len;
723971bb1a5SLionel Sambuc     }
724971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(xcb_xv_encoding_info_t);
725971bb1a5SLionel Sambuc     /* insert padding */
726971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
727971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
728971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
729971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
730971bb1a5SLionel Sambuc         xcb_pad = 0;
731971bb1a5SLionel Sambuc     }
732971bb1a5SLionel Sambuc     xcb_block_len = 0;
733971bb1a5SLionel Sambuc 
734971bb1a5SLionel Sambuc     return xcb_buffer_len;
735971bb1a5SLionel Sambuc }
736971bb1a5SLionel Sambuc 
737971bb1a5SLionel Sambuc xcb_xv_query_encodings_cookie_t
xcb_xv_query_encodings(xcb_connection_t * c,xcb_xv_port_t port)738971bb1a5SLionel Sambuc xcb_xv_query_encodings (xcb_connection_t *c  /**< */,
739971bb1a5SLionel Sambuc                         xcb_xv_port_t     port  /**< */)
740971bb1a5SLionel Sambuc {
741971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
742971bb1a5SLionel Sambuc         /* count */ 2,
743971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
744971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_ENCODINGS,
745971bb1a5SLionel Sambuc         /* isvoid */ 0
746971bb1a5SLionel Sambuc     };
747971bb1a5SLionel Sambuc 
748971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
749971bb1a5SLionel Sambuc     xcb_xv_query_encodings_cookie_t xcb_ret;
750971bb1a5SLionel Sambuc     xcb_xv_query_encodings_request_t xcb_out;
751971bb1a5SLionel Sambuc 
752971bb1a5SLionel Sambuc     xcb_out.port = port;
753971bb1a5SLionel Sambuc 
754971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
755971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
756971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
757971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
758971bb1a5SLionel Sambuc 
759971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
760971bb1a5SLionel Sambuc     return xcb_ret;
761971bb1a5SLionel Sambuc }
762971bb1a5SLionel Sambuc 
763971bb1a5SLionel Sambuc xcb_xv_query_encodings_cookie_t
xcb_xv_query_encodings_unchecked(xcb_connection_t * c,xcb_xv_port_t port)764971bb1a5SLionel Sambuc xcb_xv_query_encodings_unchecked (xcb_connection_t *c  /**< */,
765971bb1a5SLionel Sambuc                                   xcb_xv_port_t     port  /**< */)
766971bb1a5SLionel Sambuc {
767971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
768971bb1a5SLionel Sambuc         /* count */ 2,
769971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
770971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_ENCODINGS,
771971bb1a5SLionel Sambuc         /* isvoid */ 0
772971bb1a5SLionel Sambuc     };
773971bb1a5SLionel Sambuc 
774971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
775971bb1a5SLionel Sambuc     xcb_xv_query_encodings_cookie_t xcb_ret;
776971bb1a5SLionel Sambuc     xcb_xv_query_encodings_request_t xcb_out;
777971bb1a5SLionel Sambuc 
778971bb1a5SLionel Sambuc     xcb_out.port = port;
779971bb1a5SLionel Sambuc 
780971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
781971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
782971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
783971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
784971bb1a5SLionel Sambuc 
785971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
786971bb1a5SLionel Sambuc     return xcb_ret;
787971bb1a5SLionel Sambuc }
788971bb1a5SLionel Sambuc 
789971bb1a5SLionel Sambuc int
xcb_xv_query_encodings_info_length(const xcb_xv_query_encodings_reply_t * R)790971bb1a5SLionel Sambuc xcb_xv_query_encodings_info_length (const xcb_xv_query_encodings_reply_t *R  /**< */)
791971bb1a5SLionel Sambuc {
792971bb1a5SLionel Sambuc     return R->num_encodings;
793971bb1a5SLionel Sambuc }
794971bb1a5SLionel Sambuc 
795971bb1a5SLionel Sambuc xcb_xv_encoding_info_iterator_t
xcb_xv_query_encodings_info_iterator(const xcb_xv_query_encodings_reply_t * R)796971bb1a5SLionel Sambuc xcb_xv_query_encodings_info_iterator (const xcb_xv_query_encodings_reply_t *R  /**< */)
797971bb1a5SLionel Sambuc {
798971bb1a5SLionel Sambuc     xcb_xv_encoding_info_iterator_t i;
799971bb1a5SLionel Sambuc     i.data = (xcb_xv_encoding_info_t *) (R + 1);
800971bb1a5SLionel Sambuc     i.rem = R->num_encodings;
801971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
802971bb1a5SLionel Sambuc     return i;
803971bb1a5SLionel Sambuc }
804971bb1a5SLionel Sambuc 
805971bb1a5SLionel Sambuc xcb_xv_query_encodings_reply_t *
xcb_xv_query_encodings_reply(xcb_connection_t * c,xcb_xv_query_encodings_cookie_t cookie,xcb_generic_error_t ** e)806971bb1a5SLionel Sambuc xcb_xv_query_encodings_reply (xcb_connection_t                 *c  /**< */,
807971bb1a5SLionel Sambuc                               xcb_xv_query_encodings_cookie_t   cookie  /**< */,
808971bb1a5SLionel Sambuc                               xcb_generic_error_t             **e  /**< */)
809971bb1a5SLionel Sambuc {
810971bb1a5SLionel Sambuc     return (xcb_xv_query_encodings_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
811971bb1a5SLionel Sambuc }
812971bb1a5SLionel Sambuc 
813971bb1a5SLionel Sambuc xcb_xv_grab_port_cookie_t
xcb_xv_grab_port(xcb_connection_t * c,xcb_xv_port_t port,xcb_timestamp_t time)814971bb1a5SLionel Sambuc xcb_xv_grab_port (xcb_connection_t *c  /**< */,
815971bb1a5SLionel Sambuc                   xcb_xv_port_t     port  /**< */,
816971bb1a5SLionel Sambuc                   xcb_timestamp_t   time  /**< */)
817971bb1a5SLionel Sambuc {
818971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
819971bb1a5SLionel Sambuc         /* count */ 2,
820971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
821971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_GRAB_PORT,
822971bb1a5SLionel Sambuc         /* isvoid */ 0
823971bb1a5SLionel Sambuc     };
824971bb1a5SLionel Sambuc 
825971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
826971bb1a5SLionel Sambuc     xcb_xv_grab_port_cookie_t xcb_ret;
827971bb1a5SLionel Sambuc     xcb_xv_grab_port_request_t xcb_out;
828971bb1a5SLionel Sambuc 
829971bb1a5SLionel Sambuc     xcb_out.port = port;
830971bb1a5SLionel Sambuc     xcb_out.time = time;
831971bb1a5SLionel Sambuc 
832971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
833971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
834971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
835971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
836971bb1a5SLionel Sambuc 
837971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
838971bb1a5SLionel Sambuc     return xcb_ret;
839971bb1a5SLionel Sambuc }
840971bb1a5SLionel Sambuc 
841971bb1a5SLionel Sambuc xcb_xv_grab_port_cookie_t
xcb_xv_grab_port_unchecked(xcb_connection_t * c,xcb_xv_port_t port,xcb_timestamp_t time)842971bb1a5SLionel Sambuc xcb_xv_grab_port_unchecked (xcb_connection_t *c  /**< */,
843971bb1a5SLionel Sambuc                             xcb_xv_port_t     port  /**< */,
844971bb1a5SLionel Sambuc                             xcb_timestamp_t   time  /**< */)
845971bb1a5SLionel Sambuc {
846971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
847971bb1a5SLionel Sambuc         /* count */ 2,
848971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
849971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_GRAB_PORT,
850971bb1a5SLionel Sambuc         /* isvoid */ 0
851971bb1a5SLionel Sambuc     };
852971bb1a5SLionel Sambuc 
853971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
854971bb1a5SLionel Sambuc     xcb_xv_grab_port_cookie_t xcb_ret;
855971bb1a5SLionel Sambuc     xcb_xv_grab_port_request_t xcb_out;
856971bb1a5SLionel Sambuc 
857971bb1a5SLionel Sambuc     xcb_out.port = port;
858971bb1a5SLionel Sambuc     xcb_out.time = time;
859971bb1a5SLionel Sambuc 
860971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
861971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
862971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
863971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
864971bb1a5SLionel Sambuc 
865971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
866971bb1a5SLionel Sambuc     return xcb_ret;
867971bb1a5SLionel Sambuc }
868971bb1a5SLionel Sambuc 
869971bb1a5SLionel Sambuc xcb_xv_grab_port_reply_t *
xcb_xv_grab_port_reply(xcb_connection_t * c,xcb_xv_grab_port_cookie_t cookie,xcb_generic_error_t ** e)870971bb1a5SLionel Sambuc xcb_xv_grab_port_reply (xcb_connection_t           *c  /**< */,
871971bb1a5SLionel Sambuc                         xcb_xv_grab_port_cookie_t   cookie  /**< */,
872971bb1a5SLionel Sambuc                         xcb_generic_error_t       **e  /**< */)
873971bb1a5SLionel Sambuc {
874971bb1a5SLionel Sambuc     return (xcb_xv_grab_port_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
875971bb1a5SLionel Sambuc }
876971bb1a5SLionel Sambuc 
877971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_ungrab_port_checked(xcb_connection_t * c,xcb_xv_port_t port,xcb_timestamp_t time)878971bb1a5SLionel Sambuc xcb_xv_ungrab_port_checked (xcb_connection_t *c  /**< */,
879971bb1a5SLionel Sambuc                             xcb_xv_port_t     port  /**< */,
880971bb1a5SLionel Sambuc                             xcb_timestamp_t   time  /**< */)
881971bb1a5SLionel Sambuc {
882971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
883971bb1a5SLionel Sambuc         /* count */ 2,
884971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
885971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_UNGRAB_PORT,
886971bb1a5SLionel Sambuc         /* isvoid */ 1
887971bb1a5SLionel Sambuc     };
888971bb1a5SLionel Sambuc 
889971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
890971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
891971bb1a5SLionel Sambuc     xcb_xv_ungrab_port_request_t xcb_out;
892971bb1a5SLionel Sambuc 
893971bb1a5SLionel Sambuc     xcb_out.port = port;
894971bb1a5SLionel Sambuc     xcb_out.time = time;
895971bb1a5SLionel Sambuc 
896971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
897971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
898971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
899971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
900971bb1a5SLionel Sambuc 
901971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
902971bb1a5SLionel Sambuc     return xcb_ret;
903971bb1a5SLionel Sambuc }
904971bb1a5SLionel Sambuc 
905971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_ungrab_port(xcb_connection_t * c,xcb_xv_port_t port,xcb_timestamp_t time)906971bb1a5SLionel Sambuc xcb_xv_ungrab_port (xcb_connection_t *c  /**< */,
907971bb1a5SLionel Sambuc                     xcb_xv_port_t     port  /**< */,
908971bb1a5SLionel Sambuc                     xcb_timestamp_t   time  /**< */)
909971bb1a5SLionel Sambuc {
910971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
911971bb1a5SLionel Sambuc         /* count */ 2,
912971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
913971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_UNGRAB_PORT,
914971bb1a5SLionel Sambuc         /* isvoid */ 1
915971bb1a5SLionel Sambuc     };
916971bb1a5SLionel Sambuc 
917971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
918971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
919971bb1a5SLionel Sambuc     xcb_xv_ungrab_port_request_t xcb_out;
920971bb1a5SLionel Sambuc 
921971bb1a5SLionel Sambuc     xcb_out.port = port;
922971bb1a5SLionel Sambuc     xcb_out.time = time;
923971bb1a5SLionel Sambuc 
924971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
925971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
926971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
927971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
928971bb1a5SLionel Sambuc 
929971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
930971bb1a5SLionel Sambuc     return xcb_ret;
931971bb1a5SLionel Sambuc }
932971bb1a5SLionel Sambuc 
933971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_put_video_checked(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,int16_t vid_x,int16_t vid_y,uint16_t vid_w,uint16_t vid_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h)934971bb1a5SLionel Sambuc xcb_xv_put_video_checked (xcb_connection_t *c  /**< */,
935971bb1a5SLionel Sambuc                           xcb_xv_port_t     port  /**< */,
936971bb1a5SLionel Sambuc                           xcb_drawable_t    drawable  /**< */,
937971bb1a5SLionel Sambuc                           xcb_gcontext_t    gc  /**< */,
938971bb1a5SLionel Sambuc                           int16_t           vid_x  /**< */,
939971bb1a5SLionel Sambuc                           int16_t           vid_y  /**< */,
940971bb1a5SLionel Sambuc                           uint16_t          vid_w  /**< */,
941971bb1a5SLionel Sambuc                           uint16_t          vid_h  /**< */,
942971bb1a5SLionel Sambuc                           int16_t           drw_x  /**< */,
943971bb1a5SLionel Sambuc                           int16_t           drw_y  /**< */,
944971bb1a5SLionel Sambuc                           uint16_t          drw_w  /**< */,
945971bb1a5SLionel Sambuc                           uint16_t          drw_h  /**< */)
946971bb1a5SLionel Sambuc {
947971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
948971bb1a5SLionel Sambuc         /* count */ 2,
949971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
950971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_PUT_VIDEO,
951971bb1a5SLionel Sambuc         /* isvoid */ 1
952971bb1a5SLionel Sambuc     };
953971bb1a5SLionel Sambuc 
954971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
955971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
956971bb1a5SLionel Sambuc     xcb_xv_put_video_request_t xcb_out;
957971bb1a5SLionel Sambuc 
958971bb1a5SLionel Sambuc     xcb_out.port = port;
959971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
960971bb1a5SLionel Sambuc     xcb_out.gc = gc;
961971bb1a5SLionel Sambuc     xcb_out.vid_x = vid_x;
962971bb1a5SLionel Sambuc     xcb_out.vid_y = vid_y;
963971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
964971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
965971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
966971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
967971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
968971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
969971bb1a5SLionel Sambuc 
970971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
971971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
972971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
973971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
974971bb1a5SLionel Sambuc 
975971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
976971bb1a5SLionel Sambuc     return xcb_ret;
977971bb1a5SLionel Sambuc }
978971bb1a5SLionel Sambuc 
979971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_put_video(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,int16_t vid_x,int16_t vid_y,uint16_t vid_w,uint16_t vid_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h)980971bb1a5SLionel Sambuc xcb_xv_put_video (xcb_connection_t *c  /**< */,
981971bb1a5SLionel Sambuc                   xcb_xv_port_t     port  /**< */,
982971bb1a5SLionel Sambuc                   xcb_drawable_t    drawable  /**< */,
983971bb1a5SLionel Sambuc                   xcb_gcontext_t    gc  /**< */,
984971bb1a5SLionel Sambuc                   int16_t           vid_x  /**< */,
985971bb1a5SLionel Sambuc                   int16_t           vid_y  /**< */,
986971bb1a5SLionel Sambuc                   uint16_t          vid_w  /**< */,
987971bb1a5SLionel Sambuc                   uint16_t          vid_h  /**< */,
988971bb1a5SLionel Sambuc                   int16_t           drw_x  /**< */,
989971bb1a5SLionel Sambuc                   int16_t           drw_y  /**< */,
990971bb1a5SLionel Sambuc                   uint16_t          drw_w  /**< */,
991971bb1a5SLionel Sambuc                   uint16_t          drw_h  /**< */)
992971bb1a5SLionel Sambuc {
993971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
994971bb1a5SLionel Sambuc         /* count */ 2,
995971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
996971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_PUT_VIDEO,
997971bb1a5SLionel Sambuc         /* isvoid */ 1
998971bb1a5SLionel Sambuc     };
999971bb1a5SLionel Sambuc 
1000971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1001971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1002971bb1a5SLionel Sambuc     xcb_xv_put_video_request_t xcb_out;
1003971bb1a5SLionel Sambuc 
1004971bb1a5SLionel Sambuc     xcb_out.port = port;
1005971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1006971bb1a5SLionel Sambuc     xcb_out.gc = gc;
1007971bb1a5SLionel Sambuc     xcb_out.vid_x = vid_x;
1008971bb1a5SLionel Sambuc     xcb_out.vid_y = vid_y;
1009971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
1010971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
1011971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
1012971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
1013971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
1014971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
1015971bb1a5SLionel Sambuc 
1016971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1017971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1018971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1019971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1020971bb1a5SLionel Sambuc 
1021971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1022971bb1a5SLionel Sambuc     return xcb_ret;
1023971bb1a5SLionel Sambuc }
1024971bb1a5SLionel Sambuc 
1025971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_put_still_checked(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,int16_t vid_x,int16_t vid_y,uint16_t vid_w,uint16_t vid_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h)1026971bb1a5SLionel Sambuc xcb_xv_put_still_checked (xcb_connection_t *c  /**< */,
1027971bb1a5SLionel Sambuc                           xcb_xv_port_t     port  /**< */,
1028971bb1a5SLionel Sambuc                           xcb_drawable_t    drawable  /**< */,
1029971bb1a5SLionel Sambuc                           xcb_gcontext_t    gc  /**< */,
1030971bb1a5SLionel Sambuc                           int16_t           vid_x  /**< */,
1031971bb1a5SLionel Sambuc                           int16_t           vid_y  /**< */,
1032971bb1a5SLionel Sambuc                           uint16_t          vid_w  /**< */,
1033971bb1a5SLionel Sambuc                           uint16_t          vid_h  /**< */,
1034971bb1a5SLionel Sambuc                           int16_t           drw_x  /**< */,
1035971bb1a5SLionel Sambuc                           int16_t           drw_y  /**< */,
1036971bb1a5SLionel Sambuc                           uint16_t          drw_w  /**< */,
1037971bb1a5SLionel Sambuc                           uint16_t          drw_h  /**< */)
1038971bb1a5SLionel Sambuc {
1039971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1040971bb1a5SLionel Sambuc         /* count */ 2,
1041971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1042971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_PUT_STILL,
1043971bb1a5SLionel Sambuc         /* isvoid */ 1
1044971bb1a5SLionel Sambuc     };
1045971bb1a5SLionel Sambuc 
1046971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1047971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1048971bb1a5SLionel Sambuc     xcb_xv_put_still_request_t xcb_out;
1049971bb1a5SLionel Sambuc 
1050971bb1a5SLionel Sambuc     xcb_out.port = port;
1051971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1052971bb1a5SLionel Sambuc     xcb_out.gc = gc;
1053971bb1a5SLionel Sambuc     xcb_out.vid_x = vid_x;
1054971bb1a5SLionel Sambuc     xcb_out.vid_y = vid_y;
1055971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
1056971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
1057971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
1058971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
1059971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
1060971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
1061971bb1a5SLionel Sambuc 
1062971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1063971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1064971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1065971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1066971bb1a5SLionel Sambuc 
1067971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1068971bb1a5SLionel Sambuc     return xcb_ret;
1069971bb1a5SLionel Sambuc }
1070971bb1a5SLionel Sambuc 
1071971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_put_still(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,int16_t vid_x,int16_t vid_y,uint16_t vid_w,uint16_t vid_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h)1072971bb1a5SLionel Sambuc xcb_xv_put_still (xcb_connection_t *c  /**< */,
1073971bb1a5SLionel Sambuc                   xcb_xv_port_t     port  /**< */,
1074971bb1a5SLionel Sambuc                   xcb_drawable_t    drawable  /**< */,
1075971bb1a5SLionel Sambuc                   xcb_gcontext_t    gc  /**< */,
1076971bb1a5SLionel Sambuc                   int16_t           vid_x  /**< */,
1077971bb1a5SLionel Sambuc                   int16_t           vid_y  /**< */,
1078971bb1a5SLionel Sambuc                   uint16_t          vid_w  /**< */,
1079971bb1a5SLionel Sambuc                   uint16_t          vid_h  /**< */,
1080971bb1a5SLionel Sambuc                   int16_t           drw_x  /**< */,
1081971bb1a5SLionel Sambuc                   int16_t           drw_y  /**< */,
1082971bb1a5SLionel Sambuc                   uint16_t          drw_w  /**< */,
1083971bb1a5SLionel Sambuc                   uint16_t          drw_h  /**< */)
1084971bb1a5SLionel Sambuc {
1085971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1086971bb1a5SLionel Sambuc         /* count */ 2,
1087971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1088971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_PUT_STILL,
1089971bb1a5SLionel Sambuc         /* isvoid */ 1
1090971bb1a5SLionel Sambuc     };
1091971bb1a5SLionel Sambuc 
1092971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1093971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1094971bb1a5SLionel Sambuc     xcb_xv_put_still_request_t xcb_out;
1095971bb1a5SLionel Sambuc 
1096971bb1a5SLionel Sambuc     xcb_out.port = port;
1097971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1098971bb1a5SLionel Sambuc     xcb_out.gc = gc;
1099971bb1a5SLionel Sambuc     xcb_out.vid_x = vid_x;
1100971bb1a5SLionel Sambuc     xcb_out.vid_y = vid_y;
1101971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
1102971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
1103971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
1104971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
1105971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
1106971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
1107971bb1a5SLionel Sambuc 
1108971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1109971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1110971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1111971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1112971bb1a5SLionel Sambuc 
1113971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1114971bb1a5SLionel Sambuc     return xcb_ret;
1115971bb1a5SLionel Sambuc }
1116971bb1a5SLionel Sambuc 
1117971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_get_video_checked(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,int16_t vid_x,int16_t vid_y,uint16_t vid_w,uint16_t vid_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h)1118971bb1a5SLionel Sambuc xcb_xv_get_video_checked (xcb_connection_t *c  /**< */,
1119971bb1a5SLionel Sambuc                           xcb_xv_port_t     port  /**< */,
1120971bb1a5SLionel Sambuc                           xcb_drawable_t    drawable  /**< */,
1121971bb1a5SLionel Sambuc                           xcb_gcontext_t    gc  /**< */,
1122971bb1a5SLionel Sambuc                           int16_t           vid_x  /**< */,
1123971bb1a5SLionel Sambuc                           int16_t           vid_y  /**< */,
1124971bb1a5SLionel Sambuc                           uint16_t          vid_w  /**< */,
1125971bb1a5SLionel Sambuc                           uint16_t          vid_h  /**< */,
1126971bb1a5SLionel Sambuc                           int16_t           drw_x  /**< */,
1127971bb1a5SLionel Sambuc                           int16_t           drw_y  /**< */,
1128971bb1a5SLionel Sambuc                           uint16_t          drw_w  /**< */,
1129971bb1a5SLionel Sambuc                           uint16_t          drw_h  /**< */)
1130971bb1a5SLionel Sambuc {
1131971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1132971bb1a5SLionel Sambuc         /* count */ 2,
1133971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1134971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_GET_VIDEO,
1135971bb1a5SLionel Sambuc         /* isvoid */ 1
1136971bb1a5SLionel Sambuc     };
1137971bb1a5SLionel Sambuc 
1138971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1139971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1140971bb1a5SLionel Sambuc     xcb_xv_get_video_request_t xcb_out;
1141971bb1a5SLionel Sambuc 
1142971bb1a5SLionel Sambuc     xcb_out.port = port;
1143971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1144971bb1a5SLionel Sambuc     xcb_out.gc = gc;
1145971bb1a5SLionel Sambuc     xcb_out.vid_x = vid_x;
1146971bb1a5SLionel Sambuc     xcb_out.vid_y = vid_y;
1147971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
1148971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
1149971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
1150971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
1151971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
1152971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
1153971bb1a5SLionel Sambuc 
1154971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1155971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1156971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1157971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1158971bb1a5SLionel Sambuc 
1159971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1160971bb1a5SLionel Sambuc     return xcb_ret;
1161971bb1a5SLionel Sambuc }
1162971bb1a5SLionel Sambuc 
1163971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_get_video(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,int16_t vid_x,int16_t vid_y,uint16_t vid_w,uint16_t vid_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h)1164971bb1a5SLionel Sambuc xcb_xv_get_video (xcb_connection_t *c  /**< */,
1165971bb1a5SLionel Sambuc                   xcb_xv_port_t     port  /**< */,
1166971bb1a5SLionel Sambuc                   xcb_drawable_t    drawable  /**< */,
1167971bb1a5SLionel Sambuc                   xcb_gcontext_t    gc  /**< */,
1168971bb1a5SLionel Sambuc                   int16_t           vid_x  /**< */,
1169971bb1a5SLionel Sambuc                   int16_t           vid_y  /**< */,
1170971bb1a5SLionel Sambuc                   uint16_t          vid_w  /**< */,
1171971bb1a5SLionel Sambuc                   uint16_t          vid_h  /**< */,
1172971bb1a5SLionel Sambuc                   int16_t           drw_x  /**< */,
1173971bb1a5SLionel Sambuc                   int16_t           drw_y  /**< */,
1174971bb1a5SLionel Sambuc                   uint16_t          drw_w  /**< */,
1175971bb1a5SLionel Sambuc                   uint16_t          drw_h  /**< */)
1176971bb1a5SLionel Sambuc {
1177971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1178971bb1a5SLionel Sambuc         /* count */ 2,
1179971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1180971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_GET_VIDEO,
1181971bb1a5SLionel Sambuc         /* isvoid */ 1
1182971bb1a5SLionel Sambuc     };
1183971bb1a5SLionel Sambuc 
1184971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1185971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1186971bb1a5SLionel Sambuc     xcb_xv_get_video_request_t xcb_out;
1187971bb1a5SLionel Sambuc 
1188971bb1a5SLionel Sambuc     xcb_out.port = port;
1189971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1190971bb1a5SLionel Sambuc     xcb_out.gc = gc;
1191971bb1a5SLionel Sambuc     xcb_out.vid_x = vid_x;
1192971bb1a5SLionel Sambuc     xcb_out.vid_y = vid_y;
1193971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
1194971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
1195971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
1196971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
1197971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
1198971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
1199971bb1a5SLionel Sambuc 
1200971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1201971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1202971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1203971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1204971bb1a5SLionel Sambuc 
1205971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1206971bb1a5SLionel Sambuc     return xcb_ret;
1207971bb1a5SLionel Sambuc }
1208971bb1a5SLionel Sambuc 
1209971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_get_still_checked(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,int16_t vid_x,int16_t vid_y,uint16_t vid_w,uint16_t vid_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h)1210971bb1a5SLionel Sambuc xcb_xv_get_still_checked (xcb_connection_t *c  /**< */,
1211971bb1a5SLionel Sambuc                           xcb_xv_port_t     port  /**< */,
1212971bb1a5SLionel Sambuc                           xcb_drawable_t    drawable  /**< */,
1213971bb1a5SLionel Sambuc                           xcb_gcontext_t    gc  /**< */,
1214971bb1a5SLionel Sambuc                           int16_t           vid_x  /**< */,
1215971bb1a5SLionel Sambuc                           int16_t           vid_y  /**< */,
1216971bb1a5SLionel Sambuc                           uint16_t          vid_w  /**< */,
1217971bb1a5SLionel Sambuc                           uint16_t          vid_h  /**< */,
1218971bb1a5SLionel Sambuc                           int16_t           drw_x  /**< */,
1219971bb1a5SLionel Sambuc                           int16_t           drw_y  /**< */,
1220971bb1a5SLionel Sambuc                           uint16_t          drw_w  /**< */,
1221971bb1a5SLionel Sambuc                           uint16_t          drw_h  /**< */)
1222971bb1a5SLionel Sambuc {
1223971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1224971bb1a5SLionel Sambuc         /* count */ 2,
1225971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1226971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_GET_STILL,
1227971bb1a5SLionel Sambuc         /* isvoid */ 1
1228971bb1a5SLionel Sambuc     };
1229971bb1a5SLionel Sambuc 
1230971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1231971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1232971bb1a5SLionel Sambuc     xcb_xv_get_still_request_t xcb_out;
1233971bb1a5SLionel Sambuc 
1234971bb1a5SLionel Sambuc     xcb_out.port = port;
1235971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1236971bb1a5SLionel Sambuc     xcb_out.gc = gc;
1237971bb1a5SLionel Sambuc     xcb_out.vid_x = vid_x;
1238971bb1a5SLionel Sambuc     xcb_out.vid_y = vid_y;
1239971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
1240971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
1241971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
1242971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
1243971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
1244971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
1245971bb1a5SLionel Sambuc 
1246971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1247971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1248971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1249971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1250971bb1a5SLionel Sambuc 
1251971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1252971bb1a5SLionel Sambuc     return xcb_ret;
1253971bb1a5SLionel Sambuc }
1254971bb1a5SLionel Sambuc 
1255971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_get_still(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,int16_t vid_x,int16_t vid_y,uint16_t vid_w,uint16_t vid_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h)1256971bb1a5SLionel Sambuc xcb_xv_get_still (xcb_connection_t *c  /**< */,
1257971bb1a5SLionel Sambuc                   xcb_xv_port_t     port  /**< */,
1258971bb1a5SLionel Sambuc                   xcb_drawable_t    drawable  /**< */,
1259971bb1a5SLionel Sambuc                   xcb_gcontext_t    gc  /**< */,
1260971bb1a5SLionel Sambuc                   int16_t           vid_x  /**< */,
1261971bb1a5SLionel Sambuc                   int16_t           vid_y  /**< */,
1262971bb1a5SLionel Sambuc                   uint16_t          vid_w  /**< */,
1263971bb1a5SLionel Sambuc                   uint16_t          vid_h  /**< */,
1264971bb1a5SLionel Sambuc                   int16_t           drw_x  /**< */,
1265971bb1a5SLionel Sambuc                   int16_t           drw_y  /**< */,
1266971bb1a5SLionel Sambuc                   uint16_t          drw_w  /**< */,
1267971bb1a5SLionel Sambuc                   uint16_t          drw_h  /**< */)
1268971bb1a5SLionel Sambuc {
1269971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1270971bb1a5SLionel Sambuc         /* count */ 2,
1271971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1272971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_GET_STILL,
1273971bb1a5SLionel Sambuc         /* isvoid */ 1
1274971bb1a5SLionel Sambuc     };
1275971bb1a5SLionel Sambuc 
1276971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1277971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1278971bb1a5SLionel Sambuc     xcb_xv_get_still_request_t xcb_out;
1279971bb1a5SLionel Sambuc 
1280971bb1a5SLionel Sambuc     xcb_out.port = port;
1281971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1282971bb1a5SLionel Sambuc     xcb_out.gc = gc;
1283971bb1a5SLionel Sambuc     xcb_out.vid_x = vid_x;
1284971bb1a5SLionel Sambuc     xcb_out.vid_y = vid_y;
1285971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
1286971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
1287971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
1288971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
1289971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
1290971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
1291971bb1a5SLionel Sambuc 
1292971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1293971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1294971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1295971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1296971bb1a5SLionel Sambuc 
1297971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1298971bb1a5SLionel Sambuc     return xcb_ret;
1299971bb1a5SLionel Sambuc }
1300971bb1a5SLionel Sambuc 
1301971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_stop_video_checked(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable)1302971bb1a5SLionel Sambuc xcb_xv_stop_video_checked (xcb_connection_t *c  /**< */,
1303971bb1a5SLionel Sambuc                            xcb_xv_port_t     port  /**< */,
1304971bb1a5SLionel Sambuc                            xcb_drawable_t    drawable  /**< */)
1305971bb1a5SLionel Sambuc {
1306971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1307971bb1a5SLionel Sambuc         /* count */ 2,
1308971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1309971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_STOP_VIDEO,
1310971bb1a5SLionel Sambuc         /* isvoid */ 1
1311971bb1a5SLionel Sambuc     };
1312971bb1a5SLionel Sambuc 
1313971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1314971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1315971bb1a5SLionel Sambuc     xcb_xv_stop_video_request_t xcb_out;
1316971bb1a5SLionel Sambuc 
1317971bb1a5SLionel Sambuc     xcb_out.port = port;
1318971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1319971bb1a5SLionel Sambuc 
1320971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1321971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1322971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1323971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1324971bb1a5SLionel Sambuc 
1325971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1326971bb1a5SLionel Sambuc     return xcb_ret;
1327971bb1a5SLionel Sambuc }
1328971bb1a5SLionel Sambuc 
1329971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_stop_video(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable)1330971bb1a5SLionel Sambuc xcb_xv_stop_video (xcb_connection_t *c  /**< */,
1331971bb1a5SLionel Sambuc                    xcb_xv_port_t     port  /**< */,
1332971bb1a5SLionel Sambuc                    xcb_drawable_t    drawable  /**< */)
1333971bb1a5SLionel Sambuc {
1334971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1335971bb1a5SLionel Sambuc         /* count */ 2,
1336971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1337971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_STOP_VIDEO,
1338971bb1a5SLionel Sambuc         /* isvoid */ 1
1339971bb1a5SLionel Sambuc     };
1340971bb1a5SLionel Sambuc 
1341971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1342971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1343971bb1a5SLionel Sambuc     xcb_xv_stop_video_request_t xcb_out;
1344971bb1a5SLionel Sambuc 
1345971bb1a5SLionel Sambuc     xcb_out.port = port;
1346971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1347971bb1a5SLionel Sambuc 
1348971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1349971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1350971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1351971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1352971bb1a5SLionel Sambuc 
1353971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1354971bb1a5SLionel Sambuc     return xcb_ret;
1355971bb1a5SLionel Sambuc }
1356971bb1a5SLionel Sambuc 
1357971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_select_video_notify_checked(xcb_connection_t * c,xcb_drawable_t drawable,uint8_t onoff)1358971bb1a5SLionel Sambuc xcb_xv_select_video_notify_checked (xcb_connection_t *c  /**< */,
1359971bb1a5SLionel Sambuc                                     xcb_drawable_t    drawable  /**< */,
1360971bb1a5SLionel Sambuc                                     uint8_t           onoff  /**< */)
1361971bb1a5SLionel Sambuc {
1362971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1363971bb1a5SLionel Sambuc         /* count */ 2,
1364971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1365971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_SELECT_VIDEO_NOTIFY,
1366971bb1a5SLionel Sambuc         /* isvoid */ 1
1367971bb1a5SLionel Sambuc     };
1368971bb1a5SLionel Sambuc 
1369971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1370971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1371971bb1a5SLionel Sambuc     xcb_xv_select_video_notify_request_t xcb_out;
1372971bb1a5SLionel Sambuc 
1373971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1374971bb1a5SLionel Sambuc     xcb_out.onoff = onoff;
1375971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
1376971bb1a5SLionel Sambuc 
1377971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1378971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1379971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1380971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1381971bb1a5SLionel Sambuc 
1382971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1383971bb1a5SLionel Sambuc     return xcb_ret;
1384971bb1a5SLionel Sambuc }
1385971bb1a5SLionel Sambuc 
1386971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_select_video_notify(xcb_connection_t * c,xcb_drawable_t drawable,uint8_t onoff)1387971bb1a5SLionel Sambuc xcb_xv_select_video_notify (xcb_connection_t *c  /**< */,
1388971bb1a5SLionel Sambuc                             xcb_drawable_t    drawable  /**< */,
1389971bb1a5SLionel Sambuc                             uint8_t           onoff  /**< */)
1390971bb1a5SLionel Sambuc {
1391971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1392971bb1a5SLionel Sambuc         /* count */ 2,
1393971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1394971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_SELECT_VIDEO_NOTIFY,
1395971bb1a5SLionel Sambuc         /* isvoid */ 1
1396971bb1a5SLionel Sambuc     };
1397971bb1a5SLionel Sambuc 
1398971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1399971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1400971bb1a5SLionel Sambuc     xcb_xv_select_video_notify_request_t xcb_out;
1401971bb1a5SLionel Sambuc 
1402971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
1403971bb1a5SLionel Sambuc     xcb_out.onoff = onoff;
1404971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
1405971bb1a5SLionel Sambuc 
1406971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1407971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1408971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1409971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1410971bb1a5SLionel Sambuc 
1411971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1412971bb1a5SLionel Sambuc     return xcb_ret;
1413971bb1a5SLionel Sambuc }
1414971bb1a5SLionel Sambuc 
1415971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_select_port_notify_checked(xcb_connection_t * c,xcb_xv_port_t port,uint8_t onoff)1416971bb1a5SLionel Sambuc xcb_xv_select_port_notify_checked (xcb_connection_t *c  /**< */,
1417971bb1a5SLionel Sambuc                                    xcb_xv_port_t     port  /**< */,
1418971bb1a5SLionel Sambuc                                    uint8_t           onoff  /**< */)
1419971bb1a5SLionel Sambuc {
1420971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1421971bb1a5SLionel Sambuc         /* count */ 2,
1422971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1423971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_SELECT_PORT_NOTIFY,
1424971bb1a5SLionel Sambuc         /* isvoid */ 1
1425971bb1a5SLionel Sambuc     };
1426971bb1a5SLionel Sambuc 
1427971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1428971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1429971bb1a5SLionel Sambuc     xcb_xv_select_port_notify_request_t xcb_out;
1430971bb1a5SLionel Sambuc 
1431971bb1a5SLionel Sambuc     xcb_out.port = port;
1432971bb1a5SLionel Sambuc     xcb_out.onoff = onoff;
1433971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
1434971bb1a5SLionel Sambuc 
1435971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1436971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1437971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1438971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1439971bb1a5SLionel Sambuc 
1440971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1441971bb1a5SLionel Sambuc     return xcb_ret;
1442971bb1a5SLionel Sambuc }
1443971bb1a5SLionel Sambuc 
1444971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_select_port_notify(xcb_connection_t * c,xcb_xv_port_t port,uint8_t onoff)1445971bb1a5SLionel Sambuc xcb_xv_select_port_notify (xcb_connection_t *c  /**< */,
1446971bb1a5SLionel Sambuc                            xcb_xv_port_t     port  /**< */,
1447971bb1a5SLionel Sambuc                            uint8_t           onoff  /**< */)
1448971bb1a5SLionel Sambuc {
1449971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1450971bb1a5SLionel Sambuc         /* count */ 2,
1451971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1452971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_SELECT_PORT_NOTIFY,
1453971bb1a5SLionel Sambuc         /* isvoid */ 1
1454971bb1a5SLionel Sambuc     };
1455971bb1a5SLionel Sambuc 
1456971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1457971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1458971bb1a5SLionel Sambuc     xcb_xv_select_port_notify_request_t xcb_out;
1459971bb1a5SLionel Sambuc 
1460971bb1a5SLionel Sambuc     xcb_out.port = port;
1461971bb1a5SLionel Sambuc     xcb_out.onoff = onoff;
1462971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
1463971bb1a5SLionel Sambuc 
1464971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1465971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1466971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1467971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1468971bb1a5SLionel Sambuc 
1469971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1470971bb1a5SLionel Sambuc     return xcb_ret;
1471971bb1a5SLionel Sambuc }
1472971bb1a5SLionel Sambuc 
1473971bb1a5SLionel Sambuc xcb_xv_query_best_size_cookie_t
xcb_xv_query_best_size(xcb_connection_t * c,xcb_xv_port_t port,uint16_t vid_w,uint16_t vid_h,uint16_t drw_w,uint16_t drw_h,uint8_t motion)1474971bb1a5SLionel Sambuc xcb_xv_query_best_size (xcb_connection_t *c  /**< */,
1475971bb1a5SLionel Sambuc                         xcb_xv_port_t     port  /**< */,
1476971bb1a5SLionel Sambuc                         uint16_t          vid_w  /**< */,
1477971bb1a5SLionel Sambuc                         uint16_t          vid_h  /**< */,
1478971bb1a5SLionel Sambuc                         uint16_t          drw_w  /**< */,
1479971bb1a5SLionel Sambuc                         uint16_t          drw_h  /**< */,
1480971bb1a5SLionel Sambuc                         uint8_t           motion  /**< */)
1481971bb1a5SLionel Sambuc {
1482971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1483971bb1a5SLionel Sambuc         /* count */ 2,
1484971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1485971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_BEST_SIZE,
1486971bb1a5SLionel Sambuc         /* isvoid */ 0
1487971bb1a5SLionel Sambuc     };
1488971bb1a5SLionel Sambuc 
1489971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1490971bb1a5SLionel Sambuc     xcb_xv_query_best_size_cookie_t xcb_ret;
1491971bb1a5SLionel Sambuc     xcb_xv_query_best_size_request_t xcb_out;
1492971bb1a5SLionel Sambuc 
1493971bb1a5SLionel Sambuc     xcb_out.port = port;
1494971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
1495971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
1496971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
1497971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
1498971bb1a5SLionel Sambuc     xcb_out.motion = motion;
1499971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
1500971bb1a5SLionel Sambuc 
1501971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1502971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1503971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1504971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1505971bb1a5SLionel Sambuc 
1506971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1507971bb1a5SLionel Sambuc     return xcb_ret;
1508971bb1a5SLionel Sambuc }
1509971bb1a5SLionel Sambuc 
1510971bb1a5SLionel Sambuc xcb_xv_query_best_size_cookie_t
xcb_xv_query_best_size_unchecked(xcb_connection_t * c,xcb_xv_port_t port,uint16_t vid_w,uint16_t vid_h,uint16_t drw_w,uint16_t drw_h,uint8_t motion)1511971bb1a5SLionel Sambuc xcb_xv_query_best_size_unchecked (xcb_connection_t *c  /**< */,
1512971bb1a5SLionel Sambuc                                   xcb_xv_port_t     port  /**< */,
1513971bb1a5SLionel Sambuc                                   uint16_t          vid_w  /**< */,
1514971bb1a5SLionel Sambuc                                   uint16_t          vid_h  /**< */,
1515971bb1a5SLionel Sambuc                                   uint16_t          drw_w  /**< */,
1516971bb1a5SLionel Sambuc                                   uint16_t          drw_h  /**< */,
1517971bb1a5SLionel Sambuc                                   uint8_t           motion  /**< */)
1518971bb1a5SLionel Sambuc {
1519971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1520971bb1a5SLionel Sambuc         /* count */ 2,
1521971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1522971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_BEST_SIZE,
1523971bb1a5SLionel Sambuc         /* isvoid */ 0
1524971bb1a5SLionel Sambuc     };
1525971bb1a5SLionel Sambuc 
1526971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1527971bb1a5SLionel Sambuc     xcb_xv_query_best_size_cookie_t xcb_ret;
1528971bb1a5SLionel Sambuc     xcb_xv_query_best_size_request_t xcb_out;
1529971bb1a5SLionel Sambuc 
1530971bb1a5SLionel Sambuc     xcb_out.port = port;
1531971bb1a5SLionel Sambuc     xcb_out.vid_w = vid_w;
1532971bb1a5SLionel Sambuc     xcb_out.vid_h = vid_h;
1533971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
1534971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
1535971bb1a5SLionel Sambuc     xcb_out.motion = motion;
1536971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
1537971bb1a5SLionel Sambuc 
1538971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1539971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1540971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1541971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1542971bb1a5SLionel Sambuc 
1543971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1544971bb1a5SLionel Sambuc     return xcb_ret;
1545971bb1a5SLionel Sambuc }
1546971bb1a5SLionel Sambuc 
1547971bb1a5SLionel Sambuc xcb_xv_query_best_size_reply_t *
xcb_xv_query_best_size_reply(xcb_connection_t * c,xcb_xv_query_best_size_cookie_t cookie,xcb_generic_error_t ** e)1548971bb1a5SLionel Sambuc xcb_xv_query_best_size_reply (xcb_connection_t                 *c  /**< */,
1549971bb1a5SLionel Sambuc                               xcb_xv_query_best_size_cookie_t   cookie  /**< */,
1550971bb1a5SLionel Sambuc                               xcb_generic_error_t             **e  /**< */)
1551971bb1a5SLionel Sambuc {
1552971bb1a5SLionel Sambuc     return (xcb_xv_query_best_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1553971bb1a5SLionel Sambuc }
1554971bb1a5SLionel Sambuc 
1555971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_set_port_attribute_checked(xcb_connection_t * c,xcb_xv_port_t port,xcb_atom_t attribute,int32_t value)1556971bb1a5SLionel Sambuc xcb_xv_set_port_attribute_checked (xcb_connection_t *c  /**< */,
1557971bb1a5SLionel Sambuc                                    xcb_xv_port_t     port  /**< */,
1558971bb1a5SLionel Sambuc                                    xcb_atom_t        attribute  /**< */,
1559971bb1a5SLionel Sambuc                                    int32_t           value  /**< */)
1560971bb1a5SLionel Sambuc {
1561971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1562971bb1a5SLionel Sambuc         /* count */ 2,
1563971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1564971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_SET_PORT_ATTRIBUTE,
1565971bb1a5SLionel Sambuc         /* isvoid */ 1
1566971bb1a5SLionel Sambuc     };
1567971bb1a5SLionel Sambuc 
1568971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1569971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1570971bb1a5SLionel Sambuc     xcb_xv_set_port_attribute_request_t xcb_out;
1571971bb1a5SLionel Sambuc 
1572971bb1a5SLionel Sambuc     xcb_out.port = port;
1573971bb1a5SLionel Sambuc     xcb_out.attribute = attribute;
1574971bb1a5SLionel Sambuc     xcb_out.value = value;
1575971bb1a5SLionel Sambuc 
1576971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1577971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1578971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1579971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1580971bb1a5SLionel Sambuc 
1581971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1582971bb1a5SLionel Sambuc     return xcb_ret;
1583971bb1a5SLionel Sambuc }
1584971bb1a5SLionel Sambuc 
1585971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_set_port_attribute(xcb_connection_t * c,xcb_xv_port_t port,xcb_atom_t attribute,int32_t value)1586971bb1a5SLionel Sambuc xcb_xv_set_port_attribute (xcb_connection_t *c  /**< */,
1587971bb1a5SLionel Sambuc                            xcb_xv_port_t     port  /**< */,
1588971bb1a5SLionel Sambuc                            xcb_atom_t        attribute  /**< */,
1589971bb1a5SLionel Sambuc                            int32_t           value  /**< */)
1590971bb1a5SLionel Sambuc {
1591971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1592971bb1a5SLionel Sambuc         /* count */ 2,
1593971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1594971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_SET_PORT_ATTRIBUTE,
1595971bb1a5SLionel Sambuc         /* isvoid */ 1
1596971bb1a5SLionel Sambuc     };
1597971bb1a5SLionel Sambuc 
1598971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1599971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
1600971bb1a5SLionel Sambuc     xcb_xv_set_port_attribute_request_t xcb_out;
1601971bb1a5SLionel Sambuc 
1602971bb1a5SLionel Sambuc     xcb_out.port = port;
1603971bb1a5SLionel Sambuc     xcb_out.attribute = attribute;
1604971bb1a5SLionel Sambuc     xcb_out.value = value;
1605971bb1a5SLionel Sambuc 
1606971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1607971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1608971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1609971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1610971bb1a5SLionel Sambuc 
1611971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1612971bb1a5SLionel Sambuc     return xcb_ret;
1613971bb1a5SLionel Sambuc }
1614971bb1a5SLionel Sambuc 
1615971bb1a5SLionel Sambuc xcb_xv_get_port_attribute_cookie_t
xcb_xv_get_port_attribute(xcb_connection_t * c,xcb_xv_port_t port,xcb_atom_t attribute)1616971bb1a5SLionel Sambuc xcb_xv_get_port_attribute (xcb_connection_t *c  /**< */,
1617971bb1a5SLionel Sambuc                            xcb_xv_port_t     port  /**< */,
1618971bb1a5SLionel Sambuc                            xcb_atom_t        attribute  /**< */)
1619971bb1a5SLionel Sambuc {
1620971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1621971bb1a5SLionel Sambuc         /* count */ 2,
1622971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1623971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_GET_PORT_ATTRIBUTE,
1624971bb1a5SLionel Sambuc         /* isvoid */ 0
1625971bb1a5SLionel Sambuc     };
1626971bb1a5SLionel Sambuc 
1627971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1628971bb1a5SLionel Sambuc     xcb_xv_get_port_attribute_cookie_t xcb_ret;
1629971bb1a5SLionel Sambuc     xcb_xv_get_port_attribute_request_t xcb_out;
1630971bb1a5SLionel Sambuc 
1631971bb1a5SLionel Sambuc     xcb_out.port = port;
1632971bb1a5SLionel Sambuc     xcb_out.attribute = attribute;
1633971bb1a5SLionel Sambuc 
1634971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1635971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1636971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1637971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1638971bb1a5SLionel Sambuc 
1639971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1640971bb1a5SLionel Sambuc     return xcb_ret;
1641971bb1a5SLionel Sambuc }
1642971bb1a5SLionel Sambuc 
1643971bb1a5SLionel Sambuc xcb_xv_get_port_attribute_cookie_t
xcb_xv_get_port_attribute_unchecked(xcb_connection_t * c,xcb_xv_port_t port,xcb_atom_t attribute)1644971bb1a5SLionel Sambuc xcb_xv_get_port_attribute_unchecked (xcb_connection_t *c  /**< */,
1645971bb1a5SLionel Sambuc                                      xcb_xv_port_t     port  /**< */,
1646971bb1a5SLionel Sambuc                                      xcb_atom_t        attribute  /**< */)
1647971bb1a5SLionel Sambuc {
1648971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1649971bb1a5SLionel Sambuc         /* count */ 2,
1650971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1651971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_GET_PORT_ATTRIBUTE,
1652971bb1a5SLionel Sambuc         /* isvoid */ 0
1653971bb1a5SLionel Sambuc     };
1654971bb1a5SLionel Sambuc 
1655971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1656971bb1a5SLionel Sambuc     xcb_xv_get_port_attribute_cookie_t xcb_ret;
1657971bb1a5SLionel Sambuc     xcb_xv_get_port_attribute_request_t xcb_out;
1658971bb1a5SLionel Sambuc 
1659971bb1a5SLionel Sambuc     xcb_out.port = port;
1660971bb1a5SLionel Sambuc     xcb_out.attribute = attribute;
1661971bb1a5SLionel Sambuc 
1662971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1663971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1664971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1665971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1666971bb1a5SLionel Sambuc 
1667971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1668971bb1a5SLionel Sambuc     return xcb_ret;
1669971bb1a5SLionel Sambuc }
1670971bb1a5SLionel Sambuc 
1671971bb1a5SLionel Sambuc xcb_xv_get_port_attribute_reply_t *
xcb_xv_get_port_attribute_reply(xcb_connection_t * c,xcb_xv_get_port_attribute_cookie_t cookie,xcb_generic_error_t ** e)1672971bb1a5SLionel Sambuc xcb_xv_get_port_attribute_reply (xcb_connection_t                    *c  /**< */,
1673971bb1a5SLionel Sambuc                                  xcb_xv_get_port_attribute_cookie_t   cookie  /**< */,
1674971bb1a5SLionel Sambuc                                  xcb_generic_error_t                **e  /**< */)
1675971bb1a5SLionel Sambuc {
1676971bb1a5SLionel Sambuc     return (xcb_xv_get_port_attribute_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1677971bb1a5SLionel Sambuc }
1678971bb1a5SLionel Sambuc 
1679971bb1a5SLionel Sambuc int
xcb_xv_query_port_attributes_sizeof(const void * _buffer)1680971bb1a5SLionel Sambuc xcb_xv_query_port_attributes_sizeof (const void  *_buffer  /**< */)
1681971bb1a5SLionel Sambuc {
1682971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
1683971bb1a5SLionel Sambuc     const xcb_xv_query_port_attributes_reply_t *_aux = (xcb_xv_query_port_attributes_reply_t *)_buffer;
1684971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
1685971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
1686971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
1687*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
1688971bb1a5SLionel Sambuc 
1689971bb1a5SLionel Sambuc     unsigned int i;
1690971bb1a5SLionel Sambuc     unsigned int xcb_tmp_len;
1691971bb1a5SLionel Sambuc 
1692971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_query_port_attributes_reply_t);
1693971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
1694*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
1695*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
1696971bb1a5SLionel Sambuc     /* attributes */
1697971bb1a5SLionel Sambuc     for(i=0; i<_aux->num_attributes; i++) {
1698971bb1a5SLionel Sambuc         xcb_tmp_len = xcb_xv_attribute_info_sizeof(xcb_tmp);
1699971bb1a5SLionel Sambuc         xcb_block_len += xcb_tmp_len;
1700971bb1a5SLionel Sambuc         xcb_tmp += xcb_tmp_len;
1701971bb1a5SLionel Sambuc     }
1702971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(xcb_xv_attribute_info_t);
1703971bb1a5SLionel Sambuc     /* insert padding */
1704971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1705971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
1706971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
1707971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
1708971bb1a5SLionel Sambuc         xcb_pad = 0;
1709971bb1a5SLionel Sambuc     }
1710971bb1a5SLionel Sambuc     xcb_block_len = 0;
1711971bb1a5SLionel Sambuc 
1712971bb1a5SLionel Sambuc     return xcb_buffer_len;
1713971bb1a5SLionel Sambuc }
1714971bb1a5SLionel Sambuc 
1715971bb1a5SLionel Sambuc xcb_xv_query_port_attributes_cookie_t
xcb_xv_query_port_attributes(xcb_connection_t * c,xcb_xv_port_t port)1716971bb1a5SLionel Sambuc xcb_xv_query_port_attributes (xcb_connection_t *c  /**< */,
1717971bb1a5SLionel Sambuc                               xcb_xv_port_t     port  /**< */)
1718971bb1a5SLionel Sambuc {
1719971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1720971bb1a5SLionel Sambuc         /* count */ 2,
1721971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1722971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_PORT_ATTRIBUTES,
1723971bb1a5SLionel Sambuc         /* isvoid */ 0
1724971bb1a5SLionel Sambuc     };
1725971bb1a5SLionel Sambuc 
1726971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1727971bb1a5SLionel Sambuc     xcb_xv_query_port_attributes_cookie_t xcb_ret;
1728971bb1a5SLionel Sambuc     xcb_xv_query_port_attributes_request_t xcb_out;
1729971bb1a5SLionel Sambuc 
1730971bb1a5SLionel Sambuc     xcb_out.port = port;
1731971bb1a5SLionel Sambuc 
1732971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1733971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1734971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1735971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1736971bb1a5SLionel Sambuc 
1737971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1738971bb1a5SLionel Sambuc     return xcb_ret;
1739971bb1a5SLionel Sambuc }
1740971bb1a5SLionel Sambuc 
1741971bb1a5SLionel Sambuc xcb_xv_query_port_attributes_cookie_t
xcb_xv_query_port_attributes_unchecked(xcb_connection_t * c,xcb_xv_port_t port)1742971bb1a5SLionel Sambuc xcb_xv_query_port_attributes_unchecked (xcb_connection_t *c  /**< */,
1743971bb1a5SLionel Sambuc                                         xcb_xv_port_t     port  /**< */)
1744971bb1a5SLionel Sambuc {
1745971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1746971bb1a5SLionel Sambuc         /* count */ 2,
1747971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1748971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_PORT_ATTRIBUTES,
1749971bb1a5SLionel Sambuc         /* isvoid */ 0
1750971bb1a5SLionel Sambuc     };
1751971bb1a5SLionel Sambuc 
1752971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1753971bb1a5SLionel Sambuc     xcb_xv_query_port_attributes_cookie_t xcb_ret;
1754971bb1a5SLionel Sambuc     xcb_xv_query_port_attributes_request_t xcb_out;
1755971bb1a5SLionel Sambuc 
1756971bb1a5SLionel Sambuc     xcb_out.port = port;
1757971bb1a5SLionel Sambuc 
1758971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1759971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1760971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1761971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1762971bb1a5SLionel Sambuc 
1763971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1764971bb1a5SLionel Sambuc     return xcb_ret;
1765971bb1a5SLionel Sambuc }
1766971bb1a5SLionel Sambuc 
1767971bb1a5SLionel Sambuc int
xcb_xv_query_port_attributes_attributes_length(const xcb_xv_query_port_attributes_reply_t * R)1768971bb1a5SLionel Sambuc xcb_xv_query_port_attributes_attributes_length (const xcb_xv_query_port_attributes_reply_t *R  /**< */)
1769971bb1a5SLionel Sambuc {
1770971bb1a5SLionel Sambuc     return R->num_attributes;
1771971bb1a5SLionel Sambuc }
1772971bb1a5SLionel Sambuc 
1773971bb1a5SLionel Sambuc xcb_xv_attribute_info_iterator_t
xcb_xv_query_port_attributes_attributes_iterator(const xcb_xv_query_port_attributes_reply_t * R)1774971bb1a5SLionel Sambuc xcb_xv_query_port_attributes_attributes_iterator (const xcb_xv_query_port_attributes_reply_t *R  /**< */)
1775971bb1a5SLionel Sambuc {
1776971bb1a5SLionel Sambuc     xcb_xv_attribute_info_iterator_t i;
1777971bb1a5SLionel Sambuc     i.data = (xcb_xv_attribute_info_t *) (R + 1);
1778971bb1a5SLionel Sambuc     i.rem = R->num_attributes;
1779971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
1780971bb1a5SLionel Sambuc     return i;
1781971bb1a5SLionel Sambuc }
1782971bb1a5SLionel Sambuc 
1783971bb1a5SLionel Sambuc xcb_xv_query_port_attributes_reply_t *
xcb_xv_query_port_attributes_reply(xcb_connection_t * c,xcb_xv_query_port_attributes_cookie_t cookie,xcb_generic_error_t ** e)1784971bb1a5SLionel Sambuc xcb_xv_query_port_attributes_reply (xcb_connection_t                       *c  /**< */,
1785971bb1a5SLionel Sambuc                                     xcb_xv_query_port_attributes_cookie_t   cookie  /**< */,
1786971bb1a5SLionel Sambuc                                     xcb_generic_error_t                   **e  /**< */)
1787971bb1a5SLionel Sambuc {
1788971bb1a5SLionel Sambuc     return (xcb_xv_query_port_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1789971bb1a5SLionel Sambuc }
1790971bb1a5SLionel Sambuc 
1791971bb1a5SLionel Sambuc int
xcb_xv_list_image_formats_sizeof(const void * _buffer)1792971bb1a5SLionel Sambuc xcb_xv_list_image_formats_sizeof (const void  *_buffer  /**< */)
1793971bb1a5SLionel Sambuc {
1794971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
1795971bb1a5SLionel Sambuc     const xcb_xv_list_image_formats_reply_t *_aux = (xcb_xv_list_image_formats_reply_t *)_buffer;
1796971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
1797971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
1798971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
1799*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
1800971bb1a5SLionel Sambuc 
1801971bb1a5SLionel Sambuc 
1802971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_list_image_formats_reply_t);
1803971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
1804*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
1805*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
1806971bb1a5SLionel Sambuc     /* format */
1807971bb1a5SLionel Sambuc     xcb_block_len += _aux->num_formats * sizeof(xcb_xv_image_format_info_t);
1808971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
1809971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(xcb_xv_image_format_info_t);
1810971bb1a5SLionel Sambuc     /* insert padding */
1811971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1812971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
1813971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
1814971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
1815971bb1a5SLionel Sambuc         xcb_pad = 0;
1816971bb1a5SLionel Sambuc     }
1817971bb1a5SLionel Sambuc     xcb_block_len = 0;
1818971bb1a5SLionel Sambuc 
1819971bb1a5SLionel Sambuc     return xcb_buffer_len;
1820971bb1a5SLionel Sambuc }
1821971bb1a5SLionel Sambuc 
1822971bb1a5SLionel Sambuc xcb_xv_list_image_formats_cookie_t
xcb_xv_list_image_formats(xcb_connection_t * c,xcb_xv_port_t port)1823971bb1a5SLionel Sambuc xcb_xv_list_image_formats (xcb_connection_t *c  /**< */,
1824971bb1a5SLionel Sambuc                            xcb_xv_port_t     port  /**< */)
1825971bb1a5SLionel Sambuc {
1826971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1827971bb1a5SLionel Sambuc         /* count */ 2,
1828971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1829971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_LIST_IMAGE_FORMATS,
1830971bb1a5SLionel Sambuc         /* isvoid */ 0
1831971bb1a5SLionel Sambuc     };
1832971bb1a5SLionel Sambuc 
1833971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1834971bb1a5SLionel Sambuc     xcb_xv_list_image_formats_cookie_t xcb_ret;
1835971bb1a5SLionel Sambuc     xcb_xv_list_image_formats_request_t xcb_out;
1836971bb1a5SLionel Sambuc 
1837971bb1a5SLionel Sambuc     xcb_out.port = port;
1838971bb1a5SLionel Sambuc 
1839971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1840971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1841971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1842971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1843971bb1a5SLionel Sambuc 
1844971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1845971bb1a5SLionel Sambuc     return xcb_ret;
1846971bb1a5SLionel Sambuc }
1847971bb1a5SLionel Sambuc 
1848971bb1a5SLionel Sambuc xcb_xv_list_image_formats_cookie_t
xcb_xv_list_image_formats_unchecked(xcb_connection_t * c,xcb_xv_port_t port)1849971bb1a5SLionel Sambuc xcb_xv_list_image_formats_unchecked (xcb_connection_t *c  /**< */,
1850971bb1a5SLionel Sambuc                                      xcb_xv_port_t     port  /**< */)
1851971bb1a5SLionel Sambuc {
1852971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1853971bb1a5SLionel Sambuc         /* count */ 2,
1854971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1855971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_LIST_IMAGE_FORMATS,
1856971bb1a5SLionel Sambuc         /* isvoid */ 0
1857971bb1a5SLionel Sambuc     };
1858971bb1a5SLionel Sambuc 
1859971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1860971bb1a5SLionel Sambuc     xcb_xv_list_image_formats_cookie_t xcb_ret;
1861971bb1a5SLionel Sambuc     xcb_xv_list_image_formats_request_t xcb_out;
1862971bb1a5SLionel Sambuc 
1863971bb1a5SLionel Sambuc     xcb_out.port = port;
1864971bb1a5SLionel Sambuc 
1865971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1866971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1867971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1868971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1869971bb1a5SLionel Sambuc 
1870971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1871971bb1a5SLionel Sambuc     return xcb_ret;
1872971bb1a5SLionel Sambuc }
1873971bb1a5SLionel Sambuc 
1874971bb1a5SLionel Sambuc xcb_xv_image_format_info_t *
xcb_xv_list_image_formats_format(const xcb_xv_list_image_formats_reply_t * R)1875971bb1a5SLionel Sambuc xcb_xv_list_image_formats_format (const xcb_xv_list_image_formats_reply_t *R  /**< */)
1876971bb1a5SLionel Sambuc {
1877971bb1a5SLionel Sambuc     return (xcb_xv_image_format_info_t *) (R + 1);
1878971bb1a5SLionel Sambuc }
1879971bb1a5SLionel Sambuc 
1880971bb1a5SLionel Sambuc int
xcb_xv_list_image_formats_format_length(const xcb_xv_list_image_formats_reply_t * R)1881971bb1a5SLionel Sambuc xcb_xv_list_image_formats_format_length (const xcb_xv_list_image_formats_reply_t *R  /**< */)
1882971bb1a5SLionel Sambuc {
1883971bb1a5SLionel Sambuc     return R->num_formats;
1884971bb1a5SLionel Sambuc }
1885971bb1a5SLionel Sambuc 
1886971bb1a5SLionel Sambuc xcb_xv_image_format_info_iterator_t
xcb_xv_list_image_formats_format_iterator(const xcb_xv_list_image_formats_reply_t * R)1887971bb1a5SLionel Sambuc xcb_xv_list_image_formats_format_iterator (const xcb_xv_list_image_formats_reply_t *R  /**< */)
1888971bb1a5SLionel Sambuc {
1889971bb1a5SLionel Sambuc     xcb_xv_image_format_info_iterator_t i;
1890971bb1a5SLionel Sambuc     i.data = (xcb_xv_image_format_info_t *) (R + 1);
1891971bb1a5SLionel Sambuc     i.rem = R->num_formats;
1892971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
1893971bb1a5SLionel Sambuc     return i;
1894971bb1a5SLionel Sambuc }
1895971bb1a5SLionel Sambuc 
1896971bb1a5SLionel Sambuc xcb_xv_list_image_formats_reply_t *
xcb_xv_list_image_formats_reply(xcb_connection_t * c,xcb_xv_list_image_formats_cookie_t cookie,xcb_generic_error_t ** e)1897971bb1a5SLionel Sambuc xcb_xv_list_image_formats_reply (xcb_connection_t                    *c  /**< */,
1898971bb1a5SLionel Sambuc                                  xcb_xv_list_image_formats_cookie_t   cookie  /**< */,
1899971bb1a5SLionel Sambuc                                  xcb_generic_error_t                **e  /**< */)
1900971bb1a5SLionel Sambuc {
1901971bb1a5SLionel Sambuc     return (xcb_xv_list_image_formats_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1902971bb1a5SLionel Sambuc }
1903971bb1a5SLionel Sambuc 
1904971bb1a5SLionel Sambuc int
xcb_xv_query_image_attributes_sizeof(const void * _buffer)1905971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_sizeof (const void  *_buffer  /**< */)
1906971bb1a5SLionel Sambuc {
1907971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
1908971bb1a5SLionel Sambuc     const xcb_xv_query_image_attributes_reply_t *_aux = (xcb_xv_query_image_attributes_reply_t *)_buffer;
1909971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
1910971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
1911971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
1912*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
1913971bb1a5SLionel Sambuc 
1914971bb1a5SLionel Sambuc 
1915971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_query_image_attributes_reply_t);
1916971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
1917*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
1918*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
1919971bb1a5SLionel Sambuc     /* pitches */
1920971bb1a5SLionel Sambuc     xcb_block_len += _aux->num_planes * sizeof(uint32_t);
1921971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
1922971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(uint32_t);
1923971bb1a5SLionel Sambuc     /* insert padding */
1924971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1925971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
1926971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
1927971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
1928971bb1a5SLionel Sambuc         xcb_pad = 0;
1929971bb1a5SLionel Sambuc     }
1930971bb1a5SLionel Sambuc     xcb_block_len = 0;
1931971bb1a5SLionel Sambuc     /* offsets */
1932971bb1a5SLionel Sambuc     xcb_block_len += _aux->num_planes * sizeof(uint32_t);
1933971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
1934971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(uint32_t);
1935971bb1a5SLionel Sambuc     /* insert padding */
1936971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1937971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
1938971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
1939971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
1940971bb1a5SLionel Sambuc         xcb_pad = 0;
1941971bb1a5SLionel Sambuc     }
1942971bb1a5SLionel Sambuc     xcb_block_len = 0;
1943971bb1a5SLionel Sambuc 
1944971bb1a5SLionel Sambuc     return xcb_buffer_len;
1945971bb1a5SLionel Sambuc }
1946971bb1a5SLionel Sambuc 
1947971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_cookie_t
xcb_xv_query_image_attributes(xcb_connection_t * c,xcb_xv_port_t port,uint32_t id,uint16_t width,uint16_t height)1948971bb1a5SLionel Sambuc xcb_xv_query_image_attributes (xcb_connection_t *c  /**< */,
1949971bb1a5SLionel Sambuc                                xcb_xv_port_t     port  /**< */,
1950971bb1a5SLionel Sambuc                                uint32_t          id  /**< */,
1951971bb1a5SLionel Sambuc                                uint16_t          width  /**< */,
1952971bb1a5SLionel Sambuc                                uint16_t          height  /**< */)
1953971bb1a5SLionel Sambuc {
1954971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1955971bb1a5SLionel Sambuc         /* count */ 2,
1956971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1957971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_IMAGE_ATTRIBUTES,
1958971bb1a5SLionel Sambuc         /* isvoid */ 0
1959971bb1a5SLionel Sambuc     };
1960971bb1a5SLionel Sambuc 
1961971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1962971bb1a5SLionel Sambuc     xcb_xv_query_image_attributes_cookie_t xcb_ret;
1963971bb1a5SLionel Sambuc     xcb_xv_query_image_attributes_request_t xcb_out;
1964971bb1a5SLionel Sambuc 
1965971bb1a5SLionel Sambuc     xcb_out.port = port;
1966971bb1a5SLionel Sambuc     xcb_out.id = id;
1967971bb1a5SLionel Sambuc     xcb_out.width = width;
1968971bb1a5SLionel Sambuc     xcb_out.height = height;
1969971bb1a5SLionel Sambuc 
1970971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
1971971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
1972971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
1973971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1974971bb1a5SLionel Sambuc 
1975971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1976971bb1a5SLionel Sambuc     return xcb_ret;
1977971bb1a5SLionel Sambuc }
1978971bb1a5SLionel Sambuc 
1979971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_cookie_t
xcb_xv_query_image_attributes_unchecked(xcb_connection_t * c,xcb_xv_port_t port,uint32_t id,uint16_t width,uint16_t height)1980971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_unchecked (xcb_connection_t *c  /**< */,
1981971bb1a5SLionel Sambuc                                          xcb_xv_port_t     port  /**< */,
1982971bb1a5SLionel Sambuc                                          uint32_t          id  /**< */,
1983971bb1a5SLionel Sambuc                                          uint16_t          width  /**< */,
1984971bb1a5SLionel Sambuc                                          uint16_t          height  /**< */)
1985971bb1a5SLionel Sambuc {
1986971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
1987971bb1a5SLionel Sambuc         /* count */ 2,
1988971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
1989971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_QUERY_IMAGE_ATTRIBUTES,
1990971bb1a5SLionel Sambuc         /* isvoid */ 0
1991971bb1a5SLionel Sambuc     };
1992971bb1a5SLionel Sambuc 
1993971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
1994971bb1a5SLionel Sambuc     xcb_xv_query_image_attributes_cookie_t xcb_ret;
1995971bb1a5SLionel Sambuc     xcb_xv_query_image_attributes_request_t xcb_out;
1996971bb1a5SLionel Sambuc 
1997971bb1a5SLionel Sambuc     xcb_out.port = port;
1998971bb1a5SLionel Sambuc     xcb_out.id = id;
1999971bb1a5SLionel Sambuc     xcb_out.width = width;
2000971bb1a5SLionel Sambuc     xcb_out.height = height;
2001971bb1a5SLionel Sambuc 
2002971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
2003971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
2004971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
2005971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2006971bb1a5SLionel Sambuc 
2007971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2008971bb1a5SLionel Sambuc     return xcb_ret;
2009971bb1a5SLionel Sambuc }
2010971bb1a5SLionel Sambuc 
2011971bb1a5SLionel Sambuc uint32_t *
xcb_xv_query_image_attributes_pitches(const xcb_xv_query_image_attributes_reply_t * R)2012971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_pitches (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
2013971bb1a5SLionel Sambuc {
2014971bb1a5SLionel Sambuc     return (uint32_t *) (R + 1);
2015971bb1a5SLionel Sambuc }
2016971bb1a5SLionel Sambuc 
2017971bb1a5SLionel Sambuc int
xcb_xv_query_image_attributes_pitches_length(const xcb_xv_query_image_attributes_reply_t * R)2018971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_pitches_length (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
2019971bb1a5SLionel Sambuc {
2020971bb1a5SLionel Sambuc     return R->num_planes;
2021971bb1a5SLionel Sambuc }
2022971bb1a5SLionel Sambuc 
2023971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_query_image_attributes_pitches_end(const xcb_xv_query_image_attributes_reply_t * R)2024971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_pitches_end (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
2025971bb1a5SLionel Sambuc {
2026971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
2027971bb1a5SLionel Sambuc     i.data = ((uint32_t *) (R + 1)) + (R->num_planes);
2028971bb1a5SLionel Sambuc     i.rem = 0;
2029971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
2030971bb1a5SLionel Sambuc     return i;
2031971bb1a5SLionel Sambuc }
2032971bb1a5SLionel Sambuc 
2033971bb1a5SLionel Sambuc uint32_t *
xcb_xv_query_image_attributes_offsets(const xcb_xv_query_image_attributes_reply_t * R)2034971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_offsets (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
2035971bb1a5SLionel Sambuc {
2036971bb1a5SLionel Sambuc     xcb_generic_iterator_t prev = xcb_xv_query_image_attributes_pitches_end(R);
2037971bb1a5SLionel Sambuc     return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
2038971bb1a5SLionel Sambuc }
2039971bb1a5SLionel Sambuc 
2040971bb1a5SLionel Sambuc int
xcb_xv_query_image_attributes_offsets_length(const xcb_xv_query_image_attributes_reply_t * R)2041971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_offsets_length (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
2042971bb1a5SLionel Sambuc {
2043971bb1a5SLionel Sambuc     return R->num_planes;
2044971bb1a5SLionel Sambuc }
2045971bb1a5SLionel Sambuc 
2046971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xv_query_image_attributes_offsets_end(const xcb_xv_query_image_attributes_reply_t * R)2047971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_offsets_end (const xcb_xv_query_image_attributes_reply_t *R  /**< */)
2048971bb1a5SLionel Sambuc {
2049971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
2050971bb1a5SLionel Sambuc     xcb_generic_iterator_t child = xcb_xv_query_image_attributes_pitches_end(R);
2051971bb1a5SLionel Sambuc     i.data = ((uint32_t *) child.data) + (R->num_planes);
2052971bb1a5SLionel Sambuc     i.rem = 0;
2053971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
2054971bb1a5SLionel Sambuc     return i;
2055971bb1a5SLionel Sambuc }
2056971bb1a5SLionel Sambuc 
2057971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_reply_t *
xcb_xv_query_image_attributes_reply(xcb_connection_t * c,xcb_xv_query_image_attributes_cookie_t cookie,xcb_generic_error_t ** e)2058971bb1a5SLionel Sambuc xcb_xv_query_image_attributes_reply (xcb_connection_t                        *c  /**< */,
2059971bb1a5SLionel Sambuc                                      xcb_xv_query_image_attributes_cookie_t   cookie  /**< */,
2060971bb1a5SLionel Sambuc                                      xcb_generic_error_t                    **e  /**< */)
2061971bb1a5SLionel Sambuc {
2062971bb1a5SLionel Sambuc     return (xcb_xv_query_image_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2063971bb1a5SLionel Sambuc }
2064971bb1a5SLionel Sambuc 
2065971bb1a5SLionel Sambuc int
xcb_xv_put_image_sizeof(const void * _buffer,uint32_t data_len)2066971bb1a5SLionel Sambuc xcb_xv_put_image_sizeof (const void  *_buffer  /**< */,
2067971bb1a5SLionel Sambuc                          uint32_t     data_len  /**< */)
2068971bb1a5SLionel Sambuc {
2069971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
2070971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
2071971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
2072971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
2073*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
2074971bb1a5SLionel Sambuc 
2075971bb1a5SLionel Sambuc 
2076971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xv_put_image_request_t);
2077971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
2078*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
2079*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
2080971bb1a5SLionel Sambuc     /* data */
2081971bb1a5SLionel Sambuc     xcb_block_len += data_len * sizeof(uint8_t);
2082971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
2083971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(uint8_t);
2084971bb1a5SLionel Sambuc     /* insert padding */
2085971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2086971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
2087971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
2088971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
2089971bb1a5SLionel Sambuc         xcb_pad = 0;
2090971bb1a5SLionel Sambuc     }
2091971bb1a5SLionel Sambuc     xcb_block_len = 0;
2092971bb1a5SLionel Sambuc 
2093971bb1a5SLionel Sambuc     return xcb_buffer_len;
2094971bb1a5SLionel Sambuc }
2095971bb1a5SLionel Sambuc 
2096971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_put_image_checked(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,uint32_t id,int16_t src_x,int16_t src_y,uint16_t src_w,uint16_t src_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h,uint16_t width,uint16_t height,uint32_t data_len,const uint8_t * data)2097971bb1a5SLionel Sambuc xcb_xv_put_image_checked (xcb_connection_t *c  /**< */,
2098971bb1a5SLionel Sambuc                           xcb_xv_port_t     port  /**< */,
2099971bb1a5SLionel Sambuc                           xcb_drawable_t    drawable  /**< */,
2100971bb1a5SLionel Sambuc                           xcb_gcontext_t    gc  /**< */,
2101971bb1a5SLionel Sambuc                           uint32_t          id  /**< */,
2102971bb1a5SLionel Sambuc                           int16_t           src_x  /**< */,
2103971bb1a5SLionel Sambuc                           int16_t           src_y  /**< */,
2104971bb1a5SLionel Sambuc                           uint16_t          src_w  /**< */,
2105971bb1a5SLionel Sambuc                           uint16_t          src_h  /**< */,
2106971bb1a5SLionel Sambuc                           int16_t           drw_x  /**< */,
2107971bb1a5SLionel Sambuc                           int16_t           drw_y  /**< */,
2108971bb1a5SLionel Sambuc                           uint16_t          drw_w  /**< */,
2109971bb1a5SLionel Sambuc                           uint16_t          drw_h  /**< */,
2110971bb1a5SLionel Sambuc                           uint16_t          width  /**< */,
2111971bb1a5SLionel Sambuc                           uint16_t          height  /**< */,
2112971bb1a5SLionel Sambuc                           uint32_t          data_len  /**< */,
2113971bb1a5SLionel Sambuc                           const uint8_t    *data  /**< */)
2114971bb1a5SLionel Sambuc {
2115971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
2116971bb1a5SLionel Sambuc         /* count */ 4,
2117971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
2118971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_PUT_IMAGE,
2119971bb1a5SLionel Sambuc         /* isvoid */ 1
2120971bb1a5SLionel Sambuc     };
2121971bb1a5SLionel Sambuc 
2122971bb1a5SLionel Sambuc     struct iovec xcb_parts[6];
2123971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
2124971bb1a5SLionel Sambuc     xcb_xv_put_image_request_t xcb_out;
2125971bb1a5SLionel Sambuc 
2126971bb1a5SLionel Sambuc     xcb_out.port = port;
2127971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
2128971bb1a5SLionel Sambuc     xcb_out.gc = gc;
2129971bb1a5SLionel Sambuc     xcb_out.id = id;
2130971bb1a5SLionel Sambuc     xcb_out.src_x = src_x;
2131971bb1a5SLionel Sambuc     xcb_out.src_y = src_y;
2132971bb1a5SLionel Sambuc     xcb_out.src_w = src_w;
2133971bb1a5SLionel Sambuc     xcb_out.src_h = src_h;
2134971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
2135971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
2136971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
2137971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
2138971bb1a5SLionel Sambuc     xcb_out.width = width;
2139971bb1a5SLionel Sambuc     xcb_out.height = height;
2140971bb1a5SLionel Sambuc 
2141971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
2142971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
2143971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
2144971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2145971bb1a5SLionel Sambuc     /* uint8_t data */
2146971bb1a5SLionel Sambuc     xcb_parts[4].iov_base = (char *) data;
2147971bb1a5SLionel Sambuc     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
2148971bb1a5SLionel Sambuc     xcb_parts[5].iov_base = 0;
2149971bb1a5SLionel Sambuc     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2150971bb1a5SLionel Sambuc 
2151971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2152971bb1a5SLionel Sambuc     return xcb_ret;
2153971bb1a5SLionel Sambuc }
2154971bb1a5SLionel Sambuc 
2155971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_put_image(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,uint32_t id,int16_t src_x,int16_t src_y,uint16_t src_w,uint16_t src_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h,uint16_t width,uint16_t height,uint32_t data_len,const uint8_t * data)2156971bb1a5SLionel Sambuc xcb_xv_put_image (xcb_connection_t *c  /**< */,
2157971bb1a5SLionel Sambuc                   xcb_xv_port_t     port  /**< */,
2158971bb1a5SLionel Sambuc                   xcb_drawable_t    drawable  /**< */,
2159971bb1a5SLionel Sambuc                   xcb_gcontext_t    gc  /**< */,
2160971bb1a5SLionel Sambuc                   uint32_t          id  /**< */,
2161971bb1a5SLionel Sambuc                   int16_t           src_x  /**< */,
2162971bb1a5SLionel Sambuc                   int16_t           src_y  /**< */,
2163971bb1a5SLionel Sambuc                   uint16_t          src_w  /**< */,
2164971bb1a5SLionel Sambuc                   uint16_t          src_h  /**< */,
2165971bb1a5SLionel Sambuc                   int16_t           drw_x  /**< */,
2166971bb1a5SLionel Sambuc                   int16_t           drw_y  /**< */,
2167971bb1a5SLionel Sambuc                   uint16_t          drw_w  /**< */,
2168971bb1a5SLionel Sambuc                   uint16_t          drw_h  /**< */,
2169971bb1a5SLionel Sambuc                   uint16_t          width  /**< */,
2170971bb1a5SLionel Sambuc                   uint16_t          height  /**< */,
2171971bb1a5SLionel Sambuc                   uint32_t          data_len  /**< */,
2172971bb1a5SLionel Sambuc                   const uint8_t    *data  /**< */)
2173971bb1a5SLionel Sambuc {
2174971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
2175971bb1a5SLionel Sambuc         /* count */ 4,
2176971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
2177971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_PUT_IMAGE,
2178971bb1a5SLionel Sambuc         /* isvoid */ 1
2179971bb1a5SLionel Sambuc     };
2180971bb1a5SLionel Sambuc 
2181971bb1a5SLionel Sambuc     struct iovec xcb_parts[6];
2182971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
2183971bb1a5SLionel Sambuc     xcb_xv_put_image_request_t xcb_out;
2184971bb1a5SLionel Sambuc 
2185971bb1a5SLionel Sambuc     xcb_out.port = port;
2186971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
2187971bb1a5SLionel Sambuc     xcb_out.gc = gc;
2188971bb1a5SLionel Sambuc     xcb_out.id = id;
2189971bb1a5SLionel Sambuc     xcb_out.src_x = src_x;
2190971bb1a5SLionel Sambuc     xcb_out.src_y = src_y;
2191971bb1a5SLionel Sambuc     xcb_out.src_w = src_w;
2192971bb1a5SLionel Sambuc     xcb_out.src_h = src_h;
2193971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
2194971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
2195971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
2196971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
2197971bb1a5SLionel Sambuc     xcb_out.width = width;
2198971bb1a5SLionel Sambuc     xcb_out.height = height;
2199971bb1a5SLionel Sambuc 
2200971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
2201971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
2202971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
2203971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2204971bb1a5SLionel Sambuc     /* uint8_t data */
2205971bb1a5SLionel Sambuc     xcb_parts[4].iov_base = (char *) data;
2206971bb1a5SLionel Sambuc     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
2207971bb1a5SLionel Sambuc     xcb_parts[5].iov_base = 0;
2208971bb1a5SLionel Sambuc     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2209971bb1a5SLionel Sambuc 
2210971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2211971bb1a5SLionel Sambuc     return xcb_ret;
2212971bb1a5SLionel Sambuc }
2213971bb1a5SLionel Sambuc 
2214971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_shm_put_image_checked(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,xcb_shm_seg_t shmseg,uint32_t id,uint32_t offset,int16_t src_x,int16_t src_y,uint16_t src_w,uint16_t src_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h,uint16_t width,uint16_t height,uint8_t send_event)2215971bb1a5SLionel Sambuc xcb_xv_shm_put_image_checked (xcb_connection_t *c  /**< */,
2216971bb1a5SLionel Sambuc                               xcb_xv_port_t     port  /**< */,
2217971bb1a5SLionel Sambuc                               xcb_drawable_t    drawable  /**< */,
2218971bb1a5SLionel Sambuc                               xcb_gcontext_t    gc  /**< */,
2219971bb1a5SLionel Sambuc                               xcb_shm_seg_t     shmseg  /**< */,
2220971bb1a5SLionel Sambuc                               uint32_t          id  /**< */,
2221971bb1a5SLionel Sambuc                               uint32_t          offset  /**< */,
2222971bb1a5SLionel Sambuc                               int16_t           src_x  /**< */,
2223971bb1a5SLionel Sambuc                               int16_t           src_y  /**< */,
2224971bb1a5SLionel Sambuc                               uint16_t          src_w  /**< */,
2225971bb1a5SLionel Sambuc                               uint16_t          src_h  /**< */,
2226971bb1a5SLionel Sambuc                               int16_t           drw_x  /**< */,
2227971bb1a5SLionel Sambuc                               int16_t           drw_y  /**< */,
2228971bb1a5SLionel Sambuc                               uint16_t          drw_w  /**< */,
2229971bb1a5SLionel Sambuc                               uint16_t          drw_h  /**< */,
2230971bb1a5SLionel Sambuc                               uint16_t          width  /**< */,
2231971bb1a5SLionel Sambuc                               uint16_t          height  /**< */,
2232971bb1a5SLionel Sambuc                               uint8_t           send_event  /**< */)
2233971bb1a5SLionel Sambuc {
2234971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
2235971bb1a5SLionel Sambuc         /* count */ 2,
2236971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
2237971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_SHM_PUT_IMAGE,
2238971bb1a5SLionel Sambuc         /* isvoid */ 1
2239971bb1a5SLionel Sambuc     };
2240971bb1a5SLionel Sambuc 
2241971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
2242971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
2243971bb1a5SLionel Sambuc     xcb_xv_shm_put_image_request_t xcb_out;
2244971bb1a5SLionel Sambuc 
2245971bb1a5SLionel Sambuc     xcb_out.port = port;
2246971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
2247971bb1a5SLionel Sambuc     xcb_out.gc = gc;
2248971bb1a5SLionel Sambuc     xcb_out.shmseg = shmseg;
2249971bb1a5SLionel Sambuc     xcb_out.id = id;
2250971bb1a5SLionel Sambuc     xcb_out.offset = offset;
2251971bb1a5SLionel Sambuc     xcb_out.src_x = src_x;
2252971bb1a5SLionel Sambuc     xcb_out.src_y = src_y;
2253971bb1a5SLionel Sambuc     xcb_out.src_w = src_w;
2254971bb1a5SLionel Sambuc     xcb_out.src_h = src_h;
2255971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
2256971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
2257971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
2258971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
2259971bb1a5SLionel Sambuc     xcb_out.width = width;
2260971bb1a5SLionel Sambuc     xcb_out.height = height;
2261971bb1a5SLionel Sambuc     xcb_out.send_event = send_event;
2262971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
2263971bb1a5SLionel Sambuc 
2264971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
2265971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
2266971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
2267971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2268971bb1a5SLionel Sambuc 
2269971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2270971bb1a5SLionel Sambuc     return xcb_ret;
2271971bb1a5SLionel Sambuc }
2272971bb1a5SLionel Sambuc 
2273971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xv_shm_put_image(xcb_connection_t * c,xcb_xv_port_t port,xcb_drawable_t drawable,xcb_gcontext_t gc,xcb_shm_seg_t shmseg,uint32_t id,uint32_t offset,int16_t src_x,int16_t src_y,uint16_t src_w,uint16_t src_h,int16_t drw_x,int16_t drw_y,uint16_t drw_w,uint16_t drw_h,uint16_t width,uint16_t height,uint8_t send_event)2274971bb1a5SLionel Sambuc xcb_xv_shm_put_image (xcb_connection_t *c  /**< */,
2275971bb1a5SLionel Sambuc                       xcb_xv_port_t     port  /**< */,
2276971bb1a5SLionel Sambuc                       xcb_drawable_t    drawable  /**< */,
2277971bb1a5SLionel Sambuc                       xcb_gcontext_t    gc  /**< */,
2278971bb1a5SLionel Sambuc                       xcb_shm_seg_t     shmseg  /**< */,
2279971bb1a5SLionel Sambuc                       uint32_t          id  /**< */,
2280971bb1a5SLionel Sambuc                       uint32_t          offset  /**< */,
2281971bb1a5SLionel Sambuc                       int16_t           src_x  /**< */,
2282971bb1a5SLionel Sambuc                       int16_t           src_y  /**< */,
2283971bb1a5SLionel Sambuc                       uint16_t          src_w  /**< */,
2284971bb1a5SLionel Sambuc                       uint16_t          src_h  /**< */,
2285971bb1a5SLionel Sambuc                       int16_t           drw_x  /**< */,
2286971bb1a5SLionel Sambuc                       int16_t           drw_y  /**< */,
2287971bb1a5SLionel Sambuc                       uint16_t          drw_w  /**< */,
2288971bb1a5SLionel Sambuc                       uint16_t          drw_h  /**< */,
2289971bb1a5SLionel Sambuc                       uint16_t          width  /**< */,
2290971bb1a5SLionel Sambuc                       uint16_t          height  /**< */,
2291971bb1a5SLionel Sambuc                       uint8_t           send_event  /**< */)
2292971bb1a5SLionel Sambuc {
2293971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
2294971bb1a5SLionel Sambuc         /* count */ 2,
2295971bb1a5SLionel Sambuc         /* ext */ &xcb_xv_id,
2296971bb1a5SLionel Sambuc         /* opcode */ XCB_XV_SHM_PUT_IMAGE,
2297971bb1a5SLionel Sambuc         /* isvoid */ 1
2298971bb1a5SLionel Sambuc     };
2299971bb1a5SLionel Sambuc 
2300971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
2301971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
2302971bb1a5SLionel Sambuc     xcb_xv_shm_put_image_request_t xcb_out;
2303971bb1a5SLionel Sambuc 
2304971bb1a5SLionel Sambuc     xcb_out.port = port;
2305971bb1a5SLionel Sambuc     xcb_out.drawable = drawable;
2306971bb1a5SLionel Sambuc     xcb_out.gc = gc;
2307971bb1a5SLionel Sambuc     xcb_out.shmseg = shmseg;
2308971bb1a5SLionel Sambuc     xcb_out.id = id;
2309971bb1a5SLionel Sambuc     xcb_out.offset = offset;
2310971bb1a5SLionel Sambuc     xcb_out.src_x = src_x;
2311971bb1a5SLionel Sambuc     xcb_out.src_y = src_y;
2312971bb1a5SLionel Sambuc     xcb_out.src_w = src_w;
2313971bb1a5SLionel Sambuc     xcb_out.src_h = src_h;
2314971bb1a5SLionel Sambuc     xcb_out.drw_x = drw_x;
2315971bb1a5SLionel Sambuc     xcb_out.drw_y = drw_y;
2316971bb1a5SLionel Sambuc     xcb_out.drw_w = drw_w;
2317971bb1a5SLionel Sambuc     xcb_out.drw_h = drw_h;
2318971bb1a5SLionel Sambuc     xcb_out.width = width;
2319971bb1a5SLionel Sambuc     xcb_out.height = height;
2320971bb1a5SLionel Sambuc     xcb_out.send_event = send_event;
2321971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
2322971bb1a5SLionel Sambuc 
2323971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
2324971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
2325971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
2326971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2327971bb1a5SLionel Sambuc 
2328971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2329971bb1a5SLionel Sambuc     return xcb_ret;
2330971bb1a5SLionel Sambuc }
2331971bb1a5SLionel Sambuc 
2332