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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.