[gegl] GeglConfig: Move GObject/GType macros to gegl-types.h



commit 317e9f50cae0ee5a4daab79f2c30db7ed75897c5
Author: Jon Nordby <jononor gmail com>
Date:   Wed Aug 1 14:20:57 2012 +0200

    GeglConfig: Move GObject/GType macros to gegl-types.h
    
    Following the same convention as for GeglNode and similar.
    Makes GeglConfig and gegl_config() introspectable.

 gegl/gegl-config.h |    6 +-----
 gegl/gegl-types.h  |    6 ++++++
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gegl/gegl-config.h b/gegl/gegl-config.h
index 352c44b..e65c63f 100644
--- a/gegl/gegl-config.h
+++ b/gegl/gegl-config.h
@@ -24,12 +24,10 @@
 
 G_BEGIN_DECLS
 
-#define GEGL_TYPE_CONFIG            (gegl_config_get_type ())
-#define GEGL_CONFIG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_CONFIG, GeglConfig))
 #define GEGL_CONFIG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GEGL_TYPE_CONFIG, GeglConfigClass))
-#define GEGL_IS_CONFIG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_CONFIG))
 #define GEGL_IS_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GEGL_TYPE_CONFIG))
 #define GEGL_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),  GEGL_TYPE_CONFIG, GeglConfigClass))
+/* The rest is in gegl-types.h */
 
 typedef struct _GeglConfigClass GeglConfigClass;
 
@@ -53,8 +51,6 @@ struct _GeglConfigClass
   GObjectClass parent_class;
 };
 
-GType gegl_config_get_type (void) G_GNUC_CONST;
-
 GeglConfig   * gegl_config            (void);
 
 G_END_DECLS
diff --git a/gegl/gegl-types.h b/gegl/gegl-types.h
index f3d10b8..f068a14 100644
--- a/gegl/gegl-types.h
+++ b/gegl/gegl-types.h
@@ -39,7 +39,13 @@ typedef enum
   GEGL_BLIT_DIRTY    = 1 << 1
 } GeglBlitFlags;
 
+
 typedef struct _GeglConfig GeglConfig;
+GType gegl_config_get_type (void) G_GNUC_CONST;
+#define GEGL_TYPE_CONFIG            (gegl_config_get_type ())
+#define GEGL_CONFIG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_CONFIG, GeglConfig))
+#define GEGL_IS_CONFIG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_CONFIG))
+
 typedef struct _GeglCurve  GeglCurve;
 typedef struct _GeglPath   GeglPath;
 typedef struct _GeglColor  GeglColor;



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