mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 13:50:05 -04:00
expose platform-native monitor identifier
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user