Expand description
Framework-owned application-host state and controls.
Structs§
- Durable
Save Registration - Keeps a shared durable save registered until its owner is dropped.
- Lifecycle
Event - A lifecycle transition delivered by the platform host.
- Lifecycle
Observer - RAII lifecycle observer registration.
- Platform
Directories - Platform directory roots for application-owned files.
Enums§
- Durable
Save Error - An error reported by a durable-save callback.
- Durable
Save Outcome - Result of a lifecycle or explicit save boundary.
- Lifecycle
State - Android-style lifecycle state exposed to composition observers.
- Platform
Directory Error
Constants§
- DEFAULT_
DURABLE_ SAVE_ DEADLINE - The budget used when a host does not state one of its own.
Traits§
- Host
Controller - Host operations supplied by the framework platform backend.
Functions§
- Durable
Save Effect - Registers fallible durable work for this composition’s lifetime.
- Provide
Lifecycle - Provides the host’s lifecycle state to descendant composables.
- advance_
lifecycle - Moves the host lifecycle to
targetthrough every state in between, in Android’s order: a stopped app starts before it resumes, and a resumed one pauses before it stops, so leaving the foreground always runs the durable saves. Paused and started count as the same place, as do created and stopped. Hosts whose platform reports only visibility and focus use this instead of dispatching each transition themselves. - application_
directories - Returns typed directories for the registered application.
- application_
id - The registered application id, if a host has published one.
- background_
app - Requests that the host move the app to the background.
- clear_
application_ id - Removes the registered application id (tests and teardown).
- clear_
host_ controller - Removes the installed host controller.
- current_
lifecycle_ state - Returns the latest lifecycle state published by the platform host.
- dispatch_
lifecycle - Publishes a lifecycle transition from the platform host.
- dispatch_
lifecycle_ state - Publishes a platform lifecycle state and derives the transition source from the framework’s previous state.
- durable_
save_ deadline - How long the installed host will wait for durable saves.
- exit_
app - Requests that the host finish the app.
- host_
controller - Returns the installed framework host controller.
- local_
lifecycle_ state - The
CompositionLocalcarrying the host’s current lifecycle state. - observe_
lifecycle - Observes host lifecycle transitions until the returned handle is dropped.
- register_
durable_ save - Registers fallible work for the next save boundary. Callbacks run serially; timed-out runs are allowed to finish before another run can start.
- register_
preference_ save - Registers a value to be sampled when saving starts and batched with other keys using the same store. The callback must not perform storage I/O.
- remember
Lifecycle Events - Host lifecycle transitions as a composition-scoped stream.
- remember
Lifecycle State - The host’s lifecycle state as observable state.
- run_
durable_ saves - Captures composition-local values on the calling thread and saves registered values in one serial batch. Call this on each composition’s owning thread.
- set_
application_ id - Registers the id every framework-owned storage path is scoped by.
- set_
host_ controller - Installs the framework host controller.
- set_
keep_ screen_ on - Enables or disables the host’s keep-screen-on flag.
- window_
lifecycle_ state - The lifecycle state of a window or browser page that is
visibleand has keyboardfocused, mapped the way Compose Multiplatform maps desktop windows: resumed while focused, paused while only visible, and stopped while minimized, hidden or in a background tab.