// repr(C,u8) FFI enum: boxing the large variant would change the C ABI (api.json bindings); size
/// This struct consolidates all readonly references that callbacks need to query window state.
pub current_scroll_manager: &'a BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, ScrollPosition>>,
/// Callbacks for creating threads and getting the system time (since this crate uses `no_std`)
/// Cloned from the Callback struct before invocation. Native Rust callbacks have this as None.
/// Information about the callback that is passed to the callback whenever a callback is invoked
/// The `changes` field uses a pointer to Arc<Mutex<...>> so that cloned `CallbackInfo` instances
/// * `UpdateVersion`: opens the update dialog and starts the async check (manifest + changelog;
pub fn switch_route(&mut self, pattern: AzString, params: azul_core::window::StringPairVec) {
/// AzCallbackInfo_setRouteParam(&info, AzString_fromConstStr("id"), AzString_fromConstStr("99"));
pub fn get_media_state(&self, node: DomNodeId) -> azul_core::media_player::OptionPlaybackState {
pub fn get_all_children_nodes(&self, dom_id: DomId, node_id: NodeId) -> NodeHierarchyItemIdVec {
pub fn scroll_to_animated(&mut self, dom_id: DomId, node_id: NodeId, target: LogicalPosition) {
pub const fn get_cursor_relative_to_node(&self) -> azul_core::geom::OptionCursorNodePosition {
pub fn format_decimal(&self, locale: &str, integer_part: i64, decimal_places: i16) -> AzString {
/// info.pluralize("en", count, "no items", "1 item", "2 items", "{} items", "{} items", "{} items")
/// info.pluralize("pl", count, "brak", "1 element", "2 elementy", "{} elementy", "{} elementów", "{} elementów")
pub fn inject_native_gesture(&mut self, gesture: crate::managers::gesture::NativeGestureEvent) {
pub fn get_media_control_request(&self) -> azul_core::media_session::OptionMediaControlRequest {
pub fn get_hovered_nodes_frames_ago(&self, frames_ago: usize) -> azul_core::dom::DomNodeIdVec {
pub fn get_scroll_state(&self, dom_id: DomId, node_id: NodeId) -> Option<&AnimatedScrollState> {
// These methods allow callbacks to inspect pending operations and modify them before execution
// repr(C,u8) FFI enum: boxing the large variant would change the C ABI (api.json bindings); size
// repr(C,u8) FFI enum: boxing the large variant would change the C ABI (api.json bindings); size
matches!(&changes[1], CallbackChange::ShowTooltip { text, position } if text.as_str() == "🌍" && position.x.is_nan())
matches!(&changes[2], CallbackChange::ShowTooltip { text, .. } if text.as_str().len() == 100_000)
matches!(&changes[0], CallbackChange::ChangeNodeCssProperties { properties, .. } if properties.is_empty())
matches!(&changes[0], CallbackChange::SwitchRoute { pattern, params } if pattern.as_str() == "/user/:id" && params.len() == 1)