pen: Send virtual mouse and touch events for pen input.

Fixes #11948.
This commit is contained in:
Ryan C. Gordon committed 2025-01-15 02:19:59 -05:00
1 parent 169c8d5140
commit dabc93a631
8 files changed
+168 -32

No files matched your search

+16
View File
@@ -40,6 +40,8 @@
#define SDL_pen_h_
#include <SDL3/SDL_stdinc.h>
#include <SDL3/SDL_mouse.h>
#include <SDL3/SDL_touch.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
@@ -59,6 +61,20 @@ extern "C" {
*/
typedef Uint32 SDL_PenID;
/**
* The SDL_MouseID for mouse events simulated with pen input.
*
* \since This macro is available since SDL 3.1.3.
*/
#define SDL_PEN_MOUSEID ((SDL_MouseID)-2)
/**
* The SDL_TouchID for touch events simulated with pen input.
*
* \since This macro is available since SDL 3.1.3.
*/
#define SDL_PEN_TOUCHID ((SDL_TouchID)-2)
/**
* Pen input flags, as reported by various pen events' `pen_state` field.