OurOS 0.1
Operating System built by McGill Students
 
Loading...
Searching...
No Matches
console.h
1#ifndef CONSOLE_H
2#define CONSOLE_H
3
4#include <stdint.h>
5#include "color.h"
6
7 // Print character c to the console in the given color.
8void cputchar(char c, color_t color);
9
10 // Print string str to the console in the given color, without a newline.
11void cprint(const char *str, color_t color);
12
13 // Print string str to the console in the given color, and add a newline.
14void cprintln(const char *str, color_t color);
15
16 // Print integer i to the console in base 10 in the given color.
17void cputint(int i, color_t color);
18
19 // Fill the screen with the given color, removing any text.
20void cclear(color_t color);
21
22 // Fill character cell with blue to overwrite char
23void cclearchar(uint32_t row, uint32_t col, color_t color);
24
25 // Move cursor by row and col.
26void cmovecursor(int32_t row, int32_t col);
27
28 // Set cursor position to row and col
29void csetcursor(uint32_t row, uint32_t col);
30
31 // Reset console cursor to row 0 and col 0
32void crcursor(void);
33
34 // Set cursor row
35void csetrow(int32_t r);
36
37 // Set cursor col
38void csetcol(int32_t c);
39
40// Get cursor col
41uint32_t cgetcol(void);
42
43// Get cursor row
44uint32_t cgetrow(void);
45
46// Clear the current character
47void cclearcurchar(color_t color);
48
49#endif