flowtop: Remove unused parameters from draw_help() and draw_footer()
[netsniff-ng.git] / ui.h
blobff55606d50e282413bdbfae839ecfcb624b1eb6e
1 #ifndef UI_H
2 #define UI_H
4 #include <stdbool.h>
5 #include <inttypes.h>
7 #include "list.h"
9 enum ui_align {
10 UI_ALIGN_LEFT,
11 UI_ALIGN_RIGHT,
14 struct ui_col {
15 struct list_head entry;
16 uint32_t id;
17 char *name;
18 uint32_t len;
19 int pos;
20 int color;
21 enum ui_align align;
24 struct ui_table {
25 int y;
26 int x;
27 int rows_y;
28 struct list_head cols;
29 int hdr_color;
30 int col_pad;
31 int width;
32 int height;
35 extern void ui_table_init(struct ui_table *tbl);
36 extern void ui_table_uninit(struct ui_table *tbl);
37 extern void ui_table_clear(struct ui_table *tbl);
38 extern void ui_table_pos_set(struct ui_table *tbl, int y, int x);
39 extern void ui_table_height_set(struct ui_table *tbl, int height);
41 extern void ui_table_col_add(struct ui_table *tbl, uint32_t id, char *name,
42 uint32_t len);
43 extern void ui_table_col_color_set(struct ui_table *tbl, int col_id, int color);
44 extern void ui_table_col_align_set(struct ui_table *tbl, int col_id, enum ui_align align);
46 extern void ui_table_row_add(struct ui_table *tbl);
47 extern void ui_table_row_print(struct ui_table *tbl, uint32_t col_id,
48 const char *str);
50 extern void ui_table_header_color_set(struct ui_table *tbl, int color);
51 extern void ui_table_header_print(struct ui_table *tbl);
53 #endif /* UI_H */