frontend: line-ed: convert all escape code usage to s_tty calls

This commit is contained in:
2024-11-18 21:13:28 +00:00
parent 5a5b0d01d8
commit c5f60c285e
6 changed files with 106 additions and 18 deletions

View File

@@ -101,6 +101,15 @@ enum s_tty_attrib {
TTY_ATTRIB_ITALIC = 0x04u,
};
enum s_tty_clear_mode {
TTY_CLEAR_LINE = 0x01u,
TTY_CLEAR_SCREEN = 0x02,
TTY_CLEAR_TO_CURSOR = 0x0100u,
TTY_CLEAR_FROM_CURSOR = 0x0200u,
TTY_CLEAR_ALL = 0x0400u,
};
struct s_tty_colour {
enum s_tty_colour_mode c_mode;
@@ -146,5 +155,6 @@ extern void s_tty_move_cursor_x(
struct s_tty *tty, enum s_tty_position_base base, int pos);
extern void s_tty_move_cursor_y(
struct s_tty *tty, enum s_tty_position_base base, int pos);
extern void s_tty_clear(struct s_tty *tty, enum s_tty_clear_mode mode);
#endif