After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678047 - Add touch events vfunc on ClutterActor
Add touch events vfunc on ClutterActor
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterActor
1.10.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-06-13 17:57 UTC by Lionel Landwerlin
Modified: 2012-06-22 20:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch v1 (4.76 KB, patch)
2012-06-13 17:57 UTC, Lionel Landwerlin
needs-work Details | Review
patch v2 (16.13 KB, patch)
2012-06-17 23:17 UTC, Lionel Landwerlin
none Details | Review
patch v2 (2.37 KB, patch)
2012-06-17 23:20 UTC, Lionel Landwerlin
accepted-commit_now Details | Review

Description Lionel Landwerlin 2012-06-13 17:57:23 UTC
Created attachment 216338 [details] [review]
patch v1

This patch adds vfuncs on ClutterActor to deal with touch events.
Comment 1 Emmanuele Bassi (:ebassi) 2012-06-14 07:46:03 UTC
Review of attachment 216338 [details] [review]:

I'm not overly fond of adding four new vfuncs and signals: it leads to combinatorial complexity explosions in the API.

I'd go for a single touch-event signal, and maybe add a detail for the phase - i.e. touch-event:begin, touch-event:update, etc.

this would still allow granularity, and overriding.
Comment 2 Lionel Landwerlin 2012-06-14 09:40:29 UTC
What looks simpler/saner from the Clutter point of view ends up being more painful from the point of view of toolkits like Mx. Most of the event processing in Buttons/ScrollViews/Entries/etc for touch events is pretty close from what you would do for pointer events.

Maybe going from 4 to 3 by grouping END and CANCEL together would make more sense.
Comment 3 Emmanuele Bassi (:ebassi) 2012-06-14 10:17:29 UTC
if it's all there already then you can abstract the implementation into a function and call it from the virtual functions itself.

prior art would be the GtkWidget:touch-event signal - but in that case the gtk team is trying to abstract event handling to separate controller objects instead of using signal handlers inside widgets.
Comment 4 Lionel Landwerlin 2012-06-17 23:17:36 UTC
Created attachment 216625 [details] [review]
patch v2
Comment 5 Lionel Landwerlin 2012-06-17 23:20:12 UTC
Created attachment 216626 [details] [review]
patch v2
Comment 6 Emmanuele Bassi (:ebassi) 2012-06-20 08:48:31 UTC
Review of attachment 216626 [details] [review]:

looks okay; I'd still mark the signal as detailed, and add a quark depending on the event type, but that can come later.