nx_x11_screenshot.nx
buildroot/runtime/nx_x11_screenshot.nx
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
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
| 23 | func nx_x11_save_drawable_as_ppm(conn: *X11Conn, drawable: i64, |
| 65 | func main() -> i64 |