Last change
on this file since 4336 was
4262,
checked in by bensch, 20 years ago
|
orxonox/trunk: moved around some files, and deleted the obsolete DataTank
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2066] | 1 | /*! |
---|
| 2 | \file keynames.h |
---|
| 3 | \brief Key/button naming functions |
---|
| 4 | |
---|
[2551] | 5 | Converts strings to SDLK/SDL_BUTTON values and vice versa |
---|
[2141] | 6 | */ |
---|
[3224] | 7 | #ifndef _KEYNAMES_H |
---|
| 8 | #define _KEYNAMES_H |
---|
[2551] | 9 | |
---|
[2141] | 10 | /** |
---|
[2551] | 11 | \brief converts a button name string to a integer representing the corresponding SDL mouse button identifier |
---|
| 12 | \param name: the name of the mouse button |
---|
| 13 | \return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid |
---|
[2141] | 14 | */ |
---|
[3230] | 15 | int buttonnameToSDLB( char* name); |
---|
[2551] | 16 | |
---|
[2141] | 17 | /** |
---|
[2551] | 18 | \brief converst a SDL mouse button identifier to a name string |
---|
| 19 | \param button: an SDL mouse button identifier |
---|
| 20 | \return a pointer to a string containing the name of the mouse button |
---|
[2141] | 21 | */ |
---|
[3230] | 22 | char* SDLBToButtonname( int button); |
---|
[2551] | 23 | |
---|
| 24 | /** |
---|
| 25 | \brief converts a key name string to a integer representing the corresponding SDLK sym |
---|
| 26 | \param name: the name of the key |
---|
| 27 | \return the SDLK sym of the named key or -1 if the key name is not valid |
---|
| 28 | */ |
---|
[3230] | 29 | int keynameToSDLK( char* name); |
---|
[2551] | 30 | |
---|
| 31 | /** |
---|
| 32 | \brief converts an SDLK sym to a name string |
---|
| 33 | \param key: the SDLK sym |
---|
| 34 | \return a pointer to a string containig the name of the key |
---|
| 35 | */ |
---|
[3230] | 36 | char* SDLKToKeyname( int key); |
---|
[2551] | 37 | |
---|
[3224] | 38 | |
---|
| 39 | #endif /* _KEYNAMES_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.