logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_PenMotionEvent - Pressure-sensitive pen motion event structure (event.pmotion.*)

Availability

       This struct is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.10                          SDL_PenMotionEvent(3type)

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. 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.

Header File

       Defined in SDL3/SDL_events.h

Name

       SDL_PenMotionEvent - Pressure-sensitive pen motion event structure (event.pmotion.*)

Synopsis

#include"SDL3/SDL.h"typedefstructSDL_PenMotionEvent{SDL_EventTypetype;/**<SDL_EVENT_PEN_MOTION*/Uint32reserved;Uint64timestamp;/**<Innanoseconds,populatedusingSDL_GetTicksNS()*/SDL_WindowIDwindowID;/**<Thewindowwithpenfocus,ifany*/SDL_PenIDwhich;/**<Thepeninstanceid*/SDL_PenInputFlagspen_state;/**<Completepeninputstateattimeofevent*/floatx;/**<Xcoordinate,relativetowindow*/floaty;/**<Ycoordinate,relativetowindow*/}SDL_PenMotionEvent;

See Also