|
ginnOS
The reference: libc, the libraries and the kernel
|
text grid renderer over the framebuffer. More...
Functions | |
| void | fb_text_set_default_bg (uint32_t bg) |
| set the default background used by clear/scroll (0x00RRGGBB). | |
| void | fb_text_init (uint32_t scale, uint32_t margin) |
| initialize the text grid over the (already initialized) framebuffer. | |
| uint8_t | fb_text_rows (void) |
| number of character rows / columns that fit on screen. | |
| uint8_t | fb_text_cols (void) |
| void | fb_text_draw_glyph (uint8_t row, uint8_t col, char ch, uint32_t fg, uint32_t bg) |
| draw a glyph at a cell with explicit 0x00RRGGBB colours. | |
| void | fb_text_clear (void) |
| clear the whole grid to the current background colour. | |
| void | fb_text_scroll (void) |
| scroll the grid up by one row; the new bottom row is cleared. | |
| void | fb_text_set_cursor (uint8_t row, uint8_t col) |
| move / query the logical cursor (used by the tty backend to draw a caret). | |
| void | fb_text_get_cursor (uint8_t *row, uint8_t *col) |
| void | fb_text_set_colors (uint8_t fg, uint8_t bg) |
| set the active foreground/background as ANSI colour indices (0-15). | |
| void | fb_text_put (uint8_t row, uint8_t col, char ch) |
| draw a glyph at a cell using the active ANSI colours (set via fb_text_set_colors). | |
| void | fb_text_draw_cursor (uint8_t row, uint8_t col, bool visible) |
| draw or erase the software caret at a cell. | |
text grid renderer over the framebuffer.
| void fb_text_set_default_bg | ( | uint32_t | bg | ) |
set the default background used by clear/scroll (0x00RRGGBB).
initialize the text grid over the (already initialized) framebuffer.
computes the cell size from the font plus scaling/margins, derives the rows/cols that fit, and clears the screen.
| scale | integer glyph magnification (1 = native font size). |
| margin | pixels of blank border on each edge of the text area. |
| uint8_t fb_text_rows | ( | void | ) |
number of character rows / columns that fit on screen.
| uint8_t fb_text_cols | ( | void | ) |
draw a glyph at a cell with explicit 0x00RRGGBB colours.
| row,col | target cell (out-of-range is ignored). |
| ch | character code (0-255). |
| fg | foreground colour, |
| bg | background colour. |
| void fb_text_clear | ( | void | ) |
clear the whole grid to the current background colour.
| void fb_text_scroll | ( | void | ) |
scroll the grid up by one row; the new bottom row is cleared.
move / query the logical cursor (used by the tty backend to draw a caret).
set the active foreground/background as ANSI colour indices (0-15).
glyphs drawn via fb_text_put use these until changed.
draw a glyph at a cell using the active ANSI colours (set via fb_text_set_colors).
this is what the tty backend calls.