First steps of implementing command-line processing in the ascii driver.

This commit is contained in:
2025-12-18 19:42:05 -05:00
parent 3dd6894305
commit 2646e4d4ac
3 changed files with 71 additions and 34 deletions

View File

@@ -28,15 +28,19 @@ public:
void set_print_callback(print_callback cb);
// change the prompt.
void set_prompt(const std::u32string &prompt);
void set_prompt(std::string_view prompt);
// Use this to print anything on the console.
void print(const std::u32string &cps);
//
// if the string doesn't end in a newline, one will
// be automatically added.
//
void printline(std::string_view cps);
// Whenever the user types a character, call 'putcode'. If the code is
// newline, this returns the line of text that was entered, including the
// newline. Otherwise returns empty string. Backspace is handled here.
std::u32string putcode(char32_t codepoint);
std::string putcode(char32_t codepoint);
};