ui

package
v0.0.0-...-5bcf8f0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
                      | |           | |  
 _ __   __ _ _ __ __ _| | _____  ___| |_ 
| '_ \ / _` + "`" + ` | '__/ _` + "`" + ` | |/ / _ \/ _ \ __|
| |_) | (_| | | | (_| |   <  __/  __/ |_ 
| .__/ \__,_|_|  \__,_|_|\_\___|\___|\__|
| |                                      
|_|`

Logo is the simple logo displayed in the top left

Variables

This section is empty.

Functions

func NewHelpWidget

func NewHelpWidget(height, width int) *widgets.Paragraph

NewHelpWidget will return a new paragraph widget containing the help text

func NewLogoWidget

func NewLogoWidget(height, width int) *widgets.Paragraph

NewLogoWidget will return a new paragraph widget containing the logo of the app

func NewTracklistWidget

func NewTracklistWidget(height, width int, tt soundcloud.Tracks) *widgets.List

NewTracklistWidget will return a new tracklist widget with the appropriate content, as well as the currently playing track

Types

type InfoWidget

type InfoWidget struct {
	*widgets.Paragraph
}

InfoWidget is a simple info widget

func NewInfoWidget

func NewInfoWidget(height, width int) *InfoWidget

NewInfoWidget will return a new paragraph widget containing nothing at this moment but that will be updated as soon as it is drawn

func (*InfoWidget) Update

func (i *InfoWidget) Update(track soundcloud.Track, duration time.Duration)

Update will update the information in the widget using the given parameters

type PlayerWidget

type PlayerWidget struct {
	Gauge  *widgets.Gauge
	Cursor *widgets.Paragraph
	Total  *widgets.Paragraph
}

PlayerWidget is a set of widget (two paragraphs and a gauge) that represents the player in the app

func NewPlayerWidget

func NewPlayerWidget(height, width int) *PlayerWidget

NewPlayerWidget will return a new player widget

func (*PlayerWidget) Update

func (p *PlayerWidget) Update(playing soundcloud.Track, stream *player.StreamerFormat, cursor time.Duration)

Update will update the widget with the given information

Jump to

Keyboard shortcuts

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