ui

package
v0.0.0-...-e62810a Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MainWindow

type MainWindow struct {
	content.Container

	Window *gtk.ApplicationWindow
	Header *header.Container
	// contains filtered or unexported fields
}

func NewMainWindow

func NewMainWindow(
	a *gtk.Application, session *muse.Session, s *state.State) (*MainWindow, error)

func (*MainWindow) AddPlaylist

func (w *MainWindow) AddPlaylist(path string)

func (*MainWindow) GoBack

func (w *MainWindow) GoBack()

func (*MainWindow) HasPlaylist

func (w *MainWindow) HasPlaylist(name string) bool

func (*MainWindow) Next

func (w *MainWindow) Next()

func (*MainWindow) OnPauseUpdate

func (w *MainWindow) OnPauseUpdate(pause bool)

func (*MainWindow) OnSongFinish

func (w *MainWindow) OnSongFinish()

OnSongFinish plays the next song in the playlist. If the error given is not nil, then it'll gradually seek to the next song until either no error is given anymore or the error counter hits its max.

func (*MainWindow) PlaySession

func (w *MainWindow) PlaySession() *muse.Session

PlaySession returns the internal playback session.

func (*MainWindow) PlayTrack

func (w *MainWindow) PlayTrack(playlist *state.Playlist, n int)

func (*MainWindow) Present

func (w *MainWindow) Present()

Present shows and focuses the window.

func (*MainWindow) Previous

func (w *MainWindow) Previous()

func (*MainWindow) RenamePlaylist

func (w *MainWindow) RenamePlaylist(pl *state.Playlist, newName string) bool

RenamePlaylist renames a playlist. It only works if we're renaming the current playlist.

func (*MainWindow) SaveAllPlaylists

func (w *MainWindow) SaveAllPlaylists()

func (*MainWindow) SavePlaylist

func (w *MainWindow) SavePlaylist(pl *state.Playlist)

func (*MainWindow) ScrollToPlaying

func (w *MainWindow) ScrollToPlaying()

func (*MainWindow) Seek

func (w *MainWindow) Seek(pos float64)

func (*MainWindow) SelectPlaylist

func (w *MainWindow) SelectPlaylist(name string)

func (*MainWindow) SetMute

func (w *MainWindow) SetMute(mute bool)

func (*MainWindow) SetPlay

func (w *MainWindow) SetPlay(playing bool)

func (*MainWindow) SetRepeat

func (w *MainWindow) SetRepeat(mode state.RepeatMode)

func (*MainWindow) SetShuffle

func (w *MainWindow) SetShuffle(shuffle bool)

func (*MainWindow) SetVolume

func (w *MainWindow) SetVolume(perc float64)

func (*MainWindow) SortSelectedTracks

func (w *MainWindow) SortSelectedTracks()

SortSelectedTracks sorts the selected tracks.

func (*MainWindow) SpawnPreferences

func (w *MainWindow) SpawnPreferences()

func (*MainWindow) State

func (w *MainWindow) State() *state.State

State exposes the local state that was passed in.

func (*MainWindow) UpdateTracks

func (w *MainWindow) UpdateTracks(playlist *state.Playlist)

Directories

Path Synopsis
bar
Package bar contains the control bar.
Package bar contains the control bar.
Package header is the top bar that contains the logo, buttons, and the playlist name.
Package header is the top bar that contains the logo, buttons, and the playlist name.

Jump to

Keyboard shortcuts

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