SDL 3.0
SDL_PenMotionEvent Struct Reference

#include <SDL_events.h>

Data Fields

SDL_EventType type
 
Uint32 reserved
 
Uint64 timestamp
 
SDL_WindowID windowID
 
SDL_PenID which
 
Uint8 padding1
 
Uint8 padding2
 
Uint16 pen_state
 
float x
 
float y
 
float axes [SDL_PEN_NUM_AXES]
 

Detailed Description

Pressure-sensitive pen motion / pressure / angle event structure (event.pmotion.*)

Since
This struct is available since SDL 3.0.0.

Definition at line 744 of file SDL_events.h.

Field Documentation

◆ axes

float SDL_PenMotionEvent::axes[SDL_PEN_NUM_AXES]

Pen axes such as pressure and tilt (ordered as per SDL_PenAxis)

Definition at line 756 of file SDL_events.h.

◆ padding1

Uint8 SDL_PenMotionEvent::padding1

Definition at line 751 of file SDL_events.h.

◆ padding2

Uint8 SDL_PenMotionEvent::padding2

Definition at line 752 of file SDL_events.h.

◆ pen_state

Uint16 SDL_PenMotionEvent::pen_state

Pen button masks (where SDL_BUTTON(1) is the first button, SDL_BUTTON(2) is the second button etc.), SDL_PEN_DOWN_MASK is set if the pen is touching the surface, and SDL_PEN_ERASER_MASK is set if the pen is (used as) an eraser.

Definition at line 753 of file SDL_events.h.

◆ reserved

Uint32 SDL_PenMotionEvent::reserved

Definition at line 747 of file SDL_events.h.

◆ timestamp

Uint64 SDL_PenMotionEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 748 of file SDL_events.h.

◆ type

SDL_EventType SDL_PenMotionEvent::type

SDL_EVENT_PEN_MOTION

Definition at line 746 of file SDL_events.h.

◆ which

SDL_PenID SDL_PenMotionEvent::which

The pen instance id

Definition at line 750 of file SDL_events.h.

◆ windowID

SDL_WindowID SDL_PenMotionEvent::windowID

The window with pen focus, if any

Definition at line 749 of file SDL_events.h.

◆ x

float SDL_PenMotionEvent::x

X coordinate, relative to window

Definition at line 754 of file SDL_events.h.

◆ y

float SDL_PenMotionEvent::y

Y coordinate, relative to window

Definition at line 755 of file SDL_events.h.


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