app

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: BSD-3-Clause Imports: 42 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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: 1.0

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: 1.0

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 (pre-rebrand tracker #872, mirroring the preferences.pxf migration in pre-rebrand tracker #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 (pre-rebrand tracker #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