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 xlib::{ Display, Status, Bool };
8 use xmd::{ CARD16, BOOL };
9 
10 
11 //
12 // functions
13 //
14 
15 
16 x11_link! { Xext, xext, ["libXext.so.6", "libXext.so"], 9,
17   pub fn DPMSQueryExtension (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Bool,
18   pub fn DPMSGetVersion (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Status,
19   pub fn DPMSCapable (_1: *mut Display) -> Bool,
20   pub fn DPMSSetTimeouts (_1: *mut Display, _2: CARD16, _3: CARD16, _4: CARD16) -> Status,
21   pub fn DPMSGetTimeouts (_1: *mut Display, _2: *mut CARD16, _3: *mut CARD16, _4: *mut CARD16) -> Bool,
22   pub fn DPMSEnable (_1: *mut Display) -> Status,
23   pub fn DPMSDisable (_1: *mut Display) -> Status,
24   pub fn DPMSForceLevel (_1: *mut Display, _2: CARD16) -> Status,
25   pub fn DPMSInfo (_1: *mut Display, _2: *mut CARD16, _3: *mut BOOL) -> Status,
26 variadic:
27 globals:
28 }
29 
30 
31 //
32 // constants
33 //
34 
35 
36 pub const DPMSMajorVersion: c_int = 1;
37 pub const DPMSMinorVersion: c_int = 1;
38 
39 pub const DPMSExtensionName: &'static str = "DPMS";
40 
41 pub const DPMSModeOn: CARD16 = 0;
42 pub const DPMSModeStandby: CARD16 = 1;
43 pub const DPMSModeSuspend: CARD16 = 2;
44 pub const DPMSModeOff: CARD16 = 3;
45