forked from joejulian/gio
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:
@@ -13,7 +13,7 @@ import (
|
||||
// Op registers a handler for receiving
|
||||
// Events.
|
||||
type Op struct {
|
||||
Key event.Key
|
||||
Tag event.Tag
|
||||
}
|
||||
|
||||
// Event contains profile data from a single
|
||||
@@ -24,7 +24,7 @@ type Event struct {
|
||||
}
|
||||
|
||||
func (p Op) Add(o *op.Ops) {
|
||||
data := o.Write(opconst.TypeProfileLen, p.Key)
|
||||
data := o.Write(opconst.TypeProfileLen, p.Tag)
|
||||
data[0] = byte(opconst.TypeProfile)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user