#[repr(C)]pub struct SDL_GamepadBinding {
pub input_type: SDL_GamepadBindingType,
pub input: SDL_GamepadBinding__bindgen_ty_1,
pub output_type: SDL_GamepadBindingType,
pub output: SDL_GamepadBinding__bindgen_ty_2,
}Expand description
A mapping between one joystick input to a gamepad control.
A gamepad has a collection of several bindings, to say, for example, when joystick button number 5 is pressed, that should be treated like the gamepad’s “start” button.
SDL has these bindings built-in for many popular controllers, and can add more with a simple text string. Those strings are parsed into a collection of these structs to make it easier to operate on the data.
Available Since: This struct is available since SDL 3.2.0.
See Also: SDL_GetGamepadBindings
Fields§
§input_type: SDL_GamepadBindingType§input: SDL_GamepadBinding__bindgen_ty_1§output_type: SDL_GamepadBindingType§output: SDL_GamepadBinding__bindgen_ty_2Trait Implementations§
Source§impl Clone for SDL_GamepadBinding
impl Clone for SDL_GamepadBinding
Source§fn clone(&self) -> SDL_GamepadBinding
fn clone(&self) -> SDL_GamepadBinding
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for SDL_GamepadBinding
impl Default for SDL_GamepadBinding
impl Copy for SDL_GamepadBinding
Auto Trait Implementations§
impl Freeze for SDL_GamepadBinding
impl RefUnwindSafe for SDL_GamepadBinding
impl Send for SDL_GamepadBinding
impl Sync for SDL_GamepadBinding
impl Unpin for SDL_GamepadBinding
impl UnsafeUnpin for SDL_GamepadBinding
impl UnwindSafe for SDL_GamepadBinding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more