Files
gio-patched/app/app_android.go
T
Elias Naur 6c30c6386c app,app/internal: [Android] replace Window.Do with ViewEvent
An event reporting the most recent Android View attached to the Window is both
simpler to implement and automatically tracks the Activity lifecycle.

The downside is that buggy programs may hold on to a stale references.
Fortunately, JNI references are handles not pointers so the always-on Android
JNI checks will very likely catch stale references on use.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-08-13 14:41:37 +02:00

21 lines
363 B
Go

// SPDX-License-Identifier: Unlicense OR MIT
package app
import (
"gioui.org/app/internal/window"
)
type ViewEvent = window.ViewEvent
// JavaVM returns the global JNI JavaVM.
func JavaVM() uintptr {
return window.JavaVM()
}
// AppContext returns the global Application context as a JNI
// jobject.
func AppContext() uintptr {
return window.AppContext()
}