metadata

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(f *FyneApp, w io.Writer) error

Save attempts to write a FyneApp metadata to the provided writer. If the encoding fails an error will be returned.

func SaveStandard

func SaveStandard(f *FyneApp, dir string) error

SaveStandard attempts to save a FyneApp metadata to the `FyneApp.toml` file in the specified dir. If the file cannot be written or encoding fails an error will be returned.

func ScaleIcon

func ScaleIcon(data fyne.Resource, size int) fyne.Resource

Types

type AdaptiveIcon added in v1.7.1

type AdaptiveIcon struct {
	Foreground string `toml:",omitempty"`
	Background string `toml:",omitempty"`
	Monochrome string `toml:",omitempty"`
}

type AppDetails

type AppDetails struct {
	Icon     string `toml:",omitempty"`
	Name, ID string `toml:",omitempty"`
	Version  string `toml:",omitempty"`
	Build    int    `toml:",omitempty"`
}

AppDetails describes the build information, this group may be OS or arch specific

type AppSource

type AppSource struct {
	Repo, Dir string `toml:",omitempty"`
}

type CanOpen added in v1.7.1

type CanOpen struct {
	MimeTypes string `toml:",omitempty"`
}

CanOpen represents a selection of file types (mime etc) that this application can open.

type Capabilities added in v1.7.4

type Capabilities struct {
	Microphone bool `toml:",omitempty"`
	// MicrophoneUsage optionally overrides the default explanation shown when the OS asks the user for access.
	MicrophoneUsage string `toml:",omitempty"`
}

Capabilities lists the system integrations an application uses that the OS requires to be declared at package time.

func (Capabilities) MicrophoneUsageText added in v1.7.4

func (c Capabilities) MicrophoneUsageText(appName string) string

MicrophoneUsageText returns the explanation of why the named app uses the microphone, this is the default text unless MicrophoneUsage was set.

type FyneApp

type FyneApp struct {
	Website      string `toml:",omitempty"`
	Description  string `toml:",omitempty"`
	Details      AppDetails
	AdaptiveIcon *AdaptiveIcon `toml:",omitempty"`
	Splash       *Splash       `toml:",omitempty"`

	Development  map[string]string `toml:",omitempty"`
	Release      map[string]string `toml:",omitempty"`
	Source       *AppSource        `toml:",omitempty"`
	CanOpen      *CanOpen          `toml:",omitempty"`
	LinuxAndBSD  *LinuxAndBSD      `toml:",omitempty"`
	Languages    []string          `toml:",omitempty"`
	Migrations   map[string]bool   `toml:",omitempty"`
	Capabilities *Capabilities     `toml:",omitempty"`
}

FyneApp describes the top level metadata for building a fyne application

func Load

func Load(r io.Reader) (*FyneApp, error)

Load attempts to read a FyneApp metadata from the provided reader. If this cannot be done an error will be returned.

func LoadStandard

func LoadStandard(dir string) (*FyneApp, error)

LoadStandard attempts to read a FyneApp metadata from the `FyneApp.toml` file in the specified dir. If the file cannot be found or parsed an error will be returned.

type LinuxAndBSD

type LinuxAndBSD struct {
	GenericName string   `toml:",omitempty"`
	Categories  []string `toml:",omitempty"`
	Comment     string   `toml:",omitempty"`
	Keywords    []string `toml:",omitempty"`
	ExecParams  string   `toml:",omitempty"`
}

LinuxAndBSD describes specific metadata for desktop files on Linux and BSD.

type Splash added in v1.7.4

type Splash struct {
	Background string `toml:",omitempty"`
	Icon       string `toml:",omitempty"`
}

Splash describes the native launch screen that iOS and Android show while the app loads. Background is a hex colour such as "#015952" and Icon is an optional square PNG that will be centered. The icon defaults to the adaptive icon foreground or the app icon.

Jump to

Keyboard shortcuts

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