Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/levelloader/src/keynames.h @ 3463

Last change on this file since 3463 was 3230, checked in by patrick, 20 years ago

orxonox/trunk: unstable - list_template, keyname

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#ifndef _KEYNAMES_H
8#define _KEYNAMES_H
9
10
11#ifdef __WIN32__
12#include <windows.h>
13#endif
14
15#ifndef __APPLE__
16#include <SDL/SDL.h>
17#else
18#include <SDL.h>
19#endif
20
21/**
22        \brief converts a button name string to a integer representing the corresponding SDL mouse button identifier
23        \param name: the name of the mouse button
24        \return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
25*/
26int buttonnameToSDLB( char* name);
27
28/**
29        \brief converst a SDL mouse button identifier to a name string
30        \param button: an SDL mouse button identifier
31        \return a pointer to a string containing the name of the mouse button
32*/
33char* SDLBToButtonname( int button);
34
35/**
36        \brief converts a key name string to a integer representing the corresponding SDLK sym
37        \param name: the name of the key
38        \return the SDLK sym of the named key or -1 if the key name is not valid
39*/
40int keynameToSDLK( char* name);
41
42/**
43        \brief converts an SDLK sym to a name string
44        \param key: the SDLK sym
45        \return a pointer to a string containig the name of the key
46*/
47char* SDLKToKeyname( int key);
48
49
50#endif /* _KEYNAMES_H */
Note: See TracBrowser for help on using the repository browser.