use std::{any::Any, collections::VecDeque}; use winit::event::WindowEvent; pub mod window_state; pub use window_state::*; pub mod events; pub use events::*; pub mod event_queue; pub use event_queue::*; pub trait CastableAny: Send + Sync + 'static { fn as_any(&self) -> &dyn Any; fn as_any_mut(&mut self) -> &mut dyn Any; } /// Implements this trait for anything that fits the type bounds impl CastableAny for T { fn as_any(&self) -> &dyn Any { self } fn as_any_mut(&mut self) -> &mut dyn Any { self } }