ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_widget_reflow_view.h
Go to the documentation of this file.
1
30
31#pragma once
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37#include <stdint.h>
38
39#include "ra8_err.h"
40#include "ra8_ui.h"
41#include "ra8_widget.h"
42
60typedef struct ra8_widget_reflow_ops {
62 void* user;
64 void (*render_page)(void* user, uint16_t page, const ra8_ui_rect_t* body);
69 bool (*follow_link)(void* user, uint16_t page, int32_t x, int32_t y, uint16_t* out_page);
71
114
135
163
164#ifdef __cplusplus
165}
166#endif
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Bounded UI interaction core: hit-testing, screen stack, paging.
Zero-heap composable widget layer (dwm-style) over ra8_box + ra8_ui.
struct ra8_widget_reflow_ops ra8_widget_reflow_ops_t
const ra8_widget_vtable_t * ra8_widget_reflow_view_vtable(void)
Return the shared vtable backing every reflow-view widget.
ra8_err_t ra8_widget_reflow_view_init(ra8_widget_t *w, ra8_widget_reflow_view_t *view)
Bind a widget instance to a reflow view.
Axis-aligned rectangle in framebuffer pixel coordinates.
Definition ra8_ui.h:72
Drawing backend the concrete leaf widgets paint through (a DI seam).
Injected seam driving a reflow engine from the reflow-view widget.
void * user
Opaque engine handle passed back to every callback below.
bool(* follow_link)(void *user, uint16_t page, int32_t x, int32_t y, uint16_t *out_page)
Hit-test a tap for a link on page; follow it if present.
void(* render_page)(void *user, uint16_t page, const ra8_ui_rect_t *body)
Paint page page of the engine inside body (on-target only).
A paginated reflowed-text body: page state + margins + engine seam.
uint16_t page
Current page (0-based).
uint32_t bg
Body background colour, 0xRRGGBB.
const ra8_widget_reflow_ops_t * ops
Reflow engine seam (NULL -> inert).
int16_t margin_x
Horizontal body inset, pixels.
uint16_t page_count
Total pages (>= 1).
const ra8_widget_paint_t * paint
Background-clear backend (NULL -> no clear).
int16_t margin_y
Vertical body inset, pixels.
One widget instance (caller-owned, no allocation).
Behaviour table shared by all widgets of one kind.
Definition ra8_widget.h:121