ui/app,ui/key: move TextInputState from key to internal package

Clients have no need for the TextInputState type.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-21 13:12:24 +02:00
parent b46bad09bd
commit 9e0e4af8c6
10 changed files with 41 additions and 54 deletions
+6 -9
View File
@@ -393,20 +393,17 @@ func onTouchEvent(env *C.JNIEnv, class C.jclass, handle C.jlong, action, pointer
})
}
func (w *window) setTextInput(s key.TextInputState) {
func (w *window) showTextInput(show bool) {
if w.view == 0 {
return
}
switch s {
case key.TextInputOpen:
runInJVM(func(env *C.JNIEnv) {
runInJVM(func(env *C.JNIEnv) {
if show {
C.gio_jni_CallVoidMethod(env, w.view, w.mshowTextInput)
})
case key.TextInputClose:
runInJVM(func(env *C.JNIEnv) {
} else {
C.gio_jni_CallVoidMethod(env, w.view, w.mhideTextInput)
})
}
}
})
}
func Main() {