view

package
v0.0.0-...-6586ce7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buttons

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

Buttons is an implementation of the View interface that allows setting the displayed content of individual buttons.

func NewButtons

func NewButtons(sd *streamdeck.StreamDeck) (*Buttons, error)

NewButtons returns a Buttons View capable of displaying multiple static and/or animated buttons.

func (*Buttons) Apply

func (b *Buttons) Apply(ctx context.Context) error

Apply updates the displayed content for all buttons on the Stream Deck.

func (*Buttons) Set

func (b *Buttons) Set(index int, btn button.Button) *Buttons

Set sets a Button on the view, it will not render the image on a Stream Deck, a separate call to View#Apply or Buttons#Update is required to actually apply the change(s).

This method is safe to call concurrently.

func (*Buttons) Update

func (b *Buttons) Update(ctx context.Context, index int) error

Update updates the image displayed on a StreamDeck using the Button set on this view.

Jump to

Keyboard shortcuts

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