Struct vulkano_util::window::WindowDescriptor
source · [−]pub struct WindowDescriptor {Show 13 fields
pub width: f32,
pub height: f32,
pub position: Option<[f32; 2]>,
pub resize_constraints: WindowResizeConstraints,
pub scale_factor_override: Option<f64>,
pub title: String,
pub present_mode: PresentMode,
pub resizable: bool,
pub decorations: bool,
pub cursor_visible: bool,
pub cursor_locked: bool,
pub mode: WindowMode,
pub transparent: bool,
}
Expand description
Describes the information needed for creating a window.
Fields
width: f32
The requested logical width of the window’s client area.
May vary from the physical width due to different pixel density on different monitors.
height: f32
The requested logical height of the window’s client area.
May vary from the physical height due to different pixel density on different monitors.
position: Option<[f32; 2]>
The position on the screen that the window will be centered at.
If set to None
, some platform-specific position will be chosen.
resize_constraints: WindowResizeConstraints
Sets minimum and maximum resize limits.
scale_factor_override: Option<f64>
Overrides the window’s ratio of physical pixels to logical pixels.
If there are some scaling problems on X11 try to set this option to Some(1.0)
.
title: String
Sets the title that displays on the window top bar, on the system task bar and other OS specific places.
present_mode: PresentMode
The window’s PresentMode
.
Used to select whether or not VSync is used
resizable: bool
Sets whether the window is resizable.
decorations: bool
Sets whether the window should have borders and bars.
cursor_visible: bool
Sets whether the cursor is visible when the window has focus.
cursor_locked: bool
Sets whether the window locks the cursor inside its borders when the window has focus.
mode: WindowMode
Sets the WindowMode
.
transparent: bool
Sets whether the background of the window should be transparent.
Trait Implementations
sourceimpl Clone for WindowDescriptor
impl Clone for WindowDescriptor
sourcefn clone(&self) -> WindowDescriptor
fn clone(&self) -> WindowDescriptor
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for WindowDescriptor
impl Debug for WindowDescriptor
Auto Trait Implementations
impl RefUnwindSafe for WindowDescriptor
impl Send for WindowDescriptor
impl Sync for WindowDescriptor
impl Unpin for WindowDescriptor
impl UnwindSafe for WindowDescriptor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more