diff options
author | toni <matzeton@googlemail.com> | 2016-07-04 15:36:07 +0200 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2016-07-04 15:36:07 +0200 |
commit | cb6047b694a86f78723a613819677227f14e30c3 (patch) | |
tree | 4eb9c2f2339c5185fec81447bd832d4d4f0bd3d0 /src/ui_statusbar.h | |
parent | 7248ec097b19828e047e83df89aa7bac4150c2cd (diff) | |
parent | bc30ed7f5624f7d5ccc1e9937ed7bcb7faae9892 (diff) |
Merge branch 'master' into jessie
Conflicts:
main.c
Diffstat (limited to 'src/ui_statusbar.h')
-rw-r--r-- | src/ui_statusbar.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ui_statusbar.h b/src/ui_statusbar.h new file mode 100644 index 0000000..65e9e12 --- /dev/null +++ b/src/ui_statusbar.h @@ -0,0 +1,32 @@ +#ifndef UI_STATUSBAR_H +#define UI_STATUSBAR_H 1 + +#include <ncurses.h> + + +struct statusbar { + unsigned int y; + unsigned int width; + char *text; + int (*status_func)(WINDOW *, struct statusbar *, bool); + chtype attrs; +}; + +typedef int (*status_func)(WINDOW *, struct statusbar *, bool); + +struct statusbar * +init_statusbar(unsigned int y, unsigned int width, chtype attrs, status_func cb_update); + +void +free_statusbar(struct statusbar *a); + +int +statusbar_cb(WINDOW *win, void *data, bool timed_out); + +void +register_statusbar(struct statusbar *a); + +void +set_statusbar_text(struct statusbar *a, const char *text); + +#endif |