mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 23:55:39 +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:
+3
-4
@@ -5,9 +5,8 @@ Package pointer implements pointer events and operations.
|
||||
A pointer is either a mouse controlled cursor or a touch
|
||||
object such as a finger.
|
||||
|
||||
The InputOp operation is used to declare a handler ready
|
||||
for pointer events. Use a Queue from package input to
|
||||
receive events.
|
||||
The InputOp operation is used to declare a handler ready for pointer
|
||||
events. Use a ui.Queue to receive events.
|
||||
|
||||
Areas
|
||||
|
||||
@@ -72,7 +71,7 @@ drawer handle and the interface below should receive pointer events.
|
||||
|
||||
Disambiguation
|
||||
|
||||
When more than one handler matches a pointer event, the input queue
|
||||
When more than one handler matches a pointer event, the event queue
|
||||
follows a set of rules for distributing the event.
|
||||
|
||||
As long as the pointer has not received a Press event, all
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
|
||||
"gioui.org/ui"
|
||||
"gioui.org/ui/f32"
|
||||
"gioui.org/ui/input"
|
||||
"gioui.org/ui/internal/opconst"
|
||||
)
|
||||
|
||||
@@ -64,7 +63,7 @@ type areaOp struct {
|
||||
// InputOp declares an input handler ready for pointer
|
||||
// events.
|
||||
type InputOp struct {
|
||||
Key input.Key
|
||||
Key ui.Key
|
||||
// Grab, if set, request that the handler get
|
||||
// Grabbed priority.
|
||||
Grab bool
|
||||
@@ -86,7 +85,7 @@ type Priority uint8
|
||||
// Source of an Event.
|
||||
type Source uint8
|
||||
|
||||
// Must match input.areaKind
|
||||
// Must match app/internal/input.areaKind
|
||||
type areaKind uint8
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user