pub struct WindowConfig {Show 20 fields
pub title: String,
pub width: u32,
pub height: u32,
pub min_width: Option<u32>,
pub min_height: Option<u32>,
pub max_width: Option<u32>,
pub max_height: Option<u32>,
pub resizable: bool,
pub mode: WindowMode,
pub decoration: WindowDecoration,
pub theme: ThemeMode,
pub transparent: bool,
pub always_on_top: bool,
pub anchor: Option<WindowAnchor>,
pub dock_bottom_right: bool,
pub single_instance_id: Option<String>,
pub vibrancy: VibrancyEffect,
pub present_mode: PresentMode,
pub tooltip_delay: Duration,
pub tooltip_style: HoverTooltipStyle,
}Expand description
Configuration used when creating or reconfiguring a platform window.
Fields§
§title: String§width: u32§height: u32§min_width: Option<u32>§min_height: Option<u32>§max_width: Option<u32>§max_height: Option<u32>§resizable: bool§mode: WindowMode§decoration: WindowDecoration§theme: ThemeMode§transparent: bool§always_on_top: bool§anchor: Option<WindowAnchor>§dock_bottom_right: bool§single_instance_id: Option<String>§vibrancy: VibrancyEffect§present_mode: PresentModeSwapchain presentation mode (Immediate / Mailbox for uncapped 3D viewports, Fifo default).
tooltip_delay: DurationPointer dwell delay before native hover tooltips (title / alt) become visible.
tooltip_style: HoverTooltipStyleVisual styling and offset configuration for native hover tooltips.
Implementations§
Source§impl WindowConfig
impl WindowConfig
Sourcepub fn with_present_mode(self, present_mode: PresentMode) -> Self
pub fn with_present_mode(self, present_mode: PresentMode) -> Self
Sets swapchain present mode (e.g. PresentMode::Immediate for uncapped framerate).
Sourcepub fn with_tooltip_delay(self, delay: Duration) -> Self
pub fn with_tooltip_delay(self, delay: Duration) -> Self
Configures the dwell delay before native hover tooltips become visible.
Sourcepub fn with_tooltip_delay_ms(self, delay_ms: u64) -> Self
pub fn with_tooltip_delay_ms(self, delay_ms: u64) -> Self
Configures the dwell delay in milliseconds before native hover tooltips become visible.
Sourcepub fn with_tooltip_style(self, style: HoverTooltipStyle) -> Self
pub fn with_tooltip_style(self, style: HoverTooltipStyle) -> Self
Configures visual styling and offset for native hover tooltips.
Sourcepub fn with_single_instance(self, app_id: impl Into<String>) -> Self
pub fn with_single_instance(self, app_id: impl Into<String>) -> Self
Configures the window to enforce a single-instance mutex and focus existing instance on launch.
Sourcepub fn with_vibrancy(self, vibrancy: VibrancyEffect) -> Self
pub fn with_vibrancy(self, vibrancy: VibrancyEffect) -> Self
Configures window backdrop blur and vibrancy (Mica, Acrylic, NSVisualEffectView).
Sourcepub fn with_anchor(self, anchor: WindowAnchor) -> Self
pub fn with_anchor(self, anchor: WindowAnchor) -> Self
Configures monitor workarea placement or corner docking for this window.
Sourcepub fn with_dock_bottom_right(self, dock_bottom_right: bool) -> Self
pub fn with_dock_bottom_right(self, dock_bottom_right: bool) -> Self
Pins the window to the bottom-right corner of the primary monitor’s workarea (“stuck” mode).
Sourcepub const fn effective_anchor(&self) -> Option<WindowAnchor>
pub const fn effective_anchor(&self) -> Option<WindowAnchor>
Resolves the effective window anchor, honoring both anchor and dock_bottom_right.