aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/win32
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/api/win32
parentaa5f5de1099fab89f173fb02bae16324946de147 (diff)
downloadglutin-86fa1b58e5a44a1711e812ed1e56c0e2c6946eed.tar.gz
glutin-86fa1b58e5a44a1711e812ed1e56c0e2c6946eed.zip
Rename MonitorID -> MonitorId
Diffstat (limited to 'src/api/win32')
-rw-r--r--src/api/win32/init.rs4
-rw-r--r--src/api/win32/mod.rs2
-rw-r--r--src/api/win32/monitor.rs16
3 files changed, 11 insertions, 11 deletions
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<u16> {
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<MonitorID> {
+pub fn get_available_monitors() -> VecDeque<MonitorId> {
// return value
let mut result = VecDeque::new();
@@ -120,7 +120,7 @@ pub fn get_available_monitors() -> VecDeque<MonitorID> {
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<MonitorID> {
}
/// 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<String> {
@@ -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]