[clutter] stage: Move the deprecated macros to a separate header
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] stage: Move the deprecated macros to a separate header
- Date: Thu, 3 Nov 2011 16:16:14 +0000 (UTC)
commit 98b467f9b86555bb30e1d3855dce81f06bb42d89
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Thu Nov 3 15:13:54 2011 +0000
stage: Move the deprecated macros to a separate header
The clutter-stage.h header still has a bunch of macros that have, for
reasons unknown[*], survived the 1.0 API cut and have long since been
deprecated. Let's hide them under the deprecated/ carpet and let us
never speak of them ever again.
[*] pretty sure alcohol or other psychotropic substances were involved
but I take the 5th on that.
clutter/Makefile.am | 1 +
clutter/clutter-deprecated.h | 1 +
clutter/clutter-stage.h | 39 -------------------------------
clutter/deprecated/clutter-stage.h | 45 ++++++++++++++++++++++++++++++++++++
4 files changed, 47 insertions(+), 39 deletions(-)
---
diff --git a/clutter/Makefile.am b/clutter/Makefile.am
index 352127a..9c58500 100644
--- a/clutter/Makefile.am
+++ b/clutter/Makefile.am
@@ -247,6 +247,7 @@ deprecated_h = \
$(srcdir)/deprecated/clutter-timeout-pool.h \
$(srcdir)/deprecated/clutter-score.h \
$(srcdir)/deprecated/clutter-shader.h \
+ $(srcdir)/deprecated/clutter-stage.h \
$(NULL)
# deprecated source code
diff --git a/clutter/clutter-deprecated.h b/clutter/clutter-deprecated.h
index 8d823dc..7b4da4c 100644
--- a/clutter/clutter-deprecated.h
+++ b/clutter/clutter-deprecated.h
@@ -19,6 +19,7 @@
#include "deprecated/clutter-main.h"
#include "deprecated/clutter-score.h"
#include "deprecated/clutter-shader.h"
+#include "deprecated/clutter-stage.h"
#include "deprecated/clutter-timeout-pool.h"
#undef __CLUTTER_DEPRECATED_H_INSIDE__
diff --git a/clutter/clutter-stage.h b/clutter/clutter-stage.h
index 029dbce..4606d52 100644
--- a/clutter/clutter-stage.h
+++ b/clutter/clutter-stage.h
@@ -46,32 +46,6 @@ G_BEGIN_DECLS
#define CLUTTER_IS_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_STAGE))
#define CLUTTER_STAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_STAGE, ClutterStageClass))
-#ifndef CLUTTER_DISABLE_DEPRECATED
-
-/**
- * CLUTTER_STAGE_WIDTH:
- *
- * Macro that evaluates to the width of the default stage
- *
- * Since: 0.2
- *
- * Deprecated: 1.2: Use clutter_actor_get_width() instead
- */
-#define CLUTTER_STAGE_WIDTH() (clutter_actor_get_width (clutter_stage_get_default ()))
-
-/**
- * CLUTTER_STAGE_HEIGHT:
- *
- * Macro that evaluates to the height of the default stage
- *
- * Since: 0.2
- *
- * Deprecated: 1.2: use clutter_actor_get_height() instead
- */
-#define CLUTTER_STAGE_HEIGHT() (clutter_actor_get_height (clutter_stage_get_default ()))
-
-#endif /* !CLUTTER_DISABLE_DEPRECATED */
-
typedef struct _ClutterPerspective ClutterPerspective;
typedef struct _ClutterFog ClutterFog;
@@ -255,19 +229,6 @@ void clutter_stage_set_motion_events_enabled (ClutterStage *sta
gboolean enabled);
gboolean clutter_stage_get_motion_events_enabled (ClutterStage *stage);
-#ifndef CLUTTER_DISABLE_DEPRECATED
-
-/* Commodity macro, for mallum only */
-#define clutter_stage_add(stage,actor) G_STMT_START { \
- if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \
- { \
- ClutterContainer *_container = (ClutterContainer *) (stage); \
- ClutterActor *_actor = (ClutterActor *) (actor); \
- clutter_container_add_actor (_container, _actor); \
- } } G_STMT_END
-
-#endif /* CLUTTER_DISABLE_DEPRECATED */
-
G_END_DECLS
#endif /* __CLUTTER_STAGE_H__ */
diff --git a/clutter/deprecated/clutter-stage.h b/clutter/deprecated/clutter-stage.h
new file mode 100644
index 0000000..98d16da
--- /dev/null
+++ b/clutter/deprecated/clutter-stage.h
@@ -0,0 +1,45 @@
+#ifndef __CLUTTER_STAGE_DEPRECATED_H__
+#define __CLUTTER_STAGE_DEPRECATED_H__
+
+#include <clutter/clutter-types.h>
+
+G_BEGIN_DECLS
+
+#ifndef CLUTTER_DISABLE_DEPRECATED
+
+/**
+ * CLUTTER_STAGE_WIDTH:
+ *
+ * Macro that evaluates to the width of the default stage
+ *
+ * Since: 0.2
+ *
+ * Deprecated: 1.2: Use clutter_actor_get_width() instead
+ */
+#define CLUTTER_STAGE_WIDTH() (clutter_actor_get_width (clutter_stage_get_default ()))
+
+/**
+ * CLUTTER_STAGE_HEIGHT:
+ *
+ * Macro that evaluates to the height of the default stage
+ *
+ * Since: 0.2
+ *
+ * Deprecated: 1.2: use clutter_actor_get_height() instead
+ */
+#define CLUTTER_STAGE_HEIGHT() (clutter_actor_get_height (clutter_stage_get_default ()))
+
+/* Commodity macro, for mallum only */
+#define clutter_stage_add(stage,actor) G_STMT_START { \
+ if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \
+ { \
+ ClutterContainer *_container = (ClutterContainer *) (stage); \
+ ClutterActor *_actor = (ClutterActor *) (actor); \
+ clutter_container_add_actor (_container, _actor); \
+ } } G_STMT_END
+
+#endif /* CLUTTER_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* __CLUTTER_STAGE_DEPRECATED_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]