1971bb1a5SLionel Sambuc /*
2971bb1a5SLionel Sambuc * This file generated automatically from xfixes.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 "xfixes.h"
15971bb1a5SLionel Sambuc
16971bb1a5SLionel Sambuc #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17971bb1a5SLionel Sambuc #include "xproto.h"
18971bb1a5SLionel Sambuc #include "render.h"
19971bb1a5SLionel Sambuc #include "shape.h"
20971bb1a5SLionel Sambuc
21971bb1a5SLionel Sambuc xcb_extension_t xcb_xfixes_id = { "XFIXES", 0 };
22971bb1a5SLionel Sambuc
23971bb1a5SLionel Sambuc xcb_xfixes_query_version_cookie_t
xcb_xfixes_query_version(xcb_connection_t * c,uint32_t client_major_version,uint32_t client_minor_version)24971bb1a5SLionel Sambuc xcb_xfixes_query_version (xcb_connection_t *c /**< */,
25971bb1a5SLionel Sambuc uint32_t client_major_version /**< */,
26971bb1a5SLionel Sambuc uint32_t client_minor_version /**< */)
27971bb1a5SLionel Sambuc {
28971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
29971bb1a5SLionel Sambuc /* count */ 2,
30971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
31971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_QUERY_VERSION,
32971bb1a5SLionel Sambuc /* isvoid */ 0
33971bb1a5SLionel Sambuc };
34971bb1a5SLionel Sambuc
35971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
36971bb1a5SLionel Sambuc xcb_xfixes_query_version_cookie_t xcb_ret;
37971bb1a5SLionel Sambuc xcb_xfixes_query_version_request_t xcb_out;
38971bb1a5SLionel Sambuc
39971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
40971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
41971bb1a5SLionel Sambuc
42971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
43971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
44971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
45971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
46971bb1a5SLionel Sambuc
47971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
48971bb1a5SLionel Sambuc return xcb_ret;
49971bb1a5SLionel Sambuc }
50971bb1a5SLionel Sambuc
51971bb1a5SLionel Sambuc xcb_xfixes_query_version_cookie_t
xcb_xfixes_query_version_unchecked(xcb_connection_t * c,uint32_t client_major_version,uint32_t client_minor_version)52971bb1a5SLionel Sambuc xcb_xfixes_query_version_unchecked (xcb_connection_t *c /**< */,
53971bb1a5SLionel Sambuc uint32_t client_major_version /**< */,
54971bb1a5SLionel Sambuc uint32_t client_minor_version /**< */)
55971bb1a5SLionel Sambuc {
56971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
57971bb1a5SLionel Sambuc /* count */ 2,
58971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
59971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_QUERY_VERSION,
60971bb1a5SLionel Sambuc /* isvoid */ 0
61971bb1a5SLionel Sambuc };
62971bb1a5SLionel Sambuc
63971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
64971bb1a5SLionel Sambuc xcb_xfixes_query_version_cookie_t xcb_ret;
65971bb1a5SLionel Sambuc xcb_xfixes_query_version_request_t xcb_out;
66971bb1a5SLionel Sambuc
67971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
68971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
69971bb1a5SLionel Sambuc
70971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
71971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
72971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
73971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
74971bb1a5SLionel Sambuc
75971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
76971bb1a5SLionel Sambuc return xcb_ret;
77971bb1a5SLionel Sambuc }
78971bb1a5SLionel Sambuc
79971bb1a5SLionel Sambuc xcb_xfixes_query_version_reply_t *
xcb_xfixes_query_version_reply(xcb_connection_t * c,xcb_xfixes_query_version_cookie_t cookie,xcb_generic_error_t ** e)80971bb1a5SLionel Sambuc xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */,
81971bb1a5SLionel Sambuc xcb_xfixes_query_version_cookie_t cookie /**< */,
82971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
83971bb1a5SLionel Sambuc {
84971bb1a5SLionel Sambuc return (xcb_xfixes_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
85971bb1a5SLionel Sambuc }
86971bb1a5SLionel Sambuc
87971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_change_save_set_checked(xcb_connection_t * c,uint8_t mode,uint8_t target,uint8_t map,xcb_window_t window)88971bb1a5SLionel Sambuc xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */,
89971bb1a5SLionel Sambuc uint8_t mode /**< */,
90971bb1a5SLionel Sambuc uint8_t target /**< */,
91971bb1a5SLionel Sambuc uint8_t map /**< */,
92971bb1a5SLionel Sambuc xcb_window_t window /**< */)
93971bb1a5SLionel Sambuc {
94971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
95971bb1a5SLionel Sambuc /* count */ 2,
96971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
97971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET,
98971bb1a5SLionel Sambuc /* isvoid */ 1
99971bb1a5SLionel Sambuc };
100971bb1a5SLionel Sambuc
101971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
102971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
103971bb1a5SLionel Sambuc xcb_xfixes_change_save_set_request_t xcb_out;
104971bb1a5SLionel Sambuc
105971bb1a5SLionel Sambuc xcb_out.mode = mode;
106971bb1a5SLionel Sambuc xcb_out.target = target;
107971bb1a5SLionel Sambuc xcb_out.map = map;
108971bb1a5SLionel Sambuc xcb_out.pad0 = 0;
109971bb1a5SLionel Sambuc xcb_out.window = window;
110971bb1a5SLionel Sambuc
111971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
112971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
113971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
114971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
115971bb1a5SLionel Sambuc
116971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
117971bb1a5SLionel Sambuc return xcb_ret;
118971bb1a5SLionel Sambuc }
119971bb1a5SLionel Sambuc
120971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_change_save_set(xcb_connection_t * c,uint8_t mode,uint8_t target,uint8_t map,xcb_window_t window)121971bb1a5SLionel Sambuc xcb_xfixes_change_save_set (xcb_connection_t *c /**< */,
122971bb1a5SLionel Sambuc uint8_t mode /**< */,
123971bb1a5SLionel Sambuc uint8_t target /**< */,
124971bb1a5SLionel Sambuc uint8_t map /**< */,
125971bb1a5SLionel Sambuc xcb_window_t window /**< */)
126971bb1a5SLionel Sambuc {
127971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
128971bb1a5SLionel Sambuc /* count */ 2,
129971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
130971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET,
131971bb1a5SLionel Sambuc /* isvoid */ 1
132971bb1a5SLionel Sambuc };
133971bb1a5SLionel Sambuc
134971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
135971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
136971bb1a5SLionel Sambuc xcb_xfixes_change_save_set_request_t xcb_out;
137971bb1a5SLionel Sambuc
138971bb1a5SLionel Sambuc xcb_out.mode = mode;
139971bb1a5SLionel Sambuc xcb_out.target = target;
140971bb1a5SLionel Sambuc xcb_out.map = map;
141971bb1a5SLionel Sambuc xcb_out.pad0 = 0;
142971bb1a5SLionel Sambuc xcb_out.window = window;
143971bb1a5SLionel Sambuc
144971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
145971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
146971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
147971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
148971bb1a5SLionel Sambuc
149971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
150971bb1a5SLionel Sambuc return xcb_ret;
151971bb1a5SLionel Sambuc }
152971bb1a5SLionel Sambuc
153971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_select_selection_input_checked(xcb_connection_t * c,xcb_window_t window,xcb_atom_t selection,uint32_t event_mask)154971bb1a5SLionel Sambuc xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */,
155971bb1a5SLionel Sambuc xcb_window_t window /**< */,
156971bb1a5SLionel Sambuc xcb_atom_t selection /**< */,
157971bb1a5SLionel Sambuc uint32_t event_mask /**< */)
158971bb1a5SLionel Sambuc {
159971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
160971bb1a5SLionel Sambuc /* count */ 2,
161971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
162971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT,
163971bb1a5SLionel Sambuc /* isvoid */ 1
164971bb1a5SLionel Sambuc };
165971bb1a5SLionel Sambuc
166971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
167971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
168971bb1a5SLionel Sambuc xcb_xfixes_select_selection_input_request_t xcb_out;
169971bb1a5SLionel Sambuc
170971bb1a5SLionel Sambuc xcb_out.window = window;
171971bb1a5SLionel Sambuc xcb_out.selection = selection;
172971bb1a5SLionel Sambuc xcb_out.event_mask = event_mask;
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_xfixes_select_selection_input(xcb_connection_t * c,xcb_window_t window,xcb_atom_t selection,uint32_t event_mask)184971bb1a5SLionel Sambuc xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */,
185971bb1a5SLionel Sambuc xcb_window_t window /**< */,
186971bb1a5SLionel Sambuc xcb_atom_t selection /**< */,
187971bb1a5SLionel Sambuc uint32_t event_mask /**< */)
188971bb1a5SLionel Sambuc {
189971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
190971bb1a5SLionel Sambuc /* count */ 2,
191971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
192971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT,
193971bb1a5SLionel Sambuc /* isvoid */ 1
194971bb1a5SLionel Sambuc };
195971bb1a5SLionel Sambuc
196971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
197971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
198971bb1a5SLionel Sambuc xcb_xfixes_select_selection_input_request_t xcb_out;
199971bb1a5SLionel Sambuc
200971bb1a5SLionel Sambuc xcb_out.window = window;
201971bb1a5SLionel Sambuc xcb_out.selection = selection;
202971bb1a5SLionel Sambuc xcb_out.event_mask = event_mask;
203971bb1a5SLionel Sambuc
204971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
205971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
206971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
207971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
208971bb1a5SLionel Sambuc
209971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
210971bb1a5SLionel Sambuc return xcb_ret;
211971bb1a5SLionel Sambuc }
212971bb1a5SLionel Sambuc
213971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_select_cursor_input_checked(xcb_connection_t * c,xcb_window_t window,uint32_t event_mask)214971bb1a5SLionel Sambuc xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */,
215971bb1a5SLionel Sambuc xcb_window_t window /**< */,
216971bb1a5SLionel Sambuc uint32_t event_mask /**< */)
217971bb1a5SLionel Sambuc {
218971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
219971bb1a5SLionel Sambuc /* count */ 2,
220971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
221971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT,
222971bb1a5SLionel Sambuc /* isvoid */ 1
223971bb1a5SLionel Sambuc };
224971bb1a5SLionel Sambuc
225971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
226971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
227971bb1a5SLionel Sambuc xcb_xfixes_select_cursor_input_request_t xcb_out;
228971bb1a5SLionel Sambuc
229971bb1a5SLionel Sambuc xcb_out.window = window;
230971bb1a5SLionel Sambuc xcb_out.event_mask = event_mask;
231971bb1a5SLionel Sambuc
232971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
233971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
234971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
235971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
236971bb1a5SLionel Sambuc
237971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
238971bb1a5SLionel Sambuc return xcb_ret;
239971bb1a5SLionel Sambuc }
240971bb1a5SLionel Sambuc
241971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_select_cursor_input(xcb_connection_t * c,xcb_window_t window,uint32_t event_mask)242971bb1a5SLionel Sambuc xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */,
243971bb1a5SLionel Sambuc xcb_window_t window /**< */,
244971bb1a5SLionel Sambuc uint32_t event_mask /**< */)
245971bb1a5SLionel Sambuc {
246971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
247971bb1a5SLionel Sambuc /* count */ 2,
248971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
249971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT,
250971bb1a5SLionel Sambuc /* isvoid */ 1
251971bb1a5SLionel Sambuc };
252971bb1a5SLionel Sambuc
253971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
254971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
255971bb1a5SLionel Sambuc xcb_xfixes_select_cursor_input_request_t xcb_out;
256971bb1a5SLionel Sambuc
257971bb1a5SLionel Sambuc xcb_out.window = window;
258971bb1a5SLionel Sambuc xcb_out.event_mask = event_mask;
259971bb1a5SLionel Sambuc
260971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
261971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
262971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
263971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
264971bb1a5SLionel Sambuc
265971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
266971bb1a5SLionel Sambuc return xcb_ret;
267971bb1a5SLionel Sambuc }
268971bb1a5SLionel Sambuc
269971bb1a5SLionel Sambuc int
xcb_xfixes_get_cursor_image_sizeof(const void * _buffer)270971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_sizeof (const void *_buffer /**< */)
271971bb1a5SLionel Sambuc {
272971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
273971bb1a5SLionel Sambuc const xcb_xfixes_get_cursor_image_reply_t *_aux = (xcb_xfixes_get_cursor_image_reply_t *)_buffer;
274971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
275971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
276971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
277*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
278971bb1a5SLionel Sambuc
279971bb1a5SLionel Sambuc
280971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_reply_t);
281971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
282*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
283*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
284971bb1a5SLionel Sambuc /* cursor_image */
285971bb1a5SLionel Sambuc xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t);
286971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
287971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint32_t);
288971bb1a5SLionel Sambuc /* insert padding */
289971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
290971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
291971bb1a5SLionel Sambuc if (0 != xcb_pad) {
292971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
293971bb1a5SLionel Sambuc xcb_pad = 0;
294971bb1a5SLionel Sambuc }
295971bb1a5SLionel Sambuc xcb_block_len = 0;
296971bb1a5SLionel Sambuc
297971bb1a5SLionel Sambuc return xcb_buffer_len;
298971bb1a5SLionel Sambuc }
299971bb1a5SLionel Sambuc
300971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_cookie_t
xcb_xfixes_get_cursor_image(xcb_connection_t * c)301971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image (xcb_connection_t *c /**< */)
302971bb1a5SLionel Sambuc {
303971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
304971bb1a5SLionel Sambuc /* count */ 2,
305971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
306971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE,
307971bb1a5SLionel Sambuc /* isvoid */ 0
308971bb1a5SLionel Sambuc };
309971bb1a5SLionel Sambuc
310971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
311971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_cookie_t xcb_ret;
312971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_request_t xcb_out;
313971bb1a5SLionel Sambuc
314971bb1a5SLionel Sambuc
315971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
316971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
317971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
318971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
319971bb1a5SLionel Sambuc
320971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
321971bb1a5SLionel Sambuc return xcb_ret;
322971bb1a5SLionel Sambuc }
323971bb1a5SLionel Sambuc
324971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_cookie_t
xcb_xfixes_get_cursor_image_unchecked(xcb_connection_t * c)325971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c /**< */)
326971bb1a5SLionel Sambuc {
327971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
328971bb1a5SLionel Sambuc /* count */ 2,
329971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
330971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE,
331971bb1a5SLionel Sambuc /* isvoid */ 0
332971bb1a5SLionel Sambuc };
333971bb1a5SLionel Sambuc
334971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
335971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_cookie_t xcb_ret;
336971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_request_t xcb_out;
337971bb1a5SLionel Sambuc
338971bb1a5SLionel Sambuc
339971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
340971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
341971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
342971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
343971bb1a5SLionel Sambuc
344971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
345971bb1a5SLionel Sambuc return xcb_ret;
346971bb1a5SLionel Sambuc }
347971bb1a5SLionel Sambuc
348971bb1a5SLionel Sambuc uint32_t *
xcb_xfixes_get_cursor_image_cursor_image(const xcb_xfixes_get_cursor_image_reply_t * R)349971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R /**< */)
350971bb1a5SLionel Sambuc {
351971bb1a5SLionel Sambuc return (uint32_t *) (R + 1);
352971bb1a5SLionel Sambuc }
353971bb1a5SLionel Sambuc
354971bb1a5SLionel Sambuc int
xcb_xfixes_get_cursor_image_cursor_image_length(const xcb_xfixes_get_cursor_image_reply_t * R)355971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R /**< */)
356971bb1a5SLionel Sambuc {
357971bb1a5SLionel Sambuc return (R->width * R->height);
358971bb1a5SLionel Sambuc }
359971bb1a5SLionel Sambuc
360971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xfixes_get_cursor_image_cursor_image_end(const xcb_xfixes_get_cursor_image_reply_t * R)361971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_reply_t *R /**< */)
362971bb1a5SLionel Sambuc {
363971bb1a5SLionel Sambuc xcb_generic_iterator_t i;
364971bb1a5SLionel Sambuc i.data = ((uint32_t *) (R + 1)) + ((R->width * R->height));
365971bb1a5SLionel Sambuc i.rem = 0;
366971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
367971bb1a5SLionel Sambuc return i;
368971bb1a5SLionel Sambuc }
369971bb1a5SLionel Sambuc
370971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_reply_t *
xcb_xfixes_get_cursor_image_reply(xcb_connection_t * c,xcb_xfixes_get_cursor_image_cookie_t cookie,xcb_generic_error_t ** e)371971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c /**< */,
372971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_cookie_t cookie /**< */,
373971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
374971bb1a5SLionel Sambuc {
375971bb1a5SLionel Sambuc return (xcb_xfixes_get_cursor_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
376971bb1a5SLionel Sambuc }
377971bb1a5SLionel Sambuc
378971bb1a5SLionel Sambuc void
xcb_xfixes_region_next(xcb_xfixes_region_iterator_t * i)379971bb1a5SLionel Sambuc xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */)
380971bb1a5SLionel Sambuc {
381971bb1a5SLionel Sambuc --i->rem;
382971bb1a5SLionel Sambuc ++i->data;
383971bb1a5SLionel Sambuc i->index += sizeof(xcb_xfixes_region_t);
384971bb1a5SLionel Sambuc }
385971bb1a5SLionel Sambuc
386971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xfixes_region_end(xcb_xfixes_region_iterator_t i)387971bb1a5SLionel Sambuc xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */)
388971bb1a5SLionel Sambuc {
389971bb1a5SLionel Sambuc xcb_generic_iterator_t ret;
390971bb1a5SLionel Sambuc ret.data = i.data + i.rem;
391971bb1a5SLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
392971bb1a5SLionel Sambuc ret.rem = 0;
393971bb1a5SLionel Sambuc return ret;
394971bb1a5SLionel Sambuc }
395971bb1a5SLionel Sambuc
396971bb1a5SLionel Sambuc int
xcb_xfixes_create_region_sizeof(const void * _buffer,uint32_t rectangles_len)397971bb1a5SLionel Sambuc xcb_xfixes_create_region_sizeof (const void *_buffer /**< */,
398971bb1a5SLionel Sambuc uint32_t rectangles_len /**< */)
399971bb1a5SLionel Sambuc {
400971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
401971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
402971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
403971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
404*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
405971bb1a5SLionel Sambuc
406971bb1a5SLionel Sambuc
407971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_xfixes_create_region_request_t);
408971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
409*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
410*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
411971bb1a5SLionel Sambuc /* rectangles */
412971bb1a5SLionel Sambuc xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
413971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
414971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_rectangle_t);
415971bb1a5SLionel Sambuc /* insert padding */
416971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
417971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
418971bb1a5SLionel Sambuc if (0 != xcb_pad) {
419971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
420971bb1a5SLionel Sambuc xcb_pad = 0;
421971bb1a5SLionel Sambuc }
422971bb1a5SLionel Sambuc xcb_block_len = 0;
423971bb1a5SLionel Sambuc
424971bb1a5SLionel Sambuc return xcb_buffer_len;
425971bb1a5SLionel Sambuc }
426971bb1a5SLionel Sambuc
427971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region_checked(xcb_connection_t * c,xcb_xfixes_region_t region,uint32_t rectangles_len,const xcb_rectangle_t * rectangles)428971bb1a5SLionel Sambuc xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */,
429971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
430971bb1a5SLionel Sambuc uint32_t rectangles_len /**< */,
431971bb1a5SLionel Sambuc const xcb_rectangle_t *rectangles /**< */)
432971bb1a5SLionel Sambuc {
433971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
434971bb1a5SLionel Sambuc /* count */ 4,
435971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
436971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION,
437971bb1a5SLionel Sambuc /* isvoid */ 1
438971bb1a5SLionel Sambuc };
439971bb1a5SLionel Sambuc
440971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
441971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
442971bb1a5SLionel Sambuc xcb_xfixes_create_region_request_t xcb_out;
443971bb1a5SLionel Sambuc
444971bb1a5SLionel Sambuc xcb_out.region = region;
445971bb1a5SLionel Sambuc
446971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
447971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
448971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
449971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
450971bb1a5SLionel Sambuc /* xcb_rectangle_t rectangles */
451971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) rectangles;
452971bb1a5SLionel Sambuc xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
453971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
454971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
455971bb1a5SLionel Sambuc
456971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
457971bb1a5SLionel Sambuc return xcb_ret;
458971bb1a5SLionel Sambuc }
459971bb1a5SLionel Sambuc
460971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region(xcb_connection_t * c,xcb_xfixes_region_t region,uint32_t rectangles_len,const xcb_rectangle_t * rectangles)461971bb1a5SLionel Sambuc xcb_xfixes_create_region (xcb_connection_t *c /**< */,
462971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
463971bb1a5SLionel Sambuc uint32_t rectangles_len /**< */,
464971bb1a5SLionel Sambuc const xcb_rectangle_t *rectangles /**< */)
465971bb1a5SLionel Sambuc {
466971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
467971bb1a5SLionel Sambuc /* count */ 4,
468971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
469971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION,
470971bb1a5SLionel Sambuc /* isvoid */ 1
471971bb1a5SLionel Sambuc };
472971bb1a5SLionel Sambuc
473971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
474971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
475971bb1a5SLionel Sambuc xcb_xfixes_create_region_request_t xcb_out;
476971bb1a5SLionel Sambuc
477971bb1a5SLionel Sambuc xcb_out.region = region;
478971bb1a5SLionel Sambuc
479971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
480971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
481971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
482971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
483971bb1a5SLionel Sambuc /* xcb_rectangle_t rectangles */
484971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) rectangles;
485971bb1a5SLionel Sambuc xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
486971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
487971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
488971bb1a5SLionel Sambuc
489971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
490971bb1a5SLionel Sambuc return xcb_ret;
491971bb1a5SLionel Sambuc }
492971bb1a5SLionel Sambuc
493971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region_from_bitmap_checked(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_pixmap_t bitmap)494971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */,
495971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
496971bb1a5SLionel Sambuc xcb_pixmap_t bitmap /**< */)
497971bb1a5SLionel Sambuc {
498971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
499971bb1a5SLionel Sambuc /* count */ 2,
500971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
501971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP,
502971bb1a5SLionel Sambuc /* isvoid */ 1
503971bb1a5SLionel Sambuc };
504971bb1a5SLionel Sambuc
505971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
506971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
507971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_bitmap_request_t xcb_out;
508971bb1a5SLionel Sambuc
509971bb1a5SLionel Sambuc xcb_out.region = region;
510971bb1a5SLionel Sambuc xcb_out.bitmap = bitmap;
511971bb1a5SLionel Sambuc
512971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
513971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
514971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
515971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
516971bb1a5SLionel Sambuc
517971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
518971bb1a5SLionel Sambuc return xcb_ret;
519971bb1a5SLionel Sambuc }
520971bb1a5SLionel Sambuc
521971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region_from_bitmap(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_pixmap_t bitmap)522971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */,
523971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
524971bb1a5SLionel Sambuc xcb_pixmap_t bitmap /**< */)
525971bb1a5SLionel Sambuc {
526971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
527971bb1a5SLionel Sambuc /* count */ 2,
528971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
529971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP,
530971bb1a5SLionel Sambuc /* isvoid */ 1
531971bb1a5SLionel Sambuc };
532971bb1a5SLionel Sambuc
533971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
534971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
535971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_bitmap_request_t xcb_out;
536971bb1a5SLionel Sambuc
537971bb1a5SLionel Sambuc xcb_out.region = region;
538971bb1a5SLionel Sambuc xcb_out.bitmap = bitmap;
539971bb1a5SLionel Sambuc
540971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
541971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
542971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
543971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
544971bb1a5SLionel Sambuc
545971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
546971bb1a5SLionel Sambuc return xcb_ret;
547971bb1a5SLionel Sambuc }
548971bb1a5SLionel Sambuc
549971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region_from_window_checked(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_window_t window,xcb_shape_kind_t kind)550971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */,
551971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
552971bb1a5SLionel Sambuc xcb_window_t window /**< */,
553971bb1a5SLionel Sambuc xcb_shape_kind_t kind /**< */)
554971bb1a5SLionel Sambuc {
555971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
556971bb1a5SLionel Sambuc /* count */ 2,
557971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
558971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW,
559971bb1a5SLionel Sambuc /* isvoid */ 1
560971bb1a5SLionel Sambuc };
561971bb1a5SLionel Sambuc
562971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
563971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
564971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_window_request_t xcb_out;
565971bb1a5SLionel Sambuc
566971bb1a5SLionel Sambuc xcb_out.region = region;
567971bb1a5SLionel Sambuc xcb_out.window = window;
568971bb1a5SLionel Sambuc xcb_out.kind = kind;
569971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
570971bb1a5SLionel Sambuc
571971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
572971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
573971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
574971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
575971bb1a5SLionel Sambuc
576971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
577971bb1a5SLionel Sambuc return xcb_ret;
578971bb1a5SLionel Sambuc }
579971bb1a5SLionel Sambuc
580971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region_from_window(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_window_t window,xcb_shape_kind_t kind)581971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */,
582971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
583971bb1a5SLionel Sambuc xcb_window_t window /**< */,
584971bb1a5SLionel Sambuc xcb_shape_kind_t kind /**< */)
585971bb1a5SLionel Sambuc {
586971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
587971bb1a5SLionel Sambuc /* count */ 2,
588971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
589971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW,
590971bb1a5SLionel Sambuc /* isvoid */ 1
591971bb1a5SLionel Sambuc };
592971bb1a5SLionel Sambuc
593971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
594971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
595971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_window_request_t xcb_out;
596971bb1a5SLionel Sambuc
597971bb1a5SLionel Sambuc xcb_out.region = region;
598971bb1a5SLionel Sambuc xcb_out.window = window;
599971bb1a5SLionel Sambuc xcb_out.kind = kind;
600971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
601971bb1a5SLionel Sambuc
602971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
603971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
604971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
605971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
606971bb1a5SLionel Sambuc
607971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
608971bb1a5SLionel Sambuc return xcb_ret;
609971bb1a5SLionel Sambuc }
610971bb1a5SLionel Sambuc
611971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region_from_gc_checked(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_gcontext_t gc)612971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */,
613971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
614971bb1a5SLionel Sambuc xcb_gcontext_t gc /**< */)
615971bb1a5SLionel Sambuc {
616971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
617971bb1a5SLionel Sambuc /* count */ 2,
618971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
619971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC,
620971bb1a5SLionel Sambuc /* isvoid */ 1
621971bb1a5SLionel Sambuc };
622971bb1a5SLionel Sambuc
623971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
624971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
625971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_gc_request_t xcb_out;
626971bb1a5SLionel Sambuc
627971bb1a5SLionel Sambuc xcb_out.region = region;
628971bb1a5SLionel Sambuc xcb_out.gc = gc;
629971bb1a5SLionel Sambuc
630971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
631971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
632971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
633971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
634971bb1a5SLionel Sambuc
635971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
636971bb1a5SLionel Sambuc return xcb_ret;
637971bb1a5SLionel Sambuc }
638971bb1a5SLionel Sambuc
639971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region_from_gc(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_gcontext_t gc)640971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */,
641971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
642971bb1a5SLionel Sambuc xcb_gcontext_t gc /**< */)
643971bb1a5SLionel Sambuc {
644971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
645971bb1a5SLionel Sambuc /* count */ 2,
646971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
647971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC,
648971bb1a5SLionel Sambuc /* isvoid */ 1
649971bb1a5SLionel Sambuc };
650971bb1a5SLionel Sambuc
651971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
652971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
653971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_gc_request_t xcb_out;
654971bb1a5SLionel Sambuc
655971bb1a5SLionel Sambuc xcb_out.region = region;
656971bb1a5SLionel Sambuc xcb_out.gc = gc;
657971bb1a5SLionel Sambuc
658971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
659971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
660971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
661971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
662971bb1a5SLionel Sambuc
663971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
664971bb1a5SLionel Sambuc return xcb_ret;
665971bb1a5SLionel Sambuc }
666971bb1a5SLionel Sambuc
667971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region_from_picture_checked(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_render_picture_t picture)668971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */,
669971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
670971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */)
671971bb1a5SLionel Sambuc {
672971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
673971bb1a5SLionel Sambuc /* count */ 2,
674971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
675971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE,
676971bb1a5SLionel Sambuc /* isvoid */ 1
677971bb1a5SLionel Sambuc };
678971bb1a5SLionel Sambuc
679971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
680971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
681971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_picture_request_t xcb_out;
682971bb1a5SLionel Sambuc
683971bb1a5SLionel Sambuc xcb_out.region = region;
684971bb1a5SLionel Sambuc xcb_out.picture = picture;
685971bb1a5SLionel Sambuc
686971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
687971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
688971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
689971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
690971bb1a5SLionel Sambuc
691971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
692971bb1a5SLionel Sambuc return xcb_ret;
693971bb1a5SLionel Sambuc }
694971bb1a5SLionel Sambuc
695971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_region_from_picture(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_render_picture_t picture)696971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */,
697971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
698971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */)
699971bb1a5SLionel Sambuc {
700971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
701971bb1a5SLionel Sambuc /* count */ 2,
702971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
703971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE,
704971bb1a5SLionel Sambuc /* isvoid */ 1
705971bb1a5SLionel Sambuc };
706971bb1a5SLionel Sambuc
707971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
708971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
709971bb1a5SLionel Sambuc xcb_xfixes_create_region_from_picture_request_t xcb_out;
710971bb1a5SLionel Sambuc
711971bb1a5SLionel Sambuc xcb_out.region = region;
712971bb1a5SLionel Sambuc xcb_out.picture = picture;
713971bb1a5SLionel Sambuc
714971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
715971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
716971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
717971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
718971bb1a5SLionel Sambuc
719971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
720971bb1a5SLionel Sambuc return xcb_ret;
721971bb1a5SLionel Sambuc }
722971bb1a5SLionel Sambuc
723971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_destroy_region_checked(xcb_connection_t * c,xcb_xfixes_region_t region)724971bb1a5SLionel Sambuc xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */,
725971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */)
726971bb1a5SLionel Sambuc {
727971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
728971bb1a5SLionel Sambuc /* count */ 2,
729971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
730971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_DESTROY_REGION,
731971bb1a5SLionel Sambuc /* isvoid */ 1
732971bb1a5SLionel Sambuc };
733971bb1a5SLionel Sambuc
734971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
735971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
736971bb1a5SLionel Sambuc xcb_xfixes_destroy_region_request_t xcb_out;
737971bb1a5SLionel Sambuc
738971bb1a5SLionel Sambuc xcb_out.region = region;
739971bb1a5SLionel Sambuc
740971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
741971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
742971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
743971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
744971bb1a5SLionel Sambuc
745971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
746971bb1a5SLionel Sambuc return xcb_ret;
747971bb1a5SLionel Sambuc }
748971bb1a5SLionel Sambuc
749971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_destroy_region(xcb_connection_t * c,xcb_xfixes_region_t region)750971bb1a5SLionel Sambuc xcb_xfixes_destroy_region (xcb_connection_t *c /**< */,
751971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */)
752971bb1a5SLionel Sambuc {
753971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
754971bb1a5SLionel Sambuc /* count */ 2,
755971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
756971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_DESTROY_REGION,
757971bb1a5SLionel Sambuc /* isvoid */ 1
758971bb1a5SLionel Sambuc };
759971bb1a5SLionel Sambuc
760971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
761971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
762971bb1a5SLionel Sambuc xcb_xfixes_destroy_region_request_t xcb_out;
763971bb1a5SLionel Sambuc
764971bb1a5SLionel Sambuc xcb_out.region = region;
765971bb1a5SLionel Sambuc
766971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
767971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
768971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
769971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
770971bb1a5SLionel Sambuc
771971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
772971bb1a5SLionel Sambuc return xcb_ret;
773971bb1a5SLionel Sambuc }
774971bb1a5SLionel Sambuc
775971bb1a5SLionel Sambuc int
xcb_xfixes_set_region_sizeof(const void * _buffer,uint32_t rectangles_len)776971bb1a5SLionel Sambuc xcb_xfixes_set_region_sizeof (const void *_buffer /**< */,
777971bb1a5SLionel Sambuc uint32_t rectangles_len /**< */)
778971bb1a5SLionel Sambuc {
779971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
780971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
781971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
782971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
783*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
784971bb1a5SLionel Sambuc
785971bb1a5SLionel Sambuc
786971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_xfixes_set_region_request_t);
787971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
788*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
789*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
790971bb1a5SLionel Sambuc /* rectangles */
791971bb1a5SLionel Sambuc xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
792971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
793971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_rectangle_t);
794971bb1a5SLionel Sambuc /* insert padding */
795971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
796971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
797971bb1a5SLionel Sambuc if (0 != xcb_pad) {
798971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
799971bb1a5SLionel Sambuc xcb_pad = 0;
800971bb1a5SLionel Sambuc }
801971bb1a5SLionel Sambuc xcb_block_len = 0;
802971bb1a5SLionel Sambuc
803971bb1a5SLionel Sambuc return xcb_buffer_len;
804971bb1a5SLionel Sambuc }
805971bb1a5SLionel Sambuc
806971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_region_checked(xcb_connection_t * c,xcb_xfixes_region_t region,uint32_t rectangles_len,const xcb_rectangle_t * rectangles)807971bb1a5SLionel Sambuc xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */,
808971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
809971bb1a5SLionel Sambuc uint32_t rectangles_len /**< */,
810971bb1a5SLionel Sambuc const xcb_rectangle_t *rectangles /**< */)
811971bb1a5SLionel Sambuc {
812971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
813971bb1a5SLionel Sambuc /* count */ 4,
814971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
815971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_REGION,
816971bb1a5SLionel Sambuc /* isvoid */ 1
817971bb1a5SLionel Sambuc };
818971bb1a5SLionel Sambuc
819971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
820971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
821971bb1a5SLionel Sambuc xcb_xfixes_set_region_request_t xcb_out;
822971bb1a5SLionel Sambuc
823971bb1a5SLionel Sambuc xcb_out.region = region;
824971bb1a5SLionel Sambuc
825971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
826971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
827971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
828971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
829971bb1a5SLionel Sambuc /* xcb_rectangle_t rectangles */
830971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) rectangles;
831971bb1a5SLionel Sambuc xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
832971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
833971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
834971bb1a5SLionel Sambuc
835971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
836971bb1a5SLionel Sambuc return xcb_ret;
837971bb1a5SLionel Sambuc }
838971bb1a5SLionel Sambuc
839971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_region(xcb_connection_t * c,xcb_xfixes_region_t region,uint32_t rectangles_len,const xcb_rectangle_t * rectangles)840971bb1a5SLionel Sambuc xcb_xfixes_set_region (xcb_connection_t *c /**< */,
841971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
842971bb1a5SLionel Sambuc uint32_t rectangles_len /**< */,
843971bb1a5SLionel Sambuc const xcb_rectangle_t *rectangles /**< */)
844971bb1a5SLionel Sambuc {
845971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
846971bb1a5SLionel Sambuc /* count */ 4,
847971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
848971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_REGION,
849971bb1a5SLionel Sambuc /* isvoid */ 1
850971bb1a5SLionel Sambuc };
851971bb1a5SLionel Sambuc
852971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
853971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
854971bb1a5SLionel Sambuc xcb_xfixes_set_region_request_t xcb_out;
855971bb1a5SLionel Sambuc
856971bb1a5SLionel Sambuc xcb_out.region = region;
857971bb1a5SLionel Sambuc
858971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
859971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
860971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
861971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
862971bb1a5SLionel Sambuc /* xcb_rectangle_t rectangles */
863971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) rectangles;
864971bb1a5SLionel Sambuc xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
865971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
866971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
867971bb1a5SLionel Sambuc
868971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
869971bb1a5SLionel Sambuc return xcb_ret;
870971bb1a5SLionel Sambuc }
871971bb1a5SLionel Sambuc
872971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_copy_region_checked(xcb_connection_t * c,xcb_xfixes_region_t source,xcb_xfixes_region_t destination)873971bb1a5SLionel Sambuc xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */,
874971bb1a5SLionel Sambuc xcb_xfixes_region_t source /**< */,
875971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
876971bb1a5SLionel Sambuc {
877971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
878971bb1a5SLionel Sambuc /* count */ 2,
879971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
880971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_COPY_REGION,
881971bb1a5SLionel Sambuc /* isvoid */ 1
882971bb1a5SLionel Sambuc };
883971bb1a5SLionel Sambuc
884971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
885971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
886971bb1a5SLionel Sambuc xcb_xfixes_copy_region_request_t xcb_out;
887971bb1a5SLionel Sambuc
888971bb1a5SLionel Sambuc xcb_out.source = source;
889971bb1a5SLionel Sambuc xcb_out.destination = destination;
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
896971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
897971bb1a5SLionel Sambuc return xcb_ret;
898971bb1a5SLionel Sambuc }
899971bb1a5SLionel Sambuc
900971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_copy_region(xcb_connection_t * c,xcb_xfixes_region_t source,xcb_xfixes_region_t destination)901971bb1a5SLionel Sambuc xcb_xfixes_copy_region (xcb_connection_t *c /**< */,
902971bb1a5SLionel Sambuc xcb_xfixes_region_t source /**< */,
903971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
904971bb1a5SLionel Sambuc {
905971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
906971bb1a5SLionel Sambuc /* count */ 2,
907971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
908971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_COPY_REGION,
909971bb1a5SLionel Sambuc /* isvoid */ 1
910971bb1a5SLionel Sambuc };
911971bb1a5SLionel Sambuc
912971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
913971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
914971bb1a5SLionel Sambuc xcb_xfixes_copy_region_request_t xcb_out;
915971bb1a5SLionel Sambuc
916971bb1a5SLionel Sambuc xcb_out.source = source;
917971bb1a5SLionel Sambuc xcb_out.destination = destination;
918971bb1a5SLionel Sambuc
919971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
920971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
921971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
922971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
923971bb1a5SLionel Sambuc
924971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
925971bb1a5SLionel Sambuc return xcb_ret;
926971bb1a5SLionel Sambuc }
927971bb1a5SLionel Sambuc
928971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_union_region_checked(xcb_connection_t * c,xcb_xfixes_region_t source1,xcb_xfixes_region_t source2,xcb_xfixes_region_t destination)929971bb1a5SLionel Sambuc xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */,
930971bb1a5SLionel Sambuc xcb_xfixes_region_t source1 /**< */,
931971bb1a5SLionel Sambuc xcb_xfixes_region_t source2 /**< */,
932971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
933971bb1a5SLionel Sambuc {
934971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
935971bb1a5SLionel Sambuc /* count */ 2,
936971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
937971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_UNION_REGION,
938971bb1a5SLionel Sambuc /* isvoid */ 1
939971bb1a5SLionel Sambuc };
940971bb1a5SLionel Sambuc
941971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
942971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
943971bb1a5SLionel Sambuc xcb_xfixes_union_region_request_t xcb_out;
944971bb1a5SLionel Sambuc
945971bb1a5SLionel Sambuc xcb_out.source1 = source1;
946971bb1a5SLionel Sambuc xcb_out.source2 = source2;
947971bb1a5SLionel Sambuc xcb_out.destination = destination;
948971bb1a5SLionel Sambuc
949971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
950971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
951971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
952971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
953971bb1a5SLionel Sambuc
954971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
955971bb1a5SLionel Sambuc return xcb_ret;
956971bb1a5SLionel Sambuc }
957971bb1a5SLionel Sambuc
958971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_union_region(xcb_connection_t * c,xcb_xfixes_region_t source1,xcb_xfixes_region_t source2,xcb_xfixes_region_t destination)959971bb1a5SLionel Sambuc xcb_xfixes_union_region (xcb_connection_t *c /**< */,
960971bb1a5SLionel Sambuc xcb_xfixes_region_t source1 /**< */,
961971bb1a5SLionel Sambuc xcb_xfixes_region_t source2 /**< */,
962971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
963971bb1a5SLionel Sambuc {
964971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
965971bb1a5SLionel Sambuc /* count */ 2,
966971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
967971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_UNION_REGION,
968971bb1a5SLionel Sambuc /* isvoid */ 1
969971bb1a5SLionel Sambuc };
970971bb1a5SLionel Sambuc
971971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
972971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
973971bb1a5SLionel Sambuc xcb_xfixes_union_region_request_t xcb_out;
974971bb1a5SLionel Sambuc
975971bb1a5SLionel Sambuc xcb_out.source1 = source1;
976971bb1a5SLionel Sambuc xcb_out.source2 = source2;
977971bb1a5SLionel Sambuc xcb_out.destination = destination;
978971bb1a5SLionel Sambuc
979971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
980971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
981971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
982971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
983971bb1a5SLionel Sambuc
984971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
985971bb1a5SLionel Sambuc return xcb_ret;
986971bb1a5SLionel Sambuc }
987971bb1a5SLionel Sambuc
988971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_intersect_region_checked(xcb_connection_t * c,xcb_xfixes_region_t source1,xcb_xfixes_region_t source2,xcb_xfixes_region_t destination)989971bb1a5SLionel Sambuc xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */,
990971bb1a5SLionel Sambuc xcb_xfixes_region_t source1 /**< */,
991971bb1a5SLionel Sambuc xcb_xfixes_region_t source2 /**< */,
992971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
993971bb1a5SLionel Sambuc {
994971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
995971bb1a5SLionel Sambuc /* count */ 2,
996971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
997971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_INTERSECT_REGION,
998971bb1a5SLionel Sambuc /* isvoid */ 1
999971bb1a5SLionel Sambuc };
1000971bb1a5SLionel Sambuc
1001971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1002971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1003971bb1a5SLionel Sambuc xcb_xfixes_intersect_region_request_t xcb_out;
1004971bb1a5SLionel Sambuc
1005971bb1a5SLionel Sambuc xcb_out.source1 = source1;
1006971bb1a5SLionel Sambuc xcb_out.source2 = source2;
1007971bb1a5SLionel Sambuc xcb_out.destination = destination;
1008971bb1a5SLionel Sambuc
1009971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1010971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1011971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1012971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1013971bb1a5SLionel Sambuc
1014971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1015971bb1a5SLionel Sambuc return xcb_ret;
1016971bb1a5SLionel Sambuc }
1017971bb1a5SLionel Sambuc
1018971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_intersect_region(xcb_connection_t * c,xcb_xfixes_region_t source1,xcb_xfixes_region_t source2,xcb_xfixes_region_t destination)1019971bb1a5SLionel Sambuc xcb_xfixes_intersect_region (xcb_connection_t *c /**< */,
1020971bb1a5SLionel Sambuc xcb_xfixes_region_t source1 /**< */,
1021971bb1a5SLionel Sambuc xcb_xfixes_region_t source2 /**< */,
1022971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
1023971bb1a5SLionel Sambuc {
1024971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1025971bb1a5SLionel Sambuc /* count */ 2,
1026971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1027971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_INTERSECT_REGION,
1028971bb1a5SLionel Sambuc /* isvoid */ 1
1029971bb1a5SLionel Sambuc };
1030971bb1a5SLionel Sambuc
1031971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1032971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1033971bb1a5SLionel Sambuc xcb_xfixes_intersect_region_request_t xcb_out;
1034971bb1a5SLionel Sambuc
1035971bb1a5SLionel Sambuc xcb_out.source1 = source1;
1036971bb1a5SLionel Sambuc xcb_out.source2 = source2;
1037971bb1a5SLionel Sambuc xcb_out.destination = destination;
1038971bb1a5SLionel Sambuc
1039971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1040971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1041971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1042971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1043971bb1a5SLionel Sambuc
1044971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1045971bb1a5SLionel Sambuc return xcb_ret;
1046971bb1a5SLionel Sambuc }
1047971bb1a5SLionel Sambuc
1048971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_subtract_region_checked(xcb_connection_t * c,xcb_xfixes_region_t source1,xcb_xfixes_region_t source2,xcb_xfixes_region_t destination)1049971bb1a5SLionel Sambuc xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */,
1050971bb1a5SLionel Sambuc xcb_xfixes_region_t source1 /**< */,
1051971bb1a5SLionel Sambuc xcb_xfixes_region_t source2 /**< */,
1052971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
1053971bb1a5SLionel Sambuc {
1054971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1055971bb1a5SLionel Sambuc /* count */ 2,
1056971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1057971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SUBTRACT_REGION,
1058971bb1a5SLionel Sambuc /* isvoid */ 1
1059971bb1a5SLionel Sambuc };
1060971bb1a5SLionel Sambuc
1061971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1062971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1063971bb1a5SLionel Sambuc xcb_xfixes_subtract_region_request_t xcb_out;
1064971bb1a5SLionel Sambuc
1065971bb1a5SLionel Sambuc xcb_out.source1 = source1;
1066971bb1a5SLionel Sambuc xcb_out.source2 = source2;
1067971bb1a5SLionel Sambuc xcb_out.destination = destination;
1068971bb1a5SLionel Sambuc
1069971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1070971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1071971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1072971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1073971bb1a5SLionel Sambuc
1074971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1075971bb1a5SLionel Sambuc return xcb_ret;
1076971bb1a5SLionel Sambuc }
1077971bb1a5SLionel Sambuc
1078971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_subtract_region(xcb_connection_t * c,xcb_xfixes_region_t source1,xcb_xfixes_region_t source2,xcb_xfixes_region_t destination)1079971bb1a5SLionel Sambuc xcb_xfixes_subtract_region (xcb_connection_t *c /**< */,
1080971bb1a5SLionel Sambuc xcb_xfixes_region_t source1 /**< */,
1081971bb1a5SLionel Sambuc xcb_xfixes_region_t source2 /**< */,
1082971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
1083971bb1a5SLionel Sambuc {
1084971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1085971bb1a5SLionel Sambuc /* count */ 2,
1086971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1087971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SUBTRACT_REGION,
1088971bb1a5SLionel Sambuc /* isvoid */ 1
1089971bb1a5SLionel Sambuc };
1090971bb1a5SLionel Sambuc
1091971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1092971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1093971bb1a5SLionel Sambuc xcb_xfixes_subtract_region_request_t xcb_out;
1094971bb1a5SLionel Sambuc
1095971bb1a5SLionel Sambuc xcb_out.source1 = source1;
1096971bb1a5SLionel Sambuc xcb_out.source2 = source2;
1097971bb1a5SLionel Sambuc xcb_out.destination = destination;
1098971bb1a5SLionel Sambuc
1099971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1100971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1101971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1102971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1103971bb1a5SLionel Sambuc
1104971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1105971bb1a5SLionel Sambuc return xcb_ret;
1106971bb1a5SLionel Sambuc }
1107971bb1a5SLionel Sambuc
1108971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_invert_region_checked(xcb_connection_t * c,xcb_xfixes_region_t source,xcb_rectangle_t bounds,xcb_xfixes_region_t destination)1109971bb1a5SLionel Sambuc xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */,
1110971bb1a5SLionel Sambuc xcb_xfixes_region_t source /**< */,
1111971bb1a5SLionel Sambuc xcb_rectangle_t bounds /**< */,
1112971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
1113971bb1a5SLionel Sambuc {
1114971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1115971bb1a5SLionel Sambuc /* count */ 2,
1116971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1117971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_INVERT_REGION,
1118971bb1a5SLionel Sambuc /* isvoid */ 1
1119971bb1a5SLionel Sambuc };
1120971bb1a5SLionel Sambuc
1121971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1122971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1123971bb1a5SLionel Sambuc xcb_xfixes_invert_region_request_t xcb_out;
1124971bb1a5SLionel Sambuc
1125971bb1a5SLionel Sambuc xcb_out.source = source;
1126971bb1a5SLionel Sambuc xcb_out.bounds = bounds;
1127971bb1a5SLionel Sambuc xcb_out.destination = destination;
1128971bb1a5SLionel Sambuc
1129971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1130971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1131971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1132971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1133971bb1a5SLionel Sambuc
1134971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1135971bb1a5SLionel Sambuc return xcb_ret;
1136971bb1a5SLionel Sambuc }
1137971bb1a5SLionel Sambuc
1138971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_invert_region(xcb_connection_t * c,xcb_xfixes_region_t source,xcb_rectangle_t bounds,xcb_xfixes_region_t destination)1139971bb1a5SLionel Sambuc xcb_xfixes_invert_region (xcb_connection_t *c /**< */,
1140971bb1a5SLionel Sambuc xcb_xfixes_region_t source /**< */,
1141971bb1a5SLionel Sambuc xcb_rectangle_t bounds /**< */,
1142971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
1143971bb1a5SLionel Sambuc {
1144971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1145971bb1a5SLionel Sambuc /* count */ 2,
1146971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1147971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_INVERT_REGION,
1148971bb1a5SLionel Sambuc /* isvoid */ 1
1149971bb1a5SLionel Sambuc };
1150971bb1a5SLionel Sambuc
1151971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1152971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1153971bb1a5SLionel Sambuc xcb_xfixes_invert_region_request_t xcb_out;
1154971bb1a5SLionel Sambuc
1155971bb1a5SLionel Sambuc xcb_out.source = source;
1156971bb1a5SLionel Sambuc xcb_out.bounds = bounds;
1157971bb1a5SLionel Sambuc xcb_out.destination = destination;
1158971bb1a5SLionel Sambuc
1159971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1160971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1161971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1162971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1163971bb1a5SLionel Sambuc
1164971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1165971bb1a5SLionel Sambuc return xcb_ret;
1166971bb1a5SLionel Sambuc }
1167971bb1a5SLionel Sambuc
1168971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_translate_region_checked(xcb_connection_t * c,xcb_xfixes_region_t region,int16_t dx,int16_t dy)1169971bb1a5SLionel Sambuc xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */,
1170971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
1171971bb1a5SLionel Sambuc int16_t dx /**< */,
1172971bb1a5SLionel Sambuc int16_t dy /**< */)
1173971bb1a5SLionel Sambuc {
1174971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1175971bb1a5SLionel Sambuc /* count */ 2,
1176971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1177971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_TRANSLATE_REGION,
1178971bb1a5SLionel Sambuc /* isvoid */ 1
1179971bb1a5SLionel Sambuc };
1180971bb1a5SLionel Sambuc
1181971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1182971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1183971bb1a5SLionel Sambuc xcb_xfixes_translate_region_request_t xcb_out;
1184971bb1a5SLionel Sambuc
1185971bb1a5SLionel Sambuc xcb_out.region = region;
1186971bb1a5SLionel Sambuc xcb_out.dx = dx;
1187971bb1a5SLionel Sambuc xcb_out.dy = dy;
1188971bb1a5SLionel Sambuc
1189971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1190971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1191971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1192971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1193971bb1a5SLionel Sambuc
1194971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1195971bb1a5SLionel Sambuc return xcb_ret;
1196971bb1a5SLionel Sambuc }
1197971bb1a5SLionel Sambuc
1198971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_translate_region(xcb_connection_t * c,xcb_xfixes_region_t region,int16_t dx,int16_t dy)1199971bb1a5SLionel Sambuc xcb_xfixes_translate_region (xcb_connection_t *c /**< */,
1200971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
1201971bb1a5SLionel Sambuc int16_t dx /**< */,
1202971bb1a5SLionel Sambuc int16_t dy /**< */)
1203971bb1a5SLionel Sambuc {
1204971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1205971bb1a5SLionel Sambuc /* count */ 2,
1206971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1207971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_TRANSLATE_REGION,
1208971bb1a5SLionel Sambuc /* isvoid */ 1
1209971bb1a5SLionel Sambuc };
1210971bb1a5SLionel Sambuc
1211971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1212971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1213971bb1a5SLionel Sambuc xcb_xfixes_translate_region_request_t xcb_out;
1214971bb1a5SLionel Sambuc
1215971bb1a5SLionel Sambuc xcb_out.region = region;
1216971bb1a5SLionel Sambuc xcb_out.dx = dx;
1217971bb1a5SLionel Sambuc xcb_out.dy = dy;
1218971bb1a5SLionel Sambuc
1219971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1220971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1221971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1222971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1223971bb1a5SLionel Sambuc
1224971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1225971bb1a5SLionel Sambuc return xcb_ret;
1226971bb1a5SLionel Sambuc }
1227971bb1a5SLionel Sambuc
1228971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_region_extents_checked(xcb_connection_t * c,xcb_xfixes_region_t source,xcb_xfixes_region_t destination)1229971bb1a5SLionel Sambuc xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */,
1230971bb1a5SLionel Sambuc xcb_xfixes_region_t source /**< */,
1231971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
1232971bb1a5SLionel Sambuc {
1233971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1234971bb1a5SLionel Sambuc /* count */ 2,
1235971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1236971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_REGION_EXTENTS,
1237971bb1a5SLionel Sambuc /* isvoid */ 1
1238971bb1a5SLionel Sambuc };
1239971bb1a5SLionel Sambuc
1240971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1241971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1242971bb1a5SLionel Sambuc xcb_xfixes_region_extents_request_t xcb_out;
1243971bb1a5SLionel Sambuc
1244971bb1a5SLionel Sambuc xcb_out.source = source;
1245971bb1a5SLionel Sambuc xcb_out.destination = destination;
1246971bb1a5SLionel Sambuc
1247971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1248971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1249971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1250971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1251971bb1a5SLionel Sambuc
1252971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1253971bb1a5SLionel Sambuc return xcb_ret;
1254971bb1a5SLionel Sambuc }
1255971bb1a5SLionel Sambuc
1256971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_region_extents(xcb_connection_t * c,xcb_xfixes_region_t source,xcb_xfixes_region_t destination)1257971bb1a5SLionel Sambuc xcb_xfixes_region_extents (xcb_connection_t *c /**< */,
1258971bb1a5SLionel Sambuc xcb_xfixes_region_t source /**< */,
1259971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */)
1260971bb1a5SLionel Sambuc {
1261971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1262971bb1a5SLionel Sambuc /* count */ 2,
1263971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1264971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_REGION_EXTENTS,
1265971bb1a5SLionel Sambuc /* isvoid */ 1
1266971bb1a5SLionel Sambuc };
1267971bb1a5SLionel Sambuc
1268971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1269971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1270971bb1a5SLionel Sambuc xcb_xfixes_region_extents_request_t xcb_out;
1271971bb1a5SLionel Sambuc
1272971bb1a5SLionel Sambuc xcb_out.source = source;
1273971bb1a5SLionel Sambuc xcb_out.destination = destination;
1274971bb1a5SLionel Sambuc
1275971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1276971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1277971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1278971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1279971bb1a5SLionel Sambuc
1280971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1281971bb1a5SLionel Sambuc return xcb_ret;
1282971bb1a5SLionel Sambuc }
1283971bb1a5SLionel Sambuc
1284971bb1a5SLionel Sambuc int
xcb_xfixes_fetch_region_sizeof(const void * _buffer)1285971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_sizeof (const void *_buffer /**< */)
1286971bb1a5SLionel Sambuc {
1287971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1288971bb1a5SLionel Sambuc const xcb_xfixes_fetch_region_reply_t *_aux = (xcb_xfixes_fetch_region_reply_t *)_buffer;
1289971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1290971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1291971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1292*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1293971bb1a5SLionel Sambuc
1294971bb1a5SLionel Sambuc
1295971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_xfixes_fetch_region_reply_t);
1296971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1297*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1298*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1299971bb1a5SLionel Sambuc /* rectangles */
1300971bb1a5SLionel Sambuc xcb_block_len += (_aux->length / 2) * sizeof(xcb_rectangle_t);
1301971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1302971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(xcb_rectangle_t);
1303971bb1a5SLionel Sambuc /* insert padding */
1304971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1305971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1306971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1307971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1308971bb1a5SLionel Sambuc xcb_pad = 0;
1309971bb1a5SLionel Sambuc }
1310971bb1a5SLionel Sambuc xcb_block_len = 0;
1311971bb1a5SLionel Sambuc
1312971bb1a5SLionel Sambuc return xcb_buffer_len;
1313971bb1a5SLionel Sambuc }
1314971bb1a5SLionel Sambuc
1315971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_cookie_t
xcb_xfixes_fetch_region(xcb_connection_t * c,xcb_xfixes_region_t region)1316971bb1a5SLionel Sambuc xcb_xfixes_fetch_region (xcb_connection_t *c /**< */,
1317971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */)
1318971bb1a5SLionel Sambuc {
1319971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1320971bb1a5SLionel Sambuc /* count */ 2,
1321971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1322971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_FETCH_REGION,
1323971bb1a5SLionel Sambuc /* isvoid */ 0
1324971bb1a5SLionel Sambuc };
1325971bb1a5SLionel Sambuc
1326971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1327971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_cookie_t xcb_ret;
1328971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_request_t xcb_out;
1329971bb1a5SLionel Sambuc
1330971bb1a5SLionel Sambuc xcb_out.region = region;
1331971bb1a5SLionel Sambuc
1332971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1333971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1334971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1335971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1336971bb1a5SLionel Sambuc
1337971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1338971bb1a5SLionel Sambuc return xcb_ret;
1339971bb1a5SLionel Sambuc }
1340971bb1a5SLionel Sambuc
1341971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_cookie_t
xcb_xfixes_fetch_region_unchecked(xcb_connection_t * c,xcb_xfixes_region_t region)1342971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c /**< */,
1343971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */)
1344971bb1a5SLionel Sambuc {
1345971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1346971bb1a5SLionel Sambuc /* count */ 2,
1347971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1348971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_FETCH_REGION,
1349971bb1a5SLionel Sambuc /* isvoid */ 0
1350971bb1a5SLionel Sambuc };
1351971bb1a5SLionel Sambuc
1352971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1353971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_cookie_t xcb_ret;
1354971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_request_t xcb_out;
1355971bb1a5SLionel Sambuc
1356971bb1a5SLionel Sambuc xcb_out.region = region;
1357971bb1a5SLionel Sambuc
1358971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1359971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1360971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1361971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1362971bb1a5SLionel Sambuc
1363971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1364971bb1a5SLionel Sambuc return xcb_ret;
1365971bb1a5SLionel Sambuc }
1366971bb1a5SLionel Sambuc
1367971bb1a5SLionel Sambuc xcb_rectangle_t *
xcb_xfixes_fetch_region_rectangles(const xcb_xfixes_fetch_region_reply_t * R)1368971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R /**< */)
1369971bb1a5SLionel Sambuc {
1370971bb1a5SLionel Sambuc return (xcb_rectangle_t *) (R + 1);
1371971bb1a5SLionel Sambuc }
1372971bb1a5SLionel Sambuc
1373971bb1a5SLionel Sambuc int
xcb_xfixes_fetch_region_rectangles_length(const xcb_xfixes_fetch_region_reply_t * R)1374971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R /**< */)
1375971bb1a5SLionel Sambuc {
1376971bb1a5SLionel Sambuc return (R->length / 2);
1377971bb1a5SLionel Sambuc }
1378971bb1a5SLionel Sambuc
1379971bb1a5SLionel Sambuc xcb_rectangle_iterator_t
xcb_xfixes_fetch_region_rectangles_iterator(const xcb_xfixes_fetch_region_reply_t * R)1380971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_reply_t *R /**< */)
1381971bb1a5SLionel Sambuc {
1382971bb1a5SLionel Sambuc xcb_rectangle_iterator_t i;
1383971bb1a5SLionel Sambuc i.data = (xcb_rectangle_t *) (R + 1);
1384971bb1a5SLionel Sambuc i.rem = (R->length / 2);
1385971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
1386971bb1a5SLionel Sambuc return i;
1387971bb1a5SLionel Sambuc }
1388971bb1a5SLionel Sambuc
1389971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_reply_t *
xcb_xfixes_fetch_region_reply(xcb_connection_t * c,xcb_xfixes_fetch_region_cookie_t cookie,xcb_generic_error_t ** e)1390971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */,
1391971bb1a5SLionel Sambuc xcb_xfixes_fetch_region_cookie_t cookie /**< */,
1392971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
1393971bb1a5SLionel Sambuc {
1394971bb1a5SLionel Sambuc return (xcb_xfixes_fetch_region_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1395971bb1a5SLionel Sambuc }
1396971bb1a5SLionel Sambuc
1397971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_gc_clip_region_checked(xcb_connection_t * c,xcb_gcontext_t gc,xcb_xfixes_region_t region,int16_t x_origin,int16_t y_origin)1398971bb1a5SLionel Sambuc xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */,
1399971bb1a5SLionel Sambuc xcb_gcontext_t gc /**< */,
1400971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
1401971bb1a5SLionel Sambuc int16_t x_origin /**< */,
1402971bb1a5SLionel Sambuc int16_t y_origin /**< */)
1403971bb1a5SLionel Sambuc {
1404971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1405971bb1a5SLionel Sambuc /* count */ 2,
1406971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1407971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION,
1408971bb1a5SLionel Sambuc /* isvoid */ 1
1409971bb1a5SLionel Sambuc };
1410971bb1a5SLionel Sambuc
1411971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1412971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1413971bb1a5SLionel Sambuc xcb_xfixes_set_gc_clip_region_request_t xcb_out;
1414971bb1a5SLionel Sambuc
1415971bb1a5SLionel Sambuc xcb_out.gc = gc;
1416971bb1a5SLionel Sambuc xcb_out.region = region;
1417971bb1a5SLionel Sambuc xcb_out.x_origin = x_origin;
1418971bb1a5SLionel Sambuc xcb_out.y_origin = y_origin;
1419971bb1a5SLionel Sambuc
1420971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1421971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1422971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1423971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1424971bb1a5SLionel Sambuc
1425971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1426971bb1a5SLionel Sambuc return xcb_ret;
1427971bb1a5SLionel Sambuc }
1428971bb1a5SLionel Sambuc
1429971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_gc_clip_region(xcb_connection_t * c,xcb_gcontext_t gc,xcb_xfixes_region_t region,int16_t x_origin,int16_t y_origin)1430971bb1a5SLionel Sambuc xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */,
1431971bb1a5SLionel Sambuc xcb_gcontext_t gc /**< */,
1432971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
1433971bb1a5SLionel Sambuc int16_t x_origin /**< */,
1434971bb1a5SLionel Sambuc int16_t y_origin /**< */)
1435971bb1a5SLionel Sambuc {
1436971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1437971bb1a5SLionel Sambuc /* count */ 2,
1438971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1439971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION,
1440971bb1a5SLionel Sambuc /* isvoid */ 1
1441971bb1a5SLionel Sambuc };
1442971bb1a5SLionel Sambuc
1443971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1444971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1445971bb1a5SLionel Sambuc xcb_xfixes_set_gc_clip_region_request_t xcb_out;
1446971bb1a5SLionel Sambuc
1447971bb1a5SLionel Sambuc xcb_out.gc = gc;
1448971bb1a5SLionel Sambuc xcb_out.region = region;
1449971bb1a5SLionel Sambuc xcb_out.x_origin = x_origin;
1450971bb1a5SLionel Sambuc xcb_out.y_origin = y_origin;
1451971bb1a5SLionel Sambuc
1452971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1453971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1454971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1455971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1456971bb1a5SLionel Sambuc
1457971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1458971bb1a5SLionel Sambuc return xcb_ret;
1459971bb1a5SLionel Sambuc }
1460971bb1a5SLionel Sambuc
1461971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_window_shape_region_checked(xcb_connection_t * c,xcb_window_t dest,xcb_shape_kind_t dest_kind,int16_t x_offset,int16_t y_offset,xcb_xfixes_region_t region)1462971bb1a5SLionel Sambuc xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */,
1463971bb1a5SLionel Sambuc xcb_window_t dest /**< */,
1464971bb1a5SLionel Sambuc xcb_shape_kind_t dest_kind /**< */,
1465971bb1a5SLionel Sambuc int16_t x_offset /**< */,
1466971bb1a5SLionel Sambuc int16_t y_offset /**< */,
1467971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */)
1468971bb1a5SLionel Sambuc {
1469971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1470971bb1a5SLionel Sambuc /* count */ 2,
1471971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1472971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION,
1473971bb1a5SLionel Sambuc /* isvoid */ 1
1474971bb1a5SLionel Sambuc };
1475971bb1a5SLionel Sambuc
1476971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1477971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1478971bb1a5SLionel Sambuc xcb_xfixes_set_window_shape_region_request_t xcb_out;
1479971bb1a5SLionel Sambuc
1480971bb1a5SLionel Sambuc xcb_out.dest = dest;
1481971bb1a5SLionel Sambuc xcb_out.dest_kind = dest_kind;
1482971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1483971bb1a5SLionel Sambuc xcb_out.x_offset = x_offset;
1484971bb1a5SLionel Sambuc xcb_out.y_offset = y_offset;
1485971bb1a5SLionel Sambuc xcb_out.region = region;
1486971bb1a5SLionel Sambuc
1487971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1488971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1489971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1490971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1491971bb1a5SLionel Sambuc
1492971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1493971bb1a5SLionel Sambuc return xcb_ret;
1494971bb1a5SLionel Sambuc }
1495971bb1a5SLionel Sambuc
1496971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_window_shape_region(xcb_connection_t * c,xcb_window_t dest,xcb_shape_kind_t dest_kind,int16_t x_offset,int16_t y_offset,xcb_xfixes_region_t region)1497971bb1a5SLionel Sambuc xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */,
1498971bb1a5SLionel Sambuc xcb_window_t dest /**< */,
1499971bb1a5SLionel Sambuc xcb_shape_kind_t dest_kind /**< */,
1500971bb1a5SLionel Sambuc int16_t x_offset /**< */,
1501971bb1a5SLionel Sambuc int16_t y_offset /**< */,
1502971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */)
1503971bb1a5SLionel Sambuc {
1504971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1505971bb1a5SLionel Sambuc /* count */ 2,
1506971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1507971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION,
1508971bb1a5SLionel Sambuc /* isvoid */ 1
1509971bb1a5SLionel Sambuc };
1510971bb1a5SLionel Sambuc
1511971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1512971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1513971bb1a5SLionel Sambuc xcb_xfixes_set_window_shape_region_request_t xcb_out;
1514971bb1a5SLionel Sambuc
1515971bb1a5SLionel Sambuc xcb_out.dest = dest;
1516971bb1a5SLionel Sambuc xcb_out.dest_kind = dest_kind;
1517971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 3);
1518971bb1a5SLionel Sambuc xcb_out.x_offset = x_offset;
1519971bb1a5SLionel Sambuc xcb_out.y_offset = y_offset;
1520971bb1a5SLionel Sambuc xcb_out.region = region;
1521971bb1a5SLionel Sambuc
1522971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1523971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1524971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1525971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1526971bb1a5SLionel Sambuc
1527971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1528971bb1a5SLionel Sambuc return xcb_ret;
1529971bb1a5SLionel Sambuc }
1530971bb1a5SLionel Sambuc
1531971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_picture_clip_region_checked(xcb_connection_t * c,xcb_render_picture_t picture,xcb_xfixes_region_t region,int16_t x_origin,int16_t y_origin)1532971bb1a5SLionel Sambuc xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */,
1533971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
1534971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
1535971bb1a5SLionel Sambuc int16_t x_origin /**< */,
1536971bb1a5SLionel Sambuc int16_t y_origin /**< */)
1537971bb1a5SLionel Sambuc {
1538971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1539971bb1a5SLionel Sambuc /* count */ 2,
1540971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1541971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION,
1542971bb1a5SLionel Sambuc /* isvoid */ 1
1543971bb1a5SLionel Sambuc };
1544971bb1a5SLionel Sambuc
1545971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1546971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1547971bb1a5SLionel Sambuc xcb_xfixes_set_picture_clip_region_request_t xcb_out;
1548971bb1a5SLionel Sambuc
1549971bb1a5SLionel Sambuc xcb_out.picture = picture;
1550971bb1a5SLionel Sambuc xcb_out.region = region;
1551971bb1a5SLionel Sambuc xcb_out.x_origin = x_origin;
1552971bb1a5SLionel Sambuc xcb_out.y_origin = y_origin;
1553971bb1a5SLionel Sambuc
1554971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1555971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1556971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1557971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1558971bb1a5SLionel Sambuc
1559971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1560971bb1a5SLionel Sambuc return xcb_ret;
1561971bb1a5SLionel Sambuc }
1562971bb1a5SLionel Sambuc
1563971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_picture_clip_region(xcb_connection_t * c,xcb_render_picture_t picture,xcb_xfixes_region_t region,int16_t x_origin,int16_t y_origin)1564971bb1a5SLionel Sambuc xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */,
1565971bb1a5SLionel Sambuc xcb_render_picture_t picture /**< */,
1566971bb1a5SLionel Sambuc xcb_xfixes_region_t region /**< */,
1567971bb1a5SLionel Sambuc int16_t x_origin /**< */,
1568971bb1a5SLionel Sambuc int16_t y_origin /**< */)
1569971bb1a5SLionel Sambuc {
1570971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1571971bb1a5SLionel Sambuc /* count */ 2,
1572971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1573971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION,
1574971bb1a5SLionel Sambuc /* isvoid */ 1
1575971bb1a5SLionel Sambuc };
1576971bb1a5SLionel Sambuc
1577971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1578971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1579971bb1a5SLionel Sambuc xcb_xfixes_set_picture_clip_region_request_t xcb_out;
1580971bb1a5SLionel Sambuc
1581971bb1a5SLionel Sambuc xcb_out.picture = picture;
1582971bb1a5SLionel Sambuc xcb_out.region = region;
1583971bb1a5SLionel Sambuc xcb_out.x_origin = x_origin;
1584971bb1a5SLionel Sambuc xcb_out.y_origin = y_origin;
1585971bb1a5SLionel Sambuc
1586971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1587971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1588971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1589971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1590971bb1a5SLionel Sambuc
1591971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1592971bb1a5SLionel Sambuc return xcb_ret;
1593971bb1a5SLionel Sambuc }
1594971bb1a5SLionel Sambuc
1595971bb1a5SLionel Sambuc int
xcb_xfixes_set_cursor_name_sizeof(const void * _buffer)1596971bb1a5SLionel Sambuc xcb_xfixes_set_cursor_name_sizeof (const void *_buffer /**< */)
1597971bb1a5SLionel Sambuc {
1598971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1599971bb1a5SLionel Sambuc const xcb_xfixes_set_cursor_name_request_t *_aux = (xcb_xfixes_set_cursor_name_request_t *)_buffer;
1600971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1601971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1602971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1603*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1604971bb1a5SLionel Sambuc
1605971bb1a5SLionel Sambuc
1606971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_xfixes_set_cursor_name_request_t);
1607971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1608*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1609*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1610971bb1a5SLionel Sambuc /* name */
1611971bb1a5SLionel Sambuc xcb_block_len += _aux->nbytes * sizeof(char);
1612971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1613971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(char);
1614971bb1a5SLionel Sambuc /* insert padding */
1615971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1616971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1617971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1618971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1619971bb1a5SLionel Sambuc xcb_pad = 0;
1620971bb1a5SLionel Sambuc }
1621971bb1a5SLionel Sambuc xcb_block_len = 0;
1622971bb1a5SLionel Sambuc
1623971bb1a5SLionel Sambuc return xcb_buffer_len;
1624971bb1a5SLionel Sambuc }
1625971bb1a5SLionel Sambuc
1626971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_cursor_name_checked(xcb_connection_t * c,xcb_cursor_t cursor,uint16_t nbytes,const char * name)1627971bb1a5SLionel Sambuc xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */,
1628971bb1a5SLionel Sambuc xcb_cursor_t cursor /**< */,
1629971bb1a5SLionel Sambuc uint16_t nbytes /**< */,
1630971bb1a5SLionel Sambuc const char *name /**< */)
1631971bb1a5SLionel Sambuc {
1632971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1633971bb1a5SLionel Sambuc /* count */ 4,
1634971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1635971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_CURSOR_NAME,
1636971bb1a5SLionel Sambuc /* isvoid */ 1
1637971bb1a5SLionel Sambuc };
1638971bb1a5SLionel Sambuc
1639971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1640971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1641971bb1a5SLionel Sambuc xcb_xfixes_set_cursor_name_request_t xcb_out;
1642971bb1a5SLionel Sambuc
1643971bb1a5SLionel Sambuc xcb_out.cursor = cursor;
1644971bb1a5SLionel Sambuc xcb_out.nbytes = nbytes;
1645971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 2);
1646971bb1a5SLionel Sambuc
1647971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1648971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1649971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1650971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1651971bb1a5SLionel Sambuc /* char name */
1652971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) name;
1653971bb1a5SLionel Sambuc xcb_parts[4].iov_len = nbytes * sizeof(char);
1654971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1655971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1656971bb1a5SLionel Sambuc
1657971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1658971bb1a5SLionel Sambuc return xcb_ret;
1659971bb1a5SLionel Sambuc }
1660971bb1a5SLionel Sambuc
1661971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_set_cursor_name(xcb_connection_t * c,xcb_cursor_t cursor,uint16_t nbytes,const char * name)1662971bb1a5SLionel Sambuc xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */,
1663971bb1a5SLionel Sambuc xcb_cursor_t cursor /**< */,
1664971bb1a5SLionel Sambuc uint16_t nbytes /**< */,
1665971bb1a5SLionel Sambuc const char *name /**< */)
1666971bb1a5SLionel Sambuc {
1667971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1668971bb1a5SLionel Sambuc /* count */ 4,
1669971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1670971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SET_CURSOR_NAME,
1671971bb1a5SLionel Sambuc /* isvoid */ 1
1672971bb1a5SLionel Sambuc };
1673971bb1a5SLionel Sambuc
1674971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
1675971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1676971bb1a5SLionel Sambuc xcb_xfixes_set_cursor_name_request_t xcb_out;
1677971bb1a5SLionel Sambuc
1678971bb1a5SLionel Sambuc xcb_out.cursor = cursor;
1679971bb1a5SLionel Sambuc xcb_out.nbytes = nbytes;
1680971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 2);
1681971bb1a5SLionel Sambuc
1682971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1683971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1684971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1685971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1686971bb1a5SLionel Sambuc /* char name */
1687971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) name;
1688971bb1a5SLionel Sambuc xcb_parts[4].iov_len = nbytes * sizeof(char);
1689971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
1690971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1691971bb1a5SLionel Sambuc
1692971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1693971bb1a5SLionel Sambuc return xcb_ret;
1694971bb1a5SLionel Sambuc }
1695971bb1a5SLionel Sambuc
1696971bb1a5SLionel Sambuc int
xcb_xfixes_get_cursor_name_sizeof(const void * _buffer)1697971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_sizeof (const void *_buffer /**< */)
1698971bb1a5SLionel Sambuc {
1699971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1700971bb1a5SLionel Sambuc const xcb_xfixes_get_cursor_name_reply_t *_aux = (xcb_xfixes_get_cursor_name_reply_t *)_buffer;
1701971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1702971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1703971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1704*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1705971bb1a5SLionel Sambuc
1706971bb1a5SLionel Sambuc
1707971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_xfixes_get_cursor_name_reply_t);
1708971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1709*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1710*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1711971bb1a5SLionel Sambuc /* name */
1712971bb1a5SLionel Sambuc xcb_block_len += _aux->nbytes * sizeof(char);
1713971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1714971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(char);
1715971bb1a5SLionel Sambuc /* insert padding */
1716971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1717971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1718971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1719971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1720971bb1a5SLionel Sambuc xcb_pad = 0;
1721971bb1a5SLionel Sambuc }
1722971bb1a5SLionel Sambuc xcb_block_len = 0;
1723971bb1a5SLionel Sambuc
1724971bb1a5SLionel Sambuc return xcb_buffer_len;
1725971bb1a5SLionel Sambuc }
1726971bb1a5SLionel Sambuc
1727971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_cookie_t
xcb_xfixes_get_cursor_name(xcb_connection_t * c,xcb_cursor_t cursor)1728971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */,
1729971bb1a5SLionel Sambuc xcb_cursor_t cursor /**< */)
1730971bb1a5SLionel Sambuc {
1731971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1732971bb1a5SLionel Sambuc /* count */ 2,
1733971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1734971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_GET_CURSOR_NAME,
1735971bb1a5SLionel Sambuc /* isvoid */ 0
1736971bb1a5SLionel Sambuc };
1737971bb1a5SLionel Sambuc
1738971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1739971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_cookie_t xcb_ret;
1740971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_request_t xcb_out;
1741971bb1a5SLionel Sambuc
1742971bb1a5SLionel Sambuc xcb_out.cursor = cursor;
1743971bb1a5SLionel Sambuc
1744971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1745971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1746971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1747971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1748971bb1a5SLionel Sambuc
1749971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1750971bb1a5SLionel Sambuc return xcb_ret;
1751971bb1a5SLionel Sambuc }
1752971bb1a5SLionel Sambuc
1753971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_cookie_t
xcb_xfixes_get_cursor_name_unchecked(xcb_connection_t * c,xcb_cursor_t cursor)1754971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c /**< */,
1755971bb1a5SLionel Sambuc xcb_cursor_t cursor /**< */)
1756971bb1a5SLionel Sambuc {
1757971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1758971bb1a5SLionel Sambuc /* count */ 2,
1759971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1760971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_GET_CURSOR_NAME,
1761971bb1a5SLionel Sambuc /* isvoid */ 0
1762971bb1a5SLionel Sambuc };
1763971bb1a5SLionel Sambuc
1764971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1765971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_cookie_t xcb_ret;
1766971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_request_t xcb_out;
1767971bb1a5SLionel Sambuc
1768971bb1a5SLionel Sambuc xcb_out.cursor = cursor;
1769971bb1a5SLionel Sambuc
1770971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1771971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1772971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1773971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1774971bb1a5SLionel Sambuc
1775971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1776971bb1a5SLionel Sambuc return xcb_ret;
1777971bb1a5SLionel Sambuc }
1778971bb1a5SLionel Sambuc
1779971bb1a5SLionel Sambuc char *
xcb_xfixes_get_cursor_name_name(const xcb_xfixes_get_cursor_name_reply_t * R)1780971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R /**< */)
1781971bb1a5SLionel Sambuc {
1782971bb1a5SLionel Sambuc return (char *) (R + 1);
1783971bb1a5SLionel Sambuc }
1784971bb1a5SLionel Sambuc
1785971bb1a5SLionel Sambuc int
xcb_xfixes_get_cursor_name_name_length(const xcb_xfixes_get_cursor_name_reply_t * R)1786971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R /**< */)
1787971bb1a5SLionel Sambuc {
1788971bb1a5SLionel Sambuc return R->nbytes;
1789971bb1a5SLionel Sambuc }
1790971bb1a5SLionel Sambuc
1791971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xfixes_get_cursor_name_name_end(const xcb_xfixes_get_cursor_name_reply_t * R)1792971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R /**< */)
1793971bb1a5SLionel Sambuc {
1794971bb1a5SLionel Sambuc xcb_generic_iterator_t i;
1795971bb1a5SLionel Sambuc i.data = ((char *) (R + 1)) + (R->nbytes);
1796971bb1a5SLionel Sambuc i.rem = 0;
1797971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
1798971bb1a5SLionel Sambuc return i;
1799971bb1a5SLionel Sambuc }
1800971bb1a5SLionel Sambuc
1801971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_reply_t *
xcb_xfixes_get_cursor_name_reply(xcb_connection_t * c,xcb_xfixes_get_cursor_name_cookie_t cookie,xcb_generic_error_t ** e)1802971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**< */,
1803971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_name_cookie_t cookie /**< */,
1804971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
1805971bb1a5SLionel Sambuc {
1806971bb1a5SLionel Sambuc return (xcb_xfixes_get_cursor_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1807971bb1a5SLionel Sambuc }
1808971bb1a5SLionel Sambuc
1809971bb1a5SLionel Sambuc int
xcb_xfixes_get_cursor_image_and_name_sizeof(const void * _buffer)1810971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer /**< */)
1811971bb1a5SLionel Sambuc {
1812971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
1813971bb1a5SLionel Sambuc const xcb_xfixes_get_cursor_image_and_name_reply_t *_aux = (xcb_xfixes_get_cursor_image_and_name_reply_t *)_buffer;
1814971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
1815971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
1816971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
1817*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
1818971bb1a5SLionel Sambuc
1819971bb1a5SLionel Sambuc
1820971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_and_name_reply_t);
1821971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1822*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
1823*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
1824971bb1a5SLionel Sambuc /* name */
1825971bb1a5SLionel Sambuc xcb_block_len += _aux->nbytes * sizeof(char);
1826971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1827971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(char);
1828971bb1a5SLionel Sambuc /* insert padding */
1829971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1830971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1831971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1832971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1833971bb1a5SLionel Sambuc xcb_pad = 0;
1834971bb1a5SLionel Sambuc }
1835971bb1a5SLionel Sambuc xcb_block_len = 0;
1836971bb1a5SLionel Sambuc /* cursor_image */
1837971bb1a5SLionel Sambuc xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t);
1838971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
1839971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(uint32_t);
1840971bb1a5SLionel Sambuc /* insert padding */
1841971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1842971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
1843971bb1a5SLionel Sambuc if (0 != xcb_pad) {
1844971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
1845971bb1a5SLionel Sambuc xcb_pad = 0;
1846971bb1a5SLionel Sambuc }
1847971bb1a5SLionel Sambuc xcb_block_len = 0;
1848971bb1a5SLionel Sambuc
1849971bb1a5SLionel Sambuc return xcb_buffer_len;
1850971bb1a5SLionel Sambuc }
1851971bb1a5SLionel Sambuc
1852971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_cookie_t
xcb_xfixes_get_cursor_image_and_name(xcb_connection_t * c)1853971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c /**< */)
1854971bb1a5SLionel Sambuc {
1855971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1856971bb1a5SLionel Sambuc /* count */ 2,
1857971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1858971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME,
1859971bb1a5SLionel Sambuc /* isvoid */ 0
1860971bb1a5SLionel Sambuc };
1861971bb1a5SLionel Sambuc
1862971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1863971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret;
1864971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_request_t xcb_out;
1865971bb1a5SLionel Sambuc
1866971bb1a5SLionel Sambuc
1867971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1868971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1869971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1870971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1871971bb1a5SLionel Sambuc
1872971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1873971bb1a5SLionel Sambuc return xcb_ret;
1874971bb1a5SLionel Sambuc }
1875971bb1a5SLionel Sambuc
1876971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_cookie_t
xcb_xfixes_get_cursor_image_and_name_unchecked(xcb_connection_t * c)1877971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c /**< */)
1878971bb1a5SLionel Sambuc {
1879971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1880971bb1a5SLionel Sambuc /* count */ 2,
1881971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1882971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME,
1883971bb1a5SLionel Sambuc /* isvoid */ 0
1884971bb1a5SLionel Sambuc };
1885971bb1a5SLionel Sambuc
1886971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1887971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret;
1888971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_request_t xcb_out;
1889971bb1a5SLionel Sambuc
1890971bb1a5SLionel Sambuc
1891971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1892971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1893971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1894971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1895971bb1a5SLionel Sambuc
1896971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1897971bb1a5SLionel Sambuc return xcb_ret;
1898971bb1a5SLionel Sambuc }
1899971bb1a5SLionel Sambuc
1900971bb1a5SLionel Sambuc char *
xcb_xfixes_get_cursor_image_and_name_name(const xcb_xfixes_get_cursor_image_and_name_reply_t * R)1901971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1902971bb1a5SLionel Sambuc {
1903971bb1a5SLionel Sambuc return (char *) (R + 1);
1904971bb1a5SLionel Sambuc }
1905971bb1a5SLionel Sambuc
1906971bb1a5SLionel Sambuc int
xcb_xfixes_get_cursor_image_and_name_name_length(const xcb_xfixes_get_cursor_image_and_name_reply_t * R)1907971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1908971bb1a5SLionel Sambuc {
1909971bb1a5SLionel Sambuc return R->nbytes;
1910971bb1a5SLionel Sambuc }
1911971bb1a5SLionel Sambuc
1912971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xfixes_get_cursor_image_and_name_name_end(const xcb_xfixes_get_cursor_image_and_name_reply_t * R)1913971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1914971bb1a5SLionel Sambuc {
1915971bb1a5SLionel Sambuc xcb_generic_iterator_t i;
1916971bb1a5SLionel Sambuc i.data = ((char *) (R + 1)) + (R->nbytes);
1917971bb1a5SLionel Sambuc i.rem = 0;
1918971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
1919971bb1a5SLionel Sambuc return i;
1920971bb1a5SLionel Sambuc }
1921971bb1a5SLionel Sambuc
1922971bb1a5SLionel Sambuc uint32_t *
xcb_xfixes_get_cursor_image_and_name_cursor_image(const xcb_xfixes_get_cursor_image_and_name_reply_t * R)1923971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1924971bb1a5SLionel Sambuc {
1925971bb1a5SLionel Sambuc xcb_generic_iterator_t prev = xcb_xfixes_get_cursor_image_and_name_name_end(R);
1926971bb1a5SLionel Sambuc return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
1927971bb1a5SLionel Sambuc }
1928971bb1a5SLionel Sambuc
1929971bb1a5SLionel Sambuc int
xcb_xfixes_get_cursor_image_and_name_cursor_image_length(const xcb_xfixes_get_cursor_image_and_name_reply_t * R)1930971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1931971bb1a5SLionel Sambuc {
1932971bb1a5SLionel Sambuc return (R->width * R->height);
1933971bb1a5SLionel Sambuc }
1934971bb1a5SLionel Sambuc
1935971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xfixes_get_cursor_image_and_name_cursor_image_end(const xcb_xfixes_get_cursor_image_and_name_reply_t * R)1936971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
1937971bb1a5SLionel Sambuc {
1938971bb1a5SLionel Sambuc xcb_generic_iterator_t i;
1939971bb1a5SLionel Sambuc xcb_generic_iterator_t child = xcb_xfixes_get_cursor_image_and_name_name_end(R);
1940971bb1a5SLionel Sambuc i.data = ((uint32_t *) child.data) + ((R->width * R->height));
1941971bb1a5SLionel Sambuc i.rem = 0;
1942971bb1a5SLionel Sambuc i.index = (char *) i.data - (char *) R;
1943971bb1a5SLionel Sambuc return i;
1944971bb1a5SLionel Sambuc }
1945971bb1a5SLionel Sambuc
1946971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_reply_t *
xcb_xfixes_get_cursor_image_and_name_reply(xcb_connection_t * c,xcb_xfixes_get_cursor_image_and_name_cookie_t cookie,xcb_generic_error_t ** e)1947971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c /**< */,
1948971bb1a5SLionel Sambuc xcb_xfixes_get_cursor_image_and_name_cookie_t cookie /**< */,
1949971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
1950971bb1a5SLionel Sambuc {
1951971bb1a5SLionel Sambuc return (xcb_xfixes_get_cursor_image_and_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1952971bb1a5SLionel Sambuc }
1953971bb1a5SLionel Sambuc
1954971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_change_cursor_checked(xcb_connection_t * c,xcb_cursor_t source,xcb_cursor_t destination)1955971bb1a5SLionel Sambuc xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */,
1956971bb1a5SLionel Sambuc xcb_cursor_t source /**< */,
1957971bb1a5SLionel Sambuc xcb_cursor_t destination /**< */)
1958971bb1a5SLionel Sambuc {
1959971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1960971bb1a5SLionel Sambuc /* count */ 2,
1961971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1962971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CHANGE_CURSOR,
1963971bb1a5SLionel Sambuc /* isvoid */ 1
1964971bb1a5SLionel Sambuc };
1965971bb1a5SLionel Sambuc
1966971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1967971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1968971bb1a5SLionel Sambuc xcb_xfixes_change_cursor_request_t xcb_out;
1969971bb1a5SLionel Sambuc
1970971bb1a5SLionel Sambuc xcb_out.source = source;
1971971bb1a5SLionel Sambuc xcb_out.destination = destination;
1972971bb1a5SLionel Sambuc
1973971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
1974971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
1975971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
1976971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1977971bb1a5SLionel Sambuc
1978971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1979971bb1a5SLionel Sambuc return xcb_ret;
1980971bb1a5SLionel Sambuc }
1981971bb1a5SLionel Sambuc
1982971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_change_cursor(xcb_connection_t * c,xcb_cursor_t source,xcb_cursor_t destination)1983971bb1a5SLionel Sambuc xcb_xfixes_change_cursor (xcb_connection_t *c /**< */,
1984971bb1a5SLionel Sambuc xcb_cursor_t source /**< */,
1985971bb1a5SLionel Sambuc xcb_cursor_t destination /**< */)
1986971bb1a5SLionel Sambuc {
1987971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
1988971bb1a5SLionel Sambuc /* count */ 2,
1989971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
1990971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CHANGE_CURSOR,
1991971bb1a5SLionel Sambuc /* isvoid */ 1
1992971bb1a5SLionel Sambuc };
1993971bb1a5SLionel Sambuc
1994971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
1995971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
1996971bb1a5SLionel Sambuc xcb_xfixes_change_cursor_request_t xcb_out;
1997971bb1a5SLionel Sambuc
1998971bb1a5SLionel Sambuc xcb_out.source = source;
1999971bb1a5SLionel Sambuc xcb_out.destination = destination;
2000971bb1a5SLionel Sambuc
2001971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2002971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2003971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2004971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2005971bb1a5SLionel Sambuc
2006971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2007971bb1a5SLionel Sambuc return xcb_ret;
2008971bb1a5SLionel Sambuc }
2009971bb1a5SLionel Sambuc
2010971bb1a5SLionel Sambuc int
xcb_xfixes_change_cursor_by_name_sizeof(const void * _buffer)2011971bb1a5SLionel Sambuc xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer /**< */)
2012971bb1a5SLionel Sambuc {
2013971bb1a5SLionel Sambuc char *xcb_tmp = (char *)_buffer;
2014971bb1a5SLionel Sambuc const xcb_xfixes_change_cursor_by_name_request_t *_aux = (xcb_xfixes_change_cursor_by_name_request_t *)_buffer;
2015971bb1a5SLionel Sambuc unsigned int xcb_buffer_len = 0;
2016971bb1a5SLionel Sambuc unsigned int xcb_block_len = 0;
2017971bb1a5SLionel Sambuc unsigned int xcb_pad = 0;
2018*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
2019971bb1a5SLionel Sambuc
2020971bb1a5SLionel Sambuc
2021971bb1a5SLionel Sambuc xcb_block_len += sizeof(xcb_xfixes_change_cursor_by_name_request_t);
2022971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2023*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
2024*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2025971bb1a5SLionel Sambuc /* name */
2026971bb1a5SLionel Sambuc xcb_block_len += _aux->nbytes * sizeof(char);
2027971bb1a5SLionel Sambuc xcb_tmp += xcb_block_len;
2028971bb1a5SLionel Sambuc xcb_align_to = ALIGNOF(char);
2029971bb1a5SLionel Sambuc /* insert padding */
2030971bb1a5SLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2031971bb1a5SLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2032971bb1a5SLionel Sambuc if (0 != xcb_pad) {
2033971bb1a5SLionel Sambuc xcb_tmp += xcb_pad;
2034971bb1a5SLionel Sambuc xcb_pad = 0;
2035971bb1a5SLionel Sambuc }
2036971bb1a5SLionel Sambuc xcb_block_len = 0;
2037971bb1a5SLionel Sambuc
2038971bb1a5SLionel Sambuc return xcb_buffer_len;
2039971bb1a5SLionel Sambuc }
2040971bb1a5SLionel Sambuc
2041971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_change_cursor_by_name_checked(xcb_connection_t * c,xcb_cursor_t src,uint16_t nbytes,const char * name)2042971bb1a5SLionel Sambuc xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */,
2043971bb1a5SLionel Sambuc xcb_cursor_t src /**< */,
2044971bb1a5SLionel Sambuc uint16_t nbytes /**< */,
2045971bb1a5SLionel Sambuc const char *name /**< */)
2046971bb1a5SLionel Sambuc {
2047971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2048971bb1a5SLionel Sambuc /* count */ 4,
2049971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
2050971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME,
2051971bb1a5SLionel Sambuc /* isvoid */ 1
2052971bb1a5SLionel Sambuc };
2053971bb1a5SLionel Sambuc
2054971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2055971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2056971bb1a5SLionel Sambuc xcb_xfixes_change_cursor_by_name_request_t xcb_out;
2057971bb1a5SLionel Sambuc
2058971bb1a5SLionel Sambuc xcb_out.src = src;
2059971bb1a5SLionel Sambuc xcb_out.nbytes = nbytes;
2060971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 2);
2061971bb1a5SLionel Sambuc
2062971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2063971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2064971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2065971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2066971bb1a5SLionel Sambuc /* char name */
2067971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) name;
2068971bb1a5SLionel Sambuc xcb_parts[4].iov_len = nbytes * sizeof(char);
2069971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2070971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2071971bb1a5SLionel Sambuc
2072971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2073971bb1a5SLionel Sambuc return xcb_ret;
2074971bb1a5SLionel Sambuc }
2075971bb1a5SLionel Sambuc
2076971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_change_cursor_by_name(xcb_connection_t * c,xcb_cursor_t src,uint16_t nbytes,const char * name)2077971bb1a5SLionel Sambuc xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */,
2078971bb1a5SLionel Sambuc xcb_cursor_t src /**< */,
2079971bb1a5SLionel Sambuc uint16_t nbytes /**< */,
2080971bb1a5SLionel Sambuc const char *name /**< */)
2081971bb1a5SLionel Sambuc {
2082971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2083971bb1a5SLionel Sambuc /* count */ 4,
2084971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
2085971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME,
2086971bb1a5SLionel Sambuc /* isvoid */ 1
2087971bb1a5SLionel Sambuc };
2088971bb1a5SLionel Sambuc
2089971bb1a5SLionel Sambuc struct iovec xcb_parts[6];
2090971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2091971bb1a5SLionel Sambuc xcb_xfixes_change_cursor_by_name_request_t xcb_out;
2092971bb1a5SLionel Sambuc
2093971bb1a5SLionel Sambuc xcb_out.src = src;
2094971bb1a5SLionel Sambuc xcb_out.nbytes = nbytes;
2095971bb1a5SLionel Sambuc memset(xcb_out.pad0, 0, 2);
2096971bb1a5SLionel Sambuc
2097971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2098971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2099971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2100971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2101971bb1a5SLionel Sambuc /* char name */
2102971bb1a5SLionel Sambuc xcb_parts[4].iov_base = (char *) name;
2103971bb1a5SLionel Sambuc xcb_parts[4].iov_len = nbytes * sizeof(char);
2104971bb1a5SLionel Sambuc xcb_parts[5].iov_base = 0;
2105971bb1a5SLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2106971bb1a5SLionel Sambuc
2107971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2108971bb1a5SLionel Sambuc return xcb_ret;
2109971bb1a5SLionel Sambuc }
2110971bb1a5SLionel Sambuc
2111971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_expand_region_checked(xcb_connection_t * c,xcb_xfixes_region_t source,xcb_xfixes_region_t destination,uint16_t left,uint16_t right,uint16_t top,uint16_t bottom)2112971bb1a5SLionel Sambuc xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */,
2113971bb1a5SLionel Sambuc xcb_xfixes_region_t source /**< */,
2114971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */,
2115971bb1a5SLionel Sambuc uint16_t left /**< */,
2116971bb1a5SLionel Sambuc uint16_t right /**< */,
2117971bb1a5SLionel Sambuc uint16_t top /**< */,
2118971bb1a5SLionel Sambuc uint16_t bottom /**< */)
2119971bb1a5SLionel Sambuc {
2120971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2121971bb1a5SLionel Sambuc /* count */ 2,
2122971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
2123971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_EXPAND_REGION,
2124971bb1a5SLionel Sambuc /* isvoid */ 1
2125971bb1a5SLionel Sambuc };
2126971bb1a5SLionel Sambuc
2127971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2128971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2129971bb1a5SLionel Sambuc xcb_xfixes_expand_region_request_t xcb_out;
2130971bb1a5SLionel Sambuc
2131971bb1a5SLionel Sambuc xcb_out.source = source;
2132971bb1a5SLionel Sambuc xcb_out.destination = destination;
2133971bb1a5SLionel Sambuc xcb_out.left = left;
2134971bb1a5SLionel Sambuc xcb_out.right = right;
2135971bb1a5SLionel Sambuc xcb_out.top = top;
2136971bb1a5SLionel Sambuc xcb_out.bottom = bottom;
2137971bb1a5SLionel Sambuc
2138971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2139971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2140971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2141971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2142971bb1a5SLionel Sambuc
2143971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2144971bb1a5SLionel Sambuc return xcb_ret;
2145971bb1a5SLionel Sambuc }
2146971bb1a5SLionel Sambuc
2147971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_expand_region(xcb_connection_t * c,xcb_xfixes_region_t source,xcb_xfixes_region_t destination,uint16_t left,uint16_t right,uint16_t top,uint16_t bottom)2148971bb1a5SLionel Sambuc xcb_xfixes_expand_region (xcb_connection_t *c /**< */,
2149971bb1a5SLionel Sambuc xcb_xfixes_region_t source /**< */,
2150971bb1a5SLionel Sambuc xcb_xfixes_region_t destination /**< */,
2151971bb1a5SLionel Sambuc uint16_t left /**< */,
2152971bb1a5SLionel Sambuc uint16_t right /**< */,
2153971bb1a5SLionel Sambuc uint16_t top /**< */,
2154971bb1a5SLionel Sambuc uint16_t bottom /**< */)
2155971bb1a5SLionel Sambuc {
2156971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2157971bb1a5SLionel Sambuc /* count */ 2,
2158971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
2159971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_EXPAND_REGION,
2160971bb1a5SLionel Sambuc /* isvoid */ 1
2161971bb1a5SLionel Sambuc };
2162971bb1a5SLionel Sambuc
2163971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2164971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2165971bb1a5SLionel Sambuc xcb_xfixes_expand_region_request_t xcb_out;
2166971bb1a5SLionel Sambuc
2167971bb1a5SLionel Sambuc xcb_out.source = source;
2168971bb1a5SLionel Sambuc xcb_out.destination = destination;
2169971bb1a5SLionel Sambuc xcb_out.left = left;
2170971bb1a5SLionel Sambuc xcb_out.right = right;
2171971bb1a5SLionel Sambuc xcb_out.top = top;
2172971bb1a5SLionel Sambuc xcb_out.bottom = bottom;
2173971bb1a5SLionel Sambuc
2174971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2175971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2176971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2177971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2178971bb1a5SLionel Sambuc
2179971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2180971bb1a5SLionel Sambuc return xcb_ret;
2181971bb1a5SLionel Sambuc }
2182971bb1a5SLionel Sambuc
2183971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_hide_cursor_checked(xcb_connection_t * c,xcb_window_t window)2184971bb1a5SLionel Sambuc xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */,
2185971bb1a5SLionel Sambuc xcb_window_t window /**< */)
2186971bb1a5SLionel Sambuc {
2187971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2188971bb1a5SLionel Sambuc /* count */ 2,
2189971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
2190971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_HIDE_CURSOR,
2191971bb1a5SLionel Sambuc /* isvoid */ 1
2192971bb1a5SLionel Sambuc };
2193971bb1a5SLionel Sambuc
2194971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2195971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2196971bb1a5SLionel Sambuc xcb_xfixes_hide_cursor_request_t xcb_out;
2197971bb1a5SLionel Sambuc
2198971bb1a5SLionel Sambuc xcb_out.window = window;
2199971bb1a5SLionel Sambuc
2200971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2201971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2202971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2203971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2204971bb1a5SLionel Sambuc
2205971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2206971bb1a5SLionel Sambuc return xcb_ret;
2207971bb1a5SLionel Sambuc }
2208971bb1a5SLionel Sambuc
2209971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_hide_cursor(xcb_connection_t * c,xcb_window_t window)2210971bb1a5SLionel Sambuc xcb_xfixes_hide_cursor (xcb_connection_t *c /**< */,
2211971bb1a5SLionel Sambuc xcb_window_t window /**< */)
2212971bb1a5SLionel Sambuc {
2213971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2214971bb1a5SLionel Sambuc /* count */ 2,
2215971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
2216971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_HIDE_CURSOR,
2217971bb1a5SLionel Sambuc /* isvoid */ 1
2218971bb1a5SLionel Sambuc };
2219971bb1a5SLionel Sambuc
2220971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2221971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2222971bb1a5SLionel Sambuc xcb_xfixes_hide_cursor_request_t xcb_out;
2223971bb1a5SLionel Sambuc
2224971bb1a5SLionel Sambuc xcb_out.window = window;
2225971bb1a5SLionel Sambuc
2226971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2227971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2228971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2229971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2230971bb1a5SLionel Sambuc
2231971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2232971bb1a5SLionel Sambuc return xcb_ret;
2233971bb1a5SLionel Sambuc }
2234971bb1a5SLionel Sambuc
2235971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_show_cursor_checked(xcb_connection_t * c,xcb_window_t window)2236971bb1a5SLionel Sambuc xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */,
2237971bb1a5SLionel Sambuc xcb_window_t window /**< */)
2238971bb1a5SLionel Sambuc {
2239971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2240971bb1a5SLionel Sambuc /* count */ 2,
2241971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
2242971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SHOW_CURSOR,
2243971bb1a5SLionel Sambuc /* isvoid */ 1
2244971bb1a5SLionel Sambuc };
2245971bb1a5SLionel Sambuc
2246971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2247971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2248971bb1a5SLionel Sambuc xcb_xfixes_show_cursor_request_t xcb_out;
2249971bb1a5SLionel Sambuc
2250971bb1a5SLionel Sambuc xcb_out.window = window;
2251971bb1a5SLionel Sambuc
2252971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2253971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2254971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2255971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2256971bb1a5SLionel Sambuc
2257971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2258971bb1a5SLionel Sambuc return xcb_ret;
2259971bb1a5SLionel Sambuc }
2260971bb1a5SLionel Sambuc
2261971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xfixes_show_cursor(xcb_connection_t * c,xcb_window_t window)2262971bb1a5SLionel Sambuc xcb_xfixes_show_cursor (xcb_connection_t *c /**< */,
2263971bb1a5SLionel Sambuc xcb_window_t window /**< */)
2264971bb1a5SLionel Sambuc {
2265971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2266971bb1a5SLionel Sambuc /* count */ 2,
2267971bb1a5SLionel Sambuc /* ext */ &xcb_xfixes_id,
2268971bb1a5SLionel Sambuc /* opcode */ XCB_XFIXES_SHOW_CURSOR,
2269971bb1a5SLionel Sambuc /* isvoid */ 1
2270971bb1a5SLionel Sambuc };
2271971bb1a5SLionel Sambuc
2272971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
2273971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
2274971bb1a5SLionel Sambuc xcb_xfixes_show_cursor_request_t xcb_out;
2275971bb1a5SLionel Sambuc
2276971bb1a5SLionel Sambuc xcb_out.window = window;
2277971bb1a5SLionel Sambuc
2278971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2279971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2280971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
2281971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2282971bb1a5SLionel Sambuc
2283971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2284971bb1a5SLionel Sambuc return xcb_ret;
2285971bb1a5SLionel Sambuc }
2286971bb1a5SLionel Sambuc
2287*0a6a1f1dSLionel Sambuc void
xcb_xfixes_barrier_next(xcb_xfixes_barrier_iterator_t * i)2288*0a6a1f1dSLionel Sambuc xcb_xfixes_barrier_next (xcb_xfixes_barrier_iterator_t *i /**< */)
2289*0a6a1f1dSLionel Sambuc {
2290*0a6a1f1dSLionel Sambuc --i->rem;
2291*0a6a1f1dSLionel Sambuc ++i->data;
2292*0a6a1f1dSLionel Sambuc i->index += sizeof(xcb_xfixes_barrier_t);
2293*0a6a1f1dSLionel Sambuc }
2294*0a6a1f1dSLionel Sambuc
2295*0a6a1f1dSLionel Sambuc xcb_generic_iterator_t
xcb_xfixes_barrier_end(xcb_xfixes_barrier_iterator_t i)2296*0a6a1f1dSLionel Sambuc xcb_xfixes_barrier_end (xcb_xfixes_barrier_iterator_t i /**< */)
2297*0a6a1f1dSLionel Sambuc {
2298*0a6a1f1dSLionel Sambuc xcb_generic_iterator_t ret;
2299*0a6a1f1dSLionel Sambuc ret.data = i.data + i.rem;
2300*0a6a1f1dSLionel Sambuc ret.index = i.index + ((char *) ret.data - (char *) i.data);
2301*0a6a1f1dSLionel Sambuc ret.rem = 0;
2302*0a6a1f1dSLionel Sambuc return ret;
2303*0a6a1f1dSLionel Sambuc }
2304*0a6a1f1dSLionel Sambuc
2305*0a6a1f1dSLionel Sambuc int
xcb_xfixes_create_pointer_barrier_sizeof(const void * _buffer)2306*0a6a1f1dSLionel Sambuc xcb_xfixes_create_pointer_barrier_sizeof (const void *_buffer /**< */)
2307*0a6a1f1dSLionel Sambuc {
2308*0a6a1f1dSLionel Sambuc char *xcb_tmp = (char *)_buffer;
2309*0a6a1f1dSLionel Sambuc const xcb_xfixes_create_pointer_barrier_request_t *_aux = (xcb_xfixes_create_pointer_barrier_request_t *)_buffer;
2310*0a6a1f1dSLionel Sambuc unsigned int xcb_buffer_len = 0;
2311*0a6a1f1dSLionel Sambuc unsigned int xcb_block_len = 0;
2312*0a6a1f1dSLionel Sambuc unsigned int xcb_pad = 0;
2313*0a6a1f1dSLionel Sambuc unsigned int xcb_align_to = 0;
2314*0a6a1f1dSLionel Sambuc
2315*0a6a1f1dSLionel Sambuc
2316*0a6a1f1dSLionel Sambuc xcb_block_len += sizeof(xcb_xfixes_create_pointer_barrier_request_t);
2317*0a6a1f1dSLionel Sambuc xcb_tmp += xcb_block_len;
2318*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len;
2319*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2320*0a6a1f1dSLionel Sambuc /* devices */
2321*0a6a1f1dSLionel Sambuc xcb_block_len += _aux->num_devices * sizeof(uint16_t);
2322*0a6a1f1dSLionel Sambuc xcb_tmp += xcb_block_len;
2323*0a6a1f1dSLionel Sambuc xcb_align_to = ALIGNOF(uint16_t);
2324*0a6a1f1dSLionel Sambuc /* insert padding */
2325*0a6a1f1dSLionel Sambuc xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2326*0a6a1f1dSLionel Sambuc xcb_buffer_len += xcb_block_len + xcb_pad;
2327*0a6a1f1dSLionel Sambuc if (0 != xcb_pad) {
2328*0a6a1f1dSLionel Sambuc xcb_tmp += xcb_pad;
2329*0a6a1f1dSLionel Sambuc xcb_pad = 0;
2330*0a6a1f1dSLionel Sambuc }
2331*0a6a1f1dSLionel Sambuc xcb_block_len = 0;
2332*0a6a1f1dSLionel Sambuc
2333*0a6a1f1dSLionel Sambuc return xcb_buffer_len;
2334*0a6a1f1dSLionel Sambuc }
2335*0a6a1f1dSLionel Sambuc
2336*0a6a1f1dSLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_pointer_barrier_checked(xcb_connection_t * c,xcb_xfixes_barrier_t barrier,xcb_window_t window,uint16_t x1,uint16_t y1,uint16_t x2,uint16_t y2,uint32_t directions,uint16_t num_devices,const uint16_t * devices)2337*0a6a1f1dSLionel Sambuc xcb_xfixes_create_pointer_barrier_checked (xcb_connection_t *c /**< */,
2338*0a6a1f1dSLionel Sambuc xcb_xfixes_barrier_t barrier /**< */,
2339*0a6a1f1dSLionel Sambuc xcb_window_t window /**< */,
2340*0a6a1f1dSLionel Sambuc uint16_t x1 /**< */,
2341*0a6a1f1dSLionel Sambuc uint16_t y1 /**< */,
2342*0a6a1f1dSLionel Sambuc uint16_t x2 /**< */,
2343*0a6a1f1dSLionel Sambuc uint16_t y2 /**< */,
2344*0a6a1f1dSLionel Sambuc uint32_t directions /**< */,
2345*0a6a1f1dSLionel Sambuc uint16_t num_devices /**< */,
2346*0a6a1f1dSLionel Sambuc const uint16_t *devices /**< */)
2347*0a6a1f1dSLionel Sambuc {
2348*0a6a1f1dSLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2349*0a6a1f1dSLionel Sambuc /* count */ 4,
2350*0a6a1f1dSLionel Sambuc /* ext */ &xcb_xfixes_id,
2351*0a6a1f1dSLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_POINTER_BARRIER,
2352*0a6a1f1dSLionel Sambuc /* isvoid */ 1
2353*0a6a1f1dSLionel Sambuc };
2354*0a6a1f1dSLionel Sambuc
2355*0a6a1f1dSLionel Sambuc struct iovec xcb_parts[6];
2356*0a6a1f1dSLionel Sambuc xcb_void_cookie_t xcb_ret;
2357*0a6a1f1dSLionel Sambuc xcb_xfixes_create_pointer_barrier_request_t xcb_out;
2358*0a6a1f1dSLionel Sambuc
2359*0a6a1f1dSLionel Sambuc xcb_out.barrier = barrier;
2360*0a6a1f1dSLionel Sambuc xcb_out.window = window;
2361*0a6a1f1dSLionel Sambuc xcb_out.x1 = x1;
2362*0a6a1f1dSLionel Sambuc xcb_out.y1 = y1;
2363*0a6a1f1dSLionel Sambuc xcb_out.x2 = x2;
2364*0a6a1f1dSLionel Sambuc xcb_out.y2 = y2;
2365*0a6a1f1dSLionel Sambuc xcb_out.directions = directions;
2366*0a6a1f1dSLionel Sambuc memset(xcb_out.pad0, 0, 2);
2367*0a6a1f1dSLionel Sambuc xcb_out.num_devices = num_devices;
2368*0a6a1f1dSLionel Sambuc
2369*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2370*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2371*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_base = 0;
2372*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2373*0a6a1f1dSLionel Sambuc /* uint16_t devices */
2374*0a6a1f1dSLionel Sambuc xcb_parts[4].iov_base = (char *) devices;
2375*0a6a1f1dSLionel Sambuc xcb_parts[4].iov_len = num_devices * sizeof(uint16_t);
2376*0a6a1f1dSLionel Sambuc xcb_parts[5].iov_base = 0;
2377*0a6a1f1dSLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2378*0a6a1f1dSLionel Sambuc
2379*0a6a1f1dSLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2380*0a6a1f1dSLionel Sambuc return xcb_ret;
2381*0a6a1f1dSLionel Sambuc }
2382*0a6a1f1dSLionel Sambuc
2383*0a6a1f1dSLionel Sambuc xcb_void_cookie_t
xcb_xfixes_create_pointer_barrier(xcb_connection_t * c,xcb_xfixes_barrier_t barrier,xcb_window_t window,uint16_t x1,uint16_t y1,uint16_t x2,uint16_t y2,uint32_t directions,uint16_t num_devices,const uint16_t * devices)2384*0a6a1f1dSLionel Sambuc xcb_xfixes_create_pointer_barrier (xcb_connection_t *c /**< */,
2385*0a6a1f1dSLionel Sambuc xcb_xfixes_barrier_t barrier /**< */,
2386*0a6a1f1dSLionel Sambuc xcb_window_t window /**< */,
2387*0a6a1f1dSLionel Sambuc uint16_t x1 /**< */,
2388*0a6a1f1dSLionel Sambuc uint16_t y1 /**< */,
2389*0a6a1f1dSLionel Sambuc uint16_t x2 /**< */,
2390*0a6a1f1dSLionel Sambuc uint16_t y2 /**< */,
2391*0a6a1f1dSLionel Sambuc uint32_t directions /**< */,
2392*0a6a1f1dSLionel Sambuc uint16_t num_devices /**< */,
2393*0a6a1f1dSLionel Sambuc const uint16_t *devices /**< */)
2394*0a6a1f1dSLionel Sambuc {
2395*0a6a1f1dSLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2396*0a6a1f1dSLionel Sambuc /* count */ 4,
2397*0a6a1f1dSLionel Sambuc /* ext */ &xcb_xfixes_id,
2398*0a6a1f1dSLionel Sambuc /* opcode */ XCB_XFIXES_CREATE_POINTER_BARRIER,
2399*0a6a1f1dSLionel Sambuc /* isvoid */ 1
2400*0a6a1f1dSLionel Sambuc };
2401*0a6a1f1dSLionel Sambuc
2402*0a6a1f1dSLionel Sambuc struct iovec xcb_parts[6];
2403*0a6a1f1dSLionel Sambuc xcb_void_cookie_t xcb_ret;
2404*0a6a1f1dSLionel Sambuc xcb_xfixes_create_pointer_barrier_request_t xcb_out;
2405*0a6a1f1dSLionel Sambuc
2406*0a6a1f1dSLionel Sambuc xcb_out.barrier = barrier;
2407*0a6a1f1dSLionel Sambuc xcb_out.window = window;
2408*0a6a1f1dSLionel Sambuc xcb_out.x1 = x1;
2409*0a6a1f1dSLionel Sambuc xcb_out.y1 = y1;
2410*0a6a1f1dSLionel Sambuc xcb_out.x2 = x2;
2411*0a6a1f1dSLionel Sambuc xcb_out.y2 = y2;
2412*0a6a1f1dSLionel Sambuc xcb_out.directions = directions;
2413*0a6a1f1dSLionel Sambuc memset(xcb_out.pad0, 0, 2);
2414*0a6a1f1dSLionel Sambuc xcb_out.num_devices = num_devices;
2415*0a6a1f1dSLionel Sambuc
2416*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2417*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2418*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_base = 0;
2419*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2420*0a6a1f1dSLionel Sambuc /* uint16_t devices */
2421*0a6a1f1dSLionel Sambuc xcb_parts[4].iov_base = (char *) devices;
2422*0a6a1f1dSLionel Sambuc xcb_parts[4].iov_len = num_devices * sizeof(uint16_t);
2423*0a6a1f1dSLionel Sambuc xcb_parts[5].iov_base = 0;
2424*0a6a1f1dSLionel Sambuc xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2425*0a6a1f1dSLionel Sambuc
2426*0a6a1f1dSLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2427*0a6a1f1dSLionel Sambuc return xcb_ret;
2428*0a6a1f1dSLionel Sambuc }
2429*0a6a1f1dSLionel Sambuc
2430*0a6a1f1dSLionel Sambuc xcb_void_cookie_t
xcb_xfixes_delete_pointer_barrier_checked(xcb_connection_t * c,xcb_xfixes_barrier_t barrier)2431*0a6a1f1dSLionel Sambuc xcb_xfixes_delete_pointer_barrier_checked (xcb_connection_t *c /**< */,
2432*0a6a1f1dSLionel Sambuc xcb_xfixes_barrier_t barrier /**< */)
2433*0a6a1f1dSLionel Sambuc {
2434*0a6a1f1dSLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2435*0a6a1f1dSLionel Sambuc /* count */ 2,
2436*0a6a1f1dSLionel Sambuc /* ext */ &xcb_xfixes_id,
2437*0a6a1f1dSLionel Sambuc /* opcode */ XCB_XFIXES_DELETE_POINTER_BARRIER,
2438*0a6a1f1dSLionel Sambuc /* isvoid */ 1
2439*0a6a1f1dSLionel Sambuc };
2440*0a6a1f1dSLionel Sambuc
2441*0a6a1f1dSLionel Sambuc struct iovec xcb_parts[4];
2442*0a6a1f1dSLionel Sambuc xcb_void_cookie_t xcb_ret;
2443*0a6a1f1dSLionel Sambuc xcb_xfixes_delete_pointer_barrier_request_t xcb_out;
2444*0a6a1f1dSLionel Sambuc
2445*0a6a1f1dSLionel Sambuc xcb_out.barrier = barrier;
2446*0a6a1f1dSLionel Sambuc
2447*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2448*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2449*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_base = 0;
2450*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2451*0a6a1f1dSLionel Sambuc
2452*0a6a1f1dSLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2453*0a6a1f1dSLionel Sambuc return xcb_ret;
2454*0a6a1f1dSLionel Sambuc }
2455*0a6a1f1dSLionel Sambuc
2456*0a6a1f1dSLionel Sambuc xcb_void_cookie_t
xcb_xfixes_delete_pointer_barrier(xcb_connection_t * c,xcb_xfixes_barrier_t barrier)2457*0a6a1f1dSLionel Sambuc xcb_xfixes_delete_pointer_barrier (xcb_connection_t *c /**< */,
2458*0a6a1f1dSLionel Sambuc xcb_xfixes_barrier_t barrier /**< */)
2459*0a6a1f1dSLionel Sambuc {
2460*0a6a1f1dSLionel Sambuc static const xcb_protocol_request_t xcb_req = {
2461*0a6a1f1dSLionel Sambuc /* count */ 2,
2462*0a6a1f1dSLionel Sambuc /* ext */ &xcb_xfixes_id,
2463*0a6a1f1dSLionel Sambuc /* opcode */ XCB_XFIXES_DELETE_POINTER_BARRIER,
2464*0a6a1f1dSLionel Sambuc /* isvoid */ 1
2465*0a6a1f1dSLionel Sambuc };
2466*0a6a1f1dSLionel Sambuc
2467*0a6a1f1dSLionel Sambuc struct iovec xcb_parts[4];
2468*0a6a1f1dSLionel Sambuc xcb_void_cookie_t xcb_ret;
2469*0a6a1f1dSLionel Sambuc xcb_xfixes_delete_pointer_barrier_request_t xcb_out;
2470*0a6a1f1dSLionel Sambuc
2471*0a6a1f1dSLionel Sambuc xcb_out.barrier = barrier;
2472*0a6a1f1dSLionel Sambuc
2473*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
2474*0a6a1f1dSLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
2475*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_base = 0;
2476*0a6a1f1dSLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2477*0a6a1f1dSLionel Sambuc
2478*0a6a1f1dSLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2479*0a6a1f1dSLionel Sambuc return xcb_ret;
2480*0a6a1f1dSLionel Sambuc }
2481*0a6a1f1dSLionel Sambuc
2482