pub struct TestWindow { /* private fields */ }Expand description
A window that shows nothing, keeps the frame, the title and the icon it was last given, whether
it was last shown or hidden, whether it is maximized or full screen and the size limits it was
last given, and
counts how often it
was closed and dragged: one of
TestWindows, or one a test gives the app a view in. A closed window’s view is in no window any more, and is no longer among the
views of TestWindows. It is neither minimized nor occluded until a test says so, and the
test then reports the change itself, as a host would through EmbedderClient::window_changed.
Implementations§
Source§impl TestWindow
impl TestWindow
Sourcepub fn around(view: TestView, config: WindowConfig) -> Rc<TestWindow>
pub fn around(view: TestView, config: WindowConfig) -> Rc<TestWindow>
A window configured as config around view, which is in it from now on: as a desktop
makes for a request, or as WaOS shows a program’s view it gives. It starts where the
configuration places it, or at the origin, and shown as the configuration says.
Sourcepub fn test_view(&self) -> &Rc<TestView>
pub fn test_view(&self) -> &Rc<TestView>
The view the window shows, which counts the pictures presented to it.
Sourcepub fn config(&self) -> &WindowConfig
pub fn config(&self) -> &WindowConfig
The configuration the window was asked for with.
Sourcepub fn title(&self) -> String
pub fn title(&self) -> String
The title the window was last given, its configuration’s until the app sets another.
Sourcepub fn icon(&self) -> Option<IconImage>
pub fn icon(&self) -> Option<IconImage>
The icon the window was last given, its configuration’s until the app sets another.
Sourcepub fn activations(&self) -> u32
pub fn activations(&self) -> u32
How many times the window was asked to be activated.
Sourcepub fn set_minimized(&self, minimized: bool)
pub fn set_minimized(&self, minimized: bool)
The window is minimized, or restored, from now on.
Sourcepub fn set_occluded(&self, occluded: bool)
pub fn set_occluded(&self, occluded: bool)
The window is occluded, or shown, from now on.
Trait Implementations§
Source§impl HostWindow for TestWindow
impl HostWindow for TestWindow
Source§fn set_fullscreen(&self, fullscreen: bool, _screen: Option<ScreenId>)
fn set_fullscreen(&self, fullscreen: bool, _screen: Option<ScreenId>)
Full screen at once, on whichever screen: a test window is on none.
fn view(&self) -> ViewRef
Source§fn set_frame(&self, frame: Rect, _animate: Option<Duration>)
fn set_frame(&self, frame: Rect, _animate: Option<Duration>)
animate when the host can animate a frame.fn set_title(&self, title: &str)
Source§fn set_icon(&self, icon: Option<&IconImage>)
fn set_icon(&self, icon: Option<&IconImage>)
WindowConfig::icon); the app’s icon where None.
A system that shows no icon for a window, as macOS and Wayland do not, drops it.Source§fn show(&self)
fn show(&self)
Source§fn hide(&self)
fn hide(&self)
Source§fn is_minimized(&self) -> bool
fn is_minimized(&self) -> bool
WindowController.isMinimized; macOS isMiniaturized, Windows IsIconic.
false where the system does not tell a client, as Wayland does not.Source§fn is_occluded(&self) -> bool
fn is_occluded(&self) -> bool
Occluded. Not in Flutter’s controller; Waft’s, after the platforms. false
where the system does not tell a window, as Windows and Wayland do not.Source§fn close(&self)
fn close(&self)
EmbedderClient::view_close_requested);
this closes it.Source§fn size_limits(&self) -> Option<&dyn WindowSizeLimits>
fn size_limits(&self) -> Option<&dyn WindowSizeLimits>
WindowController.setConstraints.Source§fn drag(&self)
fn drag(&self)
MacosTitleBar::Hidden). Call it from
the press.Source§fn is_maximized(&self) -> bool
fn is_maximized(&self) -> bool
WindowController.isMaximized; on macOS, zoomed. false while the window is full
screen.Source§fn set_maximized(&self, maximized: bool)
fn set_maximized(&self, maximized: bool)
WindowController.setMaximized; on macOS, zooms the window or returns it to its
size from before.Source§fn set_minimized(&self, minimized: bool)
fn set_minimized(&self, minimized: bool)
WindowController.setMinimized.Source§fn is_fullscreen(&self) -> bool
fn is_fullscreen(&self) -> bool
WindowController.isFullscreen: whether the window fills a screen, without its
title bar and over the system’s own bars; on macOS, in a Space of its own. false where a
window has no such state, as a phone’s task, which fills the screen as it is.Source§fn native_handle(&self) -> Option<RawWindowHandle>
fn native_handle(&self) -> Option<RawWindowHandle>
Source§fn title_bar_double_click_action(&self) -> TitleBarAction
fn title_bar_double_click_action(&self) -> TitleBarAction
MacosTitleBar::Hidden): macOS’s “Double-click a window’s title bar to”.