mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
ui/key: rename TextInputClosed to TextInputClose
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -384,7 +384,7 @@ func (w *window) setTextInput(s key.TextInputState) {
|
||||
runInJVM(func(env *C.JNIEnv) {
|
||||
C.gio_jni_CallVoidMethod(env, w.view, w.mshowTextInput)
|
||||
})
|
||||
case key.TextInputClosed:
|
||||
case key.TextInputClose:
|
||||
runInJVM(func(env *C.JNIEnv) {
|
||||
C.gio_jni_CallVoidMethod(env, w.view, w.mhideTextInput)
|
||||
})
|
||||
|
||||
+1
-1
@@ -234,7 +234,7 @@ func (w *window) setTextInput(s key.TextInputState) {
|
||||
switch s {
|
||||
case key.TextInputOpen:
|
||||
C.gio_showTextInput(w.view)
|
||||
case key.TextInputClosed:
|
||||
case key.TextInputClose:
|
||||
C.gio_hideTextInput(w.view)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -322,7 +322,7 @@ func (w *window) setTextInput(s key.TextInputState) {
|
||||
switch s {
|
||||
case key.TextInputOpen:
|
||||
w.focus()
|
||||
case key.TextInputClosed:
|
||||
case key.TextInputClose:
|
||||
w.blur()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ func (w *Window) SetTextInput(s key.TextInputState) {
|
||||
if !w.IsAlive() {
|
||||
return
|
||||
}
|
||||
if s != w.inputState && (s == key.TextInputClosed || s == key.TextInputOpen) {
|
||||
if s != w.inputState && (s == key.TextInputClose || s == key.TextInputOpen) {
|
||||
w.driver.setTextInput(s)
|
||||
}
|
||||
if s == key.TextInputFocus {
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ func (q *keyQueue) Frame(root *ui.Ops, events handlerEvents) {
|
||||
case pri == priNewFocus:
|
||||
q.state = key.TextInputOpen
|
||||
case hide:
|
||||
q.state = key.TextInputClosed
|
||||
q.state = key.TextInputClose
|
||||
case changed:
|
||||
q.state = key.TextInputFocus
|
||||
default:
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ const (
|
||||
const (
|
||||
TextInputKeep TextInputState = iota
|
||||
TextInputFocus
|
||||
TextInputClosed
|
||||
TextInputClose
|
||||
TextInputOpen
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user