gegl r1973 - in trunk: . gegl/property-types



Author: mitch
Date: Tue Feb  5 21:23:50 2008
New Revision: 1973
URL: http://svn.gnome.org/viewvc/gegl?rev=1973&view=rev

Log:
2008-02-05  Michael Natterer  <mitch gimp org>

	* gegl/property-types/gegl-color.[ch]
	* gegl/property-types/gegl-curve.[ch]
	* gegl/property-types/gegl-vector.[ch]: remove #ifdefs around
	macros, make public declaration of param spec type macros
	consistent, remove duplicate macros from .c files, indentation.



Modified:
   trunk/ChangeLog
   trunk/gegl/property-types/gegl-color.c
   trunk/gegl/property-types/gegl-color.h
   trunk/gegl/property-types/gegl-curve.c
   trunk/gegl/property-types/gegl-curve.h
   trunk/gegl/property-types/gegl-vector.c
   trunk/gegl/property-types/gegl-vector.h

Modified: trunk/gegl/property-types/gegl-color.c
==============================================================================
--- trunk/gegl/property-types/gegl-color.c	(original)
+++ trunk/gegl/property-types/gegl-color.c	Tue Feb  5 21:23:50 2008
@@ -423,10 +423,8 @@
  * --------------------------------------------------------------------------
  */
 
-#define GEGL_TYPE_PARAM_COLOR             (gegl_param_color_get_type ())
-#define GEGL_PARAM_COLOR(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PARAM_COLOR, GeglParamColor))
-#define GEGL_IS_PARAM_COLOR(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_PARAM_COLOR))
-#define GEGL_IS_PARAM_COLOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_PARAM_COLOR))
+#define GEGL_PARAM_COLOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PARAM_COLOR, GeglParamColor))
+#define GEGL_IS_PARAM_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_PARAM_COLOR))
 
 typedef struct _GeglParamColor GeglParamColor;
 

Modified: trunk/gegl/property-types/gegl-color.h
==============================================================================
--- trunk/gegl/property-types/gegl-color.h	(original)
+++ trunk/gegl/property-types/gegl-color.h	Tue Feb  5 21:23:50 2008
@@ -23,9 +23,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef GEGL_TYPE_COLOR
 #define GEGL_TYPE_COLOR            (gegl_color_get_type ())
-#endif
 #define GEGL_COLOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_COLOR, GeglColor))
 #define GEGL_COLOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GEGL_TYPE_COLOR, GeglColorClass))
 #define GEGL_IS_COLOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_COLOR))
@@ -61,6 +59,9 @@
                                                 gfloat       a);
 
 
+#define GEGL_TYPE_PARAM_COLOR           (gegl_param_color_get_type ())
+#define GEGL_IS_PARAM_SPEC_COLOR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_COLOR))
+
 GType        gegl_param_color_get_type         (void) G_GNUC_CONST;
 
 GParamSpec * gegl_param_spec_color             (const gchar *name,
@@ -75,11 +76,6 @@
                                                 const gchar *default_color_string,
                                                 GParamFlags  flags);
 
-
-#define GEGL_TYPE_PARAM_COLOR           (gegl_param_color_get_type ())
-#define GEGL_IS_PARAM_SPEC_COLOR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_COLOR))
-
-
 G_END_DECLS
 
 #endif /* __GEGL_COLOR_H__ */

Modified: trunk/gegl/property-types/gegl-curve.c
==============================================================================
--- trunk/gegl/property-types/gegl-curve.c	(original)
+++ trunk/gegl/property-types/gegl-curve.c	Tue Feb  5 21:23:50 2008
@@ -29,7 +29,7 @@
 
 enum
 {
-  PROP_0,
+  PROP_0
 };
 
 typedef struct _GeglCurvePoint   GeglCurvePoint;
@@ -416,19 +416,8 @@
  * --------------------------------------------------------------------------
  */
 
-#define GEGL_TYPE_PARAM_CURVE              \
-    (gegl_param_curve_get_type ())
-#define GEGL_PARAM_CURVE(obj)              \
-    (G_TYPE_CHECK_INSTANCE_CAST ((obj),    \
-    GEGL_TYPE_PARAM_CURVE, GeglParamCurve))
-
-#define GEGL_IS_PARAM_CURVE(obj)           \
-    (G_TYPE_CHECK_INSTANCE_TYPE ((obj),    \
-    GEGL_TYPE_PARAM_CURVE))
-
-#define GEGL_IS_PARAM_CURVE_CLASS(klass)   \
-    (G_TYPE_CHECK_CLASS_TYPE ((klass),     \
-    GEGL_TYPE_PARAM_CURVE))
+#define GEGL_PARAM_CURVE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PARAM_CURVE, GeglParamCurve))
+#define GEGL_IS_PARAM_CURVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_PARAM_CURVE))
 
 typedef struct _GeglParamCurve GeglParamCurve;
 

Modified: trunk/gegl/property-types/gegl-curve.h
==============================================================================
--- trunk/gegl/property-types/gegl-curve.h	(original)
+++ trunk/gegl/property-types/gegl-curve.h	Tue Feb  5 21:23:50 2008
@@ -23,10 +23,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef GEGL_TYPE_CURVE
 #define GEGL_TYPE_CURVE            (gegl_curve_get_type ())
-#endif
-
 #define GEGL_CURVE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_CURVE, GeglCurve))
 #define GEGL_CURVE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GEGL_TYPE_CURVE, GeglCurveClass))
 #define GEGL_IS_CURVE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_CURVE))
@@ -89,6 +86,9 @@
                                         gdouble     *ys);
 
 
+#define GEGL_TYPE_PARAM_CURVE           (gegl_param_curve_get_type ())
+#define GEGL_IS_PARAM_SPEC_CURVE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_CURVE))
+
 GType        gegl_param_curve_get_type (void) G_GNUC_CONST;
 
 GParamSpec * gegl_param_spec_curve     (const gchar *name,
@@ -97,9 +97,6 @@
                                         GeglCurve   *default_curve,
                                         GParamFlags  flags);
 
-#define GEGL_TYPE_PARAM_CURVE           (gegl_param_curve_get_type ())
-#define GEGL_IS_PARAM_SPEC_CURVE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_CURVE))
-
 G_END_DECLS
 
 #endif /* __GEGL_CURVE_H__ */

Modified: trunk/gegl/property-types/gegl-vector.c
==============================================================================
--- trunk/gegl/property-types/gegl-vector.c	(original)
+++ trunk/gegl/property-types/gegl-vector.c	Tue Feb  5 21:23:50 2008
@@ -879,19 +879,8 @@
  * --------------------------------------------------------------------------
  */
 
-#define GEGL_TYPE_PARAM_VECTOR              \
-    (gegl_param_vector_get_type ())
-#define GEGL_PARAM_VECTOR(obj)              \
-    (G_TYPE_CHECK_INSTANCE_CAST ((obj),    \
-    GEGL_TYPE_PARAM_VECTOR, GeglParamVector))
-
-#define GEGL_IS_PARAM_VECTOR(obj)           \
-    (G_TYPE_CHECK_INSTANCE_TYPE ((obj),    \
-    GEGL_TYPE_PARAM_VECTOR))
-
-#define GEGL_IS_PARAM_VECTOR_CLASS(klass)   \
-    (G_TYPE_CHECK_CLASS_TYPE ((klass),     \
-    GEGL_TYPE_PARAM_VECTOR))
+#define GEGL_PARAM_VECTOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PARAM_VECTOR, GeglParamVector))
+#define GEGL_IS_PARAM_VECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_PARAM_VECTOR))
 
 typedef struct _GeglParamVector GeglParamVector;
 
@@ -975,4 +964,3 @@
 
   return G_PARAM_SPEC (param_vector);
 }
-

Modified: trunk/gegl/property-types/gegl-vector.h
==============================================================================
--- trunk/gegl/property-types/gegl-vector.h	(original)
+++ trunk/gegl/property-types/gegl-vector.h	Tue Feb  5 21:23:50 2008
@@ -23,10 +23,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef GEGL_TYPE_VECTOR
 #define GEGL_TYPE_VECTOR            (gegl_vector_get_type ())
-#endif
-
 #define GEGL_VECTOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_VECTOR, GeglVector))
 #define GEGL_VECTOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GEGL_TYPE_VECTOR, GeglVectorClass))
 #define GEGL_IS_VECTOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_VECTOR))
@@ -45,39 +42,43 @@
   GObjectClass parent_class;
 };
 
-GType        gegl_vector_get_type     (void) G_GNUC_CONST;
+GType        gegl_vector_get_type       (void) G_GNUC_CONST;
+
+GeglVector * gegl_vector_new            (void);
+
+void         gegl_vector_get_bounds     (GeglVector   *self,
+                                         gdouble      *min_x,
+                                         gdouble      *max_x,
+                                         gdouble      *min_y,
+                                         gdouble      *max_y);
+
+gdouble      gegl_vector_get_length     (GeglVector  *self);
+
+void         gegl_vector_line_to        (GeglVector  *self,
+                                         gdouble      x,
+                                         gdouble      y);
+
+void         gegl_vector_calc           (GeglVector  *self,
+                                         gdouble      pos,
+                                         gdouble     *x,
+                                         gdouble     *y);
+
+void         gegl_vector_calc_values    (GeglVector  *self,
+                                         guint        num_samples,
+                                         gdouble     *xs,
+                                         gdouble     *ys);
 
-GeglVector * gegl_vector_new          (void);
 
-void         gegl_vector_get_bounds   (GeglVector   *self,
-                                       gdouble      *min_x,
-                                       gdouble      *max_x,
-                                       gdouble      *min_y,
-                                       gdouble      *max_y);
-
-gdouble      gegl_vector_get_length   (GeglVector  *self);
-
-void         gegl_vector_line_to      (GeglVector  *self,
-                                       gdouble      x,
-                                       gdouble      y);
-
-void         gegl_vector_calc         (GeglVector  *self,
-                                       gdouble      pos,
-                                       gdouble     *x,
-                                       gdouble     *y);
-
-void         gegl_vector_calc_values  (GeglVector  *self,
-                                       guint        num_samples,
-                                       gdouble     *xs,
-                                       gdouble     *ys);
+#define GEGL_TYPE_PARAM_VECTOR    (gegl_param_vector_get_type ())
+#define GEGL_IS_PARAM_VECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_PARAM_VECTOR))
 
 GType        gegl_param_vector_get_type (void) G_GNUC_CONST;
 
-GParamSpec * gegl_param_spec_vector   (const gchar *name,
-                                       const gchar *nick,
-                                       const gchar *blurb,
-                                       GeglVector  *default_vector,
-                                       GParamFlags  flags);
+GParamSpec * gegl_param_spec_vector     (const gchar *name,
+                                         const gchar *nick,
+                                         const gchar *blurb,
+                                         GeglVector  *default_vector,
+                                         GParamFlags  flags);
 
 G_END_DECLS
 



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