winit/tests/send_objects.rs
Kirill Chibisov ecb887e5c3
event_loop: remove generic user event
Let the users wake up the event loop and then they could poll their
user sources.

Co-authored-by: Mads Marquart <mads@marquart.dk>
Co-authored-by: daxpedda <daxpedda@gmail.com>
2024-06-24 13:04:55 +03:00

30 lines
615 B
Rust

#[allow(dead_code)]
fn needs_send<T: Send>() {}
#[test]
fn event_loop_proxy_send() {
needs_send::<winit::event_loop::EventLoopProxy>();
}
#[test]
fn window_send() {
needs_send::<winit::window::Window>();
}
#[test]
fn window_builder_send() {
needs_send::<winit::window::WindowAttributes>();
}
#[test]
fn ids_send() {
needs_send::<winit::window::WindowId>();
needs_send::<winit::event::DeviceId>();
needs_send::<winit::monitor::MonitorHandle>();
}
#[test]
fn custom_cursor_send() {
needs_send::<winit::window::CustomCursorSource>();
needs_send::<winit::window::CustomCursor>();
}