summaryrefslogtreecommitdiffstats
path: root/src/pane.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pane.h')
-rw-r--r--src/pane.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/pane.h b/src/pane.h
new file mode 100644
index 0000000..e58cfd0
--- /dev/null
+++ b/src/pane.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "ncurses.h"
+
+#include <wchar.h>
+
+struct pane;
+
+typedef int (*pane_handler)(wint_t c);
+typedef void (*pane_updater)(struct pane *pane, int sel);
+
+struct pane {
+ WINDOW *win;
+ int sx, sy, ex, ey;
+ int w, h;
+ int active;
+
+ pane_handler handle;
+ pane_updater update;
+};
+
+void pane_init(struct pane *pane, pane_handler handle, pane_updater update);
+void pane_resize(struct pane *pane, int sx, int sy, int ex, int ey);
+void pane_free(struct pane *p);
+