mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17: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:
+2
-3
@@ -6,7 +6,6 @@ import (
|
||||
"image"
|
||||
|
||||
"gioui.org/ui"
|
||||
"gioui.org/ui/input"
|
||||
)
|
||||
|
||||
// Constraints represent a set of acceptable ranges for
|
||||
@@ -38,7 +37,7 @@ type Alignment uint8
|
||||
// space.
|
||||
type Direction uint8
|
||||
|
||||
// Widget is a function scope for drawing, processing input and
|
||||
// Widget is a function scope for drawing, processing events and
|
||||
// computing dimensions for a user interface element.
|
||||
type Widget func()
|
||||
|
||||
@@ -52,7 +51,7 @@ type Context struct {
|
||||
Dimensions Dimensions
|
||||
|
||||
ui.Config
|
||||
input.Queue
|
||||
ui.Queue
|
||||
*ui.Ops
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"time"
|
||||
|
||||
"gioui.org/ui"
|
||||
"gioui.org/ui/input"
|
||||
"gioui.org/ui/layout"
|
||||
)
|
||||
|
||||
@@ -150,6 +149,6 @@ func (config) Px(v ui.Value) int {
|
||||
return int(v.V + .5)
|
||||
}
|
||||
|
||||
func (queue) Next(k input.Key) (input.Event, bool) {
|
||||
func (queue) Next(k ui.Key) (ui.Event, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user