moved term.h to tlibc
This commit is contained in:
47
include/tlibc/term.h
Normal file
47
include/tlibc/term.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
#include "tlibc/errors.h"
|
||||
|
||||
typedef struct TerminalSize {
|
||||
i16 cols;
|
||||
i16 rows;
|
||||
} TerminalSize;
|
||||
|
||||
typedef enum Color16 {
|
||||
Color16_Black = 30,
|
||||
Color16_DarkRed = 31,
|
||||
Color16_DarkGreen = 32,
|
||||
Color16_DarkYellow = 33,
|
||||
Color16_DarkBlue = 34,
|
||||
Color16_DarkMagenta = 35,
|
||||
Color16_DarkCyan = 36,
|
||||
Color16_Gray = 37,
|
||||
Color16_DarkGray = 90,
|
||||
Color16_Red = 91,
|
||||
Color16_Green = 92,
|
||||
Color16_Yellow = 93,
|
||||
Color16_Blue = 94,
|
||||
Color16_Magenta = 95,
|
||||
Color16_Cyan = 96,
|
||||
Color16_White = 97
|
||||
} Color16;
|
||||
|
||||
Result(void) term_init();
|
||||
Result(void) term_getSize(TerminalSize* out);
|
||||
|
||||
Result(void) term_readLine(char* buf, u32 bufsize);
|
||||
Result(void) term_readLineHidden(char *buf, u32 bufsize);
|
||||
|
||||
void term_setFgColor16(Color16 c);
|
||||
void term_setBgColor16(Color16 c);
|
||||
void term_bold();
|
||||
void term_italic();
|
||||
void term_underline();
|
||||
void term_strikethrough();
|
||||
void term_resetColors();
|
||||
|
||||
void term_clear();
|
||||
void term_eraseRow();
|
||||
void term_resetCursor();
|
||||
void term_cursorMove(u16 row, u16 column);
|
||||
void term_cursorHide();
|
||||
void term_cursorShow();
|
||||
Reference in New Issue
Block a user