Propane::Input Namespace Reference

The namespace that is primarily concerned with obtaining input from external input devices, such as joysticks, brain implants and other fun devices. More...


Classes

class  Joystick
 A class to wrap joysticks, to be created from an SDL joystick ID. More...

Enumerations

enum  X360JoystickDefines

Functions

int getNumberOfJoysticks ()
 Get the number of joysticks detected by the OS.
bool isJoystickOpened (int i)
 Determine if we have reserved a joystick for our exclusive use.
std::string getNameForJoystick (int i)
 Acquire the human readable name for a given joystick.
Propane::Input::Joystick getJoystick (int i)
 Get the Propane::Input::Joystick for a given OS-detected joystick. Asserts if i is too big or small.
void updateJoysticks ()
 Update all joysticks. You don't have to do this if SDL is set to update joysticks in the input event loop.


Detailed Description

The namespace that is primarily concerned with obtaining input from external input devices, such as joysticks, brain implants and other fun devices.

Enumeration Type Documentation

enum Propane::Input::X360JoystickDefines
 

Common values for use with the Xbox360 controller and similar controllers on Mac OS X (on Mac OSX, use this driver: http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver )

These values SHOULD work for the official Windows driver.


Function Documentation

Joystick Propane::Input::getJoystick int  i  ) 
 

Get the Propane::Input::Joystick for a given OS-detected joystick. Asserts if i is too big or small.

Makes an SDL joystick ID into a Propane::Input::Joystick object.

Parameters:
i the SDL joystick ID
Returns:
The resultant Propane::Input::Joystick. Asserts if i is invalid.

std::string Propane::Input::getNameForJoystick int  i  ) 
 

Acquire the human readable name for a given joystick.

Gets the name for a SDL-detected joystick.

Parameters:
i the SDL ID for the joystick
Returns:
The human readable name for the joystick (for example, "Xbox 360 controller")

int Propane::Input::getNumberOfJoysticks  ) 
 

Get the number of joysticks detected by the OS.

Returns the number of joysticks that SDL detected.

Returns:
The count of joysticks connected to the system.

bool Propane::Input::isJoystickOpened int  i  ) 
 

Determine if we have reserved a joystick for our exclusive use.

Checks if a given joystick ID is opened by SDL.

Parameters:
i the SDL ID for the joystick
Returns:
True if the joystick is open, false otherwise.

void Propane::Input::updateJoysticks  ) 
 

Update all joysticks. You don't have to do this if SDL is set to update joysticks in the input event loop.

Update all joysticks at once.

Do not call this if you are using SDL's joystick event handling (disabled by default). In that case you must use the SDL event system instead.


Generated on Sun Jan 14 16:49:12 2007 for Propane Injector by  doxygen 1.4.6