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

@ -1,15 +1,16 @@
mod handle;
mod render;
mod jack;
mod render;
pub use self::handle::*;
pub use self::render::*;
pub use self::jack::*;
pub use self::render::*;
use crate::prelude::*;
pub const ACTIONS: [(&'static str, &'static str);0] = [];
pub struct Sequencer {
exited: bool,
jack: Jack<Notifications>,
exit: bool,
stdout: Stdout,
cursor: (u16, u16),
duration: u16,
}
@ -29,11 +30,19 @@ impl Sequencer {
)
)?;
Ok(Self {
exit: false,
stdout: std::io::stdout(),
exited: false,
cursor: (0, 0),
duration: 0,
jack,
})
}
}
impl Exitable for Sequencer {
fn exit (&mut self) {
self.exited = true
}
fn exited (&self) -> bool {
self.exited
}
}