#[repr(C)]pub struct SDL_PenMotionEvent {
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,
}Expand description
Pressure-sensitive pen motion event structure (event.pmotion.*)
Depending on the hardware, you may get motion events when the pen is not
touching a tablet, for tracking a pen even when it isn’t drawing. You
should listen for SDL_EVENT_PEN_DOWN and SDL_EVENT_PEN_UP events, or check
pen_state & SDL_PEN_INPUT_DOWN to decide if a pen is “drawing” when
dealing with pen motion.
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_PEN_MOTION
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
Trait Implementations§
Source§impl Clone for SDL_PenMotionEvent
impl Clone for SDL_PenMotionEvent
Source§fn clone(&self) -> SDL_PenMotionEvent
fn clone(&self) -> SDL_PenMotionEvent
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_PenMotionEvent
impl Debug for SDL_PenMotionEvent
Source§impl Default for SDL_PenMotionEvent
impl Default for SDL_PenMotionEvent
impl Copy for SDL_PenMotionEvent
Auto Trait Implementations§
impl Freeze for SDL_PenMotionEvent
impl RefUnwindSafe for SDL_PenMotionEvent
impl Send for SDL_PenMotionEvent
impl Sync for SDL_PenMotionEvent
impl Unpin for SDL_PenMotionEvent
impl UnsafeUnpin for SDL_PenMotionEvent
impl UnwindSafe for SDL_PenMotionEvent
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