mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
use main loop with input everywhere
This commit is contained in:
parent
d6bf840a1f
commit
7dd5f7f488
16 changed files with 301 additions and 168 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue