Files
gio/ui/input/input.go
T
Elias Naur b981ccf9ed ui/input: support single stepping through events
Change input.Events interface to return one event at a time until
the queue is empty.

Change text.Editor and gestures to match.

Re-add Editor.Submit while we're here; we don't want to enable
submit mode always.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-06-21 16:30:20 +02:00

21 lines
566 B
Go

// SPDX-License-Identifier: Unlicense OR MIT
// Package input exposes a unified interface to input sources. Subpackages
// such as pointer and key provide the interfaces for specific input types.
package input
// Events maps an event handler key to the events
// available to the handler.
type Events interface {
Next(k Key) (Event, bool)
}
// Key is the stable identifier for an event handler. For a handler h, the
// key is typically &h.
type Key interface{}
// Event is the marker interface for input events.
type Event interface {
ImplementsInputEvent()
}