list widget selection
[oftp] / src / tuipriv.h
1 #ifndef TUIPRIV_H_
2 #define TUIPRIV_H_
3
4 #include "tui.h"
5
6 enum {
7         TUI_DRAW = TUI_NUM_CALLBACKS,
8         TUI_FREE
9 };
10
11 #define WCOMMON \
12         int type; \
13         char *title; \
14         int x, y, width, height; \
15         int dirty; \
16         tui_callback cbfunc[TUI_NUM_CALLBACKS]; \
17         void *cbcls[TUI_NUM_CALLBACKS]; \
18         struct tui_widget *par, *child, *next
19
20 struct tui_widget {
21         WCOMMON;
22 };
23
24 struct tui_list_entry {
25         char *text;
26         void *data;
27 };
28
29 struct tui_list {
30         WCOMMON;
31         char **entries; /* darr */
32         int sel;
33         int view_offs;
34 };
35
36
37 #endif  /* TUIPRIV_H_ */