IActivatableLifetime
trait · ferroui-controls · v0.5.0
trait IActivatableLifetime
An interface for platforms that can activate and deactivate the application, and move it into and out of the background.
Members
activated
fn activated(self: &Self, handler: Rc<dyn Fn(&ActivatedEventArgs) -> ()>) -> Rc<dyn IDisposable>
Raised when the application is activated for various reasons, as
described by the ActivationKind.
Disposing the returned handle unsubscribes.
deactivated
fn deactivated(self: &Self, handler: Rc<dyn Fn(&ActivatedEventArgs) -> ()>) -> Rc<dyn IDisposable>
Raised when the application is deactivated for various reasons, as
described by the ActivationKind.
Disposing the returned handle unsubscribes.
try_leave_background
fn try_leave_background(self: &Self) -> bool
Tells the application that it should attempt to leave its background state. Returns true if it will process the request; false otherwise.
For example on macOS this would be [NSApp unhide].
try_enter_background
fn try_enter_background(self: &Self) -> bool
Tells the application that it should attempt to enter its background state. Returns true if it will process the request; false otherwise.
For example on macOS this would be [NSApp hide].
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.