1#pragma once
2#include <ncurses.h>
3
4typedef struct progress_bar
5{
6 float total;
7 float current;
8 WINDOW *scr;
9} PROGRESS_BAR;
10
11PROGRESS_BAR* new_progress_bar(WINDOW*, float);
12void bar_step(PROGRESS_BAR*, float);
13
14typedef struct text_box
15{
16 wchar_t *text;
17 int length;
18 int current;
19 WINDOW *scr;
20} TEXT_BOX;
21
22TEXT_BOX* new_text_box(WINDOW*, int);
23void get_char(TEXT_BOX* text, void (*sch)(char*, int));
24
25typedef struct panel
26{
27 WINDOW *scr;
28} PANEL;
29
30
31PANEL* new_panel(WINDOW*);
32void write_char(PANEL*, int, char*);