mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
implement expose stubs for subcommands
This commit is contained in:
parent
87cd6099ad
commit
6d4a629311
3 changed files with 68 additions and 5 deletions
|
|
@ -18,6 +18,45 @@ handle!(TuiIn: |self: App, input|Ok(if let Some(command) = self.config.keys.comm
|
|||
}));
|
||||
|
||||
#[tengri_proc::expose] impl App {
|
||||
fn _todo_isize_stub (&self) -> isize {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_clip_cmd_stub (&self) -> ClipCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_clock_cmd_stub (&self) -> ClockCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_sampler_cmd_stub (&self) -> SamplerCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_pool_cmd_stub (&self) -> PoolCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_output_cmd_stub (&self) -> OutputCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_input_cmd_stub (&self) -> InputCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_midi_edit_cmd_stub (&self) -> MidiEditCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_message_cmd_stub (&self) -> MessageCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_scene_cmd_stub (&self) -> SceneCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_device_cmd_stub (&self) -> DeviceCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_track_cmd_stub (&self) -> TrackCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_item_theme_stub (&self) -> ItemTheme {
|
||||
todo!()
|
||||
}
|
||||
fn focus_editor (&self) -> bool {
|
||||
self.is_editing()
|
||||
}
|
||||
|
|
@ -161,6 +200,27 @@ handle!(TuiIn: |self: App, input|Ok(if let Some(command) = self.config.keys.comm
|
|||
}
|
||||
|
||||
#[tengri_proc::expose] impl MidiPool {
|
||||
fn _todo_bool_stub (&self) -> bool {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_path_buf_stub (&self) -> PathBuf {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_arc_str_stub (&self) -> Arc<str> {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_clip_command_stub (&self) -> PoolClipCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_file_command_stub (&self) -> FileBrowserCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_length_command_stub (&self) -> ClipLengthCommand {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_rename_command_stub (&self) -> ClipRenameCommand {
|
||||
todo!()
|
||||
}
|
||||
fn clip_new (&self) -> MidiClip {
|
||||
self.new_clip()
|
||||
}
|
||||
|
|
@ -185,6 +245,9 @@ handle!(TuiIn: |self: App, input|Ok(if let Some(command) = self.config.keys.comm
|
|||
}
|
||||
|
||||
#[tengri_proc::expose] impl MidiEditor {
|
||||
fn _todo_opt_clip_stub (&self) -> Option<Arc<RwLock<MidiClip>>> {
|
||||
todo!()
|
||||
}
|
||||
fn time_lock (&self) -> bool {
|
||||
self.get_time_lock()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,8 +122,7 @@ impl Configuration {
|
|||
return Err(format!("(e4) unexpected non-symbol {next:?}").into())
|
||||
};
|
||||
|
||||
let next = exp.next();
|
||||
if let Some(Token { value: Value::Str(path), .. }) = next {
|
||||
if let Some(Token { value: Value::Str(path), .. }) = exp.peek() {
|
||||
let path = base.as_ref().parent().unwrap().join(unquote(path));
|
||||
if !std::fs::exists(&path)? {
|
||||
return Err(format!("(e5) not found: {path:?}").into())
|
||||
|
|
@ -133,8 +132,9 @@ impl Configuration {
|
|||
println!("ok");
|
||||
let cond = cond.unwrap();
|
||||
map.add_layer_if(
|
||||
Box::new(|state|{
|
||||
Context::get(state, &Value::Sym(cond)).unwrap_or(false)
|
||||
Box::new(move |state|{
|
||||
let mut exp = exp.clone();
|
||||
Context::get(state, &mut exp).unwrap_or(false)
|
||||
}),
|
||||
keys
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue