PatchworkOS  c9fea19
A non-POSIX operating system.
Loading...
Searching...
No Matches
Screen

Screen logging. More...

Collaboration diagram for Screen:

Detailed Description

Screen logging.

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   17
 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.
 

Macro Definition Documentation

◆ SCREEN_WRAP_INDENT

#define SCREEN_WRAP_INDENT   17

Number of spaces to indent when a line wraps.

Header length (15) + 2 for indentation

Definition at line 24 of file log_screen.h.

◆ SCREEN_LINE_MAX_LENGTH

#define SCREEN_LINE_MAX_LENGTH   (130)

Maximum number of characters in a single line.

Definition at line 29 of file log_screen.h.

◆ SCREEN_LINE_STRIDE

#define SCREEN_LINE_STRIDE   (SCREEN_LINE_MAX_LENGTH * GLYPH_WIDTH)

The stride of a screen line in pixels.

Definition at line 34 of file log_screen.h.

Function Documentation

◆ log_screen_init()

void log_screen_init ( const boot_gop_t bootGop)

Initialize the screen logging.

Parameters
bootGopPointer to the bootloader-provided GOP information for screen logging.

Definition at line 83 of file log_screen.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_screen_clear()

void log_screen_clear ( void  )

Clear the screen.

Definition at line 172 of file log_screen.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_screen_get_width()

uint64_t log_screen_get_width ( void  )

Get screen width in characters.

Definition at line 194 of file log_screen.c.

Here is the caller graph for this function:

◆ log_screen_get_height()

uint64_t log_screen_get_height ( void  )

Get screen height in characters.

Definition at line 199 of file log_screen.c.

Here is the caller graph for this function:

◆ log_screen_write()

void log_screen_write ( const char *  string,
uint64_t  length 
)

Write a string to the screen.

Parameters
screenThe screen state.
stringThe string to write.
lengthThe length of the string.

Definition at line 204 of file log_screen.c.

Here is the call graph for this function:
Here is the caller graph for this function: