Rework MonitorId::get_native_identifier (#267)

* Rework MonitorId::get_native_identifier

* Try fix compilation

* Returns the monitor ID on wayland as well

* Try fix compilation

* Fix iOS compilation
This commit is contained in:
tomaka 2017-08-30 08:49:18 +02:00 committed by GitHub
parent f7a8bcddb8
commit 7dc6fcdedc
16 changed files with 67 additions and 69 deletions

View file

@ -117,7 +117,6 @@ extern crate wayland_client;
pub use events::*;
pub use window::{AvailableMonitorsIter, MonitorId, get_available_monitors, get_primary_monitor};
pub use native_monitor::NativeMonitorId;
#[macro_use]
mod api_transition;
@ -453,19 +452,3 @@ impl Default for WindowAttributes {
}
}
}
mod native_monitor {
/// Native platform identifier for a monitor. Different platforms use fundamentally different types
/// to represent a monitor ID.
#[derive(Clone, PartialEq, Eq)]
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
}
}