Expand description
Framebuffer text console (UEFI bootloader framebuffer + PSF font). https://en.wikipedia.org/wiki/PC_Screen_Font
Keeps the existing vga_print! / vga_println! API but renders text into
the graphical framebuffer when available. Falls back to serial otherwise.
ยงModule structure
types: Color, RgbColor, UiTheme, layout types, terminal widgetfont: PSF font parsing (PSF1/PSF2 + unicode map)writer:VgaWriterstruct: glyph rendering, scrollback, cursors, double-buffering, dirty-rect tracking, presentcanvas:Canvasconvenience drawing APIapi: Public free functions,VGA_WRITERstatic,init()panic_screen: Lock-free panic framebuffer drawingdebug_overlay: Live debug overlay (bypasses VGA_WRITER)status_line: Status bar kthread and rendering
Re-exportsยง
pub use canvas::Canvas;pub use console_mode::current as console_mode;pub use console_mode::is_lite;pub use console_mode::is_serial;pub use console_mode::present_min_ticks;pub use console_mode::select as select_console_mode;pub use console_mode::ConsoleMode;pub use writer::VgaWriter;pub use status_line::draw_system_status_line;pub use status_line::maybe_refresh_system_status_line;pub use status_line::set_status_hostname;pub use status_line::set_status_ip;pub use status_line::status_line_task_main;pub use status_line::ui_draw_status_bar;pub use debug_overlay::vga_debug_init;pub use debug_overlay::vga_debug_write;pub use debug_overlay::vga_debug_writeln;pub use panic_screen::init_panic_fb_globals;pub use panic_screen::panic_draw_direct;pub use crate::framebuffer::RgbColor;
Modulesยง
- api ๐
- Public VGA API surface : free functions, the global
VGA_WRITER, and thevga_print!/vga_println!macros that the rest of the kernel uses to talk to the framebuffer console. - boot_
progress - Pastel boot-progress bar drawn along the bottom of the framebuffer.
- canvas ๐
- Canvas convenience drawing API : a thin wrapper around VgaWriter for drawing primitives.
- console_
mode ๐ - Console rendering mode selection.
- cursor ๐
- Cursor manager for the framebuffer terminal.
- debug_
overlay ๐ - fastfb ๐
- Wide-store helpers for the linear framebuffer.
- font ๐
- PSF (PC Screen Font) font parsing.
- panic_
screen ๐ - Panic-safe framebuffer drawing.
- scrollback ๐
- Scrollback buffer for the framebuffer terminal.
- status_
line ๐ - types ๐
- VGA color types, UI theme/layout types, and terminal widget types.
- writer ๐
Structsยง
- Framebuffer
Info - Pixel
Format - Render
Stats - Sprite
Rgba - Terminal
Line - Terminal
Widget - Text
Metrics - Text
Options - Uefi
FbGeometry - Geometry of the framebuffer handed over by the UEFI bootloader.
- UiDock
Layout - UiLabel
- UiPanel
- UiProgress
Bar - UiRect
- UiTable
- UiTheme
Enumsยง
Constantsยง
Staticsยง
Functionsยง
- begin_
frame - Performs the begin frame operation.
- blit_
rgb - Performs the blit rgb operation.
- blit_
rgb24 - Performs the blit rgb24 operation.
- blit_
rgba - Performs the blit rgba operation.
- blit_
sprite_ rgba - Performs the blit sprite rgba operation.
- clear_
selection - Performs the clear selection operation.
- color_
to_ rgb - Performs the color to rgb operation.
- current_
fps - Performs the current fps operation.
- current_
ui_ scale - Performs the current ui scale operation.
- double_
buffer_ mode - Performs the double buffer mode operation.
- draw_
line - Performs the draw line operation.
- draw_
pixel - Performs the draw pixel operation.
- draw_
pixel_ alpha - Performs the draw pixel alpha operation.
- draw_
rect - Performs the draw rect operation.
- draw_
strata_ stack - Performs the draw strata stack operation.
- draw_
text - Performs the draw text operation.
- draw_
text_ at - Performs the draw text at operation.
- draw_
text_ cursor - Performs the draw text cursor operation.
- end_
frame - Performs the end frame operation.
- end_
selection - Performs the end selection operation.
- fill_
rect - Performs the fill rect operation.
- fill_
rect_ alpha - Performs the fill rect alpha operation.
- flush_
display - Request console rasterization and presentation at the next eligible tick. The console-render task also services the final fragment when output stops.
- framebuffer_
info - Performs the framebuffer info operation.
- get_
clipboard_ text - Returns clipboard text.
- get_
text_ cursor - Returns text cursor.
- glyph_
size - Performs the glyph size operation.
- height
- Performs the height operation.
- hide_
mouse_ cursor - Performs the hide mouse cursor operation.
- hide_
text_ cursor - Performs the hide text cursor operation.
- init
- Performs the init operation.
- is_
available - Returns whether available.
- measure_
text - Performs the measure text operation.
- parse_
ansi_ color_ prefix - Parses ansi color prefix.
- present
- Performs the present operation.
- publish_
uefi_ fb_ geometry - render_
stats - Returns lightweight render metrics for profiling.
- reset_
clip_ rect - Performs the reset clip rect operation.
- screen_
size - Performs the screen size operation.
- scroll_
to_ live - Return immediately to the live (bottom) view.
- scroll_
view_ down - Scroll the console view down (forward, toward live output) by
lineslines. - scroll_
view_ up - Scroll the console view up (backward in history) by
lineslines. - scrollbar_
click - Handle a click at framebuffer pixel
(px_x, px_y). If the click lands on the scrollbar, jump the view accordingly. - scrollbar_
drag_ to - Drag the scrollbar to a given Y pixel coordinate.
- scrollbar_
hit_ test - Returns
trueif(px_x, px_y)falls within the scrollbar strip. - set_
clip_ rect - Sets clip rect.
- set_
console_ defer_ present - Set or clear the console-defer-present flag.
When true,
write_bytes()skips present : only marks dirty. Callflush_display()to trigger the actual present. - set_
double_ buffer_ mode - Sets double buffer mode.
- set_
text_ color - Sets text color.
- set_
text_ cursor - Sets text cursor.
- set_
ui_ scale - Sets ui scale.
- start_
selection - Starts selection.
- supports_
char - Whether the loaded PSF font can actually render
ch. - text_
cols - Performs the text cols operation.
- text_
rows - Performs the text rows operation.
- try_
with_ writer - Performs the try with writer operation.
- uefi_
framebuffer - Framebuffer geometry published by the bootloader, if any.
- ui_
clear - Performs the ui clear operation.
- ui_
draw_ label - Performs the ui draw label operation.
- ui_
draw_ panel - Performs the ui draw panel operation.
- ui_
draw_ panel_ widget - Performs the ui draw panel widget operation.
- ui_
draw_ progress_ bar - Performs the ui draw progress bar operation.
- ui_
draw_ table - Performs the ui draw table operation.
- ui_
layout_ screen - Performs the ui layout screen operation.
- ui_
scale - Performs the ui scale operation.
- ui_
scale_ px - Performs the ui scale px operation.
- update_
mouse_ cursor - Updates mouse cursor.
- update_
selection - Updates selection.
- width
- Performs the width operation.
- with_
writer - Performs the with writer operation.
- write_
char - Writes one console character to the framebuffer console.
- write_
text - Writes raw console text to the framebuffer console in a single writer batch.