nx_browser.nx
buildroot/runtime/_hdl_build/nx_browser.nx
about
dependencies 29 imports · 2 importers
diagram shows first 10 each side; +19 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_get.nxnx_http_response_parse.nxnx_html_tokenizer.nxnx_js_eval.nxnx_dom_query.nxnx_html_entities.nxnx_url_resolve.nxnx_render_html.nxnx_css_color_decode.nxnx_layout_box.nxnx_layout_default_display.nxnx_layout_from_dom.nxnx_layout_block.nxnx_x11_connect.nxnx_x11_window.nxnx_x11_paint.nxnx_http_get_ua.nxnx_dns_resolve_a_record.nxnx_paint_solid_rect.nxnx_paint_text.nxnx_png_write.nxnx_signal.nxnx_browser_buyguard.nxnx_intake_profile.nxnx_media_harvest.nxnx_media_deepcrawl.nx
imported by: nx_browser_game_marker_gate.nxnx_connect_browser_verify.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 36 | struct Page |
consts
| 48 | const NX_PAGE_BYTES: i64 = 80 |
| 49 | const NX_CHROME_H: i64 = 44 // browser chrome (toolbar + address bar) height; page viewport is below it |
functions
| 51 | func br_slen(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} return k } |
| 52 | func br_p(fd: i64, s: *u8) -> i64 { sys_write(fd, s, br_slen(s)); return 0 } |
| 53 | func br_n(fd: i64, v0: i64) -> i64 { var v: i64=v0; if v<0 { let m: *u8=sys_mmap(8); m[0]=45 as u8; sys_write(fd,m,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0{b[0]=48;k=1} while v>0{b[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k{o[j]=b[k-1-j];j=j+1} sys_write(fd,o,k); return 0 } |
| 56 | func br_write_file(path: *u8, buf: *u8, n: i64) -> i64 |
| 70 | func br_media_dump(store: *TrustStore, cur_url: *u8, ulen: i64) -> i64 |
| 89 | func br_comp_int(src: *u8, computed: *CssComputedDecl, ncomp: i64, box_idx: i64, prop: *u8, plen: i64, dflt: i64) -> i64 called by 1: br_draw |
| 107 | func br_comp_color(src: *u8, computed: *CssComputedDecl, ncomp: i64, box_idx: i64, prop: *u8, plen: i64) -> i64 |
| 130 | func br_extract(html: *u8, hlen: i64, elements: *CssElement, ehref_off: *i64, ehref_len: *i64, maxn: i64) -> i64 called by 1: br_layout calls 5: sys_mmapnx_html_cursor_initnx_html_next_token_lfd_is_chrome_startnx_dom_find_attr |
| 168 | func br_isdigit(c: i64) -> i64 { if c >= 48 { if c <= 57 { return 1 } } return 0 } |
| 171 | func br_is_plain_http(url: *u8, ulen: i64) -> i64 called by 1: load_page |
| 184 | func br_parse_ipv4(s: *u8, len: i64) -> i64 |
| 214 | func br_http_fetch(url: *u8, ulen: i64, out: *u8, cap: i64) -> i64 called by 1: load_page calls 7: sys_mmapbr_isdigitbr_parse_ipv4nx_dns_resolve_defaultnx_https_build_sockaddrnx_http_get_ua+1 |
| 264 | func br_layout(page: *Page, vw: i64) -> i64 called by 2: load_pagemain calls 17: br_slensys_mmaprh_extract_stylesrh_filter_medianx_layout_tree_initnx_layout_from_dom_stack_init+11 |
| 351 | func bg_load_profile(prof: *i64) -> i64 |
| 372 | func br_doc_ext(url: *u8, ulen: i64, ext: *u8) -> i64 called by 1: load_page |
| 419 | func br_doc_paths(ext: *u8, extn: i64, pin: *u8, pout: *u8) -> i64 |
| 441 | func br_doc_conv(ext: *u8, extn: i64, body: *u8, blen: i64, url: *u8) -> i64 |
| 472 | func load_page(url: *u8, ulen: i64, store: *TrustStore, cr: *u8, priv: *u8, page: *Page, vw: i64) -> i64 called by 1: main calls 19: sys_now_realtime_secsys_mmapnx_http_resp_allocbr_is_plain_httpbr_http_fetchnx_https_get+13 |
| 564 | func br_button(c: *X11Conn, wid: i64, gc: i64, x: i64, label: *u8, fbody: i64) -> i64 called by 1: br_chrome calls 4: nx_x11_set_gc_foregroundnx_x11_fill_rectnx_x11_set_gc_fontnx_x11_poly_text8 |
| 573 | func br_chrome(c: *X11Conn, wid: i64, gc: i64, win_w: i64, cur_url: *u8, ulen: i64, fbody: i64) -> i64 called by 1: br_draw calls 5: nx_x11_set_gc_foregroundnx_x11_fill_rectbr_buttonnx_x11_set_gc_fontnx_x11_poly_text8 |
| 595 | func br_chrome_click(ex: i64) -> i64 called by 1: main |
| 604 | func br_comp_color_inh(src: *u8, computed: *CssComputedDecl, ncomp: i64, tree: *LayoutTree, box_idx: i64) -> i64 |
| 619 | func br_comp_bg(src: *u8, computed: *CssComputedDecl, ncomp: i64, box_idx: i64) -> i64 |
| 626 | func br_comp_border(src: *u8, computed: *CssComputedDecl, ncomp: i64, box_idx: i64, wout: *i64) -> i64 |
| 660 | func br_draw(c: *X11Conn, wid: i64, gc: i64, paper: i64, page: *Page, win_w: i64, win_h: i64, scroll_y: i64, called by 1: main calls 12: sys_mmapnx_x11_fill_rectbr_comp_bgnx_x11_set_gc_foregroundbr_comp_borderbr_comp_int+6 |
| 722 | func br_color_from_int(c: i64) -> *CssColor |
| 733 | func br_paint_text2x(fb: *Framebuffer, x: i64, y: i64, text: *u8, text_len: i64, color: *CssColor) -> i64 |
| 758 | func br_draw_fb(fb: *Framebuffer, page: *Page, win_w: i64, cur_url: *u8, ulen: i64) -> i64 called by 1: br_shot_png calls 9: sys_mmapnx_paint_solid_rectbr_color_from_intbr_comp_bgbr_comp_borderbr_comp_color_inh+3 |
| 821 | func br_shot_png(page: *Page, cur_url: *u8, ulen: i64, path: *u8) -> i64 |
| 846 | func br_hit_link(page: *Page, dx: i64, dy: i64, off: *i64, len: *i64) -> i64 called by 1: main |
| 914 | func br_game_organ(raw: *u8, n: i64, out: *u8) -> i64 |
| 973 | func br_launch_game(name: *u8, nlen: i64, selftest: i64) -> i64 |
| 1004 | func main() -> i64 |