_interface

package
v0.0.0-...-e5ec26e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2023 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const PAGE_NAME_PATTERN = "page-"

Variables

This section is empty.

Functions

func AvailableModules

func AvailableModules() []models.Module

func DetectPages

func DetectPages(dir string) ([]int, error)

func EmitPage

func EmitPage(dev *models.VirtualDev, page int)

func HandleInput

func HandleInput(engine *Engine, dev *models.VirtualDev, key *api.Key, page int)

func InitDBUS

func InitDBUS() error

func InitGame

func InitGame()

func Listen

func Listen(dev *models.VirtualDev, engine *Engine)

func LoadModule

func LoadModule(path string)

func RegisterBaseModules

func RegisterBaseModules(action models.Action)

func RegisterCounter

func RegisterCounter() models.Module

func RegisterGame

func RegisterGame(action models.Action) models.Module

func RegisterGif

func RegisterGif() models.Module

func RegisterIconState

func RegisterIconState() models.Module

func RegisterModule

func RegisterModule(m models.Module)

func RegisterTime

func RegisterTime() models.Module

func SetImage

func SetImage(engine *Engine, dev *models.VirtualDev, img image.Image, i int, page int)

func SetKey

func SetKey(engine *Engine, dev *models.VirtualDev, currentKey *api.Key, i int, page int)

func SetKeyImage

func SetKeyImage(engine *Engine, dev *models.VirtualDev, currentKey *api.Key, i int, page int)

func SetPage

func SetPage(engine *Engine, dev *models.VirtualDev, page int)

func SetupConfigurationFromDir

func SetupConfigurationFromDir(dirPath string) (*api.Config, error)

func UnmarshalRow

func UnmarshalRow(raw string) (*models.PageRow, error)

func UnmountPageHandlers

func UnmountPageHandlers(page api.Page)

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(configPath string) *Engine

func (*Engine) Disconnect

func (engine *Engine) Disconnect(dev *models.VirtualDev)

func (*Engine) ReadConfig

func (engine *Engine) ReadConfig() (*api.Config, error)

func (*Engine) ReadConfigNew

func (engine *Engine) ReadConfigNew() (*api.Config, error)

func (*Engine) ReloadConfig

func (engine *Engine) ReloadConfig() error

func (*Engine) Run

func (engine *Engine) Run(newConfig bool) error

TODO: Flag einbauen, alte Config , neue config

func (*Engine) SaveConfig

func (engine *Engine) SaveConfig() error

func (*Engine) SetConfig

func (engine *Engine) SetConfig(configString string) error

func (*Engine) SetImage

func (engine *Engine) SetImage(img image.Image, i int, page int)

type PageRawContent

type PageRawContent struct {
	RowNumber  int
	Content    string
	PageNumber int
}

func ReadPages

func ReadPages(dirPath string, pages []int) ([]PageRawContent, error)

type StreamDeckDBus

type StreamDeckDBus struct {
	// contains filtered or unexported fields
}

func NewStreamDeckBus

func NewStreamDeckBus(engine *Engine) *StreamDeckDBus

func (StreamDeckDBus) CommitConfig

func (s StreamDeckDBus) CommitConfig() *dbus.Error

func (StreamDeckDBus) GetConfig

func (s StreamDeckDBus) GetConfig() (string, *dbus.Error)

func (StreamDeckDBus) GetDeckInfo

func (s StreamDeckDBus) GetDeckInfo() (string, *dbus.Error)

func (StreamDeckDBus) GetModules

func (StreamDeckDBus) GetModules() (string, *dbus.Error)

func (StreamDeckDBus) PressButton

func (s StreamDeckDBus) PressButton(serial string, keyIndex int) *dbus.Error

func (StreamDeckDBus) ReloadConfig

func (s StreamDeckDBus) ReloadConfig() *dbus.Error

func (StreamDeckDBus) SetConfig

func (s StreamDeckDBus) SetConfig(configString string) *dbus.Error

func (StreamDeckDBus) SetPage

func (s StreamDeckDBus) SetPage(serial string, page int) *dbus.Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL