From 5a4fee967a9f2d7d64edad09bf1f19a5c560032e Mon Sep 17 00:00:00 2001 From: Andrey Lesnikov Date: Tue, 13 Jan 2015 15:21:36 +0300 Subject: x11, android, win32: [ui]size, [u]int -> [ui]32 --- src/x11/window/monitor.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/x11/window/monitor.rs') diff --git a/src/x11/window/monitor.rs b/src/x11/window/monitor.rs index 29c23c9..3c188b6 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 usize); +pub struct MonitorID(pub u32); pub fn get_available_monitors() -> RingBuf { ensure_thread_init(); @@ -18,7 +18,7 @@ pub fn get_available_monitors() -> RingBuf { }; let mut monitors = RingBuf::new(); - monitors.extend(range(0, nb_monitors).map(|i| MonitorID(i as usize))); + monitors.extend(range(0, nb_monitors).map(|i| MonitorID(i as u32))); monitors } @@ -34,7 +34,7 @@ pub fn get_primary_monitor() -> MonitorID { primary_monitor }; - MonitorID(primary_monitor as usize) + MonitorID(primary_monitor as u32) } impl MonitorID { @@ -43,7 +43,7 @@ impl MonitorID { Some(format!("Monitor #{}", screen_num)) } - pub fn get_dimensions(&self) -> (usize, usize) { + pub fn get_dimensions(&self) -> (u32, u32) { 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 usize, height as usize) + (width as u32, height as u32) }; dimensions -- cgit v1.2.3