Skip to content

Agent KB_kernel_p4

grisun0 edited this page Oct 23, 2026 · 10 revisions

Subsystem: kernel (page 4 of 4)

Previous: KB_kernel_p3.md

kernel/vga_fb.c

  • Doc: wm_geom_cfg: /** Docstring: Focus ids share one space across terminals and graphics....
  • Layer: utility
  • Language: c
  • Symbols:
    • termwin_t (struct, line 978)
    • wm_geom_cfg (function, line 49) static wm_geom_config_t wm_geom_cfg(void)
    • wm_event_cfg (function, line 60) static wm_event_config_t wm_event_cfg(void)
    • wm_drag_reset (function, line 69) static void wm_drag_reset(void)
    • vga_fb_boot_config (function, line 90) void vga_fb_boot_config(void)
    • fb_bytes_per_pixel (function, line 117) int fb_bytes_per_pixel(void)
    • fb_copy_bytes (function, line 151) static void fb_copy_bytes(volatile void *dst, const volatile void *src, unsigned long n)
    • fb_fill_u32 (function, line 169) static void fb_fill_u32(volatile void *dst, unsigned int v, unsigned long n)
    • fb_frame_bytes (function, line 183) static unsigned long fb_frame_bytes(void)
    • fb_shadow_ready (function, line 189) static int fb_shadow_ready(void)
    • fb_present_shadow (function, line 210) static void fb_present_shadow(void)
    • fb_compose_begin (function, line 221) static int fb_compose_begin(void)
    • fb_compose_end (function, line 234) static void fb_compose_end(int owner)
    • lg_get (function, line 305) static const char *lg_get(int i)
    • lg_push (function, line 312) static void lg_push(const char *line, int len)
    • lg_alloc (function, line 333) static void lg_alloc(void)
    • vga_fb_term_ring_init (function, line 349) void vga_fb_term_ring_init(void)
    • vga_fb_term_feed (function, line 357) void vga_fb_term_feed(const char *line, int len)
    • line_nrows (function, line 364) static int line_nrows(int len)
    • act_nrows (function, line 371) static int act_nrows(void)
    • total_rows (function, line 374) static int total_rows(void)
    • disp_clamp (function, line 382) static void disp_clamp(void)
    • line_at (function, line 400) static const char *line_at(int abs, int *off)
    • first (function, line 456) * screen ever showing it whole first (the old flash-then-melt). */ static unsigned int *fx_start_...
    • gfx_view_cfg (function, line 572) static wm_gfxview_config_t gfx_view_cfg(void)
    • gfx_covers_screen (function, line 581) static int gfx_covers_screen(void)
    • gfx_keep_save (function, line 587) static void gfx_keep_save(const volatile uint8_t *src, int kind, int sw, int sh)
    • vga_fb_set_gfx_program (function, line 613) void vga_fb_set_gfx_program(const char *name)
    • shcmd_base (function, line 632) static void shcmd_base(const char *cmd, char *out, unsigned long cap)
    • ci_eq (function, line 649) static int ci_eq(const char *a, const char *b)
    • gfx_prog_icon (function, line 662) static const uint8_t *gfx_prog_icon(void)
    • vga_fb_set_gfx_mode (function, line 675) void vga_fb_set_gfx_mode(int on)
    • gfx_view_for (function, line 726) static int gfx_view_for(int sw, int sh, wm_gfxview_t *v)
    • gfx_view_publish (function, line 738) static void gfx_view_publish(const wm_gfxview_t *v)
    • gfx_float_frame (function, line 752) static int gfx_float_frame(wm_gfxview_rect_t *out)
    • vga_fb_gfx_origin (function, line 768) void vga_fb_gfx_origin(int *x, int *y)
    • vga_fb_gfx_map_mouse (function, line 785) void vga_fb_gfx_map_mouse(int *x, int *y)
    • vga_fb_gfx_cursor_erase (function, line 800) static void vga_fb_gfx_cursor_erase(void)
    • vga_fb_gfx_cursor_draw (function, line 810) static void vga_fb_gfx_cursor_draw(void)
    • wm_focus_cursor_sync (function, line 1001) static void wm_focus_cursor_sync(const wm_notify_event_t *e)
    • wm_emit_focus_moved (function, line 1008) static void wm_emit_focus_moved(int before, int source)
    • vga_fb_focus_event (function, line 1020) const wm_notify_event_t *vga_fb_focus_event(void)
    • vga_fb_focus_report (function, line 1026) void vga_fb_focus_report(int before, int source)
    • tw_park (function, line 1035) static void tw_park(int i)
    • tw_unpark (function, line 1065) static void tw_unpark(int i)
    • wm_init_once (function, line 1100) static void wm_init_once(void)
    • tw_select (function, line 1125) static void tw_select(int i)
    • vga_fb_focus_get (function, line 1137) int vga_fb_focus_get(void)
    • vga_fb_nterms_get (function, line 1138) int vga_fb_nterms_get(void)
    • wm_snapshot_state (function, line 1141) static void wm_snapshot_state(wm_focus_state_t *st)
    • vga_fb_focus_next (function, line 1154) void vga_fb_focus_next(void)
    • wm_gfx_focus_sync (function, line 1200) static void wm_gfx_focus_sync(int on)
    • vga_fb_focus_id (function, line 1219) int vga_fb_focus_id(int id)
    • vga_fb_boot_history_to_active (function, line 1254) static void vga_fb_boot_history_to_active(void)
    • content (function, line 1269) `* windows would share content (same prompt/output on both) and a park
  • would alias src == dst. ...`
  • vga_fb_layout_set (function, line 1354) int vga_fb_layout_set(int mode)
  • vga_fb_layout_cycle (function, line 1365) void vga_fb_layout_cycle(void)
  • vga_fb_layout_get (function, line 1381) int vga_fb_layout_get(void)
  • vga_fb_layout_name (function, line 1387) const char *vga_fb_layout_name(void)
  • alone (function, line 1399) `* window alone (an unfocused graphics window minimizes to the taskbar,
  • exactly like the hidden...`
  • vga_fb_list_windows (function, line 1526) void vga_fb_list_windows(void)
  • vga_fb_act_empty (function, line 1584) int vga_fb_act_empty(void)
  • vga_fb_note_prompt (function, line 1588) void vga_fb_note_prompt(void)
  • vga_fb_clear_prompt (function, line 1593) void vga_fb_clear_prompt(void)
  • vga_fb_prompted (function, line 1598) int vga_fb_prompted(void)
  • vga_fb_prompt_live (function, line 1607) int vga_fb_prompt_live(void)
  • vga_fb_park_line (function, line 1614) void vga_fb_park_line(const char *b, int p)
  • vga_fb_unpark_line (function, line 1629) int vga_fb_unpark_line(char *b, int *p)
  • tw_hit (function, line 1644) static int tw_hit(int i, int mx, int my)
  • vga_fb_set_gfx_palette (function, line 1750) void vga_fb_set_gfx_palette(const unsigned char *pal)
  • fb_pack_idx (function, line 1765) static unsigned long fb_pack_idx(unsigned idx)
  • fb_write_packed (function, line 1781) void fb_write_packed(int x, int y, unsigned long rgb)
  • fb_read_packed (function, line 1801) unsigned long fb_read_packed(int x, int y)
  • vga_fb_read_rgb (function, line 1825) unsigned long vga_fb_read_rgb(int x, int y)
  • fb_write_row_packed (function, line 1830) void fb_write_row_packed(int x, int y, const unsigned int *src, int n)
  • fb_read_row_packed (function, line 1860) void fb_read_row_packed(int x, int y, unsigned int *dst, int n)
  • fb_fill_run (function, line 1882) static void fb_fill_run(int x, int y, int n, unsigned long px)
  • wall_level (function, line 1908) static int wall_level(int v)
  • vga_fb_set_palette (function, line 1917) static void vga_fb_set_palette(void)
  • fb_glyph (function, line 1970) static const uint8_t *fb_glyph(unsigned char c)
  • vga_fb_pixel (function, line 1991) void vga_fb_pixel(int x, int y, uint8_t color)
  • vga_fb_clear (function, line 2001) void vga_fb_clear(void)
  • vga_fb_rect (function, line 2011) void vga_fb_rect(int x, int y, int w, int h, uint8_t color)
  • vga_fb_pixel_rgb (function, line 2026) void vga_fb_pixel_rgb(int x, int y, uint8_t r, uint8_t g, uint8_t b)
  • vga_fb_rect_rgb (function, line 2035) void vga_fb_rect_rgb(int x, int y, int w, int h, uint8_t r, uint8_t g, uint8_t b)
  • vga_fb_char (function, line 2042) void vga_fb_char(int col, int row, char c, uint8_t fg, uint8_t bg)
  • vga_fb_str (function, line 2056) void vga_fb_str(int col, int row, const char *s, uint8_t fg, uint8_t bg)
  • text_px (function, line 2067) static void text_px(int px, int py, const char *s, uint8_t fg, uint8_t bg)
  • wm_draw_buttons (function, line 2093) static void wm_draw_buttons(int px, int py, int win_w, uint8_t fg, uint8_t bg)
  • wm_buttons_hit (function, line 2119) static int wm_buttons_hit(int mx, int my, int win_x, int win_y, int win_w)
  • wm_close_pending (function, line 2134) int wm_close_pending(void)
  • wm_clear_close (function, line 2135) void wm_clear_close(void)
  • wm_gfx_mode_active (function, line 2136) int wm_gfx_mode_active(void)
  • vga_fb_ps2_owner (function, line 2139) int vga_fb_ps2_owner(int pid)
  • taskbar (function, line 2159) `* minimize hides the app to the taskbar (it never closes it), maximize
  • toggles true fullscreen...`
  • directly (function, line 2207) * RGB sources pack directly (quantized to the wallpaper cube in 8-bit). */ static void gfx_scale_...
  • gfx_letterbox (function, line 2312) static void gfx_letterbox(const wm_gfxview_t *v)
  • gfx_title (function, line 2331) static void gfx_title(const wm_gfxview_t *v)
  • gfx_compose (function, line 2343) static void gfx_compose(const volatile uint8_t *src, int kind, int sw, int sh, ...
  • gfx_present (function, line 2409) static void gfx_present(const volatile uint8_t *bb, int kind, int sw, int sh)
  • gfx_cursor_follow_idle (function, line 2425) static void gfx_cursor_follow_idle(void)
  • vga_fb_blit_gfx_window (function, line 2438) void vga_fb_blit_gfx_window(void)
  • vga_fb_blit_nk_window (function, line 2447) void vga_fb_blit_nk_window(void)
  • vga_fb_blit_nk_rgb_window (function, line 2453) void vga_fb_blit_nk_rgb_window(void)
  • term_recalc (function, line 2462) static void term_recalc(void)
  • draw_title_win (function, line 2488) static void draw_title_win(int idx, int focused)
  • taskbar_layout (function, line 2519) static void taskbar_layout(void)
  • draw_speaker_icon (function, line 2550) static void draw_speaker_icon(int x, int y, uint8_t color)
  • taskbar_render (function, line 2559) static void taskbar_render(void)
  • taskbar_tick (function, line 2638) static void taskbar_tick(void)
  • vga_fb_theme_name (function, line 2654) int vga_fb_theme_name(char *dst, int cap)
  • taskbar_theme_cycle (function, line 2675) static void taskbar_theme_cycle(void)
  • taskbar_handle_click (function, line 2715) static void taskbar_handle_click(int mx, int my)
  • draw_scrollbar (function, line 2775) static void draw_scrollbar(void)
  • render_blank_row (function, line 2810) static void render_blank_row(int vrow)
  • render_row (function, line 2820) static void render_row(int vrow, int abs)
  • term_render (function, line 2855) static void term_render(void)
  • buffer (function, line 2870) * owns the buffer (indices reset, render reads an empty ring). */ void term_clear(void)
  • term_render_active (function, line 2887) static void term_render_active(void)
  • line (function, line 2930) `* display stale bytes left over from a longer previous line (e.g. the prompt
  • would show the ta...`
  • escapes (function, line 2939) `* swallowing them here keeps the escapes (which the serial side needs)
    • from printing as li...`
  • vga_fb_puts_term (function, line 2996) void vga_fb_puts_term(const char *s)
  • vga_fb_text_cursor (function, line 3002) void vga_fb_text_cursor(int col)
  • vga_fb_hide_text_cursor (function, line 3010) void vga_fb_hide_text_cursor(void)
  • vga_fb_draw_desktop (function, line 3034) void vga_fb_draw_desktop(void)
  • gfx_view_in_rect (function, line 3129) static void gfx_view_in_rect(const wm_gfxview_rect_t *r, int titled, wm_gfxview_t *v)
  • gfx_animate (function, line 3148) static void gfx_animate(const wm_gfxview_rect_t *from, const wm_gfxview_rect_t *to, ...
  • gfx_taskbar_rect (function, line 3198) static void gfx_taskbar_rect(wm_gfxview_rect_t *r)
  • gfx_drop_focus (function, line 3235) static void gfx_drop_focus(int source)
  • from (function, line 3246) `* leaving returns to the view it came from (floating or tiled). Returns
  • 0 on success, -1 witho...`
  • vga_fb_gfx_set_hidden (function, line 3280) int vga_fb_gfx_set_hidden(int hide)
  • vga_fb_gfx_view_name (function, line 3308) const char *vga_fb_gfx_view_name(void)
  • term_toggle_fullscreen (function, line 3320) static void term_toggle_fullscreen(void)
  • vga_fb_toggle_fullscreen (function, line 3332) void vga_fb_toggle_fullscreen(void)
  • term_toggle_minimize (function, line 3343) static void term_toggle_minimize(void)
  • vga_fb_toggle_minimize (function, line 3353) void vga_fb_toggle_minimize(void)
  • vga_fb_is_minimized (function, line 3361) int vga_fb_is_minimized(void)
  • vga_fb_is_fullscreen (function, line 3362) int vga_fb_is_fullscreen(void)
  • gfx_snap (function, line 3367) static void gfx_snap(int zone)
  • term_close_default (function, line 3400) static void term_close_default(void)
  • vga_fb_close_active (function, line 3416) int vga_fb_close_active(void)
  • vga_fb_move_terminal (function, line 3430) void vga_fb_move_terminal(int dx, int dy)
  • term_max_cols (function, line 3475) static int term_max_cols(void)
  • term_max_rows (function, line 3479) static int term_max_rows(void)
  • term_finish_layout (function, line 3484) static void term_finish_layout(void)
  • vga_fb_snap_window (function, line 3490) void vga_fb_snap_window(int zone)
  • vga_fb_resize (function, line 3518) void vga_fb_resize(int dcols, int drows)
  • vga_fb_reset_default (function, line 3538) void vga_fb_reset_default(void)
  • wallpaper_ensure (function, line 3592) static void wallpaper_ensure(void)
  • wallpaper_usable (function, line 3644) static int wallpaper_usable(void)
  • wallpaper_draw (function, line 3649) static void wallpaper_draw(void)
  • pipe_field (function, line 3675) static const char *pipe_field(const char *line, int idx, char *buf, int buflen)
  • icon_nearest (function, line 3693) static int icon_nearest(int r, int g, int b)
  • icon_embedded (function, line 3709) static const uint8_t *icon_embedded(const char *name)
  • icon_decode (function, line 3729) static const uint8_t *icon_decode(const char *path)
  • icon_embedded_rgba (function, line 3763) static const uint8_t *icon_embedded_rgba(const uint8_t *idx)
  • dock_label_px (function, line 3791) static int dock_label_px(const struct desktop_shortcut *sc)
  • shortcuts_layout (function, line 3800) static void shortcuts_layout(void)
  • shortcut_cell_left (function, line 3818) static int shortcut_cell_left(int i)
  • desktop_shortcuts_load (function, line 3825) void desktop_shortcuts_load(void)
  • shortcut_draw_scaled (function, line 3881) static void shortcut_draw_scaled(const struct desktop_shortcut *sc, ...
  • dock_hover_index (function, line 3906) static int dock_hover_index(int mx, int my)
  • dock_bounce_counts (function, line 3933) void dock_bounce_counts(unsigned long *kicks, unsigned long *paints)
  • dock_click_count (function, line 3943) void dock_click_count(unsigned long *edges)
  • dock_bounce_elapsed (function, line 3949) static unsigned long dock_bounce_elapsed(void)
  • dock_bounce_live (function, line 3957) static int dock_bounce_live(void)
  • dock_pending_active (function, line 4007) int dock_pending_active(void)
  • dock_paint_icons (function, line 4015) static void dock_paint_icons(int hover)
  • desktop_shortcuts_draw (function, line 4051) void desktop_shortcuts_draw(void)
  • wallpaper_rect (function, line 4078) static void wallpaper_rect(int x0, int y0, int w, int h)
  • dock_paint_hover (function, line 4109) static void dock_paint_hover(int hover)
  • gfx_task_icon (function, line 4145) static const uint8_t *gfx_task_icon(void)
  • desktop_shortcuts_hit_test (function, line 4166) const char *desktop_shortcuts_hit_test(int mx, int my)
  • mouse_focus_topmost (function, line 4180) static int mouse_focus_topmost(int mx, int my)
  • mouse_apply_wheel (function, line 4206) static void mouse_apply_wheel(int wheel, int step)
  • mouse_drag_gfx (function, line 4230) static void mouse_drag_gfx(const wm_geom_config_t *gcfg, int mx, int my)
  • mouse_drag_term (function, line 4282) static void mouse_drag_term(const wm_geom_config_t *gcfg, int win_w, int mx, int my, int gfx_cursor)
  • mouse_scrollbar (function, line 4305) static void mouse_scrollbar(const wm_geom_config_t *gcfg, int mx, int my)
  • vga_fb_wait_tick (function, line 4334) void vga_fb_wait_tick(void)
  • vga_fb_mouse_tick (function, line 4343) void vga_fb_mouse_tick(void)
  • state (function, line 4467) `* ignores the button state (the arming press is consumed) and settles
    • once on expiry, so t...`
  • vga_fb_mouse_init (function, line 4545) void vga_fb_mouse_init(void)
  • vga_fb_history_page (function, line 4599) void vga_fb_history_page(int dir)
  • vga_fb_init (function, line 4611) void vga_fb_init(void)
  • compositions (function, line 133) * compositions (an ISR tick composing inside a syscall composition) draw * into the same shadow and leave the...
  • flag (function, line 533) * is the minimized flag (the program keeps running, nothing composites);
  • letterbox (function, line 537) * present to repaint chrome plus letterbox (after a desktop redraw or a * view change);
  • coordinates (function, line 782) * windows keep the exact historical coordinates (including outside the * window);
  • gfx_transition (function, line 976) static void gfx_transition(const wm_gfxview_rect_t *from, int from_titled);
  • app (function, line 1195) * a gfx child spawned from another gfx app (file -> vedit) keeps the * terminal focused, so its keys and wheel keep...
  • title (function, line 2569) * 8px row plus its title (bright when focused). The hint line * starts after it instead of underneath. */ const...
  • command (function, line 4140) * its launch command (config-driven, covers apps that never set a window * title);
  • pointer (function, line 4227) * tiled window floats it at native size under the pointer (the grab point * keeps its relative position along the...
  • path (function, line 4354) * present path (blit_gfx_buf) is the sole cursor painter. The tick * used to share the sprite state with it and...
  • FBT (macro, line 145) #define FBT
  • LG_LINE (macro, line 296) #define LG_LINE(a)
  • GFX_SRC_IDX (macro, line 524) #define GFX_SRC_IDX
  • GFX_SRC_RGB (macro, line 525) #define GFX_SRC_RGB
  • GFX_KEEP_BYTES (macro, line 526) #define GFX_KEEP_BYTES
  • GFX_CURSOR_IDLE_TICKS (macro, line 552) #define GFX_CURSOR_IDLE_TICKS
  • GFX_CURSOR_FOLLOW_TICKS (macro, line 558) #define GFX_CURSOR_FOLLOW_TICKS
  • GFX_PROG_LEN (macro, line 610) #define GFX_PROG_LEN
  • WIN_DEF_COLS (macro, line 936) #define WIN_DEF_COLS
  • WIN_DEF_ROWS (macro, line 937) #define WIN_DEF_ROWS
  • WIN_DEF_X (macro, line 938) #define WIN_DEF_X
  • WIN_DEF_Y (macro, line 939) #define WIN_DEF_Y
  • WM_MAX_TERMS (macro, line 967) #define WM_MAX_TERMS
  • WM_ELINE_SZ (macro, line 968) #define WM_ELINE_SZ
  • FB_OFFSET (macro, line 1687) #define FB_OFFSET(x,y)
  • TB_GFX_TITLE_MAX (macro, line 2517) #define TB_GFX_TITLE_MAX
  • Depends on: headers/arch/x86/boot/bootdefs.h, headers/desktop_icons.h, headers/desktop_shortcuts.h, headers/drivers/kbd.h, headers/kernel/vga_cursor.h, headers/sched.h, headers/vga_fb.h, headers/vga_fx.h, headers/wm_events.h, headers/wm_focus.h, headers/wm_geom.h, headers/wm_gfxview.h, headers/wm_layout.h, headers/wm_notify.h, headers/wm_render.h, headers/wm_tiling.h, headers/wm_window.h

kernel/vga_fx.c

  • Doc: DOOM-melt desktop effects (see headers/vga_fx.h for the contract).
  • Layer: utility
  • Language: c
  • Symbols:
    • vga_fx_set_enabled (function, line 22) void vga_fx_set_enabled(int on)
    • vga_fx_enabled (function, line 27) int vga_fx_enabled(void)
    • fx_wait_until (function, line 35) static void fx_wait_until(unsigned long deadline)
    • vga_fx_snap_rect (function, line 41) unsigned int *vga_fx_snap_rect(int x, int y, int w, int h)
    • vga_fx_restore_rect (function, line 63) void vga_fx_restore_rect(int x, int y, int w, int h, const unsigned int *buf)
    • vga_fx_free (function, line 77) void vga_fx_free(unsigned int *buf)
    • once (function, line 90) `* once (prev[] tracks the revealed frontier per column), then the final
  • restore guarantees the...`
  • vga_fx_melt_rect (function, line 150) void vga_fx_melt_rect(int x, int y, int w, int h, const unsigned int *oldb, const unsigned in...
  • vga_fx_melt_from_black (function, line 159) void vga_fx_melt_from_black(int x, int y, int w, int h, const unsigned int *newb)
  • Depends on: headers/vga_fb.h, headers/vga_fx.h

Start

Wiki

Agent Docs

Recipes

Clone this wiki locally