Expand description
Framebuffer text console (Limine 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 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. - canvas π
- Canvas convenience drawing API : a thin wrapper around VgaWriter for drawing primitives.
- cursor π
- Cursor manager for the framebuffer terminal.
- debug_
overlay π - 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Β§
- Canvas
- Framebuffer
Info - Render
Stats - Sprite
Rgba - Terminal
Widget - Text
Metrics - Text
Options - UiDock
Layout - UiLabel
- UiPanel
- UiProgress
Bar - UiRect
- UiTable
- UiTheme
- VgaWriter
EnumsΒ§
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.
- 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_
system_ status_ line - Performs the draw system status line 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.
- 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.
- init_
panic_ fb_ globals - Initialise the panic-screen framebuffer globals. Must be called once from vga::init() after configure() succeeds.
- is_
available - Returns whether available.
- maybe_
refresh_ system_ status_ line - Performs the maybe refresh system status line operation.
- measure_
text - Performs the measure text operation.
- panic_
draw_ direct - Draw the full panic screen directly to the framebuffer (no locking).
- present
- Performs the present operation.
- 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_
double_ buffer_ mode - Sets double buffer mode.
- set_
status_ hostname - Sets status hostname.
- set_
status_ ip - Sets status ip.
- set_
text_ color - Sets text color.
- set_
text_ cursor - Sets text cursor.
- set_
ui_ scale - Sets ui scale.
- start_
selection - Starts selection.
- status_
line_ task_ main - Performs the status line task main operation.
- text_
cols - Performs the text cols operation.
- text_
rows - Performs the text rows operation.
- try_
with_ writer - Performs the try with writer operation.
- 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_ status_ bar - Performs the ui draw status 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.
- vga_
debug_ init - Initialise or re-initialise the live debug writerβs geometry.
Called automatically from
vga::init(). - vga_
debug_ write - Write a string directly to the VGA framebuffer in real time.
- vga_
debug_ writeln - Write a newline-terminated line to the live VGA debug output.
- 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.