aboutsummaryrefslogtreecommitdiff
path: root/lib/ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ui.h')
-rw-r--r--lib/ui.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/ui.h b/lib/ui.h
new file mode 100644
index 0000000..90b352f
--- /dev/null
+++ b/lib/ui.h
@@ -0,0 +1,23 @@
+#pragma once
+#include <ncurses.h>
+
+typedef struct progress_bar {
+ float total;
+ float current;
+ WINDOW *scr;
+} PROGRESS_BAR;
+
+PROGRESS_BAR* new_progress_bar(WINDOW*, float);
+void bar_step(PROGRESS_BAR*, float);
+
+
+typedef struct text_box {
+ wchar_t *text;
+ int length;
+ int current;
+ WINDOW *scr;
+} TEXT_BOX;
+
+TEXT_BOX* new_text_box(WINDOW*, int);
+void get_char(TEXT_BOX* text, void (*sch)(char*, int));
+