#[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: [c_float; 3],
pub sensor_timestamp: Uint64,
}Expand description
Gamepad sensor event structure (event.gsensor.*)
§Availability
This struct is available since SDL 3.2.0.
Fields§
§type: SDL_EventType§reserved: Uint32§timestamp: Uint64In nanoseconds, populated using SDL_GetTicksNS()
which: SDL_JoystickIDThe joystick instance id
sensor: Sint32The type of the sensor, one of the values of SDL_SensorType
data: [c_float; 3]Up to 3 values from the sensor, as defined in SDL_sensor.h
sensor_timestamp: Uint64The 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
Source§fn default() -> SDL_GamepadSensorEvent
fn default() -> SDL_GamepadSensorEvent
Returns the “default value” for a type. Read more
Source§impl PartialEq for SDL_GamepadSensorEvent
impl PartialEq for SDL_GamepadSensorEvent
impl Copy for SDL_GamepadSensorEvent
impl StructuralPartialEq 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 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