code wiki / _hdl_build / nx_render_wiki_styled_window.nx
nx_render_wiki_styled_window.nx
buildroot/runtime/_hdl_build/nx_render_wiki_styled_window.nx
about
nx_render_wiki_styled_window.nx -- the STYLED live browser window: real Wikipedia, scrollable, with
the CSS cascade driving per-element TEXT SIZE + COLOR. Merges the proven styling pipeline (combined
[HTML][CSS] buffer -> layout_from_dom -> box-indexed cascade -> computed) into the scrollable X11
window; each text box looks up its parent element box's computed font-size (-> glyph px_size) and
color (-> gc foreground). Layout sizes boxes by font-size so bigger headings don't overlap. Sovereign.
dependencies 15 imports · 0 importers
diagram shows first 10 each side; +5 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_css_tokenize.nxnx_css_parse.nxnx_css_apply.nxnx_css_selector_match.nxnx_html_tokenizer.nxnx_dom_query.nxnx_layout_box.nxnx_layout_default_display.nxnx_layout_from_dom.nxnx_layout_block.nxnx_x11_connect.nxnx_x11_window.nxnx_x11_paint.nxnx_x11_paint_text_5x7.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const K_MAGIC_16384: i64 = 16384 |
| 22 | const K_MAGIC_8192: i64 = 8192 |
functions
| 24 | func sw_slen(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} return k } |
| 25 | func sw_region_is(src: *u8, off: i64, len: i64, lit: *u8) -> i64 |
| 32 | func sw_parse_int(src: *u8, off: i64, len: i64) -> i64 called by 1: sw_comp_int |
| 38 | func sw_hex1(c: i64) -> i64 called by 1: sw_comp_color |
| 45 | func sw_comp_int(src: *u8, computed: *CssComputedDecl, ncomp: i64, box_idx: i64, prop: *u8, dflt: i64) -> i64 |
| 57 | func sw_comp_color(src: *u8, computed: *CssComputedDecl, ncomp: i64, box_idx: i64) -> i64 |
| 74 | func sw_extract(html: *u8, hlen: i64, elements: *CssElement, maxn: i64) -> i64 |
| 96 | func sw_is_elem(k: i64) -> i64 { if k==NX_LAYOUT_BOX_BLOCK {return 1} if k==NX_LAYOUT_BOX_INLINE {return 1} if k==NX_LAYOUT_BOX_INLINE_BLOCK {return 1} return 0 } called by 1: main |
| 100 | func draw_styled(c: *X11Conn, wid: i64, gc: i64, paper: i64, tree: *LayoutTree, html: *u8, |
| 131 | func main() -> i64 |