diff options
author | 2021-04-08 12:58:08 -0700 | |
---|---|---|
committer | 2021-04-08 12:58:08 -0700 | |
commit | cdab8f90fb525c509e0a15bb1d0b3d7213e176f3 (patch) | |
tree | 8db44d27d2ecbc6f8d4b2614060cbb23d419a3b4 /src | |
parent | 3ea2c4595acbbbe22ad04a642f98aeb08b638c58 (diff) | |
download | iced-cdab8f90fb525c509e0a15bb1d0b3d7213e176f3.tar.gz iced-cdab8f90fb525c509e0a15bb1d0b3d7213e176f3.tar.bz2 iced-cdab8f90fb525c509e0a15bb1d0b3d7213e176f3.zip |
add window visibility
Diffstat (limited to 'src')
-rw-r--r-- | src/application.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/application.rs b/src/application.rs index 7b7de6d4..317f9801 100644 --- a/src/application.rs +++ b/src/application.rs @@ -191,6 +191,13 @@ pub trait Application: Sized { false } + /// Returns whether the [`Application`] should be visible or not + /// + /// By default, it returns `true`. + fn visible(&self) -> bool { + true + } + /// Runs the [`Application`]. /// /// On native platforms, this method will take control of the current thread @@ -295,6 +302,10 @@ where fn should_exit(&self) -> bool { self.0.should_exit() } + + fn visible(&self) -> bool { + self.0.visible() + } } #[cfg(target_arch = "wasm32")] |