app: [Android] replace PlatformHandle with JavaVM, AppContext methods

Clearer and fewer types.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-04-20 20:21:39 +02:00
parent 10f932137c
commit ae77377f7b
3 changed files with 19 additions and 20 deletions
+8 -4
View File
@@ -4,11 +4,15 @@ import (
"gioui.org/app/internal/window"
)
type Handle window.Handle
// JavaVM returns the global JNI JavaVM.
func JavaVM() uintptr {
return window.JavaVM()
}
// PlatformHandle returns the Android platform-specific Handle.
func PlatformHandle() *Handle {
return (*Handle)(window.PlatformHandle)
// AppContext returns the global Application context as a JNI
// jobject.
func AppContext() uintptr {
return window.AppContext()
}
// androidDriver is an interface that allows the Window's run method