//! Provides a [`Controller`] trait

use crate::state::State;

/// App controller trait
pub trait Controller {
    /// Initialize the app
    fn init(&mut self, state: &mut State);
    /// Handle app resize
    #[allow(unused_variables)]
    fn resize(&mut self, state: &mut State, width: u32, height: u32) {}
    /// Update app
    #[allow(unused_variables)]
    fn update(&mut self, state: &mut State) {}
    /// Render app
    #[allow(unused_variables)]
    fn render(&mut self, state: &mut State) {}
    /// Handle a window event
    #[allow(unused_variables)]
    fn handle_event(&mut self, state: &mut State, event: &winit::event::WindowEvent) {}
}
