diff options
Diffstat (limited to 'src/cocoa/monitor.rs')
-rw-r--r-- | src/cocoa/monitor.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cocoa/monitor.rs b/src/cocoa/monitor.rs index 11d1237..40c7896 100644 --- a/src/cocoa/monitor.rs +++ b/src/cocoa/monitor.rs @@ -1,5 +1,6 @@ use core_graphics::display; use std::collections::VecDeque; +use native_monitor::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 { |