code wiki / (root) / nx_nishios_wm.nx

nx_nishios_wm.nx

buildroot/runtime/nx_nishios_wm.nx

7361 B98 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic nishios
docsdependenciesstructsconstsfunctions

about

nx_nishios_wm.nx -- NishiOS GUI rung-2: a WINDOW MANAGER / COMPOSITOR. A desktop is more than one window: it's multiple windows composited in z-order over a wallpaper, with a mouse cursor on top. This draws a gradient wallpaper, two windows that OVERLAP (the higher-z one drawn last so it correctly occludes the lower one), a taskbar with buttons, and a shadowed arrow cursor above everything -- then exports the composite as a real BMP via the nx_fb library. KAT: z-order is correct (the overlap region shows the TOP window, not the bottom), the wallpaper is a real gradient (rows differ), the cursor is drawn on top, and the BMP is well-formed. HONEST SCOPE: a STATIC composite (one frame, fixed cursor). Live input (mouse/keyboard event loop), dragging, and wiring this framebuffer into the boot kernel are the next rungs. No hw writes (Rule 26). expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_fb.nx nx_itoa_lib.nx nx_nishios_wm.nx

imports: nx_fb.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main wm_puts fb_gly fb_rect fb_setpx draw_window fb_rect ↻ fb_text fb_char fb_rect ↻ fb_setpx ↻ fb_bmp_save sys_mmap fb_p32 fb_p16 sys_openat_wr sys_write sys_close sys_openat_wr ↻ wm_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

13const K_MAGIC_192054: i64 = 192054

functions

15func wm_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main
20func wm_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
23func draw_window(fb: *u8, W: i64, H: i64, font: *u8, idx: *u8, x: i64, y: i64, w: i64, h: i64, tr: i64, tg: i64, tb: i64, br: i64, bg: i64, bb: i64) -> i64
called by 1: main calls 2: fb_rectfb_text
34func main() -> i64