Skip to main content

Crate sui_runtime

Crate sui_runtime 

Source

Structs§

Application
ArrangeCtx
AsyncTaskInspectorSnapshot
CacheMetrics
CacheMetricsDelta
Command
Borrowed view of a command while it is delivered on the UI thread.
CommandCtx
Context supplied to window and application command controllers.
CommandDispatchSample
One application-command delivery attempt retained in the next frame.
CommandKey
A process-local, strongly typed command identifier.
CommandSender
Cloneable, thread-safe producer for application commands.
DpiInfo
EmbeddedSvgImageResource
EventCtx
EventRouteStep
EventRouteTraceSample
Privacy-safe event routing trace. Event payloads and typed characters are intentionally not retained.
FocusScope
Retains focus history for a stable child subtree.
FocusScopeState
Shared retained focus history for a FocusScope.
FocusState
FramePhaseSample
FrameSchedule
InspectorHistorySnapshot
InvalidationTraceSample
The origin and optional caller explanation for a scheduled invalidation.
KeyedChildren
Layout-neutral retained child collection reconciled by stable application keys.
KeyedReconcile
LayerOptions
LayoutContext
LayoutWorkSnapshot
MeasureCtx
Motion
A value the runtime animates for a widget.
MotionPolicy
The motion policy in effect: the user’s MotionPreference plus a time scale for watching transitions in slow motion while debugging.
OverlayDismissPolicy
OverlayDismissRequest
OverlayFocusBehavior
Focus behavior shared by every transient presentation policy.
OverlayManagerSnapshot
OverlayOptions
Runtime behavior declared by the logical owner of an overlay.
OverlaySnapshot
OverlayTraceSample
PaintCtx
PresentationLatencyDiagnostics
ReactiveInvalidationSample
RenderDiagnostics
RenderOutput
RendererSubmissionDiagnostics
RetainedPacketHotspotDiagnostics
RetainedPacketRebuildDiagnostics
Runtime
SafeAreaInsets
SceneStatistics
SchedulerInspectorSnapshot
SemanticsCtx
SingleChild
StackHostOptions
StackHostSnapshot
StackSurfaceOptions
TextCacheDeltaDiagnostics
TextCacheDiagnostics
TimerInspectorSnapshot
WidgetChildren
WidgetDiagnostic
One opt-in diagnostic value published by a widget for live inspection.
WidgetDiagnosticsCtx
Collector passed to Widget::diagnostics.
WidgetDiagnosticsSnapshot
On-demand widget-specific state included in an inspector snapshot.
WidgetGeometrySnapshot
WidgetGraphSnapshot
WidgetNodeSnapshot
WidgetPod
Standard retained-widget adapter used by the SUI runtime.
WidgetRebuildSample
WidgetTimingSample
WindowBuilder
WindowCursorState
Desired host cursor state for one runtime window.
WindowInspectorSnapshot
Renderer-neutral, point-in-time state consumed by testing tools and live inspector UIs. Capturing widget-specific diagnostics is opt-in and happens only while this snapshot is requested.
WindowPerformanceSnapshot
WindowPerformanceSummary
WindowRenderOptions

Enums§

CommandDelivery
CommandTarget
EventPhase
EventRoutePhase
FocusRestorePolicy
FramePacing
How a window’s animation frames are timed.
FramePhase
MotionPreference
How much motion the user wants to see.
OutputColorRange
How far a window’s output reaches beyond sRGB and SDR white.
OverlayDismissReason
OverlayInitialFocus
OverlayKind
Broad behavior category used by diagnostics and accessibility adapters.
OverlayModality
OverlayTraceKind
PaintBoundaryMode
SceneStatisticsDetailMode
StackOrderPolicy
WidgetTimingPhase
WindowColorManagementMode
WindowDynamicRangeMode
WindowIcon
WindowOutputColorPrimaries
WindowToneMappingMode

Constants§

COMMAND_HISTORY_LENGTH
How many dispatches each window’s history keeps.
DEFAULT_SUI_LOGO_SVG
EXTERNAL_WAKE_KIND
Legacy root-event kind. Platform wakes no longer synthesize this event; use CommandSender and window/application controllers instead.
OVERLAY_DISMISS_REQUEST
Typed runtime-to-widget request used for centralized dismissal arbitration.
REACTIVE_CHANGED
Internal typed notification delivered to widgets whose observable dependencies changed.

Traits§

AnimateCtx
A context that can start Motion transitions: event, measure, and arrange contexts.
CommandController
Non-widget application service that receives commands on the UI thread. Controllers are owned by their application/window builder and are dropped automatically with that owner.
FrameClock
Something that knows the time of the frame being produced: widget contexts, or a plain time in seconds.
Widget
WidgetPodMutVisitor
WidgetPodVisitor

Functions§

app_motion_preference
The app’s motion preference override, if any.
begin_layout_work_collection
Start a collector on the current UI thread. No per-widget allocation occurs. Returns false when this build does not include layout-diagnostics.
clear_window_performance_snapshot
clear_window_performance_snapshots
clear_window_render_options
default_sui_logo_image
motion_policy
The motion policy in effect on this UI thread: the app’s preference if it set one, otherwise the system’s, with the current time scale.
motion_time_scale
How fast transitions play relative to their nominal durations.
publish_window_performance_snapshot
reset_motion_settings
Forget the system preference, app override, and time scale. Test harnesses call this so each app starts from full motion.
set_app_motion_preference
Override the system’s motion preference for this app, or pass None to follow the system again.
set_motion_time_scale
Play transitions at time_scale speed: 0.25 shows them at quarter speed. Meant for inspecting motion while developing.
set_system_motion_preference
Record the operating system’s motion preference. Platform backends call this at startup and when the setting may have changed.
set_window_output_color_range
Record what window_id’s output can show. Widgets observing window_output_color_range_signal are invalidated when it changes.
set_window_render_options
set_window_scene_statistics_detail_mode
system_motion_preference
The operating system’s motion preference, as reported by the platform.
take_layout_work_collection
window_command_dispatches_signal
The commands window_id delivered most recently, oldest first, up to COMMAND_HISTORY_LENGTH of them. Each sample is one attempt to deliver a command in the window: to a widget, to the focused widget, or to the window’s or the application’s listeners, with the handlers that ran and whether one handled it. Observe it to follow commands as they arrive.
window_output_color_range
What window_id’s output can show, once the platform has said.
window_output_color_range_signal
What window_id’s output can show, as a signal to observe. It holds None until the platform has said, as it does without a platform.
window_performance_snapshot
window_performance_summary
window_performance_text_caches
window_render_options
window_scene_statistics_detail_mode

Type Aliases§

WindowStemDarkening
A window’s stem darkening, the scene’s sui_scene::TextRenderStemDarkening.
WindowTextCoveragePolicy
A window’s text coverage policy, the scene’s sui_scene::TextRenderCoveragePolicy.
WindowTextHinting
A window’s text hinting, the scene’s sui_scene::TextRenderHinting.
WindowTextSubpixelOrder
A window’s text subpixel order, the scene’s sui_scene::TextSubpixelOrder.