|
PatchworkOS
|
Screen logging. More...
Data Structures | |
| struct | log_screen_pos_t |
| Represents a position on the screen in character coordinates. More... | |
| struct | log_screen_line_t |
| A single line in the screen buffer. More... | |
| struct | log_screen_t |
| The screen buffer. More... | |
Macros | |
| #define | SCREEN_WRAP_INDENT 4 |
| Number of spaces to indent when a line wraps. | |
| #define | SCREEN_LINE_MAX_LENGTH (130) |
| Maximum number of characters in a single line. | |
| #define | SCREEN_LINE_STRIDE (SCREEN_LINE_MAX_LENGTH * GLYPH_WIDTH) |
| The stride of a screen line in pixels. | |
Functions | |
| void | log_screen_init (const boot_gop_t *bootGop) |
| Initialize the screen logging. | |
| void | log_screen_clear (void) |
| Clear the screen. | |
| uint64_t | log_screen_get_width (void) |
| Get screen width in characters. | |
| uint64_t | log_screen_get_height (void) |
| Get screen height in characters. | |
| void | log_screen_write (const char *string, uint64_t length) |
| Write a string to the screen. | |
Screen logging.
| #define SCREEN_LINE_MAX_LENGTH (130) |
Maximum number of characters in a single line.
Definition at line 27 of file log_screen.h.
| #define SCREEN_LINE_STRIDE (SCREEN_LINE_MAX_LENGTH * GLYPH_WIDTH) |
The stride of a screen line in pixels.
Definition at line 32 of file log_screen.h.
| #define SCREEN_WRAP_INDENT 4 |
Number of spaces to indent when a line wraps.
Definition at line 22 of file log_screen.h.
| void log_screen_clear | ( | void | ) |
Clear the screen.
Definition at line 172 of file log_screen.c.
References cursor, log_screen_t::firstLineIndex, gop, boot_gop_t::height, log_screen_t::height, log_screen_t::invalidEnd, log_screen_t::invalidStart, log_screen_line_t::length, log_screen_t::lines, lock, LOCK_SCOPE, memset(), memset32(), log_screen_line_t::pixels, screen, boot_gop_t::stride, boot_gop_t::virtAddr, boot_gop_t::width, and y.
Referenced by log_file_flush_to_screen(), and log_screen_init().
| uint64_t log_screen_get_height | ( | void | ) |
Get screen height in characters.
Definition at line 199 of file log_screen.c.
References log_screen_t::height, and screen.
Referenced by log_file_flush_to_screen().
| uint64_t log_screen_get_width | ( | void | ) |
Get screen width in characters.
Definition at line 194 of file log_screen.c.
References screen, and log_screen_t::width.
Referenced by log_file_advance_fake_cursor().
| void log_screen_init | ( | const boot_gop_t * | bootGop | ) |
Initialize the screen logging.
| screen | The screen state to initialize. |
| bootGop | Pointer to the bootloader-provided GOP information for screen logging. |
Definition at line 83 of file log_screen.c.
References CONFIG_SCREEN_MAX_LINES, cursor, log_screen_t::firstLineIndex, GLYPH_HEIGHT, GLYPH_WIDTH, gop, boot_gop_t::height, log_screen_t::height, log_screen_t::invalidEnd, log_screen_t::invalidStart, log_screen_t::lines, log_screen_clear(), memset(), MIN, screen, SCREEN_LINE_MAX_LENGTH, boot_gop_t::width, and log_screen_t::width.
Referenced by log_init().
| void log_screen_write | ( | const char * | string, |
| uint64_t | length | ||
| ) |
Write a string to the screen.
| screen | The screen state. |
| string | The string to write. |
| length | The length of the string. |
Definition at line 204 of file log_screen.c.
References lock, LOCK_SCOPE, log_screen_advance_cursor(), log_screen_flush(), and log_screen_put().
Referenced by log_file_flush_to_screen(), and log_write().