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:
+9
-9
@@ -93,18 +93,18 @@ func TestListPosition(t *testing.T) {
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Press,
|
||||
Kind: pointer.Press,
|
||||
Position: f32.Pt(0, 0),
|
||||
},
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Type: pointer.Scroll,
|
||||
Kind: pointer.Scroll,
|
||||
Scroll: f32.Pt(5, 0),
|
||||
},
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Release,
|
||||
Kind: pointer.Release,
|
||||
Position: f32.Pt(5, 0),
|
||||
},
|
||||
)},
|
||||
@@ -113,18 +113,18 @@ func TestListPosition(t *testing.T) {
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Press,
|
||||
Kind: pointer.Press,
|
||||
Position: f32.Pt(0, 0),
|
||||
},
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Type: pointer.Scroll,
|
||||
Kind: pointer.Scroll,
|
||||
Scroll: f32.Pt(3, 0),
|
||||
},
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Release,
|
||||
Kind: pointer.Release,
|
||||
Position: f32.Pt(5, 0),
|
||||
},
|
||||
)},
|
||||
@@ -133,18 +133,18 @@ func TestListPosition(t *testing.T) {
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Press,
|
||||
Kind: pointer.Press,
|
||||
Position: f32.Pt(0, 0),
|
||||
},
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Type: pointer.Scroll,
|
||||
Kind: pointer.Scroll,
|
||||
Scroll: f32.Pt(10, 0),
|
||||
},
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Release,
|
||||
Kind: pointer.Release,
|
||||
Position: f32.Pt(15, 0),
|
||||
},
|
||||
)},
|
||||
|
||||
Reference in New Issue
Block a user