1*971bb1a5SLionel Sambuc /*
2*971bb1a5SLionel Sambuc * This file generated automatically from damage.xml by c_client.py.
3*971bb1a5SLionel Sambuc * Edit at your peril.
4*971bb1a5SLionel Sambuc */
5*971bb1a5SLionel Sambuc
6*971bb1a5SLionel Sambuc #ifdef HAVE_CONFIG_H
7*971bb1a5SLionel Sambuc #include "config.h"
8*971bb1a5SLionel Sambuc #endif
9*971bb1a5SLionel Sambuc #include <stdlib.h>
10*971bb1a5SLionel Sambuc #include <string.h>
11*971bb1a5SLionel Sambuc #include <assert.h>
12*971bb1a5SLionel Sambuc #include <stddef.h> /* for offsetof() */
13*971bb1a5SLionel Sambuc #include "xcbext.h"
14*971bb1a5SLionel Sambuc #include "damage.h"
15*971bb1a5SLionel Sambuc
16*971bb1a5SLionel Sambuc #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17*971bb1a5SLionel Sambuc #include "xproto.h"
18*971bb1a5SLionel Sambuc #include "xfixes.h"
19*971bb1a5SLionel Sambuc
20*971bb1a5SLionel Sambuc xcb_extension_t xcb_damage_id = { "DAMAGE", 0 };
21*971bb1a5SLionel Sambuc
22*971bb1a5SLionel Sambuc void
xcb_damage_damage_next(xcb_damage_damage_iterator_t * i)23*971bb1a5SLionel Sambuc xcb_damage_damage_next (xcb_damage_damage_iterator_t *i /**< */)
24*971bb1a5SLionel Sambuc {
25*971bb1a5SLionel Sambuc --i->rem;
26*971bb1a5SLionel Sambuc ++i->data;
27*971bb1a5SLionel Sambuc i->index += sizeof(xcb_damage_damage_t);
28*971bb1a5SLionel Sambuc }
29*971bb1a5SLionel Sambuc
30*971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_damage_damage_end(xcb_damage_damage_iterator_t i)31*971bb1a5SLionel Sambuc xcb_damage_damage_end (xcb_damage_damage_iterator_t i /**< */)
32*971bb1a5SLionel Sambuc {
33*971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
34*971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
35*971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
36*971bb1a5SLionel Sambuc ret.rem = 0;
37*971bb1a5SLionel Sambuc return ret;
38*971bb1a5SLionel Sambuc }
39*971bb1a5SLionel Sambuc
40*971bb1a5SLionel Sambuc xcb_damage_query_version_cookie_t
xcb_damage_query_version(xcb_connection_t * c,uint32_t client_major_version,uint32_t client_minor_version)41*971bb1a5SLionel Sambuc xcb_damage_query_version (xcb_connection_t *c /**< */,
42*971bb1a5SLionel Sambuc uint32_t client_major_version /**< */,
43*971bb1a5SLionel Sambuc uint32_t client_minor_version /**< */)
44*971bb1a5SLionel Sambuc {
45*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
46*971bb1a5SLionel Sambuc /* count */ 2,
47*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
48*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_QUERY_VERSION,
49*971bb1a5SLionel Sambuc /* isvoid */ 0
50*971bb1a5SLionel Sambuc };
51*971bb1a5SLionel Sambuc
52*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
53*971bb1a5SLionel Sambuc xcb_damage_query_version_cookie_t xcb_ret;
54*971bb1a5SLionel Sambuc xcb_damage_query_version_request_t xcb_out;
55*971bb1a5SLionel Sambuc
56*971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
57*971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
58*971bb1a5SLionel Sambuc
59*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
60*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
61*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
62*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
63*971bb1a5SLionel Sambuc
64*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
65*971bb1a5SLionel Sambuc return xcb_ret;
66*971bb1a5SLionel Sambuc }
67*971bb1a5SLionel Sambuc
68*971bb1a5SLionel Sambuc xcb_damage_query_version_cookie_t
xcb_damage_query_version_unchecked(xcb_connection_t * c,uint32_t client_major_version,uint32_t client_minor_version)69*971bb1a5SLionel Sambuc xcb_damage_query_version_unchecked (xcb_connection_t *c /**< */,
70*971bb1a5SLionel Sambuc uint32_t client_major_version /**< */,
71*971bb1a5SLionel Sambuc uint32_t client_minor_version /**< */)
72*971bb1a5SLionel Sambuc {
73*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
74*971bb1a5SLionel Sambuc /* count */ 2,
75*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
76*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_QUERY_VERSION,
77*971bb1a5SLionel Sambuc /* isvoid */ 0
78*971bb1a5SLionel Sambuc };
79*971bb1a5SLionel Sambuc
80*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
81*971bb1a5SLionel Sambuc xcb_damage_query_version_cookie_t xcb_ret;
82*971bb1a5SLionel Sambuc xcb_damage_query_version_request_t xcb_out;
83*971bb1a5SLionel Sambuc
84*971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
85*971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
86*971bb1a5SLionel Sambuc
87*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
88*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
89*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
90*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
91*971bb1a5SLionel Sambuc
92*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
93*971bb1a5SLionel Sambuc return xcb_ret;
94*971bb1a5SLionel Sambuc }
95*971bb1a5SLionel Sambuc
96*971bb1a5SLionel Sambuc xcb_damage_query_version_reply_t *
xcb_damage_query_version_reply(xcb_connection_t * c,xcb_damage_query_version_cookie_t cookie,xcb_generic_error_t ** e)97*971bb1a5SLionel Sambuc xcb_damage_query_version_reply (xcb_connection_t *c /**< */,
98*971bb1a5SLionel Sambuc xcb_damage_query_version_cookie_t cookie /**< */,
99*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
100*971bb1a5SLionel Sambuc {
101*971bb1a5SLionel Sambuc return (xcb_damage_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
102*971bb1a5SLionel Sambuc }
103*971bb1a5SLionel Sambuc
104*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_damage_create_checked(xcb_connection_t * c,xcb_damage_damage_t damage,xcb_drawable_t drawable,uint8_t level)105*971bb1a5SLionel Sambuc xcb_damage_create_checked (xcb_connection_t *c /**< */,
106*971bb1a5SLionel Sambuc xcb_damage_damage_t damage /**< */,
107*971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
108*971bb1a5SLionel Sambuc uint8_t level /**< */)
109*971bb1a5SLionel Sambuc {
110*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
111*971bb1a5SLionel Sambuc /* count */ 2,
112*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
113*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_CREATE,
114*971bb1a5SLionel Sambuc /* isvoid */ 1
115*971bb1a5SLionel Sambuc };
116*971bb1a5SLionel Sambuc
117*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
118*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
119*971bb1a5SLionel Sambuc xcb_damage_create_request_t xcb_out;
120*971bb1a5SLionel Sambuc
121*971bb1a5SLionel Sambuc xcb_out.damage = damage;
122*971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
123*971bb1a5SLionel Sambuc xcb_out.level = level;
124*971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
125*971bb1a5SLionel Sambuc
126*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
127*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
128*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
129*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
130*971bb1a5SLionel Sambuc
131*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
132*971bb1a5SLionel Sambuc return xcb_ret;
133*971bb1a5SLionel Sambuc }
134*971bb1a5SLionel Sambuc
135*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_damage_create(xcb_connection_t * c,xcb_damage_damage_t damage,xcb_drawable_t drawable,uint8_t level)136*971bb1a5SLionel Sambuc xcb_damage_create (xcb_connection_t *c /**< */,
137*971bb1a5SLionel Sambuc xcb_damage_damage_t damage /**< */,
138*971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
139*971bb1a5SLionel Sambuc uint8_t level /**< */)
140*971bb1a5SLionel Sambuc {
141*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
142*971bb1a5SLionel Sambuc /* count */ 2,
143*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
144*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_CREATE,
145*971bb1a5SLionel Sambuc /* isvoid */ 1
146*971bb1a5SLionel Sambuc };
147*971bb1a5SLionel Sambuc
148*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
149*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
150*971bb1a5SLionel Sambuc xcb_damage_create_request_t xcb_out;
151*971bb1a5SLionel Sambuc
152*971bb1a5SLionel Sambuc xcb_out.damage = damage;
153*971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
154*971bb1a5SLionel Sambuc xcb_out.level = level;
155*971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
156*971bb1a5SLionel Sambuc
157*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
158*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
159*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
160*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
161*971bb1a5SLionel Sambuc
162*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
163*971bb1a5SLionel Sambuc return xcb_ret;
164*971bb1a5SLionel Sambuc }
165*971bb1a5SLionel Sambuc
166*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_damage_destroy_checked(xcb_connection_t * c,xcb_damage_damage_t damage)167*971bb1a5SLionel Sambuc xcb_damage_destroy_checked (xcb_connection_t *c /**< */,
168*971bb1a5SLionel Sambuc xcb_damage_damage_t damage /**< */)
169*971bb1a5SLionel Sambuc {
170*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
171*971bb1a5SLionel Sambuc /* count */ 2,
172*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
173*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_DESTROY,
174*971bb1a5SLionel Sambuc /* isvoid */ 1
175*971bb1a5SLionel Sambuc };
176*971bb1a5SLionel Sambuc
177*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
178*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
179*971bb1a5SLionel Sambuc xcb_damage_destroy_request_t xcb_out;
180*971bb1a5SLionel Sambuc
181*971bb1a5SLionel Sambuc xcb_out.damage = damage;
182*971bb1a5SLionel Sambuc
183*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
184*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
185*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
186*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
187*971bb1a5SLionel Sambuc
188*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
189*971bb1a5SLionel Sambuc return xcb_ret;
190*971bb1a5SLionel Sambuc }
191*971bb1a5SLionel Sambuc
192*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_damage_destroy(xcb_connection_t * c,xcb_damage_damage_t damage)193*971bb1a5SLionel Sambuc xcb_damage_destroy (xcb_connection_t *c /**< */,
194*971bb1a5SLionel Sambuc xcb_damage_damage_t damage /**< */)
195*971bb1a5SLionel Sambuc {
196*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
197*971bb1a5SLionel Sambuc /* count */ 2,
198*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
199*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_DESTROY,
200*971bb1a5SLionel Sambuc /* isvoid */ 1
201*971bb1a5SLionel Sambuc };
202*971bb1a5SLionel Sambuc
203*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
204*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
205*971bb1a5SLionel Sambuc xcb_damage_destroy_request_t xcb_out;
206*971bb1a5SLionel Sambuc
207*971bb1a5SLionel Sambuc xcb_out.damage = damage;
208*971bb1a5SLionel Sambuc
209*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
210*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
211*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
212*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
213*971bb1a5SLionel Sambuc
214*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
215*971bb1a5SLionel Sambuc return xcb_ret;
216*971bb1a5SLionel Sambuc }
217*971bb1a5SLionel Sambuc
218*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_damage_subtract_checked(xcb_connection_t * c,xcb_damage_damage_t damage,xcb_xfixes_region_t repair,xcb_xfixes_region_t parts)219*971bb1a5SLionel Sambuc xcb_damage_subtract_checked (xcb_connection_t *c /**< */,
220*971bb1a5SLionel Sambuc xcb_damage_damage_t damage /**< */,
221*971bb1a5SLionel Sambuc xcb_xfixes_region_t repair /**< */,
222*971bb1a5SLionel Sambuc xcb_xfixes_region_t parts /**< */)
223*971bb1a5SLionel Sambuc {
224*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
225*971bb1a5SLionel Sambuc /* count */ 2,
226*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
227*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_SUBTRACT,
228*971bb1a5SLionel Sambuc /* isvoid */ 1
229*971bb1a5SLionel Sambuc };
230*971bb1a5SLionel Sambuc
231*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
232*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
233*971bb1a5SLionel Sambuc xcb_damage_subtract_request_t xcb_out;
234*971bb1a5SLionel Sambuc
235*971bb1a5SLionel Sambuc xcb_out.damage = damage;
236*971bb1a5SLionel Sambuc xcb_out.repair = repair;
237*971bb1a5SLionel Sambuc xcb_out.parts = parts;
238*971bb1a5SLionel Sambuc
239*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
240*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
241*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
242*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
243*971bb1a5SLionel Sambuc
244*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
245*971bb1a5SLionel Sambuc return xcb_ret;
246*971bb1a5SLionel Sambuc }
247*971bb1a5SLionel Sambuc
248*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_damage_subtract(xcb_connection_t * c,xcb_damage_damage_t damage,xcb_xfixes_region_t repair,xcb_xfixes_region_t parts)249*971bb1a5SLionel Sambuc xcb_damage_subtract (xcb_connection_t *c /**< */,
250*971bb1a5SLionel Sambuc xcb_damage_damage_t damage /**< */,
251*971bb1a5SLionel Sambuc xcb_xfixes_region_t repair /**< */,
252*971bb1a5SLionel Sambuc xcb_xfixes_region_t parts /**< */)
253*971bb1a5SLionel Sambuc {
254*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
255*971bb1a5SLionel Sambuc /* count */ 2,
256*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
257*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_SUBTRACT,
258*971bb1a5SLionel Sambuc /* isvoid */ 1
259*971bb1a5SLionel Sambuc };
260*971bb1a5SLionel Sambuc
261*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
262*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
263*971bb1a5SLionel Sambuc xcb_damage_subtract_request_t xcb_out;
264*971bb1a5SLionel Sambuc
265*971bb1a5SLionel Sambuc xcb_out.damage = damage;
266*971bb1a5SLionel Sambuc xcb_out.repair = repair;
267*971bb1a5SLionel Sambuc xcb_out.parts = parts;
268*971bb1a5SLionel Sambuc
269*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
270*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
271*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
272*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
273*971bb1a5SLionel Sambuc
274*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
275*971bb1a5SLionel Sambuc return xcb_ret;
276*971bb1a5SLionel Sambuc }
277*971bb1a5SLionel Sambuc
278*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_damage_add_checked(xcb_connection_t * c,xcb_drawable_t drawable,xcb_xfixes_region_t region)279*971bb1a5SLionel Sambuc xcb_damage_add_checked (xcb_connection_t *c /**< */,
280*971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
281*971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */)
282*971bb1a5SLionel Sambuc {
283*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
284*971bb1a5SLionel Sambuc /* count */ 2,
285*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
286*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_ADD,
287*971bb1a5SLionel Sambuc /* isvoid */ 1
288*971bb1a5SLionel Sambuc };
289*971bb1a5SLionel Sambuc
290*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
291*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
292*971bb1a5SLionel Sambuc xcb_damage_add_request_t xcb_out;
293*971bb1a5SLionel Sambuc
294*971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
295*971bb1a5SLionel Sambuc xcb_out.region = region;
296*971bb1a5SLionel Sambuc
297*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
298*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
299*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
300*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
301*971bb1a5SLionel Sambuc
302*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
303*971bb1a5SLionel Sambuc return xcb_ret;
304*971bb1a5SLionel Sambuc }
305*971bb1a5SLionel Sambuc
306*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_damage_add(xcb_connection_t * c,xcb_drawable_t drawable,xcb_xfixes_region_t region)307*971bb1a5SLionel Sambuc xcb_damage_add (xcb_connection_t *c /**< */,
308*971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
309*971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */)
310*971bb1a5SLionel Sambuc {
311*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
312*971bb1a5SLionel Sambuc /* count */ 2,
313*971bb1a5SLionel Sambuc /* ext */ &xcb_damage_id,
314*971bb1a5SLionel Sambuc /* opcode */ XCB_DAMAGE_ADD,
315*971bb1a5SLionel Sambuc /* isvoid */ 1
316*971bb1a5SLionel Sambuc };
317*971bb1a5SLionel Sambuc
318*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
319*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
320*971bb1a5SLionel Sambuc xcb_damage_add_request_t xcb_out;
321*971bb1a5SLionel Sambuc
322*971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
323*971bb1a5SLionel Sambuc xcb_out.region = region;
324*971bb1a5SLionel Sambuc
325*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
326*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
327*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
328*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
329*971bb1a5SLionel Sambuc
330*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
331*971bb1a5SLionel Sambuc return xcb_ret;
332*971bb1a5SLionel Sambuc }
333*971bb1a5SLionel Sambuc
334