Struct sdl2_sys::SDL_ControllerSensorEvent
source · #[repr(C)]pub struct SDL_ControllerSensorEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: SDL_JoystickID,
pub sensor: Sint32,
pub data: [f32; 3],
pub timestamp_us: Uint64,
}
Expand description
\brief Game controller sensor event structure (event.csensor.*)
Fields§
§type_: Uint32
< ::SDL_CONTROLLERSENSORUPDATE
timestamp: Uint32
< In milliseconds, populated using SDL_GetTicks()
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
timestamp_us: Uint64
< The timestamp of the sensor reading in microseconds, if the hardware provides this information.
Trait Implementations§
source§impl Clone for SDL_ControllerSensorEvent
impl Clone for SDL_ControllerSensorEvent
source§fn clone(&self) -> SDL_ControllerSensorEvent
fn clone(&self) -> SDL_ControllerSensorEvent
Returns a copy 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 moreimpl Copy for SDL_ControllerSensorEvent
Auto Trait Implementations§
impl Freeze for SDL_ControllerSensorEvent
impl RefUnwindSafe for SDL_ControllerSensorEvent
impl Send for SDL_ControllerSensorEvent
impl Sync for SDL_ControllerSensorEvent
impl Unpin for SDL_ControllerSensorEvent
impl UnwindSafe for SDL_ControllerSensorEvent
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