[gimp] app: remove base-enums.[ch]
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove base-enums.[ch]
- Date: Wed, 2 May 2012 16:35:49 +0000 (UTC)
commit 7eb8b0b925cedd0b46fb4bad73dd6257f62c5ffc
Author: Michael Natterer <mitch gimp org>
Date: Mon Apr 9 01:11:50 2012 +0200
app: remove base-enums.[ch]
and move its remaining content to core-enums, move the siox enum to
base-types.h.
app/base/Makefile.am | 22 ---------
app/base/base-enums.c | 90 -----------------------------------
app/base/base-enums.h | 94 -------------------------------------
app/base/base-types.h | 18 ++++++-
app/config/gimpbaseconfig.h | 2 -
app/core/core-enums.c | 108 +++++++++++++++++++++++++++++++++++++++++++
app/core/core-enums.h | 47 +++++++++++++++++++
app/core/core-types.h | 1 +
tools/pdbgen/Makefile.am | 1 -
tools/pdbgen/enums.pl | 94 +++++++++++++++++++-------------------
10 files changed, 218 insertions(+), 259 deletions(-)
---
diff --git a/app/base/Makefile.am b/app/base/Makefile.am
index 88ca1ad..8d1b293 100644
--- a/app/base/Makefile.am
+++ b/app/base/Makefile.am
@@ -19,7 +19,6 @@ noinst_LIBRARIES = libappbase.a
libappbase_a_SOURCES = \
base.c \
base.h \
- base-enums.c \
base-enums.h \
base-types.h \
base-utils.c \
@@ -46,24 +45,3 @@ libappbase_a_SOURCES = \
tile-rowhints.h \
tile-swap.c \
tile-swap.h
-
-#
-# rules to generate built sources
-#
-# setup autogeneration dependencies
-gen_sources = xgen-bec
-CLEANFILES = $(gen_sources)
-
-base-enums.c: $(srcdir)/base-enums.h $(GIMP_MKENUMS)
- $(GIMP_MKENUMS) \
- --fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"libgimpbase/gimpbase.h\"\n#include \"base-enums.h\"\n#include \"gimp-intl.h\"" \
- --fprod "\n/* enumerations from \"@filename \" */" \
- --vhead "GType\n enum_name@_get_type (void)\n{\n static const G Type@Value values[] =\n {" \
- --vprod " { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
- --vtail " { 0, NULL, NULL }\n };\n" \
- --dhead " static const Gimp Type@Desc descs[] =\n {" \
- --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
- --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_ type@_register_static (\"@EnumName \", values);\n gimp_type_set_translation_context (type, \"@enumnick \");\n gimp_ type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \
- $(srcdir)/base-enums.h > xgen-bec \
- && cp xgen-bec $(@F) \
- && rm -f xgen-bec
diff --git a/app/base/base-types.h b/app/base/base-types.h
index 97f2a97..2a75bcc 100644
--- a/app/base/base-types.h
+++ b/app/base/base-types.h
@@ -25,9 +25,7 @@
#include "paint-funcs/paint-funcs-types.h"
-#include "base/base-enums.h"
-
-#include "config/config-types.h"
+#include "core/core-types.h" /* screw include policy in base/ */
/* convenient defines */
@@ -66,4 +64,18 @@ typedef void (* TileValidateProc) (TileManager *tm,
typedef void (* PixelProcessorFunc) (void);
+/* enums */
+
+typedef enum
+{
+ SIOX_REFINEMENT_NO_CHANGE = 0,
+ SIOX_REFINEMENT_ADD_FOREGROUND = (1 << 0),
+ SIOX_REFINEMENT_ADD_BACKGROUND = (1 << 1),
+ SIOX_REFINEMENT_CHANGE_SENSITIVITY = (1 << 2),
+ SIOX_REFINEMENT_CHANGE_SMOOTHNESS = (1 << 3),
+ SIOX_REFINEMENT_CHANGE_MULTIBLOB = (1 << 4),
+ SIOX_REFINEMENT_RECALCULATE = 0xFF
+} SioxRefinementType;
+
+
#endif /* __BASE_TYPES_H__ */
diff --git a/app/config/gimpbaseconfig.h b/app/config/gimpbaseconfig.h
index 93d69fb..042b264 100644
--- a/app/config/gimpbaseconfig.h
+++ b/app/config/gimpbaseconfig.h
@@ -21,8 +21,6 @@
#ifndef __GIMP_BASE_CONFIG_H__
#define __GIMP_BASE_CONFIG_H__
-#include "base/base-enums.h"
-
#define GIMP_TYPE_BASE_CONFIG (gimp_base_config_get_type ())
#define GIMP_BASE_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BASE_CONFIG, GimpBaseConfig))
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index 70fd277..136b0cc 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -104,6 +104,37 @@ gimp_convert_palette_type_get_type (void)
}
GType
+gimp_convolution_type_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_NORMAL_CONVOL, "GIMP_NORMAL_CONVOL", "normal-convol" },
+ { GIMP_ABSOLUTE_CONVOL, "GIMP_ABSOLUTE_CONVOL", "absolute-convol" },
+ { GIMP_NEGATIVE_CONVOL, "GIMP_NEGATIVE_CONVOL", "negative-convol" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_NORMAL_CONVOL, "GIMP_NORMAL_CONVOL", NULL },
+ { GIMP_ABSOLUTE_CONVOL, "GIMP_ABSOLUTE_CONVOL", NULL },
+ { GIMP_NEGATIVE_CONVOL, "GIMP_NEGATIVE_CONVOL", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpConvolutionType", values);
+ gimp_type_set_translation_context (type, "convolution-type");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
gimp_curve_type_get_type (void)
{
static const GEnumValue values[] =
@@ -254,6 +285,83 @@ gimp_hue_range_get_type (void)
}
GType
+gimp_layer_mode_effects_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_NORMAL_MODE, "GIMP_NORMAL_MODE", "normal-mode" },
+ { GIMP_DISSOLVE_MODE, "GIMP_DISSOLVE_MODE", "dissolve-mode" },
+ { GIMP_BEHIND_MODE, "GIMP_BEHIND_MODE", "behind-mode" },
+ { GIMP_MULTIPLY_MODE, "GIMP_MULTIPLY_MODE", "multiply-mode" },
+ { GIMP_SCREEN_MODE, "GIMP_SCREEN_MODE", "screen-mode" },
+ { GIMP_OVERLAY_MODE, "GIMP_OVERLAY_MODE", "overlay-mode" },
+ { GIMP_DIFFERENCE_MODE, "GIMP_DIFFERENCE_MODE", "difference-mode" },
+ { GIMP_ADDITION_MODE, "GIMP_ADDITION_MODE", "addition-mode" },
+ { GIMP_SUBTRACT_MODE, "GIMP_SUBTRACT_MODE", "subtract-mode" },
+ { GIMP_DARKEN_ONLY_MODE, "GIMP_DARKEN_ONLY_MODE", "darken-only-mode" },
+ { GIMP_LIGHTEN_ONLY_MODE, "GIMP_LIGHTEN_ONLY_MODE", "lighten-only-mode" },
+ { GIMP_HUE_MODE, "GIMP_HUE_MODE", "hue-mode" },
+ { GIMP_SATURATION_MODE, "GIMP_SATURATION_MODE", "saturation-mode" },
+ { GIMP_COLOR_MODE, "GIMP_COLOR_MODE", "color-mode" },
+ { GIMP_VALUE_MODE, "GIMP_VALUE_MODE", "value-mode" },
+ { GIMP_DIVIDE_MODE, "GIMP_DIVIDE_MODE", "divide-mode" },
+ { GIMP_DODGE_MODE, "GIMP_DODGE_MODE", "dodge-mode" },
+ { GIMP_BURN_MODE, "GIMP_BURN_MODE", "burn-mode" },
+ { GIMP_HARDLIGHT_MODE, "GIMP_HARDLIGHT_MODE", "hardlight-mode" },
+ { GIMP_SOFTLIGHT_MODE, "GIMP_SOFTLIGHT_MODE", "softlight-mode" },
+ { GIMP_GRAIN_EXTRACT_MODE, "GIMP_GRAIN_EXTRACT_MODE", "grain-extract-mode" },
+ { GIMP_GRAIN_MERGE_MODE, "GIMP_GRAIN_MERGE_MODE", "grain-merge-mode" },
+ { GIMP_COLOR_ERASE_MODE, "GIMP_COLOR_ERASE_MODE", "color-erase-mode" },
+ { GIMP_ERASE_MODE, "GIMP_ERASE_MODE", "erase-mode" },
+ { GIMP_REPLACE_MODE, "GIMP_REPLACE_MODE", "replace-mode" },
+ { GIMP_ANTI_ERASE_MODE, "GIMP_ANTI_ERASE_MODE", "anti-erase-mode" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_NORMAL_MODE, NC_("layer-mode-effects", "Normal"), NULL },
+ { GIMP_DISSOLVE_MODE, NC_("layer-mode-effects", "Dissolve"), NULL },
+ { GIMP_BEHIND_MODE, NC_("layer-mode-effects", "Behind"), NULL },
+ { GIMP_MULTIPLY_MODE, NC_("layer-mode-effects", "Multiply"), NULL },
+ { GIMP_SCREEN_MODE, NC_("layer-mode-effects", "Screen"), NULL },
+ { GIMP_OVERLAY_MODE, NC_("layer-mode-effects", "Overlay"), NULL },
+ { GIMP_DIFFERENCE_MODE, NC_("layer-mode-effects", "Difference"), NULL },
+ { GIMP_ADDITION_MODE, NC_("layer-mode-effects", "Addition"), NULL },
+ { GIMP_SUBTRACT_MODE, NC_("layer-mode-effects", "Subtract"), NULL },
+ { GIMP_DARKEN_ONLY_MODE, NC_("layer-mode-effects", "Darken only"), NULL },
+ { GIMP_LIGHTEN_ONLY_MODE, NC_("layer-mode-effects", "Lighten only"), NULL },
+ { GIMP_HUE_MODE, NC_("layer-mode-effects", "Hue"), NULL },
+ { GIMP_SATURATION_MODE, NC_("layer-mode-effects", "Saturation"), NULL },
+ { GIMP_COLOR_MODE, NC_("layer-mode-effects", "Color"), NULL },
+ { GIMP_VALUE_MODE, NC_("layer-mode-effects", "Value"), NULL },
+ { GIMP_DIVIDE_MODE, NC_("layer-mode-effects", "Divide"), NULL },
+ { GIMP_DODGE_MODE, NC_("layer-mode-effects", "Dodge"), NULL },
+ { GIMP_BURN_MODE, NC_("layer-mode-effects", "Burn"), NULL },
+ { GIMP_HARDLIGHT_MODE, NC_("layer-mode-effects", "Hard light"), NULL },
+ { GIMP_SOFTLIGHT_MODE, NC_("layer-mode-effects", "Soft light"), NULL },
+ { GIMP_GRAIN_EXTRACT_MODE, NC_("layer-mode-effects", "Grain extract"), NULL },
+ { GIMP_GRAIN_MERGE_MODE, NC_("layer-mode-effects", "Grain merge"), NULL },
+ { GIMP_COLOR_ERASE_MODE, NC_("layer-mode-effects", "Color erase"), NULL },
+ { GIMP_ERASE_MODE, NC_("layer-mode-effects", "Erase"), NULL },
+ { GIMP_REPLACE_MODE, NC_("layer-mode-effects", "Replace"), NULL },
+ { GIMP_ANTI_ERASE_MODE, NC_("layer-mode-effects", "Anti erase"), NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpLayerModeEffects", values);
+ gimp_type_set_translation_context (type, "layer-mode-effects");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
gimp_alignment_type_get_type (void)
{
static const GEnumValue values[] =
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 73b323e..28f5bf9 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -75,6 +75,18 @@ typedef enum
} GimpConvertPaletteType;
+#define GIMP_TYPE_CONVOLUTION_TYPE (gimp_convolution_type_get_type ())
+
+GType gimp_convolution_type_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_NORMAL_CONVOL, /* Negative numbers truncated */
+ GIMP_ABSOLUTE_CONVOL, /* Absolute value */
+ GIMP_NEGATIVE_CONVOL /* add 127 to values */
+} GimpConvolutionType;
+
+
#define GIMP_TYPE_CURVE_TYPE (gimp_curve_type_get_type ())
GType gimp_curve_type_get_type (void) G_GNUC_CONST;
@@ -136,6 +148,41 @@ typedef enum
} GimpHueRange;
+#define GIMP_TYPE_LAYER_MODE_EFFECTS (gimp_layer_mode_effects_get_type ())
+
+GType gimp_layer_mode_effects_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_NORMAL_MODE, /*< desc="Normal" >*/
+ GIMP_DISSOLVE_MODE, /*< desc="Dissolve" >*/
+ GIMP_BEHIND_MODE, /*< desc="Behind" >*/
+ GIMP_MULTIPLY_MODE, /*< desc="Multiply" >*/
+ GIMP_SCREEN_MODE, /*< desc="Screen" >*/
+ GIMP_OVERLAY_MODE, /*< desc="Overlay" >*/
+ GIMP_DIFFERENCE_MODE, /*< desc="Difference" >*/
+ GIMP_ADDITION_MODE, /*< desc="Addition" >*/
+ GIMP_SUBTRACT_MODE, /*< desc="Subtract" >*/
+ GIMP_DARKEN_ONLY_MODE, /*< desc="Darken only" >*/
+ GIMP_LIGHTEN_ONLY_MODE, /*< desc="Lighten only" >*/
+ GIMP_HUE_MODE, /*< desc="Hue" >*/
+ GIMP_SATURATION_MODE, /*< desc="Saturation" >*/
+ GIMP_COLOR_MODE, /*< desc="Color" >*/
+ GIMP_VALUE_MODE, /*< desc="Value" >*/
+ GIMP_DIVIDE_MODE, /*< desc="Divide" >*/
+ GIMP_DODGE_MODE, /*< desc="Dodge" >*/
+ GIMP_BURN_MODE, /*< desc="Burn" >*/
+ GIMP_HARDLIGHT_MODE, /*< desc="Hard light" >*/
+ GIMP_SOFTLIGHT_MODE, /*< desc="Soft light" >*/
+ GIMP_GRAIN_EXTRACT_MODE, /*< desc="Grain extract" >*/
+ GIMP_GRAIN_MERGE_MODE, /*< desc="Grain merge" >*/
+ GIMP_COLOR_ERASE_MODE, /*< desc="Color erase" >*/
+ GIMP_ERASE_MODE, /*< pdb-skip, desc="Erase" >*/
+ GIMP_REPLACE_MODE, /*< pdb-skip, desc="Replace" >*/
+ GIMP_ANTI_ERASE_MODE /*< pdb-skip, desc="Anti erase" >*/
+} GimpLayerModeEffects;
+
+
#define GIMP_TYPE_ALIGNMENT_TYPE (gimp_alignment_type_get_type ())
GType gimp_alignment_type_get_type (void) G_GNUC_CONST;
diff --git a/app/core/core-types.h b/app/core/core-types.h
index 6ea5aac..6deace2 100644
--- a/app/core/core-types.h
+++ b/app/core/core-types.h
@@ -24,6 +24,7 @@
#include "libgimpmath/gimpmathtypes.h"
#include "base/base-types.h"
+#include "config/config-types.h"
#include "core/core-enums.h"
diff --git a/tools/pdbgen/Makefile.am b/tools/pdbgen/Makefile.am
index 7dca761..4c98901 100644
--- a/tools/pdbgen/Makefile.am
+++ b/tools/pdbgen/Makefile.am
@@ -71,7 +71,6 @@ EXTRA_DIST = \
enum_headers = \
../../libgimpbase/gimpbaseenums.h \
- ../../app/base/base-enums.h \
../../app/core/core-enums.h \
../../app/text/text-enums.h \
../../app/paint/paint-enums.h \
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 8e53eba..63ff409 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -411,53 +411,6 @@ package Gimp::CodeGen::enums;
symbols => [ qw(GIMP_VECTORS_STROKE_TYPE_BEZIER) ],
mapping => { GIMP_VECTORS_STROKE_TYPE_BEZIER => '0' }
},
- GimpLayerModeEffects =>
- { contig => 1,
- header => 'base/base-enums.h',
- symbols => [ qw(GIMP_NORMAL_MODE GIMP_DISSOLVE_MODE
- GIMP_BEHIND_MODE GIMP_MULTIPLY_MODE
- GIMP_SCREEN_MODE GIMP_OVERLAY_MODE
- GIMP_DIFFERENCE_MODE GIMP_ADDITION_MODE
- GIMP_SUBTRACT_MODE GIMP_DARKEN_ONLY_MODE
- GIMP_LIGHTEN_ONLY_MODE GIMP_HUE_MODE
- GIMP_SATURATION_MODE GIMP_COLOR_MODE
- GIMP_VALUE_MODE GIMP_DIVIDE_MODE GIMP_DODGE_MODE
- GIMP_BURN_MODE GIMP_HARDLIGHT_MODE
- GIMP_SOFTLIGHT_MODE GIMP_GRAIN_EXTRACT_MODE
- GIMP_GRAIN_MERGE_MODE GIMP_COLOR_ERASE_MODE) ],
- mapping => { GIMP_NORMAL_MODE => '0',
- GIMP_DISSOLVE_MODE => '1',
- GIMP_BEHIND_MODE => '2',
- GIMP_MULTIPLY_MODE => '3',
- GIMP_SCREEN_MODE => '4',
- GIMP_OVERLAY_MODE => '5',
- GIMP_DIFFERENCE_MODE => '6',
- GIMP_ADDITION_MODE => '7',
- GIMP_SUBTRACT_MODE => '8',
- GIMP_DARKEN_ONLY_MODE => '9',
- GIMP_LIGHTEN_ONLY_MODE => '10',
- GIMP_HUE_MODE => '11',
- GIMP_SATURATION_MODE => '12',
- GIMP_COLOR_MODE => '13',
- GIMP_VALUE_MODE => '14',
- GIMP_DIVIDE_MODE => '15',
- GIMP_DODGE_MODE => '16',
- GIMP_BURN_MODE => '17',
- GIMP_HARDLIGHT_MODE => '18',
- GIMP_SOFTLIGHT_MODE => '19',
- GIMP_GRAIN_EXTRACT_MODE => '20',
- GIMP_GRAIN_MERGE_MODE => '21',
- GIMP_COLOR_ERASE_MODE => '22' }
- },
- GimpConvolutionType =>
- { contig => 1,
- header => 'base/base-enums.h',
- symbols => [ qw(GIMP_NORMAL_CONVOL GIMP_ABSOLUTE_CONVOL
- GIMP_NEGATIVE_CONVOL) ],
- mapping => { GIMP_NORMAL_CONVOL => '0',
- GIMP_ABSOLUTE_CONVOL => '1',
- GIMP_NEGATIVE_CONVOL => '2' }
- },
GimpConvertDitherType =>
{ contig => 1,
header => 'core/core-enums.h',
@@ -480,6 +433,15 @@ package Gimp::CodeGen::enums;
GIMP_MONO_PALETTE => '3',
GIMP_CUSTOM_PALETTE => '4' }
},
+ GimpConvolutionType =>
+ { contig => 1,
+ header => 'core/core-enums.h',
+ symbols => [ qw(GIMP_NORMAL_CONVOL GIMP_ABSOLUTE_CONVOL
+ GIMP_NEGATIVE_CONVOL) ],
+ mapping => { GIMP_NORMAL_CONVOL => '0',
+ GIMP_ABSOLUTE_CONVOL => '1',
+ GIMP_NEGATIVE_CONVOL => '2' }
+ },
GimpHistogramChannel =>
{ contig => 1,
header => 'core/core-enums.h',
@@ -506,6 +468,44 @@ package Gimp::CodeGen::enums;
GIMP_BLUE_HUES => '5',
GIMP_MAGENTA_HUES => '6' }
},
+ GimpLayerModeEffects =>
+ { contig => 1,
+ header => 'core/core-enums.h',
+ symbols => [ qw(GIMP_NORMAL_MODE GIMP_DISSOLVE_MODE
+ GIMP_BEHIND_MODE GIMP_MULTIPLY_MODE
+ GIMP_SCREEN_MODE GIMP_OVERLAY_MODE
+ GIMP_DIFFERENCE_MODE GIMP_ADDITION_MODE
+ GIMP_SUBTRACT_MODE GIMP_DARKEN_ONLY_MODE
+ GIMP_LIGHTEN_ONLY_MODE GIMP_HUE_MODE
+ GIMP_SATURATION_MODE GIMP_COLOR_MODE
+ GIMP_VALUE_MODE GIMP_DIVIDE_MODE GIMP_DODGE_MODE
+ GIMP_BURN_MODE GIMP_HARDLIGHT_MODE
+ GIMP_SOFTLIGHT_MODE GIMP_GRAIN_EXTRACT_MODE
+ GIMP_GRAIN_MERGE_MODE GIMP_COLOR_ERASE_MODE) ],
+ mapping => { GIMP_NORMAL_MODE => '0',
+ GIMP_DISSOLVE_MODE => '1',
+ GIMP_BEHIND_MODE => '2',
+ GIMP_MULTIPLY_MODE => '3',
+ GIMP_SCREEN_MODE => '4',
+ GIMP_OVERLAY_MODE => '5',
+ GIMP_DIFFERENCE_MODE => '6',
+ GIMP_ADDITION_MODE => '7',
+ GIMP_SUBTRACT_MODE => '8',
+ GIMP_DARKEN_ONLY_MODE => '9',
+ GIMP_LIGHTEN_ONLY_MODE => '10',
+ GIMP_HUE_MODE => '11',
+ GIMP_SATURATION_MODE => '12',
+ GIMP_COLOR_MODE => '13',
+ GIMP_VALUE_MODE => '14',
+ GIMP_DIVIDE_MODE => '15',
+ GIMP_DODGE_MODE => '16',
+ GIMP_BURN_MODE => '17',
+ GIMP_HARDLIGHT_MODE => '18',
+ GIMP_SOFTLIGHT_MODE => '19',
+ GIMP_GRAIN_EXTRACT_MODE => '20',
+ GIMP_GRAIN_MERGE_MODE => '21',
+ GIMP_COLOR_ERASE_MODE => '22' }
+ },
GimpFillType =>
{ contig => 1,
header => 'core/core-enums.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]