[clutter] Minor header surgery to ClutterBehaviour



commit e2682012219c5af174489baa4759ac2b6e021dee
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Tue Oct 4 11:52:47 2011 +0100

    Minor header surgery to ClutterBehaviour
    
    This moves a couple of definitions to the common types header, and makes
    sure that ClutterBehaviour subclasses include clutter-behaviour.h first,
    so that their types can be fully expanded without necessarily have the
    ClutterBehaviour header header included by their public headers. This is
    the necessary prelude to have clutter-behaviour.[ch] moved to the
    deprecated section.

 clutter/clutter-behaviour.h                    |    3 ---
 clutter/clutter-path.h                         |    4 +---
 clutter/clutter-types.h                        |   12 ++++++++----
 clutter/deprecated/clutter-behaviour-depth.c   |    2 +-
 clutter/deprecated/clutter-behaviour-depth.h   |    3 +--
 clutter/deprecated/clutter-behaviour-ellipse.c |    2 +-
 clutter/deprecated/clutter-behaviour-ellipse.h |    3 ---
 clutter/deprecated/clutter-behaviour-opacity.c |    2 +-
 clutter/deprecated/clutter-behaviour-opacity.h |    3 +--
 clutter/deprecated/clutter-behaviour-path.c    |    2 +-
 clutter/deprecated/clutter-behaviour-path.h    |    3 +--
 clutter/deprecated/clutter-behaviour-rotate.c  |    4 ++--
 clutter/deprecated/clutter-behaviour-rotate.h  |    2 --
 clutter/deprecated/clutter-behaviour-scale.c   |    2 +-
 clutter/deprecated/clutter-behaviour-scale.h   |    2 +-
 15 files changed, 20 insertions(+), 29 deletions(-)
---
diff --git a/clutter/clutter-behaviour.h b/clutter/clutter-behaviour.h
index 32a596f..129c6fb 100644
--- a/clutter/clutter-behaviour.h
+++ b/clutter/clutter-behaviour.h
@@ -30,8 +30,6 @@
 #ifndef __CLUTTER_BEHAVIOUR_H__
 #define __CLUTTER_BEHAVIOUR_H__
 
-#include <glib-object.h>
-#include <clutter/clutter-alpha.h>
 #include <clutter/clutter-types.h>
 
 G_BEGIN_DECLS
@@ -60,7 +58,6 @@ G_BEGIN_DECLS
   (G_TYPE_INSTANCE_GET_CLASS ((obj), \
   CLUTTER_TYPE_BEHAVIOUR, ClutterBehaviourClass))
 
-typedef struct _ClutterBehaviour        ClutterBehaviour;
 typedef struct _ClutterBehaviourPrivate ClutterBehaviourPrivate;
 typedef struct _ClutterBehaviourClass   ClutterBehaviourClass;
 
diff --git a/clutter/clutter-path.h b/clutter/clutter-path.h
index 2351e58..6d62512 100644
--- a/clutter/clutter-path.h
+++ b/clutter/clutter-path.h
@@ -28,9 +28,8 @@
 #ifndef __CLUTTER_PATH_H__
 #define __CLUTTER_PATH_H__
 
-#include <glib-object.h>
-#include <clutter/clutter-types.h>
 #include <cairo.h>
+#include <clutter/clutter-types.h>
 
 G_BEGIN_DECLS
 
@@ -75,7 +74,6 @@ typedef enum {
   CLUTTER_PATH_REL_CURVE_TO = CLUTTER_PATH_CURVE_TO | CLUTTER_PATH_RELATIVE
 } ClutterPathNodeType;
 
-typedef struct _ClutterPath        ClutterPath;
 typedef struct _ClutterPathClass   ClutterPathClass;
 typedef struct _ClutterPathPrivate ClutterPathPrivate;
 typedef struct _ClutterPathNode    ClutterPathNode;
diff --git a/clutter/clutter-types.h b/clutter/clutter-types.h
index 6659e08..2df3766 100644
--- a/clutter/clutter-types.h
+++ b/clutter/clutter-types.h
@@ -47,20 +47,24 @@ typedef struct _ClutterChildMeta        ClutterChildMeta;
 typedef struct _ClutterLayoutMeta       ClutterLayoutMeta;
 typedef struct _ClutterActorMeta        ClutterActorMeta;
 
+typedef struct _ClutterAlpha            ClutterAlpha;
 typedef struct _ClutterAnimator         ClutterAnimator;
+typedef struct _ClutterPath             ClutterPath;
 
 typedef struct _ClutterAction           ClutterAction;
 typedef struct _ClutterConstraint       ClutterConstraint;
 typedef struct _ClutterEffect           ClutterEffect;
 
-#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
-typedef struct _ClutterShader           ClutterShader;
-#endif
-
 typedef struct _ClutterColor            ClutterColor;
 
 typedef union _ClutterEvent             ClutterEvent;
 
+#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
+typedef struct _ClutterBehaviour        ClutterBehaviour;
+
+typedef struct _ClutterShader           ClutterShader;
+#endif /* DISABLE_DEPRECATED */
+
 /**
  * ClutterGravity:
  * @CLUTTER_GRAVITY_NONE: Do not apply any gravity
diff --git a/clutter/deprecated/clutter-behaviour-depth.c b/clutter/deprecated/clutter-behaviour-depth.c
index 61512cf..91acb5b 100644
--- a/clutter/deprecated/clutter-behaviour-depth.c
+++ b/clutter/deprecated/clutter-behaviour-depth.c
@@ -27,8 +27,8 @@
 #include "config.h"
 #endif
 
+#include "clutter-behaviour.h"
 #include "clutter-behaviour-depth.h"
-
 #include "clutter-enum-types.h"
 #include "clutter-main.h"
 #include "clutter-debug.h"
diff --git a/clutter/deprecated/clutter-behaviour-depth.h b/clutter/deprecated/clutter-behaviour-depth.h
index 81f0cd3..4ee2f83 100644
--- a/clutter/deprecated/clutter-behaviour-depth.h
+++ b/clutter/deprecated/clutter-behaviour-depth.h
@@ -30,8 +30,7 @@
 #ifndef __CLUTTER_BEHAVIOUR_DEPTH__
 #define __CLUTTER_BEHAVIOUR_DEPTH__
 
-#include <clutter/clutter-actor.h>
-#include <clutter/clutter-behaviour.h>
+#include <clutter/clutter-types.h>
 
 G_BEGIN_DECLS
 
diff --git a/clutter/deprecated/clutter-behaviour-ellipse.c b/clutter/deprecated/clutter-behaviour-ellipse.c
index 1267465..aafbc6e 100644
--- a/clutter/deprecated/clutter-behaviour-ellipse.c
+++ b/clutter/deprecated/clutter-behaviour-ellipse.c
@@ -50,8 +50,8 @@
 #include <math.h>
 #include <stdlib.h>
 
+#include "clutter-behaviour.h"
 #include "clutter-behaviour-ellipse.h"
-
 #include "clutter-debug.h"
 #include "clutter-enum-types.h"
 #include "clutter-private.h"
diff --git a/clutter/deprecated/clutter-behaviour-ellipse.h b/clutter/deprecated/clutter-behaviour-ellipse.h
index 302d4f2..8dffa86 100644
--- a/clutter/deprecated/clutter-behaviour-ellipse.h
+++ b/clutter/deprecated/clutter-behaviour-ellipse.h
@@ -28,9 +28,6 @@
 #ifndef __CLUTTER_BEHAVIOUR_ELLIPSE_H__
 #define __CLUTTER_BEHAVIOUR_ELLIPSE_H__
 
-#include <clutter/clutter-alpha.h>
-#include <clutter/clutter-actor.h>
-#include <clutter/clutter-behaviour.h>
 #include <clutter/clutter-types.h>
 
 G_BEGIN_DECLS
diff --git a/clutter/deprecated/clutter-behaviour-opacity.c b/clutter/deprecated/clutter-behaviour-opacity.c
index 91dbb6b..5cc3899 100644
--- a/clutter/deprecated/clutter-behaviour-opacity.c
+++ b/clutter/deprecated/clutter-behaviour-opacity.c
@@ -42,8 +42,8 @@
 
 #include <math.h>
 
+#include "clutter-behaviour.h"
 #include "clutter-behaviour-opacity.h"
-
 #include "clutter-private.h"
 #include "clutter-debug.h"
 
diff --git a/clutter/deprecated/clutter-behaviour-opacity.h b/clutter/deprecated/clutter-behaviour-opacity.h
index aa38ddb..b6519aa 100644
--- a/clutter/deprecated/clutter-behaviour-opacity.h
+++ b/clutter/deprecated/clutter-behaviour-opacity.h
@@ -30,8 +30,7 @@
 #ifndef __CLUTTER_BEHAVIOUR_OPACITY_H__
 #define __CLUTTER_BEHAVIOUR_OPACITY_H__
 
-#include <clutter/clutter-alpha.h>
-#include <clutter/clutter-behaviour.h>
+#include <clutter/clutter-types.h>
 
 G_BEGIN_DECLS
 
diff --git a/clutter/deprecated/clutter-behaviour-path.c b/clutter/deprecated/clutter-behaviour-path.c
index 8b271f5..30c5380 100644
--- a/clutter/deprecated/clutter-behaviour-path.c
+++ b/clutter/deprecated/clutter-behaviour-path.c
@@ -67,8 +67,8 @@
 #include "config.h"
 #endif
 
+#include "clutter-behaviour.h"
 #include "clutter-behaviour-path.h"
-
 #include "clutter-bezier.h"
 #include "clutter-debug.h"
 #include "clutter-enum-types.h"
diff --git a/clutter/deprecated/clutter-behaviour-path.h b/clutter/deprecated/clutter-behaviour-path.h
index 731aebd..fe15c3e 100644
--- a/clutter/deprecated/clutter-behaviour-path.h
+++ b/clutter/deprecated/clutter-behaviour-path.h
@@ -30,8 +30,7 @@
 #ifndef __CLUTTER_BEHAVIOUR_PATH_H__
 #define __CLUTTER_BEHAVIOUR_PATH_H__
 
-#include <clutter/clutter-alpha.h>
-#include <clutter/clutter-behaviour.h>
+#include <clutter/clutter-types.h>
 #include <clutter/clutter-path.h>
 
 G_BEGIN_DECLS
diff --git a/clutter/deprecated/clutter-behaviour-rotate.c b/clutter/deprecated/clutter-behaviour-rotate.c
index faeb30c..0ab5da6 100644
--- a/clutter/deprecated/clutter-behaviour-rotate.c
+++ b/clutter/deprecated/clutter-behaviour-rotate.c
@@ -39,10 +39,10 @@
 #include "config.h"
 #endif
 
-#include "clutter-behaviour-rotate.h"
-
 #include <math.h>
 
+#include "clutter-behaviour.h"
+#include "clutter-behaviour-rotate.h"
 #include "clutter-debug.h"
 #include "clutter-enum-types.h"
 #include "clutter-main.h"
diff --git a/clutter/deprecated/clutter-behaviour-rotate.h b/clutter/deprecated/clutter-behaviour-rotate.h
index c30aef9..df880a5 100644
--- a/clutter/deprecated/clutter-behaviour-rotate.h
+++ b/clutter/deprecated/clutter-behaviour-rotate.h
@@ -28,8 +28,6 @@
 #ifndef __CLUTTER_BEHAVIOUR_ROTATE_H__
 #define __CLUTTER_BEHAVIOUR_ROTATE_H__
 
-#include <clutter/clutter-alpha.h>
-#include <clutter/clutter-behaviour.h>
 #include <clutter/clutter-types.h>
 
 G_BEGIN_DECLS
diff --git a/clutter/deprecated/clutter-behaviour-scale.c b/clutter/deprecated/clutter-behaviour-scale.c
index 337a490..82a3b0e 100644
--- a/clutter/deprecated/clutter-behaviour-scale.c
+++ b/clutter/deprecated/clutter-behaviour-scale.c
@@ -41,8 +41,8 @@
 
 #include <math.h>
 
+#include "clutter-behaviour.h"
 #include "clutter-behaviour-scale.h"
-
 #include "clutter-debug.h"
 #include "clutter-main.h"
 #include "clutter-private.h"
diff --git a/clutter/deprecated/clutter-behaviour-scale.h b/clutter/deprecated/clutter-behaviour-scale.h
index 288b1a7..3479c7c 100644
--- a/clutter/deprecated/clutter-behaviour-scale.h
+++ b/clutter/deprecated/clutter-behaviour-scale.h
@@ -30,7 +30,7 @@
 #ifndef __CLUTTER_BEHAVIOUR_SCALE_H__
 #define __CLUTTER_BEHAVIOUR_SCALE_H__
 
-#include <clutter/clutter-behaviour.h>
+#include <clutter/clutter-types.h>
 
 G_BEGIN_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]