aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2015-03-24 18:33:53 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2015-03-24 18:33:53 +1100
commit8a463f664302d90fbe31800ec25afadb1cf6d7c3 (patch)
treecc5b4782cf5204d57c60024fb6a9bb33bea65398 /src/window.rs
parent8ad9d5fb4dfc373e69e5530961302b1990d898bf (diff)
parentcf630ec0416d89bde9fcc6d8bd3674a7c55ac1a5 (diff)
downloadglutin-8a463f664302d90fbe31800ec25afadb1cf6d7c3.tar.gz
glutin-8a463f664302d90fbe31800ec25afadb1cf6d7c3.zip
Merge pull request #316 from binsoftware/cocoa-fixes
Cocoa fixes: memory leaks, monitor handling, is_current()
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/window.rs b/src/window.rs
index 678321e..12e8538 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -7,6 +7,7 @@ use CreationError;
use Event;
use GlRequest;
use MouseCursor;
+use native_monitor::NativeMonitorId;
use gl_common;
use libc;
@@ -509,6 +510,12 @@ impl MonitorID {
id.get_name()
}
+ /// Returns the native platform identifier for this monitor.
+ pub fn get_native_identifier(&self) -> NativeMonitorId {
+ let &MonitorID(ref id) = self;
+ id.get_native_identifier()
+ }
+
/// Returns the number of pixels currently displayed on the monitor.
pub fn get_dimensions(&self) -> (u32, u32) {
let &MonitorID(ref id) = self;