SDL_PenProximityEvent - Pressure-sensitive pen proximity event structure (event.pmotion.*)
Contents
Availability
This struct is available since SDL 3.2.0.
Simple Directmedia Layer SDL 3.2.10 SDL_PenProximityEvent(3type)
Description
When a pen becomes visible to the system (it is close enough to a tablet, etc), SDL will send an
SDL_EVENT_PEN_PROXIMITY_IN
event with the new pen's ID. This ID is valid until the pen leaves proximity again (has been removed
from the tablet's area, the tablet has been unplugged, etc). If the same pen reenters proximity again, it
will be given a new ID.
Note that "proximity" means "close enough for the tablet to know the tool is there." The pen touching and
lifting off from the tablet while not leaving the area are handled by SDL_EVENT_PEN_DOWN
and SDL_EVENT_PEN_UP .
Header File
Defined in SDL3/SDL_events.h
Name
SDL_PenProximityEvent - Pressure-sensitive pen proximity event structure (event.pmotion.*)
Synopsis
#include"SDL3/SDL.h"typedefstructSDL_PenProximityEvent{SDL_EventTypetype;/**<SDL_EVENT_PEN_PROXIMITY_INorSDL_EVENT_PEN_PROXIMITY_OUT*/Uint32reserved;Uint64timestamp;/**<Innanoseconds,populatedusingSDL_GetTicksNS()*/SDL_WindowIDwindowID;/**<Thewindowwithpenfocus,ifany*/SDL_PenIDwhich;/**<Thepeninstanceid*/}SDL_PenProximityEvent;