00001 00007 // /** 00008 // *@defgroup keyboardh keyboard.h 00009 // *Handles keyboard input 00010 // *@note Does not trigger keyboard events; events are handled by the keyhandler function in the handler.c 00011 // *routines. The keyhandler function is called by this modules keycheck function via a function pointer. 00012 // *@{ 00013 // */ 00014 00015 /*----------------------------------------------------------------------------------------------------------*/ 00016 00017 #define KEYPRESSED 0x1 00018 #define KEYNEW 0x2 00019 #define KEYREPEAT 0x4 00020 00021 /*----------------------------------------------------------------------------------------------------------*/ 00022 00023 typedef void* (*KEY_CALLBACK)(char*, void*); 00024 00025 /*----------------------------------------------------------------------------------------------------------*/ 00026 00027 void keydown(ALLEGRO_KEYBOARD_EVENT *kb); 00028 00029 /*----------------------------------------------------------------------------------------------------------*/ 00030 00031 void keyup(ALLEGRO_KEYBOARD_EVENT *kb); 00032 00033 /*----------------------------------------------------------------------------------------------------------*/ 00034 00035 void keyrepeat(ALLEGRO_KEYBOARD_EVENT *kb); 00036 00037 /*----------------------------------------------------------------------------------------------------------*/ 00038 00039 void keyupdate(void); 00040 00041 /*----------------------------------------------------------------------------------------------------------*/ 00042 00043 void keyclear(void); 00044 00045 /*----------------------------------------------------------------------------------------------------------*/ 00046 00047 void* keycheck(KEY_CALLBACK func, void *data); 00048 00049 /*----------------------------------------------------------------------------------------------------------*/ 00050 00051 // /** 00052 // *@} 00053 // */