mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user