aboutsummaryrefslogtreecommitdiff
path: root/ui.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-05-10 22:22:52 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-05-10 22:22:52 +0200
commite2e0162b5bfd2a5ef31f1d09fca4da8962d5d098 (patch)
tree984329f1824e81b0eb2a6f162f5c33ec7c8eb69c /ui.h
parent0ac9c6210b3b08b2e8a9e7e4de387abcef9afcff (diff)
downloadvis-e2e0162b5bfd2a5ef31f1d09fca4da8962d5d098.tar.gz
vis-e2e0162b5bfd2a5ef31f1d09fca4da8962d5d098.tar.xz
Revert "vis: clean up interaction between vis and ui"
This caused issues on OpenBSD where it crashed the terminal. Also on Mac OS X suspend via ^Z (Ctrl-Z) was missing a \r i.e. the shell prompt was not properly redrawn. While in principle user interfaces should not have to depend on libtermkey, in practice this won't be an issue unless we are adding a non-terminal based UI (which won't happen anytime soon). This reverts commit 8f92b98848f9366e78c7aa824615bade83971513. Close #311
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui.h b/ui.h
index b08ff16..fa455af 100644
--- a/ui.h
+++ b/ui.h
@@ -3,6 +3,7 @@
#include <stdbool.h>
#include <stdarg.h>
+#include <termkey.h>
/* enable large file optimization for files larger than: */
#define UI_LARGE_FILE_SIZE (1 << 25)
@@ -52,6 +53,7 @@ struct Ui {
bool (*init)(Ui*, Vis*);
bool (*start)(Ui*);
void (*free)(Ui*);
+ void (*resize)(Ui*);
UiWin* (*window_new)(Ui*, View*, File*, enum UiOption);
void (*window_free)(UiWin*);
void (*window_focus)(UiWin*);
@@ -65,9 +67,10 @@ struct Ui {
void (*update)(Ui*);
void (*suspend)(Ui*);
const char* (*getkey)(Ui*);
- void (*needkey)(Ui*);
+ bool (*haskey)(Ui*);
void (*terminal_save)(Ui*);
void (*terminal_restore)(Ui*);
+ TermKey* (*termkey_get)(Ui*);
};
struct UiWin {