SDL_PenProximityEvent Struct Reference

`#include <SDL_events.h>`

## Data Fields

SDL_EventType | type
Uint32 | reserved
Uint64 | timestamp
SDL_WindowID | windowID
SDL_PenID | which

## Detailed Description

Pressure-sensitive pen proximity event structure (event.pproximity.*)

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.

Not all platforms have a window associated with the pen during proximity events. Some wait until motion/button/etc events to offer this info.

Since
  This struct is available since SDL 3.2.0.

Definition at line 826 of file SDL_events.h.

## Field Documentation

## reserved

Uint32 SDL_PenProximityEvent::reserved

Definition at line 829 of file SDL_events.h.

## timestamp

Uint64 SDL_PenProximityEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 830 of file SDL_events.h.

## type

SDL_EventType SDL_PenProximityEvent::type

SDL_EVENT_PEN_PROXIMITY_IN or SDL_EVENT_PEN_PROXIMITY_OUT

Definition at line 828 of file SDL_events.h.

## which

SDL_PenID SDL_PenProximityEvent::which

The pen instance id

Definition at line 832 of file SDL_events.h.

## windowID

SDL_WindowID SDL_PenProximityEvent::windowID

The window with pen focus, if any

Definition at line 831 of file SDL_events.h.

The documentation for this struct was generated from the following file:

- SDL_events.h