Documentation
¶
Index ¶
Constants ¶
View Source
const ( Keystroke = iota Resize TrayMessage PlayerChanged DownloadChanged RequestShutdown )
Event classes. ev.Handler passes events as integers between goroutines. These integers are not arbitrary and are selected by the caller. This allows the receiving goroutine to select which events are relevant to it using simple arithmetic and/or a switch case.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a multiplexer over multiple subsystems waiting for events in parallel. When an event is delivered from one subsystem, handler bounces the message to all other listening handlers.
Handler is thread safe, provided that handlers are only added in sequence and it is only ever passed by value after initialisation completes.
func NewHandler ¶
func NewHandler() *Handler
Click to show internal directories.
Click to hide internal directories.