]> hackdaworld.org Git - my-code/ivac.git/blobdiff - src/input.h
fixed input system (callback added), more ivac tests
[my-code/ivac.git] / src / input.h
index 7f5796be534550825e26bb8415873207c5bf0e05..e31ebe2475f96b584fc91d507eb5c51ff6874290 100644 (file)
@@ -8,10 +8,11 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
+#include <termios.h>
 
 /* 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)
 /* input specific variables */
 typedef struct s_input {
   char *content;
+  int c_count;
   unsigned char mode;
 } 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),
+                   void *ptr);
+
 #endif