summaryrefslogtreecommitdiffstats
path: root/osdep/terminal.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
commit60e8a3d404f0640fa5a3f834eae54b4f1fb9127d (patch)
tree1da89a218d0ecf010c67a87cb2f625c4cb18e7d7 /osdep/terminal.h
parentAdding upstream version 0.37.0. (diff)
downloadmpv-60e8a3d404f0640fa5a3f834eae54b4f1fb9127d.tar.xz
mpv-60e8a3d404f0640fa5a3f834eae54b4f1fb9127d.zip
Adding upstream version 0.38.0.upstream/0.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'osdep/terminal.h')
-rw-r--r--osdep/terminal.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/osdep/terminal.h b/osdep/terminal.h
index 5383a17..c83b0a2 100644
--- a/osdep/terminal.h
+++ b/osdep/terminal.h
@@ -20,12 +20,16 @@
#ifndef MPLAYER_GETCH2_H
#define MPLAYER_GETCH2_H
+#include <stdarg.h>
#include <stdbool.h>
-#include <stdio.h>
+
+#include "misc/bstr.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_SYNC_UPDATE_BEGIN "\033[?2026h"
+#define TERM_ESC_SYNC_UPDATE_END "\033[?2026l"
#define TERM_ESC_CLEAR_SCREEN "\033[2J"
#define TERM_ESC_ALT_SCREEN "\033[?1049h"
@@ -52,7 +56,9 @@ void terminal_get_size(int *w, int *h);
void terminal_get_size2(int *rows, int *cols, int *px_width, int *px_height);
// Windows only.
-void mp_write_console_ansi(void *wstream, char *buf);
+int mp_console_vfprintf(void *wstream, const char *format, va_list args);
+int mp_console_write(void *wstream, bstr str);
+bool mp_check_console(void *handle);
/* Windows-only function to attach to the parent process's console */
bool terminal_try_attach(void);