aboutsummaryrefslogtreecommitdiffstats
path: root/src/cocoa
diff options
context:
space:
mode:
authorRyan Stewart <ryan@binsoftware.com>2015-03-16 13:52:58 -0700
committerRyan Stewart <ryan@binsoftware.com>2015-03-16 14:11:49 -0700
commit9914d826b8c79f81c5ae4418b827da51d2bf4a4f (patch)
tree910d7b5c071ad7e3c044659ad792f26612b047e3 /src/cocoa
parent0fa5e541e8e11eb0ee47f9679e3a1e755e7c975a (diff)
downloadglutin-9914d826b8c79f81c5ae4418b827da51d2bf4a4f.tar.gz
glutin-9914d826b8c79f81c5ae4418b827da51d2bf4a4f.zip
expose platform-native monitor identifier
Diffstat (limited to 'src/cocoa')
-rw-r--r--src/cocoa/monitor.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cocoa/monitor.rs b/src/cocoa/monitor.rs
index 47adc03..1902f6a 100644
--- a/src/cocoa/monitor.rs
+++ b/src/cocoa/monitor.rs
@@ -1,5 +1,6 @@
use core_graphics::display;
use std::collections::VecDeque;
+use window::NativeMonitorID;
pub struct MonitorID(u32);
@@ -35,6 +36,11 @@ impl MonitorID {
Some(format!("Monitor #{}", screen_num))
}
+ pub fn get_native_identifier(&self) -> NativeMonitorID {
+ let MonitorID(display_id) = *self;
+ NativeMonitorID::Numeric(display_id)
+ }
+
pub fn get_dimensions(&self) -> (u32, u32) {
let MonitorID(display_id) = *self;
let dimension = unsafe {