chargrid_app/
lib.rs

1pub use chargrid_input::Input;
2pub use chargrid_render::{ColModify, Frame, ViewContext};
3pub use std::time::Duration;
4
5pub enum ControlFlow {
6    Exit,
7}
8
9pub trait App {
10    fn on_input(&mut self, input: Input) -> Option<ControlFlow>;
11    fn on_frame<F, C>(
12        &mut self,
13        since_last_frame: Duration,
14        view_context: ViewContext<C>,
15        frame: &mut F,
16    ) -> Option<ControlFlow>
17    where
18        F: Frame,
19        C: ColModify;
20}