SDL 3.0
SDL_PenButtonEvent Struct Reference

#include <SDL_events.h>

Data Fields

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

Detailed Description

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

Since
This struct is available since SDL 3.0.0.

Definition at line 715 of file SDL_events.h.

Field Documentation

◆ axes

float SDL_PenButtonEvent::axes[SDL_PEN_NUM_AXES]

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

Definition at line 727 of file SDL_events.h.

◆ button

Uint8 SDL_PenButtonEvent::button

The pen button index (1 represents the pen tip for compatibility with mouse events)

Definition at line 722 of file SDL_events.h.

◆ pen_state

Uint16 SDL_PenButtonEvent::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 724 of file SDL_events.h.

◆ reserved

Uint32 SDL_PenButtonEvent::reserved

Definition at line 718 of file SDL_events.h.

◆ state

Uint8 SDL_PenButtonEvent::state

SDL_PRESSED or SDL_RELEASED

Definition at line 723 of file SDL_events.h.

◆ timestamp

Uint64 SDL_PenButtonEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 719 of file SDL_events.h.

◆ type

SDL_EventType SDL_PenButtonEvent::type

◆ which

SDL_PenID SDL_PenButtonEvent::which

The pen instance id

Definition at line 721 of file SDL_events.h.

◆ windowID

SDL_WindowID SDL_PenButtonEvent::windowID

The window with pen focus, if any

Definition at line 720 of file SDL_events.h.

◆ x

float SDL_PenButtonEvent::x

X coordinate, relative to window

Definition at line 725 of file SDL_events.h.

◆ y

float SDL_PenButtonEvent::y

Y coordinate, relative to window

Definition at line 726 of file SDL_events.h.


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