From 19ab138320a67f106dc39717a70c58100b41c8b9 Mon Sep 17 00:00:00 2001 From: i do not exist Date: Sat, 27 Jun 2026 22:10:04 +0300 Subject: [PATCH] restruct: 12e --- src/tek.rs | 27 ++++++++++++++++++++------- tengri | 2 +- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/tek.rs b/src/tek.rs index 3b168c6e..6e83d5e0 100644 --- a/src/tek.rs +++ b/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 ( target: &mut T, value: &T, returned: impl Fn(T)->U ) -> Perhaps { diff --git a/tengri b/tengri index cb382cf1..7613c655 160000 --- a/tengri +++ b/tengri @@ -1 +1 @@ -Subproject commit cb382cf12e9169310ddab4eca2ca01e87fde9869 +Subproject commit 7613c655000949180e6e838ce96c0f168b8d4cc7