nx_x11_paint.nx
buildroot/runtime/nx_x11_paint.nx
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
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
| 30 | const NX_X11_EVENT_EXPOSURE: i64 = 0x00008000 |
| 31 | const NX_X11_EVENT_KEY_PRESS: i64 = 0x00000001 |
| 32 | const NX_X11_EVENT_BUTTON_PRESS: i64 = 0x00000004 |
| 33 | const NX_X11_EVENT_BUTTON_RELEASE: i64 = 0x00000008 |
| 34 | const NX_X11_EVENT_POINTER_MOTION: i64 = 0x00000040 |
| 35 | const NX_X11_EVENT_STRUCTURE: i64 = 0x00020000 |
| 37 | const NX_X11_GC_FOREGROUND: i64 = 0x00000004 |
functions
| 40 | func nx_x11_create_gc(conn: *X11Conn, drawable: i64, fg_pixel: i64) -> i64 called by 8: mainpaint_and_logpaint_chromedg_setupmainmain+2 calls 5: nx_x11_alloc_idsys_mmap_x11_wr_u16_x11_wr_u32_x11_send |
| 64 | func nx_x11_set_gc_foreground(conn: *X11Conn, gc: i64, fg_pixel: i64) -> i64 |
| 80 | func nx_x11_fill_rect(conn: *X11Conn, drawable: i64, gc: i64, called by 9: br_buttonbr_chromebr_drawpaint_and_logpaint_chromedraw_styled+3 calls 4: sys_mmap_x11_wr_u16_x11_wr_u32_x11_send |
| 101 | func nx_x11_image_text8(conn: *X11Conn, drawable: i64, gc: i64, |
| 131 | func nx_x11_poly_text8(conn: *X11Conn, drawable: i64, gc: i64, |
| 158 | func nx_x11_open_font(conn: *X11Conn, name: *u8, name_len: i64) -> i64 |
| 177 | func nx_x11_set_gc_font(conn: *X11Conn, gc: i64, fid: i64) -> i64 called by 5: br_buttonbr_chromebr_drawdraw_styledmain calls 4: sys_mmap_x11_wr_u16_x11_wr_u32_x11_send |
| 207 | func nx_x11_read_event(conn: *X11Conn, out: *u8) -> i64 |
| 217 | func main() -> i64 |