summaryrefslogtreecommitdiff
path: root/src/program_controller.rs
blob: 638e5cef2c98f2fc9e3ebbb906bda8e0e82e6ca7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::*;

pub trait ProgramController {
    fn initialise(&mut self) {}
    fn on_render(&mut self) {}
    fn on_mouse_moved(&mut self, _position: Point) {}

    fn on_process(&mut self, _create_window: &mut dyn FnMut(Box<dyn WindowController>)) {}
}

/// An empty program controller, for when a program has only one window.
pub struct DefaultProgramController {}
impl ProgramController for DefaultProgramController {}