1 | // x11-rs: Rust bindings for X11 libraries |
2 | // The X11 libraries are available under the MIT license. |
3 | // These bindings are public domain. |
4 | |
5 | use std::os::raw::c_int; |
6 | |
7 | use super::xlib::{Bool, Display, Status}; |
8 | use super::xmd::{BOOL, CARD16}; |
9 | |
10 | // |
11 | // functions |
12 | // |
13 | |
14 | x11_link! { Xext, xext, ["libXext.so.6" , "libXext.so" ], 9, |
15 | pub fn DPMSQueryExtension (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Bool, |
16 | pub fn DPMSGetVersion (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Status, |
17 | pub fn DPMSCapable (_1: *mut Display) -> Bool, |
18 | pub fn DPMSSetTimeouts (_1: *mut Display, _2: CARD16, _3: CARD16, _4: CARD16) -> Status, |
19 | pub fn DPMSGetTimeouts (_1: *mut Display, _2: *mut CARD16, _3: *mut CARD16, _4: *mut CARD16) -> Bool, |
20 | pub fn DPMSEnable (_1: *mut Display) -> Status, |
21 | pub fn DPMSDisable (_1: *mut Display) -> Status, |
22 | pub fn DPMSForceLevel (_1: *mut Display, _2: CARD16) -> Status, |
23 | pub fn DPMSInfo (_1: *mut Display, _2: *mut CARD16, _3: *mut BOOL) -> Status, |
24 | variadic: |
25 | globals: |
26 | } |
27 | |
28 | // |
29 | // constants |
30 | // |
31 | |
32 | pub const DPMSMajorVersion: c_int = 1; |
33 | pub const DPMSMinorVersion: c_int = 1; |
34 | |
35 | pub const DPMSExtensionName: &str = "DPMS" ; |
36 | |
37 | pub const DPMSModeOn: CARD16 = 0; |
38 | pub const DPMSModeStandby: CARD16 = 1; |
39 | pub const DPMSModeSuspend: CARD16 = 2; |
40 | pub const DPMSModeOff: CARD16 = 3; |
41 | |