blob: df7088cad0f7c542eedf42f291c5f16084bdbdd6 (
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
43
44
45
46
47
48
49
|
#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(struct input *a);
int
deactivate_input(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
|