diff options
author | toni <matzeton@googlemail.com> | 2015-11-08 20:28:30 +0100 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2015-11-11 22:53:07 +0100 |
commit | f2f6ea5029c6c43dc43d714978daca38c03a8a83 (patch) | |
tree | 745932f072a5c0246a3a3fb19ad341dcba401eed /src/ui_input.h | |
parent | 5b73c45d46f33610fa1d99c6467e24fa7861075d (diff) |
- changed dir structure
- fixed ipc semaphore/mq stuff
Diffstat (limited to 'src/ui_input.h')
-rw-r--r-- | src/ui_input.h | 46 |
1 files changed, 46 insertions, 0 deletions
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 |