[][src]Struct sdl2::JoystickSubsystem

pub struct JoystickSubsystem { /* fields omitted */ }


impl JoystickSubsystem[src]

pub fn num_joysticks(&self) -> Result<u32, String>[src]

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

pub fn open(&self, joystick_index: u32) -> Result<Joystick, IntegerOrSdlError>[src]

Attempt to open the joystick at index joystick_index and return it.

pub fn name_for_index(
    joystick_index: u32
) -> Result<String, IntegerOrSdlError>

Return the name of the joystick at index joystick_index.

pub fn device_guid(
    joystick_index: u32
) -> Result<Guid, IntegerOrSdlError>

Get the GUID for the joystick at index joystick_index

pub fn set_event_state(&self, state: bool)[src]

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

pub fn event_state(&self) -> bool[src]

Return true if joystick events are processed.

pub fn update(&self)[src]

Force joystick update when not using the event loop

impl JoystickSubsystem[src]

pub fn sdl(&self) -> Sdl[src]

Obtain an SDL context.

Trait Implementations

impl Clone for JoystickSubsystem[src]

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

Performs copy-assignment from source. Read more

impl Debug for JoystickSubsystem[src]

Auto Trait Implementations

impl !Send for JoystickSubsystem

impl !Sync for JoystickSubsystem

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized

impl<T> BorrowMut for T where
    T: ?Sized

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized