mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
ui: documentation tweaks
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -13,7 +13,7 @@ import (
|
|||||||
"gioui.org/ui"
|
"gioui.org/ui"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UpdateEvent is sent when a Window's Update
|
// An UpdateEvent is generated when a Window's Update
|
||||||
// method must be called.
|
// method must be called.
|
||||||
type UpdateEvent struct {
|
type UpdateEvent struct {
|
||||||
Config Config
|
Config Config
|
||||||
@@ -42,7 +42,7 @@ type Insets struct {
|
|||||||
Top, Bottom, Left, Right ui.Value
|
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.
|
// Window changes.
|
||||||
type StageEvent struct {
|
type StageEvent struct {
|
||||||
Stage Stage
|
Stage Stage
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ package input
|
|||||||
// Queue maps an event handler key to the events
|
// Queue maps an event handler key to the events
|
||||||
// available to the handler.
|
// available to the handler.
|
||||||
type Queue interface {
|
type Queue interface {
|
||||||
|
// Next returns the next available event, or
|
||||||
|
// false if none are available.
|
||||||
Next(k Key) (Event, bool)
|
Next(k Key) (Event, bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -29,13 +29,13 @@ type HandlerOp struct {
|
|||||||
// be hidden.
|
// be hidden.
|
||||||
type HideInputOp struct{}
|
type HideInputOp struct{}
|
||||||
|
|
||||||
// FocusEvent is sent when a handler gains or loses
|
// A FocusEvent is generated when a handler gains or loses
|
||||||
// focus.
|
// focus.
|
||||||
type FocusEvent struct {
|
type FocusEvent struct {
|
||||||
Focus bool
|
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.
|
// use EditEvent.
|
||||||
type Event struct {
|
type Event struct {
|
||||||
// Name is the rune character that most closely
|
// Name is the rune character that most closely
|
||||||
@@ -47,7 +47,7 @@ type Event struct {
|
|||||||
Modifiers Modifiers
|
Modifiers Modifiers
|
||||||
}
|
}
|
||||||
|
|
||||||
// EditEvent is sent when text is input.
|
// An EditEvent is generated when text is input.
|
||||||
type EditEvent struct {
|
type EditEvent struct {
|
||||||
Text string
|
Text string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,8 +90,8 @@ type Source uint8
|
|||||||
type areaKind uint8
|
type areaKind uint8
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// Cancel is sent when the current gesture is interrupted
|
// A Cancel event is generated when the current gesture is
|
||||||
// by other handlers or the system.
|
// interrupted by other handlers or the system.
|
||||||
Cancel Type = iota
|
Cancel Type = iota
|
||||||
// Press of a pointer.
|
// Press of a pointer.
|
||||||
Press
|
Press
|
||||||
|
|||||||
Reference in New Issue
Block a user