mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 16:35:36 +00:00
ui: merge package input
Event handling is as fundamental as operations, so move the input package declarations to package ui. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: Unlicense OR MIT
|
||||
|
||||
package ui
|
||||
|
||||
// Queue maps an event handler key to the events
|
||||
// available to the handler.
|
||||
type Queue interface {
|
||||
// Next returns the next available event, or
|
||||
// false if none are available.
|
||||
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 events.
|
||||
type Event interface {
|
||||
ImplementsEvent()
|
||||
}
|
||||
Reference in New Issue
Block a user