Documentation
¶
Overview ¶
Package mocks is a generated GoMock package.
Index ¶
- func CompareKeyConfigs(c1 KeyConfigV3, c2 KeyConfigV3) bool
- func CompareKeys(k1 KeyV3, k2 KeyV3) bool
- func DrawText(currentImage image.Image, text string, fontSize int, fontAlignment string) (image.Image, error)
- func ResizeImage(img image.Image, keySize int) image.Image
- func ResizeImageWH(img image.Image, width int, height int) image.Image
- type Config
- type ConfigV1
- type ConfigV2
- type ConfigV3
- type Conn
- type Connection
- func (c *Connection) Close()
- func (c *Connection) CommitConfig() error
- func (c *Connection) GetConfig() (*ConfigV3, error)
- func (c *Connection) GetHandlerExample(serial string, keyConfig KeyConfigV3) (image.Image, error)
- func (c *Connection) GetInfo() ([]*StreamDeckInfoV1, error)
- func (c *Connection) GetModules() ([]*Module, error)
- func (c *Connection) GetObsFields() ([]*Field, error)
- func (c *Connection) PressButton(serial string, keyIndex int) error
- func (c *Connection) RegisterPageListener(cback func(string, int32)) error
- func (c *Connection) ReloadConfig() error
- func (c *Connection) SetConfig(config *ConfigV3) error
- func (c *Connection) SetPage(serial string, page int) error
- type Deck
- type DeckV2
- type DeckV3
- type DepracatedConfig
- type Field
- type Handler
- type IConn
- type IconHandler
- type InputEvent
- type InputEventType
- type Key
- type KeyConfigV3
- type KeyHandler
- type KeyV1
- type KeyV3
- type KnobActionV3
- type KnobConfigV3
- type KnobOrTouchHandler
- type KnobV3
- type LcdHandler
- type MockBusObject
- func (m *MockBusObject) AddMatchSignal(arg0, arg1 string, arg2 ...dbus.MatchOption) *dbus.Call
- func (m *MockBusObject) Call(arg0 string, arg1 dbus.Flags, arg2 ...interface{}) *dbus.Call
- func (m *MockBusObject) CallWithContext(arg0 context.Context, arg1 string, arg2 dbus.Flags, arg3 ...interface{}) *dbus.Call
- func (m *MockBusObject) Destination() string
- func (m *MockBusObject) EXPECT() *MockBusObjectMockRecorder
- func (m *MockBusObject) GetProperty(arg0 string) (dbus.Variant, error)
- func (m *MockBusObject) Go(arg0 string, arg1 dbus.Flags, arg2 chan *dbus.Call, arg3 ...interface{}) *dbus.Call
- func (m *MockBusObject) GoWithContext(arg0 context.Context, arg1 string, arg2 dbus.Flags, arg3 chan *dbus.Call, ...) *dbus.Call
- func (m *MockBusObject) Path() dbus.ObjectPath
- func (m *MockBusObject) RemoveMatchSignal(arg0, arg1 string, arg2 ...dbus.MatchOption) *dbus.Call
- func (m *MockBusObject) SetProperty(arg0 string, arg1 interface{}) error
- func (m *MockBusObject) StoreProperty(arg0 string, arg1 interface{}) error
- type MockBusObjectMockRecorder
- func (mr *MockBusObjectMockRecorder) AddMatchSignal(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockBusObjectMockRecorder) Call(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockBusObjectMockRecorder) CallWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call
- func (mr *MockBusObjectMockRecorder) Destination() *gomock.Call
- func (mr *MockBusObjectMockRecorder) GetProperty(arg0 interface{}) *gomock.Call
- func (mr *MockBusObjectMockRecorder) Go(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call
- func (mr *MockBusObjectMockRecorder) GoWithContext(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call
- func (mr *MockBusObjectMockRecorder) Path() *gomock.Call
- func (mr *MockBusObjectMockRecorder) RemoveMatchSignal(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockBusObjectMockRecorder) SetProperty(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockBusObjectMockRecorder) StoreProperty(arg0, arg1 interface{}) *gomock.Call
- type Module
- type ObsConnectionInfoV2
- type Page
- type PageV1
- type PageV3
- type StreamDeckInfo
- type StreamDeckInfoV1
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareKeyConfigs ¶
func CompareKeyConfigs(c1 KeyConfigV3, c2 KeyConfigV3) bool
func CompareKeys ¶
Types ¶
type ConfigV2 ¶
type ConfigV2 struct { Modules []string `json:"modules,omitempty"` Decks []DeckV2 `json:"decks"` ObsConnectionInfo ObsConnectionInfoV2 `json:"obs_connection_info,omitempty"` }
type ConfigV3 ¶
type ConfigV3 struct { Modules []string `json:"modules,omitempty"` Decks []DeckV3 `json:"decks"` ObsConnectionInfo ObsConnectionInfoV2 `json:"obs_connection_info,omitempty"` }
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) AddMatchSignal ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func Connect ¶
func Connect() (*Connection, error)
func (*Connection) Close ¶
func (c *Connection) Close()
func (*Connection) CommitConfig ¶
func (c *Connection) CommitConfig() error
func (*Connection) GetConfig ¶
func (c *Connection) GetConfig() (*ConfigV3, error)
func (*Connection) GetHandlerExample ¶
func (c *Connection) GetHandlerExample(serial string, keyConfig KeyConfigV3) (image.Image, error)
func (*Connection) GetInfo ¶
func (c *Connection) GetInfo() ([]*StreamDeckInfoV1, error)
func (*Connection) GetModules ¶
func (c *Connection) GetModules() ([]*Module, error)
func (*Connection) GetObsFields ¶
func (c *Connection) GetObsFields() ([]*Field, error)
func (*Connection) PressButton ¶
func (c *Connection) PressButton(serial string, keyIndex int) error
func (*Connection) RegisterPageListener ¶
func (c *Connection) RegisterPageListener(cback func(string, int32)) error
func (*Connection) ReloadConfig ¶
func (c *Connection) ReloadConfig() error
func (*Connection) SetConfig ¶
func (c *Connection) SetConfig(config *ConfigV3) error
type DepracatedConfig ¶
type IconHandler ¶
type IconHandler interface { Handler Start(key KeyConfigV3, info StreamDeckInfoV1, callback func(image image.Image)) IsRunning() bool SetRunning(running bool) Stop() }
type InputEvent ¶
type InputEvent struct { EventType InputEventType RotateNotches uint8 }
type InputEventType ¶
type InputEventType uint8
const ( KNOB_CCW InputEventType = iota KNOB_CW KNOB_PRESS SCREEN_SHORT_TAP SCREEN_LONG_TAP )
type Key ¶
type Key struct { Icon string `json:"icon,omitempty"` SwitchPage int `json:"switch_page,omitempty"` Text string `json:"text,omitempty"` TextSize int `json:"text_size,omitempty"` TextAlignment string `json:"text_alignment,omitempty"` Keybind string `json:"keybind,omitempty"` Command string `json:"command,omitempty"` Brightness int `json:"brightness,omitempty"` Url string `json:"url,omitempty"` IconHandler string `json:"icon_handler,omitempty"` KeyHandler string `json:"key_handler,omitempty"` IconHandlerFields map[string]string `json:"icon_handler_fields,omitempty"` KeyHandlerFields map[string]string `json:"key_handler_fields,omitempty"` Buff image.Image `json:"-"` IconHandlerStruct IconHandler `json:"-"` KeyHandlerStruct KeyHandler `json:"-"` }
type KeyConfigV3 ¶
type KeyConfigV3 struct { Icon string `json:"icon,omitempty"` SwitchPage int `json:"switch_page,omitempty"` Text string `json:"text,omitempty"` TextSize int `json:"text_size,omitempty"` TextAlignment string `json:"text_alignment,omitempty"` Keybind string `json:"keybind,omitempty"` Command string `json:"command,omitempty"` Brightness int `json:"brightness,omitempty"` Url string `json:"url,omitempty"` KeyHold int `json:"key_hold,omitempty"` ObsCommand string `json:"obs_command,omitempty"` ObsCommandParams map[string]string `json:"obs_command_params,omitempty"` IconHandler string `json:"icon_handler,omitempty"` KeyHandler string `json:"key_handler,omitempty"` IconHandlerFields map[string]any `json:"icon_handler_fields,omitempty"` KeyHandlerFields map[string]any `json:"key_handler_fields,omitempty"` Buff image.Image `json:"-"` IconHandlerStruct IconHandler `json:"-"` KeyHandlerStruct KeyHandler `json:"-"` }
type KeyHandler ¶
type KeyHandler interface { Handler Key(key KeyConfigV3, info StreamDeckInfoV1) }
type KeyV1 ¶
type KeyV1 struct { Icon string `json:"icon,omitempty"` SwitchPage int `json:"switch_page,omitempty"` Text string `json:"text,omitempty"` TextSize int `json:"text_size,omitempty"` TextAlignment string `json:"text_alignment,omitempty"` Keybind string `json:"keybind,omitempty"` Command string `json:"command,omitempty"` Brightness int `json:"brightness,omitempty"` Url string `json:"url,omitempty"` ObsCommand string `json:"obs_command,omitempty"` ObsCommandParams map[string]string `json:"obs_command_params,omitempty"` IconHandler string `json:"icon_handler,omitempty"` KeyHandler string `json:"key_handler,omitempty"` IconHandlerFields map[string]any `json:"icon_handler_fields,omitempty"` KeyHandlerFields map[string]any `json:"key_handler_fields,omitempty"` Buff image.Image `json:"-"` IconHandlerStruct IconHandler `json:"-"` KeyHandlerStruct KeyHandler `json:"-"` }
type KeyV3 ¶
type KeyV3 struct { Application map[string]*KeyConfigV3 `json:"application,omitempty"` ActiveBuff image.Image `json:"-"` ActiveIconHandlerStruct *IconHandler `json:"-"` ActiveKeyHandlerStruct *KeyHandler `json:"-"` ActiveApplication string `json:"-"` }
type KnobActionV3 ¶
type KnobActionV3 struct { SwitchPage int `json:"switch_page,omitempty"` Keybind string `json:"keybind,omitempty"` Command string `json:"command,omitempty"` Brightness int `json:"brightness,omitempty"` Url string `json:"url,omitempty"` ObsCommand string `json:"obs_command,omitempty"` ObsCommandParams map[string]string `json:"obs_command_params,omitempty"` }
type KnobConfigV3 ¶
type KnobConfigV3 struct { Icon string `json:"icon,omitempty"` Text string `json:"text,omitempty"` TextSize int `json:"text_size,omitempty"` TextAlignment string `json:"text_alignment,omitempty"` LcdHandler string `json:"lcd_handler,omitempty"` KnobOrTouchHandler string `json:"knob_or_touch_handler,omitempty"` Buff image.Image `json:"-"` LcdHandlerStruct LcdHandler `json:"-"` KnobOrTouchHandlerStruct KnobOrTouchHandler `json:"-"` LcdHandlerFields map[string]any `json:"lcd_handler_fields,omitempty"` KnobOrTouchHandlerFields map[string]any `json:"knob_or_touch_handler_fields,omitempty"` KnobPressAction KnobActionV3 `json:"knob_press_action,omitempty"` KnobTurnUpAction KnobActionV3 `json:"knob_turn_up_action,omitempty"` KnobTurnDownAction KnobActionV3 `json:"knob_turn_down_action,omitempty"` }
type KnobOrTouchHandler ¶
type KnobOrTouchHandler interface { Handler Input(key KnobConfigV3, info StreamDeckInfoV1, event InputEvent) }
type KnobV3 ¶
type KnobV3 struct { Application map[string]*KnobConfigV3 `json:"application,omitempty"` ActiveBuff image.Image `json:"-"` ActiveApplication string `json:"-"` }
type LcdHandler ¶
type LcdHandler interface { Handler Start(key KnobConfigV3, info StreamDeckInfoV1, callback func(image image.Image)) IsRunning() bool SetRunning(running bool) Stop() }
type MockBusObject ¶
type MockBusObject struct {
// contains filtered or unexported fields
}
MockBusObject is a mock of BusObject interface.
func NewMockBusObject ¶
func NewMockBusObject(ctrl *gomock.Controller) *MockBusObject
NewMockBusObject creates a new mock instance.
func (*MockBusObject) AddMatchSignal ¶
func (m *MockBusObject) AddMatchSignal(arg0, arg1 string, arg2 ...dbus.MatchOption) *dbus.Call
AddMatchSignal mocks base method.
func (*MockBusObject) CallWithContext ¶
func (m *MockBusObject) CallWithContext(arg0 context.Context, arg1 string, arg2 dbus.Flags, arg3 ...interface{}) *dbus.Call
CallWithContext mocks base method.
func (*MockBusObject) Destination ¶
func (m *MockBusObject) Destination() string
Destination mocks base method.
func (*MockBusObject) EXPECT ¶
func (m *MockBusObject) EXPECT() *MockBusObjectMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBusObject) GetProperty ¶
func (m *MockBusObject) GetProperty(arg0 string) (dbus.Variant, error)
GetProperty mocks base method.
func (*MockBusObject) Go ¶
func (m *MockBusObject) Go(arg0 string, arg1 dbus.Flags, arg2 chan *dbus.Call, arg3 ...interface{}) *dbus.Call
Go mocks base method.
func (*MockBusObject) GoWithContext ¶
func (m *MockBusObject) GoWithContext(arg0 context.Context, arg1 string, arg2 dbus.Flags, arg3 chan *dbus.Call, arg4 ...interface{}) *dbus.Call
GoWithContext mocks base method.
func (*MockBusObject) RemoveMatchSignal ¶
func (m *MockBusObject) RemoveMatchSignal(arg0, arg1 string, arg2 ...dbus.MatchOption) *dbus.Call
RemoveMatchSignal mocks base method.
func (*MockBusObject) SetProperty ¶
func (m *MockBusObject) SetProperty(arg0 string, arg1 interface{}) error
SetProperty mocks base method.
func (*MockBusObject) StoreProperty ¶
func (m *MockBusObject) StoreProperty(arg0 string, arg1 interface{}) error
StoreProperty mocks base method.
type MockBusObjectMockRecorder ¶
type MockBusObjectMockRecorder struct {
// contains filtered or unexported fields
}
MockBusObjectMockRecorder is the mock recorder for MockBusObject.
func (*MockBusObjectMockRecorder) AddMatchSignal ¶
func (mr *MockBusObjectMockRecorder) AddMatchSignal(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
AddMatchSignal indicates an expected call of AddMatchSignal.
func (*MockBusObjectMockRecorder) Call ¶
func (mr *MockBusObjectMockRecorder) Call(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Call indicates an expected call of Call.
func (*MockBusObjectMockRecorder) CallWithContext ¶
func (mr *MockBusObjectMockRecorder) CallWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call
CallWithContext indicates an expected call of CallWithContext.
func (*MockBusObjectMockRecorder) Destination ¶
func (mr *MockBusObjectMockRecorder) Destination() *gomock.Call
Destination indicates an expected call of Destination.
func (*MockBusObjectMockRecorder) GetProperty ¶
func (mr *MockBusObjectMockRecorder) GetProperty(arg0 interface{}) *gomock.Call
GetProperty indicates an expected call of GetProperty.
func (*MockBusObjectMockRecorder) Go ¶
func (mr *MockBusObjectMockRecorder) Go(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call
Go indicates an expected call of Go.
func (*MockBusObjectMockRecorder) GoWithContext ¶
func (mr *MockBusObjectMockRecorder) GoWithContext(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call
GoWithContext indicates an expected call of GoWithContext.
func (*MockBusObjectMockRecorder) Path ¶
func (mr *MockBusObjectMockRecorder) Path() *gomock.Call
Path indicates an expected call of Path.
func (*MockBusObjectMockRecorder) RemoveMatchSignal ¶
func (mr *MockBusObjectMockRecorder) RemoveMatchSignal(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
RemoveMatchSignal indicates an expected call of RemoveMatchSignal.
func (*MockBusObjectMockRecorder) SetProperty ¶
func (mr *MockBusObjectMockRecorder) SetProperty(arg0, arg1 interface{}) *gomock.Call
SetProperty indicates an expected call of SetProperty.
func (*MockBusObjectMockRecorder) StoreProperty ¶
func (mr *MockBusObjectMockRecorder) StoreProperty(arg0, arg1 interface{}) *gomock.Call
StoreProperty indicates an expected call of StoreProperty.
type ObsConnectionInfoV2 ¶
type StreamDeckInfo ¶
type StreamDeckInfoV1 ¶
type StreamDeckInfoV1 struct { Cols int `json:"cols,omitempty"` Rows int `json:"rows,omitempty"` IconSize int `json:"icon_size,omitempty"` Page int `json:"page"` Serial string `json:"serial,omitempty"` Name string `json:"name,omitempty"` Connected bool `json:"connected"` LastConnected time.Time `json:"last_connected,omitempty"` LastDisconnected time.Time `json:"last_disconnected,omitempty"` LcdWidth int `json:"lcd_width,omitempty"` LcdHeight int `json:"lcd_height,omitempty"` LcdCols int `json:"lcd_cols,omitempty"` KnobCols int `json:"knob_cols,omitempty"` }