diff options
author | Aceeri <conmcclusk@gmail.com> | 2015-11-09 01:42:54 -0800 |
---|---|---|
committer | Aceeri <conmcclusk@gmail.com> | 2015-11-09 01:42:54 -0800 |
commit | 78eb4a5990dadb3402dd3e80d04e2cfd7f9dd6fd (patch) | |
tree | 106da761ef835dda393c736d0d33da9358290670 /src/window.rs | |
parent | 5ca4e89dd4427464a11417cd127c67ee96d5fae1 (diff) | |
download | glutin-78eb4a5990dadb3402dd3e80d04e2cfd7f9dd6fd.tar.gz glutin-78eb4a5990dadb3402dd3e80d04e2cfd7f9dd6fd.zip |
Minimum/maximum dimensions for windows in win32 api
Diffstat (limited to 'src/window.rs')
-rw-r--r-- | src/window.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/window.rs b/src/window.rs index 86322bd..f2d6580 100644 --- a/src/window.rs +++ b/src/window.rs @@ -52,6 +52,24 @@ impl<'a> WindowBuilder<'a> { self.window.dimensions = Some((width, height)); self } + + /// Sets a minimum dimension size for the window + /// + /// Width and height are in pixels. + #[inline] + pub fn with_min_dimensions(mut self, width: u32, height: u32) -> WindowBuilder<'a> { + self.window.min_dimensions = Some((width, height)); + self + } + + /// Sets a maximum dimension size for the window + /// + /// Width and height are in pixels. + #[inline] + pub fn with_max_dimensions(mut self, width: u32, height: u32) -> WindowBuilder<'a> { + self.window.max_dimensions = Some((width, height)); + self + } /// Requests a specific title for the window. #[inline] |