Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/osX/src/keynames.h @ 2977

Last change on this file since 2977 was 2551, checked in by patrick, 20 years ago

orxonox/trunk: minor changes - enhanced sc controll, fixed uncontrolled rotation effect, added some debug outputs for testing purposes, reformatted some src files from win style but not all

File size: 1.1 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#include <SDL/SDL.h>
13
14/**
15        \brief converts a button name string to a integer representing the corresponding SDL mouse button identifier
16        \param name: the name of the mouse button
17        \return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
18*/
19int buttonname_to_SDLB( char* name);
20
21/**
22        \brief converst a SDL mouse button identifier to a name string
23        \param button: an SDL mouse button identifier
24        \return a pointer to a string containing the name of the mouse button
25*/
26char* SDLB_to_buttonname( int button);
27
28/**
29        \brief converts a key name string to a integer representing the corresponding SDLK sym
30        \param name: the name of the key
31        \return the SDLK sym of the named key or -1 if the key name is not valid
32*/
33int keyname_to_SDLK( char* name);
34
35/**
36        \brief converts an SDLK sym to a name string
37        \param key: the SDLK sym
38        \return a pointer to a string containig the name of the key
39*/
40char* SDLK_to_keyname( int key);
41
Note: See TracBrowser for help on using the repository browser.