|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Reflow / pagination engine state. More...
#include <reflow_types.h>
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_t * | img_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_t * | glyph_atlas |
| Glyph bitmap cache, or NULL for direct raster. | |
| uint8_t | in_use |
| 1 = initialized, 0 = closed. | |
| uint8_t | reserved8 [3] |
| Padding. | |
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.
Definition at line 448 of file reflow_types.h.
| 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().
| reflow_anchor_t reflow_t::anchors[k_reflow_max_anchors] |
id= anchor positions.
Definition at line 495 of file reflow_types.h.
Referenced by internal_open_block(), and reflow_find_anchor().
| 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().
| 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().
| 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().
| 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().
| 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().
| reflow_face_t reflow_t::faces[k_reflow_max_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().
| 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().
| size_t reflow_t::font_len |
Length of font_data, bytes.
Definition at line 459 of file reflow_types.h.
Referenced by internal_font_hash(), internal_init_font(), internal_key_matches(), internal_put_header(), priv_reflow_layout_init_font(), reflow_bind_font(), and reflow_init().
| uint16_t reflow_t::font_px |
Body font size in pixels.
Definition at line 452 of file reflow_types.h.
Referenced by internal_close_block(), internal_css_font_px(), internal_key_matches(), internal_layout_cell(), internal_layout_row(), internal_layout_tokens(), internal_open_block(), internal_put_header(), reflow_init(), and reflow_set_font_size().
| 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().
| uint32_t reflow_t::glyph_count |
Glyphs used.
Definition at line 475 of file reflow_types.h.
Referenced by internal_finish_line(), internal_layout_row(), internal_layout_tokens(), internal_page_has_content(), internal_put_header(), priv_reflow_layout_finish_page(), priv_reflow_layout_newline(), priv_reflow_layout_push_glyph(), priv_reflow_layout_table(), reflow_cache_load(), reflow_cache_serialize(), reflow_cache_size(), reflow_close(), and reflow_run_layout().
| reflow_glyph_t reflow_t::glyphs[k_reflow_max_glyphs] |
Positioned glyphs.
Definition at line 474 of file reflow_types.h.
Referenced by internal_emit_link_rect(), internal_finish_line(), internal_justify_glyphs(), internal_render_page(), priv_reflow_layout_build_link_rects(), priv_reflow_layout_push_glyph(), reflow_cache_load(), and reflow_cache_serialize().
| uint32_t reflow_t::image_box_count |
Image boxes used.
Definition at line 488 of file reflow_types.h.
Referenced by internal_image_record(), internal_layout_tokens(), internal_page_has_content(), internal_place_image(), internal_render_images(), priv_reflow_layout_finish_page(), reflow_close(), reflow_hit_test_image(), and reflow_run_layout().
| 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().
| ra8_img_arena_t* reflow_t::img_arena |
Decode scratch (NULL = off).
Definition at line 482 of file reflow_types.h.
Referenced by internal_render_images(), internal_render_one_image(), internal_render_svg(), priv_reflow_layout_apply_image(), and reflow_set_image_loader().
| reflow_image_loader_fn reflow_t::img_loader |
<img> byte loader (NULL = off).
Definition at line 480 of file reflow_types.h.
Referenced by internal_image_resolve_size(), internal_render_images(), internal_render_one_image(), internal_render_svg(), priv_reflow_layout_apply_image(), and reflow_set_image_loader().
| void* reflow_t::img_loader_ctx |
Opaque context for img_loader.
Definition at line 481 of file reflow_types.h.
Referenced by internal_image_resolve_size(), internal_render_one_image(), internal_render_svg(), and reflow_set_image_loader().
| uint8_t reflow_t::in_use |
1 = initialized, 0 = closed.
Definition at line 505 of file reflow_types.h.
Referenced by internal_cache_precheck(), internal_render_page(), reflow_bind_font(), reflow_cache_size(), reflow_close(), reflow_get_page_count(), reflow_init(), reflow_layout_chapter(), reflow_parse_xhtml(), reflow_register_face(), reflow_run_layout(), reflow_set_css_loader(), reflow_set_font_size(), reflow_set_glyph_atlas(), and reflow_set_image_loader().
| 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().
| 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().
| reflow_link_rect_t reflow_t::link_rects[k_reflow_max_link_rects] |
Tappable rects.
Definition at line 493 of file reflow_types.h.
Referenced by internal_emit_link_rect(), and reflow_hit_test_link().
| 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().
| 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().
| uint32_t reflow_t::page_count |
Pages used.
Definition at line 477 of file reflow_types.h.
Referenced by internal_image_record(), internal_open_block(), internal_put_header(), internal_render_page(), priv_reflow_layout_build_link_rects(), priv_reflow_layout_finish_page(), reflow_cache_load(), reflow_cache_serialize(), reflow_cache_size(), reflow_close(), reflow_get_page_count(), reflow_layout_chapter(), reflow_render_page(), and reflow_run_layout().
| reflow_page_t reflow_t::pages[k_reflow_max_pages] |
Page index ranges.
Definition at line 476 of file reflow_types.h.
Referenced by internal_render_page(), priv_reflow_layout_build_link_rects(), priv_reflow_layout_finish_page(), reflow_cache_load(), reflow_cache_serialize(), and reflow_run_layout().
| uint16_t reflow_t::reserved16 |
Padding.
Definition at line 453 of file reflow_types.h.
| uint8_t reflow_t::reserved8[3] |
Padding.
Definition at line 506 of file reflow_types.h.
| uint8_t reflow_t::text_pool[k_reflow_text_pool_bytes] |
Text bytes.
Definition at line 470 of file reflow_types.h.
Referenced by internal_cell_text(), internal_image_resolve_size(), internal_layout_text(), internal_render_one_image(), priv_reflow_tok_capture_attr(), priv_reflow_tok_feed(), and reflow_find_anchor().
| uint32_t reflow_t::text_pool_used |
Bytes consumed in text_pool.
Definition at line 471 of file reflow_types.h.
Referenced by internal_handle_cdata(), priv_reflow_tok_capture_attr(), priv_reflow_tok_feed(), priv_reflow_tok_stash_run(), reflow_close(), and reflow_parse_xhtml().
| uint32_t reflow_t::token_count |
Tokens used.
Definition at line 469 of file reflow_types.h.
Referenced by internal_emit_text_run(), internal_handle_cdata(), internal_open_attrs(), priv_reflow_layout_table(), priv_reflow_tok_emit(), reflow_close(), reflow_parse_xhtml(), and reflow_run_layout().
| reflow_token_t reflow_t::tokens[k_reflow_max_tokens] |
Parsed tokens.
Definition at line 468 of file reflow_types.h.
Referenced by internal_emit_text_run(), internal_handle_cdata(), internal_is_cell_start(), internal_is_row_start(), internal_layout_cell(), internal_layout_tokens(), internal_match_block_end(), internal_open_attrs(), and priv_reflow_tok_emit().
| uint16_t reflow_t::viewport_h |
Viewport height, pixels.
Definition at line 451 of file reflow_types.h.
Referenced by internal_close_block(), internal_image_resolve_size(), internal_key_matches(), internal_layout_row(), internal_place_image(), internal_put_header(), priv_reflow_layout_newline(), and reflow_init().
| uint16_t reflow_t::viewport_w |
Viewport width, pixels.
Definition at line 450 of file reflow_types.h.
Referenced by internal_apply_image_placeholder(), internal_emit_char(), internal_finish_line(), internal_image_resolve_size(), internal_key_matches(), internal_layout_text(), internal_put_header(), priv_reflow_layout_table(), and reflow_init().
| const uint8_t* reflow_t::xhtml_buf |
Last layout_chapter input.
Definition at line 464 of file reflow_types.h.
Referenced by reflow_bind_font(), reflow_cache_load(), reflow_close(), reflow_layout_chapter(), reflow_parse_xhtml(), and reflow_set_font_size().
| size_t reflow_t::xhtml_len |
Length of xhtml_buf.
Definition at line 465 of file reflow_types.h.
Referenced by reflow_bind_font(), reflow_cache_load(), reflow_close(), reflow_layout_chapter(), reflow_parse_xhtml(), and reflow_set_font_size().