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
 
SDL_PenInputFlags pen_state
 
float x
 
float y
 
Uint8 button
 
bool down
 

Detailed Description

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.0.0.

Definition at line 783 of file SDL_events.h.

Field Documentation

◆ button

Uint8 SDL_PenButtonEvent::button

The pen button index (first button is 1).

Definition at line 793 of file SDL_events.h.

◆ down

bool SDL_PenButtonEvent::down

true if the button is pressed

Definition at line 794 of file SDL_events.h.

◆ pen_state

SDL_PenInputFlags SDL_PenButtonEvent::pen_state

Complete pen input state at time of event

Definition at line 790 of file SDL_events.h.

◆ reserved

Uint32 SDL_PenButtonEvent::reserved

Definition at line 786 of file SDL_events.h.

◆ timestamp

Uint64 SDL_PenButtonEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 787 of file SDL_events.h.

◆ type

SDL_EventType SDL_PenButtonEvent::type

SDL_EVENT_PEN_BUTTON_DOWN or SDL_EVENT_PEN_BUTTON_UP

Definition at line 785 of file SDL_events.h.

◆ which

SDL_PenID SDL_PenButtonEvent::which

The pen instance id

Definition at line 789 of file SDL_events.h.

◆ windowID

SDL_WindowID SDL_PenButtonEvent::windowID

The window with mouse focus, if any

Definition at line 788 of file SDL_events.h.

◆ x

float SDL_PenButtonEvent::x

X coordinate, relative to window

Definition at line 791 of file SDL_events.h.

◆ y

float SDL_PenButtonEvent::y

Y coordinate, relative to window

Definition at line 792 of file SDL_events.h.


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