mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
io/input,io/router: [API] rename package io/router to io/input
The input name better matches its purpose, in particular when we introduce input.Source. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"gioui.org/app"
|
||||
"gioui.org/io/input"
|
||||
"gioui.org/io/key"
|
||||
"gioui.org/io/router"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op"
|
||||
"gioui.org/widget"
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
func TestClickable(t *testing.T) {
|
||||
var (
|
||||
ops op.Ops
|
||||
r router.Router
|
||||
r input.Router
|
||||
b1 widget.Clickable
|
||||
b2 widget.Clickable
|
||||
)
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"gioui.org/f32"
|
||||
"gioui.org/io/input"
|
||||
"gioui.org/io/pointer"
|
||||
"gioui.org/io/router"
|
||||
"gioui.org/io/transfer"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op"
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func TestDraggable(t *testing.T) {
|
||||
var r router.Router
|
||||
var r input.Router
|
||||
gtx := layout.Context{
|
||||
Constraints: layout.Exact(image.Pt(100, 100)),
|
||||
Queue: &r,
|
||||
|
||||
@@ -20,9 +20,9 @@ import (
|
||||
"gioui.org/font"
|
||||
"gioui.org/font/gofont"
|
||||
"gioui.org/font/opentype"
|
||||
"gioui.org/io/input"
|
||||
"gioui.org/io/key"
|
||||
"gioui.org/io/pointer"
|
||||
"gioui.org/io/router"
|
||||
"gioui.org/io/system"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op"
|
||||
@@ -96,7 +96,7 @@ func assertContents(t *testing.T, e *Editor, contents string, selectionStart, se
|
||||
// TestEditorReadOnly ensures that mouse and keyboard interactions with readonly
|
||||
// editors do nothing but manipulate the text selection.
|
||||
func TestEditorReadOnly(t *testing.T) {
|
||||
r := new(router.Router)
|
||||
r := new(input.Router)
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Constraints: layout.Constraints{
|
||||
@@ -501,7 +501,7 @@ func TestEditorLigature(t *testing.T) {
|
||||
|
||||
func TestEditorDimensions(t *testing.T) {
|
||||
e := new(Editor)
|
||||
r := new(router.Router)
|
||||
r := new(input.Router)
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Constraints: layout.Constraints{Max: image.Pt(100, 100)},
|
||||
@@ -887,7 +887,7 @@ f 2 4 6 8 f
|
||||
g 2 4 6 8 g
|
||||
`)
|
||||
|
||||
r := new(router.Router)
|
||||
r := new(input.Router)
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Locale: english,
|
||||
@@ -987,7 +987,7 @@ func TestSelectMove(t *testing.T) {
|
||||
e := new(Editor)
|
||||
e.SetText(`0123456789`)
|
||||
|
||||
r := new(router.Router)
|
||||
r := new(input.Router)
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Locale: english,
|
||||
@@ -1076,7 +1076,7 @@ func TestEditor_MaxLen(t *testing.T) {
|
||||
}
|
||||
|
||||
e.SetText("2345678")
|
||||
r := new(router.Router)
|
||||
r := new(input.Router)
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Constraints: layout.Exact(image.Pt(100, 100)),
|
||||
@@ -1112,7 +1112,7 @@ func TestEditor_Filter(t *testing.T) {
|
||||
}
|
||||
|
||||
e.SetText("2345678")
|
||||
r := new(router.Router)
|
||||
r := new(input.Router)
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Constraints: layout.Exact(image.Pt(100, 100)),
|
||||
@@ -1142,7 +1142,7 @@ func TestEditor_Submit(t *testing.T) {
|
||||
e := new(Editor)
|
||||
e.Submit = true
|
||||
|
||||
r := new(router.Router)
|
||||
r := new(input.Router)
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Constraints: layout.Exact(image.Pt(100, 100)),
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"image"
|
||||
|
||||
"gioui.org/f32"
|
||||
"gioui.org/io/input"
|
||||
"gioui.org/io/pointer"
|
||||
"gioui.org/io/router"
|
||||
"gioui.org/io/transfer"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op"
|
||||
@@ -21,7 +21,7 @@ func ExampleClickable_passthrough() {
|
||||
// pointer events can be passed down for the underlying
|
||||
// widgets to pick them up.
|
||||
var button1, button2 widget.Clickable
|
||||
var r router.Router
|
||||
var r input.Router
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Constraints: layout.Exact(image.Pt(100, 100)),
|
||||
@@ -71,7 +71,7 @@ func ExampleClickable_passthrough() {
|
||||
}
|
||||
|
||||
func ExampleDraggable_Layout() {
|
||||
var r router.Router
|
||||
var r input.Router
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Constraints: layout.Exact(image.Pt(100, 100)),
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
|
||||
"gioui.org/font"
|
||||
"gioui.org/font/gofont"
|
||||
"gioui.org/io/input"
|
||||
"gioui.org/io/key"
|
||||
"gioui.org/io/router"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op"
|
||||
"gioui.org/text"
|
||||
@@ -34,7 +34,7 @@ func TestSelectableZeroValue(t *testing.T) {
|
||||
|
||||
// Verify that an existing selection is dismissed when you press arrow keys.
|
||||
func TestSelectableMove(t *testing.T) {
|
||||
r := new(router.Router)
|
||||
r := new(input.Router)
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Locale: english,
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
"gioui.org/app"
|
||||
"gioui.org/f32"
|
||||
"gioui.org/io/input"
|
||||
"gioui.org/io/pointer"
|
||||
"gioui.org/io/router"
|
||||
"gioui.org/io/semantic"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op"
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
func TestBool(t *testing.T) {
|
||||
var (
|
||||
ops op.Ops
|
||||
r router.Router
|
||||
r input.Router
|
||||
b widget.Bool
|
||||
)
|
||||
gtx := app.NewContext(&ops, app.FrameEvent{Queue: &r})
|
||||
|
||||
Reference in New Issue
Block a user