summaryrefslogtreecommitdiffstats
path: root/osdep/terminal.h
diff options
context:
space:
mode:
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);