etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / lib / libxcb / files / dpms.c
blob66af6bec768874c4af9f5f8894448b6106656dd9
1 /*
2 * This file generated automatically from dpms.xml by c_client.py.
3 * Edit at your peril.
4 */
6 #ifdef HAVE_CONFIG_H
7 #include "config.h"
8 #endif
9 #include <stdlib.h>
10 #include <string.h>
11 #include <assert.h>
12 #include <stddef.h> /* for offsetof() */
13 #include "xcbext.h"
14 #include "dpms.h"
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
18 xcb_extension_t xcb_dpms_id = { "DPMS", 0 };
20 xcb_dpms_get_version_cookie_t
21 xcb_dpms_get_version (xcb_connection_t *c /**< */,
22 uint16_t client_major_version /**< */,
23 uint16_t client_minor_version /**< */)
25 static const xcb_protocol_request_t xcb_req = {
26 /* count */ 2,
27 /* ext */ &xcb_dpms_id,
28 /* opcode */ XCB_DPMS_GET_VERSION,
29 /* isvoid */ 0
32 struct iovec xcb_parts[4];
33 xcb_dpms_get_version_cookie_t xcb_ret;
34 xcb_dpms_get_version_request_t xcb_out;
36 xcb_out.client_major_version = client_major_version;
37 xcb_out.client_minor_version = client_minor_version;
39 xcb_parts[2].iov_base = (char *) &xcb_out;
40 xcb_parts[2].iov_len = sizeof(xcb_out);
41 xcb_parts[3].iov_base = 0;
42 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
44 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
45 return xcb_ret;
48 xcb_dpms_get_version_cookie_t
49 xcb_dpms_get_version_unchecked (xcb_connection_t *c /**< */,
50 uint16_t client_major_version /**< */,
51 uint16_t client_minor_version /**< */)
53 static const xcb_protocol_request_t xcb_req = {
54 /* count */ 2,
55 /* ext */ &xcb_dpms_id,
56 /* opcode */ XCB_DPMS_GET_VERSION,
57 /* isvoid */ 0
60 struct iovec xcb_parts[4];
61 xcb_dpms_get_version_cookie_t xcb_ret;
62 xcb_dpms_get_version_request_t xcb_out;
64 xcb_out.client_major_version = client_major_version;
65 xcb_out.client_minor_version = client_minor_version;
67 xcb_parts[2].iov_base = (char *) &xcb_out;
68 xcb_parts[2].iov_len = sizeof(xcb_out);
69 xcb_parts[3].iov_base = 0;
70 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
72 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
73 return xcb_ret;
76 xcb_dpms_get_version_reply_t *
77 xcb_dpms_get_version_reply (xcb_connection_t *c /**< */,
78 xcb_dpms_get_version_cookie_t cookie /**< */,
79 xcb_generic_error_t **e /**< */)
81 return (xcb_dpms_get_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
84 xcb_dpms_capable_cookie_t
85 xcb_dpms_capable (xcb_connection_t *c /**< */)
87 static const xcb_protocol_request_t xcb_req = {
88 /* count */ 2,
89 /* ext */ &xcb_dpms_id,
90 /* opcode */ XCB_DPMS_CAPABLE,
91 /* isvoid */ 0
94 struct iovec xcb_parts[4];
95 xcb_dpms_capable_cookie_t xcb_ret;
96 xcb_dpms_capable_request_t xcb_out;
99 xcb_parts[2].iov_base = (char *) &xcb_out;
100 xcb_parts[2].iov_len = sizeof(xcb_out);
101 xcb_parts[3].iov_base = 0;
102 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
104 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
105 return xcb_ret;
108 xcb_dpms_capable_cookie_t
109 xcb_dpms_capable_unchecked (xcb_connection_t *c /**< */)
111 static const xcb_protocol_request_t xcb_req = {
112 /* count */ 2,
113 /* ext */ &xcb_dpms_id,
114 /* opcode */ XCB_DPMS_CAPABLE,
115 /* isvoid */ 0
118 struct iovec xcb_parts[4];
119 xcb_dpms_capable_cookie_t xcb_ret;
120 xcb_dpms_capable_request_t xcb_out;
123 xcb_parts[2].iov_base = (char *) &xcb_out;
124 xcb_parts[2].iov_len = sizeof(xcb_out);
125 xcb_parts[3].iov_base = 0;
126 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
128 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
129 return xcb_ret;
132 xcb_dpms_capable_reply_t *
133 xcb_dpms_capable_reply (xcb_connection_t *c /**< */,
134 xcb_dpms_capable_cookie_t cookie /**< */,
135 xcb_generic_error_t **e /**< */)
137 return (xcb_dpms_capable_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
140 xcb_dpms_get_timeouts_cookie_t
141 xcb_dpms_get_timeouts (xcb_connection_t *c /**< */)
143 static const xcb_protocol_request_t xcb_req = {
144 /* count */ 2,
145 /* ext */ &xcb_dpms_id,
146 /* opcode */ XCB_DPMS_GET_TIMEOUTS,
147 /* isvoid */ 0
150 struct iovec xcb_parts[4];
151 xcb_dpms_get_timeouts_cookie_t xcb_ret;
152 xcb_dpms_get_timeouts_request_t xcb_out;
155 xcb_parts[2].iov_base = (char *) &xcb_out;
156 xcb_parts[2].iov_len = sizeof(xcb_out);
157 xcb_parts[3].iov_base = 0;
158 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
160 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
161 return xcb_ret;
164 xcb_dpms_get_timeouts_cookie_t
165 xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c /**< */)
167 static const xcb_protocol_request_t xcb_req = {
168 /* count */ 2,
169 /* ext */ &xcb_dpms_id,
170 /* opcode */ XCB_DPMS_GET_TIMEOUTS,
171 /* isvoid */ 0
174 struct iovec xcb_parts[4];
175 xcb_dpms_get_timeouts_cookie_t xcb_ret;
176 xcb_dpms_get_timeouts_request_t xcb_out;
179 xcb_parts[2].iov_base = (char *) &xcb_out;
180 xcb_parts[2].iov_len = sizeof(xcb_out);
181 xcb_parts[3].iov_base = 0;
182 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
184 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
185 return xcb_ret;
188 xcb_dpms_get_timeouts_reply_t *
189 xcb_dpms_get_timeouts_reply (xcb_connection_t *c /**< */,
190 xcb_dpms_get_timeouts_cookie_t cookie /**< */,
191 xcb_generic_error_t **e /**< */)
193 return (xcb_dpms_get_timeouts_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
196 xcb_void_cookie_t
197 xcb_dpms_set_timeouts_checked (xcb_connection_t *c /**< */,
198 uint16_t standby_timeout /**< */,
199 uint16_t suspend_timeout /**< */,
200 uint16_t off_timeout /**< */)
202 static const xcb_protocol_request_t xcb_req = {
203 /* count */ 2,
204 /* ext */ &xcb_dpms_id,
205 /* opcode */ XCB_DPMS_SET_TIMEOUTS,
206 /* isvoid */ 1
209 struct iovec xcb_parts[4];
210 xcb_void_cookie_t xcb_ret;
211 xcb_dpms_set_timeouts_request_t xcb_out;
213 xcb_out.standby_timeout = standby_timeout;
214 xcb_out.suspend_timeout = suspend_timeout;
215 xcb_out.off_timeout = off_timeout;
217 xcb_parts[2].iov_base = (char *) &xcb_out;
218 xcb_parts[2].iov_len = sizeof(xcb_out);
219 xcb_parts[3].iov_base = 0;
220 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
222 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
223 return xcb_ret;
226 xcb_void_cookie_t
227 xcb_dpms_set_timeouts (xcb_connection_t *c /**< */,
228 uint16_t standby_timeout /**< */,
229 uint16_t suspend_timeout /**< */,
230 uint16_t off_timeout /**< */)
232 static const xcb_protocol_request_t xcb_req = {
233 /* count */ 2,
234 /* ext */ &xcb_dpms_id,
235 /* opcode */ XCB_DPMS_SET_TIMEOUTS,
236 /* isvoid */ 1
239 struct iovec xcb_parts[4];
240 xcb_void_cookie_t xcb_ret;
241 xcb_dpms_set_timeouts_request_t xcb_out;
243 xcb_out.standby_timeout = standby_timeout;
244 xcb_out.suspend_timeout = suspend_timeout;
245 xcb_out.off_timeout = off_timeout;
247 xcb_parts[2].iov_base = (char *) &xcb_out;
248 xcb_parts[2].iov_len = sizeof(xcb_out);
249 xcb_parts[3].iov_base = 0;
250 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
252 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
253 return xcb_ret;
256 xcb_void_cookie_t
257 xcb_dpms_enable_checked (xcb_connection_t *c /**< */)
259 static const xcb_protocol_request_t xcb_req = {
260 /* count */ 2,
261 /* ext */ &xcb_dpms_id,
262 /* opcode */ XCB_DPMS_ENABLE,
263 /* isvoid */ 1
266 struct iovec xcb_parts[4];
267 xcb_void_cookie_t xcb_ret;
268 xcb_dpms_enable_request_t xcb_out;
271 xcb_parts[2].iov_base = (char *) &xcb_out;
272 xcb_parts[2].iov_len = sizeof(xcb_out);
273 xcb_parts[3].iov_base = 0;
274 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
276 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
277 return xcb_ret;
280 xcb_void_cookie_t
281 xcb_dpms_enable (xcb_connection_t *c /**< */)
283 static const xcb_protocol_request_t xcb_req = {
284 /* count */ 2,
285 /* ext */ &xcb_dpms_id,
286 /* opcode */ XCB_DPMS_ENABLE,
287 /* isvoid */ 1
290 struct iovec xcb_parts[4];
291 xcb_void_cookie_t xcb_ret;
292 xcb_dpms_enable_request_t xcb_out;
295 xcb_parts[2].iov_base = (char *) &xcb_out;
296 xcb_parts[2].iov_len = sizeof(xcb_out);
297 xcb_parts[3].iov_base = 0;
298 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
300 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
301 return xcb_ret;
304 xcb_void_cookie_t
305 xcb_dpms_disable_checked (xcb_connection_t *c /**< */)
307 static const xcb_protocol_request_t xcb_req = {
308 /* count */ 2,
309 /* ext */ &xcb_dpms_id,
310 /* opcode */ XCB_DPMS_DISABLE,
311 /* isvoid */ 1
314 struct iovec xcb_parts[4];
315 xcb_void_cookie_t xcb_ret;
316 xcb_dpms_disable_request_t xcb_out;
319 xcb_parts[2].iov_base = (char *) &xcb_out;
320 xcb_parts[2].iov_len = sizeof(xcb_out);
321 xcb_parts[3].iov_base = 0;
322 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
324 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
325 return xcb_ret;
328 xcb_void_cookie_t
329 xcb_dpms_disable (xcb_connection_t *c /**< */)
331 static const xcb_protocol_request_t xcb_req = {
332 /* count */ 2,
333 /* ext */ &xcb_dpms_id,
334 /* opcode */ XCB_DPMS_DISABLE,
335 /* isvoid */ 1
338 struct iovec xcb_parts[4];
339 xcb_void_cookie_t xcb_ret;
340 xcb_dpms_disable_request_t xcb_out;
343 xcb_parts[2].iov_base = (char *) &xcb_out;
344 xcb_parts[2].iov_len = sizeof(xcb_out);
345 xcb_parts[3].iov_base = 0;
346 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
348 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
349 return xcb_ret;
352 xcb_void_cookie_t
353 xcb_dpms_force_level_checked (xcb_connection_t *c /**< */,
354 uint16_t power_level /**< */)
356 static const xcb_protocol_request_t xcb_req = {
357 /* count */ 2,
358 /* ext */ &xcb_dpms_id,
359 /* opcode */ XCB_DPMS_FORCE_LEVEL,
360 /* isvoid */ 1
363 struct iovec xcb_parts[4];
364 xcb_void_cookie_t xcb_ret;
365 xcb_dpms_force_level_request_t xcb_out;
367 xcb_out.power_level = power_level;
369 xcb_parts[2].iov_base = (char *) &xcb_out;
370 xcb_parts[2].iov_len = sizeof(xcb_out);
371 xcb_parts[3].iov_base = 0;
372 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
374 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
375 return xcb_ret;
378 xcb_void_cookie_t
379 xcb_dpms_force_level (xcb_connection_t *c /**< */,
380 uint16_t power_level /**< */)
382 static const xcb_protocol_request_t xcb_req = {
383 /* count */ 2,
384 /* ext */ &xcb_dpms_id,
385 /* opcode */ XCB_DPMS_FORCE_LEVEL,
386 /* isvoid */ 1
389 struct iovec xcb_parts[4];
390 xcb_void_cookie_t xcb_ret;
391 xcb_dpms_force_level_request_t xcb_out;
393 xcb_out.power_level = power_level;
395 xcb_parts[2].iov_base = (char *) &xcb_out;
396 xcb_parts[2].iov_len = sizeof(xcb_out);
397 xcb_parts[3].iov_base = 0;
398 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
400 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
401 return xcb_ret;
404 xcb_dpms_info_cookie_t
405 xcb_dpms_info (xcb_connection_t *c /**< */)
407 static const xcb_protocol_request_t xcb_req = {
408 /* count */ 2,
409 /* ext */ &xcb_dpms_id,
410 /* opcode */ XCB_DPMS_INFO,
411 /* isvoid */ 0
414 struct iovec xcb_parts[4];
415 xcb_dpms_info_cookie_t xcb_ret;
416 xcb_dpms_info_request_t xcb_out;
419 xcb_parts[2].iov_base = (char *) &xcb_out;
420 xcb_parts[2].iov_len = sizeof(xcb_out);
421 xcb_parts[3].iov_base = 0;
422 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
424 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
425 return xcb_ret;
428 xcb_dpms_info_cookie_t
429 xcb_dpms_info_unchecked (xcb_connection_t *c /**< */)
431 static const xcb_protocol_request_t xcb_req = {
432 /* count */ 2,
433 /* ext */ &xcb_dpms_id,
434 /* opcode */ XCB_DPMS_INFO,
435 /* isvoid */ 0
438 struct iovec xcb_parts[4];
439 xcb_dpms_info_cookie_t xcb_ret;
440 xcb_dpms_info_request_t xcb_out;
443 xcb_parts[2].iov_base = (char *) &xcb_out;
444 xcb_parts[2].iov_len = sizeof(xcb_out);
445 xcb_parts[3].iov_base = 0;
446 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
448 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
449 return xcb_ret;
452 xcb_dpms_info_reply_t *
453 xcb_dpms_info_reply (xcb_connection_t *c /**< */,
454 xcb_dpms_info_cookie_t cookie /**< */,
455 xcb_generic_error_t **e /**< */)
457 return (xcb_dpms_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);