2022-11-20 16:55:22 +00:00
|
|
|
#pragma once
|
2022-12-04 11:42:43 +00:00
|
|
|
#include <luna/Attributes.h>
|
|
|
|
#include <luna/Result.h>
|
|
|
|
#include <luna/Types.h>
|
2022-11-20 16:55:22 +00:00
|
|
|
|
|
|
|
namespace TextConsole
|
|
|
|
{
|
|
|
|
void clear();
|
2022-12-21 16:38:19 +00:00
|
|
|
Result<void> putchar(char c);
|
2022-12-18 12:09:37 +00:00
|
|
|
void putwchar(wchar_t c);
|
2022-11-20 16:55:22 +00:00
|
|
|
void set_foreground(u32 color);
|
|
|
|
void set_background(u32 color);
|
2022-11-30 12:29:28 +00:00
|
|
|
u32 foreground();
|
|
|
|
u32 background();
|
2022-11-20 16:55:22 +00:00
|
|
|
void move_to(u32 x, u32 y);
|
2022-12-21 16:38:19 +00:00
|
|
|
Result<void> print(const char* str);
|
2023-03-18 19:09:10 +00:00
|
|
|
Result<void> write(const char* str, usize len);
|
2022-12-21 18:41:13 +00:00
|
|
|
void wprint(const wchar_t* str);
|
2022-12-21 16:38:19 +00:00
|
|
|
Result<void> println(const char* str);
|
2022-12-21 18:41:13 +00:00
|
|
|
void wprintln(const wchar_t* str);
|
2022-12-21 16:38:19 +00:00
|
|
|
Result<usize> printf(const char* format, ...) _format(1, 2);
|
2023-07-12 20:09:28 +00:00
|
|
|
|
|
|
|
u16 rows();
|
|
|
|
u16 cols();
|
2023-01-02 12:07:29 +00:00
|
|
|
}
|