Re: [AD] Touchpad gestures

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 17 Feb 2010, at 18:33 , Peter Wang wrote:
> We'll have too many buttons and axes, won't we?  I think we should add a
> new event type, e.g. ALLEGRO_EVENT_GESTURE with a field that specifies
> the type of gesture, and a field (fields?) to indicate the degree of the
> gesture.
> 
> How do the current mouse events work with multi-touch?  Perhaps we need
> a field in ALLEGRO_MOUSE_EVENT to tell apart the different fingers?

Attached is a preliminary patch for OS X.
I'm re-using the event source from the display, which I guess is not what we want in the end. I'm not sure what a proper event source would be; perhaps just an abstract "gesture" event source.
The current implementation has a few flaws. First of all, it generates a flood of tiny rotations and zoom factors that nee to be added, respectively multiplied together to get the total rotation angle and zoom factor. It is possible to trigger on the end of a gesture and send the total information at that point. On the other hand, that probably means having to release the trackpad in order to see the effect of the gesture that was just made, which is probably not what we want either.

Evert

Attachment: gesture.diff
Description: Binary data





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/