[clutter] Rename ClutterEffect::run to ClutterEffect::paint
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] Rename ClutterEffect::run to ClutterEffect::paint
- Date: Mon, 13 Jun 2011 22:46:38 +0000 (UTC)
commit 700c543850caf51c4041afd5c1d53940c2d15c5c
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date: Mon Jun 6 08:44:11 2011 +0200
Rename ClutterEffect::run to ClutterEffect::paint
In preparation for adding ClutterEffect::pick
https://bugzilla.gnome.org/show_bug.cgi?id=651700
clutter/clutter-actor.c | 2 +-
clutter/clutter-effect-private.h | 2 +-
clutter/clutter-effect.c | 40 ++++++++++++++++++------------------
clutter/clutter-effect.h | 4 +-
clutter/clutter-offscreen-effect.c | 10 ++++----
5 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 9daf82c..7835648 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -3009,7 +3009,7 @@ clutter_actor_continue_paint (ClutterActor *self)
run_flags |= CLUTTER_EFFECT_RUN_ACTOR_DIRTY;
}
- _clutter_effect_run (priv->current_effect, run_flags);
+ _clutter_effect_paint (priv->current_effect, run_flags);
priv->current_effect = old_current_effect;
}
diff --git a/clutter/clutter-effect-private.h b/clutter/clutter-effect-private.h
index 94a69ff..f53bfb5 100644
--- a/clutter/clutter-effect-private.h
+++ b/clutter/clutter-effect-private.h
@@ -9,7 +9,7 @@ gboolean _clutter_effect_pre_paint (ClutterEffect *eff
void _clutter_effect_post_paint (ClutterEffect *effect);
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
ClutterPaintVolume *volume);
-void _clutter_effect_run (ClutterEffect *effect,
+void _clutter_effect_paint (ClutterEffect *effect,
ClutterEffectRunFlags flags);
G_END_DECLS
diff --git a/clutter/clutter-effect.c b/clutter/clutter-effect.c
index 66acb59..fea555b 100644
--- a/clutter/clutter-effect.c
+++ b/clutter/clutter-effect.c
@@ -40,17 +40,17 @@
* <title>Implementing a ClutterEffect</title>
* <para>
* Creating a sub-class of #ClutterEffect requires overriding the
- * â??runâ?? method. The implementation of the function should look
+ * â??paintâ?? method. The implementation of the function should look
* something like this:
* </para>
* <programlisting>
- * void effect_run (ClutterEffect *effect, ClutterEffectRunFlags flags)
+ * void effect_paint (ClutterEffect *effect, ClutterEffectRunFlags flags)
* {
* /* Set up initialisation of the paint such as binding a
* CoglOffscreen or other operations */
*
* /* Chain to the next item in the paint sequence. This will either call
- * â??runâ?? on the next effect or just paint the actor if this is
+ * â??paintâ?? on the next effect or just paint the actor if this is
* the last effect. */
* ClutterActor *actor =
* clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (effect));
@@ -73,7 +73,7 @@
* cached image is still valid.
* </para>
* <para>
- * The â??runâ?? virtual was added in Clutter 1.8. Prior to that there
+ * The â??paintâ?? virtual was added in Clutter 1.8. Prior to that there
* were two separate functions as follows.
* </para>
* <itemizedlist>
@@ -90,10 +90,10 @@
* #ClutterActor's paint sequence.</para>
* <para>
* With these two functions it is not possible to skip the rest of
- * the paint sequence. The default implementation of the â??runâ??
+ * the paint sequence. The default implementation of the â??paintâ??
* virtual calls pre_paint(), clutter_actor_continue_paint() and
* then post_paint() so that existing actors that aren't using the
- * run virtual will continue to work. New actors using the run
+ * paint virtual will continue to work. New actors using the paint
* virtual do not need to implement pre or post paint.
* </para>
* <example id="ClutterEffect-example">
@@ -102,7 +102,7 @@
* painted "behind" the actor, while another will be painted "on
* top" of the actor. The <function>set_actor()</function>
* implementation will create the two materials used for the two
- * different rectangles; the <function>run()</function> function
+ * different rectangles; the <function>paint()</function> function
* will paint the first material using cogl_rectangle(), before
* continuing and then it will paint paint the second material
* after.</para>
@@ -156,7 +156,7 @@
* }
*
* static gboolean
- * my_effect_run (ClutterEffect *effect)
+ * my_effect_paint (ClutterEffect *effect)
* {
* MyEffect *self = MY_EFFECT (effect);
* gfloat width, height;
@@ -182,7 +182,7 @@
*
* meta_class->set_actor = my_effect_set_actor;
*
- * klass->run = my_effect_run;
+ * klass->paint = my_effect_paint;
* }
* </programlisting>
* </example>
@@ -228,15 +228,15 @@ clutter_effect_real_get_paint_volume (ClutterEffect *effect,
}
static void
-clutter_effect_real_run (ClutterEffect *effect,
- ClutterEffectRunFlags flags)
+clutter_effect_real_paint (ClutterEffect *effect,
+ ClutterEffectRunFlags flags)
{
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
ClutterActor *actor;
gboolean pre_paint_succeeded;
/* The default implementation provides a compatibility wrapper for
- effects that haven't migrated to use the 'run' virtual yet. This
+ effects that haven't migrated to use the 'paint' virtual yet. This
just calls the old pre and post virtuals before chaining on */
pre_paint_succeeded = _clutter_effect_pre_paint (effect);
@@ -275,7 +275,7 @@ clutter_effect_class_init (ClutterEffectClass *klass)
klass->pre_paint = clutter_effect_real_pre_paint;
klass->post_paint = clutter_effect_real_post_paint;
klass->get_paint_volume = clutter_effect_real_get_paint_volume;
- klass->run = clutter_effect_real_run;
+ klass->paint = clutter_effect_real_paint;
}
static void
@@ -300,12 +300,12 @@ _clutter_effect_post_paint (ClutterEffect *effect)
}
void
-_clutter_effect_run (ClutterEffect *effect,
- ClutterEffectRunFlags flags)
+_clutter_effect_paint (ClutterEffect *effect,
+ ClutterEffectRunFlags flags)
{
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
- CLUTTER_EFFECT_GET_CLASS (effect)->run (effect, flags);
+ CLUTTER_EFFECT_GET_CLASS (effect)->paint (effect, flags);
}
gboolean
@@ -319,10 +319,10 @@ _clutter_effect_get_paint_volume (ClutterEffect *effect,
}
/**
- * clutter_effect_queue_rerun:
+ * clutter_effect_queue_repaint:
* @effect: A #ClutterEffect which needs redrawing
*
- * Queues a rerun of the effect. The effect can detect when the â??runâ??
+ * Queues a repaint of the effect. The effect can detect when the â??paintâ??
* method is called as a result of this function because it will not
* have the %CLUTTER_EFFECT_RUN_ACTOR_DIRTY flag set. In that case the
* effect is free to assume that the actor has not changed its
@@ -339,7 +339,7 @@ _clutter_effect_get_paint_volume (ClutterEffect *effect,
* red tint to an actor by redirecting it through a CoglOffscreen
* might have a property to specify the level of tint. When this value
* changes, the underlying actor doesn't need to be redrawn so the
- * effect can call clutter_effect_queue_rerun() to make sure the
+ * effect can call clutter_effect_queue_repaint() to make sure the
* effect is repainted.
*
* Note however that modifying the position of the parent of an actor
@@ -361,7 +361,7 @@ _clutter_effect_get_paint_volume (ClutterEffect *effect,
* Since: 1.8
*/
void
-clutter_effect_queue_rerun (ClutterEffect *effect)
+clutter_effect_queue_repaint (ClutterEffect *effect)
{
ClutterActor *actor;
diff --git a/clutter/clutter-effect.h b/clutter/clutter-effect.h
index f389830..cb50abd 100644
--- a/clutter/clutter-effect.h
+++ b/clutter/clutter-effect.h
@@ -75,7 +75,7 @@ struct _ClutterEffect
* @pre_paint: virtual function
* @post_paint: virtual function
* @get_paint_volume: virtual function
- * @run: virtual function
+ * @paint: virtual function
*
* The #ClutterEffectClass structure contains only private data
*
@@ -93,7 +93,7 @@ struct _ClutterEffectClass
gboolean (* get_paint_volume) (ClutterEffect *effect,
ClutterPaintVolume *volume);
- void (* run) (ClutterEffect *effect,
+ void (* paint) (ClutterEffect *effect,
ClutterEffectRunFlags flags);
/*< private >*/
diff --git a/clutter/clutter-offscreen-effect.c b/clutter/clutter-offscreen-effect.c
index 3d801f8..ad6670b 100644
--- a/clutter/clutter-offscreen-effect.c
+++ b/clutter/clutter-offscreen-effect.c
@@ -407,8 +407,8 @@ clutter_offscreen_effect_post_paint (ClutterEffect *effect)
}
static void
-clutter_offscreen_effect_run (ClutterEffect *effect,
- ClutterEffectRunFlags flags)
+clutter_offscreen_effect_paint (ClutterEffect *effect,
+ ClutterEffectRunFlags flags)
{
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
ClutterOffscreenEffectPrivate *priv = self->priv;
@@ -423,10 +423,10 @@ clutter_offscreen_effect_run (ClutterEffect *effect,
(flags & CLUTTER_EFFECT_RUN_ACTOR_DIRTY) ||
!cogl_matrix_equal (&matrix, &priv->last_matrix_drawn))
{
- /* Chain up to the parent run method which will call the pre and
+ /* Chain up to the parent paint method which will call the pre and
post paint functions to update the image */
CLUTTER_EFFECT_CLASS (clutter_offscreen_effect_parent_class)->
- run (effect, flags);
+ paint (effect, flags);
}
else
clutter_offscreen_effect_paint_texture (self);
@@ -463,7 +463,7 @@ clutter_offscreen_effect_class_init (ClutterOffscreenEffectClass *klass)
effect_class->pre_paint = clutter_offscreen_effect_pre_paint;
effect_class->post_paint = clutter_offscreen_effect_post_paint;
- effect_class->run = clutter_offscreen_effect_run;
+ effect_class->paint = clutter_offscreen_effect_paint;
gobject_class->finalize = clutter_offscreen_effect_finalize;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]