#include <terminal.h>
|
static bool | init () |
| Initializes the terminal.
|
|
static void | register_signals () |
| Registers signal handlers for the terminal.
|
|
static void | rollback () |
| Rolls back changes made to the terminal.
|
|
static ColorSupport | color_support () |
| Retrieves the level of color support for the terminal.
|
|
static Error | error () |
| Retrieves the current error state of the terminal.
|
|
static bool | has_error () |
| Checks if the terminal has encountered an error.
|
|
static Dimensions | query_dimensions () |
| Queries the dimensions of the terminal window.
|
|
◆ Error
Enumerator |
---|
NONE | No error.
|
DOUBLE_INIT | Double initialization error.
|
CODEPAGE_FAIL | Failure to set code page error.
|
INPUT_HANDLE_ERR | Error with input handle.
|
OUTPUT_HANDLE_ERR | Error with output handle.
|
SETUP | Terminal setup error.
|
◆ ~terminal()
koutil::term::terminal::~terminal |
( |
| ) |
|
|
inline |
◆ terminal()
koutil::term::terminal::terminal |
( |
| ) |
|
|
privatedefault |
◆ color_support()
Retrieves the level of color support for the terminal.
- Returns
- The color support level.
◆ error()
Retrieves the current error state of the terminal.
- Returns
- The current error state.
◆ exit()
void koutil::term::terminal::exit |
( |
| ) |
|
|
inlineprivate |
◆ handle_exit_signal()
static void koutil::term::terminal::handle_exit_signal |
( |
int | | ) |
|
|
inlinestaticprivate |
◆ has_error()
bool koutil::term::terminal::has_error |
( |
| ) |
|
|
static |
Checks if the terminal has encountered an error.
- Returns
- True if there is an error, false otherwise.
◆ init()
bool koutil::term::terminal::init |
( |
| ) |
|
|
static |
Initializes the terminal.
- Returns
- True if initialization succeeds, false otherwise.
◆ query_dimensions()
Dimensions koutil::term::terminal::query_dimensions |
( |
| ) |
|
|
static |
Queries the dimensions of the terminal window.
- Returns
- The dimensions of the terminal window.
◆ register_signals()
void koutil::term::terminal::register_signals |
( |
| ) |
|
|
static |
Registers signal handlers for the terminal.
◆ rollback()
void koutil::term::terminal::rollback |
( |
| ) |
|
|
static |
Rolls back changes made to the terminal.
◆ m_color_support
◆ m_error
Error koutil::term::terminal::m_error |
|
private |
◆ m_has_signals
bool koutil::term::terminal::m_has_signals = false |
|
private |
◆ m_on_exit
std::stack<std::function<void()> > koutil::term::terminal::m_on_exit |
|
private |
◆ s_instance
std::unique_ptr< terminal > koutil::term::terminal::s_instance = nullptr |
|
staticprivate |
The documentation for this class was generated from the following file: