mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
cb312c8d32
input.Event is enough if we stretch "input" to mean both input devices and other events such as profiling events and system commands. The pointer and key packages are separate already, so I don't expanding the meaning is unreasonable. Signed-off-by: Elias Naur <mail@eliasnaur.com>
21 lines
549 B
Go
21 lines
549 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
|
|
|
|
// Queue maps an event handler key to the events
|
|
// available to the handler.
|
|
type Queue interface {
|
|
Events(k Key) []Event
|
|
}
|
|
|
|
// 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 events.
|
|
type Event interface {
|
|
ImplementsEvent()
|
|
}
|