diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -157,10 +157,10 @@ struct BuilderAttribs<'a> { headless: bool, strict: bool, sharing: Option<&'a winimpl::Window>, - dimensions: Option<(uint, uint)>, + dimensions: Option<(usize, usize)>, title: String, monitor: Option<winimpl::MonitorID>, - gl_version: Option<(uint, uint)>, + gl_version: Option<(usize, usize)>, gl_debug: bool, vsync: bool, visible: bool, @@ -207,7 +207,7 @@ impl<'a> WindowBuilder<'a> { /// Requests the window to be of specific dimensions. /// /// Width and height are in pixels. - pub fn with_dimensions(mut self, width: uint, height: uint) -> WindowBuilder<'a> { + pub fn with_dimensions(mut self, width: usize, height: usize) -> WindowBuilder<'a> { self.attribs.dimensions = Some((width, height)); self } @@ -239,7 +239,7 @@ impl<'a> WindowBuilder<'a> { /// /// Version is a (major, minor) pair. For example to request OpenGL 3.3 /// you would pass `(3, 3)`. - pub fn with_gl_version(mut self, version: (uint, uint)) -> WindowBuilder<'a> { + pub fn with_gl_version(mut self, version: (usize, usize)) -> WindowBuilder<'a> { self.attribs.gl_version = Some(version); self } @@ -340,7 +340,7 @@ pub struct HeadlessRendererBuilder { #[cfg(feature = "headless")] impl HeadlessRendererBuilder { /// Initializes a new `HeadlessRendererBuilder` with default values. - pub fn new(width: uint, height: uint) -> HeadlessRendererBuilder { + pub fn new(width: usize, height: usize) -> HeadlessRendererBuilder { HeadlessRendererBuilder { attribs: BuilderAttribs { headless: true, @@ -354,7 +354,7 @@ impl HeadlessRendererBuilder { /// /// Version is a (major, minor) pair. For example to request OpenGL 3.3 /// you would pass `(3, 3)`. - pub fn with_gl_version(mut self, version: (uint, uint)) -> HeadlessRendererBuilder { + pub fn with_gl_version(mut self, version: (usize, usize)) -> HeadlessRendererBuilder { self.attribs.gl_version = Some(version); self } @@ -490,7 +490,7 @@ impl Window { /// /// Returns `None` if the window no longer exists. #[inline] - pub fn get_position(&self) -> Option<(int, int)> { + pub fn get_position(&self) -> Option<(isize, isize)> { self.window.get_position() } @@ -500,7 +500,7 @@ impl Window { /// /// This is a no-op if the window has already been closed. #[inline] - pub fn set_position(&self, x: int, y: int) { + pub fn set_position(&self, x: isize, y: isize) { self.window.set_position(x, y) } @@ -512,7 +512,7 @@ impl Window { /// /// Returns `None` if the window no longer exists. #[inline] - pub fn get_inner_size(&self) -> Option<(uint, uint)> { + pub fn get_inner_size(&self) -> Option<(usize, usize)> { self.window.get_inner_size() } @@ -523,7 +523,7 @@ impl Window { /// /// Returns `None` if the window no longer exists. #[inline] - pub fn get_outer_size(&self) -> Option<(uint, uint)> { + pub fn get_outer_size(&self) -> Option<(usize, usize)> { self.window.get_outer_size() } @@ -533,7 +533,7 @@ impl Window { /// /// This is a no-op if the window has already been closed. #[inline] - pub fn set_inner_size(&self, x: uint, y: uint) { + pub fn set_inner_size(&self, x: usize, y: usize) { self.window.set_inner_size(x, y) } @@ -612,7 +612,7 @@ impl Window { /// operating systems) during resize operations. This can be used to repaint /// during window resizing. #[experimental] - pub fn set_window_resize_callback(&mut self, callback: Option<fn(uint, uint)>) { + pub fn set_window_resize_callback(&mut self, callback: Option<fn(usize, usize)>) { self.window.set_window_resize_callback(callback); } @@ -683,7 +683,7 @@ impl HeadlessContext { } #[experimental] - pub fn set_window_resize_callback(&mut self, _: Option<fn(uint, uint)>) { + pub fn set_window_resize_callback(&mut self, _: Option<fn(usize, usize)>) { } } @@ -760,7 +760,7 @@ impl MonitorID { } /// Returns the number of pixels currently displayed on the monitor. - pub fn get_dimensions(&self) -> (uint, uint) { + pub fn get_dimensions(&self) -> (usize, usize) { let &MonitorID(ref id) = self; id.get_dimensions() } |