expose platform-native monitor identifier

This commit is contained in:
Ryan Stewart 2015-03-16 13:52:58 -07:00
parent 0fa5e541e8
commit 9914d826b8
6 changed files with 43 additions and 1 deletions

View file

@ -43,6 +43,11 @@ impl MonitorID {
Some(format!("Monitor #{}", screen_num))
}
pub fn get_native_identifier(&self) -> NativeMonitorID {
let MonitorID(screen_num) = *self;
NativeMonitorID::Numeric(screen_num)
}
pub fn get_dimensions(&self) -> (u32, u32) {
let dimensions = unsafe {
let display = ffi::XOpenDisplay(ptr::null());