mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
ui/key: expand documentation
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
|
/*
|
||||||
|
Package key implements key and text input handling.
|
||||||
|
|
||||||
|
The HandlerOp operations is used for declaring key
|
||||||
|
input handlers. Use the Queue interface from package
|
||||||
|
input to receive events.
|
||||||
|
*/
|
||||||
package key
|
package key
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -8,13 +15,21 @@ import (
|
|||||||
"gioui.org/ui/internal/opconst"
|
"gioui.org/ui/internal/opconst"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// HandlerOp declares a handler ready for key events.
|
||||||
|
// Key events are in general only delivered to the
|
||||||
|
// focused key handler. Set the Focus flag to request
|
||||||
|
// the focus.
|
||||||
type HandlerOp struct {
|
type HandlerOp struct {
|
||||||
Key input.Key
|
Key input.Key
|
||||||
Focus bool
|
Focus bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HideInputOp request that any on screen text input
|
||||||
|
// be hidden.
|
||||||
type HideInputOp struct{}
|
type HideInputOp struct{}
|
||||||
|
|
||||||
|
// FocusEvent is sent when a handler gains or looses
|
||||||
|
// focus.
|
||||||
type FocusEvent struct {
|
type FocusEvent struct {
|
||||||
Focus bool
|
Focus bool
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user