app: add support for system cursors

Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
pierre
2020-12-02 16:50:56 +01:00
committed by Elias Naur
parent 951d45a2c6
commit 69cc2c795c
15 changed files with 297 additions and 18 deletions
+5
View File
@@ -426,6 +426,11 @@ func (w *window) WriteClipboard(s string) {
w.clipboard.Call("writeText", s)
}
func (w *window) SetCursor(name pointer.CursorName) {
style := w.cnv.Get("style")
style.Set("cursor", string(name))
}
func (w *window) ShowTextInput(show bool) {
// Run in a goroutine to avoid a deadlock if the
// focus change result in an event.