code wiki / (root) / nx_x11_paint.nx

nx_x11_paint.nx

buildroot/runtime/nx_x11_paint.nx

7311 B219 linesdepth 5pulls 5 transitivereach 14 importersview sourcekind tooltopic x11
docsdependenciesstructsconstsfunctions

about

nx_x11_paint.nx -- bits-up X11 painting primitives. Session 3 of the bits-up browser arc. Adds the wire opcodes that actually draw inside a window: CreateGC, ChangeGC, PolyFillRectangle, ImageText8. Composes nx_x11_connect + nx_x11_window. Opcodes (X Protocol ยง10): 55 CreateGC 56 ChangeGC 70 PolyFillRectangle 76 ImageText8 GC value mask bits we use: GCForeground = 0x00000004 Event mask bits (for the CreateWindow value list): ExposureMask = 0x00008000 KeyPressMask = 0x00000001 ButtonPressMask = 0x00000004 StructureNotifyMask = 0x00020000 license_tier: ORIGINAL genealogy_id: international-research-sources/x_org/xproto_v11_r0 lineage_id: nishi_x11_paint_q10

dependencies 3 imports · 9 importers

nx_syscalls.nx nx_x11_connect.nx nx_x11_window.nx nx_x11_paint.nx nx_browser.nx nx_browser_demo_test.nx nx_desktop_game.nx nx_render_wiki_styled_window.nx nx_render_wiki_window.nx nx_x11_font_test.nx nx_x11_get_image.nx nx_x11_paint_text_5x7.nx nx_x11_pixmap_kat_test.nx

imports: nx_syscalls.nxnx_x11_connect.nxnx_x11_window.nx

imported by: nx_browser.nxnx_browser_demo_test.nxnx_desktop_game.nxnx_render_wiki_styled_window.nxnx_render_wiki_window.nxnx_x11_font_test.nxnx_x11_get_image.nxnx_x11_paint_text_5x7.nxnx_x11_pixmap_kat_test.nx

structs

none

consts

30const NX_X11_EVENT_EXPOSURE: i64 = 0x00008000
31const NX_X11_EVENT_KEY_PRESS: i64 = 0x00000001
32const NX_X11_EVENT_BUTTON_PRESS: i64 = 0x00000004
33const NX_X11_EVENT_BUTTON_RELEASE: i64 = 0x00000008
34const NX_X11_EVENT_POINTER_MOTION: i64 = 0x00000040
35const NX_X11_EVENT_STRUCTURE: i64 = 0x00020000
37const NX_X11_GC_FOREGROUND: i64 = 0x00000004

functions

40func nx_x11_create_gc(conn: *X11Conn, drawable: i64, fg_pixel: i64) -> i64
64func nx_x11_set_gc_foreground(conn: *X11Conn, gc: i64, fg_pixel: i64) -> i64
80func nx_x11_fill_rect(conn: *X11Conn, drawable: i64, gc: i64,
101func nx_x11_image_text8(conn: *X11Conn, drawable: i64, gc: i64,
131func nx_x11_poly_text8(conn: *X11Conn, drawable: i64, gc: i64,
158func nx_x11_open_font(conn: *X11Conn, name: *u8, name_len: i64) -> i64
177func nx_x11_set_gc_font(conn: *X11Conn, gc: i64, fid: i64) -> i64
207func nx_x11_read_event(conn: *X11Conn, out: *u8) -> i64
217func main() -> i64