android: add {Active,}EventLoopExtAndroid::android_app

This type comes from the user and stored for the entire lifetime, so
no need to hide it from them after they've passed it to winit.

Fixes #3818.
This commit is contained in:
Kirill Chibisov
2024-07-26 21:49:32 +03:00
parent 5735786f42
commit 5fce4a09de
3 changed files with 24 additions and 9 deletions

View File

@@ -132,7 +132,7 @@ impl RedrawRequester {
pub struct KeyEventExtra {}
pub struct EventLoop<T: 'static> {
android_app: AndroidApp,
pub(crate) android_app: AndroidApp,
window_target: event_loop::ActiveEventLoop,
redraw_flag: SharedFlag,
user_events_sender: mpsc::Sender<T>,
@@ -646,7 +646,7 @@ impl<T> EventLoopProxy<T> {
}
pub struct ActiveEventLoop {
app: AndroidApp,
pub(crate) app: AndroidApp,
control_flow: Cell<ControlFlow>,
exit: Cell<bool>,
redraw_requester: RedrawRequester,