.\" This manpage content is licensed under Creative Commons
.\"  Attribution 4.0 International (CC BY 4.0)
.\"   https://creativecommons.org/licenses/by/4.0/
.\" This manpage was generated from SDL's wiki page for SDL_PenMotionEvent:
.\"   https://wiki.libsdl.org/SDL_PenMotionEvent
.\" Generated with SDL/build-scripts/wikiheaders.pl
.\"  revision release-3.2.10-0-g877399b2b
.\" Please report issues in this manpage's content at:
.\"   https://github.com/libsdl-org/sdlwiki/issues/new
.\" Please report issues in the generation of this manpage from the wiki at:
.\"   https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_PenMotionEvent
.\" SDL can be found at https://libsdl.org/
.de URL
\$2 \(laURL: \$1 \(ra\$3
..
.if \n[.g] .mso www.tmac
.TH SDL_PenMotionEvent 3type "SDL 3.2.10" "Simple Directmedia Layer" "SDL3 DATATYPES"
.SH NAME
SDL_PenMotionEvent \- Pressure-sensitive pen motion event structure (event\[char46]pmotion\[char46]*)
.SH HEADER FILE
Defined in SDL3/SDL_events\[char46]h

.SH SYNOPSIS
.nf
.B #include \(dqSDL3/SDL.h\(dq
.PP
.BI "typedef struct SDL_PenMotionEvent
.BI "{
.BI "    SDL_EventType type; /**< SDL_EVENT_PEN_MOTION */
.BI "    Uint32 reserved;
.BI "    Uint64 timestamp;   /**< In nanoseconds, populated using SDL_GetTicksNS() */
.BI "    SDL_WindowID windowID; /**< The window with pen focus, if any */
.BI "    SDL_PenID which;        /**< The pen instance id */
.BI "    SDL_PenInputFlags pen_state;   /**< Complete pen input state at time of event */
.BI "    float x;                /**< X coordinate, relative to window */
.BI "    float y;                /**< Y coordinate, relative to window */
.BI "} SDL_PenMotionEvent;
.fi
.SH DESCRIPTION
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\[char46] You
should listen for 
.BR SDL_EVENT_PEN_DOWN
 and

.BR SDL_EVENT_PEN_UP
 events, or check
.BR pen_state &
SDL_PEN_INPUT_DOWN
to decide if a pen is "drawing" when dealing with pen
motion\[char46]

.SH AVAILABILITY
This struct is available since SDL 3\[char46]2\[char46]0\[char46]