app,widget: implement Editor IME support, add Android implementation

Fixes: https://todo.sr.ht/~eliasnaur/gio/116
References: https://todo.sr.ht/~eliasnaur/gio/246
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-01-13 13:04:31 +01:00
parent c22138f5f8
commit 58cdb3e1da
16 changed files with 880 additions and 55 deletions
+3 -3
View File
@@ -228,9 +228,7 @@ func onDeleteBackward(view C.CFTypeRef) {
//export onText
func onText(view C.CFTypeRef, str *C.char) {
w := views[view]
w.w.Event(key.EditEvent{
Text: C.GoString(str),
})
w.w.EditorInsert(C.GoString(str))
}
//export onTouch
@@ -283,6 +281,8 @@ func (w *window) Configure([]Option) {
}
}
func (w *window) EditorStateChanged(old, new editorState) {}
func (w *window) Perform(system.Action) {}
func (w *window) Raise() {}