ui/app: rename DrawEvent to UpdateEvent and Window.Draw to Window.Update

Window.Draw is not the right name for a method that does more than
just drawing. Rename to Update instead, and rename the DrawEvent
accordingly for symmetry.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-07 20:35:37 +02:00
parent 3d519c5a37
commit 4e005f2bfa
8 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -13,9 +13,9 @@ import (
"gioui.org/ui"
)
// DrawEvent is sent when a Window's Draw
// UpdateEvent is sent when a Window's Update
// method must be called.
type DrawEvent struct {
type UpdateEvent struct {
Config Config
Size image.Point
Insets Insets
@@ -178,7 +178,7 @@ func newWindowRendezvous() *windowRendezvous {
return wr
}
func (_ DrawEvent) ImplementsEvent() {}
func (_ UpdateEvent) ImplementsEvent() {}
func (_ StageEvent) ImplementsEvent() {}
func (_ *CommandEvent) ImplementsEvent() {}
func (_ DestroyEvent) ImplementsEvent() {}