SDL 3.0
SDL_PenTipEvent Struct Reference

#include <SDL_events.h>

Data Fields

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

Detailed Description

Pressure-sensitive pen touched or stopped touching surface (event.ptip.*)

Since
This struct is available since SDL 3.0.0.

Definition at line 674 of file SDL_events.h.

Field Documentation

◆ axes

float SDL_PenTipEvent::axes[SDL_PEN_NUM_AXES]

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

Definition at line 686 of file SDL_events.h.

◆ pen_state

Uint16 SDL_PenTipEvent::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 683 of file SDL_events.h.

◆ reserved

Uint32 SDL_PenTipEvent::reserved

Definition at line 677 of file SDL_events.h.

◆ state

Uint8 SDL_PenTipEvent::state

◆ timestamp

Uint64 SDL_PenTipEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 678 of file SDL_events.h.

◆ tip

Uint8 SDL_PenTipEvent::tip

SDL_PEN_TIP_INK when using a regular pen tip, or SDL_PEN_TIP_ERASER if the pen is being used as an eraser (e.g., flipped to use the eraser tip)

Definition at line 681 of file SDL_events.h.

◆ type

SDL_EventType SDL_PenTipEvent::type

SDL_EVENT_PEN_DOWN or SDL_EVENT_PEN_UP

Definition at line 676 of file SDL_events.h.

◆ which

SDL_PenID SDL_PenTipEvent::which

The pen instance id

Definition at line 680 of file SDL_events.h.

◆ windowID

SDL_WindowID SDL_PenTipEvent::windowID

The window with pen focus, if any

Definition at line 679 of file SDL_events.h.

◆ x

float SDL_PenTipEvent::x

X coordinate, relative to window

Definition at line 684 of file SDL_events.h.

◆ y

float SDL_PenTipEvent::y

Y coordinate, relative to window

Definition at line 685 of file SDL_events.h.


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