gui

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatePreparing = iota
	StateDownloading
	StateCompleted
	StateCancelled
	StateError
)

Variables

View Source
var (
	JetBrainsMonoRegular = &fyne.StaticResource{StaticName: "JetBrainsMono-Regular.ttf", StaticContent: jetbrainsMonoRegularFont}
	JetBrainsMonoBold    = &fyne.StaticResource{StaticName: "JetBrainsMono-Bold.ttf", StaticContent: jetbrainsMonoBoldFont}
)
View Source

AppLogo is the resource for the embedded logo.svg file.

View Source
var (
	ErrDownloadInProgress = errors.New("download already in progress")
)

Functions

func CreateThemeFromPreferences

func CreateThemeFromPreferences() fyne.Theme

CreateThemeFromPreferences reads all UI preferences and constructs the appropriate theme.

func DownloadsTabUI

func DownloadsTabUI(dm *DownloadManager) fyne.CanvasObject

func ExportCatalogueAction

func ExportCatalogueAction(win fyne.Window, format string)

func FileTabUI

func FileTabUI(win fyne.Window) fyne.CanvasObject

func HashUI

func HashUI(win fyne.Window) fyne.CanvasObject

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 RefreshCatalogueAction(win fyne.Window, authService *auth.Service, onFinish func())

func Run

func Run(version string, authService *auth.Service)

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.

func SizeUI

func SizeUI(win fyne.Window) fyne.CanvasObject

Types

type CopyableLabel

type CopyableLabel struct {
	widget.Label
}

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 DownloadTask struct {
	ID           int
	InstanceID   time.Time // Unique identifier for this specific download
	State        int
	Title        string
	Status       binding.String
	Details      binding.String
	Progress     binding.Float
	CancelFunc   context.CancelFunc
	FileStatus   binding.String
	DownloadPath string
}

type GoggTheme

type GoggTheme struct {
	fyne.Theme
	// contains filtered or unexported fields
}

GoggTheme defines a custom theme that supports color variants, custom fonts, and sizes.

func (*GoggTheme) Color

Color overrides the default to use our forced variant and custom colors.

func (*GoggTheme) Font

func (t *GoggTheme) Font(style fyne.TextStyle) fyne.Resource

func (*GoggTheme) Icon

func (t *GoggTheme) Icon(name fyne.ThemeIconName) fyne.Resource

Icon demonstrates how to override a default Fyne icon.

func (*GoggTheme) Size

func (t *GoggTheme) Size(name fyne.ThemeSizeName) float32

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.

Jump to

Keyboard shortcuts

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