842d29373fb2910f1eefd0d1e7b8d57efb4b671b — Elias Naur 3 months ago 2f9ac5a
ui: documentation tweaks

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 files changed, 9 insertions(+), 7 deletions(-)

M ui/app/app.go
M ui/input/input.go
M ui/key/key.go
M ui/pointer/pointer.go
M ui/app/app.go => ui/app/app.go +2 -2
@@ 13,7 13,7 @@
 	"gioui.org/ui"
 )
 
-// UpdateEvent is sent when a Window's Update
+// An UpdateEvent is generated when a Window's Update
 // method must be called.
 type UpdateEvent struct {
 	Config Config


@@ 42,7 42,7 @@
 	Top, Bottom, Left, Right ui.Value
 }
 
-// StageEvent is sent whenever the stage of a
+// A StageEvent is generated whenever the stage of a
 // Window changes.
 type StageEvent struct {
 	Stage Stage

M ui/input/input.go => ui/input/input.go +2 -0
@@ 33,6 33,8 @@
 // Queue maps an event handler key to the events
 // available to the handler.
 type Queue interface {
+	// Next returns the next available event, or
+	// false if none are available.
 	Next(k Key) (Event, bool)
 }
 

M ui/key/key.go => ui/key/key.go +3 -3
@@ 29,13 29,13 @@
 // be hidden.
 type HideInputOp struct{}
 
-// FocusEvent is sent when a handler gains or loses
+// A FocusEvent is generated when a handler gains or loses
 // focus.
 type FocusEvent struct {
 	Focus bool
 }
 
-// Event is sent when a key is pressed. For text input
+// An Event is generated when a key is pressed. For text input
 // use EditEvent.
 type Event struct {
 	// Name is the rune character that most closely


@@ 47,7 47,7 @@
 	Modifiers Modifiers
 }
 
-// EditEvent is sent when text is input.
+// An EditEvent is generated when text is input.
 type EditEvent struct {
 	Text string
 }

M ui/pointer/pointer.go => ui/pointer/pointer.go +2 -2
@@ 90,8 90,8 @@
 type areaKind uint8
 
 const (
-	// Cancel is sent when the current gesture is interrupted
-	// by other handlers or the system.
+	// A Cancel event is generated when the current gesture is
+	// interrupted by other handlers or the system.
 	Cancel Type = iota
 	// Press of a pointer.
 	Press