mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +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) {
|
runInJVM(func(env *C.JNIEnv) {
|
||||||
C.gio_jni_CallVoidMethod(env, w.view, w.mshowTextInput)
|
C.gio_jni_CallVoidMethod(env, w.view, w.mshowTextInput)
|
||||||
})
|
})
|
||||||
case key.TextInputClosed:
|
case key.TextInputClose:
|
||||||
runInJVM(func(env *C.JNIEnv) {
|
runInJVM(func(env *C.JNIEnv) {
|
||||||
C.gio_jni_CallVoidMethod(env, w.view, w.mhideTextInput)
|
C.gio_jni_CallVoidMethod(env, w.view, w.mhideTextInput)
|
||||||
})
|
})
|
||||||
|
|||||||
+1
-1
@@ -234,7 +234,7 @@ func (w *window) setTextInput(s key.TextInputState) {
|
|||||||
switch s {
|
switch s {
|
||||||
case key.TextInputOpen:
|
case key.TextInputOpen:
|
||||||
C.gio_showTextInput(w.view)
|
C.gio_showTextInput(w.view)
|
||||||
case key.TextInputClosed:
|
case key.TextInputClose:
|
||||||
C.gio_hideTextInput(w.view)
|
C.gio_hideTextInput(w.view)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -322,7 +322,7 @@ func (w *window) setTextInput(s key.TextInputState) {
|
|||||||
switch s {
|
switch s {
|
||||||
case key.TextInputOpen:
|
case key.TextInputOpen:
|
||||||
w.focus()
|
w.focus()
|
||||||
case key.TextInputClosed:
|
case key.TextInputClose:
|
||||||
w.blur()
|
w.blur()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -82,7 +82,7 @@ func (w *Window) SetTextInput(s key.TextInputState) {
|
|||||||
if !w.IsAlive() {
|
if !w.IsAlive() {
|
||||||
return
|
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)
|
w.driver.setTextInput(s)
|
||||||
}
|
}
|
||||||
if s == key.TextInputFocus {
|
if s == key.TextInputFocus {
|
||||||
|
|||||||
+1
-1
@@ -65,7 +65,7 @@ func (q *keyQueue) Frame(root *ui.Ops, events handlerEvents) {
|
|||||||
case pri == priNewFocus:
|
case pri == priNewFocus:
|
||||||
q.state = key.TextInputOpen
|
q.state = key.TextInputOpen
|
||||||
case hide:
|
case hide:
|
||||||
q.state = key.TextInputClosed
|
q.state = key.TextInputClose
|
||||||
case changed:
|
case changed:
|
||||||
q.state = key.TextInputFocus
|
q.state = key.TextInputFocus
|
||||||
default:
|
default:
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ const (
|
|||||||
const (
|
const (
|
||||||
TextInputKeep TextInputState = iota
|
TextInputKeep TextInputState = iota
|
||||||
TextInputFocus
|
TextInputFocus
|
||||||
TextInputClosed
|
TextInputClose
|
||||||
TextInputOpen
|
TextInputOpen
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user