pulse

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigSinkID           = "sink"
	ConfigSourceID         = "source"
	ConfigSinkInputName    = "sinkInput"
	ConfigSourceOutputName = "sourceOutput"
	ConfigLabel            = "label"
)
View Source
const (
	ToggleMuteButtonType = "pulse.ToggleMute"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

func NewButtonFactory

func NewButtonFactory() *Factory

func (*Factory) Close

func (f *Factory) Close()

func (*Factory) CreateButton

func (f *Factory) CreateButton(config map[string]interface{}) hamdeck.Button

type MuteListener

type MuteListener interface {
	SetMute(id string, mute bool)
}

type MuteListenerFunc

type MuteListenerFunc func(string, bool)

func (MuteListenerFunc) SetMute

func (f MuteListenerFunc) SetMute(id string, mute bool)

type PulseClient

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

func NewClient

func NewClient() *PulseClient

func (*PulseClient) Close

func (c *PulseClient) Close()

func (*PulseClient) Connect

func (c *PulseClient) Connect() error

func (*PulseClient) Connected

func (c *PulseClient) Connected() bool

func (*PulseClient) IsSinkInputMuted

func (c *PulseClient) IsSinkInputMuted(mediaName string) (bool, error)

func (*PulseClient) IsSinkMuted

func (c *PulseClient) IsSinkMuted(id string) (bool, error)

func (*PulseClient) IsSourceMuted

func (c *PulseClient) IsSourceMuted(id string) (bool, error)

func (*PulseClient) IsSourceOutputMuted

func (c *PulseClient) IsSourceOutputMuted(mediaName string) (bool, error)

func (*PulseClient) KeepOpen

func (c *PulseClient) KeepOpen()

func (*PulseClient) Listen

func (c *PulseClient) Listen(listener interface{})

func (*PulseClient) ToggleMuteSink

func (c *PulseClient) ToggleMuteSink(id string) (bool, error)

func (*PulseClient) ToggleMuteSinkInput

func (c *PulseClient) ToggleMuteSinkInput(mediaName string) (bool, error)

func (*PulseClient) ToggleMuteSource

func (c *PulseClient) ToggleMuteSource(id string) (bool, error)

func (*PulseClient) ToggleMuteSourceOutput

func (c *PulseClient) ToggleMuteSourceOutput(mediaName string) (bool, error)

type ToggleMuteButton

type ToggleMuteButton struct {
	hamdeck.BaseButton
	// contains filtered or unexported fields
}

func NewToggleMuteButton

func NewToggleMuteButton(client *PulseClient, sinkID, sourceID, sinkInputName, sourceOutputName string, label string) *ToggleMuteButton

func (*ToggleMuteButton) Enable

func (b *ToggleMuteButton) Enable(enabled bool)

func (*ToggleMuteButton) Image

func (b *ToggleMuteButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image

func (*ToggleMuteButton) Pressed

func (b *ToggleMuteButton) Pressed()

func (*ToggleMuteButton) Released

func (b *ToggleMuteButton) Released()

func (*ToggleMuteButton) SetMute

func (b *ToggleMuteButton) SetMute(id string, mute bool)

Jump to

Keyboard shortcuts

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