diff options
Diffstat (limited to 'lib/libxcb/src/dpms.h')
-rw-r--r-- | lib/libxcb/src/dpms.h | 68 |
1 files changed, 66 insertions, 2 deletions
diff --git a/lib/libxcb/src/dpms.h b/lib/libxcb/src/dpms.h index 95aa91d78..42c56e985 100644 --- a/lib/libxcb/src/dpms.h +++ b/lib/libxcb/src/dpms.h @@ -13,13 +13,14 @@ #define __DPMS_H #include "xcb.h" +#include "xproto.h" #ifdef __cplusplus extern "C" { #endif -#define XCB_DPMS_MAJOR_VERSION 0 -#define XCB_DPMS_MINOR_VERSION 0 +#define XCB_DPMS_MAJOR_VERSION 1 +#define XCB_DPMS_MINOR_VERSION 2 extern xcb_extension_t xcb_dpms_id; @@ -211,6 +212,42 @@ typedef struct xcb_dpms_info_reply_t { uint8_t pad1[21]; } xcb_dpms_info_reply_t; +typedef enum xcb_dpms_event_mask_t { + XCB_DPMS_EVENT_MASK_INFO_NOTIFY = 1 +} xcb_dpms_event_mask_t; + +/** Opcode for xcb_dpms_select_input. */ +#define XCB_DPMS_SELECT_INPUT 8 + +/** + * @brief xcb_dpms_select_input_request_t + **/ +typedef struct xcb_dpms_select_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t event_mask; +} xcb_dpms_select_input_request_t; + +/** Opcode for xcb_dpms_info_notify. */ +#define XCB_DPMS_INFO_NOTIFY 0 + +/** + * @brief xcb_dpms_info_notify_event_t + **/ +typedef struct xcb_dpms_info_notify_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + uint8_t pad0[2]; + xcb_timestamp_t timestamp; + uint16_t power_level; + uint8_t state; + uint8_t pad1[21]; +} xcb_dpms_info_notify_event_t; + /** * * @param c The connection @@ -499,6 +536,33 @@ xcb_dpms_info_reply (xcb_connection_t *c, xcb_dpms_info_cookie_t cookie /**< */, xcb_generic_error_t **e); +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dpms_select_input_checked (xcb_connection_t *c, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dpms_select_input (xcb_connection_t *c, + uint32_t event_mask); + #ifdef __cplusplus } |