Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7203 in orxonox.OLD for branches/std/src/lib/event/key_names.h


Ignore:
Timestamp:
Mar 9, 2006, 5:28:10 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: compiles again, BUT well…. i do not expect it to run anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/event/key_names.h

    r5474 r7203  
    11/*!
    22 * @file keynames.h
    3   *  Key/button naming functions
    4 
    5                Converts strings to SDLK/SDL_BUTTON values and vice versa
    6 */
     3 *  Key/button naming functions
     4 *
     5 * Converts strings to SDLK/SDL_BUTTON values and vice versa
     6 */
    77#ifndef _KEY_NAMES_H
    88#define _KEY_NAMES_H
    99
    10 /**
    11       *  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
    14 */
    15 int buttonnameToSDLB(const char* name);
     10#include <string>
    1611
    1712/**
    18       *  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
    21 */
     13 *  converts a button name string to a integer representing the corresponding SDL mouse button identifier
     14 * @param name: the name of the mouse button
     15 * @return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
     16 */
     17int buttonnameToSDLB(const std::string& name);
     18
     19/**
     20 *  converst a SDL mouse button identifier to a name string
     21 * @param button: an SDL mouse button identifier
     22 * @return a pointer to a string containing the name of the mouse button
     23 */
    2224const char* SDLBToButtonname( int button);
    2325
    2426/**
    25       *  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 */
    29 int keynameToSDLK(const char* name);
     27 *  converts a key name string to a integer representing the corresponding SDLK sym
     28 * @param name: the name of the key
     29 * @return the SDLK sym of the named key or -1 if the key name is not valid
     30 */
     31int keynameToSDLK(const std::string& name);
    3032
    3133/**
    32       *  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 */
     34 *  converts an SDLK sym to a name string
     35 * @param key: the SDLK sym
     36 * @return a pointer to a string containig the name of the key
     37 */
    3638const char* SDLKToKeyname( int key);
    3739
Note: See TracChangeset for help on using the changeset viewer.