From d102e028aee6571c0fd9dfd4074cfb3c15f4594e Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Sat, 17 Feb 2024 11:41:23 +0100 Subject: ref: Refactor newer folder structure Create a lib dict and importer project. * dict: holds the main application * importer: code to read from source to a common database. * lib: shared code --- lib/ui.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/ui.h (limited to 'lib/ui.h') 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 + +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)); + -- cgit v1.2.3