mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
io/pointer: rename button names to reflect their meaning, not placement
For example, ButtonLeft may be the right-most button for a left-handed user.
Rename the button names to match their intended use.
This is an API change. Use the following commands to update your
projects:
$ gofmt -r 'pointer.ButtonLeft -> pointer.ButtonPrimary' -w .
$ gofmt -r 'pointer.ButtonRight -> pointer.ButtonSecondary' -w .
$ gofmt -r 'pointer.ButtonMiddle -> pointer.ButtonTertiary' -w .
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+6
-6
@@ -43,7 +43,7 @@ func TestListPosition(t *testing.T) {
|
||||
scroll: _s(
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonLeft,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Press,
|
||||
Position: f32.Pt(0, 0),
|
||||
},
|
||||
@@ -54,7 +54,7 @@ func TestListPosition(t *testing.T) {
|
||||
},
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonLeft,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Release,
|
||||
Position: f32.Pt(5, 0),
|
||||
},
|
||||
@@ -63,7 +63,7 @@ func TestListPosition(t *testing.T) {
|
||||
scroll: _s(
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonLeft,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Press,
|
||||
Position: f32.Pt(0, 0),
|
||||
},
|
||||
@@ -74,7 +74,7 @@ func TestListPosition(t *testing.T) {
|
||||
},
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonLeft,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Release,
|
||||
Position: f32.Pt(5, 0),
|
||||
},
|
||||
@@ -83,7 +83,7 @@ func TestListPosition(t *testing.T) {
|
||||
scroll: _s(
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonLeft,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Press,
|
||||
Position: f32.Pt(0, 0),
|
||||
},
|
||||
@@ -94,7 +94,7 @@ func TestListPosition(t *testing.T) {
|
||||
},
|
||||
pointer.Event{
|
||||
Source: pointer.Mouse,
|
||||
Buttons: pointer.ButtonLeft,
|
||||
Buttons: pointer.ButtonPrimary,
|
||||
Type: pointer.Release,
|
||||
Position: f32.Pt(15, 0),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user