Commit 1186e83a authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Color correction tool chopping:

2002-08-26  Michael Natterer  <mitch@gimp.org>

	Color correction tool chopping:

	* app/Makefile.am
	* app/image_map.[ch]: removed...

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpimagemap.[ch]: ...and added here as object.

	* app/base/Makefile.am
	* app/base/base-types.h
	* app/base/color-balance.[ch]
	* app/base/curves.[ch]
	* app/base/hue-saturation.[ch]
	* app/base/threshold.[ch]: the lowlevel color correction functions
	plus their parameter structs cut out of the resp. tools.

	* app/core/core-enums.[ch]: removed GimpTransferMode enum...

	* app/base/base-enums.[ch]: ...added it here. Also added
	GimpHueRange for the new hue-saturation files.

	* tools/pdbgen/enums.pl
	* libgimp/gimpenums.h
	* plug-ins/script-fu/script-fu-constants.c: regenerated.

	* app/tools/Makefile.am
	* app/tools/gimpcolorbalancetool-transfer.c: removed (code went
	to base/color-balance.c).

	* app/tools/gimpimagemaptool.[ch]: added most code which was
	diplicated in subclasses. Create the dialog here with a nice title
	bar including image preview and name (fixes #66033). Added virtual
	functions map(), dialog() and reset() which need to be implemented
	by subclasses.

	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpcolorbalancetool.[ch]
	* app/tools/gimpcurvestool.[ch]
	* app/tools/gimphuesaturationtool.[ch]
	* app/tools/gimplevelstool.[ch]
	* app/tools/gimpposterizetool.[ch]
	* app/tools/gimpthresholdtool.[ch]: removed tons of duplicated
	code and simply implement GimpImageMapTool's virtual functions.
	Removed all dialog structs and keep the variables in the tool
	structs. The dialogs are now created on-the-fly and destroyed when
	the tool goes away, which makes all callbacks much simpler and
	safer. Lots of GUI & code cleanup in all dialogs.

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c: added separate "Reset Channel"
	buttons and let the global "Reset" buttons reset all color
	channels.

	* app/tools/tools.c: the various antique foo_free() functions
	don't exist any more.

	* app/tools/gimphistogramtool.c: removed ImageMap field from
	dialog struct (it was unused). Cleaned up dialog a bit.

	* tools/pdbgen/Makefile.am: don't scan tools/gimphuesaturationtool.h
	for enums.

	* tools/pdbgen/pdb/color.pdb: use the new stuff from base/ and
	don't include stuff from tools/ any more.

	* app/pdb/color_cmds.c
	* app/pdb/paint_tools_cmds.c: regenerated.
parent a7a2bc2b
2002-08-26 Michael Natterer <mitch@gimp.org>
Color correction tool chopping:
* app/Makefile.am
* app/image_map.[ch]: removed...
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpimagemap.[ch]: ...and added here as object.
* app/base/Makefile.am
* app/base/base-types.h
* app/base/color-balance.[ch]
* app/base/curves.[ch]
* app/base/hue-saturation.[ch]
* app/base/threshold.[ch]: the lowlevel color correction functions
plus their parameter structs cut out of the resp. tools.
* app/core/core-enums.[ch]: removed GimpTransferMode enum...
* app/base/base-enums.[ch]: ...added it here. Also added
GimpHueRange for the new hue-saturation files.
* tools/pdbgen/enums.pl
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c: regenerated.
* app/tools/Makefile.am
* app/tools/gimpcolorbalancetool-transfer.c: removed (code went
to base/color-balance.c).
* app/tools/gimpimagemaptool.[ch]: added most code which was
diplicated in subclasses. Create the dialog here with a nice title
bar including image preview and name (fixes #66033). Added virtual
functions map(), dialog() and reset() which need to be implemented
by subclasses.
* app/tools/gimpbrightnesscontrasttool.[ch]
* app/tools/gimpcolorbalancetool.[ch]
* app/tools/gimpcurvestool.[ch]
* app/tools/gimphuesaturationtool.[ch]
* app/tools/gimplevelstool.[ch]
* app/tools/gimpposterizetool.[ch]
* app/tools/gimpthresholdtool.[ch]: removed tons of duplicated
code and simply implement GimpImageMapTool's virtual functions.
Removed all dialog structs and keep the variables in the tool
structs. The dialogs are now created on-the-fly and destroyed when
the tool goes away, which makes all callbacks much simpler and
safer. Lots of GUI & code cleanup in all dialogs.
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c: added separate "Reset Channel"
buttons and let the global "Reset" buttons reset all color
channels.
* app/tools/tools.c: the various antique foo_free() functions
don't exist any more.
* app/tools/gimphistogramtool.c: removed ImageMap field from
dialog struct (it was unused). Cleaned up dialog a bit.
* tools/pdbgen/Makefile.am: don't scan tools/gimphuesaturationtool.h
for enums.
* tools/pdbgen/pdb/color.pdb: use the new stuff from base/ and
don't include stuff from tools/ any more.
* app/pdb/color_cmds.c
* app/pdb/paint_tools_cmds.c: regenerated.
2002-08-25 Sven Neumann <sven@gimp.org>
* plug-ins/common/sel_gauss.c: allow radius < 1.0 (bug #90957).
......
......@@ -27,13 +27,6 @@ gui_sources = \
undo_history.c \
undo_history.h
##
## stuff that needs to be split up in core / ui files
##
core_ui_sources = \
image_map.c \
image_map.h
##
## stuff which is about to be replaced by new subsystems
##
......@@ -73,7 +66,6 @@ stuff_sources = \
gimp_1_3_SOURCES = \
$(gui_sources) \
$(core_ui_sources) \
$(bye_sources) \
$(stuff_sources)
......
......@@ -20,12 +20,18 @@ libappbase_a_SOURCES = \
boundary.h \
brush-scale.c \
brush-scale.h \
color-balance.c \
color-balance.h \
curves.c \
curves.h \
$(mmx_sources) \
detect-mmx.h \
gimphistogram.c \
gimphistogram.h \
gimplut.c \
gimplut.h \
hue-saturation.c \
hue-saturation.h \
lut-funcs.c \
lut-funcs.h \
pixel-processor.c \
......@@ -36,6 +42,8 @@ libappbase_a_SOURCES = \
pixel-surround.h \
temp-buf.c \
temp-buf.h \
threshold.c \
threshold.h \
tile.c \
tile.h \
tile-private.h \
......
......@@ -130,5 +130,25 @@ gimp_histogram_channel_get_type (void)
}
static const GEnumValue gimp_transfer_mode_enum_values[] =
{
{ GIMP_SHADOWS, N_("Shadows"), "shadows" },
{ GIMP_MIDTONES, N_("Midtones"), "midtones" },
{ GIMP_HIGHLIGHTS, N_("Highlights"), "highlights" },
{ 0, NULL, NULL }
};
GType
gimp_transfer_mode_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpTransferMode", gimp_transfer_mode_enum_values);
return enum_type;
}
/* Generated data ends here */
......@@ -121,6 +121,18 @@ typedef enum /*< pdb-skip >*/
} GimpHistogramChannel;
#define GIMP_TYPE_TRANSFER_MODE (gimp_transfer_mode_get_type ())
GType gimp_transfer_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_SHADOWS, /*< desc="Shadows" >*/
GIMP_MIDTONES, /*< desc="Midtones" >*/
GIMP_HIGHLIGHTS /*< desc="Highlights" >*/
} GimpTransferMode;
/*
* non-registered enums; register them if needed
*/
......@@ -142,5 +154,16 @@ typedef enum /*< skip >*/
GIMP_GRAY_LUT = 0 /*< skip >*/
} GimpChannelLutType;
typedef enum /*< skip >*/
{
GIMP_ALL_HUES,
GIMP_RED_HUES,
GIMP_YELLOW_HUES,
GIMP_GREEN_HUES,
GIMP_CYAN_HUES,
GIMP_BLUE_HUES,
GIMP_MAGENTA_HUES
} GimpHueRange;
#endif /* __BASE_ENUMS_H__ */
......@@ -48,6 +48,11 @@ typedef struct _BoundSeg BoundSeg;
typedef struct _GimpHistogram GimpHistogram;
typedef struct _GimpLut GimpLut;
typedef struct _ColorBalance ColorBalance;
typedef struct _Curves Curves;
typedef struct _HueSaturation HueSaturation;
typedef struct _Threshold Threshold;
typedef struct _PixelRegionIterator PixelRegionIterator;
typedef struct _PixelRegion PixelRegion;
typedef struct _PixelRegionHolder PixelRegionHolder;
......
This diff is collapsed.
......@@ -16,74 +16,28 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_COLOR_BALANCE_DIALOG_H__
#define __GIMP_COLOR_BALANCE_DIALOG_H__
#ifndef __COLOR_BALANCE_H__
#define __COLOR_BALANCE_H__
#include "gimpimagemaptool.h"
#define GIMP_TYPE_COLOR_BALANCE_TOOL (gimp_color_balance_tool_get_type ())
#define GIMP_COLOR_BALANCE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceTool))
#define GIMP_COLOR_BALANCE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceToolClass))
#define GIMP_IS_COLOR_BALANCE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_BALANCE_TOOL))
#define GIMP_COLOR_BALANCE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceToolClass))
#define GIMP_IS_COLOR_BALANCE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_BALANCE_TOOL))
#define GIMP_COLOR_BALANCE_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceToolClass))
typedef struct _GimpColorBalanceTool GimpColorBalanceTool;
typedef struct _GimpColorBalanceToolClass GimpColorBalanceToolClass;
struct _GimpColorBalanceTool
{
GimpImageMapTool parent_instance;
};
struct _GimpColorBalanceToolClass
{
GimpImageMapToolClass parent_class;
};
typedef struct _ColorBalanceDialog ColorBalanceDialog;
struct _ColorBalanceDialog
struct _ColorBalance
{
GtkWidget *shell;
GtkAdjustment *cyan_red_adj;
GtkAdjustment *magenta_green_adj;
GtkAdjustment *yellow_blue_adj;
GimpDrawable *drawable;
ImageMap *image_map;
gboolean preserve_luminosity;
gdouble cyan_red[3];
gdouble magenta_green[3];
gdouble yellow_blue[3];
gdouble cyan_red[3];
gdouble magenta_green[3];
gdouble yellow_blue[3];
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
gboolean preserve_luminosity;
gboolean preview;
GimpTransferMode transfer_mode;
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
};
void gimp_color_balance_tool_register (GimpToolRegisterCallback callback,
gpointer data);
GType gimp_color_balance_tool_get_type (void) G_GNUC_CONST;
void color_balance_create_lookup_tables (ColorBalance *cb);
void color_balance (PixelRegion *srcPR,
PixelRegion *destPR,
void *data);
void color_balance_create_lookup_tables (ColorBalanceDialog *cbd);
gpointer data);
#endif /* __GIMP_COLOR_BALANCE_GIMP_H__ */
#endif /* __COLOR_BALANCE_H__ */
This diff is collapsed.
......@@ -16,87 +16,31 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_CURVES_TOOL_H__
#define __GIMP_CURVES_TOOL_H__
#ifndef __CURVES_H__
#define __CURVES_H__
#include "gimpimagemaptool.h"
#define CURVES_SMOOTH 0
#define CURVES_FREE 1
#define SMOOTH 0
#define GFREE 1
#define GIMP_TYPE_CURVES_TOOL (gimp_curves_tool_get_type ())
#define GIMP_CURVES_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CURVES_TOOL, GimpCurvesTool))
#define GIMP_IS_CURVES_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CURVES_TOOL))
#define GIMP_CURVES_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CURVES_TOOL, GimpCurvesToolClass))
#define GIMP_IS_CURVES_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CURVES_TOOL))
typedef struct _GimpCurvesTool GimpCurvesTool;
typedef struct _GimpCurvesToolClass GimpCurvesToolClass;
struct _GimpCurvesTool
{
GimpImageMapTool parent_instance;
};
struct _GimpCurvesToolClass
{
GimpImageMapToolClass parent_class;
};
typedef struct _CurvesDialog CurvesDialog;
struct _CurvesDialog
struct _Curves
{
GtkWidget *shell;
GtkWidget *channel_menu;
GtkWidget *xrange;
GtkWidget *yrange;
GtkWidget *graph;
GdkPixmap *pixmap;
GtkWidget *curve_type_menu;
PangoLayout *xpos_layout;
PangoLayout *cursor_layout;
PangoRectangle cursor_rect;
GimpDrawable *drawable;
ImageMap *image_map;
gint color;
gint channel;
gboolean preview;
gint grab_point;
gint last;
gint leftmost;
gint rightmost;
gint curve_type[5];
gint points[5][17][2];
guchar curve[5][256];
gint col_value[5];
GimpLut *lut;
gint curve_type[5];
gint points[5][17][2];
guchar curve[5][256];
};
void gimp_curves_tool_register (GimpToolRegisterCallback callback,
gpointer data);
GType gimp_curves_tool_get_type (void) G_GNUC_CONST;
void curves_free (void);
gfloat curves_lut_func (CurvesDialog *cd,
gint nchannels,
gint channel,
gfloat value);
void curves_calculate_curve (CurvesDialog *cd);
void curves_init (Curves *curves);
void curves_channel_reset (Curves *curves,
gint channel);
void curves_calculate_curve (Curves *curves,
gint channel);
gfloat curves_lut_func (Curves *curves,
gint nchannels,
gint channel,
gfloat value);
#endif /* __CURVES_H__ */
This diff is collapsed.
......@@ -16,82 +16,26 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_HUE_SATURATION_TOOL_H__
#define __GIMP_HUE_SATURATION_TOOL_H__
#ifndef __HUE_SATURATION_H__
#define __HUE_SATURATION_H__
#include "gimpimagemaptool.h"
typedef enum
{
ALL_HUES,
RED_HUES,
YELLOW_HUES,
GREEN_HUES,
CYAN_HUES,
BLUE_HUES,
MAGENTA_HUES
} HueRange;
#define GIMP_TYPE_HUE_SATURATION_TOOL (gimp_hue_saturation_tool_get_type ())
#define GIMP_HUE_SATURATION_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_HUE_SATURATION_TOOL, GimpHueSaturationTool))
#define GIMP_HUE_SATURATION_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_HUE_SATURATION_TOOL, GimpHueSaturationToolClass))
#define GIMP_IS_HUE_SATURATION_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_HUE_SATURATION_TOOL))
#define GIMP_IS_HUE_SATURATION_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_HUE_SATURATION_TOOL))
#define GIMP_HUE_SATURATION_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_HUE_SATURATION_TOOL, GimpHueSaturationToolClass))
typedef struct _GimpHueSaturationTool GimpHueSaturationTool;
typedef struct _GimpHueSaturationToolClass GimpHueSaturationToolClass;
struct _GimpHueSaturationTool
struct _HueSaturation
{
GimpImageMapTool parent_instance;
};
gdouble hue[7];
gdouble lightness[7];
gdouble saturation[7];
struct _GimpHueSaturationToolClass
{
GimpImageMapToolClass parent_class;
gint hue_transfer[6][256];
gint lightness_transfer[6][256];
gint saturation_transfer[6][256];
};
typedef struct _HueSaturationDialog HueSaturationDialog;
struct _HueSaturationDialog
{
GtkWidget *shell;
GtkWidget *hue_partition_da[6];
GtkAdjustment *hue_data;
GtkAdjustment *lightness_data;
GtkAdjustment *saturation_data;
GimpDrawable *drawable;
ImageMap *image_map;
gdouble hue[7];
gdouble lightness[7];
gdouble saturation[7];
HueRange hue_partition;
gboolean preview;
};
void gimp_hue_saturation_tool_register (GimpToolRegisterCallback callback,
gpointer data);
GType gimp_hue_saturation_tool_get_type (void) G_GNUC_CONST;
void hue_saturation_free (void);
void hue_saturation (PixelRegion *srcPR,
PixelRegion *destPR,
void *data);
void hue_saturation_calculate_transfers (HueSaturationDialog *hsd);
void hue_saturation_calculate_transfers (HueSaturation *hs);
void hue_saturation (PixelRegion *srcPR,
PixelRegion *destPR,
gpointer data);
#endif /* __HUE_SATURATION_H__ */
......@@ -18,274 +18,59 @@
#include "config.h"
#include <gtk/gtk.h>
#include <glib-object.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "base-types.h"
#include "tools-types.h"
#include "pixel-region.h"
#include "threshold.h"
#include "base/gimphistogram.h"
#include "base/pixel-region.h"
#include "paint-funcs/paint-funcs.h"
#include "core/gimpdrawable.h"
#include "core/gimpdrawable-histogram.h"
#include "core/gimpimage.h"
#include "widgets/gimphistogramview.h"
#include "display/gimpdisplay.h"
#include "gimpthresholdtool.h"
#include "tool_manager.h"
#include "app_procs.h"
#include "image_map.h"
#include "libgimp/gimpintl.h"
#define HISTOGRAM_WIDTH 256
#define HISTOGRAM_HEIGHT 150
#define LOW 0x1
#define HIGH 0x2
#define HISTOGRAM 0x4
#define ALL (LOW | HIGH | HISTOGRAM)
/* local function prototypes */
static void gimp_threshold_tool_class_init (GimpThresholdToolClass *klass);
static void gimp_threshold_tool_init (GimpThresholdTool *threshold_tool);
static void gimp_threshold_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_threshold_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static ThresholdDialog * threshold_dialog_new (void);
static void threshold_dialog_hide (void);
static void threshold_update (ThresholdDialog *td,
gint update);
static void threshold_preview (ThresholdDialog *td);
static void threshold_reset_callback (GtkWidget *widget,
gpointer data);
static void threshold_ok_callback (GtkWidget *widget,
gpointer data);
static void threshold_cancel_callback (GtkWidget *widget,
gpointer data);
static void threshold_preview_update (GtkWidget *widget,
gpointer data);
static void threshold_low_threshold_adjustment_update (GtkAdjustment *adj,
gpointer data);
static void threshold_high_threshold_adjustment_update (GtkAdjustment *adj,
gpointer data);
static void threshold (PixelRegion *,
PixelRegion *,
gpointer );
static void threshold_histogram_range (GimpHistogramView *,
gint ,
gint ,
gpointer );
static ThresholdDialog *threshold_dialog = NULL;
static GimpImageMapToolClass *parent_class = NULL;
/* functions */
void
gimp_threshold_tool_register (GimpToolRegisterCallback callback,
gpointer data)
{
(* callback) (GIMP_TYPE_THRESHOLD_TOOL,
NULL,
FALSE,
"gimp-threshold-tool",
_("Threshold"),
_("Reduce image to two colors using a threshold"),
N_("/Layer/Colors/Threshold..."), NULL,
NULL, "tools/threshold.html",
GIMP_STOCK_TOOL_THRESHOLD,
data);
}
GType
gimp_threshold_tool_get_type (void)
{
static GType tool_type = 0;
if (! tool_type)
{
static const GTypeInfo tool_info =
{
sizeof (GimpThresholdToolClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_threshold_tool_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpThresholdTool),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_threshold_tool_init,
};
tool_type = g_type_register_static (GIMP_TYPE_IMAGE_MAP_TOOL,
"GimpThresholdTool",
&tool_info, 0);
}
return tool_type;
}
static void
gimp_threshold_tool_class_init (GimpThresholdToolClass *klass)
{
GimpToolClass *tool_class;
tool_class = GIMP_TOOL_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
tool_class->initialize = gimp_threshold_tool_initialize;
tool_class->control = gimp_threshold_tool_control;
}
static void
gimp_threshold_tool_init (GimpThresholdTool *bc_tool)
{
}
static void
gimp_threshold_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp)
{
if (! gdisp)
{
threshold_dialog_hide ();
return;
}
if (gimp_drawable_is_indexed (gimp_image_active_drawable (gdisp->gimage)))
{
g_message (_("Threshold does not operate on indexed drawables."));
return;
}
/* The threshold dialog */
if (!threshold_dialog)
threshold_dialog = threshold_dialog_new ();
else
if (!GTK_WIDGET_VISIBLE (threshold_dialog->shell))
gtk_widget_show (threshold_dialog->shell);
threshold_dialog->low_threshold = 127;
threshold_dialog->high_threshold = 255;
threshold_dialog->drawable = gimp_image_active_drawable (gdisp->gimage);
threshold_dialog->color = gimp_drawable_is_rgb (threshold_dialog->drawable);
threshold_dialog->image_map =
image_map_create (gdisp, threshold_dialog->drawable);
gimp_drawable_calculate_histogram (threshold_dialog->drawable,
threshold_dialog->hist);
g_signal_handlers_block_by_func (G_OBJECT (threshold_dialog->histogram),
threshold_histogram_range,
threshold_dialog);
gimp_histogram_view_update (threshold_dialog->histogram,
threshold_dialog->hist);
g_signal_handlers_unblock_by_func (G_OBJECT (threshold_dialog->histogram),
threshold_histogram_range,
threshold_dialog);
threshold_update (threshold_dialog, ALL);
if (threshold_dialog->preview)
threshold_preview (threshold_dialog);
}
static void
gimp_threshold_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
case PAUSE:
break;
case RESUME:
break;
case HALT:
threshold_dialog_hide ();
break;
default:
break;
}
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
/* threshold machinery */
void
threshold_2 (gpointer data,
PixelRegion *srcPR,
PixelRegion *destPR)
{