diff options
Diffstat (limited to 'wgpu/src/widget/canvas/program.rs')
-rw-r--r-- | wgpu/src/widget/canvas/program.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/wgpu/src/widget/canvas/program.rs b/wgpu/src/widget/canvas/program.rs new file mode 100644 index 00000000..c65a078b --- /dev/null +++ b/wgpu/src/widget/canvas/program.rs @@ -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, + ) { + } +} |