aeth_window/
access_winit_active_event_loop.rs1pub use aeth_window_macros::forward_winit_active_event_loop_method;
4use winit::event_loop::ActiveEventLoop;
5
6#[allow(async_fn_in_trait)]
13pub trait AccessWinitActiveEventLoop {
14 async fn run_with_active_event_loop<F, T>(&self, f: F) -> T
17 where
18 F: FnOnce(&dyn ActiveEventLoop) -> T + 'static,
19 T: 'static;
20}
21
22#[allow(async_fn_in_trait)]
37pub trait AccessWinitActiveEventLoopExt: AccessWinitActiveEventLoop {
38 #[forward_winit_active_event_loop_method]
39 async fn create_proxy(&self) -> winit::event_loop::EventLoopProxy {
40 todo!()
41 }
42
43 #[forward_winit_active_event_loop_method]
44 async fn create_custom_cursor(
45 &self,
46 custom_cursor: winit::cursor::CustomCursorSource,
47 ) -> Result<winit::cursor::CustomCursor, winit::error::RequestError> {
48 todo!()
49 }
50
51 #[forward_winit_active_event_loop_method]
52 async fn available_monitors(&self) -> Box<dyn Iterator<Item = winit::monitor::MonitorHandle>> {
53 todo!()
54 }
55
56 #[forward_winit_active_event_loop_method]
57 async fn primary_monitor(&self) -> Option<winit::monitor::MonitorHandle> {
58 todo!()
59 }
60
61 #[forward_winit_active_event_loop_method]
62 async fn listen_device_events(&self, allowed: winit::event_loop::DeviceEvents) {
63 todo!()
64 }
65
66 #[forward_winit_active_event_loop_method]
67 async fn system_theme(&self) -> Option<winit::window::Theme> {
68 todo!()
69 }
70
71 #[forward_winit_active_event_loop_method]
72 async fn set_control_flow(&self, flow: winit::event_loop::ControlFlow) {
73 todo!()
74 }
75
76 #[forward_winit_active_event_loop_method]
77 async fn control_flow(&self) -> winit::event_loop::ControlFlow {
78 todo!()
79 }
80
81 #[forward_winit_active_event_loop_method]
82 async fn owned_display_handle(&self) -> winit::event_loop::OwnedDisplayHandle {
83 todo!()
84 }
85}
86
87impl<T> AccessWinitActiveEventLoopExt for T where T: AccessWinitActiveEventLoop {}