mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 06:10:07 -04:00
expose platform-native monitor identifier
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user