use main loop with input everywhere

This commit is contained in:
🪞👃🪞 2024-05-29 11:32:26 +03:00
parent d6bf840a1f
commit 7dd5f7f488
16 changed files with 301 additions and 168 deletions

View file

@ -9,7 +9,8 @@ pub use std::sync::{
};
pub use crossterm::{
QueueableCommand,
cursor::{self, MoveTo, Hide},
event::{Event, KeyCode, KeyModifiers},
cursor::{self, MoveTo, Show, Hide},
terminal::{self, Clear, ClearType},
style::*,
};
@ -32,3 +33,7 @@ pub type Jack<N> = AsyncClient<
N,
ClosureProcessHandler<Box<dyn FnMut(&Client, &ProcessScope)-> Control + Send>>
>;
pub trait Exitable {
fn exit (&mut self);
fn exited (&self) -> bool;
}