Add checks on the reactive accessors

Check for the parameter in the various "reactive" flag accessors.
This commit is contained in:
Emmanuele Bassi 2007-08-15 19:50:31 +00:00
parent d5a0da0ebd
commit d7dc1d7c97
2 changed files with 12 additions and 6 deletions

View File

@ -510,10 +510,10 @@ clutter_actor_transform_vertices (ClutterActor * self,
* the actor; the returned vertices relate to the ClutterActoBox * the actor; the returned vertices relate to the ClutterActoBox
* coordinances as follows: * coordinances as follows:
* *
* v[0] contains (x1, y1) * v[0] contains (x1, y1)
* v[1] contains (x2, y1) * v[1] contains (x2, y1)
* v[2] contains (x1, y2) * v[2] contains (x1, y2)
* v[3] contains (x2, y2) * v[3] contains (x2, y2)
* *
* Since: 0.4 * Since: 0.4
**/ **/
@ -2820,7 +2820,7 @@ clutter_actor_lower_bottom (ClutterActor *self)
* *
* Return value: the return value from the signal emission * Return value: the return value from the signal emission
* *
* Since: 0.4 * Since: 0.6
*/ */
gboolean gboolean
clutter_actor_event (ClutterActor *actor, clutter_actor_event (ClutterActor *actor,
@ -2888,18 +2888,24 @@ clutter_actor_event (ClutterActor *actor,
void void
clutter_actor_set_reactive (ClutterActor *actor) clutter_actor_set_reactive (ClutterActor *actor)
{ {
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REACTIVE); CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REACTIVE);
} }
void void
clutter_actor_unset_reactive (ClutterActor *actor) clutter_actor_unset_reactive (ClutterActor *actor)
{ {
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REACTIVE); CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REACTIVE);
} }
gboolean gboolean
clutter_actor_is_reactive (ClutterActor *actor) clutter_actor_is_reactive (ClutterActor *actor)
{ {
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), FALSE);
return CLUTTER_ACTOR_IS_REACTIVE(actor); return CLUTTER_ACTOR_IS_REACTIVE(actor);
} }

View File

@ -244,7 +244,7 @@ clutter_do_event (ClutterEvent *event)
do do
{ {
clutter_actor_event (actor, event); clutter_actor_event (actor, event);
actor = clutter_actor_get_parent(actor); actor = clutter_actor_get_parent (actor);
} }
while (actor != NULL); while (actor != NULL);
} }