1
0
Fork 0
Commit graph

5 commits

Author SHA1 Message Date
Emmanuele Bassi
74a9b71060 effect: Rename RunFlags to PaintFlags
Since run() was replaced and both paint() and pick() use the
enumeration.

https://bugzilla.gnome.org/show_bug.cgi?id=651700
2011-06-13 16:00:45 +01:00
Tomeu Vizoso
0ede622f51 Give a chance to effects for running when picking
Some effects can change the actor's shape and position, so they need
to run when picking.

https://bugzilla.gnome.org/show_bug.cgi?id=651700
2011-06-13 15:45:36 +01:00
Tomeu Vizoso
700c543850 Rename ClutterEffect::run to ClutterEffect::paint
In preparation for adding ClutterEffect::pick

https://bugzilla.gnome.org/show_bug.cgi?id=651700
2011-06-13 15:44:58 +01:00
Neil Roberts
c3aa4d24bf clutter-effect: Add a 'run' virtual
This adds a new virtual to ClutterEffect which is intended to be a
more flexible replacement for the pre and post_paint functions. The
implementation of a run virtual would look something like this:

void
effect_run (ClutterEffect *effect,
            ClutterEffectRunFlags flags)
{
  /* Set up state */
  /* ... */

  /* Chain to the next item in the paint sequence */
  clutter_actor_continue_paint (priv->actor);

  /* Clean up state */
  /* ... */
}

ClutterActor now just calls this virtual instead of the pre_paint and
post_paint functions. It keeps track of the next effect in the list so
that it knows what to do when clutter_actor_continue_paint is
called. clutter_actor_continue_paint is a new function added just for
implementing effects.

The default implementation of the run virtual just calls pre_paint and
post_paint so that existing effects will continue to work.

An effect is allowed to conditionally skip calling
clutter_actor_continue_paint(). This is useful to implement effects
that cache the image of an actor. The flags parameter can be used to
determine if the actor is dirty since the last paint. ClutterActor
sets this flag whenever propagated_one_redraw is TRUE which means that
a redraw for this actor or one of its children was queued.
2011-05-13 01:46:31 +01:00
Emmanuele Bassi
d27b335b61 Move ClutterEffect private symbols to a private header
No point in cluttering up clutter-private.h even more than necessary.
2011-02-18 16:00:39 +00:00