aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/win32/monitor.rs
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-09-21 14:42:05 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-09-23 13:11:47 +0200
commitaa9cb99929ee1893699184ded888b2586455f016 (patch)
treeb16503dbfe2248beeed0f7d82b150e64e6453043 /src/api/win32/monitor.rs
parent3820d307a3f23828790e8a46a9c46849592104d6 (diff)
downloadglutin-aa9cb99929ee1893699184ded888b2586455f016.tar.gz
glutin-aa9cb99929ee1893699184ded888b2586455f016.zip
Add #[inline] attributes
Diffstat (limited to 'src/api/win32/monitor.rs')
-rw-r--r--src/api/win32/monitor.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/api/win32/monitor.rs b/src/api/win32/monitor.rs
index d87c928..2f2e2c1 100644
--- a/src/api/win32/monitor.rs
+++ b/src/api/win32/monitor.rs
@@ -151,16 +151,19 @@ pub fn get_primary_monitor() -> MonitorID {
impl MonitorID {
/// See the docs if the crate root file.
+ #[inline]
pub fn get_name(&self) -> Option<String> {
Some(self.readable_name.clone())
}
/// See the docs of the crate root file.
+ #[inline]
pub fn get_native_identifier(&self) -> NativeMonitorId {
NativeMonitorId::Name(self.monitor_name.clone())
}
/// See the docs if the crate root file.
+ #[inline]
pub fn get_dimensions(&self) -> (u32, u32) {
// TODO: retreive the dimensions every time this is called
self.dimensions
@@ -168,6 +171,7 @@ impl MonitorID {
/// 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
}
@@ -175,6 +179,7 @@ impl MonitorID {
/// 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]
pub fn get_position(&self) -> (u32, u32) {
self.position
}