#[derive(Debug, Clone, PartialEq, Eq)]
pub struct OverlayRow {
pub role: OverlayRowRole,
pub result_index: Option<usize>,
pub kind: String,
pub title: String,
pub path: String,
pub icon_path: String,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OverlayRowRole {
Item,
Header,
TopHit,
Status,
Calculator,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum OverlayEvent {
Hotkey(i32),
QueryChanged(String),
MoveSelection(i32),
Submit,
Escape,
ExternalShow,
ExternalQuit,
TrayToggleGameMode,
TrayCheckForUpdates,
SearchResultsReady,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum Theme {
Dark,
Light,
}
#[derive(Debug, Clone)]
pub struct ShimState {
pub query: String,
pub status_text: String,
pub placeholder_hint: Option<String>,
pub help_config_path: String,
pub hotkey_hint: String,
pub hotkey_issue_active: bool,
pub game_mode_enabled: bool,
pub theme: Theme,
pub rows: Vec<OverlayRow>,
pub selected: usize,
pub visible: bool,
pub has_focus: bool,
pub idle_cache_trim_ms: u32,
pub active_memory_target_mb: u16,
pub ui_warm_release_ms: u32,
}
impl Default for ShimState {
fn default() -> Self {
Self {
query: String::new(),
status_text: String::new(),
placeholder_hint: None,
help_config_path: String::new(),
hotkey_hint: "Ctrl+Space".into(),
hotkey_issue_active: false,
game_mode_enabled: false,
theme: Theme::Dark,
rows: Vec::new(),
selected: 0,
visible: false,
has_focus: false,
idle_cache_trim_ms: 90_000,
active_memory_target_mb: 72,
ui_warm_release_ms: 5_000,
}
}
}