controller

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	AppVersion        string
	App               *backend.App
	MainWindow        fyne.Window
	NavHandler        NavigationHandler
	CurPageFunc       CurPageFunc
	ReloadFunc        func()
	RefreshPageFunc   func()
	SelectAllPageFunc func()
	// contains filtered or unexported fields
}

func New added in v0.13.0

func New(app *backend.App, appVersion string, mainWindow fyne.Window) *Controller

func (*Controller) CloseEscapablePopUp

func (m *Controller) CloseEscapablePopUp()

func (*Controller) ClosePopUpOnEscape

func (m *Controller) ClosePopUpOnEscape(pop *widget.PopUp)

func (*Controller) ConnectAlbumGridActions

func (m *Controller) ConnectAlbumGridActions(grid *widgets.GridView)

func (*Controller) ConnectArtistGridActions

func (m *Controller) ConnectArtistGridActions(grid *widgets.GridView)

func (*Controller) ConnectPlayQueuelistActions added in v0.13.0

func (c *Controller) ConnectPlayQueuelistActions(list *widgets.PlayQueueList)

func (*Controller) ConnectTracklistActions

func (m *Controller) ConnectTracklistActions(tracklist *widgets.Tracklist)

func (*Controller) ConnectTracklistActionsWithReplayGainAlbum added in v0.8.0

func (m *Controller) ConnectTracklistActionsWithReplayGainAlbum(tracklist *widgets.Tracklist)

func (*Controller) DoAddTracksToPlaylistWorkflow

func (m *Controller) DoAddTracksToPlaylistWorkflow(trackIDs []string)

Show dialog to select playlist. Depending on the results of that dialog, potentially create a new playlist Add tracks to the user-specified playlist

func (*Controller) DoConnectToServerWorkflow

func (c *Controller) DoConnectToServerWorkflow(server *backend.ServerConfig)

DoConnectToServerWorkflow does the workflow for connecting to the last active server on startup

func (*Controller) DoEditPlaylistWorkflow

func (m *Controller) DoEditPlaylistWorkflow(playlist *mediaprovider.Playlist)

func (*Controller) GetArtistTracks

func (m *Controller) GetArtistTracks(artistID string) []*mediaprovider.Track

func (*Controller) GetSongRadioTracks added in v0.10.0

func (c *Controller) GetSongRadioTracks(sourceTrack *mediaprovider.Track) ([]*mediaprovider.Track, error)

func (*Controller) HaveModal added in v0.7.0

func (m *Controller) HaveModal() bool

func (*Controller) NavigateTo

func (m *Controller) NavigateTo(route Route)

func (*Controller) PromptForFirstServer

func (m *Controller) PromptForFirstServer()

func (*Controller) PromptForLoginAndConnect

func (m *Controller) PromptForLoginAndConnect()

func (*Controller) QueueShowModalFunc

func (m *Controller) QueueShowModalFunc(f func())

If there is currently no modal popup managed by the Controller visible, then run f (which should create and show a modal dialog) immediately. else run f when the current modal dialog workflow has ended.

func (*Controller) SelectAll added in v0.13.1

func (m *Controller) SelectAll()

func (*Controller) SetTrackFavorites

func (c *Controller) SetTrackFavorites(trackIDs []string, favorite bool)

func (*Controller) SetTrackRatings

func (c *Controller) SetTrackRatings(trackIDs []string, rating int)

func (*Controller) ShowAboutDialog

func (c *Controller) ShowAboutDialog()

func (*Controller) ShowAlbumInfoDialog added in v0.5.0

func (c *Controller) ShowAlbumInfoDialog(albumID, albumName string, albumCover image.Image)

func (*Controller) ShowDownloadDialog added in v0.4.0

func (c *Controller) ShowDownloadDialog(tracks []*mediaprovider.Track, downloadName string)

func (*Controller) ShowPeakMeter added in v0.13.0

func (c *Controller) ShowPeakMeter()

func (*Controller) ShowPopUpImage

func (m *Controller) ShowPopUpImage(img image.Image)

func (*Controller) ShowPopUpPlayQueue added in v0.13.0

func (m *Controller) ShowPopUpPlayQueue()

func (*Controller) ShowQuickSearch added in v0.7.0

func (c *Controller) ShowQuickSearch()

func (*Controller) ShowSettingsDialog

func (c *Controller) ShowSettingsDialog(themeUpdateCallbk func(), themeFiles map[string]string)

func (*Controller) ShowShareDialog added in v0.10.0

func (c *Controller) ShowShareDialog(id string)

func (*Controller) ShowTrackInfoDialog added in v0.13.0

func (c *Controller) ShowTrackInfoDialog(track *mediaprovider.Track)

type CurPageFunc

type CurPageFunc func() Route
type NavigationHandler func(Route)

type PageName

type PageName int
const (
	None PageName = iota // nil case
	Album
	Albums
	Artist
	Artists
	Genre
	Genres
	Favorites
	NowPlaying
	Playlist
	Playlists
	Tracks
	Radios
)

func (PageName) String added in v0.13.1

func (p PageName) String() string

type Route

type Route struct {
	Page PageName
	Arg  string
}

func AlbumRoute

func AlbumRoute(albumID string) Route

func AlbumsRoute

func AlbumsRoute() Route

func ArtistRoute

func ArtistRoute(artistID string) Route

func ArtistsRoute

func ArtistsRoute() Route

func FavoritesRoute

func FavoritesRoute() Route

func GenreRoute

func GenreRoute(genre string) Route

func GenresRoute

func GenresRoute() Route

func NowPlayingRoute

func NowPlayingRoute(highlightedTrackID string) Route

func PlaylistRoute

func PlaylistRoute(id string) Route

func PlaylistsRoute

func PlaylistsRoute() Route

func RadiosRoute added in v0.11.0

func RadiosRoute() Route

func TracksRoute

func TracksRoute() Route

Jump to

Keyboard shortcuts

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