Documentation ¶
Overview ¶
Package router implements Router, a event.Queue implementation that that disambiguates and routes events to handlers declared in operation lists.
Router is used by app.Window and is otherwise only useful for using Gio with external window implementations.
Index ¶
- type Router
- func (q *Router) Cursor() pointer.CursorName
- func (q *Router) Events(k event.Tag) []event.Event
- func (q *Router) Frame(ops *op.Ops)
- func (q *Router) Profiling() bool
- func (q *Router) Queue(events ...event.Event) bool
- func (q *Router) ReadClipboard() bool
- func (q *Router) TextInputState() TextInputState
- func (q *Router) WakeupTime() (time.Time, bool)
- func (q *Router) WriteClipboard() (string, bool)
- type TextInputState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is a Queue implementation that routes events to handlers declared in operation lists.
func (*Router) Cursor ¶
func (q *Router) Cursor() pointer.CursorName
Cursor returns the last cursor set.
func (*Router) Frame ¶
Frame replaces the declared handlers from the supplied operation list. The text input state, wakeup time and whether there are active profile handlers is also saved.
func (*Router) Profiling ¶
Profiling reports whether there was profile handlers in the most recent Frame call.
func (*Router) ReadClipboard ¶
ReadClipboard reports if any new handler is waiting to read the clipboard.
func (*Router) TextInputState ¶
func (q *Router) TextInputState() TextInputState
TextInputState returns the input state from the most recent call to Frame.
func (*Router) WakeupTime ¶
WakeupTime returns the most recent time for doing another frame, as determined from the last call to Frame.
func (*Router) WriteClipboard ¶
WriteClipboard returns the most recent text to be copied to the clipboard, if any.
type TextInputState ¶
type TextInputState uint8
const ( TextInputKeep TextInputState = iota TextInputClose TextInputOpen )