#[repr(C)]pub struct SDL_GamepadDeviceEvent {
pub type: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub which: SDL_JoystickID,
}Expand description
Gamepad device event structure (event.gdevice.*)
Joysticks that are supported gamepads receive both an SDL_JoyDeviceEvent
and an SDL_GamepadDeviceEvent.
SDL will send GAMEPAD_ADDED events for joysticks that are already plugged
in during SDL_Init() and are recognized as gamepads. It will also send
events for joysticks that get gamepad mappings at runtime.
§Availability
This struct is available since SDL 3.2.0.
§See also
Fields§
§type: SDL_EventTypeSDL_EVENT_GAMEPAD_ADDED, SDL_EVENT_GAMEPAD_REMOVED, or SDL_EVENT_GAMEPAD_REMAPPED, SDL_EVENT_GAMEPAD_UPDATE_COMPLETE or SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED
reserved: Uint32§timestamp: Uint64In nanoseconds, populated using SDL_GetTicksNS()
which: SDL_JoystickIDThe joystick instance id
Trait Implementations§
Source§impl Clone for SDL_GamepadDeviceEvent
impl Clone for SDL_GamepadDeviceEvent
Source§fn clone(&self) -> SDL_GamepadDeviceEvent
fn clone(&self) -> SDL_GamepadDeviceEvent
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 Debug for SDL_GamepadDeviceEvent
impl Debug for SDL_GamepadDeviceEvent
Source§impl Default for SDL_GamepadDeviceEvent
impl Default for SDL_GamepadDeviceEvent
Source§fn default() -> SDL_GamepadDeviceEvent
fn default() -> SDL_GamepadDeviceEvent
Returns the “default value” for a type. Read more
Source§impl Hash for SDL_GamepadDeviceEvent
impl Hash for SDL_GamepadDeviceEvent
Source§impl PartialEq for SDL_GamepadDeviceEvent
impl PartialEq for SDL_GamepadDeviceEvent
impl Copy for SDL_GamepadDeviceEvent
impl Eq for SDL_GamepadDeviceEvent
impl StructuralPartialEq for SDL_GamepadDeviceEvent
Auto Trait Implementations§
impl Freeze for SDL_GamepadDeviceEvent
impl RefUnwindSafe for SDL_GamepadDeviceEvent
impl Send for SDL_GamepadDeviceEvent
impl Sync for SDL_GamepadDeviceEvent
impl Unpin for SDL_GamepadDeviceEvent
impl UnwindSafe for SDL_GamepadDeviceEvent
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