fixed rgb values of pixmap struct
[my-code/api.git] / input / input.h
1 /* input.h -- input headers */
2
3 #ifndef INPUT_H
4 #define INPUT_H
5
6 /* includes */
7 #define _GNU_SOURCE
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <string.h>
11 #include <unistd.h>
12 #include <errno.h>
13 #include <termios.h>
14
15 /* defines */
16 #define I_SUCCESS 1
17 #define I_ERROR -1
18
19 #define MENUE (1<<0)
20 #define CONNECTIONS (1<<1)
21
22 #define MAX_CONTENT 128
23
24 #define LINE_BUFFERED (1<<0)
25 #define CONTENT_BUFFER (1<<1)
26 #define INPUT_ECHO (1<<2)
27
28 /* input specific variables */
29 typedef struct s_input {
30   int outfd;
31   char *content;
32   int c_count;
33   unsigned char mode;
34   struct termios tios;
35 } t_input;
36
37 /* function prototypes */
38 int input_init(t_input *input,int outfd);
39 int input_ios_init(t_input *input);
40 int input_shutdown(t_input *input);
41 int input_get_event(t_input *input,int (*callback)(t_input *input,void *ptr),
42                    void *ptr);
43
44 #endif