This commit is contained in:
🪞👃🪞 2025-07-14 22:22:45 +03:00
parent 6c3a0964ec
commit 7271081fc9
10 changed files with 119 additions and 296 deletions

View file

@ -8,13 +8,13 @@ pub struct TuiIn(
/// Exit flag
pub Arc<AtomicBool>,
/// Input event
pub Event,
pub crossterm::event::Event,
);
impl Input for TuiIn {
type Event = Event;
type Event = crossterm::event::Event;
type Handled = bool;
fn event (&self) -> &Event { &self.1 }
fn event (&self) -> &crossterm::event::Event { &self.1 }
fn is_done (&self) -> bool { self.0.fetch_and(true, Relaxed) }
fn done (&self) { self.0.store(true, Relaxed); }
}