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