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:
@@ -3,6 +3,8 @@ use user32;
|
||||
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use NativeMonitorID;
|
||||
|
||||
/// Win32 implementation of the main `MonitorID` object.
|
||||
pub struct MonitorID {
|
||||
/// The system name of the monitor.
|
||||
@@ -113,6 +115,11 @@ impl MonitorID {
|
||||
Some(self.readable_name.clone())
|
||||
}
|
||||
|
||||
/// See the docs of the crate root file.
|
||||
pub fn get_native_identifier(&self) -> NativeMonitorID {
|
||||
NativeMonitorID::Name(self.readable_name.clone())
|
||||
}
|
||||
|
||||
/// See the docs if the crate root file.
|
||||
pub fn get_dimensions(&self) -> (u32, u32) {
|
||||
// TODO: retreive the dimensions every time this is called
|
||||
|
||||
Reference in New Issue
Block a user