mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
api: refactor ActiveEventLoop into trait
This should help with further extensions because the backend event loops are used directly now.
This commit is contained in:
@@ -109,9 +109,11 @@ impl WindowExtAndroid for Window {
|
||||
}
|
||||
}
|
||||
|
||||
impl ActiveEventLoopExtAndroid for ActiveEventLoop {
|
||||
impl ActiveEventLoopExtAndroid for &dyn ActiveEventLoop {
|
||||
fn android_app(&self) -> &AndroidApp {
|
||||
&self.p.app
|
||||
let event_loop =
|
||||
self.as_any().downcast_ref::<crate::platform_impl::ActiveEventLoop>().unwrap();
|
||||
&event_loop.app
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user