Documentation
¶
Overview ¶
Package Benjamin, a Button panel UI
This package contains drivers and user interface logic for interacting with button panels, such as the popular Elgate Stream Decks.
Supported devices ¶
Devices supported by benjamin, are:
Elgato Stream Deck (original) Elgato Stream Deck V2 (original) Elgato Stream Deck Mini Elgato Stream Deck MK.2 Elgato Stream Deck XL Elgato Stream Deck XL V2 Elgato Stream Deck + Inifinitton iButton
Index ¶
- type BaseEvent
- type Button
- type ButtonPress
- type ButtonRelease
- type Device
- type Display
- type DisplayLongPress
- type DisplayPress
- type DisplaySwipe
- type Drawable
- type Encoder
- type EncoderChange
- type EncoderPress
- type EncoderRelease
- type Error
- type Event
- func NewButtonPress(device Device, key Button) Event
- func NewButtonRelease(device Device, key Button, after time.Duration) Event
- func NewDisplayLongPress(device Device, display Display, at image.Point) Event
- func NewDisplayPress(device Device, display Display, at image.Point) Event
- func NewDisplaySwipe(device Device, display Display, from, to image.Point) Event
- func NewEncoderChange(device Device, encoder Encoder, change, bits int) Event
- func NewEncoderPress(device Device, encoder Encoder) Event
- func NewEncoderRelease(device Device, encoder Encoder, after time.Duration) Event
- func NewError(device Device, err error) Event
- type EventData
- type EventHandler
- type EventHandlerFunc
- type EventType
- type Peripheral
- type Route
- type Router
- type Screen
- type Surface
- type USBDevice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button interface {
Peripheral
Drawable
// Position on the key matrix.
Position() image.Point
}
type ButtonPress ¶
func (ButtonPress) String ¶
func (event ButtonPress) String() string
type ButtonRelease ¶
func (ButtonRelease) String ¶
func (event ButtonRelease) String() string
type Display ¶
type Display interface {
Peripheral
Drawable
}
type DisplayLongPress ¶
func (DisplayLongPress) String ¶
func (event DisplayLongPress) String() string
type DisplayPress ¶
func (DisplayPress) String ¶
func (event DisplayPress) String() string
type DisplaySwipe ¶
func (DisplaySwipe) String ¶
func (event DisplaySwipe) String() string
type Encoder ¶
type Encoder interface {
Peripheral
// Display linked to the encoder, returns nil if the encoder has no display.
Display() Display
}
Encoder is a rotary encoder.
type EncoderChange ¶
func (EncoderChange) String ¶
func (event EncoderChange) String() string
type EncoderPress ¶
func (EncoderPress) String ¶
func (event EncoderPress) String() string
type EncoderRelease ¶
func (EncoderRelease) String ¶
func (event EncoderRelease) String() string
type Event ¶
type Event struct {
// Type of event.
Type EventType
// Peripheral the event was generated with.
Peripheral Peripheral
// Data associated with the event.
Data EventData
}
Event from user interaction.
func NewButtonPress ¶
func NewDisplayLongPress ¶
func NewDisplaySwipe ¶
func NewEncoderChange ¶
func NewEncoderPress ¶
func NewEncoderRelease ¶
type EventHandler ¶
type EventHandler interface {
Handle(Event)
}
type EventHandlerFunc ¶
type EventHandlerFunc func(Event)
func (EventHandlerFunc) Handle ¶
func (f EventHandlerFunc) Handle(event Event)
type Peripheral ¶
type Route ¶
type Route struct {
Peripheral Peripheral
EventHandler
}
type Router ¶
func (Router) On ¶
func (r Router) On(p Peripheral, t EventType, h EventHandler)
type Screen ¶ added in v1.0.1
type Screen interface {
Peripheral
Drawable
}
type USBDevice ¶ added in v1.0.1
type USBDevice interface {
DeviceInfo() hid.DeviceInfo
}
Click to show internal directories.
Click to hide internal directories.