pub struct WindowAttributes {
pub dimensions: Option<(u32, u32)>,
pub min_dimensions: Option<(u32, u32)>,
pub max_dimensions: Option<(u32, u32)>,
pub monitor: Option<MonitorId>,
pub title: String,
pub visible: bool,
pub transparent: bool,
pub decorations: bool,
pub multitouch: bool,
pub icon: Option<PathBuf>,
pub parent: Option<WindowID>,
}
Expand description
Attributes to use when creating a window.
Fields§
§dimensions: Option<(u32, u32)>
The dimensions of the window. If this is None
, some platform-specific dimensions will be
used.
The default is None
.
min_dimensions: Option<(u32, u32)>
The minimum dimensions a window can be, If this is None
, the window will have no minimum dimensions (aside from reserved).
The default is None
.
max_dimensions: Option<(u32, u32)>
The maximum dimensions a window can be, If this is None
, the maximum will have no maximum or will be set to the primary monitor’s dimensions by the platform.
The default is None
.
monitor: Option<MonitorId>
If Some
, the window will be in fullscreen mode with the given monitor.
The default is None
.
title: String
The title of the window in the title bar.
The default is "glutin window"
.
visible: bool
Whether the window should be immediately visible upon creation.
The default is true
.
transparent: bool
Whether the the window should be transparent. If this is true, writing colors
with alpha values different than 1.0
will produce a transparent window.
The default is false
.
decorations: bool
Whether the window should have borders and bars.
The default is true
.
multitouch: bool
[iOS only] Enable multitouch, see [UIView#multipleTouchEnabled] (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/#//apple_ref/occ/instp/UIView/multipleTouchEnabled)
icon: Option<PathBuf>
A path to an icon for the window. This may not be supported on every windowing system. If present, this path must reference a PNG file.
The default is None
.
parent: Option<WindowID>
Parent Window.
The default is None
.
Trait Implementations§
Source§impl Clone for WindowAttributes
impl Clone for WindowAttributes
Source§fn clone(&self) -> WindowAttributes
fn clone(&self) -> WindowAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for WindowAttributes
impl Default for WindowAttributes
Source§fn default() -> WindowAttributes
fn default() -> WindowAttributes
Auto Trait Implementations§
impl Freeze for WindowAttributes
impl RefUnwindSafe for WindowAttributes
impl Send for WindowAttributes
impl Sync for WindowAttributes
impl Unpin for WindowAttributes
impl UnwindSafe for WindowAttributes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more