dpms.h revision 1.4
1/*
2 * This file generated automatically from dpms.xml by c_client.py.
3 * Edit at your peril.
4 */
5
6/**
7 * @defgroup XCB_DPMS_API XCB DPMS API
8 * @brief DPMS XCB Protocol Implementation.
9 * @{
10 **/
11
12#ifndef __DPMS_H
13#define __DPMS_H
14
15#include "xcb.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define XCB_DPMS_MAJOR_VERSION 0
22#define XCB_DPMS_MINOR_VERSION 0
23
24extern xcb_extension_t xcb_dpms_id;
25
26/**
27 * @brief xcb_dpms_get_version_cookie_t
28 **/
29typedef struct xcb_dpms_get_version_cookie_t {
30    unsigned int sequence; /**<  */
31} xcb_dpms_get_version_cookie_t;
32
33/** Opcode for xcb_dpms_get_version. */
34#define XCB_DPMS_GET_VERSION 0
35
36/**
37 * @brief xcb_dpms_get_version_request_t
38 **/
39typedef 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;
46
47/**
48 * @brief xcb_dpms_get_version_reply_t
49 **/
50typedef 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;
58
59/**
60 * @brief xcb_dpms_capable_cookie_t
61 **/
62typedef struct xcb_dpms_capable_cookie_t {
63    unsigned int sequence; /**<  */
64} xcb_dpms_capable_cookie_t;
65
66/** Opcode for xcb_dpms_capable. */
67#define XCB_DPMS_CAPABLE 1
68
69/**
70 * @brief xcb_dpms_capable_request_t
71 **/
72typedef 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;
77
78/**
79 * @brief xcb_dpms_capable_reply_t
80 **/
81typedef 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;
89
90/**
91 * @brief xcb_dpms_get_timeouts_cookie_t
92 **/
93typedef struct xcb_dpms_get_timeouts_cookie_t {
94    unsigned int sequence; /**<  */
95} xcb_dpms_get_timeouts_cookie_t;
96
97/** Opcode for xcb_dpms_get_timeouts. */
98#define XCB_DPMS_GET_TIMEOUTS 2
99
100/**
101 * @brief xcb_dpms_get_timeouts_request_t
102 **/
103typedef 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;
108
109/**
110 * @brief xcb_dpms_get_timeouts_reply_t
111 **/
112typedef 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;
122
123/** Opcode for xcb_dpms_set_timeouts. */
124#define XCB_DPMS_SET_TIMEOUTS 3
125
126/**
127 * @brief xcb_dpms_set_timeouts_request_t
128 **/
129typedef 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;
137
138/** Opcode for xcb_dpms_enable. */
139#define XCB_DPMS_ENABLE 4
140
141/**
142 * @brief xcb_dpms_enable_request_t
143 **/
144typedef 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;
149
150/** Opcode for xcb_dpms_disable. */
151#define XCB_DPMS_DISABLE 5
152
153/**
154 * @brief xcb_dpms_disable_request_t
155 **/
156typedef 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;
161
162typedef 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;
168
169/** Opcode for xcb_dpms_force_level. */
170#define XCB_DPMS_FORCE_LEVEL 6
171
172/**
173 * @brief xcb_dpms_force_level_request_t
174 **/
175typedef 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;
181
182/**
183 * @brief xcb_dpms_info_cookie_t
184 **/
185typedef struct xcb_dpms_info_cookie_t {
186    unsigned int sequence; /**<  */
187} xcb_dpms_info_cookie_t;
188
189/** Opcode for xcb_dpms_info. */
190#define XCB_DPMS_INFO 7
191
192/**
193 * @brief xcb_dpms_info_request_t
194 **/
195typedef 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;
200
201/**
202 * @brief xcb_dpms_info_reply_t
203 **/
204typedef 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;
213
214/**
215 *
216 * @param c The connection
217 * @return A cookie
218 *
219 * Delivers a request to the X server.
220 *
221 */
222xcb_dpms_get_version_cookie_t
223xcb_dpms_get_version (xcb_connection_t *c  /**< */,
224                      uint16_t          client_major_version  /**< */,
225                      uint16_t          client_minor_version  /**< */);
226
227/**
228 *
229 * @param c The connection
230 * @return A cookie
231 *
232 * Delivers a request to the X server.
233 *
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.
237 */
238xcb_dpms_get_version_cookie_t
239xcb_dpms_get_version_unchecked (xcb_connection_t *c  /**< */,
240                                uint16_t          client_major_version  /**< */,
241                                uint16_t          client_minor_version  /**< */);
242
243/**
244 * Return the reply
245 * @param c      The connection
246 * @param cookie The cookie
247 * @param e      The xcb_generic_error_t supplied
248 *
249 * Returns the reply of the request asked by
250 *
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.
254 *
255 * The returned value must be freed by the caller using free().
256 */
257xcb_dpms_get_version_reply_t *
258xcb_dpms_get_version_reply (xcb_connection_t               *c  /**< */,
259                            xcb_dpms_get_version_cookie_t   cookie  /**< */,
260                            xcb_generic_error_t           **e  /**< */);
261
262/**
263 *
264 * @param c The connection
265 * @return A cookie
266 *
267 * Delivers a request to the X server.
268 *
269 */
270xcb_dpms_capable_cookie_t
271xcb_dpms_capable (xcb_connection_t *c  /**< */);
272
273/**
274 *
275 * @param c The connection
276 * @return A cookie
277 *
278 * Delivers a request to the X server.
279 *
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.
283 */
284xcb_dpms_capable_cookie_t
285xcb_dpms_capable_unchecked (xcb_connection_t *c  /**< */);
286
287/**
288 * Return the reply
289 * @param c      The connection
290 * @param cookie The cookie
291 * @param e      The xcb_generic_error_t supplied
292 *
293 * Returns the reply of the request asked by
294 *
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.
298 *
299 * The returned value must be freed by the caller using free().
300 */
301xcb_dpms_capable_reply_t *
302xcb_dpms_capable_reply (xcb_connection_t           *c  /**< */,
303                        xcb_dpms_capable_cookie_t   cookie  /**< */,
304                        xcb_generic_error_t       **e  /**< */);
305
306/**
307 *
308 * @param c The connection
309 * @return A cookie
310 *
311 * Delivers a request to the X server.
312 *
313 */
314xcb_dpms_get_timeouts_cookie_t
315xcb_dpms_get_timeouts (xcb_connection_t *c  /**< */);
316
317/**
318 *
319 * @param c The connection
320 * @return A cookie
321 *
322 * Delivers a request to the X server.
323 *
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.
327 */
328xcb_dpms_get_timeouts_cookie_t
329xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c  /**< */);
330
331/**
332 * Return the reply
333 * @param c      The connection
334 * @param cookie The cookie
335 * @param e      The xcb_generic_error_t supplied
336 *
337 * Returns the reply of the request asked by
338 *
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.
342 *
343 * The returned value must be freed by the caller using free().
344 */
345xcb_dpms_get_timeouts_reply_t *
346xcb_dpms_get_timeouts_reply (xcb_connection_t                *c  /**< */,
347                             xcb_dpms_get_timeouts_cookie_t   cookie  /**< */,
348                             xcb_generic_error_t            **e  /**< */);
349
350/**
351 *
352 * @param c The connection
353 * @return A cookie
354 *
355 * Delivers a request to the X server.
356 *
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().
360 */
361xcb_void_cookie_t
362xcb_dpms_set_timeouts_checked (xcb_connection_t *c  /**< */,
363                               uint16_t          standby_timeout  /**< */,
364                               uint16_t          suspend_timeout  /**< */,
365                               uint16_t          off_timeout  /**< */);
366
367/**
368 *
369 * @param c The connection
370 * @return A cookie
371 *
372 * Delivers a request to the X server.
373 *
374 */
375xcb_void_cookie_t
376xcb_dpms_set_timeouts (xcb_connection_t *c  /**< */,
377                       uint16_t          standby_timeout  /**< */,
378                       uint16_t          suspend_timeout  /**< */,
379                       uint16_t          off_timeout  /**< */);
380
381/**
382 *
383 * @param c The connection
384 * @return A cookie
385 *
386 * Delivers a request to the X server.
387 *
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().
391 */
392xcb_void_cookie_t
393xcb_dpms_enable_checked (xcb_connection_t *c  /**< */);
394
395/**
396 *
397 * @param c The connection
398 * @return A cookie
399 *
400 * Delivers a request to the X server.
401 *
402 */
403xcb_void_cookie_t
404xcb_dpms_enable (xcb_connection_t *c  /**< */);
405
406/**
407 *
408 * @param c The connection
409 * @return A cookie
410 *
411 * Delivers a request to the X server.
412 *
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().
416 */
417xcb_void_cookie_t
418xcb_dpms_disable_checked (xcb_connection_t *c  /**< */);
419
420/**
421 *
422 * @param c The connection
423 * @return A cookie
424 *
425 * Delivers a request to the X server.
426 *
427 */
428xcb_void_cookie_t
429xcb_dpms_disable (xcb_connection_t *c  /**< */);
430
431/**
432 *
433 * @param c The connection
434 * @return A cookie
435 *
436 * Delivers a request to the X server.
437 *
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().
441 */
442xcb_void_cookie_t
443xcb_dpms_force_level_checked (xcb_connection_t *c  /**< */,
444                              uint16_t          power_level  /**< */);
445
446/**
447 *
448 * @param c The connection
449 * @return A cookie
450 *
451 * Delivers a request to the X server.
452 *
453 */
454xcb_void_cookie_t
455xcb_dpms_force_level (xcb_connection_t *c  /**< */,
456                      uint16_t          power_level  /**< */);
457
458/**
459 *
460 * @param c The connection
461 * @return A cookie
462 *
463 * Delivers a request to the X server.
464 *
465 */
466xcb_dpms_info_cookie_t
467xcb_dpms_info (xcb_connection_t *c  /**< */);
468
469/**
470 *
471 * @param c The connection
472 * @return A cookie
473 *
474 * Delivers a request to the X server.
475 *
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.
479 */
480xcb_dpms_info_cookie_t
481xcb_dpms_info_unchecked (xcb_connection_t *c  /**< */);
482
483/**
484 * Return the reply
485 * @param c      The connection
486 * @param cookie The cookie
487 * @param e      The xcb_generic_error_t supplied
488 *
489 * Returns the reply of the request asked by
490 *
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.
494 *
495 * The returned value must be freed by the caller using free().
496 */
497xcb_dpms_info_reply_t *
498xcb_dpms_info_reply (xcb_connection_t        *c  /**< */,
499                     xcb_dpms_info_cookie_t   cookie  /**< */,
500                     xcb_generic_error_t    **e  /**< */);
501
502
503#ifdef __cplusplus
504}
505#endif
506
507#endif
508
509/**
510 * @}
511 */
512