Commit Graph

24 Commits

Author SHA1 Message Date
Anonymous Maarten
31d133db40 Define SDL_PLATFORM_* macros instead of underscored ones (#8875) 2024-01-24 01:40:51 +00:00
Sam Lantinga
5b3ee51c6c Updated copyright for 2024 2024-01-01 13:15:26 -08:00
Ozkan Sezer
39870031d1 use format string attributes for functions accepting va_list params, too 2023-11-17 15:56:10 +03:00
Christoph Reichenbach
7c80ac6df7 API for pressure-sensitive pens + XInput2/Wayland
This patch adds an API for querying pressure-
sensitive pens, cf. SDL_pen.h:
- Enumerate all pens
- Get pen capabilities, names, GUIDs
- Distinguishes pens and erasers
- Distinguish attached and detached pens
- Pressure and tilt support
- Rotation, distance, throttle wheel support
  (throttle wheel untested)
- Pen type and meta-information reporting
  (partially tested)

Pen event reporting:
- Three new event structures: PenTip, PenMotion, and
  PenButton
- Report location with sub-pixel precision
- Include axis and button status, is-eraser flag

Internal pen tracker, intended to be independent
of platform APIs, cf. SDL_pen_c.h:
- Track known pens
- Handle pen hotplugging

Automatic test:
- testautomation_pen.c

Other features:
- XInput2 implementation, incl. hotplugging
- Wayland implementation, incl. hotplugging
- Backward compatibility: pen events default to
  emulating pens with mouse ID SDL_PEN_MOUSEID
- Can be toggled via SDL_HINT_PEN_NOT_MOUSE
- Test/demo program (testpen)
- Wacom pen feature identification by pen ID

Acknowledgements:
- Ping Cheng (Wacom) provided extensive feedback
  on Wacom pen features and detection so that
  hopefully untested Wacom devices have a
  realistic chance of working out of the box.
2023-11-12 09:52:02 -08:00
Ryan C. Gordon
ac6b32bb02 gendynapi.py: Discard SDLMAIN_DECLSPEC functions.
Otherwise SDL_main and SDL_App* functions look like exported symbols instead
of functions the app is meant to implement.

Reference PR #8247.
2023-11-01 21:47:42 -04:00
Sam Lantinga
9323417e9c Fixed gendyapi.py parsing of SDL_RELEASE_GENERIC 2023-11-01 08:36:51 -07:00
Sam Lantinga
8cc3783e75 Remove extra spaces in stripped tokens 2023-07-16 04:32:12 -07:00
Sylvain
6763369f5b gendynapi.py: always check comment formatting of the public api 2023-07-07 21:55:20 +02:00
luzpaz
37e567994d Fix remaining typos (#7921)
* Fix remaining typos

Found via `codespell -q 3 -S *.hex,*.pdf,./src/libm,./src/hidapi,./src/stdlib/SDL_malloc.c,./src/video/x11/edid.h -L caf,currenty,datas,einstance,fo,hda,lod,mata,parm,parms,pevent,pevents,pixelx,requestor,ser,statics,te,texturers,thid,uscaled,windowz`
2023-07-03 12:46:47 -07:00
Sam Lantinga
c9d8a04945 Added SDL_swprintf() and SDL_vswprintf() 2023-05-26 08:19:04 -07:00
Sam Lantinga
0d559b7cb3 Fixed parsing SDL_mutex.h 2023-04-29 10:14:03 -07:00
Sylvain
eea4711110 gendynapi.py: add option to check doc formating (eg \param \returns \since) 2023-02-12 20:43:30 +01:00
Sam Lantinga
fde78d12f2 Updated copyright for 2023 2023-01-09 09:41:41 -08:00
Anonymous Maarten
4676d1d31e android: register all methods using JNI_OnLoad 2022-12-21 23:00:58 -08:00
Anonymous Maarten
9421828e7e gendynapi.py: add android native symbols to SDL_dynapi.sym 2022-12-21 09:39:22 -08:00
Anonymous Maarten
063cb60659 gendynapi.py: use pathlib + uppercase global variables 2022-12-21 09:39:22 -08:00
Sam Lantinga
3a940ba8ee Updated gendynapi.py to handle thread-safety annotations 2022-12-14 09:59:56 -08:00
Sylvain
cce1341b5b gendynapi.py: don't generate parameter for '...' - corrected 2022-12-09 20:34:13 +01:00
Sylvain
f442d0a0ef Revert "gendynapi.py: don't generate parameter for '...'"
This reverts commit ea8c7df91b.
2022-12-09 20:33:14 +01:00
Sylvain
ea8c7df91b gendynapi.py: don't generate parameter for '...' 2022-12-09 20:22:44 +01:00
Sylvain
5f89987d7f Fixed extra 'space' (see #6783 Thanks @sezero !) 2022-12-09 20:09:17 +01:00
Sylvain
b116dd8eb8 gendynapi.py: add comment for OS-specific API (Thanks @DanielGibson!) 2022-12-09 09:27:19 +01:00
Sylvain
e93769d2c9 Extract the name of a callback paramter 2022-12-08 08:55:27 -08:00
Sylvain
67a4094eea Rewrite + gendynapi into python 2022-12-08 08:55:27 -08:00