pub trait HostWindow: 'static {
// Required methods
fn view(&self) -> ViewRef;
fn frame(&self) -> Rect;
fn set_frame(&self, frame: Rect, animate: Option<Duration>);
fn set_title(&self, title: &str);
fn show(&self);
fn hide(&self);
fn is_minimized(&self) -> bool;
fn is_occluded(&self) -> bool;
fn close(&self);
fn native_handle(&self) -> Option<RawWindowHandle>;
}Expand description
The window around a view the host puts on screen in a window the app may manage.
Required Methods§
fn view(&self) -> ViewRef
Sourcefn set_frame(&self, frame: Rect, animate: Option<Duration>)
fn set_frame(&self, frame: Rect, animate: Option<Duration>)
Moves and sizes the window, over animate when the host can animate a frame.
fn set_title(&self, title: &str)
fn show(&self)
fn hide(&self)
Sourcefn is_minimized(&self) -> bool
fn is_minimized(&self) -> bool
Flutter WindowController.isMinimized; macOS isMiniaturized, Windows IsIconic.
false where the system does not tell a client, as Wayland does not.
Sourcefn is_occluded(&self) -> bool
fn is_occluded(&self) -> bool
Covered all over, or otherwise not shown: macOS’s occlusion state without its visible bit,
winit’s Occluded. Not in Flutter’s controller; Inset’s, after the platforms. false
where the system does not tell a window, as Windows and Wayland do not.
Sourcefn close(&self)
fn close(&self)
Closes the window; its view goes away with it. The user’s asking to close it only reports
it (EmbedderClient::view_close_requested);
this closes it.
Sourcefn native_handle(&self) -> Option<RawWindowHandle>
fn native_handle(&self) -> Option<RawWindowHandle>
The native window, for configuration this interface does not carry.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".