Struct sdl2::JoystickSubsystem [] [src]

pub struct JoystickSubsystem {
    // some fields omitted
}

Methods

impl JoystickSubsystem
[src]

fn num_joysticks(&self) -> Result<u32String>

Retreive the total number of attached joysticks and controllers identified by SDL.

fn open(&self, joystick_index: u32) -> Result<JoystickIntegerOrSdlError>

Attempt to open the joystick at number id and return it.

fn name_for_index(&self, joystick_index: u32) -> Result<StringIntegerOrSdlError>

Return the name of the joystick at index id

fn device_guid(&self, joystick_index: u32) -> Result<GuidIntegerOrSdlError>

Get the GUID for the joystick number id

fn set_event_state(&self, state: bool)

If state is true joystick events are processed, otherwise they're ignored.

fn event_state(&self) -> bool

Return true if joystick events are processed.

fn update(&self)

Force joystick update when not using the event loop

impl JoystickSubsystem
[src]

fn sdl(&self) -> Sdl

Obtain an SDL context.

Trait Implementations

impl Clone for JoystickSubsystem
[src]

fn clone(&self) -> JoystickSubsystem

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for JoystickSubsystem
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.