Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/dave/src/keynames.h @ 3151

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

orxonox/branches/dave: src of trunk copied into branches/dave/src

File size: 1.2 KB
Line 
1/*!
2    \file keynames.h
3    \brief Key/button naming functions
4   
5                Converts strings to SDLK/SDL_BUTTON values and vice versa
6*/
7
8#ifdef __WIN32__
9#include <windows.h>
10#endif
11
12#ifndef __APPLE__
13#include <SDL/SDL.h>
14#else
15#include <SDL.h>
16#endif
17
18/**
19        \brief converts a button name string to a integer representing the corresponding SDL mouse button identifier
20        \param name: the name of the mouse button
21        \return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
22*/
23int buttonname_to_SDLB( char* name);
24
25/**
26        \brief converst a SDL mouse button identifier to a name string
27        \param button: an SDL mouse button identifier
28        \return a pointer to a string containing the name of the mouse button
29*/
30char* SDLB_to_buttonname( int button);
31
32/**
33        \brief converts a key name string to a integer representing the corresponding SDLK sym
34        \param name: the name of the key
35        \return the SDLK sym of the named key or -1 if the key name is not valid
36*/
37int keyname_to_SDLK( char* name);
38
39/**
40        \brief converts an SDLK sym to a name string
41        \param key: the SDLK sym
42        \return a pointer to a string containig the name of the key
43*/
44char* SDLK_to_keyname( int key);
45
Note: See TracBrowser for help on using the repository browser.