mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
io/pointer: [API] rename PointerEvent.Type to Kind
Kind is the idiomatic field name for distinguishing a struct without using separate types. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -526,7 +526,7 @@ func gio_onMouse(view, evt C.CFTypeRef, cdir C.int, cbtn C.NSInteger, x, y, dx,
|
||||
case 2:
|
||||
btn = pointer.ButtonTertiary
|
||||
}
|
||||
var typ pointer.Type
|
||||
var typ pointer.Kind
|
||||
switch cdir {
|
||||
case C.MOUSE_MOVE:
|
||||
typ = pointer.Move
|
||||
@@ -550,7 +550,7 @@ func gio_onMouse(view, evt C.CFTypeRef, cdir C.int, cbtn C.NSInteger, x, y, dx,
|
||||
panic("invalid direction")
|
||||
}
|
||||
w.w.Event(pointer.Event{
|
||||
Type: typ,
|
||||
Kind: typ,
|
||||
Source: pointer.Mouse,
|
||||
Time: t,
|
||||
Buttons: w.pointerBtns,
|
||||
|
||||
Reference in New Issue
Block a user