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 |
|
|
|
Close this joystick devece. SDL_JoystickClose() wrapper. |
|
|
|
|
|
|
|
Get the current state of an axis. SDL_JoystickGetAxis() wrapper. |
|
Get relative trackball motion. It's buggy... Don't use. SDL_JoystickGetBall() wrapper. |
|
Get relative trackball motion. It's buggy... Don't use. SDL_JoystickGetBall() wrapper. |
|
Get the current state of a given button on this joystick. SDL_JoystickGetButton() wrapper. |
|
Gets joystick event polling mode. SDL_JoystickEventState() wrapper. |
|
Get the current state of an axis. SDL_JoystickGetHat() wrapper.
|
|
Gets joystick index number.
|
|
Gets first joystick.
|
|
Gets joystick at index.
|
|
|
|
Get joystick name. SDL_JoystickName() wrapper. |
|
Get number of axes. SDL_JoystickNumAxes() wrapper. |
|
Get number of joystick balls. SDL_JoystickNumBalls() wrapper. |
|
Get number of joystick buttons. SDL_JoystickNumButtons() wrapper. |
|
Get number of joystick hats. SDL_JoystickNumHats() wrapper. |
|
Gets count available joysticks. SDL_NumJoysticks() wrapper. |
|
Returns
|
|
Open this joystick devece. SDL_JoystickOpen() wrapper. |
|
Sets joystick event polling mode. SDL_JoystickEventState() wrapper. |
|
|
|
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. |
|
|
|
|
|
|