Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/nico/src/keynames.h @ 3542

Last change on this file since 3542 was 3238, checked in by bensch, 20 years ago

orxonox/branches: updated branches: buerli, nico, sound. And moved bezierTrack to old.bezierTrack. Conflicts resolved in a usefull order.
Conflics mostly resolved in favor of trunk
merge.

File size: 1.2 KB
RevLine 
[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*/
[3238]7#ifndef _KEYNAMES_H
8#define _KEYNAMES_H
[2551]9
[3238]10
[2551]11#ifdef __WIN32__
12#include <windows.h>
13#endif
14
[2995]15#ifndef __APPLE__
[2551]16#include <SDL/SDL.h>
[2995]17#else
18#include <SDL.h>
19#endif
[2551]20
[2141]21/**
[2551]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
[2141]25*/
[3238]26int buttonnameToSDLB( char* name);
[2551]27
[2141]28/**
[2551]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
[2141]32*/
[3238]33char* SDLBToButtonname( int button);
[2551]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*/
[3238]40int keynameToSDLK( char* name);
[2551]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*/
[3238]47char* SDLKToKeyname( int key);
[2551]48
[3238]49
50#endif /* _KEYNAMES_H */
Note: See TracBrowser for help on using the repository browser.