etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / lib / libxcb / files / damage.c
blob8c57e6d6f64cfc20257779e2655000eb38ed3a6d
1 /*
2 * This file generated automatically from damage.xml by c_client.py.
3 * Edit at your peril.
4 */
6 #ifdef HAVE_CONFIG_H
7 #include "config.h"
8 #endif
9 #include <stdlib.h>
10 #include <string.h>
11 #include <assert.h>
12 #include <stddef.h> /* for offsetof() */
13 #include "xcbext.h"
14 #include "damage.h"
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
18 #include "xfixes.h"
20 xcb_extension_t xcb_damage_id = { "DAMAGE", 0 };
22 void
23 xcb_damage_damage_next (xcb_damage_damage_iterator_t *i /**< */)
25 --i->rem;
26 ++i->data;
27 i->index += sizeof(xcb_damage_damage_t);
30 xcb_generic_iterator_t
31 xcb_damage_damage_end (xcb_damage_damage_iterator_t i /**< */)
33 xcb_generic_iterator_t ret;
34 ret.data = i.data + i.rem;
35 ret.index = i.index + ((char *) ret.data - (char *) i.data);
36 ret.rem = 0;
37 return ret;
40 xcb_damage_query_version_cookie_t
41 xcb_damage_query_version (xcb_connection_t *c /**< */,
42 uint32_t client_major_version /**< */,
43 uint32_t client_minor_version /**< */)
45 static const xcb_protocol_request_t xcb_req = {
46 /* count */ 2,
47 /* ext */ &xcb_damage_id,
48 /* opcode */ XCB_DAMAGE_QUERY_VERSION,
49 /* isvoid */ 0
52 struct iovec xcb_parts[4];
53 xcb_damage_query_version_cookie_t xcb_ret;
54 xcb_damage_query_version_request_t xcb_out;
56 xcb_out.client_major_version = client_major_version;
57 xcb_out.client_minor_version = client_minor_version;
59 xcb_parts[2].iov_base = (char *) &xcb_out;
60 xcb_parts[2].iov_len = sizeof(xcb_out);
61 xcb_parts[3].iov_base = 0;
62 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
64 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
65 return xcb_ret;
68 xcb_damage_query_version_cookie_t
69 xcb_damage_query_version_unchecked (xcb_connection_t *c /**< */,
70 uint32_t client_major_version /**< */,
71 uint32_t client_minor_version /**< */)
73 static const xcb_protocol_request_t xcb_req = {
74 /* count */ 2,
75 /* ext */ &xcb_damage_id,
76 /* opcode */ XCB_DAMAGE_QUERY_VERSION,
77 /* isvoid */ 0
80 struct iovec xcb_parts[4];
81 xcb_damage_query_version_cookie_t xcb_ret;
82 xcb_damage_query_version_request_t xcb_out;
84 xcb_out.client_major_version = client_major_version;
85 xcb_out.client_minor_version = client_minor_version;
87 xcb_parts[2].iov_base = (char *) &xcb_out;
88 xcb_parts[2].iov_len = sizeof(xcb_out);
89 xcb_parts[3].iov_base = 0;
90 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
92 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
93 return xcb_ret;
96 xcb_damage_query_version_reply_t *
97 xcb_damage_query_version_reply (xcb_connection_t *c /**< */,
98 xcb_damage_query_version_cookie_t cookie /**< */,
99 xcb_generic_error_t **e /**< */)
101 return (xcb_damage_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
104 xcb_void_cookie_t
105 xcb_damage_create_checked (xcb_connection_t *c /**< */,
106 xcb_damage_damage_t damage /**< */,
107 xcb_drawable_t drawable /**< */,
108 uint8_t level /**< */)
110 static const xcb_protocol_request_t xcb_req = {
111 /* count */ 2,
112 /* ext */ &xcb_damage_id,
113 /* opcode */ XCB_DAMAGE_CREATE,
114 /* isvoid */ 1
117 struct iovec xcb_parts[4];
118 xcb_void_cookie_t xcb_ret;
119 xcb_damage_create_request_t xcb_out;
121 xcb_out.damage = damage;
122 xcb_out.drawable = drawable;
123 xcb_out.level = level;
124 memset(xcb_out.pad0, 0, 3);
126 xcb_parts[2].iov_base = (char *) &xcb_out;
127 xcb_parts[2].iov_len = sizeof(xcb_out);
128 xcb_parts[3].iov_base = 0;
129 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
131 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
132 return xcb_ret;
135 xcb_void_cookie_t
136 xcb_damage_create (xcb_connection_t *c /**< */,
137 xcb_damage_damage_t damage /**< */,
138 xcb_drawable_t drawable /**< */,
139 uint8_t level /**< */)
141 static const xcb_protocol_request_t xcb_req = {
142 /* count */ 2,
143 /* ext */ &xcb_damage_id,
144 /* opcode */ XCB_DAMAGE_CREATE,
145 /* isvoid */ 1
148 struct iovec xcb_parts[4];
149 xcb_void_cookie_t xcb_ret;
150 xcb_damage_create_request_t xcb_out;
152 xcb_out.damage = damage;
153 xcb_out.drawable = drawable;
154 xcb_out.level = level;
155 memset(xcb_out.pad0, 0, 3);
157 xcb_parts[2].iov_base = (char *) &xcb_out;
158 xcb_parts[2].iov_len = sizeof(xcb_out);
159 xcb_parts[3].iov_base = 0;
160 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
162 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
163 return xcb_ret;
166 xcb_void_cookie_t
167 xcb_damage_destroy_checked (xcb_connection_t *c /**< */,
168 xcb_damage_damage_t damage /**< */)
170 static const xcb_protocol_request_t xcb_req = {
171 /* count */ 2,
172 /* ext */ &xcb_damage_id,
173 /* opcode */ XCB_DAMAGE_DESTROY,
174 /* isvoid */ 1
177 struct iovec xcb_parts[4];
178 xcb_void_cookie_t xcb_ret;
179 xcb_damage_destroy_request_t xcb_out;
181 xcb_out.damage = damage;
183 xcb_parts[2].iov_base = (char *) &xcb_out;
184 xcb_parts[2].iov_len = sizeof(xcb_out);
185 xcb_parts[3].iov_base = 0;
186 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
188 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
189 return xcb_ret;
192 xcb_void_cookie_t
193 xcb_damage_destroy (xcb_connection_t *c /**< */,
194 xcb_damage_damage_t damage /**< */)
196 static const xcb_protocol_request_t xcb_req = {
197 /* count */ 2,
198 /* ext */ &xcb_damage_id,
199 /* opcode */ XCB_DAMAGE_DESTROY,
200 /* isvoid */ 1
203 struct iovec xcb_parts[4];
204 xcb_void_cookie_t xcb_ret;
205 xcb_damage_destroy_request_t xcb_out;
207 xcb_out.damage = damage;
209 xcb_parts[2].iov_base = (char *) &xcb_out;
210 xcb_parts[2].iov_len = sizeof(xcb_out);
211 xcb_parts[3].iov_base = 0;
212 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
214 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
215 return xcb_ret;
218 xcb_void_cookie_t
219 xcb_damage_subtract_checked (xcb_connection_t *c /**< */,
220 xcb_damage_damage_t damage /**< */,
221 xcb_xfixes_region_t repair /**< */,
222 xcb_xfixes_region_t parts /**< */)
224 static const xcb_protocol_request_t xcb_req = {
225 /* count */ 2,
226 /* ext */ &xcb_damage_id,
227 /* opcode */ XCB_DAMAGE_SUBTRACT,
228 /* isvoid */ 1
231 struct iovec xcb_parts[4];
232 xcb_void_cookie_t xcb_ret;
233 xcb_damage_subtract_request_t xcb_out;
235 xcb_out.damage = damage;
236 xcb_out.repair = repair;
237 xcb_out.parts = parts;
239 xcb_parts[2].iov_base = (char *) &xcb_out;
240 xcb_parts[2].iov_len = sizeof(xcb_out);
241 xcb_parts[3].iov_base = 0;
242 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
244 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
245 return xcb_ret;
248 xcb_void_cookie_t
249 xcb_damage_subtract (xcb_connection_t *c /**< */,
250 xcb_damage_damage_t damage /**< */,
251 xcb_xfixes_region_t repair /**< */,
252 xcb_xfixes_region_t parts /**< */)
254 static const xcb_protocol_request_t xcb_req = {
255 /* count */ 2,
256 /* ext */ &xcb_damage_id,
257 /* opcode */ XCB_DAMAGE_SUBTRACT,
258 /* isvoid */ 1
261 struct iovec xcb_parts[4];
262 xcb_void_cookie_t xcb_ret;
263 xcb_damage_subtract_request_t xcb_out;
265 xcb_out.damage = damage;
266 xcb_out.repair = repair;
267 xcb_out.parts = parts;
269 xcb_parts[2].iov_base = (char *) &xcb_out;
270 xcb_parts[2].iov_len = sizeof(xcb_out);
271 xcb_parts[3].iov_base = 0;
272 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
274 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
275 return xcb_ret;
278 xcb_void_cookie_t
279 xcb_damage_add_checked (xcb_connection_t *c /**< */,
280 xcb_drawable_t drawable /**< */,
281 xcb_xfixes_region_t region /**< */)
283 static const xcb_protocol_request_t xcb_req = {
284 /* count */ 2,
285 /* ext */ &xcb_damage_id,
286 /* opcode */ XCB_DAMAGE_ADD,
287 /* isvoid */ 1
290 struct iovec xcb_parts[4];
291 xcb_void_cookie_t xcb_ret;
292 xcb_damage_add_request_t xcb_out;
294 xcb_out.drawable = drawable;
295 xcb_out.region = region;
297 xcb_parts[2].iov_base = (char *) &xcb_out;
298 xcb_parts[2].iov_len = sizeof(xcb_out);
299 xcb_parts[3].iov_base = 0;
300 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
302 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
303 return xcb_ret;
306 xcb_void_cookie_t
307 xcb_damage_add (xcb_connection_t *c /**< */,
308 xcb_drawable_t drawable /**< */,
309 xcb_xfixes_region_t region /**< */)
311 static const xcb_protocol_request_t xcb_req = {
312 /* count */ 2,
313 /* ext */ &xcb_damage_id,
314 /* opcode */ XCB_DAMAGE_ADD,
315 /* isvoid */ 1
318 struct iovec xcb_parts[4];
319 xcb_void_cookie_t xcb_ret;
320 xcb_damage_add_request_t xcb_out;
322 xcb_out.drawable = drawable;
323 xcb_out.region = region;
325 xcb_parts[2].iov_base = (char *) &xcb_out;
326 xcb_parts[2].iov_len = sizeof(xcb_out);
327 xcb_parts[3].iov_base = 0;
328 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
330 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
331 return xcb_ret;