53 if (chr ==
'\n' || chr <
' ')
103 panic(
NULL,
"screen_init: boot info is NULL");
229 char chr =
string[
i];
static const glyph_cache_t cache
const glyph_cache_t * glyph_cache_get(void)
boot_info_t * boot_info_get(void)
Gets the boot info structure.
NORETURN void panic(const interrupt_frame_t *frame, const char *format,...)
Panic the kernel, printing a message and halting.
#define SCREEN_WRAP_INDENT
Number of spaces to indent when a line wraps.
#define SCREEN_LINE_MAX_LENGTH
Maximum number of characters in a single line.
uint64_t screen_get_width(void)
Get screen width in characters.
uint64_t screen_get_height(void)
Get screen height in characters.
void screen_init(void)
Initialize and enable the screen logging.
void screen_write(const char *string, uint64_t length)
Write a string to the screen.
#define SCREEN_LINE_STRIDE
The stride of a screen line in pixels.
void screen_hide(void)
Hide the screen logging.
void screen_show(void)
Show the screen logging.
#define LOCK_CREATE()
Create a lock initializer.
#define LOCK_SCOPE(lock)
Acquires a lock for the reminder of the current scope.
#define CONFIG_SCREEN_MAX_LINES
Maximum screen lines configuration.
#define NULL
Pointer error value.
static screen_line_t * screen_get_line(size_t y)
static void screen_flush(void)
static screen_pos_t cursor
static void screen_scroll(void)
static void screen_invalidate(const screen_pos_t *pos)
static screen_line_t lines[CONFIG_SCREEN_MAX_LINES]
static screen_pos_t invalidStart
static void screen_put(char chr)
static screen_pos_t invalidEnd
static void screen_advance_cursor(char chr)
_PUBLIC void * memset32(void *s, __UINT32_TYPE__ c, size_t n)
_PUBLIC void * memcpy(void *_RESTRICT s1, const void *_RESTRICT s2, size_t n)
_PUBLIC void * memset(void *s, int c, size_t n)
glyph_t glyphs[GLYPH_AMOUNT]
A simple ticket lock implementation.
A single line in the screen buffer.
uint8_t length
The distance from the start of the line to the end of the furthest away char, in chars.
Represents a position on the screen in character coordinates.