streampanel

package
v0.0.0-...-4503ccc Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: CC0-1.0 Imports: 96 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendStatusCodeUndefined = BackendStatusCode(iota)
	BackendStatusCodeReady
	BackendStatusCodeNotNow
	BackendStatusCodeDisable
)
View Source
const (
	ScreenshotMaxWidth  = 384
	ScreenshotMaxHeight = 216
)

Variables

This section is empty.

Functions

func GetAbsolutePosition

func GetAbsolutePosition(w, root fyne.CanvasObject) fyne.Position

GetAbsolutePosition calculates the absolute position of a widget.

func NewTimersUI

func NewTimersUI(
	ctx context.Context,
	panel *Panel,
) *timersUI

func NewTriggerRulesUI

func NewTriggerRulesUI(
	ctx context.Context,
	panel *Panel,
) *triggerRulesUI

Types

type AutoUpdater

type AutoUpdater interface {
	CheckForUpdates(context.Context) (Update, error)
}

type BackendStatusCode

type BackendStatusCode uint

type Config

type Config = config.Config

type HintWidget

type HintWidget struct {
	*widget.Label
	Locker xsync.Mutex
	Text   string
	Hint   *widget.PopUp
	Window fyne.Window

	RecheckerCancelFn context.CancelFunc
}

func NewHintWidget

func NewHintWidget(window fyne.Window, text string) *HintWidget

func (*HintWidget) MouseIn

func (w *HintWidget) MouseIn(ev *desktop.MouseEvent)

func (*HintWidget) MouseMoved

func (w *HintWidget) MouseMoved(*desktop.MouseEvent)

func (*HintWidget) MouseOut

func (w *HintWidget) MouseOut()

type LoopOption

type LoopOption interface {
	// contains filtered or unexported methods
}

type LoopOptionAutoUpdater

type LoopOptionAutoUpdater struct{ AutoUpdater }

type LoopOptionStartingPage

type LoopOptionStartingPage string

type Option

type Option interface {
	Apply(cfg *Config)
}

type OptionOAuthListenPortTwitch

type OptionOAuthListenPortTwitch uint16

func (OptionOAuthListenPortTwitch) Apply

func (o OptionOAuthListenPortTwitch) Apply(cfg *Config)

type OptionOAuthListenPortYouTube

type OptionOAuthListenPortYouTube uint16

func (OptionOAuthListenPortYouTube) Apply

func (o OptionOAuthListenPortYouTube) Apply(cfg *Config)

type OptionRemoteStreamDAddr

type OptionRemoteStreamDAddr string

func (OptionRemoteStreamDAddr) Apply

func (o OptionRemoteStreamDAddr) Apply(cfg *Config)

type Options

type Options []Option

func (Options) ApplyOverrides

func (options Options) ApplyOverrides(cfg Config) Config

type Panel

type Panel struct {
	StreamD      api.StreamD
	Screenshoter Screenshoter
	Audio        *audio.Audio

	OnInternallySubmittedOAuthCode func(
		ctx context.Context,
		platID streamcontrol.PlatformName,
		code string,
	) error

	Config Config
	// contains filtered or unexported fields
}

func New

func New(
	configPath string,
	opts ...Option,
) (*Panel, error)

func (*Panel) Close

func (p *Panel) Close() error

func (*Panel) DisplayError

func (p *Panel) DisplayError(err error)

func (*Panel) GetStreamDConfig

func (p *Panel) GetStreamDConfig(ctx context.Context) (*streamdconfig.Config, error)

func (*Panel) LazyInitStreamD

func (p *Panel) LazyInitStreamD(ctx context.Context) (_err error)

func (*Panel) Loop

func (p *Panel) Loop(ctx context.Context, opts ...LoopOption) error

func (*Panel) NewUpdateProgressBar

func (p *Panel) NewUpdateProgressBar() *UpdateProgressBar

func (*Panel) OAuthHandlerKick

func (p *Panel) OAuthHandlerKick(
	ctx context.Context,
	arg oauthhandler.OAuthHandlerArgument,
) error

func (*Panel) OAuthHandlerTwitch

func (p *Panel) OAuthHandlerTwitch(
	ctx context.Context,
	arg oauthhandler.OAuthHandlerArgument,
) error

func (*Panel) OAuthHandlerYouTube

func (p *Panel) OAuthHandlerYouTube(
	ctx context.Context,
	arg oauthhandler.OAuthHandlerArgument,
) error

func (*Panel) OnSubmittedOAuthCode

func (p *Panel) OnSubmittedOAuthCode(
	ctx context.Context,
	platID streamcontrol.PlatformName,
	code string,
) error

func (*Panel) OpenBrowser

func (p *Panel) OpenBrowser(ctx context.Context, url string) error

func (*Panel) ReportError

func (p *Panel) ReportError(err error)

func (*Panel) SaveConfig

func (p *Panel) SaveConfig(
	ctx context.Context,
) error

func (*Panel) SetLoggingLevel

func (p *Panel) SetLoggingLevel(ctx context.Context, level logger.Level)

func (*Panel) SetStatus

func (p *Panel) SetStatus(msg string)

func (*Panel) SetStreamDConfig

func (p *Panel) SetStreamDConfig(
	ctx context.Context,
	newCfg *streamdconfig.Config,
) (_err error)

func (*Panel) ShowErrorReports

func (p *Panel) ShowErrorReports()

type ProgressBar

type ProgressBar interface {
	SetProgress(v float64)
}

type Screenshoter

type Screenshoter interface {
	Engine() screenshoter.ScreenshotEngine
	Loop(
		ctx context.Context,
		interval time.Duration,
		config screenshot.Config,
		callback func(context.Context, *image.RGBA),
	)
}

type Update

type Update interface {
	Apply(ctx context.Context, pb ProgressBar) error
	Cancel() error
	ReleaseName() string
}

type UpdateProgressBar

type UpdateProgressBar struct {
	CloseOnce   sync.Once
	Panel       *Panel
	Window      fyne.Window
	Label       *widget.Label
	ProgressBar *widget.ProgressBar
}

func (*UpdateProgressBar) SetProgress

func (u *UpdateProgressBar) SetProgress(progress float64)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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