-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinterface.go
More file actions
52 lines (37 loc) · 898 Bytes
/
interface.go
File metadata and controls
52 lines (37 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package streamdeck
import (
"image"
"image/color"
"github.com/sstallion/go-hid"
)
type keyDirection uint
const (
keyDirectionLTR keyDirection = iota
keyDirectionRTL
)
type deckConfig interface {
SetDevice(dev *hid.Device)
NumKeys() int
KeyColumns() int
KeyRows() int
KeyDirection() keyDirection
KeyDataOffset() int
TransformKeyIndex(keyIdx int) int
IconSize() int
IconBytes() int
Model() uint16
FillColor(keyIdx int, col color.RGBA) error
FillImage(keyIdx int, img image.Image) error
FillPanel(img image.RGBA) error
ClearKey(keyIdx int) error
ClearAllKeys() error
SetBrightness(pct int) error
ResetToLogo() error
GetFimwareVersion() (string, error)
}
var decks = map[uint16]deckConfig{
StreamDeckOriginalV2: &deckConfigOriginalV2{},
StreamDeckXL: &deckConfigXL{},
StreamDeckMini: &deckConfigMini{},
StreamDeckMiniV2: &deckConfigMini{},
}