#[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: c_float,
pub y: c_float,
pub pressure: c_float,
}Expand description
Gamepad touchpad event structure (event.gtouchpad.*)
§Availability
This struct is available since SDL 3.2.0.
Fields§
§type: SDL_EventTypeSDL_EVENT_GAMEPAD_TOUCHPAD_DOWN or SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION or SDL_EVENT_GAMEPAD_TOUCHPAD_UP
reserved: Uint32§timestamp: Uint64In nanoseconds, populated using SDL_GetTicksNS()
which: SDL_JoystickIDThe joystick instance id
touchpad: Sint32The index of the touchpad
finger: Sint32The index of the finger on the touchpad
x: c_floatNormalized in the range 0…1 with 0 being on the left
y: c_floatNormalized in the range 0…1 with 0 being at the top
pressure: c_floatNormalized 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
Source§fn default() -> SDL_GamepadTouchpadEvent
fn default() -> SDL_GamepadTouchpadEvent
Returns the “default value” for a type. Read more
Source§impl PartialEq for SDL_GamepadTouchpadEvent
impl PartialEq for SDL_GamepadTouchpadEvent
impl Copy for SDL_GamepadTouchpadEvent
impl StructuralPartialEq 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