diff options
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")] |