Touch events (FingerMotion, FingerDown, FingerUp, and MultiGesture) have been added to pygame. Should work if you build it with SDL2.
On Sun, Feb 3, 2019 at 2:44 AM <mar...@protonmail.ch> wrote: > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Sunday, February 3, 2019 1:44 AM, Go Peppy <peppy.pla...@gmail.com> wrote: > > > That "driver" handles events directly. See function _touch_device here: > > https://github.com/pimoroni/python-multitouch/blob/master/library/ft5406.py > > > > Thank you! > > > > Sorry I still don't get it. We know > > - it registers events correctly > - it appears to integrate with pygame in not completely unreasonable fashion > > And that's it. Thing is that pygame is built on top of a C library called > SDL. Pygame has therefore little to say on its own over what devices are > supported on the system level, since it doesn't do much more than bind SDL's > event handling interfaces to make them usable in python. So unless you want > to write the necessary code in C into SDL first, there seems to be a way that > is known to work and let's use that. > > There might be some prototype Pygame 2 based on SDL2 out there, maybe that > one integrates the hardware support you're after? That would require Pygame > to support this new event type [0] here. Pygame 2 has been on its way for a > while, though, and mentions adding of new APIs on this milestone [1]... > > cheers! > mar77i > > [0] https://wiki.libsdl.org/SDL_TouchFingerEvent#SDL_TouchFingerEvent-1 > [1] https://github.com/pygame/pygame/milestone/4 > > > Sent with ProtonMail Secure Email. >