1*971bb1a5SLionel Sambuc /*
2*971bb1a5SLionel Sambuc * This file generated automatically from dpms.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 "dpms.h"
15*971bb1a5SLionel Sambuc
16*971bb1a5SLionel Sambuc #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17*971bb1a5SLionel Sambuc
18*971bb1a5SLionel Sambuc xcb_extension_t xcb_dpms_id = { "DPMS", 0 };
19*971bb1a5SLionel Sambuc
20*971bb1a5SLionel Sambuc xcb_dpms_get_version_cookie_t
xcb_dpms_get_version(xcb_connection_t * c,uint16_t client_major_version,uint16_t client_minor_version)21*971bb1a5SLionel Sambuc xcb_dpms_get_version (xcb_connection_t *c /**< */,
22*971bb1a5SLionel Sambuc uint16_t client_major_version /**< */,
23*971bb1a5SLionel Sambuc uint16_t client_minor_version /**< */)
24*971bb1a5SLionel Sambuc {
25*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
26*971bb1a5SLionel Sambuc /* count */ 2,
27*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
28*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_GET_VERSION,
29*971bb1a5SLionel Sambuc /* isvoid */ 0
30*971bb1a5SLionel Sambuc };
31*971bb1a5SLionel Sambuc
32*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
33*971bb1a5SLionel Sambuc xcb_dpms_get_version_cookie_t xcb_ret;
34*971bb1a5SLionel Sambuc xcb_dpms_get_version_request_t xcb_out;
35*971bb1a5SLionel Sambuc
36*971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
37*971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
38*971bb1a5SLionel Sambuc
39*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
40*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
41*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
42*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
43*971bb1a5SLionel Sambuc
44*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
45*971bb1a5SLionel Sambuc return xcb_ret;
46*971bb1a5SLionel Sambuc }
47*971bb1a5SLionel Sambuc
48*971bb1a5SLionel Sambuc xcb_dpms_get_version_cookie_t
xcb_dpms_get_version_unchecked(xcb_connection_t * c,uint16_t client_major_version,uint16_t client_minor_version)49*971bb1a5SLionel Sambuc xcb_dpms_get_version_unchecked (xcb_connection_t *c /**< */,
50*971bb1a5SLionel Sambuc uint16_t client_major_version /**< */,
51*971bb1a5SLionel Sambuc uint16_t client_minor_version /**< */)
52*971bb1a5SLionel Sambuc {
53*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
54*971bb1a5SLionel Sambuc /* count */ 2,
55*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
56*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_GET_VERSION,
57*971bb1a5SLionel Sambuc /* isvoid */ 0
58*971bb1a5SLionel Sambuc };
59*971bb1a5SLionel Sambuc
60*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
61*971bb1a5SLionel Sambuc xcb_dpms_get_version_cookie_t xcb_ret;
62*971bb1a5SLionel Sambuc xcb_dpms_get_version_request_t xcb_out;
63*971bb1a5SLionel Sambuc
64*971bb1a5SLionel Sambuc xcb_out.client_major_version = client_major_version;
65*971bb1a5SLionel Sambuc xcb_out.client_minor_version = client_minor_version;
66*971bb1a5SLionel Sambuc
67*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
68*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
69*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
70*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
71*971bb1a5SLionel Sambuc
72*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
73*971bb1a5SLionel Sambuc return xcb_ret;
74*971bb1a5SLionel Sambuc }
75*971bb1a5SLionel Sambuc
76*971bb1a5SLionel Sambuc xcb_dpms_get_version_reply_t *
xcb_dpms_get_version_reply(xcb_connection_t * c,xcb_dpms_get_version_cookie_t cookie,xcb_generic_error_t ** e)77*971bb1a5SLionel Sambuc xcb_dpms_get_version_reply (xcb_connection_t *c /**< */,
78*971bb1a5SLionel Sambuc xcb_dpms_get_version_cookie_t cookie /**< */,
79*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
80*971bb1a5SLionel Sambuc {
81*971bb1a5SLionel Sambuc return (xcb_dpms_get_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
82*971bb1a5SLionel Sambuc }
83*971bb1a5SLionel Sambuc
84*971bb1a5SLionel Sambuc xcb_dpms_capable_cookie_t
xcb_dpms_capable(xcb_connection_t * c)85*971bb1a5SLionel Sambuc xcb_dpms_capable (xcb_connection_t *c /**< */)
86*971bb1a5SLionel Sambuc {
87*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
88*971bb1a5SLionel Sambuc /* count */ 2,
89*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
90*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_CAPABLE,
91*971bb1a5SLionel Sambuc /* isvoid */ 0
92*971bb1a5SLionel Sambuc };
93*971bb1a5SLionel Sambuc
94*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
95*971bb1a5SLionel Sambuc xcb_dpms_capable_cookie_t xcb_ret;
96*971bb1a5SLionel Sambuc xcb_dpms_capable_request_t xcb_out;
97*971bb1a5SLionel Sambuc
98*971bb1a5SLionel Sambuc
99*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
100*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
101*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
102*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
103*971bb1a5SLionel Sambuc
104*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
105*971bb1a5SLionel Sambuc return xcb_ret;
106*971bb1a5SLionel Sambuc }
107*971bb1a5SLionel Sambuc
108*971bb1a5SLionel Sambuc xcb_dpms_capable_cookie_t
xcb_dpms_capable_unchecked(xcb_connection_t * c)109*971bb1a5SLionel Sambuc xcb_dpms_capable_unchecked (xcb_connection_t *c /**< */)
110*971bb1a5SLionel Sambuc {
111*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
112*971bb1a5SLionel Sambuc /* count */ 2,
113*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
114*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_CAPABLE,
115*971bb1a5SLionel Sambuc /* isvoid */ 0
116*971bb1a5SLionel Sambuc };
117*971bb1a5SLionel Sambuc
118*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
119*971bb1a5SLionel Sambuc xcb_dpms_capable_cookie_t xcb_ret;
120*971bb1a5SLionel Sambuc xcb_dpms_capable_request_t xcb_out;
121*971bb1a5SLionel Sambuc
122*971bb1a5SLionel Sambuc
123*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
124*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
125*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
126*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
127*971bb1a5SLionel Sambuc
128*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
129*971bb1a5SLionel Sambuc return xcb_ret;
130*971bb1a5SLionel Sambuc }
131*971bb1a5SLionel Sambuc
132*971bb1a5SLionel Sambuc xcb_dpms_capable_reply_t *
xcb_dpms_capable_reply(xcb_connection_t * c,xcb_dpms_capable_cookie_t cookie,xcb_generic_error_t ** e)133*971bb1a5SLionel Sambuc xcb_dpms_capable_reply (xcb_connection_t *c /**< */,
134*971bb1a5SLionel Sambuc xcb_dpms_capable_cookie_t cookie /**< */,
135*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
136*971bb1a5SLionel Sambuc {
137*971bb1a5SLionel Sambuc return (xcb_dpms_capable_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
138*971bb1a5SLionel Sambuc }
139*971bb1a5SLionel Sambuc
140*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_cookie_t
xcb_dpms_get_timeouts(xcb_connection_t * c)141*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts (xcb_connection_t *c /**< */)
142*971bb1a5SLionel Sambuc {
143*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
144*971bb1a5SLionel Sambuc /* count */ 2,
145*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
146*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_GET_TIMEOUTS,
147*971bb1a5SLionel Sambuc /* isvoid */ 0
148*971bb1a5SLionel Sambuc };
149*971bb1a5SLionel Sambuc
150*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
151*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_cookie_t xcb_ret;
152*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_request_t xcb_out;
153*971bb1a5SLionel Sambuc
154*971bb1a5SLionel Sambuc
155*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
156*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
157*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
158*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
159*971bb1a5SLionel Sambuc
160*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
161*971bb1a5SLionel Sambuc return xcb_ret;
162*971bb1a5SLionel Sambuc }
163*971bb1a5SLionel Sambuc
164*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_cookie_t
xcb_dpms_get_timeouts_unchecked(xcb_connection_t * c)165*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c /**< */)
166*971bb1a5SLionel Sambuc {
167*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
168*971bb1a5SLionel Sambuc /* count */ 2,
169*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
170*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_GET_TIMEOUTS,
171*971bb1a5SLionel Sambuc /* isvoid */ 0
172*971bb1a5SLionel Sambuc };
173*971bb1a5SLionel Sambuc
174*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
175*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_cookie_t xcb_ret;
176*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_request_t xcb_out;
177*971bb1a5SLionel Sambuc
178*971bb1a5SLionel Sambuc
179*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
180*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
181*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
182*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
183*971bb1a5SLionel Sambuc
184*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
185*971bb1a5SLionel Sambuc return xcb_ret;
186*971bb1a5SLionel Sambuc }
187*971bb1a5SLionel Sambuc
188*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_reply_t *
xcb_dpms_get_timeouts_reply(xcb_connection_t * c,xcb_dpms_get_timeouts_cookie_t cookie,xcb_generic_error_t ** e)189*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_reply (xcb_connection_t *c /**< */,
190*971bb1a5SLionel Sambuc xcb_dpms_get_timeouts_cookie_t cookie /**< */,
191*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
192*971bb1a5SLionel Sambuc {
193*971bb1a5SLionel Sambuc return (xcb_dpms_get_timeouts_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
194*971bb1a5SLionel Sambuc }
195*971bb1a5SLionel Sambuc
196*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_dpms_set_timeouts_checked(xcb_connection_t * c,uint16_t standby_timeout,uint16_t suspend_timeout,uint16_t off_timeout)197*971bb1a5SLionel Sambuc xcb_dpms_set_timeouts_checked (xcb_connection_t *c /**< */,
198*971bb1a5SLionel Sambuc uint16_t standby_timeout /**< */,
199*971bb1a5SLionel Sambuc uint16_t suspend_timeout /**< */,
200*971bb1a5SLionel Sambuc uint16_t off_timeout /**< */)
201*971bb1a5SLionel Sambuc {
202*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
203*971bb1a5SLionel Sambuc /* count */ 2,
204*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
205*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_SET_TIMEOUTS,
206*971bb1a5SLionel Sambuc /* isvoid */ 1
207*971bb1a5SLionel Sambuc };
208*971bb1a5SLionel Sambuc
209*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
210*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
211*971bb1a5SLionel Sambuc xcb_dpms_set_timeouts_request_t xcb_out;
212*971bb1a5SLionel Sambuc
213*971bb1a5SLionel Sambuc xcb_out.standby_timeout = standby_timeout;
214*971bb1a5SLionel Sambuc xcb_out.suspend_timeout = suspend_timeout;
215*971bb1a5SLionel Sambuc xcb_out.off_timeout = off_timeout;
216*971bb1a5SLionel Sambuc
217*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
218*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
219*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
220*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
221*971bb1a5SLionel Sambuc
222*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
223*971bb1a5SLionel Sambuc return xcb_ret;
224*971bb1a5SLionel Sambuc }
225*971bb1a5SLionel Sambuc
226*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_dpms_set_timeouts(xcb_connection_t * c,uint16_t standby_timeout,uint16_t suspend_timeout,uint16_t off_timeout)227*971bb1a5SLionel Sambuc xcb_dpms_set_timeouts (xcb_connection_t *c /**< */,
228*971bb1a5SLionel Sambuc uint16_t standby_timeout /**< */,
229*971bb1a5SLionel Sambuc uint16_t suspend_timeout /**< */,
230*971bb1a5SLionel Sambuc uint16_t off_timeout /**< */)
231*971bb1a5SLionel Sambuc {
232*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
233*971bb1a5SLionel Sambuc /* count */ 2,
234*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
235*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_SET_TIMEOUTS,
236*971bb1a5SLionel Sambuc /* isvoid */ 1
237*971bb1a5SLionel Sambuc };
238*971bb1a5SLionel Sambuc
239*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
240*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
241*971bb1a5SLionel Sambuc xcb_dpms_set_timeouts_request_t xcb_out;
242*971bb1a5SLionel Sambuc
243*971bb1a5SLionel Sambuc xcb_out.standby_timeout = standby_timeout;
244*971bb1a5SLionel Sambuc xcb_out.suspend_timeout = suspend_timeout;
245*971bb1a5SLionel Sambuc xcb_out.off_timeout = off_timeout;
246*971bb1a5SLionel Sambuc
247*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
248*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
249*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
250*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
251*971bb1a5SLionel Sambuc
252*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
253*971bb1a5SLionel Sambuc return xcb_ret;
254*971bb1a5SLionel Sambuc }
255*971bb1a5SLionel Sambuc
256*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_dpms_enable_checked(xcb_connection_t * c)257*971bb1a5SLionel Sambuc xcb_dpms_enable_checked (xcb_connection_t *c /**< */)
258*971bb1a5SLionel Sambuc {
259*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
260*971bb1a5SLionel Sambuc /* count */ 2,
261*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
262*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_ENABLE,
263*971bb1a5SLionel Sambuc /* isvoid */ 1
264*971bb1a5SLionel Sambuc };
265*971bb1a5SLionel Sambuc
266*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
267*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
268*971bb1a5SLionel Sambuc xcb_dpms_enable_request_t xcb_out;
269*971bb1a5SLionel Sambuc
270*971bb1a5SLionel Sambuc
271*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
272*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
273*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
274*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
275*971bb1a5SLionel Sambuc
276*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
277*971bb1a5SLionel Sambuc return xcb_ret;
278*971bb1a5SLionel Sambuc }
279*971bb1a5SLionel Sambuc
280*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_dpms_enable(xcb_connection_t * c)281*971bb1a5SLionel Sambuc xcb_dpms_enable (xcb_connection_t *c /**< */)
282*971bb1a5SLionel Sambuc {
283*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
284*971bb1a5SLionel Sambuc /* count */ 2,
285*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
286*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_ENABLE,
287*971bb1a5SLionel Sambuc /* isvoid */ 1
288*971bb1a5SLionel Sambuc };
289*971bb1a5SLionel Sambuc
290*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
291*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
292*971bb1a5SLionel Sambuc xcb_dpms_enable_request_t xcb_out;
293*971bb1a5SLionel Sambuc
294*971bb1a5SLionel Sambuc
295*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
296*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
297*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
298*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
299*971bb1a5SLionel Sambuc
300*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
301*971bb1a5SLionel Sambuc return xcb_ret;
302*971bb1a5SLionel Sambuc }
303*971bb1a5SLionel Sambuc
304*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_dpms_disable_checked(xcb_connection_t * c)305*971bb1a5SLionel Sambuc xcb_dpms_disable_checked (xcb_connection_t *c /**< */)
306*971bb1a5SLionel Sambuc {
307*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
308*971bb1a5SLionel Sambuc /* count */ 2,
309*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
310*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_DISABLE,
311*971bb1a5SLionel Sambuc /* isvoid */ 1
312*971bb1a5SLionel Sambuc };
313*971bb1a5SLionel Sambuc
314*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
315*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
316*971bb1a5SLionel Sambuc xcb_dpms_disable_request_t xcb_out;
317*971bb1a5SLionel Sambuc
318*971bb1a5SLionel Sambuc
319*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
320*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
321*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
322*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
323*971bb1a5SLionel Sambuc
324*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
325*971bb1a5SLionel Sambuc return xcb_ret;
326*971bb1a5SLionel Sambuc }
327*971bb1a5SLionel Sambuc
328*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_dpms_disable(xcb_connection_t * c)329*971bb1a5SLionel Sambuc xcb_dpms_disable (xcb_connection_t *c /**< */)
330*971bb1a5SLionel Sambuc {
331*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
332*971bb1a5SLionel Sambuc /* count */ 2,
333*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
334*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_DISABLE,
335*971bb1a5SLionel Sambuc /* isvoid */ 1
336*971bb1a5SLionel Sambuc };
337*971bb1a5SLionel Sambuc
338*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
339*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
340*971bb1a5SLionel Sambuc xcb_dpms_disable_request_t xcb_out;
341*971bb1a5SLionel Sambuc
342*971bb1a5SLionel Sambuc
343*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
344*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
345*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
346*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
347*971bb1a5SLionel Sambuc
348*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
349*971bb1a5SLionel Sambuc return xcb_ret;
350*971bb1a5SLionel Sambuc }
351*971bb1a5SLionel Sambuc
352*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_dpms_force_level_checked(xcb_connection_t * c,uint16_t power_level)353*971bb1a5SLionel Sambuc xcb_dpms_force_level_checked (xcb_connection_t *c /**< */,
354*971bb1a5SLionel Sambuc uint16_t power_level /**< */)
355*971bb1a5SLionel Sambuc {
356*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
357*971bb1a5SLionel Sambuc /* count */ 2,
358*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
359*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_FORCE_LEVEL,
360*971bb1a5SLionel Sambuc /* isvoid */ 1
361*971bb1a5SLionel Sambuc };
362*971bb1a5SLionel Sambuc
363*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
364*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
365*971bb1a5SLionel Sambuc xcb_dpms_force_level_request_t xcb_out;
366*971bb1a5SLionel Sambuc
367*971bb1a5SLionel Sambuc xcb_out.power_level = power_level;
368*971bb1a5SLionel Sambuc
369*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
370*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
371*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
372*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
373*971bb1a5SLionel Sambuc
374*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
375*971bb1a5SLionel Sambuc return xcb_ret;
376*971bb1a5SLionel Sambuc }
377*971bb1a5SLionel Sambuc
378*971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_dpms_force_level(xcb_connection_t * c,uint16_t power_level)379*971bb1a5SLionel Sambuc xcb_dpms_force_level (xcb_connection_t *c /**< */,
380*971bb1a5SLionel Sambuc uint16_t power_level /**< */)
381*971bb1a5SLionel Sambuc {
382*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
383*971bb1a5SLionel Sambuc /* count */ 2,
384*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
385*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_FORCE_LEVEL,
386*971bb1a5SLionel Sambuc /* isvoid */ 1
387*971bb1a5SLionel Sambuc };
388*971bb1a5SLionel Sambuc
389*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
390*971bb1a5SLionel Sambuc xcb_void_cookie_t xcb_ret;
391*971bb1a5SLionel Sambuc xcb_dpms_force_level_request_t xcb_out;
392*971bb1a5SLionel Sambuc
393*971bb1a5SLionel Sambuc xcb_out.power_level = power_level;
394*971bb1a5SLionel Sambuc
395*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
396*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
397*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
398*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
399*971bb1a5SLionel Sambuc
400*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
401*971bb1a5SLionel Sambuc return xcb_ret;
402*971bb1a5SLionel Sambuc }
403*971bb1a5SLionel Sambuc
404*971bb1a5SLionel Sambuc xcb_dpms_info_cookie_t
xcb_dpms_info(xcb_connection_t * c)405*971bb1a5SLionel Sambuc xcb_dpms_info (xcb_connection_t *c /**< */)
406*971bb1a5SLionel Sambuc {
407*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
408*971bb1a5SLionel Sambuc /* count */ 2,
409*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
410*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_INFO,
411*971bb1a5SLionel Sambuc /* isvoid */ 0
412*971bb1a5SLionel Sambuc };
413*971bb1a5SLionel Sambuc
414*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
415*971bb1a5SLionel Sambuc xcb_dpms_info_cookie_t xcb_ret;
416*971bb1a5SLionel Sambuc xcb_dpms_info_request_t xcb_out;
417*971bb1a5SLionel Sambuc
418*971bb1a5SLionel Sambuc
419*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
420*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
421*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
422*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
423*971bb1a5SLionel Sambuc
424*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
425*971bb1a5SLionel Sambuc return xcb_ret;
426*971bb1a5SLionel Sambuc }
427*971bb1a5SLionel Sambuc
428*971bb1a5SLionel Sambuc xcb_dpms_info_cookie_t
xcb_dpms_info_unchecked(xcb_connection_t * c)429*971bb1a5SLionel Sambuc xcb_dpms_info_unchecked (xcb_connection_t *c /**< */)
430*971bb1a5SLionel Sambuc {
431*971bb1a5SLionel Sambuc static const xcb_protocol_request_t xcb_req = {
432*971bb1a5SLionel Sambuc /* count */ 2,
433*971bb1a5SLionel Sambuc /* ext */ &xcb_dpms_id,
434*971bb1a5SLionel Sambuc /* opcode */ XCB_DPMS_INFO,
435*971bb1a5SLionel Sambuc /* isvoid */ 0
436*971bb1a5SLionel Sambuc };
437*971bb1a5SLionel Sambuc
438*971bb1a5SLionel Sambuc struct iovec xcb_parts[4];
439*971bb1a5SLionel Sambuc xcb_dpms_info_cookie_t xcb_ret;
440*971bb1a5SLionel Sambuc xcb_dpms_info_request_t xcb_out;
441*971bb1a5SLionel Sambuc
442*971bb1a5SLionel Sambuc
443*971bb1a5SLionel Sambuc xcb_parts[2].iov_base = (char *) &xcb_out;
444*971bb1a5SLionel Sambuc xcb_parts[2].iov_len = sizeof(xcb_out);
445*971bb1a5SLionel Sambuc xcb_parts[3].iov_base = 0;
446*971bb1a5SLionel Sambuc xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
447*971bb1a5SLionel Sambuc
448*971bb1a5SLionel Sambuc xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
449*971bb1a5SLionel Sambuc return xcb_ret;
450*971bb1a5SLionel Sambuc }
451*971bb1a5SLionel Sambuc
452*971bb1a5SLionel Sambuc xcb_dpms_info_reply_t *
xcb_dpms_info_reply(xcb_connection_t * c,xcb_dpms_info_cookie_t cookie,xcb_generic_error_t ** e)453*971bb1a5SLionel Sambuc xcb_dpms_info_reply (xcb_connection_t *c /**< */,
454*971bb1a5SLionel Sambuc xcb_dpms_info_cookie_t cookie /**< */,
455*971bb1a5SLionel Sambuc xcb_generic_error_t **e /**< */)
456*971bb1a5SLionel Sambuc {
457*971bb1a5SLionel Sambuc return (xcb_dpms_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
458*971bb1a5SLionel Sambuc }
459*971bb1a5SLionel Sambuc
460