Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v1.0.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: BSD-3-Clause Imports: 38 Imported by: 0

Documentation

Overview

Package app provides app implementations for working with Bellui graphical interfaces. The fastest way to get started is to call app.New() which will normally load a new desktop application. If the "ci" tag is passed to go (go run -tags ci myapp.go) it will run an in-memory application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Asset

func Asset(name string) bellui.Resource

Asset returns a resource from the registered asset bundle. Returns nil if no bundle is registered or the named asset does not exist.

Since: 2.7

func New

func New() bellui.App

New returns a new application instance with the default driver and no unique ID (unless specified in manifest.pxf)

func NewWithID

func NewWithID(id string) bellui.App

NewWithID returns a new app instance using the appropriate runtime driver. The ID string should be globally unique to this app.

func SetAssetBundle

func SetAssetBundle(bundle *storage.AssetBundle)

SetAssetBundle registers an asset bundle for the current application. This allows resources to be loaded by name from an external directory instead of being compiled into the binary.

Since: 2.7

func SetMetadata

func SetMetadata(m bellui.AppMetadata)

SetMetadata overrides the packaged application metadata. This data can be used in many places like notifications and about screens.

Types

type SettingsSchema

type SettingsSchema struct {
	// these items are used for global settings load
	ThemeName         string  `json:"theme"`
	Scale             float32 `json:"scale"`
	PrimaryColor      string  `json:"primary_color"`
	CloudName         string  `json:"cloud_name"`
	CloudConfig       string  `json:"cloud_config"`
	DisableAnimations bool    `json:"no_animations"`
}

SettingsSchema is used for loading and storing global settings

func (*SettingsSchema) MarshalPXF

func (sc *SettingsSchema) MarshalPXF() ([]byte, error)

MarshalPXF encodes the global settings to PXF bytes — the textual format of the settings.pxf store that replaced the legacy settings.json (#872, mirroring the preferences.pxf migration in #824). It maps SettingsSchema field-for-field via the settingspb.Settings proto. Exported because the writer lives in a separate package (cmd/bellui_settings) from the reader (app).

func (*SettingsSchema) StoragePath

func (sc *SettingsSchema) StoragePath() string

StoragePath returns the location of the settings storage — the PXF store (settings.pxf) that replaced the legacy settings.json (#872).

func (*SettingsSchema) UnmarshalPXF

func (sc *SettingsSchema) UnmarshalPXF(data []byte) error

UnmarshalPXF decodes PXF settings bytes into the schema. An error means the bytes are not valid PXF; the caller treats it like any other load failure and keeps the zero-value defaults.

Jump to

Keyboard shortcuts

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