more abstraction in network.* and input.*, first display stuff in ivac.*
[my-code/ivac.git] / src / input.h
1 /* input.h -- input headers */
2
3 #ifndef INPUT_H
4 #define INPUT_H
5
6 /* includes */
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <string.h>
10 #include <unistd.h>
11 #include <errno.h>
12 #include <termios.h>
13
14 /* defines */
15 #define I_SUCCESS 1
16 #define I_ERROR -1
17
18 #define MENUE (1<<0)
19 #define CONNECTIONS (1<<1)
20
21 #define MAX_CONTENT 128
22
23 #define LINE_BUFFERED (1<<0)
24 #define CONTENT_BUFFER (1<<1)
25
26 /* input specific variables */
27 typedef struct s_input {
28   char *content;
29   int c_count;
30   unsigned char mode;
31 } t_input;
32
33 /* function prototypes */
34 int input_init(t_input *input);
35 int input_shutdown(t_input *input);
36 int input_get_event(t_input *input,int (*callback)(t_input *input,void *ptr),
37                    void *ptr);
38
39 #endif