Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields

sdl4gcj::input::Joystick Class Reference

Inheritance diagram for sdl4gcj::input::Joystick:

Inheritance graph
[legend]
Collaboration diagram for sdl4gcj::input::Joystick:

Collaboration graph
[legend]

Public Member Functions

int getIndex ()
 Gets joystick index number.
native boolean isOpened ()
 Returns true, if this joystick is opened.
native void open ()
 Open this joystick devece.
native void close ()
 Close this joystick devece.
native String getName ()
 Get joystick name.
native int getNumAxes ()
 Get number of axes.
native int getNumBalls ()
 Get number of joystick balls.
native int getNumHats ()
 Get number of joystick hats.
native int getNumButtons ()
 Get number of joystick buttons.
native int getAxis (int axisIndex)
 Get the current state of an axis.
native int getBallDX (int ballIndex)
 Get relative trackball motion.
native int getBallDY (int ballIndex)
 Get relative trackball motion.
native int getHat (int hatIndex)
 Get the current state of an axis.
native int getButton (int butotnIndex)
 Get the current state of a given button on this joystick.
String toString ()

Static Public Member Functions

static native int getNumJoysticks ()
 Gets count available joysticks.
static Joystick getJoystick (int index)
 Gets joystick at index.
static Joystick getJoystick ()
 Gets first joystick.
static Joystick[] getAllJoysticks ()
static native boolean getEventState ()
 Gets joystick event polling mode.
static native void setEventState (boolean state)
 Sets joystick event polling mode.
static native void update ()
 Updates the state of all joysticks.

Protected Member Functions

void finalize () throws Throwable

Private Member Functions

 Joystick (int joystickIndex)

Static Private Member Functions

static SDLException createNotOpenedException (int index, String name)
static Joystick[] getJoysticks ()

Private Attributes

int index
gnu.gcj.RawData implementation

Static Private Attributes

static Joystick[] joysticks = null

Constructor & Destructor Documentation

sdl4gcj::input::Joystick::Joystick int  joystickIndex  )  [inline, private]
 


Member Function Documentation

native void sdl4gcj::input::Joystick::close  ) 
 

Close this joystick devece.

SDL_JoystickClose() wrapper.

static SDLException sdl4gcj::input::Joystick::createNotOpenedException int  index,
String  name
[inline, static, private]
 

void sdl4gcj::input::Joystick::finalize  )  throws Throwable [inline, protected]
 

static Joystick [] sdl4gcj::input::Joystick::getAllJoysticks  )  [inline, static]
 

native int sdl4gcj::input::Joystick::getAxis int  axisIndex  ) 
 

Get the current state of an axis.

SDL_JoystickGetAxis() wrapper.

native int sdl4gcj::input::Joystick::getBallDX int  ballIndex  ) 
 

Get relative trackball motion.

It's buggy... Don't use. SDL_JoystickGetBall() wrapper.

native int sdl4gcj::input::Joystick::getBallDY int  ballIndex  ) 
 

Get relative trackball motion.

It's buggy... Don't use. SDL_JoystickGetBall() wrapper.

native int sdl4gcj::input::Joystick::getButton int  butotnIndex  ) 
 

Get the current state of a given button on this joystick.

SDL_JoystickGetButton() wrapper.

static native boolean sdl4gcj::input::Joystick::getEventState  )  [static]
 

Gets joystick event polling mode.

SDL_JoystickEventState() wrapper.

native int sdl4gcj::input::Joystick::getHat int  hatIndex  ) 
 

Get the current state of an axis.

SDL_JoystickGetHat() wrapper.

Returns:
The current state is returned as a int which is OR'd combination of one or more of the following

int sdl4gcj::input::Joystick::getIndex  )  [inline]
 

Gets joystick index number.

static Joystick sdl4gcj::input::Joystick::getJoystick  )  [inline, static]
 

Gets first joystick.

static Joystick sdl4gcj::input::Joystick::getJoystick int  index  )  [inline, static]
 

Gets joystick at index.

static Joystick [] sdl4gcj::input::Joystick::getJoysticks  )  [inline, static, private]
 

native String sdl4gcj::input::Joystick::getName  ) 
 

Get joystick name.

SDL_JoystickName() wrapper.

native int sdl4gcj::input::Joystick::getNumAxes  ) 
 

Get number of axes.

SDL_JoystickNumAxes() wrapper.

native int sdl4gcj::input::Joystick::getNumBalls  ) 
 

Get number of joystick balls.

SDL_JoystickNumBalls() wrapper.

native int sdl4gcj::input::Joystick::getNumButtons  ) 
 

Get number of joystick buttons.

SDL_JoystickNumButtons() wrapper.

native int sdl4gcj::input::Joystick::getNumHats  ) 
 

Get number of joystick hats.

SDL_JoystickNumHats() wrapper.

static native int sdl4gcj::input::Joystick::getNumJoysticks  )  [static]
 

Gets count available joysticks.

SDL_NumJoysticks() wrapper.

native boolean sdl4gcj::input::Joystick::isOpened  ) 
 

Returns true, if this joystick is opened.

native void sdl4gcj::input::Joystick::open  ) 
 

Open this joystick devece.

SDL_JoystickOpen() wrapper.

static native void sdl4gcj::input::Joystick::setEventState boolean  state  )  [static]
 

Sets joystick event polling mode.

SDL_JoystickEventState() wrapper.

String sdl4gcj::input::Joystick::toString  )  [inline]
 

static native void sdl4gcj::input::Joystick::update  )  [static]
 

Updates the state of all joysticks.

Updates the state(position, buttons, etc.) of all open joysticks. If joystick events have been enabled with Joystick.setEventState(true) then this is called automatically in the event loop. SDL_JoystickUpdate() wrapper.


Field Documentation

gnu.gcj.RawData sdl4gcj::input::Joystick::implementation [private]
 

int sdl4gcj::input::Joystick::index [private]
 

Joystick [] sdl4gcj::input::Joystick::joysticks = null [static, private]
 


The documentation for this class was generated from the following file:
Generated on Mon Apr 24 14:07:33 2006 for sdl4gcj by  doxygen 1.4.3