diff input/input.h @ 4589:4ce20c55a18a

Added support for key combination and mouse buttons key code
author albeu
date Fri, 08 Feb 2002 18:10:56 +0000
parents 44c23fd75005
children 610a11e4db36
line wrap: on
line diff
--- a/input/input.h	Fri Feb 08 17:38:32 2002 +0000
+++ b/input/input.h	Fri Feb 08 18:10:56 2002 +0000
@@ -32,6 +32,13 @@
 #define MP_INPUT_DEAD -2
 #define MP_INPUT_NOTHING -3
 
+#define MP_KEY_DOWN (1<<30)
+// Key up is the default
+
+#ifndef MP_MAX_KEY_DOWN
+#define MP_MAX_KEY_DOWN 32
+#endif
+
 typedef union mp_cmd_arg_value {
   int i;
   float f;
@@ -52,10 +59,15 @@
 
 
 typedef struct mp_cmd_bind {
-  int input;
+  int input[MP_MAX_KEY_DOWN+1];
   char* cmd;
 } mp_cmd_bind_t;
 
+typedef struct mp_key_name {
+  int key;
+  char* name;
+} mp_key_name_t;
+
 typedef int (*mp_key_func_t)(int fd);
 typedef int (*mp_cmd_func_t)(int fd,char* dest,int size);
 typedef void (*mp_close_func_t)(int fd);