xref: /minix3/external/mit/xorg/lib/libxcb/files/composite.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*971bb1a5SLionel Sambuc /*
2*971bb1a5SLionel Sambuc  * This file generated automatically from composite.xml by c_client.py.
3*971bb1a5SLionel Sambuc  * Edit at your peril.
4*971bb1a5SLionel Sambuc  */
5*971bb1a5SLionel Sambuc 
6*971bb1a5SLionel Sambuc #ifdef HAVE_CONFIG_H
7*971bb1a5SLionel Sambuc #include "config.h"
8*971bb1a5SLionel Sambuc #endif
9*971bb1a5SLionel Sambuc #include <stdlib.h>
10*971bb1a5SLionel Sambuc #include <string.h>
11*971bb1a5SLionel Sambuc #include <assert.h>
12*971bb1a5SLionel Sambuc #include <stddef.h>  /* for offsetof() */
13*971bb1a5SLionel Sambuc #include "xcbext.h"
14*971bb1a5SLionel Sambuc #include "composite.h"
15*971bb1a5SLionel Sambuc 
16*971bb1a5SLionel Sambuc #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17*971bb1a5SLionel Sambuc #include "xproto.h"
18*971bb1a5SLionel Sambuc #include "xfixes.h"
19*971bb1a5SLionel Sambuc 
20*971bb1a5SLionel Sambuc xcb_extension_t xcb_composite_id = { "Composite", 0 };
21*971bb1a5SLionel Sambuc 
22*971bb1a5SLionel Sambuc xcb_composite_query_version_cookie_t
xcb_composite_query_version(xcb_connection_t * c,uint32_t client_major_version,uint32_t client_minor_version)23*971bb1a5SLionel Sambuc xcb_composite_query_version (xcb_connection_t *c  /**< */,
24*971bb1a5SLionel Sambuc                              uint32_t          client_major_version  /**< */,
25*971bb1a5SLionel Sambuc                              uint32_t          client_minor_version  /**< */)
26*971bb1a5SLionel Sambuc {
27*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
28*971bb1a5SLionel Sambuc         /* count */ 2,
29*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
30*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_QUERY_VERSION,
31*971bb1a5SLionel Sambuc         /* isvoid */ 0
32*971bb1a5SLionel Sambuc     };
33*971bb1a5SLionel Sambuc 
34*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
35*971bb1a5SLionel Sambuc     xcb_composite_query_version_cookie_t xcb_ret;
36*971bb1a5SLionel Sambuc     xcb_composite_query_version_request_t xcb_out;
37*971bb1a5SLionel Sambuc 
38*971bb1a5SLionel Sambuc     xcb_out.client_major_version = client_major_version;
39*971bb1a5SLionel Sambuc     xcb_out.client_minor_version = client_minor_version;
40*971bb1a5SLionel Sambuc 
41*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
42*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
43*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
44*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
45*971bb1a5SLionel Sambuc 
46*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
47*971bb1a5SLionel Sambuc     return xcb_ret;
48*971bb1a5SLionel Sambuc }
49*971bb1a5SLionel Sambuc 
50*971bb1a5SLionel Sambuc xcb_composite_query_version_cookie_t
xcb_composite_query_version_unchecked(xcb_connection_t * c,uint32_t client_major_version,uint32_t client_minor_version)51*971bb1a5SLionel Sambuc xcb_composite_query_version_unchecked (xcb_connection_t *c  /**< */,
52*971bb1a5SLionel Sambuc                                        uint32_t          client_major_version  /**< */,
53*971bb1a5SLionel Sambuc                                        uint32_t          client_minor_version  /**< */)
54*971bb1a5SLionel Sambuc {
55*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
56*971bb1a5SLionel Sambuc         /* count */ 2,
57*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
58*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_QUERY_VERSION,
59*971bb1a5SLionel Sambuc         /* isvoid */ 0
60*971bb1a5SLionel Sambuc     };
61*971bb1a5SLionel Sambuc 
62*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
63*971bb1a5SLionel Sambuc     xcb_composite_query_version_cookie_t xcb_ret;
64*971bb1a5SLionel Sambuc     xcb_composite_query_version_request_t xcb_out;
65*971bb1a5SLionel Sambuc 
66*971bb1a5SLionel Sambuc     xcb_out.client_major_version = client_major_version;
67*971bb1a5SLionel Sambuc     xcb_out.client_minor_version = client_minor_version;
68*971bb1a5SLionel Sambuc 
69*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
70*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
71*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
72*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
73*971bb1a5SLionel Sambuc 
74*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
75*971bb1a5SLionel Sambuc     return xcb_ret;
76*971bb1a5SLionel Sambuc }
77*971bb1a5SLionel Sambuc 
78*971bb1a5SLionel Sambuc xcb_composite_query_version_reply_t *
xcb_composite_query_version_reply(xcb_connection_t * c,xcb_composite_query_version_cookie_t cookie,xcb_generic_error_t ** e)79*971bb1a5SLionel Sambuc xcb_composite_query_version_reply (xcb_connection_t                      *c  /**< */,
80*971bb1a5SLionel Sambuc                                    xcb_composite_query_version_cookie_t   cookie  /**< */,
81*971bb1a5SLionel Sambuc                                    xcb_generic_error_t                  **e  /**< */)
82*971bb1a5SLionel Sambuc {
83*971bb1a5SLionel Sambuc     return (xcb_composite_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
84*971bb1a5SLionel Sambuc }
85*971bb1a5SLionel Sambuc 
86*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_redirect_window_checked(xcb_connection_t * c,xcb_window_t window,uint8_t update)87*971bb1a5SLionel Sambuc xcb_composite_redirect_window_checked (xcb_connection_t *c  /**< */,
88*971bb1a5SLionel Sambuc                                        xcb_window_t      window  /**< */,
89*971bb1a5SLionel Sambuc                                        uint8_t           update  /**< */)
90*971bb1a5SLionel Sambuc {
91*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
92*971bb1a5SLionel Sambuc         /* count */ 2,
93*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
94*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_REDIRECT_WINDOW,
95*971bb1a5SLionel Sambuc         /* isvoid */ 1
96*971bb1a5SLionel Sambuc     };
97*971bb1a5SLionel Sambuc 
98*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
99*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
100*971bb1a5SLionel Sambuc     xcb_composite_redirect_window_request_t xcb_out;
101*971bb1a5SLionel Sambuc 
102*971bb1a5SLionel Sambuc     xcb_out.window = window;
103*971bb1a5SLionel Sambuc     xcb_out.update = update;
104*971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
105*971bb1a5SLionel Sambuc 
106*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
107*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
108*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
109*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
110*971bb1a5SLionel Sambuc 
111*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
112*971bb1a5SLionel Sambuc     return xcb_ret;
113*971bb1a5SLionel Sambuc }
114*971bb1a5SLionel Sambuc 
115*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_redirect_window(xcb_connection_t * c,xcb_window_t window,uint8_t update)116*971bb1a5SLionel Sambuc xcb_composite_redirect_window (xcb_connection_t *c  /**< */,
117*971bb1a5SLionel Sambuc                                xcb_window_t      window  /**< */,
118*971bb1a5SLionel Sambuc                                uint8_t           update  /**< */)
119*971bb1a5SLionel Sambuc {
120*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
121*971bb1a5SLionel Sambuc         /* count */ 2,
122*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
123*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_REDIRECT_WINDOW,
124*971bb1a5SLionel Sambuc         /* isvoid */ 1
125*971bb1a5SLionel Sambuc     };
126*971bb1a5SLionel Sambuc 
127*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
128*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
129*971bb1a5SLionel Sambuc     xcb_composite_redirect_window_request_t xcb_out;
130*971bb1a5SLionel Sambuc 
131*971bb1a5SLionel Sambuc     xcb_out.window = window;
132*971bb1a5SLionel Sambuc     xcb_out.update = update;
133*971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
134*971bb1a5SLionel Sambuc 
135*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
136*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
137*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
138*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
139*971bb1a5SLionel Sambuc 
140*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
141*971bb1a5SLionel Sambuc     return xcb_ret;
142*971bb1a5SLionel Sambuc }
143*971bb1a5SLionel Sambuc 
144*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_redirect_subwindows_checked(xcb_connection_t * c,xcb_window_t window,uint8_t update)145*971bb1a5SLionel Sambuc xcb_composite_redirect_subwindows_checked (xcb_connection_t *c  /**< */,
146*971bb1a5SLionel Sambuc                                            xcb_window_t      window  /**< */,
147*971bb1a5SLionel Sambuc                                            uint8_t           update  /**< */)
148*971bb1a5SLionel Sambuc {
149*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
150*971bb1a5SLionel Sambuc         /* count */ 2,
151*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
152*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_REDIRECT_SUBWINDOWS,
153*971bb1a5SLionel Sambuc         /* isvoid */ 1
154*971bb1a5SLionel Sambuc     };
155*971bb1a5SLionel Sambuc 
156*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
157*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
158*971bb1a5SLionel Sambuc     xcb_composite_redirect_subwindows_request_t xcb_out;
159*971bb1a5SLionel Sambuc 
160*971bb1a5SLionel Sambuc     xcb_out.window = window;
161*971bb1a5SLionel Sambuc     xcb_out.update = update;
162*971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
163*971bb1a5SLionel Sambuc 
164*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
165*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
166*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
167*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
168*971bb1a5SLionel Sambuc 
169*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
170*971bb1a5SLionel Sambuc     return xcb_ret;
171*971bb1a5SLionel Sambuc }
172*971bb1a5SLionel Sambuc 
173*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_redirect_subwindows(xcb_connection_t * c,xcb_window_t window,uint8_t update)174*971bb1a5SLionel Sambuc xcb_composite_redirect_subwindows (xcb_connection_t *c  /**< */,
175*971bb1a5SLionel Sambuc                                    xcb_window_t      window  /**< */,
176*971bb1a5SLionel Sambuc                                    uint8_t           update  /**< */)
177*971bb1a5SLionel Sambuc {
178*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
179*971bb1a5SLionel Sambuc         /* count */ 2,
180*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
181*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_REDIRECT_SUBWINDOWS,
182*971bb1a5SLionel Sambuc         /* isvoid */ 1
183*971bb1a5SLionel Sambuc     };
184*971bb1a5SLionel Sambuc 
185*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
186*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
187*971bb1a5SLionel Sambuc     xcb_composite_redirect_subwindows_request_t xcb_out;
188*971bb1a5SLionel Sambuc 
189*971bb1a5SLionel Sambuc     xcb_out.window = window;
190*971bb1a5SLionel Sambuc     xcb_out.update = update;
191*971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
192*971bb1a5SLionel Sambuc 
193*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
194*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
195*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
196*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
197*971bb1a5SLionel Sambuc 
198*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
199*971bb1a5SLionel Sambuc     return xcb_ret;
200*971bb1a5SLionel Sambuc }
201*971bb1a5SLionel Sambuc 
202*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_unredirect_window_checked(xcb_connection_t * c,xcb_window_t window,uint8_t update)203*971bb1a5SLionel Sambuc xcb_composite_unredirect_window_checked (xcb_connection_t *c  /**< */,
204*971bb1a5SLionel Sambuc                                          xcb_window_t      window  /**< */,
205*971bb1a5SLionel Sambuc                                          uint8_t           update  /**< */)
206*971bb1a5SLionel Sambuc {
207*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
208*971bb1a5SLionel Sambuc         /* count */ 2,
209*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
210*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_UNREDIRECT_WINDOW,
211*971bb1a5SLionel Sambuc         /* isvoid */ 1
212*971bb1a5SLionel Sambuc     };
213*971bb1a5SLionel Sambuc 
214*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
215*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
216*971bb1a5SLionel Sambuc     xcb_composite_unredirect_window_request_t xcb_out;
217*971bb1a5SLionel Sambuc 
218*971bb1a5SLionel Sambuc     xcb_out.window = window;
219*971bb1a5SLionel Sambuc     xcb_out.update = update;
220*971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
221*971bb1a5SLionel Sambuc 
222*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
223*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
224*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
225*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
226*971bb1a5SLionel Sambuc 
227*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
228*971bb1a5SLionel Sambuc     return xcb_ret;
229*971bb1a5SLionel Sambuc }
230*971bb1a5SLionel Sambuc 
231*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_unredirect_window(xcb_connection_t * c,xcb_window_t window,uint8_t update)232*971bb1a5SLionel Sambuc xcb_composite_unredirect_window (xcb_connection_t *c  /**< */,
233*971bb1a5SLionel Sambuc                                  xcb_window_t      window  /**< */,
234*971bb1a5SLionel Sambuc                                  uint8_t           update  /**< */)
235*971bb1a5SLionel Sambuc {
236*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
237*971bb1a5SLionel Sambuc         /* count */ 2,
238*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
239*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_UNREDIRECT_WINDOW,
240*971bb1a5SLionel Sambuc         /* isvoid */ 1
241*971bb1a5SLionel Sambuc     };
242*971bb1a5SLionel Sambuc 
243*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
244*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
245*971bb1a5SLionel Sambuc     xcb_composite_unredirect_window_request_t xcb_out;
246*971bb1a5SLionel Sambuc 
247*971bb1a5SLionel Sambuc     xcb_out.window = window;
248*971bb1a5SLionel Sambuc     xcb_out.update = update;
249*971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
250*971bb1a5SLionel Sambuc 
251*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
252*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
253*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
254*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
255*971bb1a5SLionel Sambuc 
256*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
257*971bb1a5SLionel Sambuc     return xcb_ret;
258*971bb1a5SLionel Sambuc }
259*971bb1a5SLionel Sambuc 
260*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_unredirect_subwindows_checked(xcb_connection_t * c,xcb_window_t window,uint8_t update)261*971bb1a5SLionel Sambuc xcb_composite_unredirect_subwindows_checked (xcb_connection_t *c  /**< */,
262*971bb1a5SLionel Sambuc                                              xcb_window_t      window  /**< */,
263*971bb1a5SLionel Sambuc                                              uint8_t           update  /**< */)
264*971bb1a5SLionel Sambuc {
265*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
266*971bb1a5SLionel Sambuc         /* count */ 2,
267*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
268*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_UNREDIRECT_SUBWINDOWS,
269*971bb1a5SLionel Sambuc         /* isvoid */ 1
270*971bb1a5SLionel Sambuc     };
271*971bb1a5SLionel Sambuc 
272*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
273*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
274*971bb1a5SLionel Sambuc     xcb_composite_unredirect_subwindows_request_t xcb_out;
275*971bb1a5SLionel Sambuc 
276*971bb1a5SLionel Sambuc     xcb_out.window = window;
277*971bb1a5SLionel Sambuc     xcb_out.update = update;
278*971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
279*971bb1a5SLionel Sambuc 
280*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
281*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
282*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
283*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
284*971bb1a5SLionel Sambuc 
285*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
286*971bb1a5SLionel Sambuc     return xcb_ret;
287*971bb1a5SLionel Sambuc }
288*971bb1a5SLionel Sambuc 
289*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_unredirect_subwindows(xcb_connection_t * c,xcb_window_t window,uint8_t update)290*971bb1a5SLionel Sambuc xcb_composite_unredirect_subwindows (xcb_connection_t *c  /**< */,
291*971bb1a5SLionel Sambuc                                      xcb_window_t      window  /**< */,
292*971bb1a5SLionel Sambuc                                      uint8_t           update  /**< */)
293*971bb1a5SLionel Sambuc {
294*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
295*971bb1a5SLionel Sambuc         /* count */ 2,
296*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
297*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_UNREDIRECT_SUBWINDOWS,
298*971bb1a5SLionel Sambuc         /* isvoid */ 1
299*971bb1a5SLionel Sambuc     };
300*971bb1a5SLionel Sambuc 
301*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
302*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
303*971bb1a5SLionel Sambuc     xcb_composite_unredirect_subwindows_request_t xcb_out;
304*971bb1a5SLionel Sambuc 
305*971bb1a5SLionel Sambuc     xcb_out.window = window;
306*971bb1a5SLionel Sambuc     xcb_out.update = update;
307*971bb1a5SLionel Sambuc     memset(xcb_out.pad0, 0, 3);
308*971bb1a5SLionel Sambuc 
309*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
310*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
311*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
312*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
313*971bb1a5SLionel Sambuc 
314*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
315*971bb1a5SLionel Sambuc     return xcb_ret;
316*971bb1a5SLionel Sambuc }
317*971bb1a5SLionel Sambuc 
318*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_create_region_from_border_clip_checked(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_window_t window)319*971bb1a5SLionel Sambuc xcb_composite_create_region_from_border_clip_checked (xcb_connection_t    *c  /**< */,
320*971bb1a5SLionel Sambuc                                                       xcb_xfixes_region_t  region  /**< */,
321*971bb1a5SLionel Sambuc                                                       xcb_window_t         window  /**< */)
322*971bb1a5SLionel Sambuc {
323*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
324*971bb1a5SLionel Sambuc         /* count */ 2,
325*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
326*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_CREATE_REGION_FROM_BORDER_CLIP,
327*971bb1a5SLionel Sambuc         /* isvoid */ 1
328*971bb1a5SLionel Sambuc     };
329*971bb1a5SLionel Sambuc 
330*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
331*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
332*971bb1a5SLionel Sambuc     xcb_composite_create_region_from_border_clip_request_t xcb_out;
333*971bb1a5SLionel Sambuc 
334*971bb1a5SLionel Sambuc     xcb_out.region = region;
335*971bb1a5SLionel Sambuc     xcb_out.window = window;
336*971bb1a5SLionel Sambuc 
337*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
338*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
339*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
340*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
341*971bb1a5SLionel Sambuc 
342*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
343*971bb1a5SLionel Sambuc     return xcb_ret;
344*971bb1a5SLionel Sambuc }
345*971bb1a5SLionel Sambuc 
346*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_create_region_from_border_clip(xcb_connection_t * c,xcb_xfixes_region_t region,xcb_window_t window)347*971bb1a5SLionel Sambuc xcb_composite_create_region_from_border_clip (xcb_connection_t    *c  /**< */,
348*971bb1a5SLionel Sambuc                                               xcb_xfixes_region_t  region  /**< */,
349*971bb1a5SLionel Sambuc                                               xcb_window_t         window  /**< */)
350*971bb1a5SLionel Sambuc {
351*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
352*971bb1a5SLionel Sambuc         /* count */ 2,
353*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
354*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_CREATE_REGION_FROM_BORDER_CLIP,
355*971bb1a5SLionel Sambuc         /* isvoid */ 1
356*971bb1a5SLionel Sambuc     };
357*971bb1a5SLionel Sambuc 
358*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
359*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
360*971bb1a5SLionel Sambuc     xcb_composite_create_region_from_border_clip_request_t xcb_out;
361*971bb1a5SLionel Sambuc 
362*971bb1a5SLionel Sambuc     xcb_out.region = region;
363*971bb1a5SLionel Sambuc     xcb_out.window = window;
364*971bb1a5SLionel Sambuc 
365*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
366*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
367*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
368*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
369*971bb1a5SLionel Sambuc 
370*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
371*971bb1a5SLionel Sambuc     return xcb_ret;
372*971bb1a5SLionel Sambuc }
373*971bb1a5SLionel Sambuc 
374*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_name_window_pixmap_checked(xcb_connection_t * c,xcb_window_t window,xcb_pixmap_t pixmap)375*971bb1a5SLionel Sambuc xcb_composite_name_window_pixmap_checked (xcb_connection_t *c  /**< */,
376*971bb1a5SLionel Sambuc                                           xcb_window_t      window  /**< */,
377*971bb1a5SLionel Sambuc                                           xcb_pixmap_t      pixmap  /**< */)
378*971bb1a5SLionel Sambuc {
379*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
380*971bb1a5SLionel Sambuc         /* count */ 2,
381*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
382*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_NAME_WINDOW_PIXMAP,
383*971bb1a5SLionel Sambuc         /* isvoid */ 1
384*971bb1a5SLionel Sambuc     };
385*971bb1a5SLionel Sambuc 
386*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
387*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
388*971bb1a5SLionel Sambuc     xcb_composite_name_window_pixmap_request_t xcb_out;
389*971bb1a5SLionel Sambuc 
390*971bb1a5SLionel Sambuc     xcb_out.window = window;
391*971bb1a5SLionel Sambuc     xcb_out.pixmap = pixmap;
392*971bb1a5SLionel Sambuc 
393*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
394*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
395*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
396*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
397*971bb1a5SLionel Sambuc 
398*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
399*971bb1a5SLionel Sambuc     return xcb_ret;
400*971bb1a5SLionel Sambuc }
401*971bb1a5SLionel Sambuc 
402*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_name_window_pixmap(xcb_connection_t * c,xcb_window_t window,xcb_pixmap_t pixmap)403*971bb1a5SLionel Sambuc xcb_composite_name_window_pixmap (xcb_connection_t *c  /**< */,
404*971bb1a5SLionel Sambuc                                   xcb_window_t      window  /**< */,
405*971bb1a5SLionel Sambuc                                   xcb_pixmap_t      pixmap  /**< */)
406*971bb1a5SLionel Sambuc {
407*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
408*971bb1a5SLionel Sambuc         /* count */ 2,
409*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
410*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_NAME_WINDOW_PIXMAP,
411*971bb1a5SLionel Sambuc         /* isvoid */ 1
412*971bb1a5SLionel Sambuc     };
413*971bb1a5SLionel Sambuc 
414*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
415*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
416*971bb1a5SLionel Sambuc     xcb_composite_name_window_pixmap_request_t xcb_out;
417*971bb1a5SLionel Sambuc 
418*971bb1a5SLionel Sambuc     xcb_out.window = window;
419*971bb1a5SLionel Sambuc     xcb_out.pixmap = pixmap;
420*971bb1a5SLionel Sambuc 
421*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
422*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
423*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
424*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
425*971bb1a5SLionel Sambuc 
426*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
427*971bb1a5SLionel Sambuc     return xcb_ret;
428*971bb1a5SLionel Sambuc }
429*971bb1a5SLionel Sambuc 
430*971bb1a5SLionel Sambuc xcb_composite_get_overlay_window_cookie_t
xcb_composite_get_overlay_window(xcb_connection_t * c,xcb_window_t window)431*971bb1a5SLionel Sambuc xcb_composite_get_overlay_window (xcb_connection_t *c  /**< */,
432*971bb1a5SLionel Sambuc                                   xcb_window_t      window  /**< */)
433*971bb1a5SLionel Sambuc {
434*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
435*971bb1a5SLionel Sambuc         /* count */ 2,
436*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
437*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_GET_OVERLAY_WINDOW,
438*971bb1a5SLionel Sambuc         /* isvoid */ 0
439*971bb1a5SLionel Sambuc     };
440*971bb1a5SLionel Sambuc 
441*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
442*971bb1a5SLionel Sambuc     xcb_composite_get_overlay_window_cookie_t xcb_ret;
443*971bb1a5SLionel Sambuc     xcb_composite_get_overlay_window_request_t xcb_out;
444*971bb1a5SLionel Sambuc 
445*971bb1a5SLionel Sambuc     xcb_out.window = window;
446*971bb1a5SLionel Sambuc 
447*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
448*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
449*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
450*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
451*971bb1a5SLionel Sambuc 
452*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
453*971bb1a5SLionel Sambuc     return xcb_ret;
454*971bb1a5SLionel Sambuc }
455*971bb1a5SLionel Sambuc 
456*971bb1a5SLionel Sambuc xcb_composite_get_overlay_window_cookie_t
xcb_composite_get_overlay_window_unchecked(xcb_connection_t * c,xcb_window_t window)457*971bb1a5SLionel Sambuc xcb_composite_get_overlay_window_unchecked (xcb_connection_t *c  /**< */,
458*971bb1a5SLionel Sambuc                                             xcb_window_t      window  /**< */)
459*971bb1a5SLionel Sambuc {
460*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
461*971bb1a5SLionel Sambuc         /* count */ 2,
462*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
463*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_GET_OVERLAY_WINDOW,
464*971bb1a5SLionel Sambuc         /* isvoid */ 0
465*971bb1a5SLionel Sambuc     };
466*971bb1a5SLionel Sambuc 
467*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
468*971bb1a5SLionel Sambuc     xcb_composite_get_overlay_window_cookie_t xcb_ret;
469*971bb1a5SLionel Sambuc     xcb_composite_get_overlay_window_request_t xcb_out;
470*971bb1a5SLionel Sambuc 
471*971bb1a5SLionel Sambuc     xcb_out.window = window;
472*971bb1a5SLionel Sambuc 
473*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
474*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
475*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
476*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
477*971bb1a5SLionel Sambuc 
478*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
479*971bb1a5SLionel Sambuc     return xcb_ret;
480*971bb1a5SLionel Sambuc }
481*971bb1a5SLionel Sambuc 
482*971bb1a5SLionel Sambuc xcb_composite_get_overlay_window_reply_t *
xcb_composite_get_overlay_window_reply(xcb_connection_t * c,xcb_composite_get_overlay_window_cookie_t cookie,xcb_generic_error_t ** e)483*971bb1a5SLionel Sambuc xcb_composite_get_overlay_window_reply (xcb_connection_t                           *c  /**< */,
484*971bb1a5SLionel Sambuc                                         xcb_composite_get_overlay_window_cookie_t   cookie  /**< */,
485*971bb1a5SLionel Sambuc                                         xcb_generic_error_t                       **e  /**< */)
486*971bb1a5SLionel Sambuc {
487*971bb1a5SLionel Sambuc     return (xcb_composite_get_overlay_window_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
488*971bb1a5SLionel Sambuc }
489*971bb1a5SLionel Sambuc 
490*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_release_overlay_window_checked(xcb_connection_t * c,xcb_window_t window)491*971bb1a5SLionel Sambuc xcb_composite_release_overlay_window_checked (xcb_connection_t *c  /**< */,
492*971bb1a5SLionel Sambuc                                               xcb_window_t      window  /**< */)
493*971bb1a5SLionel Sambuc {
494*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
495*971bb1a5SLionel Sambuc         /* count */ 2,
496*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
497*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_RELEASE_OVERLAY_WINDOW,
498*971bb1a5SLionel Sambuc         /* isvoid */ 1
499*971bb1a5SLionel Sambuc     };
500*971bb1a5SLionel Sambuc 
501*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
502*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
503*971bb1a5SLionel Sambuc     xcb_composite_release_overlay_window_request_t xcb_out;
504*971bb1a5SLionel Sambuc 
505*971bb1a5SLionel Sambuc     xcb_out.window = window;
506*971bb1a5SLionel Sambuc 
507*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
508*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
509*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
510*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
511*971bb1a5SLionel Sambuc 
512*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
513*971bb1a5SLionel Sambuc     return xcb_ret;
514*971bb1a5SLionel Sambuc }
515*971bb1a5SLionel Sambuc 
516*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_composite_release_overlay_window(xcb_connection_t * c,xcb_window_t window)517*971bb1a5SLionel Sambuc xcb_composite_release_overlay_window (xcb_connection_t *c  /**< */,
518*971bb1a5SLionel Sambuc                                       xcb_window_t      window  /**< */)
519*971bb1a5SLionel Sambuc {
520*971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
521*971bb1a5SLionel Sambuc         /* count */ 2,
522*971bb1a5SLionel Sambuc         /* ext */ &xcb_composite_id,
523*971bb1a5SLionel Sambuc         /* opcode */ XCB_COMPOSITE_RELEASE_OVERLAY_WINDOW,
524*971bb1a5SLionel Sambuc         /* isvoid */ 1
525*971bb1a5SLionel Sambuc     };
526*971bb1a5SLionel Sambuc 
527*971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
528*971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
529*971bb1a5SLionel Sambuc     xcb_composite_release_overlay_window_request_t xcb_out;
530*971bb1a5SLionel Sambuc 
531*971bb1a5SLionel Sambuc     xcb_out.window = window;
532*971bb1a5SLionel Sambuc 
533*971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
534*971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
535*971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
536*971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
537*971bb1a5SLionel Sambuc 
538*971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
539*971bb1a5SLionel Sambuc     return xcb_ret;
540*971bb1a5SLionel Sambuc }
541*971bb1a5SLionel Sambuc 
542