controller

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: GPL-3.0 Imports: 26 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
	MainWindow  fyne.Window
	App         *backend.App
	NavHandler  NavigationHandler
	CurPageFunc CurPageFunc
	ReloadFunc  ReloadFunc
	// contains filtered or unexported fields
}

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) 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 prompt for 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) PlayArtistDiscography

func (m *Controller) PlayArtistDiscography(artistID string, shuffleTracks bool)

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) 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) ShowPopUpImage

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

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) ShuffleArtistAlbums added in v0.10.0

func (m *Controller) ShuffleArtistAlbums(artistID string)

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
)

type ReloadFunc

type ReloadFunc func()

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 TracksRoute

func TracksRoute() Route

Jump to

Keyboard shortcuts

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