Documentation ¶
Overview ¶
Abstract input events
Index ¶
- Constants
- func Drain(ch <-chan types.InputEvent)
- func IsAccept(e *types.InputEvent) bool
- func IsMoneyAbort(e *types.InputEvent) bool
- func IsReject(e *types.InputEvent) bool
- type DevInputEventSource
- type Dispatch
- func (self *Dispatch) Emit(event types.InputEvent)
- func (self *Dispatch) Enable(e bool)
- func (self *Dispatch) Run(sources []Source)
- func (self *Dispatch) SubscribeChan(name string, substop <-chan struct{}) chan types.InputEvent
- func (self *Dispatch) SubscribeFunc(name string, fun EventFunc, substop <-chan struct{})
- func (self *Dispatch) Unsubscribe(name string)
- type EvendKeyboard
- type EventFunc
- type Source
Constants ¶
View Source
const ( EvendKeyAccept types.InputKey = 13 EvendKeyReject types.InputKey = 27 EvendKeyCreamLess types.InputKey = 'A' EvendKeyCreamMore types.InputKey = 'B' EvendKeySugarLess types.InputKey = 'C' EvendKeySugarMore types.InputKey = 'D' EvendKeyDot types.InputKey = '.' )
View Source
const DevInputEventTag = "dev-input-event"
View Source
const EvendKeyMaskUp = 0x80
View Source
const EvendKeyboardSourceTag = "evend-keyboard"
View Source
const (
MoneyKeyAbort types.InputKey = 27
)
View Source
const MoneySourceTag = "money"
Variables ¶
This section is empty.
Functions ¶
func Drain ¶
func Drain(ch <-chan types.InputEvent)
func IsAccept ¶
func IsAccept(e *types.InputEvent) bool
func IsMoneyAbort ¶
func IsMoneyAbort(e *types.InputEvent) bool
func IsReject ¶
func IsReject(e *types.InputEvent) bool
Types ¶
type DevInputEventSource ¶
type DevInputEventSource struct {
// contains filtered or unexported fields
}
func NewDevInputEventSource ¶
func NewDevInputEventSource(device string) (*DevInputEventSource, error)
func (*DevInputEventSource) Read ¶
func (self *DevInputEventSource) Read() (types.InputEvent, error)
func (*DevInputEventSource) String ¶
func (self *DevInputEventSource) String() string
type Dispatch ¶
func NewDispatch ¶
func (*Dispatch) Emit ¶
func (self *Dispatch) Emit(event types.InputEvent)
func (*Dispatch) SubscribeChan ¶
func (self *Dispatch) SubscribeChan(name string, substop <-chan struct{}) chan types.InputEvent
func (*Dispatch) SubscribeFunc ¶
func (*Dispatch) Unsubscribe ¶
type EvendKeyboard ¶
type EvendKeyboard struct {
// contains filtered or unexported fields
}
func NewEvendKeyboard ¶
func NewEvendKeyboard(client *mega.Client) (*EvendKeyboard, error)
func (*EvendKeyboard) Close ¶
func (self *EvendKeyboard) Close() error
func (*EvendKeyboard) Read ¶
func (self *EvendKeyboard) Read() (types.InputEvent, error)
func (*EvendKeyboard) String ¶
func (self *EvendKeyboard) String() string
type EventFunc ¶
type EventFunc func(types.InputEvent)
Click to show internal directories.
Click to hide internal directories.