Add ANSI escape sequences library to ulib

This commit is contained in:
2025-09-06 14:55:09 +02:00
parent 97bfa178d1
commit b04ebd9c71
9 changed files with 842 additions and 3 deletions

15
ulib/ansiq/screen.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef ANSIQ_SCREEN_H
#define ANSIQ_SCREEN_H
#include "common.h"
#define ANSIQ_SCR_CLR2END ANSIQ_ESC "[0J" // Clear to end of screen
#define ANSIQ_SCR_CLR2BEG ANSIQ_ESC "[1J" // Clear to begining of screen
#define ANSIQ_SCR_CLR_ALL ANSIQ_ESC "[2J" // Clear entire screen
#define ANSIQ_SCR_CLR_SAV ANSIQ_ESC "[3J" // Clear saved lines
#define ANSIQ_SCR_CLR2LEND ANSIQ_ESC "[0K" // Clear to end of line
#define ANSIQ_SCR_CLR2LBEG ANSIQ_ESC "[1K" // Clear to begining of line
#define ANSIQ_SCR_CLR_LINE ANSIQ_ESC "[1K" // Clear entire line
#define ANSIQ_SCR_RESTORE ANSIQ_ESC "[?47l"
#define ANSIQ_SCR_SAVE ANSIQ_ESC "[?47h"
#endif /* ANSIQ_SCREEN_H */