void tsm_screen_erase_screen(struct tsm_screen *con, bool protect) { if (!con) return; screen_erase_region(con, 0, 0, con->size_x - 1, con->size_y - 1, protect); }
void tsm_screen_erase_screen_to_cursor(struct tsm_screen *con, bool protect) { if (!con) return; screen_erase_region(con, 0, 0, con->cursor_x, con->cursor_y, protect); }
void tsm_screen_erase_current_line(struct tsm_screen *con, bool protect) { if (!con) return; screen_erase_region(con, 0, con->cursor_y, con->size_x - 1, con->cursor_y, protect); }
SHL_EXPORT void tsm_screen_erase_home_to_cursor(struct tsm_screen *con, bool protect) { if (!con) return; screen_inc_age(con); screen_erase_region(con, 0, con->cursor_y, con->cursor_x, con->cursor_y, protect); }
void tsm_screen_erase_cursor(struct tsm_screen *con) { unsigned int x; if (!con) return; if (con->cursor_x >= con->size_x) x = con->size_x - 1; else x = con->cursor_x; screen_erase_region(con, x, con->cursor_y, x, con->cursor_y, false); }
void tsm_screen_erase_chars(struct tsm_screen *con, unsigned int num) { unsigned int x; if (!con || !num) return; if (con->cursor_x >= con->size_x) x = con->size_x - 1; else x = con->cursor_x; screen_erase_region(con, x, con->cursor_y, x + num - 1, con->cursor_y, false); }
void tsm_screen_erase_cursor_to_screen(struct tsm_screen *con, bool protect) { unsigned int x; if (!con) return; if (con->cursor_x >= con->size_x) x = con->size_x - 1; else x = con->cursor_x; screen_erase_region(con, x, con->cursor_y, con->size_x - 1, con->size_y - 1, protect); }
SHL_EXPORT void tsm_screen_erase_cursor_to_end(struct tsm_screen *con, bool protect) { unsigned int x; if (!con) return; screen_inc_age(con); if (con->cursor_x >= con->size_x) x = con->size_x - 1; else x = con->cursor_x; screen_erase_region(con, x, con->cursor_y, con->size_x - 1, con->cursor_y, protect); }