#[repr(C)]pub struct WindowCreateOptions {
pub window_state: FullWindowState,
pub create_callback: OptionCallback,
pub renderer: OptionRendererOptions,
pub theme: OptionWindowTheme,
pub size_to_content: bool,
pub hot_reload: bool,
pub parent_window_id: u64,
}Expand description
Options for creating a new window
Fields§
§window_state: FullWindowStateInitial state for the new window
create_callback: OptionCallbackOptional callback invoked after the window is created
renderer: OptionRendererOptionsOptional renderer configuration (e.g., VSync, SRGB)
theme: OptionWindowThemeOptional window theme override (light/dark)
size_to_content: boolIf true, the window is resized to fit its content after the first layout
hot_reload: boolIf true, enables hot-reloading of CSS and resources
parent_window_id: u64Parent window’s platform id (the window-registry key: X Window id on X11,
wl_surface ptr on Wayland, HWND on Windows, NSWindow ptr on macOS), or 0
for a top-level window with no parent. Child windows (menus, dropdowns,
dialogs) set this so the backend can position them relative to the parent
and, on X11, reuse the parent’s display connection for the single shared
event pump. 0 = no parent.
Implementations§
Source§impl WindowCreateOptions
impl WindowCreateOptions
Sourcepub fn create(layout_callback: impl Into<LayoutCallback>) -> Self
pub fn create(layout_callback: impl Into<LayoutCallback>) -> Self
Create a new WindowCreateOptions with a layout callback
Trait Implementations§
Source§impl Clone for WindowCreateOptions
impl Clone for WindowCreateOptions
Source§fn clone(&self) -> WindowCreateOptions
fn clone(&self) -> WindowCreateOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WindowCreateOptions
impl Debug for WindowCreateOptions
Source§impl Default for WindowCreateOptions
impl Default for WindowCreateOptions
Source§impl Extend<WindowCreateOptions> for WindowCreateOptionsVec
impl Extend<WindowCreateOptions> for WindowCreateOptionsVec
Source§fn extend<T: IntoIterator<Item = WindowCreateOptions>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = WindowCreateOptions>>(&mut self, iter: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl FromIterator<WindowCreateOptions> for WindowCreateOptionsVec
impl FromIterator<WindowCreateOptions> for WindowCreateOptionsVec
Source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = WindowCreateOptions>,
fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = WindowCreateOptions>,
Source§impl PartialEq for WindowCreateOptions
impl PartialEq for WindowCreateOptions
impl StructuralPartialEq for WindowCreateOptions
Auto Trait Implementations§
impl Freeze for WindowCreateOptions
impl RefUnwindSafe for WindowCreateOptions
impl Send for WindowCreateOptions
impl Sync for WindowCreateOptions
impl Unpin for WindowCreateOptions
impl UnsafeUnpin for WindowCreateOptions
impl UnwindSafe for WindowCreateOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more