aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-09-24 09:11:59 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-09-24 09:11:59 +0200
commit86fa1b58e5a44a1711e812ed1e56c0e2c6946eed (patch)
treec60477887a81d310e11f37c1e25ec3d5862ead7b /src/platform
parentaa5f5de1099fab89f173fb02bae16324946de147 (diff)
downloadglutin-86fa1b58e5a44a1711e812ed1e56c0e2c6946eed.tar.gz
glutin-86fa1b58e5a44a1711e812ed1e56c0e2c6946eed.zip
Rename MonitorID -> MonitorId
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/emscripten/mod.rs2
-rw-r--r--src/platform/linux/api_dispatch.rs44
-rw-r--r--src/platform/linux/mod.rs4
-rw-r--r--src/platform/windows/mod.rs2
4 files changed, 26 insertions, 26 deletions
diff --git a/src/platform/emscripten/mod.rs b/src/platform/emscripten/mod.rs
index 16f3250..0d059d7 100644
--- a/src/platform/emscripten/mod.rs
+++ b/src/platform/emscripten/mod.rs
@@ -3,7 +3,7 @@
use ContextError;
use GlContext;
-pub use api::emscripten::{Window, WindowProxy, MonitorID, get_available_monitors};
+pub use api::emscripten::{Window, WindowProxy, MonitorId, get_available_monitors};
pub use api::emscripten::{get_primary_monitor, WaitEventsIterator, PollEventsIterator};
pub struct HeadlessContext(Window);
diff --git a/src/platform/linux/api_dispatch.rs b/src/platform/linux/api_dispatch.rs
index 5ab4ae2..cb35b26 100644
--- a/src/platform/linux/api_dispatch.rs
+++ b/src/platform/linux/api_dispatch.rs
@@ -1,5 +1,5 @@
/*#[cfg(feature = "window")]
-pub use api::x11::{Window, WindowProxy, MonitorID, get_available_monitors, get_primary_monitor};
+pub use api::x11::{Window, WindowProxy, MonitorId, get_available_monitors, get_primary_monitor};
#[cfg(feature = "window")]
pub use api::x11::{WaitEventsIterator, PollEventsIterator};*/
@@ -69,64 +69,64 @@ impl WindowProxy {
}
#[derive(Clone)]
-pub enum MonitorID {
+pub enum MonitorId {
#[doc(hidden)]
- X(x11::MonitorID),
+ X(x11::MonitorId),
#[doc(hidden)]
- Wayland(wayland::MonitorID),
+ Wayland(wayland::MonitorId),
#[doc(hidden)]
None,
}
#[inline]
-pub fn get_available_monitors() -> VecDeque<MonitorID> {
+pub fn get_available_monitors() -> VecDeque<MonitorId> {
match *BACKEND {
Backend::Wayland => wayland::get_available_monitors()
.into_iter()
- .map(MonitorID::Wayland)
+ .map(MonitorId::Wayland)
.collect(),
Backend::X(ref connec) => x11::get_available_monitors(connec)
.into_iter()
- .map(MonitorID::X)
+ .map(MonitorId::X)
.collect(),
- Backend::Error(_) => { let mut d = VecDeque::new(); d.push_back(MonitorID::None); d},
+ Backend::Error(_) => { let mut d = VecDeque::new(); d.push_back(MonitorId::None); d},
}
}
#[inline]
-pub fn get_primary_monitor() -> MonitorID {
+pub fn get_primary_monitor() -> MonitorId {
match *BACKEND {
- Backend::Wayland => MonitorID::Wayland(wayland::get_primary_monitor()),
- Backend::X(ref connec) => MonitorID::X(x11::get_primary_monitor(connec)),
- Backend::Error(_) => MonitorID::None,
+ Backend::Wayland => MonitorId::Wayland(wayland::get_primary_monitor()),
+ Backend::X(ref connec) => MonitorId::X(x11::get_primary_monitor(connec)),
+ Backend::Error(_) => MonitorId::None,
}
}
-impl MonitorID {
+impl MonitorId {
#[inline]
pub fn get_name(&self) -> Option<String> {
match self {
- &MonitorID::X(ref m) => m.get_name(),
- &MonitorID::Wayland(ref m) => m.get_name(),
- &MonitorID::None => None,
+ &MonitorId::X(ref m) => m.get_name(),
+ &MonitorId::Wayland(ref m) => m.get_name(),
+ &MonitorId::None => None,
}
}
#[inline]
pub fn get_native_identifier(&self) -> ::native_monitor::NativeMonitorId {
match self {
- &MonitorID::X(ref m) => m.get_native_identifier(),
- &MonitorID::Wayland(ref m) => m.get_native_identifier(),
- &MonitorID::None => unimplemented!() // FIXME:
+ &MonitorId::X(ref m) => m.get_native_identifier(),
+ &MonitorId::Wayland(ref m) => m.get_native_identifier(),
+ &MonitorId::None => unimplemented!() // FIXME:
}
}
#[inline]
pub fn get_dimensions(&self) -> (u32, u32) {
match self {
- &MonitorID::X(ref m) => m.get_dimensions(),
- &MonitorID::Wayland(ref m) => m.get_dimensions(),
- &MonitorID::None => (800, 600), // FIXME:
+ &MonitorId::X(ref m) => m.get_dimensions(),
+ &MonitorId::Wayland(ref m) => m.get_dimensions(),
+ &MonitorId::None => (800, 600), // FIXME:
}
}
}
diff --git a/src/platform/linux/mod.rs b/src/platform/linux/mod.rs
index f5d663b..4f97d5c 100644
--- a/src/platform/linux/mod.rs
+++ b/src/platform/linux/mod.rs
@@ -12,7 +12,7 @@ use libc;
use api::osmesa::{self, OsMesaContext};
#[cfg(feature = "window")]
-pub use self::api_dispatch::{Window, WindowProxy, MonitorID, get_available_monitors, get_primary_monitor};
+pub use self::api_dispatch::{Window, WindowProxy, MonitorId, get_available_monitors, get_primary_monitor};
#[cfg(feature = "window")]
pub use self::api_dispatch::{WaitEventsIterator, PollEventsIterator};
#[cfg(feature = "window")]
@@ -21,7 +21,7 @@ mod api_dispatch;
#[cfg(not(feature = "window"))]
pub type Window = (); // TODO: hack to make things work
#[cfg(not(feature = "window"))]
-pub type MonitorID = (); // TODO: hack to make things work
+pub type MonitorId = (); // TODO: hack to make things work
pub struct HeadlessContext(OsMesaContext);
diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs
index 1d55e71..a280316 100644
--- a/src/platform/windows/mod.rs
+++ b/src/platform/windows/mod.rs
@@ -1,7 +1,7 @@
#![cfg(target_os = "windows")]
pub use api::win32;
-pub use api::win32::{MonitorID, get_available_monitors, get_primary_monitor};
+pub use api::win32::{MonitorId, get_available_monitors, get_primary_monitor};
pub use api::win32::{WindowProxy, PollEventsIterator, WaitEventsIterator};
use libc;