Skip to content

Commit

Permalink
update gio version
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasnaur committed Sep 26, 2019
1 parent 49d01e8 commit a8632c4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module gophercon2019
go 1.13

require (
gioui.org/ui v0.0.0-20190925074315-9c33550644a7
gioui.org/ui v0.0.0-20190926171558-ce74bc0cbaea
golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
gioui.org/ui v0.0.0-20190925074315-9c33550644a7 h1:l/WdLfRQnDRjipqy7NP9iJcq/zXABhsCd7vGX8oapYo=
gioui.org/ui v0.0.0-20190925074315-9c33550644a7/go.mod h1:PssKPKlqVIeyaed+0w492Xc2NgX5M3n6oZKOAj5rxoE=
gioui.org/ui v0.0.0-20190926171558-ce74bc0cbaea h1:rv21Wx1Inf27NY453rrrP6tuEG65PyWPhnP2Jx+Qb8k=
gioui.org/ui v0.0.0-20190926171558-ce74bc0cbaea/go.mod h1:PssKPKlqVIeyaed+0w492Xc2NgX5M3n6oZKOAj5rxoE=
golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9 h1:uc17S921SPw5F2gJo7slQ3aqvr2RwpL7eb3+DZncu3s=
golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
Expand Down
4 changes: 2 additions & 2 deletions gophercon-2019.slide
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ Lay out widgets on an axis.
// Queue maps an event handler key to the events
// available to the handler.
type Queue interface {
Next(k Key) (Event, bool)
Events(k Key) []Event
}

// Key is the stable identifier for an event handler.
Expand Down Expand Up @@ -567,7 +567,7 @@ Detect clicks

var queue ui.Queue
var c gesture.Click
for event, ok := c.Next(queue); ok; event, ok = c.Next(queue) {
for _, event := range c.Events(queue) {
// event is a gesture.ClickEvent, not a raw pointer.Event.
}

Expand Down
2 changes: 1 addition & 1 deletion pointer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type Button struct {

// START OMIT
func (b *Button) Layout(queue ui.Queue, ops *ui.Ops) {
for e, ok := queue.Next(b); ok; e, ok = queue.Next(b) { // HLevent
for _, e := range queue.Events(b) { // HLevent
if e, ok := e.(pointer.Event); ok { // HLevent
switch e.Type { // HLevent
case pointer.Press: // HLevent
Expand Down

0 comments on commit a8632c4

Please sign in to comment.