SDL 3.0
SDL_PenTouchEvent Struct Reference

#include <SDL_events.h>

Data Fields

SDL_EventType type
 
Uint32 reserved
 
Uint64 timestamp
 
SDL_WindowID windowID
 
SDL_PenID which
 
SDL_PenInputFlags pen_state
 
float x
 
float y
 
Uint8 eraser
 
Uint8 state
 

Detailed Description

Pressure-sensitive pen touched event structure (event.ptouch.*)

These events come when a pen touches a surface (a tablet, etc), or lifts off from one.

Since
This struct is available since SDL 3.0.0.

Definition at line 773 of file SDL_events.h.

Field Documentation

◆ eraser

Uint8 SDL_PenTouchEvent::eraser

Non-zero if eraser end is used (not all pens support this).

Definition at line 783 of file SDL_events.h.

◆ pen_state

SDL_PenInputFlags SDL_PenTouchEvent::pen_state

Complete pen input state at time of event

Definition at line 780 of file SDL_events.h.

◆ reserved

Uint32 SDL_PenTouchEvent::reserved

Definition at line 776 of file SDL_events.h.

◆ state

Uint8 SDL_PenTouchEvent::state

SDL_PRESSED (pen is touching) or SDL_RELEASED (pen is lifted off)

Definition at line 784 of file SDL_events.h.

◆ timestamp

Uint64 SDL_PenTouchEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 777 of file SDL_events.h.

◆ type

SDL_EventType SDL_PenTouchEvent::type

SDL_EVENT_PEN_DOWN or SDL_EVENT_PEN_UP

Definition at line 775 of file SDL_events.h.

◆ which

SDL_PenID SDL_PenTouchEvent::which

The pen instance id

Definition at line 779 of file SDL_events.h.

◆ windowID

SDL_WindowID SDL_PenTouchEvent::windowID

The window with pen focus, if any

Definition at line 778 of file SDL_events.h.

◆ x

float SDL_PenTouchEvent::x

X position of pen on tablet

Definition at line 781 of file SDL_events.h.

◆ y

float SDL_PenTouchEvent::y

Y position of pen on tablet

Definition at line 782 of file SDL_events.h.


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