nx_fb.nx
buildroot/runtime/nx_fb.nx
about
nx_fb.nx -- sovereign FRAMEBUFFER library (the kernel's pixel/draw layer for the NishiOS GUI).
Reusable primitives extracted (Rule 15 DRY) so every GUI organ draws the same way: clipped pixel,
filled rect, 8x8 bitmap-font glyph install + draw (scalable), and a real 24-bit BMP export. A
framebuffer is just W*H*3 RGB bytes; on real x86 the kernel gets this region from VESA/VBE or UEFI GOP.
license_tier: ORIGINAL
dependencies 1 imports · 20 importers
diagram shows first 10 each side; +0 more imports, +10 more importers in the complete lists below.
imports: nx_syscalls.nx
imported by: nx_drawfb_probe.nxnx_gpu_geometry.nxnx_gpu_graphics_gate.nxnx_nishi_usb_desktop.nxnx_nishi_usb_fbkernel.nxnx_nishios_boot_gui.nxnx_nishios_browser.nxnx_nishios_browser_input.nxnx_nishios_browser_x86.nxnx_nishios_docview.nxnx_nishios_events.nxnx_nishios_fb_x86.nxnx_nishios_irq.nxnx_nishios_kbd.nxnx_nishios_net.nxnx_nishios_net_wire.nxnx_nishios_raster.nxnx_nishios_shell.nxnx_nishios_term.nxnx_nishios_wm.nx
structs
| none |
consts
| 7 | const K_MAGIC_2835: i64 = 2835 |
functions
| 9 | func fb_setpx(fb: *u8, W: i64, H: i64, x: i64, y: i64, r: i64, g: i64, b: i64) -> i64 |
| 13 | func fb_rect(fb: *u8, W: i64, H: i64, x: i64, y: i64, w: i64, h: i64, r: i64, g: i64, b: i64) -> i64 |
| 18 | func fb_gly(f: *u8, i: i64, r0: i64, r1: i64, r2: i64, r3: i64, r4: i64, r5: i64, r6: i64, r7: i64) -> i64 |
| 23 | func fb_char(fb: *u8, W: i64, H: i64, x: i64, y: i64, g: *u8, scale: i64, r: i64, gg: i64, b: i64) -> i64 |
| 33 | func fb_text(fb: *u8, W: i64, H: i64, font: *u8, idx: *u8, n: i64, x: i64, y: i64, scale: i64, r: i64, g: i64, b: i64) -> i64 |
| 39 | func fb_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 |
| 47 | func fb_nishi_font(font: *u8, idx: *u8) -> i64 |
| 57 | func fb_cursor(fb: *u8, W: i64, H: i64, cx: i64, cy: i64) -> i64 |
| 66 | func fb_p32(buf: *u8, o: i64, v: i64) -> i64 { buf[o]=(v & 0xFF) as u8; buf[o+1]=((v>>8)&0xFF) as u8; buf[o+2]=((v>>16)&0xFF) as u8; buf[o+3]=((v>>24)&0xFF) as u8; return o+4 } called by 1: fb_bmp_save |
| 67 | func fb_p16(buf: *u8, o: i64, v: i64) -> i64 { buf[o]=(v & 0xFF) as u8; buf[o+1]=((v>>8)&0xFF) as u8; return o+2 } called by 1: fb_bmp_save |
| 70 | func fb_bmp_save(fb: *u8, W: i64, H: i64, path: *u8) -> i64 |