PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches

Screen logging. More...

Collaboration diagram for Screen:

Detailed Description

Screen logging.

Data Structures

struct  screen_pos_t
 Represents a position on the screen in character coordinates. More...
 
struct  screen_line_t
 A single line in 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 screen_init (void)
 Initialize and enable the screen logging.
 
void screen_show (void)
 Show the screen logging.
 
void screen_hide (void)
 Hide the screen logging.
 
void screen_panic (void)
 Show the screen without locking, for panic situations.
 
uint64_t screen_get_width (void)
 Get screen width in characters.
 
uint64_t screen_get_height (void)
 Get screen height in characters.
 
void 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 23 of file screen.h.

◆ SCREEN_LINE_MAX_LENGTH

#define SCREEN_LINE_MAX_LENGTH   (130)

Maximum number of characters in a single line.

Definition at line 28 of file 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 33 of file screen.h.

Function Documentation

◆ screen_init()

void screen_init ( void  )

Initialize and enable the screen logging.

Definition at line 80 of file screen.c.

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

◆ screen_show()

void screen_show ( void  )

Show the screen logging.

Definition at line 207 of file screen.c.

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

◆ screen_hide()

void screen_hide ( void  )

Hide the screen logging.

Definition at line 195 of file screen.c.

Here is the caller graph for this function:

◆ screen_panic()

void screen_panic ( void  )

Show the screen without locking, for panic situations.

Definition at line 201 of file screen.c.

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

◆ screen_get_width()

uint64_t screen_get_width ( void  )

Get screen width in characters.

Definition at line 219 of file screen.c.

◆ screen_get_height()

uint64_t screen_get_height ( void  )

Get screen height in characters.

Definition at line 224 of file screen.c.

◆ screen_write()

void 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 229 of file screen.c.

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