Struct sdl2::JoystickSubsystem [−][src]
pub struct JoystickSubsystem { /* fields omitted */ }Methods
impl JoystickSubsystem[src]
impl JoystickSubsystempub fn num_joysticks(&self) -> Result<u32, String>[src]
pub fn num_joysticks(&self) -> Result<u32, String>Retrieve the total number of attached joysticks and controllers identified by SDL.
pub fn open(&self, joystick_index: u32) -> Result<Joystick, IntegerOrSdlError>[src]
pub fn open(&self, joystick_index: u32) -> Result<Joystick, IntegerOrSdlError>Attempt to open the joystick at index joystick_index and return it.
pub fn name_for_index(
&self,
joystick_index: u32
) -> Result<String, IntegerOrSdlError>[src]
pub fn name_for_index(
&self,
joystick_index: u32
) -> Result<String, IntegerOrSdlError>Return the name of the joystick at index joystick_index.
pub fn device_guid(
&self,
joystick_index: u32
) -> Result<Guid, IntegerOrSdlError>[src]
pub fn device_guid(
&self,
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]
pub fn set_event_state(&self, state: bool)If state is true joystick events are processed, otherwise
they're ignored.
pub fn event_state(&self) -> bool[src]
pub fn event_state(&self) -> boolReturn true if joystick events are processed.
pub fn update(&self)[src]
pub fn update(&self)Force joystick update when not using the event loop
impl JoystickSubsystem[src]
impl JoystickSubsystemTrait Implementations
impl Debug for JoystickSubsystem[src]
impl Debug for JoystickSubsystemfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for JoystickSubsystem[src]
impl Clone for JoystickSubsystemfn clone(&self) -> JoystickSubsystem[src]
fn clone(&self) -> JoystickSubsystemReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
Auto Trait Implementations
impl !Send for JoystickSubsystem
impl !Send for JoystickSubsystemimpl !Sync for JoystickSubsystem
impl !Sync for JoystickSubsystem