streamdeck-sdk/payloads.go

130 lines
4.0 KiB
Go
Raw Normal View History

package streamdeck
type LogMessagePayload struct {
Message string `json:"message"`
}
type OpenURLPayload struct {
URL string `json:"url"`
}
type SetTitlePayload struct {
Title string `json:"title"`
Target Target `json:"target"`
}
type SetImagePayload struct {
Base64Image string `json:"image"`
Target Target `json:"target"`
}
type SetStatePayload struct {
State int `json:"state"`
}
type SwitchProfilePayload struct {
Profile string `json:"profile"`
}
2023-08-08 15:34:37 -06:00
type SetFeedbackLayoutPayload struct {
Layout string `json:"layout"`
}
type DidReceiveSettingsPayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
IsInMultiAction bool `json:"isInMultiAction,omitempty"`
}
type Coordinates struct {
Column int `json:"column,omitempty"`
Row int `json:"row,omitempty"`
}
2023-08-08 15:34:37 -06:00
type DidReceiveGlobalSettingsPayload[T any] struct {
Settings T `json:"settings,omitempty"`
}
2023-08-08 15:34:37 -06:00
type KeyDownPayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
State int `json:"state,omitempty"`
UserDesiredState int `json:"userDesiredState,omitempty"`
IsInMultiAction bool `json:"isInMultiAction,omitempty"`
}
2023-08-08 15:34:37 -06:00
type KeyUpPayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
State int `json:"state,omitempty"`
UserDesiredState int `json:"userDesiredState,omitempty"`
IsInMultiAction bool `json:"isInMultiAction,omitempty"`
}
2023-08-08 15:34:37 -06:00
// TouchTapPayload A json object
type TouchTapPayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
TapPos [2]int `json:"tapPos,omitempty"`
Hold bool `json:"hold,omitempty"`
}
2023-08-08 15:34:37 -06:00
type DialDownPayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
Controller string `json:"controller,omitempty"`
}
type DialUpPayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
Controller string `json:"controller,omitempty"`
}
type DialRotatePayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
Ticks int `json:"ticks,omitempty"`
Pressed bool `json:"pressed,omitempty"`
}
type WillAppearPayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
State int `json:"state,omitempty"`
IsInMultiAction bool `json:"isInMultiAction,omitempty"`
}
type WillDisappearPayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
State int `json:"state,omitempty"`
IsInMultiAction bool `json:"isInMultiAction,omitempty"`
}
2023-08-08 15:34:37 -06:00
type TitleParametersDidChangePayload[T any] struct {
Settings T `json:"settings,omitempty"`
Coordinates Coordinates `json:"coordinates,omitempty"`
State int `json:"state,omitempty"`
Title string `json:"title,omitempty"`
TitleParameters TitleParameters `json:"titleParameters,omitempty"`
}
type TitleParameters struct {
FontFamily string `json:"fontFamily,omitempty"`
FontSize int `json:"fontSize,omitempty"`
FontStyle string `json:"fontStyle,omitempty"`
FontUnderline bool `json:"fontUnderline,omitempty"`
ShowTitle bool `json:"showTitle,omitempty"`
TitleAlignment string `json:"titleAlignment,omitempty"`
TitleColor string `json:"titleColor,omitempty"`
}
type ApplicationDidLaunchPayload struct {
Application string `json:"application,omitempty"`
}
type ApplicationDidTerminatePayload struct {
Application string `json:"application,omitempty"`
}