GNOME Bugzilla – Bug 678047
Add touch events vfunc on ClutterActor
Last modified: 2012-06-22 20:58:12 UTC
Created attachment 216338 [details] [review] patch v1 This patch adds vfuncs on ClutterActor to deal with touch events.
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.
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.
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.
Created attachment 216625 [details] [review] patch v2
Created attachment 216626 [details] [review] patch v2
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.