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
@@ -51,6 +51,7 @@ type window struct {
layer C.CFTypeRef
visible atomic.Value
cursor pointer.CursorName
pointerMap []C.CFTypeRef
}
@@ -249,6 +250,10 @@ func (w *window) SetAnimating(anim bool) {
}
}
func (w *window) SetCursor(name pointer.CursorName) {
w.cursor = windowSetCursor(w.cursor, name)
}
func (w *window) onKeyCommand(name string) {
w.w.Event(key.Event{
Name: name,