mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
all: rename io/event.Key to Tag
Key had an unfortunate association with keyboard input.
This is an API change. The following rewrites were run to fixup
Gio code:
$ gofmt -r 'pointer.InputOp{Key:a} -> pointer.InputOp{Tag:a}' -w .
$ gofmt -r 'pointer.InputOp{Key:a, Grab:b} -> pointer.InputOp{Tag:a, Grab:b}' -w .
$ gofmt -r 'key.InputOp{Key:a} -> key.InputOp{Tag:a}' -w .
$ gofmt -r 'key.InputOp{Key:a, Focus:b} -> key.InputOp{Tag:a, Focus:b}' -w .
$ gofmt -r 'event.Key -> event.Tag' -w .
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -112,7 +112,7 @@ var touchSlop = unit.Dp(3)
|
||||
|
||||
// Add the handler to the operation list to receive click events.
|
||||
func (c *Click) Add(ops *op.Ops) {
|
||||
op := pointer.InputOp{Key: c}
|
||||
op := pointer.InputOp{Tag: c}
|
||||
op.Add(ops)
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ func (c *Click) Events(q event.Queue) []ClickEvent {
|
||||
|
||||
// Add the handler to the operation list to receive scroll events.
|
||||
func (s *Scroll) Add(ops *op.Ops) {
|
||||
oph := pointer.InputOp{Key: s, Grab: s.grab}
|
||||
oph := pointer.InputOp{Tag: s, Grab: s.grab}
|
||||
oph.Add(ops)
|
||||
if s.flinger.Active() {
|
||||
op.InvalidateOp{}.Add(ops)
|
||||
|
||||
Reference in New Issue
Block a user