restruct: 12e

This commit is contained in:
i do not exist 2026-06-27 22:10:04 +03:00
parent 804a5bc905
commit 19ab138320
2 changed files with 21 additions and 8 deletions

View file

@ -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> {