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: StringWindow title. Defaults to an empty string.
window_width: i32Preferred window width (ignored on WASM/Android).
Defaults to 800.
window_height: i32Preferred window height (ignored on WASM/Android).
Defaults to 600.
high_dpi: boolIf true, the rendering canvas is scaled for HighDPI displays.
Defaults to false.
fullscreen: boolIf true, create the window in fullscreen mode (ignored on WASM/Android).
Defaults to false.
sample_count: i32MSAA sample count.
Defaults to 1.
window_resizable: boolIf 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.desktopfile
platform: PlatformPlatform-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 UnsafeUnpin 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