ui/app: (android) relay system focus events

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-20 16:07:19 +02:00
parent a92b97e236
commit a9199c6d23
3 changed files with 18 additions and 1 deletions
+6
View File
@@ -191,6 +191,12 @@ func onBack(env *C.JNIEnv, class C.jclass, view C.jlong) C.jboolean {
return C.JNI_FALSE
}
//export onFocusChange
func onFocusChange(env *C.JNIEnv, class C.jclass, view C.jlong, focus C.jboolean) {
w := views[view]
w.event(key.Focus{Focus: focus == C.JNI_TRUE})
}
func (w *window) setVisible() {
win := w.aNativeWindow()
width, height := C.ANativeWindow_getWidth(win), C.ANativeWindow_getHeight(win)