summaryrefslogtreecommitdiffstats
path: root/osdep/terminal.h
diff options
context:
space:
mode:
authorMia Herkt <mia@0x0.st>2022-12-17 05:42:58 +0100
committermia <652892+mia-0@users.noreply.github.com>2022-12-19 13:48:49 +0100
commitf1957ce9114b942418bdf34419e400b44442402e (patch)
tree84cf5e7fc9f2fc55ebcd1be5bd9030375e585ef4 /osdep/terminal.h
parent4e1626a21c6a2efbcd333adeacfcea42ebd7f43d (diff)
downloadmpv-f1957ce9114b942418bdf34419e400b44442402e.tar.bz2
mpv-f1957ce9114b942418bdf34419e400b44442402e.tar.xz
osdep/terminal: Move common esc codes to terminal.h
Diffstat (limited to 'osdep/terminal.h')
-rw-r--r--osdep/terminal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/osdep/terminal.h b/osdep/terminal.h
index db1e2a4dd2..80a0055499 100644
--- a/osdep/terminal.h
+++ b/osdep/terminal.h
@@ -23,6 +23,14 @@
#include <stdbool.h>
#include <stdio.h>
+#define TERM_ESC_GOTO_YX "\033[%d;%df"
+#define TERM_ESC_HIDE_CURSOR "\033[?25l"
+#define TERM_ESC_RESTORE_CURSOR "\033[?25h"
+
+#define TERM_ESC_CLEAR_SCREEN "\033[2J"
+#define TERM_ESC_SAVE_SCREEN "\033[?1049h"
+#define TERM_ESC_RESTORE_SCREEN "\033[?1049l"
+
struct input_ctx;
/* Global initialization for terminal output. */