1971bb1a5SLionel Sambuc /*
2971bb1a5SLionel Sambuc * This file generated automatically from render.xml by c_client.py.
3971bb1a5SLionel Sambuc * Edit at your peril.
4971bb1a5SLionel Sambuc */
5971bb1a5SLionel Sambuc
6971bb1a5SLionel Sambuc #ifdef HAVE_CONFIG_H
7971bb1a5SLionel Sambuc #include "config.h"
8971bb1a5SLionel Sambuc #endif
9971bb1a5SLionel Sambuc #include <stdlib.h>
10971bb1a5SLionel Sambuc #include <string.h>
11971bb1a5SLionel Sambuc #include <assert.h>
12971bb1a5SLionel Sambuc #include <stddef.h> /* for offsetof() */
13971bb1a5SLionel Sambuc #include "xcbext.h"
14971bb1a5SLionel Sambuc #include "render.h"
15971bb1a5SLionel Sambuc
16971bb1a5SLionel Sambuc #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17971bb1a5SLionel Sambuc #include "xproto.h"
18971bb1a5SLionel Sambuc
19971bb1a5SLionel Sambuc xcb_extension_t xcb_render_id = { "RENDER", 0 };
20971bb1a5SLionel Sambuc
21971bb1a5SLionel Sambuc void
xcb_render_glyph_next(xcb_render_glyph_iterator_t * i)22971bb1a5SLionel Sambuc xcb_render_glyph_next (xcb_render_glyph_iterator_t *i /**< */)
23971bb1a5SLionel Sambuc {
24971bb1a5SLionel Sambuc --i->rem;
25971bb1a5SLionel Sambuc ++i->data;
26971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_glyph_t);
27971bb1a5SLionel Sambuc }
28971bb1a5SLionel Sambuc
29971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_glyph_end(xcb_render_glyph_iterator_t i)30971bb1a5SLionel Sambuc xcb_render_glyph_end (xcb_render_glyph_iterator_t i /**< */)
31971bb1a5SLionel Sambuc {
32971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
33971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
34971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
35971bb1a5SLionel Sambuc ret.rem = 0;
36971bb1a5SLionel Sambuc return ret;
37971bb1a5SLionel Sambuc }
38971bb1a5SLionel Sambuc
39971bb1a5SLionel Sambuc void
xcb_render_glyphset_next(xcb_render_glyphset_iterator_t * i)40971bb1a5SLionel Sambuc xcb_render_glyphset_next (xcb_render_glyphset_iterator_t *i /**< */)
41971bb1a5SLionel Sambuc {
42971bb1a5SLionel Sambuc --i->rem;
43971bb1a5SLionel Sambuc ++i->data;
44971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_glyphset_t);
45971bb1a5SLionel Sambuc }
46971bb1a5SLionel Sambuc
47971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_glyphset_end(xcb_render_glyphset_iterator_t i)48971bb1a5SLionel Sambuc xcb_render_glyphset_end (xcb_render_glyphset_iterator_t i /**< */)
49971bb1a5SLionel Sambuc {
50971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
51971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
52971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
53971bb1a5SLionel Sambuc ret.rem = 0;
54971bb1a5SLionel Sambuc return ret;
55971bb1a5SLionel Sambuc }
56971bb1a5SLionel Sambuc
57971bb1a5SLionel Sambuc void
xcb_render_picture_next(xcb_render_picture_iterator_t * i)58971bb1a5SLionel Sambuc xcb_render_picture_next (xcb_render_picture_iterator_t *i /**< */)
59971bb1a5SLionel Sambuc {
60971bb1a5SLionel Sambuc --i->rem;
61971bb1a5SLionel Sambuc ++i->data;
62971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_picture_t);
63971bb1a5SLionel Sambuc }
64971bb1a5SLionel Sambuc
65971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_picture_end(xcb_render_picture_iterator_t i)66971bb1a5SLionel Sambuc xcb_render_picture_end (xcb_render_picture_iterator_t i /**< */)
67971bb1a5SLionel Sambuc {
68971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
69971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
70971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
71971bb1a5SLionel Sambuc ret.rem = 0;
72971bb1a5SLionel Sambuc return ret;
73971bb1a5SLionel Sambuc }
74971bb1a5SLionel Sambuc
75971bb1a5SLionel Sambuc void
xcb_render_pictformat_next(xcb_render_pictformat_iterator_t * i)76971bb1a5SLionel Sambuc xcb_render_pictformat_next (xcb_render_pictformat_iterator_t *i /**< */)
77971bb1a5SLionel Sambuc {
78971bb1a5SLionel Sambuc --i->rem;
79971bb1a5SLionel Sambuc ++i->data;
80971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_pictformat_t);
81971bb1a5SLionel Sambuc }
82971bb1a5SLionel Sambuc
83971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_pictformat_end(xcb_render_pictformat_iterator_t i)84971bb1a5SLionel Sambuc xcb_render_pictformat_end (xcb_render_pictformat_iterator_t i /**< */)
85971bb1a5SLionel Sambuc {
86971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
87971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
88971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
89971bb1a5SLionel Sambuc ret.rem = 0;
90971bb1a5SLionel Sambuc return ret;
91971bb1a5SLionel Sambuc }
92971bb1a5SLionel Sambuc
93971bb1a5SLionel Sambuc void
xcb_render_fixed_next(xcb_render_fixed_iterator_t * i)94971bb1a5SLionel Sambuc xcb_render_fixed_next (xcb_render_fixed_iterator_t *i /**< */)
95971bb1a5SLionel Sambuc {
96971bb1a5SLionel Sambuc --i->rem;
97971bb1a5SLionel Sambuc ++i->data;
98971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_fixed_t);
99971bb1a5SLionel Sambuc }
100971bb1a5SLionel Sambuc
101971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_fixed_end(xcb_render_fixed_iterator_t i)102971bb1a5SLionel Sambuc xcb_render_fixed_end (xcb_render_fixed_iterator_t i /**< */)
103971bb1a5SLionel Sambuc {
104971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
105971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
106971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
107971bb1a5SLionel Sambuc ret.rem = 0;
108971bb1a5SLionel Sambuc return ret;
109971bb1a5SLionel Sambuc }
110971bb1a5SLionel Sambuc
111971bb1a5SLionel Sambuc void
xcb_render_directformat_next(xcb_render_directformat_iterator_t * i)112971bb1a5SLionel Sambuc xcb_render_directformat_next (xcb_render_directformat_iterator_t *i /**< */)
113971bb1a5SLionel Sambuc {
114971bb1a5SLionel Sambuc --i->rem;
115971bb1a5SLionel Sambuc ++i->data;
116971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_directformat_t);
117971bb1a5SLionel Sambuc }
118971bb1a5SLionel Sambuc
119971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_directformat_end(xcb_render_directformat_iterator_t i)120971bb1a5SLionel Sambuc xcb_render_directformat_end (xcb_render_directformat_iterator_t i /**< */)
121971bb1a5SLionel Sambuc {
122971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
123971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
124971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
125971bb1a5SLionel Sambuc ret.rem = 0;
126971bb1a5SLionel Sambuc return ret;
127971bb1a5SLionel Sambuc }
128971bb1a5SLionel Sambuc
129971bb1a5SLionel Sambuc void
xcb_render_pictforminfo_next(xcb_render_pictforminfo_iterator_t * i)130971bb1a5SLionel Sambuc xcb_render_pictforminfo_next (xcb_render_pictforminfo_iterator_t *i /**< */)
131971bb1a5SLionel Sambuc {
132971bb1a5SLionel Sambuc --i->rem;
133971bb1a5SLionel Sambuc ++i->data;
134971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_pictforminfo_t);
135971bb1a5SLionel Sambuc }
136971bb1a5SLionel Sambuc
137971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_pictforminfo_end(xcb_render_pictforminfo_iterator_t i)138971bb1a5SLionel Sambuc xcb_render_pictforminfo_end (xcb_render_pictforminfo_iterator_t i /**< */)
139971bb1a5SLionel Sambuc {
140971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
141971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
142971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
143971bb1a5SLionel Sambuc ret.rem = 0;
144971bb1a5SLionel Sambuc return ret;
145971bb1a5SLionel Sambuc }
146971bb1a5SLionel Sambuc
147971bb1a5SLionel Sambuc void
xcb_render_pictvisual_next(xcb_render_pictvisual_iterator_t * i)148971bb1a5SLionel Sambuc xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i /**< */)
149971bb1a5SLionel Sambuc {
150971bb1a5SLionel Sambuc --i->rem;
151971bb1a5SLionel Sambuc ++i->data;
152971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_pictvisual_t);
153971bb1a5SLionel Sambuc }
154971bb1a5SLionel Sambuc
155971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_pictvisual_end(xcb_render_pictvisual_iterator_t i)156971bb1a5SLionel Sambuc xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i /**< */)
157971bb1a5SLionel Sambuc {
158971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
159971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
160971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
161971bb1a5SLionel Sambuc ret.rem = 0;
162971bb1a5SLionel Sambuc return ret;
163971bb1a5SLionel Sambuc }
164971bb1a5SLionel Sambuc
165971bb1a5SLionel Sambuc int
xcb_render_pictdepth_sizeof(const void * _buffer)166971bb1a5SLionel Sambuc xcb_render_pictdepth_sizeof (const void *_buffer /**< */)
167971bb1a5SLionel Sambuc {
168971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
169971bb1a5SLionel Sambuc const xcb_render_pictdepth_t *_aux = (xcb_render_pictdepth_t *)_buffer;
170971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
171971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
172971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
173*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
174971bb1a5SLionel Sambuc
175971bb1a5SLionel Sambuc
176971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_pictdepth_t);
177971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
178*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
179*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
180971bb1a5SLionel Sambuc /* visuals */
181971bb1a5SLionel Sambuc xcb_block_len += _aux->num_visuals * sizeof(xcb_render_pictvisual_t);
182971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
183971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_pictvisual_t);
184971bb1a5SLionel Sambuc /* insert padding */
185971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
186971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
187971bb1a5SLionel Sambuc if (0 != xcb_pad) {
188971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
189971bb1a5SLionel Sambuc xcb_pad = 0;
190971bb1a5SLionel Sambuc }
191971bb1a5SLionel Sambuc xcb_block_len = 0;
192971bb1a5SLionel Sambuc
193971bb1a5SLionel Sambuc return xcb_buffer_len;
194971bb1a5SLionel Sambuc }
195971bb1a5SLionel Sambuc
196971bb1a5SLionel Sambuc xcb_render_pictvisual_t *
xcb_render_pictdepth_visuals(const xcb_render_pictdepth_t * R)197971bb1a5SLionel Sambuc xcb_render_pictdepth_visuals (const xcb_render_pictdepth_t *R /**< */)
198971bb1a5SLionel Sambuc {
199971bb1a5SLionel Sambuc return (xcb_render_pictvisual_t *) (R + 1);
200971bb1a5SLionel Sambuc }
201971bb1a5SLionel Sambuc
202971bb1a5SLionel Sambuc int
xcb_render_pictdepth_visuals_length(const xcb_render_pictdepth_t * R)203971bb1a5SLionel Sambuc xcb_render_pictdepth_visuals_length (const xcb_render_pictdepth_t *R /**< */)
204971bb1a5SLionel Sambuc {
205971bb1a5SLionel Sambuc return R->num_visuals;
206971bb1a5SLionel Sambuc }
207971bb1a5SLionel Sambuc
208971bb1a5SLionel Sambuc xcb_render_pictvisual_iterator_t
xcb_render_pictdepth_visuals_iterator(const xcb_render_pictdepth_t * R)209971bb1a5SLionel Sambuc xcb_render_pictdepth_visuals_iterator (const xcb_render_pictdepth_t *R /**< */)
210971bb1a5SLionel Sambuc {
211971bb1a5SLionel Sambuc xcb_render_pictvisual_iterator_t i;
212971bb1a5SLionel Sambuc i.data = (xcb_render_pictvisual_t *) (R + 1);
213971bb1a5SLionel Sambuc i.rem = R->num_visuals;
214971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
215971bb1a5SLionel Sambuc return i;
216971bb1a5SLionel Sambuc }
217971bb1a5SLionel Sambuc
218971bb1a5SLionel Sambuc void
xcb_render_pictdepth_next(xcb_render_pictdepth_iterator_t * i)219971bb1a5SLionel Sambuc xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i /**< */)
220971bb1a5SLionel Sambuc {
221971bb1a5SLionel Sambuc xcb_render_pictdepth_t *R = i->data;
222971bb1a5SLionel Sambuc xcb_generic_iterator_t child;
223971bb1a5SLionel Sambuc child.data = (xcb_render_pictdepth_t *)(((char *)R) + xcb_render_pictdepth_sizeof(R));
224971bb1a5SLionel Sambuc i->index = (char *) child.data - (char *) i->data;
225971bb1a5SLionel Sambuc --i->rem;
226971bb1a5SLionel Sambuc i->data = (xcb_render_pictdepth_t *) child.data;
227971bb1a5SLionel Sambuc }
228971bb1a5SLionel Sambuc
229971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_pictdepth_end(xcb_render_pictdepth_iterator_t i)230971bb1a5SLionel Sambuc xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */)
231971bb1a5SLionel Sambuc {
232971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
233971bb1a5SLionel Sambuc while(i.rem > 0)
234971bb1a5SLionel Sambuc xcb_render_pictdepth_next(&i);
235971bb1a5SLionel Sambuc ret.data = i.data;
236971bb1a5SLionel Sambuc ret.rem = i.rem;
237971bb1a5SLionel Sambuc ret.index = i.index;
238971bb1a5SLionel Sambuc return ret;
239971bb1a5SLionel Sambuc }
240971bb1a5SLionel Sambuc
241971bb1a5SLionel Sambuc int
xcb_render_pictscreen_sizeof(const void * _buffer)242971bb1a5SLionel Sambuc xcb_render_pictscreen_sizeof (const void *_buffer /**< */)
243971bb1a5SLionel Sambuc {
244971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
245971bb1a5SLionel Sambuc const xcb_render_pictscreen_t *_aux = (xcb_render_pictscreen_t *)_buffer;
246971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
247971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
248971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
249*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
250971bb1a5SLionel Sambuc
251971bb1a5SLionel Sambuc unsigned int i;
252971bb1a5SLionel Sambuc unsigned int xcb_tmp_len;
253971bb1a5SLionel Sambuc
254971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_pictscreen_t);
255971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
256*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
257*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
258971bb1a5SLionel Sambuc /* depths */
259971bb1a5SLionel Sambuc for(i=0; i<_aux->num_depths; i++) {
260971bb1a5SLionel Sambuc xcb_tmp_len = xcb_render_pictdepth_sizeof(xcb_tmp);
261971bb1a5SLionel Sambuc xcb_block_len += xcb_tmp_len;
262971bb1a5SLionel Sambuc xcb_tmp += xcb_tmp_len;
263971bb1a5SLionel Sambuc }
264971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_pictdepth_t);
265971bb1a5SLionel Sambuc /* insert padding */
266971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
267971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
268971bb1a5SLionel Sambuc if (0 != xcb_pad) {
269971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
270971bb1a5SLionel Sambuc xcb_pad = 0;
271971bb1a5SLionel Sambuc }
272971bb1a5SLionel Sambuc xcb_block_len = 0;
273971bb1a5SLionel Sambuc
274971bb1a5SLionel Sambuc return xcb_buffer_len;
275971bb1a5SLionel Sambuc }
276971bb1a5SLionel Sambuc
277971bb1a5SLionel Sambuc int
xcb_render_pictscreen_depths_length(const xcb_render_pictscreen_t * R)278971bb1a5SLionel Sambuc xcb_render_pictscreen_depths_length (const xcb_render_pictscreen_t *R /**< */)
279971bb1a5SLionel Sambuc {
280971bb1a5SLionel Sambuc return R->num_depths;
281971bb1a5SLionel Sambuc }
282971bb1a5SLionel Sambuc
283971bb1a5SLionel Sambuc xcb_render_pictdepth_iterator_t
xcb_render_pictscreen_depths_iterator(const xcb_render_pictscreen_t * R)284971bb1a5SLionel Sambuc xcb_render_pictscreen_depths_iterator (const xcb_render_pictscreen_t *R /**< */)
285971bb1a5SLionel Sambuc {
286971bb1a5SLionel Sambuc xcb_render_pictdepth_iterator_t i;
287971bb1a5SLionel Sambuc i.data = (xcb_render_pictdepth_t *) (R + 1);
288971bb1a5SLionel Sambuc i.rem = R->num_depths;
289971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
290971bb1a5SLionel Sambuc return i;
291971bb1a5SLionel Sambuc }
292971bb1a5SLionel Sambuc
293971bb1a5SLionel Sambuc void
xcb_render_pictscreen_next(xcb_render_pictscreen_iterator_t * i)294971bb1a5SLionel Sambuc xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i /**< */)
295971bb1a5SLionel Sambuc {
296971bb1a5SLionel Sambuc xcb_render_pictscreen_t *R = i->data;
297971bb1a5SLionel Sambuc xcb_generic_iterator_t child;
298971bb1a5SLionel Sambuc child.data = (xcb_render_pictscreen_t *)(((char *)R) + xcb_render_pictscreen_sizeof(R));
299971bb1a5SLionel Sambuc i->index = (char *) child.data - (char *) i->data;
300971bb1a5SLionel Sambuc --i->rem;
301971bb1a5SLionel Sambuc i->data = (xcb_render_pictscreen_t *) child.data;
302971bb1a5SLionel Sambuc }
303971bb1a5SLionel Sambuc
304971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_pictscreen_end(xcb_render_pictscreen_iterator_t i)305971bb1a5SLionel Sambuc xcb_render_pictscreen_end (xcb_render_pictscreen_iterator_t i /**< */)
306971bb1a5SLionel Sambuc {
307971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
308971bb1a5SLionel Sambuc while(i.rem > 0)
309971bb1a5SLionel Sambuc xcb_render_pictscreen_next(&i);
310971bb1a5SLionel Sambuc ret.data = i.data;
311971bb1a5SLionel Sambuc ret.rem = i.rem;
312971bb1a5SLionel Sambuc ret.index = i.index;
313971bb1a5SLionel Sambuc return ret;
314971bb1a5SLionel Sambuc }
315971bb1a5SLionel Sambuc
316971bb1a5SLionel Sambuc void
xcb_render_indexvalue_next(xcb_render_indexvalue_iterator_t * i)317971bb1a5SLionel Sambuc xcb_render_indexvalue_next (xcb_render_indexvalue_iterator_t *i /**< */)
318971bb1a5SLionel Sambuc {
319971bb1a5SLionel Sambuc --i->rem;
320971bb1a5SLionel Sambuc ++i->data;
321971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_indexvalue_t);
322971bb1a5SLionel Sambuc }
323971bb1a5SLionel Sambuc
324971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_indexvalue_end(xcb_render_indexvalue_iterator_t i)325971bb1a5SLionel Sambuc xcb_render_indexvalue_end (xcb_render_indexvalue_iterator_t i /**< */)
326971bb1a5SLionel Sambuc {
327971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
328971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
329971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
330971bb1a5SLionel Sambuc ret.rem = 0;
331971bb1a5SLionel Sambuc return ret;
332971bb1a5SLionel Sambuc }
333971bb1a5SLionel Sambuc
334971bb1a5SLionel Sambuc void
xcb_render_color_next(xcb_render_color_iterator_t * i)335971bb1a5SLionel Sambuc xcb_render_color_next (xcb_render_color_iterator_t *i /**< */)
336971bb1a5SLionel Sambuc {
337971bb1a5SLionel Sambuc --i->rem;
338971bb1a5SLionel Sambuc ++i->data;
339971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_color_t);
340971bb1a5SLionel Sambuc }
341971bb1a5SLionel Sambuc
342971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_color_end(xcb_render_color_iterator_t i)343971bb1a5SLionel Sambuc xcb_render_color_end (xcb_render_color_iterator_t i /**< */)
344971bb1a5SLionel Sambuc {
345971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
346971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
347971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
348971bb1a5SLionel Sambuc ret.rem = 0;
349971bb1a5SLionel Sambuc return ret;
350971bb1a5SLionel Sambuc }
351971bb1a5SLionel Sambuc
352971bb1a5SLionel Sambuc void
xcb_render_pointfix_next(xcb_render_pointfix_iterator_t * i)353971bb1a5SLionel Sambuc xcb_render_pointfix_next (xcb_render_pointfix_iterator_t *i /**< */)
354971bb1a5SLionel Sambuc {
355971bb1a5SLionel Sambuc --i->rem;
356971bb1a5SLionel Sambuc ++i->data;
357971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_pointfix_t);
358971bb1a5SLionel Sambuc }
359971bb1a5SLionel Sambuc
360971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_pointfix_end(xcb_render_pointfix_iterator_t i)361971bb1a5SLionel Sambuc xcb_render_pointfix_end (xcb_render_pointfix_iterator_t i /**< */)
362971bb1a5SLionel Sambuc {
363971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
364971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
365971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
366971bb1a5SLionel Sambuc ret.rem = 0;
367971bb1a5SLionel Sambuc return ret;
368971bb1a5SLionel Sambuc }
369971bb1a5SLionel Sambuc
370971bb1a5SLionel Sambuc void
xcb_render_linefix_next(xcb_render_linefix_iterator_t * i)371971bb1a5SLionel Sambuc xcb_render_linefix_next (xcb_render_linefix_iterator_t *i /**< */)
372971bb1a5SLionel Sambuc {
373971bb1a5SLionel Sambuc --i->rem;
374971bb1a5SLionel Sambuc ++i->data;
375971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_linefix_t);
376971bb1a5SLionel Sambuc }
377971bb1a5SLionel Sambuc
378971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_linefix_end(xcb_render_linefix_iterator_t i)379971bb1a5SLionel Sambuc xcb_render_linefix_end (xcb_render_linefix_iterator_t i /**< */)
380971bb1a5SLionel Sambuc {
381971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
382971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
383971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
384971bb1a5SLionel Sambuc ret.rem = 0;
385971bb1a5SLionel Sambuc return ret;
386971bb1a5SLionel Sambuc }
387971bb1a5SLionel Sambuc
388971bb1a5SLionel Sambuc void
xcb_render_triangle_next(xcb_render_triangle_iterator_t * i)389971bb1a5SLionel Sambuc xcb_render_triangle_next (xcb_render_triangle_iterator_t *i /**< */)
390971bb1a5SLionel Sambuc {
391971bb1a5SLionel Sambuc --i->rem;
392971bb1a5SLionel Sambuc ++i->data;
393971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_triangle_t);
394971bb1a5SLionel Sambuc }
395971bb1a5SLionel Sambuc
396971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_triangle_end(xcb_render_triangle_iterator_t i)397971bb1a5SLionel Sambuc xcb_render_triangle_end (xcb_render_triangle_iterator_t i /**< */)
398971bb1a5SLionel Sambuc {
399971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
400971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
401971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
402971bb1a5SLionel Sambuc ret.rem = 0;
403971bb1a5SLionel Sambuc return ret;
404971bb1a5SLionel Sambuc }
405971bb1a5SLionel Sambuc
406971bb1a5SLionel Sambuc void
xcb_render_trapezoid_next(xcb_render_trapezoid_iterator_t * i)407971bb1a5SLionel Sambuc xcb_render_trapezoid_next (xcb_render_trapezoid_iterator_t *i /**< */)
408971bb1a5SLionel Sambuc {
409971bb1a5SLionel Sambuc --i->rem;
410971bb1a5SLionel Sambuc ++i->data;
411971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_trapezoid_t);
412971bb1a5SLionel Sambuc }
413971bb1a5SLionel Sambuc
414971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_trapezoid_end(xcb_render_trapezoid_iterator_t i)415971bb1a5SLionel Sambuc xcb_render_trapezoid_end (xcb_render_trapezoid_iterator_t i /**< */)
416971bb1a5SLionel Sambuc {
417971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
418971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
419971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
420971bb1a5SLionel Sambuc ret.rem = 0;
421971bb1a5SLionel Sambuc return ret;
422971bb1a5SLionel Sambuc }
423971bb1a5SLionel Sambuc
424971bb1a5SLionel Sambuc void
xcb_render_glyphinfo_next(xcb_render_glyphinfo_iterator_t * i)425971bb1a5SLionel Sambuc xcb_render_glyphinfo_next (xcb_render_glyphinfo_iterator_t *i /**< */)
426971bb1a5SLionel Sambuc {
427971bb1a5SLionel Sambuc --i->rem;
428971bb1a5SLionel Sambuc ++i->data;
429971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_glyphinfo_t);
430971bb1a5SLionel Sambuc }
431971bb1a5SLionel Sambuc
432971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_glyphinfo_end(xcb_render_glyphinfo_iterator_t i)433971bb1a5SLionel Sambuc xcb_render_glyphinfo_end (xcb_render_glyphinfo_iterator_t i /**< */)
434971bb1a5SLionel Sambuc {
435971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
436971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
437971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
438971bb1a5SLionel Sambuc ret.rem = 0;
439971bb1a5SLionel Sambuc return ret;
440971bb1a5SLionel Sambuc }
441971bb1a5SLionel Sambuc
442971bb1a5SLionel Sambuc xcb_render_query_version_cookie_t
xcb_render_query_version(xcb_connection_t * c,uint32_t client_major_version,uint32_t client_minor_version)443971bb1a5SLionel Sambuc xcb_render_query_version (xcb_connection_t *c /**< */,
444971bb1a5SLionel Sambuc uint32_t client_major_version /**< */,
445971bb1a5SLionel Sambuc uint32_t client_minor_version /**< */)
446971bb1a5SLionel Sambuc {
447971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
448971bb1a5SLionel Sambuc /* count */ 2,
449971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
450971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_QUERY_VERSION,
451971bb1a5SLionel Sambuc /* isvoid */ 0
452971bb1a5SLionel Sambuc };
453971bb1a5SLionel Sambuc
454971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
455971bb1a5SLionel Sambuc xcb_render_query_version_cookie_t xcb_ret;
456971bb1a5SLionel Sambuc xcb_render_query_version_request_t xcb_out;
457971bb1a5SLionel Sambuc
458971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
459971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
460971bb1a5SLionel Sambuc
461971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
462971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
463971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
464971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
465971bb1a5SLionel Sambuc
466971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
467971bb1a5SLionel Sambuc return xcb_ret;
468971bb1a5SLionel Sambuc }
469971bb1a5SLionel Sambuc
470971bb1a5SLionel Sambuc xcb_render_query_version_cookie_t
xcb_render_query_version_unchecked(xcb_connection_t * c,uint32_t client_major_version,uint32_t client_minor_version)471971bb1a5SLionel Sambuc xcb_render_query_version_unchecked (xcb_connection_t *c /**< */,
472971bb1a5SLionel Sambuc uint32_t client_major_version /**< */,
473971bb1a5SLionel Sambuc uint32_t client_minor_version /**< */)
474971bb1a5SLionel Sambuc {
475971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
476971bb1a5SLionel Sambuc /* count */ 2,
477971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
478971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_QUERY_VERSION,
479971bb1a5SLionel Sambuc /* isvoid */ 0
480971bb1a5SLionel Sambuc };
481971bb1a5SLionel Sambuc
482971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
483971bb1a5SLionel Sambuc xcb_render_query_version_cookie_t xcb_ret;
484971bb1a5SLionel Sambuc xcb_render_query_version_request_t xcb_out;
485971bb1a5SLionel Sambuc
486971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
487971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
488971bb1a5SLionel Sambuc
489971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
490971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
491971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
492971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
493971bb1a5SLionel Sambuc
494971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
495971bb1a5SLionel Sambuc return xcb_ret;
496971bb1a5SLionel Sambuc }
497971bb1a5SLionel Sambuc
498971bb1a5SLionel Sambuc xcb_render_query_version_reply_t *
xcb_render_query_version_reply(xcb_connection_t * c,xcb_render_query_version_cookie_t cookie,xcb_generic_error_t ** e)499971bb1a5SLionel Sambuc xcb_render_query_version_reply (xcb_connection_t *c /**< */,
500971bb1a5SLionel Sambuc xcb_render_query_version_cookie_t cookie /**< */,
501971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
502971bb1a5SLionel Sambuc {
503971bb1a5SLionel Sambuc return (xcb_render_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
504971bb1a5SLionel Sambuc }
505971bb1a5SLionel Sambuc
506971bb1a5SLionel Sambuc int
xcb_render_query_pict_formats_sizeof(const void * _buffer)507971bb1a5SLionel Sambuc xcb_render_query_pict_formats_sizeof (const void *_buffer /**< */)
508971bb1a5SLionel Sambuc {
509971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
510971bb1a5SLionel Sambuc const xcb_render_query_pict_formats_reply_t *_aux = (xcb_render_query_pict_formats_reply_t *)_buffer;
511971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
512971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
513971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
514*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
515971bb1a5SLionel Sambuc
516971bb1a5SLionel Sambuc unsigned int i;
517971bb1a5SLionel Sambuc unsigned int xcb_tmp_len;
518971bb1a5SLionel Sambuc
519971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_query_pict_formats_reply_t);
520971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
521*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
522*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
523971bb1a5SLionel Sambuc /* formats */
524971bb1a5SLionel Sambuc xcb_block_len += _aux->num_formats * sizeof(xcb_render_pictforminfo_t);
525971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
526971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_pictforminfo_t);
527971bb1a5SLionel Sambuc /* insert padding */
528971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
529971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
530971bb1a5SLionel Sambuc if (0 != xcb_pad) {
531971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
532971bb1a5SLionel Sambuc xcb_pad = 0;
533971bb1a5SLionel Sambuc }
534971bb1a5SLionel Sambuc xcb_block_len = 0;
535971bb1a5SLionel Sambuc /* screens */
536971bb1a5SLionel Sambuc for(i=0; i<_aux->num_screens; i++) {
537971bb1a5SLionel Sambuc xcb_tmp_len = xcb_render_pictscreen_sizeof(xcb_tmp);
538971bb1a5SLionel Sambuc xcb_block_len += xcb_tmp_len;
539971bb1a5SLionel Sambuc xcb_tmp += xcb_tmp_len;
540971bb1a5SLionel Sambuc }
541971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_pictscreen_t);
542971bb1a5SLionel Sambuc /* insert padding */
543971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
544971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
545971bb1a5SLionel Sambuc if (0 != xcb_pad) {
546971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
547971bb1a5SLionel Sambuc xcb_pad = 0;
548971bb1a5SLionel Sambuc }
549971bb1a5SLionel Sambuc xcb_block_len = 0;
550971bb1a5SLionel Sambuc /* subpixels */
551971bb1a5SLionel Sambuc xcb_block_len += _aux->num_subpixel * sizeof(uint32_t);
552971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
553971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint32_t);
554971bb1a5SLionel Sambuc /* insert padding */
555971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
556971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
557971bb1a5SLionel Sambuc if (0 != xcb_pad) {
558971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
559971bb1a5SLionel Sambuc xcb_pad = 0;
560971bb1a5SLionel Sambuc }
561971bb1a5SLionel Sambuc xcb_block_len = 0;
562971bb1a5SLionel Sambuc
563971bb1a5SLionel Sambuc return xcb_buffer_len;
564971bb1a5SLionel Sambuc }
565971bb1a5SLionel Sambuc
566971bb1a5SLionel Sambuc xcb_render_query_pict_formats_cookie_t
xcb_render_query_pict_formats(xcb_connection_t * c)567971bb1a5SLionel Sambuc xcb_render_query_pict_formats (xcb_connection_t *c /**< */)
568971bb1a5SLionel Sambuc {
569971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
570971bb1a5SLionel Sambuc /* count */ 2,
571971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
572971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS,
573971bb1a5SLionel Sambuc /* isvoid */ 0
574971bb1a5SLionel Sambuc };
575971bb1a5SLionel Sambuc
576971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
577971bb1a5SLionel Sambuc xcb_render_query_pict_formats_cookie_t xcb_ret;
578971bb1a5SLionel Sambuc xcb_render_query_pict_formats_request_t xcb_out;
579971bb1a5SLionel Sambuc
580971bb1a5SLionel Sambuc
581971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
582971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
583971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
584971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
585971bb1a5SLionel Sambuc
586971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
587971bb1a5SLionel Sambuc return xcb_ret;
588971bb1a5SLionel Sambuc }
589971bb1a5SLionel Sambuc
590971bb1a5SLionel Sambuc xcb_render_query_pict_formats_cookie_t
xcb_render_query_pict_formats_unchecked(xcb_connection_t * c)591971bb1a5SLionel Sambuc xcb_render_query_pict_formats_unchecked (xcb_connection_t *c /**< */)
592971bb1a5SLionel Sambuc {
593971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
594971bb1a5SLionel Sambuc /* count */ 2,
595971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
596971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS,
597971bb1a5SLionel Sambuc /* isvoid */ 0
598971bb1a5SLionel Sambuc };
599971bb1a5SLionel Sambuc
600971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
601971bb1a5SLionel Sambuc xcb_render_query_pict_formats_cookie_t xcb_ret;
602971bb1a5SLionel Sambuc xcb_render_query_pict_formats_request_t xcb_out;
603971bb1a5SLionel Sambuc
604971bb1a5SLionel Sambuc
605971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
606971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
607971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
608971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
609971bb1a5SLionel Sambuc
610971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
611971bb1a5SLionel Sambuc return xcb_ret;
612971bb1a5SLionel Sambuc }
613971bb1a5SLionel Sambuc
614971bb1a5SLionel Sambuc xcb_render_pictforminfo_t *
xcb_render_query_pict_formats_formats(const xcb_render_query_pict_formats_reply_t * R)615971bb1a5SLionel Sambuc xcb_render_query_pict_formats_formats (const xcb_render_query_pict_formats_reply_t *R /**< */)
616971bb1a5SLionel Sambuc {
617971bb1a5SLionel Sambuc return (xcb_render_pictforminfo_t *) (R + 1);
618971bb1a5SLionel Sambuc }
619971bb1a5SLionel Sambuc
620971bb1a5SLionel Sambuc int
xcb_render_query_pict_formats_formats_length(const xcb_render_query_pict_formats_reply_t * R)621971bb1a5SLionel Sambuc xcb_render_query_pict_formats_formats_length (const xcb_render_query_pict_formats_reply_t *R /**< */)
622971bb1a5SLionel Sambuc {
623971bb1a5SLionel Sambuc return R->num_formats;
624971bb1a5SLionel Sambuc }
625971bb1a5SLionel Sambuc
626971bb1a5SLionel Sambuc xcb_render_pictforminfo_iterator_t
xcb_render_query_pict_formats_formats_iterator(const xcb_render_query_pict_formats_reply_t * R)627971bb1a5SLionel Sambuc xcb_render_query_pict_formats_formats_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */)
628971bb1a5SLionel Sambuc {
629971bb1a5SLionel Sambuc xcb_render_pictforminfo_iterator_t i;
630971bb1a5SLionel Sambuc i.data = (xcb_render_pictforminfo_t *) (R + 1);
631971bb1a5SLionel Sambuc i.rem = R->num_formats;
632971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
633971bb1a5SLionel Sambuc return i;
634971bb1a5SLionel Sambuc }
635971bb1a5SLionel Sambuc
636971bb1a5SLionel Sambuc int
xcb_render_query_pict_formats_screens_length(const xcb_render_query_pict_formats_reply_t * R)637971bb1a5SLionel Sambuc xcb_render_query_pict_formats_screens_length (const xcb_render_query_pict_formats_reply_t *R /**< */)
638971bb1a5SLionel Sambuc {
639971bb1a5SLionel Sambuc return R->num_screens;
640971bb1a5SLionel Sambuc }
641971bb1a5SLionel Sambuc
642971bb1a5SLionel Sambuc xcb_render_pictscreen_iterator_t
xcb_render_query_pict_formats_screens_iterator(const xcb_render_query_pict_formats_reply_t * R)643971bb1a5SLionel Sambuc xcb_render_query_pict_formats_screens_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */)
644971bb1a5SLionel Sambuc {
645971bb1a5SLionel Sambuc xcb_render_pictscreen_iterator_t i;
646971bb1a5SLionel Sambuc xcb_generic_iterator_t prev = xcb_render_pictforminfo_end(xcb_render_query_pict_formats_formats_iterator(R));
647971bb1a5SLionel Sambuc i.data = (xcb_render_pictscreen_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_pictscreen_t, prev.index));
648971bb1a5SLionel Sambuc i.rem = R->num_screens;
649971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
650971bb1a5SLionel Sambuc return i;
651971bb1a5SLionel Sambuc }
652971bb1a5SLionel Sambuc
653971bb1a5SLionel Sambuc uint32_t *
xcb_render_query_pict_formats_subpixels(const xcb_render_query_pict_formats_reply_t * R)654971bb1a5SLionel Sambuc xcb_render_query_pict_formats_subpixels (const xcb_render_query_pict_formats_reply_t *R /**< */)
655971bb1a5SLionel Sambuc {
656971bb1a5SLionel Sambuc xcb_generic_iterator_t prev = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R));
657971bb1a5SLionel Sambuc return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
658971bb1a5SLionel Sambuc }
659971bb1a5SLionel Sambuc
660971bb1a5SLionel Sambuc int
xcb_render_query_pict_formats_subpixels_length(const xcb_render_query_pict_formats_reply_t * R)661971bb1a5SLionel Sambuc xcb_render_query_pict_formats_subpixels_length (const xcb_render_query_pict_formats_reply_t *R /**< */)
662971bb1a5SLionel Sambuc {
663971bb1a5SLionel Sambuc return R->num_subpixel;
664971bb1a5SLionel Sambuc }
665971bb1a5SLionel Sambuc
666971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_query_pict_formats_subpixels_end(const xcb_render_query_pict_formats_reply_t * R)667971bb1a5SLionel Sambuc xcb_render_query_pict_formats_subpixels_end (const xcb_render_query_pict_formats_reply_t *R /**< */)
668971bb1a5SLionel Sambuc {
669971bb1a5SLionel Sambuc xcb_generic_iterator_t i;
670971bb1a5SLionel Sambuc xcb_generic_iterator_t child = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R));
671971bb1a5SLionel Sambuc i.data = ((uint32_t *) child.data) + (R->num_subpixel);
672971bb1a5SLionel Sambuc i.rem = 0;
673971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
674971bb1a5SLionel Sambuc return i;
675971bb1a5SLionel Sambuc }
676971bb1a5SLionel Sambuc
677971bb1a5SLionel Sambuc xcb_render_query_pict_formats_reply_t *
xcb_render_query_pict_formats_reply(xcb_connection_t * c,xcb_render_query_pict_formats_cookie_t cookie,xcb_generic_error_t ** e)678971bb1a5SLionel Sambuc xcb_render_query_pict_formats_reply (xcb_connection_t *c /**< */,
679971bb1a5SLionel Sambuc xcb_render_query_pict_formats_cookie_t cookie /**< */,
680971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
681971bb1a5SLionel Sambuc {
682971bb1a5SLionel Sambuc return (xcb_render_query_pict_formats_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
683971bb1a5SLionel Sambuc }
684971bb1a5SLionel Sambuc
685971bb1a5SLionel Sambuc int
xcb_render_query_pict_index_values_sizeof(const void * _buffer)686971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_sizeof (const void *_buffer /**< */)
687971bb1a5SLionel Sambuc {
688971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
689971bb1a5SLionel Sambuc const xcb_render_query_pict_index_values_reply_t *_aux = (xcb_render_query_pict_index_values_reply_t *)_buffer;
690971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
691971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
692971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
693*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
694971bb1a5SLionel Sambuc
695971bb1a5SLionel Sambuc
696971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_query_pict_index_values_reply_t);
697971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
698*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
699*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
700971bb1a5SLionel Sambuc /* values */
701971bb1a5SLionel Sambuc xcb_block_len += _aux->num_values * sizeof(xcb_render_indexvalue_t);
702971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
703971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_indexvalue_t);
704971bb1a5SLionel Sambuc /* insert padding */
705971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
706971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
707971bb1a5SLionel Sambuc if (0 != xcb_pad) {
708971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
709971bb1a5SLionel Sambuc xcb_pad = 0;
710971bb1a5SLionel Sambuc }
711971bb1a5SLionel Sambuc xcb_block_len = 0;
712971bb1a5SLionel Sambuc
713971bb1a5SLionel Sambuc return xcb_buffer_len;
714971bb1a5SLionel Sambuc }
715971bb1a5SLionel Sambuc
716971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_cookie_t
xcb_render_query_pict_index_values(xcb_connection_t * c,xcb_render_pictformat_t format)717971bb1a5SLionel Sambuc xcb_render_query_pict_index_values (xcb_connection_t *c /**< */,
718971bb1a5SLionel Sambuc xcb_render_pictformat_t format /**< */)
719971bb1a5SLionel Sambuc {
720971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
721971bb1a5SLionel Sambuc /* count */ 2,
722971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
723971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES,
724971bb1a5SLionel Sambuc /* isvoid */ 0
725971bb1a5SLionel Sambuc };
726971bb1a5SLionel Sambuc
727971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
728971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_cookie_t xcb_ret;
729971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_request_t xcb_out;
730971bb1a5SLionel Sambuc
731971bb1a5SLionel Sambuc xcb_out.format = format;
732971bb1a5SLionel Sambuc
733971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
734971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
735971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
736971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
737971bb1a5SLionel Sambuc
738971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
739971bb1a5SLionel Sambuc return xcb_ret;
740971bb1a5SLionel Sambuc }
741971bb1a5SLionel Sambuc
742971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_cookie_t
xcb_render_query_pict_index_values_unchecked(xcb_connection_t * c,xcb_render_pictformat_t format)743971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_unchecked (xcb_connection_t *c /**< */,
744971bb1a5SLionel Sambuc xcb_render_pictformat_t format /**< */)
745971bb1a5SLionel Sambuc {
746971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
747971bb1a5SLionel Sambuc /* count */ 2,
748971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
749971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES,
750971bb1a5SLionel Sambuc /* isvoid */ 0
751971bb1a5SLionel Sambuc };
752971bb1a5SLionel Sambuc
753971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
754971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_cookie_t xcb_ret;
755971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_request_t xcb_out;
756971bb1a5SLionel Sambuc
757971bb1a5SLionel Sambuc xcb_out.format = format;
758971bb1a5SLionel Sambuc
759971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
760971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
761971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
762971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
763971bb1a5SLionel Sambuc
764971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
765971bb1a5SLionel Sambuc return xcb_ret;
766971bb1a5SLionel Sambuc }
767971bb1a5SLionel Sambuc
768971bb1a5SLionel Sambuc xcb_render_indexvalue_t *
xcb_render_query_pict_index_values_values(const xcb_render_query_pict_index_values_reply_t * R)769971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_values (const xcb_render_query_pict_index_values_reply_t *R /**< */)
770971bb1a5SLionel Sambuc {
771971bb1a5SLionel Sambuc return (xcb_render_indexvalue_t *) (R + 1);
772971bb1a5SLionel Sambuc }
773971bb1a5SLionel Sambuc
774971bb1a5SLionel Sambuc int
xcb_render_query_pict_index_values_values_length(const xcb_render_query_pict_index_values_reply_t * R)775971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_values_length (const xcb_render_query_pict_index_values_reply_t *R /**< */)
776971bb1a5SLionel Sambuc {
777971bb1a5SLionel Sambuc return R->num_values;
778971bb1a5SLionel Sambuc }
779971bb1a5SLionel Sambuc
780971bb1a5SLionel Sambuc xcb_render_indexvalue_iterator_t
xcb_render_query_pict_index_values_values_iterator(const xcb_render_query_pict_index_values_reply_t * R)781971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_values_iterator (const xcb_render_query_pict_index_values_reply_t *R /**< */)
782971bb1a5SLionel Sambuc {
783971bb1a5SLionel Sambuc xcb_render_indexvalue_iterator_t i;
784971bb1a5SLionel Sambuc i.data = (xcb_render_indexvalue_t *) (R + 1);
785971bb1a5SLionel Sambuc i.rem = R->num_values;
786971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
787971bb1a5SLionel Sambuc return i;
788971bb1a5SLionel Sambuc }
789971bb1a5SLionel Sambuc
790971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_reply_t *
xcb_render_query_pict_index_values_reply(xcb_connection_t * c,xcb_render_query_pict_index_values_cookie_t cookie,xcb_generic_error_t ** e)791971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_reply (xcb_connection_t *c /**< */,
792971bb1a5SLionel Sambuc xcb_render_query_pict_index_values_cookie_t cookie /**< */,
793971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
794971bb1a5SLionel Sambuc {
795971bb1a5SLionel Sambuc return (xcb_render_query_pict_index_values_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
796971bb1a5SLionel Sambuc }
797971bb1a5SLionel Sambuc
798971bb1a5SLionel Sambuc int
xcb_render_create_picture_sizeof(const void * _buffer)799971bb1a5SLionel Sambuc xcb_render_create_picture_sizeof (const void *_buffer /**< */)
800971bb1a5SLionel Sambuc {
801971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
802971bb1a5SLionel Sambuc const xcb_render_create_picture_request_t *_aux = (xcb_render_create_picture_request_t *)_buffer;
803971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
804971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
805971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
806*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
807971bb1a5SLionel Sambuc
808971bb1a5SLionel Sambuc
809971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_create_picture_request_t);
810971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
811*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
812*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
813971bb1a5SLionel Sambuc /* value_list */
814971bb1a5SLionel Sambuc xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
815971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
816971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint32_t);
817971bb1a5SLionel Sambuc /* insert padding */
818971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
819971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
820971bb1a5SLionel Sambuc if (0 != xcb_pad) {
821971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
822971bb1a5SLionel Sambuc xcb_pad = 0;
823971bb1a5SLionel Sambuc }
824971bb1a5SLionel Sambuc xcb_block_len = 0;
825971bb1a5SLionel Sambuc
826971bb1a5SLionel Sambuc return xcb_buffer_len;
827971bb1a5SLionel Sambuc }
828971bb1a5SLionel Sambuc
829971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_picture_checked(xcb_connection_t * c,xcb_render_picture_t pid,xcb_drawable_t drawable,xcb_render_pictformat_t format,uint32_t value_mask,const uint32_t * value_list)830971bb1a5SLionel Sambuc xcb_render_create_picture_checked (xcb_connection_t *c /**< */,
831971bb1a5SLionel Sambuc xcb_render_picture_t pid /**< */,
832971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
833971bb1a5SLionel Sambuc xcb_render_pictformat_t format /**< */,
834971bb1a5SLionel Sambuc uint32_t value_mask /**< */,
835971bb1a5SLionel Sambuc const uint32_t *value_list /**< */)
836971bb1a5SLionel Sambuc {
837971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
838971bb1a5SLionel Sambuc /* count */ 4,
839971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
840971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_PICTURE,
841971bb1a5SLionel Sambuc /* isvoid */ 1
842971bb1a5SLionel Sambuc };
843971bb1a5SLionel Sambuc
844971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
845971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
846971bb1a5SLionel Sambuc xcb_render_create_picture_request_t xcb_out;
847971bb1a5SLionel Sambuc
848971bb1a5SLionel Sambuc xcb_out.pid = pid;
849971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
850971bb1a5SLionel Sambuc xcb_out.format = format;
851971bb1a5SLionel Sambuc xcb_out.value_mask = value_mask;
852971bb1a5SLionel Sambuc
853971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
854971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
855971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
856971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
857971bb1a5SLionel Sambuc /* uint32_t value_list */
858971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) value_list;
859971bb1a5SLionel Sambuc xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
860971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
861971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
862971bb1a5SLionel Sambuc
863971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
864971bb1a5SLionel Sambuc return xcb_ret;
865971bb1a5SLionel Sambuc }
866971bb1a5SLionel Sambuc
867971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_picture(xcb_connection_t * c,xcb_render_picture_t pid,xcb_drawable_t drawable,xcb_render_pictformat_t format,uint32_t value_mask,const uint32_t * value_list)868971bb1a5SLionel Sambuc xcb_render_create_picture (xcb_connection_t *c /**< */,
869971bb1a5SLionel Sambuc xcb_render_picture_t pid /**< */,
870971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
871971bb1a5SLionel Sambuc xcb_render_pictformat_t format /**< */,
872971bb1a5SLionel Sambuc uint32_t value_mask /**< */,
873971bb1a5SLionel Sambuc const uint32_t *value_list /**< */)
874971bb1a5SLionel Sambuc {
875971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
876971bb1a5SLionel Sambuc /* count */ 4,
877971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
878971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_PICTURE,
879971bb1a5SLionel Sambuc /* isvoid */ 1
880971bb1a5SLionel Sambuc };
881971bb1a5SLionel Sambuc
882971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
883971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
884971bb1a5SLionel Sambuc xcb_render_create_picture_request_t xcb_out;
885971bb1a5SLionel Sambuc
886971bb1a5SLionel Sambuc xcb_out.pid = pid;
887971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
888971bb1a5SLionel Sambuc xcb_out.format = format;
889971bb1a5SLionel Sambuc xcb_out.value_mask = value_mask;
890971bb1a5SLionel Sambuc
891971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
892971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
893971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
894971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
895971bb1a5SLionel Sambuc /* uint32_t value_list */
896971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) value_list;
897971bb1a5SLionel Sambuc xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
898971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
899971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
900971bb1a5SLionel Sambuc
901971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
902971bb1a5SLionel Sambuc return xcb_ret;
903971bb1a5SLionel Sambuc }
904971bb1a5SLionel Sambuc
905971bb1a5SLionel Sambuc int
xcb_render_change_picture_sizeof(const void * _buffer)906971bb1a5SLionel Sambuc xcb_render_change_picture_sizeof (const void *_buffer /**< */)
907971bb1a5SLionel Sambuc {
908971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
909971bb1a5SLionel Sambuc const xcb_render_change_picture_request_t *_aux = (xcb_render_change_picture_request_t *)_buffer;
910971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
911971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
912971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
913*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
914971bb1a5SLionel Sambuc
915971bb1a5SLionel Sambuc
916971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_change_picture_request_t);
917971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
918*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
919*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
920971bb1a5SLionel Sambuc /* value_list */
921971bb1a5SLionel Sambuc xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
922971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
923971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint32_t);
924971bb1a5SLionel Sambuc /* insert padding */
925971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
926971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
927971bb1a5SLionel Sambuc if (0 != xcb_pad) {
928971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
929971bb1a5SLionel Sambuc xcb_pad = 0;
930971bb1a5SLionel Sambuc }
931971bb1a5SLionel Sambuc xcb_block_len = 0;
932971bb1a5SLionel Sambuc
933971bb1a5SLionel Sambuc return xcb_buffer_len;
934971bb1a5SLionel Sambuc }
935971bb1a5SLionel Sambuc
936971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_change_picture_checked(xcb_connection_t * c,xcb_render_picture_t picture,uint32_t value_mask,const uint32_t * value_list)937971bb1a5SLionel Sambuc xcb_render_change_picture_checked (xcb_connection_t *c /**< */,
938971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
939971bb1a5SLionel Sambuc uint32_t value_mask /**< */,
940971bb1a5SLionel Sambuc const uint32_t *value_list /**< */)
941971bb1a5SLionel Sambuc {
942971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
943971bb1a5SLionel Sambuc /* count */ 4,
944971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
945971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CHANGE_PICTURE,
946971bb1a5SLionel Sambuc /* isvoid */ 1
947971bb1a5SLionel Sambuc };
948971bb1a5SLionel Sambuc
949971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
950971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
951971bb1a5SLionel Sambuc xcb_render_change_picture_request_t xcb_out;
952971bb1a5SLionel Sambuc
953971bb1a5SLionel Sambuc xcb_out.picture = picture;
954971bb1a5SLionel Sambuc xcb_out.value_mask = value_mask;
955971bb1a5SLionel Sambuc
956971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
957971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
958971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
959971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
960971bb1a5SLionel Sambuc /* uint32_t value_list */
961971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) value_list;
962971bb1a5SLionel Sambuc xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
963971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
964971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
965971bb1a5SLionel Sambuc
966971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
967971bb1a5SLionel Sambuc return xcb_ret;
968971bb1a5SLionel Sambuc }
969971bb1a5SLionel Sambuc
970971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_change_picture(xcb_connection_t * c,xcb_render_picture_t picture,uint32_t value_mask,const uint32_t * value_list)971971bb1a5SLionel Sambuc xcb_render_change_picture (xcb_connection_t *c /**< */,
972971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
973971bb1a5SLionel Sambuc uint32_t value_mask /**< */,
974971bb1a5SLionel Sambuc const uint32_t *value_list /**< */)
975971bb1a5SLionel Sambuc {
976971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
977971bb1a5SLionel Sambuc /* count */ 4,
978971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
979971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CHANGE_PICTURE,
980971bb1a5SLionel Sambuc /* isvoid */ 1
981971bb1a5SLionel Sambuc };
982971bb1a5SLionel Sambuc
983971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
984971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
985971bb1a5SLionel Sambuc xcb_render_change_picture_request_t xcb_out;
986971bb1a5SLionel Sambuc
987971bb1a5SLionel Sambuc xcb_out.picture = picture;
988971bb1a5SLionel Sambuc xcb_out.value_mask = value_mask;
989971bb1a5SLionel Sambuc
990971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
991971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
992971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
993971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
994971bb1a5SLionel Sambuc /* uint32_t value_list */
995971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) value_list;
996971bb1a5SLionel Sambuc xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
997971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
998971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
999971bb1a5SLionel Sambuc
1000971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1001971bb1a5SLionel Sambuc return xcb_ret;
1002971bb1a5SLionel Sambuc }
1003971bb1a5SLionel Sambuc
1004971bb1a5SLionel Sambuc int
xcb_render_set_picture_clip_rectangles_sizeof(const void * _buffer,uint32_t rectangles_len)1005971bb1a5SLionel Sambuc xcb_render_set_picture_clip_rectangles_sizeof (const void *_buffer /**< */,
1006971bb1a5SLionel Sambuc uint32_t rectangles_len /**< */)
1007971bb1a5SLionel Sambuc {
1008971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1009971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1010971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1011971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1012*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1013971bb1a5SLionel Sambuc
1014971bb1a5SLionel Sambuc
1015971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_set_picture_clip_rectangles_request_t);
1016971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1017*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1018*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1019971bb1a5SLionel Sambuc /* rectangles */
1020971bb1a5SLionel Sambuc xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
1021971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1022971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_rectangle_t);
1023971bb1a5SLionel Sambuc /* insert padding */
1024971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1025971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1026971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1027971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1028971bb1a5SLionel Sambuc xcb_pad = 0;
1029971bb1a5SLionel Sambuc }
1030971bb1a5SLionel Sambuc xcb_block_len = 0;
1031971bb1a5SLionel Sambuc
1032971bb1a5SLionel Sambuc return xcb_buffer_len;
1033971bb1a5SLionel Sambuc }
1034971bb1a5SLionel Sambuc
1035971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_set_picture_clip_rectangles_checked(xcb_connection_t * c,xcb_render_picture_t picture,int16_t clip_x_origin,int16_t clip_y_origin,uint32_t rectangles_len,const xcb_rectangle_t * rectangles)1036971bb1a5SLionel Sambuc xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c /**< */,
1037971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
1038971bb1a5SLionel Sambuc int16_t clip_x_origin /**< */,
1039971bb1a5SLionel Sambuc int16_t clip_y_origin /**< */,
1040971bb1a5SLionel Sambuc uint32_t rectangles_len /**< */,
1041971bb1a5SLionel Sambuc const xcb_rectangle_t *rectangles /**< */)
1042971bb1a5SLionel Sambuc {
1043971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1044971bb1a5SLionel Sambuc /* count */ 4,
1045971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1046971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES,
1047971bb1a5SLionel Sambuc /* isvoid */ 1
1048971bb1a5SLionel Sambuc };
1049971bb1a5SLionel Sambuc
1050971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1051971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1052971bb1a5SLionel Sambuc xcb_render_set_picture_clip_rectangles_request_t xcb_out;
1053971bb1a5SLionel Sambuc
1054971bb1a5SLionel Sambuc xcb_out.picture = picture;
1055971bb1a5SLionel Sambuc xcb_out.clip_x_origin = clip_x_origin;
1056971bb1a5SLionel Sambuc xcb_out.clip_y_origin = clip_y_origin;
1057971bb1a5SLionel Sambuc
1058971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1059971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1060971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1061971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1062971bb1a5SLionel Sambuc /* xcb_rectangle_t rectangles */
1063971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) rectangles;
1064971bb1a5SLionel Sambuc xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
1065971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1066971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1067971bb1a5SLionel Sambuc
1068971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1069971bb1a5SLionel Sambuc return xcb_ret;
1070971bb1a5SLionel Sambuc }
1071971bb1a5SLionel Sambuc
1072971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_set_picture_clip_rectangles(xcb_connection_t * c,xcb_render_picture_t picture,int16_t clip_x_origin,int16_t clip_y_origin,uint32_t rectangles_len,const xcb_rectangle_t * rectangles)1073971bb1a5SLionel Sambuc xcb_render_set_picture_clip_rectangles (xcb_connection_t *c /**< */,
1074971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
1075971bb1a5SLionel Sambuc int16_t clip_x_origin /**< */,
1076971bb1a5SLionel Sambuc int16_t clip_y_origin /**< */,
1077971bb1a5SLionel Sambuc uint32_t rectangles_len /**< */,
1078971bb1a5SLionel Sambuc const xcb_rectangle_t *rectangles /**< */)
1079971bb1a5SLionel Sambuc {
1080971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1081971bb1a5SLionel Sambuc /* count */ 4,
1082971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1083971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES,
1084971bb1a5SLionel Sambuc /* isvoid */ 1
1085971bb1a5SLionel Sambuc };
1086971bb1a5SLionel Sambuc
1087971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1088971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1089971bb1a5SLionel Sambuc xcb_render_set_picture_clip_rectangles_request_t xcb_out;
1090971bb1a5SLionel Sambuc
1091971bb1a5SLionel Sambuc xcb_out.picture = picture;
1092971bb1a5SLionel Sambuc xcb_out.clip_x_origin = clip_x_origin;
1093971bb1a5SLionel Sambuc xcb_out.clip_y_origin = clip_y_origin;
1094971bb1a5SLionel Sambuc
1095971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1096971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1097971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1098971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1099971bb1a5SLionel Sambuc /* xcb_rectangle_t rectangles */
1100971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) rectangles;
1101971bb1a5SLionel Sambuc xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
1102971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1103971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1104971bb1a5SLionel Sambuc
1105971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1106971bb1a5SLionel Sambuc return xcb_ret;
1107971bb1a5SLionel Sambuc }
1108971bb1a5SLionel Sambuc
1109971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_free_picture_checked(xcb_connection_t * c,xcb_render_picture_t picture)1110971bb1a5SLionel Sambuc xcb_render_free_picture_checked (xcb_connection_t *c /**< */,
1111971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */)
1112971bb1a5SLionel Sambuc {
1113971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1114971bb1a5SLionel Sambuc /* count */ 2,
1115971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1116971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_FREE_PICTURE,
1117971bb1a5SLionel Sambuc /* isvoid */ 1
1118971bb1a5SLionel Sambuc };
1119971bb1a5SLionel Sambuc
1120971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1121971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1122971bb1a5SLionel Sambuc xcb_render_free_picture_request_t xcb_out;
1123971bb1a5SLionel Sambuc
1124971bb1a5SLionel Sambuc xcb_out.picture = picture;
1125971bb1a5SLionel Sambuc
1126971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1127971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1128971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1129971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1130971bb1a5SLionel Sambuc
1131971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1132971bb1a5SLionel Sambuc return xcb_ret;
1133971bb1a5SLionel Sambuc }
1134971bb1a5SLionel Sambuc
1135971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_free_picture(xcb_connection_t * c,xcb_render_picture_t picture)1136971bb1a5SLionel Sambuc xcb_render_free_picture (xcb_connection_t *c /**< */,
1137971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */)
1138971bb1a5SLionel Sambuc {
1139971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1140971bb1a5SLionel Sambuc /* count */ 2,
1141971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1142971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_FREE_PICTURE,
1143971bb1a5SLionel Sambuc /* isvoid */ 1
1144971bb1a5SLionel Sambuc };
1145971bb1a5SLionel Sambuc
1146971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1147971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1148971bb1a5SLionel Sambuc xcb_render_free_picture_request_t xcb_out;
1149971bb1a5SLionel Sambuc
1150971bb1a5SLionel Sambuc xcb_out.picture = picture;
1151971bb1a5SLionel Sambuc
1152971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1153971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1154971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1155971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1156971bb1a5SLionel Sambuc
1157971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1158971bb1a5SLionel Sambuc return xcb_ret;
1159971bb1a5SLionel Sambuc }
1160971bb1a5SLionel Sambuc
1161971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_composite_checked(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t mask,xcb_render_picture_t dst,int16_t src_x,int16_t src_y,int16_t mask_x,int16_t mask_y,int16_t dst_x,int16_t dst_y,uint16_t width,uint16_t height)1162971bb1a5SLionel Sambuc xcb_render_composite_checked (xcb_connection_t *c /**< */,
1163971bb1a5SLionel Sambuc uint8_t op /**< */,
1164971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1165971bb1a5SLionel Sambuc xcb_render_picture_t mask /**< */,
1166971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1167971bb1a5SLionel Sambuc int16_t src_x /**< */,
1168971bb1a5SLionel Sambuc int16_t src_y /**< */,
1169971bb1a5SLionel Sambuc int16_t mask_x /**< */,
1170971bb1a5SLionel Sambuc int16_t mask_y /**< */,
1171971bb1a5SLionel Sambuc int16_t dst_x /**< */,
1172971bb1a5SLionel Sambuc int16_t dst_y /**< */,
1173971bb1a5SLionel Sambuc uint16_t width /**< */,
1174971bb1a5SLionel Sambuc uint16_t height /**< */)
1175971bb1a5SLionel Sambuc {
1176971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1177971bb1a5SLionel Sambuc /* count */ 2,
1178971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1179971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_COMPOSITE,
1180971bb1a5SLionel Sambuc /* isvoid */ 1
1181971bb1a5SLionel Sambuc };
1182971bb1a5SLionel Sambuc
1183971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1184971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1185971bb1a5SLionel Sambuc xcb_render_composite_request_t xcb_out;
1186971bb1a5SLionel Sambuc
1187971bb1a5SLionel Sambuc xcb_out.op = op;
1188971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1189971bb1a5SLionel Sambuc xcb_out.src = src;
1190971bb1a5SLionel Sambuc xcb_out.mask = mask;
1191971bb1a5SLionel Sambuc xcb_out.dst = dst;
1192971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1193971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1194971bb1a5SLionel Sambuc xcb_out.mask_x = mask_x;
1195971bb1a5SLionel Sambuc xcb_out.mask_y = mask_y;
1196971bb1a5SLionel Sambuc xcb_out.dst_x = dst_x;
1197971bb1a5SLionel Sambuc xcb_out.dst_y = dst_y;
1198971bb1a5SLionel Sambuc xcb_out.width = width;
1199971bb1a5SLionel Sambuc xcb_out.height = height;
1200971bb1a5SLionel Sambuc
1201971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1202971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1203971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1204971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1205971bb1a5SLionel Sambuc
1206971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1207971bb1a5SLionel Sambuc return xcb_ret;
1208971bb1a5SLionel Sambuc }
1209971bb1a5SLionel Sambuc
1210971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_composite(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t mask,xcb_render_picture_t dst,int16_t src_x,int16_t src_y,int16_t mask_x,int16_t mask_y,int16_t dst_x,int16_t dst_y,uint16_t width,uint16_t height)1211971bb1a5SLionel Sambuc xcb_render_composite (xcb_connection_t *c /**< */,
1212971bb1a5SLionel Sambuc uint8_t op /**< */,
1213971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1214971bb1a5SLionel Sambuc xcb_render_picture_t mask /**< */,
1215971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1216971bb1a5SLionel Sambuc int16_t src_x /**< */,
1217971bb1a5SLionel Sambuc int16_t src_y /**< */,
1218971bb1a5SLionel Sambuc int16_t mask_x /**< */,
1219971bb1a5SLionel Sambuc int16_t mask_y /**< */,
1220971bb1a5SLionel Sambuc int16_t dst_x /**< */,
1221971bb1a5SLionel Sambuc int16_t dst_y /**< */,
1222971bb1a5SLionel Sambuc uint16_t width /**< */,
1223971bb1a5SLionel Sambuc uint16_t height /**< */)
1224971bb1a5SLionel Sambuc {
1225971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1226971bb1a5SLionel Sambuc /* count */ 2,
1227971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1228971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_COMPOSITE,
1229971bb1a5SLionel Sambuc /* isvoid */ 1
1230971bb1a5SLionel Sambuc };
1231971bb1a5SLionel Sambuc
1232971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1233971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1234971bb1a5SLionel Sambuc xcb_render_composite_request_t xcb_out;
1235971bb1a5SLionel Sambuc
1236971bb1a5SLionel Sambuc xcb_out.op = op;
1237971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1238971bb1a5SLionel Sambuc xcb_out.src = src;
1239971bb1a5SLionel Sambuc xcb_out.mask = mask;
1240971bb1a5SLionel Sambuc xcb_out.dst = dst;
1241971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1242971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1243971bb1a5SLionel Sambuc xcb_out.mask_x = mask_x;
1244971bb1a5SLionel Sambuc xcb_out.mask_y = mask_y;
1245971bb1a5SLionel Sambuc xcb_out.dst_x = dst_x;
1246971bb1a5SLionel Sambuc xcb_out.dst_y = dst_y;
1247971bb1a5SLionel Sambuc xcb_out.width = width;
1248971bb1a5SLionel Sambuc xcb_out.height = height;
1249971bb1a5SLionel Sambuc
1250971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1251971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1252971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1253971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1254971bb1a5SLionel Sambuc
1255971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1256971bb1a5SLionel Sambuc return xcb_ret;
1257971bb1a5SLionel Sambuc }
1258971bb1a5SLionel Sambuc
1259971bb1a5SLionel Sambuc int
xcb_render_trapezoids_sizeof(const void * _buffer,uint32_t traps_len)1260971bb1a5SLionel Sambuc xcb_render_trapezoids_sizeof (const void *_buffer /**< */,
1261971bb1a5SLionel Sambuc uint32_t traps_len /**< */)
1262971bb1a5SLionel Sambuc {
1263971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1264971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1265971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1266971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1267*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1268971bb1a5SLionel Sambuc
1269971bb1a5SLionel Sambuc
1270971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_trapezoids_request_t);
1271971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1272*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1273*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1274971bb1a5SLionel Sambuc /* traps */
1275971bb1a5SLionel Sambuc xcb_block_len += traps_len * sizeof(xcb_render_trapezoid_t);
1276971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1277971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_trapezoid_t);
1278971bb1a5SLionel Sambuc /* insert padding */
1279971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1280971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1281971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1282971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1283971bb1a5SLionel Sambuc xcb_pad = 0;
1284971bb1a5SLionel Sambuc }
1285971bb1a5SLionel Sambuc xcb_block_len = 0;
1286971bb1a5SLionel Sambuc
1287971bb1a5SLionel Sambuc return xcb_buffer_len;
1288971bb1a5SLionel Sambuc }
1289971bb1a5SLionel Sambuc
1290971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_trapezoids_checked(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,int16_t src_x,int16_t src_y,uint32_t traps_len,const xcb_render_trapezoid_t * traps)1291971bb1a5SLionel Sambuc xcb_render_trapezoids_checked (xcb_connection_t *c /**< */,
1292971bb1a5SLionel Sambuc uint8_t op /**< */,
1293971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1294971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1295971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
1296971bb1a5SLionel Sambuc int16_t src_x /**< */,
1297971bb1a5SLionel Sambuc int16_t src_y /**< */,
1298971bb1a5SLionel Sambuc uint32_t traps_len /**< */,
1299971bb1a5SLionel Sambuc const xcb_render_trapezoid_t *traps /**< */)
1300971bb1a5SLionel Sambuc {
1301971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1302971bb1a5SLionel Sambuc /* count */ 4,
1303971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1304971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_TRAPEZOIDS,
1305971bb1a5SLionel Sambuc /* isvoid */ 1
1306971bb1a5SLionel Sambuc };
1307971bb1a5SLionel Sambuc
1308971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1309971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1310971bb1a5SLionel Sambuc xcb_render_trapezoids_request_t xcb_out;
1311971bb1a5SLionel Sambuc
1312971bb1a5SLionel Sambuc xcb_out.op = op;
1313971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1314971bb1a5SLionel Sambuc xcb_out.src = src;
1315971bb1a5SLionel Sambuc xcb_out.dst = dst;
1316971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
1317971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1318971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1319971bb1a5SLionel Sambuc
1320971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1321971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1322971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1323971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1324971bb1a5SLionel Sambuc /* xcb_render_trapezoid_t traps */
1325971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) traps;
1326971bb1a5SLionel Sambuc xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t);
1327971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1328971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1329971bb1a5SLionel Sambuc
1330971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1331971bb1a5SLionel Sambuc return xcb_ret;
1332971bb1a5SLionel Sambuc }
1333971bb1a5SLionel Sambuc
1334971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_trapezoids(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,int16_t src_x,int16_t src_y,uint32_t traps_len,const xcb_render_trapezoid_t * traps)1335971bb1a5SLionel Sambuc xcb_render_trapezoids (xcb_connection_t *c /**< */,
1336971bb1a5SLionel Sambuc uint8_t op /**< */,
1337971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1338971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1339971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
1340971bb1a5SLionel Sambuc int16_t src_x /**< */,
1341971bb1a5SLionel Sambuc int16_t src_y /**< */,
1342971bb1a5SLionel Sambuc uint32_t traps_len /**< */,
1343971bb1a5SLionel Sambuc const xcb_render_trapezoid_t *traps /**< */)
1344971bb1a5SLionel Sambuc {
1345971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1346971bb1a5SLionel Sambuc /* count */ 4,
1347971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1348971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_TRAPEZOIDS,
1349971bb1a5SLionel Sambuc /* isvoid */ 1
1350971bb1a5SLionel Sambuc };
1351971bb1a5SLionel Sambuc
1352971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1353971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1354971bb1a5SLionel Sambuc xcb_render_trapezoids_request_t xcb_out;
1355971bb1a5SLionel Sambuc
1356971bb1a5SLionel Sambuc xcb_out.op = op;
1357971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1358971bb1a5SLionel Sambuc xcb_out.src = src;
1359971bb1a5SLionel Sambuc xcb_out.dst = dst;
1360971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
1361971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1362971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1363971bb1a5SLionel Sambuc
1364971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1365971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1366971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1367971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1368971bb1a5SLionel Sambuc /* xcb_render_trapezoid_t traps */
1369971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) traps;
1370971bb1a5SLionel Sambuc xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t);
1371971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1372971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1373971bb1a5SLionel Sambuc
1374971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1375971bb1a5SLionel Sambuc return xcb_ret;
1376971bb1a5SLionel Sambuc }
1377971bb1a5SLionel Sambuc
1378971bb1a5SLionel Sambuc int
xcb_render_triangles_sizeof(const void * _buffer,uint32_t triangles_len)1379971bb1a5SLionel Sambuc xcb_render_triangles_sizeof (const void *_buffer /**< */,
1380971bb1a5SLionel Sambuc uint32_t triangles_len /**< */)
1381971bb1a5SLionel Sambuc {
1382971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1383971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1384971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1385971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1386*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1387971bb1a5SLionel Sambuc
1388971bb1a5SLionel Sambuc
1389971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_triangles_request_t);
1390971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1391*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1392*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1393971bb1a5SLionel Sambuc /* triangles */
1394971bb1a5SLionel Sambuc xcb_block_len += triangles_len * sizeof(xcb_render_triangle_t);
1395971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1396971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_triangle_t);
1397971bb1a5SLionel Sambuc /* insert padding */
1398971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1399971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1400971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1401971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1402971bb1a5SLionel Sambuc xcb_pad = 0;
1403971bb1a5SLionel Sambuc }
1404971bb1a5SLionel Sambuc xcb_block_len = 0;
1405971bb1a5SLionel Sambuc
1406971bb1a5SLionel Sambuc return xcb_buffer_len;
1407971bb1a5SLionel Sambuc }
1408971bb1a5SLionel Sambuc
1409971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_triangles_checked(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,int16_t src_x,int16_t src_y,uint32_t triangles_len,const xcb_render_triangle_t * triangles)1410971bb1a5SLionel Sambuc xcb_render_triangles_checked (xcb_connection_t *c /**< */,
1411971bb1a5SLionel Sambuc uint8_t op /**< */,
1412971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1413971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1414971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
1415971bb1a5SLionel Sambuc int16_t src_x /**< */,
1416971bb1a5SLionel Sambuc int16_t src_y /**< */,
1417971bb1a5SLionel Sambuc uint32_t triangles_len /**< */,
1418971bb1a5SLionel Sambuc const xcb_render_triangle_t *triangles /**< */)
1419971bb1a5SLionel Sambuc {
1420971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1421971bb1a5SLionel Sambuc /* count */ 4,
1422971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1423971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_TRIANGLES,
1424971bb1a5SLionel Sambuc /* isvoid */ 1
1425971bb1a5SLionel Sambuc };
1426971bb1a5SLionel Sambuc
1427971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1428971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1429971bb1a5SLionel Sambuc xcb_render_triangles_request_t xcb_out;
1430971bb1a5SLionel Sambuc
1431971bb1a5SLionel Sambuc xcb_out.op = op;
1432971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1433971bb1a5SLionel Sambuc xcb_out.src = src;
1434971bb1a5SLionel Sambuc xcb_out.dst = dst;
1435971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
1436971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1437971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1438971bb1a5SLionel Sambuc
1439971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1440971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1441971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1442971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1443971bb1a5SLionel Sambuc /* xcb_render_triangle_t triangles */
1444971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) triangles;
1445971bb1a5SLionel Sambuc xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t);
1446971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1447971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1448971bb1a5SLionel Sambuc
1449971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1450971bb1a5SLionel Sambuc return xcb_ret;
1451971bb1a5SLionel Sambuc }
1452971bb1a5SLionel Sambuc
1453971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_triangles(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,int16_t src_x,int16_t src_y,uint32_t triangles_len,const xcb_render_triangle_t * triangles)1454971bb1a5SLionel Sambuc xcb_render_triangles (xcb_connection_t *c /**< */,
1455971bb1a5SLionel Sambuc uint8_t op /**< */,
1456971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1457971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1458971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
1459971bb1a5SLionel Sambuc int16_t src_x /**< */,
1460971bb1a5SLionel Sambuc int16_t src_y /**< */,
1461971bb1a5SLionel Sambuc uint32_t triangles_len /**< */,
1462971bb1a5SLionel Sambuc const xcb_render_triangle_t *triangles /**< */)
1463971bb1a5SLionel Sambuc {
1464971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1465971bb1a5SLionel Sambuc /* count */ 4,
1466971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1467971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_TRIANGLES,
1468971bb1a5SLionel Sambuc /* isvoid */ 1
1469971bb1a5SLionel Sambuc };
1470971bb1a5SLionel Sambuc
1471971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1472971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1473971bb1a5SLionel Sambuc xcb_render_triangles_request_t xcb_out;
1474971bb1a5SLionel Sambuc
1475971bb1a5SLionel Sambuc xcb_out.op = op;
1476971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1477971bb1a5SLionel Sambuc xcb_out.src = src;
1478971bb1a5SLionel Sambuc xcb_out.dst = dst;
1479971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
1480971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1481971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1482971bb1a5SLionel Sambuc
1483971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1484971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1485971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1486971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1487971bb1a5SLionel Sambuc /* xcb_render_triangle_t triangles */
1488971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) triangles;
1489971bb1a5SLionel Sambuc xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t);
1490971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1491971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1492971bb1a5SLionel Sambuc
1493971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1494971bb1a5SLionel Sambuc return xcb_ret;
1495971bb1a5SLionel Sambuc }
1496971bb1a5SLionel Sambuc
1497971bb1a5SLionel Sambuc int
xcb_render_tri_strip_sizeof(const void * _buffer,uint32_t points_len)1498971bb1a5SLionel Sambuc xcb_render_tri_strip_sizeof (const void *_buffer /**< */,
1499971bb1a5SLionel Sambuc uint32_t points_len /**< */)
1500971bb1a5SLionel Sambuc {
1501971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1502971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1503971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1504971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1505*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1506971bb1a5SLionel Sambuc
1507971bb1a5SLionel Sambuc
1508971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_tri_strip_request_t);
1509971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1510*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1511*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1512971bb1a5SLionel Sambuc /* points */
1513971bb1a5SLionel Sambuc xcb_block_len += points_len * sizeof(xcb_render_pointfix_t);
1514971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1515971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_pointfix_t);
1516971bb1a5SLionel Sambuc /* insert padding */
1517971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1518971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1519971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1520971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1521971bb1a5SLionel Sambuc xcb_pad = 0;
1522971bb1a5SLionel Sambuc }
1523971bb1a5SLionel Sambuc xcb_block_len = 0;
1524971bb1a5SLionel Sambuc
1525971bb1a5SLionel Sambuc return xcb_buffer_len;
1526971bb1a5SLionel Sambuc }
1527971bb1a5SLionel Sambuc
1528971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_tri_strip_checked(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,int16_t src_x,int16_t src_y,uint32_t points_len,const xcb_render_pointfix_t * points)1529971bb1a5SLionel Sambuc xcb_render_tri_strip_checked (xcb_connection_t *c /**< */,
1530971bb1a5SLionel Sambuc uint8_t op /**< */,
1531971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1532971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1533971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
1534971bb1a5SLionel Sambuc int16_t src_x /**< */,
1535971bb1a5SLionel Sambuc int16_t src_y /**< */,
1536971bb1a5SLionel Sambuc uint32_t points_len /**< */,
1537971bb1a5SLionel Sambuc const xcb_render_pointfix_t *points /**< */)
1538971bb1a5SLionel Sambuc {
1539971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1540971bb1a5SLionel Sambuc /* count */ 4,
1541971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1542971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_TRI_STRIP,
1543971bb1a5SLionel Sambuc /* isvoid */ 1
1544971bb1a5SLionel Sambuc };
1545971bb1a5SLionel Sambuc
1546971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1547971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1548971bb1a5SLionel Sambuc xcb_render_tri_strip_request_t xcb_out;
1549971bb1a5SLionel Sambuc
1550971bb1a5SLionel Sambuc xcb_out.op = op;
1551971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1552971bb1a5SLionel Sambuc xcb_out.src = src;
1553971bb1a5SLionel Sambuc xcb_out.dst = dst;
1554971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
1555971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1556971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1557971bb1a5SLionel Sambuc
1558971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1559971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1560971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1561971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1562971bb1a5SLionel Sambuc /* xcb_render_pointfix_t points */
1563971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) points;
1564971bb1a5SLionel Sambuc xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
1565971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1566971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1567971bb1a5SLionel Sambuc
1568971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1569971bb1a5SLionel Sambuc return xcb_ret;
1570971bb1a5SLionel Sambuc }
1571971bb1a5SLionel Sambuc
1572971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_tri_strip(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,int16_t src_x,int16_t src_y,uint32_t points_len,const xcb_render_pointfix_t * points)1573971bb1a5SLionel Sambuc xcb_render_tri_strip (xcb_connection_t *c /**< */,
1574971bb1a5SLionel Sambuc uint8_t op /**< */,
1575971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1576971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1577971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
1578971bb1a5SLionel Sambuc int16_t src_x /**< */,
1579971bb1a5SLionel Sambuc int16_t src_y /**< */,
1580971bb1a5SLionel Sambuc uint32_t points_len /**< */,
1581971bb1a5SLionel Sambuc const xcb_render_pointfix_t *points /**< */)
1582971bb1a5SLionel Sambuc {
1583971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1584971bb1a5SLionel Sambuc /* count */ 4,
1585971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1586971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_TRI_STRIP,
1587971bb1a5SLionel Sambuc /* isvoid */ 1
1588971bb1a5SLionel Sambuc };
1589971bb1a5SLionel Sambuc
1590971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1591971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1592971bb1a5SLionel Sambuc xcb_render_tri_strip_request_t xcb_out;
1593971bb1a5SLionel Sambuc
1594971bb1a5SLionel Sambuc xcb_out.op = op;
1595971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1596971bb1a5SLionel Sambuc xcb_out.src = src;
1597971bb1a5SLionel Sambuc xcb_out.dst = dst;
1598971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
1599971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1600971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1601971bb1a5SLionel Sambuc
1602971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1603971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1604971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1605971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1606971bb1a5SLionel Sambuc /* xcb_render_pointfix_t points */
1607971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) points;
1608971bb1a5SLionel Sambuc xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
1609971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1610971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1611971bb1a5SLionel Sambuc
1612971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1613971bb1a5SLionel Sambuc return xcb_ret;
1614971bb1a5SLionel Sambuc }
1615971bb1a5SLionel Sambuc
1616971bb1a5SLionel Sambuc int
xcb_render_tri_fan_sizeof(const void * _buffer,uint32_t points_len)1617971bb1a5SLionel Sambuc xcb_render_tri_fan_sizeof (const void *_buffer /**< */,
1618971bb1a5SLionel Sambuc uint32_t points_len /**< */)
1619971bb1a5SLionel Sambuc {
1620971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1621971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1622971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1623971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1624*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1625971bb1a5SLionel Sambuc
1626971bb1a5SLionel Sambuc
1627971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_tri_fan_request_t);
1628971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1629*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1630*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1631971bb1a5SLionel Sambuc /* points */
1632971bb1a5SLionel Sambuc xcb_block_len += points_len * sizeof(xcb_render_pointfix_t);
1633971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1634971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_pointfix_t);
1635971bb1a5SLionel Sambuc /* insert padding */
1636971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1637971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1638971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1639971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1640971bb1a5SLionel Sambuc xcb_pad = 0;
1641971bb1a5SLionel Sambuc }
1642971bb1a5SLionel Sambuc xcb_block_len = 0;
1643971bb1a5SLionel Sambuc
1644971bb1a5SLionel Sambuc return xcb_buffer_len;
1645971bb1a5SLionel Sambuc }
1646971bb1a5SLionel Sambuc
1647971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_tri_fan_checked(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,int16_t src_x,int16_t src_y,uint32_t points_len,const xcb_render_pointfix_t * points)1648971bb1a5SLionel Sambuc xcb_render_tri_fan_checked (xcb_connection_t *c /**< */,
1649971bb1a5SLionel Sambuc uint8_t op /**< */,
1650971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1651971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1652971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
1653971bb1a5SLionel Sambuc int16_t src_x /**< */,
1654971bb1a5SLionel Sambuc int16_t src_y /**< */,
1655971bb1a5SLionel Sambuc uint32_t points_len /**< */,
1656971bb1a5SLionel Sambuc const xcb_render_pointfix_t *points /**< */)
1657971bb1a5SLionel Sambuc {
1658971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1659971bb1a5SLionel Sambuc /* count */ 4,
1660971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1661971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_TRI_FAN,
1662971bb1a5SLionel Sambuc /* isvoid */ 1
1663971bb1a5SLionel Sambuc };
1664971bb1a5SLionel Sambuc
1665971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1666971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1667971bb1a5SLionel Sambuc xcb_render_tri_fan_request_t xcb_out;
1668971bb1a5SLionel Sambuc
1669971bb1a5SLionel Sambuc xcb_out.op = op;
1670971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1671971bb1a5SLionel Sambuc xcb_out.src = src;
1672971bb1a5SLionel Sambuc xcb_out.dst = dst;
1673971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
1674971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1675971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1676971bb1a5SLionel Sambuc
1677971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1678971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1679971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1680971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1681971bb1a5SLionel Sambuc /* xcb_render_pointfix_t points */
1682971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) points;
1683971bb1a5SLionel Sambuc xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
1684971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1685971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1686971bb1a5SLionel Sambuc
1687971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1688971bb1a5SLionel Sambuc return xcb_ret;
1689971bb1a5SLionel Sambuc }
1690971bb1a5SLionel Sambuc
1691971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_tri_fan(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,int16_t src_x,int16_t src_y,uint32_t points_len,const xcb_render_pointfix_t * points)1692971bb1a5SLionel Sambuc xcb_render_tri_fan (xcb_connection_t *c /**< */,
1693971bb1a5SLionel Sambuc uint8_t op /**< */,
1694971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
1695971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
1696971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
1697971bb1a5SLionel Sambuc int16_t src_x /**< */,
1698971bb1a5SLionel Sambuc int16_t src_y /**< */,
1699971bb1a5SLionel Sambuc uint32_t points_len /**< */,
1700971bb1a5SLionel Sambuc const xcb_render_pointfix_t *points /**< */)
1701971bb1a5SLionel Sambuc {
1702971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1703971bb1a5SLionel Sambuc /* count */ 4,
1704971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1705971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_TRI_FAN,
1706971bb1a5SLionel Sambuc /* isvoid */ 1
1707971bb1a5SLionel Sambuc };
1708971bb1a5SLionel Sambuc
1709971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1710971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1711971bb1a5SLionel Sambuc xcb_render_tri_fan_request_t xcb_out;
1712971bb1a5SLionel Sambuc
1713971bb1a5SLionel Sambuc xcb_out.op = op;
1714971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1715971bb1a5SLionel Sambuc xcb_out.src = src;
1716971bb1a5SLionel Sambuc xcb_out.dst = dst;
1717971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
1718971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
1719971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
1720971bb1a5SLionel Sambuc
1721971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1722971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1723971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1724971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1725971bb1a5SLionel Sambuc /* xcb_render_pointfix_t points */
1726971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) points;
1727971bb1a5SLionel Sambuc xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
1728971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1729971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1730971bb1a5SLionel Sambuc
1731971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1732971bb1a5SLionel Sambuc return xcb_ret;
1733971bb1a5SLionel Sambuc }
1734971bb1a5SLionel Sambuc
1735971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_glyph_set_checked(xcb_connection_t * c,xcb_render_glyphset_t gsid,xcb_render_pictformat_t format)1736971bb1a5SLionel Sambuc xcb_render_create_glyph_set_checked (xcb_connection_t *c /**< */,
1737971bb1a5SLionel Sambuc xcb_render_glyphset_t gsid /**< */,
1738971bb1a5SLionel Sambuc xcb_render_pictformat_t format /**< */)
1739971bb1a5SLionel Sambuc {
1740971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1741971bb1a5SLionel Sambuc /* count */ 2,
1742971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1743971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_GLYPH_SET,
1744971bb1a5SLionel Sambuc /* isvoid */ 1
1745971bb1a5SLionel Sambuc };
1746971bb1a5SLionel Sambuc
1747971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1748971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1749971bb1a5SLionel Sambuc xcb_render_create_glyph_set_request_t xcb_out;
1750971bb1a5SLionel Sambuc
1751971bb1a5SLionel Sambuc xcb_out.gsid = gsid;
1752971bb1a5SLionel Sambuc xcb_out.format = format;
1753971bb1a5SLionel Sambuc
1754971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1755971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1756971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1757971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1758971bb1a5SLionel Sambuc
1759971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1760971bb1a5SLionel Sambuc return xcb_ret;
1761971bb1a5SLionel Sambuc }
1762971bb1a5SLionel Sambuc
1763971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_glyph_set(xcb_connection_t * c,xcb_render_glyphset_t gsid,xcb_render_pictformat_t format)1764971bb1a5SLionel Sambuc xcb_render_create_glyph_set (xcb_connection_t *c /**< */,
1765971bb1a5SLionel Sambuc xcb_render_glyphset_t gsid /**< */,
1766971bb1a5SLionel Sambuc xcb_render_pictformat_t format /**< */)
1767971bb1a5SLionel Sambuc {
1768971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1769971bb1a5SLionel Sambuc /* count */ 2,
1770971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1771971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_GLYPH_SET,
1772971bb1a5SLionel Sambuc /* isvoid */ 1
1773971bb1a5SLionel Sambuc };
1774971bb1a5SLionel Sambuc
1775971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1776971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1777971bb1a5SLionel Sambuc xcb_render_create_glyph_set_request_t xcb_out;
1778971bb1a5SLionel Sambuc
1779971bb1a5SLionel Sambuc xcb_out.gsid = gsid;
1780971bb1a5SLionel Sambuc xcb_out.format = format;
1781971bb1a5SLionel Sambuc
1782971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1783971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1784971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1785971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1786971bb1a5SLionel Sambuc
1787971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1788971bb1a5SLionel Sambuc return xcb_ret;
1789971bb1a5SLionel Sambuc }
1790971bb1a5SLionel Sambuc
1791971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_reference_glyph_set_checked(xcb_connection_t * c,xcb_render_glyphset_t gsid,xcb_render_glyphset_t existing)1792971bb1a5SLionel Sambuc xcb_render_reference_glyph_set_checked (xcb_connection_t *c /**< */,
1793971bb1a5SLionel Sambuc xcb_render_glyphset_t gsid /**< */,
1794971bb1a5SLionel Sambuc xcb_render_glyphset_t existing /**< */)
1795971bb1a5SLionel Sambuc {
1796971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1797971bb1a5SLionel Sambuc /* count */ 2,
1798971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1799971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET,
1800971bb1a5SLionel Sambuc /* isvoid */ 1
1801971bb1a5SLionel Sambuc };
1802971bb1a5SLionel Sambuc
1803971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1804971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1805971bb1a5SLionel Sambuc xcb_render_reference_glyph_set_request_t xcb_out;
1806971bb1a5SLionel Sambuc
1807971bb1a5SLionel Sambuc xcb_out.gsid = gsid;
1808971bb1a5SLionel Sambuc xcb_out.existing = existing;
1809971bb1a5SLionel Sambuc
1810971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1811971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1812971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1813971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1814971bb1a5SLionel Sambuc
1815971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1816971bb1a5SLionel Sambuc return xcb_ret;
1817971bb1a5SLionel Sambuc }
1818971bb1a5SLionel Sambuc
1819971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_reference_glyph_set(xcb_connection_t * c,xcb_render_glyphset_t gsid,xcb_render_glyphset_t existing)1820971bb1a5SLionel Sambuc xcb_render_reference_glyph_set (xcb_connection_t *c /**< */,
1821971bb1a5SLionel Sambuc xcb_render_glyphset_t gsid /**< */,
1822971bb1a5SLionel Sambuc xcb_render_glyphset_t existing /**< */)
1823971bb1a5SLionel Sambuc {
1824971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1825971bb1a5SLionel Sambuc /* count */ 2,
1826971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1827971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET,
1828971bb1a5SLionel Sambuc /* isvoid */ 1
1829971bb1a5SLionel Sambuc };
1830971bb1a5SLionel Sambuc
1831971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1832971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1833971bb1a5SLionel Sambuc xcb_render_reference_glyph_set_request_t xcb_out;
1834971bb1a5SLionel Sambuc
1835971bb1a5SLionel Sambuc xcb_out.gsid = gsid;
1836971bb1a5SLionel Sambuc xcb_out.existing = existing;
1837971bb1a5SLionel Sambuc
1838971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1839971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1840971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1841971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1842971bb1a5SLionel Sambuc
1843971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1844971bb1a5SLionel Sambuc return xcb_ret;
1845971bb1a5SLionel Sambuc }
1846971bb1a5SLionel Sambuc
1847971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_free_glyph_set_checked(xcb_connection_t * c,xcb_render_glyphset_t glyphset)1848971bb1a5SLionel Sambuc xcb_render_free_glyph_set_checked (xcb_connection_t *c /**< */,
1849971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */)
1850971bb1a5SLionel Sambuc {
1851971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1852971bb1a5SLionel Sambuc /* count */ 2,
1853971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1854971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_FREE_GLYPH_SET,
1855971bb1a5SLionel Sambuc /* isvoid */ 1
1856971bb1a5SLionel Sambuc };
1857971bb1a5SLionel Sambuc
1858971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1859971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1860971bb1a5SLionel Sambuc xcb_render_free_glyph_set_request_t xcb_out;
1861971bb1a5SLionel Sambuc
1862971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
1863971bb1a5SLionel Sambuc
1864971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1865971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1866971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1867971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1868971bb1a5SLionel Sambuc
1869971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1870971bb1a5SLionel Sambuc return xcb_ret;
1871971bb1a5SLionel Sambuc }
1872971bb1a5SLionel Sambuc
1873971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_free_glyph_set(xcb_connection_t * c,xcb_render_glyphset_t glyphset)1874971bb1a5SLionel Sambuc xcb_render_free_glyph_set (xcb_connection_t *c /**< */,
1875971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */)
1876971bb1a5SLionel Sambuc {
1877971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1878971bb1a5SLionel Sambuc /* count */ 2,
1879971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1880971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_FREE_GLYPH_SET,
1881971bb1a5SLionel Sambuc /* isvoid */ 1
1882971bb1a5SLionel Sambuc };
1883971bb1a5SLionel Sambuc
1884971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1885971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1886971bb1a5SLionel Sambuc xcb_render_free_glyph_set_request_t xcb_out;
1887971bb1a5SLionel Sambuc
1888971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
1889971bb1a5SLionel Sambuc
1890971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1891971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1892971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1893971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1894971bb1a5SLionel Sambuc
1895971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1896971bb1a5SLionel Sambuc return xcb_ret;
1897971bb1a5SLionel Sambuc }
1898971bb1a5SLionel Sambuc
1899971bb1a5SLionel Sambuc int
xcb_render_add_glyphs_sizeof(const void * _buffer,uint32_t data_len)1900971bb1a5SLionel Sambuc xcb_render_add_glyphs_sizeof (const void *_buffer /**< */,
1901971bb1a5SLionel Sambuc uint32_t data_len /**< */)
1902971bb1a5SLionel Sambuc {
1903971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1904971bb1a5SLionel Sambuc const xcb_render_add_glyphs_request_t *_aux = (xcb_render_add_glyphs_request_t *)_buffer;
1905971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1906971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1907971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1908*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1909971bb1a5SLionel Sambuc
1910971bb1a5SLionel Sambuc
1911971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_add_glyphs_request_t);
1912971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1913*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1914*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1915971bb1a5SLionel Sambuc /* glyphids */
1916971bb1a5SLionel Sambuc xcb_block_len += _aux->glyphs_len * sizeof(uint32_t);
1917971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1918971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint32_t);
1919971bb1a5SLionel Sambuc /* insert padding */
1920971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1921971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1922971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1923971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1924971bb1a5SLionel Sambuc xcb_pad = 0;
1925971bb1a5SLionel Sambuc }
1926971bb1a5SLionel Sambuc xcb_block_len = 0;
1927971bb1a5SLionel Sambuc /* glyphs */
1928971bb1a5SLionel Sambuc xcb_block_len += _aux->glyphs_len * sizeof(xcb_render_glyphinfo_t);
1929971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1930971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_glyphinfo_t);
1931971bb1a5SLionel Sambuc /* insert padding */
1932971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1933971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1934971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1935971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1936971bb1a5SLionel Sambuc xcb_pad = 0;
1937971bb1a5SLionel Sambuc }
1938971bb1a5SLionel Sambuc xcb_block_len = 0;
1939971bb1a5SLionel Sambuc /* data */
1940971bb1a5SLionel Sambuc xcb_block_len += data_len * sizeof(uint8_t);
1941971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1942971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint8_t);
1943971bb1a5SLionel Sambuc /* insert padding */
1944971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1945971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1946971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1947971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1948971bb1a5SLionel Sambuc xcb_pad = 0;
1949971bb1a5SLionel Sambuc }
1950971bb1a5SLionel Sambuc xcb_block_len = 0;
1951971bb1a5SLionel Sambuc
1952971bb1a5SLionel Sambuc return xcb_buffer_len;
1953971bb1a5SLionel Sambuc }
1954971bb1a5SLionel Sambuc
1955971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_add_glyphs_checked(xcb_connection_t * c,xcb_render_glyphset_t glyphset,uint32_t glyphs_len,const uint32_t * glyphids,const xcb_render_glyphinfo_t * glyphs,uint32_t data_len,const uint8_t * data)1956971bb1a5SLionel Sambuc xcb_render_add_glyphs_checked (xcb_connection_t *c /**< */,
1957971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
1958971bb1a5SLionel Sambuc uint32_t glyphs_len /**< */,
1959971bb1a5SLionel Sambuc const uint32_t *glyphids /**< */,
1960971bb1a5SLionel Sambuc const xcb_render_glyphinfo_t *glyphs /**< */,
1961971bb1a5SLionel Sambuc uint32_t data_len /**< */,
1962971bb1a5SLionel Sambuc const uint8_t *data /**< */)
1963971bb1a5SLionel Sambuc {
1964971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1965971bb1a5SLionel Sambuc /* count */ 8,
1966971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
1967971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_ADD_GLYPHS,
1968971bb1a5SLionel Sambuc /* isvoid */ 1
1969971bb1a5SLionel Sambuc };
1970971bb1a5SLionel Sambuc
1971971bb1a5SLionel Sambuc struct iovec xcb_parts[10];
1972971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1973971bb1a5SLionel Sambuc xcb_render_add_glyphs_request_t xcb_out;
1974971bb1a5SLionel Sambuc
1975971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
1976971bb1a5SLionel Sambuc xcb_out.glyphs_len = glyphs_len;
1977971bb1a5SLionel Sambuc
1978971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1979971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1980971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1981971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1982971bb1a5SLionel Sambuc /* uint32_t glyphids */
1983971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphids;
1984971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t);
1985971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1986971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1987971bb1a5SLionel Sambuc /* xcb_render_glyphinfo_t glyphs */
1988971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) glyphs;
1989971bb1a5SLionel Sambuc xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t);
1990971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
1991971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
1992971bb1a5SLionel Sambuc /* uint8_t data */
1993971bb1a5SLionel Sambuc xcb_parts[8].iov_base = (char *) data;
1994971bb1a5SLionel Sambuc xcb_parts[8].iov_len = data_len * sizeof(uint8_t);
1995971bb1a5SLionel Sambuc xcb_parts[9].iov_base = 0;
1996971bb1a5SLionel Sambuc xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
1997971bb1a5SLionel Sambuc
1998971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1999971bb1a5SLionel Sambuc return xcb_ret;
2000971bb1a5SLionel Sambuc }
2001971bb1a5SLionel Sambuc
2002971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_add_glyphs(xcb_connection_t * c,xcb_render_glyphset_t glyphset,uint32_t glyphs_len,const uint32_t * glyphids,const xcb_render_glyphinfo_t * glyphs,uint32_t data_len,const uint8_t * data)2003971bb1a5SLionel Sambuc xcb_render_add_glyphs (xcb_connection_t *c /**< */,
2004971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
2005971bb1a5SLionel Sambuc uint32_t glyphs_len /**< */,
2006971bb1a5SLionel Sambuc const uint32_t *glyphids /**< */,
2007971bb1a5SLionel Sambuc const xcb_render_glyphinfo_t *glyphs /**< */,
2008971bb1a5SLionel Sambuc uint32_t data_len /**< */,
2009971bb1a5SLionel Sambuc const uint8_t *data /**< */)
2010971bb1a5SLionel Sambuc {
2011971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2012971bb1a5SLionel Sambuc /* count */ 8,
2013971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2014971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_ADD_GLYPHS,
2015971bb1a5SLionel Sambuc /* isvoid */ 1
2016971bb1a5SLionel Sambuc };
2017971bb1a5SLionel Sambuc
2018971bb1a5SLionel Sambuc struct iovec xcb_parts[10];
2019971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2020971bb1a5SLionel Sambuc xcb_render_add_glyphs_request_t xcb_out;
2021971bb1a5SLionel Sambuc
2022971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
2023971bb1a5SLionel Sambuc xcb_out.glyphs_len = glyphs_len;
2024971bb1a5SLionel Sambuc
2025971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2026971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2027971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2028971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2029971bb1a5SLionel Sambuc /* uint32_t glyphids */
2030971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphids;
2031971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t);
2032971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2033971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2034971bb1a5SLionel Sambuc /* xcb_render_glyphinfo_t glyphs */
2035971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) glyphs;
2036971bb1a5SLionel Sambuc xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t);
2037971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
2038971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
2039971bb1a5SLionel Sambuc /* uint8_t data */
2040971bb1a5SLionel Sambuc xcb_parts[8].iov_base = (char *) data;
2041971bb1a5SLionel Sambuc xcb_parts[8].iov_len = data_len * sizeof(uint8_t);
2042971bb1a5SLionel Sambuc xcb_parts[9].iov_base = 0;
2043971bb1a5SLionel Sambuc xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
2044971bb1a5SLionel Sambuc
2045971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2046971bb1a5SLionel Sambuc return xcb_ret;
2047971bb1a5SLionel Sambuc }
2048971bb1a5SLionel Sambuc
2049971bb1a5SLionel Sambuc int
xcb_render_free_glyphs_sizeof(const void * _buffer,uint32_t glyphs_len)2050971bb1a5SLionel Sambuc xcb_render_free_glyphs_sizeof (const void *_buffer /**< */,
2051971bb1a5SLionel Sambuc uint32_t glyphs_len /**< */)
2052971bb1a5SLionel Sambuc {
2053971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
2054971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
2055971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
2056971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
2057*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
2058971bb1a5SLionel Sambuc
2059971bb1a5SLionel Sambuc
2060971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_free_glyphs_request_t);
2061971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2062*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
2063*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2064971bb1a5SLionel Sambuc /* glyphs */
2065971bb1a5SLionel Sambuc xcb_block_len += glyphs_len * sizeof(xcb_render_glyph_t);
2066971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2067971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_glyph_t);
2068971bb1a5SLionel Sambuc /* insert padding */
2069971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2070971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2071971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2072971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2073971bb1a5SLionel Sambuc xcb_pad = 0;
2074971bb1a5SLionel Sambuc }
2075971bb1a5SLionel Sambuc xcb_block_len = 0;
2076971bb1a5SLionel Sambuc
2077971bb1a5SLionel Sambuc return xcb_buffer_len;
2078971bb1a5SLionel Sambuc }
2079971bb1a5SLionel Sambuc
2080971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_free_glyphs_checked(xcb_connection_t * c,xcb_render_glyphset_t glyphset,uint32_t glyphs_len,const xcb_render_glyph_t * glyphs)2081971bb1a5SLionel Sambuc xcb_render_free_glyphs_checked (xcb_connection_t *c /**< */,
2082971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
2083971bb1a5SLionel Sambuc uint32_t glyphs_len /**< */,
2084971bb1a5SLionel Sambuc const xcb_render_glyph_t *glyphs /**< */)
2085971bb1a5SLionel Sambuc {
2086971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2087971bb1a5SLionel Sambuc /* count */ 4,
2088971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2089971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_FREE_GLYPHS,
2090971bb1a5SLionel Sambuc /* isvoid */ 1
2091971bb1a5SLionel Sambuc };
2092971bb1a5SLionel Sambuc
2093971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2094971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2095971bb1a5SLionel Sambuc xcb_render_free_glyphs_request_t xcb_out;
2096971bb1a5SLionel Sambuc
2097971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
2098971bb1a5SLionel Sambuc
2099971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2100971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2101971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2102971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2103971bb1a5SLionel Sambuc /* xcb_render_glyph_t glyphs */
2104971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphs;
2105971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t);
2106971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2107971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2108971bb1a5SLionel Sambuc
2109971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2110971bb1a5SLionel Sambuc return xcb_ret;
2111971bb1a5SLionel Sambuc }
2112971bb1a5SLionel Sambuc
2113971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_free_glyphs(xcb_connection_t * c,xcb_render_glyphset_t glyphset,uint32_t glyphs_len,const xcb_render_glyph_t * glyphs)2114971bb1a5SLionel Sambuc xcb_render_free_glyphs (xcb_connection_t *c /**< */,
2115971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
2116971bb1a5SLionel Sambuc uint32_t glyphs_len /**< */,
2117971bb1a5SLionel Sambuc const xcb_render_glyph_t *glyphs /**< */)
2118971bb1a5SLionel Sambuc {
2119971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2120971bb1a5SLionel Sambuc /* count */ 4,
2121971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2122971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_FREE_GLYPHS,
2123971bb1a5SLionel Sambuc /* isvoid */ 1
2124971bb1a5SLionel Sambuc };
2125971bb1a5SLionel Sambuc
2126971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2127971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2128971bb1a5SLionel Sambuc xcb_render_free_glyphs_request_t xcb_out;
2129971bb1a5SLionel Sambuc
2130971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
2131971bb1a5SLionel Sambuc
2132971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2133971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2134971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2135971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2136971bb1a5SLionel Sambuc /* xcb_render_glyph_t glyphs */
2137971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphs;
2138971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t);
2139971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2140971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2141971bb1a5SLionel Sambuc
2142971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2143971bb1a5SLionel Sambuc return xcb_ret;
2144971bb1a5SLionel Sambuc }
2145971bb1a5SLionel Sambuc
2146971bb1a5SLionel Sambuc int
xcb_render_composite_glyphs_8_sizeof(const void * _buffer,uint32_t glyphcmds_len)2147971bb1a5SLionel Sambuc xcb_render_composite_glyphs_8_sizeof (const void *_buffer /**< */,
2148971bb1a5SLionel Sambuc uint32_t glyphcmds_len /**< */)
2149971bb1a5SLionel Sambuc {
2150971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
2151971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
2152971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
2153971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
2154*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
2155971bb1a5SLionel Sambuc
2156971bb1a5SLionel Sambuc
2157971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_composite_glyphs_8_request_t);
2158971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2159*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
2160*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2161971bb1a5SLionel Sambuc /* glyphcmds */
2162971bb1a5SLionel Sambuc xcb_block_len += glyphcmds_len * sizeof(uint8_t);
2163971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2164971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint8_t);
2165971bb1a5SLionel Sambuc /* insert padding */
2166971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2167971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2168971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2169971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2170971bb1a5SLionel Sambuc xcb_pad = 0;
2171971bb1a5SLionel Sambuc }
2172971bb1a5SLionel Sambuc xcb_block_len = 0;
2173971bb1a5SLionel Sambuc
2174971bb1a5SLionel Sambuc return xcb_buffer_len;
2175971bb1a5SLionel Sambuc }
2176971bb1a5SLionel Sambuc
2177971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_composite_glyphs_8_checked(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,xcb_render_glyphset_t glyphset,int16_t src_x,int16_t src_y,uint32_t glyphcmds_len,const uint8_t * glyphcmds)2178971bb1a5SLionel Sambuc xcb_render_composite_glyphs_8_checked (xcb_connection_t *c /**< */,
2179971bb1a5SLionel Sambuc uint8_t op /**< */,
2180971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
2181971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
2182971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
2183971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
2184971bb1a5SLionel Sambuc int16_t src_x /**< */,
2185971bb1a5SLionel Sambuc int16_t src_y /**< */,
2186971bb1a5SLionel Sambuc uint32_t glyphcmds_len /**< */,
2187971bb1a5SLionel Sambuc const uint8_t *glyphcmds /**< */)
2188971bb1a5SLionel Sambuc {
2189971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2190971bb1a5SLionel Sambuc /* count */ 4,
2191971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2192971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8,
2193971bb1a5SLionel Sambuc /* isvoid */ 1
2194971bb1a5SLionel Sambuc };
2195971bb1a5SLionel Sambuc
2196971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2197971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2198971bb1a5SLionel Sambuc xcb_render_composite_glyphs_8_request_t xcb_out;
2199971bb1a5SLionel Sambuc
2200971bb1a5SLionel Sambuc xcb_out.op = op;
2201971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
2202971bb1a5SLionel Sambuc xcb_out.src = src;
2203971bb1a5SLionel Sambuc xcb_out.dst = dst;
2204971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
2205971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
2206971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
2207971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
2208971bb1a5SLionel Sambuc
2209971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2210971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2211971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2212971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2213971bb1a5SLionel Sambuc /* uint8_t glyphcmds */
2214971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphcmds;
2215971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2216971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2217971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2218971bb1a5SLionel Sambuc
2219971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2220971bb1a5SLionel Sambuc return xcb_ret;
2221971bb1a5SLionel Sambuc }
2222971bb1a5SLionel Sambuc
2223971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_composite_glyphs_8(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,xcb_render_glyphset_t glyphset,int16_t src_x,int16_t src_y,uint32_t glyphcmds_len,const uint8_t * glyphcmds)2224971bb1a5SLionel Sambuc xcb_render_composite_glyphs_8 (xcb_connection_t *c /**< */,
2225971bb1a5SLionel Sambuc uint8_t op /**< */,
2226971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
2227971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
2228971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
2229971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
2230971bb1a5SLionel Sambuc int16_t src_x /**< */,
2231971bb1a5SLionel Sambuc int16_t src_y /**< */,
2232971bb1a5SLionel Sambuc uint32_t glyphcmds_len /**< */,
2233971bb1a5SLionel Sambuc const uint8_t *glyphcmds /**< */)
2234971bb1a5SLionel Sambuc {
2235971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2236971bb1a5SLionel Sambuc /* count */ 4,
2237971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2238971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8,
2239971bb1a5SLionel Sambuc /* isvoid */ 1
2240971bb1a5SLionel Sambuc };
2241971bb1a5SLionel Sambuc
2242971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2243971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2244971bb1a5SLionel Sambuc xcb_render_composite_glyphs_8_request_t xcb_out;
2245971bb1a5SLionel Sambuc
2246971bb1a5SLionel Sambuc xcb_out.op = op;
2247971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
2248971bb1a5SLionel Sambuc xcb_out.src = src;
2249971bb1a5SLionel Sambuc xcb_out.dst = dst;
2250971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
2251971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
2252971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
2253971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
2254971bb1a5SLionel Sambuc
2255971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2256971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2257971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2258971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2259971bb1a5SLionel Sambuc /* uint8_t glyphcmds */
2260971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphcmds;
2261971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2262971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2263971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2264971bb1a5SLionel Sambuc
2265971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2266971bb1a5SLionel Sambuc return xcb_ret;
2267971bb1a5SLionel Sambuc }
2268971bb1a5SLionel Sambuc
2269971bb1a5SLionel Sambuc int
xcb_render_composite_glyphs_16_sizeof(const void * _buffer,uint32_t glyphcmds_len)2270971bb1a5SLionel Sambuc xcb_render_composite_glyphs_16_sizeof (const void *_buffer /**< */,
2271971bb1a5SLionel Sambuc uint32_t glyphcmds_len /**< */)
2272971bb1a5SLionel Sambuc {
2273971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
2274971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
2275971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
2276971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
2277*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
2278971bb1a5SLionel Sambuc
2279971bb1a5SLionel Sambuc
2280971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_composite_glyphs_16_request_t);
2281971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2282*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
2283*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2284971bb1a5SLionel Sambuc /* glyphcmds */
2285971bb1a5SLionel Sambuc xcb_block_len += glyphcmds_len * sizeof(uint8_t);
2286971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2287971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint8_t);
2288971bb1a5SLionel Sambuc /* insert padding */
2289971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2290971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2291971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2292971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2293971bb1a5SLionel Sambuc xcb_pad = 0;
2294971bb1a5SLionel Sambuc }
2295971bb1a5SLionel Sambuc xcb_block_len = 0;
2296971bb1a5SLionel Sambuc
2297971bb1a5SLionel Sambuc return xcb_buffer_len;
2298971bb1a5SLionel Sambuc }
2299971bb1a5SLionel Sambuc
2300971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_composite_glyphs_16_checked(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,xcb_render_glyphset_t glyphset,int16_t src_x,int16_t src_y,uint32_t glyphcmds_len,const uint8_t * glyphcmds)2301971bb1a5SLionel Sambuc xcb_render_composite_glyphs_16_checked (xcb_connection_t *c /**< */,
2302971bb1a5SLionel Sambuc uint8_t op /**< */,
2303971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
2304971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
2305971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
2306971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
2307971bb1a5SLionel Sambuc int16_t src_x /**< */,
2308971bb1a5SLionel Sambuc int16_t src_y /**< */,
2309971bb1a5SLionel Sambuc uint32_t glyphcmds_len /**< */,
2310971bb1a5SLionel Sambuc const uint8_t *glyphcmds /**< */)
2311971bb1a5SLionel Sambuc {
2312971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2313971bb1a5SLionel Sambuc /* count */ 4,
2314971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2315971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16,
2316971bb1a5SLionel Sambuc /* isvoid */ 1
2317971bb1a5SLionel Sambuc };
2318971bb1a5SLionel Sambuc
2319971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2320971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2321971bb1a5SLionel Sambuc xcb_render_composite_glyphs_16_request_t xcb_out;
2322971bb1a5SLionel Sambuc
2323971bb1a5SLionel Sambuc xcb_out.op = op;
2324971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
2325971bb1a5SLionel Sambuc xcb_out.src = src;
2326971bb1a5SLionel Sambuc xcb_out.dst = dst;
2327971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
2328971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
2329971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
2330971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
2331971bb1a5SLionel Sambuc
2332971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2333971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2334971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2335971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2336971bb1a5SLionel Sambuc /* uint8_t glyphcmds */
2337971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphcmds;
2338971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2339971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2340971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2341971bb1a5SLionel Sambuc
2342971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2343971bb1a5SLionel Sambuc return xcb_ret;
2344971bb1a5SLionel Sambuc }
2345971bb1a5SLionel Sambuc
2346971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_composite_glyphs_16(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,xcb_render_glyphset_t glyphset,int16_t src_x,int16_t src_y,uint32_t glyphcmds_len,const uint8_t * glyphcmds)2347971bb1a5SLionel Sambuc xcb_render_composite_glyphs_16 (xcb_connection_t *c /**< */,
2348971bb1a5SLionel Sambuc uint8_t op /**< */,
2349971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
2350971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
2351971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
2352971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
2353971bb1a5SLionel Sambuc int16_t src_x /**< */,
2354971bb1a5SLionel Sambuc int16_t src_y /**< */,
2355971bb1a5SLionel Sambuc uint32_t glyphcmds_len /**< */,
2356971bb1a5SLionel Sambuc const uint8_t *glyphcmds /**< */)
2357971bb1a5SLionel Sambuc {
2358971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2359971bb1a5SLionel Sambuc /* count */ 4,
2360971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2361971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16,
2362971bb1a5SLionel Sambuc /* isvoid */ 1
2363971bb1a5SLionel Sambuc };
2364971bb1a5SLionel Sambuc
2365971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2366971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2367971bb1a5SLionel Sambuc xcb_render_composite_glyphs_16_request_t xcb_out;
2368971bb1a5SLionel Sambuc
2369971bb1a5SLionel Sambuc xcb_out.op = op;
2370971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
2371971bb1a5SLionel Sambuc xcb_out.src = src;
2372971bb1a5SLionel Sambuc xcb_out.dst = dst;
2373971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
2374971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
2375971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
2376971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
2377971bb1a5SLionel Sambuc
2378971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2379971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2380971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2381971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2382971bb1a5SLionel Sambuc /* uint8_t glyphcmds */
2383971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphcmds;
2384971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2385971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2386971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2387971bb1a5SLionel Sambuc
2388971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2389971bb1a5SLionel Sambuc return xcb_ret;
2390971bb1a5SLionel Sambuc }
2391971bb1a5SLionel Sambuc
2392971bb1a5SLionel Sambuc int
xcb_render_composite_glyphs_32_sizeof(const void * _buffer,uint32_t glyphcmds_len)2393971bb1a5SLionel Sambuc xcb_render_composite_glyphs_32_sizeof (const void *_buffer /**< */,
2394971bb1a5SLionel Sambuc uint32_t glyphcmds_len /**< */)
2395971bb1a5SLionel Sambuc {
2396971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
2397971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
2398971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
2399971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
2400*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
2401971bb1a5SLionel Sambuc
2402971bb1a5SLionel Sambuc
2403971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_composite_glyphs_32_request_t);
2404971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2405*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
2406*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2407971bb1a5SLionel Sambuc /* glyphcmds */
2408971bb1a5SLionel Sambuc xcb_block_len += glyphcmds_len * sizeof(uint8_t);
2409971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2410971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint8_t);
2411971bb1a5SLionel Sambuc /* insert padding */
2412971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2413971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2414971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2415971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2416971bb1a5SLionel Sambuc xcb_pad = 0;
2417971bb1a5SLionel Sambuc }
2418971bb1a5SLionel Sambuc xcb_block_len = 0;
2419971bb1a5SLionel Sambuc
2420971bb1a5SLionel Sambuc return xcb_buffer_len;
2421971bb1a5SLionel Sambuc }
2422971bb1a5SLionel Sambuc
2423971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_composite_glyphs_32_checked(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,xcb_render_glyphset_t glyphset,int16_t src_x,int16_t src_y,uint32_t glyphcmds_len,const uint8_t * glyphcmds)2424971bb1a5SLionel Sambuc xcb_render_composite_glyphs_32_checked (xcb_connection_t *c /**< */,
2425971bb1a5SLionel Sambuc uint8_t op /**< */,
2426971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
2427971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
2428971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
2429971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
2430971bb1a5SLionel Sambuc int16_t src_x /**< */,
2431971bb1a5SLionel Sambuc int16_t src_y /**< */,
2432971bb1a5SLionel Sambuc uint32_t glyphcmds_len /**< */,
2433971bb1a5SLionel Sambuc const uint8_t *glyphcmds /**< */)
2434971bb1a5SLionel Sambuc {
2435971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2436971bb1a5SLionel Sambuc /* count */ 4,
2437971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2438971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32,
2439971bb1a5SLionel Sambuc /* isvoid */ 1
2440971bb1a5SLionel Sambuc };
2441971bb1a5SLionel Sambuc
2442971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2443971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2444971bb1a5SLionel Sambuc xcb_render_composite_glyphs_32_request_t xcb_out;
2445971bb1a5SLionel Sambuc
2446971bb1a5SLionel Sambuc xcb_out.op = op;
2447971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
2448971bb1a5SLionel Sambuc xcb_out.src = src;
2449971bb1a5SLionel Sambuc xcb_out.dst = dst;
2450971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
2451971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
2452971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
2453971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
2454971bb1a5SLionel Sambuc
2455971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2456971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2457971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2458971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2459971bb1a5SLionel Sambuc /* uint8_t glyphcmds */
2460971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphcmds;
2461971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2462971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2463971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2464971bb1a5SLionel Sambuc
2465971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2466971bb1a5SLionel Sambuc return xcb_ret;
2467971bb1a5SLionel Sambuc }
2468971bb1a5SLionel Sambuc
2469971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_composite_glyphs_32(xcb_connection_t * c,uint8_t op,xcb_render_picture_t src,xcb_render_picture_t dst,xcb_render_pictformat_t mask_format,xcb_render_glyphset_t glyphset,int16_t src_x,int16_t src_y,uint32_t glyphcmds_len,const uint8_t * glyphcmds)2470971bb1a5SLionel Sambuc xcb_render_composite_glyphs_32 (xcb_connection_t *c /**< */,
2471971bb1a5SLionel Sambuc uint8_t op /**< */,
2472971bb1a5SLionel Sambuc xcb_render_picture_t src /**< */,
2473971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
2474971bb1a5SLionel Sambuc xcb_render_pictformat_t mask_format /**< */,
2475971bb1a5SLionel Sambuc xcb_render_glyphset_t glyphset /**< */,
2476971bb1a5SLionel Sambuc int16_t src_x /**< */,
2477971bb1a5SLionel Sambuc int16_t src_y /**< */,
2478971bb1a5SLionel Sambuc uint32_t glyphcmds_len /**< */,
2479971bb1a5SLionel Sambuc const uint8_t *glyphcmds /**< */)
2480971bb1a5SLionel Sambuc {
2481971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2482971bb1a5SLionel Sambuc /* count */ 4,
2483971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2484971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32,
2485971bb1a5SLionel Sambuc /* isvoid */ 1
2486971bb1a5SLionel Sambuc };
2487971bb1a5SLionel Sambuc
2488971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2489971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2490971bb1a5SLionel Sambuc xcb_render_composite_glyphs_32_request_t xcb_out;
2491971bb1a5SLionel Sambuc
2492971bb1a5SLionel Sambuc xcb_out.op = op;
2493971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
2494971bb1a5SLionel Sambuc xcb_out.src = src;
2495971bb1a5SLionel Sambuc xcb_out.dst = dst;
2496971bb1a5SLionel Sambuc xcb_out.mask_format = mask_format;
2497971bb1a5SLionel Sambuc xcb_out.glyphset = glyphset;
2498971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
2499971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
2500971bb1a5SLionel Sambuc
2501971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2502971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2503971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2504971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2505971bb1a5SLionel Sambuc /* uint8_t glyphcmds */
2506971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) glyphcmds;
2507971bb1a5SLionel Sambuc xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
2508971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2509971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2510971bb1a5SLionel Sambuc
2511971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2512971bb1a5SLionel Sambuc return xcb_ret;
2513971bb1a5SLionel Sambuc }
2514971bb1a5SLionel Sambuc
2515971bb1a5SLionel Sambuc int
xcb_render_fill_rectangles_sizeof(const void * _buffer,uint32_t rects_len)2516971bb1a5SLionel Sambuc xcb_render_fill_rectangles_sizeof (const void *_buffer /**< */,
2517971bb1a5SLionel Sambuc uint32_t rects_len /**< */)
2518971bb1a5SLionel Sambuc {
2519971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
2520971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
2521971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
2522971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
2523*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
2524971bb1a5SLionel Sambuc
2525971bb1a5SLionel Sambuc
2526971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_fill_rectangles_request_t);
2527971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2528*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
2529*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2530971bb1a5SLionel Sambuc /* rects */
2531971bb1a5SLionel Sambuc xcb_block_len += rects_len * sizeof(xcb_rectangle_t);
2532971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2533971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_rectangle_t);
2534971bb1a5SLionel Sambuc /* insert padding */
2535971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2536971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2537971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2538971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2539971bb1a5SLionel Sambuc xcb_pad = 0;
2540971bb1a5SLionel Sambuc }
2541971bb1a5SLionel Sambuc xcb_block_len = 0;
2542971bb1a5SLionel Sambuc
2543971bb1a5SLionel Sambuc return xcb_buffer_len;
2544971bb1a5SLionel Sambuc }
2545971bb1a5SLionel Sambuc
2546971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_fill_rectangles_checked(xcb_connection_t * c,uint8_t op,xcb_render_picture_t dst,xcb_render_color_t color,uint32_t rects_len,const xcb_rectangle_t * rects)2547971bb1a5SLionel Sambuc xcb_render_fill_rectangles_checked (xcb_connection_t *c /**< */,
2548971bb1a5SLionel Sambuc uint8_t op /**< */,
2549971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
2550971bb1a5SLionel Sambuc xcb_render_color_t color /**< */,
2551971bb1a5SLionel Sambuc uint32_t rects_len /**< */,
2552971bb1a5SLionel Sambuc const xcb_rectangle_t *rects /**< */)
2553971bb1a5SLionel Sambuc {
2554971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2555971bb1a5SLionel Sambuc /* count */ 4,
2556971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2557971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_FILL_RECTANGLES,
2558971bb1a5SLionel Sambuc /* isvoid */ 1
2559971bb1a5SLionel Sambuc };
2560971bb1a5SLionel Sambuc
2561971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2562971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2563971bb1a5SLionel Sambuc xcb_render_fill_rectangles_request_t xcb_out;
2564971bb1a5SLionel Sambuc
2565971bb1a5SLionel Sambuc xcb_out.op = op;
2566971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
2567971bb1a5SLionel Sambuc xcb_out.dst = dst;
2568971bb1a5SLionel Sambuc xcb_out.color = color;
2569971bb1a5SLionel Sambuc
2570971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2571971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2572971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2573971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2574971bb1a5SLionel Sambuc /* xcb_rectangle_t rects */
2575971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) rects;
2576971bb1a5SLionel Sambuc xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t);
2577971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2578971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2579971bb1a5SLionel Sambuc
2580971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2581971bb1a5SLionel Sambuc return xcb_ret;
2582971bb1a5SLionel Sambuc }
2583971bb1a5SLionel Sambuc
2584971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_fill_rectangles(xcb_connection_t * c,uint8_t op,xcb_render_picture_t dst,xcb_render_color_t color,uint32_t rects_len,const xcb_rectangle_t * rects)2585971bb1a5SLionel Sambuc xcb_render_fill_rectangles (xcb_connection_t *c /**< */,
2586971bb1a5SLionel Sambuc uint8_t op /**< */,
2587971bb1a5SLionel Sambuc xcb_render_picture_t dst /**< */,
2588971bb1a5SLionel Sambuc xcb_render_color_t color /**< */,
2589971bb1a5SLionel Sambuc uint32_t rects_len /**< */,
2590971bb1a5SLionel Sambuc const xcb_rectangle_t *rects /**< */)
2591971bb1a5SLionel Sambuc {
2592971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2593971bb1a5SLionel Sambuc /* count */ 4,
2594971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2595971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_FILL_RECTANGLES,
2596971bb1a5SLionel Sambuc /* isvoid */ 1
2597971bb1a5SLionel Sambuc };
2598971bb1a5SLionel Sambuc
2599971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2600971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2601971bb1a5SLionel Sambuc xcb_render_fill_rectangles_request_t xcb_out;
2602971bb1a5SLionel Sambuc
2603971bb1a5SLionel Sambuc xcb_out.op = op;
2604971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
2605971bb1a5SLionel Sambuc xcb_out.dst = dst;
2606971bb1a5SLionel Sambuc xcb_out.color = color;
2607971bb1a5SLionel Sambuc
2608971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2609971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2610971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2611971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2612971bb1a5SLionel Sambuc /* xcb_rectangle_t rects */
2613971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) rects;
2614971bb1a5SLionel Sambuc xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t);
2615971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2616971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2617971bb1a5SLionel Sambuc
2618971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2619971bb1a5SLionel Sambuc return xcb_ret;
2620971bb1a5SLionel Sambuc }
2621971bb1a5SLionel Sambuc
2622971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_cursor_checked(xcb_connection_t * c,xcb_cursor_t cid,xcb_render_picture_t source,uint16_t x,uint16_t y)2623971bb1a5SLionel Sambuc xcb_render_create_cursor_checked (xcb_connection_t *c /**< */,
2624971bb1a5SLionel Sambuc xcb_cursor_t cid /**< */,
2625971bb1a5SLionel Sambuc xcb_render_picture_t source /**< */,
2626971bb1a5SLionel Sambuc uint16_t x /**< */,
2627971bb1a5SLionel Sambuc uint16_t y /**< */)
2628971bb1a5SLionel Sambuc {
2629971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2630971bb1a5SLionel Sambuc /* count */ 2,
2631971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2632971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_CURSOR,
2633971bb1a5SLionel Sambuc /* isvoid */ 1
2634971bb1a5SLionel Sambuc };
2635971bb1a5SLionel Sambuc
2636971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2637971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2638971bb1a5SLionel Sambuc xcb_render_create_cursor_request_t xcb_out;
2639971bb1a5SLionel Sambuc
2640971bb1a5SLionel Sambuc xcb_out.cid = cid;
2641971bb1a5SLionel Sambuc xcb_out.source = source;
2642971bb1a5SLionel Sambuc xcb_out.x = x;
2643971bb1a5SLionel Sambuc xcb_out.y = y;
2644971bb1a5SLionel Sambuc
2645971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2646971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2647971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2648971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2649971bb1a5SLionel Sambuc
2650971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2651971bb1a5SLionel Sambuc return xcb_ret;
2652971bb1a5SLionel Sambuc }
2653971bb1a5SLionel Sambuc
2654971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_cursor(xcb_connection_t * c,xcb_cursor_t cid,xcb_render_picture_t source,uint16_t x,uint16_t y)2655971bb1a5SLionel Sambuc xcb_render_create_cursor (xcb_connection_t *c /**< */,
2656971bb1a5SLionel Sambuc xcb_cursor_t cid /**< */,
2657971bb1a5SLionel Sambuc xcb_render_picture_t source /**< */,
2658971bb1a5SLionel Sambuc uint16_t x /**< */,
2659971bb1a5SLionel Sambuc uint16_t y /**< */)
2660971bb1a5SLionel Sambuc {
2661971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2662971bb1a5SLionel Sambuc /* count */ 2,
2663971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2664971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_CURSOR,
2665971bb1a5SLionel Sambuc /* isvoid */ 1
2666971bb1a5SLionel Sambuc };
2667971bb1a5SLionel Sambuc
2668971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2669971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2670971bb1a5SLionel Sambuc xcb_render_create_cursor_request_t xcb_out;
2671971bb1a5SLionel Sambuc
2672971bb1a5SLionel Sambuc xcb_out.cid = cid;
2673971bb1a5SLionel Sambuc xcb_out.source = source;
2674971bb1a5SLionel Sambuc xcb_out.x = x;
2675971bb1a5SLionel Sambuc xcb_out.y = y;
2676971bb1a5SLionel Sambuc
2677971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2678971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2679971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2680971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2681971bb1a5SLionel Sambuc
2682971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2683971bb1a5SLionel Sambuc return xcb_ret;
2684971bb1a5SLionel Sambuc }
2685971bb1a5SLionel Sambuc
2686971bb1a5SLionel Sambuc void
xcb_render_transform_next(xcb_render_transform_iterator_t * i)2687971bb1a5SLionel Sambuc xcb_render_transform_next (xcb_render_transform_iterator_t *i /**< */)
2688971bb1a5SLionel Sambuc {
2689971bb1a5SLionel Sambuc --i->rem;
2690971bb1a5SLionel Sambuc ++i->data;
2691971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_transform_t);
2692971bb1a5SLionel Sambuc }
2693971bb1a5SLionel Sambuc
2694971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_transform_end(xcb_render_transform_iterator_t i)2695971bb1a5SLionel Sambuc xcb_render_transform_end (xcb_render_transform_iterator_t i /**< */)
2696971bb1a5SLionel Sambuc {
2697971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
2698971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
2699971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
2700971bb1a5SLionel Sambuc ret.rem = 0;
2701971bb1a5SLionel Sambuc return ret;
2702971bb1a5SLionel Sambuc }
2703971bb1a5SLionel Sambuc
2704971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_set_picture_transform_checked(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_transform_t transform)2705971bb1a5SLionel Sambuc xcb_render_set_picture_transform_checked (xcb_connection_t *c /**< */,
2706971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
2707971bb1a5SLionel Sambuc xcb_render_transform_t transform /**< */)
2708971bb1a5SLionel Sambuc {
2709971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2710971bb1a5SLionel Sambuc /* count */ 2,
2711971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2712971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM,
2713971bb1a5SLionel Sambuc /* isvoid */ 1
2714971bb1a5SLionel Sambuc };
2715971bb1a5SLionel Sambuc
2716971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2717971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2718971bb1a5SLionel Sambuc xcb_render_set_picture_transform_request_t xcb_out;
2719971bb1a5SLionel Sambuc
2720971bb1a5SLionel Sambuc xcb_out.picture = picture;
2721971bb1a5SLionel Sambuc xcb_out.transform = transform;
2722971bb1a5SLionel Sambuc
2723971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2724971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2725971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2726971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2727971bb1a5SLionel Sambuc
2728971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2729971bb1a5SLionel Sambuc return xcb_ret;
2730971bb1a5SLionel Sambuc }
2731971bb1a5SLionel Sambuc
2732971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_set_picture_transform(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_transform_t transform)2733971bb1a5SLionel Sambuc xcb_render_set_picture_transform (xcb_connection_t *c /**< */,
2734971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
2735971bb1a5SLionel Sambuc xcb_render_transform_t transform /**< */)
2736971bb1a5SLionel Sambuc {
2737971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2738971bb1a5SLionel Sambuc /* count */ 2,
2739971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2740971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM,
2741971bb1a5SLionel Sambuc /* isvoid */ 1
2742971bb1a5SLionel Sambuc };
2743971bb1a5SLionel Sambuc
2744971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2745971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2746971bb1a5SLionel Sambuc xcb_render_set_picture_transform_request_t xcb_out;
2747971bb1a5SLionel Sambuc
2748971bb1a5SLionel Sambuc xcb_out.picture = picture;
2749971bb1a5SLionel Sambuc xcb_out.transform = transform;
2750971bb1a5SLionel Sambuc
2751971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2752971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2753971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2754971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2755971bb1a5SLionel Sambuc
2756971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2757971bb1a5SLionel Sambuc return xcb_ret;
2758971bb1a5SLionel Sambuc }
2759971bb1a5SLionel Sambuc
2760971bb1a5SLionel Sambuc int
xcb_render_query_filters_sizeof(const void * _buffer)2761971bb1a5SLionel Sambuc xcb_render_query_filters_sizeof (const void *_buffer /**< */)
2762971bb1a5SLionel Sambuc {
2763971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
2764971bb1a5SLionel Sambuc const xcb_render_query_filters_reply_t *_aux = (xcb_render_query_filters_reply_t *)_buffer;
2765971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
2766971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
2767971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
2768*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
2769971bb1a5SLionel Sambuc
2770971bb1a5SLionel Sambuc unsigned int i;
2771971bb1a5SLionel Sambuc unsigned int xcb_tmp_len;
2772971bb1a5SLionel Sambuc
2773971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_query_filters_reply_t);
2774971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2775*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
2776*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2777971bb1a5SLionel Sambuc /* aliases */
2778971bb1a5SLionel Sambuc xcb_block_len += _aux->num_aliases * sizeof(uint16_t);
2779971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2780971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint16_t);
2781971bb1a5SLionel Sambuc /* insert padding */
2782971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2783971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2784971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2785971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2786971bb1a5SLionel Sambuc xcb_pad = 0;
2787971bb1a5SLionel Sambuc }
2788971bb1a5SLionel Sambuc xcb_block_len = 0;
2789971bb1a5SLionel Sambuc /* filters */
2790971bb1a5SLionel Sambuc for(i=0; i<_aux->num_filters; i++) {
2791971bb1a5SLionel Sambuc xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
2792971bb1a5SLionel Sambuc xcb_block_len += xcb_tmp_len;
2793971bb1a5SLionel Sambuc xcb_tmp += xcb_tmp_len;
2794971bb1a5SLionel Sambuc }
2795971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_str_t);
2796971bb1a5SLionel Sambuc /* insert padding */
2797971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2798971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2799971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2800971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2801971bb1a5SLionel Sambuc xcb_pad = 0;
2802971bb1a5SLionel Sambuc }
2803971bb1a5SLionel Sambuc xcb_block_len = 0;
2804971bb1a5SLionel Sambuc
2805971bb1a5SLionel Sambuc return xcb_buffer_len;
2806971bb1a5SLionel Sambuc }
2807971bb1a5SLionel Sambuc
2808971bb1a5SLionel Sambuc xcb_render_query_filters_cookie_t
xcb_render_query_filters(xcb_connection_t * c,xcb_drawable_t drawable)2809971bb1a5SLionel Sambuc xcb_render_query_filters (xcb_connection_t *c /**< */,
2810971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */)
2811971bb1a5SLionel Sambuc {
2812971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2813971bb1a5SLionel Sambuc /* count */ 2,
2814971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2815971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_QUERY_FILTERS,
2816971bb1a5SLionel Sambuc /* isvoid */ 0
2817971bb1a5SLionel Sambuc };
2818971bb1a5SLionel Sambuc
2819971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2820971bb1a5SLionel Sambuc xcb_render_query_filters_cookie_t xcb_ret;
2821971bb1a5SLionel Sambuc xcb_render_query_filters_request_t xcb_out;
2822971bb1a5SLionel Sambuc
2823971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
2824971bb1a5SLionel Sambuc
2825971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2826971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2827971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2828971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2829971bb1a5SLionel Sambuc
2830971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2831971bb1a5SLionel Sambuc return xcb_ret;
2832971bb1a5SLionel Sambuc }
2833971bb1a5SLionel Sambuc
2834971bb1a5SLionel Sambuc xcb_render_query_filters_cookie_t
xcb_render_query_filters_unchecked(xcb_connection_t * c,xcb_drawable_t drawable)2835971bb1a5SLionel Sambuc xcb_render_query_filters_unchecked (xcb_connection_t *c /**< */,
2836971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */)
2837971bb1a5SLionel Sambuc {
2838971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2839971bb1a5SLionel Sambuc /* count */ 2,
2840971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2841971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_QUERY_FILTERS,
2842971bb1a5SLionel Sambuc /* isvoid */ 0
2843971bb1a5SLionel Sambuc };
2844971bb1a5SLionel Sambuc
2845971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2846971bb1a5SLionel Sambuc xcb_render_query_filters_cookie_t xcb_ret;
2847971bb1a5SLionel Sambuc xcb_render_query_filters_request_t xcb_out;
2848971bb1a5SLionel Sambuc
2849971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
2850971bb1a5SLionel Sambuc
2851971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2852971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2853971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2854971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2855971bb1a5SLionel Sambuc
2856971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2857971bb1a5SLionel Sambuc return xcb_ret;
2858971bb1a5SLionel Sambuc }
2859971bb1a5SLionel Sambuc
2860971bb1a5SLionel Sambuc uint16_t *
xcb_render_query_filters_aliases(const xcb_render_query_filters_reply_t * R)2861971bb1a5SLionel Sambuc xcb_render_query_filters_aliases (const xcb_render_query_filters_reply_t *R /**< */)
2862971bb1a5SLionel Sambuc {
2863971bb1a5SLionel Sambuc return (uint16_t *) (R + 1);
2864971bb1a5SLionel Sambuc }
2865971bb1a5SLionel Sambuc
2866971bb1a5SLionel Sambuc int
xcb_render_query_filters_aliases_length(const xcb_render_query_filters_reply_t * R)2867971bb1a5SLionel Sambuc xcb_render_query_filters_aliases_length (const xcb_render_query_filters_reply_t *R /**< */)
2868971bb1a5SLionel Sambuc {
2869971bb1a5SLionel Sambuc return R->num_aliases;
2870971bb1a5SLionel Sambuc }
2871971bb1a5SLionel Sambuc
2872971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_query_filters_aliases_end(const xcb_render_query_filters_reply_t * R)2873971bb1a5SLionel Sambuc xcb_render_query_filters_aliases_end (const xcb_render_query_filters_reply_t *R /**< */)
2874971bb1a5SLionel Sambuc {
2875971bb1a5SLionel Sambuc xcb_generic_iterator_t i;
2876971bb1a5SLionel Sambuc i.data = ((uint16_t *) (R + 1)) + (R->num_aliases);
2877971bb1a5SLionel Sambuc i.rem = 0;
2878971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
2879971bb1a5SLionel Sambuc return i;
2880971bb1a5SLionel Sambuc }
2881971bb1a5SLionel Sambuc
2882971bb1a5SLionel Sambuc int
xcb_render_query_filters_filters_length(const xcb_render_query_filters_reply_t * R)2883971bb1a5SLionel Sambuc xcb_render_query_filters_filters_length (const xcb_render_query_filters_reply_t *R /**< */)
2884971bb1a5SLionel Sambuc {
2885971bb1a5SLionel Sambuc return R->num_filters;
2886971bb1a5SLionel Sambuc }
2887971bb1a5SLionel Sambuc
2888971bb1a5SLionel Sambuc xcb_str_iterator_t
xcb_render_query_filters_filters_iterator(const xcb_render_query_filters_reply_t * R)2889971bb1a5SLionel Sambuc xcb_render_query_filters_filters_iterator (const xcb_render_query_filters_reply_t *R /**< */)
2890971bb1a5SLionel Sambuc {
2891971bb1a5SLionel Sambuc xcb_str_iterator_t i;
2892971bb1a5SLionel Sambuc xcb_generic_iterator_t prev = xcb_render_query_filters_aliases_end(R);
2893971bb1a5SLionel Sambuc i.data = (xcb_str_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_str_t, prev.index));
2894971bb1a5SLionel Sambuc i.rem = R->num_filters;
2895971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
2896971bb1a5SLionel Sambuc return i;
2897971bb1a5SLionel Sambuc }
2898971bb1a5SLionel Sambuc
2899971bb1a5SLionel Sambuc xcb_render_query_filters_reply_t *
xcb_render_query_filters_reply(xcb_connection_t * c,xcb_render_query_filters_cookie_t cookie,xcb_generic_error_t ** e)2900971bb1a5SLionel Sambuc xcb_render_query_filters_reply (xcb_connection_t *c /**< */,
2901971bb1a5SLionel Sambuc xcb_render_query_filters_cookie_t cookie /**< */,
2902971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
2903971bb1a5SLionel Sambuc {
2904971bb1a5SLionel Sambuc return (xcb_render_query_filters_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2905971bb1a5SLionel Sambuc }
2906971bb1a5SLionel Sambuc
2907971bb1a5SLionel Sambuc int
xcb_render_set_picture_filter_sizeof(const void * _buffer,uint32_t values_len)2908971bb1a5SLionel Sambuc xcb_render_set_picture_filter_sizeof (const void *_buffer /**< */,
2909971bb1a5SLionel Sambuc uint32_t values_len /**< */)
2910971bb1a5SLionel Sambuc {
2911971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
2912971bb1a5SLionel Sambuc const xcb_render_set_picture_filter_request_t *_aux = (xcb_render_set_picture_filter_request_t *)_buffer;
2913971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
2914971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
2915971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
2916*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
2917971bb1a5SLionel Sambuc
2918971bb1a5SLionel Sambuc
2919971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_set_picture_filter_request_t);
2920971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2921*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
2922*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2923971bb1a5SLionel Sambuc /* filter */
2924971bb1a5SLionel Sambuc xcb_block_len += _aux->filter_len * sizeof(char);
2925971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2926971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(char);
2927971bb1a5SLionel Sambuc /* insert padding */
2928971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2929971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2930971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2931971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2932971bb1a5SLionel Sambuc xcb_pad = 0;
2933971bb1a5SLionel Sambuc }
2934971bb1a5SLionel Sambuc xcb_block_len = 0;
2935971bb1a5SLionel Sambuc /* values */
2936971bb1a5SLionel Sambuc xcb_block_len += values_len * sizeof(xcb_render_fixed_t);
2937971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2938971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_fixed_t);
2939971bb1a5SLionel Sambuc /* insert padding */
2940971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2941971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2942971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2943971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2944971bb1a5SLionel Sambuc xcb_pad = 0;
2945971bb1a5SLionel Sambuc }
2946971bb1a5SLionel Sambuc xcb_block_len = 0;
2947971bb1a5SLionel Sambuc
2948971bb1a5SLionel Sambuc return xcb_buffer_len;
2949971bb1a5SLionel Sambuc }
2950971bb1a5SLionel Sambuc
2951971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_set_picture_filter_checked(xcb_connection_t * c,xcb_render_picture_t picture,uint16_t filter_len,const char * filter,uint32_t values_len,const xcb_render_fixed_t * values)2952971bb1a5SLionel Sambuc xcb_render_set_picture_filter_checked (xcb_connection_t *c /**< */,
2953971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
2954971bb1a5SLionel Sambuc uint16_t filter_len /**< */,
2955971bb1a5SLionel Sambuc const char *filter /**< */,
2956971bb1a5SLionel Sambuc uint32_t values_len /**< */,
2957971bb1a5SLionel Sambuc const xcb_render_fixed_t *values /**< */)
2958971bb1a5SLionel Sambuc {
2959971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2960971bb1a5SLionel Sambuc /* count */ 6,
2961971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
2962971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_SET_PICTURE_FILTER,
2963971bb1a5SLionel Sambuc /* isvoid */ 1
2964971bb1a5SLionel Sambuc };
2965971bb1a5SLionel Sambuc
2966971bb1a5SLionel Sambuc struct iovec xcb_parts[8];
2967971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2968971bb1a5SLionel Sambuc xcb_render_set_picture_filter_request_t xcb_out;
2969971bb1a5SLionel Sambuc
2970971bb1a5SLionel Sambuc xcb_out.picture = picture;
2971971bb1a5SLionel Sambuc xcb_out.filter_len = filter_len;
2972971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 2);
2973971bb1a5SLionel Sambuc
2974971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2975971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2976971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2977971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2978971bb1a5SLionel Sambuc /* char filter */
2979971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) filter;
2980971bb1a5SLionel Sambuc xcb_parts[4].iov_len = filter_len * sizeof(char);
2981971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2982971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2983971bb1a5SLionel Sambuc /* xcb_render_fixed_t values */
2984971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) values;
2985971bb1a5SLionel Sambuc xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t);
2986971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
2987971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
2988971bb1a5SLionel Sambuc
2989971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2990971bb1a5SLionel Sambuc return xcb_ret;
2991971bb1a5SLionel Sambuc }
2992971bb1a5SLionel Sambuc
2993971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_set_picture_filter(xcb_connection_t * c,xcb_render_picture_t picture,uint16_t filter_len,const char * filter,uint32_t values_len,const xcb_render_fixed_t * values)2994971bb1a5SLionel Sambuc xcb_render_set_picture_filter (xcb_connection_t *c /**< */,
2995971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
2996971bb1a5SLionel Sambuc uint16_t filter_len /**< */,
2997971bb1a5SLionel Sambuc const char *filter /**< */,
2998971bb1a5SLionel Sambuc uint32_t values_len /**< */,
2999971bb1a5SLionel Sambuc const xcb_render_fixed_t *values /**< */)
3000971bb1a5SLionel Sambuc {
3001971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3002971bb1a5SLionel Sambuc /* count */ 6,
3003971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3004971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_SET_PICTURE_FILTER,
3005971bb1a5SLionel Sambuc /* isvoid */ 1
3006971bb1a5SLionel Sambuc };
3007971bb1a5SLionel Sambuc
3008971bb1a5SLionel Sambuc struct iovec xcb_parts[8];
3009971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3010971bb1a5SLionel Sambuc xcb_render_set_picture_filter_request_t xcb_out;
3011971bb1a5SLionel Sambuc
3012971bb1a5SLionel Sambuc xcb_out.picture = picture;
3013971bb1a5SLionel Sambuc xcb_out.filter_len = filter_len;
3014971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 2);
3015971bb1a5SLionel Sambuc
3016971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3017971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3018971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3019971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3020971bb1a5SLionel Sambuc /* char filter */
3021971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) filter;
3022971bb1a5SLionel Sambuc xcb_parts[4].iov_len = filter_len * sizeof(char);
3023971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3024971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3025971bb1a5SLionel Sambuc /* xcb_render_fixed_t values */
3026971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) values;
3027971bb1a5SLionel Sambuc xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t);
3028971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
3029971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3030971bb1a5SLionel Sambuc
3031971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3032971bb1a5SLionel Sambuc return xcb_ret;
3033971bb1a5SLionel Sambuc }
3034971bb1a5SLionel Sambuc
3035971bb1a5SLionel Sambuc void
xcb_render_animcursorelt_next(xcb_render_animcursorelt_iterator_t * i)3036971bb1a5SLionel Sambuc xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i /**< */)
3037971bb1a5SLionel Sambuc {
3038971bb1a5SLionel Sambuc --i->rem;
3039971bb1a5SLionel Sambuc ++i->data;
3040971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_animcursorelt_t);
3041971bb1a5SLionel Sambuc }
3042971bb1a5SLionel Sambuc
3043971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_animcursorelt_end(xcb_render_animcursorelt_iterator_t i)3044971bb1a5SLionel Sambuc xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i /**< */)
3045971bb1a5SLionel Sambuc {
3046971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
3047971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
3048971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
3049971bb1a5SLionel Sambuc ret.rem = 0;
3050971bb1a5SLionel Sambuc return ret;
3051971bb1a5SLionel Sambuc }
3052971bb1a5SLionel Sambuc
3053971bb1a5SLionel Sambuc int
xcb_render_create_anim_cursor_sizeof(const void * _buffer,uint32_t cursors_len)3054971bb1a5SLionel Sambuc xcb_render_create_anim_cursor_sizeof (const void *_buffer /**< */,
3055971bb1a5SLionel Sambuc uint32_t cursors_len /**< */)
3056971bb1a5SLionel Sambuc {
3057971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
3058971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
3059971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
3060971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
3061*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
3062971bb1a5SLionel Sambuc
3063971bb1a5SLionel Sambuc
3064971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_create_anim_cursor_request_t);
3065971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3066*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
3067*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
3068971bb1a5SLionel Sambuc /* cursors */
3069971bb1a5SLionel Sambuc xcb_block_len += cursors_len * sizeof(xcb_render_animcursorelt_t);
3070971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3071971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_animcursorelt_t);
3072971bb1a5SLionel Sambuc /* insert padding */
3073971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3074971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
3075971bb1a5SLionel Sambuc if (0 != xcb_pad) {
3076971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
3077971bb1a5SLionel Sambuc xcb_pad = 0;
3078971bb1a5SLionel Sambuc }
3079971bb1a5SLionel Sambuc xcb_block_len = 0;
3080971bb1a5SLionel Sambuc
3081971bb1a5SLionel Sambuc return xcb_buffer_len;
3082971bb1a5SLionel Sambuc }
3083971bb1a5SLionel Sambuc
3084971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_anim_cursor_checked(xcb_connection_t * c,xcb_cursor_t cid,uint32_t cursors_len,const xcb_render_animcursorelt_t * cursors)3085971bb1a5SLionel Sambuc xcb_render_create_anim_cursor_checked (xcb_connection_t *c /**< */,
3086971bb1a5SLionel Sambuc xcb_cursor_t cid /**< */,
3087971bb1a5SLionel Sambuc uint32_t cursors_len /**< */,
3088971bb1a5SLionel Sambuc const xcb_render_animcursorelt_t *cursors /**< */)
3089971bb1a5SLionel Sambuc {
3090971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3091971bb1a5SLionel Sambuc /* count */ 4,
3092971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3093971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR,
3094971bb1a5SLionel Sambuc /* isvoid */ 1
3095971bb1a5SLionel Sambuc };
3096971bb1a5SLionel Sambuc
3097971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
3098971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3099971bb1a5SLionel Sambuc xcb_render_create_anim_cursor_request_t xcb_out;
3100971bb1a5SLionel Sambuc
3101971bb1a5SLionel Sambuc xcb_out.cid = cid;
3102971bb1a5SLionel Sambuc
3103971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3104971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3105971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3106971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3107971bb1a5SLionel Sambuc /* xcb_render_animcursorelt_t cursors */
3108971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) cursors;
3109971bb1a5SLionel Sambuc xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t);
3110971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3111971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3112971bb1a5SLionel Sambuc
3113971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3114971bb1a5SLionel Sambuc return xcb_ret;
3115971bb1a5SLionel Sambuc }
3116971bb1a5SLionel Sambuc
3117971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_anim_cursor(xcb_connection_t * c,xcb_cursor_t cid,uint32_t cursors_len,const xcb_render_animcursorelt_t * cursors)3118971bb1a5SLionel Sambuc xcb_render_create_anim_cursor (xcb_connection_t *c /**< */,
3119971bb1a5SLionel Sambuc xcb_cursor_t cid /**< */,
3120971bb1a5SLionel Sambuc uint32_t cursors_len /**< */,
3121971bb1a5SLionel Sambuc const xcb_render_animcursorelt_t *cursors /**< */)
3122971bb1a5SLionel Sambuc {
3123971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3124971bb1a5SLionel Sambuc /* count */ 4,
3125971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3126971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR,
3127971bb1a5SLionel Sambuc /* isvoid */ 1
3128971bb1a5SLionel Sambuc };
3129971bb1a5SLionel Sambuc
3130971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
3131971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3132971bb1a5SLionel Sambuc xcb_render_create_anim_cursor_request_t xcb_out;
3133971bb1a5SLionel Sambuc
3134971bb1a5SLionel Sambuc xcb_out.cid = cid;
3135971bb1a5SLionel Sambuc
3136971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3137971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3138971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3139971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3140971bb1a5SLionel Sambuc /* xcb_render_animcursorelt_t cursors */
3141971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) cursors;
3142971bb1a5SLionel Sambuc xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t);
3143971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3144971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3145971bb1a5SLionel Sambuc
3146971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3147971bb1a5SLionel Sambuc return xcb_ret;
3148971bb1a5SLionel Sambuc }
3149971bb1a5SLionel Sambuc
3150971bb1a5SLionel Sambuc void
xcb_render_spanfix_next(xcb_render_spanfix_iterator_t * i)3151971bb1a5SLionel Sambuc xcb_render_spanfix_next (xcb_render_spanfix_iterator_t *i /**< */)
3152971bb1a5SLionel Sambuc {
3153971bb1a5SLionel Sambuc --i->rem;
3154971bb1a5SLionel Sambuc ++i->data;
3155971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_spanfix_t);
3156971bb1a5SLionel Sambuc }
3157971bb1a5SLionel Sambuc
3158971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_spanfix_end(xcb_render_spanfix_iterator_t i)3159971bb1a5SLionel Sambuc xcb_render_spanfix_end (xcb_render_spanfix_iterator_t i /**< */)
3160971bb1a5SLionel Sambuc {
3161971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
3162971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
3163971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
3164971bb1a5SLionel Sambuc ret.rem = 0;
3165971bb1a5SLionel Sambuc return ret;
3166971bb1a5SLionel Sambuc }
3167971bb1a5SLionel Sambuc
3168971bb1a5SLionel Sambuc void
xcb_render_trap_next(xcb_render_trap_iterator_t * i)3169971bb1a5SLionel Sambuc xcb_render_trap_next (xcb_render_trap_iterator_t *i /**< */)
3170971bb1a5SLionel Sambuc {
3171971bb1a5SLionel Sambuc --i->rem;
3172971bb1a5SLionel Sambuc ++i->data;
3173971bb1a5SLionel Sambuc i->index += sizeof(xcb_render_trap_t);
3174971bb1a5SLionel Sambuc }
3175971bb1a5SLionel Sambuc
3176971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_render_trap_end(xcb_render_trap_iterator_t i)3177971bb1a5SLionel Sambuc xcb_render_trap_end (xcb_render_trap_iterator_t i /**< */)
3178971bb1a5SLionel Sambuc {
3179971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
3180971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
3181971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
3182971bb1a5SLionel Sambuc ret.rem = 0;
3183971bb1a5SLionel Sambuc return ret;
3184971bb1a5SLionel Sambuc }
3185971bb1a5SLionel Sambuc
3186971bb1a5SLionel Sambuc int
xcb_render_add_traps_sizeof(const void * _buffer,uint32_t traps_len)3187971bb1a5SLionel Sambuc xcb_render_add_traps_sizeof (const void *_buffer /**< */,
3188971bb1a5SLionel Sambuc uint32_t traps_len /**< */)
3189971bb1a5SLionel Sambuc {
3190971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
3191971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
3192971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
3193971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
3194*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
3195971bb1a5SLionel Sambuc
3196971bb1a5SLionel Sambuc
3197971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_add_traps_request_t);
3198971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3199*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
3200*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
3201971bb1a5SLionel Sambuc /* traps */
3202971bb1a5SLionel Sambuc xcb_block_len += traps_len * sizeof(xcb_render_trap_t);
3203971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3204971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_trap_t);
3205971bb1a5SLionel Sambuc /* insert padding */
3206971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3207971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
3208971bb1a5SLionel Sambuc if (0 != xcb_pad) {
3209971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
3210971bb1a5SLionel Sambuc xcb_pad = 0;
3211971bb1a5SLionel Sambuc }
3212971bb1a5SLionel Sambuc xcb_block_len = 0;
3213971bb1a5SLionel Sambuc
3214971bb1a5SLionel Sambuc return xcb_buffer_len;
3215971bb1a5SLionel Sambuc }
3216971bb1a5SLionel Sambuc
3217971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_add_traps_checked(xcb_connection_t * c,xcb_render_picture_t picture,int16_t x_off,int16_t y_off,uint32_t traps_len,const xcb_render_trap_t * traps)3218971bb1a5SLionel Sambuc xcb_render_add_traps_checked (xcb_connection_t *c /**< */,
3219971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3220971bb1a5SLionel Sambuc int16_t x_off /**< */,
3221971bb1a5SLionel Sambuc int16_t y_off /**< */,
3222971bb1a5SLionel Sambuc uint32_t traps_len /**< */,
3223971bb1a5SLionel Sambuc const xcb_render_trap_t *traps /**< */)
3224971bb1a5SLionel Sambuc {
3225971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3226971bb1a5SLionel Sambuc /* count */ 4,
3227971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3228971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_ADD_TRAPS,
3229971bb1a5SLionel Sambuc /* isvoid */ 1
3230971bb1a5SLionel Sambuc };
3231971bb1a5SLionel Sambuc
3232971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
3233971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3234971bb1a5SLionel Sambuc xcb_render_add_traps_request_t xcb_out;
3235971bb1a5SLionel Sambuc
3236971bb1a5SLionel Sambuc xcb_out.picture = picture;
3237971bb1a5SLionel Sambuc xcb_out.x_off = x_off;
3238971bb1a5SLionel Sambuc xcb_out.y_off = y_off;
3239971bb1a5SLionel Sambuc
3240971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3241971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3242971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3243971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3244971bb1a5SLionel Sambuc /* xcb_render_trap_t traps */
3245971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) traps;
3246971bb1a5SLionel Sambuc xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t);
3247971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3248971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3249971bb1a5SLionel Sambuc
3250971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3251971bb1a5SLionel Sambuc return xcb_ret;
3252971bb1a5SLionel Sambuc }
3253971bb1a5SLionel Sambuc
3254971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_add_traps(xcb_connection_t * c,xcb_render_picture_t picture,int16_t x_off,int16_t y_off,uint32_t traps_len,const xcb_render_trap_t * traps)3255971bb1a5SLionel Sambuc xcb_render_add_traps (xcb_connection_t *c /**< */,
3256971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3257971bb1a5SLionel Sambuc int16_t x_off /**< */,
3258971bb1a5SLionel Sambuc int16_t y_off /**< */,
3259971bb1a5SLionel Sambuc uint32_t traps_len /**< */,
3260971bb1a5SLionel Sambuc const xcb_render_trap_t *traps /**< */)
3261971bb1a5SLionel Sambuc {
3262971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3263971bb1a5SLionel Sambuc /* count */ 4,
3264971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3265971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_ADD_TRAPS,
3266971bb1a5SLionel Sambuc /* isvoid */ 1
3267971bb1a5SLionel Sambuc };
3268971bb1a5SLionel Sambuc
3269971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
3270971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3271971bb1a5SLionel Sambuc xcb_render_add_traps_request_t xcb_out;
3272971bb1a5SLionel Sambuc
3273971bb1a5SLionel Sambuc xcb_out.picture = picture;
3274971bb1a5SLionel Sambuc xcb_out.x_off = x_off;
3275971bb1a5SLionel Sambuc xcb_out.y_off = y_off;
3276971bb1a5SLionel Sambuc
3277971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3278971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3279971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3280971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3281971bb1a5SLionel Sambuc /* xcb_render_trap_t traps */
3282971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) traps;
3283971bb1a5SLionel Sambuc xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t);
3284971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3285971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3286971bb1a5SLionel Sambuc
3287971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3288971bb1a5SLionel Sambuc return xcb_ret;
3289971bb1a5SLionel Sambuc }
3290971bb1a5SLionel Sambuc
3291971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_solid_fill_checked(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_color_t color)3292971bb1a5SLionel Sambuc xcb_render_create_solid_fill_checked (xcb_connection_t *c /**< */,
3293971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3294971bb1a5SLionel Sambuc xcb_render_color_t color /**< */)
3295971bb1a5SLionel Sambuc {
3296971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3297971bb1a5SLionel Sambuc /* count */ 2,
3298971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3299971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_SOLID_FILL,
3300971bb1a5SLionel Sambuc /* isvoid */ 1
3301971bb1a5SLionel Sambuc };
3302971bb1a5SLionel Sambuc
3303971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
3304971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3305971bb1a5SLionel Sambuc xcb_render_create_solid_fill_request_t xcb_out;
3306971bb1a5SLionel Sambuc
3307971bb1a5SLionel Sambuc xcb_out.picture = picture;
3308971bb1a5SLionel Sambuc xcb_out.color = color;
3309971bb1a5SLionel Sambuc
3310971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3311971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3312971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3313971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3314971bb1a5SLionel Sambuc
3315971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3316971bb1a5SLionel Sambuc return xcb_ret;
3317971bb1a5SLionel Sambuc }
3318971bb1a5SLionel Sambuc
3319971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_solid_fill(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_color_t color)3320971bb1a5SLionel Sambuc xcb_render_create_solid_fill (xcb_connection_t *c /**< */,
3321971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3322971bb1a5SLionel Sambuc xcb_render_color_t color /**< */)
3323971bb1a5SLionel Sambuc {
3324971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3325971bb1a5SLionel Sambuc /* count */ 2,
3326971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3327971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_SOLID_FILL,
3328971bb1a5SLionel Sambuc /* isvoid */ 1
3329971bb1a5SLionel Sambuc };
3330971bb1a5SLionel Sambuc
3331971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
3332971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3333971bb1a5SLionel Sambuc xcb_render_create_solid_fill_request_t xcb_out;
3334971bb1a5SLionel Sambuc
3335971bb1a5SLionel Sambuc xcb_out.picture = picture;
3336971bb1a5SLionel Sambuc xcb_out.color = color;
3337971bb1a5SLionel Sambuc
3338971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3339971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3340971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3341971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3342971bb1a5SLionel Sambuc
3343971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3344971bb1a5SLionel Sambuc return xcb_ret;
3345971bb1a5SLionel Sambuc }
3346971bb1a5SLionel Sambuc
3347971bb1a5SLionel Sambuc int
xcb_render_create_linear_gradient_sizeof(const void * _buffer)3348971bb1a5SLionel Sambuc xcb_render_create_linear_gradient_sizeof (const void *_buffer /**< */)
3349971bb1a5SLionel Sambuc {
3350971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
3351971bb1a5SLionel Sambuc const xcb_render_create_linear_gradient_request_t *_aux = (xcb_render_create_linear_gradient_request_t *)_buffer;
3352971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
3353971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
3354971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
3355*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
3356971bb1a5SLionel Sambuc
3357971bb1a5SLionel Sambuc
3358971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_create_linear_gradient_request_t);
3359971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3360*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
3361*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
3362971bb1a5SLionel Sambuc /* stops */
3363971bb1a5SLionel Sambuc xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
3364971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3365971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_fixed_t);
3366971bb1a5SLionel Sambuc /* insert padding */
3367971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3368971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
3369971bb1a5SLionel Sambuc if (0 != xcb_pad) {
3370971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
3371971bb1a5SLionel Sambuc xcb_pad = 0;
3372971bb1a5SLionel Sambuc }
3373971bb1a5SLionel Sambuc xcb_block_len = 0;
3374971bb1a5SLionel Sambuc /* colors */
3375971bb1a5SLionel Sambuc xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
3376971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3377971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_color_t);
3378971bb1a5SLionel Sambuc /* insert padding */
3379971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3380971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
3381971bb1a5SLionel Sambuc if (0 != xcb_pad) {
3382971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
3383971bb1a5SLionel Sambuc xcb_pad = 0;
3384971bb1a5SLionel Sambuc }
3385971bb1a5SLionel Sambuc xcb_block_len = 0;
3386971bb1a5SLionel Sambuc
3387971bb1a5SLionel Sambuc return xcb_buffer_len;
3388971bb1a5SLionel Sambuc }
3389971bb1a5SLionel Sambuc
3390971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_linear_gradient_checked(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_pointfix_t p1,xcb_render_pointfix_t p2,uint32_t num_stops,const xcb_render_fixed_t * stops,const xcb_render_color_t * colors)3391971bb1a5SLionel Sambuc xcb_render_create_linear_gradient_checked (xcb_connection_t *c /**< */,
3392971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3393971bb1a5SLionel Sambuc xcb_render_pointfix_t p1 /**< */,
3394971bb1a5SLionel Sambuc xcb_render_pointfix_t p2 /**< */,
3395971bb1a5SLionel Sambuc uint32_t num_stops /**< */,
3396971bb1a5SLionel Sambuc const xcb_render_fixed_t *stops /**< */,
3397971bb1a5SLionel Sambuc const xcb_render_color_t *colors /**< */)
3398971bb1a5SLionel Sambuc {
3399971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3400971bb1a5SLionel Sambuc /* count */ 6,
3401971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3402971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT,
3403971bb1a5SLionel Sambuc /* isvoid */ 1
3404971bb1a5SLionel Sambuc };
3405971bb1a5SLionel Sambuc
3406971bb1a5SLionel Sambuc struct iovec xcb_parts[8];
3407971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3408971bb1a5SLionel Sambuc xcb_render_create_linear_gradient_request_t xcb_out;
3409971bb1a5SLionel Sambuc
3410971bb1a5SLionel Sambuc xcb_out.picture = picture;
3411971bb1a5SLionel Sambuc xcb_out.p1 = p1;
3412971bb1a5SLionel Sambuc xcb_out.p2 = p2;
3413971bb1a5SLionel Sambuc xcb_out.num_stops = num_stops;
3414971bb1a5SLionel Sambuc
3415971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3416971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3417971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3418971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3419971bb1a5SLionel Sambuc /* xcb_render_fixed_t stops */
3420971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) stops;
3421971bb1a5SLionel Sambuc xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3422971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3423971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3424971bb1a5SLionel Sambuc /* xcb_render_color_t colors */
3425971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) colors;
3426971bb1a5SLionel Sambuc xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3427971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
3428971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3429971bb1a5SLionel Sambuc
3430971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3431971bb1a5SLionel Sambuc return xcb_ret;
3432971bb1a5SLionel Sambuc }
3433971bb1a5SLionel Sambuc
3434971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_linear_gradient(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_pointfix_t p1,xcb_render_pointfix_t p2,uint32_t num_stops,const xcb_render_fixed_t * stops,const xcb_render_color_t * colors)3435971bb1a5SLionel Sambuc xcb_render_create_linear_gradient (xcb_connection_t *c /**< */,
3436971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3437971bb1a5SLionel Sambuc xcb_render_pointfix_t p1 /**< */,
3438971bb1a5SLionel Sambuc xcb_render_pointfix_t p2 /**< */,
3439971bb1a5SLionel Sambuc uint32_t num_stops /**< */,
3440971bb1a5SLionel Sambuc const xcb_render_fixed_t *stops /**< */,
3441971bb1a5SLionel Sambuc const xcb_render_color_t *colors /**< */)
3442971bb1a5SLionel Sambuc {
3443971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3444971bb1a5SLionel Sambuc /* count */ 6,
3445971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3446971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT,
3447971bb1a5SLionel Sambuc /* isvoid */ 1
3448971bb1a5SLionel Sambuc };
3449971bb1a5SLionel Sambuc
3450971bb1a5SLionel Sambuc struct iovec xcb_parts[8];
3451971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3452971bb1a5SLionel Sambuc xcb_render_create_linear_gradient_request_t xcb_out;
3453971bb1a5SLionel Sambuc
3454971bb1a5SLionel Sambuc xcb_out.picture = picture;
3455971bb1a5SLionel Sambuc xcb_out.p1 = p1;
3456971bb1a5SLionel Sambuc xcb_out.p2 = p2;
3457971bb1a5SLionel Sambuc xcb_out.num_stops = num_stops;
3458971bb1a5SLionel Sambuc
3459971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3460971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3461971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3462971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3463971bb1a5SLionel Sambuc /* xcb_render_fixed_t stops */
3464971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) stops;
3465971bb1a5SLionel Sambuc xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3466971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3467971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3468971bb1a5SLionel Sambuc /* xcb_render_color_t colors */
3469971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) colors;
3470971bb1a5SLionel Sambuc xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3471971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
3472971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3473971bb1a5SLionel Sambuc
3474971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3475971bb1a5SLionel Sambuc return xcb_ret;
3476971bb1a5SLionel Sambuc }
3477971bb1a5SLionel Sambuc
3478971bb1a5SLionel Sambuc int
xcb_render_create_radial_gradient_sizeof(const void * _buffer)3479971bb1a5SLionel Sambuc xcb_render_create_radial_gradient_sizeof (const void *_buffer /**< */)
3480971bb1a5SLionel Sambuc {
3481971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
3482971bb1a5SLionel Sambuc const xcb_render_create_radial_gradient_request_t *_aux = (xcb_render_create_radial_gradient_request_t *)_buffer;
3483971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
3484971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
3485971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
3486*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
3487971bb1a5SLionel Sambuc
3488971bb1a5SLionel Sambuc
3489971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_create_radial_gradient_request_t);
3490971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3491*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
3492*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
3493971bb1a5SLionel Sambuc /* stops */
3494971bb1a5SLionel Sambuc xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
3495971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3496971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_fixed_t);
3497971bb1a5SLionel Sambuc /* insert padding */
3498971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3499971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
3500971bb1a5SLionel Sambuc if (0 != xcb_pad) {
3501971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
3502971bb1a5SLionel Sambuc xcb_pad = 0;
3503971bb1a5SLionel Sambuc }
3504971bb1a5SLionel Sambuc xcb_block_len = 0;
3505971bb1a5SLionel Sambuc /* colors */
3506971bb1a5SLionel Sambuc xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
3507971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3508971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_color_t);
3509971bb1a5SLionel Sambuc /* insert padding */
3510971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3511971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
3512971bb1a5SLionel Sambuc if (0 != xcb_pad) {
3513971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
3514971bb1a5SLionel Sambuc xcb_pad = 0;
3515971bb1a5SLionel Sambuc }
3516971bb1a5SLionel Sambuc xcb_block_len = 0;
3517971bb1a5SLionel Sambuc
3518971bb1a5SLionel Sambuc return xcb_buffer_len;
3519971bb1a5SLionel Sambuc }
3520971bb1a5SLionel Sambuc
3521971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_radial_gradient_checked(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_pointfix_t inner,xcb_render_pointfix_t outer,xcb_render_fixed_t inner_radius,xcb_render_fixed_t outer_radius,uint32_t num_stops,const xcb_render_fixed_t * stops,const xcb_render_color_t * colors)3522971bb1a5SLionel Sambuc xcb_render_create_radial_gradient_checked (xcb_connection_t *c /**< */,
3523971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3524971bb1a5SLionel Sambuc xcb_render_pointfix_t inner /**< */,
3525971bb1a5SLionel Sambuc xcb_render_pointfix_t outer /**< */,
3526971bb1a5SLionel Sambuc xcb_render_fixed_t inner_radius /**< */,
3527971bb1a5SLionel Sambuc xcb_render_fixed_t outer_radius /**< */,
3528971bb1a5SLionel Sambuc uint32_t num_stops /**< */,
3529971bb1a5SLionel Sambuc const xcb_render_fixed_t *stops /**< */,
3530971bb1a5SLionel Sambuc const xcb_render_color_t *colors /**< */)
3531971bb1a5SLionel Sambuc {
3532971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3533971bb1a5SLionel Sambuc /* count */ 6,
3534971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3535971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT,
3536971bb1a5SLionel Sambuc /* isvoid */ 1
3537971bb1a5SLionel Sambuc };
3538971bb1a5SLionel Sambuc
3539971bb1a5SLionel Sambuc struct iovec xcb_parts[8];
3540971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3541971bb1a5SLionel Sambuc xcb_render_create_radial_gradient_request_t xcb_out;
3542971bb1a5SLionel Sambuc
3543971bb1a5SLionel Sambuc xcb_out.picture = picture;
3544971bb1a5SLionel Sambuc xcb_out.inner = inner;
3545971bb1a5SLionel Sambuc xcb_out.outer = outer;
3546971bb1a5SLionel Sambuc xcb_out.inner_radius = inner_radius;
3547971bb1a5SLionel Sambuc xcb_out.outer_radius = outer_radius;
3548971bb1a5SLionel Sambuc xcb_out.num_stops = num_stops;
3549971bb1a5SLionel Sambuc
3550971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3551971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3552971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3553971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3554971bb1a5SLionel Sambuc /* xcb_render_fixed_t stops */
3555971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) stops;
3556971bb1a5SLionel Sambuc xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3557971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3558971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3559971bb1a5SLionel Sambuc /* xcb_render_color_t colors */
3560971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) colors;
3561971bb1a5SLionel Sambuc xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3562971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
3563971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3564971bb1a5SLionel Sambuc
3565971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3566971bb1a5SLionel Sambuc return xcb_ret;
3567971bb1a5SLionel Sambuc }
3568971bb1a5SLionel Sambuc
3569971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_radial_gradient(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_pointfix_t inner,xcb_render_pointfix_t outer,xcb_render_fixed_t inner_radius,xcb_render_fixed_t outer_radius,uint32_t num_stops,const xcb_render_fixed_t * stops,const xcb_render_color_t * colors)3570971bb1a5SLionel Sambuc xcb_render_create_radial_gradient (xcb_connection_t *c /**< */,
3571971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3572971bb1a5SLionel Sambuc xcb_render_pointfix_t inner /**< */,
3573971bb1a5SLionel Sambuc xcb_render_pointfix_t outer /**< */,
3574971bb1a5SLionel Sambuc xcb_render_fixed_t inner_radius /**< */,
3575971bb1a5SLionel Sambuc xcb_render_fixed_t outer_radius /**< */,
3576971bb1a5SLionel Sambuc uint32_t num_stops /**< */,
3577971bb1a5SLionel Sambuc const xcb_render_fixed_t *stops /**< */,
3578971bb1a5SLionel Sambuc const xcb_render_color_t *colors /**< */)
3579971bb1a5SLionel Sambuc {
3580971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3581971bb1a5SLionel Sambuc /* count */ 6,
3582971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3583971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT,
3584971bb1a5SLionel Sambuc /* isvoid */ 1
3585971bb1a5SLionel Sambuc };
3586971bb1a5SLionel Sambuc
3587971bb1a5SLionel Sambuc struct iovec xcb_parts[8];
3588971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3589971bb1a5SLionel Sambuc xcb_render_create_radial_gradient_request_t xcb_out;
3590971bb1a5SLionel Sambuc
3591971bb1a5SLionel Sambuc xcb_out.picture = picture;
3592971bb1a5SLionel Sambuc xcb_out.inner = inner;
3593971bb1a5SLionel Sambuc xcb_out.outer = outer;
3594971bb1a5SLionel Sambuc xcb_out.inner_radius = inner_radius;
3595971bb1a5SLionel Sambuc xcb_out.outer_radius = outer_radius;
3596971bb1a5SLionel Sambuc xcb_out.num_stops = num_stops;
3597971bb1a5SLionel Sambuc
3598971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3599971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3600971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3601971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3602971bb1a5SLionel Sambuc /* xcb_render_fixed_t stops */
3603971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) stops;
3604971bb1a5SLionel Sambuc xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3605971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3606971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3607971bb1a5SLionel Sambuc /* xcb_render_color_t colors */
3608971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) colors;
3609971bb1a5SLionel Sambuc xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3610971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
3611971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3612971bb1a5SLionel Sambuc
3613971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3614971bb1a5SLionel Sambuc return xcb_ret;
3615971bb1a5SLionel Sambuc }
3616971bb1a5SLionel Sambuc
3617971bb1a5SLionel Sambuc int
xcb_render_create_conical_gradient_sizeof(const void * _buffer)3618971bb1a5SLionel Sambuc xcb_render_create_conical_gradient_sizeof (const void *_buffer /**< */)
3619971bb1a5SLionel Sambuc {
3620971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
3621971bb1a5SLionel Sambuc const xcb_render_create_conical_gradient_request_t *_aux = (xcb_render_create_conical_gradient_request_t *)_buffer;
3622971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
3623971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
3624971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
3625*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
3626971bb1a5SLionel Sambuc
3627971bb1a5SLionel Sambuc
3628971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_render_create_conical_gradient_request_t);
3629971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3630*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
3631*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
3632971bb1a5SLionel Sambuc /* stops */
3633971bb1a5SLionel Sambuc xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
3634971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3635971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_fixed_t);
3636971bb1a5SLionel Sambuc /* insert padding */
3637971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3638971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
3639971bb1a5SLionel Sambuc if (0 != xcb_pad) {
3640971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
3641971bb1a5SLionel Sambuc xcb_pad = 0;
3642971bb1a5SLionel Sambuc }
3643971bb1a5SLionel Sambuc xcb_block_len = 0;
3644971bb1a5SLionel Sambuc /* colors */
3645971bb1a5SLionel Sambuc xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
3646971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
3647971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_render_color_t);
3648971bb1a5SLionel Sambuc /* insert padding */
3649971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3650971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
3651971bb1a5SLionel Sambuc if (0 != xcb_pad) {
3652971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
3653971bb1a5SLionel Sambuc xcb_pad = 0;
3654971bb1a5SLionel Sambuc }
3655971bb1a5SLionel Sambuc xcb_block_len = 0;
3656971bb1a5SLionel Sambuc
3657971bb1a5SLionel Sambuc return xcb_buffer_len;
3658971bb1a5SLionel Sambuc }
3659971bb1a5SLionel Sambuc
3660971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_conical_gradient_checked(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_pointfix_t center,xcb_render_fixed_t angle,uint32_t num_stops,const xcb_render_fixed_t * stops,const xcb_render_color_t * colors)3661971bb1a5SLionel Sambuc xcb_render_create_conical_gradient_checked (xcb_connection_t *c /**< */,
3662971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3663971bb1a5SLionel Sambuc xcb_render_pointfix_t center /**< */,
3664971bb1a5SLionel Sambuc xcb_render_fixed_t angle /**< */,
3665971bb1a5SLionel Sambuc uint32_t num_stops /**< */,
3666971bb1a5SLionel Sambuc const xcb_render_fixed_t *stops /**< */,
3667971bb1a5SLionel Sambuc const xcb_render_color_t *colors /**< */)
3668971bb1a5SLionel Sambuc {
3669971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3670971bb1a5SLionel Sambuc /* count */ 6,
3671971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3672971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT,
3673971bb1a5SLionel Sambuc /* isvoid */ 1
3674971bb1a5SLionel Sambuc };
3675971bb1a5SLionel Sambuc
3676971bb1a5SLionel Sambuc struct iovec xcb_parts[8];
3677971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3678971bb1a5SLionel Sambuc xcb_render_create_conical_gradient_request_t xcb_out;
3679971bb1a5SLionel Sambuc
3680971bb1a5SLionel Sambuc xcb_out.picture = picture;
3681971bb1a5SLionel Sambuc xcb_out.center = center;
3682971bb1a5SLionel Sambuc xcb_out.angle = angle;
3683971bb1a5SLionel Sambuc xcb_out.num_stops = num_stops;
3684971bb1a5SLionel Sambuc
3685971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3686971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3687971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3688971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3689971bb1a5SLionel Sambuc /* xcb_render_fixed_t stops */
3690971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) stops;
3691971bb1a5SLionel Sambuc xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3692971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3693971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3694971bb1a5SLionel Sambuc /* xcb_render_color_t colors */
3695971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) colors;
3696971bb1a5SLionel Sambuc xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3697971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
3698971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3699971bb1a5SLionel Sambuc
3700971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3701971bb1a5SLionel Sambuc return xcb_ret;
3702971bb1a5SLionel Sambuc }
3703971bb1a5SLionel Sambuc
3704971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_render_create_conical_gradient(xcb_connection_t * c,xcb_render_picture_t picture,xcb_render_pointfix_t center,xcb_render_fixed_t angle,uint32_t num_stops,const xcb_render_fixed_t * stops,const xcb_render_color_t * colors)3705971bb1a5SLionel Sambuc xcb_render_create_conical_gradient (xcb_connection_t *c /**< */,
3706971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
3707971bb1a5SLionel Sambuc xcb_render_pointfix_t center /**< */,
3708971bb1a5SLionel Sambuc xcb_render_fixed_t angle /**< */,
3709971bb1a5SLionel Sambuc uint32_t num_stops /**< */,
3710971bb1a5SLionel Sambuc const xcb_render_fixed_t *stops /**< */,
3711971bb1a5SLionel Sambuc const xcb_render_color_t *colors /**< */)
3712971bb1a5SLionel Sambuc {
3713971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
3714971bb1a5SLionel Sambuc /* count */ 6,
3715971bb1a5SLionel Sambuc /* ext */ &xcb_render_id,
3716971bb1a5SLionel Sambuc /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT,
3717971bb1a5SLionel Sambuc /* isvoid */ 1
3718971bb1a5SLionel Sambuc };
3719971bb1a5SLionel Sambuc
3720971bb1a5SLionel Sambuc struct iovec xcb_parts[8];
3721971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
3722971bb1a5SLionel Sambuc xcb_render_create_conical_gradient_request_t xcb_out;
3723971bb1a5SLionel Sambuc
3724971bb1a5SLionel Sambuc xcb_out.picture = picture;
3725971bb1a5SLionel Sambuc xcb_out.center = center;
3726971bb1a5SLionel Sambuc xcb_out.angle = angle;
3727971bb1a5SLionel Sambuc xcb_out.num_stops = num_stops;
3728971bb1a5SLionel Sambuc
3729971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
3730971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
3731971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
3732971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3733971bb1a5SLionel Sambuc /* xcb_render_fixed_t stops */
3734971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) stops;
3735971bb1a5SLionel Sambuc xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
3736971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
3737971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3738971bb1a5SLionel Sambuc /* xcb_render_color_t colors */
3739971bb1a5SLionel Sambuc xcb_parts[6].iov_base = (char *) colors;
3740971bb1a5SLionel Sambuc xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
3741971bb1a5SLionel Sambuc xcb_parts[7].iov_base = 0;
3742971bb1a5SLionel Sambuc xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3743971bb1a5SLionel Sambuc
3744971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3745971bb1a5SLionel Sambuc return xcb_ret;
3746971bb1a5SLionel Sambuc }
3747971bb1a5SLionel Sambuc
3748