pub struct WindowConfig {Show 14 fields
pub title: String,
pub icon: Option<IconImage>,
pub size: [f64; 2],
pub position: Option<[f64; 2]>,
pub decorations: bool,
pub resizable: bool,
pub level: WindowLevel,
pub all_desktops: bool,
pub background: WindowBackground,
pub shadow: bool,
pub visible: bool,
pub macos: MacosWindowConfig,
pub windows: WindowsWindowConfig,
pub linux: LinuxWindowConfig,
}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§icon: Option<IconImage>The window’s own icon, where the system shows one for a window rather than for the app:
the title bar’s and the taskbar’s on Windows and X11, the card’s in Android’s Recents. The
app’s icon where None.
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§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: boolWhether the window shows: once its view’s first frame is drawn, never empty before, and
activated, as a newly opened window is. An app that wants it seen sooner calls
HostWindow::show or HostWindow::activate, which act at once.
macos: MacosWindowConfigWhat only macOS windows offer; other systems leave it out.
windows: WindowsWindowConfigWhat only Windows’ windows offer; other systems leave it out.
linux: LinuxWindowConfigWhat only Linux’s windows offer; other systems leave it out.