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

A Windows x64 PC needs Visual Studio Build Tools with the C++ tools, a Windows SDK and C++ ATL before the first build. The Cranpose IntelliJ plugin checks these parts and installs the missing ones.

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
Draw composables on 3D meshes in a scene3D scenes
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;
pub use raw_window_handle;

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
Screen reader announcements for events that have no control on screen.
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.
browser_history
The browser’s session history, as a page sees it: the URL fragment of the current entry, a number the app keeps in each entry it adds, and the user’s moves through the entries with Back and Forward.
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
Moving focus between focus targets, as LocalFocusManager does in Compose.
focus_order
The ordered list of focus targets that layout publishes for keyboard traversal.
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
HTTP requests, downloads and the client that sends them.
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 tree, measurement and placement of nodes.
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.
opened_links
Links the application is opened with: a URL in one of its schemes that another application or the system opened, and the deep link of a notification the person tapped.
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.
space
Composables in 3D: meshes, cameras and scenes for Modifier::scene3d and Modifier::mesh_surface. Composables in 3D: meshes that a composable’s content is drawn on, the scene they are placed in and the camera that shows it.
system_bars
The color of the icons the platform draws in its status and navigation bars over an app that paints its own background under them.
text
Text styling, measurement and layout.
text_field_focus
Focus manager for text fields.
text_input_session
Platform text-input session: soft-keyboard visibility hooks.
text_layout_result
The layout of a text, as Compose’s TextLayoutResult gives it.
text_selection
Native-grade text selection primitives for BasicTextField.
theme
The light or dark appearance of the operating system.
uri_handler
Opening a URI, such as a web link, in the application the platform picks for it.
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.
BackEvent
Where an interactive back gesture is: Compose’s BackEventCompat.
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.
BrowserHistoryObserver
Ends an observation of BrowserHistory::observe when dropped.
BundledAssetEntry
One bundle-relative file in a declarative asset installation.
BundledAssetInstallSpec
A versioned set copied from the application bundle into writable storage.
ButtonSpec
Optional settings for a Button.
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
Node that reports a click when a pointer goes down and up without moving farther than the drag threshold: the first pointer that goes down holds the press, and the others pass by until it lifts, so a second finger does not click, and each controller of a headset clicks with its own. Callbacks get positions in the node’s local coordinates, in logical pixels.
CollectionInfo
How many rows and columns a list holds, so a screen reader can say “list, 12 items” as its cursor enters. Compose’s CollectionInfo.
Color
An RGBA color in the sRGB space. The four fields are red, green, blue and alpha, each from 0.0 to 1.0. Compose’s Color.
ColumnSpec
Specification for Column layout behavior.
Composition
A running composition that turns root content into nodes. A is the applier type that creates and edits those nodes.
ComputedState
A state whose value calculation works out on every read, as Kotlin’s computedStateOf; see computedStateOf.
Configuration
What the platform tells the application about the device, as LocalConfiguration.current holds in Compose.
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.
ContentSeek
A gesture part of the way from the current content toward another, as predictive back is: the content toward shows at fraction and the current content at 1.0 - fraction, each with the transition from the current content to toward.
ContentTransform
How an AnimatedContent changes from one content to the next.
CornerRadii
The radius of each corner of a rounded rectangle, in logical pixels.
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.
DesktopIntegrationContext
What a DesktopIntegration can do during a call.
DesktopWaker
Wakes the desktop event loop from any thread, so that it calls DesktopIntegration::about_to_wait again: for event sources that do not wake it themselves.
DesktopWindow
A window of a desktop app, as a DesktopIntegration call sees it. Its raw handles are valid for that call.
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
What a DisposableEffect body returns: the cleanup to run when the effect is disposed. Make it with DisposableEffectScope::on_dispose.
DisposableEffectScope
The value a DisposableEffect body receives. Its on_dispose method makes the result that the body returns.
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
Collects the draw commands that a Modifier::draw_with_cache block records.
DrawSpecialization
The pipeline specialization one draw of a RuntimeShader compiles, chosen by RuntimeShader::draw_specialization.
DrawTextStyle
Everything crate::DrawScope needs to measure and draw a run of text.
DurableSaveRegistration
Keeps a shared durable save registered until its owner is dropped.
EdgeInsets
Padding values for each edge of a rectangle.
EnterTransition
Defines how 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 content disappears.
ExportFileLauncher
Presents the save-document chooser for a local file and copies the file to the chosen place; hands back whether it was saved.
ExternalFrames
Frames that another thread renders with Cranpose’s device, such as a game engine that runs its own loop, for a composition to show.
ExternalTexture
A GPU texture that another renderer, such as a game engine, draws into, shown through Cranpose’s image primitives.
Eye
The eye of a window’s 3D scene.
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. Its handle writes on a thread of its own.
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.
FontRegistry
Parsed app-supplied faces, on their way to the typefaces text lays out with.
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.
FrameTexture
A texture that a FrameWriter renders one frame into.
FrameWriter
The rendering end of ExternalFrames. Clones write to the same frames and may live on any thread.
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.
GpuContext
The GPU objects a Cranpose renderer draws with, for code that draws into textures Cranpose shows, such as a game engine rendering into an ExternalTexture.
GpuRequirements
What code that renders with Cranpose’s device (see GpuContext) needs from it beyond what Cranpose asks for.
GraphicsLayer
The transform, opacity, clip, shadow and effect properties of a layer. Compose’s GraphicsLayerScope.
GuestView
A Cranpose composition drawn into textures on another program’s GPU device, such as a game engine’s HUD texture.
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.
InboxObserver
Keeps an observer of a platform inbox, such as incoming content or opened links, registered until it is dropped.
IncomingContent
One item shared into the application.
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.
KeyboardActionHandler
Runs when the person presses a field’s keyboard action key, or Enter in a single-line field. A field without a handler runs the action’s default; a handler runs it only through KeyboardActionScope::perform_default_action.
KeyboardActionScope
What a keyboard action handler gets: the action the person ran, and a way to run that action’s default behavior too, as Compose’s performDefaultAction does.
KeyboardFocusTarget
A keyboard navigation destination and whether moving there selects it.
KeyboardOptions
The software keyboard a text field asks for: Compose’s KeyboardOptions. Platforms without a software keyboard ignore everything but the action, which Enter runs in a single-line field.
LaunchArgs
The launch arguments the app was started with.
LaunchedEffectScope
The scope a LaunchedEffect receives. It reports whether the effect is still active and queues follow-up work on the UI thread.
LayoutAllocationDebugStats
Counts and heap sizes of the layout and semantics data that one measure pass retains, for memory diagnostics.
LayoutBox
Layout information for a single node.
LayoutMeasurements
Result of running the measure pass for a Compose layout tree.
LayoutModifierMeasureResult
Result of a layout modifier measurement operation.
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.
LazyGridState
Where a lazy grid is scrolled to, in items — Compose’s LazyGridState.
LazyHorizontalGridSpec
Options for a LazyHorizontalGrid.
LazyHorizontalStaggeredGridSpec
Options for a LazyHorizontalStaggeredGrid.
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.
LazyStaggeredGridState
Where a lazy staggered grid is scrolled to — Compose’s LazyStaggeredGridState.
LazyVerticalGridSpec
Options for a LazyVerticalGrid.
LazyVerticalStaggeredGridSpec
Options for a LazyVerticalStaggeredGrid.
LifecycleEvent
A lifecycle transition delivered by the platform host.
LifecycleObserver
RAII lifecycle observer registration.
LocalWindowState
The window a composable is drawn in.
MeasureLayoutOptions
Selects which trees measure_layout_with_options builds.
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
Counts and capacities of the data that modifier node slices hold, for memory diagnostics.
Modifiers
Keyboard modifier keys held during an input sample.
MovableContent
Movable content held as a value. See rememberMovableContentOf.
MovedSceneNode
A node a layout pass moved, with the node whose placement put it there: its nearest ancestor that is not virtual, the parent of its layer.
MutableInteractionSource
Records the press and hover interactions of the nodes bound to it, and exposes them as state.
MutableState
Cheap copyable mutable view of a state cell.
NativeKeyEvent
What the platform reported about a key event beyond the key, as KeyEvent.nativeKeyEvent holds in Compose.
NetworkStatus
A snapshot of the current network state. The default knows nothing.
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.
PaddingValues
Padding on four edges, in reading order, such as a scaffold’s insets for its content slot or a lazy list’s content padding.
PagerFling
How a pager comes to rest after the user lets go — the options of Compose’s PagerDefaults.flingBehavior.
PagerSpec
Options for a pager, Compose’s pager arguments beside its state and its page count.
PagerState
Where a pager is — Compose’s PagerState. It is Copy, so it moves into any number of closures.
Painter
The pixels that an Image draws: a bitmap, a region of a bitmap, a tiled or nine-patch region, or an SVG. Compose’s Painter.
ParagraphStyle
Style of a whole paragraph: alignment, direction, line height and line breaking. Compose’s ParagraphStyle.
ParentData
Layout metadata supplied by a child for its direct parent.
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.
PlaceholderShape
A rounded rectangle within a layer.
Placement
Placement information for a measured child.
PlatformDirectories
Platform directory roots for application-owned files.
PlatformParagraphStyle
Platform-specific settings of a paragraph. Compose’s PlatformParagraphStyle.
PlatformSpanStyle
Platform-specific settings of a span. It holds no options yet.
PlatformTextStyle
Platform-specific settings of a span and of a paragraph. Compose’s PlatformTextStyle.
PlaybackParams
How one voice should sound.
PlaybackProgress
Where the open item is.
Point
A position in two dimensions, in logical pixels. Compose’s Offset.
PointerButtons
A set of pointer buttons that are pressed together.
PointerEvent
Pointer event with consumption tracking for gesture disambiguation.
PointerId
Identifies one pointer of a gesture, such as one finger, as Compose’s PointerId. The primary pointer is PointerId::PRIMARY.
PointerInputScope
The scope passed to the handler of Modifier::pointer_input. It reports the node’s size and opens a scope in which the handler awaits pointer events.
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.
PreparedMicrophone
The platform’s audio readied for recording, from prepare_microphone. Keep it as long as the microphone stream: when the last one is dropped, the platform releases its audio for other apps.
PreparedTextLayout
A text laid out between two widths: its glyphs and lines, which every query, measurement and renderer reads, and the size it measures.
PressInteractionCancel
A press that ended without the pointer going up.
PressInteractionPress
A pointer went down on a node.
PressInteractionRelease
A press that ended with the pointer going up.
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
An axis-aligned rectangle given by its top-left corner and its size, in logical pixels.
ResolvedBackground
A background fill: its color and, when the corners are rounded, their shape.
ResolvedModifiers
The padding, layout properties and offset that a modifier chain resolves to.
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
A rectangle shape with rounded corners. Compose’s 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.
SaveableRegistration
Keeps a composable’s value saved while it lives, and its last value once it is dropped. It belongs to the thread that registered it.
SaveableScope
Where the rememberSaveable calls in some content keep their values: a key namespace, and whether the values are saved in preferences or kept only in memory. A navigation host gives each back-stack entry its own, so two visits of one screen keep apart.
Saver
Converts a value to and from the string form preferences store.
ScrollAxisRange
How far a container has scrolled along one axis and how far it can go.
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.
SecureTextFieldOptions
Options for a BasicSecureTextField.
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.
ShaderPlaceholder
What a renderer draws in place of a shader’s effect while the shader’s pipelines compile, so no frame waits for them.
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
A width and a height, in logical pixels.
SizeElement
Element that creates and updates size nodes.
SizeNode
Node that enforces size constraints on its content.
SizeTransform
Animates an AnimatedContent’s size from the content that leaves to the content that comes. Compose’s SizeTransform.
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
A list whose reads subscribe the current scope and whose writes notify its readers, as Jetpack Compose’s SnapshotStateList. Clones share the same list.
SnapshotStateMap
A hash map whose reads subscribe the current scope and whose writes notify its readers, as Jetpack Compose’s SnapshotStateMap. Clones share the same map.
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
Style of a span of characters: color, font, spacing and decoration. Compose’s SpanStyle. A field left unset (None or Unspecified) keeps the inherited value when styles merge.
StandbyNotice
What the standby’s notification says, in the application’s language.
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
Controls a future spawned with RuntimeHandle::spawn_ui.
TestApplierGuard
Mutable access to the applier of a TestComposition, with the app context of that composition active while the guard lives.
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
The modifier node behind an editable text field. It measures and draws the text, the cursor and the selection, and handles pointer input.
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
The layout of a text: Compose’s TextLayoutResult. Its queries are the layout’s, in logical pixels from the text’s top left corner, with byte offsets into the text.
TextMeasurement
What a string occupies once laid out — the answer DrawScope::measure_text gives, and exactly the box draw_text fills.
TextMetrics
Size of a laid-out text. Distances are in logical pixels.
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
Complete style of a text: a SpanStyle and a ParagraphStyle. Compose’s 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.
TouchRouter
Routes the fingers on one surface to the shell’s primary and secondary pointers. F is the platform’s identity of a finger. None stands for a mouse, which always drives the primary pointer.
TransformOrigin
The pivot point for scaling and rotating a layer, given as fractions of its size. Compose’s 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.
WebDavFolder
A WebDAV folder whose files retain their original HTTP playback references.
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.
Axis
A direction of layout or motion: the main axis of a row or a column, the axis along which a scroller, a lazy list or a pager moves, and the axis a nested scroll reports.
BackEdge
The edge an interactive back gesture starts from.
BackGesture
A step of an interactive back gesture: Android’s predictive back, the iOS edge swipe. When the user lets go past the point of going back, the gesture ends with a back request instead of a step.
BlendMode
Blend mode used for draw primitives.
BlockingError
Failure to admit or complete blocking work.
BringIntoViewSpec
Where a scroll container puts a child that asks to be seen, such as a control that takes focus. Compose’s BringIntoViewSpec, which a container reads from local_bring_into_view_spec().
Brush
Describes how a shape, path or text is filled: a flat color or a gradient. Compose’s Brush.
BundledAssetError
Error reading an asset from the application bundle.
BundledAssetInstallOutcome
Result of installing a bundled asset set.
CameraError
Why a camera call failed.
CameraState
What the camera session is doing.
ColorFilter
Simple image color filter model.
CompositingStrategy
How a GraphicsLayer is composited into its parent. Compose’s CompositingStrategy.
Connectivity
Whether the device has a usable network path.
ContentEntry
One child of a ContentFolder.
ContentError
Errors produced while reading or writing content.
ContentScale
How an image is scaled to fit the bounds it is drawn into. Compose’s ContentScale.
ContentType
What a text field holds, so autofill and password managers can offer to fill it: Compose’s ContentType. Android, iOS and web pass it to the platform.
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.
Delivery
When WearableTransport::send returns.
DesktopWindowId
Names a desktop window while it is open.
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
A draw command and the phase of the node’s drawing in which it runs.
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.
DrawTransform
One step of DrawScope::with_transform, as Compose’s DrawTransform calls. Each step applies inside the steps before it.
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 typeface is read 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. How the shell paces its frames against the display.
GridCells
How a lazy grid splits its width into columns — Compose’s GridCells.
GuestViewError
Failure to size or draw a GuestView.
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
Why an HTTP transfer failed.
HttpMethod
The verbs a request can use.
ImageBitmapError
Errors returned while constructing an ImageBitmap.
ImagePickerError
Why an image could not be picked.
ImagePixelFormat
Storage format of an immutable bitmap.
ImageSampling
Texture sampling mode for image primitives.
ImageSource
Where an image comes from.
ImeAction
The action key a software keyboard shows, which Enter also runs in a single-line field: Compose’s ImeAction.
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
One event an interaction source received.
IntrinsicSize
Specifies how to size a component based on its intrinsic measurements.
KeyEventType
Type of keyboard event.
KeyboardCapitalization
Which letters a software keyboard capitalizes on its own: Compose’s KeyboardCapitalization. Only text keyboards capitalize.
KeyboardType
The keys a software keyboard offers: Compose’s KeyboardType.
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
The outline of a graphics layer, used for clipping and for its shadow.
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
Why a media call failed.
MemoryHeadroom
How much memory the host reports it has left.
MemoryPressure
How hard the platform asks for memory back.
Metering
Whether the active network path costs the user by the byte.
MicrophonePermission
Whether the application may record.
NestedScrollSource
What moved a scroll.
PageSize
How long a pager’s pages are along its axis — Compose’s PageSize.
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
Why the application directories could not be resolved.
PlaybackState
What the player is doing.
PointerButton
A button of a mouse or of a similar pointing device.
PointerEventKind
What a pointer event reports.
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
The events of one press on a node.
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.
RuntimeShaderUniformError
Error returned when a shader uniform write targets renderer-owned storage.
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
Why the share sheet could not be shown.
SlideDirection
Which way content slides across the edge of an AnimatedContent — Compose’s AnimatedContentTransitionScope.SlideDirection.
SliderOrientation
Main axis used by a Slider.
SnapPosition
Where in the pager a page comes to rest — Compose’s SnapPosition. It matters for a page shorter than the space between the content paddings.
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.
SubstrateSpec
A low-frequency copy of a shader’s source the renderer packs beside it and hands the shader through a reserved substrate region slot.
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.
SystemBarIcons
The color of the icons the platform draws in its status and navigation bars over the app.
SystemTheme
The light or dark appearance the operating system is set to.
TextDrawStyle
Whether glyphs are filled or only outlined.
TextFieldLineLimits
Line limit configuration for text fields.
TextObfuscationMode
How a secure field hides its text: Compose’s TextObfuscationMode.
TextOverflow
How overflowing text should be handled.
TextShaping
How much work the text shaper does for a paragraph.
TextVerticalAlign
Vertical placement of the text block inside the box it is drawn in.
ThermalState
The operating system’s thermal-pressure level.
TileMode
Edge treatment for blur effects at the boundary of the blurred region.
ToggleableState
Whether a check box or switch is on, off or partly on: Compose’s ToggleableState. A check box over a list whose items are partly checked is Indeterminate.
UiModeType
The kind of device the application runs on, as the type part of Android’s Configuration.uiMode (UI_MODE_TYPE_TELEVISION is UiModeType::Television).
UiString
Framework-owned strings. Applications override them in the cranpose-ui namespace.
UriHandlerError
Reason why UriHandler::open_uri failed.
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
Alpha value of a fully opaque image, the default for Image.
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 FontRegistry::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§

AnimateScroll
Scrolls a lazy list with a spring. A press on the list, or another animation, stops it where it is.
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).
BlockingSink
What a threaded_sink writes into, on the sink’s thread.
BoxScope
Child alignment modifiers for a Box.
BoxWithConstraintsScope
Scope exposed to BoxWithConstraints content.
BrowserHistory
Session history of the page.
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.
DesktopIntegration
Code a desktop app runs on the shell’s main thread, given to AppLauncher::with_desktop_integration. Every call does nothing by default.
DeviceInfo
Provides device and process information.
DrawScope
The drawing surface passed to draw modifiers. Compose’s DrawScope. Every method records a primitive in scope coordinates, with the origin at the top-left corner of the node, and the _blend forms composite with a given blend mode instead of SrcOver.
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.
LayoutData
Data a child’s modifier gives one kind of parent layout, which that layout’s measure policy reads by its type: a grid cell, or the data of an app’s own layout. Compose’s ParentDataModifierNode data. Every 'static type with Debug and PartialEq is layout data.
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.
NestedScrollConnection
A container’s part in the scrolls inside it.
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.
SubcomposeLayoutScope
Base trait for measurement scopes.
SubcomposeMeasureScope
Public trait exposed to measure policies for subcomposition.
UriHandler
Opens a URI, such as a web link, in the application the platform picks for it.
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§

AnimatedContent
Changes content with a transition when target_state changes.
AnimatedContentWithKey
AnimatedContent where content_key tells contents apart: a target whose key is the key of the content shown changes that content in place, with the new state and without a transition — Compose’s contentKey.
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.
BasicSecureTextField
A text field for a password or another secret, as Compose’s BasicSecureTextField: it shows its characters as SecureTextFieldOptions::obfuscation_character, asks for the platform’s secure keyboard, leaves the text out of copy, cut and accessibility, and keeps it out of debug output.
BasicText
Displays text in style with the given overflow, wrapping and line limits. Compose’s 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
Displays text in style with the given layout options. Compose’s BasicText.
BitmapPainter
Creates a painter that draws the whole bitmap.
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. Like Compose’s, it is inline: a state its content reads recomposes the composable that called it.
BoxWithConstraints
Composes content with a scope that exposes the incoming constraints. All children are placed at the top start corner. Compose’s 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. Like Compose’s, it is inline: a state its content reads recomposes the composable that called it.
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.
FocusWithin
Tells on_change whether keyboard focus is on a control composed in content: true when focus moves onto one of them, false when it leaves them all. The observer itself takes no focus, so Tab does not stop on it.
ForEach
Composes row once for each item of items, keyed by the item so that remembered state follows an item when the list changes order.
FrameEffect
Runs on_frame on every animation frame while running is true.
HorizontalPager
Pages side by side, page_count of them, each as high as the pager and as wide as spec says — Compose’s HorizontalPager. The pager needs a bounded size.
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
Emits a layout node whose children measure_policy measures and places. content composes the children. Compose’s Layout. Like Compose’s, it is inline: a state its content reads recomposes the composable that called it.
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.
LazyHorizontalGrid
Composes and measures the items needed for a horizontal grid’s viewport, in columns of cells from top to bottom — Compose’s LazyHorizontalGrid. A span gives an item more rows of its column, and a sticky header takes a whole column and holds the start edge.
LazyHorizontalStaggeredGrid
Composes and measures the items needed for a horizontal staggered grid’s viewport, in rows of their own widths — Compose’s LazyHorizontalStaggeredGrid.
LazyRow
Composes and measures the items needed for a horizontal viewport. Use LazyColumn for vertical lists.
LazyVerticalGrid
Composes and measures the items needed for a vertical grid’s viewport, in lines of cells — Compose’s LazyVerticalGrid. content adds the items as a LazyColumn’s does, and LazyItems::span gives an item more columns of its line. A sticky header takes a whole line and holds the top while the lines under it scroll.
LazyVerticalStaggeredGrid
Composes and measures the items needed for a vertical staggered grid’s viewport — Compose’s LazyVerticalStaggeredGrid. content adds the items as a LazyColumn’s does; an item whose LazyItems::span is the whole line takes the whole line.
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.
NestedScroll
Gives the scrollers composed in content the container connection, inside the containers around this call.
PredictiveBackHandler
BackHandler that also follows an interactive back gesture while it moves: Compose’s PredictiveBackHandler. on_gesture receives each step; a gesture that goes back ends in on_back, one that does not ends in BackGesture::Cancelled.
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
Provides the platform haptics to content through local_haptics.
ProvideImagePicker
Provides the platform image picker to content through local_image_picker.
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
Provides the platform notifier to content through local_notifier.
ProvideSaveableScope
Gives the rememberSaveable calls in content the saveable scope.
ProvideShareSheet
Provides the platform share sheet to content through local_share_sheet.
ProvideSystemTheme
Gives the content below it a fixed system theme, for a preview or a test.
ProvideUriHandler
Provides the platform URI handler to content through local_uri_handler.
Row
Places children from left to right, or right to left for an RTL layout. spec sets horizontal space and vertical alignment. Like Compose’s, it is inline: a state its content reads recomposes the composable that called it.
SeekableAnimatedContent
AnimatedContent that a gesture can hold part of the way toward another state, as predictive back does: while seek is set, its toward content shows at its fraction. When the gesture ends the change finishes or goes back from where it stood, depending on whether the target became toward.
SeekableCrossfade
Crossfade that a gesture can move part of the way, as Compose’s SeekableTransitionState moves a transition. While seek is set, the content for seek.toward shows beneath the target’s at seek.fraction, and the target’s at the rest. When the gesture ends, the target either becomes seek.toward or stays, and both contents animate on from where the gesture left them, with animation.
SharedBounds
Bounds that two contents of an AnimatedContent in a SharedTransitionLayout share by key while their contents differ, a card and the screen it opens: while the change between them runs, a box moves and resizes from the going content’s bounds to the coming content’s, drawn above both, and in it the going content fades out as the coming one fades in, each laid out to the box. Outside a change, or outside a SharedTransitionLayout, it is content in a box with modifier.
SharedElement
An element that two contents of an AnimatedContent in a SharedTransitionLayout share by key: while the change between them runs, it moves and resizes from the box the going content gives it to the box the coming content gives it, drawn above both. Outside a change, or outside a SharedTransitionLayout, it is content in a box with modifier.
SharedTransitionLayout
Gives the SharedElements composed in content their transitions, and draws the elements in flight above content.
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
Emits a layout node whose measure_policy composes its children during measurement, so the children can depend on the incoming constraints. Compose’s 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.
SystemBarAppearance
Shows icons in the status and navigation bars while this call stays in composition, for an app that paints its own background under the bars: Android’s light and dark system bar appearance, and the iOS status bar style. The most recent active call wins; when it leaves composition the one before it applies again, and with none left the bars follow the system theme. Platforms without system bars over the app ignore it.
Text
Displays plain or annotated text with the supplied style. The modifier controls layout, appearance and input around the text.
TextWithOptions
Displays value in style with the given text options. Compose’s Text.
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.
VerticalPager
Pages stacked from top to bottom — Compose’s VerticalPager.
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.
append_z_order_changes
Appends the nodes whose z index changed since the last call to output, after what it already holds.
application_directories
Returns typed directories for the registered application.
application_id
The registered application id, if a host has published one.
arrow_focus_target
The target an arrow key moves focus to, by Compose’s two-dimensional focus search: inside the focused target’s innermost focus group first, then in each group around it, then on the whole screen. A move that enters a focus_restorer group lands on the child that group last held, or on its fallback, and a move that leaves one makes the group remember the target focus left. Publishes the screen’s focus order for later crate::FocusManager moves.
audio_focus
What the rest of the device is doing with the output.
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.
browser_history
The page’s session history, or None outside a browser.
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_opened_links
Discards the links waiting for a collector. Used by tests and host teardown.
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_browser_history
Removes the installed history (tests and 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
Removes any registered platform notifier (tests and teardown).
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, recording into recording in place. A recording kept from an earlier frame keeps the capacity its buffers earned.
computedStateOf
A state whose value calculation works out on every read, as Kotlin’s computedStateOf. Unlike derivedStateOf, it keeps no cached value to read and needs no composition to be made in: a view model can hold one.
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.
copy_content
Copies from into to and commits it; progress hears the bytes copied so far after each chunk. Resolves with the bytes copied.
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.
current_memory_headroom
The memory the host of the current shell last reported it has left: MemoryHeadroom::Ample until it reports.
default_audio
The installed platform player, or a no-op one.
default_file_picker
The default chooser (the platform backend).
default_haptics
Returns the haptics that forward to the installed platform implementation. They do nothing while none is installed.
default_http_client
The platform’s HTTP client.
default_image_picker
Returns the image picker that forwards to the installed platform picker, or else to the file picker with an image filter.
default_notifier
Returns the notifier that forwards to the installed platform notifier. Without one, it uses the desktop notifier when the notifier-native feature is on, and otherwise does nothing.
default_share_sheet
Returns the share sheet that forwards to the installed platform share sheet. Without one, every share reports ShareError::Unsupported.
default_system_theme
Returns the system theme from the platform report or an earlier detection. When there is none, it detects the theme once and keeps the result. Detection yields Light where the platform cannot tell.
default_uri_handler
Returns the handler that opens a URI through a registered platform handler or else the built-in opener of the current platform.
delay
Resolves after duration has elapsed.
density
The device pixel grid in force here.
derivedStateOf
A state computed from other states, as in Kotlin.
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
Runs every command at size and returns the primitives they record, in command order.
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
The x of the caret at byte offset of text laid out in style with lines ending only at its line breaks.
get_offset_for_position
The byte offset of the caret nearest to the point (x, y) of text laid out in style with lines ending only at its line breaks, in logical pixels from its top left corner.
glass_material_folds_enabled
Whether liquid glass compiles a pipeline per material.
gpu_context
The GPU context of the window this composition draws into. None on platforms that do not share their device yet. On desktop a lost device is replaced and this returns the new one, so code that made GPU resources on the old device keys them on the context and makes them again.
has_focus_targets
Whether any node registered a focus target in this app context: with none, no search for a target to focus can find one.
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. Returns whether the system theme in scope is dark. Compose’s isSystemInDarkTheme.
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.
known_system_theme
The system theme the platform reported or a detection found, without detecting it: detecting runs a system command on macOS (defaults).
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
Lays text out in style with lines ending only at its line breaks.
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.
lazy_prefetch_pass_due
Whether an idle prefetch pass may run now: a lazy list waits for one and the next frame owes no measure or layout. A scroll leaves its list a measure for the frame to apply; a pass that took it would scroll the list outside the frame, and the frame, finding the list at rest, would release the items the pass composed ahead.
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_bring_into_view_spec
CompositionLocal carrying the BringIntoViewSpec of the scroll containers inside it, as LocalBringIntoViewSpec does in Compose. Without a provider it is the pivot spec on a TV, which keeps the focused item 30% into the container, and BringIntoViewSpec::Default elsewhere.
local_configuration
CompositionLocal carrying the Configuration, as LocalConfiguration does in Compose. A TV layout reads local_configuration().current().ui_mode_type == UiModeType::Television.
local_density
The StaticCompositionLocal carrying the device pixel grid.
local_eye
CompositionLocal carrying the eye of the window scene the content lies in, or None outside one.
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
The haptics a composable reads. It is the platform haptics unless a composition local provider above it supplies others.
local_http_client
The HTTP client a composable reads. It is the platform client unless a composition local provider above it supplies another one.
local_image_picker
The image picker a composable reads. It is the platform picker unless a composition local provider above it supplies another one.
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 StaticCompositionLocal 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
The notifier a composable reads. It is the platform notifier unless a composition local provider above it supplies another one.
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
The share sheet a composable reads. It is the platform share sheet unless a composition local provider above it supplies another one.
local_system_theme
The system theme a composable reads. It is the platform theme unless a ProvideSystemTheme above it supplies another one.
local_uri_handler
The URI handler a composable reads. It is the platform handler unless a composition local provider above it supplies another one.
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
Runs task for every item with at most concurrency tasks at a time, each on its own thread. Results keep the order of items. A concurrency of zero counts as one. Returns HttpError::WorkerPanicked when a task panics.
measure_layout
Runs the measure phase for the subtree rooted at root.
measure_layout_with_options
Runs the measure phase for the subtree rooted at root and builds only the trees that options select.
measure_text
Measures text in style with line breaks only at its line breaks, at the system font scale.
measure_text_with_options
Measures text wrapped to max_width under options. None and widths that are not positive and finite mean no width limit.
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.
microphone_standby_stopped
The person ended the standby from its notification. Platform backends call it.
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.
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
Creates an empty snapshot-aware list. Must be called during composition.
mutableStateListOf
Creates a snapshot-aware list holding values. Must be called during composition. Compose’s mutableStateListOf.
mutableStateMap
Creates an empty snapshot-aware map. Must be called during composition.
mutableStateMapOf
Creates a snapshot-aware map holding pairs. Must be called during composition. Compose’s 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 a default that knows nothing.
network_status
The current network status. A stopped platform monitor gets a reconnect attempt first.
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_metadata
Registers observer for the metadata set_media_metadata gives the open item, such as a cover that finished loading after playback started.
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_opened_links
Registers observer for opened links, replaying the ones that arrived before there was anywhere to put them.
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.
on_microphone_standby_stop
Runs stopped when the person ends the standby from its notification. The standby has stopped then; the application drops its leases and shows that it no longer waits.
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_threaded
Opens a source with open on a thread of its own and reads it there, DEFAULT_CHUNK_LEN bytes at a time and at most MAX_PENDING_CHUNKS chunks ahead of the reader. The future resolves once the source is open; map_error describes a read that fails later.
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
Lays text out in style wrapped to max_width under options.
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_opened_link
Publishes a link the application was opened with. Platform hosts call it from any thread; the framework moves each link onto the UI thread before a composition sees it.
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_gesture
Record a step of an interactive back gesture (called by the platform backend). The innermost PredictiveBackHandler receives it; a BackHandler there ignores it.
push_back_request
Record a system back request (called by the platform backend’s gesture / button handler).
read_full
Reads from source until buffer is full or the source ends, and returns how many bytes came: fewer than the buffer holds only at the end.
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
Returns the value init made on the first composition at this call site. Later compositions return the same value until the call site leaves the composition. Compose’s 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.
rememberExportFileLauncher
Remembers an export launcher under request_key.
rememberEye
An Eye kept across recompositions, made at pose the first time.
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.
rememberLazyGridState
A LazyGridState that starts at the top.
rememberLazyListState
Creates a remembered LazyListState with default initial position.
rememberLazyListStateWithPosition
Creates a remembered LazyListState with the specified initial position.
rememberLazyStaggeredGridState
A LazyStaggeredGridState that starts at the top.
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
Returns an interaction source that stays the same across recompositions.
rememberMutableStateOf
A composable hook that creates and remembers a MutableState.
rememberMutableStateOfNeverEqual
Like rememberMutableStateOf, for a value that cannot be compared or whose every write must count as a change.
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.
rememberOpenedLinks
Collects the links the application is opened with for as long as this call stays in the composition — what Android’s onNewIntent and the launch intent’s data give an activity.
rememberPagerState
A PagerState that starts on initial_page.
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
Parses bytes once for the calling composition position and returns the same painter on later recompositions. The cache key is the address and length of bytes.
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.
retain
Compose’s retain: returns the value factory made, at the first composition of this call site in the current SaveableScope under key, and the same value after the composable leaves the composition and comes back, for as long as the scope lives. A navigation host gives each back-stack entry its own scope, so a screen gets its value back while its entry stays on the back stack, and the value is dropped when the entry is popped. In the root scope the value is dropped as soon as no composable holds it, as remember drops its value.
retained_measure_count
Number of subcompose measure passes on this thread that kept the slots of their last pass as they were and composed nothing, as a lazy list’s pass for a scroll that keeps its items. Diagnostic surface for tests and telemetry.
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.
run_threaded
Runs work on the shared bounded blocking executor (cranpose_core::withBlocking) and resolves with what it returns. A burst of work waits for the executor’s threads without blocking the caller.
scale_in
Scales in the content from initial_scale of its size, about its centre.
scale_out
Scales out the content towards target_scale of its size, about its centre.
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.
schedule_z_order_change
Records that node_id’s z index changed. The frame rebuilds the layer of its parent, which holds the order the parent’s children draw and take taps in.
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.
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_glass_material_folds
Turns per-material folding on or off for this process.
set_host_controller
Installs the framework host controller.
set_idle_prefetch_passes
Says whether the shell on this thread runs idle prefetch passes between frames, as with_lazy_prefetch_pass describes. Where they run, a list leaves to them the new items beyond its viewport that its scroll does not reach within two frames, all of them at rest; where they do not, it composes them in its frame. Call it before the shell’s first composition.
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_memory_headroom
Sets the memory the current shell’s host has left. Lazy layouts read it on their next measure. Call it on the shell’s thread, inside its context.
set_microphone_standby_notice
Says what the standby’s notification shows and how its action is named.
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_browser_history
Installs the page’s history, replacing any previously installed 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
Installs a platform notifier, replacing any previous one.
set_platform_power_monitor
Installs the platform power monitor.
set_platform_preferences
Installs the platform preferences backend, replacing any previous one.
set_platform_purchases
Installs a purchase backend, replacing any previous one.
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_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_fonts
Lays text out with fonts in the active app context from now on. Panics when no app context is active.
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_horizontally
Slides in the content horizontally from initial_offset_fraction of its own width: 1.0 starts one width to the right, -1.0 one to the left.
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_into_container
Slides in the content across the container’s edge towards a direction: toward SlideDirection::Left it comes from just past the container’s right edge. The container is the AnimatedContent it changes in.
slide_out_horizontally
Slides out the content horizontally towards target_offset_fraction of its own width.
slide_out_of_container
Slides out the content across the container’s edge towards a direction: toward SlideDirection::Left it ends just past the container’s left edge.
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_bar_icons
The icons the most recent active SystemBarAppearance asks for, or SystemBarIcons::FollowSystem when none is in composition.
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_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.
take_requested_focus_move
Takes the move a keyboard action asked for, which the app shell makes after each key and keyboard action event.
threaded_sink
A ContentSink that writes into sink on a thread of its own; each write resolves once sink took the bytes.
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.
z_index_in_use
Whether a z_index modifier is attached anywhere on this thread, or a node’s last placement gave a child a z index. While neither is so, the scene keeps every node’s children in composition order without reading their z indices.
z_index_modifier_in_use
Whether a z_index modifier is attached anywhere on this thread. While none is, only a node whose last placement gave a child a z index orders its children by z index.

Type Aliases§

AppInfoRef
Shared handle to an AppInfo.
AppUpdaterRef
Shared updater service.
AudioPlayerRef
Shared handle to the installed AudioPlayer.
BackgroundActivityRef
Shared handle to a BackgroundActivity.
BrowserHistoryRef
Shared handle to a BrowserHistory.
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
Shared handle to a DeviceInfo.
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
Shared handle to a Haptics implementation.
HeartRateMonitorRef
Shared handle to a HeartRateMonitor.
HostControllerRef
Shared handle to a HostController.
HostSurfaceRef
Shared handle to a HostSurface.
HttpBodyRef
Shared handle to a response body.
HttpClientRef
Shared handle to an HttpClient.
HttpFuture
The future that an HTTP operation returns. It is Send, so it can run on any thread.
ImagePickerRef
Shared handle to an ImagePicker.
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
Shared handle to a NetworkMonitor.
NotifierRef
Shared handle to a Notifier.
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
Shared handle to a ShareSheet.
SourceResolver
Resolves a shared handle to its ByteSource, or None if not shared.
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
Shared handle to a UriHandler.
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 and stores no parameters: as Compose’s inline composables, it composes in its caller’s group, where what it composes is matched by position, as a loop’s items are, so a state it or its content reads recomposes the composable that called it.