mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
remove some old macros
This commit is contained in:
parent
a82f73d475
commit
f1c7512cbb
18 changed files with 306 additions and 361 deletions
|
|
@ -200,29 +200,29 @@ fn draw_header (state: &Plugin, to: &mut TuiOut, x: u16, y: u16, w: u16) {
|
|||
|
||||
handle!(<Tui>|self:Plugin, from|{
|
||||
match from.event() {
|
||||
key_pat!(KeyCode::Up) => {
|
||||
kpat!(KeyCode::Up) => {
|
||||
self.selected = self.selected.saturating_sub(1);
|
||||
Ok(Some(true))
|
||||
},
|
||||
key_pat!(KeyCode::Down) => {
|
||||
kpat!(KeyCode::Down) => {
|
||||
self.selected = (self.selected + 1).min(match &self.plugin {
|
||||
Some(PluginKind::LV2(LV2Plugin { port_list, .. })) => port_list.len() - 1,
|
||||
_ => unimplemented!()
|
||||
});
|
||||
Ok(Some(true))
|
||||
},
|
||||
key_pat!(KeyCode::PageUp) => {
|
||||
kpat!(KeyCode::PageUp) => {
|
||||
self.selected = self.selected.saturating_sub(8);
|
||||
Ok(Some(true))
|
||||
},
|
||||
key_pat!(KeyCode::PageDown) => {
|
||||
kpat!(KeyCode::PageDown) => {
|
||||
self.selected = (self.selected + 10).min(match &self.plugin {
|
||||
Some(PluginKind::LV2(LV2Plugin { port_list, .. })) => port_list.len() - 1,
|
||||
_ => unimplemented!()
|
||||
});
|
||||
Ok(Some(true))
|
||||
},
|
||||
key_pat!(KeyCode::Char(',')) => {
|
||||
kpat!(KeyCode::Char(',')) => {
|
||||
match self.plugin.as_mut() {
|
||||
Some(PluginKind::LV2(LV2Plugin { port_list, ref mut instance, .. })) => {
|
||||
let index = port_list[self.selected].index;
|
||||
|
|
@ -234,7 +234,7 @@ handle!(<Tui>|self:Plugin, from|{
|
|||
}
|
||||
Ok(Some(true))
|
||||
},
|
||||
key_pat!(KeyCode::Char('.')) => {
|
||||
kpat!(KeyCode::Char('.')) => {
|
||||
match self.plugin.as_mut() {
|
||||
Some(PluginKind::LV2(LV2Plugin { port_list, ref mut instance, .. })) => {
|
||||
let index = port_list[self.selected].index;
|
||||
|
|
@ -246,7 +246,7 @@ handle!(<Tui>|self:Plugin, from|{
|
|||
}
|
||||
Ok(Some(true))
|
||||
},
|
||||
key_pat!(KeyCode::Char('g')) => {
|
||||
kpat!(KeyCode::Char('g')) => {
|
||||
match self.plugin {
|
||||
//Some(PluginKind::LV2(ref mut plugin)) => {
|
||||
//plugin.ui_thread = Some(run_lv2_ui(LV2PluginUI::new()?)?);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue