Class: Clutter::Behaviour

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

Base class for behaviours.

Instance Method Summary collapse

Instance Method Details

#actorsGLib::SList<Clutter::Actor>

Retrieves all the actors to which behave applies. It is not recommended for derived classes to use this in there alpha notify method but use #clutter_behaviour_actors_foreach as it avoids alot of needless allocations.

Returns:

  • (GLib::SList<Clutter::Actor>)

    a list of actors. You should free the returned list with g_slist_free() when finished using it.

#actors_foreach(func, data) ⇒ nil

Calls func for every actor driven by behave.

Parameters:

  • func (Clutter::BehaviourForeachFunc)

    a function called for each actor

  • data (GObject)

    optional data to be passed to the function, or nil

Returns:

  • (nil)

#alphaClutter::Alpha

The Clutter::Alpha object used to drive this behaviour. A #ClutterAlpha object binds a Clutter::Timeline and a function which computes a value (the "alpha") depending on the time. Each time the alpha value changes the alpha-notify virtual function is called.

Returns:

#alpha=(alpha) ⇒ Clutter::Alpha

The Clutter::Alpha object used to drive this behaviour. A #ClutterAlpha object binds a Clutter::Timeline and a function which computes a value (the "alpha") depending on the time. Each time the alpha value changes the alpha-notify virtual function is called.

Parameters:

Returns:

#apply(actor) ⇒ nil

Applies behave to actor. This function adds a reference on the actor.

Parameters:

Returns:

  • (nil)

#get_nth_actor(index_) ⇒ Clutter::Actor

Gets an actor the behaviour was applied to referenced by index num.

Parameters:

  • index_ (Integer)

    the index of an actor this behaviour is applied too.

Returns:

#is_applied(actor) ⇒ Boolean

Check if behave applied to actor.

Parameters:

Returns:

  • (Boolean)

    TRUE if actor has behaviour. FALSE otherwise.

#n_actorsInteger

Gets the number of actors this behaviour is applied too.

Returns:

  • (Integer)

    The number of applied actors

#remove(actor) ⇒ nil

Removes actor from the list of Clutter::Actors to which behave applies. This function removes a reference on the actor.

Parameters:

Returns:

  • (nil)

#remove_allnil

Removes every actor from the list that behave holds.

Returns:

  • (nil)