extern crate winit; fn main() { let mut events_loop = winit::EventsLoop::new(); let window = winit::WindowBuilder::new() .build(&events_loop) .unwrap(); window.set_min_dimensions(Some((400, 200))); window.set_max_dimensions(Some((800, 400))); events_loop.run_forever(|event| { println!("{:?}", event); match event { winit::Event::WindowEvent { event: winit::WindowEvent::Closed, .. } => winit::ControlFlow::Break, _ => winit::ControlFlow::Continue, } }); }