Documentation ¶
Index ¶
- type BasicUI
- func (ui *BasicUI) AppendEvent(ev any)
- func (ui *BasicUI) Close()
- func (ui *BasicUI) EnqueueNoOpEvent()
- func (ui *BasicUI) GetClipboardData(i event.ClipboardIndex, fn func(string, error))
- func (ui *BasicUI) HandleEvent(ev any) (handled bool)
- func (ui *BasicUI) Image() draw.Image
- func (ui *BasicUI) LayoutMarkedAndSchedulePaint()
- func (ui *BasicUI) NextEvent() any
- func (ui *BasicUI) QueryPointer() (image.Point, error)
- func (ui *BasicUI) QueueEmptyWindowInputEvent()
- func (ui *BasicUI) RunOnUIGoRoutine(f func())
- func (ui *BasicUI) SetClipboardData(i event.ClipboardIndex, s string)
- func (ui *BasicUI) SetCursor(c event.Cursor)
- func (ui *BasicUI) WaitRunOnUIGoRoutine(f func())
- func (ui *BasicUI) WarpPointer(p image.Point)
- type UIPaintTime
- type UIRunFuncEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicUI ¶
type BasicUI struct { DrawFrameRate int // frames per second RootNode widget.Node Win driver.Window // contains filtered or unexported fields }
func (*BasicUI) AppendEvent ¶
func (*BasicUI) EnqueueNoOpEvent ¶
func (ui *BasicUI) EnqueueNoOpEvent()
func (*BasicUI) GetClipboardData ¶ added in v1.3.0
func (ui *BasicUI) GetClipboardData(i event.ClipboardIndex, fn func(string, error))
func (*BasicUI) HandleEvent ¶
func (*BasicUI) LayoutMarkedAndSchedulePaint ¶
func (ui *BasicUI) LayoutMarkedAndSchedulePaint()
func (*BasicUI) NextEvent ¶
How to use NextEvent():
func SampleEventLoop() { defer ui.Close() for { ev := ui.NextEvent() switch t := ev.(type) { case error: fmt.Println(err) case *event.WindowClose: return default: ui.HandleEvent(ev) } ui.LayoutMarkedAndSchedulePaint() } }
func (*BasicUI) QueueEmptyWindowInputEvent ¶
func (ui *BasicUI) QueueEmptyWindowInputEvent()
Allows triggering a run of applyevent (ex: useful for cursor update, needs point or it won't work).
func (*BasicUI) RunOnUIGoRoutine ¶
func (ui *BasicUI) RunOnUIGoRoutine(f func())
func (*BasicUI) SetClipboardData ¶ added in v1.3.0
func (ui *BasicUI) SetClipboardData(i event.ClipboardIndex, s string)
func (*BasicUI) WaitRunOnUIGoRoutine ¶ added in v1.3.0
func (ui *BasicUI) WaitRunOnUIGoRoutine(f func())
Use with care to avoid UI deadlock (waiting within another wait).
func (*BasicUI) WarpPointer ¶
type UIPaintTime ¶
type UIPaintTime struct{}
type UIRunFuncEvent ¶
type UIRunFuncEvent struct {
Func func()
}
Click to show internal directories.
Click to hide internal directories.