mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
all: rename the gioui.org/ui module to gioui.org
The "ui" is redundant and stutters. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -43,7 +43,7 @@ For example, to display a blank but otherwise functional window:
|
|||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "gioui.org/ui/app"
|
import "gioui.org/app"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
go func() {
|
go func() {
|
||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gioui.org/ui/app/internal/gl"
|
"gioui.org/app/internal/gl"
|
||||||
)
|
)
|
||||||
|
|
||||||
type context struct {
|
type context struct {
|
||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
syscall "golang.org/x/sys/windows"
|
syscall "golang.org/x/sys/windows"
|
||||||
|
|
||||||
"gioui.org/ui/app/internal/gl"
|
"gioui.org/app/internal/gl"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@@ -18,7 +18,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"gioui.org/ui/app/internal/gl"
|
"gioui.org/app/internal/gl"
|
||||||
)
|
)
|
||||||
|
|
||||||
type context struct {
|
type context struct {
|
||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"syscall/js"
|
"syscall/js"
|
||||||
|
|
||||||
"gioui.org/ui/app/internal/gl"
|
"gioui.org/app/internal/gl"
|
||||||
)
|
)
|
||||||
|
|
||||||
type context struct {
|
type context struct {
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gioui.org/ui/app/internal/gl"
|
"gioui.org/app/internal/gl"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -5,7 +5,7 @@ package gpu
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"gioui.org/ui/internal/ops"
|
"gioui.org/internal/ops"
|
||||||
)
|
)
|
||||||
|
|
||||||
type resourceCache struct {
|
type resourceCache struct {
|
||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gioui.org/ui/app/internal/gl"
|
"gioui.org/app/internal/gl"
|
||||||
)
|
)
|
||||||
|
|
||||||
type context struct {
|
type context struct {
|
||||||
@@ -13,11 +13,11 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/app/internal/gl"
|
"gioui.org/app/internal/gl"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
"gioui.org/ui/internal/ops"
|
"gioui.org/internal/ops"
|
||||||
"gioui.org/ui/paint"
|
"gioui.org/paint"
|
||||||
"golang.org/x/image/draw"
|
"golang.org/x/image/draw"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"image"
|
"image"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"gioui.org/ui/app/internal/gl"
|
"gioui.org/app/internal/gl"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/internal/path"
|
"gioui.org/internal/path"
|
||||||
)
|
)
|
||||||
|
|
||||||
type pather struct {
|
type pather struct {
|
||||||
@@ -5,7 +5,7 @@ package gpu
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gioui.org/ui/app/internal/gl"
|
"gioui.org/app/internal/gl"
|
||||||
)
|
)
|
||||||
|
|
||||||
type timers struct {
|
type timers struct {
|
||||||
@@ -4,9 +4,9 @@ package input
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
"gioui.org/ui/internal/ops"
|
"gioui.org/internal/ops"
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TextInputState uint8
|
type TextInputState uint8
|
||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
"image"
|
"image"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
"gioui.org/ui/internal/ops"
|
"gioui.org/internal/ops"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type pointerQueue struct {
|
type pointerQueue struct {
|
||||||
@@ -7,11 +7,11 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
"gioui.org/ui/internal/ops"
|
"gioui.org/internal/ops"
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
"gioui.org/ui/system"
|
"gioui.org/system"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Router is a Queue implementation that routes events from
|
// Router is a Queue implementation that routes events from
|
||||||
@@ -25,9 +25,9 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type window struct {
|
type window struct {
|
||||||
@@ -23,9 +23,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type window struct {
|
type window struct {
|
||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
"syscall/js"
|
"syscall/js"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type window struct {
|
type window struct {
|
||||||
@@ -19,9 +19,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -16,10 +16,10 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/internal/fling"
|
"gioui.org/internal/fling"
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
syscall "golang.org/x/sys/unix"
|
syscall "golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -14,9 +14,9 @@ import (
|
|||||||
|
|
||||||
syscall "golang.org/x/sys/windows"
|
syscall "golang.org/x/sys/windows"
|
||||||
|
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
var winMap = make(map[syscall.Handle]*window)
|
var winMap = make(map[syscall.Handle]*window)
|
||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/app/internal/gpu"
|
"gioui.org/app/internal/gpu"
|
||||||
"gioui.org/ui/app/internal/input"
|
"gioui.org/app/internal/input"
|
||||||
"gioui.org/ui/system"
|
"gioui.org/system"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WindowOption configures a Window.
|
// WindowOption configures a Window.
|
||||||
@@ -22,7 +22,7 @@ import (
|
|||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
)
|
)
|
||||||
|
|
||||||
type xkb struct {
|
type xkb struct {
|
||||||
@@ -13,9 +13,9 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/internal/fling"
|
"gioui.org/internal/fling"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Click detects click gestures in the form
|
// Click detects click gestures in the form
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
module gioui.org/ui
|
module gioui.org
|
||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
)
|
)
|
||||||
|
|
||||||
func DecodeTransformOp(d []byte) ui.TransformOp {
|
func DecodeTransformOp(d []byte) ui.TransformOp {
|
||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reader parses an ops list.
|
// Reader parses an ops list.
|
||||||
@@ -11,7 +11,7 @@ package key
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InputOp declares a handler ready for key events.
|
// InputOp declares a handler ready for key events.
|
||||||
@@ -5,8 +5,8 @@ package layout
|
|||||||
import (
|
import (
|
||||||
"image"
|
"image"
|
||||||
|
|
||||||
|
"gioui.org/f32"
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Flex lays out child elements along an axis,
|
// Flex lays out child elements along an axis,
|
||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"image"
|
"image"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gioui.org/layout"
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/layout"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type queue struct{}
|
type queue struct{}
|
||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"image"
|
"image"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/gesture"
|
"gioui.org/gesture"
|
||||||
"gioui.org/ui/paint"
|
"gioui.org/paint"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type scrollChild struct {
|
type scrollChild struct {
|
||||||
@@ -11,9 +11,9 @@ import (
|
|||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/paint"
|
"gioui.org/paint"
|
||||||
"gioui.org/ui/text"
|
"gioui.org/text"
|
||||||
"golang.org/x/image/font"
|
"golang.org/x/image/font"
|
||||||
"golang.org/x/image/font/sfnt"
|
"golang.org/x/image/font/sfnt"
|
||||||
"golang.org/x/image/math/fixed"
|
"golang.org/x/image/math/fixed"
|
||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ImageOp sets the material to a section of an
|
// ImageOp sets the material to a section of an
|
||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
"gioui.org/ui/internal/path"
|
"gioui.org/internal/path"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PathBuilder builds and adds a general ClipOp clip path
|
// PathBuilder builds and adds a general ClipOp clip path
|
||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Event is a pointer event.
|
// Event is a pointer event.
|
||||||
@@ -6,7 +6,7 @@ package system
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ProfileOp registers a handler for receiving
|
// ProfileOp registers a handler for receiving
|
||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/gesture"
|
"gioui.org/gesture"
|
||||||
"gioui.org/ui/key"
|
"gioui.org/key"
|
||||||
"gioui.org/ui/layout"
|
"gioui.org/layout"
|
||||||
"gioui.org/ui/paint"
|
"gioui.org/paint"
|
||||||
"gioui.org/ui/pointer"
|
"gioui.org/pointer"
|
||||||
|
|
||||||
"golang.org/x/image/math/fixed"
|
"golang.org/x/image/math/fixed"
|
||||||
)
|
)
|
||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/ui/layout"
|
"gioui.org/layout"
|
||||||
"gioui.org/ui/paint"
|
"gioui.org/paint"
|
||||||
|
|
||||||
"golang.org/x/image/math/fixed"
|
"golang.org/x/image/math/fixed"
|
||||||
)
|
)
|
||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"image"
|
"image"
|
||||||
|
|
||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
"gioui.org/ui/layout"
|
"gioui.org/layout"
|
||||||
"golang.org/x/image/math/fixed"
|
"golang.org/x/image/math/fixed"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -20,8 +20,8 @@ to a ui/app.Window's Update method.
|
|||||||
Drawing a colored square:
|
Drawing a colored square:
|
||||||
|
|
||||||
import "gioui.org/ui"
|
import "gioui.org/ui"
|
||||||
import "gioui.org/ui/app"
|
import "gioui.org/app"
|
||||||
import "gioui.org/ui/paint"
|
import "gioui.org/paint"
|
||||||
|
|
||||||
var w app.Window
|
var w app.Window
|
||||||
ops := new(ui.Ops)
|
ops := new(ui.Ops)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ package ui
|
|||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/internal/opconst"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ops holds a list of operations. Operations are stored in
|
// Ops holds a list of operations. Operations are stored in
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user