Skip to main content

Crate lingxia_app_context

Crate lingxia_app_context 

Source

Modules§

capability
The one place each host capability is decided. lx.supports(), the FFI capability bitmask, and the optional lx.* members all read these, so they cannot drift apart.

Structs§

AppConfig
AppLinksConfig
CapabilitiesConfig
The capabilities: section, shared verbatim between the CLI (parsing lingxia.yaml, writing app.json) and the runtime (reading app.json) — one definition so a capability can never exist on one side only. deny_unknown_fields gives lingxia.yaml typo errors; the runtime always reads an app.json generated by the same CLI build, so it never sees fields this struct lacks.
HostBuild
What the host binary was compiled with, recorded once at boot.
MediaCaptureConfig
Declared realtime-capture tracks. Each track is independently optional.
PanelContent
PanelItem
PanelsConfig
SplashConfig
Runtime half of splash:. Images and colors are platform resources; only the minimum hold time is a runtime decision, and the upper bound is a framework constant that hosts deliberately cannot configure.
StorageConfig
ThemeColor
Opaque sRGB color used by the host theme wire format.
ThemeConfig
ThemeStyle

Enums§

AppContextError
AppEnv
Host-app deployment environment baked into app.json.
AppearancePreference
Light/dark as a choice: auto follows the system, light and dark pin it. The product’s setting, an lxapp manifest’s pin, and theme’s default all speak it.
PanelContentKind
PanelPosition
SettingsDestination
Static host configuration describing where a product’s Settings affordance should navigate. Resolution and opening remain platform responsibilities.

Constants§

DEFAULT_SPLASH_MIN_DURATION_MS
Default minimum hold, in milliseconds. Long enough that a fast first render does not flash the cover, short enough not to feel like a delay.

Functions§

app_config
app_state_dir
app_state_file
app_storage_max_size_bytes
autostart_enabled
browser_enabled
cache_max_size_bytes
data_max_size_bytes
env
Active host env baked into the running build. Defaults to AppEnv::Prod before set_app_config is called and when app.json omits env.
home_app_id
home_app_version
host_build
host_build_recorded
Whether the boot recorded the build yet. Lets a consumer assert it is not reading the all-false default before set_host_build ran.
lingxia_id
mark_splash_visible
Note that this launch has a launch face, so the hold applies to it.
mark_startup
Start the cold-start clock. Idempotent; call as early as possible.
notifications_enabled
page_background_color
The configured page floor for one appearance, as #RRGGBB.
process_enabled
product_name
product_version
proxy_enabled
resolve_localized_product_name
set_app_config
set_host_build
Records the host build’s capabilities. Idempotent; the first call wins.
set_pending_campaign
Hold a resolved campaign until the launch face is ready to hand over. Returns false when home already crossed that boundary and the late answer was dropped.
set_product_name_locale
Locale used to pick productNames translations. Typically the effective display language (auto → system, otherwise the in-app preference).
since_startup
splash_min_duration
How long the splash must stay up before a ready signal may dismiss it.
splash_visible_for
How long the launch face has been on screen, or None when this launch has no launch face at all.
take_pending_campaign
Take the campaign, if one arrived in time. Taking rather than reading: the launch face hands over exactly once, and a campaign that missed that moment must not surface later over real content.
temp_max_size_bytes
terminal_enabled
theme