pub struct RuntimeInner<A> {Show 14 fields
pub states: Rc<RefCell<StateStore>>,
pub actions: Vec<A>,
pub dirty_elements: HashMap<ElementTreeId, HashMap<ElementId, Invalidation>>,
pub clipboard: Rc<dyn ClipboardProvider>,
pub external_url_opener: Rc<dyn ExternalUrlOpener>,
pub open_url_errors: Vec<OpenUrlError>,
pub close_requested: bool,
pub window_chrome_ops: Vec<(LogicalWindowId, WindowChromeOp)>,
pub pending_focus_keys: HashMap<ElementTreeId, String>,
pub presentation_scopes: HashMap<ElementTreeId, (LogicalWindowId, PresentationGeneration)>,
pub popup_portal: Rc<RefCell<PopupPortal<A>>>,
pub popup_ids_by_element: HashMap<(ElementTreeId, ElementId), PopupId>,
pub popup_intents: Vec<PopupIntent>,
pub popup_errors: Vec<PopupPortalError>,
/* private fields */
}Expand description
Shared mutable storage behind every RuntimeHandle clone.
This low-level type is public for provider integrations but is normally
accessed through handle methods. Public collections span every retained-tree
namespace sharing the value. The type is UI-thread-local and intended to
remain behind Rc<RefCell<_>>; direct mutation can bypass coalescing,
diagnostics, error recording, and cleanup invariants.
§Examples
use ailloli_ui_runtime::app::RuntimeInner;
let inner = RuntimeInner::<String>::new();
assert!(inner.actions.is_empty());
assert!(!inner.close_requested);Fields§
§states: Rc<RefCell<StateStore>>Shared type-erased retained component-state slots.
actions: Vec<A>Global FIFO application actions awaiting a host drain.
dirty_elements: HashMap<ElementTreeId, HashMap<ElementId, Invalidation>>Coalesced tree-local invalidations keyed by retained element.
clipboard: Rc<dyn ClipboardProvider>Active shared clipboard provider.
external_url_opener: Rc<dyn ExternalUrlOpener>Active shared validated external-URL opener.
open_url_errors: Vec<OpenUrlError>FIFO URL-opening failures not yet drained.
close_requested: boolClose requested; consumed by winit via take_close_requested.
window_chrome_ops: Vec<(LogicalWindowId, WindowChromeOp)>Pending minimize/maximize per logical window id (Window::new("main")).
pending_focus_keys: HashMap<ElementTreeId, String>Last pending focus key per retained-tree namespace.
presentation_scopes: HashMap<ElementTreeId, (LogicalWindowId, PresentationGeneration)>Current logical window/generation per retained-tree namespace.
popup_portal: Rc<RefCell<PopupPortal<A>>>Shared popup registry and z-order authority.
popup_ids_by_element: HashMap<(ElementTreeId, ElementId), PopupId>Stable popup ID reservation per tree-local owner element.
popup_intents: Vec<PopupIntent>Global FIFO backend-facing popup intents.
popup_errors: Vec<PopupPortalError>FIFO errors recorded by handle popup helpers.
Implementations§
Source§impl<A> RuntimeInner<A>
Constructors for raw shared runtime storage.
impl<A> RuntimeInner<A>
Constructors for raw shared runtime storage.
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates empty shared state with deterministic in-memory providers.
Service IDs start at one, popup IDs start at one inside the portal, and allocated tree namespaces start at zero. No capacity limit is imposed on the runtime-owned queues/maps apart from the bounded diagnostics ring.
§Examples
use ailloli_ui_runtime::app::{ClipboardProvider, RuntimeInner};
let inner = RuntimeInner::<()>::new();
assert_eq!(inner.clipboard.read_text().as_deref(), Some(""));
assert!(inner.dirty_elements.is_empty() && inner.popup_errors.is_empty());Trait Implementations§
Source§impl<A> Default for RuntimeInner<A>
Delegates to RuntimeInner::new.
impl<A> Default for RuntimeInner<A>
Delegates to RuntimeInner::new.