On Tue, Jan 11, 2011 at 04:41, James Moschou <[email protected]> wrote: > On 5 January 2011 02:36, Tomeu Vizoso <[email protected]> wrote: >> Hi, >> >> my understanding by reading MxKineticScrollView's code is that right >> now all pointer events will be captured and not passed down to the >> contained children, there's one bug already filed about button events: >> >> http://bugzilla.clutter-project.org/show_bug.cgi?id=2488 >> >> Additionally, I wonder what could be done so contained children can >> also get motion and button events so for example they can react to >> horizontal swipes when the scroll view only scrolls vertically. >> >> Thanks, >> >> Tomeu >> _______________________________________________ >> clutter-app-devel-list mailing list >> [email protected] >> http://lists.clutter-project.org/listinfo/clutter-app-devel-list >> > > I'm not familiar with MxScrollView or MxKineticScrollView, but for the > sake of reference, UIScrollView from iOS deals with this same issue > using a timer: > > http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollView_Class/Reference/UIScrollView.html > > For a more thorough explanation see "Cover story: How does UIScrollView work": > > https://github.com/andreyvit/ScrollingMadness > > However this solution relies on being able to cancel events, which I > don't think is possible to do in clutter.
Taps (button release events) can be passed without needing to replay events, we can just check in the release handler if we are going to consider it a panning gesture or not. If not, we return FALSE and the release event will reach the contained children. This is what used to be done in Maemo's Tidy: http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/src/tidy/tidy-finger-scroll.c#line249 I agree that taking into account the elapsed time would be a nice addition. But for gestures composed of button presses and motion events, I don't see either how MxKineticScrollView could handle them without stealing them from its children. So maybe we need event synthesis and replay? Regards, Tomeu > - James > _______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
