/*! * @file keynames.h * Key/button naming functions Converts strings to SDLK/SDL_BUTTON values and vice versa */ #ifndef _KEY_NAMES_H #define _KEY_NAMES_H /** * converts a button name string to a integer representing the corresponding SDL mouse button identifier * @param name: the name of the mouse button * @return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid */ int buttonnameToSDLB(const char* name); /** * converst a SDL mouse button identifier to a name string * @param button: an SDL mouse button identifier * @return a pointer to a string containing the name of the mouse button */ const char* SDLBToButtonname( int button); /** * converts a key name string to a integer representing the corresponding SDLK sym * @param name: the name of the key * @return the SDLK sym of the named key or -1 if the key name is not valid */ int keynameToSDLK(const char* name); /** * converts an SDLK sym to a name string * @param key: the SDLK sym * @return a pointer to a string containig the name of the key */ const char* SDLKToKeyname( int key); #endif /* _KEY_NAMES_H */