Struct sdl2::joystick::Joystick [] [src]

pub struct Joystick { /* fields omitted */ }

Wrapper around the SDL_Joystick object

Methods

impl Joystick
[src]

[src]

[src]

Return the name of the joystick or an empty string if no name is found.

[src]

Return true if the joystick has been opened and currently connected.

[src]

[src]

Retreive the joystick's GUID

[src]

Retreive the number of axes for this joystick

[src]

Gets the position of the given axis.

The function will fail if the joystick doesn't have the provided axis.

[src]

Retreive the number of buttons for this joystick

[src]

Return Ok(true) if button is pressed.

The function will fail if the joystick doesn't have the provided button.

[src]

Retreive the number of balls for this joystick

[src]

Return a pair (dx, dy) containing the difference in axis position since the last poll

[src]

Retreive the number of balls for this joystick

[src]

Return the position of hat for this joystick

Trait Implementations

impl Drop for Joystick
[src]

[src]

Executes the destructor for this type. Read more