pub struct WindowParam {
pub title: String,
pub size: Point2,
pub high_dpi: bool,
pub fullscreen: bool,
pub sample_count: u32,
pub resizable: bool,
pub icon: Option<Icon>,
pub platform: Platform,
}Fields§
§title: StringTitle of the window, defaults to an empty string.
size: Point2The preferred width / height of the window
Default: [960, 540]
high_dpi: boolWhether the rendering canvas is full-resolution on HighDPI displays.
Default: false
fullscreen: boolWhether the window should be created in fullscreen mode, ignored on wasm/android.
Default: false
sample_count: u32MSAA sample count
Default: 1
resizable: boolDetermines if the application user can resize the window
icon: Option<Icon>The icon will be used as
- taskbar and titlebar icons on Windows.
- dock and titlebar icon on MacOs.
- TODO: favicon on HTML5
- TODO: taskbar and titlebar(highly dependent on the WM) icons on Linux
platform: PlatformPlatform specific settings. Hints to OS for context creation, driver-specific settings etc.
Implementations§
Source§impl WindowParam
impl WindowParam
pub fn new() -> Self
pub fn title(self, title: impl Into<String>) -> Self
Sourcepub fn high_dpi(self, high_dpi: bool) -> Self
pub fn high_dpi(self, high_dpi: bool) -> Self
Whether the rendering canvas is full-resolution on HighDPI displays.
Default: false
Sourcepub fn fullscreen(self, fullscreen: bool) -> Self
pub fn fullscreen(self, fullscreen: bool) -> Self
Whether the window should be created in fullscreen mode, ignored on wasm/android.
Default: false
Sourcepub fn sample_count(self, sample_count: u32) -> Self
pub fn sample_count(self, sample_count: u32) -> Self
MSAA sample count
Default: 1
Sourcepub fn resizeable(self, window_resizable: bool) -> Self
pub fn resizeable(self, window_resizable: bool) -> Self
Determines if the application user can resize the window
Trait Implementations§
Source§impl Clone for WindowParam
impl Clone for WindowParam
Source§fn clone(&self) -> WindowParam
fn clone(&self) -> WindowParam
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowParam
impl Debug for WindowParam
Source§impl Default for WindowParam
impl Default for WindowParam
Source§impl Hash for WindowParam
impl Hash for WindowParam
Source§impl PartialEq for WindowParam
impl PartialEq for WindowParam
impl Eq for WindowParam
impl StructuralPartialEq for WindowParam
Auto Trait Implementations§
impl Freeze for WindowParam
impl RefUnwindSafe for WindowParam
impl Send for WindowParam
impl Sync for WindowParam
impl Unpin for WindowParam
impl UnwindSafe for WindowParam
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
Mutably borrows from an owned value. Read more
Source§impl<Src, Dest> CastRangeFrom<Dest> for Srcwhere
Dest: CastRangeInto<Src>,
impl<Src, Dest> CastRangeFrom<Dest> for Srcwhere
Dest: CastRangeInto<Src>,
fn cast_range_from(value: Dest) -> Src
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DefaultExtension for T
impl<T> DefaultExtension for T
fn is_default(&self) -> bool
fn is_not_default(&self) -> bool
Source§impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
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>
Converts
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>
Converts
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