From f2f6ea5029c6c43dc43d714978daca38c03a8a83 Mon Sep 17 00:00:00 2001 From: toni <matzeton@googlemail.com> Date: Sun, 8 Nov 2015 20:28:30 +0100 Subject: - changed dir structure - fixed ipc semaphore/mq stuff --- src/ui_input.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/ui_input.h (limited to 'src/ui_input.h') diff --git a/src/ui_input.h b/src/ui_input.h new file mode 100644 index 0000000..657c926 --- /dev/null +++ b/src/ui_input.h @@ -0,0 +1,46 @@ +#ifndef UI_INPUT_H +#define UI_INPUT_H 1 + +#include <ncurses.h> + + +struct input { + unsigned int x; + unsigned int y; + unsigned int width; + unsigned int cur_pos; + char *input; + size_t input_max; + size_t input_len; + size_t input_pos; + char *prompt; + chtype attrs; + chtype shadow; + uicb_input cb_input; +}; + +struct input * +init_input(unsigned int x, unsigned int y, unsigned int width, char *prompt, size_t input_len, chtype attrs, chtype shadow); + +void +free_input(struct input *a); + +int +activate_input(WINDOW *win, struct input *a); + +int +add_input(WINDOW *win, struct input *a, int key); + +int +del_input(WINDOW *win, struct input *a); + +int +clear_input(WINDOW *win, struct input *a); + +void +register_input(WINDOW *win, struct input *a, uicb_input ipcb); + +void +unregister_input(struct input *a); + +#endif -- cgit v1.2.3