From: Emmanuele Bassi Date: Tue, 6 Dec 2011 17:49:27 +0000 (+0000) Subject: Deprecate ClutterRectangle X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d268fe5ca5c0d97a64dc5a47cf29f549010c556;p=profile%2Fivi%2Fclutter.git Deprecate ClutterRectangle A ClutterActor with a background color set covers 99% of the use cases for a Rectangle. --- diff --git a/clutter/Makefile.am b/clutter/Makefile.am index ecaf823..872f0b9 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -99,7 +99,6 @@ source_h = \ $(srcdir)/clutter-page-turn-effect.h \ $(srcdir)/clutter-path-constraint.h \ $(srcdir)/clutter-path.h \ - $(srcdir)/clutter-rectangle.h \ $(srcdir)/clutter-script.h \ $(srcdir)/clutter-scriptable.h \ $(srcdir)/clutter-settings.h \ @@ -171,7 +170,6 @@ source_c = \ $(srcdir)/clutter-page-turn-effect.c \ $(srcdir)/clutter-path-constraint.c \ $(srcdir)/clutter-path.c \ - $(srcdir)/clutter-rectangle.c \ $(srcdir)/clutter-script.c \ $(srcdir)/clutter-script-parser.c \ $(srcdir)/clutter-scriptable.c \ @@ -242,10 +240,11 @@ deprecated_h = \ $(srcdir)/deprecated/clutter-group.h \ $(srcdir)/deprecated/clutter-keysyms.h \ $(srcdir)/deprecated/clutter-main.h \ - $(srcdir)/deprecated/clutter-timeout-pool.h \ + $(srcdir)/deprecated/clutter-rectangle.h \ $(srcdir)/deprecated/clutter-score.h \ $(srcdir)/deprecated/clutter-shader.h \ $(srcdir)/deprecated/clutter-stage.h \ + $(srcdir)/deprecated/clutter-timeout-pool.h \ $(NULL) # deprecated source code @@ -261,9 +260,10 @@ deprecated_c = \ $(srcdir)/deprecated/clutter-fixed.c \ $(srcdir)/deprecated/clutter-frame-source.c \ $(srcdir)/deprecated/clutter-group.c \ - $(srcdir)/deprecated/clutter-timeout-pool.c \ + $(srcdir)/deprecated/clutter-rectangle.c \ $(srcdir)/deprecated/clutter-score.c \ $(srcdir)/deprecated/clutter-shader.c \ + $(srcdir)/deprecated/clutter-timeout-pool.c \ $(NULL) # deprecated private headers; these should not be installed diff --git a/clutter/clutter-deprecated.h b/clutter/clutter-deprecated.h index 92f8713..5c37bf2 100644 --- a/clutter/clutter-deprecated.h +++ b/clutter/clutter-deprecated.h @@ -18,6 +18,7 @@ #include "deprecated/clutter-group.h" #include "deprecated/clutter-keysyms.h" #include "deprecated/clutter-main.h" +#include "deprecated/clutter-rectangle.h" #include "deprecated/clutter-score.h" #include "deprecated/clutter-shader.h" #include "deprecated/clutter-stage.h" diff --git a/clutter/clutter.h b/clutter/clutter.h index c39a872..47b5a34 100644 --- a/clutter/clutter.h +++ b/clutter/clutter.h @@ -80,7 +80,6 @@ #include "clutter-page-turn-effect.h" #include "clutter-path-constraint.h" #include "clutter-path.h" -#include "clutter-rectangle.h" #include "clutter-scriptable.h" #include "clutter-script.h" #include "clutter-settings.h" diff --git a/clutter/clutter-rectangle.c b/clutter/deprecated/clutter-rectangle.c similarity index 99% rename from clutter/clutter-rectangle.c rename to clutter/deprecated/clutter-rectangle.c index 3a96e04..03e8ac8 100644 --- a/clutter/clutter-rectangle.c +++ b/clutter/deprecated/clutter-rectangle.c @@ -28,17 +28,22 @@ * @short_description: An actor that displays a simple rectangle. * * #ClutterRectangle is a #ClutterActor which draws a simple filled rectangle. + * + * Deprecated: 1.10: Use #ClutterActor instead. */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif +#define CLUTTER_DISABLE_DEPRECATION_WARNINGS +#include "clutter-rectangle.h" + #include "clutter-actor-private.h" #include "clutter-color.h" #include "clutter-debug.h" #include "clutter-main.h" #include "clutter-private.h" -#include "clutter-rectangle.h" #include "cogl/cogl.h" diff --git a/clutter/clutter-rectangle.h b/clutter/deprecated/clutter-rectangle.h similarity index 92% rename from clutter/clutter-rectangle.h rename to clutter/deprecated/clutter-rectangle.h index 488880e..f22121d 100644 --- a/clutter/clutter-rectangle.h +++ b/clutter/deprecated/clutter-rectangle.h @@ -82,18 +82,32 @@ struct _ClutterRectangleClass GType clutter_rectangle_get_type (void) G_GNUC_CONST; +CLUTTER_DEPRECATED_FOR(clutter_actor_new) ClutterActor *clutter_rectangle_new (void); + +CLUTTER_DEPRECATED_FOR(clutter_actor_new) ClutterActor *clutter_rectangle_new_with_color (const ClutterColor *color); +CLUTTER_DEPRECATED_FOR(clutter_actor_get_background_color) void clutter_rectangle_get_color (ClutterRectangle *rectangle, ClutterColor *color); + +CLUTTER_DEPRECATED_FOR(clutter_actor_set_background_color) void clutter_rectangle_set_color (ClutterRectangle *rectangle, const ClutterColor *color); + +CLUTTER_DEPRECATED guint clutter_rectangle_get_border_width (ClutterRectangle *rectangle); + +CLUTTER_DEPRECATED void clutter_rectangle_set_border_width (ClutterRectangle *rectangle, guint width); + +CLUTTER_DEPRECATED void clutter_rectangle_get_border_color (ClutterRectangle *rectangle, ClutterColor *color); + +CLUTTER_DEPRECATED void clutter_rectangle_set_border_color (ClutterRectangle *rectangle, const ClutterColor *color);