pub struct WindowConfig {
pub title: String,
pub size: [f64; 2],
pub position: Option<[f64; 2]>,
pub decorations: bool,
pub resizable: bool,
pub level: WindowLevel,
pub activating: bool,
pub all_desktops: bool,
pub background: WindowBackground,
pub shadow: bool,
pub visible: bool,
}Expand description
How a window is made. Sizes and positions are logical, in the host’s screen space with the origin at the top left of the primary screen.
Every option names what the window is for, not how a system does it: the host maps each
onto what its system has, and one its system lacks it leaves at the system’s default.
What no option expresses is set through the window’s
native_handle.
Fields§
§title: String§size: [f64; 2]§position: Option<[f64; 2]>Where the window opens; the host chooses when None.
decorations: boolThe system’s title bar and border.
resizable: bool§level: WindowLevel§activating: boolWhether showing or clicking the window makes it the focused one. A host may not be able to refuse activation.
all_desktops: boolWhether the window is on every virtual desktop: macOS Spaces, X11 workspaces.
background: WindowBackground§shadow: boolWhether the window casts the system’s shadow.
visible: boolTrait Implementations§
Source§impl Clone for WindowConfig
impl Clone for WindowConfig
Source§impl Debug for WindowConfig
impl Debug for WindowConfig
Source§impl Default for WindowConfig
impl Default for WindowConfig
Source§fn default() -> WindowConfig
fn default() -> WindowConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for WindowConfig
impl PartialEq for WindowConfig
impl StructuralPartialEq for WindowConfig
Auto Trait Implementations§
impl Freeze for WindowConfig
impl RefUnwindSafe for WindowConfig
impl Send for WindowConfig
impl Sync for WindowConfig
impl Unpin for WindowConfig
impl UnsafeUnpin for WindowConfig
impl UnwindSafe for WindowConfig
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