File: input.h

package info (click to toggle)
iptraf 3.0.0-8.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 2,928 kB
  • ctags: 1,229
  • sloc: ansic: 12,563; sh: 151; makefile: 137; awk: 1
file content (41 lines) | stat: -rw-r--r-- 997 bytes parent folder | download | duplicates (4)
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

/***

input.h - structure declarations and function prototypes for input.c
Written by Gerard Paul Java
Copyright (c) Gerard Paul Java 1997

***/

#include <string.h>
#include <stdlib.h>
#include <malloc.h>
#include "winops.h"

#define CTRL_X 24

struct FIELD {
    char *buf;
    unsigned int len;
    unsigned int tlen;
    unsigned int xpos;
    unsigned int ypos;
    struct FIELD *prevfield;
    struct FIELD *nextfield;
};

struct FIELDLIST {
    struct FIELD *list;
    WINDOW *fieldwin;
    PANEL *fieldpanel;
    int dlgtextattr;
    int fieldattr;
};

void tx_initfields(struct FIELDLIST *list, int leny, int lenx, int begy, int begx,
              int dlgtextattr, int dlgfieldattr);
void tx_addfield(struct FIELDLIST *list, unsigned int len, unsigned int y,
	      unsigned int x, const char *initstr);
void tx_getinput(struct FIELDLIST *list, struct FIELD *field, int *exitkey);
void tx_fillfields(struct FIELDLIST *list, int *aborted);
void tx_destroyfields(struct FIELDLIST *list);