Merge pull request #316 from binsoftware/cocoa-fixes
Cocoa fixes: memory leaks, monitor handling, is_current()
This commit is contained in:
commit
8a463f6643
7 changed files with 204 additions and 72 deletions
|
|
@ -3,6 +3,8 @@ use user32;
|
|||
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use native_monitor::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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue