extract api with expose/impose macros

This commit is contained in:
🪞👃🪞 2025-04-14 13:41:35 +03:00
parent d893ae0309
commit 664cd8942f
9 changed files with 241 additions and 141 deletions

View file

@ -7,14 +7,6 @@ use crate::*;
SetLoop(usize, usize, bool),
SetColor(usize, usize, ItemPalette),
}
atom_command!(ClipCommand: |app: Tek| {
("get" [a: usize, b: usize] Some(Self::Get(a.unwrap(), b.unwrap())))
("put" [a: usize, b: usize, c: Option<Arc<RwLock<MidiClip>>>] Some(Self::Put(a.unwrap(), b.unwrap(), c.unwrap())))
("enqueue" [a: usize, b: usize] Some(Self::Enqueue(a.unwrap(), b.unwrap())))
("edit" [a: Option<Arc<RwLock<MidiClip>>>] Some(Self::Edit(a.unwrap())))
("loop" [a: usize, b: usize, c: bool] Some(Self::SetLoop(a.unwrap(), b.unwrap(), c.unwrap())))
("color" [a: usize, b: usize] Some(Self::SetColor(a.unwrap(), b.unwrap(), ItemPalette::random())))
});
command!(|self: ClipCommand, app: Tek|match self {
Self::Get(track, scene) => { todo!() },
Self::Put(track, scene, clip) => {