56typedef enum : int32_t {
65typedef enum : uint8_t {
ra8_err_t ra8_box_tree_init(ra8_box_tree_t *tree, ra8_box_t *storage, uint16_t cap)
Bind a tree builder to caller-owned node storage.
ra8_err_t ra8_box_layout(ra8_box_tree_t *tree, int16_t root, const ra8_ui_rect_t *frame)
Lay out the tree, filling every node's rect.
ra8_box_const_t
Box-tree sentinels and the "no colour" marker.
@ k_ra8_box_no_colour
Carried fill/border: absent.
@ k_ra8_box_none
No child / no sibling link.
int16_t ra8_box_add(ra8_box_tree_t *tree, int16_t parent, const ra8_box_t *node)
Append a node and link it as a child of parent.
ra8_box_kind_t
Box layout kind.
@ k_ra8_box_stack_v
Vertical stack: children stack top->bottom.
@ k_ra8_box_grid
Fixed-column grid, row-major.
@ k_ra8_box_leaf
Terminal box (no children laid out).
@ k_ra8_box_stack_h
Horizontal stack: children left->right.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Bounded UI interaction core: hit-testing, screen stack, paging.
One node in a box tree (caller-owned).
uint8_t grid_cols
Columns for k_ra8_box_grid (>= 1).
uint8_t kind
ra8_box_kind_t.
uint16_t flex
Flex weight when not fixed.
int32_t first_child
First child index, or k_ra8_box_none.
int16_t fixed
Fixed main-axis extent; 0 => use flex.
uint32_t border
Border colour, or k_ra8_box_no_colour.
int16_t tag
Caller tag (e.g.
int16_t gap
Gap between children.
int16_t border_w
Border width (0 = no border draw).
int32_t next
Next sibling index, or k_ra8_box_none.
int16_t pad
Inner padding (all four sides).
ra8_ui_rect_t rect
OUTPUT: computed rectangle.
uint32_t fill
Background colour, or k_ra8_box_no_colour.
Append-only builder over caller-owned node storage.
uint16_t cap
Capacity of nodes.
ra8_box_t * nodes
Caller storage.
uint16_t count
Nodes used.
Axis-aligned rectangle in framebuffer pixel coordinates.