aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
authorRyan Stewart <ryan@binsoftware.com>2015-03-18 14:16:35 -0700
committerRyan Stewart <ryan@binsoftware.com>2015-03-18 14:16:35 -0700
commit1b2fd6e6d01788922a90cd4e58adf371007f50a8 (patch)
tree5266e1e7a4c1141faeb71a51e01047daa32e712a /src/window.rs
parent779f3ce888e0009bdbd14bc28a1e475b46df83ee (diff)
downloadglutin-1b2fd6e6d01788922a90cd4e58adf371007f50a8.tar.gz
glutin-1b2fd6e6d01788922a90cd4e58adf371007f50a8.zip
fix headless build by ensuring NativeMonitorId enum is available internally even without the window feature; add Eq/PartialEq to NativeMonitorId
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/window.rs b/src/window.rs
index 4b02874..5cb6e5e 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;
@@ -500,19 +501,6 @@ pub fn get_primary_monitor() -> MonitorID {
MonitorID(winimpl::get_primary_monitor())
}
-/// Native platform identifier for a monitor. Different platforms use fundamentally different types
-/// to represent a monitor ID.
-pub enum NativeMonitorID {
- /// Cocoa and X11 use a numeric identifier to represent a monitor.
- Numeric(u32),
-
- /// Win32 uses a Unicode string to represent a monitor.
- Name(String),
-
- /// Other platforms (Android) don't support monitor identification.
- Unavailable
-}
-
/// Identifier for a monitor.
pub struct MonitorID(winimpl::MonitorID);
@@ -524,7 +512,7 @@ impl MonitorID {
}
/// Returns the native platform identifier for this monitor.
- pub fn get_native_identifier(&self) -> NativeMonitorID {
+ pub fn get_native_identifier(&self) -> NativeMonitorId {
let &MonitorID(ref id) = self;
id.get_native_identifier()
}