Minimum/maximum dimensions for windows in win32 api
This commit is contained in:
parent
5ca4e89dd4
commit
78eb4a5990
5 changed files with 98 additions and 13 deletions
12
src/lib.rs
12
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue