tek/crates/midikbd/src/main.rs
2024-07-04 01:36:30 +03:00

38 lines
830 B
Rust

extern crate clap;
extern crate crossterm;
extern crate engine;
type StdResult<T> = Result<T, Box<dyn std::error::Error>>
pub fn main () -> StdResult<()> {
let cli = Cli::parse();
let engine = run_jack_engine(move |_: &Client, _: &ProcessScope| {
Control::Continue
});
let app = App::new()
}
pub struct App {
sleep: std::time::Duration
}
impl App {
fn init () -> Self {
Self {
sleep: std::time::Duration::from_millis(16)
}
}
fn run (&self) -> StdResult<()> {
loop {
self.update()?;
self.render()?;
std::thread::sleep(self.sleep);
}
}
fn update (&self) -> StdResult<()> {
}
fn render (&self) -> StdResult<()> {
use crossterm::*;
let (cols, rows) = terminal::size()?;
}
}