MOS Source Code
Loading...
Searching...
No Matches
sbi_console.c File Reference
+ Include dependency graph for sbi_console.c:

Go to the source code of this file.

Functions

static size_t sbi_console_write (console_t *con, const char *data, size_t size)
 
static bool sbi_console_set_color (console_t *con, standard_color_t fg, standard_color_t bg)
 
static bool sbi_console_get_color (console_t *con, standard_color_t *fg, standard_color_t *bg)
 
static bool sbi_console_clear (console_t *console)
 

Variables

static standard_color_t sbi_console_bg = Black
 
static standard_color_t sbi_console_fg = White
 
static console_ops_t sbi_console_ops
 
console_t sbi_console
 

Function Documentation

◆ sbi_console_write()

static size_t sbi_console_write ( console_t * con,
const char * data,
size_t size )
static

Definition at line 13 of file sbi_console.c.

+ Here is the call graph for this function:

◆ sbi_console_set_color()

static bool sbi_console_set_color ( console_t * con,
standard_color_t fg,
standard_color_t bg )
static

Definition at line 20 of file sbi_console.c.

+ Here is the call graph for this function:

◆ sbi_console_get_color()

static bool sbi_console_get_color ( console_t * con,
standard_color_t * fg,
standard_color_t * bg )
static

Definition at line 32 of file sbi_console.c.

◆ sbi_console_clear()

static bool sbi_console_clear ( console_t * console)
static

Definition at line 40 of file sbi_console.c.

+ Here is the call graph for this function:

Variable Documentation

◆ sbi_console_bg

standard_color_t sbi_console_bg = Black
static

Definition at line 11 of file sbi_console.c.

Referenced by sbi_console_get_color(), and sbi_console_set_color().

◆ sbi_console_fg

standard_color_t sbi_console_fg = White
static

Definition at line 11 of file sbi_console.c.

Referenced by sbi_console_get_color(), and sbi_console_set_color().

◆ sbi_console_ops

console_ops_t sbi_console_ops
static
Initial value:
= {
.get_color = sbi_console_get_color,
.set_color = sbi_console_set_color,
}
static size_t sbi_console_write(console_t *con, const char *data, size_t size)
Definition sbi_console.c:13
static bool sbi_console_get_color(console_t *con, standard_color_t *fg, standard_color_t *bg)
Definition sbi_console.c:32
static bool sbi_console_clear(console_t *console)
Definition sbi_console.c:40
static bool sbi_console_set_color(console_t *con, standard_color_t fg, standard_color_t bg)
Definition sbi_console.c:20

Definition at line 47 of file sbi_console.c.

◆ sbi_console

console_t sbi_console
Initial value:
= {
.ops = &sbi_console_ops,
.name = "sbi-console",
.default_fg = White,
.default_bg = Black,
}
@ CONSOLE_CAP_COLOR
Definition console.h:15
@ CONSOLE_CAP_CLEAR
Definition console.h:16
@ White
Definition ansi_colors.h:34
@ Black
Definition ansi_colors.h:19
static console_ops_t sbi_console_ops
Definition sbi_console.c:47

Definition at line 54 of file sbi_console.c.