app/base/Makefile.am app/base/base-enums.c app/core/Makefile.am

2002-03-19  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/base/base-enums.c
	* app/core/Makefile.am
	* app/core/core-enums.c
	* app/widgets/Makefile.am
	* app/widgets/widgets-enums.c: purely cosmetic change.

	* app/paint/Makefile.am
	* app/paint/paint-enums.[ch]: generate paint-enums.c with registered
	enums. Skip GIMP_BRUSH_PRESSURE and GIMP_CUSTOM_CONVOLVE so they
	don't get exported to libgimp and are not registered as enum values.

	* tools/pdbgen/pdb/paint_tools.pdb: removed special casing of
	GimpBrushApplicationMode and GimpConvolveType since the forbidden
	values are now skipped anyway.

	* libgimp/gimpcompat.h: removed compat defines for the forbidden
	enum values. They shouldn't have been used.

	* app/tools/Makefile.am
	* app/tools/tools-enums.[ch]: generate tools-enums.c with registered
	enums.

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

	* app/paint/gimpclone.[ch]
	* app/paint/gimpconvolve.h
	* app/paint/gimpdodgeburn.h
	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.[ch]
	* app/tools/gimpdodgeburntool.c
	* app/tools/paint_options.c: changed accordingly. Added more enum
	radio frames and enum option menus.
This commit is contained in:
Sven Neumann 2002-03-19 19:17:31 +00:00 committed by Sven Neumann
parent 490e33cc0b
commit 3db3dff47e
35 changed files with 615 additions and 314 deletions

View file

@ -1,3 +1,42 @@
2002-03-19 Sven Neumann <sven@gimp.org>
* app/base/Makefile.am
* app/base/base-enums.c
* app/core/Makefile.am
* app/core/core-enums.c
* app/widgets/Makefile.am
* app/widgets/widgets-enums.c: purely cosmetic change.
* app/paint/Makefile.am
* app/paint/paint-enums.[ch]: generate paint-enums.c with registered
enums. Skip GIMP_BRUSH_PRESSURE and GIMP_CUSTOM_CONVOLVE so they
don't get exported to libgimp and are not registered as enum values.
* tools/pdbgen/pdb/paint_tools.pdb: removed special casing of
GimpBrushApplicationMode and GimpConvolveType since the forbidden
values are now skipped anyway.
* libgimp/gimpcompat.h: removed compat defines for the forbidden
enum values. They shouldn't have been used.
* app/tools/Makefile.am
* app/tools/tools-enums.[ch]: generate tools-enums.c with registered
enums.
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
* app/paint/gimpclone.[ch]
* app/paint/gimpconvolve.h
* app/paint/gimpdodgeburn.h
* app/tools/gimpclonetool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpcroptool.[ch]
* app/tools/gimpdodgeburntool.c
* app/tools/paint_options.c: changed accordingly. Added more enum
radio frames and enum option menus.
2002-03-19 Sven Neumann <sven@gimp.org>
* ChangeLog.plug-ins

View file

@ -69,7 +69,7 @@ CLEANFILES = $(gen_sources)
$(srcdir)/base-enums.c: $(srcdir)/base-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"base-enums.h\"\n#include\"libgimp/gimpintl.h\"" \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"base-enums.h\"\n#include \"libgimp/gimpintl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \

View file

@ -4,7 +4,7 @@
#include "config.h"
#include <glib-object.h>
#include "base-enums.h"
#include"libgimp/gimpintl.h"
#include "libgimp/gimpintl.h"
/* enumerations from "./base-enums.h" */

View file

@ -196,7 +196,7 @@ $(srcdir)/gimpmarshal.c: $(srcdir)/gimpmarshal.h
$(srcdir)/core-enums.c: $(srcdir)/core-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"core-enums.h\"\n#include\"libgimp/gimpintl.h\"" \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"core-enums.h\"\n#include \"libgimp/gimpintl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \

View file

@ -4,7 +4,7 @@
#include "config.h"
#include <glib-object.h>
#include "core-enums.h"
#include"libgimp/gimpintl.h"
#include "libgimp/gimpintl.h"
/* enumerations from "./core-enums.h" */

View file

@ -4,6 +4,7 @@ noinst_LIBRARIES = libapppaint.a
libapppaint_a_SOURCES = @STRIP_BEGIN@ \
paint-enums.h \
paint-enums.c \
paint-types.h \
paint.c \
paint.h \
@ -47,3 +48,21 @@ INCLUDES = @STRIP_BEGIN@ \
$(PANGOFT2_CFLAGS) \
-I$(includedir) \
@STRIP_END@
#
# rules to generate built sources
#
# setup autogeneration dependancies
gen_sources = xgen-pec
CLEANFILES = $(gen_sources)
$(srcdir)/paint-enums.c: $(srcdir)/paint-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"paint-enums.h\"\n#include \"libgimp/gimpintl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType enum_type = 0;\n\n if (!enum_type)\n enum_type = g_enum_register_static (\"@EnumName@\", @enum_name@_enum_values);\n\n return enum_type;\n}\n" \
$(srcdir)/paint-enums.h > xgen-pec \
&& cp xgen-pec $(@F) \
&& rm -f xgen-pec

View file

@ -206,7 +206,7 @@ gimp_clone_paint (GimpPaintCore *paint_core,
dest_x = paint_core->cur_coords.x;
dest_y = paint_core->cur_coords.y;
if (options->aligned == ALIGN_REGISTERED)
if (options->aligned == GIMP_CLONE_ALIGN_REGISTERED)
{
offset_x = 0;
offset_y = 0;
@ -238,7 +238,7 @@ gimp_clone_paint (GimpPaintCore *paint_core,
clone->src_y = paint_core->cur_coords.y;
first = TRUE;
}
else if (options->aligned == ALIGN_NO)
else if (options->aligned == GIMP_CLONE_ALIGN_NO)
{
first = TRUE;
orig_src_x = clone->src_x;
@ -257,7 +257,7 @@ gimp_clone_paint (GimpPaintCore *paint_core,
if (clone->finish_callback)
clone->finish_callback (clone, clone->callback_data);
if (options->aligned == ALIGN_NO && !first)
if (options->aligned == GIMP_CLONE_ALIGN_NO && !first)
{
clone->src_x = orig_src_x;
clone->src_y = orig_src_y;
@ -560,7 +560,7 @@ gimp_clone_set_src_drawable (GimpClone *clone,
/* paint options stuff */
#define CLONE_DEFAULT_TYPE GIMP_IMAGE_CLONE
#define CLONE_DEFAULT_ALIGNED ALIGN_NO
#define CLONE_DEFAULT_ALIGNED GIMP_CLONE_ALIGN_NO
GimpCloneOptions *
gimp_clone_options_new (void)

View file

@ -24,14 +24,6 @@
#include "gimppaintoptions.h"
typedef enum /*< skip >*/ /*< pdb-skip >*/
{
ALIGN_NO,
ALIGN_YES,
ALIGN_REGISTERED
} AlignType;
#define GIMP_TYPE_CLONE (gimp_clone_get_type ())
#define GIMP_CLONE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CLONE, GimpClone))
#define GIMP_CLONE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CLONE, GimpCloneClass))
@ -75,15 +67,15 @@ typedef struct _GimpCloneOptions GimpCloneOptions;
struct _GimpCloneOptions
{
GimpPaintOptions paint_options;
GimpPaintOptions paint_options;
GimpCloneType type;
GimpCloneType type_d;
GtkWidget *type_w[2]; /* 2 radio buttons */
GimpCloneType type;
GimpCloneType type_d;
GtkWidget *type_w;
AlignType aligned;
AlignType aligned_d;
GtkWidget *aligned_w[3]; /* 3 radio buttons */
GimpCloneAlignMode aligned;
GimpCloneAlignMode aligned_d;
GtkWidget *aligned_w;
};

View file

@ -54,7 +54,7 @@ struct _GimpConvolveOptions
GimpConvolveType type;
GimpConvolveType type_d;
GtkWidget *type_w[2];
GtkWidget *type_w;
gdouble rate;
gdouble rate_d;

View file

@ -396,7 +396,7 @@ gimp_dodgeburn_shadows_lut_func (gpointer user_data,
#define DODGEBURN_DEFAULT_EXPOSURE 50.0
#define DODGEBURN_DEFAULT_TYPE GIMP_DODGE
#define DODGEBURN_DEFAULT_MODE GIMP_HIGHLIGHTS
#define DODGEBURN_DEFAULT_MODE GIMP_MIDTONES
GimpDodgeBurnOptions *
gimp_dodgeburn_options_new (void)

View file

@ -53,7 +53,7 @@ struct _GimpDodgeBurnOptions
GimpDodgeBurnType type;
GimpDodgeBurnType type_d;
GtkWidget *type_w[2];
GtkWidget *type_w;
GimpTransferMode mode; /*highlights, midtones, shadows*/
GimpTransferMode mode_d;

View file

@ -206,7 +206,7 @@ gimp_clone_paint (GimpPaintCore *paint_core,
dest_x = paint_core->cur_coords.x;
dest_y = paint_core->cur_coords.y;
if (options->aligned == ALIGN_REGISTERED)
if (options->aligned == GIMP_CLONE_ALIGN_REGISTERED)
{
offset_x = 0;
offset_y = 0;
@ -238,7 +238,7 @@ gimp_clone_paint (GimpPaintCore *paint_core,
clone->src_y = paint_core->cur_coords.y;
first = TRUE;
}
else if (options->aligned == ALIGN_NO)
else if (options->aligned == GIMP_CLONE_ALIGN_NO)
{
first = TRUE;
orig_src_x = clone->src_x;
@ -257,7 +257,7 @@ gimp_clone_paint (GimpPaintCore *paint_core,
if (clone->finish_callback)
clone->finish_callback (clone, clone->callback_data);
if (options->aligned == ALIGN_NO && !first)
if (options->aligned == GIMP_CLONE_ALIGN_NO && !first)
{
clone->src_x = orig_src_x;
clone->src_y = orig_src_y;
@ -560,7 +560,7 @@ gimp_clone_set_src_drawable (GimpClone *clone,
/* paint options stuff */
#define CLONE_DEFAULT_TYPE GIMP_IMAGE_CLONE
#define CLONE_DEFAULT_ALIGNED ALIGN_NO
#define CLONE_DEFAULT_ALIGNED GIMP_CLONE_ALIGN_NO
GimpCloneOptions *
gimp_clone_options_new (void)

View file

@ -24,14 +24,6 @@
#include "gimppaintoptions.h"
typedef enum /*< skip >*/ /*< pdb-skip >*/
{
ALIGN_NO,
ALIGN_YES,
ALIGN_REGISTERED
} AlignType;
#define GIMP_TYPE_CLONE (gimp_clone_get_type ())
#define GIMP_CLONE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CLONE, GimpClone))
#define GIMP_CLONE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CLONE, GimpCloneClass))
@ -75,15 +67,15 @@ typedef struct _GimpCloneOptions GimpCloneOptions;
struct _GimpCloneOptions
{
GimpPaintOptions paint_options;
GimpPaintOptions paint_options;
GimpCloneType type;
GimpCloneType type_d;
GtkWidget *type_w[2]; /* 2 radio buttons */
GimpCloneType type;
GimpCloneType type_d;
GtkWidget *type_w;
AlignType aligned;
AlignType aligned_d;
GtkWidget *aligned_w[3]; /* 3 radio buttons */
GimpCloneAlignMode aligned;
GimpCloneAlignMode aligned_d;
GtkWidget *aligned_w;
};

110
app/paint/paint-enums.c Normal file
View file

@ -0,0 +1,110 @@
/* Generated data (by gimp-mkenums) */
#include "config.h"
#include <glib-object.h>
#include "paint-enums.h"
#include "libgimp/gimpintl.h"
/* enumerations from "./paint-enums.h" */
static const GEnumValue gimp_clone_type_enum_values[] =
{
{ GIMP_IMAGE_CLONE, N_("Image Source"), "image-clone" },
{ GIMP_PATTERN_CLONE, N_("Pattern Source"), "pattern-clone" },
{ 0, NULL, NULL }
};
GType
gimp_clone_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpCloneType", gimp_clone_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_clone_align_mode_enum_values[] =
{
{ GIMP_CLONE_ALIGN_NO, N_("Non Aligned"), "no" },
{ GIMP_CLONE_ALIGN_YES, N_("Aligned"), "yes" },
{ GIMP_CLONE_ALIGN_REGISTERED, N_("Registered"), "registered" },
{ 0, NULL, NULL }
};
GType
gimp_clone_align_mode_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpCloneAlignMode", gimp_clone_align_mode_enum_values);
return enum_type;
}
static const GEnumValue gimp_dodge_burn_type_enum_values[] =
{
{ GIMP_DODGE, N_("Dodge"), "dodge" },
{ GIMP_BURN, N_("Burn"), "burn" },
{ 0, NULL, NULL }
};
GType
gimp_dodge_burn_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpDodgeBurnType", gimp_dodge_burn_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_gradient_paint_mode_enum_values[] =
{
{ GIMP_GRADIENT_ONCE_FORWARD, N_("Once Forward"), "once-forward" },
{ GIMP_GRADIENT_ONCE_BACKWARD, N_("Once Backward"), "once-backward" },
{ GIMP_GRADIENT_LOOP_SAWTOOTH, N_("Loop Sawtooth"), "loop-sawtooth" },
{ GIMP_GRADIENT_LOOP_TRIANGLE, N_("Loop Triangle"), "loop-triangle" },
{ 0, NULL, NULL }
};
GType
gimp_gradient_paint_mode_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpGradientPaintMode", gimp_gradient_paint_mode_enum_values);
return enum_type;
}
static const GEnumValue gimp_convolve_type_enum_values[] =
{
{ GIMP_BLUR_CONVOLVE, N_("Blur"), "blur-convolve" },
{ GIMP_SHARPEN_CONVOLVE, N_("Sharpen"), "sharpen-convolve" },
{ 0, NULL, NULL }
};
GType
gimp_convolve_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpConvolveType", gimp_convolve_type_enum_values);
return enum_type;
}
/* Generated data ends here */

View file

@ -32,49 +32,85 @@
#endif
/*
* these enums that are registered with the type system
*/
#define GIMP_TYPE_CLONE_TYPE (gimp_clone_type_get_type ())
GType gimp_clone_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_IMAGE_CLONE, /*< desc="Image Source" >*/
GIMP_PATTERN_CLONE /*< desc="Pattern Source" >*/
} GimpCloneType;
#define GIMP_TYPE_CLONE_ALIGN_MODE (gimp_clone_align_mode_get_type ())
GType gimp_clone_align_mode_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CLONE_ALIGN_NO, /*< desc="Non Aligned" >*/
GIMP_CLONE_ALIGN_YES, /*< desc="Aligned" >*/
GIMP_CLONE_ALIGN_REGISTERED /*< desc="Registered" >*/
} GimpCloneAlignMode;
#define GIMP_TYPE_DODGE_BURN_TYPE (gimp_dodge_burn_type_get_type ())
GType gimp_dodge_burn_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_DODGE, /*< desc="Dodge" >*/
GIMP_BURN /*< desc="Burn" >*/
} GimpDodgeBurnType;
#define GIMP_TYPE_GRADIENT_PAINT_MODE (gimp_gradient_paint_mode_get_type ())
GType gimp_gradient_paint_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_GRADIENT_ONCE_FORWARD, /*< desc="Once Forward" >*/
GIMP_GRADIENT_ONCE_BACKWARD, /*< desc="Once Backward" >*/
GIMP_GRADIENT_LOOP_SAWTOOTH, /*< desc="Loop Sawtooth" >*/
GIMP_GRADIENT_LOOP_TRIANGLE /*< desc="Loop Triangle" >*/
} GimpGradientPaintMode;
#define GIMP_TYPE_CONVOLVE_TYPE (gimp_convolve_type_get_type ())
GType gimp_convolve_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_BLUR_CONVOLVE, /*< desc="Blur" >*/
GIMP_SHARPEN_CONVOLVE, /*< desc="Sharpen" >*/
GIMP_CUSTOM_CONVOLVE /*< skip >*/
} GimpConvolveType;
/*
* non-registered enums; register them if needed
*/
typedef enum /*< skip >*/
{
GIMP_BRUSH_HARD, /* pencil */
GIMP_BRUSH_SOFT, /* paintbrush */
GIMP_BRUSH_PRESSURE /* paintbrush with variable pressure */
GIMP_BRUSH_HARD,
GIMP_BRUSH_SOFT,
GIMP_BRUSH_PRESSURE /*< skip >*/
} GimpBrushApplicationMode;
typedef enum /*< skip >*/
{
GIMP_PAINT_CONSTANT, /* pencil, paintbrush, airbrush, clone */
GIMP_PAINT_INCREMENTAL /* convolve, smudge */
GIMP_PAINT_CONSTANT,
GIMP_PAINT_INCREMENTAL
} GimpPaintApplicationMode;
typedef enum /*< skip >*/
{
GIMP_GRADIENT_ONCE_FORWARD,
GIMP_GRADIENT_ONCE_BACKWARD,
GIMP_GRADIENT_LOOP_SAWTOOTH,
GIMP_GRADIENT_LOOP_TRIANGLE
} GimpGradientPaintMode;
typedef enum /*< skip >*/
{
GIMP_DODGE,
GIMP_BURN
} GimpDodgeBurnType;
typedef enum /*< skip >*/
{
GIMP_BLUR_CONVOLVE,
GIMP_SHARPEN_CONVOLVE,
GIMP_CUSTOM_CONVOLVE
} GimpConvolveType;
typedef enum /*< skip >*/
{
GIMP_IMAGE_CLONE,
GIMP_PATTERN_CLONE
} GimpCloneType;
#endif /* __PAINT_ENUMS_H__ */

View file

@ -4,6 +4,7 @@ noinst_LIBRARIES = libapptools.a
libapptools_a_SOURCES = @STRIP_BEGIN@ \
tools-enums.h \
tools-enums.c \
tools-types.h \
tools.c \
tools.h \
@ -137,3 +138,21 @@ INCLUDES = @STRIP_BEGIN@ \
$(PANGOFT2_CFLAGS) \
-I$(includedir) \
@STRIP_END@
#
# rules to generate built sources
#
# setup autogeneration dependancies
gen_sources = xgen-tec
CLEANFILES = $(gen_sources)
$(srcdir)/tools-enums.c: $(srcdir)/tools-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"tools-enums.h\"\n#include \"libgimp/gimpintl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType enum_type = 0;\n\n if (!enum_type)\n enum_type = g_enum_register_static (\"@EnumName@\", @enum_name@_enum_values);\n\n return enum_type;\n}\n" \
$(srcdir)/tools-enums.h > xgen-tec \
&& cp xgen-tec $(@F) \
&& rm -f xgen-tec

View file

@ -33,6 +33,8 @@
#include "display/gimpdisplay.h"
#include "widgets/gimpenummenu.h"
#include "gimpclonetool.h"
#include "paint_options.h"
@ -367,42 +369,26 @@ clone_options_new (GimpToolInfo *tool_info)
/* the main vbox */
vbox = ((GimpToolOptions *) options)->main_vbox;
frame = gimp_radio_group_new2 (TRUE, _("Source"),
G_CALLBACK (gimp_radio_button_update),
&options->type,
GINT_TO_POINTER (options->type),
_("Image Source"),
GINT_TO_POINTER (GIMP_IMAGE_CLONE),
&options->type_w[0],
_("Pattern Source"),
GINT_TO_POINTER (GIMP_PATTERN_CLONE),
&options->type_w[1],
NULL);
frame = gimp_enum_radio_frame_new (GIMP_TYPE_CLONE_TYPE,
gtk_label_new (_("Source")),
2,
G_CALLBACK (gimp_radio_button_update),
&options->type,
&options->type_w);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
frame = gimp_radio_group_new2 (TRUE, _("Alignment"),
G_CALLBACK (gimp_radio_button_update),
&options->aligned,
GINT_TO_POINTER (options->aligned),
_("Non Aligned"),
GINT_TO_POINTER (ALIGN_NO),
&options->aligned_w[0],
_("Aligned"),
GINT_TO_POINTER (ALIGN_YES),
&options->aligned_w[1],
_("Registered"),
GINT_TO_POINTER (ALIGN_REGISTERED),
&options->aligned_w[2],
NULL);
frame = gimp_enum_radio_frame_new (GIMP_TYPE_CLONE_ALIGN_MODE,
gtk_label_new (_("Alignment")),
2,
G_CALLBACK (gimp_radio_button_update),
&options->aligned,
&options->aligned_w);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->aligned_w),
GINT_TO_POINTER (options->aligned));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@ -419,8 +405,8 @@ clone_options_reset (GimpToolOptions *tool_options)
paint_options_reset (tool_options);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type_d));
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->aligned_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->aligned_w),
GINT_TO_POINTER (options->aligned_d));
}

View file

@ -39,6 +39,8 @@
#include "paint/gimpconvolve.h"
#include "widgets/gimpenummenu.h"
#include "gimpconvolvetool.h"
#include "paint_options.h"
@ -167,11 +169,11 @@ gimp_convolve_tool_modifier_key (GimpTool *tool,
switch (options->type)
{
case GIMP_BLUR_CONVOLVE:
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (GIMP_SHARPEN_CONVOLVE));
break;
case GIMP_SHARPEN_CONVOLVE:
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (GIMP_BLUR_CONVOLVE));
break;
default:
@ -215,20 +217,14 @@ convolve_options_new (GimpToolInfo *tool_info)
/* the main vbox */
vbox = ((GimpToolOptions *) options)->main_vbox;
frame = gimp_radio_group_new2 (TRUE, _("Convolve Type (<Ctrl>)"),
G_CALLBACK (gimp_radio_button_update),
&options->type,
GINT_TO_POINTER (options->type),
_("Blur"),
GINT_TO_POINTER (GIMP_BLUR_CONVOLVE),
&options->type_w[0],
_("Sharpen"),
GINT_TO_POINTER (GIMP_SHARPEN_CONVOLVE),
&options->type_w[1],
NULL);
frame = gimp_enum_radio_frame_new (GIMP_TYPE_CONVOLVE_TYPE,
gtk_label_new (_("Convolve Type (<Ctrl>)")),
2,
G_CALLBACK (gimp_radio_button_update),
&options->type,
&options->type_w);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@ -265,6 +261,6 @@ convolve_options_reset (GimpToolOptions *tool_options)
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->rate_w),
options->rate_d);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type_d));
}

View file

@ -40,6 +40,8 @@
#include "gui/info-dialog.h"
#include "widgets/gimpenummenu.h"
#include "gimpcroptool.h"
#include "tool_manager.h"
#include "tool_options.h"
@ -70,17 +72,17 @@ struct _CropOptions
{
GimpToolOptions tool_options;
gboolean layer_only;
gboolean layer_only_d;
GtkWidget *layer_only_w;
gboolean layer_only;
gboolean layer_only_d;
GtkWidget *layer_only_w;
gboolean allow_enlarge;
gboolean allow_enlarge_d;
GtkWidget *allow_enlarge_w;
gboolean allow_enlarge;
gboolean allow_enlarge_d;
GtkWidget *allow_enlarge_w;
CropType type;
CropType type_d;
GtkWidget *type_w[2];
GimpCropType type;
GimpCropType type_d;
GtkWidget *type_w;
};
@ -414,7 +416,7 @@ gimp_crop_tool_button_release (GimpTool *tool,
{
if (crop->function == CROPPING)
{
if (options->type == CROP_CROP)
if (options->type == GIMP_CROP)
crop_tool_crop_image (gdisp->gimage,
crop->x1, crop->y1,
crop->x2, crop->y2,
@ -691,13 +693,13 @@ gimp_crop_tool_modifier_key (GimpTool *tool,
{
switch (options->type)
{
case CROP_CROP:
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (RESIZE_CROP));
case GIMP_CROP:
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (GIMP_RESIZE));
break;
case RESIZE_CROP:
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (CROP_CROP));
case GIMP_RESIZE:
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (GIMP_CROP));
break;
default:
break;
@ -768,7 +770,7 @@ gimp_crop_tool_cursor_update (GimpTool *tool,
}
tool->cursor = ctype;
tool->tool_cursor = (options->type == CROP_CROP ?
tool->tool_cursor = (options->type == GIMP_CROP ?
GIMP_CROP_TOOL_CURSOR : GIMP_RESIZE_TOOL_CURSOR);
tool->cursor_modifier = cmodifier;
@ -1341,26 +1343,20 @@ crop_options_new (GimpToolInfo *tool_info)
options->layer_only = options->layer_only_d = FALSE;
options->allow_enlarge = options->allow_enlarge_d = FALSE;
options->type = options->type_d = CROP_CROP;
options->type = options->type_d = GIMP_CROP;
/* the main vbox */
vbox = options->tool_options.main_vbox;
/* tool toggle */
frame = gimp_radio_group_new2 (TRUE, _("Tool Toggle (<Ctrl>)"),
G_CALLBACK (gimp_radio_button_update),
&options->type,
GINT_TO_POINTER (options->type),
_("Crop"),
GINT_TO_POINTER (CROP_CROP),
&options->type_w[0],
_("Resize"),
GINT_TO_POINTER (RESIZE_CROP),
&options->type_w[1],
NULL);
frame = gimp_enum_radio_frame_new (GIMP_TYPE_CROP_TYPE,
gtk_label_new (_("Tool Toggle (<Ctrl>)")),
2,
G_CALLBACK (gimp_radio_button_update),
&options->type,
&options->type_w);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@ -1404,6 +1400,6 @@ crop_options_reset (GimpToolOptions *tool_options)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(options->allow_enlarge_w),
options->allow_enlarge_d);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type_d));
}

View file

@ -23,14 +23,6 @@
#include "gimpdrawtool.h"
/* XXX Used? */
typedef enum
{
CROP_CROP,
RESIZE_CROP
} CropType;
#define GIMP_TYPE_CROP_TOOL (gimp_crop_tool_get_type ())
#define GIMP_CROP_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CROP_TOOL, GimpCropTool))
#define GIMP_CROP_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CROP_TOOL, GimpCropToolClass))

View file

@ -145,11 +145,11 @@ gimp_dodgeburn_tool_modifier_key (GimpTool *tool,
switch (options->type)
{
case GIMP_DODGE:
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (GIMP_BURN));
break;
case GIMP_BURN:
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (GIMP_DODGE));
break;
default:
@ -196,20 +196,14 @@ gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info)
vbox = ((GimpToolOptions *) options)->main_vbox;
/* the type (dodge or burn) */
frame = gimp_radio_group_new2 (TRUE, _("Type (<Ctrl>)"),
G_CALLBACK (gimp_radio_button_update),
&options->type,
GINT_TO_POINTER (options->type),
_("Dodge"),
GINT_TO_POINTER (GIMP_DODGE),
&options->type_w[0],
_("Burn"),
GINT_TO_POINTER (GIMP_BURN),
&options->type_w[1],
NULL);
frame = gimp_enum_radio_frame_new (GIMP_TYPE_DODGE_BURN_TYPE,
gtk_label_new (_("Type (<Ctrl>)")),
2,
G_CALLBACK (gimp_radio_button_update),
&options->type,
&options->type_w);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@ -259,7 +253,7 @@ gimp_dodgeburn_tool_options_reset (GimpToolOptions *tool_options)
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->exposure_w),
options->exposure_d);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type_d));
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->mode_w),

View file

@ -524,28 +524,11 @@ gradient_options_init (GimpGradientOptions *gradient,
/* the gradient type */
gradient->gradient_type_w =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (gimp_menu_item_update),
&gradient->gradient_type,
(gpointer) gradient->gradient_type_d,
_("Once Forward"),
GINT_TO_POINTER (GIMP_GRADIENT_ONCE_FORWARD),
NULL,
_("Once Backward"),
GINT_TO_POINTER (GIMP_GRADIENT_ONCE_BACKWARD),
NULL,
_("Loop Sawtooth"),
GINT_TO_POINTER (GIMP_GRADIENT_LOOP_SAWTOOTH),
NULL,
_("Loop Triangle"),
GINT_TO_POINTER (GIMP_GRADIENT_LOOP_TRIANGLE),
NULL,
NULL);
gimp_enum_option_menu_new (GIMP_TYPE_GRADIENT_PAINT_MODE,
G_CALLBACK (gimp_menu_item_update),
&gradient->gradient_type);
gimp_option_menu_set_history (GTK_OPTION_MENU (gradient->gradient_type_w),
GINT_TO_POINTER (gradient->gradient_type_d));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Type:"), 1.0, 0.5,

View file

@ -33,6 +33,8 @@
#include "display/gimpdisplay.h"
#include "widgets/gimpenummenu.h"
#include "gimpclonetool.h"
#include "paint_options.h"
@ -367,42 +369,26 @@ clone_options_new (GimpToolInfo *tool_info)
/* the main vbox */
vbox = ((GimpToolOptions *) options)->main_vbox;
frame = gimp_radio_group_new2 (TRUE, _("Source"),
G_CALLBACK (gimp_radio_button_update),
&options->type,
GINT_TO_POINTER (options->type),
_("Image Source"),
GINT_TO_POINTER (GIMP_IMAGE_CLONE),
&options->type_w[0],
_("Pattern Source"),
GINT_TO_POINTER (GIMP_PATTERN_CLONE),
&options->type_w[1],
NULL);
frame = gimp_enum_radio_frame_new (GIMP_TYPE_CLONE_TYPE,
gtk_label_new (_("Source")),
2,
G_CALLBACK (gimp_radio_button_update),
&options->type,
&options->type_w);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
frame = gimp_radio_group_new2 (TRUE, _("Alignment"),
G_CALLBACK (gimp_radio_button_update),
&options->aligned,
GINT_TO_POINTER (options->aligned),
_("Non Aligned"),
GINT_TO_POINTER (ALIGN_NO),
&options->aligned_w[0],
_("Aligned"),
GINT_TO_POINTER (ALIGN_YES),
&options->aligned_w[1],
_("Registered"),
GINT_TO_POINTER (ALIGN_REGISTERED),
&options->aligned_w[2],
NULL);
frame = gimp_enum_radio_frame_new (GIMP_TYPE_CLONE_ALIGN_MODE,
gtk_label_new (_("Alignment")),
2,
G_CALLBACK (gimp_radio_button_update),
&options->aligned,
&options->aligned_w);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->aligned_w),
GINT_TO_POINTER (options->aligned));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@ -419,8 +405,8 @@ clone_options_reset (GimpToolOptions *tool_options)
paint_options_reset (tool_options);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type_d));
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->aligned_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->aligned_w),
GINT_TO_POINTER (options->aligned_d));
}

View file

@ -524,28 +524,11 @@ gradient_options_init (GimpGradientOptions *gradient,
/* the gradient type */
gradient->gradient_type_w =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (gimp_menu_item_update),
&gradient->gradient_type,
(gpointer) gradient->gradient_type_d,
_("Once Forward"),
GINT_TO_POINTER (GIMP_GRADIENT_ONCE_FORWARD),
NULL,
_("Once Backward"),
GINT_TO_POINTER (GIMP_GRADIENT_ONCE_BACKWARD),
NULL,
_("Loop Sawtooth"),
GINT_TO_POINTER (GIMP_GRADIENT_LOOP_SAWTOOTH),
NULL,
_("Loop Triangle"),
GINT_TO_POINTER (GIMP_GRADIENT_LOOP_TRIANGLE),
NULL,
NULL);
gimp_enum_option_menu_new (GIMP_TYPE_GRADIENT_PAINT_MODE,
G_CALLBACK (gimp_menu_item_update),
&gradient->gradient_type);
gimp_option_menu_set_history (GTK_OPTION_MENU (gradient->gradient_type_w),
GINT_TO_POINTER (gradient->gradient_type_d));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Type:"), 1.0, 0.5,

158
app/tools/tools-enums.c Normal file
View file

@ -0,0 +1,158 @@
/* Generated data (by gimp-mkenums) */
#include "config.h"
#include <glib-object.h>
#include "tools-enums.h"
#include "libgimp/gimpintl.h"
/* enumerations from "./tools-enums.h" */
static const GEnumValue gimp_crop_type_enum_values[] =
{
{ GIMP_CROP, N_("Crop"), "crop" },
{ GIMP_RESIZE, N_("Resize"), "resize" },
{ 0, NULL, NULL }
};
GType
gimp_crop_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpCropType", gimp_crop_type_enum_values);
return enum_type;
}
static const GEnumValue select_ops_enum_values[] =
{
{ SELECTION_ADD, "SELECTION_ADD", "add" },
{ SELECTION_SUBTRACT, "SELECTION_SUBTRACT", "subtract" },
{ SELECTION_REPLACE, "SELECTION_REPLACE", "replace" },
{ SELECTION_INTERSECT, "SELECTION_INTERSECT", "intersect" },
{ SELECTION_MOVE_MASK, "SELECTION_MOVE_MASK", "move-mask" },
{ SELECTION_MOVE, "SELECTION_MOVE", "move" },
{ SELECTION_ANCHOR, "SELECTION_ANCHOR", "anchor" },
{ 0, NULL, NULL }
};
GType
select_ops_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("SelectOps", select_ops_enum_values);
return enum_type;
}
static const GEnumValue gimp_tool_state_enum_values[] =
{
{ INACTIVE, "INACTIVE", "inactive" },
{ ACTIVE, "ACTIVE", "active" },
{ 0, NULL, NULL }
};
GType
gimp_tool_state_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpToolState", gimp_tool_state_enum_values);
return enum_type;
}
static const GEnumValue gimp_tool_action_enum_values[] =
{
{ PAUSE, "PAUSE", "pause" },
{ RESUME, "RESUME", "resume" },
{ HALT, "HALT", "halt" },
{ 0, NULL, NULL }
};
GType
gimp_tool_action_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpToolAction", gimp_tool_action_enum_values);
return enum_type;
}
static const GEnumValue gimp_motion_mode_enum_values[] =
{
{ GIMP_MOTION_MODE_EXACT, "GIMP_MOTION_MODE_EXACT", "exact" },
{ GIMP_MOTION_MODE_HINT, "GIMP_MOTION_MODE_HINT", "hint" },
{ GIMP_MOTION_MODE_COMPRESS, "GIMP_MOTION_MODE_COMPRESS", "compress" },
{ 0, NULL, NULL }
};
GType
gimp_motion_mode_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpMotionMode", gimp_motion_mode_enum_values);
return enum_type;
}
static const GEnumValue transform_action_enum_values[] =
{
{ TRANSFORM_CREATING, "TRANSFORM_CREATING", "creating" },
{ TRANSFORM_HANDLE_1, "TRANSFORM_HANDLE_1", "handle-1" },
{ TRANSFORM_HANDLE_2, "TRANSFORM_HANDLE_2", "handle-2" },
{ TRANSFORM_HANDLE_3, "TRANSFORM_HANDLE_3", "handle-3" },
{ TRANSFORM_HANDLE_4, "TRANSFORM_HANDLE_4", "handle-4" },
{ TRANSFORM_HANDLE_CENTER, "TRANSFORM_HANDLE_CENTER", "handle-center" },
{ 0, NULL, NULL }
};
GType
transform_action_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("TransformAction", transform_action_enum_values);
return enum_type;
}
static const GEnumValue transform_state_enum_values[] =
{
{ TRANSFORM_INIT, "TRANSFORM_INIT", "init" },
{ TRANSFORM_MOTION, "TRANSFORM_MOTION", "motion" },
{ TRANSFORM_RECALC, "TRANSFORM_RECALC", "recalc" },
{ TRANSFORM_FINISH, "TRANSFORM_FINISH", "finish" },
{ 0, NULL, NULL }
};
GType
transform_state_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("TransformState", transform_state_enum_values);
return enum_type;
}
/* Generated data ends here */

View file

@ -19,8 +19,41 @@
#ifndef __TOOLS_ENUMS_H__
#define __TOOLS_ENUMS_H__
#include "core/core-enums.h"
#if 0
This file is parsed by two scripts, enumgen.pl in tools/pdbgen
and gimp-mkenums. All enums that are not marked with /*< pdb-skip >*/
are exported to libgimp and the PDB. Enums that are not marked with
/*< skip >*/ are registered with the GType system. If you want the
enum to be skipped by both scripts, you have to use /*< pdb-skip >*/
_before_ /*< skip >*/.
All enum values that are marked with /*< skip >*/ are skipped for
both targets.
#endif
/*
* these enums that are registered with the type system
*/
#define GIMP_TYPE_CROP_TYPE (gimp_crop_type_get_type ())
GType gimp_crop_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CROP, /*< desc="Crop" >*/
GIMP_RESIZE /*< desc="Resize" >*/
} GimpCropType;
/*
* non-registered enums; register them if needed
*/
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
SELECTION_ADD = GIMP_CHANNEL_OP_ADD,
SELECTION_SUBTRACT = GIMP_CHANNEL_OP_SUBTRACT,
@ -32,14 +65,14 @@ typedef enum /*< pdb-skip >*/
} SelectOps;
/* The possible states for tools */
typedef enum /*< pdb-skip >*/
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
INACTIVE,
ACTIVE
} GimpToolState;
/* Tool control actions */
typedef enum /*< pdb-skip >*/
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
PAUSE,
RESUME,
@ -47,7 +80,7 @@ typedef enum /*< pdb-skip >*/
} GimpToolAction;
/* Motion event report modes */
typedef enum /*< pdb-skip >*/
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
GIMP_MOTION_MODE_EXACT,
GIMP_MOTION_MODE_HINT,
@ -56,7 +89,7 @@ typedef enum /*< pdb-skip >*/
/* possible transform functions */
typedef enum /*< pdb-skip >*/
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
TRANSFORM_CREATING,
TRANSFORM_HANDLE_1,
@ -67,7 +100,7 @@ typedef enum /*< pdb-skip >*/
} TransformAction;
/* the different states that the transformation function can be called with */
typedef enum /*< pdb-skip >*/
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
TRANSFORM_INIT,
TRANSFORM_MOTION,

View file

@ -164,7 +164,7 @@ CLEANFILES = $(gen_sources)
$(srcdir)/widgets-enums.c: $(srcdir)/widgets-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <gtk/gtk.h>\n#include \"widgets-enums.h\"\n#include\"libgimp/gimpintl.h\"" \
--fhead "#include \"config.h\"\n#include <gtk/gtk.h>\n#include \"widgets-enums.h\"\n#include \"libgimp/gimpintl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \

View file

@ -4,7 +4,7 @@
#include "config.h"
#include <gtk/gtk.h>
#include "widgets-enums.h"
#include"libgimp/gimpintl.h"
#include "libgimp/gimpintl.h"
/* enumerations from "./widgets-enums.h" */

View file

@ -45,7 +45,6 @@ Enums and definitions.
@GIMP_BRUSH_HARD:
@GIMP_BRUSH_SOFT:
@GIMP_BRUSH_PRESSURE:
<!-- ##### ENUM GimpBucketFillMode ##### -->
<para>
@ -135,7 +134,6 @@ Enums and definitions.
@GIMP_BLUR_CONVOLVE:
@GIMP_SHARPEN_CONVOLVE:
@GIMP_CUSTOM_CONVOLVE:
<!-- ##### ENUM GimpDodgeBurnType ##### -->
<para>

View file

@ -92,14 +92,12 @@ enum
GIMP_ONCE_BACKWARDS = GIMP_GRADIENT_ONCE_BACKWARD,
GIMP_LOOP_SAWTOOTH = GIMP_GRADIENT_LOOP_SAWTOOTH,
GIMP_LOOP_TRIANGLE = GIMP_GRADIENT_LOOP_TRIANGLE,
GIMP_ONCE_END_COLOR = GIMP_GRADIENT_ONCE_FORWARD
};
enum
{
GIMP_HARD = GIMP_BRUSH_HARD,
GIMP_SOFT = GIMP_BRUSH_SOFT,
GIMP_PRESSURE = GIMP_BRUSH_PRESSURE
GIMP_HARD = GIMP_BRUSH_HARD,
GIMP_SOFT = GIMP_BRUSH_SOFT,
};
enum

View file

@ -46,8 +46,7 @@ typedef enum
typedef enum
{
GIMP_BRUSH_HARD,
GIMP_BRUSH_SOFT,
GIMP_BRUSH_PRESSURE
GIMP_BRUSH_SOFT
} GimpBrushApplicationMode;
typedef enum
@ -118,8 +117,7 @@ typedef enum
typedef enum
{
GIMP_BLUR_CONVOLVE,
GIMP_SHARPEN_CONVOLVE,
GIMP_CUSTOM_CONVOLVE
GIMP_SHARPEN_CONVOLVE
} GimpConvolveType;
typedef enum

View file

@ -38,7 +38,6 @@ init_generated_constants (void)
setvar (cintern ("BRUSH-HARD"), flocons (0), NIL);
setvar (cintern ("BRUSH-SOFT"), flocons (1), NIL);
setvar (cintern ("BRUSH-PRESSURE"), flocons (2), NIL);
setvar (cintern ("FG-BUCKET-FILL"), flocons (0), NIL);
setvar (cintern ("BG-BUCKET-FILL"), flocons (1), NIL);
@ -83,7 +82,6 @@ init_generated_constants (void)
setvar (cintern ("BLUR-CONVOLVE"), flocons (0), NIL);
setvar (cintern ("SHARPEN-CONVOLVE"), flocons (1), NIL);
setvar (cintern ("CUSTOM-CONVOLVE"), flocons (2), NIL);
setvar (cintern ("DODGE"), flocons (0), NIL);
setvar (cintern ("BURN"), flocons (1), NIL);

View file

@ -101,6 +101,7 @@ app/gui/tool-options-dialog.c
app/gui/user-install-dialog.c
app/gui/vectors-commands.c
app/paint/paint-enums.c
app/paint/gimpclone.c
app/paint/gimppaintcore.c
@ -112,6 +113,7 @@ app/pdb/procedural_db_cmds.c
app/plug-in/plug-in.c
app/plug-in/plug-in-rc.c
app/tools/tools-enums.c
app/tools/gimpairbrushtool.c
app/tools/gimpbezierselecttool.c
app/tools/gimpblendtool.c

View file

@ -343,21 +343,19 @@ package Gimp::CodeGen::enums;
VERTICAL => '1',
UNKNOWN => '2' }
},
GimpBrushApplicationMode =>
GimpCloneType =>
{ contig => 1,
header => 'paint/paint-enums.h',
symbols => [ qw(GIMP_BRUSH_HARD GIMP_BRUSH_SOFT
GIMP_BRUSH_PRESSURE) ],
mapping => { GIMP_BRUSH_HARD => '0',
GIMP_BRUSH_SOFT => '1',
GIMP_BRUSH_PRESSURE => '2' }
symbols => [ qw(GIMP_IMAGE_CLONE GIMP_PATTERN_CLONE) ],
mapping => { GIMP_IMAGE_CLONE => '0',
GIMP_PATTERN_CLONE => '1' }
},
GimpPaintApplicationMode =>
GimpDodgeBurnType =>
{ contig => 1,
header => 'paint/paint-enums.h',
symbols => [ qw(GIMP_PAINT_CONSTANT GIMP_PAINT_INCREMENTAL) ],
mapping => { GIMP_PAINT_CONSTANT => '0',
GIMP_PAINT_INCREMENTAL => '1' }
symbols => [ qw(GIMP_DODGE GIMP_BURN) ],
mapping => { GIMP_DODGE => '0',
GIMP_BURN => '1' }
},
GimpGradientPaintMode =>
{ contig => 1,
@ -371,28 +369,26 @@ package Gimp::CodeGen::enums;
GIMP_GRADIENT_LOOP_SAWTOOTH => '2',
GIMP_GRADIENT_LOOP_TRIANGLE => '3' }
},
GimpDodgeBurnType =>
{ contig => 1,
header => 'paint/paint-enums.h',
symbols => [ qw(GIMP_DODGE GIMP_BURN) ],
mapping => { GIMP_DODGE => '0',
GIMP_BURN => '1' }
},
GimpConvolveType =>
{ contig => 1,
header => 'paint/paint-enums.h',
symbols => [ qw(GIMP_BLUR_CONVOLVE GIMP_SHARPEN_CONVOLVE
GIMP_CUSTOM_CONVOLVE) ],
symbols => [ qw(GIMP_BLUR_CONVOLVE GIMP_SHARPEN_CONVOLVE) ],
mapping => { GIMP_BLUR_CONVOLVE => '0',
GIMP_SHARPEN_CONVOLVE => '1',
GIMP_CUSTOM_CONVOLVE => '2' }
GIMP_SHARPEN_CONVOLVE => '1' }
},
GimpCloneType =>
GimpBrushApplicationMode =>
{ contig => 1,
header => 'paint/paint-enums.h',
symbols => [ qw(GIMP_IMAGE_CLONE GIMP_PATTERN_CLONE) ],
mapping => { GIMP_IMAGE_CLONE => '0',
GIMP_PATTERN_CLONE => '1' }
symbols => [ qw(GIMP_BRUSH_HARD GIMP_BRUSH_SOFT) ],
mapping => { GIMP_BRUSH_HARD => '0',
GIMP_BRUSH_SOFT => '1' }
},
GimpPaintApplicationMode =>
{ contig => 1,
header => 'paint/paint-enums.h',
symbols => [ qw(GIMP_PAINT_CONSTANT GIMP_PAINT_INCREMENTAL) ],
mapping => { GIMP_PAINT_CONSTANT => '0',
GIMP_PAINT_INCREMENTAL => '1' }
},
GimpRunMode =>
{ contig => 1,

View file

@ -275,8 +275,7 @@ HELP
&drawable_arg,
{ name => 'pressure', type => '0 <= float <= 100',
desc => 'The pressure: %%desc%%' },
{ name => 'convolve_type',
type => 'enum GimpConvolveType (no GIMP_CUSTOM_CONVOLVE)',
{ name => 'convolve_type', type => 'enum GimpConvolveType',
desc => 'Convolve type: { %%desc%% }' },
&stroke_arg
);
@ -352,8 +351,7 @@ HELP
@inargs = (
&drawable_arg,
&stroke_arg,
{ name => 'hardness',
type => 'enum GimpBrushApplicationMode (no GIMP_BRUSH_PRESSURE)',
{ name => 'hardness', type => 'enum GimpBrushApplicationMode',
desc => '%%desc%%' },
{ name => 'method', type => 'enum GimpPaintApplicationMode',
desc => '%%desc%%' }
@ -396,8 +394,7 @@ HELP
@inargs = (
&drawable_arg,
&stroke_arg,
{ name => 'hardness',
type => 'enum GimpBrushApplicationMode (no GIMP_BRUSH_PRESSURE)',
{ name => 'hardness', type => 'enum GimpBrushApplicationMode',
desc => '%%desc%%' },
{ name => 'method', type => 'enum GimpPaintApplicationMode',
desc => '%%desc%%' }