i dont know why that worked

This commit is contained in:
🪞👃🪞 2024-06-16 13:58:46 +03:00
parent 4ae62c5bc2
commit b73aa8a0dc
17 changed files with 552 additions and 481 deletions

View file

@ -7,17 +7,14 @@ pub struct Chain {
impl Chain {
pub fn new (name: &str, devices: Vec<Box<dyn Device>>) -> Result<DynamicDevice<Self>, Box<dyn Error>> {
Ok(DynamicDevice::new(render, handle, |_|{}, Self {
Ok(DynamicDevice::new(render, handle, process, Self {
name: name.into(),
devices
}))
}
}
pub fn process (
client: &Client,
scope: &ProcessScope
) -> Control {
pub fn process (state: &mut Chain, client: &Client, scope: &ProcessScope) -> Control {
Control::Continue
}
@ -54,6 +51,6 @@ pub fn render (state: &Chain, buf: &mut Buffer, area: Rect)
Ok(Rect { x: area.x, y: area.y, width: x, height: y })
}
pub fn handle (state: &mut Chain, event: &EngineEvent) -> Result<(), Box<dyn Error>> {
pub fn handle (state: &mut Chain, event: &AppEvent) -> Result<(), Box<dyn Error>> {
Ok(())
}