aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/ffi.rs
diff options
context:
space:
mode:
authorDavidPartouche <david@manateedev.com>2014-09-19 15:42:47 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-09-19 20:28:14 +0200
commitac74db979c9e1daa73c5f232e9a144e9f355990a (patch)
treeea19df2091d8d23b3cd95d90d82404785c01febc /src/x11/ffi.rs
parentbd3b06e1a527466600cb0d8cd87a323974b5e5d4 (diff)
downloadglutin-ac74db979c9e1daa73c5f232e9a144e9f355990a.tar.gz
glutin-ac74db979c9e1daa73c5f232e9a144e9f355990a.zip
Get the monitors attached to the display, and their resolution for X11
Diffstat (limited to 'src/x11/ffi.rs')
-rw-r--r--src/x11/ffi.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/x11/ffi.rs b/src/x11/ffi.rs
index f781b48..fe91033 100644
--- a/src/x11/ffi.rs
+++ b/src/x11/ffi.rs
@@ -29,6 +29,7 @@ pub type XrmDatabase = *const (); // TODO: not sure
pub type XIC = *mut ();
pub type XID = uint;
pub type XIM = *mut ();
+pub type Screen = ();
pub static AllocNone: libc::c_int = 0;
pub static AllocAll: libc::c_int = 1;
@@ -1393,6 +1394,10 @@ extern "C" {
pub fn XSetWMProtocols(display: *mut Display, w: Window, protocols: *mut Atom,
count: libc::c_int) -> Status;
pub fn XStoreName(display: *mut Display, w: Window, window_name: *const libc::c_char);
+ pub fn XScreenCount(display: *mut Display) -> libc::c_int;
+ pub fn XScreenOfDisplay(display: *mut Display, screen_number: libc::c_int) -> *const Screen;
+ pub fn XWidthOfScreen(screen: *const Screen) -> libc::c_int;
+ pub fn XHeightOfScreen(screen: *const Screen) -> libc::c_int;
pub fn XCloseIM(im: XIM) -> Status;
pub fn XOpenIM(display: *mut Display, db: XrmDatabase, res_name: *mut libc::c_char,