From 3a27bcea2e78841374372eef44c0bb5cc82798c6 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Mon, 14 Oct 2019 15:17:51 +0200 Subject: [PATCH] example: update gio version Signed-off-by: Elias Naur --- example/go.mod | 2 +- example/go.sum | 4 ++-- example/gophers/main.go | 15 ++++++++------- example/hello/hello.go | 7 ++++--- example/kitchen/kitchen.go | 7 ++++--- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/example/go.mod b/example/go.mod index 5b118072..2b0146fd 100644 --- a/example/go.mod +++ b/example/go.mod @@ -3,7 +3,7 @@ module gioui.org/example go 1.13 require ( - gioui.org v0.0.0-20191013162339-8cd4c2e5de65 + gioui.org v0.0.0-20191014143932-b30bf3cef8b1 github.com/google/go-github/v24 v24.0.1 golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 diff --git a/example/go.sum b/example/go.sum index 1015b17d..c93b507b 100644 --- a/example/go.sum +++ b/example/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -gioui.org v0.0.0-20191013162339-8cd4c2e5de65 h1:94lyVLRIPhu95x3goGooL3ZxkDZgo9dRgR6Unecwre0= -gioui.org v0.0.0-20191013162339-8cd4c2e5de65/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY= +gioui.org v0.0.0-20191014143932-b30bf3cef8b1 h1:BhetOsT5IaDOb5cLxWNRBhUToU8C1/WI2nb5sTYKDQE= +gioui.org v0.0.0-20191014143932-b30bf3cef8b1/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= diff --git a/example/gophers/main.go b/example/gophers/main.go index 0f5f7fa8..3c5c0b47 100644 --- a/example/gophers/main.go +++ b/example/gophers/main.go @@ -23,6 +23,7 @@ import ( "gioui.org/app" "gioui.org/gesture" "gioui.org/io/key" + "gioui.org/io/system" "gioui.org/layout" "gioui.org/unit" @@ -100,10 +101,10 @@ func (a *App) run() error { a.w.Invalidate() } } - case app.DestroyEvent: + case system.DestroyEvent: return e.Err - case app.StageEvent: - if e.Stage >= app.StageRunning { + case system.StageEvent: + if e.Stage >= system.StageRunning { if a.ctxCancel == nil { a.ctx, a.ctxCancel = context.WithCancel(context.Background()) } @@ -116,17 +117,17 @@ func (a *App) run() error { a.ctxCancel = nil } } - case *app.CommandEvent: + case *system.CommandEvent: switch e.Type { - case app.CommandBack: + case system.CommandBack: if a.ui.selectedUser != nil { a.ui.selectedUser = nil e.Cancel = true a.w.Invalidate() } } - case app.FrameEvent: - gtx.Reset(&e.Config, e.Size) + case system.FrameEvent: + gtx.Reset(e.Config, e.Size) a.ui.Layout(gtx) e.Frame(gtx.Ops) } diff --git a/example/hello/hello.go b/example/hello/hello.go index 4a6dcae0..c5d47cbf 100644 --- a/example/hello/hello.go +++ b/example/hello/hello.go @@ -9,6 +9,7 @@ import ( "log" "gioui.org/app" + "gioui.org/io/system" _ "gioui.org/font/gofont" "gioui.org/layout" "gioui.org/text" @@ -33,10 +34,10 @@ func loop(w *app.Window) error { for { e := <-w.Events() switch e := e.(type) { - case app.DestroyEvent: + case system.DestroyEvent: return e.Err - case app.FrameEvent: - gtx.Reset(&e.Config, e.Size) + case system.FrameEvent: + gtx.Reset(e.Config, e.Size) l := th.H1("Hello, Gio") maroon := color.RGBA{127, 0, 0, 255} l.Color = maroon diff --git a/example/kitchen/kitchen.go b/example/kitchen/kitchen.go index c30da33c..d49b4adf 100644 --- a/example/kitchen/kitchen.go +++ b/example/kitchen/kitchen.go @@ -12,6 +12,7 @@ import ( "gioui.org/layout" "gioui.org/text" "gioui.org/unit" + "gioui.org/io/system" "gioui.org/widget" "gioui.org/widget/material" @@ -42,10 +43,10 @@ func loop(w *app.Window) error { for { e := <-w.Events() switch e := e.(type) { - case app.DestroyEvent: + case system.DestroyEvent: return e.Err - case app.FrameEvent: - gtx.Reset(&e.Config, e.Size) + case system.FrameEvent: + gtx.Reset(e.Config, e.Size) kitchen(gtx, th) e.Frame(gtx.Ops) }