On Fri, 2009-08-14 at 10:26 +0100, Emmanuele Bassi wrote: > On Thu, 2009-08-13 at 09:38 +0100, Karl Lattimer wrote: > > Hi all, > > > > I'm having some trouble with captured-event, from the documentation > > > > "gboolean user_function (ClutterActor *actor, ClutterEvent *event, > > gpointer user_data) : Run Last" > > > > "actor : the actor which received the signal" > > this should be "the actor that emitted the signal"; copy and paste on > docs should be disabled by default. :-/
Heh, it's always the way :) > > > Now I've taken this to mean that 'actor' is the actor which originally > > received the event, for instance, a button inside of a container. > > However it appears to be the actor the event has been captured by. > > yes, for obvious reasons we cannot emit signals on actors that did not > receive the event. Ah, I was thinking there was some jiggery pokery going on so you knew where the event would have been emitted. This of course makes obvious sense now :) > > > This leaves no way to determine what has received the event within the > > captured event call back. > > clutter_event_get_source(). Great, I missed that, thanks :) Although just to clarify, this will return where the event would have ended up right? Like a button in a container say, where I've captured the event on the container instead of letting it drop through to the button. /me goes away to play with it anyway > > > Is this the correct behaviour, or am I correct in assuming that I should > > be receiving the actor for which the event would have been received by > > if it weren't for capturing it. > > the ::captured-event signal works exactly like the ::event signal, which > has the same semantics used by gtk+, only it works from the top-most > container to the actor. > > the event is propagated, in case of the ::event signal, from the > reactive actor that received the event from the windowing system (as > determined by the pick) to its parents until it reaches the stage; > the ::captured-event signal is emitted before the ::event signal and is > emitted on the stage that contains the actor and down through the > actor's parents until it reaches the actor itself. Thanks again for clearing this up. BR, K -- To unsubscribe send a mail to [email protected]
