pub use aeth_window_macros::forward_winit_active_event_loop_method;
use winit::event_loop::ActiveEventLoop;
#[allow(async_fn_in_trait)]
pub trait AccessWinitActiveEventLoop {
async fn run_with_active_event_loop<F, T>(&self, f: F) -> T
where
F: FnOnce(&dyn ActiveEventLoop) -> T + 'static,
T: 'static;
}
#[allow(async_fn_in_trait)]
pub trait AccessWinitActiveEventLoopExt: AccessWinitActiveEventLoop {
#[forward_winit_active_event_loop_method]
async fn create_proxy(&self) -> winit::event_loop::EventLoopProxy {
todo!()
}
#[forward_winit_active_event_loop_method]
async fn create_custom_cursor(
&self,
custom_cursor: winit::cursor::CustomCursorSource,
) -> Result<winit::cursor::CustomCursor, winit::error::RequestError> {
todo!()
}
#[forward_winit_active_event_loop_method]
async fn available_monitors(&self) -> Box<dyn Iterator<Item = winit::monitor::MonitorHandle>> {
todo!()
}
#[forward_winit_active_event_loop_method]
async fn primary_monitor(&self) -> Option<winit::monitor::MonitorHandle> {
todo!()
}
#[forward_winit_active_event_loop_method]
async fn listen_device_events(&self, allowed: winit::event_loop::DeviceEvents) {
todo!()
}
#[forward_winit_active_event_loop_method]
async fn system_theme(&self) -> Option<winit::window::Theme> {
todo!()
}
#[forward_winit_active_event_loop_method]
async fn set_control_flow(&self, flow: winit::event_loop::ControlFlow) {
todo!()
}
#[forward_winit_active_event_loop_method]
async fn control_flow(&self) -> winit::event_loop::ControlFlow {
todo!()
}
#[forward_winit_active_event_loop_method]
async fn owned_display_handle(&self) -> winit::event_loop::OwnedDisplayHandle {
todo!()
}
}
impl<T> AccessWinitActiveEventLoopExt for T where T: AccessWinitActiveEventLoop {}