#[repr(C)]pub struct SDL_GamepadSensorEvent {
pub type_: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub which: SDL_JoystickID,
pub sensor: Sint32,
pub data: [f32; 3],
pub sensor_timestamp: Uint64,
}Expand description
Gamepad sensor event structure (event.gsensor.*)
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_GAMEPAD_SENSOR_UPDATE
reserved: Uint32§timestamp: Uint64< In nanoseconds, populated using SDL_GetTicksNS()
which: SDL_JoystickID< The joystick instance id
sensor: Sint32< The type of the sensor, one of the values of SDL_SensorType
data: [f32; 3]< Up to 3 values from the sensor, as defined in SDL_sensor.h
sensor_timestamp: Uint64< The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock
Trait Implementations§
Source§impl Clone for SDL_GamepadSensorEvent
impl Clone for SDL_GamepadSensorEvent
Source§fn clone(&self) -> SDL_GamepadSensorEvent
fn clone(&self) -> SDL_GamepadSensorEvent
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_GamepadSensorEvent
impl Debug for SDL_GamepadSensorEvent
Source§impl Default for SDL_GamepadSensorEvent
impl Default for SDL_GamepadSensorEvent
impl Copy for SDL_GamepadSensorEvent
Auto Trait Implementations§
impl Freeze for SDL_GamepadSensorEvent
impl RefUnwindSafe for SDL_GamepadSensorEvent
impl Send for SDL_GamepadSensorEvent
impl Sync for SDL_GamepadSensorEvent
impl Unpin for SDL_GamepadSensorEvent
impl UnsafeUnpin for SDL_GamepadSensorEvent
impl UnwindSafe for SDL_GamepadSensorEvent
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