internal

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT-0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	tcell.Screen
	// contains filtered or unexported fields
}

Application struct. It embeds and overrides views.Application. It also implemets views.Widget so that it can be used as the root Widget. Call (*Application).Run to run.

func NewApplication

func NewApplication(cfg *config.Config) *Application

NewApplication allocates new Application from cfg.

func (*Application) HandleEvent

func (app *Application) HandleEvent(ev tcell.Event) bool

HandleEvent handles dem events.

func (*Application) Quit

func (app *Application) Quit()

Quit the application.

func (*Application) Resize

func (app *Application) Resize()

Resize is run after a resize event.

func (*Application) Run

func (app *Application) Run() (err error)

Run the application.

func (*Application) SetView

func (app *Application) SetView(view views.View)

SetView updates the views of subwidgets.

func (*Application) Update added in v0.3.0

func (app *Application) Update()

Update subwidgets after querying information from client.

type LyricsWidget

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

LyricsWidget is a Widget implementation.

func NewLyricsWidget

func NewLyricsWidget(postFunc func(fn func())) *LyricsWidget

NewLyricsWidget allocates new LyricsWidget.

func (*LyricsWidget) Cancel added in v0.3.0

func (w *LyricsWidget) Cancel()

func (*LyricsWidget) Draw added in v0.3.0

func (w *LyricsWidget) Draw()

func (*LyricsWidget) HandleEvent

func (w *LyricsWidget) HandleEvent(ev tcell.Event) bool

func (*LyricsWidget) Resize added in v0.3.0

func (w *LyricsWidget) Resize()

func (*LyricsWidget) SetView added in v0.3.0

func (w *LyricsWidget) SetView(view views.View)

func (*LyricsWidget) Size added in v0.3.0

func (w *LyricsWidget) Size() (int, int)

func (*LyricsWidget) Update added in v0.3.0

func (w *LyricsWidget) Update(playing bool, status status.Status, times []time.Duration, lines []string)

type ProgressWidget added in v0.4.0

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

func NewProgressWidget added in v0.4.0

func NewProgressWidget(postFunc func(fn func())) *ProgressWidget

func (*ProgressWidget) Cancel added in v0.4.0

func (w *ProgressWidget) Cancel()

func (*ProgressWidget) Draw added in v0.4.0

func (w *ProgressWidget) Draw()

func (*ProgressWidget) HandleEvent added in v0.4.0

func (*ProgressWidget) HandleEvent(tcell.Event) bool

func (*ProgressWidget) Resize added in v0.4.0

func (w *ProgressWidget) Resize()

func (*ProgressWidget) SetView added in v0.4.0

func (w *ProgressWidget) SetView(view views.View)

func (*ProgressWidget) Size added in v0.4.0

func (w *ProgressWidget) Size() (int, int)

func (*ProgressWidget) Update added in v0.4.0

func (w *ProgressWidget) Update(playing bool, status status.Status)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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