io/pointer,gesture,app/internal/window: add pointer.Scroll event type

Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>
This commit is contained in:
Gordon Klaus
2020-06-02 16:58:31 +02:00
committed by Elias Naur
parent 275a91f26a
commit e188d0e6ff
8 changed files with 15 additions and 9 deletions
+3
View File
@@ -30,6 +30,7 @@ import (
#define GIO_MOUSE_MOVE 1
#define GIO_MOUSE_UP 2
#define GIO_MOUSE_DOWN 3
#define GIO_MOUSE_SCROLL 4
__attribute__ ((visibility ("hidden"))) void gio_main(CFTypeRef viewRef, const char *title, CGFloat width, CGFloat height);
__attribute__ ((visibility ("hidden"))) CGFloat gio_viewWidth(CFTypeRef viewRef);
@@ -160,6 +161,8 @@ func gio_onMouse(view C.CFTypeRef, cdir C.int, cbtns C.NSUInteger, x, y, dx, dy
typ = pointer.Release
case C.GIO_MOUSE_DOWN:
typ = pointer.Press
case C.GIO_MOUSE_SCROLL:
typ = pointer.Scroll
default:
panic("invalid direction")
}