Back to index

libsfml  1.6+dfsg2
Public Member Functions | Private Attributes
sf::priv::Joystick Class Reference

****** implementation of Joystick (unknown implementation kind for now) ///////////////////////////////////////////////////////// More...

#include <Joystick.hpp>

Collaboration diagram for sf::priv::Joystick:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void Initialize (unsigned int Index)
 Initialize the instance and bind it to a physical joystick.
JoystickState UpdateState ()
 Update the current joystick and return its new state.
bool HasAxis (Joy::Axis Axis) const
 Check if the joystick supports the given axis.
unsigned int GetButtonsCount () const
 Get the number of buttons supported by the joystick.
void Initialize (unsigned int Index)
 Initialize the instance and bind it to a physical joystick.
JoystickState UpdateState ()
 Update the current joystick and return its new state.
bool HasAxis (Joy::Axis Axis) const
 Check if the joystick supports the given axis.
unsigned int GetButtonsCount () const
 Get the number of buttons supported by the joystick.
void Initialize (unsigned int Index)
 Initialize the instance and bind it to a physical joystick.
JoystickState UpdateState ()
 Update the current joystick and return its new state.
unsigned int GetAxesCount () const
 Get the number of axes supported by the joystick.
unsigned int GetButtonsCount () const
 Get the number of buttons supported by the joystick.
void Initialize (unsigned int Index)
 Initialize the instance and bind it to a physical joystick.
JoystickState UpdateState ()
 Update the current joystick and return its new state.
bool HasAxis (Joy::Axis Axis) const
 Check if the joystick supports the given axis.
unsigned int GetButtonsCount () const
 Get the number of buttons supported by the joystick.

Private Attributes

int myDescriptor
 Linux descriptor of the joystick.
unsigned int myNbButtons
 Number of buttons supported by the joystick.
bool myAxes [Joy::AxisCount]
 Supported axes.
JoystickState myState
 Current state of the joystick.
int myPovX
 Last X position of the POV.
int myPovY
 Last Y position of the POV.
char myAxesMapping [ABS_MAX+1]
 Axes mapping (index --> axis id)
bool myIsConnected
 Is there a joystick connected?
unsigned int myIndex
 Windows ID of the joystick.
bool myHasContinuousPOV
 True if the driver supports continuous values for the POV.

Detailed Description

****** implementation of Joystick (unknown implementation kind for now) /////////////////////////////////////////////////////////

Win32 implementation of Joystick /////////////////////////////////////////////////////////.

Linux implementation of Joystick /////////////////////////////////////////////////////////.

Definition at line 40 of file Joystick.hpp.


Member Function Documentation

unsigned int sf::priv::Joystick::GetAxesCount ( ) const

Get the number of axes supported by the joystick.

Get the number of axes supported by the joystick /////////////////////////////////////////////////////////.

Returns:
Number of axis

/////////////////////////////////////////////////////////

Definition at line 58 of file Joystick.cpp.

{
    // Return number of supported axes
}
unsigned int sf::priv::Joystick::GetButtonsCount ( ) const

Get the number of buttons supported by the joystick.

Returns:
Number of buttons

/////////////////////////////////////////////////////////

unsigned int sf::priv::Joystick::GetButtonsCount ( ) const

Get the number of buttons supported by the joystick.

Get the number of buttons supported by the joystick /////////////////////////////////////////////////////////.

Returns:
Number of buttons

/////////////////////////////////////////////////////////

Definition at line 69 of file Joystick.cpp.

{
    // Return number of supported buttons
       return 0;
}

Here is the caller graph for this function:

unsigned int sf::priv::Joystick::GetButtonsCount ( ) const

Get the number of buttons supported by the joystick.

Returns:
Number of buttons

/////////////////////////////////////////////////////////

unsigned int sf::priv::Joystick::GetButtonsCount ( ) const

Get the number of buttons supported by the joystick.

Returns:
Number of buttons

/////////////////////////////////////////////////////////

bool sf::priv::Joystick::HasAxis ( Joy::Axis  Axis) const

Check if the joystick supports the given axis.

Check if the joystick supports the given axis /////////////////////////////////////////////////////////.

Parameters:
Axis: Axis to check
Returns:
True of the axis is supported, false otherwise

/////////////////////////////////////////////////////////

Definition at line 60 of file Joystick.cpp.

{
       return false;
}
bool sf::priv::Joystick::HasAxis ( Joy::Axis  Axis) const

Check if the joystick supports the given axis.

Parameters:
Axis: Axis to check
Returns:
True of the axis is supported, false otherwise

/////////////////////////////////////////////////////////

bool sf::priv::Joystick::HasAxis ( Joy::Axis  Axis) const

Check if the joystick supports the given axis.

Parameters:
Axis: Axis to check
Returns:
True of the axis is supported, false otherwise

/////////////////////////////////////////////////////////

void sf::priv::Joystick::Initialize ( unsigned int  Index)

Initialize the instance and bind it to a physical joystick.

Parameters:
Index: Index of the physical joystick to bind to

/////////////////////////////////////////////////////////

void sf::priv::Joystick::Initialize ( unsigned int  Index)

Initialize the instance and bind it to a physical joystick.

Parameters:
Index: Index of the physical joystick to bind to

/////////////////////////////////////////////////////////

void sf::priv::Joystick::Initialize ( unsigned int  Index)

Initialize the instance and bind it to a physical joystick.

Initialize the instance and bind it to a physical joystick /////////////////////////////////////////////////////////.

Parameters:
Index: Index of the physical joystick to bind to

/////////////////////////////////////////////////////////

Definition at line 38 of file Joystick.cpp.

{
    // Reset the joystick state
    
    // Initialize the Index-th available joystick
}

Here is the caller graph for this function:

void sf::priv::Joystick::Initialize ( unsigned int  Index)

Initialize the instance and bind it to a physical joystick.

Parameters:
Index: Index of the physical joystick to bind to

/////////////////////////////////////////////////////////

Update the current joystick and return its new state.

Returns:
Current state of the joystick

/////////////////////////////////////////////////////////

Update the current joystick and return its new state.

Update the current joystick and return its new state /////////////////////////////////////////////////////////.

Returns:
Current state of the joystick

/////////////////////////////////////////////////////////

Definition at line 49 of file Joystick.cpp.

{
    // Fill a JoystickState instance with the current joystick state
       JoystickState s;
       return s;
}

Here is the caller graph for this function:

Update the current joystick and return its new state.

Returns:
Current state of the joystick

/////////////////////////////////////////////////////////

Update the current joystick and return its new state.

Returns:
Current state of the joystick

/////////////////////////////////////////////////////////


Member Data Documentation

Supported axes.

Definition at line 92 of file Joystick.hpp.

char sf::priv::Joystick::myAxesMapping[ABS_MAX+1] [private]

Axes mapping (index --> axis id)

Definition at line 96 of file Joystick.hpp.

Linux descriptor of the joystick.

Definition at line 90 of file Joystick.hpp.

True if the driver supports continuous values for the POV.

Definition at line 87 of file Joystick.hpp.

unsigned int sf::priv::Joystick::myIndex [private]

Windows ID of the joystick.

Definition at line 84 of file Joystick.hpp.

Is there a joystick connected?

Definition at line 83 of file Joystick.hpp.

unsigned int sf::priv::Joystick::myNbButtons [private]

Number of buttons supported by the joystick.

Definition at line 91 of file Joystick.hpp.

Last X position of the POV.

Definition at line 94 of file Joystick.hpp.

Last Y position of the POV.

Definition at line 95 of file Joystick.hpp.

Current state of the joystick.

Definition at line 93 of file Joystick.hpp.


The documentation for this class was generated from the following files: