Draft Program interactivity for Canvas

This commit is contained in:
Héctor Ramón Jiménez 2020-04-19 14:39:30 +02:00
parent 90c3a183d5
commit 0b5028b1ab
9 changed files with 112 additions and 36 deletions

View file

@ -0,0 +1,16 @@
use crate::canvas::{Event, Layer, Size};
pub trait Program {
type Input;
fn layers<'a>(&'a self, input: &'a Self::Input)
-> Vec<Box<dyn Layer + 'a>>;
fn update<'a>(
&'a mut self,
_event: Event,
_bounds: Size,
_input: &'a Self::Input,
) {
}
}