X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fivac.git;a=blobdiff_plain;f=src%2Finput.h;h=6efcf6ef19e4b43613063567fa6171cca94b2167;hp=e31ebe2475f96b584fc91d507eb5c51ff6874290;hb=40031b2d692a7b83e437535045ece6c58f8bf31e;hpb=f7d9ad56ad9c10284c067cb2db36a7c72b33c5b3 diff --git a/src/input.h b/src/input.h index e31ebe2..6efcf6e 100644 --- a/src/input.h +++ b/src/input.h @@ -6,6 +6,7 @@ /* includes */ #include #include +#include #include #include #include @@ -19,17 +20,22 @@ #define MAX_CONTENT 128 +#define LINE_BUFFERED (1<<0) +#define CONTENT_BUFFER (1<<1) +#define INPUT_ECHO (1<<2) + /* 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_char(t_input *input,int (*callback)(t_input *input,void *ptr), +int input_get_event(t_input *input,int (*callback)(t_input *input,void *ptr), void *ptr); #endif