117typedef enum : uint8_t {
138typedef enum : uint32_t {
156typedef enum : uint16_t {
174typedef enum : uint8_t {
203typedef enum : uint8_t {
222typedef enum : uint8_t {
273 uint32_t out_stride);
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.
Axis-aligned rectangle in framebuffer pixel coordinates.
What the reader must flush, and with which waveform.
zoom_refresh_t refresh
Waveform class for that flush.
ra8_ui_rect_t rect
Panel rectangle to flush.
bool present
False: nothing changed, do not flush at all.
Caller-owned composite buffers – the module's entire memory footprint.
uint8_t * packed
The strip packed to 4 bpp (2 px/byte).
uint32_t row_cap
Capacity of row, bytes.
uint8_t * row
One source row, >= dst.w bytes.
uint32_t packed_cap
Capacity of packed, bytes.
uint32_t strip_cap
Capacity of strip, bytes.
uint8_t * strip
gray8 destination strip, dst.w * strip_rows.
A magnifiable full-resolution image behind the gray8 sub-rect seam.
uint32_t height
Full-resolution source height, pixels.
uint32_t width
Full-resolution source width, pixels.
zoom_read_fn read
gray8 sub-rectangle reader (never NULL once bound).
void * ctx
Opaque context handed back to read.
Everything zoom_view_open needs; nothing it does not.
ra8_ui_rect_t dst
Viewport in framebuffer pixels.
zoom_source_t src
Bound source (see zoom_source_init).
int32_t focus_x
Opening centre, source pixels (x).
uint8_t scale
Opening magnification (0 => scale_min).
uint8_t scale_max
Ladder ceiling (0 => k_zoom_scale_max).
int32_t focus_y
Opening centre, source pixels (y).
uint16_t settle_ms
Settle window (0 => the module default).
zoom_policy_t policy
Waveform scheduling policy.
zoom_scratch_t scratch
Caller-owned composite buffers.
Live viewport: where it is looking, how magnified, and what it owes the panel.
uint32_t last_input_ms
Timestamp of the last viewport change.
uint8_t scale_max
Ladder ceiling for this view.
zoom_refresh_t pending_kind
Waveform the owed flush should use.
zoom_policy_t policy
Waveform scheduling policy.
bool settle_armed
A quality repaint is still due after settling.
uint8_t scale
Current integer magnification.
zoom_source_t src
Bound source.
zoom_scratch_t scratch
Caller-owned composite buffers.
ra8_ui_rect_t dst
Viewport in framebuffer pixels.
uint16_t strip_rows
Destination rows per composite strip.
int32_t anchor_y
Plane row shown at dst.y.
bool active
The view is open.
bool pending
A flush is owed.
int32_t anchor_x
Plane column shown at dst.x.
uint16_t settle_ms
Input silence before the quality repaint.
#define min(x, y)
Untyped minimum shim used by the SOUP's buffer clamping.
zoom_policy_t
How a viewport change is scheduled against the panel's waveforms.
@ k_zoom_policy_quality
Always quality; no bi-level frame is shown.
@ k_zoom_policy_responsive
Fast during a burst, quality once settled.
ra8_err_t zoom_source_init(zoom_source_t *out, zoom_read_fn read, void *ctx, uint32_t width, uint32_t height)
Bind a gray8 sub-rectangle reader and its extent as a magnifiable source.
ra8_err_t zoom_view_invalidate(zoom_view_t *v, uint32_t now_ms)
Declare the viewport's pixels stale for a reason the engine cannot see.
bool zoom_view_active(const zoom_view_t *v)
Whether a view is open.
zoom_limits_t
Magnification ladder bounds, strip geometry and the letterbox fill.
@ k_zoom_strip_rows_max
Destination rows composited per strip.
@ k_zoom_scale_max
Engine ceiling on integer magnification.
@ k_zoom_bg_gray
Letterbox fill level (on-palette white).
@ k_zoom_scale_min
1:1 – one source pixel per panel pixel.
ra8_err_t zoom_view_rebind(zoom_view_t *v, const zoom_source_t *src, uint32_t now_ms)
Point an open view at a different source, keeping zoom and position.
zoom_dim_t
Bound on a source dimension the engine will magnify.
@ k_zoom_dim_max
Largest accepted source width or height, pixels.
ra8_err_t zoom_view_close(zoom_view_t *v)
Close a view; it stops owing the panel anything.
ra8_err_t zoom_view_pan_dir(zoom_view_t *v, zoom_pan_t dir, uint32_t now_ms)
Pan by a discrete step in one direction (the tap-band interaction).
ra8_err_t zoom_view_pan(zoom_view_t *v, int32_t dx, int32_t dy, uint32_t now_ms)
Pan the viewport by a destination-pixel delta.
bool zoom_view_tick(zoom_view_t *v, uint32_t now_ms)
Advance the settle timer; promote a bi-level view to full quality.
ra8_err_t zoom_view_window(const zoom_view_t *v, ra8_ui_rect_t *out)
The source rectangle currently visible, in source pixels.
zoom_timing_t
Default gesture-settle delay, in milliseconds.
@ k_zoom_settle_ms_default
Default input-silence settle window, ms.
ra8_err_t(* zoom_read_fn)(void *ctx, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint8_t *out, uint32_t out_stride)
Read a sub-rectangle of the magnified source as gray8 (the DIP seam).
ra8_err_t zoom_view_present(zoom_view_t *v, zoom_present_t *out)
Take the pending flush plan, clearing it.
uint8_t zoom_scale_cycle(uint8_t scale, uint8_t min, uint8_t max)
Next magnification on the doubling ladder, wrapping back to the minimum.
ra8_err_t zoom_view_render(zoom_view_t *v)
Composite the visible window into the bound ra8_gfx framebuffer.
ra8_err_t zoom_view_open(zoom_view_t *v, const zoom_view_cfg_t *cfg)
Open a viewport onto a source, centred on a source-pixel focus.
zoom_refresh_t
Waveform class the next flush of the viewport should use.
@ k_zoom_refresh_quality
Settled: panel GC16 (all 16 levels, slow).
@ k_zoom_refresh_fast
Interactive burst: panel A2 (bi-level, fast).
zoom_pan_t
Discrete pan direction for tap-band navigation.
@ k_zoom_pan_right
Viewport travels toward +x.
@ k_zoom_pan_left
Viewport travels toward -x.
@ k_zoom_pan_none
No movement.
@ k_zoom_pan_down
Viewport travels toward +y.
@ k_zoom_pan_up
Viewport travels toward -y.
ra8_err_t zoom_view_set_scale(zoom_view_t *v, uint8_t scale, int32_t focus_x, int32_t focus_y, uint32_t now_ms)
Set the magnification, keeping a panel point fixed under the finger.