capt_get_packet(): check for key press only every 20ms
[iptraf-ng.git] / src / tui / input.h
blobf8a78b572f276a0a5019d891a6ca807f4a1fd22d
1 #ifndef IPTRAF_NG_TUI_INPUT_H
2 #define IPTRAF_NG_TUI_INPUT_H
4 /***
6 input.h - structure declarations and function prototypes for input.c
8 ***/
10 #include "winops.h"
12 #define CTRL_X 24
14 struct FIELD {
15 char *buf;
16 unsigned int len;
17 unsigned int tlen;
18 unsigned int xpos;
19 unsigned int ypos;
20 struct FIELD *prevfield;
21 struct FIELD *nextfield;
24 struct FIELDLIST {
25 struct FIELD *list;
26 WINDOW *fieldwin;
27 PANEL *fieldpanel;
28 int dlgtextattr;
29 int fieldattr;
32 void tx_initfields(struct FIELDLIST *list, int leny, int lenx, int begy,
33 int begx, int dlgtextattr, int dlgfieldattr);
34 void tx_addfield(struct FIELDLIST *list, unsigned int len, unsigned int y,
35 unsigned int x, const char *initstr);
36 void tx_getinput(struct FIELDLIST *list, struct FIELD *field, int *exitkey);
37 void tx_fillfields(struct FIELDLIST *list, int *aborted);
38 void tx_destroyfields(struct FIELDLIST *list);
40 #endif /* IPTRAF_NG_TUI_INPUT_H */