mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
big ass refactor (rip client)
This commit is contained in:
parent
94c1f83ef2
commit
8c3cf53c67
56 changed files with 2232 additions and 1891 deletions
29
src/model/looper.rs
Normal file
29
src/model/looper.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
use crate::core::*;
|
||||
|
||||
pub struct Looper {
|
||||
name: String
|
||||
}
|
||||
|
||||
impl Looper {
|
||||
pub fn new (name: &str) -> Result<DynamicDevice<Self>, Box<dyn Error>> {
|
||||
Ok(DynamicDevice::new(render, handle, process, Self {
|
||||
name: name.into(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn process (_: &mut Looper, _: &Client, _: &ProcessScope) -> Control {
|
||||
Control::Continue
|
||||
}
|
||||
|
||||
pub fn render (_: &Looper, _: &mut Buffer, _: Rect) -> Usually<Rect> {
|
||||
Ok(Rect::default())
|
||||
}
|
||||
|
||||
pub fn handle (_: &mut Looper, _: &AppEvent) -> Usually<bool> {
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
pub const ACTIONS: [(&'static str, &'static str);1] = [
|
||||
("Ins/Del", "Add/remove loop"),
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue