aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorAceeri <conmcclusk@gmail.com>2015-11-09 01:42:54 -0800
committerAceeri <conmcclusk@gmail.com>2015-11-09 01:42:54 -0800
commit78eb4a5990dadb3402dd3e80d04e2cfd7f9dd6fd (patch)
tree106da761ef835dda393c736d0d33da9358290670 /src/lib.rs
parent5ca4e89dd4427464a11417cd127c67ee96d5fae1 (diff)
downloadglutin-78eb4a5990dadb3402dd3e80d04e2cfd7f9dd6fd.tar.gz
glutin-78eb4a5990dadb3402dd3e80d04e2cfd7f9dd6fd.zip
Minimum/maximum dimensions for windows in win32 api
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0246d52..1056e8b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -527,6 +527,16 @@ pub struct WindowAttributes {
/// The default is `None`.
pub dimensions: Option<(u32, u32)>,
+ /// The minimum dimensions a window can be, If this is `None`, the minimum will be set to 800x600.
+ ///
+ /// The default is `None`.
+ pub min_dimensions: Option<(u32, u32)>,
+
+ /// The maximum dimensions a window can be, If this is `None`, the maximum will be the dimensions of the primary monitor.
+ ///
+ /// The default is `None`.
+ pub max_dimensions: Option<(u32, u32)>,
+
/// If `Some`, the window will be in fullscreen mode with the given monitor.
///
/// The default is `None`.
@@ -563,6 +573,8 @@ impl Default for WindowAttributes {
fn default() -> WindowAttributes {
WindowAttributes {
dimensions: None,
+ min_dimensions: None,
+ max_dimensions: None,
monitor: None,
title: "glutin window".to_owned(),
visible: true,