summaryrefslogtreecommitdiff
path: root/src/program_controller.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/program_controller.rs')
-rw-r--r--src/program_controller.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/program_controller.rs b/src/program_controller.rs
new file mode 100644
index 0000000..638e5ce
--- /dev/null
+++ b/src/program_controller.rs
@@ -0,0 +1,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 {}