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 ¶
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 ¶
New returns a new application instance with the default driver and no unique ID (unless specified in manifest.pxf)
func NewWithID ¶
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.
Source Files
¶
- app.go
- app_gl.go
- app_login_xdg.go
- app_notification_xdg.go
- app_xdg.go
- asset.go
- cloud.go
- icon_cache_file.go
- icon_cache_other.go
- meta.go
- meta_development.go
- meta_development_other.go
- notification.go
- openevent.go
- openevent_desktop.go
- preferences.go
- preferences_nonweb.go
- preferences_other.go
- preferences_pxf.go
- preferences_rename_other.go
- settings.go
- settings_desktop.go
- settings_file.go
- settings_pxf.go
- single_instance.go
- single_instance_unix.go
- storage.go