pub struct LifecycleState {
quit_requested: AtomicBool,
pending_activation: AtomicBool,
pub mini_restore: Mutex<Option<(PhysicalPosition<i32>, PhysicalSize<u32>)>>,
}Expand description
Quit and activation requests shared between the tray, window, and single-instance handler.
Fields§
§quit_requested: AtomicBoolSet when the user chose Quit, so closing the window exits instead of hiding.
pending_activation: AtomicBoolSet when a second launch arrived before the main window could be shown.
mini_restore: Mutex<Option<(PhysicalPosition<i32>, PhysicalSize<u32>)>>The window’s position and size before it became the mini window, while it is one.
Implementations§
Source§impl LifecycleState
impl LifecycleState
Sourcepub fn mark_quit_requested(&self)
pub fn mark_quit_requested(&self)
Records that the user chose to quit.
Sourcepub fn quit_requested(&self) -> bool
pub fn quit_requested(&self) -> bool
Returns whether the user chose to quit.
Sourcepub fn take_pending_activation(&self) -> bool
pub fn take_pending_activation(&self) -> bool
Returns and clears a deferred activation request.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LifecycleState
impl RefUnwindSafe for LifecycleState
impl Send for LifecycleState
impl Sync for LifecycleState
impl Unpin for LifecycleState
impl UnsafeUnpin for LifecycleState
impl UnwindSafe for LifecycleState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more