#[repr(C)]pub struct SDL_PenTouchEvent {
pub type_: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub windowID: SDL_WindowID,
pub which: SDL_PenID,
pub pen_state: SDL_PenInputFlags,
pub x: f32,
pub y: f32,
pub eraser: bool,
pub down: bool,
}Expand description
Pressure-sensitive pen touched event structure (event.ptouch.*)
These events come when a pen touches a surface (a tablet, etc), or lifts off from one.
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_PEN_DOWN or SDL_EVENT_PEN_UP
reserved: Uint32§timestamp: Uint64< In nanoseconds, populated using SDL_GetTicksNS()
windowID: SDL_WindowID< The window with pen focus, if any
which: SDL_PenID< The pen instance id
pen_state: SDL_PenInputFlags< Complete pen input state at time of event
x: f32< X coordinate, relative to window
y: f32< Y coordinate, relative to window
eraser: bool< true if eraser end is used (not all pens support this).
down: bool< true if the pen is touching or false if the pen is lifted off
Trait Implementations§
Source§impl Clone for SDL_PenTouchEvent
impl Clone for SDL_PenTouchEvent
Source§fn clone(&self) -> SDL_PenTouchEvent
fn clone(&self) -> SDL_PenTouchEvent
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_PenTouchEvent
impl Debug for SDL_PenTouchEvent
Source§impl Default for SDL_PenTouchEvent
impl Default for SDL_PenTouchEvent
impl Copy for SDL_PenTouchEvent
Auto Trait Implementations§
impl Freeze for SDL_PenTouchEvent
impl RefUnwindSafe for SDL_PenTouchEvent
impl Send for SDL_PenTouchEvent
impl Sync for SDL_PenTouchEvent
impl Unpin for SDL_PenTouchEvent
impl UnsafeUnpin for SDL_PenTouchEvent
impl UnwindSafe for SDL_PenTouchEvent
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