etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / lib / libxcb / files / dpms.h
blobfb2df9dc3276ce0ef92e4db4088a4f2f4ded732f
1 /*
2 * This file generated automatically from dpms.xml by c_client.py.
3 * Edit at your peril.
4 */
6 /**
7 * @defgroup XCB_DPMS_API XCB DPMS API
8 * @brief DPMS XCB Protocol Implementation.
9 * @{
10 **/
12 #ifndef __DPMS_H
13 #define __DPMS_H
15 #include "xcb.h"
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
21 #define XCB_DPMS_MAJOR_VERSION 0
22 #define XCB_DPMS_MINOR_VERSION 0
24 extern xcb_extension_t xcb_dpms_id;
26 /**
27 * @brief xcb_dpms_get_version_cookie_t
28 **/
29 typedef struct xcb_dpms_get_version_cookie_t {
30 unsigned int sequence; /**< */
31 } xcb_dpms_get_version_cookie_t;
33 /** Opcode for xcb_dpms_get_version. */
34 #define XCB_DPMS_GET_VERSION 0
36 /**
37 * @brief xcb_dpms_get_version_request_t
38 **/
39 typedef struct xcb_dpms_get_version_request_t {
40 uint8_t major_opcode; /**< */
41 uint8_t minor_opcode; /**< */
42 uint16_t length; /**< */
43 uint16_t client_major_version; /**< */
44 uint16_t client_minor_version; /**< */
45 } xcb_dpms_get_version_request_t;
47 /**
48 * @brief xcb_dpms_get_version_reply_t
49 **/
50 typedef struct xcb_dpms_get_version_reply_t {
51 uint8_t response_type; /**< */
52 uint8_t pad0; /**< */
53 uint16_t sequence; /**< */
54 uint32_t length; /**< */
55 uint16_t server_major_version; /**< */
56 uint16_t server_minor_version; /**< */
57 } xcb_dpms_get_version_reply_t;
59 /**
60 * @brief xcb_dpms_capable_cookie_t
61 **/
62 typedef struct xcb_dpms_capable_cookie_t {
63 unsigned int sequence; /**< */
64 } xcb_dpms_capable_cookie_t;
66 /** Opcode for xcb_dpms_capable. */
67 #define XCB_DPMS_CAPABLE 1
69 /**
70 * @brief xcb_dpms_capable_request_t
71 **/
72 typedef struct xcb_dpms_capable_request_t {
73 uint8_t major_opcode; /**< */
74 uint8_t minor_opcode; /**< */
75 uint16_t length; /**< */
76 } xcb_dpms_capable_request_t;
78 /**
79 * @brief xcb_dpms_capable_reply_t
80 **/
81 typedef struct xcb_dpms_capable_reply_t {
82 uint8_t response_type; /**< */
83 uint8_t pad0; /**< */
84 uint16_t sequence; /**< */
85 uint32_t length; /**< */
86 uint8_t capable; /**< */
87 uint8_t pad1[23]; /**< */
88 } xcb_dpms_capable_reply_t;
90 /**
91 * @brief xcb_dpms_get_timeouts_cookie_t
92 **/
93 typedef struct xcb_dpms_get_timeouts_cookie_t {
94 unsigned int sequence; /**< */
95 } xcb_dpms_get_timeouts_cookie_t;
97 /** Opcode for xcb_dpms_get_timeouts. */
98 #define XCB_DPMS_GET_TIMEOUTS 2
101 * @brief xcb_dpms_get_timeouts_request_t
103 typedef struct xcb_dpms_get_timeouts_request_t {
104 uint8_t major_opcode; /**< */
105 uint8_t minor_opcode; /**< */
106 uint16_t length; /**< */
107 } xcb_dpms_get_timeouts_request_t;
110 * @brief xcb_dpms_get_timeouts_reply_t
112 typedef struct xcb_dpms_get_timeouts_reply_t {
113 uint8_t response_type; /**< */
114 uint8_t pad0; /**< */
115 uint16_t sequence; /**< */
116 uint32_t length; /**< */
117 uint16_t standby_timeout; /**< */
118 uint16_t suspend_timeout; /**< */
119 uint16_t off_timeout; /**< */
120 uint8_t pad1[18]; /**< */
121 } xcb_dpms_get_timeouts_reply_t;
123 /** Opcode for xcb_dpms_set_timeouts. */
124 #define XCB_DPMS_SET_TIMEOUTS 3
127 * @brief xcb_dpms_set_timeouts_request_t
129 typedef struct xcb_dpms_set_timeouts_request_t {
130 uint8_t major_opcode; /**< */
131 uint8_t minor_opcode; /**< */
132 uint16_t length; /**< */
133 uint16_t standby_timeout; /**< */
134 uint16_t suspend_timeout; /**< */
135 uint16_t off_timeout; /**< */
136 } xcb_dpms_set_timeouts_request_t;
138 /** Opcode for xcb_dpms_enable. */
139 #define XCB_DPMS_ENABLE 4
142 * @brief xcb_dpms_enable_request_t
144 typedef struct xcb_dpms_enable_request_t {
145 uint8_t major_opcode; /**< */
146 uint8_t minor_opcode; /**< */
147 uint16_t length; /**< */
148 } xcb_dpms_enable_request_t;
150 /** Opcode for xcb_dpms_disable. */
151 #define XCB_DPMS_DISABLE 5
154 * @brief xcb_dpms_disable_request_t
156 typedef struct xcb_dpms_disable_request_t {
157 uint8_t major_opcode; /**< */
158 uint8_t minor_opcode; /**< */
159 uint16_t length; /**< */
160 } xcb_dpms_disable_request_t;
162 typedef enum xcb_dpms_dpms_mode_t {
163 XCB_DPMS_DPMS_MODE_ON = 0,
164 XCB_DPMS_DPMS_MODE_STANDBY = 1,
165 XCB_DPMS_DPMS_MODE_SUSPEND = 2,
166 XCB_DPMS_DPMS_MODE_OFF = 3
167 } xcb_dpms_dpms_mode_t;
169 /** Opcode for xcb_dpms_force_level. */
170 #define XCB_DPMS_FORCE_LEVEL 6
173 * @brief xcb_dpms_force_level_request_t
175 typedef struct xcb_dpms_force_level_request_t {
176 uint8_t major_opcode; /**< */
177 uint8_t minor_opcode; /**< */
178 uint16_t length; /**< */
179 uint16_t power_level; /**< */
180 } xcb_dpms_force_level_request_t;
183 * @brief xcb_dpms_info_cookie_t
185 typedef struct xcb_dpms_info_cookie_t {
186 unsigned int sequence; /**< */
187 } xcb_dpms_info_cookie_t;
189 /** Opcode for xcb_dpms_info. */
190 #define XCB_DPMS_INFO 7
193 * @brief xcb_dpms_info_request_t
195 typedef struct xcb_dpms_info_request_t {
196 uint8_t major_opcode; /**< */
197 uint8_t minor_opcode; /**< */
198 uint16_t length; /**< */
199 } xcb_dpms_info_request_t;
202 * @brief xcb_dpms_info_reply_t
204 typedef struct xcb_dpms_info_reply_t {
205 uint8_t response_type; /**< */
206 uint8_t pad0; /**< */
207 uint16_t sequence; /**< */
208 uint32_t length; /**< */
209 uint16_t power_level; /**< */
210 uint8_t state; /**< */
211 uint8_t pad1[21]; /**< */
212 } xcb_dpms_info_reply_t;
216 * @param c The connection
217 * @return A cookie
219 * Delivers a request to the X server.
222 xcb_dpms_get_version_cookie_t
223 xcb_dpms_get_version (xcb_connection_t *c /**< */,
224 uint16_t client_major_version /**< */,
225 uint16_t client_minor_version /**< */);
229 * @param c The connection
230 * @return A cookie
232 * Delivers a request to the X server.
234 * This form can be used only if the request will cause
235 * a reply to be generated. Any returned error will be
236 * placed in the event queue.
238 xcb_dpms_get_version_cookie_t
239 xcb_dpms_get_version_unchecked (xcb_connection_t *c /**< */,
240 uint16_t client_major_version /**< */,
241 uint16_t client_minor_version /**< */);
244 * Return the reply
245 * @param c The connection
246 * @param cookie The cookie
247 * @param e The xcb_generic_error_t supplied
249 * Returns the reply of the request asked by
251 * The parameter @p e supplied to this function must be NULL if
252 * xcb_dpms_get_version_unchecked(). is used.
253 * Otherwise, it stores the error if any.
255 * The returned value must be freed by the caller using free().
257 xcb_dpms_get_version_reply_t *
258 xcb_dpms_get_version_reply (xcb_connection_t *c /**< */,
259 xcb_dpms_get_version_cookie_t cookie /**< */,
260 xcb_generic_error_t **e /**< */);
264 * @param c The connection
265 * @return A cookie
267 * Delivers a request to the X server.
270 xcb_dpms_capable_cookie_t
271 xcb_dpms_capable (xcb_connection_t *c /**< */);
275 * @param c The connection
276 * @return A cookie
278 * Delivers a request to the X server.
280 * This form can be used only if the request will cause
281 * a reply to be generated. Any returned error will be
282 * placed in the event queue.
284 xcb_dpms_capable_cookie_t
285 xcb_dpms_capable_unchecked (xcb_connection_t *c /**< */);
288 * Return the reply
289 * @param c The connection
290 * @param cookie The cookie
291 * @param e The xcb_generic_error_t supplied
293 * Returns the reply of the request asked by
295 * The parameter @p e supplied to this function must be NULL if
296 * xcb_dpms_capable_unchecked(). is used.
297 * Otherwise, it stores the error if any.
299 * The returned value must be freed by the caller using free().
301 xcb_dpms_capable_reply_t *
302 xcb_dpms_capable_reply (xcb_connection_t *c /**< */,
303 xcb_dpms_capable_cookie_t cookie /**< */,
304 xcb_generic_error_t **e /**< */);
308 * @param c The connection
309 * @return A cookie
311 * Delivers a request to the X server.
314 xcb_dpms_get_timeouts_cookie_t
315 xcb_dpms_get_timeouts (xcb_connection_t *c /**< */);
319 * @param c The connection
320 * @return A cookie
322 * Delivers a request to the X server.
324 * This form can be used only if the request will cause
325 * a reply to be generated. Any returned error will be
326 * placed in the event queue.
328 xcb_dpms_get_timeouts_cookie_t
329 xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c /**< */);
332 * Return the reply
333 * @param c The connection
334 * @param cookie The cookie
335 * @param e The xcb_generic_error_t supplied
337 * Returns the reply of the request asked by
339 * The parameter @p e supplied to this function must be NULL if
340 * xcb_dpms_get_timeouts_unchecked(). is used.
341 * Otherwise, it stores the error if any.
343 * The returned value must be freed by the caller using free().
345 xcb_dpms_get_timeouts_reply_t *
346 xcb_dpms_get_timeouts_reply (xcb_connection_t *c /**< */,
347 xcb_dpms_get_timeouts_cookie_t cookie /**< */,
348 xcb_generic_error_t **e /**< */);
352 * @param c The connection
353 * @return A cookie
355 * Delivers a request to the X server.
357 * This form can be used only if the request will not cause
358 * a reply to be generated. Any returned error will be
359 * saved for handling by xcb_request_check().
361 xcb_void_cookie_t
362 xcb_dpms_set_timeouts_checked (xcb_connection_t *c /**< */,
363 uint16_t standby_timeout /**< */,
364 uint16_t suspend_timeout /**< */,
365 uint16_t off_timeout /**< */);
369 * @param c The connection
370 * @return A cookie
372 * Delivers a request to the X server.
375 xcb_void_cookie_t
376 xcb_dpms_set_timeouts (xcb_connection_t *c /**< */,
377 uint16_t standby_timeout /**< */,
378 uint16_t suspend_timeout /**< */,
379 uint16_t off_timeout /**< */);
383 * @param c The connection
384 * @return A cookie
386 * Delivers a request to the X server.
388 * This form can be used only if the request will not cause
389 * a reply to be generated. Any returned error will be
390 * saved for handling by xcb_request_check().
392 xcb_void_cookie_t
393 xcb_dpms_enable_checked (xcb_connection_t *c /**< */);
397 * @param c The connection
398 * @return A cookie
400 * Delivers a request to the X server.
403 xcb_void_cookie_t
404 xcb_dpms_enable (xcb_connection_t *c /**< */);
408 * @param c The connection
409 * @return A cookie
411 * Delivers a request to the X server.
413 * This form can be used only if the request will not cause
414 * a reply to be generated. Any returned error will be
415 * saved for handling by xcb_request_check().
417 xcb_void_cookie_t
418 xcb_dpms_disable_checked (xcb_connection_t *c /**< */);
422 * @param c The connection
423 * @return A cookie
425 * Delivers a request to the X server.
428 xcb_void_cookie_t
429 xcb_dpms_disable (xcb_connection_t *c /**< */);
433 * @param c The connection
434 * @return A cookie
436 * Delivers a request to the X server.
438 * This form can be used only if the request will not cause
439 * a reply to be generated. Any returned error will be
440 * saved for handling by xcb_request_check().
442 xcb_void_cookie_t
443 xcb_dpms_force_level_checked (xcb_connection_t *c /**< */,
444 uint16_t power_level /**< */);
448 * @param c The connection
449 * @return A cookie
451 * Delivers a request to the X server.
454 xcb_void_cookie_t
455 xcb_dpms_force_level (xcb_connection_t *c /**< */,
456 uint16_t power_level /**< */);
460 * @param c The connection
461 * @return A cookie
463 * Delivers a request to the X server.
466 xcb_dpms_info_cookie_t
467 xcb_dpms_info (xcb_connection_t *c /**< */);
471 * @param c The connection
472 * @return A cookie
474 * Delivers a request to the X server.
476 * This form can be used only if the request will cause
477 * a reply to be generated. Any returned error will be
478 * placed in the event queue.
480 xcb_dpms_info_cookie_t
481 xcb_dpms_info_unchecked (xcb_connection_t *c /**< */);
484 * Return the reply
485 * @param c The connection
486 * @param cookie The cookie
487 * @param e The xcb_generic_error_t supplied
489 * Returns the reply of the request asked by
491 * The parameter @p e supplied to this function must be NULL if
492 * xcb_dpms_info_unchecked(). is used.
493 * Otherwise, it stores the error if any.
495 * The returned value must be freed by the caller using free().
497 xcb_dpms_info_reply_t *
498 xcb_dpms_info_reply (xcb_connection_t *c /**< */,
499 xcb_dpms_info_cookie_t cookie /**< */,
500 xcb_generic_error_t **e /**< */);
503 #ifdef __cplusplus
505 #endif
507 #endif
510 * @}