ui/input: change Events to return all events at once

Single stepping events only makes sense for widgets with complex
state, e.g. the text.Editor. For the input.Events source, returning
all events in a single Events call is sufficient and more natural
for clients.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-11 23:39:25 +02:00
parent a9d4186bef
commit 1735d5ced8
4 changed files with 7 additions and 23 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ package input
// Events maps an event handler key to the events
// available to the handler.
type Events interface {
Next(k Key) (Event, bool)
Events(k Key) []Event
}
// Key is the stable identifier for an event handler. For a handler h, the