~eliasnaur/gio

ref: 7aa7bb3be40858efe2a98f866fcc7db2026b02fd gio/ui/input/input.go -rw-r--r-- 566 bytes
7aa7bb3bElias Naur ui: rename ops to have Op suffixed, not prefixed 2 years 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

// 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()
}