Expand description
§Cranpose
Build desktop, mobile and web apps with Rust functions. Cranpose follows the Jetpack Compose model: a function describes the screen, state changes update the screen, and modifiers control layout, input and appearance.
The same UI code runs on Linux, macOS, Windows, Android, Wear OS, iOS, Apple Watch and the web. The experimental watchOS host draws through SpriteKit. Cranpose also places Rust screens inside Android Compose and UIKit apps.
§Run a counter
Create a desktop app:
cargo new counter
cd counter
cargo add cranpose --features desktop,renderer-wgpuReplace src/main.rs with this example, then run cargo run:
use cranpose::*;
#[composable]
fn Counter() {
let count = rememberMutableStateOf(|| 0);
Column(
Modifier::empty().padding(24.0),
ColumnSpec::default().vertical_arrangement(LinearArrangement::spaced_by(12.0)),
move || {
Text(
format!("Count: {}", count.get()),
Modifier::empty(),
TextStyle::default(),
);
Button(
Modifier::empty().height(48.0),
ButtonSpec::default(),
move || count.update(|value| *value += 1),
|| {
Text("Increment", Modifier::empty(), TextStyle::default());
},
);
},
);
}
fn main() -> Result<(), cranpose::LaunchError> {
AppLauncher::new()
.with_title("Counter")
.with_size(360, 240)
.try_run(Counter)
}rememberMutableStateOf retains the count across recomposition. The button
callback changes the count. A read through count.get() subscribes the text to
state updates. State handles are Copy, so the callbacks share one state value.
try_run starts the desktop event loop and returns a launch error on failure.
§Choose a project structure
For translatable text, enable localization and wrap source strings with
tr!("Save"). A scoped ProvideLocalization updates text when the app’s language
changes. See the localization guide
for catalogs, plural forms, extraction, and framework overrides.
For a complete app, start from the project template. The template includes screens, view models, navigation and platform hosts. The IDE plugin creates the same project through File → New Project → Cranpose.
Use cranpose::prelude::* for common app imports and cranpose::liquid::prelude::*
for Liquid controls. The app guide
connects UI state, flows, view models, device services and platform builds.
§Select a platform
Select a host and renderer in Cargo features. Desktop uses Vulkan, Metal or DirectX through WGPU. Android and web also support GL/GLES.
| Target | Features | Host setup |
|---|---|---|
| Linux, macOS, Windows | desktop, renderer-wgpu | AppLauncher::try_run |
| Linux with one display backend | desktop-x11 or desktop-wayland, plus renderer-wgpu | Select the session backend |
| Android and Wear OS | android, renderer-wgpu | android_main! and the Android Gradle plugin |
| iOS | ios, renderer-wgpu | Xcode host and iOS entry point |
| Web | web, renderer-wgpu | Wasm entry point and browser canvas |
| watchOS, experimental | watchos | SwiftUI host and SpriteKit renderer |
The platform guide links the target-specific setup. The Android plugin guide describes Cargo packages, services, permissions and ABI selection.
The default feature embeds a font. default-features = false lets an app select
its own font data. renderer-pixels selects software output for custom hosts.
renderer-wgpu-gles adds the GL/GLES backend to WGPU.
§Add app features
| Task | Start here |
|---|---|
| Arrange controls and text | UI widgets |
| Retain screen state | State guide |
| Build a long list or custom layout | Layout guide |
| Add glass controls and themes | Liquid UI |
| Animate a value | Animation |
| Collect flows and retain view models | Coroflow integration |
| Navigate between screens | Navigation |
| Use files, clipboard, network or purchases | Device services |
| Declare permissions and hardware | Capabilities |
| Embed a Rust screen in a native app | Native integration |
Optional features select extra backends: audio, audio-desktop, media,
camera-desktop, storekit, playbilling and webview. robot adds app test
support. The
feature list records each
dependency choice.
Cranpose is pre-alpha. Public APIs can change between releases. Review the release notes when an app updates its dependency.
Re-exports§
pub use cranpose_capabilities as capabilities;pub use cranpose_liquid as liquid;
Modules§
- _docs
- App setup, state, layout and platform guides. App setup, state, layout and platform guides.
- accessibility_
options - The display options a person set in the system’s accessibility settings: larger text, less motion, less transparency, more contrast, bold text, inverted colors. The framework applies them on its own; an app reads them for what it draws itself.
- accessibility_
state - What the platform says about the assistive technology in use, for an app that speaks guidance, slows an automatic step down or drops a gesture-only path while a screen reader is on.
- announce
- app_
info - How the platform packaged this app: the version a user is shown, and the build version a store orders releases by.
- app_
update - Typed application update discovery, verification, and platform installation.
- async_
io - Waking a future from another thread.
- audio
- Sound effects and music — the audio analogue of
haptics. - background
- Background execution: ask the OS to keep running after the app leaves the screen, so work in flight (a download, a save, playback) can finish instead of being suspended at once.
- bring_
into_ view - Bring-a-focused-field’s-caret-into-view above the soft keyboard.
- bundled_
assets - Read-only assets packaged with the application.
- camera
- The live camera: what it is doing, the frames it is producing, and the stills it takes.
- clipboard_
session - Platform clipboard session: an OS clipboard read/write bridge for in-tree UI.
- content
- Streaming content: the single shape every byte source hands the application.
- density
- Integral layout, the way Compose does it.
- desktop
- Desktop runtime for Compose applications.
- device_
info - What the device has, and what this process is using of it.
- draggable
- General drag state, for controls that are dragged but do not scroll.
- embedded_
view - An in-process Cranpose component driven by its native host.
- file_
picker - Native, cross-platform file, folder and document choosers.
- fling_
animation - Fling animation driver for scroll containers.
- focus_
manager - focus_
order - font_
scale - The system font-size setting, as the curve it is and not the multiplier it looks like.
- github_
release_ updater - A portable
AppUpdaterthat discovers a newer release from a GitHub repository’s release feed. - haptics
- Haptic feedback — the framework analogue of Jetpack’s
LocalHapticFeedback. - heart_
rate - The wearer’s heart rate, from the device’s own sensor.
- host
- Framework-owned application-host state and controls.
- host_
messages - Messages between the application and the program embedding it.
- host_
surface - The surface the host gives the application, and what the application may ask of it.
- http
- image_
picker - Photo/image picker: choose a single image from the user’s photo library.
- incoming_
share - Content another application shares into this one.
- launch_
args - Launch arguments — the typed parameters the app was started with.
- launcher
- Composition-owned launchers for the system choosers.
- layout
- layout_
direction - Which way the interface reads.
- lazy_
item - The identity of the lazy-list item currently being composed.
- media
- Media playback: one item at a time, observable rather than polled.
- memory_
pressure - Memory pressure the platform reports for this process.
- microphone_
permission - Permission to record from the microphone.
- microphone_
standby - Keeps the microphone usable while the application is in the background.
- modal
- The stack of modal surfaces that are open right now.
- mouse_
input - App-scoped mouse movement through the host’s normal input dispatch.
- native_
view - Native views mounted in a Cranpose layout by an application-owned host.
- navigation
- System “back” navigation requests.
- network_
status - Network status (connectivity + whether the connection is metered). Apps use it to defer or confirm large transfers on cellular/metered links.
- nine_
patch - Filling a box with an image that is bigger, or smaller, than the box.
- notifier
- Local notifications: ask permission and post user-visible notifications.
- peer
- Local-network peer streaming for Cranpose apps.
- pointer_
icon_ session - The pointer icon the platform should be drawing right now.
- power
- Device power and thermal state: observable, capability-aware, and explicit about what this platform cannot answer.
- preferences
- Small durable key/value storage, and the composition state built on it.
- prelude
- Convenience imports for Cranpose applications.
- purchases
- In-app purchases: products, prices and owned entitlements.
- recorder
- Input event recorder for generating robot tests from manual interactions.
- round_
scaling_ list - Placing list rows the way a round watch scales them.
- round_
scroll_ indicator - The curved scroll indicator a round watch puts at 3 o’clock.
- safe_
area - Platform safe-area insets exposed to composition.
- scroll
- Scroll state and node implementation for cranpose.
- scrollbar
- Where a scrollbar’s thumb sits and how long it is.
- selection_
container - Selecting the read-only text inside a
SelectionContainer. - share_
sheet - System share sheet: hand a file (and optional text) to the OS share UI so the user can send it to another app.
- storage
- Free space on the device, so an application can tell the person before a large download or save that it will not fit.
- text
- text_
field_ focus - Focus manager for text fields.
- text_
input_ session - Platform text-input session: soft-keyboard visibility hooks.
- text_
layout_ result - Text layout result with cached glyph positions.
- text_
selection - Native-grade text selection primitives for
BasicTextField. - theme
- uri_
handler - wearable
- Messages and byte streams between an application and the same application on the paired phone or watch: a watch app streams its microphone to the phone, and the phone sends its results back.
- wearable_
framed - A
WearableLinkover a platform link that carries only whole messages, such as WatchConnectivity between an iPhone app and its watch app. - widgets
- UI Widget components
- writable_
folder - Cross-platform access to a user-chosen writable folder.
- zoom
- Pinch-to-zoom / pan state and the
Modifier::zoomablegesture modifier.
Macros§
- android_
main - Declares this crate’s Android entry point.
- app_
capabilities - Includes the app capability declaration from the build script.
- remember
Scroll State - Creates a remembered ScrollState.
Structs§
- Accessibility
Options - What the person set in the system’s accessibility settings.
- Accessibility
State - What the platform reports about the assistive technology in use.
- Alignment
- Alignment across both axes used for positioning content within a box.
- Alignment
Lines - Text baselines measured down from a layout’s top edge.
- Alpha
Element - Element that creates and updates alpha nodes.
- Alpha
Node - Node that applies alpha transparency to its content.
- Android
Overlay Window Options - Android floating overlay window configuration.
- Announcement
- Text a screen reader should read out, with no control to move to.
- Announcer
- Reads text out on a screen reader without moving focus, the way
View.announceForAccessibilitydoes under Compose on Android. - AppFonts
- The app supplied its own fonts. Text draws only in them, and the embedded face is left out of the binary.
- AppLauncher
- Platform-agnostic application launcher.
- AppSettings
- Configuration for application settings.
- AppUpdate
Capabilities - What an update backend can do on this platform.
- AppUpdate
Observer - Registration returned by
observe_app_update_status. - Audio
Clip - Decoded PCM held in memory, ready to play with no further work.
- Back
Request Observer - A back observer installed by
observe_back_requests. - Background
Element - Element that creates and updates background nodes.
- Background
Node - Node that draws a background behind its content.
- Background
Work - What the person is shown about work that runs off screen.
- Background
Work Lease - A claim that important work needs the host’s background execution allowance. The allowance remains active until every outstanding lease is dropped.
- Basic
Text Field Decoration Scope - Scope passed to a basic text field decoration box.
- Basic
Text Field Options - Options for customizing BasicTextField appearance and behavior.
- Battery
Status - Current battery level and charging state.
- Blocking
Executor - A bounded, lazily started executor for synchronous work.
- Blocking
Executor Config - Bounds for a native blocking executor. Running closures cannot be interrupted.
- Blocking
Task - Completion of an admitted job. Dropping it cancels work still waiting to run.
- Blurred
Edge Treatment - Controls blur behavior outside source bounds.
- BoxSpec
- Specification for Box layout behavior.
- BoxWith
Constraints Scope Impl - Concrete implementation of
BoxWithConstraintsScope. - Bring
Into View Responder - A scroll container’s ability to scroll a target window rect into view.
- Bundled
Asset Entry - One bundle-relative file in a declarative asset installation.
- Bundled
Asset Install Spec - A versioned set copied from the application bundle into writable storage.
- Button
Spec - Bytes
Body - A body already in memory, handed out in
CHUNK_LEN-sized pieces. - Bytes
Content - Content already held in memory: clipboard drops, web
Filepayloads, tests. - Bytes
Source - In-memory
ByteSourcebacked by a byte buffer. Handy for small payloads and tests. - Camera
Frame - One frame from the viewfinder.
- Camera
Lens - One capture device the application may pick.
- Camera
Lenses - The devices the application may pick between, and the one in use.
- Camera
Observer - Keeps a camera observer registered until it is dropped.
- Camera
Still - A full-resolution still photograph as an encoded image.
- Canvas
Semantics Node - A semantics node for content that is drawn rather than laid out.
- Chunk
Channel - The producing half of a chunked byte stream.
- Chunk
Next - The future
ChunkStream::nextreturns. - Chunk
Stream - The consuming half of a chunked byte stream.
- Clickable
Element - Element that creates and updates clickable nodes.
- Clickable
Node - Collection
Info - How far a container has scrolled along one axis and how far it can go.
- Color
- Column
Spec - Specification for Column layout behavior.
- Composition
- Constraints
- Constraints used during layout measurement.
- Content
Channel - The producing half of a
ContentStreamfed by a platform callback. - Content
Metadata - Everything a provider can state about a piece of content without reading it.
- Corner
Radii - Corner
Shape Element - Element that creates and updates corner shape nodes.
- Corner
Shape Node - Node that tracks the latest rounded corner shape.
- Coroutine
Scope - A cancellation scope for work launched outside the composition pass.
- Custom
Pointer Icon - An application-drawn pointer shape: a bitmap plus the hotspot, the pixel inside the image that sits exactly on the pointer’s position.
- Dash
Path Effect - Dashes along a stroke: on for the first interval, off for the second,
and so on, starting
phaseinto the pattern. Compose’sPathEffect.dashPathEffect(intervals, phase). Up toDashPathEffect::MAX_INTERVALSintervals; a pattern with an odd count or a non-positive sum draws the stroke whole, as Skia does. - Default
Font - The app has supplied no fonts, so text draws in the framework’s embedded
face (the
embedded-default-fontfeature, on by default). - Density
- The device pixel grid a layout measures against: how many device pixels a layout point is worth, and how the platform converts a text size.
- Density
Measure Scope - The production
cranpose_ui_layout::MeasureScope: a grid captured at composition time, carried through measurement. - DevOptions
- Development frame pacing and FPS statistics types. Development options for debugging and performance monitoring.
- Digest
Verifier - Checks a package as it is read, so a package too large to hold in memory is still checked.
- Disposable
Effect Result - Disposable
Effect Scope - Dp
- Density-independent pixels: a layout length that reads the same on every device regardless of its pixel density.
- DpOffset
- Density-independent offset for shadows.
- Drag
AndDrop Point - Where a transfer is: on the screen when the platform knows window positions, and in the source’s surface always.
- Drag
AndDrop Source - A payload a node offers to be dragged out of it, and what the node wants to hear about the transfer.
- Drag
AndDrop Source Element - Element that creates and updates
DragAndDropSourceNodes. - Drag
AndDrop Source Node - Node that starts a transfer when a press on it becomes a drag.
- Drag
AndDrop State - The one transfer in flight in an app context, the targets attached in it, and the steps the source recorded since the shell last routed.
- Drag
AndDrop Target - What a node does with a transfer that reaches it. Positions are in the surface that draws the target.
- Drag
AndDrop Target Element - Element that creates and updates
DragAndDropTargetNodes. - Drag
AndDrop Target Node - Node that registers its layout node as a drop target while attached. It is a pointer target so the shell’s hit test finds it under a transfer; it handles no pointer events itself.
- Draggable
State - Drag position and progress for one control.
- Draw
Cache Builder - Durable
Save Registration - Keeps a shared durable save registered until its owner is dropped.
- Edge
Insets - Padding values for each edge of a rectangle.
- Enter
Transition - Defines how an
AnimatedVisibilitycontent appears. - Equalizer
Band - One frequency band of a backend’s equalizer.
- Equalizer
Settings - What an equalizer is set to.
- Event
Stream - The consuming half of an
EventChannel. - Exit
Transition - Defines how an
AnimatedVisibilitycontent disappears. - Fetch
Result - Result of a
fetch_rangecall. - File
Content - A file on the local filesystem.
- File
Filter - A named filter limiting the file types a chooser offers.
- File
Folder - A directory on the local filesystem.
- File
Picker Options - Options controlling a chooser request.
- File
Preferences - File-backed preferences with coordinated, atomic writes within this process.
- File
Sink - A file being written through a temporary sibling, renamed on
ContentSink::finishso a partial write never replaces a good file. - Fill
Element - Element that creates and updates fill nodes.
- Fill
Node - Node that fills the maximum available space in one or both dimensions.
- Focus
Entry - One focus target, with the bounds layout gave it.
- Focus
Manager - Moves focus between the focus targets the tree holds, the way
LocalFocusManagerdoes in Jetpack Compose. - Focus
Requester - A handle an app holds to move focus onto a node imperatively.
- Folder
Entry - Display metadata for one file in a writable folder.
- Font
Scale Curve - The sp → dp conversion the platform performs, sampled from the platform.
- FpsStats
- Development frame pacing and FPS statistics types. Frame statistics snapshot.
- Fractional
Offset Element - Element that creates and updates fractional offset nodes.
- Fractional
Offset Node - Node that offsets its content by a fraction of its own measured size.
- Framed
Wearable Link - Application messages and byte streams over a
WearableTransport. - Geometry
Scene Nodes - The nodes whose geometry a layout pass changed, by what the scene redoes for them.
- GitHub
AppUpdater - Discovers releases through a repository’s public GitHub release feed.
- GitHub
Release Update - A GitHub release feed used to discover an application package.
- Glass
Material - Visual parameters for
Modifier::glass_material. - Graphics
Layer - Haptic
Pattern - A vibration waveform: alternating durations with a target amplitude each.
- Headless
Renderer - A lightweight renderer that walks the layout tree and materialises paint commands.
- Heart
Rate - The latest the sensor said.
- Heart
Rate Reader - A registration that keeps an observer, and when it reads, the sensor.
- Host
Message - One message on the line between the application and its host.
- Host
Message Observer - Keeps a host message observer registered until it is dropped.
- Host
Surface Observer - Keeps a host-surface observer registered until it is dropped.
- Host
Surface Size - The size of the host surface, in logical pixels, with the scale the host renders it at.
- Hover
Interaction Enter - A pointer came to rest over a node.
- Hover
Interaction Exit - The pointer that
Self::enterreported left. - Http
Control - Cancellation and progress shared with an in-flight request.
- Http
Progress - How much of a transfer has arrived.
- Http
Request - One request.
- Http
Response - What a server answered, with its body still to be read.
- Image
Bitmap - Immutable image data used by UI primitives and render backends.
- ImeEditor
State - Snapshot of the focused text field’s editable state for platform IMEs.
- Incoming
Content - One item shared into the application.
- Incoming
Content Observer - Keeps an observer registered until it is dropped.
- Inspector
Control - A visible inspector control and its logical hit bounds.
- Inspector
Node - A sanitized platform-projection element for developer inspection.
- Inspector
State - A read-only snapshot of developer UI, separate from application semantics.
- KeyEvent
- A keyboard input event.
- KeyEvent
Route - The focused component’s keyboard route within a receiving surface or modal.
- Keyboard
Focus Target - A keyboard navigation destination and whether moving there selects it.
- Launch
Args - The launch arguments the app was started with.
- Launched
Effect Scope - Layout
Allocation Debug Stats - Layout
Box - Layout information for a single node.
- Layout
Measurements - Result of running the measure pass for a Compose layout tree.
- Layout
Node - A node of the layout tree.
- Layout
Node Data - Snapshot of the data required to render a layout node.
- Layout
Tree - Result of running layout for a Compose tree.
- Lazy
Column Spec - Specification for LazyColumn layout behavior.
- Lazy
Items - A run of lazy items: how many, and optionally how they are identified and reused.
- Lazy
List Item Info - Information about a single visible item in a lazy list.
- Lazy
List Layout Info - Information about the currently visible items in a lazy list.
- Lazy
List State - State object for lazy list scroll position tracking.
- Lazy
RowSpec - Specification for LazyRow layout behavior.
- Lifecycle
Event - A lifecycle transition delivered by the platform host.
- Lifecycle
Observer - RAII lifecycle observer registration.
- Local
Window State - The window a composable is drawn in.
- Measure
Layout Options - Measure
Result - Result of a measurement operation.
- Measurement
- The size and explicit alignment lines produced by a measure policy.
- Media
Artwork - Artwork for the platform media session.
- Media
Capabilities - What a platform media stack can actually do.
- Media
Item - One playable item.
- Media
Metadata - What the platform media session shows: the lock screen, the notification, the car head unit.
- Media
Observer - Keeps a media observer registered until it is dropped.
- Media
Samples - Samples as they are being heard, for a visualiser.
- Media
Source Handle - A media stream the platform opened, and what it knows about it.
- Memory
Preferences - An in-memory store. The web default until a platform backend registers, and what tests use.
- Memory
Pressure Observer - Keeps an observer registered until it is dropped.
- Microphone
Permission Observer - A registration that keeps an observer.
- Microphone
Standby Lease - A claim on the microphone standby; the standby stops when the last lease is dropped.
- Modal
Registration - Keeps a modal surface on the stack until it is dropped.
- Modifier
- A modifier chain that can be applied to composable elements.
- Modifier
Chain Trace Guard - RAII guard returned when installing a modifier chain trace subscriber.
- Modifier
Local Key - Type-safe key referencing a modifier local value.
- Modifier
Local Read Scope - Lightweight read scope surfaced to modifier local consumers.
- Modifier
Node Slices - Snapshot of modifier node slices that impact draw and pointer subsystems.
- Modifier
Node Slices Debug Stats - Modifiers
- Keyboard modifier keys held during an input sample.
- Movable
Content - Movable content held as a value. See
rememberMovableContentOf. - Mutable
Interaction Source - Mutable
State - Cheap copyable mutable view of a state cell.
- Network
Status - A snapshot of the current network state.
- Nine
Patch Insets - How far in from each edge of a source image the stretchable middle starts.
- Node
Capabilities - Capability flags indicating which specialized traits a modifier node implements.
- Node
State - Runtime state tracked for every
ModifierNode. - Noop
Audio Player - The player used when no backend is installed.
- Notify
Request - A local notification to post.
- Offset
Element - Element that creates and updates offset nodes.
- Offset
Node - Node that offsets its content by a fixed (x, y) amount.
- Open
File Launcher - Presents the single-file chooser and hands the picked content back.
- Open
Files Launcher - Presents the multi-file chooser and hands every picked item back.
- Open
Folder Launcher - Presents the folder chooser and hands the granted folder back.
- Package
Digest - The digest a downloaded package must match.
- Padding
Element - Element that creates and updates padding nodes.
- Padding
Node - Node that adds padding around its content.
- Painter
- Paragraph
Style - Patch
Quad - One image draw: the part of the source to read and the part of the destination to fill.
- Path
- A path built from lines and curves: Compose’s
Path. - Peer
Server - A running peer server. Dropping it stops accepting new connections.
- Placeable
- Result of running a measurement pass for a single child.
- Placement
- Placement information for a measured child.
- Platform
Directories - Platform directory roots for application-owned files.
- Platform
Paragraph Style - Platform
Span Style - Platform
Text Style - Playback
Params - How one voice should sound.
- Playback
Progress - Where the open item is.
- Point
- Pointer
Event - Pointer event with consumption tracking for gesture disambiguation.
- Pointer
Input Scope - Power
Capabilities - What a power backend can answer on this platform.
- Power
Observer Registration - Keeps a power observer registered until it is dropped.
- Power
State - Everything the platform currently says about power.
- Prepared
Text Layout - Press
Interaction Cancel - Press
Interaction Press - Press
Interaction Release - Product
- A product as the store describes it, in the user’s locale and currency.
- Progress
BarRange Info - The value a control holds inside a range, for a slider, a dial or a progress bar.
- Ready
Folder - A folder whose children are already known.
- Recorded
Render Scene - A collection of render operations for a composed scene.
- Rect
- Resolved
Background - Resolved
Modifiers - Rotary
Input Modifier Node - Modifier node that forwards rotary scroll events to an app handler.
- Rotary
Scroll Event - A rotary scroll event produced by a Wear OS crown or rotating bezel.
- Rounded
Corner Shape - RowSpec
- Specification for Row layout behavior.
- Runtime
Shader - A custom WGSL shader effect, analogous to Android’s
RuntimeShader. - Save
Document Launcher - Presents the save-document chooser and hands the opened sink back.
- Save
Document Request - A request for a user-named destination to stream a document into.
- Saver
- Converts a value to and from the string form preferences store.
- Scroll
Axis Range - This is Compose’s
ScrollAxisRange(verticalScrollAxisRange,horizontalScrollAxisRange). A lazy list has no whole extent to give, so it reports the first visible item as the value and one more than that as the end while it can still scroll; a reader only needs to know whether it can page on. - Scroll
Element - Element for creating a ScrollNode.
- Scroll
Metrics - A scroll position and the extents it is measured against, read together.
- Scroll
Node - ScrollNode layout modifier that physically moves content based on scroll position. This is the component that actually reads ScrollState and applies the visual offset.
- Scroll
State - State object for scroll position tracking.
- Scrollable
State - Scroll input for content that supplies its own placement, such as a wheel.
- Semantics
Callback - Discrete event callback reference produced during semantics extraction.
- Semantics
Configuration - Semantics configuration for accessibility.
- Semantics
Custom Action - A named accessibility operation, e.g. Compose’s
customActions = listOf(CustomAccessibilityAction("Pause") { … }). - Semantics
Details - What a semantics node reports beyond its place, its name, its value and its click: the properties few nodes set. A node holds them only when it sets one, so a node without any stays small.
- Semantics
Dismiss - What a control does when a screen reader asks to send it away: a row a
sighted person swipes off, a sheet a sighted person taps outside of.
Compose’s
dismissaction. - Semantics
Expand - What a control does when a screen reader asks it to open or to close.
Compose’s
expandandcollapseactions. - Semantics
Long Click - What a control does when a screen reader asks for its long press. This is
Compose’s
SemanticsActions.OnLongClick; the answer says whether the control took the ask. - Semantics
Magic Tap - What a control does when a VoiceOver user makes the magic tap, the two
finger double tap that starts or stops the main action of a screen. On
the other platforms the action is listed by its label among the control’s
actions. SwiftUI’s
accessibilityAction(.magicTap); the answer says whether the control took the tap. - Semantics
Node - A single node within the semantics tree.
- Semantics
Placement - Where layout put a semantics node: its offset inside its parent’s content and where its own content starts inside it.
- Semantics
Requester - A handle an app holds to say that what its semantics recorder would report has changed.
- Semantics
Scroll By - What a container does when a screen reader pages it, e.g. TalkBack’s scroll forward action or an accesskit scroll down. The two deltas are in layout pixels; the answer says whether anything moved.
- Semantics
Scroll ToIndex - What a list does when a screen reader asks for the row at an index, e.g. a TalkBack scroll-to-position action.
- Semantics
SetProgress - What a control does when a screen reader moves its value, e.g. a VoiceOver swipe up or a TalkBack set-progress action.
- Semantics
SetSelection - What a text field does when a screen reader moves its caret or picks a
stretch of its text: the two ends of the new selection, as byte offsets
into the field’s text, the anchor first and the end that moves second. Equal
ends are a caret. This is Compose’s
SemanticsActions.SetSelection; the answer says whether the field took the selection. - Semantics
SetText - What a text field does when a screen reader or a voice tool hands it new
text. This is Compose’s
SemanticsActions.SetText; the answer says whether the field took the text. - Semantics
Text - A text node’s text in the semantics tree, shared with the node’s modifier slices rather than copied out of them.
- Semantics
Tree - Rooted semantics tree extracted after layout.
- Shadow
- Static shadow configuration.
- Shadow
Scope - Pixel-space shadow scope used by block-based APIs.
- Share
Content - A single file to share, with an optional accompanying message/subject.
- Shared
Text - Immutable text shared by widgets, localized results, and retained control labels.
- Signal
- A one-value hand-off between a worker and a future.
- Signal
Wait - The future
Signal::waitreturns. - Size
- Size
Element - Element that creates and updates size nodes.
- Size
Node - Node that enforces size constraints on its content.
- Slice
Text Ref - The text, or a part of it, that a node’s slices lend: a
Text’s is borrowed from its layout, which an update changes in place; a text field’s is held by the slices. - Slider
Scope - Values available to custom slider track and thumb content.
- Slider
Spec - Input and geometry policy for a
Slider. - Snapshot
State - Cheap copyable mutable view of a state cell.
- Snapshot
State List - Snapshot
State Map - Software
Text Font Registry - Parsed app-supplied faces, on their way to a
SoftwareTextFontSet. - Sound
Bank - A set of cues loaded once and kept alive for as long as the composable that remembered it stays in the composition.
- Sound
Bank Entry - A loaded cue inside a
SoundBank. - Sound
Bank Failure - A cue that did not load, reported instead of silently vanishing.
- SoundId
- Identifies a decoded clip held by the audio engine.
- Sound
Spec - One entry in a
SoundBank: where the bytes come from and how the cue should sit in the mix before per-call parameters are applied. - Span
Style - State
- Cheap copyable read-only view of a state cell.
- Store
Observer - A store observer installed by
observe_store_news. - Store
State - Snapshot of everything known about the store right now.
- Streaming
Asset Reader - A
BundledAssetReaderover any byte stream. - String
Annotation - Mirrors Jetpack Compose’s
AnnotatedString.Range<String>— a tag+value annotation covering a byte range. - Stroke
- Describes how an outline is stroked.
- Stub
Http Client - An HTTP client that answers from a function rather than a network.
- Subcompose
Layout Node - Node responsible for orchestrating measure-time subcomposition.
- Subcompose
Measure Scope Impl - Concrete implementation of
SubcomposeMeasureScope. - SvgPainter
- Parsed SVG image data that rasterizes on demand for the requested draw size.
- Swipe
Dismiss State - A row’s swipe, as the application can see it.
- Swipe
ToDismiss Spec - Configuration for
SwipeToDismiss. - Task
Handle - Test
Applier Guard - Test
Composition - In-memory composition helper used by tests.
- Text
Field Buffer - A mutable text buffer that can be edited.
- Text
Field Element - Element that creates and updates
TextFieldModifierNodeinstances. - Text
Field Modifier Node - Text
Field State - Observable state holder for text field content.
- Text
Field Value - Immutable snapshot of text field content.
- Text
Layout Options - Text layout behavior options matching Compose
BasicTextcontrols. - Text
Layout Result - Text
Line Prefix Widths - Text
Metrics - Text
Modifier Element - Element that creates and updates TextModifierNode instances.
- Text
Modifier Node - Node that stores text content and handles measurement, drawing, and semantics.
- Text
Options - High-level text widget options for constrained UI text.
- Text
Range - Represents a range in text, used for cursor position and selection.
- Text
Style - Thumb
Bounds - How short and how long a thumb may get, as fractions of the track.
- Thumb
Geometry - Thumb length and position, both as fractions of the track.
- Transform
Origin - Update
Package - A package an update would install.
- Upright
Rgba - A frame’s pixels as tightly packed RGBA8, already the right way up.
- VoiceId
- Identifies one playing voice, so a looping cue can be stopped or retuned while it runs.
- Wearable
Peer - A connected phone or watch.
- Wearable
Stream - A byte stream the paired device opened to this application.
- Window
Config - Declarative configuration for an operating-system window.
- Window
Coordinates - A measured node’s local size and mapping into its window’s logical pixels.
- Window
Insets - Insets needed to keep content clear of system UI and the on-screen keyboard.
- Window
Root Element - Element that creates and updates window root nodes.
- Window
Root Entry - A window root the registry knows about.
- Window
Root Node - Node that lays its content out into the window’s size. That size is the node’s own, for the window’s scene; the layout pass reports a zero size to the node’s parent.
- Window
Root Registry - The window roots attached in an app context, in attach order, with a revision that changes whenever the set changes.
- Window
Root Routing Scratch - Reusable ancestry storage for
nearest_window_roots_into. - Window
State - Mutable position and size state for a declarative OS window, and whether the window has a frame on the screen.
- Writable
Folder Launcher - Presents the persistent writable-folder chooser and hands the durable handle
back. Store the handle and reopen it with
crate::writable_folder::open_writable_folder. - Zoom
State - Shared zoom/pan transform state for
Modifier::zoomable.
Enums§
- Android
GpuBackend - Graphics API used by the Android WGPU renderer.
- AppUpdate
Error - Failure to start an update operation.
- AppUpdate
Status - Observable state of the application update flow.
- Audio
Bus - The two mix buses every app gets, so “sound on” and “music on” are one call each rather than bookkeeping over individual voices.
- Audio
Error - Why an audio call could not be honoured.
- Audio
Focus - What the rest of the device is doing with the output.
- Blend
Mode - Blend mode used for draw primitives.
- Blocking
Error - Failure to admit or complete blocking work.
- Brush
- Bundled
Asset Error - Error reading an asset from the application bundle.
- Bundled
Asset Install Outcome - Result of installing a bundled asset set.
- Camera
Error - Camera
State - What the camera session is doing.
- Color
Filter - Simple image color filter model.
- Compositing
Strategy - Content
Entry - One child of a
ContentFolder. - Content
Error - Errors produced while reading or writing content.
- Content
Scale - Cursor
Icon - Describes the appearance of the (usually mouse) cursor icon.
- Custom
Cursor Size - How big an app’s own cursor images appear when the person has enlarged the system pointer.
- Digest
Algorithm - How a package’s bytes are checked against what the release promised.
- Drag
AndDrop Event - One step of a transfer the source recorded for the shell to route.
- Drag
AndDrop Outcome - How a transfer ended, as the source hears it.
- Draw
Command - Draw
Style - How
crate::DrawScope::draw_pathpaints a path: Compose’sFillandStrokedraw styles, the stroke dashed when it carries a path effect. - Durable
Save Error - An error reported by a durable-save callback.
- Durable
Save Outcome - Result of a lifecycle or explicit save boundary.
- File
Picker Error - Errors produced while presenting a chooser.
- Fill
Direction - Direction for fill modifiers (horizontal, vertical, or both).
- Flash
Mode - What the light does when a still is captured.
- Focus
Direction - Focus direction for navigation.
- Focus
Request Error - Why
FocusRequester::request_focuscould not move focus. - Folder
Error - Errors produced by writable-folder I/O.
- Font
Bytes - Shared font data accepted by
AppLauncher::with_font_face_bytes. The bytes a face is parsed from. - Font
Load Error - Why an app-supplied face could not be registered.
- Frame
Format - How a frame’s pixels are laid out.
- Frame
Pacing Mode - Development frame pacing and FPS statistics types.
- Haptic
Effect - A system-defined vibration primitive.
- Haptic
Error - Why a haptic pattern could not be built.
- Haptic
Feedback - A haptic feedback event.
- Heart
Rate Error - Why the sensor could not start.
- Heart
Rate Permission - Whether the application may read the sensor.
- Heart
Rate Status - What the heart-rate sensor is doing.
- Horizontal
Alignment - Alignment along the horizontal axis.
- Hover
Interaction - The pointer resting over a node: Compose’s
HoverInteraction. - Http
Error - Http
Method - The verbs a request can use.
- Image
Picker Error - Image
Pixel Format - Storage format of an immutable bitmap.
- Image
Sampling - Texture sampling mode for image primitives.
- Image
Source - Where an image comes from.
- Incoming
Source - Where the bytes of an incoming item live.
- Inspector
Action - An inspector control, independent of the application’s actions.
- Inspector
Mode - The application’s visual presentation while inspecting accessibility.
- Interaction
- Intrinsic
Size - Specifies how to size a component based on its intrinsic measurements.
- KeyCode
- Physical key codes for keyboard input.
- KeyEvent
Type - Type of keyboard event.
- Launch
ArgValue - One launch-argument value, in the type the platform delivered it.
- Launch
Error - Errors that can occur while launching a windowed (desktop or iOS) application.
- Layer
Shape - Layout
Direction - Which side of the interface is the start.
- Layout
Node Kind - Classification of the node captured inside a
LayoutBox. - Lens
Facing - Which way a capture device points.
- Lifecycle
State - Android-style lifecycle state exposed to composition observers.
- Linear
Arrangement - Arrangement strategy matching Jetpack Compose’s linear arrangements.
- Link
Annotation - Mirrors Jetpack Compose’s
LinkAnnotationsealed class. - Live
Region Mode - How urgently a screen reader reads a node whose text changed on its own.
- Media
Command - A button pressed somewhere the application does not draw: a lock screen, a notification, a headset, a car.
- Media
Error - Memory
Pressure - How hard the platform asks for memory back.
- Microphone
Permission - Whether the application may record.
- Paint
Layer - Layer that a paint operation targets within the rendering pipeline.
- Patch
Fill - How a region larger than its source is filled.
- Peer
Error - Errors from peer serving or fetching.
- Platform
Directory Error - Playback
State - What the player is doing.
- Pointer
Event Kind - Pointer
Icon - The pointer’s appearance over a region of the UI.
- Pointer
Icon Error - Errors returned while constructing a
CustomPointerIcon. - Pointer
Source - The kind of physical device that produced a pointer event.
- Power
Reading - One power reading, or the reason there is no value.
- Preferences
Error - Errors produced by a preferences backend.
- Press
Interaction - Purchase
Event - A one-shot thing that happened, which a snapshot cannot express.
- Render
Effect - A render effect applied to a graphics layer’s rendered content.
- Render
Op - A rendered operation emitted by the headless renderer.
- Resize
Refused - Why a resize request was refused.
- Semantics
Action - Semantics action exposed to the input system.
- Semantics
Role - Semantic role describing how a node should participate in accessibility and hit testing. Roles are now derived from SemanticsConfiguration rather than widget types.
- Semantics
Widget Role - What kind of control a node is, as screen readers announce it.
- Share
Error - Slider
Orientation - Main axis used by a
Slider. - Store
Phase - How far along the store connection is.
- Stroke
Cap - Shape of the two ends of an open stroked path (an arc, today).
- Stroke
Join - Shape produced where two stroked segments meet at a corner.
- SvgPainter
Error - Errors returned while parsing or rasterizing an SVG painter.
- Swipe
Dismiss Direction - Directions accepted by a swipe-dismiss container.
- Swipe
Dismiss Side - Which edge the dismiss background is revealed on, i.e. the side the row is
being swiped away from. Passed to the
SwipeToDismissSpec::with_backgroundclosure so its label/icon can follow the swipe direction instead of being pinned to one side. - System
Theme - Text
Draw Style - Text
Field Line Limits - Line limit configuration for text fields.
- Text
Overflow - How overflowing text should be handled.
- Text
Shaping - Thermal
State - The operating system’s thermal-pressure level.
- UiString
- Framework-owned strings. Applications override them in the
cranpose-uinamespace. - UriHandler
Error - Vertical
Alignment - Alignment along the vertical axis.
- Wearable
Error - Why a call to the paired device did not happen.
- Wearable
Event - Something the paired device sent.
- WebView
Event - An event from an embedded browser.
- Window
Focus - Whether a window takes keyboard focus when it is created.
- Window
Resize Direction - Edge or corner used by
WindowModifierExt::window_resize_area.
Constants§
- ANDROID_
SYSTEM_ FONT_ DIR - Directory Android keeps its system font files in.
- DEFAULT_
ALPHA - DEFAULT_
CHUNK_ LEN - Chunk size the framework’s own readers hand back per
ContentReader::read_chunk. - DEFAULT_
DURABLE_ SAVE_ DEADLINE - The budget used when a host does not state one of its own.
- DEFAULT_
SYSTEM_ FAMILY_ WEIGHTS - The weights
SoftwareTextFontRegistry::register_system_familyregisters when an app does not name its own: Compose’s Regular/Medium/Bold set. - DUCKED_
GAIN - The gain applied while another app is being heard over this one.
- IMAGE_
EXTENSIONS - Image extensions offered when the picker falls back to the file picker.
- MAX_
FONT_ SCALE - Largest system font scale honoured. Android’s own accessibility slider tops out at 2.0.
- MAX_
FONT_ SCALE_ KNOTS - How many knots a curve keeps.
- MAX_
PENDING_ CHUNKS - How many chunks may wait ahead of the consumer before the producer stops reading. Enough to keep a socket busy across one scheduling gap, and far short of holding a download in memory.
- MIN_
FONT_ SCALE - Smallest system font scale honoured; below this, text stops being readable as text.
- OCTAVE_
BAND_ CENTERS_ HZ - The octave centres a graphic equalizer is built on, in hertz.
Traits§
- AppInfo
- Reports the packaged identity of the running app.
- AppUpdater
- Platform implementation for update discovery and package installation.
- Arrangement
- Trait implemented by arrangement strategies that distribute children on an axis.
- Audio
Player - Plays sound. Installed by the platform backend; the default is a no-op.
- Background
Activity - Keeps the app running while work is active, and shows that work.
Implementations are
Send + Sync(leases change from worker threads). - BoxScope
- Child alignment modifiers for a Box.
- BoxWith
Constraints Scope - Scope exposed to
BoxWithConstraintscontent. - Bundled
Asset Reader - Chunked reader over one bundled asset.
- Bundled
Assets - Access to files packaged in the app bundle.
- Byte
Source - Random-access source of bytes the app is willing to serve.
- Camera
- A platform capture session.
- Cancel
Transfer - A transfer that stops at once when its
HttpControlis cancelled, registered withHttpControl::on_cancelby the backend running it. - Content
- One readable piece of content from any source.
- Content
Folder - A folder granted by a provider.
- Content
Reader - A pull reader over one piece of content.
- Content
Resolver - Turns a provider URI into readable content.
- Content
Sink - A writable destination for streamed content.
- Content
Stream - An asynchronous stream of content.
- Delegatable
Node - Provides traversal helpers that mirror Jetpack Compose’s
DelegatableNodecontract. - Device
Info - Provides device and process information.
- Draw
Scope - File
Picker - Presents the system’s file, folder and document choosers.
- Folder
Reader - Chunked reader over one file in a writable folder.
- Folder
Writer - Chunked writer over one file in a writable folder.
- Haptics
- Performs haptic feedback. Installed by the platform backend; the default is a no-op.
- Heart
Rate Monitor - A platform’s heart-rate sensor.
- Host
Controller - Host operations supplied by the framework platform backend.
- Host
Surface - What an application may ask of the host’s surface.
- Http
Body - A response body, read a chunk at a time.
- Http
Client - A platform’s HTTP.
- Image
Picker - Picks or captures a single image and returns its encoded bytes.
- Launcher
Fonts - Where an
AppLauncher’s text faces come from. - Layout
Engine - Extension trait that equips
MemoryApplierwith layout computation. - Lazy
List Scope - Receiver scope for lazy list content definition.
- Measurable
- Object capable of measuring a layout child and exposing intrinsic sizes.
- Media
Player - A platform media stack.
- Media
Source Opener - Opens a media URI the decoder cannot open for itself.
- Microphone
Access - A platform’s microphone permission, installed by the platform backend.
- Microphone
Standby - The platform’s standby, installed by the platform backend.
- Modifier
Node - Core trait implemented by modifier nodes.
- Modifier
Node Element - Strongly typed modifier elements that can create and update nodes while exposing equality/hash/inspector contracts that mirror Jetpack Compose.
- Network
Monitor - Reports the current network status.
- Notifier
- Posts local notifications. Installed by the platform backend; the default is a no-op.
- Platform
Downloader - A platform’s own transfer for
HttpClient::download_to, one that goes on while the application is suspended or closed. - Platform
Text Input Handler - Callbacks a platform installs to control its on-screen keyboard.
- Power
Monitor - Platform power policy.
- Preferences
Store - Durable key/value storage owned by the application.
- Purchases
- A store backend.
- Share
Sheet - The OS share sheet. Installed by the platform backend; the default is a
no-op that reports
ShareError::Unsupported. - Storage
Space - Reports the free space a platform measures its own way.
- Subcompose
Layout Scope - Base trait for measurement scopes.
- Subcompose
Measure Scope - Public trait exposed to measure policies for subcomposition.
- Text
Measurer - UriHandler
- Wearable
Link - The platform’s link to the paired device, installed by the platform
backend with
set_platform_wearable_link. - Wearable
Receiver - Receives what the paired device sends.
- Wearable
Transport - What the platform’s message link does for a
FramedWearableLink. - Window
Modifier Ext - Modifier helpers for composables rendered in OS windows.
- Window
Root Descriptor - What a window root needs from the platform’s description of its window: the logical size to lay the content out into, read on every measure so a resize needs no new modifier, and the description itself for the platform to take back.
- Writable
Folder Store - Synchronous, thread-safe access to a user-chosen writable folder.
Functions§
- Animated
Visibility - Animates the appearance and disappearance of its content when
visiblechanges. - Back
Handler - Handles platform back requests on the UI thread while
enabledis true. Nested handlers follow stack order: the innermost active handler receives the request and dropping it restores the handler beneath it. - Basic
Text - Basic
Text Field - Edits text through a retained
TextFieldState.modifiercontrols the field bounds and input, andstylecontrols the text. UseBasicTextFieldWithOptionsfor line limits, cursor color and edit callbacks. - Basic
Text Field Decorated - Creates an editable field and lets
decoration_boxplace composable labels, placeholders, icons, buttons, prefixes, or suffixes around it. - Basic
Text Field With Options - Creates an editable text field with custom options.
- Basic
Text With Options - Bitmap
Painter - Bitmap
Region Painter - Creates a painter that draws one region from a bitmap atlas.
- Box
- Places children over the same area.
content_alignmentselects each child’s position within the box; later children draw above earlier children. - BoxWith
Constraints - Bundled
Asset Install Effect - Installs a declared bundled-asset set on a worker and returns the outcome on the UI runtime. Work is cancelled with the owning composition.
- Button
- Calls
on_clickafter a click and places content inside a button container. The modifier controls size and appearance.speccan supply an interaction source. - Canvas
- Draws custom content through a
DrawScope. The modifier sets canvas bounds. The draw scope also measures and draws text with the app’s fonts. - Clickable
Text - Displays annotated text and calls
on_clickwith the byte offset under the pointer. UseLinkedTextfor URL and custom-action annotations. - Collect
Events - Collects
streamfor as long as this call stays in the composition, handing each event toon_event. - Column
- Places children from top to bottom.
specsets vertical space and horizontal alignment. UseRowfor a horizontal sequence. - Crossfade
- Crossfade allows switching between two layouts with a crossfade animation.
- Disposable
Effect - Runs
effectwhen this call site first enters composition, and again wheneverkeysno longer equals the value it ran with last time; the previous run’sDisposableEffectScope::on_disposecleanup, if any, runs first, and also when the call site leaves composition entirely. - Durable
Save Effect - Registers fallible durable work for this composition’s lifetime.
- ForEach
- Frame
Effect - Runs
on_frameon every animation frame whilerunningis true. - Image
- Displays a painter with an optional accessible description.
- Keep
Screen On - Keeps the platform display awake while this call remains in composition and
enabledis true. Multiple active callers are reference-counted. - Launched
Effect - Runs
effectwhen this call site first enters composition, and again wheneverkeysno longer equals the value it ran with last time. - Launched
Effect Async - Like
LaunchedEffect, butmk_futurebuilds the future to drive rather than receiving a scope to call back into synchronously. - Layout
- Lazy
Column - Composes and measures the rows needed for a vertical viewport. The content
closure declares rows through
LazyListScope. Use stable keys for item identity across changes and content types for distinct row shapes. The state retains the scroll position; the spec sets item space and content insets. - LazyRow
- Composes and measures the items needed for a horizontal viewport.
Use
LazyColumnfor vertical lists. - Lifecycle
Effect - Registers a lifecycle observer for the lifetime of the current composition.
- Linked
Text - Displays annotated text and dispatches each link action. A URL annotation
calls
open_url; a clickable annotation calls its own handler. A sharedRc<AnnotatedString>retains the prepared text across uses. - Provide
Accessibility Options - Gives the content below it fixed options, for a preview or a test that wants to see the app with larger text, no motion or more contrast.
- Provide
Accessibility State - Gives the content below it a fixed state, for a preview or a test that wants to see the app as a screen reader user does.
- Provide
Audio - Provides the installed audio player to
content. - Provide
File Picker - Provides the default
FilePickerto descendant composables. - Provide
Haptics - Provide
Image Picker - Provide
Launch Args - Provides launch arguments to
content. - Provide
Layout Direction - Runs
contentindirection. - Provide
Lazy Item Key - Composes
contentas the item identified bykey. - Provide
Lifecycle - Provides the host’s lifecycle state to descendant composables.
- Provide
Notifier - Provide
Share Sheet - Provide
System Theme - Provide
UriHandler - Row
- Places children from left to right, or right to left for an RTL layout.
specsets horizontal space and vertical alignment. - Slider
- A
0..=1slider whose visuals are ordinary composables supplied bycontent. The framework owns pointer capture, cancellation, rotary input, pressed interactions, value mapping, and completion delivery. - Spacer
- Reserves layout space with the supplied modifier.
- Subcompose
Layout - Swipe
ToDismiss - Wraps
contentso it can be swiped away horizontally. - Swipe
ToDismiss Box - Full-content navigation dismissal. The gesture starts at the leading edge, moves only toward the end edge, and leaves sizing to the navigation owner.
- Text
- Displays plain or annotated text with the supplied style. The modifier controls layout, appearance and input around the text.
- Text
With Options - Unhandled
KeyEvents - Hands
handlerevery key event no control took: none was focused, a focused control let the key pass, and no text field is taking typing. - WebView
- Embeds a website inside the component’s layout bounds.
- acquire_
background_ work - Acquires background execution for one independent operation, shown to the
person as
titlewhere the platform shows such work. - active_
focus_ target - Returns the currently active focus target, if any.
- 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. - announce
- Reads
textout politely. Short form ofAnnouncer::announcefor code that sits outside composition. - app_
info - The active app info: the platform implementation if installed, otherwise the built-in default.
- app_
update_ capabilities - What this host can do about application updates.
- app_
update_ checks_ supported - Returns whether this host can discover a newer release.
- app_
update_ status - Returns the latest update state.
- app_
updates_ supported - Returns whether this host can install application updates.
- application_
directories - Returns typed directories for the registered application.
- application_
id - The registered application id, if a host has published one.
- audio_
focus - What the rest of the device is doing with the output.
- available_
storage - The bytes the application can still write on the volume that holds
path, orNonewhere the platform cannot tell.pathneed not exist yet: the nearest folder above it that does is measured. - back_
interception_ enabled - Whether the app asked to intercept the platform back control. Read by the platform input path.
- background_
active - Whether at least one background-work lease is active.
- background_
activity - The registered background-activity handler, or
Nonewhere unsupported. - background_
app - Requests that the host move the app to the background.
- build_
layout_ tree_ from_ applier - Builds a layout snapshot from retained layout state in the live applier tree.
- build_
semantics_ tree_ from_ applier - Builds a semantics snapshot from retained layout state in the live applier tree.
- build_
semantics_ tree_ from_ layout_ tree - Builds a semantics tree from an existing
LayoutTree. - build_
version - The build identifier a store orders releases by, if the platform knows one.
- bundled_
assets - Returns the platform reader, if this host has an application bundle.
- camera
- The installed camera, or
Nonewhere live capture is unsupported — which is when an application falls back to the image picker. - camera_
lenses - The devices the application may pick between, as the backend last published them.
- camera_
state - What the session is doing.
- camera_
supported - Whether this platform has a live camera at all.
- capture_
camera_ still - Takes one full-resolution still and resolves with it.
- check_
for_ app_ update - Starts update discovery and publishes the initial state.
- clean_
slot_ skip_ count - Number of subcompose measure passes on this thread that reused a retained
slot without a compose walk. Diagnostic surface for tests and telemetry;
see
SubcomposeMeasureScope::subcomposefor when a slot may skip. - clear_
application_ id - Removes the registered application id (tests and teardown).
- clear_
focus_ invalidations - Clears all pending focus invalidations without processing them.
- clear_
host_ controller - Removes the installed host controller.
- clear_
host_ messages - Forgets the newest message of every channel. Used by tests and host teardown.
- clear_
host_ outbox - Removes the installed outbox, after which
send_to_hostreports that no host listens. - clear_
incoming_ content - Discards anything waiting for a collector. Used by tests and host teardown.
- clear_
launcher_ state - Discards every framework-owned launcher record. Used by tests and by host teardown so one composition’s in-flight request never leaks into the next.
- clear_
modals - Clears every registration in the current [
crate::AppContext]. - clear_
platform_ app_ info - Removes any registered platform app info (tests and teardown).
- clear_
platform_ app_ updater - Removes the platform updater.
- clear_
platform_ audio - Removes any registered platform audio player (tests and teardown).
- clear_
platform_ background_ activity - Removes any registered handler (tests/teardown).
- clear_
platform_ bundled_ assets - Removes the platform reader.
- clear_
platform_ camera - Removes the platform camera and forgets everything the last session published.
- clear_
platform_ content_ resolver - Removes any installed platform content resolver.
- clear_
platform_ device_ info - Removes any registered platform device info (tests and teardown).
- clear_
platform_ file_ picker - Removes any registered platform chooser (used in tests and teardown).
- clear_
platform_ haptics - Removes any registered platform haptics (tests and teardown).
- clear_
platform_ heart_ rate - Removes the platform sensor (tests and teardown).
- clear_
platform_ host_ surface - Removes the installed host surface (tests and teardown).
- clear_
platform_ image_ picker - Removes any registered platform image picker (tests and teardown).
- clear_
platform_ launch_ args - Removes any platform-reported launch arguments (tests and teardown).
- clear_
platform_ media_ player - Removes the platform media player and forgets everything it published.
- clear_
platform_ media_ source_ opener - Removes the platform media source opener.
- clear_
platform_ network_ monitor - Removes any registered platform network monitor (tests and teardown).
- clear_
platform_ notifier - clear_
platform_ power_ monitor - Removes the platform power monitor.
- clear_
platform_ preferences - Removes any installed platform backend (tests and teardown).
- clear_
platform_ purchases - Removes any registered purchase backend (tests and teardown).
- clear_
platform_ share_ sheet - Removes any registered platform share sheet (tests and teardown).
- clear_
platform_ system_ theme - Removes any platform-reported theme (tests and teardown).
- clear_
platform_ uri_ handler - Removes any registered platform URI handler (tests and teardown).
- clear_
pointer_ repasses - Clears all pending pointer repasses without processing them.
- clear_
semantics_ invalidations - Drops every pending semantics invalidation without servicing it.
- collect
AsState - Collects
streaminto state, starting atinitial. - collect_
focus_ order - Walks
treein the order the layout pass placed it and keeps the nodes that registered a focus target and take space on screen. - collect_
focus_ order_ under - The focus targets under one node, in the order layout gave them. An arrow key inside a selectable group moves among these and no others.
- collect_
is_ hovered_ as_ state - Free-function form of
MutableInteractionSource::collectIsHoveredAsState. - collect_
is_ pressed_ as_ state - Free-function form of
MutableInteractionSource::collectIsPressedAsState. - collect_
modifier_ slices - Collects modifier node slices directly from a reconciled
ModifierNodeChainthat no layout places: its draws sit inside the padding before them. - collect_
semantics_ from_ modifier - Collects semantics by instantiating a temporary modifier chain from a
Modifier. - collect_
slices_ from_ modifier - Collects modifier node slices by instantiating a temporary node chain from a
Modifier. - collect_
stream - Collects an entire stream. Convenient for tests and small trees; production
collectors consume
ContentStream::nextincrementally. - command_
draw_ scope - The scope every framework-run draw command records into: sized by the consumer, measuring text with the app’s fonts.
- command_
draw_ scope_ reusing command_draw_scoperecording into storage the consumer already owns — the retained-recorder path where a command’s buffer keeps its capacity across frames.- content_
delta_ for_ thumb_ drag - How far the content moves when the thumb is dragged
deltaalong a track oftrack, given the thumb it currently shows. - content_
length - Returns the total length of a shared handle, via a one-byte range probe.
- current_
density - Returns the current density scale factor (logical px per dp).
- current_
font_ scale - Returns the system font scale — the multiplier the user chose in the
platform’s font-size setting,
1.0when they left it alone. - current_
font_ scale_ curve - Returns the conversion the platform performs for a size in
Sp. - current_
lifecycle_ state - Returns the latest lifecycle state published by the platform host.
- current_
media_ item - The open item, or
Nonewhen nothing is. - default_
audio - The installed platform player, or a no-op one.
- default_
file_ picker - The default chooser (the platform backend).
- default_
haptics - default_
http_ client - The platform’s HTTP client.
- default_
image_ picker - default_
notifier - default_
share_ sheet - default_
system_ theme - default_
uri_ handler - delay
- Resolves after
durationhas elapsed. - density
- The device pixel grid in force here.
- device_
info - The active device info: the platform implementation if installed, otherwise the built-in default.
- dismiss_
top_ popup - Closes the dismissable popup on top of the most recent host, the way an outside tap would, for a screen reader’s escape gesture or an Escape key with no dialog open. Answers whether a popup was there to close.
- dismissable_
popup_ open - Whether a dismissable popup is open on any host. Reading this in a composable subscribes to every host’s revision, so the reader recomposes when a popup opens or closes.
- 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.
- dispatch_
modal_ back - Asks the innermost modal surface to close.
- dispatch_
unhandled_ key_ event - Offers
eventto theUnhandledKeyEventshandlers, the one composed last first, and says whether one of them took it. The platform shells call this with each key the focused controls and text fields let pass. - downloaded_
length - How much of a download into
targetis on the device: the file’s length, or more where the platform keeps a paused transfer’s bytes apart from the file, as iOS does. An application shows a paused download’s progress with it. - drain_
announcements - Takes the queued announcements. A platform accessibility bridge calls this once a frame and hands each one to the screen reader.
- drain_
lazy_ prefetch_ requests - Hands
scheduleeach lazy list that left an item beyond its viewport uncomposed during a frame, forwith_lazy_prefetch_passto compose before the next frame, and clears the requests. - drain_
reader - Reads a reader to its end.
- dropped_
camera_ frames - How many frames were produced while every observer was still busy.
- dropped_
media_ samples - How many sample blocks were produced while every observer was still busy.
- durable_
save_ deadline - How long the installed host will wait for durable saves.
- execute_
draw_ commands - exit_
app - Requests that the host finish the app.
- exit_
requested - Whether an exit request is outstanding, without consuming it.
- fade_in
- Fades in the content of an
AnimatedVisibility, from transparent to fully opaque. - fade_
out - Fades out the content of an
AnimatedVisibility, from fully opaque to transparent. - fetch_
range - Fetches a byte range of a shared handle from a peer at
base(e.g."192.168.1.20:54123") into memory.len = Nonefetches to the end. - fetch_
to_ writer - Streams a byte range of a shared handle from a peer into
writer, in chunks, without buffering the whole range in memory — use this to spool a track to disk. Returns the total source length (fromContent-Range) when known. - file_
content - A shared handle to the file at
path. - file_
folder - A shared handle to the directory at
path. - focus_
order_ len - How many focus targets the last published order holds.
- folder_
files - Streams every file in
folder’s tree, using the provider’s native stream when it has one and a depth-first walk otherwise. - forget_
movable - Releases the state of
movablecontent with identitykeythat no parent is showing. Call it when the item is closed for good, from an event handler or inside composition. Content a parent is still showing is unaffected. Needs a runtime: an active composition or one created on this thread. - format_
layout_ tree - Returns a formatted string representation of the layout tree
- format_
modifier_ chain - Formats the modifier chain using inspector data.
- format_
render_ scene - Returns a formatted string representation of the render scene
- format_
screen_ summary - Returns a compact summary of what’s on screen (counts by type).
- get_
cursor_ x_ for_ offset - get_
offset_ for_ position - has_
focused_ field - Returns true if any text field currently has focus. Checks weak ref liveness and clears stale focus state.
- has_
lazy_ prefetch_ requests - Whether any lazy list waits for an idle prefetch pass.
- has_
pending_ draw_ repasses - Returns true if any draw repasses are pending.
- has_
pending_ focus_ invalidations - Returns true if any focus invalidations are pending.
- has_
pending_ layout_ repasses - Returns true if any layout repasses are pending.
- has_
pending_ measure_ repasses - Returns true if any measure repasses are pending.
- has_
pending_ pointer_ repasses - Returns true if any pointer repasses are pending.
- has_
pending_ semantics_ invalidations - Whether any semantics invalidations are waiting to be serviced.
- has_
placed_ content - Whether any box placed under
roothas area, asbuild_layout_tree_from_applierwould place it: the walk stops at the first such box and reads no node’s modifiers or semantics. - heart_
rate - The latest reading.
- heart_
rate_ available - Whether this device can read a heart rate for this application at all.
- heart_
rate_ permission - Whether the application may read the sensor.
- hold_
microphone_ standby - Starts the microphone standby, or joins it if another lease holds it. Call it while the application is in front.
- host_
controller - Returns the installed framework host controller.
- host_
density - How many physical pixels this host puts in one logical pixel.
- host_
surface - The installed host surface, or one that accepts no resize requests.
- host_
surface_ size - The size the host last reported.
- http_
body_ ref - Wraps
bodyin anHttpBodyRef. - install_
app_ update - Starts package installation and publishes the initial transfer state.
- install_
bundled_ asset_ set - Installs a declarative set without exposing bundle APIs or partial-file handling to the application.
- install_
host_ outbox - Installs where
send_to_hostdelivers: the platform host’s connection. - install_
modifier_ chain_ trace - Installs a callback that receives modifier chain snapshots when debugging is enabled.
- interval
- Runs
tickeveryperioduntil the returned future is dropped. - isDebuggable
- Whether the OS considers this build debuggable, read from composition.
- isSystem
InDark Theme - Whether the host’s current application theme is dark.
- is_
cursor_ visible - Returns whether the cursor should be visible right now.
- is_
debuggable - Whether the OS considers this build debuggable — see
LaunchArgs::is_debuggable. - is_
window_ root - Whether
nodeis a layout node whose modifier chain carries a window root. - key
- Scopes composition identity to
keysfor the duration ofcontent. - keyboard_
focus_ target - Resolves Tab, arrows, Home and End using desktop keyboard conventions.
Tab enters a radio group or tab list at its focused or selected member and
leaves it in one step. Arrows wrap within the group; radio navigation also
selects the destination. Tabs use manual activation with Enter or Space.
Hidden, disabled and background targets outside the top modal are excluded.
Publishes this layout’s focus order in the current [
crate::AppContext] for subsequent programmaticcrate::FocusManagermoves. Unhandled keys returnNoneso a widget can apply its own keyboard behavior. - keyboard_
focus_ visible - Whether the keyboard, and not a pointer, made the last focus move.
- latest_
camera_ frame - The last frame the session produced, or
Nonebefore the first one. - latest_
media_ samples - The last block of samples, or
Nonewhen analysis is off or nothing has played yet. Read during draw, so a visualiser never draws a stale block. - launch
Blocking - Starts blocking work and delivers its result on the current runtime’s UI
thread. A full queue waits asynchronously inside the runtime-owned task.
Execution errors are delivered to
on_ui; only a missing runtime is returned immediately without invoking the callback. - launch_
args - The launch arguments this app was started with.
- launch_
args_ from_ command_ line - Parses
--name=value(text) and bare--name(true) out of a command line. - layout_
direction - The layout direction in force here.
- layout_
text - lazy_
item_ key - The key of the lazy item being composed, or
Noneoutside a keyed lazy item. - lazy_
prefetch_ pass_ cost - Estimates the time needed for the next complete lazy prefetch pass.
- local_
accessibility_ options - The options a composable reads: what the platform reported, unless a
ProvideAccessibilityOptionsabove it says otherwise. - local_
accessibility_ state - The state a composable reads: what the platform reported, unless a
ProvideAccessibilityStateabove it says otherwise. - local_
announcer - CompositionLocal carrying the
Announcer. The same instance comes back on every call. - local_
audio - The CompositionLocal descendants read to reach the audio player.
- local_
bring_ into_ view_ responder - CompositionLocal carrying the nearest scroll container’s
BringIntoViewResponder, orNoneoutside any scroll container. - local_
density - The
StaticCompositionLocalcarrying the device pixel grid. - local_
file_ picker - The
CompositionLocalcarrying the activeFilePicker. - local_
focus_ manager - CompositionLocal carrying the
FocusManager, asLocalFocusManagerdoes in Compose. The same instance comes back on every call. - local_
haptics - local_
http_ client - local_
image_ picker - local_
ime_ insets - CompositionLocal carrying the on-screen soft-keyboard (IME) insets in logical
pixels. The
bottomfield is the height the keyboard currently covers at the bottom of the window (zero when it is hidden); the other edges are zero. - local_
launch_ args - The composition local carrying the launch arguments.
- local_
layout_ direction - The
CompositionLocalcarrying the current layout direction. - local_
lazy_ item_ key - The
CompositionLocalcarrying the current lazy item’s key. - local_
lifecycle_ state - The
CompositionLocalcarrying the host’s current lifecycle state. - local_
modal_ depth - CompositionLocal carrying the modal depth at which content is being composed: zero outside any dialog, or the depth of the innermost dialog that encloses the current composition.
- local_
notifier - local_
on_ light_ surface - CompositionLocal marking the surface the floating glass sits over as
LIGHT. Liquid glass is transparent, so its labels and hairlines must
flip to dark ink over a light backdrop to stay readable — the same
content over a dark app keeps its near-white ink.
LiquidThemeprovides it from its scheme; without a theme it isfalse(a dark surface), and a light screen providestrue. - local_
safe_ area_ insets - CompositionLocal carrying the platform safe-area insets in logical pixels.
- local_
share_ sheet - local_
system_ theme - local_
uri_ handler - log_
layout_ tree - Logs the current layout tree through the logger with indentation showing hierarchy.
- log_
modifier_ chain - Logs the contents of a modifier node chain including capabilities.
- log_
render_ scene - Logs the current render scene through the logger.
- log_
screen_ summary - Logs a compact summary of what’s on screen (counts by type).
- map_
ordered_ concurrent - measure_
layout - Runs the measure phase for the subtree rooted at
root. - measure_
layout_ with_ options - measure_
text - measure_
text_ for_ node - measure_
text_ with_ options - measure_
text_ with_ options_ for_ node - media_
capabilities - What the installed backend can do, or
MediaCapabilities::default— every capability absent — when there is none. - media_
equalizer - The equalizer setting last applied.
- media_
equalizer_ bands - The equalizer bands this platform has, in the order gains are given in.
- media_
playback_ supported - Whether this platform can play media at all.
- media_
player - The installed media player, or
Nonewhere this platform has none. - media_
volume - The volume the application asked for, before the audio-focus gain.
- microphone_
permission - Whether the application may record now.
- microphone_
standby_ available - Whether this platform and build can keep the microphone ready.
- modal_
depth - How many modal surfaces are open. Reading this in a composable subscribes to it, so the reader recomposes when a modal opens or closes.
- modal_
node_ may_ be_ live - Whether a modal node may be live in the current app context.
- movable
- Composes
contentunder an identity that iskeyalone, the same at every call site, so the subtree can be emitted from any parent and keep its remembered values, its running effects and its nodes. - movable
Content Of - Movable content whose identity is
key, the same at every call site. - mutable
State List - mutable
State List Of - mutable
State Map - mutable
State MapOf - mutable
State Of - Creates a new
MutableStateinitialized with the given value. - mutable
State OfNever Equal - Like
mutableStateOf, for a value that cannot be compared or whose every write must count as a change. - nearest_
window_ root - The window root that owns
node: the nearest node,nodeincluded, whose modifier chain carries a window root.Nonewhen the node belongs to the primary root. - nearest_
window_ roots nearest_window_rootfor each ofnodes, in order, with every ancestor looked up at most once. In an app context with no window root attached, every node belongs to the primary root and none is looked up.- nearest_
window_ roots_ into - Fills
outputwithnearest_window_rootsresults, reusing its storage and the ancestry cache inscratchacross batches. - network_
monitor - The active network monitor: the platform one if installed, else the default (online, unmetered).
- network_
status - Convenience: the current network status.
- next_
cursor_ blink_ time - Returns the next cursor blink transition time, if any.
Use this for
WaitUntilscheduling in the event loop. - nine_
patch_ quads - The draws that fill
destinationwithsourceas a nine-patch. - note_
store_ news - Tells the app that the store has news. Called by a purchase backend.
- observe_
app_ update_ status - Observes update state changes. The current state is delivered immediately.
- observe_
audio_ focus - Registers
observerfor audio-focus changes. The current focus is delivered at once. - observe_
back_ requests - Registers a callback run whenever a back request arrives, so an app can be told rather than having to ask.
- observe_
camera_ frames - Registers
observerfor frames. Applications collectrememberCameraFramesinstead of calling this. - observe_
camera_ lenses - Registers
observerfor the lens list. The current list is delivered at once, so a screen composed mid-session shows the devices rather than waiting for the next change. - observe_
camera_ state - Registers
observerfor session state. The current state is delivered at once, so a screen composed mid-session shows what is happening rather than waiting for the next change. - observe_
camera_ stills - Registers
observerfor stills. - observe_
heart_ rate - Registers
observerfor readings, delivering the latest at once. Withreadthe sensor runs while this registration lives – if the person has allowed it; this never asks. - observe_
host_ messages - Registers
observerfor the messages the host sends onchannel, handing it the newest one at once when the host already spoke there. - observe_
host_ surface_ size - Registers
observerfor host-surface size changes. Applications collectrememberHostSurfaceSizeinstead of calling this. - observe_
incoming_ content - Registers
observerfor incoming content, replaying anything that arrived before there was anywhere to put it. - observe_
lifecycle - Observes host lifecycle transitions until the returned handle is dropped.
- observe_
media_ commands - Registers
observerfor media-session commands. - observe_
media_ samples - Registers
observerfor analysis samples. - observe_
memory_ pressure - Registers
observerfor pressure reports. - observe_
microphone_ permission - Registers
observerfor answers, delivering the permission as it is now at once. - observe_
playback_ progress - Registers
observerfor position updates. The current position is delivered at once. - observe_
playback_ state - Registers
observerfor playback state. The current state is delivered at once, so a screen composed mid-item shows what is happening rather than waiting for the next change. - observe_
power_ state - Registers
observerfor power-state changes. Applications collectrememberPowerStateinstead of calling this. - observe_
store_ news - Registers a callback run whenever the store has news, so an app can be told rather than having to ask.
- octave_
equalizer_ bands OCTAVE_BAND_CENTERS_HZas bands, each able to lift or cut byrange_db.- open_
media - Opens
item, publishingPlaybackState::Loadingbefore the backend is asked so a screen shows the wait rather than a gap. - open_
media_ source - Opens
urifor decoding. - open_
microphone_ settings - Opens the system settings page of this application, where a blocked microphone can be allowed.
- open_
on_ wearable_ peer - Opens
urlonpeer’s screen, for example the store page of this application, so the person can install the companion there. The person sees it on that device; nothing happens here. - open_
wearable_ stream - Opens a byte stream to the application on
peerunderpath; the other device receives it asWearableEvent::Stream. Dropping the writer closes the stream. - open_
writable_ folder - Reopens a writable folder from a stored handle. Synchronous and callable from
any thread; returns
Noneonly when writable folders are unsupported here. - path_
from_ uri - The path a media URI addresses, or
Nonewhen it addresses something that is not a local file — a stream, a content provider, a browser blob. - pause_
media - Stops without giving up the position.
- peek_
focus_ invalidation - Returns true if a focus invalidation is pending without clearing it.
- peek_
layout_ invalidation - Returns true if a layout invalidation is pending without clearing it.
- peek_
pointer_ invalidation - Returns true if a pointer invalidation is pending without clearing it.
- peek_
render_ invalidation - Returns true if a render invalidation is pending without clearing it.
- pending_
layout_ repass_ nodes_ snapshot - Returns a stable snapshot of pending layout repass node IDs without consuming them.
- pending_
measure_ repass_ nodes_ snapshot - Returns a stable snapshot of pending measure repass node IDs without consuming them.
- percent_
decode - Decodes the percent-escapes in a platform content URI, refusing input it cannot decode exactly.
- percent_
decode_ lossy - Decodes the percent-escapes in a platform content URI for display.
- placed_
content_ extent - The far right and bottom edges of the boxes with area placed under
root, measured from the root’s origin asbuild_layout_tree_from_applierplaces them, reading no node’s modifiers or semantics.Nonewhile nothing underroothas area. - platform_
accessibility_ options - What the platform last reported.
- platform_
accessibility_ state - What the platform last reported.
- play_
media - Starts, or resumes, the open item.
- playback_
progress - Where the open item is.
- playback_
state - What the player is doing.
- power_
capabilities - What the installed backend can answer on this platform.
- power_
monitor - Returns the platform monitor, or one that answers “unsupported”.
- power_
state - The current power state, read from the installed backend.
- preferences
- The active preferences store: the platform backend if one is installed, otherwise the framework’s own file-backed store under the application’s config directory.
- prepare_
microphone - Readies the platform’s audio for recording; call it before opening a microphone stream. On iOS and watchOS it sets the audio session to record and play and activates it; elsewhere it does nothing.
- prepare_
text_ layout - prepare_
text_ layout_ for_ node - Lays out
textinstylefornode_id. The layout shares the text and style when it leaves them as they are. - probe_
media_ duration - Reads how long
itemis without playing it. - process_
focus_ invalidations - Processes all pending focus invalidations.
- process_
pointer_ repasses - Processes all pending pointer repasses.
- process_
semantics_ invalidations - Services every pending semantics invalidation.
- produce
State - Runs
producerwhenkeychanges and exposes what it publishes as state. - prune_
draw_ observations_ to_ nodes - Removes draw observations whose owners are absent from the retained scene.
- publish_
audio_ focus - Publishes what the rest of the device is doing with the output, and applies the policy that goes with it.
- publish_
camera_ frame - Publishes a frame. Backends call this from whichever thread the platform delivers frames on.
- publish_
camera_ lenses - Publishes the lens list and the device in use. Backends call this when a session opens and when the device changes.
- publish_
camera_ state - Publishes what the session is doing.
- publish_
camera_ still - Publishes the answer to a still request.
- publish_
heart_ rate - Publishes a reading. Backends call this from whichever thread the platform delivers on.
- publish_
heart_ rate_ permission - Publishes the person’s answer. Backends call this when the permission prompt closes; a reader waiting on it starts the sensor.
- publish_
host_ message - Delivers a message the host sent to every observer of its channel. Callable from any thread; platform hosts call it as messages arrive.
- publish_
host_ surface_ size - Publishes a new host-surface size. Platform backends call this whenever the host resizes the surface.
- publish_
incoming_ content - Publishes content shared into the application. Callable from any thread; the framework moves each item onto the UI thread before a composition sees it.
- publish_
media_ command - Publishes a button pressed outside the application’s own UI.
- publish_
media_ samples - Publishes a block of samples as it is heard.
- publish_
memory_ pressure - Publishes a pressure report. Callable from any thread; the framework moves each report onto the UI thread before a composition sees it.
- publish_
microphone_ permission - Tells the observers the permission as it is now. Backends call this when the person answers the prompt.
- publish_
playback_ progress - Publishes where the open item is. Backends call this as the position moves, which for a local file is a handful of times a second.
- publish_
playback_ state - Publishes what the player is doing.
- publish_
power_ state - Publishes a new power state. Platform backends call this whenever the OS reports a thermal or battery change, from whatever thread delivered it.
- publish_
wearable_ event - Hands an event from the platform to the application’s receiver, or drops it when there is none. Platform backends call it.
- purchases
- The active backend: the platform one if installed, else the no-store backend.
- push_
back_ request - Record a system back request (called by the platform backend’s gesture / button handler).
- push_
notification_ deeplink - Record the deep-link payload of a notification the user just tapped. Called
by the platform backend’s notification delegate; the app drains it via
take_notification_deeplink. - record_
dropped_ camera_ frame - Records that the platform produced a frame nobody could take.
- record_
dropped_ media_ samples - Records that the backend produced a block nobody could take.
- 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.
- release_
free_ memory - Asks the allocator to return free pages to the system.
- remember
- remember
AppUpdate State - Remembers observable application update state for the current composition.
- remember
Audio Focus - What the rest of the device is doing with the output, observed for as long as this call stays in the composition.
- remember
Camera Frames - The frames the session produces, as a stream this composition collects.
- remember
Camera Lenses - The lens list and the device in use, observed for as long as this call stays in the composition.
- remember
Camera State - What the camera session is doing, observed for as long as this call stays in the composition.
- remember
Camera Stills - The stills the session produces, as a stream this composition collects.
- remember
Coroutine Scope - Remembers a
CoroutineScopebound to this position in the composition. - remember
Draggable State - Remembers a
DraggableStatefor this composition, keeping its delta handler current across recompositions. - remember
Event Stream - Turns a platform subscription into a composition-scoped
EventStream. - remember
Heart Rate - The wearer’s heart rate, observed for as long as this call stays in the
composition. While
activethe sensor runs, if the person has allowed it; this never asks – callrequest_heart_rate_permissionfor that. - remember
Host Messages - Collects the messages the host sends on
channelfor as long as this call stays in the composition, starting with the newest one already received. - remember
Host Surface Size - The host surface’s size, observed for as long as this call stays in the composition.
- remember
Incoming Content - Collects content shared into the application for as long as this call stays in the composition.
- remember
Keyed - Like
remember, but recomputes wheneverkeychanges. - remember
Lazy List State - Creates a remembered
LazyListStatewith default initial position. - remember
Lazy List State With Position - Creates a remembered
LazyListStatewith the specified initial position. - remember
Lifecycle Events - Host lifecycle transitions as a composition-scoped stream.
- remember
Lifecycle State - The host’s lifecycle state as observable state.
- remember
Media Commands - Buttons pressed outside the application’s own UI, as a stream this composition collects.
- remember
Media Samples - Samples as they are heard, as a stream this composition collects.
- remember
Memory Pressure - Collects pressure reports for as long as this call stays in the composition.
- remember
Microphone Permission - The permission as observable state, read again each time the application’s lifecycle changes, such as on its return from the system settings. This never asks.
- remember
Movable Content Of - Content written once that keeps its identity wherever it is shown.
- remember
Mutable Interaction Source - remember
Mutable State Of - A composable hook that creates and remembers a
MutableState. - remember
Mutable State OfNever Equal - remember
Open File Launcher - Remembers a single-file launcher under
request_key. - remember
Open Files Launcher - Remembers a multi-file launcher under
request_key. - remember
Open Folder Launcher - Remembers a folder launcher under
request_key. - remember
Playback Progress - Where the open item is, observed for as long as this call stays in the composition.
- remember
Playback State - What the player is doing, observed for as long as this call stays in the composition.
- remember
Power State - The device’s power state, observed for as long as this call stays in the composition.
- remember
Purchase Events - One-shot purchase outcomes as a composition-scoped stream.
- remember
Save Document Launcher - Remembers a save-document launcher under
request_key. - remember
Saveable - State restored from preferences on first composition and saved at a flush.
- remember
Scrollable State - Remembers scroll input state and updates its consumption handler.
- remember
Sound Bank - Loads a set of cues once and keeps them alive across recompositions.
- remember
Store State - The store’s current state, observed for as long as this call stays in the composition.
- remember
Svg - remember
Swipe Dismiss State - Remembers the swipe state for one row.
- remember
Updated State - Returns a
MutableStatethat always holds the latest value. - remember
Window State - Remembers native-window position and size across recompositions.
- remember
Window State At - Remembers native-window position and size across recompositions, with the window first placed at the given screen position.
- remember
Writable Folder Launcher - Remembers a writable-folder launcher under
request_key. - request_
camera_ still - Asks for a full-resolution still, which arrives through
rememberCameraStills. - request_
current_ draw_ redraw - The draw-phase animation contract: a draw closure that advances its own spring or clock (a Cell no observation can see) must schedule the next frame’s re-record of ITS OWN node — a bare render invalidation only re-presents the retained scene, which would freeze the animation mid-flight. Callable only from inside a recording draw closure; anywhere else it degrades to a plain frame request.
- request_
exit - Ask the platform to close the app.
- request_
focus_ from_ platform - Moves focus onto
node_idwhen it holds a focus target. A platform’s accessibility layer calls this when a screen reader lands on a control, so the app’s focus follows the reader’s. - request_
focus_ invalidation - Requests a focus recomposition without affecting layout/draw dirties.
- request_
heart_ rate_ permission - Asks the person for the sensor. The only call in the framework that does; a no-op where there is no sensor or the build did not declare it.
- request_
host_ surface_ size - Asks the host for a different surface size.
- request_
layout_ invalidation - Requests a global layout re-run.
- request_
microphone_ permission - Asks the person, when the platform can still show its prompt: a no-op once the microphone is allowed or blocked.
- request_
pointer_ invalidation - Requests a new pointer-input pass without touching layout or draw dirties.
- request_
render_ invalidation - Requests that the renderer rebuild the current scene.
- reset_
cursor_ blink - Resets cursor to visible and restarts the blink timer. Call this on any input (key press, paste) so cursor stays visible while typing.
- resolve_
content - Resolves
urithrough the platform resolver, falling back to the local filesystem forfile://URIs and plain paths. - 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.
- run_
test_ composition - Build a composition with a simple in-memory applier and run the provided closure once.
- scale_
sp - A size in scale-independent pixels, in dp, through the running app’s curve.
- schedule_
draw_ repass - Schedules a draw-only repass for a specific node.
- schedule_
focus_ invalidation - Schedules a focus invalidation for the specified node.
- schedule_
layout_ repass - Schedules a layout repass for a specific node.
- schedule_
measure_ repass - Schedules a scoped re-measure of
node_idon the next frame. - schedule_
pointer_ repass - Schedules a pointer repass for the specified node.
- schedule_
semantics_ invalidation - Marks
node_id’s semantics for re-collection on the next frame of the app context that is current. - scroll_
delta_ to_ reveal - The scroll-offset delta needed to bring
caretfully inside the un-obscured part ofviewport. - seek_
media - Moves the position within the open item.
- seek_
media_ fraction - Moves the position to a fraction of the item, which is what a seek bar has.
- selectable_
group_ of - The nearest node above the given one that declares
selectable_group, when there is one. - send_
to_ host - Sends
payloadonchannelto the embedding host. - send_
wearable_ message - Delivers
datato the application onpeerunderpath. - set_
active_ focus_ target - Sets the currently active focus target.
- set_
app_ update_ status - Publishes state from a platform updater.
- set_
application_ id - Registers the id every framework-owned storage path is scoped by.
- set_
back_ interception - Declare whether the app currently wants the platform’s back control routed
to
push_back_requestinstead of the platform default. Set ittruewhile there is in-app navigation to pop andfalsewhen leaving the app is the right response (mirrors Compose’sBackHandler(enabled)). - set_
density - Updates the current density scale factor.
- set_
focus_ order - Replaces the focus order a later
crate::FocusManagermove reads. The order belongs to the current [crate::AppContext]. Keyboard navigation publishes the order from the latest layout before choosing a target. - set_
font_ scale - Updates the system font scale, taking it as a plain multiplier.
- set_
font_ scale_ curve - Updates the system font scale and the conversion behind it.
- set_
host_ controller - Installs the framework host controller.
- set_
keep_ screen_ on - Enables or disables the host’s keep-screen-on flag.
- set_
keyboard_ focus_ visible - Records how focus last moved: true after Tab or an arrow key, false after
a pointer press. A
Modifier::focusabledraws its ring only while this is true. Returns whether the value changed, so the caller can ask for a redraw. - set_
media_ analysis_ enabled - Starts or stops publishing
MediaSamples. Returnsfalsewhere the backend cannot produce them — seeMediaCapabilities::analysis. - set_
media_ balance - Applies stereo balance to the installed player. Values outside -1..=1 are clamped; non-finite values are rejected without changing playback. Returns false if the player cannot apply balance.
- set_
media_ equalizer - Applies an equalizer setting, clamped to what the platform’s bands can do.
- set_
media_ looping - Repeats the open item when it reaches its end.
- set_
media_ metadata - Updates the metadata shown by the platform media session for the open item.
- set_
media_ speed - Sets the playback rate,
1.0being as recorded. Returnsfalsewhere the backend has none — seeMediaCapabilities::speed. - set_
media_ volume - Sets the volume the application asks for,
1.0being the item as recorded. - set_
platform_ accessibility_ options - Installs what the platform reports. A backend calls this at start and on every change, and forces a root render when the answer is true, so the theme, the glass and the animations read the new options.
- set_
platform_ accessibility_ state - Installs what the platform reports. A backend calls this on every check and forces a root render when the answer is true, so composition reads the new state.
- set_
platform_ app_ info - Installs a platform app-info implementation, replacing any previous one.
- set_
platform_ app_ updater - Installs the platform updater.
- set_
platform_ audio - Installs a platform audio player, replacing any previous one.
- set_
platform_ background_ activity - Installs the platform background-activity handler, replacing any previous one.
- set_
platform_ bundled_ assets - Installs a platform bundled-assets reader.
- set_
platform_ camera - Installs the platform camera, replacing any previous one.
- set_
platform_ content_ resolver - Installs the platform content resolver (Android’s
ContentResolver, the iOS document store, the browser’s blob registry). - set_
platform_ device_ info - Installs a platform device-info implementation, replacing any previous one.
- set_
platform_ downloader - Installs the platform’s downloader;
default_http_clientthen runsdownload_tothrough it. iOS installs one on a backgroundURLSession. - set_
platform_ file_ picker - Registers the platform-provided chooser (Android SAF / iOS UIDocumentPicker).
- set_
platform_ haptics - Installs a platform haptics implementation, replacing any previous one.
- set_
platform_ heart_ rate - Installs the platform sensor, replacing any previous one.
- set_
platform_ host_ surface - Installs the platform host surface.
- set_
platform_ image_ picker - Installs a platform image picker, replacing any previously installed one. The iOS backend registers a photo-library picker here.
- set_
platform_ launch_ args - Installs the launch arguments reported by the platform, replacing any previous snapshot for every thread of the process.
- set_
platform_ media_ player - Installs the platform media player, replacing any previous one.
- set_
platform_ media_ source_ opener - Installs the platform media source opener, replacing any previous one.
- set_
platform_ microphone_ access - Installs the platform’s permission, or removes it with
None. Platform backends call it. - set_
platform_ microphone_ standby - Installs the platform’s standby, or removes it with
None; leases then hold nothing. Platform backends call it. - set_
platform_ network_ monitor - Installs a platform network monitor, replacing any previous one.
- set_
platform_ notifier - set_
platform_ power_ monitor - Installs the platform power monitor.
- set_
platform_ preferences - Installs the platform preferences backend, replacing any previous one.
- set_
platform_ purchases - set_
platform_ share_ sheet - Installs a platform share sheet, replacing any previously installed one. Backends with main-thread UIKit / Activity access register here.
- set_
platform_ storage_ space - Installs the platform’s measure of free space. iOS installs one that counts the space the system frees on demand for important data.
- set_
platform_ system_ theme - Installs the platform-reported system theme. Platform backends call this at startup and whenever the OS reports a change (then force a root render so composition observes it).
- set_
platform_ uri_ handler - Installs a platform URI handler, replacing any previously installed one.
- set_
platform_ wearable_ link - Installs the platform’s link, or removes it with
None; without one, every call returnsWearableError::Unavailable. Platform backends call it. - set_
text_ measurer - set_
wearable_ receiver - Installs the application’s receiver of what the paired device sends,
replacing any earlier one, or removes it with
None; later events are then dropped. - set_
writable_ folder_ store_ factory - Registers the platform store factory (Android, iOS). Called once at startup. No-op if already set.
- sha256_
hex - The SHA-256 of
bytes, as lower-case hexadecimal. - slide_
in_ vertically - Slides in the content vertically from
initial_offset_fractionof its own height (negative values start above the resting position, mirroring Compose’s default of-fullHeight / 2). - slide_
out_ vertically - Slides out the content vertically towards
target_offset_fractionof its own height. - start_
camera - Starts the camera, publishing
CameraState::Startingbefore the backend is asked so a screen shows the wait rather than a gap. - start_
cursor_ blink - Starts the active context’s cursor blink animation. Called when a text field gains focus.
- stop_
camera - Stops the camera and releases the device.
- stop_
cursor_ blink - Stops the active context’s cursor blink animation. Called when no text field is focused.
- stop_
media - Stops, closes the item and releases the output device.
- store_
available - Whether a real store backend is installed on this platform.
- store_
state - Convenience: the current store snapshot.
- system_
font_ directory - Where this platform keeps the font files a system family is drawn from, or
Nonewhen there is no such directory to read. - take_
back_ requests - Take (and clear) the number of pending back requests. Polled by the app; a burst collapses into a count the app can coalesce.
- take_
draw_ repass_ nodes - Takes all pending draw repass node IDs.
- take_
draw_ repass_ nodes_ into - Takes pending draw repasses into reusable caller-owned storage.
- take_
exit_ request - Take (and clear) a pending exit request. Drained by the platform backend.
- take_
focus_ invalidation - Returns true if a focus invalidation was pending and clears the flag.
- take_
geometry_ scene_ nodes - Takes the nodes whose geometry the last layout pass actually changed.
- take_
geometry_ scene_ nodes_ into - Takes changed geometry nodes into reusable caller-owned storage.
- take_
layout_ invalidation - Returns true if a layout invalidation was pending and clears the flag.
- take_
layout_ repass_ nodes - Takes all pending layout repass node IDs.
- take_
measure_ repass_ nodes - Takes all pending measure repass node IDs.
- take_
notification_ deeplink - Take (and clear) the deep-link payload of the most recently tapped notification, if any. Polled by the app’s deep-link handling.
- take_
pointer_ invalidation - Returns true if a pointer invalidation was pending and clears the flag.
- take_
render_ invalidation - Returns true if a render invalidation was pending and clears the flag.
- thumb_
geometry - The thumb for a scroll position, or
Nonewhen the content fits and there is nothing to indicate. - tick_
cursor_ blink - Advances the cursor blink state if needed.
Returns
trueif a redraw is needed. A transition schedules a scoped draw repass on the focused field, so the caller only has to run the ordinary dirty-node paths — no whole-scene work. - tile_
count - How many tiles
tile_quadswould produce, without building them. - tile_
quads - The draws that tile
sourceacrossdestinationat the source’s own size. - toggle_
media - Pauses what is playing and plays what is paused — the one button a headset has, and the space bar.
- top_
modal_ from_ applier - The modal the semantics tree of
rootwould be rooted at, found without building the tree: the topmost placed, visible modal that takes space, orNonewhen no modal is open. Unlike a tree update, it leaves the nodes’ semantics dirty flags alone. - tree_
needs_ layout - Check if a node or any of its descendants needs measure (selective measure optimization). This can be used by the app shell to skip layout when the tree is clean.
- tree_
needs_ semantics - Check if the root semantics snapshot is dirty.
- update_
semantics_ tree_ from_ applier - Brings
treeup to date with the placed nodes underroot, asbuild_semantics_tree_from_applierwould build it, reusing whattreeheld. - uri_
for_ path - The
file:URI for a path, which is whatMediaItemtakes. - verify_
package - Checks a package held in memory against
digest. - version_
name - The version a user is shown, if the platform knows one.
- warm_
prefetched_ slices - Builds the modifier slices of the items idle prefetch passes composed since the last call, and of every node under them. A node’s slices are built the first time a frame draws it, which for a list’s rows put that work in the frame each row entered the screen. Call it after an idle prefetch pass, while waiting for the next frame.
- wearable_
peers - The connected phones or watches.
- window_
insets - Returns the framework-owned insets currently visible to the composition.
- 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. - window_
roots - The window roots attached in the current app context.
- window_
roots_ revision - The current app context’s window root revision; see
WindowRootRegistry::revision. - windowless_
command - A
Commandfor a helper program an application runs behind its window, such asreg,powershellornotify-send. - with
Blocking - Runs synchronous work on the shared bounded executor when first polled.
- with_
lazy_ prefetch_ pass - Runs
pass, a layout pass, as an idle prefetch pass: each lazy list it measures composes the next item beyond its viewport that a frame left uncomposed. Records the elapsed duration and pending-list count so a later idle window can budget for layout and slice warming as well as item composition. - write_
all - Writes every byte of
bytesintosinkand commits it.
Type Aliases§
- AppInfo
Ref - AppUpdater
Ref - Shared updater service.
- Audio
Player Ref - Shared handle to the installed
AudioPlayer. - Background
Activity Ref - Bundled
Assets Ref - Shared bundled-assets service.
- Camera
Ref - Shared handle to the platform camera.
- Content
Folder Ref - Shared handle to a
ContentFolder. - Content
Future - A future produced by a content operation. It borrows the content it reads from, so no implementation has to clone a handle into every call.
- Content
Handle - Shared handle to a
Content. - Content
Reader Ref - Shared handle to a
ContentReader. - Content
Resolver Ref - Shared handle to a
ContentResolver. - Content
Sink Ref - Shared handle to a
ContentSink. - Content
Stream Ref - Shared handle to a
ContentStream. - Device
Info Ref - Drag
AndDrop Payload - What a transfer carries: any value the source chose, which a target downcasts to the type it expects.
- Drag
Delta Handler - What a
DraggableStatehands each drag delta to. - Draw
Command Fn - A draw command records into a scope the CONSUMER provides, instead of returning a freshly allocated primitive vector. This is the boundary that lets recording storage live with the command’s stable identity and be reused frame over frame (the retained draw-command recorder), rather than being reallocated, moved, and dropped on every execution.
- File
Picker Ref - Shared handle to a
FilePicker. - Haptics
Ref - Heart
Rate Monitor Ref - Host
Controller Ref - Host
Surface Ref - Shared handle to a
HostSurface. - Http
Body Ref - Shared handle to a response body.
- Http
Client Ref - Http
Future - Image
Picker Ref - Key
- Launch
Args Ref - Shared handle to a
LaunchArgssnapshot, readable from any thread. - Launcher
Result - What a launcher hands back once the chooser resolves.
- Media
Player Ref - Shared handle to the platform media player.
- Media
Source Opener Ref - Shared handle to the platform media source opener.
- Network
Monitor Ref - Notifier
Ref - Picker
Future - A
'staticfuture returned by chooser operations, polled on the UI thread. - Power
Monitor Ref - Shared power-monitor service.
- Preferences
Ref - Shared handle to a
PreferencesStore. - Progress
Handler - What a progress report is handed to.
- Purchases
Ref - Shared handle to the active
Purchasesbackend. - Scroll
Settle Policy - Remaps where a scroll comes to rest once the user’s interaction ends — the
UIScrollView targetContentOffsetanalog. Receives the naturally proposed rest offset (the fling’s predicted end, or the current offset for a plain release/wheel idle) and the release velocity in offset units/sec; returns the offset the scroll should settle at. Used e.g. by the liquid nav bar to snap out of the large-title collapse band so the title never rests half-faded. - Semantics
Spec - One value that says what a screen reader reads for a node, built up with
the methods below and handed to
Modifier::semantics_spec. - Share
Sheet Ref - Source
Resolver - Resolves a shared handle to its
ByteSource, orNoneif not shared. - Storage
Space Ref - Stub
Answer - What a
StubHttpClientanswers a request with. - Text
PanResolver - Resolver that recomputes (and stores) the horizontal pan offset for a text field given the current content viewport width in px.
- UriHandler
Ref - Writable
Folder Store Ref - Shared handle to a
WritableFolderStore.
Attribute Macros§
- composable
- Turns a function into a composable: its body runs inside a group keyed by
the call site, and recomposition skips it while its arguments are
unchanged.
#[composable(no_skip)]always re-runs the body.