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. :-/

> 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.

> This leaves no way to determine what has received the event within the
> captured event call back.

clutter_event_get_source().

> 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.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi, Senior Engineer        | emmanuele.ba...@intel.com
Intel Open Source Technology Center     | http://oss.intel.com

-- 
To unsubscribe send a mail to clutter+unsubscr...@o-hand.com

Reply via email to