summaryrefslogblamecommitdiffstats
path: root/wgpu/src/widget/canvas/program.rs
blob: c65a078b1a20c93f7c60213d39cad1138fac58b4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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,
    ) {
    }
}