#[repr(C)]pub struct SDL_GamepadTouchpadEvent {
pub type_: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub which: SDL_JoystickID,
pub touchpad: Sint32,
pub finger: Sint32,
pub x: f32,
pub y: f32,
pub pressure: f32,
}Expand description
Gamepad touchpad event structure (event.gtouchpad.*)
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN or SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION or SDL_EVENT_GAMEPAD_TOUCHPAD_UP
reserved: Uint32§timestamp: Uint64< In nanoseconds, populated using SDL_GetTicksNS()
which: SDL_JoystickID< The joystick instance id
touchpad: Sint32< The index of the touchpad
finger: Sint32< The index of the finger on the touchpad
x: f32< Normalized in the range 0…1 with 0 being on the left
y: f32< Normalized in the range 0…1 with 0 being at the top
pressure: f32< Normalized in the range 0…1
Trait Implementations§
Source§impl Clone for SDL_GamepadTouchpadEvent
impl Clone for SDL_GamepadTouchpadEvent
Source§fn clone(&self) -> SDL_GamepadTouchpadEvent
fn clone(&self) -> SDL_GamepadTouchpadEvent
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_GamepadTouchpadEvent
impl Debug for SDL_GamepadTouchpadEvent
Source§impl Default for SDL_GamepadTouchpadEvent
impl Default for SDL_GamepadTouchpadEvent
impl Copy for SDL_GamepadTouchpadEvent
Auto Trait Implementations§
impl Freeze for SDL_GamepadTouchpadEvent
impl RefUnwindSafe for SDL_GamepadTouchpadEvent
impl Send for SDL_GamepadTouchpadEvent
impl Sync for SDL_GamepadTouchpadEvent
impl Unpin for SDL_GamepadTouchpadEvent
impl UnsafeUnpin for SDL_GamepadTouchpadEvent
impl UnwindSafe for SDL_GamepadTouchpadEvent
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