summaryrefslogtreecommitdiffstats
path: root/osdep/terminal-dummy.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-27 13:47:46 +0200
committerwm4 <wm4@nowhere>2017-06-29 10:30:16 +0200
commit7eca787571aab982acaadee79abb0f40f9f14b6a (patch)
tree250369f402ba9b45b32e0d4e78afda3043af5172 /osdep/terminal-dummy.c
parent70a70b9da347d7ef25a9862af83731b9b0a0d3f1 (diff)
downloadmpv-7eca787571aab982acaadee79abb0f40f9f14b6a.tar.bz2
mpv-7eca787571aab982acaadee79abb0f40f9f14b6a.tar.xz
build: change how some OS specific source files are selected
In a bunch of cases, we emulate highly platform specific APIs on a higher level across all OSes, such as IPC, terminal, subprocess handling, and more. We have source files for each OS, and they implement all the same mpv internal API. Selecting which source file to use on an OS can be tricky, because there is partially overlapping and emulated APIs (consider Cygwin on Windows). Add a pick_first_matching_dep() function to make this slightly easier and more structured. Also add dummy backends in some cases, to deal with APIs not being available. Clarify the Windows dependency identifiers, as these are the most confusing.
Diffstat (limited to 'osdep/terminal-dummy.c')
-rw-r--r--osdep/terminal-dummy.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/osdep/terminal-dummy.c b/osdep/terminal-dummy.c
new file mode 100644
index 0000000000..4a3787e0fa
--- /dev/null
+++ b/osdep/terminal-dummy.c
@@ -0,0 +1,31 @@
+#include "terminal.h"
+
+void terminal_init(void)
+{
+}
+
+void terminal_setup_getch(struct input_ctx *ictx)
+{
+}
+
+void terminal_uninit(void)
+{
+}
+
+bool terminal_in_background(void)
+{
+ return false;
+}
+
+void terminal_get_size(int *w, int *h)
+{
+}
+
+void mp_write_console_ansi(void *wstream, char *buf)
+{
+}
+
+bool terminal_try_attach(void)
+{
+ return false;
+}