aboutsummaryrefslogtreecommitdiff
path: root/src/ui_statusbar.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui_statusbar.h')
-rw-r--r--src/ui_statusbar.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ui_statusbar.h b/src/ui_statusbar.h
new file mode 100644
index 0000000..5139c14
--- /dev/null
+++ b/src/ui_statusbar.h
@@ -0,0 +1,32 @@
+#ifndef UI_STATUSBAR_H
+#define UI_STATUSBAR_H 1
+
+#include <ncurses.h>
+
+
+struct statusbar {
+ unsigned int y;
+ unsigned int width;
+ char *text;
+ int (*status_func)(WINDOW *, struct statusbar *);
+ chtype attrs;
+};
+
+typedef int (*status_func)(WINDOW *, struct statusbar *);
+
+struct statusbar *
+init_statusbar(unsigned int y, unsigned int width, chtype attrs, status_func cb_update);
+
+void
+free_statusbar(struct statusbar *a);
+
+int
+statusbar_cb(WINDOW *win, void *data, bool timed_out);
+
+void
+register_statusbar(struct statusbar *a);
+
+void
+set_statusbar_text(struct statusbar *a, const char *text);
+
+#endif