use winit::application::ApplicationHandler; use super::backend::RendererBackend; use super::text::TextSpan; #[derive(Debug, Clone)] pub struct DummyRenderer; impl DummyRenderer { pub fn new() -> Self { Self } } impl RendererBackend for DummyRenderer { fn init(&mut self, _width: i32, _height: i32) -> bool { println!("DummyRenderer initialized."); true } fn draw_text(&mut self, span: &TextSpan) { println!("[style: {:?}] {}", span.style, span.text); } fn shutdown(&mut self) { println!("DummyRenderer shutting down."); } fn name(&self) -> &str { "Dummy" } fn clear(&mut self) { println!("DummyRenderer clearing."); } fn present(&mut self) { println!("DummyRenderer is presenting."); } } impl ApplicationHandler for DummyRenderer { fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) { println!("resumed"); } fn window_event( &mut self, event_loop: &winit::event_loop::ActiveEventLoop, window_id: winit::window::WindowId, event: winit::event::WindowEvent, ) { println!("received an event: {event:?}"); } }