ui

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VIEW_PLAYLISTS = "playlists"
	VIEW_TRACKS    = "tracks"
	VIEW_QUEUE     = "queue"
	VIEW_STATUS    = "status"
)
View Source
const (
	PauseTrack                string = "PauseTrack"
	ShuffleMode               string = "ShuffleMode"
	ShuffleAllMode            string = "ShuffleAllMode"
	NextTrack                 string = "NextTrack"
	ReplayTrack               string = "ReplayTrack"
	Search                    string = "Search"
	Quit                      string = "Quit"
	QueueTrack                string = "QueueTrack"
	QueuePlaylist             string = "QueuePlaylist"
	RepeatPlayingTrack        string = "RepeatPlayingTrack"
	RemoveSearchFromPlaylists string = "RemoveSearchFromPlaylists"
	RemoveTrackFromQueue      string = "RemoveTrackFromQueue"
	RemoveAllTracksFromQueue  string = "RemoveAllTracksFromQueue"
	GoToFirstLine             string = "GoToFirstLine"
	GoToLastLine              string = "GoToLastLine"
	PlaySelectedTrack         string = "PlaySelectedTrack"
	Up                        string = "Up"
	Down                      string = "Down"
	Left                      string = "Left"
	Right                     string = "Right"
	OpenCloseFolder           string = "OpenCloseFolder"
)
View Source
const QUEUE_MAX_ELEMENTS = 100

Variables

This section is empty.

Functions

func CuiAssertSelectedPlaylist added in v0.2.0

func CuiAssertSelectedPlaylist(playlist string) bool

func InitialiseConsoleUserInterface

func InitialiseConsoleUserInterface(ev *sconsify.Events) sconsify.UserInterface

func InitialiseNoUserInterface

func InitialiseNoUserInterface(events *sconsify.Events, output Printer, repeatOn *bool, shuffle *bool) sconsify.UserInterface

Types

type ConsoleUserInterface

type ConsoleUserInterface struct{}

func (*ConsoleUserInterface) GetNextToPlay

func (cui *ConsoleUserInterface) GetNextToPlay() *sconsify.Track

func (*ConsoleUserInterface) NewPlaylists

func (cui *ConsoleUserInterface) NewPlaylists(newPlaylist sconsify.Playlists) error

func (*ConsoleUserInterface) PlayTokenLost

func (cui *ConsoleUserInterface) PlayTokenLost() error

func (*ConsoleUserInterface) Shutdown

func (cui *ConsoleUserInterface) Shutdown()

func (*ConsoleUserInterface) TrackNotAvailable

func (cui *ConsoleUserInterface) TrackNotAvailable(track *sconsify.Track)

func (*ConsoleUserInterface) TrackPaused

func (cui *ConsoleUserInterface) TrackPaused(track *sconsify.Track)

func (*ConsoleUserInterface) TrackPlaying

func (cui *ConsoleUserInterface) TrackPlaying(track *sconsify.Track)

type Gui

type Gui struct {
	PlayingTrack *sconsify.Track
	// contains filtered or unexported fields
}

type KeyEntry added in v0.2.0

type KeyEntry struct {
	Key     string
	Command string
}

type KeyMapping

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

type Keyboard added in v0.2.0

type Keyboard struct {
	ConfiguredKeys map[string][]string
	UsedFunctions  map[string]bool

	SequentialKeys map[string]gocui.KeybindingHandler

	Keys []*KeyMapping
}

type NoUi

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

func (*NoUi) GetNextToPlay

func (noui *NoUi) GetNextToPlay() *sconsify.Track

func (*NoUi) NewPlaylists

func (noui *NoUi) NewPlaylists(playlists sconsify.Playlists) error

func (*NoUi) PlayTokenLost

func (noui *NoUi) PlayTokenLost() error

func (*NoUi) Shutdown

func (noui *NoUi) Shutdown()

func (*NoUi) TrackNotAvailable

func (noui *NoUi) TrackNotAvailable(track *sconsify.Track)

func (*NoUi) TrackPaused

func (noui *NoUi) TrackPaused(track *sconsify.Track)

func (*NoUi) TrackPlaying

func (noui *NoUi) TrackPlaying(track *sconsify.Track)

type PersistStatePlayer

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

func (*PersistStatePlayer) Pause

func (p *PersistStatePlayer) Pause()

func (*PersistStatePlayer) Play

func (p *PersistStatePlayer) Play()

type Player

type Player interface {
	Play()
	Pause()
}

type Printer

type Printer interface {
	Print(message string)
}

type Queue

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

func InitQueue

func InitQueue() *Queue

func (*Queue) Add

func (queue *Queue) Add(track *sconsify.Track) *sconsify.Track

func (*Queue) Contents

func (queue *Queue) Contents() []*sconsify.Track

func (*Queue) Insert added in v0.2.0

func (queue *Queue) Insert(track *sconsify.Track) *sconsify.Track

func (*Queue) Pop

func (queue *Queue) Pop() *sconsify.Track

func (*Queue) Remove

func (queue *Queue) Remove(index int) *sconsify.Track

func (*Queue) RemoveAll

func (queue *Queue) RemoveAll()

type RegularPlayer

type RegularPlayer struct{}

func (*RegularPlayer) Pause

func (p *RegularPlayer) Pause()

func (*RegularPlayer) Play

func (p *RegularPlayer) Play()

type SilentPrinter

type SilentPrinter struct{}

func (*SilentPrinter) Print

func (p *SilentPrinter) Print(message string)

type StandardOutputPrinter

type StandardOutputPrinter struct{}

func (*StandardOutputPrinter) Print

func (p *StandardOutputPrinter) Print(message string)

type State

type State struct {
	SelectedPlaylist string
	SelectedTrack    string

	PlayingTrackUri       string
	PlayingTrackFullTitle string
	PlayingPlaylist       string

	ClosedFolders []string
	Queue         []*sconsify.Track
}

Jump to

Keyboard shortcuts

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