Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/event/key_names.h @ 7546

Last change on this file since 7546 was 7221, checked in by bensch, 19 years ago

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

File size: 1.2 KB
RevLine 
[4398]1/*!
[5039]2 * @file keynames.h
[7221]3 *  Key/button naming functions
4 *
5 * Converts strings to SDLK/SDL_BUTTON values and vice versa
6 */
[4398]7#ifndef _KEY_NAMES_H
8#define _KEY_NAMES_H
9
[7221]10#include <string>
11
[4398]12/**
[7221]13 *  converts a button name string to a integer representing the corresponding SDL mouse button identifier
14 * @param name: the name of the mouse button
15 * @return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
16 */
17int buttonnameToSDLB(const std::string& name);
[4398]18
19/**
[7221]20 *  converst a SDL mouse button identifier to a name string
21 * @param button: an SDL mouse button identifier
22 * @return a pointer to a string containing the name of the mouse button
23 */
[5474]24const char* SDLBToButtonname( int button);
[4398]25
26/**
[7221]27 *  converts a key name string to a integer representing the corresponding SDLK sym
28 * @param name: the name of the key
29 * @return the SDLK sym of the named key or -1 if the key name is not valid
30 */
31int keynameToSDLK(const std::string& name);
[4398]32
33/**
[7221]34 *  converts an SDLK sym to a name string
35 * @param key: the SDLK sym
36 * @return a pointer to a string containig the name of the key
37 */
[5474]38const char* SDLKToKeyname( int key);
[4398]39
40
41#endif /* _KEY_NAMES_H */
Note: See TracBrowser for help on using the repository browser.