mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
6c30c6386c
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>
21 lines
363 B
Go
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()
|
|
}
|