Documentation
¶
Index ¶
- func MouseMoveFilterLoop(in <-chan interface{}, out chan<- interface{}, fps *int)
- type BasicUI
- func (ui *BasicUI) AppendEvent(ev interface{})
- func (ui *BasicUI) Close()
- func (ui *BasicUI) EnqueueNoOpEvent()
- func (ui *BasicUI) GetCPPaste(i event.CopyPasteIndex, fn func(string, bool))
- func (ui *BasicUI) HandleEvent(ev interface{}) (handled bool)
- func (ui *BasicUI) Image() draw.Image
- func (ui *BasicUI) LayoutMarkedAndSchedulePaint()
- func (ui *BasicUI) NextEvent() interface{}
- func (ui *BasicUI) QueryPointer() (image.Point, error)
- func (ui *BasicUI) QueueEmptyWindowInputEvent()
- func (ui *BasicUI) RunOnUIGoRoutine(f func())
- func (ui *BasicUI) SetCPCopy(i event.CopyPasteIndex, s string)
- func (ui *BasicUI) SetCursor(c event.Cursor)
- func (ui *BasicUI) WarpPointer(p image.Point)
- type UIPaintTime
- type UIRunFuncEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MouseMoveFilterLoop ¶
func MouseMoveFilterLoop(in <-chan interface{}, out chan<- interface{}, fps *int)
Types ¶
type BasicUI ¶
type BasicUI struct {
DrawFrameRate int // frames per second
RootNode widget.Node
Win driver.Window
ApplyEv *widget.ApplyEvent
// contains filtered or unexported fields
}
func (*BasicUI) AppendEvent ¶
func (ui *BasicUI) AppendEvent(ev interface{})
func (*BasicUI) EnqueueNoOpEvent ¶
func (ui *BasicUI) EnqueueNoOpEvent()
func (*BasicUI) GetCPPaste ¶
func (ui *BasicUI) GetCPPaste(i event.CopyPasteIndex, fn func(string, bool))
func (*BasicUI) HandleEvent ¶
func (*BasicUI) LayoutMarkedAndSchedulePaint ¶
func (ui *BasicUI) LayoutMarkedAndSchedulePaint()
func (*BasicUI) NextEvent ¶
func (ui *BasicUI) NextEvent() interface{}
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) WarpPointer ¶
type UIPaintTime ¶
type UIPaintTime struct{}
type UIRunFuncEvent ¶
type UIRunFuncEvent struct {
Func func()
}
Click to show internal directories.
Click to hide internal directories.