euv-core 0.48.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
/// Empty dirty bitmask.
pub const DIRTY_NONE: u16 = 0;

/// Layout geometry needs recomputation for this node.
pub const DIRTY_LAYOUT: u16 = 1 << 0;

/// Visual paint commands need rebuilding for this node.
pub const DIRTY_PAINT: u16 = 1 << 1;

/// Text measurement and shaping need recomputation.
pub const DIRTY_TEXT: u16 = 1 << 2;

/// Children list mutated.
pub const DIRTY_CHILDREN: u16 = 1 << 3;

/// Scroll offset mutated.
pub const DIRTY_SCROLL: u16 = 1 << 4;

/// A descendant requires layout recomputation.
pub const DIRTY_SUBTREE_LAYOUT: u16 = 1 << 5;

/// A descendant requires repainting.
pub const DIRTY_SUBTREE_PAINT: u16 = 1 << 6;

/// Composite-only property mutated (transform, opacity, or scroll offset) requiring neither layout nor repaint.
pub const DIRTY_COMPOSITE: u16 = 1 << 7;

/// A descendant requires composite-only update.
pub const DIRTY_SUBTREE_COMPOSITE: u16 = 1 << 8;

/// All dirty flags combined for freshly mounted nodes.
pub const DIRTY_ALL: u16 = DIRTY_LAYOUT
    | DIRTY_PAINT
    | DIRTY_TEXT
    | DIRTY_CHILDREN
    | DIRTY_SCROLL
    | DIRTY_SUBTREE_LAYOUT
    | DIRTY_SUBTREE_PAINT
    | DIRTY_COMPOSITE
    | DIRTY_SUBTREE_COMPOSITE;

/// Per-node structural flag indicating the arena slot is live.
pub const NODE_FLAG_ALIVE: u16 = 1 << 0;

/// Per-node structural flag indicating lazily boxed `NodeExtras` metadata is allocated.
pub const NODE_FLAG_HAS_EXTRAS: u16 = 1 << 1;

/// Per-node structural flag indicating at least one direct child has a non-zero `z_index`.
pub const NODE_FLAG_HAS_NONZERO_Z_CHILD: u16 = 1 << 2;

/// Per-node structural flag indicating a top-layer `Portal` or `Position::Fixed` node.
pub const NODE_FLAG_IS_PORTAL: u16 = 1 << 3;

/// Per-node structural flag indicating an active `Overflow::Scroll` container.
pub const NODE_FLAG_IS_SCROLL_CONTAINER: u16 = 1 << 4;

/// Per-node structural flag indicating one or more attached `Lifecycle` observers.
pub const NODE_FLAG_HAS_LIFECYCLE: u16 = 1 << 5;

/// Per-node structural flag indicating an attached reactive ownership `Scope`.
pub const NODE_FLAG_HAS_SCOPE: u16 = 1 << 6;

/// Per-node structural flag indicating the node is currently enqueued in `SceneTree::dirty_paint_nodes`.
pub(crate) const NODE_FLAG_IN_DIRTY_PAINT_QUEUE: u16 = 1 << 7;

pub(crate) const DIRTY_LAYOUT_PASS_MASK: u16 =
    DIRTY_LAYOUT + DIRTY_SUBTREE_LAYOUT + DIRTY_TEXT + DIRTY_CHILDREN;

pub(crate) const DIRTY_CHILDREN_CHANGE_MASK: u16 = DIRTY_LAYOUT + DIRTY_PAINT + DIRTY_CHILDREN;

pub(crate) const DIRTY_TEXT_CHANGE_MASK: u16 = DIRTY_LAYOUT + DIRTY_PAINT + DIRTY_TEXT;

pub(crate) const DIRTY_ANCESTOR_LAYOUT_TRIGGER: u16 = DIRTY_LAYOUT + DIRTY_TEXT + DIRTY_CHILDREN;

pub(crate) const DIRTY_ANCESTOR_PAINT_TRIGGER: u16 = DIRTY_PAINT + DIRTY_LAYOUT + DIRTY_CHILDREN;

pub(crate) const DIRTY_ANCESTOR_COMPOSITE_TRIGGER: u16 = DIRTY_COMPOSITE + DIRTY_SCROLL;

pub(crate) const DIRTY_FULL_DAMAGE_MASK: u16 = DIRTY_LAYOUT + DIRTY_CHILDREN + DIRTY_TEXT;

pub(crate) const DIRTY_PAINT_CLEAR_MASK: u16 =
    DIRTY_PAINT + DIRTY_SUBTREE_PAINT + DIRTY_SCROLL + DIRTY_COMPOSITE + DIRTY_SUBTREE_COMPOSITE;

/// Maximum per-frame surgical dirty paint nodes tracked before promoting to full viewport damage.
pub(crate) const DIRTY_PAINT_FULL_THRESHOLD: usize = 64;