Skip to main content

Crate cranpose

Crate cranpose 

Source
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-wgpu

Replace 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.

TargetFeaturesHost setup
Linux, macOS, Windowsdesktop, renderer-wgpuAppLauncher::try_run
Linux with one display backenddesktop-x11 or desktop-wayland, plus renderer-wgpuSelect the session backend
Android and Wear OSandroid, renderer-wgpuandroid_main! and the Android Gradle plugin
iOSios, renderer-wgpuXcode host and iOS entry point
Webweb, renderer-wgpuWasm entry point and browser canvas
watchOS, experimentalwatchosSwiftUI 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

TaskStart here
Arrange controls and textUI widgets
Retain screen stateState guide
Build a long list or custom layoutLayout guide
Add glass controls and themesLiquid UI
Animate a valueAnimation
Collect flows and retain view modelsCoroflow integration
Navigate between screensNavigation
Use files, clipboard, network or purchasesDevice services
Declare permissions and hardwareCapabilities
Embed a Rust screen in a native appNative 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 AppUpdater that 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 WearableLink over 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::zoomable gesture modifier.

Macros§

android_main
Declares this crate’s Android entry point.
app_capabilities
Includes the app capability declaration from the build script.
rememberScrollState
Creates a remembered ScrollState.

Structs§

AccessibilityOptions
What the person set in the system’s accessibility settings.
AccessibilityState
What the platform reports about the assistive technology in use.
Alignment
Alignment across both axes used for positioning content within a box.
AlignmentLines
Text baselines measured down from a layout’s top edge.
AlphaElement
Element that creates and updates alpha nodes.
AlphaNode
Node that applies alpha transparency to its content.
AndroidOverlayWindowOptions
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.announceForAccessibility does 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.
AppUpdateCapabilities
What an update backend can do on this platform.
AppUpdateObserver
Registration returned by observe_app_update_status.
AudioClip
Decoded PCM held in memory, ready to play with no further work.
BackRequestObserver
A back observer installed by observe_back_requests.
BackgroundElement
Element that creates and updates background nodes.
BackgroundNode
Node that draws a background behind its content.
BackgroundWork
What the person is shown about work that runs off screen.
BackgroundWorkLease
A claim that important work needs the host’s background execution allowance. The allowance remains active until every outstanding lease is dropped.
BasicTextFieldDecorationScope
Scope passed to a basic text field decoration box.
BasicTextFieldOptions
Options for customizing BasicTextField appearance and behavior.
BatteryStatus
Current battery level and charging state.
BlockingExecutor
A bounded, lazily started executor for synchronous work.
BlockingExecutorConfig
Bounds for a native blocking executor. Running closures cannot be interrupted.
BlockingTask
Completion of an admitted job. Dropping it cancels work still waiting to run.
BlurredEdgeTreatment
Controls blur behavior outside source bounds.
BoxSpec
Specification for Box layout behavior.
BoxWithConstraintsScopeImpl
Concrete implementation of BoxWithConstraintsScope.
BringIntoViewResponder
A scroll container’s ability to scroll a target window rect into view.
BundledAssetEntry
One bundle-relative file in a declarative asset installation.
BundledAssetInstallSpec
A versioned set copied from the application bundle into writable storage.
ButtonSpec
BytesBody
A body already in memory, handed out in CHUNK_LEN-sized pieces.
BytesContent
Content already held in memory: clipboard drops, web File payloads, tests.
BytesSource
In-memory ByteSource backed by a byte buffer. Handy for small payloads and tests.
CameraFrame
One frame from the viewfinder.
CameraLens
One capture device the application may pick.
CameraLenses
The devices the application may pick between, and the one in use.
CameraObserver
Keeps a camera observer registered until it is dropped.
CameraStill
A full-resolution still photograph as an encoded image.
CanvasSemanticsNode
A semantics node for content that is drawn rather than laid out.
ChunkChannel
The producing half of a chunked byte stream.
ChunkNext
The future ChunkStream::next returns.
ChunkStream
The consuming half of a chunked byte stream.
ClickableElement
Element that creates and updates clickable nodes.
ClickableNode
CollectionInfo
How far a container has scrolled along one axis and how far it can go.
Color
ColumnSpec
Specification for Column layout behavior.
Composition
Constraints
Constraints used during layout measurement.
ContentChannel
The producing half of a ContentStream fed by a platform callback.
ContentMetadata
Everything a provider can state about a piece of content without reading it.
CornerRadii
CornerShapeElement
Element that creates and updates corner shape nodes.
CornerShapeNode
Node that tracks the latest rounded corner shape.
CoroutineScope
A cancellation scope for work launched outside the composition pass.
CustomPointerIcon
An application-drawn pointer shape: a bitmap plus the hotspot, the pixel inside the image that sits exactly on the pointer’s position.
DashPathEffect
Dashes along a stroke: on for the first interval, off for the second, and so on, starting phase into the pattern. Compose’s PathEffect.dashPathEffect(intervals, phase). Up to DashPathEffect::MAX_INTERVALS intervals; a pattern with an odd count or a non-positive sum draws the stroke whole, as Skia does.
DefaultFont
The app has supplied no fonts, so text draws in the framework’s embedded face (the embedded-default-font feature, 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.
DensityMeasureScope
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.
DigestVerifier
Checks a package as it is read, so a package too large to hold in memory is still checked.
DisposableEffectResult
DisposableEffectScope
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.
DragAndDropPoint
Where a transfer is: on the screen when the platform knows window positions, and in the source’s surface always.
DragAndDropSource
A payload a node offers to be dragged out of it, and what the node wants to hear about the transfer.
DragAndDropSourceElement
Element that creates and updates DragAndDropSourceNodes.
DragAndDropSourceNode
Node that starts a transfer when a press on it becomes a drag.
DragAndDropState
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.
DragAndDropTarget
What a node does with a transfer that reaches it. Positions are in the surface that draws the target.
DragAndDropTargetElement
Element that creates and updates DragAndDropTargetNodes.
DragAndDropTargetNode
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.
DraggableState
Drag position and progress for one control.
DrawCacheBuilder
DurableSaveRegistration
Keeps a shared durable save registered until its owner is dropped.
EdgeInsets
Padding values for each edge of a rectangle.
EnterTransition
Defines how an AnimatedVisibility content appears.
EqualizerBand
One frequency band of a backend’s equalizer.
EqualizerSettings
What an equalizer is set to.
EventStream
The consuming half of an EventChannel.
ExitTransition
Defines how an AnimatedVisibility content disappears.
FetchResult
Result of a fetch_range call.
FileContent
A file on the local filesystem.
FileFilter
A named filter limiting the file types a chooser offers.
FileFolder
A directory on the local filesystem.
FilePickerOptions
Options controlling a chooser request.
FilePreferences
File-backed preferences with coordinated, atomic writes within this process.
FileSink
A file being written through a temporary sibling, renamed on ContentSink::finish so a partial write never replaces a good file.
FillElement
Element that creates and updates fill nodes.
FillNode
Node that fills the maximum available space in one or both dimensions.
FocusEntry
One focus target, with the bounds layout gave it.
FocusManager
Moves focus between the focus targets the tree holds, the way LocalFocusManager does in Jetpack Compose.
FocusRequester
A handle an app holds to move focus onto a node imperatively.
FolderEntry
Display metadata for one file in a writable folder.
FontScaleCurve
The sp → dp conversion the platform performs, sampled from the platform.
FpsStats
Development frame pacing and FPS statistics types. Frame statistics snapshot.
FractionalOffsetElement
Element that creates and updates fractional offset nodes.
FractionalOffsetNode
Node that offsets its content by a fraction of its own measured size.
FramedWearableLink
Application messages and byte streams over a WearableTransport.
GeometrySceneNodes
The nodes whose geometry a layout pass changed, by what the scene redoes for them.
GitHubAppUpdater
Discovers releases through a repository’s public GitHub release feed.
GitHubReleaseUpdate
A GitHub release feed used to discover an application package.
GlassMaterial
Visual parameters for Modifier::glass_material.
GraphicsLayer
HapticPattern
A vibration waveform: alternating durations with a target amplitude each.
HeadlessRenderer
A lightweight renderer that walks the layout tree and materialises paint commands.
HeartRate
The latest the sensor said.
HeartRateReader
A registration that keeps an observer, and when it reads, the sensor.
HostMessage
One message on the line between the application and its host.
HostMessageObserver
Keeps a host message observer registered until it is dropped.
HostSurfaceObserver
Keeps a host-surface observer registered until it is dropped.
HostSurfaceSize
The size of the host surface, in logical pixels, with the scale the host renders it at.
HoverInteractionEnter
A pointer came to rest over a node.
HoverInteractionExit
The pointer that Self::enter reported left.
HttpControl
Cancellation and progress shared with an in-flight request.
HttpProgress
How much of a transfer has arrived.
HttpRequest
One request.
HttpResponse
What a server answered, with its body still to be read.
ImageBitmap
Immutable image data used by UI primitives and render backends.
ImeEditorState
Snapshot of the focused text field’s editable state for platform IMEs.
IncomingContent
One item shared into the application.
IncomingContentObserver
Keeps an observer registered until it is dropped.
InspectorControl
A visible inspector control and its logical hit bounds.
InspectorNode
A sanitized platform-projection element for developer inspection.
InspectorState
A read-only snapshot of developer UI, separate from application semantics.
KeyEvent
A keyboard input event.
KeyEventRoute
The focused component’s keyboard route within a receiving surface or modal.
KeyboardFocusTarget
A keyboard navigation destination and whether moving there selects it.
LaunchArgs
The launch arguments the app was started with.
LaunchedEffectScope
LayoutAllocationDebugStats
LayoutBox
Layout information for a single node.
LayoutMeasurements
Result of running the measure pass for a Compose layout tree.
LayoutNode
A node of the layout tree.
LayoutNodeData
Snapshot of the data required to render a layout node.
LayoutTree
Result of running layout for a Compose tree.
LazyColumnSpec
Specification for LazyColumn layout behavior.
LazyItems
A run of lazy items: how many, and optionally how they are identified and reused.
LazyListItemInfo
Information about a single visible item in a lazy list.
LazyListLayoutInfo
Information about the currently visible items in a lazy list.
LazyListState
State object for lazy list scroll position tracking.
LazyRowSpec
Specification for LazyRow layout behavior.
LifecycleEvent
A lifecycle transition delivered by the platform host.
LifecycleObserver
RAII lifecycle observer registration.
LocalWindowState
The window a composable is drawn in.
MeasureLayoutOptions
MeasureResult
Result of a measurement operation.
Measurement
The size and explicit alignment lines produced by a measure policy.
MediaArtwork
Artwork for the platform media session.
MediaCapabilities
What a platform media stack can actually do.
MediaItem
One playable item.
MediaMetadata
What the platform media session shows: the lock screen, the notification, the car head unit.
MediaObserver
Keeps a media observer registered until it is dropped.
MediaSamples
Samples as they are being heard, for a visualiser.
MediaSourceHandle
A media stream the platform opened, and what it knows about it.
MemoryPreferences
An in-memory store. The web default until a platform backend registers, and what tests use.
MemoryPressureObserver
Keeps an observer registered until it is dropped.
MicrophonePermissionObserver
A registration that keeps an observer.
MicrophoneStandbyLease
A claim on the microphone standby; the standby stops when the last lease is dropped.
ModalRegistration
Keeps a modal surface on the stack until it is dropped.
Modifier
A modifier chain that can be applied to composable elements.
ModifierChainTraceGuard
RAII guard returned when installing a modifier chain trace subscriber.
ModifierLocalKey
Type-safe key referencing a modifier local value.
ModifierLocalReadScope
Lightweight read scope surfaced to modifier local consumers.
ModifierNodeSlices
Snapshot of modifier node slices that impact draw and pointer subsystems.
ModifierNodeSlicesDebugStats
Modifiers
Keyboard modifier keys held during an input sample.
MovableContent
Movable content held as a value. See rememberMovableContentOf.
MutableInteractionSource
MutableState
Cheap copyable mutable view of a state cell.
NetworkStatus
A snapshot of the current network state.
NinePatchInsets
How far in from each edge of a source image the stretchable middle starts.
NodeCapabilities
Capability flags indicating which specialized traits a modifier node implements.
NodeState
Runtime state tracked for every ModifierNode.
NoopAudioPlayer
The player used when no backend is installed.
NotifyRequest
A local notification to post.
OffsetElement
Element that creates and updates offset nodes.
OffsetNode
Node that offsets its content by a fixed (x, y) amount.
OpenFileLauncher
Presents the single-file chooser and hands the picked content back.
OpenFilesLauncher
Presents the multi-file chooser and hands every picked item back.
OpenFolderLauncher
Presents the folder chooser and hands the granted folder back.
PackageDigest
The digest a downloaded package must match.
PaddingElement
Element that creates and updates padding nodes.
PaddingNode
Node that adds padding around its content.
Painter
ParagraphStyle
PatchQuad
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.
PeerServer
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.
PlatformDirectories
Platform directory roots for application-owned files.
PlatformParagraphStyle
PlatformSpanStyle
PlatformTextStyle
PlaybackParams
How one voice should sound.
PlaybackProgress
Where the open item is.
Point
PointerEvent
Pointer event with consumption tracking for gesture disambiguation.
PointerInputScope
PowerCapabilities
What a power backend can answer on this platform.
PowerObserverRegistration
Keeps a power observer registered until it is dropped.
PowerState
Everything the platform currently says about power.
PreparedTextLayout
PressInteractionCancel
PressInteractionPress
PressInteractionRelease
Product
A product as the store describes it, in the user’s locale and currency.
ProgressBarRangeInfo
The value a control holds inside a range, for a slider, a dial or a progress bar.
ReadyFolder
A folder whose children are already known.
RecordedRenderScene
A collection of render operations for a composed scene.
Rect
ResolvedBackground
ResolvedModifiers
RotaryInputModifierNode
Modifier node that forwards rotary scroll events to an app handler.
RotaryScrollEvent
A rotary scroll event produced by a Wear OS crown or rotating bezel.
RoundedCornerShape
RowSpec
Specification for Row layout behavior.
RuntimeShader
A custom WGSL shader effect, analogous to Android’s RuntimeShader.
SaveDocumentLauncher
Presents the save-document chooser and hands the opened sink back.
SaveDocumentRequest
A request for a user-named destination to stream a document into.
Saver
Converts a value to and from the string form preferences store.
ScrollAxisRange
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.
ScrollElement
Element for creating a ScrollNode.
ScrollMetrics
A scroll position and the extents it is measured against, read together.
ScrollNode
ScrollNode layout modifier that physically moves content based on scroll position. This is the component that actually reads ScrollState and applies the visual offset.
ScrollState
State object for scroll position tracking.
ScrollableState
Scroll input for content that supplies its own placement, such as a wheel.
SemanticsCallback
Discrete event callback reference produced during semantics extraction.
SemanticsConfiguration
Semantics configuration for accessibility.
SemanticsCustomAction
A named accessibility operation, e.g. Compose’s customActions = listOf(CustomAccessibilityAction("Pause") { … }).
SemanticsDetails
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.
SemanticsDismiss
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 dismiss action.
SemanticsExpand
What a control does when a screen reader asks it to open or to close. Compose’s expand and collapse actions.
SemanticsLongClick
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.
SemanticsMagicTap
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.
SemanticsNode
A single node within the semantics tree.
SemanticsPlacement
Where layout put a semantics node: its offset inside its parent’s content and where its own content starts inside it.
SemanticsRequester
A handle an app holds to say that what its semantics recorder would report has changed.
SemanticsScrollBy
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.
SemanticsScrollToIndex
What a list does when a screen reader asks for the row at an index, e.g. a TalkBack scroll-to-position action.
SemanticsSetProgress
What a control does when a screen reader moves its value, e.g. a VoiceOver swipe up or a TalkBack set-progress action.
SemanticsSetSelection
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.
SemanticsSetText
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.
SemanticsText
A text node’s text in the semantics tree, shared with the node’s modifier slices rather than copied out of them.
SemanticsTree
Rooted semantics tree extracted after layout.
Shadow
Static shadow configuration.
ShadowScope
Pixel-space shadow scope used by block-based APIs.
ShareContent
A single file to share, with an optional accompanying message/subject.
SharedText
Immutable text shared by widgets, localized results, and retained control labels.
Signal
A one-value hand-off between a worker and a future.
SignalWait
The future Signal::wait returns.
Size
SizeElement
Element that creates and updates size nodes.
SizeNode
Node that enforces size constraints on its content.
SliceTextRef
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.
SliderScope
Values available to custom slider track and thumb content.
SliderSpec
Input and geometry policy for a Slider.
SnapshotState
Cheap copyable mutable view of a state cell.
SnapshotStateList
SnapshotStateMap
SoftwareTextFontRegistry
Parsed app-supplied faces, on their way to a SoftwareTextFontSet.
SoundBank
A set of cues loaded once and kept alive for as long as the composable that remembered it stays in the composition.
SoundBankEntry
A loaded cue inside a SoundBank.
SoundBankFailure
A cue that did not load, reported instead of silently vanishing.
SoundId
Identifies a decoded clip held by the audio engine.
SoundSpec
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.
SpanStyle
State
Cheap copyable read-only view of a state cell.
StoreObserver
A store observer installed by observe_store_news.
StoreState
Snapshot of everything known about the store right now.
StreamingAssetReader
A BundledAssetReader over any byte stream.
StringAnnotation
Mirrors Jetpack Compose’s AnnotatedString.Range<String> — a tag+value annotation covering a byte range.
Stroke
Describes how an outline is stroked.
StubHttpClient
An HTTP client that answers from a function rather than a network.
SubcomposeLayoutNode
Node responsible for orchestrating measure-time subcomposition.
SubcomposeMeasureScopeImpl
Concrete implementation of SubcomposeMeasureScope.
SvgPainter
Parsed SVG image data that rasterizes on demand for the requested draw size.
SwipeDismissState
A row’s swipe, as the application can see it.
SwipeToDismissSpec
Configuration for SwipeToDismiss.
TaskHandle
TestApplierGuard
TestComposition
In-memory composition helper used by tests.
TextFieldBuffer
A mutable text buffer that can be edited.
TextFieldElement
Element that creates and updates TextFieldModifierNode instances.
TextFieldModifierNode
TextFieldState
Observable state holder for text field content.
TextFieldValue
Immutable snapshot of text field content.
TextLayoutOptions
Text layout behavior options matching Compose BasicText controls.
TextLayoutResult
TextLinePrefixWidths
TextMetrics
TextModifierElement
Element that creates and updates TextModifierNode instances.
TextModifierNode
Node that stores text content and handles measurement, drawing, and semantics.
TextOptions
High-level text widget options for constrained UI text.
TextRange
Represents a range in text, used for cursor position and selection.
TextStyle
ThumbBounds
How short and how long a thumb may get, as fractions of the track.
ThumbGeometry
Thumb length and position, both as fractions of the track.
TransformOrigin
UpdatePackage
A package an update would install.
UprightRgba
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.
WearablePeer
A connected phone or watch.
WearableStream
A byte stream the paired device opened to this application.
WindowConfig
Declarative configuration for an operating-system window.
WindowCoordinates
A measured node’s local size and mapping into its window’s logical pixels.
WindowInsets
Insets needed to keep content clear of system UI and the on-screen keyboard.
WindowRootElement
Element that creates and updates window root nodes.
WindowRootEntry
A window root the registry knows about.
WindowRootNode
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.
WindowRootRegistry
The window roots attached in an app context, in attach order, with a revision that changes whenever the set changes.
WindowRootRoutingScratch
Reusable ancestry storage for nearest_window_roots_into.
WindowState
Mutable position and size state for a declarative OS window, and whether the window has a frame on the screen.
WritableFolderLauncher
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.
ZoomState
Shared zoom/pan transform state for Modifier::zoomable.

Enums§

AndroidGpuBackend
Graphics API used by the Android WGPU renderer.
AppUpdateError
Failure to start an update operation.
AppUpdateStatus
Observable state of the application update flow.
AudioBus
The two mix buses every app gets, so “sound on” and “music on” are one call each rather than bookkeeping over individual voices.
AudioError
Why an audio call could not be honoured.
AudioFocus
What the rest of the device is doing with the output.
BlendMode
Blend mode used for draw primitives.
BlockingError
Failure to admit or complete blocking work.
Brush
BundledAssetError
Error reading an asset from the application bundle.
BundledAssetInstallOutcome
Result of installing a bundled asset set.
CameraError
CameraState
What the camera session is doing.
ColorFilter
Simple image color filter model.
CompositingStrategy
ContentEntry
One child of a ContentFolder.
ContentError
Errors produced while reading or writing content.
ContentScale
CursorIcon
Describes the appearance of the (usually mouse) cursor icon.
CustomCursorSize
How big an app’s own cursor images appear when the person has enlarged the system pointer.
DigestAlgorithm
How a package’s bytes are checked against what the release promised.
DragAndDropEvent
One step of a transfer the source recorded for the shell to route.
DragAndDropOutcome
How a transfer ended, as the source hears it.
DrawCommand
DrawStyle
How crate::DrawScope::draw_path paints a path: Compose’s Fill and Stroke draw styles, the stroke dashed when it carries a path effect.
DurableSaveError
An error reported by a durable-save callback.
DurableSaveOutcome
Result of a lifecycle or explicit save boundary.
FilePickerError
Errors produced while presenting a chooser.
FillDirection
Direction for fill modifiers (horizontal, vertical, or both).
FlashMode
What the light does when a still is captured.
FocusDirection
Focus direction for navigation.
FocusRequestError
Why FocusRequester::request_focus could not move focus.
FolderError
Errors produced by writable-folder I/O.
FontBytes
Shared font data accepted by AppLauncher::with_font_face_bytes. The bytes a face is parsed from.
FontLoadError
Why an app-supplied face could not be registered.
FrameFormat
How a frame’s pixels are laid out.
FramePacingMode
Development frame pacing and FPS statistics types.
HapticEffect
A system-defined vibration primitive.
HapticError
Why a haptic pattern could not be built.
HapticFeedback
A haptic feedback event.
HeartRateError
Why the sensor could not start.
HeartRatePermission
Whether the application may read the sensor.
HeartRateStatus
What the heart-rate sensor is doing.
HorizontalAlignment
Alignment along the horizontal axis.
HoverInteraction
The pointer resting over a node: Compose’s HoverInteraction.
HttpError
HttpMethod
The verbs a request can use.
ImagePickerError
ImagePixelFormat
Storage format of an immutable bitmap.
ImageSampling
Texture sampling mode for image primitives.
ImageSource
Where an image comes from.
IncomingSource
Where the bytes of an incoming item live.
InspectorAction
An inspector control, independent of the application’s actions.
InspectorMode
The application’s visual presentation while inspecting accessibility.
Interaction
IntrinsicSize
Specifies how to size a component based on its intrinsic measurements.
KeyCode
Physical key codes for keyboard input.
KeyEventType
Type of keyboard event.
LaunchArgValue
One launch-argument value, in the type the platform delivered it.
LaunchError
Errors that can occur while launching a windowed (desktop or iOS) application.
LayerShape
LayoutDirection
Which side of the interface is the start.
LayoutNodeKind
Classification of the node captured inside a LayoutBox.
LensFacing
Which way a capture device points.
LifecycleState
Android-style lifecycle state exposed to composition observers.
LinearArrangement
Arrangement strategy matching Jetpack Compose’s linear arrangements.
LinkAnnotation
Mirrors Jetpack Compose’s LinkAnnotation sealed class.
LiveRegionMode
How urgently a screen reader reads a node whose text changed on its own.
MediaCommand
A button pressed somewhere the application does not draw: a lock screen, a notification, a headset, a car.
MediaError
MemoryPressure
How hard the platform asks for memory back.
MicrophonePermission
Whether the application may record.
PaintLayer
Layer that a paint operation targets within the rendering pipeline.
PatchFill
How a region larger than its source is filled.
PeerError
Errors from peer serving or fetching.
PlatformDirectoryError
PlaybackState
What the player is doing.
PointerEventKind
PointerIcon
The pointer’s appearance over a region of the UI.
PointerIconError
Errors returned while constructing a CustomPointerIcon.
PointerSource
The kind of physical device that produced a pointer event.
PowerReading
One power reading, or the reason there is no value.
PreferencesError
Errors produced by a preferences backend.
PressInteraction
PurchaseEvent
A one-shot thing that happened, which a snapshot cannot express.
RenderEffect
A render effect applied to a graphics layer’s rendered content.
RenderOp
A rendered operation emitted by the headless renderer.
ResizeRefused
Why a resize request was refused.
SemanticsAction
Semantics action exposed to the input system.
SemanticsRole
Semantic role describing how a node should participate in accessibility and hit testing. Roles are now derived from SemanticsConfiguration rather than widget types.
SemanticsWidgetRole
What kind of control a node is, as screen readers announce it.
ShareError
SliderOrientation
Main axis used by a Slider.
StorePhase
How far along the store connection is.
StrokeCap
Shape of the two ends of an open stroked path (an arc, today).
StrokeJoin
Shape produced where two stroked segments meet at a corner.
SvgPainterError
Errors returned while parsing or rasterizing an SVG painter.
SwipeDismissDirection
Directions accepted by a swipe-dismiss container.
SwipeDismissSide
Which edge the dismiss background is revealed on, i.e. the side the row is being swiped away from. Passed to the SwipeToDismissSpec::with_background closure so its label/icon can follow the swipe direction instead of being pinned to one side.
SystemTheme
TextDrawStyle
TextFieldLineLimits
Line limit configuration for text fields.
TextOverflow
How overflowing text should be handled.
TextShaping
ThermalState
The operating system’s thermal-pressure level.
UiString
Framework-owned strings. Applications override them in the cranpose-ui namespace.
UriHandlerError
VerticalAlignment
Alignment along the vertical axis.
WearableError
Why a call to the paired device did not happen.
WearableEvent
Something the paired device sent.
WebViewEvent
An event from an embedded browser.
WindowFocus
Whether a window takes keyboard focus when it is created.
WindowResizeDirection
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_family registers 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.
AudioPlayer
Plays sound. Installed by the platform backend; the default is a no-op.
BackgroundActivity
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.
BoxWithConstraintsScope
Scope exposed to BoxWithConstraints content.
BundledAssetReader
Chunked reader over one bundled asset.
BundledAssets
Access to files packaged in the app bundle.
ByteSource
Random-access source of bytes the app is willing to serve.
Camera
A platform capture session.
CancelTransfer
A transfer that stops at once when its HttpControl is cancelled, registered with HttpControl::on_cancel by the backend running it.
Content
One readable piece of content from any source.
ContentFolder
A folder granted by a provider.
ContentReader
A pull reader over one piece of content.
ContentResolver
Turns a provider URI into readable content.
ContentSink
A writable destination for streamed content.
ContentStream
An asynchronous stream of content.
DelegatableNode
Provides traversal helpers that mirror Jetpack Compose’s DelegatableNode contract.
DeviceInfo
Provides device and process information.
DrawScope
FilePicker
Presents the system’s file, folder and document choosers.
FolderReader
Chunked reader over one file in a writable folder.
FolderWriter
Chunked writer over one file in a writable folder.
Haptics
Performs haptic feedback. Installed by the platform backend; the default is a no-op.
HeartRateMonitor
A platform’s heart-rate sensor.
HostController
Host operations supplied by the framework platform backend.
HostSurface
What an application may ask of the host’s surface.
HttpBody
A response body, read a chunk at a time.
HttpClient
A platform’s HTTP.
ImagePicker
Picks or captures a single image and returns its encoded bytes.
LauncherFonts
Where an AppLauncher’s text faces come from.
LayoutEngine
Extension trait that equips MemoryApplier with layout computation.
LazyListScope
Receiver scope for lazy list content definition.
Measurable
Object capable of measuring a layout child and exposing intrinsic sizes.
MediaPlayer
A platform media stack.
MediaSourceOpener
Opens a media URI the decoder cannot open for itself.
MicrophoneAccess
A platform’s microphone permission, installed by the platform backend.
MicrophoneStandby
The platform’s standby, installed by the platform backend.
ModifierNode
Core trait implemented by modifier nodes.
ModifierNodeElement
Strongly typed modifier elements that can create and update nodes while exposing equality/hash/inspector contracts that mirror Jetpack Compose.
NetworkMonitor
Reports the current network status.
Notifier
Posts local notifications. Installed by the platform backend; the default is a no-op.
PlatformDownloader
A platform’s own transfer for HttpClient::download_to, one that goes on while the application is suspended or closed.
PlatformTextInputHandler
Callbacks a platform installs to control its on-screen keyboard.
PowerMonitor
Platform power policy.
PreferencesStore
Durable key/value storage owned by the application.
Purchases
A store backend.
ShareSheet
The OS share sheet. Installed by the platform backend; the default is a no-op that reports ShareError::Unsupported.
StorageSpace
Reports the free space a platform measures its own way.
SubcomposeLayoutScope
Base trait for measurement scopes.
SubcomposeMeasureScope
Public trait exposed to measure policies for subcomposition.
TextMeasurer
UriHandler
WearableLink
The platform’s link to the paired device, installed by the platform backend with set_platform_wearable_link.
WearableReceiver
Receives what the paired device sends.
WearableTransport
What the platform’s message link does for a FramedWearableLink.
WindowModifierExt
Modifier helpers for composables rendered in OS windows.
WindowRootDescriptor
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.
WritableFolderStore
Synchronous, thread-safe access to a user-chosen writable folder.

Functions§

AnimatedVisibility
Animates the appearance and disappearance of its content when visible changes.
BackHandler
Handles platform back requests on the UI thread while enabled is true. Nested handlers follow stack order: the innermost active handler receives the request and dropping it restores the handler beneath it.
BasicText
BasicTextField
Edits text through a retained TextFieldState. modifier controls the field bounds and input, and style controls the text. Use BasicTextFieldWithOptions for line limits, cursor color and edit callbacks.
BasicTextFieldDecorated
Creates an editable field and lets decoration_box place composable labels, placeholders, icons, buttons, prefixes, or suffixes around it.
BasicTextFieldWithOptions
Creates an editable text field with custom options.
BasicTextWithOptions
BitmapPainter
BitmapRegionPainter
Creates a painter that draws one region from a bitmap atlas.
Box
Places children over the same area. content_alignment selects each child’s position within the box; later children draw above earlier children.
BoxWithConstraints
BundledAssetInstallEffect
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_click after a click and places content inside a button container. The modifier controls size and appearance. spec can 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.
ClickableText
Displays annotated text and calls on_click with the byte offset under the pointer. Use LinkedText for URL and custom-action annotations.
CollectEvents
Collects stream for as long as this call stays in the composition, handing each event to on_event.
Column
Places children from top to bottom. spec sets vertical space and horizontal alignment. Use Row for a horizontal sequence.
Crossfade
Crossfade allows switching between two layouts with a crossfade animation.
DisposableEffect
Runs effect when this call site first enters composition, and again whenever keys no longer equals the value it ran with last time; the previous run’s DisposableEffectScope::on_dispose cleanup, if any, runs first, and also when the call site leaves composition entirely.
DurableSaveEffect
Registers fallible durable work for this composition’s lifetime.
ForEach
FrameEffect
Runs on_frame on every animation frame while running is true.
Image
Displays a painter with an optional accessible description.
KeepScreenOn
Keeps the platform display awake while this call remains in composition and enabled is true. Multiple active callers are reference-counted.
LaunchedEffect
Runs effect when this call site first enters composition, and again whenever keys no longer equals the value it ran with last time.
LaunchedEffectAsync
Like LaunchedEffect, but mk_future builds the future to drive rather than receiving a scope to call back into synchronously.
Layout
LazyColumn
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 LazyColumn for vertical lists.
LifecycleEffect
Registers a lifecycle observer for the lifetime of the current composition.
LinkedText
Displays annotated text and dispatches each link action. A URL annotation calls open_url; a clickable annotation calls its own handler. A shared Rc<AnnotatedString> retains the prepared text across uses.
ProvideAccessibilityOptions
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.
ProvideAccessibilityState
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.
ProvideAudio
Provides the installed audio player to content.
ProvideFilePicker
Provides the default FilePicker to descendant composables.
ProvideHaptics
ProvideImagePicker
ProvideLaunchArgs
Provides launch arguments to content.
ProvideLayoutDirection
Runs content in direction.
ProvideLazyItemKey
Composes content as the item identified by key.
ProvideLifecycle
Provides the host’s lifecycle state to descendant composables.
ProvideNotifier
ProvideShareSheet
ProvideSystemTheme
ProvideUriHandler
Row
Places children from left to right, or right to left for an RTL layout. spec sets horizontal space and vertical alignment.
Slider
A 0..=1 slider whose visuals are ordinary composables supplied by content. The framework owns pointer capture, cancellation, rotary input, pressed interactions, value mapping, and completion delivery.
Spacer
Reserves layout space with the supplied modifier.
SubcomposeLayout
SwipeToDismiss
Wraps content so it can be swiped away horizontally.
SwipeToDismissBox
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.
TextWithOptions
UnhandledKeyEvents
Hands handler every 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 title where the platform shows such work.
active_focus_target
Returns the currently active focus target, if any.
advance_lifecycle
Moves the host lifecycle to target through 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 text out politely. Short form of Announcer::announce for 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, or None where the platform cannot tell. path need 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 None where 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 None where 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::subcompose for 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_host reports 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.
collectAsState
Collects stream into state, starting at initial.
collect_focus_order
Walks tree in 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 ModifierNodeChain that 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::next incrementally.
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_scope recording 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 delta along a track of track, 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.0 when 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 None when 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 duration has 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 event to the UnhandledKeyEvents handlers, 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 target is 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 schedule each lazy list that left an item beyond its viewport uncomposed during a frame, for with_lazy_prefetch_pass to 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 = None fetches 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 (from Content-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 movable content with identity key that 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 root has area, as build_layout_tree_from_applier would 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 body in an HttpBodyRef.
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_host delivers: the platform host’s connection.
install_modifier_chain_trace
Installs a callback that receives modifier chain snapshots when debugging is enabled.
interval
Runs tick every period until the returned future is dropped.
isDebuggable
Whether the OS considers this build debuggable, read from composition.
isSystemInDarkTheme
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 node is a layout node whose modifier chain carries a window root.
key
Scopes composition identity to keys for the duration of content.
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 programmatic crate::FocusManager moves. Unhandled keys return None so 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 None before the first one.
latest_media_samples
The last block of samples, or None when analysis is off or nothing has played yet. Read during draw, so a visualiser never draws a stale block.
launchBlocking
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 None outside 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 ProvideAccessibilityOptions above it says otherwise.
local_accessibility_state
The state a composable reads: what the platform reported, unless a ProvideAccessibilityState above 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, or None outside any scroll container.
local_density
The StaticCompositionLocal carrying the device pixel grid.
local_file_picker
The CompositionLocal carrying the active FilePicker.
local_focus_manager
CompositionLocal carrying the FocusManager, as LocalFocusManager does 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 bottom field 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 CompositionLocal carrying the current layout direction.
local_lazy_item_key
The CompositionLocal carrying the current lazy item’s key.
local_lifecycle_state
The CompositionLocal carrying 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. LiquidTheme provides it from its scheme; without a theme it is false (a dark surface), and a light screen provides true.
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 None where 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 content under an identity that is key alone, 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.
movableContentOf
Movable content whose identity is key, the same at every call site.
mutableStateList
mutableStateListOf
mutableStateMap
mutableStateMapOf
mutableStateOf
Creates a new MutableState initialized with the given value.
mutableStateOfNeverEqual
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, node included, whose modifier chain carries a window root. None when the node belongs to the primary root.
nearest_window_roots
nearest_window_root for each of nodes, 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 output with nearest_window_roots results, reusing its storage and the ancestry cache in scratch across 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 WaitUntil scheduling in the event loop.
nine_patch_quads
The draws that fill destination with source as 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 observer for 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 observer for frames. Applications collect rememberCameraFrames instead of calling this.
observe_camera_lenses
Registers observer for 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 observer for 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 observer for stills.
observe_heart_rate
Registers observer for readings, delivering the latest at once. With read the sensor runs while this registration lives – if the person has allowed it; this never asks.
observe_host_messages
Registers observer for the messages the host sends on channel, handing it the newest one at once when the host already spoke there.
observe_host_surface_size
Registers observer for host-surface size changes. Applications collect rememberHostSurfaceSize instead of calling this.
observe_incoming_content
Registers observer for 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 observer for media-session commands.
observe_media_samples
Registers observer for analysis samples.
observe_memory_pressure
Registers observer for pressure reports.
observe_microphone_permission
Registers observer for answers, delivering the permission as it is now at once.
observe_playback_progress
Registers observer for position updates. The current position is delivered at once.
observe_playback_state
Registers observer for 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 observer for power-state changes. Applications collect rememberPowerState instead 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_HZ as bands, each able to lift or cut by range_db.
open_media
Opens item, publishing PlaybackState::Loading before the backend is asked so a screen shows the wait rather than a gap.
open_media_source
Opens uri for decoding.
open_microphone_settings
Opens the system settings page of this application, where a blocked microphone can be allowed.
open_on_wearable_peer
Opens url on peer’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 peer under path; the other device receives it as WearableEvent::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 None only when writable folders are unsupported here.
path_from_uri
The path a media URI addresses, or None when 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 as build_layout_tree_from_applier places them, reading no node’s modifiers or semantics. None while nothing under root has 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 text in style for node_id. The layout shares the text and style when it leaves them as they are.
probe_media_duration
Reads how long item is 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.
produceState
Runs producer when key changes 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
rememberAppUpdateState
Remembers observable application update state for the current composition.
rememberAudioFocus
What the rest of the device is doing with the output, observed for as long as this call stays in the composition.
rememberCameraFrames
The frames the session produces, as a stream this composition collects.
rememberCameraLenses
The lens list and the device in use, observed for as long as this call stays in the composition.
rememberCameraState
What the camera session is doing, observed for as long as this call stays in the composition.
rememberCameraStills
The stills the session produces, as a stream this composition collects.
rememberCoroutineScope
Remembers a CoroutineScope bound to this position in the composition.
rememberDraggableState
Remembers a DraggableState for this composition, keeping its delta handler current across recompositions.
rememberEventStream
Turns a platform subscription into a composition-scoped EventStream.
rememberHeartRate
The wearer’s heart rate, observed for as long as this call stays in the composition. While active the sensor runs, if the person has allowed it; this never asks – call request_heart_rate_permission for that.
rememberHostMessages
Collects the messages the host sends on channel for as long as this call stays in the composition, starting with the newest one already received.
rememberHostSurfaceSize
The host surface’s size, observed for as long as this call stays in the composition.
rememberIncomingContent
Collects content shared into the application for as long as this call stays in the composition.
rememberKeyed
Like remember, but recomputes whenever key changes.
rememberLazyListState
Creates a remembered LazyListState with default initial position.
rememberLazyListStateWithPosition
Creates a remembered LazyListState with the specified initial position.
rememberLifecycleEvents
Host lifecycle transitions as a composition-scoped stream.
rememberLifecycleState
The host’s lifecycle state as observable state.
rememberMediaCommands
Buttons pressed outside the application’s own UI, as a stream this composition collects.
rememberMediaSamples
Samples as they are heard, as a stream this composition collects.
rememberMemoryPressure
Collects pressure reports for as long as this call stays in the composition.
rememberMicrophonePermission
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.
rememberMovableContentOf
Content written once that keeps its identity wherever it is shown.
rememberMutableInteractionSource
rememberMutableStateOf
A composable hook that creates and remembers a MutableState.
rememberMutableStateOfNeverEqual
rememberOpenFileLauncher
Remembers a single-file launcher under request_key.
rememberOpenFilesLauncher
Remembers a multi-file launcher under request_key.
rememberOpenFolderLauncher
Remembers a folder launcher under request_key.
rememberPlaybackProgress
Where the open item is, observed for as long as this call stays in the composition.
rememberPlaybackState
What the player is doing, observed for as long as this call stays in the composition.
rememberPowerState
The device’s power state, observed for as long as this call stays in the composition.
rememberPurchaseEvents
One-shot purchase outcomes as a composition-scoped stream.
rememberSaveDocumentLauncher
Remembers a save-document launcher under request_key.
rememberSaveable
State restored from preferences on first composition and saved at a flush.
rememberScrollableState
Remembers scroll input state and updates its consumption handler.
rememberSoundBank
Loads a set of cues once and keeps them alive across recompositions.
rememberStoreState
The store’s current state, observed for as long as this call stays in the composition.
rememberSvg
rememberSwipeDismissState
Remembers the swipe state for one row.
rememberUpdatedState
Returns a MutableState that always holds the latest value.
rememberWindowState
Remembers native-window position and size across recompositions.
rememberWindowStateAt
Remembers native-window position and size across recompositions, with the window first placed at the given screen position.
rememberWritableFolderLauncher
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_id when 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 uri through the platform resolver, falling back to the local filesystem for file:// 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_id on 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 caret fully inside the un-obscured part of viewport.
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 payload on channel to the embedding host.
send_wearable_message
Delivers data to the application on peer under path.
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_request instead of the platform default. Set it true while there is in-app navigation to pop and false when leaving the app is the right response (mirrors Compose’s BackHandler(enabled)).
set_density
Updates the current density scale factor.
set_focus_order
Replaces the focus order a later crate::FocusManager move 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::focusable draws 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. Returns false where the backend cannot produce them — see MediaCapabilities::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.0 being as recorded. Returns false where the backend has none — see MediaCapabilities::speed.
set_media_volume
Sets the volume the application asks for, 1.0 being 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_client then runs download_to through it. iOS installs one on a background URLSession.
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 returns WearableError::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_fraction of 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_fraction of its own height.
start_camera
Starts the camera, publishing CameraState::Starting before 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 None when 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 None when the content fits and there is nothing to indicate.
tick_cursor_blink
Advances the cursor blink state if needed. Returns true if 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_quads would produce, without building them.
tile_quads
The draws that tile source across destination at 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 root would be rooted at, found without building the tree: the topmost placed, visible modal that takes space, or None when 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 tree up to date with the placed nodes under root, as build_semantics_tree_from_applier would build it, reusing what tree held.
uri_for_path
The file: URI for a path, which is what MediaItem takes.
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 visible and has keyboard focused, 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 Command for a helper program an application runs behind its window, such as reg, powershell or notify-send.
withBlocking
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 bytes into sink and commits it.

Type Aliases§

AppInfoRef
AppUpdaterRef
Shared updater service.
AudioPlayerRef
Shared handle to the installed AudioPlayer.
BackgroundActivityRef
BundledAssetsRef
Shared bundled-assets service.
CameraRef
Shared handle to the platform camera.
ContentFolderRef
Shared handle to a ContentFolder.
ContentFuture
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.
ContentHandle
Shared handle to a Content.
ContentReaderRef
Shared handle to a ContentReader.
ContentResolverRef
Shared handle to a ContentResolver.
ContentSinkRef
Shared handle to a ContentSink.
ContentStreamRef
Shared handle to a ContentStream.
DeviceInfoRef
DragAndDropPayload
What a transfer carries: any value the source chose, which a target downcasts to the type it expects.
DragDeltaHandler
What a DraggableState hands each drag delta to.
DrawCommandFn
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.
FilePickerRef
Shared handle to a FilePicker.
HapticsRef
HeartRateMonitorRef
HostControllerRef
HostSurfaceRef
Shared handle to a HostSurface.
HttpBodyRef
Shared handle to a response body.
HttpClientRef
HttpFuture
ImagePickerRef
Key
LaunchArgsRef
Shared handle to a LaunchArgs snapshot, readable from any thread.
LauncherResult
What a launcher hands back once the chooser resolves.
MediaPlayerRef
Shared handle to the platform media player.
MediaSourceOpenerRef
Shared handle to the platform media source opener.
NetworkMonitorRef
NotifierRef
PickerFuture
A 'static future returned by chooser operations, polled on the UI thread.
PowerMonitorRef
Shared power-monitor service.
PreferencesRef
Shared handle to a PreferencesStore.
ProgressHandler
What a progress report is handed to.
PurchasesRef
Shared handle to the active Purchases backend.
ScrollSettlePolicy
Remaps where a scroll comes to rest once the user’s interaction ends — the UIScrollView targetContentOffset analog. 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.
SemanticsSpec
One value that says what a screen reader reads for a node, built up with the methods below and handed to Modifier::semantics_spec.
ShareSheetRef
SourceResolver
Resolves a shared handle to its ByteSource, or None if not shared.
StorageSpaceRef
StubAnswer
What a StubHttpClient answers a request with.
TextPanResolver
Resolver that recomputes (and stores) the horizontal pan offset for a text field given the current content viewport width in px.
UriHandlerRef
WritableFolderStoreRef
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.