GNOME Bugzilla – Bug 697522
While the get_scroll_delta function is well introspected, it is not accessible from a child class of ClutterEvent.
Last modified: 2014-03-09 23:07:35 UTC
In ipython, do this to reproduce: Clutter.ScrollEvent.get<tab> No result shows up, I have a brand new fedora 18 installation with clutter 1.12. Have a nice day :)
clutter_event_get_scroll_delta() takes a ClutterEvent by design, like all the clutter_event_* methods. you're supposed to use a Clutter.Event, not the "subclasses" — especially from a higher language perspective: the "subclasses" are mostly an artefact of the C API.
Except that the "scroll-event" signal sends me a ScrollEvent.
strictly speaking, it's sending you a pointer to a ClutterEvent, and taking advantage of the memory layout of the ClutterEvent structure, you can cast it to a ClutterScrollEvent. in Python, you can assume you're getting a Clutter.Event, not a ScrollEvent.
I understand how inheriting works in C :) http://paste.fedoraproject.org/7011/52952013 this script illustrates the problem, which probably arises from the fact that ClutterScrollEvent et al. are Boxed types.
The annotations are wrong by the way : * @event: (type ClutterScrollEvent): a #ClutterScrollEvent
Hey, not sure why that bug was closed as NOTABUG ?