summaryrefslogtreecommitdiff
path: root/kernel/include/term.h
blob: 8a8f1ef8db062f023f075d149ef15054607f657c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once 

#include <stdint.h>
#include <stddef.h>
#include <drivers/vga.h>

#define TERM_W VGA_TEXT_W
#define TERM_H VGA_TEXT_H

void term_init(void);
void term_reset(void);
void term_setfg(enum vga_color color);
void term_setbg(enum vga_color color);
void term_clear(void);
void term_scroll(int lines);
void term_setpos(uint8_t x, uint8_t y);

uint32_t term_save(void);
void term_load(uint32_t state);

uint16_t term_save_col(void);
void term_load_col(uint16_t color);

bool term_newline(void);

void term_flush(void);