1971bb1a5SLionel Sambuc /*
2971bb1a5SLionel Sambuc * This file generated automatically from shm.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 "shm.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_shm_id = { "MIT-SHM", 0 };
20971bb1a5SLionel Sambuc
21971bb1a5SLionel Sambuc void
xcb_shm_seg_next(xcb_shm_seg_iterator_t * i)22971bb1a5SLionel Sambuc xcb_shm_seg_next (xcb_shm_seg_iterator_t *i /**< */)
23971bb1a5SLionel Sambuc {
24971bb1a5SLionel Sambuc --i->rem;
25971bb1a5SLionel Sambuc ++i->data;
26971bb1a5SLionel Sambuc i->index += sizeof(xcb_shm_seg_t);
27971bb1a5SLionel Sambuc }
28971bb1a5SLionel Sambuc
29971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_shm_seg_end(xcb_shm_seg_iterator_t i)30971bb1a5SLionel Sambuc xcb_shm_seg_end (xcb_shm_seg_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 xcb_shm_query_version_cookie_t
xcb_shm_query_version(xcb_connection_t * c)40971bb1a5SLionel Sambuc xcb_shm_query_version (xcb_connection_t *c /**< */)
41971bb1a5SLionel Sambuc {
42971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
43971bb1a5SLionel Sambuc /* count */ 2,
44971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
45971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_QUERY_VERSION,
46971bb1a5SLionel Sambuc /* isvoid */ 0
47971bb1a5SLionel Sambuc };
48971bb1a5SLionel Sambuc
49971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
50971bb1a5SLionel Sambuc xcb_shm_query_version_cookie_t xcb_ret;
51971bb1a5SLionel Sambuc xcb_shm_query_version_request_t xcb_out;
52971bb1a5SLionel Sambuc
53971bb1a5SLionel Sambuc
54971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
55971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
56971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
57971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
58971bb1a5SLionel Sambuc
59971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
60971bb1a5SLionel Sambuc return xcb_ret;
61971bb1a5SLionel Sambuc }
62971bb1a5SLionel Sambuc
63971bb1a5SLionel Sambuc xcb_shm_query_version_cookie_t
xcb_shm_query_version_unchecked(xcb_connection_t * c)64971bb1a5SLionel Sambuc xcb_shm_query_version_unchecked (xcb_connection_t *c /**< */)
65971bb1a5SLionel Sambuc {
66971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
67971bb1a5SLionel Sambuc /* count */ 2,
68971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
69971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_QUERY_VERSION,
70971bb1a5SLionel Sambuc /* isvoid */ 0
71971bb1a5SLionel Sambuc };
72971bb1a5SLionel Sambuc
73971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
74971bb1a5SLionel Sambuc xcb_shm_query_version_cookie_t xcb_ret;
75971bb1a5SLionel Sambuc xcb_shm_query_version_request_t xcb_out;
76971bb1a5SLionel Sambuc
77971bb1a5SLionel Sambuc
78971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
79971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
80971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
81971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
82971bb1a5SLionel Sambuc
83971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
84971bb1a5SLionel Sambuc return xcb_ret;
85971bb1a5SLionel Sambuc }
86971bb1a5SLionel Sambuc
87971bb1a5SLionel Sambuc xcb_shm_query_version_reply_t *
xcb_shm_query_version_reply(xcb_connection_t * c,xcb_shm_query_version_cookie_t cookie,xcb_generic_error_t ** e)88971bb1a5SLionel Sambuc xcb_shm_query_version_reply (xcb_connection_t *c /**< */,
89971bb1a5SLionel Sambuc xcb_shm_query_version_cookie_t cookie /**< */,
90971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
91971bb1a5SLionel Sambuc {
92971bb1a5SLionel Sambuc return (xcb_shm_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
93971bb1a5SLionel Sambuc }
94971bb1a5SLionel Sambuc
95971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_shm_attach_checked(xcb_connection_t * c,xcb_shm_seg_t shmseg,uint32_t shmid,uint8_t read_only)96971bb1a5SLionel Sambuc xcb_shm_attach_checked (xcb_connection_t *c /**< */,
97971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */,
98971bb1a5SLionel Sambuc uint32_t shmid /**< */,
99971bb1a5SLionel Sambuc uint8_t read_only /**< */)
100971bb1a5SLionel Sambuc {
101971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
102971bb1a5SLionel Sambuc /* count */ 2,
103971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
104971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_ATTACH,
105971bb1a5SLionel Sambuc /* isvoid */ 1
106971bb1a5SLionel Sambuc };
107971bb1a5SLionel Sambuc
108971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
109971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
110971bb1a5SLionel Sambuc xcb_shm_attach_request_t xcb_out;
111971bb1a5SLionel Sambuc
112971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
113971bb1a5SLionel Sambuc xcb_out.shmid = shmid;
114971bb1a5SLionel Sambuc xcb_out.read_only = read_only;
115971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
116971bb1a5SLionel Sambuc
117971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
118971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
119971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
120971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
121971bb1a5SLionel Sambuc
122971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
123971bb1a5SLionel Sambuc return xcb_ret;
124971bb1a5SLionel Sambuc }
125971bb1a5SLionel Sambuc
126971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_shm_attach(xcb_connection_t * c,xcb_shm_seg_t shmseg,uint32_t shmid,uint8_t read_only)127971bb1a5SLionel Sambuc xcb_shm_attach (xcb_connection_t *c /**< */,
128971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */,
129971bb1a5SLionel Sambuc uint32_t shmid /**< */,
130971bb1a5SLionel Sambuc uint8_t read_only /**< */)
131971bb1a5SLionel Sambuc {
132971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
133971bb1a5SLionel Sambuc /* count */ 2,
134971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
135971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_ATTACH,
136971bb1a5SLionel Sambuc /* isvoid */ 1
137971bb1a5SLionel Sambuc };
138971bb1a5SLionel Sambuc
139971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
140971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
141971bb1a5SLionel Sambuc xcb_shm_attach_request_t xcb_out;
142971bb1a5SLionel Sambuc
143971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
144971bb1a5SLionel Sambuc xcb_out.shmid = shmid;
145971bb1a5SLionel Sambuc xcb_out.read_only = read_only;
146971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
147971bb1a5SLionel Sambuc
148971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
149971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
150971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
151971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
152971bb1a5SLionel Sambuc
153971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
154971bb1a5SLionel Sambuc return xcb_ret;
155971bb1a5SLionel Sambuc }
156971bb1a5SLionel Sambuc
157971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_shm_detach_checked(xcb_connection_t * c,xcb_shm_seg_t shmseg)158971bb1a5SLionel Sambuc xcb_shm_detach_checked (xcb_connection_t *c /**< */,
159971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */)
160971bb1a5SLionel Sambuc {
161971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
162971bb1a5SLionel Sambuc /* count */ 2,
163971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
164971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_DETACH,
165971bb1a5SLionel Sambuc /* isvoid */ 1
166971bb1a5SLionel Sambuc };
167971bb1a5SLionel Sambuc
168971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
169971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
170971bb1a5SLionel Sambuc xcb_shm_detach_request_t xcb_out;
171971bb1a5SLionel Sambuc
172971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
173971bb1a5SLionel Sambuc
174971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
175971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
176971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
177971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
178971bb1a5SLionel Sambuc
179971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
180971bb1a5SLionel Sambuc return xcb_ret;
181971bb1a5SLionel Sambuc }
182971bb1a5SLionel Sambuc
183971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_shm_detach(xcb_connection_t * c,xcb_shm_seg_t shmseg)184971bb1a5SLionel Sambuc xcb_shm_detach (xcb_connection_t *c /**< */,
185971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */)
186971bb1a5SLionel Sambuc {
187971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
188971bb1a5SLionel Sambuc /* count */ 2,
189971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
190971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_DETACH,
191971bb1a5SLionel Sambuc /* isvoid */ 1
192971bb1a5SLionel Sambuc };
193971bb1a5SLionel Sambuc
194971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
195971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
196971bb1a5SLionel Sambuc xcb_shm_detach_request_t xcb_out;
197971bb1a5SLionel Sambuc
198971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
199971bb1a5SLionel Sambuc
200971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
201971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
202971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
203971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
204971bb1a5SLionel Sambuc
205971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
206971bb1a5SLionel Sambuc return xcb_ret;
207971bb1a5SLionel Sambuc }
208971bb1a5SLionel Sambuc
209971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_shm_put_image_checked(xcb_connection_t * c,xcb_drawable_t drawable,xcb_gcontext_t gc,uint16_t total_width,uint16_t total_height,uint16_t src_x,uint16_t src_y,uint16_t src_width,uint16_t src_height,int16_t dst_x,int16_t dst_y,uint8_t depth,uint8_t format,uint8_t send_event,xcb_shm_seg_t shmseg,uint32_t offset)210971bb1a5SLionel Sambuc xcb_shm_put_image_checked (xcb_connection_t *c /**< */,
211971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
212971bb1a5SLionel Sambuc xcb_gcontext_t gc /**< */,
213971bb1a5SLionel Sambuc uint16_t total_width /**< */,
214971bb1a5SLionel Sambuc uint16_t total_height /**< */,
215971bb1a5SLionel Sambuc uint16_t src_x /**< */,
216971bb1a5SLionel Sambuc uint16_t src_y /**< */,
217971bb1a5SLionel Sambuc uint16_t src_width /**< */,
218971bb1a5SLionel Sambuc uint16_t src_height /**< */,
219971bb1a5SLionel Sambuc int16_t dst_x /**< */,
220971bb1a5SLionel Sambuc int16_t dst_y /**< */,
221971bb1a5SLionel Sambuc uint8_t depth /**< */,
222971bb1a5SLionel Sambuc uint8_t format /**< */,
223971bb1a5SLionel Sambuc uint8_t send_event /**< */,
224971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */,
225971bb1a5SLionel Sambuc uint32_t offset /**< */)
226971bb1a5SLionel Sambuc {
227971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
228971bb1a5SLionel Sambuc /* count */ 2,
229971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
230971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_PUT_IMAGE,
231971bb1a5SLionel Sambuc /* isvoid */ 1
232971bb1a5SLionel Sambuc };
233971bb1a5SLionel Sambuc
234971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
235971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
236971bb1a5SLionel Sambuc xcb_shm_put_image_request_t xcb_out;
237971bb1a5SLionel Sambuc
238971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
239971bb1a5SLionel Sambuc xcb_out.gc = gc;
240971bb1a5SLionel Sambuc xcb_out.total_width = total_width;
241971bb1a5SLionel Sambuc xcb_out.total_height = total_height;
242971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
243971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
244971bb1a5SLionel Sambuc xcb_out.src_width = src_width;
245971bb1a5SLionel Sambuc xcb_out.src_height = src_height;
246971bb1a5SLionel Sambuc xcb_out.dst_x = dst_x;
247971bb1a5SLionel Sambuc xcb_out.dst_y = dst_y;
248971bb1a5SLionel Sambuc xcb_out.depth = depth;
249971bb1a5SLionel Sambuc xcb_out.format = format;
250971bb1a5SLionel Sambuc xcb_out.send_event = send_event;
251971bb1a5SLionel Sambuc xcb_out.pad0 = 0;
252971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
253971bb1a5SLionel Sambuc xcb_out.offset = offset;
254971bb1a5SLionel Sambuc
255971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
256971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
257971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
258971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
259971bb1a5SLionel Sambuc
260971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
261971bb1a5SLionel Sambuc return xcb_ret;
262971bb1a5SLionel Sambuc }
263971bb1a5SLionel Sambuc
264971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_shm_put_image(xcb_connection_t * c,xcb_drawable_t drawable,xcb_gcontext_t gc,uint16_t total_width,uint16_t total_height,uint16_t src_x,uint16_t src_y,uint16_t src_width,uint16_t src_height,int16_t dst_x,int16_t dst_y,uint8_t depth,uint8_t format,uint8_t send_event,xcb_shm_seg_t shmseg,uint32_t offset)265971bb1a5SLionel Sambuc xcb_shm_put_image (xcb_connection_t *c /**< */,
266971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
267971bb1a5SLionel Sambuc xcb_gcontext_t gc /**< */,
268971bb1a5SLionel Sambuc uint16_t total_width /**< */,
269971bb1a5SLionel Sambuc uint16_t total_height /**< */,
270971bb1a5SLionel Sambuc uint16_t src_x /**< */,
271971bb1a5SLionel Sambuc uint16_t src_y /**< */,
272971bb1a5SLionel Sambuc uint16_t src_width /**< */,
273971bb1a5SLionel Sambuc uint16_t src_height /**< */,
274971bb1a5SLionel Sambuc int16_t dst_x /**< */,
275971bb1a5SLionel Sambuc int16_t dst_y /**< */,
276971bb1a5SLionel Sambuc uint8_t depth /**< */,
277971bb1a5SLionel Sambuc uint8_t format /**< */,
278971bb1a5SLionel Sambuc uint8_t send_event /**< */,
279971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */,
280971bb1a5SLionel Sambuc uint32_t offset /**< */)
281971bb1a5SLionel Sambuc {
282971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
283971bb1a5SLionel Sambuc /* count */ 2,
284971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
285971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_PUT_IMAGE,
286971bb1a5SLionel Sambuc /* isvoid */ 1
287971bb1a5SLionel Sambuc };
288971bb1a5SLionel Sambuc
289971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
290971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
291971bb1a5SLionel Sambuc xcb_shm_put_image_request_t xcb_out;
292971bb1a5SLionel Sambuc
293971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
294971bb1a5SLionel Sambuc xcb_out.gc = gc;
295971bb1a5SLionel Sambuc xcb_out.total_width = total_width;
296971bb1a5SLionel Sambuc xcb_out.total_height = total_height;
297971bb1a5SLionel Sambuc xcb_out.src_x = src_x;
298971bb1a5SLionel Sambuc xcb_out.src_y = src_y;
299971bb1a5SLionel Sambuc xcb_out.src_width = src_width;
300971bb1a5SLionel Sambuc xcb_out.src_height = src_height;
301971bb1a5SLionel Sambuc xcb_out.dst_x = dst_x;
302971bb1a5SLionel Sambuc xcb_out.dst_y = dst_y;
303971bb1a5SLionel Sambuc xcb_out.depth = depth;
304971bb1a5SLionel Sambuc xcb_out.format = format;
305971bb1a5SLionel Sambuc xcb_out.send_event = send_event;
306971bb1a5SLionel Sambuc xcb_out.pad0 = 0;
307971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
308971bb1a5SLionel Sambuc xcb_out.offset = offset;
309971bb1a5SLionel Sambuc
310971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
311971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
312971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
313971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
314971bb1a5SLionel Sambuc
315971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
316971bb1a5SLionel Sambuc return xcb_ret;
317971bb1a5SLionel Sambuc }
318971bb1a5SLionel Sambuc
319971bb1a5SLionel Sambuc xcb_shm_get_image_cookie_t
xcb_shm_get_image(xcb_connection_t * c,xcb_drawable_t drawable,int16_t x,int16_t y,uint16_t width,uint16_t height,uint32_t plane_mask,uint8_t format,xcb_shm_seg_t shmseg,uint32_t offset)320971bb1a5SLionel Sambuc xcb_shm_get_image (xcb_connection_t *c /**< */,
321971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
322971bb1a5SLionel Sambuc int16_t x /**< */,
323971bb1a5SLionel Sambuc int16_t y /**< */,
324971bb1a5SLionel Sambuc uint16_t width /**< */,
325971bb1a5SLionel Sambuc uint16_t height /**< */,
326971bb1a5SLionel Sambuc uint32_t plane_mask /**< */,
327971bb1a5SLionel Sambuc uint8_t format /**< */,
328971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */,
329971bb1a5SLionel Sambuc uint32_t offset /**< */)
330971bb1a5SLionel Sambuc {
331971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
332971bb1a5SLionel Sambuc /* count */ 2,
333971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
334971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_GET_IMAGE,
335971bb1a5SLionel Sambuc /* isvoid */ 0
336971bb1a5SLionel Sambuc };
337971bb1a5SLionel Sambuc
338971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
339971bb1a5SLionel Sambuc xcb_shm_get_image_cookie_t xcb_ret;
340971bb1a5SLionel Sambuc xcb_shm_get_image_request_t xcb_out;
341971bb1a5SLionel Sambuc
342971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
343971bb1a5SLionel Sambuc xcb_out.x = x;
344971bb1a5SLionel Sambuc xcb_out.y = y;
345971bb1a5SLionel Sambuc xcb_out.width = width;
346971bb1a5SLionel Sambuc xcb_out.height = height;
347971bb1a5SLionel Sambuc xcb_out.plane_mask = plane_mask;
348971bb1a5SLionel Sambuc xcb_out.format = format;
349971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
350971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
351971bb1a5SLionel Sambuc xcb_out.offset = offset;
352971bb1a5SLionel Sambuc
353971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
354971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
355971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
356971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
357971bb1a5SLionel Sambuc
358971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
359971bb1a5SLionel Sambuc return xcb_ret;
360971bb1a5SLionel Sambuc }
361971bb1a5SLionel Sambuc
362971bb1a5SLionel Sambuc xcb_shm_get_image_cookie_t
xcb_shm_get_image_unchecked(xcb_connection_t * c,xcb_drawable_t drawable,int16_t x,int16_t y,uint16_t width,uint16_t height,uint32_t plane_mask,uint8_t format,xcb_shm_seg_t shmseg,uint32_t offset)363971bb1a5SLionel Sambuc xcb_shm_get_image_unchecked (xcb_connection_t *c /**< */,
364971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
365971bb1a5SLionel Sambuc int16_t x /**< */,
366971bb1a5SLionel Sambuc int16_t y /**< */,
367971bb1a5SLionel Sambuc uint16_t width /**< */,
368971bb1a5SLionel Sambuc uint16_t height /**< */,
369971bb1a5SLionel Sambuc uint32_t plane_mask /**< */,
370971bb1a5SLionel Sambuc uint8_t format /**< */,
371971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */,
372971bb1a5SLionel Sambuc uint32_t offset /**< */)
373971bb1a5SLionel Sambuc {
374971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
375971bb1a5SLionel Sambuc /* count */ 2,
376971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
377971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_GET_IMAGE,
378971bb1a5SLionel Sambuc /* isvoid */ 0
379971bb1a5SLionel Sambuc };
380971bb1a5SLionel Sambuc
381971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
382971bb1a5SLionel Sambuc xcb_shm_get_image_cookie_t xcb_ret;
383971bb1a5SLionel Sambuc xcb_shm_get_image_request_t xcb_out;
384971bb1a5SLionel Sambuc
385971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
386971bb1a5SLionel Sambuc xcb_out.x = x;
387971bb1a5SLionel Sambuc xcb_out.y = y;
388971bb1a5SLionel Sambuc xcb_out.width = width;
389971bb1a5SLionel Sambuc xcb_out.height = height;
390971bb1a5SLionel Sambuc xcb_out.plane_mask = plane_mask;
391971bb1a5SLionel Sambuc xcb_out.format = format;
392971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
393971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
394971bb1a5SLionel Sambuc xcb_out.offset = offset;
395971bb1a5SLionel Sambuc
396971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
397971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
398971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
399971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
400971bb1a5SLionel Sambuc
401971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
402971bb1a5SLionel Sambuc return xcb_ret;
403971bb1a5SLionel Sambuc }
404971bb1a5SLionel Sambuc
405971bb1a5SLionel Sambuc xcb_shm_get_image_reply_t *
xcb_shm_get_image_reply(xcb_connection_t * c,xcb_shm_get_image_cookie_t cookie,xcb_generic_error_t ** e)406971bb1a5SLionel Sambuc xcb_shm_get_image_reply (xcb_connection_t *c /**< */,
407971bb1a5SLionel Sambuc xcb_shm_get_image_cookie_t cookie /**< */,
408971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
409971bb1a5SLionel Sambuc {
410971bb1a5SLionel Sambuc return (xcb_shm_get_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
411971bb1a5SLionel Sambuc }
412971bb1a5SLionel Sambuc
413971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_shm_create_pixmap_checked(xcb_connection_t * c,xcb_pixmap_t pid,xcb_drawable_t drawable,uint16_t width,uint16_t height,uint8_t depth,xcb_shm_seg_t shmseg,uint32_t offset)414971bb1a5SLionel Sambuc xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */,
415971bb1a5SLionel Sambuc xcb_pixmap_t pid /**< */,
416971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
417971bb1a5SLionel Sambuc uint16_t width /**< */,
418971bb1a5SLionel Sambuc uint16_t height /**< */,
419971bb1a5SLionel Sambuc uint8_t depth /**< */,
420971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */,
421971bb1a5SLionel Sambuc uint32_t offset /**< */)
422971bb1a5SLionel Sambuc {
423971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
424971bb1a5SLionel Sambuc /* count */ 2,
425971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
426971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_CREATE_PIXMAP,
427971bb1a5SLionel Sambuc /* isvoid */ 1
428971bb1a5SLionel Sambuc };
429971bb1a5SLionel Sambuc
430971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
431971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
432971bb1a5SLionel Sambuc xcb_shm_create_pixmap_request_t xcb_out;
433971bb1a5SLionel Sambuc
434971bb1a5SLionel Sambuc xcb_out.pid = pid;
435971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
436971bb1a5SLionel Sambuc xcb_out.width = width;
437971bb1a5SLionel Sambuc xcb_out.height = height;
438971bb1a5SLionel Sambuc xcb_out.depth = depth;
439971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
440971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
441971bb1a5SLionel Sambuc xcb_out.offset = offset;
442971bb1a5SLionel Sambuc
443971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
444971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
445971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
446971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
447971bb1a5SLionel Sambuc
448971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
449971bb1a5SLionel Sambuc return xcb_ret;
450971bb1a5SLionel Sambuc }
451971bb1a5SLionel Sambuc
452971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_shm_create_pixmap(xcb_connection_t * c,xcb_pixmap_t pid,xcb_drawable_t drawable,uint16_t width,uint16_t height,uint8_t depth,xcb_shm_seg_t shmseg,uint32_t offset)453971bb1a5SLionel Sambuc xcb_shm_create_pixmap (xcb_connection_t *c /**< */,
454971bb1a5SLionel Sambuc xcb_pixmap_t pid /**< */,
455971bb1a5SLionel Sambuc xcb_drawable_t drawable /**< */,
456971bb1a5SLionel Sambuc uint16_t width /**< */,
457971bb1a5SLionel Sambuc uint16_t height /**< */,
458971bb1a5SLionel Sambuc uint8_t depth /**< */,
459971bb1a5SLionel Sambuc xcb_shm_seg_t shmseg /**< */,
460971bb1a5SLionel Sambuc uint32_t offset /**< */)
461971bb1a5SLionel Sambuc {
462971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
463971bb1a5SLionel Sambuc /* count */ 2,
464971bb1a5SLionel Sambuc /* ext */ &xcb_shm_id,
465971bb1a5SLionel Sambuc /* opcode */ XCB_SHM_CREATE_PIXMAP,
466971bb1a5SLionel Sambuc /* isvoid */ 1
467971bb1a5SLionel Sambuc };
468971bb1a5SLionel Sambuc
469971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
470971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
471971bb1a5SLionel Sambuc xcb_shm_create_pixmap_request_t xcb_out;
472971bb1a5SLionel Sambuc
473971bb1a5SLionel Sambuc xcb_out.pid = pid;
474971bb1a5SLionel Sambuc xcb_out.drawable = drawable;
475971bb1a5SLionel Sambuc xcb_out.width = width;
476971bb1a5SLionel Sambuc xcb_out.height = height;
477971bb1a5SLionel Sambuc xcb_out.depth = depth;
478971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
479971bb1a5SLionel Sambuc xcb_out.shmseg = shmseg;
480971bb1a5SLionel Sambuc xcb_out.offset = offset;
481971bb1a5SLionel Sambuc
482971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
483971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
484971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
485971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
486971bb1a5SLionel Sambuc
487971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
488971bb1a5SLionel Sambuc return xcb_ret;
489971bb1a5SLionel Sambuc }
490971bb1a5SLionel Sambuc
491*0a6a1f1dSLionel Sambuc xcb_void_cookie_t
xcb_shm_attach_fd_checked(xcb_connection_t * c,xcb_shm_seg_t shmseg,int32_t shm_fd,uint8_t read_only)492*0a6a1f1dSLionel Sambuc xcb_shm_attach_fd_checked (xcb_connection_t *c /**< */,
493*0a6a1f1dSLionel Sambuc xcb_shm_seg_t shmseg /**< */,
494*0a6a1f1dSLionel Sambuc int32_t shm_fd /**< */,
495*0a6a1f1dSLionel Sambuc uint8_t read_only /**< */)
496*0a6a1f1dSLionel Sambuc {
497*0a6a1f1dSLionel Sambuc static const xcb_protocol_request_t xcb_req = {
498*0a6a1f1dSLionel Sambuc /* count */ 2,
499*0a6a1f1dSLionel Sambuc /* ext */ &xcb_shm_id,
500*0a6a1f1dSLionel Sambuc /* opcode */ XCB_SHM_ATTACH_FD,
501*0a6a1f1dSLionel Sambuc /* isvoid */ 1
502*0a6a1f1dSLionel Sambuc };
503*0a6a1f1dSLionel Sambuc
504*0a6a1f1dSLionel Sambuc struct iovec xcb_parts[4];
505*0a6a1f1dSLionel Sambuc xcb_void_cookie_t xcb_ret;
506*0a6a1f1dSLionel Sambuc xcb_shm_attach_fd_request_t xcb_out;
507*0a6a1f1dSLionel Sambuc
508*0a6a1f1dSLionel Sambuc xcb_out.shmseg = shmseg;
509*0a6a1f1dSLionel Sambuc xcb_out.read_only = read_only;
510*0a6a1f1dSLionel Sambuc memset(xcb_out.pad0, 0, 3);
511*0a6a1f1dSLionel Sambuc
512*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
513*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
514*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_base = 0;
515*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
516*0a6a1f1dSLionel Sambuc
517*0a6a1f1dSLionel Sambuc xcb_send_fd(c, shm_fd);
518*0a6a1f1dSLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
519*0a6a1f1dSLionel Sambuc return xcb_ret;
520*0a6a1f1dSLionel Sambuc }
521*0a6a1f1dSLionel Sambuc
522*0a6a1f1dSLionel Sambuc xcb_void_cookie_t
xcb_shm_attach_fd(xcb_connection_t * c,xcb_shm_seg_t shmseg,int32_t shm_fd,uint8_t read_only)523*0a6a1f1dSLionel Sambuc xcb_shm_attach_fd (xcb_connection_t *c /**< */,
524*0a6a1f1dSLionel Sambuc xcb_shm_seg_t shmseg /**< */,
525*0a6a1f1dSLionel Sambuc int32_t shm_fd /**< */,
526*0a6a1f1dSLionel Sambuc uint8_t read_only /**< */)
527*0a6a1f1dSLionel Sambuc {
528*0a6a1f1dSLionel Sambuc static const xcb_protocol_request_t xcb_req = {
529*0a6a1f1dSLionel Sambuc /* count */ 2,
530*0a6a1f1dSLionel Sambuc /* ext */ &xcb_shm_id,
531*0a6a1f1dSLionel Sambuc /* opcode */ XCB_SHM_ATTACH_FD,
532*0a6a1f1dSLionel Sambuc /* isvoid */ 1
533*0a6a1f1dSLionel Sambuc };
534*0a6a1f1dSLionel Sambuc
535*0a6a1f1dSLionel Sambuc struct iovec xcb_parts[4];
536*0a6a1f1dSLionel Sambuc xcb_void_cookie_t xcb_ret;
537*0a6a1f1dSLionel Sambuc xcb_shm_attach_fd_request_t xcb_out;
538*0a6a1f1dSLionel Sambuc
539*0a6a1f1dSLionel Sambuc xcb_out.shmseg = shmseg;
540*0a6a1f1dSLionel Sambuc xcb_out.read_only = read_only;
541*0a6a1f1dSLionel Sambuc memset(xcb_out.pad0, 0, 3);
542*0a6a1f1dSLionel Sambuc
543*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
544*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
545*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_base = 0;
546*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
547*0a6a1f1dSLionel Sambuc
548*0a6a1f1dSLionel Sambuc xcb_send_fd(c, shm_fd);
549*0a6a1f1dSLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
550*0a6a1f1dSLionel Sambuc return xcb_ret;
551*0a6a1f1dSLionel Sambuc }
552*0a6a1f1dSLionel Sambuc
553*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_cookie_t
xcb_shm_create_segment(xcb_connection_t * c,xcb_shm_seg_t shmseg,uint32_t size,uint8_t read_only)554*0a6a1f1dSLionel Sambuc xcb_shm_create_segment (xcb_connection_t *c /**< */,
555*0a6a1f1dSLionel Sambuc xcb_shm_seg_t shmseg /**< */,
556*0a6a1f1dSLionel Sambuc uint32_t size /**< */,
557*0a6a1f1dSLionel Sambuc uint8_t read_only /**< */)
558*0a6a1f1dSLionel Sambuc {
559*0a6a1f1dSLionel Sambuc static const xcb_protocol_request_t xcb_req = {
560*0a6a1f1dSLionel Sambuc /* count */ 2,
561*0a6a1f1dSLionel Sambuc /* ext */ &xcb_shm_id,
562*0a6a1f1dSLionel Sambuc /* opcode */ XCB_SHM_CREATE_SEGMENT,
563*0a6a1f1dSLionel Sambuc /* isvoid */ 0
564*0a6a1f1dSLionel Sambuc };
565*0a6a1f1dSLionel Sambuc
566*0a6a1f1dSLionel Sambuc struct iovec xcb_parts[4];
567*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_cookie_t xcb_ret;
568*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_request_t xcb_out;
569*0a6a1f1dSLionel Sambuc
570*0a6a1f1dSLionel Sambuc xcb_out.shmseg = shmseg;
571*0a6a1f1dSLionel Sambuc xcb_out.size = size;
572*0a6a1f1dSLionel Sambuc xcb_out.read_only = read_only;
573*0a6a1f1dSLionel Sambuc memset(xcb_out.pad0, 0, 3);
574*0a6a1f1dSLionel Sambuc
575*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
576*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
577*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_base = 0;
578*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
579*0a6a1f1dSLionel Sambuc
580*0a6a1f1dSLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED|XCB_REQUEST_REPLY_FDS, xcb_parts + 2, &xcb_req);
581*0a6a1f1dSLionel Sambuc return xcb_ret;
582*0a6a1f1dSLionel Sambuc }
583*0a6a1f1dSLionel Sambuc
584*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_cookie_t
xcb_shm_create_segment_unchecked(xcb_connection_t * c,xcb_shm_seg_t shmseg,uint32_t size,uint8_t read_only)585*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_unchecked (xcb_connection_t *c /**< */,
586*0a6a1f1dSLionel Sambuc xcb_shm_seg_t shmseg /**< */,
587*0a6a1f1dSLionel Sambuc uint32_t size /**< */,
588*0a6a1f1dSLionel Sambuc uint8_t read_only /**< */)
589*0a6a1f1dSLionel Sambuc {
590*0a6a1f1dSLionel Sambuc static const xcb_protocol_request_t xcb_req = {
591*0a6a1f1dSLionel Sambuc /* count */ 2,
592*0a6a1f1dSLionel Sambuc /* ext */ &xcb_shm_id,
593*0a6a1f1dSLionel Sambuc /* opcode */ XCB_SHM_CREATE_SEGMENT,
594*0a6a1f1dSLionel Sambuc /* isvoid */ 0
595*0a6a1f1dSLionel Sambuc };
596*0a6a1f1dSLionel Sambuc
597*0a6a1f1dSLionel Sambuc struct iovec xcb_parts[4];
598*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_cookie_t xcb_ret;
599*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_request_t xcb_out;
600*0a6a1f1dSLionel Sambuc
601*0a6a1f1dSLionel Sambuc xcb_out.shmseg = shmseg;
602*0a6a1f1dSLionel Sambuc xcb_out.size = size;
603*0a6a1f1dSLionel Sambuc xcb_out.read_only = read_only;
604*0a6a1f1dSLionel Sambuc memset(xcb_out.pad0, 0, 3);
605*0a6a1f1dSLionel Sambuc
606*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
607*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
608*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_base = 0;
609*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
610*0a6a1f1dSLionel Sambuc
611*0a6a1f1dSLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_REPLY_FDS, xcb_parts + 2, &xcb_req);
612*0a6a1f1dSLionel Sambuc return xcb_ret;
613*0a6a1f1dSLionel Sambuc }
614*0a6a1f1dSLionel Sambuc
615*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_reply_t *
xcb_shm_create_segment_reply(xcb_connection_t * c,xcb_shm_create_segment_cookie_t cookie,xcb_generic_error_t ** e)616*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_reply (xcb_connection_t *c /**< */,
617*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_cookie_t cookie /**< */,
618*0a6a1f1dSLionel Sambuc xcb_generic_error_t **e /**< */)
619*0a6a1f1dSLionel Sambuc {
620*0a6a1f1dSLionel Sambuc return (xcb_shm_create_segment_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
621*0a6a1f1dSLionel Sambuc }
622*0a6a1f1dSLionel Sambuc
623*0a6a1f1dSLionel Sambuc int *
xcb_shm_create_segment_reply_fds(xcb_connection_t * c,xcb_shm_create_segment_reply_t * reply)624*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_reply_fds (xcb_connection_t *c /**< */,
625*0a6a1f1dSLionel Sambuc xcb_shm_create_segment_reply_t *reply /**< */)
626*0a6a1f1dSLionel Sambuc {
627*0a6a1f1dSLionel Sambuc return xcb_get_reply_fds(c, reply, sizeof(xcb_shm_create_segment_reply_t) + 4 * reply->length);
628*0a6a1f1dSLionel Sambuc }
629*0a6a1f1dSLionel Sambuc
630