code wiki / (root) / nx_x11_screenshot.nx

nx_x11_screenshot.nx

buildroot/runtime/nx_x11_screenshot.nx

2318 B67 linesdepth 7pulls 8 transitivereach 1 importersview sourcekind tooltopic x11
docsdependenciesstructsconstsfunctions

about

nx_x11_screenshot.nx -- capture a drawable's pixels and drop them to a PPM file Claude (or any image viewer) can open. Self-closing-loop primitive: "Nishi troubleshoots Nishi natively." Composes nx_x11_get_image (pull pixels back from the server) with nx_ppm_writer (encode + write). Used by every visible bits-up demo so we can verify renderings without asking the user "did you see X?" API: nx_x11_save_drawable_as_ppm(conn, drawable, w, h, path) -> 0 | <0 license_tier: ORIGINAL lineage_id: nishi_x11_screenshot_q10

dependencies 4 imports · 1 importers

nx_syscalls.nx nx_x11_connect.nx nx_x11_get_image.nx nx_ppm_writer.nx nx_x11_screenshot.nx nx_browser_demo_test.nx

imports: nx_syscalls.nxnx_x11_connect.nxnx_x11_get_image.nxnx_ppm_writer.nx

imported by: nx_browser_demo_test.nx

structs

none

consts

none

functions

23func nx_x11_save_drawable_as_ppm(conn: *X11Conn, drawable: i64,
65func main() -> i64