From 86fa1b58e5a44a1711e812ed1e56c0e2c6946eed Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 24 Sep 2015 09:11:59 +0200 Subject: Rename MonitorID -> MonitorId --- src/api/android/mod.rs | 12 +++++------ src/api/caca/mod.rs | 10 ++++----- src/api/cocoa/mod.rs | 2 +- src/api/cocoa/monitor.rs | 18 ++++++++-------- src/api/emscripten/mod.rs | 12 +++++------ src/api/ios/mod.rs | 12 +++++------ src/api/wayland/mod.rs | 20 ++++++++--------- src/api/win32/init.rs | 4 ++-- src/api/win32/mod.rs | 2 +- src/api/win32/monitor.rs | 16 +++++++------- src/api/x11/mod.rs | 2 +- src/api/x11/monitor.rs | 14 ++++++------ src/api/x11/window.rs | 6 +++--- src/lib.rs | 4 ++-- src/platform/emscripten/mod.rs | 2 +- src/platform/linux/api_dispatch.rs | 44 +++++++++++++++++++------------------- src/platform/linux/mod.rs | 4 ++-- src/platform/windows/mod.rs | 2 +- src/window.rs | 26 +++++++++++----------- 19 files changed, 106 insertions(+), 106 deletions(-) (limited to 'src') diff --git a/src/api/android/mod.rs b/src/api/android/mod.rs index eb49037..4e27e1c 100644 --- a/src/api/android/mod.rs +++ b/src/api/android/mod.rs @@ -32,23 +32,23 @@ pub struct Window { } #[derive(Clone)] -pub struct MonitorID; +pub struct MonitorId; mod ffi; #[inline] -pub fn get_available_monitors() -> VecDeque { +pub fn get_available_monitors() -> VecDeque { let mut rb = VecDeque::new(); - rb.push_back(MonitorID); + rb.push_back(MonitorId); rb } #[inline] -pub fn get_primary_monitor() -> MonitorID { - MonitorID +pub fn get_primary_monitor() -> MonitorId { + MonitorId } -impl MonitorID { +impl MonitorId { #[inline] pub fn get_name(&self) -> Option { Some("Primary".to_string()) diff --git a/src/api/caca/mod.rs b/src/api/caca/mod.rs index 1c32b4c..43742f3 100644 --- a/src/api/caca/mod.rs +++ b/src/api/caca/mod.rs @@ -39,18 +39,18 @@ impl WindowProxy { } } -pub struct MonitorID; +pub struct MonitorId; #[inline] -pub fn get_available_monitors() -> VecDeque { +pub fn get_available_monitors() -> VecDeque { VecDeque::new() } #[inline] -pub fn get_primary_monitor() -> MonitorID { - MonitorID +pub fn get_primary_monitor() -> MonitorId { + MonitorId } -impl MonitorID { +impl MonitorId { #[inline] pub fn get_name(&self) -> Option { unimplemented!(); diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs index 78d0f52..ecaca69 100644 --- a/src/api/cocoa/mod.rs +++ b/src/api/cocoa/mod.rs @@ -51,7 +51,7 @@ use events::ElementState::{Pressed, Released}; use events::MouseButton; use events; -pub use self::monitor::{MonitorID, get_available_monitors, get_primary_monitor}; +pub use self::monitor::{MonitorId, get_available_monitors, get_primary_monitor}; mod monitor; mod event; diff --git a/src/api/cocoa/monitor.rs b/src/api/cocoa/monitor.rs index 600f7e9..87d2c97 100644 --- a/src/api/cocoa/monitor.rs +++ b/src/api/cocoa/monitor.rs @@ -3,9 +3,9 @@ use std::collections::VecDeque; use native_monitor::NativeMonitorId; #[derive(Clone)] -pub struct MonitorID(u32); +pub struct MonitorId(u32); -pub fn get_available_monitors() -> VecDeque { +pub fn get_available_monitors() -> VecDeque { let mut monitors = VecDeque::new(); unsafe { let max_displays = 10u32; @@ -15,23 +15,23 @@ pub fn get_available_monitors() -> VecDeque { &mut active_displays[0], &mut display_count); for i in 0..display_count as usize { - monitors.push_back(MonitorID(active_displays[i])); + monitors.push_back(MonitorId(active_displays[i])); } } monitors } #[inline] -pub fn get_primary_monitor() -> MonitorID { +pub fn get_primary_monitor() -> MonitorId { let id = unsafe { - MonitorID(display::CGMainDisplayID()) + MonitorId(display::CGMainDisplayID()) }; id } -impl MonitorID { +impl MonitorId { pub fn get_name(&self) -> Option { - let MonitorID(display_id) = *self; + let MonitorId(display_id) = *self; let screen_num = unsafe { display::CGDisplayModelNumber(display_id) }; @@ -40,12 +40,12 @@ impl MonitorID { #[inline] pub fn get_native_identifier(&self) -> NativeMonitorId { - let MonitorID(display_id) = *self; + let MonitorId(display_id) = *self; NativeMonitorId::Numeric(display_id) } pub fn get_dimensions(&self) -> (u32, u32) { - let MonitorID(display_id) = *self; + let MonitorId(display_id) = *self; let dimension = unsafe { let height = display::CGDisplayPixelsHigh(display_id); let width = display::CGDisplayPixelsWide(display_id); diff --git a/src/api/emscripten/mod.rs b/src/api/emscripten/mod.rs index 0913623..91304f0 100644 --- a/src/api/emscripten/mod.rs +++ b/src/api/emscripten/mod.rs @@ -52,21 +52,21 @@ impl WindowProxy { } } -pub struct MonitorID; +pub struct MonitorId; #[inline] -pub fn get_available_monitors() -> VecDeque { +pub fn get_available_monitors() -> VecDeque { let mut list = VecDeque::new(); - list.push_back(MonitorID); + list.push_back(MonitorId); list } #[inline] -pub fn get_primary_monitor() -> MonitorID { - MonitorID +pub fn get_primary_monitor() -> MonitorId { + MonitorId } -impl MonitorID { +impl MonitorId { #[inline] pub fn get_name(&self) -> Option { Some("Canvas".to_owned()) diff --git a/src/api/ios/mod.rs b/src/api/ios/mod.rs index 0d7de57..52eebbf 100644 --- a/src/api/ios/mod.rs +++ b/src/api/ios/mod.rs @@ -105,7 +105,7 @@ use self::ffi::{ static mut jmpbuf: [libc::c_int;27] = [0;27]; #[derive(Clone)] -pub struct MonitorID; +pub struct MonitorId; pub struct Window { eagl_context: id, @@ -149,18 +149,18 @@ impl DelegateState { } #[inline] -pub fn get_available_monitors() -> VecDeque { +pub fn get_available_monitors() -> VecDeque { let mut rb = VecDeque::new(); - rb.push_back(MonitorID); + rb.push_back(MonitorId); rb } #[inline] -pub fn get_primary_monitor() -> MonitorID { - MonitorID +pub fn get_primary_monitor() -> MonitorId { + MonitorId } -impl MonitorID { +impl MonitorId { #[inline] pub fn get_name(&self) -> Option { Some("Primary".to_string()) diff --git a/src/api/wayland/mod.rs b/src/api/wayland/mod.rs index a57ffec..81acbf0 100644 --- a/src/api/wayland/mod.rs +++ b/src/api/wayland/mod.rs @@ -29,7 +29,7 @@ use std::ops::{Deref, DerefMut}; use std::sync::{Arc, Mutex}; use std::ffi::CString; -use platform::MonitorID as PlatformMonitorID; +use platform::MonitorId as PlatformMonitorId; use self::context::WaylandContext; @@ -166,25 +166,25 @@ impl WindowProxy { } #[derive(Clone)] -pub struct MonitorID { +pub struct MonitorId { output: Arc } #[inline] -pub fn get_available_monitors() -> VecDeque { - WAYLAND_CONTEXT.as_ref().unwrap().outputs.iter().map(|o| MonitorID::new(o.clone())).collect() +pub fn get_available_monitors() -> VecDeque { + WAYLAND_CONTEXT.as_ref().unwrap().outputs.iter().map(|o| MonitorId::new(o.clone())).collect() } #[inline] -pub fn get_primary_monitor() -> MonitorID { +pub fn get_primary_monitor() -> MonitorId { match WAYLAND_CONTEXT.as_ref().unwrap().outputs.iter().next() { - Some(o) => MonitorID::new(o.clone()), + Some(o) => MonitorId::new(o.clone()), None => panic!("No monitor is available.") } } -impl MonitorID { - fn new(output: Arc) -> MonitorID { - MonitorID { +impl MonitorId { + fn new(output: Arc) -> MonitorId { + MonitorId { output: output } } @@ -272,7 +272,7 @@ impl Window { h as i32 ); - let mut shell_window = if let Some(PlatformMonitorID::Wayland(ref monitor)) = window.monitor { + let mut shell_window = if let Some(PlatformMonitorId::Wayland(ref monitor)) = window.monitor { let shell_surface = wayland_context.shell.get_shell_surface(surface); shell_surface.set_fullscreen(ShellFullscreenMethod::Default, Some(&monitor.output)); ShellWindow::Plain(shell_surface) diff --git a/src/api/win32/init.rs b/src/api/win32/init.rs index 7c7eb83..67e4e4e 100644 --- a/src/api/win32/init.rs +++ b/src/api/win32/init.rs @@ -6,7 +6,7 @@ use std::thread; use super::callback; use super::Window; -use super::MonitorID; +use super::MonitorId; use super::WindowWrapper; use super::Context; @@ -269,7 +269,7 @@ unsafe fn register_window_class() -> Vec { class_name } -unsafe fn switch_to_fullscreen(rect: &mut winapi::RECT, monitor: &MonitorID) +unsafe fn switch_to_fullscreen(rect: &mut winapi::RECT, monitor: &MonitorId) -> Result<(), CreationError> { // adjusting the rect diff --git a/src/api/win32/mod.rs b/src/api/win32/mod.rs index cb2cc6a..4fb3635 100644 --- a/src/api/win32/mod.rs +++ b/src/api/win32/mod.rs @@ -21,7 +21,7 @@ use PixelFormat; use PixelFormatRequirements; use WindowAttributes; -pub use self::monitor::{MonitorID, get_available_monitors, get_primary_monitor}; +pub use self::monitor::{MonitorId, get_available_monitors, get_primary_monitor}; use winapi; use user32; diff --git a/src/api/win32/monitor.rs b/src/api/win32/monitor.rs index 2f2e2c1..297e826 100644 --- a/src/api/win32/monitor.rs +++ b/src/api/win32/monitor.rs @@ -6,9 +6,9 @@ use std::mem; use native_monitor::NativeMonitorId; -/// Win32 implementation of the main `MonitorID` object. +/// Win32 implementation of the main `MonitorId` object. #[derive(Clone)] -pub struct MonitorID { +pub struct MonitorId { /// The system name of the adapter. adapter_name: [winapi::WCHAR; 32], @@ -93,7 +93,7 @@ fn wchar_as_string(wchar: &[winapi::WCHAR]) -> String { } /// Win32 implementation of the main `get_available_monitors` function. -pub fn get_available_monitors() -> VecDeque { +pub fn get_available_monitors() -> VecDeque { // return value let mut result = VecDeque::new(); @@ -120,7 +120,7 @@ pub fn get_available_monitors() -> VecDeque { for (num, monitor) in DeviceEnumerator::monitors(adapter.DeviceName.as_ptr()).enumerate() { // adding to the resulting list - result.push_back(MonitorID { + result.push_back(MonitorId { adapter_name: adapter.DeviceName, monitor_name: wchar_as_string(&monitor.DeviceName), readable_name: wchar_as_string(&monitor.DeviceString), @@ -136,7 +136,7 @@ pub fn get_available_monitors() -> VecDeque { } /// Win32 implementation of the main `get_primary_monitor` function. -pub fn get_primary_monitor() -> MonitorID { +pub fn get_primary_monitor() -> MonitorId { // we simply get all available monitors and return the one with the `PRIMARY_DEVICE` flag // TODO: it is possible to query the win32 API for the primary monitor, this should be done // instead @@ -149,7 +149,7 @@ pub fn get_primary_monitor() -> MonitorID { panic!("Failed to find the primary monitor") } -impl MonitorID { +impl MonitorId { /// See the docs if the crate root file. #[inline] pub fn get_name(&self) -> Option { @@ -169,14 +169,14 @@ impl MonitorID { self.dimensions } - /// This is a Win32-only function for `MonitorID` that returns the system name of the adapter + /// This is a Win32-only function for `MonitorId` that returns the system name of the adapter /// device. #[inline] pub fn get_adapter_name(&self) -> &[winapi::WCHAR] { &self.adapter_name } - /// This is a Win32-only function for `MonitorID` that returns the position of the + /// This is a Win32-only function for `MonitorId` that returns the position of the /// monitor on the desktop. /// A window that is positionned at these coordinates will overlap the monitor. #[inline] 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, pub u32); +pub struct MonitorId(pub Arc, pub u32); -pub fn get_available_monitors(x: &Arc) -> VecDeque { +pub fn get_available_monitors(x: &Arc) -> VecDeque { 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) -> MonitorID { +pub fn get_primary_monitor(x: &Arc) -> 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 { - 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) }, }; diff --git a/src/lib.rs b/src/lib.rs index 7d846e2..e723240 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,7 +63,7 @@ pub use headless::{HeadlessRendererBuilder, HeadlessContext}; #[cfg(feature = "window")] pub use window::{WindowBuilder, Window, WindowProxy, PollEventsIterator, WaitEventsIterator}; #[cfg(feature = "window")] -pub use window::{AvailableMonitorsIter, MonitorID, get_available_monitors, get_primary_monitor}; +pub use window::{AvailableMonitorsIter, MonitorId, get_available_monitors, get_primary_monitor}; #[cfg(feature = "window")] pub use native_monitor::NativeMonitorId; @@ -504,7 +504,7 @@ pub struct WindowAttributes { /// If `Some`, the window will be in fullscreen mode with the given monitor. /// /// The default is `None`. - pub monitor: Option, + pub monitor: Option, /// The title of the window in the title bar. /// 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 { +pub fn get_available_monitors() -> VecDeque { 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 { 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; diff --git a/src/window.rs b/src/window.rs index 9d9aeff..d9386df 100644 --- a/src/window.rs +++ b/src/window.rs @@ -65,8 +65,8 @@ impl<'a> WindowBuilder<'a> { /// /// If you don't specify dimensions for the window, it will match the monitor's. #[inline] - pub fn with_fullscreen(mut self, monitor: MonitorID) -> WindowBuilder<'a> { - let MonitorID(monitor) = monitor; + pub fn with_fullscreen(mut self, monitor: MonitorId) -> WindowBuilder<'a> { + let MonitorId(monitor) = monitor; self.window.monitor = Some(monitor); self } @@ -611,15 +611,15 @@ impl<'a> Iterator for WaitEventsIterator<'a> { // Implementation note: we retreive the list once, then serve each element by one by one. // This may change in the future. pub struct AvailableMonitorsIter { - data: VecDequeIter, + data: VecDequeIter, } impl Iterator for AvailableMonitorsIter { - type Item = MonitorID; + type Item = MonitorId; #[inline] - fn next(&mut self) -> Option { - self.data.next().map(|id| MonitorID(id)) + fn next(&mut self) -> Option { + self.data.next().map(|id| MonitorId(id)) } #[inline] @@ -637,32 +637,32 @@ pub fn get_available_monitors() -> AvailableMonitorsIter { /// Returns the primary monitor of the system. #[inline] -pub fn get_primary_monitor() -> MonitorID { - MonitorID(platform::get_primary_monitor()) +pub fn get_primary_monitor() -> MonitorId { + MonitorId(platform::get_primary_monitor()) } /// Identifier for a monitor. -pub struct MonitorID(platform::MonitorID); +pub struct MonitorId(platform::MonitorId); -impl MonitorID { +impl MonitorId { /// Returns a human-readable name of the monitor. #[inline] pub fn get_name(&self) -> Option { - let &MonitorID(ref id) = self; + let &MonitorId(ref id) = self; id.get_name() } /// Returns the native platform identifier for this monitor. #[inline] pub fn get_native_identifier(&self) -> NativeMonitorId { - let &MonitorID(ref id) = self; + let &MonitorId(ref id) = self; id.get_native_identifier() } /// Returns the number of pixels currently displayed on the monitor. #[inline] pub fn get_dimensions(&self) -> (u32, u32) { - let &MonitorID(ref id) = self; + let &MonitorId(ref id) = self; id.get_dimensions() } } -- cgit v1.2.3