ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
reflow_t Struct Reference

Reflow / pagination engine state. More...

#include <reflow_types.h>

Collaboration diagram for reflow_t:

Data Fields

uint16_t viewport_w
 Viewport width, pixels.
uint16_t viewport_h
 Viewport height, pixels.
uint16_t font_px
 Body font size in pixels.
uint16_t reserved16
 Padding.
uint32_t body_color
 Body text colour (0xRRGGBB).
uint32_t link_color
 Anchor text colour (0xRRGGBB).
const uint8_t * font_data
 TTF blob; outlives the engine.
size_t font_len
 Length of font_data, bytes.
reflow_face_t faces [k_reflow_max_faces]
 Embedded @font-face set.
uint8_t face_count
 Embedded face count (0 = single-face).
const uint8_t * xhtml_buf
 Last layout_chapter input.
size_t xhtml_len
 Length of xhtml_buf.
reflow_token_t tokens [k_reflow_max_tokens]
 Parsed tokens.
uint32_t token_count
 Tokens used.
uint8_t text_pool [k_reflow_text_pool_bytes]
 Text bytes.
uint32_t text_pool_used
 Bytes consumed in text_pool.
reflow_glyph_t glyphs [k_reflow_max_glyphs]
 Positioned glyphs.
uint32_t glyph_count
 Glyphs used.
reflow_page_t pages [k_reflow_max_pages]
 Page index ranges.
uint32_t page_count
 Pages used.
reflow_image_loader_fn img_loader
 <img> byte loader (NULL = off).
void * img_loader_ctx
 Opaque context for img_loader.
ra8_img_arena_timg_arena
 Decode scratch (NULL = off).
reflow_css_loader_fn css_loader
 <link> CSS loader (NULL = off).
void * css_loader_ctx
 Opaque context for css_loader.
reflow_image_box_t image_boxes [k_reflow_max_images]
 Laid-out images.
uint32_t image_box_count
 Image boxes used.
reflow_link_target_t link_targets [k_reflow_max_links]
 Distinct hrefs.
uint32_t link_target_count
 Interned link targets.
reflow_link_rect_t link_rects [k_reflow_max_link_rects]
 Tappable rects.
uint32_t link_rect_count
 Link rects used.
reflow_anchor_t anchors [k_reflow_max_anchors]
 id= anchor positions.
uint32_t anchor_count
 Anchor positions used.
ra8_css_sheet_t css
 Parsed <style> rules for the chapter.
ra8_glyph_atlas_tglyph_atlas
 Glyph bitmap cache, or NULL for direct raster.
uint8_t in_use
 1 = initialized, 0 = closed.
uint8_t reserved8 [3]
 Padding.

Detailed Description

Reflow / pagination engine state.

Allocated by the caller (typically as a static in the ereader app) and bound via reflow_init(). Treat all fields as read-only; mutate only through the reflow_* API.

Invariant
in_use == 1 while initialized; cleared by reflow_close().
See also
reflow_init()
reflow_close()

Definition at line 448 of file reflow_types.h.

Field Documentation

◆ anchor_count

uint32_t reflow_t::anchor_count

Anchor positions used.

Definition at line 496 of file reflow_types.h.

Referenced by internal_open_block(), reflow_find_anchor(), and reflow_run_layout().

◆ anchors

id= anchor positions.

Definition at line 495 of file reflow_types.h.

Referenced by internal_open_block(), and reflow_find_anchor().

◆ body_color

uint32_t reflow_t::body_color

Body text colour (0xRRGGBB).

Definition at line 454 of file reflow_types.h.

Referenced by internal_key_matches(), internal_layout_text(), internal_put_header(), internal_row_cells(), and reflow_init().

◆ css

ra8_css_sheet_t reflow_t::css

Parsed <style> rules for the chapter.

Definition at line 499 of file reflow_types.h.

Referenced by internal_handle_link(), internal_handle_raw_text(), internal_open_styled(), priv_reflow_tok_resolve_face_slot(), and priv_reflow_xml_walk().

◆ css_loader

reflow_css_loader_fn reflow_t::css_loader

<link> CSS loader (NULL = off).

Definition at line 483 of file reflow_types.h.

Referenced by internal_handle_link(), and reflow_set_css_loader().

◆ css_loader_ctx

void* reflow_t::css_loader_ctx

Opaque context for css_loader.

Definition at line 484 of file reflow_types.h.

Referenced by internal_handle_link(), and reflow_set_css_loader().

◆ face_count

uint8_t reflow_t::face_count

Embedded face count (0 = single-face).

Definition at line 461 of file reflow_types.h.

Referenced by internal_cache_precheck(), internal_init_faces(), priv_reflow_tok_resolve_face_slot(), and reflow_register_face().

◆ faces

Embedded @font-face set.

Definition at line 460 of file reflow_types.h.

Referenced by internal_init_faces(), priv_reflow_tok_resolve_face_slot(), and reflow_register_face().

◆ font_data

const uint8_t* reflow_t::font_data

TTF blob; outlives the engine.

Definition at line 458 of file reflow_types.h.

Referenced by internal_font_hash(), internal_init_font(), priv_reflow_layout_init_font(), reflow_bind_font(), and reflow_init().

◆ font_len

◆ font_px

◆ glyph_atlas

ra8_glyph_atlas_t* reflow_t::glyph_atlas

Glyph bitmap cache, or NULL for direct raster.

Definition at line 502 of file reflow_types.h.

Referenced by internal_render_page(), and reflow_set_glyph_atlas().

◆ glyph_count

◆ glyphs

◆ image_box_count

◆ image_boxes

reflow_image_box_t reflow_t::image_boxes[k_reflow_max_images]

Laid-out images.

Definition at line 486 of file reflow_types.h.

Referenced by internal_image_record(), internal_render_images(), and reflow_hit_test_image().

◆ img_arena

ra8_img_arena_t* reflow_t::img_arena

◆ img_loader

◆ img_loader_ctx

void* reflow_t::img_loader_ctx

◆ in_use

◆ link_color

uint32_t reflow_t::link_color

Anchor text colour (0xRRGGBB).

Definition at line 455 of file reflow_types.h.

Referenced by internal_key_matches(), internal_layout_text(), internal_put_header(), and reflow_init().

◆ link_rect_count

uint32_t reflow_t::link_rect_count

Link rects used.

Definition at line 494 of file reflow_types.h.

Referenced by internal_emit_link_rect(), reflow_hit_test_link(), and reflow_run_layout().

◆ link_rects

Tappable rects.

Definition at line 493 of file reflow_types.h.

Referenced by internal_emit_link_rect(), and reflow_hit_test_link().

◆ link_target_count

uint32_t reflow_t::link_target_count

Interned link targets.

Definition at line 492 of file reflow_types.h.

Referenced by priv_reflow_tok_intern_link(), and reflow_parse_xhtml().

◆ link_targets

reflow_link_target_t reflow_t::link_targets[k_reflow_max_links]

Distinct hrefs.

Definition at line 491 of file reflow_types.h.

Referenced by priv_reflow_tok_intern_link(), and reflow_hit_test_link().

◆ page_count

◆ pages

◆ reserved16

uint16_t reflow_t::reserved16

Padding.

Definition at line 453 of file reflow_types.h.

◆ reserved8

uint8_t reflow_t::reserved8[3]

Padding.

Definition at line 506 of file reflow_types.h.

◆ text_pool

◆ text_pool_used

uint32_t reflow_t::text_pool_used

◆ token_count

◆ tokens

◆ viewport_h

◆ viewport_w

◆ xhtml_buf

const uint8_t* reflow_t::xhtml_buf

◆ xhtml_len

size_t reflow_t::xhtml_len

The documentation for this struct was generated from the following file: