aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/x11')
-rw-r--r--src/api/x11/mod.rs2
-rw-r--r--src/api/x11/monitor.rs14
-rw-r--r--src/api/x11/window.rs6
3 files changed, 11 insertions, 11 deletions
diff --git a/src/api/x11/mod.rs b/src/api/x11/mod.rs
index a7c997b..d6a8772 100644
--- a/src/api/x11/mod.rs
+++ b/src/api/x11/mod.rs
@@ -1,6 +1,6 @@
#![cfg(all(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"), feature = "window"))]
-pub use self::monitor::{MonitorID, get_available_monitors, get_primary_monitor};
+pub use self::monitor::{MonitorId, get_available_monitors, get_primary_monitor};
pub use self::window::{Window, XWindow, PollEventsIterator, WaitEventsIterator, Context, WindowProxy};
pub use self::xdisplay::{XConnection, XNotSupported};
diff --git a/src/api/x11/monitor.rs b/src/api/x11/monitor.rs
index 0a20b63..30bd522 100644
--- a/src/api/x11/monitor.rs
+++ b/src/api/x11/monitor.rs
@@ -5,25 +5,25 @@ use super::XConnection;
use native_monitor::NativeMonitorId;
#[derive(Clone)]
-pub struct MonitorID(pub Arc<XConnection>, pub u32);
+pub struct MonitorId(pub Arc<XConnection>, pub u32);
-pub fn get_available_monitors(x: &Arc<XConnection>) -> VecDeque<MonitorID> {
+pub fn get_available_monitors(x: &Arc<XConnection>) -> VecDeque<MonitorId> {
let nb_monitors = unsafe { (x.xlib.XScreenCount)(x.display) };
let mut monitors = VecDeque::new();
- monitors.extend((0 .. nb_monitors).map(|i| MonitorID(x.clone(), i as u32)));
+ monitors.extend((0 .. nb_monitors).map(|i| MonitorId(x.clone(), i as u32)));
monitors
}
#[inline]
-pub fn get_primary_monitor(x: &Arc<XConnection>) -> MonitorID {
+pub fn get_primary_monitor(x: &Arc<XConnection>) -> MonitorId {
let primary_monitor = unsafe { (x.xlib.XDefaultScreen)(x.display) };
- MonitorID(x.clone(), primary_monitor as u32)
+ MonitorId(x.clone(), primary_monitor as u32)
}
-impl MonitorID {
+impl MonitorId {
pub fn get_name(&self) -> Option<String> {
- let MonitorID(_, screen_num) = *self;
+ let MonitorId(_, screen_num) = *self;
Some(format!("Monitor #{}", screen_num))
}
diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs
index 2da226f..50dd505 100644
--- a/src/api/x11/window.rs
+++ b/src/api/x11/window.rs
@@ -23,11 +23,11 @@ use api::glx::Context as GlxContext;
use api::egl;
use api::egl::Context as EglContext;
-use platform::MonitorID as PlatformMonitorID;
+use platform::MonitorId as PlatformMonitorId;
use super::input::XInputEventHandler;
use super::{ffi};
-use super::{MonitorID, XConnection};
+use super::{MonitorId, XConnection};
// XOpenIM doesn't seem to be thread-safe
lazy_static! { // TODO: use a static mutex when that's possible, and put me back in my function
@@ -305,7 +305,7 @@ impl Window {
let dimensions = window_attrs.dimensions.unwrap_or((800, 600));
let screen_id = match window_attrs.monitor {
- Some(PlatformMonitorID::X(MonitorID(_, monitor))) => monitor as i32,
+ Some(PlatformMonitorId::X(MonitorId(_, monitor))) => monitor as i32,
_ => unsafe { (display.xlib.XDefaultScreen)(display.display) },
};