[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Pygame & Official Raspberry Pi 7" touchscreen
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Pygame & Official Raspberry Pi 7" touchscreen
- From: David Lönnhager <dv.lnh.d@xxxxxxxxx>
- Date: Sun, 3 Feb 2019 16:59:49 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sun, 03 Feb 2019 11:00:03 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=MaYCalxug6aZAqaouf6QjjOnVczTuY+oT2xE0ZrQXes=; b=BKC04bpw1hs8zaE4ocaHFjxQppcAGeYO1mTVA1qQcOT51h7Eunb7+5purUUwGANIDO cfLgLHean6/OPXKcLUFu034bNRC047wtyhswTn0wV9n8WqtmRIMzoO7T8HQd3rL6op2Z tBHLYfqzY/LjtKhUEpyBL6TqsxCcHwj3sgU5GdtdWuGGsgpdb66G85Uc4wX0Wsqp+AfO 1kmoFJj9iNmGlV3e2pmzmR3caiugG+dCPrt2wqs9K5iTGjidWySA3z+1NRnSt7e+Lysr HRJaom8IL/EJo3JvUMngLl2addZGIenim3AqpEql1GgXpbVLJPDQtoI+Vh2u5Pv0qaQJ hCZQ==
- In-reply-to: <aHnnE48_4E9aarS3S5leIHcLrzlvHL_M5UIrMMGH1Qqk7gfWgWwfYva5b05wN2giUE2hRilF1V7h1z0W7NnHIK5bbhOcnQJCI2YZZNod6ZY=@protonmail.ch>
- References: <CAANJKek3cCEU5NjQZnUsFh3BebSCBwNvGe2L0==oUic2w8iU6g@mail.gmail.com> <ZNf_YcXkhht2ax5eajzksd3CtqYiGXDEux_-zMm-NbIBbE3MhFLQ8uVomCU7OtNZkCtnF3Zv39wypBPjuCxS2w3Fon18iLLUAJFX0F0c_jo=@protonmail.ch> <CAANJKe=xzux9CFpxqeVP4bMXwp8XmkA0cRcn4htf0azaZ0Pbnw@mail.gmail.com> <aHnnE48_4E9aarS3S5leIHcLrzlvHL_M5UIrMMGH1Qqk7gfWgWwfYva5b05wN2giUE2hRilF1V7h1z0W7NnHIK5bbhOcnQJCI2YZZNod6ZY=@protonmail.ch>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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 <mar77i@xxxxxxxxxxxxx> wrote:
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Sunday, February 3, 2019 1:44 AM, Go Peppy <peppy.player@xxxxxxxxx> 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.
>