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:
Elias Naur
2023-10-06 18:19:13 -05:00
parent e1b3928819
commit 650ccea28d
26 changed files with 226 additions and 226 deletions
+5 -5
View File
@@ -47,13 +47,13 @@ func ExampleClickable_passthrough() {
pointer.Event{
Source: pointer.Mouse,
Buttons: pointer.ButtonPrimary,
Type: pointer.Press,
Kind: pointer.Press,
Position: f32.Pt(50, 50),
},
pointer.Event{
Source: pointer.Mouse,
Buttons: pointer.ButtonPrimary,
Type: pointer.Release,
Kind: pointer.Release,
Position: f32.Pt(50, 50),
},
)
@@ -125,15 +125,15 @@ func ExampleDraggable_Layout() {
// Send drag and drop gesture events.
r.Queue(
pointer.Event{
Type: pointer.Press,
Kind: pointer.Press,
Position: f32.Pt(5, 5), // in the drag area
},
pointer.Event{
Type: pointer.Move,
Kind: pointer.Move,
Position: f32.Pt(5, 5), // in the drop area
},
pointer.Event{
Type: pointer.Release,
Kind: pointer.Release,
Position: f32.Pt(30, 30), // in the drop area
},
)