FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    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.

    Source

    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.

    Source

    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].

    Source

    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].

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.