pub struct Conf {
pub window_title: String,
pub window_width: i32,
pub window_height: i32,
pub high_dpi: bool,
pub fullscreen: bool,
pub sample_count: i32,
pub window_resizable: bool,
pub icon: Option<Icon>,
pub platform: Platform,
}
Expand description
Describes a hardware and platform-specific setup.
Fields§
§window_title: String
Window title. Defaults to an empty string.
window_width: i32
Preferred window width (ignored on WASM/Android).
Defaults to 800
.
window_height: i32
Preferred window height (ignored on WASM/Android).
Defaults to 600
.
high_dpi: bool
If true
, the rendering canvas is scaled for HighDPI displays.
Defaults to false
.
fullscreen: bool
If true
, create the window in fullscreen mode (ignored on WASM/Android).
Defaults to false
.
sample_count: i32
MSAA sample count.
Defaults to 1
.
window_resizable: bool
If true
, the user can resize the window.
icon: Option<Icon>
Optional icon data used by the OS where applicable:
- On Windows, taskbar/title bar icon
- On macOS, Dock/title bar icon
- TODO: Favicon on HTML5
- TODO: Taskbar/title bar icon on Linux (depends on WM)
- Note: on gnome, icon is determined using
WM_CLASS
(can be set underPlatform
) and an external.desktop
file
platform: Platform
Platform-specific hints (e.g., context creation, driver settings).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Conf
impl RefUnwindSafe for Conf
impl Send for Conf
impl Sync for Conf
impl Unpin for Conf
impl UnwindSafe for Conf
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