2 * This file generated automatically from dri3.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
19 xcb_extension_t xcb_dri3_id
= { "DRI3", 0 };
21 xcb_dri3_query_version_cookie_t
22 xcb_dri3_query_version (xcb_connection_t
*c
/**< */,
23 uint32_t major_version
/**< */,
24 uint32_t minor_version
/**< */)
26 static const xcb_protocol_request_t xcb_req
= {
28 /* ext */ &xcb_dri3_id
,
29 /* opcode */ XCB_DRI3_QUERY_VERSION
,
33 struct iovec xcb_parts
[4];
34 xcb_dri3_query_version_cookie_t xcb_ret
;
35 xcb_dri3_query_version_request_t xcb_out
;
37 xcb_out
.major_version
= major_version
;
38 xcb_out
.minor_version
= minor_version
;
40 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
41 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
42 xcb_parts
[3].iov_base
= 0;
43 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
45 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
49 xcb_dri3_query_version_cookie_t
50 xcb_dri3_query_version_unchecked (xcb_connection_t
*c
/**< */,
51 uint32_t major_version
/**< */,
52 uint32_t minor_version
/**< */)
54 static const xcb_protocol_request_t xcb_req
= {
56 /* ext */ &xcb_dri3_id
,
57 /* opcode */ XCB_DRI3_QUERY_VERSION
,
61 struct iovec xcb_parts
[4];
62 xcb_dri3_query_version_cookie_t xcb_ret
;
63 xcb_dri3_query_version_request_t xcb_out
;
65 xcb_out
.major_version
= major_version
;
66 xcb_out
.minor_version
= minor_version
;
68 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
69 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
70 xcb_parts
[3].iov_base
= 0;
71 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
73 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
77 xcb_dri3_query_version_reply_t
*
78 xcb_dri3_query_version_reply (xcb_connection_t
*c
/**< */,
79 xcb_dri3_query_version_cookie_t cookie
/**< */,
80 xcb_generic_error_t
**e
/**< */)
82 return (xcb_dri3_query_version_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
85 xcb_dri3_open_cookie_t
86 xcb_dri3_open (xcb_connection_t
*c
/**< */,
87 xcb_drawable_t drawable
/**< */,
88 uint32_t provider
/**< */)
90 static const xcb_protocol_request_t xcb_req
= {
92 /* ext */ &xcb_dri3_id
,
93 /* opcode */ XCB_DRI3_OPEN
,
97 struct iovec xcb_parts
[4];
98 xcb_dri3_open_cookie_t xcb_ret
;
99 xcb_dri3_open_request_t xcb_out
;
101 xcb_out
.drawable
= drawable
;
102 xcb_out
.provider
= provider
;
104 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
105 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
106 xcb_parts
[3].iov_base
= 0;
107 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
109 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
|XCB_REQUEST_REPLY_FDS
, xcb_parts
+ 2, &xcb_req
);
113 xcb_dri3_open_cookie_t
114 xcb_dri3_open_unchecked (xcb_connection_t
*c
/**< */,
115 xcb_drawable_t drawable
/**< */,
116 uint32_t provider
/**< */)
118 static const xcb_protocol_request_t xcb_req
= {
120 /* ext */ &xcb_dri3_id
,
121 /* opcode */ XCB_DRI3_OPEN
,
125 struct iovec xcb_parts
[4];
126 xcb_dri3_open_cookie_t xcb_ret
;
127 xcb_dri3_open_request_t xcb_out
;
129 xcb_out
.drawable
= drawable
;
130 xcb_out
.provider
= provider
;
132 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
133 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
134 xcb_parts
[3].iov_base
= 0;
135 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
137 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_REPLY_FDS
, xcb_parts
+ 2, &xcb_req
);
141 xcb_dri3_open_reply_t
*
142 xcb_dri3_open_reply (xcb_connection_t
*c
/**< */,
143 xcb_dri3_open_cookie_t cookie
/**< */,
144 xcb_generic_error_t
**e
/**< */)
146 return (xcb_dri3_open_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
150 xcb_dri3_open_reply_fds (xcb_connection_t
*c
/**< */,
151 xcb_dri3_open_reply_t
*reply
/**< */)
153 return xcb_get_reply_fds(c
, reply
, sizeof(xcb_dri3_open_reply_t
) + 4 * reply
->length
);
157 xcb_dri3_pixmap_from_buffer_checked (xcb_connection_t
*c
/**< */,
158 xcb_pixmap_t pixmap
/**< */,
159 xcb_drawable_t drawable
/**< */,
160 uint32_t size
/**< */,
161 uint16_t width
/**< */,
162 uint16_t height
/**< */,
163 uint16_t stride
/**< */,
164 uint8_t depth
/**< */,
166 int32_t pixmap_fd
/**< */)
168 static const xcb_protocol_request_t xcb_req
= {
170 /* ext */ &xcb_dri3_id
,
171 /* opcode */ XCB_DRI3_PIXMAP_FROM_BUFFER
,
175 struct iovec xcb_parts
[4];
176 xcb_void_cookie_t xcb_ret
;
177 xcb_dri3_pixmap_from_buffer_request_t xcb_out
;
179 xcb_out
.pixmap
= pixmap
;
180 xcb_out
.drawable
= drawable
;
182 xcb_out
.width
= width
;
183 xcb_out
.height
= height
;
184 xcb_out
.stride
= stride
;
185 xcb_out
.depth
= depth
;
188 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
189 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
190 xcb_parts
[3].iov_base
= 0;
191 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
193 xcb_send_fd(c
, pixmap_fd
);
194 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
199 xcb_dri3_pixmap_from_buffer (xcb_connection_t
*c
/**< */,
200 xcb_pixmap_t pixmap
/**< */,
201 xcb_drawable_t drawable
/**< */,
202 uint32_t size
/**< */,
203 uint16_t width
/**< */,
204 uint16_t height
/**< */,
205 uint16_t stride
/**< */,
206 uint8_t depth
/**< */,
208 int32_t pixmap_fd
/**< */)
210 static const xcb_protocol_request_t xcb_req
= {
212 /* ext */ &xcb_dri3_id
,
213 /* opcode */ XCB_DRI3_PIXMAP_FROM_BUFFER
,
217 struct iovec xcb_parts
[4];
218 xcb_void_cookie_t xcb_ret
;
219 xcb_dri3_pixmap_from_buffer_request_t xcb_out
;
221 xcb_out
.pixmap
= pixmap
;
222 xcb_out
.drawable
= drawable
;
224 xcb_out
.width
= width
;
225 xcb_out
.height
= height
;
226 xcb_out
.stride
= stride
;
227 xcb_out
.depth
= depth
;
230 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
231 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
232 xcb_parts
[3].iov_base
= 0;
233 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
235 xcb_send_fd(c
, pixmap_fd
);
236 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
240 xcb_dri3_buffer_from_pixmap_cookie_t
241 xcb_dri3_buffer_from_pixmap (xcb_connection_t
*c
/**< */,
242 xcb_pixmap_t pixmap
/**< */)
244 static const xcb_protocol_request_t xcb_req
= {
246 /* ext */ &xcb_dri3_id
,
247 /* opcode */ XCB_DRI3_BUFFER_FROM_PIXMAP
,
251 struct iovec xcb_parts
[4];
252 xcb_dri3_buffer_from_pixmap_cookie_t xcb_ret
;
253 xcb_dri3_buffer_from_pixmap_request_t xcb_out
;
255 xcb_out
.pixmap
= pixmap
;
257 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
258 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
259 xcb_parts
[3].iov_base
= 0;
260 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
262 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
|XCB_REQUEST_REPLY_FDS
, xcb_parts
+ 2, &xcb_req
);
266 xcb_dri3_buffer_from_pixmap_cookie_t
267 xcb_dri3_buffer_from_pixmap_unchecked (xcb_connection_t
*c
/**< */,
268 xcb_pixmap_t pixmap
/**< */)
270 static const xcb_protocol_request_t xcb_req
= {
272 /* ext */ &xcb_dri3_id
,
273 /* opcode */ XCB_DRI3_BUFFER_FROM_PIXMAP
,
277 struct iovec xcb_parts
[4];
278 xcb_dri3_buffer_from_pixmap_cookie_t xcb_ret
;
279 xcb_dri3_buffer_from_pixmap_request_t xcb_out
;
281 xcb_out
.pixmap
= pixmap
;
283 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
284 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
285 xcb_parts
[3].iov_base
= 0;
286 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
288 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_REPLY_FDS
, xcb_parts
+ 2, &xcb_req
);
292 xcb_dri3_buffer_from_pixmap_reply_t
*
293 xcb_dri3_buffer_from_pixmap_reply (xcb_connection_t
*c
/**< */,
294 xcb_dri3_buffer_from_pixmap_cookie_t cookie
/**< */,
295 xcb_generic_error_t
**e
/**< */)
297 return (xcb_dri3_buffer_from_pixmap_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
301 xcb_dri3_buffer_from_pixmap_reply_fds (xcb_connection_t
*c
/**< */,
302 xcb_dri3_buffer_from_pixmap_reply_t
*reply
/**< */)
304 return xcb_get_reply_fds(c
, reply
, sizeof(xcb_dri3_buffer_from_pixmap_reply_t
) + 4 * reply
->length
);
308 xcb_dri3_fence_from_fd_checked (xcb_connection_t
*c
/**< */,
309 xcb_drawable_t drawable
/**< */,
310 uint32_t fence
/**< */,
311 uint8_t initially_triggered
/**< */,
312 int32_t fence_fd
/**< */)
314 static const xcb_protocol_request_t xcb_req
= {
316 /* ext */ &xcb_dri3_id
,
317 /* opcode */ XCB_DRI3_FENCE_FROM_FD
,
321 struct iovec xcb_parts
[4];
322 xcb_void_cookie_t xcb_ret
;
323 xcb_dri3_fence_from_fd_request_t xcb_out
;
325 xcb_out
.drawable
= drawable
;
326 xcb_out
.fence
= fence
;
327 xcb_out
.initially_triggered
= initially_triggered
;
328 memset(xcb_out
.pad0
, 0, 3);
330 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
331 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
332 xcb_parts
[3].iov_base
= 0;
333 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
335 xcb_send_fd(c
, fence_fd
);
336 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
341 xcb_dri3_fence_from_fd (xcb_connection_t
*c
/**< */,
342 xcb_drawable_t drawable
/**< */,
343 uint32_t fence
/**< */,
344 uint8_t initially_triggered
/**< */,
345 int32_t fence_fd
/**< */)
347 static const xcb_protocol_request_t xcb_req
= {
349 /* ext */ &xcb_dri3_id
,
350 /* opcode */ XCB_DRI3_FENCE_FROM_FD
,
354 struct iovec xcb_parts
[4];
355 xcb_void_cookie_t xcb_ret
;
356 xcb_dri3_fence_from_fd_request_t xcb_out
;
358 xcb_out
.drawable
= drawable
;
359 xcb_out
.fence
= fence
;
360 xcb_out
.initially_triggered
= initially_triggered
;
361 memset(xcb_out
.pad0
, 0, 3);
363 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
364 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
365 xcb_parts
[3].iov_base
= 0;
366 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
368 xcb_send_fd(c
, fence_fd
);
369 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
373 xcb_dri3_fd_from_fence_cookie_t
374 xcb_dri3_fd_from_fence (xcb_connection_t
*c
/**< */,
375 xcb_drawable_t drawable
/**< */,
376 uint32_t fence
/**< */)
378 static const xcb_protocol_request_t xcb_req
= {
380 /* ext */ &xcb_dri3_id
,
381 /* opcode */ XCB_DRI3_FD_FROM_FENCE
,
385 struct iovec xcb_parts
[4];
386 xcb_dri3_fd_from_fence_cookie_t xcb_ret
;
387 xcb_dri3_fd_from_fence_request_t xcb_out
;
389 xcb_out
.drawable
= drawable
;
390 xcb_out
.fence
= fence
;
392 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
393 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
394 xcb_parts
[3].iov_base
= 0;
395 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
397 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
|XCB_REQUEST_REPLY_FDS
, xcb_parts
+ 2, &xcb_req
);
401 xcb_dri3_fd_from_fence_cookie_t
402 xcb_dri3_fd_from_fence_unchecked (xcb_connection_t
*c
/**< */,
403 xcb_drawable_t drawable
/**< */,
404 uint32_t fence
/**< */)
406 static const xcb_protocol_request_t xcb_req
= {
408 /* ext */ &xcb_dri3_id
,
409 /* opcode */ XCB_DRI3_FD_FROM_FENCE
,
413 struct iovec xcb_parts
[4];
414 xcb_dri3_fd_from_fence_cookie_t xcb_ret
;
415 xcb_dri3_fd_from_fence_request_t xcb_out
;
417 xcb_out
.drawable
= drawable
;
418 xcb_out
.fence
= fence
;
420 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
421 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
422 xcb_parts
[3].iov_base
= 0;
423 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
425 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_REPLY_FDS
, xcb_parts
+ 2, &xcb_req
);
429 xcb_dri3_fd_from_fence_reply_t
*
430 xcb_dri3_fd_from_fence_reply (xcb_connection_t
*c
/**< */,
431 xcb_dri3_fd_from_fence_cookie_t cookie
/**< */,
432 xcb_generic_error_t
**e
/**< */)
434 return (xcb_dri3_fd_from_fence_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
438 xcb_dri3_fd_from_fence_reply_fds (xcb_connection_t
*c
/**< */,
439 xcb_dri3_fd_from_fence_reply_t
*reply
/**< */)
441 return xcb_get_reply_fds(c
, reply
, sizeof(xcb_dri3_fd_from_fence_reply_t
) + 4 * reply
->length
);