Documentation
¶
Index ¶
- Constants
- func DrawProgressBar(img image.Image, label string, x, y, h, w, progress float64) (image.Image, error)
- func DrawProgressBarWithAccent(img image.Image, label string, x, y, h, w, progress float64, hex string) (image.Image, error)
- func DrawText(img image.Image, text string, options DrawTextOptions) (image.Image, error)
- func FindXDoToolKeybindString(code int) string
- func HexColor(hex string) color.RGBA
- func LayerImages(x, y int, images ...image.Image) (image.Image, error)
- func ParseXDoToolKeybindString(keybind string) ([]int, error)
- func ResizeImage(img image.Image, keySize int) image.Image
- func ResizeImageWH(img image.Image, width int, height int) image.Image
- func SubImage(img image.Image, x0, y0, x1, y1 int) image.Image
- type BackgroundHandler
- type CombinedHandler
- type ConfigV3
- 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) GetKnobHandlerExample(serial string, knobConfig KnobConfigV3) (image.Image, 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 DeckV3
- func (d *DeckV3) GetKeyGridBackground() string
- func (d *DeckV3) GetKeyGridBackgroundBuff() []image.Image
- func (d *DeckV3) GetKeyGridBackgroundHandler() BackgroundHandler
- func (d *DeckV3) GetKeyGridBackgroundHandlerFields() map[string]any
- func (d *DeckV3) GetTouchPanelBackground() string
- func (d *DeckV3) GetTouchPanelBackgroundBuff() []image.Image
- func (d *DeckV3) GetTouchPanelBackgroundHandler() BackgroundHandler
- func (d *DeckV3) GetTouchPanelBackgroundHandlerFields() map[string]any
- func (d *DeckV3) SetKeyGridBackgroundBuff(img []image.Image)
- func (d *DeckV3) SetKeyGridBackgroundHandler(handler BackgroundHandler)
- func (d *DeckV3) SetTouchPanelBackgroundBuff(img []image.Image)
- func (d *DeckV3) SetTouchPanelBackgroundHandler(handler BackgroundHandler)
- type DrawTextOptions
- type Field
- type FieldType
- type ForegroundActions
- type ForegroundAndInputHandlerConfig
- type ForegroundHandler
- type Handler
- type HandlerType
- type IConn
- type IContext
- type InputActions
- type InputEvent
- type InputEventType
- type InputHandler
- type KeyBackgrounder
- type KeyConfigV3
- func (kc *KeyConfigV3) GetBrightness() int
- func (kc *KeyConfigV3) GetCommand() string
- func (kc *KeyConfigV3) GetFontFace() string
- func (kc *KeyConfigV3) GetForegroundHandler() string
- func (kc *KeyConfigV3) GetForegroundHandlerFields() map[string]any
- func (kc *KeyConfigV3) GetForegroundHandlerInstance() ForegroundHandler
- func (kc *KeyConfigV3) GetIcon() string
- func (kc *KeyConfigV3) GetInputHandler() string
- func (kc *KeyConfigV3) GetInputHandlerFields() map[string]any
- func (kc *KeyConfigV3) GetInputHandlerInstance() InputHandler
- func (kc *KeyConfigV3) GetKeyBackground() string
- func (kc *KeyConfigV3) GetKeyBackgroundBuff() image.Image
- func (kc *KeyConfigV3) GetKeyBackgroundHandler() BackgroundHandler
- func (kc *KeyConfigV3) GetKeyBackgroundHandlerFields() map[string]any
- func (kc *KeyConfigV3) GetKeyBind() string
- func (kc *KeyConfigV3) GetObsCommand() string
- func (kc *KeyConfigV3) GetObsCommandParams() map[string]string
- func (kc *KeyConfigV3) GetSharedHandlerFields() map[string]any
- func (kc *KeyConfigV3) GetSwitchPage() int
- func (kc *KeyConfigV3) GetText() string
- func (kc *KeyConfigV3) GetTextAlignment() VerticalAlignment
- func (kc *KeyConfigV3) GetTextColour() string
- func (kc *KeyConfigV3) GetTextSize() int
- func (kc *KeyConfigV3) GetUrl() string
- func (kc *KeyConfigV3) SetForegroundHandlerInstance(handler ForegroundHandler)
- func (kc *KeyConfigV3) SetInputHandlerInstance(handler InputHandler)
- func (kc *KeyConfigV3) SetKeyBackgroundBuff(img image.Image)
- func (kc *KeyConfigV3) SetKeyBackgroundHandler(handler BackgroundHandler)
- type KeyGridBackgrounder
- type KeyV3
- func (k *KeyV3) GetKeyBackground() string
- func (k *KeyV3) GetKeyBackgroundBuff() image.Image
- func (k *KeyV3) GetKeyBackgroundHandler() BackgroundHandler
- func (k *KeyV3) GetKeyBackgroundHandlerFields() map[string]any
- func (k *KeyV3) SetKeyBackgroundBuff(img image.Image)
- func (k *KeyV3) SetKeyBackgroundHandler(handler BackgroundHandler)
- type KnobActionV3
- func (k *KnobActionV3) GetBrightness() int
- func (k *KnobActionV3) GetCommand() string
- func (k *KnobActionV3) GetKeyBind() string
- func (k *KnobActionV3) GetObsCommand() string
- func (k *KnobActionV3) GetObsCommandParams() map[string]string
- func (k *KnobActionV3) GetSwitchPage() int
- func (k *KnobActionV3) GetUrl() string
- type KnobConfigV3
- func (kc *KnobConfigV3) GetFontFace() string
- func (kc *KnobConfigV3) GetForegroundHandler() string
- func (kc *KnobConfigV3) GetForegroundHandlerFields() map[string]any
- func (kc *KnobConfigV3) GetForegroundHandlerInstance() ForegroundHandler
- func (kc *KnobConfigV3) GetIcon() string
- func (kc *KnobConfigV3) GetInputHandler() string
- func (kc *KnobConfigV3) GetInputHandlerFields() map[string]any
- func (kc *KnobConfigV3) GetInputHandlerInstance() InputHandler
- func (kc *KnobConfigV3) GetSharedHandlerFields() map[string]any
- func (kc *KnobConfigV3) GetText() string
- func (kc *KnobConfigV3) GetTextAlignment() VerticalAlignment
- func (kc *KnobConfigV3) GetTextColour() string
- func (kc *KnobConfigV3) GetTextSize() int
- func (kc *KnobConfigV3) GetTouchPanelBackground() string
- func (kc *KnobConfigV3) GetTouchPanelBackgroundBuff() image.Image
- func (kc *KnobConfigV3) GetTouchPanelBackgroundHandler() ForegroundHandler
- func (kc *KnobConfigV3) GetTouchPanelBackgroundHandlerFields() map[string]any
- func (kc *KnobConfigV3) SetForegroundHandlerInstance(handler ForegroundHandler)
- func (kc *KnobConfigV3) SetInputHandlerInstance(handler InputHandler)
- func (kc *KnobConfigV3) SetTouchPanelBackgroundBuff(img image.Image)
- func (kc *KnobConfigV3) SetTouchPanelBackgroundHandler(handler ForegroundHandler)
- type KnobV3
- func (k *KnobV3) GetTouchPanelBackground() string
- func (k *KnobV3) GetTouchPanelBackgroundBuff() image.Image
- func (k *KnobV3) GetTouchPanelBackgroundHandler() ForegroundHandler
- func (k *KnobV3) GetTouchPanelBackgroundHandlerFields() map[string]any
- func (k *KnobV3) SetTouchPanelBackgroundBuff(img image.Image)
- func (k *KnobV3) SetTouchPanelBackgroundHandler(handler ForegroundHandler)
- type LcdBackgrounder
- type LcdSegmentBackgrounder
- type Module
- type ObsConnectionInfoV2
- type PageV3
- func (p *PageV3) GetKeyGridBackground() string
- func (p *PageV3) GetKeyGridBackgroundBuff() []image.Image
- func (p *PageV3) GetKeyGridBackgroundHandler() BackgroundHandler
- func (p *PageV3) GetKeyGridBackgroundHandlerFields() map[string]any
- func (p *PageV3) GetTouchPanelBackground() string
- func (p *PageV3) GetTouchPanelBackgroundBuff() []image.Image
- func (p *PageV3) GetTouchPanelBackgroundHandler() BackgroundHandler
- func (p *PageV3) GetTouchPanelBackgroundHandlerFields() map[string]any
- func (p *PageV3) SetKeyGridBackgroundBuff(img []image.Image)
- func (p *PageV3) SetKeyGridBackgroundHandler(handler BackgroundHandler)
- func (p *PageV3) SetTouchPanelBackgroundBuff(img []image.Image)
- func (p *PageV3) SetTouchPanelBackgroundHandler(handler BackgroundHandler)
- type StreamDeckInfoV1
- type VerticalAlignment
- type VisualHandler
Constants ¶
View Source
const BorderClearance = 10
Variables ¶
This section is empty.
Functions ¶
func DrawProgressBar ¶ added in v2.0.11
func DrawProgressBarWithAccent ¶ added in v2.0.11
func FindXDoToolKeybindString ¶ added in v2.0.4
func LayerImages ¶ added in v2.0.12
func ParseXDoToolKeybindString ¶ added in v2.0.4
Types ¶
type BackgroundHandler ¶ added in v2.0.15
type BackgroundHandler interface {
ForegroundHandler
StartGrid(fields map[string]any, handlerType HandlerType, info StreamDeckInfoV1, callback func(images []image.Image))
}
type CombinedHandler ¶ added in v2.0.16
type CombinedHandler interface {
VisualHandler
InputHandler
}
type ConfigV3 ¶
type ConfigV3 struct {
Modules []string `json:"modules,omitempty"`
Decks []DeckV3 `json:"decks"`
ObsConnectionInfo ObsConnectionInfoV2 `json:"obs_connection_info,omitempty"`
}
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) GetKnobHandlerExample ¶ added in v2.0.1
func (c *Connection) GetKnobHandlerExample(serial string, knobConfig KnobConfigV3) (image.Image, 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 DeckV3 ¶
type DeckV3 struct {
Serial string `json:"serial"`
Pages []PageV3 `json:"pages"`
TouchPanelBackground string `json:"touch_panel_background"`
TouchPanelBackgroundBuff []image.Image `json:"-"`
TouchPanelBackgroundHandler BackgroundHandler `json:"-"`
TouchPanelBackgroundHandlerFields map[string]any `json:"touch_panel_background_handler_fields"`
KeyGridBackground string `json:"key_grid_background"`
KeyGridBackgroundBuff []image.Image `json:"-"`
KeyGridBackgroundHandler BackgroundHandler `json:"-"`
KeyGridBackgroundHandlerFields map[string]any `json:"key_grid_background_handler_fields"`
}
func (*DeckV3) GetKeyGridBackground ¶ added in v2.0.14
func (*DeckV3) GetKeyGridBackgroundBuff ¶ added in v2.0.14
func (*DeckV3) GetKeyGridBackgroundHandler ¶ added in v2.0.15
func (d *DeckV3) GetKeyGridBackgroundHandler() BackgroundHandler
func (*DeckV3) GetKeyGridBackgroundHandlerFields ¶ added in v2.0.15
func (*DeckV3) GetTouchPanelBackground ¶ added in v2.0.13
func (*DeckV3) GetTouchPanelBackgroundBuff ¶ added in v2.0.13
func (*DeckV3) GetTouchPanelBackgroundHandler ¶ added in v2.0.15
func (d *DeckV3) GetTouchPanelBackgroundHandler() BackgroundHandler
func (*DeckV3) GetTouchPanelBackgroundHandlerFields ¶ added in v2.0.15
func (*DeckV3) SetKeyGridBackgroundBuff ¶ added in v2.0.14
func (*DeckV3) SetKeyGridBackgroundHandler ¶ added in v2.0.15
func (d *DeckV3) SetKeyGridBackgroundHandler(handler BackgroundHandler)
func (*DeckV3) SetTouchPanelBackgroundBuff ¶ added in v2.0.13
func (*DeckV3) SetTouchPanelBackgroundHandler ¶ added in v2.0.15
func (d *DeckV3) SetTouchPanelBackgroundHandler(handler BackgroundHandler)
type DrawTextOptions ¶ added in v2.0.10
type DrawTextOptions struct {
FontSize int64
VerticalAlignment VerticalAlignment
FontFace string
Colour string
}
type ForegroundActions ¶ added in v2.0.16
type ForegroundAndInputHandlerConfig ¶ added in v2.0.17
type ForegroundAndInputHandlerConfig interface {
GetForegroundHandler() string
GetForegroundHandlerInstance() ForegroundHandler
SetForegroundHandlerInstance(handler ForegroundHandler)
GetForegroundHandlerFields() map[string]any
GetInputHandler() string
GetInputHandlerInstance() InputHandler
SetInputHandlerInstance(handler InputHandler)
GetInputHandlerFields() map[string]any
}
type ForegroundHandler ¶ added in v2.0.16
type ForegroundHandler interface {
VisualHandler
Start(fields map[string]any, handlerType HandlerType, info StreamDeckInfoV1, callback func(image image.Image))
}
type IContext ¶ added in v2.0.10
type IContext interface {
SetRGB(r, g, b float64)
SetHexColor(color string)
SetFontFace(font font.Face)
WordWrap(text string, width float64) []string
DrawStringWrapped(s string, x, y, ax, ay, width, lineSpacing float64, align gg.Align)
Image() image.Image
MeasureMultilineString(text string, lineSpacing float64) (float64, float64)
Width() int
Height() int
}
type InputActions ¶ added in v2.0.16
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 SCREEN_SWIPE KEY_PRESS KEY_RELEASE )
type InputHandler ¶ added in v2.0.15
type InputHandler interface {
Handler
Input(fields map[string]any, handlerType HandlerType, info StreamDeckInfoV1, event InputEvent)
}
type KeyBackgrounder ¶ added in v2.0.15
type KeyBackgrounder interface {
GetKeyBackground() string
GetKeyBackgroundBuff() image.Image
SetKeyBackgroundBuff(img image.Image)
GetKeyBackgroundHandler() BackgroundHandler
SetKeyBackgroundHandler(handler BackgroundHandler)
GetKeyBackgroundHandlerFields() map[string]any
}
type KeyConfigV3 ¶
type KeyConfigV3 struct {
Icon string `json:"icon,omitempty"`
Text string `json:"text,omitempty"`
TextSize int `json:"text_size,omitempty"`
TextAlignment VerticalAlignment `json:"text_alignment,omitempty"`
FontFace string `json:"font_face,omitempty"`
TextColour string `json:"text_colour,omitempty"`
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"`
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"`
IconHandlerStruct ForegroundHandler `json:"-"`
KeyHandlerStruct InputHandler `json:"-"`
KeyBackground string `json:"background"`
KeyBackgroundBuff image.Image `json:"-"`
KeyBackgroundHandler BackgroundHandler `json:"-"`
KeyBackgroundHandlerFields map[string]any `json:"key_background_handler_fields"`
}
func (*KeyConfigV3) GetBrightness ¶ added in v2.0.16
func (kc *KeyConfigV3) GetBrightness() int
func (*KeyConfigV3) GetCommand ¶ added in v2.0.16
func (kc *KeyConfigV3) GetCommand() string
func (*KeyConfigV3) GetFontFace ¶ added in v2.0.16
func (kc *KeyConfigV3) GetFontFace() string
func (*KeyConfigV3) GetForegroundHandler ¶ added in v2.0.17
func (kc *KeyConfigV3) GetForegroundHandler() string
func (*KeyConfigV3) GetForegroundHandlerFields ¶ added in v2.0.17
func (kc *KeyConfigV3) GetForegroundHandlerFields() map[string]any
func (*KeyConfigV3) GetForegroundHandlerInstance ¶ added in v2.0.17
func (kc *KeyConfigV3) GetForegroundHandlerInstance() ForegroundHandler
func (*KeyConfigV3) GetIcon ¶ added in v2.0.16
func (kc *KeyConfigV3) GetIcon() string
func (*KeyConfigV3) GetInputHandler ¶ added in v2.0.17
func (kc *KeyConfigV3) GetInputHandler() string
func (*KeyConfigV3) GetInputHandlerFields ¶ added in v2.0.17
func (kc *KeyConfigV3) GetInputHandlerFields() map[string]any
func (*KeyConfigV3) GetInputHandlerInstance ¶ added in v2.0.17
func (kc *KeyConfigV3) GetInputHandlerInstance() InputHandler
func (*KeyConfigV3) GetKeyBackground ¶ added in v2.0.15
func (kc *KeyConfigV3) GetKeyBackground() string
func (*KeyConfigV3) GetKeyBackgroundBuff ¶ added in v2.0.15
func (kc *KeyConfigV3) GetKeyBackgroundBuff() image.Image
func (*KeyConfigV3) GetKeyBackgroundHandler ¶ added in v2.0.15
func (kc *KeyConfigV3) GetKeyBackgroundHandler() BackgroundHandler
func (*KeyConfigV3) GetKeyBackgroundHandlerFields ¶ added in v2.0.15
func (kc *KeyConfigV3) GetKeyBackgroundHandlerFields() map[string]any
func (*KeyConfigV3) GetKeyBind ¶ added in v2.0.16
func (kc *KeyConfigV3) GetKeyBind() string
func (*KeyConfigV3) GetObsCommand ¶ added in v2.0.16
func (kc *KeyConfigV3) GetObsCommand() string
func (*KeyConfigV3) GetObsCommandParams ¶ added in v2.0.16
func (kc *KeyConfigV3) GetObsCommandParams() map[string]string
func (*KeyConfigV3) GetSharedHandlerFields ¶ added in v2.0.17
func (kc *KeyConfigV3) GetSharedHandlerFields() map[string]any
func (*KeyConfigV3) GetSwitchPage ¶ added in v2.0.16
func (kc *KeyConfigV3) GetSwitchPage() int
func (*KeyConfigV3) GetText ¶ added in v2.0.16
func (kc *KeyConfigV3) GetText() string
func (*KeyConfigV3) GetTextAlignment ¶ added in v2.0.16
func (kc *KeyConfigV3) GetTextAlignment() VerticalAlignment
func (*KeyConfigV3) GetTextColour ¶ added in v2.0.16
func (kc *KeyConfigV3) GetTextColour() string
func (*KeyConfigV3) GetTextSize ¶ added in v2.0.16
func (kc *KeyConfigV3) GetTextSize() int
func (*KeyConfigV3) GetUrl ¶ added in v2.0.16
func (kc *KeyConfigV3) GetUrl() string
func (*KeyConfigV3) SetForegroundHandlerInstance ¶ added in v2.0.17
func (kc *KeyConfigV3) SetForegroundHandlerInstance(handler ForegroundHandler)
func (*KeyConfigV3) SetInputHandlerInstance ¶ added in v2.0.17
func (kc *KeyConfigV3) SetInputHandlerInstance(handler InputHandler)
func (*KeyConfigV3) SetKeyBackgroundBuff ¶ added in v2.0.15
func (kc *KeyConfigV3) SetKeyBackgroundBuff(img image.Image)
func (*KeyConfigV3) SetKeyBackgroundHandler ¶ added in v2.0.15
func (kc *KeyConfigV3) SetKeyBackgroundHandler(handler BackgroundHandler)
type KeyGridBackgrounder ¶ added in v2.0.14
type KeyGridBackgrounder interface {
GetKeyGridBackground() string
GetKeyGridBackgroundBuff() []image.Image
SetKeyGridBackgroundBuff(img []image.Image)
GetKeyGridBackgroundHandler() BackgroundHandler
SetKeyGridBackgroundHandler(handler BackgroundHandler)
GetKeyGridBackgroundHandlerFields() map[string]any
}
type KeyV3 ¶
type KeyV3 struct {
Application map[string]*KeyConfigV3 `json:"application,omitempty"`
ActiveBuff image.Image `json:"-"`
ActiveIconHandlerStruct *ForegroundHandler `json:"-"`
ActiveKeyHandlerStruct *InputHandler `json:"-"`
ActiveApplication string `json:"-"`
KeyBackground string `json:"background"`
KeyBackgroundBuff image.Image `json:"-"`
KeyBackgroundHandler BackgroundHandler `json:"-"`
KeyBackgroundHandlerFields map[string]any `json:"key_background_handler_fields"`
}
func (*KeyV3) GetKeyBackground ¶ added in v2.0.15
func (*KeyV3) GetKeyBackgroundBuff ¶ added in v2.0.15
func (*KeyV3) GetKeyBackgroundHandler ¶ added in v2.0.15
func (k *KeyV3) GetKeyBackgroundHandler() BackgroundHandler
func (*KeyV3) GetKeyBackgroundHandlerFields ¶ added in v2.0.15
func (*KeyV3) SetKeyBackgroundBuff ¶ added in v2.0.15
func (*KeyV3) SetKeyBackgroundHandler ¶ added in v2.0.15
func (k *KeyV3) SetKeyBackgroundHandler(handler BackgroundHandler)
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"`
}
func (*KnobActionV3) GetBrightness ¶ added in v2.0.16
func (k *KnobActionV3) GetBrightness() int
func (*KnobActionV3) GetCommand ¶ added in v2.0.16
func (k *KnobActionV3) GetCommand() string
func (*KnobActionV3) GetKeyBind ¶ added in v2.0.16
func (k *KnobActionV3) GetKeyBind() string
func (*KnobActionV3) GetObsCommand ¶ added in v2.0.16
func (k *KnobActionV3) GetObsCommand() string
func (*KnobActionV3) GetObsCommandParams ¶ added in v2.0.16
func (k *KnobActionV3) GetObsCommandParams() map[string]string
func (*KnobActionV3) GetSwitchPage ¶ added in v2.0.16
func (k *KnobActionV3) GetSwitchPage() int
func (*KnobActionV3) GetUrl ¶ added in v2.0.16
func (k *KnobActionV3) GetUrl() string
type KnobConfigV3 ¶
type KnobConfigV3 struct {
Icon string `json:"icon,omitempty"`
Text string `json:"text,omitempty"`
TextSize int `json:"text_size,omitempty"`
TextAlignment VerticalAlignment `json:"text_alignment,omitempty"`
FontFace string `json:"font_face,omitempty"`
TextColour string `json:"text_colour,omitempty"`
LcdHandler string `json:"lcd_handler,omitempty"`
KnobOrTouchHandler string `json:"knob_or_touch_handler,omitempty"`
LcdHandlerStruct ForegroundHandler `json:"-"`
KnobOrTouchHandlerStruct InputHandler `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"`
TouchPanelBackground string `json:"touch_panel_background"`
TouchPanelBackgroundBuff image.Image `json:"-"`
TouchPanelBackgroundHandler ForegroundHandler `json:"-"`
TouchPanelBackgroundHandlerFields map[string]any `json:"touch_panel_background_handler_fields"`
}
func (*KnobConfigV3) GetFontFace ¶ added in v2.0.16
func (kc *KnobConfigV3) GetFontFace() string
func (*KnobConfigV3) GetForegroundHandler ¶ added in v2.0.17
func (kc *KnobConfigV3) GetForegroundHandler() string
func (*KnobConfigV3) GetForegroundHandlerFields ¶ added in v2.0.17
func (kc *KnobConfigV3) GetForegroundHandlerFields() map[string]any
func (*KnobConfigV3) GetForegroundHandlerInstance ¶ added in v2.0.17
func (kc *KnobConfigV3) GetForegroundHandlerInstance() ForegroundHandler
func (*KnobConfigV3) GetIcon ¶ added in v2.0.16
func (kc *KnobConfigV3) GetIcon() string
func (*KnobConfigV3) GetInputHandler ¶ added in v2.0.17
func (kc *KnobConfigV3) GetInputHandler() string
func (*KnobConfigV3) GetInputHandlerFields ¶ added in v2.0.17
func (kc *KnobConfigV3) GetInputHandlerFields() map[string]any
func (*KnobConfigV3) GetInputHandlerInstance ¶ added in v2.0.17
func (kc *KnobConfigV3) GetInputHandlerInstance() InputHandler
func (*KnobConfigV3) GetSharedHandlerFields ¶ added in v2.0.17
func (kc *KnobConfigV3) GetSharedHandlerFields() map[string]any
func (*KnobConfigV3) GetText ¶ added in v2.0.16
func (kc *KnobConfigV3) GetText() string
func (*KnobConfigV3) GetTextAlignment ¶ added in v2.0.16
func (kc *KnobConfigV3) GetTextAlignment() VerticalAlignment
func (*KnobConfigV3) GetTextColour ¶ added in v2.0.16
func (kc *KnobConfigV3) GetTextColour() string
func (*KnobConfigV3) GetTextSize ¶ added in v2.0.16
func (kc *KnobConfigV3) GetTextSize() int
func (*KnobConfigV3) GetTouchPanelBackground ¶ added in v2.0.13
func (kc *KnobConfigV3) GetTouchPanelBackground() string
func (*KnobConfigV3) GetTouchPanelBackgroundBuff ¶ added in v2.0.13
func (kc *KnobConfigV3) GetTouchPanelBackgroundBuff() image.Image
func (*KnobConfigV3) GetTouchPanelBackgroundHandler ¶ added in v2.0.15
func (kc *KnobConfigV3) GetTouchPanelBackgroundHandler() ForegroundHandler
func (*KnobConfigV3) GetTouchPanelBackgroundHandlerFields ¶ added in v2.0.15
func (kc *KnobConfigV3) GetTouchPanelBackgroundHandlerFields() map[string]any
func (*KnobConfigV3) SetForegroundHandlerInstance ¶ added in v2.0.17
func (kc *KnobConfigV3) SetForegroundHandlerInstance(handler ForegroundHandler)
func (*KnobConfigV3) SetInputHandlerInstance ¶ added in v2.0.17
func (kc *KnobConfigV3) SetInputHandlerInstance(handler InputHandler)
func (*KnobConfigV3) SetTouchPanelBackgroundBuff ¶ added in v2.0.13
func (kc *KnobConfigV3) SetTouchPanelBackgroundBuff(img image.Image)
func (*KnobConfigV3) SetTouchPanelBackgroundHandler ¶ added in v2.0.15
func (kc *KnobConfigV3) SetTouchPanelBackgroundHandler(handler ForegroundHandler)
type KnobV3 ¶
type KnobV3 struct {
Application map[string]*KnobConfigV3 `json:"application,omitempty"`
ActiveBuff image.Image `json:"-"`
ActiveApplication string `json:"-"`
TouchPanelBackground string `json:"touch_panel_background"`
TouchPanelBackgroundBuff image.Image `json:"-"`
TouchPanelBackgroundHandler ForegroundHandler `json:"-"`
TouchPanelBackgroundHandlerFields map[string]any `json:"touch_panel_background_handler_fields"`
}
func (*KnobV3) GetTouchPanelBackground ¶ added in v2.0.13
func (*KnobV3) GetTouchPanelBackgroundBuff ¶ added in v2.0.13
func (*KnobV3) GetTouchPanelBackgroundHandler ¶ added in v2.0.15
func (k *KnobV3) GetTouchPanelBackgroundHandler() ForegroundHandler
func (*KnobV3) GetTouchPanelBackgroundHandlerFields ¶ added in v2.0.15
func (*KnobV3) SetTouchPanelBackgroundBuff ¶ added in v2.0.13
func (*KnobV3) SetTouchPanelBackgroundHandler ¶ added in v2.0.15
func (k *KnobV3) SetTouchPanelBackgroundHandler(handler ForegroundHandler)
type LcdBackgrounder ¶ added in v2.0.14
type LcdBackgrounder interface {
GetTouchPanelBackground() string
GetTouchPanelBackgroundBuff() []image.Image
SetTouchPanelBackgroundBuff(img []image.Image)
GetTouchPanelBackgroundHandler() BackgroundHandler
SetTouchPanelBackgroundHandler(handler BackgroundHandler)
GetTouchPanelBackgroundHandlerFields() map[string]any
}
type LcdSegmentBackgrounder ¶ added in v2.0.15
type LcdSegmentBackgrounder interface {
GetTouchPanelBackground() string
GetTouchPanelBackgroundBuff() image.Image
SetTouchPanelBackgroundBuff(img image.Image)
GetTouchPanelBackgroundHandler() ForegroundHandler
SetTouchPanelBackgroundHandler(handler ForegroundHandler)
GetTouchPanelBackgroundHandlerFields() map[string]any
}
type Module ¶
type Module struct {
Name string `json:"name,omitempty"`
NewForeground func() ForegroundHandler `json:"-"`
NewInput func() InputHandler `json:"-"`
NewBackground func() BackgroundHandler `json:"-"`
ForegroundFields []Field `json:"icon_fields,omitempty"`
InputFields []Field `json:"key_fields,omitempty"`
BackgroundFields []Field `json:"lcd_fields,omitempty"`
LinkedFields []Field `json:"linked_fields,omitempty"`
IsForeground bool `json:"is_foreground,omitempty"`
IsInput bool `json:"is_input,omitempty"`
IsBackground bool `json:"is_background,omitempty"`
IsLinkedHandlers bool `json:"is_linked_handlers,omitempty"`
Linked bool `json:"linked,omitempty"`
}
type ObsConnectionInfoV2 ¶
type PageV3 ¶
type PageV3 struct {
Keys []KeyV3 `json:"keys"`
Knobs []KnobV3 `json:"knobs"`
TouchPanelBackground string `json:"touch_panel_background"`
TouchPanelBackgroundBuff []image.Image `json:"-"`
TouchPanelBackgroundHandler BackgroundHandler `json:"-"`
TouchPanelBackgroundHandlerFields map[string]any `json:"touch_panel_background_handler_fields"`
KeyGridBackground string `json:"key_grid_background"`
KeyGridBackgroundBuff []image.Image `json:"-"`
KeyGridBackgroundHandler BackgroundHandler `json:"-"`
KeyGridBackgroundHandlerFields map[string]any `json:"key_grid_background_handler_fields"`
}
func (*PageV3) GetKeyGridBackground ¶ added in v2.0.14
func (*PageV3) GetKeyGridBackgroundBuff ¶ added in v2.0.14
func (*PageV3) GetKeyGridBackgroundHandler ¶ added in v2.0.15
func (p *PageV3) GetKeyGridBackgroundHandler() BackgroundHandler
func (*PageV3) GetKeyGridBackgroundHandlerFields ¶ added in v2.0.15
func (*PageV3) GetTouchPanelBackground ¶ added in v2.0.13
func (*PageV3) GetTouchPanelBackgroundBuff ¶ added in v2.0.13
func (*PageV3) GetTouchPanelBackgroundHandler ¶ added in v2.0.15
func (p *PageV3) GetTouchPanelBackgroundHandler() BackgroundHandler
func (*PageV3) GetTouchPanelBackgroundHandlerFields ¶ added in v2.0.15
func (*PageV3) SetKeyGridBackgroundBuff ¶ added in v2.0.14
func (*PageV3) SetKeyGridBackgroundHandler ¶ added in v2.0.15
func (p *PageV3) SetKeyGridBackgroundHandler(handler BackgroundHandler)
func (*PageV3) SetTouchPanelBackgroundBuff ¶ added in v2.0.13
func (*PageV3) SetTouchPanelBackgroundHandler ¶ added in v2.0.15
func (p *PageV3) SetTouchPanelBackgroundHandler(handler BackgroundHandler)
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"`
PaddingX int `json:"padding_x"`
PaddingY int `json:"padding_y"`
KeyGridBackgroundWidth int `json:"key_grid_background_width"`
KeyGridBackgroundHeight int `json:"key_grid_background_height"`
LcdBackgroundWidth int `json:"lcd_background_width"`
LcdBackgroundHeight int `json:"lcd_background_height"`
}
func (StreamDeckInfoV1) GetDimensions ¶ added in v2.0.16
func (info StreamDeckInfoV1) GetDimensions(handlerType HandlerType) (int, int)
func (StreamDeckInfoV1) GetGridDimensions ¶ added in v2.0.16
func (info StreamDeckInfoV1) GetGridDimensions(handlerType HandlerType) (int, int)
func (StreamDeckInfoV1) SplitBackgroundImage ¶ added in v2.0.16
func (info StreamDeckInfoV1) SplitBackgroundImage(background image.Image, handlerType HandlerType) []image.Image
type VerticalAlignment ¶ added in v2.0.10
type VerticalAlignment string
TODO replace use of gg with native font.Drawer
const ( Top VerticalAlignment = "TOP" Center VerticalAlignment = "CENTER" Bottom VerticalAlignment = "BOTTOM" )
type VisualHandler ¶ added in v2.0.15
Source Files
¶
Click to show internal directories.
Click to hide internal directories.