GNOME Bugzilla – Bug 678279
Add grab API on touch sequences
Last modified: 2012-06-22 20:59:48 UTC
Created attachment 216633 [details] [review] patch v1 At the moment it is possible to grab a pointer input device. This is quite convinient for implement text selection for example. But, with multi touch devices, we need more granularity than just grabbing the whole device. We might want to just grab one of the touch point for the selection of text in a ClutterText, and grab another one at the same time from a different ClutterText actor. Attached is a patch to implement this idea.
Review of attachment 216633 [details] [review]: looks generally okay; grabbing on the event sequence looks good. I wonder if we should add a ::grab-broken signal on ClutterActor, like GtkWidget has, to notify that a grab has been released, but that can be added later. ::: clutter/clutter-main.c @@ +2337,3 @@ + { + ClutterActor *grab_actor = + { there's no need to cast the return value - g_hash_table_lookup() returns a void* @@ +2845,3 @@ +{ + ClutterEventSequence *sequence = + (ClutterEventSequence *) g_hash_table_lookup (device->inv_sequence_grab_actors, same as above. @@ +2848,3 @@ + actor); + +{ please, use an explicit != NULL. @@ +3072,3 @@ + else + { + */ no need to cast @@ +3114,3 @@ + return; + + } no need to cast @@ +3156,3 @@ + return NULL; + + * @device: a #ClutterInputDevice no need to cast
Created attachment 216867 [details] [review] patch v2
Review of attachment 216867 [details] [review]: need to update the clutter.symbols and the API reference with the new methods on ClutterInputDevice. ::: clutter/clutter-main.c @@ +3026,2 @@ /** + * clutter_input_device_sequence_grab: I would move the new ClutterInputDevice methods into clutter-input-device.c. the global grab/ungrap API being in clutter-main.c is an historical accident due to the fact that we didn't have ClutterInputDevice until later.
Created attachment 217046 [details] [review] patch v3 Thanks a lot for the review.
Review of attachment 217046 [details] [review]: looks good