2007-01-16 Matthew Allum <mallum@openedhand.com>
* NEWS: Minor tweaks * TODO: Sync up, mainly with 0.3 todo items * clutter/clutter-behaviour.c: * clutter/clutter-behaviour.h: clutter_behaviour_get_n_actors() / clutter_behaviour_get_nth_actor() Additions. * clutter/clutter-stage.c: (clutter_stage_realize): Experimental (disabled) visual setting code. * clutter/clutter-feature.c: Check for GL_EXT_texture_rectangle (#198 - Frederick Riss) * clutter/clutter-group.c: (clutter_group_allocate_coords): Fix for group size allocation (#199 - Frederick Riss) * clutter/clutter-texture.c: (texture_upload_data): Fix texture unpacking row length (#197 Frederick Riss) * examples/Makefile.am: Fix LDADD in build (#196 - Frederick Riss)
This commit is contained in:
@ -244,6 +244,45 @@ clutter_behaviour_remove (ClutterBehaviour *behave,
|
||||
behave->priv->actors = g_slist_remove (behave->priv->actors, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_behaviour_get_n_actors:
|
||||
* @behave: a #ClutterBehaviour
|
||||
*
|
||||
* Gets the number of actors this behaviour is applied too.
|
||||
*
|
||||
* Return value: The number of applied actors
|
||||
*
|
||||
* Since: 0.2
|
||||
*/
|
||||
gint
|
||||
clutter_behaviour_get_n_actors (ClutterBehaviour *behave)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR (behave), 0);
|
||||
|
||||
return g_list_length (behave->priv->actors);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_behaviour_get_nth_actor:
|
||||
* @behave: a #ClutterBehaviour
|
||||
* @num: the index of an actor this behaviour is applied too.
|
||||
*
|
||||
* Gets an actor the behaviour was applied to referenced by index num.
|
||||
*
|
||||
* Return value: A Clutter actor or NULL if index is invalid.
|
||||
*
|
||||
* Since: 0.2
|
||||
*/
|
||||
ClutterActor*
|
||||
clutter_behaviour_get_nth_actor (ClutterBehaviour *behave,
|
||||
gint num)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR (behave), NULL);
|
||||
|
||||
return g_list_nth_data (behave->priv->actors, num);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* clutter_behaviour_actors_foreach:
|
||||
* @behave: a #ClutterBehaviour
|
||||
|
Reference in New Issue
Block a user