From b19c919645dfb90461698d38d128f47543336dad Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 2 Nov 2011 12:47:46 +0000 Subject: [PATCH] actor: Move deprecated symbols into separate headers The clutter-actor.h header is already pretty big, so let's try to keep the deprecated symbols out of it. --- clutter/Makefile.am | 1 + clutter/clutter-actor.h | 34 ------------------- clutter/clutter-deprecated.h | 1 + clutter/deprecated/clutter-actor-deprecated.h | 17 ++++++++++ clutter/deprecated/clutter-shader.h | 24 +++++++++++++ 5 files changed, 43 insertions(+), 34 deletions(-) create mode 100644 clutter/deprecated/clutter-actor-deprecated.h diff --git a/clutter/Makefile.am b/clutter/Makefile.am index b6605b18f..b89349b7b 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -233,6 +233,7 @@ source_c_priv = \ # deprecated installed headers deprecated_h = \ + $(srcdir)/deprecated/clutter-actor-deprecated.h \ $(srcdir)/deprecated/clutter-backend-deprecated.h \ $(srcdir)/deprecated/clutter-behaviour.h \ $(srcdir)/deprecated/clutter-behaviour-depth.h \ diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h index 380d92b69..41ea9ab36 100644 --- a/clutter/clutter-actor.h +++ b/clutter/clutter-actor.h @@ -397,11 +397,6 @@ void clutter_actor_set_name (ClutterActor const gchar *name); const gchar * clutter_actor_get_name (ClutterActor *self); -#ifndef CLUTTER_DISABLE_DEPRECATED -CLUTTER_DEPRECATED -guint32 clutter_actor_get_gid (ClutterActor *self); -#endif - void clutter_actor_set_clip (ClutterActor *self, gfloat xoff, gfloat yoff, @@ -470,35 +465,6 @@ gboolean clutter_actor_event (ClutterActor ClutterEvent *event, gboolean capture); -#ifndef CLUTTER_DISABLE_DEPRECATED -CLUTTER_DEPRECATED -ClutterActor * clutter_get_actor_by_gid (guint32 id_); -#endif - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) -CLUTTER_DEPRECATED_FOR(clutter_actor_add_effect) -gboolean clutter_actor_set_shader (ClutterActor *self, - ClutterShader *shader); - -CLUTTER_DEPRECATED_FOR(clutter_actor_get_effect) -ClutterShader * clutter_actor_get_shader (ClutterActor *self); - -CLUTTER_DEPRECATED_FOR(clutter_shader_effect_set_uniform_value) -void clutter_actor_set_shader_param (ClutterActor *self, - const gchar *param, - const GValue *value); - -CLUTTER_DEPRECATED_FOR(clutter_shader_effect_set_uniform) -void clutter_actor_set_shader_param_int (ClutterActor *self, - const gchar *param, - gint value); - -CLUTTER_DEPRECATED_FOR(clutter_shader_effect_set_uniform) -void clutter_actor_set_shader_param_float (ClutterActor *self, - const gchar *param, - gfloat value); -#endif /* CLUTTER_DISABLE_DEPRECATED */ - void clutter_actor_set_anchor_point (ClutterActor *self, gfloat anchor_x, gfloat anchor_y); diff --git a/clutter/clutter-deprecated.h b/clutter/clutter-deprecated.h index 686e89ed7..b268951e2 100644 --- a/clutter/clutter-deprecated.h +++ b/clutter/clutter-deprecated.h @@ -3,6 +3,7 @@ #define __CLUTTER_DEPRECATED_H_INSIDE__ +#include "deprecated/clutter-actor-deprecated.h" #include "deprecated/clutter-backend-deprecated.h" #include "deprecated/clutter-behaviour.h" #include "deprecated/clutter-behaviour-depth.h" diff --git a/clutter/deprecated/clutter-actor-deprecated.h b/clutter/deprecated/clutter-actor-deprecated.h new file mode 100644 index 000000000..1c8720555 --- /dev/null +++ b/clutter/deprecated/clutter-actor-deprecated.h @@ -0,0 +1,17 @@ +#ifndef __CLUTTER_ACTOR_DEPRECATED_H__ +#define __CLUTTER_ACTOR_DEPRECATED_H__ + +#include + +G_BEGIN_DECLS + +CLUTTER_DEPRECATED +guint32 clutter_actor_get_gid (ClutterActor *self); + +CLUTTER_DEPRECATED +ClutterActor * clutter_get_actor_by_gid (guint32 id_); + + +G_END_DECLS + +#endif /* __CLUTTER_ACTOR_DEPRECATED_H__ */ diff --git a/clutter/deprecated/clutter-shader.h b/clutter/deprecated/clutter-shader.h index ae24caf16..37c8e6422 100644 --- a/clutter/deprecated/clutter-shader.h +++ b/clutter/deprecated/clutter-shader.h @@ -150,6 +150,30 @@ CoglHandle clutter_shader_get_cogl_fragment_shader (ClutterShader CLUTTER_DEPRECATED_FOR(ClutterShaderEffect) CoglHandle clutter_shader_get_cogl_vertex_shader (ClutterShader *shader); +/* ClutterActor methods */ + +CLUTTER_DEPRECATED_FOR(clutter_actor_add_effect) +gboolean clutter_actor_set_shader (ClutterActor *self, + ClutterShader *shader); + +CLUTTER_DEPRECATED_FOR(clutter_actor_get_effect) +ClutterShader * clutter_actor_get_shader (ClutterActor *self); + +CLUTTER_DEPRECATED_FOR(clutter_shader_effect_set_uniform_value) +void clutter_actor_set_shader_param (ClutterActor *self, + const gchar *param, + const GValue *value); + +CLUTTER_DEPRECATED_FOR(clutter_shader_effect_set_uniform) +void clutter_actor_set_shader_param_int (ClutterActor *self, + const gchar *param, + gint value); + +CLUTTER_DEPRECATED_FOR(clutter_shader_effect_set_uniform) +void clutter_actor_set_shader_param_float (ClutterActor *self, + const gchar *param, + gfloat value); + G_END_DECLS #endif /* __CLUTTER_SHADER_H__ */