mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-07-17 07:46:57 +02:00
restruct: 12e
This commit is contained in:
parent
804a5bc905
commit
19ab138320
2 changed files with 21 additions and 8 deletions
27
src/tek.rs
27
src/tek.rs
|
|
@ -22,7 +22,7 @@ pub(crate) use ::midly::{Smf, TrackEventKind, MidiMessage, Error as MidiError, n
|
|||
|
||||
pub extern crate tengri;
|
||||
pub(crate) use tengri::{
|
||||
*, lang::*, exit::*, eval::*, keys::*, sing::*, time::*, draw::*, term::*, color::*, task::*,
|
||||
*, lang::*, exit::*, eval::*, sing::*, time::*, draw::*, term::*, color::*, task::*,
|
||||
crossterm::event::{Event, KeyEvent},
|
||||
ratatui::{
|
||||
self,
|
||||
|
|
@ -89,8 +89,8 @@ pub(crate) use tengri::{
|
|||
pub fn main () -> Usually<()> {
|
||||
Config::watch(|config|{
|
||||
Exit::run(|exit|{
|
||||
Jack::new_run("tek", move|jack|{
|
||||
Ok(App::new_shared_run(&exit, &jack, Arrangement::new(
|
||||
let state = Jack::new_run("tek", move|jack|{
|
||||
Ok(App::new(&jack, Arrangement::new(
|
||||
&jack,
|
||||
None,
|
||||
Clock::new(&jack, Some(51.))?,
|
||||
|
|
@ -98,15 +98,28 @@ pub fn main () -> Usually<()> {
|
|||
vec![],
|
||||
vec![],
|
||||
vec![],
|
||||
), config, ":menu")?.0)
|
||||
// TODO: Sync I/O timings with main clock, so that things
|
||||
// "accidentally" fall on the beat in overload conditions.
|
||||
})
|
||||
), config, ":menu"))
|
||||
})?;
|
||||
let keyboard = tui_input(
|
||||
exit.as_ref(), &state, Duration::from_millis(100)
|
||||
)?;
|
||||
let terminal = tui_output(
|
||||
&mut std::io::stdout(), exit.as_ref(), &state, Duration::from_millis(10)
|
||||
)?;
|
||||
Ok(())
|
||||
})
|
||||
})?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
tui_keys!(|self: App, input| {
|
||||
todo!()
|
||||
});
|
||||
|
||||
tui_view!(|self: App| {
|
||||
""
|
||||
});
|
||||
|
||||
pub fn swap_value <T: Clone + PartialEq, U> (
|
||||
target: &mut T, value: &T, returned: impl Fn(T)->U
|
||||
) -> Perhaps<U> {
|
||||
|
|
|
|||
2
tengri
2
tengri
|
|
@ -1 +1 @@
|
|||
Subproject commit cb382cf12e9169310ddab4eca2ca01e87fde9869
|
||||
Subproject commit 7613c655000949180e6e838ce96c0f168b8d4cc7
|
||||
Loading…
Add table
Add a link
Reference in a new issue