Documentation
¶
Index ¶
- Constants
- Variables
- func CreateThemeFromPreferences() fyne.Theme
- func DownloadsTabUI(dm *DownloadManager) fyne.CanvasObject
- func ExportCatalogueAction(win fyne.Window, format string)
- func FileTabUI(win fyne.Window) fyne.CanvasObject
- func HashUI(win fyne.Window) fyne.CanvasObject
- func LibraryTabUI(win fyne.Window, authService *auth.Service, dm *DownloadManager) *libraryTab
- func PlayNotificationSound()
- func RefreshCatalogueAction(win fyne.Window, authService *auth.Service, onFinish func())
- func Run(version string, authService *auth.Service)
- func SettingsTabUI(win fyne.Window) fyne.CanvasObject
- func ShowAboutUI(version string) fyne.CanvasObject
- func SignalCatalogueUpdated()
- func SizeUI(win fyne.Window) fyne.CanvasObject
- type CopyableLabel
- type DownloadManager
- type DownloadTask
- type GoggTheme
- type PersistentDownloadTask
Constants ¶
const ( StatePreparing = iota StateDownloading StateCompleted StateCancelled StateError )
Variables ¶
var ( JetBrainsMonoRegular = &fyne.StaticResource{StaticName: "JetBrainsMono-Regular.ttf", StaticContent: jetbrainsMonoRegularFont} JetBrainsMonoBold = &fyne.StaticResource{StaticName: "JetBrainsMono-Bold.ttf", StaticContent: jetbrainsMonoBoldFont} )
var AppLogo = fyne.NewStaticResource("game-card-svgrepo-com.svg", logoSVG)
AppLogo is the resource for the embedded logo.svg file.
var (
ErrDownloadInProgress = errors.New("download already in progress")
)
Functions ¶
func CreateThemeFromPreferences ¶
CreateThemeFromPreferences reads all UI preferences and constructs the appropriate theme.
func DownloadsTabUI ¶
func DownloadsTabUI(dm *DownloadManager) fyne.CanvasObject
func ExportCatalogueAction ¶
func LibraryTabUI ¶
func LibraryTabUI(win fyne.Window, authService *auth.Service, dm *DownloadManager) *libraryTab
LibraryTabUI modifications: remove tag editor and apply initial speed limit.
func PlayNotificationSound ¶
func PlayNotificationSound()
func RefreshCatalogueAction ¶
func SettingsTabUI ¶
func SettingsTabUI(win fyne.Window) fyne.CanvasObject
func ShowAboutUI ¶
func ShowAboutUI(version string) fyne.CanvasObject
func SignalCatalogueUpdated ¶
func SignalCatalogueUpdated()
SignalCatalogueUpdated sends a notification that the catalogue has been updated.
Types ¶
type CopyableLabel ¶
CopyableLabel is a label that copies its content to the clipboard when tapped.
func NewCopyableLabel ¶
func NewCopyableLabel(text string) *CopyableLabel
NewCopyableLabel creates a new instance of the copyable label with the given text.
func (*CopyableLabel) Tapped ¶
func (cl *CopyableLabel) Tapped(_ *fyne.PointEvent)
Tapped is called when a pointer taps this widget.
type DownloadManager ¶
type DownloadManager struct {
Tasks binding.UntypedList
// contains filtered or unexported fields
}
func NewDownloadManager ¶
func NewDownloadManager() *DownloadManager
func (*DownloadManager) AddTask ¶
func (dm *DownloadManager) AddTask(task *DownloadTask) error
func (*DownloadManager) PersistHistory ¶
func (dm *DownloadManager) PersistHistory()
func (*DownloadManager) QueueOrStart ¶ added in v0.4.3
func (dm *DownloadManager) QueueOrStart(q queuedDownload) error
type DownloadTask ¶
type GoggTheme ¶
GoggTheme defines a custom theme that supports color variants, custom fonts, and sizes.
func (*GoggTheme) Color ¶
func (t *GoggTheme) Color(name fyne.ThemeColorName, v fyne.ThemeVariant) color.Color
Color overrides the default to use our forced variant and custom colors.
type PersistentDownloadTask ¶
type PersistentDownloadTask struct {
ID int `json:"id"`
InstanceID time.Time `json:"instance_id"`
State int `json:"state"`
Title string `json:"title"`
StatusText string `json:"status_text"`
DownloadPath string `json:"download_path"`
}
PersistentDownloadTask is a serializable representation of a finished task.