SDL_PenButtonEvent

Pressure-sensitive pen button event structure (event.pbutton.*)

This is for buttons on the pen itself that the user might click. The pen itself pressing down to draw triggers a SDL_EVENT_PEN_DOWN event instead.

\since This struct is available since SDL 3.2.0.

Members

Variables

button
Uint8 button;

< The pen button index (first button is 1).

down
bool down;

< true if the button is pressed

pen_state
SDL_PenInputFlags pen_state;

< Complete pen input state at time of event

reserved
Uint32 reserved;
Undocumented in source.
timestamp
Uint64 timestamp;

< In nanoseconds, populated using SDL_GetTicksNS()

type
SDL_EventType type;

< SDL_EVENT_PEN_BUTTON_DOWN or SDL_EVENT_PEN_BUTTON_UP

which
SDL_PenID which;

< The pen instance id

windowID
SDL_WindowID windowID;

< The window with mouse focus, if any

x
float x;

< X coordinate, relative to window

y
float y;

< Y coordinate, relative to window

Meta