Commit f200f9ca authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/gegl/gimpcolorbalanceconfig.[ch] app/gegl/gimpcolorizeconfig.[ch]

2008-01-27  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpcolorbalanceconfig.[ch]
	* app/gegl/gimpcolorizeconfig.[ch]
	* app/gegl/gimpcurvesconfig.[ch]
	* app/gegl/gimphuesaturationconfig.[ch]
	* app/gegl/gimplevelsconfig.[ch]
	* app/gegl/gimpposterizeconfig.[ch]
	* app/gegl/gimpthresholdconfig.[ch]: implement the GimpConfig
	interface and remove public reset() functions except special ones
	which reset only parts of the objects. Add lots of property
	notifications.

	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: use gimp_config_reset(), misc.
	related changes and cleanups.


svn path=/trunk/; revision=24724
parent 4d1ccd63
2008-01-27 Michael Natterer <mitch@gimp.org>
* app/gegl/gimpcolorbalanceconfig.[ch]
* app/gegl/gimpcolorizeconfig.[ch]
* app/gegl/gimpcurvesconfig.[ch]
* app/gegl/gimphuesaturationconfig.[ch]
* app/gegl/gimplevelsconfig.[ch]
* app/gegl/gimpposterizeconfig.[ch]
* app/gegl/gimpthresholdconfig.[ch]: implement the GimpConfig
interface and remove public reset() functions except special ones
which reset only parts of the objects. Add lots of property
notifications.
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcolorizetool.c
* app/tools/gimpcurvestool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpposterizetool.c
* app/tools/gimpthresholdtool.c: use gimp_config_reset(), misc.
related changes and cleanups.
2008-01-27 Kevin Cozens <kcozens@cvs.gnome.org>
* plug-ins/imagemap/imap_cern.[ly]
......
......@@ -25,6 +25,7 @@
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
#include "libgimpconfig/gimpconfig.h"
#include "gegl-types.h"
......@@ -45,6 +46,8 @@ enum
};
static void gimp_color_balance_config_iface_init (GimpConfigInterface *iface);
static void gimp_color_balance_config_get_property (GObject *object,
guint property_id,
GValue *value,
......@@ -54,9 +57,13 @@ static void gimp_color_balance_config_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec);
static void gimp_color_balance_config_reset (GimpConfig *config);
G_DEFINE_TYPE (GimpColorBalanceConfig, gimp_color_balance_config,
G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_CODE (GimpColorBalanceConfig, gimp_color_balance_config,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
gimp_color_balance_config_iface_init))
#define parent_class gimp_color_balance_config_parent_class
......@@ -98,7 +105,7 @@ gimp_color_balance_config_class_init (GimpColorBalanceConfigClass * klass)
g_param_spec_double ("yellow-blue",
"Yellow-Blue",
"Yellow-Blue",
-1.0, 1.0, 1.0,
-1.0, 1.0, 0.0,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
......@@ -111,10 +118,16 @@ gimp_color_balance_config_class_init (GimpColorBalanceConfigClass * klass)
G_PARAM_CONSTRUCT));
}
static void
gimp_color_balance_config_iface_init (GimpConfigInterface *iface)
{
iface->reset = gimp_color_balance_config_reset;
}
static void
gimp_color_balance_config_init (GimpColorBalanceConfig *self)
{
gimp_color_balance_config_reset (self);
gimp_config_reset (GIMP_CONFIG (self));
}
static void
......@@ -189,35 +202,41 @@ gimp_color_balance_config_set_property (GObject *object,
}
}
/* public functions */
void
gimp_color_balance_config_reset (GimpColorBalanceConfig *config)
static void
gimp_color_balance_config_reset (GimpConfig *config)
{
GimpTransferMode range;
GimpColorBalanceConfig *cb_config = GIMP_COLOR_BALANCE_CONFIG (config);
GimpTransferMode range;
g_return_if_fail (GIMP_IS_COLOR_BALANCE_CONFIG (config));
config->range = GIMP_MIDTONES;
g_object_freeze_notify (G_OBJECT (config));
for (range = GIMP_SHADOWS; range <= GIMP_HIGHLIGHTS; range++)
{
gimp_color_balance_config_reset_range (config, range);
cb_config->range = range;
gimp_color_balance_config_reset_range (cb_config);
}
config->preserve_luminosity = TRUE;
gimp_config_reset_property (G_OBJECT (config), "range");
gimp_config_reset_property (G_OBJECT (config), "preserve-luminosity");
g_object_thaw_notify (G_OBJECT (config));
}
/* public functions */
void
gimp_color_balance_config_reset_range (GimpColorBalanceConfig *config,
GimpTransferMode range)
gimp_color_balance_config_reset_range (GimpColorBalanceConfig *config)
{
g_return_if_fail (GIMP_IS_COLOR_BALANCE_CONFIG (config));
config->cyan_red[range] = 0.0;
config->magenta_green[range] = 0.0;
config->yellow_blue[range] = 0.0;
g_object_freeze_notify (G_OBJECT (config));
gimp_config_reset_property (G_OBJECT (config), "cyan-red");
gimp_config_reset_property (G_OBJECT (config), "magenta-green");
gimp_config_reset_property (G_OBJECT (config), "yellow-blue");
g_object_thaw_notify (G_OBJECT (config));
}
......
......@@ -54,9 +54,7 @@ struct _GimpColorBalanceConfigClass
GType gimp_color_balance_config_get_type (void) G_GNUC_CONST;
void gimp_color_balance_config_reset (GimpColorBalanceConfig *config);
void gimp_color_balance_config_reset_range (GimpColorBalanceConfig *config,
GimpTransferMode range);
void gimp_color_balance_config_reset_range (GimpColorBalanceConfig *config);
/* temp cruft */
void gimp_color_balance_config_to_cruft (GimpColorBalanceConfig *config,
......
......@@ -23,6 +23,8 @@
#include <gegl.h>
#include "libgimpconfig/gimpconfig.h"
#include "gegl-types.h"
/* temp cruft */
......@@ -50,7 +52,9 @@ static void gimp_colorize_config_set_property (GObject *object,
GParamSpec *pspec);
G_DEFINE_TYPE (GimpColorizeConfig, gimp_colorize_config, G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_CODE (GimpColorizeConfig, gimp_colorize_config,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
#define parent_class gimp_colorize_config_parent_class
......@@ -150,19 +154,6 @@ gimp_colorize_config_set_property (GObject *object,
}
/* public functions */
void
gimp_colorize_config_reset (GimpColorizeConfig *config)
{
g_return_if_fail (GIMP_IS_COLORIZE_CONFIG (config));
config->hue = 0.5;
config->saturation = 0.5;
config->lightness = 0.0;
}
/* temp cruft */
void
......
......@@ -50,8 +50,6 @@ struct _GimpColorizeConfigClass
GType gimp_colorize_config_get_type (void) G_GNUC_CONST;
void gimp_colorize_config_reset (GimpColorizeConfig *config);
/* temp cruft */
void gimp_colorize_config_to_cruft (GimpColorizeConfig *config,
Colorize *cruft);
......
......@@ -24,6 +24,7 @@
#include <string.h>
#include <gegl.h>
#include <glib/gstdio.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
......@@ -49,6 +50,8 @@ enum
};
static void gimp_curves_config_iface_init (GimpConfigInterface *iface);
static void gimp_curves_config_finalize (GObject *object);
static void gimp_curves_config_get_property (GObject *object,
guint property_id,
......@@ -59,8 +62,13 @@ static void gimp_curves_config_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec);
static void gimp_curves_config_reset (GimpConfig *config);
G_DEFINE_TYPE (GimpCurvesConfig, gimp_curves_config, G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_CODE (GimpCurvesConfig, gimp_curves_config,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
gimp_curves_config_iface_init))
#define parent_class gimp_curves_config_parent_class
......@@ -91,6 +99,12 @@ gimp_curves_config_class_init (GimpCurvesConfigClass * klass)
G_PARAM_READWRITE));
}
static void
gimp_curves_config_iface_init (GimpConfigInterface *iface)
{
iface->reset = gimp_curves_config_reset;
}
static void
gimp_curves_config_init (GimpCurvesConfig *self)
{
......@@ -103,7 +117,7 @@ gimp_curves_config_init (GimpCurvesConfig *self)
self->curve[channel] = GIMP_CURVE (gimp_curve_new ("curves config"));
}
gimp_curves_config_reset (self);
gimp_config_reset (GIMP_CONFIG (self));
}
static void
......@@ -176,33 +190,36 @@ gimp_curves_config_set_property (GObject *object,
}
}
/* public functions */
void
gimp_curves_config_reset (GimpCurvesConfig *config)
static void
gimp_curves_config_reset (GimpConfig *config)
{
GimpHistogramChannel channel;
g_return_if_fail (GIMP_IS_CURVES_CONFIG (config));
GimpCurvesConfig *c_config = GIMP_CURVES_CONFIG (config);
GimpHistogramChannel channel;
config->channel = GIMP_HISTOGRAM_VALUE;
g_object_freeze_notify (G_OBJECT (config));
for (channel = GIMP_HISTOGRAM_VALUE;
channel <= GIMP_HISTOGRAM_ALPHA;
channel++)
{
gimp_curve_reset (config->curve[channel], FALSE);
c_config->channel = channel;
gimp_curves_config_reset_channel (c_config);
}
gimp_config_reset_property (G_OBJECT (config), "channel");
g_object_thaw_notify (G_OBJECT (config));
}
/* public functions */
void
gimp_curves_config_reset_channel (GimpCurvesConfig *config,
GimpHistogramChannel channel)
gimp_curves_config_reset_channel (GimpCurvesConfig *config)
{
g_return_if_fail (GIMP_IS_CURVES_CONFIG (config));
gimp_curve_reset (config->curve[channel], FALSE);
gimp_curve_reset (config->curve[config->channel], TRUE);
}
gboolean
......
......@@ -55,21 +55,19 @@ struct _GimpCurvesConfigClass
GType gimp_curves_config_get_type (void) G_GNUC_CONST;
void gimp_curves_config_reset (GimpCurvesConfig *config);
void gimp_curves_config_reset_channel (GimpCurvesConfig *config,
GimpHistogramChannel channel);
void gimp_curves_config_reset_channel (GimpCurvesConfig *config);
gboolean gimp_curves_config_load_cruft (GimpCurvesConfig *config,
gpointer fp,
GError **error);
gboolean gimp_curves_config_save_cruft (GimpCurvesConfig *config,
gpointer fp);
gboolean gimp_curves_config_load_cruft (GimpCurvesConfig *config,
gpointer fp,
GError **error);
gboolean gimp_curves_config_save_cruft (GimpCurvesConfig *config,
gpointer fp);
/* temp cruft */
void gimp_curves_config_to_cruft (GimpCurvesConfig *config,
Curves *cruft,
gboolean is_color);
void gimp_curves_config_to_cruft (GimpCurvesConfig *config,
Curves *cruft,
gboolean is_color);
#endif /* __GIMP_CURVES_CONFIG_H__ */
......@@ -23,6 +23,8 @@
#include <gegl.h>
#include "libgimpconfig/gimpconfig.h"
#include "gegl-types.h"
/* temp cruft */
......@@ -42,6 +44,8 @@ enum
};
static void gimp_hue_saturation_config_iface_init (GimpConfigInterface *iface);
static void gimp_hue_saturation_config_get_property (GObject *object,
guint property_id,
GValue *value,
......@@ -51,9 +55,13 @@ static void gimp_hue_saturation_config_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec);
static void gimp_hue_saturation_config_reset (GimpConfig *config);
G_DEFINE_TYPE (GimpHueSaturationConfig, gimp_hue_saturation_config,
G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_CODE (GimpHueSaturationConfig, gimp_hue_saturation_config,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
gimp_hue_saturation_config_iface_init))
#define parent_class gimp_hue_saturation_config_parent_class
......@@ -108,10 +116,16 @@ gimp_hue_saturation_config_class_init (GimpHueSaturationConfigClass * klass)
G_PARAM_CONSTRUCT));
}
static void
gimp_hue_saturation_config_iface_init (GimpConfigInterface *iface)
{
iface->reset = gimp_hue_saturation_config_reset;
}
static void
gimp_hue_saturation_config_init (GimpHueSaturationConfig *self)
{
gimp_hue_saturation_config_reset (self);
gimp_config_reset (GIMP_CONFIG (self));
}
static void
......@@ -186,35 +200,41 @@ gimp_hue_saturation_config_set_property (GObject *object,
}
}
/* public functions */
void
gimp_hue_saturation_config_reset (GimpHueSaturationConfig *config)
static void
gimp_hue_saturation_config_reset (GimpConfig *config)
{
GimpHueRange range;
GimpHueSaturationConfig *hs_config = GIMP_HUE_SATURATION_CONFIG (config);
GimpHueRange range;
g_return_if_fail (GIMP_IS_HUE_SATURATION_CONFIG (config));
config->range = GIMP_ALL_HUES;
g_object_freeze_notify (G_OBJECT (config));
for (range = GIMP_ALL_HUES; range <= GIMP_MAGENTA_HUES; range++)
{
gimp_hue_saturation_config_reset_range (config, range);
hs_config->range = range;
gimp_hue_saturation_config_reset_range (hs_config);
}
config->overlap = 0.0;
gimp_config_reset_property (G_OBJECT (config), "range");
gimp_config_reset_property (G_OBJECT (config), "overlap");
g_object_thaw_notify (G_OBJECT (config));
}
/* public functions */
void
gimp_hue_saturation_config_reset_range (GimpHueSaturationConfig *config,
GimpHueRange range)
gimp_hue_saturation_config_reset_range (GimpHueSaturationConfig *config)
{
g_return_if_fail (GIMP_IS_HUE_SATURATION_CONFIG (config));
config->hue[range] = 0.0;
config->saturation[range] = 0.0;
config->lightness[range] = 0.0;
g_object_freeze_notify (G_OBJECT (config));
gimp_config_reset_property (G_OBJECT (config), "hue");
gimp_config_reset_property (G_OBJECT (config), "saturation");
gimp_config_reset_property (G_OBJECT (config), "lightness");
g_object_thaw_notify (G_OBJECT (config));
}
......
......@@ -54,9 +54,7 @@ struct _GimpHueSaturationConfigClass
GType gimp_hue_saturation_config_get_type (void) G_GNUC_CONST;
void gimp_hue_saturation_config_reset (GimpHueSaturationConfig *config);
void gimp_hue_saturation_config_reset_range (GimpHueSaturationConfig *config,
GimpHueRange range);
void gimp_hue_saturation_config_reset_range (GimpHueSaturationConfig *config);
/* temp cruft */
void gimp_hue_saturation_config_to_cruft (GimpHueSaturationConfig *config,
......
......@@ -55,6 +55,8 @@ enum
};
static void gimp_levels_config_iface_init (GimpConfigInterface *iface);
static void gimp_levels_config_get_property (GObject *object,
guint property_id,
GValue *value,
......@@ -64,8 +66,13 @@ static void gimp_levels_config_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec);
static void gimp_levels_config_reset (GimpConfig *config);
G_DEFINE_TYPE (GimpLevelsConfig, gimp_levels_config, G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_CODE (GimpLevelsConfig, gimp_levels_config,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
gimp_levels_config_iface_init))
#define parent_class gimp_levels_config_parent_class
......@@ -128,10 +135,16 @@ gimp_levels_config_class_init (GimpLevelsConfigClass * klass)
G_PARAM_CONSTRUCT));
}
static void
gimp_levels_config_iface_init (GimpConfigInterface *iface)
{
iface->reset = gimp_levels_config_reset;
}
static void
gimp_levels_config_init (GimpLevelsConfig *self)
{
gimp_levels_config_reset (self);
gimp_config_reset (GIMP_CONFIG (self));
}
static void
......@@ -214,64 +227,80 @@ gimp_levels_config_set_property (GObject *object,
}
}
/* public functions */
void
gimp_levels_config_reset (GimpLevelsConfig *config)
static void
gimp_levels_config_reset (GimpConfig *config)
{
GimpHistogramChannel channel;
g_return_if_fail (GIMP_IS_LEVELS_CONFIG (config));
GimpLevelsConfig *l_config = GIMP_LEVELS_CONFIG (config);
GimpHistogramChannel channel;
config->channel = GIMP_HISTOGRAM_VALUE;
g_object_freeze_notify (G_OBJECT (config));
for (channel = GIMP_HISTOGRAM_VALUE;
channel <= GIMP_HISTOGRAM_ALPHA;
channel++)
{
gimp_levels_config_reset_channel (config, channel);
l_config->channel = channel;
gimp_levels_config_reset_channel (l_config);
}
gimp_config_reset_property (G_OBJECT (config), "channel");
g_object_thaw_notify (G_OBJECT (config));
}
/* public functions */
void
gimp_levels_config_reset_channel (GimpLevelsConfig *config,
GimpHistogramChannel channel)
gimp_levels_config_reset_channel (GimpLevelsConfig *config)
{
g_return_if_fail (GIMP_IS_LEVELS_CONFIG (config));
config->gamma[channel] = 1.0;
config->low_input[channel] = 0.0;
config->high_input[channel] = 1.0;
config->low_output[channel] = 0.0;
config->high_output[channel] = 1.0;
g_object_freeze_notify (G_OBJECT (config));
gimp_config_reset_property (G_OBJECT (config), "gamma");
gimp_config_reset_property (G_OBJECT (config), "low-input");
gimp_config_reset_property (G_OBJECT (config), "high-input");
gimp_config_reset_property (G_OBJECT (config), "low-output");
gimp_config_reset_property (G_OBJECT (config), "high-output");
g_object_thaw_notify (G_OBJECT (config));
}
void
gimp_levels_config_stretch (GimpLevelsConfig *config,
GimpHistogram *histogram,
gboolean is_color)
gimp_levels_config_stretch (GimpLevelsConfig *config,
GimpHistogram *histogram,
gboolean is_color)
{
g_return_if_fail (GIMP_IS_LEVELS_CONFIG (config));
g_return_if_fail (histogram != NULL);
g_object_freeze_notify (G_OBJECT (config));
if (is_color)
{
GimpHistogramChannel channel;
/* Set the overall value to defaults */
gimp_levels_config_reset_channel (config, GIMP_HISTOGRAM_VALUE);
/* Set the overall value to defaults */
channel = config->channel;
config->channel = GIMP_HISTOGRAM_VALUE;
gimp_levels_config_reset_channel (config);
config->channel = channel;
for (channel = GIMP_HISTOGRAM_RED;
channel <= GIMP_HISTOGRAM_BLUE;
channel++)
gimp_levels_config_stretch_channel (config, histogram, channel);
{
gimp_levels_config_stretch_channel (config, histogram, channel);
}
}
else
{
gimp_levels_config_stretch_channel (config, histogram,
GIMP_HISTOGRAM_VALUE);
}
g_object_thaw_notify (G_OBJECT (config));
}
void
......@@ -285,6 +314,8 @@ gimp_levels_config_stretch_channel (GimpLevelsConfig *config,
g_return_if_fail (GIMP_IS_LEVELS_CONFIG (config));
g_return_if_fail (histogram != NULL);
g_object_freeze_notify (G_OBJECT (config));
config->gamma[channel] = 1.0;
config->low_output[channel] = 0.0;
config->high_output[channel] = 1.0;
......@@ -340,6 +371,14 @@ gimp_levels_config_stretch_channel (GimpLevelsConfig *config,
}
}
}
g_object_notify (G_OBJECT (config), "gamma");
g_object_notify (G_OBJECT (config), "low-input");
g_object_notify (G_OBJECT (config), "high-input");
g_object_notify (G_OBJECT (config), "low-output");
g_object_notify (G_OBJECT (config), "high-output");
g_object_thaw_notify (G_OBJECT (config));
}
static gdouble
......@@ -379,13 +418,22 @@ gimp_levels_config_adjust_by_colors (GimpLevelsConfig *config,
{
g_return_if_fail (GIMP_IS_LEVELS_CONFIG (config));
g_object_freeze_notify (G_OBJECT (config));
if (black)
config->low_input[channel] = gimp_levels_config_input_from_color (channel,
black);
{
config->low_input[channel] = gimp_levels_config_input_from_color (channel,
black);
g_object_notify (G_OBJECT (config), "low-input");
}
if (white)
config->high_input[channel] = gimp_levels_config_input_from_color (channel,
white);
{
config->high_input[channel] = gimp_levels_config_input_from_color (channel,
white);
g_object_notify (G_OBJECT (config), "high-input");
}
if (gray)
{
......@@ -417,7 +465,10 @@ gimp_levels_config_adjust_by_colors (GimpLevelsConfig *config,
/* Map selected color to corresponding lightness */
config->gamma[channel] = log (inten) / log (out_light);
g_object_notify (G_OBJECT (config), "gamma");
}
g_object_thaw_notify (G_OBJECT (config));
}
gboolean
......@@ -468,6 +519,8 @@ gimp_levels_config_load_cruft (GimpLevelsConfig *config,
goto error;
}
g_object_freeze_notify (G_OBJECT (config));
for (i = 0; i < 5; i++)
{
config->low_input[i] = low_input[i] / 255.0;
......@@ -477,6 +530,14 @@ gimp_levels_config_load_cruft (GimpLevelsConfig *config,
config->gamma[i] = gamma[i];
}
g_object_notify (G_OBJECT (config), "gamma");
g_object_notify (G_OBJECT (config), "low-input");
g_object_notify (G_OBJECT (config), "high-input");
g_object_notify (G_OBJECT (config), "low-output");
g_object_notify (G_OBJECT (config), "high-output");
g_object_thaw_notify (G_OBJECT (config));
return TRUE;
error:
......
......@@ -56,9 +56,7 @@ struct _GimpLevelsConfigClass
GType gimp_levels_config_get_type (void) G_GNUC_CONST;
void gimp_levels_config_reset (GimpLevelsConfig *config);
void gimp_levels_config_reset_channel (GimpLevelsConfig *config,
GimpHistogramChannel channel);
void gimp_levels_config_reset_channel (GimpLevelsConfig *config);
void gimp_levels_config_stretch (GimpLevelsConfig *config,
GimpHistogram *histogram,
......
......@@ -23,6 +23,8 @@
#include <gegl.h>
#include "libgimpconfig/gimpconfig.h"
#include "gegl-types.h"
#include "gimpposterizeconfig.h"
......@@ -45,8 +47,9 @@ static void gimp_posterize_config_set_property (GObject *object,
GParamSpec *pspec);
G_DEFINE_TYPE (GimpPosterizeConfig, gimp_posterize_config,
G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_CODE (GimpPosterizeConfig, gimp_posterize_config,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
#define parent_class gimp_posterize_config_parent_class
......@@ -112,14 +115,3 @@ gimp_posterize_config_set_property (GObject *object,
break;
}
}
/* public functions */
void
gimp_posterize_config_reset (GimpPosterizeConfig *config)
{
g_return_if_fail (GIMP_IS_POSTERIZE_CONFIG (config));
config->levels = 3;
}
......@@ -48,7 +48,5 @@ struct _GimpPosterizeConfigClass
GType gimp_posterize_config_get_type (void) G_GNUC_CONST;
void gimp_posterize_config_reset (GimpPosterizeConfig *config);
#endif /* __GIMP_POSTERIZE_CONFIG_H__ */
......@@ -23,6 +23,8 @@
#include <gegl.h>