Desktop Gesture-Magnify Support

Reading the SDL source code I couldn’t find support for gesture APIs
Windows, macOS and Linux support gestures from the touchpad, and since SDL handles all the input (and message loop) would in most SDL applications would be great if we could have support for those events or at least for magnify.

For macOS they have support since 10.5 https://developer.apple.com/documentation/appkit/nseventtype/nseventtypemagnify?language=occ
For Windows, since Windows 7 https://docs.microsoft.com/en-us/windows/win32/wintouch/getting-started-with-multi-touch-gestures
And it seems libinput also have the support for that: https://wayland.freedesktop.org/libinput/doc/latest/gestures.html

I am willing to help with the Windows and the Mac implementation.
Thoughts?

Thank you

Nope?
Nothing? :sweat_smile: I guess no one is using this feature from their touch pads

I am using the ‘pinch’ gesture to control zoom (on Android, iOS and Windows), but I’ve found the existing SDL_MULTIGESTURE event adequate for that. I adjust the zoom (magnification) factor as follows:

zoom *= (1.0 + ev.mgesture.dDist) / (1.0 - ev.mgesture.dDist) ;