blob: e65d5602a260aef1ec504cc9e3fc9ecd3a12b57f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#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;
};
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
input_cb(WINDOW *win, void *data, bool timed_out);
void
register_input(WINDOW *win, struct input *a);
#endif
|