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 committed by GitHub
parent facb809f12
commit 7b0104b54c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 9 deletions

View file

@ -98,7 +98,7 @@ impl RedrawRequester {
pub struct KeyEventExtra {}
pub struct EventLoop {
android_app: AndroidApp,
pub(crate) android_app: AndroidApp,
window_target: event_loop::ActiveEventLoop,
redraw_flag: SharedFlag,
loop_running: bool, // Dispatched `NewEvents<Init>`
@ -575,7 +575,7 @@ impl EventLoopProxy {
}
pub struct ActiveEventLoop {
app: AndroidApp,
pub(crate) app: AndroidApp,
control_flow: Cell<ControlFlow>,
exit: Cell<bool>,
redraw_requester: RedrawRequester,