gegl r1972 - in trunk: . gegl/property-types
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r1972 - in trunk: . gegl/property-types
- Date: Tue, 5 Feb 2008 21:11:03 +0000 (GMT)
Author: mitch
Date: Tue Feb 5 21:11:03 2008
New Revision: 1972
URL: http://svn.gnome.org/viewvc/gegl?rev=1972&view=rev
Log:
2008-02-05 Michael Natterer <mitch gimp org>
* gegl/property-types/gegl-color.h: indentation.
* gegl/property-types/gegl-color.c: replace g_assert() by
g_return_if_fail().
(gegl_param_spec_color): ref the default color.
* gegl/property-types/gegl-vector.h: reorder stuff, cleanup.
Modified:
trunk/ChangeLog
trunk/gegl/property-types/gegl-color.c
trunk/gegl/property-types/gegl-color.h
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:11:03 2008
@@ -256,7 +256,8 @@
{
GeglColorPrivate *priv;
- g_assert (self);
+ g_return_if_fail (GEGL_IS_COLOR (self));
+
priv = GEGL_COLOR_GET_PRIVATE (self);
*r = priv->rgba_color[0];
@@ -274,7 +275,8 @@
{
GeglColorPrivate *priv;
- g_assert (self);
+ g_return_if_fail (GEGL_IS_COLOR (self));
+
priv = GEGL_COLOR_GET_PRIVATE (self);
priv->rgba_color[0] = r;
@@ -411,6 +413,7 @@
{
if (string)
return g_object_new (GEGL_TYPE_COLOR, "string", string, NULL);
+
return g_object_new (GEGL_TYPE_COLOR, NULL);
}
@@ -503,6 +506,8 @@
name, nick, blurb, flags);
param_color->default_color = default_color;
+ if (default_color)
+ g_object_ref (default_color);
return G_PARAM_SPEC (param_color);
}
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:11:03 2008
@@ -48,13 +48,13 @@
GeglColor * gegl_color_new (const gchar *string);
-void gegl_color_get_rgba (GeglColor *self,
- gfloat *r,
- gfloat *g,
- gfloat *b,
- gfloat *a);
+void gegl_color_get_rgba (GeglColor *self,
+ gfloat *r,
+ gfloat *g,
+ gfloat *b,
+ gfloat *a);
-void gegl_color_set_rgba (GeglColor *self,
+void gegl_color_set_rgba (GeglColor *self,
gfloat r,
gfloat g,
gfloat b,
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:11:03 2008
@@ -37,24 +37,24 @@
struct _GeglVector
{
- GObject parent;
+ GObject parent_instance;
};
struct _GeglVectorClass
{
- GObjectClass parent;
+ GObjectClass parent_class;
};
+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);
-GeglVector * gegl_vector_new (void);
-
-GType gegl_vector_get_type (void) G_GNUC_CONST;
-
gdouble gegl_vector_get_length (GeglVector *self);
void gegl_vector_line_to (GeglVector *self,
@@ -71,14 +71,14 @@
gdouble *xs,
gdouble *ys);
+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);
-GType gegl_param_vector_get_type (void) G_GNUC_CONST;
-
G_END_DECLS
#endif /* __GEGL_VECTOR_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]