X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=src%2Finput.h;h=b4929fb806bddeb7ad8793c9594c4b38173d33c5;hb=0bc14060d26317692d960c39e7e64b74d8963e61;hp=7f5796be534550825e26bb8415873207c5bf0e05;hpb=c8c162c2b1f82f32160bcaa4159ea8735a8582c5;p=my-code%2Fivac.git diff --git a/src/input.h b/src/input.h index 7f5796b..b4929fb 100644 --- a/src/input.h +++ b/src/input.h @@ -6,22 +6,35 @@ /* includes */ #include #include +#include #include #include +#include /* defines */ -#define K_SUCCESS 1 -#define K_ERROR -1 +#define I_SUCCESS 1 +#define I_ERROR -1 #define MENUE (1<<0) #define CONNECTIONS (1<<1) #define MAX_CONTENT 128 +#define LINE_BUFFERED (1<<0) +#define CONTENT_BUFFER (1<<1) + /* input specific variables */ typedef struct s_input { char *content; + int c_count; unsigned char mode; + struct termios tios; } t_input; +/* function prototypes */ +int input_init(t_input *input); +int input_shutdown(t_input *input); +int input_get_event(t_input *input,int (*callback)(t_input *input,void *ptr), + void *ptr); + #endif