pub trait Window: Send + Sync {
// Required methods
fn close(&self);
fn set_title(&self, title: &str);
fn set_size(&self, width: f32, height: f32);
fn is_key(&self) -> bool;
fn is_main(&self) -> bool;
fn is_visible(&self) -> bool;
fn set_visible(&self, visible: bool);
fn bring_to_front(&self);
}Expand description
Abstract trait representing a platform-native window. Implementations delegate calls back to the platform renderers and events.
Required Methods§
Sourcefn is_visible(&self) -> bool
fn is_visible(&self) -> bool
Check if the window is currently visible/mapped.
Sourcefn set_visible(&self, visible: bool)
fn set_visible(&self, visible: bool)
Hide or show the window.
Sourcefn bring_to_front(&self)
fn bring_to_front(&self)
Bring the window to the front and focus it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".