~eliasnaur/gio

ref: 1a15d7241ac4e58bfc6eb063d267cc692822ec10 gio/ui/input/input.go -rw-r--r-- 553 bytes
1a15d724Elias Naur ui/layout: rename and sanitize enums 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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 {
	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()
}