properties
Structs
ExpandedNodeIdentifier
Stable runtime identifier assigned to an expanded node.
Properties
0
Type: u32
Implementations
to_u32
pub fn to_u32(&self) -> u32
Convert to the integer id passed across chassis message boundaries.
ExpressionContext
Data structure used for dynamic injection of values into Expressions, maintaining a pointer e.g. to the current stack frame to enable evaluation of properties & dependencies
Properties
stack_frame
Type: Rc<RuntimePropertiesStackFrame>
RuntimeContext
Shared context for properties pass recursion
Properties
application
Type: ApplicationInstance
property_graph
Type: PropertyGraph
Owner-thread bridge for application properties.
layer_count
Type: Cell<usize>
dirty_canvases
Type: Rc<RefCell<Vec<bool>>>
Implementations
add_to_cache
pub fn add_to_cache(&self, node: &Rc<ExpandedNode>)
Add a node to runtime lookup caches.
canvas_geometry_for_node
pub fn canvas_geometry_for_node(&self, node: &ExpandedNode) -> Rc<PreparedCanvasGeometry>
Obtain the same prepared record used by spatial replay selection.
canvas_node_light_mask
pub fn canvas_node_light_mask(&self, id: ExpandedNodeIdentifier) -> u32
Return the direct-light membership mask resolved for a retained canvas node.
canvas_nodes_intersecting
pub fn canvas_nodes_intersecting(&self, layer: usize, regions: &[Rect]) -> Option<Vec<u32>>
Select canvas nodes using settled runtime geometry, even before their first draw. Call after draining scene effects; querying does not advance layout or dispatch events.
canvas_surface_transform_for_node
pub fn canvas_surface_transform_for_node(&self, node: &ExpandedNode) -> Affine
Resolve a node's local coordinates into its owning canvas's content space. Scroller-owned layers use the registered owner's origin; root layers use window coordinates. Detached mask sources retain their scene transform until capture projection. Physical tile offsets are applied later by the renderer.
capture_touch_target
pub fn capture_touch_target(&self, identifier: i64, target: ExpandedNodeIdentifier)
Route a touch sequence to the node hit at touch-down, even after the finger moves away.
captured_touch_target
pub fn captured_touch_target(&self, identifier: i64) -> Option<Rc<ExpandedNode>>
Resolve the node captured for an active touch sequence.
clear_all_dirty_canvases
pub fn clear_all_dirty_canvases(&self)
Mark every canvas layer clean.
clear_layer_scroller_owners
pub fn clear_layer_scroller_owners(&self)
Clear render-layer-to-scroller ownership before recomputing occlusion.
clear_root_expanded_node
pub fn clear_root_expanded_node(&self)
Clear the registered root expanded node.
clear_visual_viewport_state
pub fn clear_visual_viewport_state(&self)
Clear cached visual viewport state.
collect_scene_lighting_for_layer
pub fn collect_scene_lighting_for_layer(&self, layer: usize) -> SceneLighting
Resolve registered direct/ambient contributors in the target layer's coordinates.
Light values remain live on every render; retained node masks are rebuilt only when selected light slots, lexical scope, or scene structure changes. Contributors are independent of viewport visibility, and an unlit scene needs no node scan.
get_elements_beneath_ray
pub fn get_elements_beneath_ray(&self, root: Option<Rc<ExpandedNode>>, ray: Point2<Window>, limit_one: bool, accum: Vec<Rc<ExpandedNode>>, hit_invisible: bool) -> Vec<Rc<ExpandedNode>>
Simple 2D raycasting: the coordinates of the ray represent a
ray running orthogonally to the view plane, intersecting at
the specified point ray. Areas outside of clipping bounds will
not register a hit, nor will elements that suppress input events.
get_expanded_node_by_eid
pub fn get_expanded_node_by_eid(&self, id: ExpandedNodeIdentifier) -> Option<Rc<ExpandedNode>>
Look up an expanded node by runtime id.
get_expanded_nodes_by_global_ids
pub fn get_expanded_nodes_by_global_ids(&self, uni: &UniqueTemplateNodeIdentifier) -> Vec<Rc<ExpandedNode>>
Finds all ExpandedNodes with corresponding UniqueTemplateNodeIdentifier
get_expanded_nodes_by_id
pub fn get_expanded_nodes_by_id(&self, id: &str) -> Vec<Rc<ExpandedNode>>
Finds all ExpandedNodes with the CommonProperty#id matching the provided string
get_layer_scroller_owner
pub fn get_layer_scroller_owner(&self, layer_id: usize) -> Option<ExpandedNodeIdentifier>
Find the scroller that owns a render layer, when one exists.
get_root_scroller_id
pub fn get_root_scroller_id(&self) -> Option<u32>
Current page-scroll-backed root scroller id.
get_screenshot_map
pub fn get_screenshot_map(&self) -> Rc<RefCell<HashMap<u32, ScreenshotData>>>
Shared screenshot capture map keyed by request id.
get_scroller_surface_scroll
pub fn get_scroller_surface_scroll(&self, id: u32) -> Option<(f64, f64)>
Fetch the presentation scroll offset for a native scroller surface, falling back to the authoritative scroll position when presentation scroll is unavailable.
get_scroller_surface_state
pub fn get_scroller_surface_state(&self, id: u32) -> Option<ScrollerSurfaceState>
Fetch cached scroller surface state by node id.
get_topmost_element_beneath_ray
pub fn get_topmost_element_beneath_ray(self: &Rc<Self>, ray: Point2<Window>) -> Option<Rc<ExpandedNode>>
Alias for get_elements_beneath_ray with limit_one = true
get_visual_viewport_state
pub fn get_visual_viewport_state(&self) -> Option<VisualViewportState>
Return cached browser visual viewport state, if available.
is_canvas_dirty
pub fn is_canvas_dirty(&self, id: &usize) -> bool
Check whether a canvas layer needs redraw.
layer_has_canvas_drawables
pub fn layer_has_canvas_drawables(&self, layer: usize) -> bool
Return whether a render layer currently has canvas work to paint.
load_screenshot
pub fn load_screenshot(&self, id: u32, data: ScreenshotData) -> bool
Store a screenshot payload delivered by the chassis.
mark_node_occlusion_dirty
pub fn mark_node_occlusion_dirty(&self, id: u32)
Invalidate native compositing after a node's paint or coverage changes. Detached source changes reconcile their owning mask in the visible scene.
mark_scene_lighting_dirty
pub fn mark_scene_lighting_dirty(&self)
Schedule lighting resolution without invalidating canvas geometry or contents. The retained renderer decides which surfaces depend on the changed lights.
new
pub fn new(globals: Globals) -> Self
Create a runtime context for normal app execution.
occlusion_stats
pub fn occlusion_stats(&self) -> OcclusionStats
Cumulative work performed by native compositing, including conservative rebuilds.
prepare_scene_geometry
pub fn prepare_scene_geometry(&self)
Prepare geometry dirtied by scene changes. Surface replay alone does not invalidate it.
register_layer_scroller_owner
pub fn register_layer_scroller_owner(&self, layer_id: usize, scroller_id: ExpandedNodeIdentifier)
Record that a render layer is owned by a particular scroller.
register_root_expanded_node
pub fn register_root_expanded_node(&self, root: &Rc<ExpandedNode>)
Store the root expanded node after it has been initialized.
release_touch_target
pub fn release_touch_target(&self, identifier: i64) -> Option<Rc<ExpandedNode>>
Release and resolve the node captured for a completed touch sequence.
remove_from_cache
pub fn remove_from_cache(&self, node: &Rc<ExpandedNode>)
Remove a node from runtime lookup caches.
remove_scroller_surface_state
pub fn remove_scroller_surface_state(&self, id: u32)
Remove cached scroller surface state.
request_canvas_replay
pub fn request_canvas_replay(&self, update: ReplayCanvasLayerUpdate)
Apply a backend's replay region request through the shared scene index.
resize_canvas_layers_to
pub fn resize_canvas_layers_to(&self, id: usize)
Ensure the dirty-canvas table has entries up to the requested layer count.
safe_area_insets
pub fn safe_area_insets(&self) -> LocalProperty<SafeAreaInsets>
Live native safe-area data used by opt-in layout primitives. Defaults to zero.
scene_geometry_stats
pub fn scene_geometry_stats(&self) -> SceneGeometryStats
Work counters for geometry preparation and spatial queries.
set_canvas_dirty
pub fn set_canvas_dirty(&self, id: usize)
Mark a canvas layer dirty.
set_canvas_drawable_layers
pub fn set_canvas_drawable_layers(&self, layers: HashSet<usize>)
Replace the set of render layers that currently contain canvas drawables.
set_root_scroller_id
pub fn set_root_scroller_id(&self, id: Option<u32>)
Mark which node currently delegates root scrolling behavior to the page.
set_safe_area_insets
pub fn set_safe_area_insets(&self, insets: SafeAreaInsets)
Update native safe-area data without changing the viewport or root layout.
set_scroller_surface_state
pub fn set_scroller_surface_state(&self, id: u32, state: ScrollerSurfaceState) -> ScrollerSurfaceStateChange
Remember browser-owned scroller state for native compositing and scroll transforms.
set_visual_viewport_state
pub fn set_visual_viewport_state(&self, state: VisualViewportState)
Cache the browser visual viewport state for root scroller math.
update_scroller_surface_scroll
pub fn update_scroller_surface_scroll(&self, id: u32, scroll_x: f64, scroll_y: f64, presentation_scroll_x: f64, presentation_scroll_y: f64) -> ScrollerSurfaceStateChange
Update hot scroll offsets for an existing native scroller surface without touching structural state.
viewport_proximity_stats
pub fn viewport_proximity_stats(&self) -> ViewportProximityStats
Observation counters. With no proximity bindings, no observation records are installed.
RuntimePropertiesStackFrame
Data structure for a single frame of our runtime stack, including
a reference to its parent frame and properties for
runtime evaluation, e.g. of Expressions. RuntimePropertiesStackFrames also track
timeline playhead position.
Components push RuntimePropertiesStackFrames before computing properties and pop them after computing, thus providing a
hierarchical store of node-relevant data that can be bound to symbols in expressions.
ScrollerSurfaceState
Last-known scroll state for a native or browser-owned scroller surface.
Properties
viewport_width
Type: f64
viewport_height
Type: f64
content_width
Type: f64
content_height
Type: f64
scroll_x
Type: f64
scroll_y
Type: f64
presentation_scroll_x
Type: f64
presentation_scroll_y
Type: f64
clip_content
Type: bool
VisualViewportState
Browser visual viewport state used when page scrolling participates in root scroller behavior.
Properties
width
Type: f64
height
Type: f64
offset_x
Type: f64
offset_y
Type: f64
page_scroll_x
Type: f64
page_scroll_y
Type: f64
Enums
ScrollerSurfaceStateChange
Coarse classification of changes to a native or browser-owned scroller surface.