pub enum AppState {
BorderOnly {
start_time: Instant,
frame_count: u32,
},
FullOverlay {
selected_hint_index: usize,
input: String,
},
PendingActivation {
hint_index: usize,
input: String,
timeout: TimeoutTracker,
},
Exiting {
result: ActivationResult,
},
}Expand description
Application lifecycle state
Variants§
BorderOnly
Border-only phase, waiting for overlay_delay
Fields
FullOverlay
Full overlay visible with window list
Fields
PendingActivation
Exact hint match, waiting for activation_delay timeout
Fields
§
timeout: TimeoutTrackerTimeout tracker for activation delay
Exiting
Application is exiting with a result
Fields
§
result: ActivationResultThe activation result
Implementations§
Source§impl AppState
impl AppState
Sourcepub fn initial(
launcher_mode: bool,
hints: &[WindowHint],
previous_window_id: Option<&str>,
) -> Self
pub fn initial( launcher_mode: bool, hints: &[WindowHint], previous_window_id: Option<&str>, ) -> Self
Creates initial state based on launcher mode.
Launcher mode initializes with FullOverlay state and selects the previous window from MRU tracking, ensuring quick Alt+Space release behavior matches quick Alt+Tab.
Sourcepub fn handle_event(
&self,
event: Event,
config: &Config,
hints: &[WindowHint],
previous_window_id: Option<&str>,
) -> Transition
pub fn handle_event( &self, event: Event, config: &Config, hints: &[WindowHint], previous_window_id: Option<&str>, ) -> Transition
Processes an event and returns new state with actions.
Sourcepub fn selected_hint_index(&self) -> usize
pub fn selected_hint_index(&self) -> usize
Returns the selected hint index for rendering.
Sourcepub fn is_full_overlay(&self) -> bool
pub fn is_full_overlay(&self) -> bool
Returns whether full overlay is displayed (vs border only).
Sourcepub fn is_exiting(&self) -> bool
pub fn is_exiting(&self) -> bool
Returns whether the application is exiting.
Sourcepub fn activation_result(&self) -> Option<&ActivationResult>
pub fn activation_result(&self) -> Option<&ActivationResult>
Returns the activation result if exiting, None otherwise.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnwindSafe for AppState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.