mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
22 lines
687 B
Rust
22 lines
687 B
Rust
extern crate winit;
|
|
|
|
fn main() {
|
|
let events_loop = winit::EventLoop::new();
|
|
|
|
let window = winit::WindowBuilder::new().with_decorations(false)
|
|
.with_transparency(true)
|
|
.build(&events_loop).unwrap();
|
|
|
|
window.set_title("A fantastic window!");
|
|
|
|
events_loop.run(move |event, _, control_flow| {
|
|
println!("{:?}", event);
|
|
|
|
match event {
|
|
winit::Event::WindowEvent { event: winit::WindowEvent::CloseRequested, .. } =>
|
|
*control_flow = winit::ControlFlow::Exit,
|
|
_ => *control_flow = winit::ControlFlow::Wait,
|
|
}
|
|
});
|
|
}
|