aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/window/monitor.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-01-13 07:57:10 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-01-13 07:57:10 +0100
commit0ffa3b80f18d8da53f39bc18d8f04e893c884f65 (patch)
treece27083678693b55bab78ef98b9b80280dea0e5b /src/x11/window/monitor.rs
parent318f0d2d0662194d84836899d3077b33f0f8196f (diff)
parent995bd37c78b0c4b9957fcd191a0d2fb476a7f289 (diff)
downloadglutin-0ffa3b80f18d8da53f39bc18d8f04e893c884f65.tar.gz
glutin-0ffa3b80f18d8da53f39bc18d8f04e893c884f65.zip
Merge pull request #193 from bjwbell/int-and-uint-to-u-and-isize
Change uint/int to usize/isize
Diffstat (limited to 'src/x11/window/monitor.rs')
-rw-r--r--src/x11/window/monitor.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/x11/window/monitor.rs b/src/x11/window/monitor.rs
index 596dca7..29c23c9 100644
--- a/src/x11/window/monitor.rs
+++ b/src/x11/window/monitor.rs
@@ -3,7 +3,7 @@ use std::collections::RingBuf;
use super::super::ffi;
use super::ensure_thread_init;
-pub struct MonitorID(pub uint);
+pub struct MonitorID(pub usize);
pub fn get_available_monitors() -> RingBuf<MonitorID> {
ensure_thread_init();
@@ -18,7 +18,7 @@ pub fn get_available_monitors() -> RingBuf<MonitorID> {
};
let mut monitors = RingBuf::new();
- monitors.extend(range(0, nb_monitors).map(|i| MonitorID(i as uint)));
+ monitors.extend(range(0, nb_monitors).map(|i| MonitorID(i as usize)));
monitors
}
@@ -34,7 +34,7 @@ pub fn get_primary_monitor() -> MonitorID {
primary_monitor
};
- MonitorID(primary_monitor as uint)
+ MonitorID(primary_monitor as usize)
}
impl MonitorID {
@@ -43,7 +43,7 @@ impl MonitorID {
Some(format!("Monitor #{}", screen_num))
}
- pub fn get_dimensions(&self) -> (uint, uint) {
+ pub fn get_dimensions(&self) -> (usize, usize) {
let dimensions = unsafe {
let display = ffi::XOpenDisplay(ptr::null());
let MonitorID(screen_num) = *self;
@@ -51,7 +51,7 @@ impl MonitorID {
let width = ffi::XWidthOfScreen(screen);
let height = ffi::XHeightOfScreen(screen);
ffi::XCloseDisplay(display);
- (width as uint, height as uint)
+ (width as usize, height as usize)
};
dimensions