[gimp] app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
- Date: Sun, 8 Jan 2017 22:02:41 +0000 (UTC)
commit 66060e33074cdd07ba7e35d1aa26acac58db4c6d
Author: Michael Natterer <mitch gimp org>
Date: Sun Jan 8 23:00:19 2017 +0100
app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
app/actions/context-commands.c | 72 +++++-----
app/actions/layers-commands.c | 174 +++++++++++++-------------
app/app.c | 10 ++
app/config/gimpdialogconfig.c | 4 +-
app/config/gimpdialogconfig.h | 2 +-
app/core/core-enums.c | 130 ++++++++++----------
app/core/core-enums.h | 68 +++++-----
app/core/gimp-edit.c | 3 +-
app/core/gimp-utils.c | 2 +-
app/core/gimpchannel.c | 22 ++--
app/core/gimpcontext.c | 32 +++--
app/core/gimpcontext.h | 9 +-
app/core/gimpdrawable-blend.c | 36 +++---
app/core/gimpdrawable-blend.h | 36 +++---
app/core/gimpdrawable-combine.c | 20 ++--
app/core/gimpdrawable-combine.h | 40 +++---
app/core/gimpdrawable-shadow.c | 3 +-
app/core/gimpdrawable-transform.c | 3 +-
app/core/gimpdrawable.c | 20 ++--
app/core/gimpdrawable.h | 4 +-
app/core/gimpdrawablefilter.c | 52 ++++----
app/core/gimpdrawablefilter.h | 54 ++++----
app/core/gimpdrawableundo.h | 14 +-
app/core/gimpfilloptions.c | 3 +-
app/core/gimpimage-merge.c | 20 ++--
app/core/gimpimage-new.c | 11 +-
app/core/gimpimage.c | 18 ++--
app/core/gimplayer-new.c | 52 ++++----
app/core/gimplayer-new.h | 52 ++++----
app/core/gimplayer.c | 28 ++--
app/core/gimplayer.h | 24 ++--
app/core/gimplayerpropundo.c | 2 +-
app/core/gimplayerpropundo.h | 8 +-
app/core/gimpselection.c | 2 +-
app/dialogs/fade-dialog.c | 12 +-
app/dialogs/layer-options-dialog.c | 4 +-
app/dialogs/layer-options-dialog.h | 42 +++---
app/display/gimpdisplayshell-dnd.c | 3 +-
app/gegl/gimp-gegl-nodes.c | 159 ++++++++++++++++++-----
app/gegl/gimp-gegl-nodes.h | 36 +++---
app/gegl/gimpapplicator.c | 6 +-
app/gegl/gimpapplicator.h | 64 +++++-----
app/operations/gimplayermodefunctions.c | 184 ++++++++++++++++++++-------
app/operations/gimplayermodefunctions.h | 4 +-
app/paint/gimpbrushcore.c | 5 +-
app/paint/gimpbrushcore.h | 2 +-
app/paint/gimperaser.c | 42 +++---
app/paint/gimppaintcore-loops.c | 25 ++--
app/paint/gimppaintcore-loops.h | 22 ++--
app/paint/gimppaintcore.c | 5 +-
app/paint/gimppaintcore.h | 2 +-
app/pdb/brush-select-cmds.c | 16 +-
app/pdb/brushes-cmds.c | 8 +-
app/pdb/context-cmds.c | 12 +-
app/pdb/edit-cmds.c | 24 ++--
app/pdb/layer-cmds.c | 22 ++--
app/tests/gimp-app-test-utils.c | 2 +-
app/tests/test-core.c | 12 +-
app/tests/test-ui.c | 3 +-
app/tests/test-xcf.c | 8 +-
app/tools/gimpwarptool.c | 2 +-
app/widgets/gimpbrushselect.c | 14 +-
app/widgets/gimpbrushselect.h | 12 +-
app/widgets/gimplayertreeview.c | 13 +-
app/widgets/gimpwidgets-constructors.c | 96 +++++++-------
app/xcf/xcf-load.c | 8 +-
app/xcf/xcf-save.c | 4 +-
libgimp/gimp.def | 2 +-
libgimp/gimpbrushes.c | 4 +-
libgimp/gimpbrushes.h | 10 +-
libgimp/gimpbrushes_pdb.c | 16 +-
libgimp/gimpbrushes_pdb.h | 28 ++--
libgimp/gimpbrushmenu.c | 16 +-
libgimp/gimpbrushmenu.h | 4 +-
libgimp/gimpbrushselect.c | 2 +-
libgimp/gimpbrushselect.h | 4 +-
libgimp/gimpbrushselect_pdb.c | 22 ++--
libgimp/gimpbrushselect_pdb.h | 24 ++--
libgimp/gimpbrushselectbutton.c | 64 +++++-----
libgimp/gimpbrushselectbutton.h | 8 +-
libgimp/gimpcontext_pdb.c | 6 +-
libgimp/gimpcontext_pdb.h | 4 +-
libgimp/gimpedit_pdb.c | 68 +++++-----
libgimp/gimpedit_pdb.h | 110 ++++++++--------
libgimp/gimpenums.c.tail | 11 ++-
libgimp/gimpenums.h | 62 +++++-----
libgimp/gimpexport.c | 2 +-
libgimp/gimpimagemetadata.c | 2 +-
libgimp/gimplayer.c | 30 ++--
libgimp/gimplayer.h | 48 ++++----
libgimp/gimplayer_pdb.c | 22 ++--
libgimp/gimplayer_pdb.h | 6 +-
libgimpbase/gimpbase.def | 1 +
libgimpbase/gimpbaseenums.c | 72 +++++++++++
libgimpbase/gimpbaseenums.h | 34 +++++
plug-ins/common/animation-optimize.c | 4 +-
plug-ins/common/compose.c | 3 +-
plug-ins/common/curve-bend.c | 2 +-
plug-ins/common/decompose.c | 3 +-
plug-ins/common/edge-dog.c | 2 +-
plug-ins/common/file-cel.c | 6 +-
plug-ins/common/file-dicom.c | 2 +-
plug-ins/common/file-gbr.c | 3 +-
plug-ins/common/file-gegl.c | 3 +-
plug-ins/common/file-gif-load.c | 8 +-
plug-ins/common/file-gih.c | 3 +-
plug-ins/common/file-jp2-load.c | 3 +-
plug-ins/common/file-pat.c | 3 +-
plug-ins/common/file-pcx.c | 6 +-
plug-ins/common/file-pix.c | 6 +-
plug-ins/common/file-png.c | 3 +-
plug-ins/common/file-pnm.c | 2 +-
plug-ins/common/file-ps.c | 3 +-
plug-ins/common/file-psp.c | 59 ++++++---
plug-ins/common/file-raw-data.c | 5 +-
plug-ins/common/file-sunras.c | 3 +-
plug-ins/common/file-svg.c | 3 +-
plug-ins/common/file-tga.c | 4 +-
plug-ins/common/file-wmf.c | 3 +-
plug-ins/common/file-xbm.c | 2 +-
plug-ins/common/file-xmc.c | 7 +-
plug-ins/common/file-xpm.c | 2 +-
plug-ins/common/file-xwd.c | 3 +-
plug-ins/common/film.c | 3 +-
plug-ins/common/hot.c | 3 +-
plug-ins/common/smooth-palette.c | 2 +-
plug-ins/common/tile.c | 2 +-
plug-ins/common/warp.c | 6 +-
plug-ins/common/web-page.c | 3 +-
plug-ins/file-bmp/bmp-load.c | 2 +-
plug-ins/file-exr/file-exr.c | 2 +-
plug-ins/file-faxg3/faxg3.c | 2 +-
plug-ins/file-fits/fits.c | 2 +-
plug-ins/file-fli/fli-gimp.c | 3 +-
plug-ins/file-ico/ico-dialog.c | 4 +-
plug-ins/file-ico/ico-load.c | 3 +-
plug-ins/file-ico/ico-save.c | 2 +-
plug-ins/file-jpeg/jpeg-load.c | 6 +-
plug-ins/file-psd/psd-image-res-load.c | 3 +-
plug-ins/file-psd/psd-load.c | 7 +-
plug-ins/file-psd/psd-save.c | 34 +++---
plug-ins/file-psd/psd-util.c | 108 ++++++++--------
plug-ins/file-psd/psd-util.h | 4 +-
plug-ins/file-sgi/sgi.c | 3 +-
plug-ins/file-tiff/file-tiff-load.c | 6 +-
plug-ins/file-webp/file-webp-load.c | 2 +-
plug-ins/gfig/gfig-dialog.c | 11 +-
plug-ins/gfig/gfig-style.c | 2 +-
plug-ins/gfig/gfig-style.h | 2 +-
plug-ins/gfig/gfig.h | 20 ++--
plug-ins/lighting/lighting-apply.c | 4 +-
plug-ins/map-object/map-object-apply.c | 12 +-
plug-ins/pagecurl/pagecurl.c | 2 +-
plug-ins/pygimp/gimpenumsmodule.c | 47 +++++++
plug-ins/pygimp/gimpui.defs | 4 +-
plug-ins/pygimp/gimpui.override | 4 +-
plug-ins/pygimp/plug-ins/file-openraster.py | 34 +++---
plug-ins/pygimp/pygimp-drawable.c | 4 +-
plug-ins/pygimp/pygimp-image.c | 2 +-
plug-ins/screenshot/screenshot-win32.c | 3 +-
plug-ins/screenshot/screenshot-x11.c | 3 +-
plug-ins/script-fu/scheme-wrapper.c | 30 ++++-
plug-ins/script-fu/script-fu-interface.c | 96 +++++++-------
plug-ins/script-fu/script-fu-types.h | 8 +-
tools/pdbgen/enumcode.pl | 7 +
tools/pdbgen/enums.pl | 98 ++++++++------
tools/pdbgen/pdb/brush_select.pdb | 12 +-
tools/pdbgen/pdb/brushes.pdb | 6 +-
tools/pdbgen/pdb/context.pdb | 8 +-
tools/pdbgen/pdb/edit.pdb | 18 ++--
tools/pdbgen/pdb/layer.pdb | 16 +-
171 files changed, 1941 insertions(+), 1465 deletions(-)
---
diff --git a/app/actions/context-commands.c b/app/actions/context-commands.c
index 449557c..9b09ab4 100644
--- a/app/actions/context-commands.c
+++ b/app/actions/context-commands.c
@@ -48,35 +48,35 @@
#include "gimp-intl.h"
-static const GimpLayerModeEffects paint_modes[] =
-{
- GIMP_NORMAL_MODE,
- GIMP_DISSOLVE_MODE,
- GIMP_BEHIND_MODE,
- GIMP_COLOR_ERASE_MODE,
- GIMP_MULTIPLY_MODE,
- GIMP_DIVIDE_MODE,
- GIMP_SCREEN_MODE,
- GIMP_NEW_OVERLAY_MODE,
- GIMP_DODGE_MODE,
- GIMP_BURN_MODE,
- GIMP_HARDLIGHT_MODE,
- GIMP_SOFTLIGHT_MODE,
- GIMP_GRAIN_EXTRACT_MODE,
- GIMP_GRAIN_MERGE_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_LCH_HUE_MODE,
- GIMP_LCH_CHROMA_MODE,
- GIMP_LCH_COLOR_MODE,
- GIMP_LCH_LIGHTNESS_MODE
+static const GimpLayerMode paint_modes[] =
+{
+ GIMP_LAYER_MODE_NORMAL,
+ GIMP_LAYER_MODE_DISSOLVE,
+ GIMP_LAYER_MODE_BEHIND,
+ GIMP_LAYER_MODE_COLOR_ERASE,
+ GIMP_LAYER_MODE_MULTIPLY_BROKEN,
+ GIMP_LAYER_MODE_DIVIDE_BROKEN,
+ GIMP_LAYER_MODE_SCREEN_BROKEN,
+ GIMP_LAYER_MODE_OVERLAY,
+ GIMP_LAYER_MODE_DODGE_BROKEN,
+ GIMP_LAYER_MODE_BURN_BROKEN,
+ GIMP_LAYER_MODE_HARDLIGHT_BROKEN,
+ GIMP_LAYER_MODE_SOFTLIGHT_BROKEN,
+ GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN,
+ GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN,
+ GIMP_LAYER_MODE_DIFFERENCE_BROKEN,
+ GIMP_LAYER_MODE_ADDITION_BROKEN,
+ GIMP_LAYER_MODE_SUBTRACT_BROKEN,
+ GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN,
+ GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN,
+ GIMP_LAYER_MODE_HSV_HUE_BROKEN,
+ GIMP_LAYER_MODE_HSV_SATURATION_BROKEN,
+ GIMP_LAYER_MODE_HSV_COLOR_BROKEN,
+ GIMP_LAYER_MODE_HSV_VALUE_BROKEN,
+ GIMP_LAYER_MODE_LCH_HUE,
+ GIMP_LAYER_MODE_LCH_CHROMA,
+ GIMP_LAYER_MODE_LCH_COLOR,
+ GIMP_LAYER_MODE_LCH_LIGHTNESS
};
@@ -85,7 +85,7 @@ static const GimpLayerModeEffects paint_modes[] =
static void context_select_object (GimpActionSelectType select_type,
GimpContext *context,
GimpContainer *container);
-static gint context_paint_mode_index (GimpLayerModeEffects paint_mode);
+static gint context_paint_mode_index (GimpLayerMode paint_mode);
static void context_select_color (GimpActionSelectType select_type,
GimpRGB *color,
@@ -399,10 +399,10 @@ context_paint_mode_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
- GimpContext *context;
- GimpToolInfo *tool_info;
- GimpLayerModeEffects paint_mode;
- gint index;
+ GimpContext *context;
+ GimpToolInfo *tool_info;
+ GimpLayerMode paint_mode;
+ gint index;
return_if_no_context (context, data);
paint_mode = gimp_context_get_paint_mode (context);
@@ -420,7 +420,7 @@ context_paint_mode_cmd_callback (GtkAction *action,
GimpDisplay *display;
const char *value_desc;
- gimp_enum_get_value (GIMP_TYPE_LAYER_MODE_EFFECTS, index,
+ gimp_enum_get_value (GIMP_TYPE_LAYER_MODE, index,
NULL, NULL, &value_desc, NULL);
display = action_data_get_display (data);
@@ -748,7 +748,7 @@ context_select_object (GimpActionSelectType select_type,
}
static gint
-context_paint_mode_index (GimpLayerModeEffects paint_mode)
+context_paint_mode_index (GimpLayerMode paint_mode)
{
gint i = 0;
diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c
index 394fa7b..abc1b84 100644
--- a/app/actions/layers-commands.c
+++ b/app/actions/layers-commands.c
@@ -81,33 +81,33 @@
#include "gimp-intl.h"
-static const GimpLayerModeEffects layer_modes[] =
+static const GimpLayerMode layer_modes[] =
{
- GIMP_NORMAL_MODE,
- GIMP_DISSOLVE_MODE,
- GIMP_MULTIPLY_MODE,
- GIMP_DIVIDE_MODE,
- GIMP_SCREEN_MODE,
- GIMP_NEW_OVERLAY_MODE,
- GIMP_DODGE_MODE,
- GIMP_BURN_MODE,
- GIMP_HARDLIGHT_MODE,
- GIMP_SOFTLIGHT_MODE,
- GIMP_GRAIN_EXTRACT_MODE,
- GIMP_GRAIN_MERGE_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_LCH_HUE_MODE,
- GIMP_LCH_CHROMA_MODE,
- GIMP_LCH_COLOR_MODE,
- GIMP_LCH_LIGHTNESS_MODE
+ GIMP_LAYER_MODE_NORMAL,
+ GIMP_LAYER_MODE_DISSOLVE,
+ GIMP_LAYER_MODE_MULTIPLY_BROKEN,
+ GIMP_LAYER_MODE_DIVIDE_BROKEN,
+ GIMP_LAYER_MODE_SCREEN_BROKEN,
+ GIMP_LAYER_MODE_OVERLAY,
+ GIMP_LAYER_MODE_DODGE_BROKEN,
+ GIMP_LAYER_MODE_BURN_BROKEN,
+ GIMP_LAYER_MODE_HARDLIGHT_BROKEN,
+ GIMP_LAYER_MODE_SOFTLIGHT_BROKEN,
+ GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN,
+ GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN,
+ GIMP_LAYER_MODE_DIFFERENCE_BROKEN,
+ GIMP_LAYER_MODE_ADDITION_BROKEN,
+ GIMP_LAYER_MODE_SUBTRACT_BROKEN,
+ GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN,
+ GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN,
+ GIMP_LAYER_MODE_HSV_HUE_BROKEN,
+ GIMP_LAYER_MODE_HSV_SATURATION_BROKEN,
+ GIMP_LAYER_MODE_HSV_COLOR_BROKEN,
+ GIMP_LAYER_MODE_HSV_VALUE_BROKEN,
+ GIMP_LAYER_MODE_LCH_HUE,
+ GIMP_LAYER_MODE_LCH_CHROMA,
+ GIMP_LAYER_MODE_LCH_COLOR,
+ GIMP_LAYER_MODE_LCH_LIGHTNESS
};
@@ -118,7 +118,7 @@ static void layers_new_callback (GtkWidget *dialog,
GimpLayer *layer,
GimpContext *context,
const gchar *layer_name,
- GimpLayerModeEffects layer_mode,
+ GimpLayerMode layer_mode,
gdouble layer_opacity,
GimpFillType layer_fill_type,
gint layer_width,
@@ -138,7 +138,7 @@ static void layers_edit_attributes_callback (GtkWidget *dialog,
GimpLayer *layer,
GimpContext *context,
const gchar *layer_name,
- GimpLayerModeEffects layer_mode,
+ GimpLayerMode layer_mode,
gdouble layer_opacity,
GimpFillType layer_fill_type,
gint layer_width,
@@ -182,7 +182,7 @@ static void layers_resize_callback (GtkWidget *dialog,
gboolean unused2,
gpointer data);
-static gint layers_mode_index (GimpLayerModeEffects layer_mode);
+static gint layers_mode_index (GimpLayerMode layer_mode);
/* private variables */
@@ -346,15 +346,15 @@ void
layers_new_last_vals_cmd_callback (GtkAction *action,
gpointer data)
{
- GimpImage *image;
- GtkWidget *widget;
- GimpLayer *floating_sel;
- GimpLayer *new_layer;
- gint width, height;
- gint off_x, off_y;
- gdouble opacity;
- GimpLayerModeEffects mode;
- GimpDialogConfig *config;
+ GimpImage *image;
+ GtkWidget *widget;
+ GimpLayer *floating_sel;
+ GimpLayer *new_layer;
+ gint width, height;
+ gint off_x, off_y;
+ gdouble opacity;
+ GimpLayerMode mode;
+ GimpDialogConfig *config;
return_if_no_image (image, data);
return_if_no_widget (widget, data);
@@ -386,7 +386,7 @@ layers_new_last_vals_cmd_callback (GtkAction *action,
off_x = 0;
off_y = 0;
opacity = 1.0;
- mode = GIMP_NORMAL_MODE;
+ mode = GIMP_LAYER_MODE_NORMAL;
}
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_EDIT_PASTE,
@@ -432,7 +432,7 @@ layers_new_from_visible_cmd_callback (GtkAction *action,
TRUE),
_("Visible"),
GIMP_OPACITY_OPAQUE,
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
profile);
gimp_image_add_layer (image, layer, GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
@@ -1109,12 +1109,12 @@ layers_mode_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
- GimpImage *image;
- GimpLayer *layer;
- GimpLayerModeEffects layer_mode;
- gint index;
- GimpUndo *undo;
- gboolean push_undo = TRUE;
+ GimpImage *image;
+ GimpLayer *layer;
+ GimpLayerMode layer_mode;
+ gint index;
+ GimpUndo *undo;
+ gboolean push_undo = TRUE;
return_if_no_layer (image, layer, data);
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
@@ -1221,26 +1221,26 @@ layers_color_tag_cmd_callback (GtkAction *action,
/* private functions */
static void
-layers_new_callback (GtkWidget *dialog,
- GimpImage *image,
- GimpLayer *layer,
- GimpContext *context,
- const gchar *layer_name,
- GimpLayerModeEffects layer_mode,
- gdouble layer_opacity,
- GimpFillType layer_fill_type,
- gint layer_width,
- gint layer_height,
- gint layer_offset_x,
- gint layer_offset_y,
- gboolean layer_visible,
- gboolean layer_linked,
- GimpColorTag layer_color_tag,
- gboolean layer_lock_pixels,
- gboolean layer_lock_position,
- gboolean layer_lock_alpha,
- gboolean rename_text_layer, /* unused */
- gpointer user_data)
+layers_new_callback (GtkWidget *dialog,
+ GimpImage *image,
+ GimpLayer *layer,
+ GimpContext *context,
+ const gchar *layer_name,
+ GimpLayerMode layer_mode,
+ gdouble layer_opacity,
+ GimpFillType layer_fill_type,
+ gint layer_width,
+ gint layer_height,
+ gint layer_offset_x,
+ gint layer_offset_y,
+ gboolean layer_visible,
+ gboolean layer_linked,
+ GimpColorTag layer_color_tag,
+ gboolean layer_lock_pixels,
+ gboolean layer_lock_position,
+ gboolean layer_lock_alpha,
+ gboolean rename_text_layer, /* unused */
+ gpointer user_data)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
@@ -1284,26 +1284,26 @@ layers_new_callback (GtkWidget *dialog,
}
static void
-layers_edit_attributes_callback (GtkWidget *dialog,
- GimpImage *image,
- GimpLayer *layer,
- GimpContext *context,
- const gchar *layer_name,
- GimpLayerModeEffects layer_mode,
- gdouble layer_opacity,
- GimpFillType unused1,
- gint unused2,
- gint unused3,
- gint layer_offset_x,
- gint layer_offset_y,
- gboolean layer_visible,
- gboolean layer_linked,
- GimpColorTag layer_color_tag,
- gboolean layer_lock_pixels,
- gboolean layer_lock_position,
- gboolean layer_lock_alpha,
- gboolean rename_text_layer,
- gpointer user_data)
+layers_edit_attributes_callback (GtkWidget *dialog,
+ GimpImage *image,
+ GimpLayer *layer,
+ GimpContext *context,
+ const gchar *layer_name,
+ GimpLayerMode layer_mode,
+ gdouble layer_opacity,
+ GimpFillType unused1,
+ gint unused2,
+ gint unused3,
+ gint layer_offset_x,
+ gint layer_offset_y,
+ gboolean layer_visible,
+ gboolean layer_linked,
+ GimpColorTag layer_color_tag,
+ gboolean layer_lock_pixels,
+ gboolean layer_lock_position,
+ gboolean layer_lock_alpha,
+ gboolean rename_text_layer,
+ gpointer user_data)
{
GimpItem *item = GIMP_ITEM (layer);
@@ -1528,7 +1528,7 @@ layers_resize_callback (GtkWidget *dialog,
}
static gint
-layers_mode_index (GimpLayerModeEffects layer_mode)
+layers_mode_index (GimpLayerMode layer_mode)
{
gint i = 0;
diff --git a/app/app.c b/app/app.c
index 74b6d17..077d3b2 100644
--- a/app/app.c
+++ b/app/app.c
@@ -38,7 +38,9 @@
#include <winnls.h>
#endif
+#undef GIMP_DISABLE_DEPRECATED /* for compat enums */
#include "libgimpbase/gimpbase.h"
+#define GIMP_DISABLE_DEPRECATED
#include "libgimpconfig/gimpconfig.h"
#include "core/core-types.h"
@@ -91,6 +93,8 @@ void
app_libs_init (GOptionContext *context,
gboolean no_interface)
{
+ GQuark quark;
+
/* disable OpenCL before GEGL is even initialized; this way we only
* enable if wanted in gimprc, instead of always enabling, and then
* disabling again if wanted in gimprc
@@ -108,6 +112,12 @@ app_libs_init (GOptionContext *context,
gui_libs_init (context);
}
#endif
+
+ /* keep compat enum code in sync with tools/pdbgen/enumcode.pl */
+ quark = g_quark_from_static_string ("gimp-compat-enum");
+
+ g_type_set_qdata (GIMP_TYPE_LAYER_MODE, quark,
+ (gpointer) GIMP_TYPE_LAYER_MODE_EFFECTS);
}
void
diff --git a/app/config/gimpdialogconfig.c b/app/config/gimpdialogconfig.c
index 7ab14d1..e84fb44 100644
--- a/app/config/gimpdialogconfig.c
+++ b/app/config/gimpdialogconfig.c
@@ -298,8 +298,8 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
"layer-new-mode",
"Default new layer mode",
LAYER_NEW_MODE_BLURB,
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LAYER_NEW_OPACITY,
diff --git a/app/config/gimpdialogconfig.h b/app/config/gimpdialogconfig.h
index c04337b..55cfcdc 100644
--- a/app/config/gimpdialogconfig.h
+++ b/app/config/gimpdialogconfig.h
@@ -65,7 +65,7 @@ struct _GimpDialogConfig
gboolean image_resize_resize_text_layers;
gchar *layer_new_name;
- GimpLayerModeEffects layer_new_mode;
+ GimpLayerMode layer_new_mode;
gdouble layer_new_opacity;
GimpFillType layer_new_fill_type;
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index cbdcf44..4ca06f0 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -285,77 +285,77 @@ gimp_histogram_channel_get_type (void)
}
GType
-gimp_layer_mode_effects_get_type (void)
+gimp_layer_mode_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_NEW_OVERLAY_MODE, "GIMP_NEW_OVERLAY_MODE", "new-overlay-mode" },
- { GIMP_LCH_HUE_MODE, "GIMP_LCH_HUE_MODE", "lch-hue-mode" },
- { GIMP_LCH_CHROMA_MODE, "GIMP_LCH_CHROMA_MODE", "lch-chroma-mode" },
- { GIMP_LCH_COLOR_MODE, "GIMP_LCH_COLOR_MODE", "lch-color-mode" },
- { GIMP_LCH_LIGHTNESS_MODE, "GIMP_LCH_LIGHTNESS_MODE", "lch-lightness-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" },
+ { GIMP_LAYER_MODE_NORMAL, "GIMP_LAYER_MODE_NORMAL", "normal" },
+ { GIMP_LAYER_MODE_DISSOLVE, "GIMP_LAYER_MODE_DISSOLVE", "dissolve" },
+ { GIMP_LAYER_MODE_BEHIND, "GIMP_LAYER_MODE_BEHIND", "behind" },
+ { GIMP_LAYER_MODE_MULTIPLY_BROKEN, "GIMP_LAYER_MODE_MULTIPLY_BROKEN", "multiply-broken" },
+ { GIMP_LAYER_MODE_SCREEN_BROKEN, "GIMP_LAYER_MODE_SCREEN_BROKEN", "screen-broken" },
+ { GIMP_LAYER_MODE_OVERLAY_BROKEN, "GIMP_LAYER_MODE_OVERLAY_BROKEN", "overlay-broken" },
+ { GIMP_LAYER_MODE_DIFFERENCE_BROKEN, "GIMP_LAYER_MODE_DIFFERENCE_BROKEN", "difference-broken" },
+ { GIMP_LAYER_MODE_ADDITION_BROKEN, "GIMP_LAYER_MODE_ADDITION_BROKEN", "addition-broken" },
+ { GIMP_LAYER_MODE_SUBTRACT_BROKEN, "GIMP_LAYER_MODE_SUBTRACT_BROKEN", "subtract-broken" },
+ { GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN, "GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN", "darken-only-broken" },
+ { GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN, "GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN", "lighten-only-broken" },
+ { GIMP_LAYER_MODE_HSV_HUE_BROKEN, "GIMP_LAYER_MODE_HSV_HUE_BROKEN", "hsv-hue-broken" },
+ { GIMP_LAYER_MODE_HSV_SATURATION_BROKEN, "GIMP_LAYER_MODE_HSV_SATURATION_BROKEN",
"hsv-saturation-broken" },
+ { GIMP_LAYER_MODE_HSV_COLOR_BROKEN, "GIMP_LAYER_MODE_HSV_COLOR_BROKEN", "hsv-color-broken" },
+ { GIMP_LAYER_MODE_HSV_VALUE_BROKEN, "GIMP_LAYER_MODE_HSV_VALUE_BROKEN", "hsv-value-broken" },
+ { GIMP_LAYER_MODE_DIVIDE_BROKEN, "GIMP_LAYER_MODE_DIVIDE_BROKEN", "divide-broken" },
+ { GIMP_LAYER_MODE_DODGE_BROKEN, "GIMP_LAYER_MODE_DODGE_BROKEN", "dodge-broken" },
+ { GIMP_LAYER_MODE_BURN_BROKEN, "GIMP_LAYER_MODE_BURN_BROKEN", "burn-broken" },
+ { GIMP_LAYER_MODE_HARDLIGHT_BROKEN, "GIMP_LAYER_MODE_HARDLIGHT_BROKEN", "hardlight-broken" },
+ { GIMP_LAYER_MODE_SOFTLIGHT_BROKEN, "GIMP_LAYER_MODE_SOFTLIGHT_BROKEN", "softlight-broken" },
+ { GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN, "GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN", "grain-extract-broken" },
+ { GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN, "GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN", "grain-merge-broken" },
+ { GIMP_LAYER_MODE_COLOR_ERASE, "GIMP_LAYER_MODE_COLOR_ERASE", "color-erase" },
+ { GIMP_LAYER_MODE_OVERLAY, "GIMP_LAYER_MODE_OVERLAY", "overlay" },
+ { GIMP_LAYER_MODE_LCH_HUE, "GIMP_LAYER_MODE_LCH_HUE", "lch-hue" },
+ { GIMP_LAYER_MODE_LCH_CHROMA, "GIMP_LAYER_MODE_LCH_CHROMA", "lch-chroma" },
+ { GIMP_LAYER_MODE_LCH_COLOR, "GIMP_LAYER_MODE_LCH_COLOR", "lch-color" },
+ { GIMP_LAYER_MODE_LCH_LIGHTNESS, "GIMP_LAYER_MODE_LCH_LIGHTNESS", "lch-lightness" },
+ { GIMP_LAYER_MODE_ERASE, "GIMP_LAYER_MODE_ERASE", "erase" },
+ { GIMP_LAYER_MODE_REPLACE, "GIMP_LAYER_MODE_REPLACE", "replace" },
+ { GIMP_LAYER_MODE_ANTI_ERASE, "GIMP_LAYER_MODE_ANTI_ERASE", "anti-erase" },
{ 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", "Old broken 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 (HSV)"), NULL },
- { GIMP_SATURATION_MODE, NC_("layer-mode-effects", "Saturation (HSV)"), NULL },
- { GIMP_COLOR_MODE, NC_("layer-mode-effects", "Color (HSV)"), NULL },
- { GIMP_VALUE_MODE, NC_("layer-mode-effects", "Value (HSV)"), 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_NEW_OVERLAY_MODE, NC_("layer-mode-effects", "Overlay"), NULL },
- { GIMP_LCH_HUE_MODE, NC_("layer-mode-effects", "Hue (LCH)"), NULL },
- { GIMP_LCH_CHROMA_MODE, NC_("layer-mode-effects", "Chroma (LCH)"), NULL },
- { GIMP_LCH_COLOR_MODE, NC_("layer-mode-effects", "Color (LCH)"), NULL },
- { GIMP_LCH_LIGHTNESS_MODE, NC_("layer-mode-effects", "Lightness (LCH)"), 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 },
+ { GIMP_LAYER_MODE_NORMAL, NC_("layer-mode", "Normal"), NULL },
+ { GIMP_LAYER_MODE_DISSOLVE, NC_("layer-mode", "Dissolve"), NULL },
+ { GIMP_LAYER_MODE_BEHIND, NC_("layer-mode", "Behind"), NULL },
+ { GIMP_LAYER_MODE_MULTIPLY_BROKEN, NC_("layer-mode", "Multiply"), NULL },
+ { GIMP_LAYER_MODE_SCREEN_BROKEN, NC_("layer-mode", "Screen"), NULL },
+ { GIMP_LAYER_MODE_OVERLAY_BROKEN, NC_("layer-mode", "Old broken Overlay"), NULL },
+ { GIMP_LAYER_MODE_DIFFERENCE_BROKEN, NC_("layer-mode", "Difference"), NULL },
+ { GIMP_LAYER_MODE_ADDITION_BROKEN, NC_("layer-mode", "Addition"), NULL },
+ { GIMP_LAYER_MODE_SUBTRACT_BROKEN, NC_("layer-mode", "Subtract"), NULL },
+ { GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN, NC_("layer-mode", "Darken only"), NULL },
+ { GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN, NC_("layer-mode", "Lighten only"), NULL },
+ { GIMP_LAYER_MODE_HSV_HUE_BROKEN, NC_("layer-mode", "Hue (HSV)"), NULL },
+ { GIMP_LAYER_MODE_HSV_SATURATION_BROKEN, NC_("layer-mode", "Saturation (HSV)"), NULL },
+ { GIMP_LAYER_MODE_HSV_COLOR_BROKEN, NC_("layer-mode", "Color (HSV)"), NULL },
+ { GIMP_LAYER_MODE_HSV_VALUE_BROKEN, NC_("layer-mode", "Value (HSV)"), NULL },
+ { GIMP_LAYER_MODE_DIVIDE_BROKEN, NC_("layer-mode", "Divide"), NULL },
+ { GIMP_LAYER_MODE_DODGE_BROKEN, NC_("layer-mode", "Dodge"), NULL },
+ { GIMP_LAYER_MODE_BURN_BROKEN, NC_("layer-mode", "Burn"), NULL },
+ { GIMP_LAYER_MODE_HARDLIGHT_BROKEN, NC_("layer-mode", "Hard light"), NULL },
+ { GIMP_LAYER_MODE_SOFTLIGHT_BROKEN, NC_("layer-mode", "Soft light"), NULL },
+ { GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN, NC_("layer-mode", "Grain extract"), NULL },
+ { GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN, NC_("layer-mode", "Grain merge"), NULL },
+ { GIMP_LAYER_MODE_COLOR_ERASE, NC_("layer-mode", "Color erase"), NULL },
+ { GIMP_LAYER_MODE_OVERLAY, NC_("layer-mode", "Overlay"), NULL },
+ { GIMP_LAYER_MODE_LCH_HUE, NC_("layer-mode", "Hue (LCH)"), NULL },
+ { GIMP_LAYER_MODE_LCH_CHROMA, NC_("layer-mode", "Chroma (LCH)"), NULL },
+ { GIMP_LAYER_MODE_LCH_COLOR, NC_("layer-mode", "Color (LCH)"), NULL },
+ { GIMP_LAYER_MODE_LCH_LIGHTNESS, NC_("layer-mode", "Lightness (LCH)"), NULL },
+ { GIMP_LAYER_MODE_ERASE, NC_("layer-mode", "Erase"), NULL },
+ { GIMP_LAYER_MODE_REPLACE, NC_("layer-mode", "Replace"), NULL },
+ { GIMP_LAYER_MODE_ANTI_ERASE, NC_("layer-mode", "Anti erase"), NULL },
{ 0, NULL, NULL }
};
@@ -363,8 +363,8 @@ gimp_layer_mode_effects_get_type (void)
if (G_UNLIKELY (! type))
{
- type = g_enum_register_static ("GimpLayerModeEffects", values);
- gimp_type_set_translation_context (type, "layer-mode-effects");
+ type = g_enum_register_static ("GimpLayerMode", values);
+ gimp_type_set_translation_context (type, "layer-mode");
gimp_enum_set_value_descriptions (type, descs);
}
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 95616e6..933aabd 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -148,46 +148,46 @@ typedef enum
} GimpHistogramChannel;
-#define GIMP_TYPE_LAYER_MODE_EFFECTS (gimp_layer_mode_effects_get_type ())
+#define GIMP_TYPE_LAYER_MODE (gimp_layer_mode_get_type ())
-GType gimp_layer_mode_effects_get_type (void) G_GNUC_CONST;
+GType gimp_layer_mode_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="Old broken 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 (HSV)" >*/
- GIMP_SATURATION_MODE, /*< desc="Saturation (HSV)" >*/
- GIMP_COLOR_MODE, /*< desc="Color (HSV)" >*/
- GIMP_VALUE_MODE, /*< desc="Value (HSV)" >*/
- 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_NEW_OVERLAY_MODE, /*< desc="Overlay" >*/
- GIMP_LCH_HUE_MODE, /*< desc="Hue (LCH)" >*/
- GIMP_LCH_CHROMA_MODE, /*< desc="Chroma (LCH)" >*/
- GIMP_LCH_COLOR_MODE, /*< desc="Color (LCH)" >*/
- GIMP_LCH_LIGHTNESS_MODE, /*< desc="Lightness (LCH)" >*/
+ GIMP_LAYER_MODE_NORMAL, /*< desc="Normal" >*/
+ GIMP_LAYER_MODE_DISSOLVE, /*< desc="Dissolve" >*/
+ GIMP_LAYER_MODE_BEHIND, /*< desc="Behind" >*/
+ GIMP_LAYER_MODE_MULTIPLY_BROKEN, /*< desc="Multiply" >*/
+ GIMP_LAYER_MODE_SCREEN_BROKEN, /*< desc="Screen" >*/
+ GIMP_LAYER_MODE_OVERLAY_BROKEN, /*< desc="Old broken Overlay" >*/
+ GIMP_LAYER_MODE_DIFFERENCE_BROKEN, /*< desc="Difference" >*/
+ GIMP_LAYER_MODE_ADDITION_BROKEN, /*< desc="Addition" >*/
+ GIMP_LAYER_MODE_SUBTRACT_BROKEN, /*< desc="Subtract" >*/
+ GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN, /*< desc="Darken only" >*/
+ GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN, /*< desc="Lighten only" >*/
+ GIMP_LAYER_MODE_HSV_HUE_BROKEN, /*< desc="Hue (HSV)" >*/
+ GIMP_LAYER_MODE_HSV_SATURATION_BROKEN, /*< desc="Saturation (HSV)" >*/
+ GIMP_LAYER_MODE_HSV_COLOR_BROKEN, /*< desc="Color (HSV)" >*/
+ GIMP_LAYER_MODE_HSV_VALUE_BROKEN, /*< desc="Value (HSV)" >*/
+ GIMP_LAYER_MODE_DIVIDE_BROKEN, /*< desc="Divide" >*/
+ GIMP_LAYER_MODE_DODGE_BROKEN, /*< desc="Dodge" >*/
+ GIMP_LAYER_MODE_BURN_BROKEN, /*< desc="Burn" >*/
+ GIMP_LAYER_MODE_HARDLIGHT_BROKEN, /*< desc="Hard light" >*/
+ GIMP_LAYER_MODE_SOFTLIGHT_BROKEN, /*< desc="Soft light" >*/
+ GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN, /*< desc="Grain extract" >*/
+ GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN, /*< desc="Grain merge" >*/
+ GIMP_LAYER_MODE_COLOR_ERASE, /*< desc="Color erase" >*/
+ GIMP_LAYER_MODE_OVERLAY, /*< desc="Overlay" >*/
+ GIMP_LAYER_MODE_LCH_HUE, /*< desc="Hue (LCH)" >*/
+ GIMP_LAYER_MODE_LCH_CHROMA, /*< desc="Chroma (LCH)" >*/
+ GIMP_LAYER_MODE_LCH_COLOR, /*< desc="Color (LCH)" >*/
+ GIMP_LAYER_MODE_LCH_LIGHTNESS, /*< desc="Lightness (LCH)" >*/
/* internal modes, not available to the PDB */
- GIMP_ERASE_MODE = 1000, /*< pdb-skip, desc="Erase" >*/
- GIMP_REPLACE_MODE = 1001, /*< pdb-skip, desc="Replace" >*/
- GIMP_ANTI_ERASE_MODE = 1002 /*< pdb-skip, desc="Anti erase" >*/
-} GimpLayerModeEffects;
+ GIMP_LAYER_MODE_ERASE = 1000, /*< pdb-skip, desc="Erase" >*/
+ GIMP_LAYER_MODE_REPLACE = 1001, /*< pdb-skip, desc="Replace" >*/
+ GIMP_LAYER_MODE_ANTI_ERASE = 1002 /*< pdb-skip, desc="Anti erase" >*/
+} GimpLayerMode;
#define GIMP_TYPE_MATTING_ENGINE (gimp_matting_engine_get_type ())
diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c
index 273e092..b622a8f 100644
--- a/app/core/gimp-edit.c
+++ b/app/core/gimp-edit.c
@@ -419,7 +419,8 @@ gimp_edit_paste (GimpImage *image,
layer = gimp_layer_new_from_buffer (GIMP_BUFFER (paste), image,
floating_format,
_("Pasted Layer"),
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
}
if (! layer)
diff --git a/app/core/gimp-utils.c b/app/core/gimp-utils.c
index 9f06db2..ba2f9c0 100644
--- a/app/core/gimp-utils.c
+++ b/app/core/gimp-utils.c
@@ -868,7 +868,7 @@ gimp_create_image_from_buffer (Gimp *gimp,
layer = gimp_layer_new_from_gegl_buffer (buffer, image, format,
image_name,
GIMP_OPACITY_OPAQUE,
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
NULL /* same image */);
gimp_image_add_layer (image, layer, NULL, -1, FALSE);
diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c
index 65c4c42..21a458d 100644
--- a/app/core/gimpchannel.c
+++ b/app/core/gimpchannel.c
@@ -163,7 +163,7 @@ static void gimp_channel_apply_buffer (GimpDrawable *drawable,
gboolean push_undo,
const gchar *undo_desc,
gdouble opacity,
- GimpLayerModeEffects mode,
+ GimpLayerMode mode,
GeglBuffer *base_buffer,
gint base_x,
gint base_y);
@@ -1007,16 +1007,16 @@ gimp_channel_get_active_mask (GimpDrawable *drawable)
}
static void
-gimp_channel_apply_buffer (GimpDrawable *drawable,
- GeglBuffer *buffer,
- const GeglRectangle *buffer_region,
- gboolean push_undo,
- const gchar *undo_desc,
- gdouble opacity,
- GimpLayerModeEffects mode,
- GeglBuffer *base_buffer,
- gint base_x,
- gint base_y)
+gimp_channel_apply_buffer (GimpDrawable *drawable,
+ GeglBuffer *buffer,
+ const GeglRectangle *buffer_region,
+ gboolean push_undo,
+ const gchar *undo_desc,
+ gdouble opacity,
+ GimpLayerMode mode,
+ GeglBuffer *base_buffer,
+ gint base_x,
+ gint base_y)
{
gimp_drawable_invalidate_boundary (drawable);
diff --git a/app/core/gimpcontext.c b/app/core/gimpcontext.c
index 6c2412c..34a9b8b 100644
--- a/app/core/gimpcontext.c
+++ b/app/core/gimpcontext.c
@@ -153,7 +153,7 @@ static void gimp_context_real_set_opacity (GimpContext *context,
/* paint mode */
static void gimp_context_real_set_paint_mode (GimpContext *context,
- GimpLayerModeEffects paint_mode);
+ GimpLayerMode paint_mode);
/* brush */
static void gimp_context_brush_dirty (GimpBrush *brush,
@@ -471,7 +471,7 @@ gimp_context_class_init (GimpContextClass *klass)
NULL, NULL,
gimp_marshal_VOID__ENUM,
G_TYPE_NONE, 1,
- GIMP_TYPE_LAYER_MODE_EFFECTS);
+ GIMP_TYPE_LAYER_MODE);
gimp_context_signals[BRUSH_CHANGED] =
g_signal_new ("brush-changed",
@@ -695,8 +695,8 @@ gimp_context_class_init (GimpContextClass *klass)
gimp_context_prop_names[GIMP_CONTEXT_PROP_PAINT_MODE],
_("Paint Mode"),
_("Paint Mode"),
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_OBJECT (object_class, GIMP_CONTEXT_PROP_BRUSH,
@@ -1339,16 +1339,18 @@ gimp_context_deserialize (GimpConfig *config,
gint nest_level,
gpointer data)
{
- GimpContext *context = GIMP_CONTEXT (config);
- GimpLayerModeEffects old_paint_mode = context->paint_mode;
- gboolean success;
+ GimpContext *context = GIMP_CONTEXT (config);
+ GimpLayerMode old_paint_mode = context->paint_mode;
+ gboolean success;
success = gimp_config_deserialize_properties (config, scanner, nest_level);
if (context->paint_mode != old_paint_mode)
{
- if (context->paint_mode == GIMP_OVERLAY_MODE)
- g_object_set (context, "paint-mode", GIMP_SOFTLIGHT_MODE, NULL);
+ if (context->paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ g_object_set (context,
+ "paint-mode", GIMP_LAYER_MODE_SOFTLIGHT_BROKEN,
+ NULL);
}
return success;
@@ -2584,17 +2586,17 @@ gimp_context_real_set_opacity (GimpContext *context,
/*****************************************************************************/
/* paint mode **************************************************************/
-GimpLayerModeEffects
+GimpLayerMode
gimp_context_get_paint_mode (GimpContext *context)
{
- g_return_val_if_fail (GIMP_IS_CONTEXT (context), GIMP_NORMAL_MODE);
+ g_return_val_if_fail (GIMP_IS_CONTEXT (context), GIMP_LAYER_MODE_NORMAL);
return context->paint_mode;
}
void
-gimp_context_set_paint_mode (GimpContext *context,
- GimpLayerModeEffects paint_mode)
+gimp_context_set_paint_mode (GimpContext *context,
+ GimpLayerMode paint_mode)
{
g_return_if_fail (GIMP_IS_CONTEXT (context));
context_find_defined (context, GIMP_CONTEXT_PROP_PAINT_MODE);
@@ -2613,8 +2615,8 @@ gimp_context_paint_mode_changed (GimpContext *context)
}
static void
-gimp_context_real_set_paint_mode (GimpContext *context,
- GimpLayerModeEffects paint_mode)
+gimp_context_real_set_paint_mode (GimpContext *context,
+ GimpLayerMode paint_mode)
{
if (context->paint_mode == paint_mode)
return;
diff --git a/app/core/gimpcontext.h b/app/core/gimpcontext.h
index 7fac0e9..c90493e 100644
--- a/app/core/gimpcontext.h
+++ b/app/core/gimpcontext.h
@@ -68,7 +68,7 @@ struct _GimpContext
GimpRGB background;
gdouble opacity;
- GimpLayerModeEffects paint_mode;
+ GimpLayerMode paint_mode;
GimpBrush *brush;
gchar *brush_name;
@@ -125,7 +125,7 @@ struct _GimpContextClass
void (* opacity_changed) (GimpContext *context,
gdouble opacity);
void (* paint_mode_changed) (GimpContext *context,
- GimpLayerModeEffects paint_mode);
+ GimpLayerMode paint_mode);
void (* brush_changed) (GimpContext *context,
GimpBrush *brush);
void (* dynamics_changed) (GimpContext *context,
@@ -271,10 +271,9 @@ void gimp_context_opacity_changed (GimpContext *context);
/* paint mode */
-GimpLayerModeEffects
- gimp_context_get_paint_mode (GimpContext *context);
+GimpLayerMode gimp_context_get_paint_mode (GimpContext *context);
void gimp_context_set_paint_mode (GimpContext *context,
- GimpLayerModeEffects paint_mode);
+ GimpLayerMode paint_mode);
void gimp_context_paint_mode_changed (GimpContext *context);
diff --git a/app/core/gimpdrawable-blend.c b/app/core/gimpdrawable-blend.c
index c6bdf3e..50e39a2 100644
--- a/app/core/gimpdrawable-blend.c
+++ b/app/core/gimpdrawable-blend.c
@@ -67,24 +67,24 @@ typedef struct
/* public functions */
void
-gimp_drawable_blend (GimpDrawable *drawable,
- GimpContext *context,
- GimpGradient *gradient,
- GimpLayerModeEffects paint_mode,
- GimpGradientType gradient_type,
- gdouble opacity,
- gdouble offset,
- GimpRepeatMode repeat,
- gboolean reverse,
- gboolean supersample,
- gint max_depth,
- gdouble threshold,
- gboolean dither,
- gdouble startx,
- gdouble starty,
- gdouble endx,
- gdouble endy,
- GimpProgress *progress)
+gimp_drawable_blend (GimpDrawable *drawable,
+ GimpContext *context,
+ GimpGradient *gradient,
+ GimpLayerMode paint_mode,
+ GimpGradientType gradient_type,
+ gdouble opacity,
+ gdouble offset,
+ GimpRepeatMode repeat,
+ gboolean reverse,
+ gboolean supersample,
+ gint max_depth,
+ gdouble threshold,
+ gboolean dither,
+ gdouble startx,
+ gdouble starty,
+ gdouble endx,
+ gdouble endy,
+ GimpProgress *progress)
{
GimpImage *image;
GeglBuffer *buffer;
diff --git a/app/core/gimpdrawable-blend.h b/app/core/gimpdrawable-blend.h
index 9bf963a..4853f4e 100644
--- a/app/core/gimpdrawable-blend.h
+++ b/app/core/gimpdrawable-blend.h
@@ -19,24 +19,24 @@
#define __GIMP_DRAWABLE_BLEND_H__
-void gimp_drawable_blend (GimpDrawable *drawable,
- GimpContext *context,
- GimpGradient *gradient,
- GimpLayerModeEffects paint_mode,
- GimpGradientType gradient_type,
- gdouble opacity,
- gdouble offset,
- GimpRepeatMode repeat,
- gboolean reverse,
- gboolean supersample,
- gint max_depth,
- gdouble threshold,
- gboolean dither,
- gdouble startx,
- gdouble starty,
- gdouble endx,
- gdouble endy,
- GimpProgress *progress);
+void gimp_drawable_blend (GimpDrawable *drawable,
+ GimpContext *context,
+ GimpGradient *gradient,
+ GimpLayerMode paint_mode,
+ GimpGradientType gradient_type,
+ gdouble opacity,
+ gdouble offset,
+ GimpRepeatMode repeat,
+ gboolean reverse,
+ gboolean supersample,
+ gint max_depth,
+ gdouble threshold,
+ gboolean dither,
+ gdouble startx,
+ gdouble starty,
+ gdouble endx,
+ gdouble endy,
+ GimpProgress *progress);
GeglBuffer *
gimp_drawable_blend_shapeburst_distmap (GimpDrawable *drawable,
diff --git a/app/core/gimpdrawable-combine.c b/app/core/gimpdrawable-combine.c
index 5190483..4f608e5 100644
--- a/app/core/gimpdrawable-combine.c
+++ b/app/core/gimpdrawable-combine.c
@@ -40,16 +40,16 @@
void
-gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
- GeglBuffer *buffer,
- const GeglRectangle *buffer_region,
- gboolean push_undo,
- const gchar *undo_desc,
- gdouble opacity,
- GimpLayerModeEffects mode,
- GeglBuffer *base_buffer,
- gint base_x,
- gint base_y)
+gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
+ GeglBuffer *buffer,
+ const GeglRectangle *buffer_region,
+ gboolean push_undo,
+ const gchar *undo_desc,
+ gdouble opacity,
+ GimpLayerMode mode,
+ GeglBuffer *base_buffer,
+ gint base_x,
+ gint base_y)
{
GimpItem *item = GIMP_ITEM (drawable);
GimpImage *image = gimp_item_get_image (item);
diff --git a/app/core/gimpdrawable-combine.h b/app/core/gimpdrawable-combine.h
index 503c277..9b73208 100644
--- a/app/core/gimpdrawable-combine.h
+++ b/app/core/gimpdrawable-combine.h
@@ -21,26 +21,26 @@
/* virtual functions of GimpDrawable, don't call directly */
-void gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
- GeglBuffer *buffer,
- const GeglRectangle *buffer_region,
- gboolean push_undo,
- const gchar *undo_desc,
- gdouble opacity,
- GimpLayerModeEffects mode,
- GeglBuffer *base_buffer,
- gint base_x,
- gint base_y);
-void gimp_drawable_real_replace_buffer (GimpDrawable *drawable,
- GeglBuffer *buffer,
- const GeglRectangle *buffer_region,
- gboolean push_undo,
- const gchar *undo_desc,
- gdouble opacity,
- GeglBuffer *mask,
- const GeglRectangle *mask_region,
- gint x,
- gint y);
+void gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
+ GeglBuffer *buffer,
+ const GeglRectangle *buffer_region,
+ gboolean push_undo,
+ const gchar *undo_desc,
+ gdouble opacity,
+ GimpLayerMode mode,
+ GeglBuffer *base_buffer,
+ gint base_x,
+ gint base_y);
+void gimp_drawable_real_replace_buffer (GimpDrawable *drawable,
+ GeglBuffer *buffer,
+ const GeglRectangle *buffer_region,
+ gboolean push_undo,
+ const gchar *undo_desc,
+ gdouble opacity,
+ GeglBuffer *mask,
+ const GeglRectangle *mask_region,
+ gint x,
+ gint y);
#endif /* __GIMP_DRAWABLE_COMBINE_H__ */
diff --git a/app/core/gimpdrawable-shadow.c b/app/core/gimpdrawable-shadow.c
index 08ccab5..cb6f01f 100644
--- a/app/core/gimpdrawable-shadow.c
+++ b/app/core/gimpdrawable-shadow.c
@@ -101,7 +101,8 @@ gimp_drawable_merge_shadow_buffer (GimpDrawable *drawable,
gimp_drawable_apply_buffer (drawable, buffer,
GEGL_RECTANGLE (x, y, width, height),
push_undo, undo_desc,
- GIMP_OPACITY_OPAQUE, GIMP_REPLACE_MODE,
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_REPLACE,
NULL, x, y);
g_object_unref (buffer);
diff --git a/app/core/gimpdrawable-transform.c b/app/core/gimpdrawable-transform.c
index 034603a..d7ea02d 100644
--- a/app/core/gimpdrawable-transform.c
+++ b/app/core/gimpdrawable-transform.c
@@ -1002,7 +1002,8 @@ gimp_drawable_transform_paste (GimpDrawable *drawable,
gimp_layer_new_from_gegl_buffer (buffer, image,
gimp_drawable_get_format_with_alpha (drawable),
_("Transformation"),
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE,
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL,
buffer_profile);
gimp_item_set_offset (GIMP_ITEM (layer), offset_x, offset_y);
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index 13c8e4a..9212fba 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -1091,16 +1091,16 @@ gimp_drawable_convert_type (GimpDrawable *drawable,
}
void
-gimp_drawable_apply_buffer (GimpDrawable *drawable,
- GeglBuffer *buffer,
- const GeglRectangle *buffer_region,
- gboolean push_undo,
- const gchar *undo_desc,
- gdouble opacity,
- GimpLayerModeEffects mode,
- GeglBuffer *base_buffer,
- gint base_x,
- gint base_y)
+gimp_drawable_apply_buffer (GimpDrawable *drawable,
+ GeglBuffer *buffer,
+ const GeglRectangle *buffer_region,
+ gboolean push_undo,
+ const gchar *undo_desc,
+ gdouble opacity,
+ GimpLayerMode mode,
+ GeglBuffer *base_buffer,
+ gint base_x,
+ gint base_y)
{
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
diff --git a/app/core/gimpdrawable.h b/app/core/gimpdrawable.h
index ee33ba5..09a33d7 100644
--- a/app/core/gimpdrawable.h
+++ b/app/core/gimpdrawable.h
@@ -75,7 +75,7 @@ struct _GimpDrawableClass
gboolean push_undo,
const gchar *undo_desc,
gdouble opacity,
- GimpLayerModeEffects mode,
+ GimpLayerMode mode,
GeglBuffer *base_buffer,
gint base_x,
gint base_y);
@@ -155,7 +155,7 @@ void gimp_drawable_apply_buffer (GimpDrawable *drawable,
gboolean push_undo,
const gchar *undo_desc,
gdouble opacity,
- GimpLayerModeEffects mode,
+ GimpLayerMode mode,
GeglBuffer *base_buffer,
gint base_x,
gint base_y);
diff --git a/app/core/gimpdrawablefilter.c b/app/core/gimpdrawablefilter.c
index 0e670ff..5deeb9f 100644
--- a/app/core/gimpdrawablefilter.c
+++ b/app/core/gimpdrawablefilter.c
@@ -57,29 +57,29 @@ enum
struct _GimpDrawableFilter
{
- GimpFilter parent_instance;
-
- GimpDrawable *drawable;
- GeglNode *operation;
-
- GimpFilterRegion region;
- gboolean preview_enabled;
- GimpAlignmentType preview_alignment;
- gdouble preview_position;
- gdouble opacity;
- GimpLayerModeEffects paint_mode;
- gboolean color_managed;
- gboolean gamma_hack;
-
- GeglRectangle filter_area;
-
- GeglNode *translate;
- GeglNode *crop;
- GeglNode *cast_before;
- GeglNode *transform_before;
- GeglNode *transform_after;
- GeglNode *cast_after;
- GimpApplicator *applicator;
+ GimpFilter parent_instance;
+
+ GimpDrawable *drawable;
+ GeglNode *operation;
+
+ GimpFilterRegion region;
+ gboolean preview_enabled;
+ GimpAlignmentType preview_alignment;
+ gdouble preview_position;
+ gdouble opacity;
+ GimpLayerMode paint_mode;
+ gboolean color_managed;
+ gboolean gamma_hack;
+
+ GeglRectangle filter_area;
+
+ GeglNode *translate;
+ GeglNode *crop;
+ GeglNode *cast_before;
+ GeglNode *transform_before;
+ GeglNode *transform_after;
+ GeglNode *cast_after;
+ GimpApplicator *applicator;
};
@@ -148,7 +148,7 @@ gimp_drawable_filter_init (GimpDrawableFilter *drawable_filter)
drawable_filter->preview_alignment = GIMP_ALIGN_LEFT;
drawable_filter->preview_position = 1.0;
drawable_filter->opacity = GIMP_OPACITY_OPAQUE;
- drawable_filter->paint_mode = GIMP_REPLACE_MODE;
+ drawable_filter->paint_mode = GIMP_LAYER_MODE_REPLACE;
}
static void
@@ -332,8 +332,8 @@ gimp_drawable_filter_set_opacity (GimpDrawableFilter *filter,
}
void
-gimp_drawable_filter_set_mode (GimpDrawableFilter *filter,
- GimpLayerModeEffects paint_mode)
+gimp_drawable_filter_set_mode (GimpDrawableFilter *filter,
+ GimpLayerMode paint_mode)
{
g_return_if_fail (GIMP_IS_DRAWABLE_FILTER (filter));
diff --git a/app/core/gimpdrawablefilter.h b/app/core/gimpdrawablefilter.h
index 87630aa..9e3a11d 100644
--- a/app/core/gimpdrawablefilter.h
+++ b/app/core/gimpdrawablefilter.h
@@ -50,35 +50,35 @@ struct _GimpDrawableFilterClass
GType gimp_drawable_filter_get_type (void) G_GNUC_CONST;
GimpDrawableFilter *
- gimp_drawable_filter_new (GimpDrawable *drawable,
- const gchar *undo_desc,
- GeglNode *operation,
- const gchar *icon_name);
-
-void gimp_drawable_filter_set_region (GimpDrawableFilter *filter,
- GimpFilterRegion region);
-void gimp_drawable_filter_set_preview (GimpDrawableFilter *filter,
- gboolean enabled,
- GimpAlignmentType alignment,
- gdouble split_position);
-void gimp_drawable_filter_set_opacity (GimpDrawableFilter *filter,
- gdouble opacity);
-void gimp_drawable_filter_set_mode (GimpDrawableFilter *filter,
- GimpLayerModeEffects paint_mode);
+ gimp_drawable_filter_new (GimpDrawable *drawable,
+ const gchar *undo_desc,
+ GeglNode *operation,
+ const gchar *icon_name);
+
+void gimp_drawable_filter_set_region (GimpDrawableFilter *filter,
+ GimpFilterRegion region);
+void gimp_drawable_filter_set_preview (GimpDrawableFilter *filter,
+ gboolean enabled,
+ GimpAlignmentType alignment,
+ gdouble split_position);
+void gimp_drawable_filter_set_opacity (GimpDrawableFilter *filter,
+ gdouble opacity);
+void gimp_drawable_filter_set_mode (GimpDrawableFilter *filter,
+ GimpLayerMode paint_mode);
void gimp_drawable_filter_set_color_managed
- (GimpDrawableFilter *filter,
- gboolean managed);
-void gimp_drawable_filter_set_gamma_hack (GimpDrawableFilter *filter,
- gboolean gamma_hack);
-
-void gimp_drawable_filter_apply (GimpDrawableFilter *filter,
- const GeglRectangle *area);
-
-gboolean gimp_drawable_filter_commit (GimpDrawableFilter *filter,
- GimpProgress *progress,
- gboolean cancellable);
-void gimp_drawable_filter_abort (GimpDrawableFilter *filter);
+ (GimpDrawableFilter *filter,
+ gboolean managed);
+void gimp_drawable_filter_set_gamma_hack (GimpDrawableFilter *filter,
+ gboolean gamma_hack);
+
+void gimp_drawable_filter_apply (GimpDrawableFilter *filter,
+ const GeglRectangle *area);
+
+gboolean gimp_drawable_filter_commit (GimpDrawableFilter *filter,
+ GimpProgress *progress,
+ gboolean cancellable);
+void gimp_drawable_filter_abort (GimpDrawableFilter *filter);
#endif /* __GIMP_DRAWABLE_FILTER_H__ */
diff --git a/app/core/gimpdrawableundo.h b/app/core/gimpdrawableundo.h
index 0f8456c..ff07b41 100644
--- a/app/core/gimpdrawableundo.h
+++ b/app/core/gimpdrawableundo.h
@@ -35,16 +35,16 @@ typedef struct _GimpDrawableUndoClass GimpDrawableUndoClass;
struct _GimpDrawableUndo
{
- GimpItemUndo parent_instance;
+ GimpItemUndo parent_instance;
- GeglBuffer *buffer;
- gint x;
- gint y;
+ GeglBuffer *buffer;
+ gint x;
+ gint y;
/* stuff for "Fade" */
- GeglBuffer *applied_buffer;
- GimpLayerModeEffects paint_mode;
- gdouble opacity;
+ GeglBuffer *applied_buffer;
+ GimpLayerMode paint_mode;
+ gdouble opacity;
};
struct _GimpDrawableUndoClass
diff --git a/app/core/gimpfilloptions.c b/app/core/gimpfilloptions.c
index 9f09542..cf7f377 100644
--- a/app/core/gimpfilloptions.c
+++ b/app/core/gimpfilloptions.c
@@ -315,7 +315,8 @@ gimp_fill_options_set_by_fill_type (GimpFillOptions *options,
case GIMP_FILL_TRANSPARENT:
gimp_context_get_background (context, &color);
- gimp_context_set_paint_mode (GIMP_CONTEXT (options), GIMP_ERASE_MODE);
+ gimp_context_set_paint_mode (GIMP_CONTEXT (options),
+ GIMP_LAYER_MODE_ERASE);
undo_desc = C_("undo-type", "Fill with Transparency");
break;
diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c
index 3d97d13..f66f818 100644
--- a/app/core/gimpimage-merge.c
+++ b/app/core/gimpimage-merge.c
@@ -528,7 +528,8 @@ gimp_image_merge_layers (GimpImage *image,
merge_layer = gimp_layer_new (image, (x2 - x1), (y2 - y1),
gimp_image_get_layer_format (image, FALSE),
gimp_object_get_name (layer),
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
if (! merge_layer)
{
g_warning ("%s: could not allocate merge layer.", G_STRFUNC);
@@ -560,7 +561,8 @@ gimp_image_merge_layers (GimpImage *image,
gimp_layer_new (image, (x2 - x1), (y2 - y1),
gimp_drawable_get_format_with_alpha (GIMP_DRAWABLE (layer)),
"merged layer",
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
if (!merge_layer)
{
@@ -596,22 +598,22 @@ gimp_image_merge_layers (GimpImage *image,
for (layers = reverse_list; layers; layers = g_slist_next (layers))
{
- GeglBuffer *merge_buffer;
- GeglBuffer *layer_buffer;
- GimpApplicator *applicator;
- GimpLayerModeEffects mode;
+ GeglBuffer *merge_buffer;
+ GeglBuffer *layer_buffer;
+ GimpApplicator *applicator;
+ GimpLayerMode mode;
layer = layers->data;
gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y);
- /* DISSOLVE_MODE is special since it is the only mode that does not
+ /* MODE_DISSOLVE is special since it is the only mode that does not
* work on the projection with the lower layer, but only locally on
* the layers alpha channel.
*/
mode = gimp_layer_get_mode (layer);
- if (layer == bottom_layer && mode != GIMP_DISSOLVE_MODE)
- mode = GIMP_NORMAL_MODE;
+ if (layer == bottom_layer && mode != GIMP_LAYER_MODE_DISSOLVE)
+ mode = GIMP_LAYER_MODE_NORMAL;
merge_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (merge_layer));
layer_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer));
diff --git a/app/core/gimpimage-new.c b/app/core/gimpimage-new.c
index 13d114a..a28b0d8 100644
--- a/app/core/gimpimage-new.c
+++ b/app/core/gimpimage-new.c
@@ -148,7 +148,8 @@ gimp_image_new_from_template (Gimp *gimp,
layer = gimp_layer_new (image, width, height,
gimp_image_get_layer_format (image, has_alpha),
_("Background"),
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
gimp_drawable_fill (GIMP_DRAWABLE (layer),
context, gimp_template_get_fill_type (template));
@@ -223,7 +224,7 @@ gimp_image_new_from_drawable (Gimp *gimp,
gimp_item_translate (GIMP_ITEM (new_layer), -off_x, -off_y, FALSE);
gimp_item_set_visible (GIMP_ITEM (new_layer), TRUE, FALSE);
gimp_item_set_linked (GIMP_ITEM (new_layer), FALSE, FALSE);
- gimp_layer_set_mode (new_layer, GIMP_NORMAL_MODE, FALSE);
+ gimp_layer_set_mode (new_layer, GIMP_LAYER_MODE_NORMAL, FALSE);
gimp_layer_set_opacity (new_layer, GIMP_OPACITY_OPAQUE, FALSE);
if (gimp_layer_can_lock_alpha (new_layer))
gimp_layer_set_lock_alpha (new_layer, FALSE, FALSE);
@@ -324,7 +325,8 @@ gimp_image_new_from_buffer (Gimp *gimp,
gimp_image_get_layer_format (image,
has_alpha),
_("Pasted Layer"),
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_add_layer (image, layer, NULL, 0, TRUE);
@@ -382,7 +384,8 @@ gimp_image_new_from_pixbuf (Gimp *gimp,
gimp_image_get_layer_format (new_image,
has_alpha),
layer_name,
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_add_layer (new_image, layer, NULL, 0, TRUE);
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index b750fe1..14cb056 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -2394,19 +2394,19 @@ gimp_image_get_xcf_version (GimpImage *image,
switch (gimp_layer_get_mode (layer))
{
/* new layer modes not supported by gimp-1.2 */
- case GIMP_SOFTLIGHT_MODE:
- case GIMP_GRAIN_EXTRACT_MODE:
- case GIMP_GRAIN_MERGE_MODE:
- case GIMP_COLOR_ERASE_MODE:
+ case GIMP_LAYER_MODE_SOFTLIGHT_BROKEN:
+ case GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN:
+ case GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN:
+ case GIMP_LAYER_MODE_COLOR_ERASE:
version = MAX (2, version);
break;
/* new layer modes not supported by gimp-2.8 */
- case GIMP_NEW_OVERLAY_MODE:
- case GIMP_LCH_HUE_MODE:
- case GIMP_LCH_CHROMA_MODE:
- case GIMP_LCH_COLOR_MODE:
- case GIMP_LCH_LIGHTNESS_MODE:
+ case GIMP_LAYER_MODE_OVERLAY:
+ case GIMP_LAYER_MODE_LCH_HUE:
+ case GIMP_LAYER_MODE_LCH_CHROMA:
+ case GIMP_LAYER_MODE_LCH_COLOR:
+ case GIMP_LAYER_MODE_LCH_LIGHTNESS:
version = MAX (9, version);
break;
diff --git a/app/core/gimplayer-new.c b/app/core/gimplayer-new.c
index 40ee7a4..d5132c5 100644
--- a/app/core/gimplayer-new.c
+++ b/app/core/gimplayer-new.c
@@ -47,13 +47,13 @@ static void gimp_layer_new_convert_buffer (GimpLayer *layer,
/* public functions */
GimpLayer *
-gimp_layer_new (GimpImage *image,
- gint width,
- gint height,
- const Babl *format,
- const gchar *name,
- gdouble opacity,
- GimpLayerModeEffects mode)
+gimp_layer_new (GimpImage *image,
+ gint width,
+ gint height,
+ const Babl *format,
+ const gchar *name,
+ gdouble opacity,
+ GimpLayerMode mode)
{
GimpLayer *layer;
@@ -91,12 +91,12 @@ gimp_layer_new (GimpImage *image,
* Return value: The new layer.
**/
GimpLayer *
-gimp_layer_new_from_buffer (GimpBuffer *buffer,
- GimpImage *dest_image,
- const Babl *format,
- const gchar *name,
- gdouble opacity,
- GimpLayerModeEffects mode)
+gimp_layer_new_from_buffer (GimpBuffer *buffer,
+ GimpImage *dest_image,
+ const Babl *format,
+ const gchar *name,
+ gdouble opacity,
+ GimpLayerMode mode)
{
g_return_val_if_fail (GIMP_IS_BUFFER (buffer), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (dest_image), NULL);
@@ -124,13 +124,13 @@ gimp_layer_new_from_buffer (GimpBuffer *buffer,
* Return value: The new layer.
**/
GimpLayer *
-gimp_layer_new_from_gegl_buffer (GeglBuffer *buffer,
- GimpImage *dest_image,
- const Babl *format,
- const gchar *name,
- gdouble opacity,
- GimpLayerModeEffects mode,
- GimpColorProfile *buffer_profile)
+gimp_layer_new_from_gegl_buffer (GeglBuffer *buffer,
+ GimpImage *dest_image,
+ const Babl *format,
+ const gchar *name,
+ gdouble opacity,
+ GimpLayerMode mode,
+ GimpColorProfile *buffer_profile)
{
GimpLayer *layer;
@@ -170,12 +170,12 @@ gimp_layer_new_from_gegl_buffer (GeglBuffer *buffer,
* Return value: The new layer.
**/
GimpLayer *
-gimp_layer_new_from_pixbuf (GdkPixbuf *pixbuf,
- GimpImage *dest_image,
- const Babl *format,
- const gchar *name,
- gdouble opacity,
- GimpLayerModeEffects mode)
+gimp_layer_new_from_pixbuf (GdkPixbuf *pixbuf,
+ GimpImage *dest_image,
+ const Babl *format,
+ const gchar *name,
+ gdouble opacity,
+ GimpLayerMode mode)
{
GimpLayer *layer;
GeglBuffer *buffer;
diff --git a/app/core/gimplayer-new.h b/app/core/gimplayer-new.h
index 3432904..e4e9d77 100644
--- a/app/core/gimplayer-new.h
+++ b/app/core/gimplayer-new.h
@@ -19,33 +19,33 @@
#define __GIMP_LAYER_NEW_H__
-GimpLayer * gimp_layer_new (GimpImage *image,
- gint width,
- gint height,
- const Babl *format,
- const gchar *name,
- gdouble opacity,
- GimpLayerModeEffects mode);
+GimpLayer * gimp_layer_new (GimpImage *image,
+ gint width,
+ gint height,
+ const Babl *format,
+ const gchar *name,
+ gdouble opacity,
+ GimpLayerMode mode);
-GimpLayer * gimp_layer_new_from_buffer (GimpBuffer *buffer,
- GimpImage *dest_image,
- const Babl *format,
- const gchar *name,
- gdouble opacity,
- GimpLayerModeEffects mode);
-GimpLayer * gimp_layer_new_from_gegl_buffer (GeglBuffer *buffer,
- GimpImage *dest_image,
- const Babl *format,
- const gchar *name,
- gdouble opacity,
- GimpLayerModeEffects mode,
- GimpColorProfile *buffer_profile);
-GimpLayer * gimp_layer_new_from_pixbuf (GdkPixbuf *pixbuf,
- GimpImage *dest_image,
- const Babl *format,
- const gchar *name,
- gdouble opacity,
- GimpLayerModeEffects mode);
+GimpLayer * gimp_layer_new_from_buffer (GimpBuffer *buffer,
+ GimpImage *dest_image,
+ const Babl *format,
+ const gchar *name,
+ gdouble opacity,
+ GimpLayerMode mode);
+GimpLayer * gimp_layer_new_from_gegl_buffer (GeglBuffer *buffer,
+ GimpImage *dest_image,
+ const Babl *format,
+ const gchar *name,
+ gdouble opacity,
+ GimpLayerMode mode,
+ GimpColorProfile *buffer_profile);
+GimpLayer * gimp_layer_new_from_pixbuf (GdkPixbuf *pixbuf,
+ GimpImage *dest_image,
+ const Babl *format,
+ const gchar *name,
+ gdouble opacity,
+ GimpLayerMode mode);
#endif /* __GIMP_LAYER_NEW_H__ */
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index d8284b8..dbea13a 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -363,8 +363,8 @@ gimp_layer_class_init (GimpLayerClass *klass)
g_object_class_install_property (object_class, PROP_MODE,
g_param_spec_enum ("mode", NULL, NULL,
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READABLE));
g_object_class_install_property (object_class, PROP_LOCK_ALPHA,
@@ -390,7 +390,7 @@ static void
gimp_layer_init (GimpLayer *layer)
{
layer->opacity = GIMP_OPACITY_OPAQUE;
- layer->mode = GIMP_NORMAL_MODE;
+ layer->mode = GIMP_LAYER_MODE_NORMAL;
layer->lock_alpha = FALSE;
layer->mask = NULL;
@@ -508,23 +508,23 @@ gimp_layer_finalize (GObject *object)
static void
gimp_layer_update_mode_node (GimpLayer *layer)
{
- GeglNode *mode_node;
- GimpLayerModeEffects visible_mode;
- gboolean linear;
+ GeglNode *mode_node;
+ GimpLayerMode visible_mode;
+ gboolean linear;
mode_node = gimp_drawable_get_mode_node (GIMP_DRAWABLE (layer));
if (layer->mask && layer->show_mask)
{
- visible_mode = GIMP_NORMAL_MODE;
+ visible_mode = GIMP_LAYER_MODE_NORMAL;
linear = TRUE;
}
else
{
- if (layer->mode != GIMP_DISSOLVE_MODE &&
+ if (layer->mode != GIMP_LAYER_MODE_DISSOLVE &&
gimp_filter_get_is_last_node (GIMP_FILTER (layer)))
{
- visible_mode = GIMP_NORMAL_MODE;
+ visible_mode = GIMP_LAYER_MODE_NORMAL;
}
else
{
@@ -2064,9 +2064,9 @@ gimp_layer_get_opacity (GimpLayer *layer)
}
void
-gimp_layer_set_mode (GimpLayer *layer,
- GimpLayerModeEffects mode,
- gboolean push_undo)
+gimp_layer_set_mode (GimpLayer *layer,
+ GimpLayerMode mode,
+ gboolean push_undo)
{
g_return_if_fail (GIMP_IS_LAYER (layer));
@@ -2094,10 +2094,10 @@ gimp_layer_set_mode (GimpLayer *layer,
}
}
-GimpLayerModeEffects
+GimpLayerMode
gimp_layer_get_mode (GimpLayer *layer)
{
- g_return_val_if_fail (GIMP_IS_LAYER (layer), GIMP_NORMAL_MODE);
+ g_return_val_if_fail (GIMP_IS_LAYER (layer), GIMP_LAYER_MODE_NORMAL);
return layer->mode;
}
diff --git a/app/core/gimplayer.h b/app/core/gimplayer.h
index af31a42..b19199f 100644
--- a/app/core/gimplayer.h
+++ b/app/core/gimplayer.h
@@ -34,19 +34,19 @@ typedef struct _GimpLayerClass GimpLayerClass;
struct _GimpLayer
{
- GimpDrawable parent_instance;
+ GimpDrawable parent_instance;
- gdouble opacity; /* layer opacity */
- GimpLayerModeEffects mode; /* layer combination mode */
- gboolean lock_alpha; /* lock the alpha channel */
+ gdouble opacity; /* layer opacity */
+ GimpLayerMode mode; /* layer combination mode */
+ gboolean lock_alpha; /* lock the alpha channel */
- GimpLayerMask *mask; /* possible layer mask */
- gboolean apply_mask; /* controls mask application */
- gboolean edit_mask; /* edit mask or layer? */
- gboolean show_mask; /* show mask or layer? */
+ GimpLayerMask *mask; /* possible layer mask */
+ gboolean apply_mask; /* controls mask application */
+ gboolean edit_mask; /* edit mask or layer? */
+ gboolean show_mask; /* show mask or layer? */
- GeglNode *layer_offset_node;
- GeglNode *mask_offset_node;
+ GeglNode *layer_offset_node;
+ GeglNode *mask_offset_node;
/* Floating selections */
struct
@@ -123,9 +123,9 @@ void gimp_layer_set_opacity (GimpLayer *layer,
gdouble gimp_layer_get_opacity (GimpLayer *layer);
void gimp_layer_set_mode (GimpLayer *layer,
- GimpLayerModeEffects mode,
+ GimpLayerMode mode,
gboolean push_undo);
-GimpLayerModeEffects gimp_layer_get_mode (GimpLayer *layer);
+GimpLayerMode gimp_layer_get_mode (GimpLayer *layer);
void gimp_layer_set_lock_alpha (GimpLayer *layer,
gboolean lock_alpha,
diff --git a/app/core/gimplayerpropundo.c b/app/core/gimplayerpropundo.c
index 3b4cd07..e097c87 100644
--- a/app/core/gimplayerpropundo.c
+++ b/app/core/gimplayerpropundo.c
@@ -102,7 +102,7 @@ gimp_layer_prop_undo_pop (GimpUndo *undo,
{
case GIMP_UNDO_LAYER_MODE:
{
- GimpLayerModeEffects mode;
+ GimpLayerMode mode;
mode = gimp_layer_get_mode (layer);
gimp_layer_set_mode (layer, layer_prop_undo->mode, FALSE);
diff --git a/app/core/gimplayerpropundo.h b/app/core/gimplayerpropundo.h
index 39df3c4..e660669 100644
--- a/app/core/gimplayerpropundo.h
+++ b/app/core/gimplayerpropundo.h
@@ -35,11 +35,11 @@ typedef struct _GimpLayerPropUndoClass GimpLayerPropUndoClass;
struct _GimpLayerPropUndo
{
- GimpItemUndo parent_instance;
+ GimpItemUndo parent_instance;
- GimpLayerModeEffects mode;
- gdouble opacity;
- gboolean lock_alpha;
+ GimpLayerMode mode;
+ gdouble opacity;
+ gboolean lock_alpha;
};
struct _GimpLayerPropUndoClass
diff --git a/app/core/gimpselection.c b/app/core/gimpselection.c
index 13d3479..26ec5da 100644
--- a/app/core/gimpselection.c
+++ b/app/core/gimpselection.c
@@ -893,7 +893,7 @@ gimp_selection_float (GimpSelection *selection,
gimp_drawable_get_format_with_alpha (drawable),
_("Floated Layer"),
GIMP_OPACITY_OPAQUE,
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
profile);
/* Set the offsets */
diff --git a/app/dialogs/fade-dialog.c b/app/dialogs/fade-dialog.c
index 8851753..c75820d 100644
--- a/app/dialogs/fade-dialog.c
+++ b/app/dialogs/fade-dialog.c
@@ -44,13 +44,13 @@
typedef struct
{
- GimpImage *image;
- GimpDrawable *drawable;
- GimpContext *context;
+ GimpImage *image;
+ GimpDrawable *drawable;
+ GimpContext *context;
- gboolean applied;
- GimpLayerModeEffects orig_paint_mode;
- gdouble orig_opacity;
+ gboolean applied;
+ GimpLayerMode orig_paint_mode;
+ gdouble orig_opacity;
} FadeDialog;
diff --git a/app/dialogs/layer-options-dialog.c b/app/dialogs/layer-options-dialog.c
index ecced86..8629466 100644
--- a/app/dialogs/layer-options-dialog.c
+++ b/app/dialogs/layer-options-dialog.c
@@ -50,7 +50,7 @@ typedef struct _LayerOptionsDialog LayerOptionsDialog;
struct _LayerOptionsDialog
{
GimpLayer *layer;
- GimpLayerModeEffects mode;
+ GimpLayerMode mode;
gdouble opacity;
GimpFillType fill_type;
gboolean lock_alpha;
@@ -94,7 +94,7 @@ layer_options_dialog_new (GimpImage *image,
const gchar *desc,
const gchar *help_id,
const gchar *layer_name,
- GimpLayerModeEffects layer_mode,
+ GimpLayerMode layer_mode,
gdouble layer_opacity,
GimpFillType layer_fill_type,
gboolean layer_visible,
diff --git a/app/dialogs/layer-options-dialog.h b/app/dialogs/layer-options-dialog.h
index f5a9e20..1dbaab5 100644
--- a/app/dialogs/layer-options-dialog.h
+++ b/app/dialogs/layer-options-dialog.h
@@ -19,26 +19,26 @@
#define __LAYER_OPTIONS_DIALOG_H__
-typedef void (* GimpLayerOptionsCallback) (GtkWidget *dialog,
- GimpImage *image,
- GimpLayer *layer,
- GimpContext *context,
- const gchar *layer_name,
- GimpLayerModeEffects layer_mode,
- gdouble layer_opacity,
- GimpFillType layer_fill_type,
- gint layer_width,
- gint layer_height,
- gint layer_offset_x,
- gint layer_offset_y,
- gboolean layer_visible,
- gboolean layer_linked,
- GimpColorTag layer_color_tag,
- gboolean layer_lock_content,
- gboolean layer_lock_position,
- gboolean layer_lock_alpha,
- gboolean rename_text_layer,
- gpointer user_data);
+typedef void (* GimpLayerOptionsCallback) (GtkWidget *dialog,
+ GimpImage *image,
+ GimpLayer *layer,
+ GimpContext *context,
+ const gchar *layer_name,
+ GimpLayerMode layer_mode,
+ gdouble layer_opacity,
+ GimpFillType layer_fill_type,
+ gint layer_width,
+ gint layer_height,
+ gint layer_offset_x,
+ gint layer_offset_y,
+ gboolean layer_visible,
+ gboolean layer_linked,
+ GimpColorTag layer_color_tag,
+ gboolean layer_lock_content,
+ gboolean layer_lock_position,
+ gboolean layer_lock_alpha,
+ gboolean rename_text_layer,
+ gpointer user_data);
GtkWidget * layer_options_dialog_new (GimpImage *image,
@@ -51,7 +51,7 @@ GtkWidget * layer_options_dialog_new (GimpImage *image,
const gchar *desc,
const gchar *help_id,
const gchar *layer_name,
- GimpLayerModeEffects layer_mode,
+ GimpLayerMode layer_mode,
gdouble layer_opacity,
GimpFillType layer_fill_type,
gboolean layer_visible,
diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c
index 68f4511..2505ac6 100644
--- a/app/display/gimpdisplayshell-dnd.c
+++ b/app/display/gimpdisplayshell-dnd.c
@@ -724,7 +724,8 @@ gimp_display_shell_drop_pixbuf (GtkWidget *widget,
gimp_layer_new_from_pixbuf (pixbuf, image,
gimp_image_get_layer_format (image, has_alpha),
_("Dropped Buffer"),
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
if (new_layer)
{
diff --git a/app/gegl/gimp-gegl-nodes.c b/app/gegl/gimp-gegl-nodes.c
index 1a27c15..f717e71 100644
--- a/app/gegl/gimp-gegl-nodes.c
+++ b/app/gegl/gimp-gegl-nodes.c
@@ -139,9 +139,9 @@ gimp_gegl_add_buffer_source (GeglNode *parent,
}
void
-gimp_gegl_mode_node_set_mode (GeglNode *node,
- GimpLayerModeEffects mode,
- gboolean linear)
+gimp_gegl_mode_node_set_mode (GeglNode *node,
+ GimpLayerMode mode,
+ gboolean linear)
{
const gchar *operation = "gimp:normal-mode";
gdouble opacity;
@@ -150,37 +150,128 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
switch (mode)
{
- case GIMP_NORMAL_MODE: operation = "gimp:normal-mode"; break;
- case GIMP_DISSOLVE_MODE: operation = "gimp:dissolve-mode"; break;
- case GIMP_BEHIND_MODE: operation = "gimp:behind-mode"; break;
- case GIMP_MULTIPLY_MODE: operation = "gimp:multiply-mode"; break;
- case GIMP_SCREEN_MODE: operation = "gimp:screen-mode"; break;
- case GIMP_OVERLAY_MODE: operation = "gimp:softlight-mode"; break;
- case GIMP_DIFFERENCE_MODE: operation = "gimp:difference-mode"; break;
- case GIMP_ADDITION_MODE: operation = "gimp:addition-mode"; break;
- case GIMP_SUBTRACT_MODE: operation = "gimp:subtract-mode"; break;
- case GIMP_DARKEN_ONLY_MODE: operation = "gimp:darken-only-mode"; break;
- case GIMP_LIGHTEN_ONLY_MODE: operation = "gimp:lighten-only-mode"; break;
- case GIMP_HUE_MODE: operation = "gimp:hue-mode"; break;
- case GIMP_SATURATION_MODE: operation = "gimp:saturation-mode"; break;
- case GIMP_COLOR_MODE: operation = "gimp:color-mode"; break;
- case GIMP_VALUE_MODE: operation = "gimp:value-mode"; break;
- case GIMP_DIVIDE_MODE: operation = "gimp:divide-mode"; break;
- case GIMP_DODGE_MODE: operation = "gimp:dodge-mode"; break;
- case GIMP_BURN_MODE: operation = "gimp:burn-mode"; break;
- case GIMP_HARDLIGHT_MODE: operation = "gimp:hardlight-mode"; break;
- case GIMP_SOFTLIGHT_MODE: operation = "gimp:softlight-mode"; break;
- case GIMP_GRAIN_EXTRACT_MODE: operation = "gimp:grain-extract-mode"; break;
- case GIMP_GRAIN_MERGE_MODE: operation = "gimp:grain-merge-mode"; break;
- case GIMP_COLOR_ERASE_MODE: operation = "gimp:color-erase-mode"; break;
- case GIMP_NEW_OVERLAY_MODE: operation = "gimp:overlay-mode"; break;
- case GIMP_ERASE_MODE: operation = "gimp:erase-mode"; break;
- case GIMP_REPLACE_MODE: operation = "gimp:replace-mode"; break;
- case GIMP_ANTI_ERASE_MODE: operation = "gimp:anti-erase-mode"; break;
- case GIMP_LCH_HUE_MODE: operation = "gimp:lch-hue-mode"; break;
- case GIMP_LCH_CHROMA_MODE: operation = "gimp:lch-chroma-mode"; break;
- case GIMP_LCH_COLOR_MODE: operation = "gimp:lch-color-mode"; break;
- case GIMP_LCH_LIGHTNESS_MODE: operation = "gimp:lch-lightness-mode"; break;
+ case GIMP_LAYER_MODE_NORMAL:
+ operation = "gimp:normal-mode";
+ break;
+
+ case GIMP_LAYER_MODE_DISSOLVE:
+ operation = "gimp:dissolve-mode";
+ break;
+
+ case GIMP_LAYER_MODE_BEHIND:
+ operation = "gimp:behind-mode";
+ break;
+
+ case GIMP_LAYER_MODE_MULTIPLY_BROKEN:
+ operation = "gimp:multiply-mode";
+ break;
+
+ case GIMP_LAYER_MODE_SCREEN_BROKEN:
+ operation = "gimp:screen-mode";
+ break;
+
+ case GIMP_LAYER_MODE_OVERLAY_BROKEN:
+ operation = "gimp:softlight-mode";
+ break;
+
+ case GIMP_LAYER_MODE_DIFFERENCE_BROKEN:
+ operation = "gimp:difference-mode";
+ break;
+
+ case GIMP_LAYER_MODE_ADDITION_BROKEN:
+ operation = "gimp:addition-mode";
+ break;
+
+ case GIMP_LAYER_MODE_SUBTRACT_BROKEN:
+ operation = "gimp:subtract-mode";
+ break;
+
+ case GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN:
+ operation = "gimp:darken-only-mode";
+ break;
+
+ case GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN:
+ operation = "gimp:lighten-only-mode";
+ break;
+
+ case GIMP_LAYER_MODE_HSV_HUE_BROKEN:
+ operation = "gimp:hue-mode";
+ break;
+
+ case GIMP_LAYER_MODE_HSV_SATURATION_BROKEN:
+ operation = "gimp:saturation-mode";
+ break;
+
+ case GIMP_LAYER_MODE_HSV_COLOR_BROKEN:
+ operation = "gimp:color-mode";
+ break;
+
+ case GIMP_LAYER_MODE_HSV_VALUE_BROKEN:
+ operation = "gimp:value-mode";
+ break;
+
+ case GIMP_LAYER_MODE_DIVIDE_BROKEN:
+ operation = "gimp:divide-mode";
+ break;
+
+ case GIMP_LAYER_MODE_DODGE_BROKEN:
+ operation = "gimp:dodge-mode";
+ break;
+
+ case GIMP_LAYER_MODE_BURN_BROKEN:
+ operation = "gimp:burn-mode";
+ break;
+
+ case GIMP_LAYER_MODE_HARDLIGHT_BROKEN:
+ operation = "gimp:hardlight-mode";
+ break;
+
+ case GIMP_LAYER_MODE_SOFTLIGHT_BROKEN:
+ operation = "gimp:softlight-mode";
+ break;
+
+ case GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN:
+ operation = "gimp:grain-extract-mode";
+ break;
+
+ case GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN:
+ operation = "gimp:grain-merge-mode";
+ break;
+
+ case GIMP_LAYER_MODE_COLOR_ERASE:
+ operation = "gimp:color-erase-mode";
+ break;
+
+ case GIMP_LAYER_MODE_OVERLAY:
+ operation = "gimp:overlay-mode";
+ break;
+
+ case GIMP_LAYER_MODE_LCH_HUE:
+ operation = "gimp:lch-hue-mode";
+ break;
+
+ case GIMP_LAYER_MODE_LCH_CHROMA:
+ operation = "gimp:lch-chroma-mode";
+ break;
+
+ case GIMP_LAYER_MODE_LCH_COLOR:
+ operation = "gimp:lch-color-mode";
+ break;
+
+ case GIMP_LAYER_MODE_LCH_LIGHTNESS:
+ operation = "gimp:lch-lightness-mode";
+ break;
+
+ case GIMP_LAYER_MODE_ERASE:
+ operation = "gimp:erase-mode"; break;
+
+ case GIMP_LAYER_MODE_REPLACE:
+ operation = "gimp:replace-mode";
+ break;
+
+ case GIMP_LAYER_MODE_ANTI_ERASE:
+ operation = "gimp:anti-erase-mode";
+ break;
default:
break;
}
diff --git a/app/gegl/gimp-gegl-nodes.h b/app/gegl/gimp-gegl-nodes.h
index 619c023..70abbb1 100644
--- a/app/gegl/gimp-gegl-nodes.h
+++ b/app/gegl/gimp-gegl-nodes.h
@@ -22,25 +22,25 @@
#define __GIMP_GEGL_NODES_H__
-GeglNode * gimp_gegl_create_flatten_node (const GimpRGB *background);
-GeglNode * gimp_gegl_create_apply_opacity_node (GeglBuffer *mask,
- gint mask_offset_x,
- gint mask_offset_y,
- gdouble opacity);
-GeglNode * gimp_gegl_add_buffer_source (GeglNode *parent,
- GeglBuffer *buffer,
- gint offset_x,
- gint offset_y);
+GeglNode * gimp_gegl_create_flatten_node (const GimpRGB *background);
+GeglNode * gimp_gegl_create_apply_opacity_node (GeglBuffer *mask,
+ gint mask_offset_x,
+ gint mask_offset_y,
+ gdouble opacity);
+GeglNode * gimp_gegl_add_buffer_source (GeglNode *parent,
+ GeglBuffer *buffer,
+ gint offset_x,
+ gint offset_y);
-void gimp_gegl_mode_node_set_mode (GeglNode *node,
- GimpLayerModeEffects mode,
- gboolean linear);
-void gimp_gegl_mode_node_set_opacity (GeglNode *node,
- gdouble opacity);
-void gimp_gegl_node_set_matrix (GeglNode *node,
- const GimpMatrix3 *matrix);
-void gimp_gegl_node_set_color (GeglNode *node,
- const GimpRGB *color);
+void gimp_gegl_mode_node_set_mode (GeglNode *node,
+ GimpLayerMode mode,
+ gboolean linear);
+void gimp_gegl_mode_node_set_opacity (GeglNode *node,
+ gdouble opacity);
+void gimp_gegl_node_set_matrix (GeglNode *node,
+ const GimpMatrix3 *matrix);
+void gimp_gegl_node_set_color (GeglNode *node,
+ const GimpRGB *color);
#endif /* __GIMP_GEGL_NODES_H__ */
diff --git a/app/gegl/gimpapplicator.c b/app/gegl/gimpapplicator.c
index 13558b8..d76b77f 100644
--- a/app/gegl/gimpapplicator.c
+++ b/app/gegl/gimpapplicator.c
@@ -58,7 +58,7 @@ static void
gimp_applicator_init (GimpApplicator *applicator)
{
applicator->opacity = 1.0;
- applicator->paint_mode = GIMP_NORMAL_MODE;
+ applicator->paint_mode = GIMP_LAYER_MODE_NORMAL;
applicator->affect = GIMP_COMPONENT_MASK_ALL;
}
@@ -449,8 +449,8 @@ gimp_applicator_set_opacity (GimpApplicator *applicator,
}
void
-gimp_applicator_set_mode (GimpApplicator *applicator,
- GimpLayerModeEffects paint_mode)
+gimp_applicator_set_mode (GimpApplicator *applicator,
+ GimpLayerMode paint_mode)
{
g_return_if_fail (GIMP_IS_APPLICATOR (applicator));
diff --git a/app/gegl/gimpapplicator.h b/app/gegl/gimpapplicator.h
index 03c841e..a185c14 100644
--- a/app/gegl/gimpapplicator.h
+++ b/app/gegl/gimpapplicator.h
@@ -34,49 +34,49 @@ typedef struct _GimpApplicatorClass GimpApplicatorClass;
struct _GimpApplicator
{
- GObject parent_instance;
+ GObject parent_instance;
- GeglNode *node;
- GeglNode *input_node;
- GeglNode *aux_node;
- GeglNode *output_node;
+ GeglNode *node;
+ GeglNode *input_node;
+ GeglNode *aux_node;
+ GeglNode *output_node;
- GeglBuffer *apply_buffer;
- GeglNode *apply_src_node;
+ GeglBuffer *apply_buffer;
+ GeglNode *apply_src_node;
- gint apply_offset_x;
- gint apply_offset_y;
- GeglNode *apply_offset_node;
+ gint apply_offset_x;
+ gint apply_offset_y;
+ GeglNode *apply_offset_node;
- GeglNode *dup_apply_buffer_node;
+ GeglNode *dup_apply_buffer_node;
- gboolean preview_enabled;
- GeglRectangle preview_rect;
- GeglNode *preview_cache_node;
- GeglNode *preview_crop_node;
+ gboolean preview_enabled;
+ GeglRectangle preview_rect;
+ GeglNode *preview_cache_node;
+ GeglNode *preview_crop_node;
- gdouble opacity;
- GimpLayerModeEffects paint_mode;
- gboolean linear;
- GeglNode *mode_node;
+ gdouble opacity;
+ GimpLayerMode paint_mode;
+ gboolean linear;
+ GeglNode *mode_node;
- GimpComponentMask affect;
- GeglNode *affect_node;
+ GimpComponentMask affect;
+ GeglNode *affect_node;
- GeglNode *output_cache_node;
+ GeglNode *output_cache_node;
- GeglBuffer *src_buffer;
- GeglNode *src_node;
+ GeglBuffer *src_buffer;
+ GeglNode *src_node;
- GeglBuffer *dest_buffer;
- GeglNode *dest_node;
+ GeglBuffer *dest_buffer;
+ GeglNode *dest_node;
- GeglBuffer *mask_buffer;
- GeglNode *mask_node;
+ GeglBuffer *mask_buffer;
+ GeglNode *mask_node;
- gint mask_offset_x;
- gint mask_offset_y;
- GeglNode *mask_offset_node;
+ gint mask_offset_x;
+ gint mask_offset_y;
+ GeglNode *mask_offset_node;
};
struct _GimpApplicatorClass
@@ -112,7 +112,7 @@ void gimp_applicator_set_apply_offset (GimpApplicator *applicator,
void gimp_applicator_set_opacity (GimpApplicator *applicator,
gdouble opacity);
void gimp_applicator_set_mode (GimpApplicator *applicator,
- GimpLayerModeEffects paint_mode);
+ GimpLayerMode paint_mode);
void gimp_applicator_set_affect (GimpApplicator *applicator,
GimpComponentMask affect);
diff --git a/app/operations/gimplayermodefunctions.c b/app/operations/gimplayermodefunctions.c
index 31cf54a..824cb55 100644
--- a/app/operations/gimplayermodefunctions.c
+++ b/app/operations/gimplayermodefunctions.c
@@ -59,57 +59,149 @@
GimpLayerModeFunction
-get_layer_mode_function (GimpLayerModeEffects paint_mode,
- gboolean linear_mode)
+get_layer_mode_function (GimpLayerMode paint_mode,
+ gboolean linear_mode)
{
GimpLayerModeFunction func = gimp_operation_normal_mode_process_pixels;
switch (paint_mode)
{
- case GIMP_NORMAL_MODE: func = gimp_operation_normal_mode_process_pixels; break;
- case GIMP_DISSOLVE_MODE: func = gimp_operation_dissolve_mode_process_pixels; break;
- case GIMP_BEHIND_MODE: func = gimp_operation_behind_mode_process_pixels; break;
- case GIMP_MULTIPLY_MODE: func = gimp_operation_multiply_mode_process_pixels; break;
- case GIMP_SCREEN_MODE: func = gimp_operation_screen_mode_process_pixels; break;
- case GIMP_OVERLAY_MODE: func = gimp_operation_softlight_mode_process_pixels; break;
- case GIMP_DIFFERENCE_MODE: func = gimp_operation_difference_mode_process_pixels; break;
- case GIMP_ADDITION_MODE: func = gimp_operation_addition_mode_process_pixels; break;
- case GIMP_SUBTRACT_MODE: func = gimp_operation_subtract_mode_process_pixels; break;
- case GIMP_DARKEN_ONLY_MODE: func = gimp_operation_darken_only_mode_process_pixels; break;
- case GIMP_LIGHTEN_ONLY_MODE: func = gimp_operation_lighten_only_mode_process_pixels; break;
- case GIMP_HUE_MODE: func = gimp_operation_hue_mode_process_pixels; break;
- case GIMP_SATURATION_MODE: func = gimp_operation_saturation_mode_process_pixels; break;
- case GIMP_COLOR_MODE: func = gimp_operation_color_mode_process_pixels; break;
- case GIMP_VALUE_MODE: func = gimp_operation_value_mode_process_pixels; break;
- case GIMP_DIVIDE_MODE: func = gimp_operation_divide_mode_process_pixels; break;
- case GIMP_DODGE_MODE: func = gimp_operation_dodge_mode_process_pixels; break;
- case GIMP_BURN_MODE: func = gimp_operation_burn_mode_process_pixels; break;
- case GIMP_HARDLIGHT_MODE: func = gimp_operation_hardlight_mode_process_pixels; break;
- case GIMP_SOFTLIGHT_MODE: func = gimp_operation_softlight_mode_process_pixels; break;
- case GIMP_GRAIN_EXTRACT_MODE: func = gimp_operation_grain_extract_mode_process_pixels; break;
- case GIMP_GRAIN_MERGE_MODE: func = gimp_operation_grain_merge_mode_process_pixels; break;
- case GIMP_COLOR_ERASE_MODE: func = gimp_operation_color_erase_mode_process_pixels; break;
- case GIMP_NEW_OVERLAY_MODE: func = gimp_operation_overlay_mode_process_pixels; break;
- case GIMP_LCH_HUE_MODE: func = linear_mode ?
- gimp_operation_lch_hue_mode_process_pixels_linear :
- gimp_operation_lch_hue_mode_process_pixels; break;
- case GIMP_LCH_CHROMA_MODE: func = linear_mode ?
- gimp_operation_lch_chroma_mode_process_pixels_linear :
- gimp_operation_lch_chroma_mode_process_pixels; break;
- case GIMP_LCH_COLOR_MODE: func = linear_mode ?
- gimp_operation_lch_color_mode_process_pixels_linear :
- gimp_operation_lch_color_mode_process_pixels; break;
- case GIMP_LCH_LIGHTNESS_MODE: func = linear_mode ?
- gimp_operation_lch_lightness_mode_process_pixels_linear :
- gimp_operation_lch_lightness_mode_process_pixels; break;
- case GIMP_ERASE_MODE: func = gimp_operation_erase_mode_process_pixels; break;
- case GIMP_REPLACE_MODE: func = gimp_operation_replace_mode_process_pixels; break;
- case GIMP_ANTI_ERASE_MODE: func = gimp_operation_anti_erase_mode_process_pixels; break;
-
- default:
- g_warning ("No direct function for layer mode (%d), using gimp:normal-mode", paint_mode);
- func = gimp_operation_normal_mode_process_pixels;
- break;
+ case GIMP_LAYER_MODE_NORMAL:
+ func = gimp_operation_normal_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_DISSOLVE:
+ func = gimp_operation_dissolve_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_BEHIND:
+ func = gimp_operation_behind_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_MULTIPLY_BROKEN:
+ func = gimp_operation_multiply_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_SCREEN_BROKEN:
+ func = gimp_operation_screen_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_OVERLAY_BROKEN:
+ func = gimp_operation_softlight_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_DIFFERENCE_BROKEN:
+ func = gimp_operation_difference_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_ADDITION_BROKEN:
+ func = gimp_operation_addition_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_SUBTRACT_BROKEN:
+ func = gimp_operation_subtract_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN:
+ func = gimp_operation_darken_only_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN:
+ func = gimp_operation_lighten_only_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_HSV_HUE_BROKEN:
+ func = gimp_operation_hue_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_HSV_SATURATION_BROKEN:
+ func = gimp_operation_saturation_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_HSV_COLOR_BROKEN:
+ func = gimp_operation_color_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_HSV_VALUE_BROKEN:
+ func = gimp_operation_value_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_DIVIDE_BROKEN:
+ func = gimp_operation_divide_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_DODGE_BROKEN:
+ func = gimp_operation_dodge_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_BURN_BROKEN:
+ func = gimp_operation_burn_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_HARDLIGHT_BROKEN:
+ func = gimp_operation_hardlight_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_SOFTLIGHT_BROKEN:
+ func = gimp_operation_softlight_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN:
+ func = gimp_operation_grain_extract_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN:
+ func = gimp_operation_grain_merge_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_COLOR_ERASE:
+ func = gimp_operation_color_erase_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_OVERLAY:
+ func = gimp_operation_overlay_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_LCH_HUE:
+ func = linear_mode ?
+ gimp_operation_lch_hue_mode_process_pixels_linear :
+ gimp_operation_lch_hue_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_LCH_CHROMA:
+ func = linear_mode ?
+ gimp_operation_lch_chroma_mode_process_pixels_linear :
+ gimp_operation_lch_chroma_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_LCH_COLOR:
+ func = linear_mode ?
+ gimp_operation_lch_color_mode_process_pixels_linear :
+ gimp_operation_lch_color_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_LCH_LIGHTNESS:
+ func = linear_mode ?
+ gimp_operation_lch_lightness_mode_process_pixels_linear :
+ gimp_operation_lch_lightness_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_ERASE:
+ func = gimp_operation_erase_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_REPLACE:
+ func = gimp_operation_replace_mode_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_ANTI_ERASE:
+ func = gimp_operation_anti_erase_mode_process_pixels;
+ break;
+
+ default:
+ g_warning ("No direct function for layer mode (%d), using gimp:normal-mode", paint_mode);
+ func = gimp_operation_normal_mode_process_pixels;
+ break;
}
return func;
diff --git a/app/operations/gimplayermodefunctions.h b/app/operations/gimplayermodefunctions.h
index 8830fd5..41ddda2 100644
--- a/app/operations/gimplayermodefunctions.h
+++ b/app/operations/gimplayermodefunctions.h
@@ -21,7 +21,7 @@
#ifndef __GIMP_LAYER_MODE_FUNCTIONS_H__
#define __GIMP_LAYER_MODE_FUNCTIONS_H__
-GimpLayerModeFunction get_layer_mode_function (GimpLayerModeEffects paint_mode,
- gboolean linear_mode);
+GimpLayerModeFunction get_layer_mode_function (GimpLayerMode paint_mode,
+ gboolean linear_mode);
#endif /* __GIMP_LAYER_MODE_FUNCTIONS_H__ */
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index c6f0ad0..bc2950e 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -966,7 +966,7 @@ gimp_brush_core_paste_canvas (GimpBrushCore *core,
const GimpCoords *coords,
gdouble brush_opacity,
gdouble image_opacity,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
GimpBrushApplicationMode brush_hardness,
gdouble dynamic_force,
GimpPaintApplicationMode mode,
@@ -996,7 +996,8 @@ gimp_brush_core_paste_canvas (GimpBrushCore *core,
off_x, off_y,
drawable,
brush_opacity,
- image_opacity, paint_mode,
+ image_opacity,
+ paint_mode,
mode);
}
}
diff --git a/app/paint/gimpbrushcore.h b/app/paint/gimpbrushcore.h
index 436db95..6e04b0d 100644
--- a/app/paint/gimpbrushcore.h
+++ b/app/paint/gimpbrushcore.h
@@ -104,7 +104,7 @@ void gimp_brush_core_paste_canvas (GimpBrushCore *core,
const GimpCoords *coords,
gdouble brush_opacity,
gdouble image_opacity,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
GimpBrushApplicationMode brush_hardness,
gdouble dynamic_hardness,
GimpPaintApplicationMode mode,
diff --git a/app/paint/gimperaser.c b/app/paint/gimperaser.c
index 79e3f58..320c1ad 100644
--- a/app/paint/gimperaser.c
+++ b/app/paint/gimperaser.c
@@ -123,24 +123,24 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
GimpPaintOptions *paint_options,
GimpSymmetry *sym)
{
- GimpEraserOptions *options = GIMP_ERASER_OPTIONS (paint_options);
- GimpContext *context = GIMP_CONTEXT (paint_options);
- GimpDynamics *dynamics = GIMP_BRUSH_CORE (paint_core)->dynamics;
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
- gdouble fade_point;
- gdouble opacity;
- GimpLayerModeEffects paint_mode;
- GeglBuffer *paint_buffer;
- gint paint_buffer_x;
- gint paint_buffer_y;
- GimpRGB background;
- GeglColor *color;
- gdouble force;
- const GimpCoords *coords;
- GeglNode *op;
- gint n_strokes;
- gint paint_width, paint_height;
- gint i;
+ GimpEraserOptions *options = GIMP_ERASER_OPTIONS (paint_options);
+ GimpContext *context = GIMP_CONTEXT (paint_options);
+ GimpDynamics *dynamics = GIMP_BRUSH_CORE (paint_core)->dynamics;
+ GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
+ gdouble fade_point;
+ gdouble opacity;
+ GimpLayerMode paint_mode;
+ GeglBuffer *paint_buffer;
+ gint paint_buffer_x;
+ gint paint_buffer_y;
+ GimpRGB background;
+ GeglColor *color;
+ gdouble force;
+ const GimpCoords *coords;
+ GeglNode *op;
+ gint n_strokes;
+ gint paint_width, paint_height;
+ gint i;
fade_point = gimp_paint_options_get_fade (paint_options, image,
paint_core->pixel_dist);
@@ -160,11 +160,11 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
color = gimp_gegl_color_new (&background);
if (options->anti_erase)
- paint_mode = GIMP_ANTI_ERASE_MODE;
+ paint_mode = GIMP_LAYER_MODE_ANTI_ERASE;
else if (gimp_drawable_has_alpha (drawable))
- paint_mode = GIMP_ERASE_MODE;
+ paint_mode = GIMP_LAYER_MODE_ERASE;
else
- paint_mode = GIMP_NORMAL_MODE;
+ paint_mode = GIMP_LAYER_MODE_NORMAL;
gimp_brush_core_eval_transform_dynamics (GIMP_BRUSH_CORE (paint_core),
drawable,
diff --git a/app/paint/gimppaintcore-loops.c b/app/paint/gimppaintcore-loops.c
index 08345bd..3ac4de4 100644
--- a/app/paint/gimppaintcore-loops.c
+++ b/app/paint/gimppaintcore-loops.c
@@ -282,17 +282,17 @@ paint_mask_to_paint_buffer (const GimpTempBuf *paint_mask,
}
void
-do_layer_blend (GeglBuffer *src_buffer,
- GeglBuffer *dst_buffer,
- GimpTempBuf *paint_buf,
- GeglBuffer *mask_buffer,
- gfloat opacity,
- gint x_offset,
- gint y_offset,
- gint mask_x_offset,
- gint mask_y_offset,
- gboolean linear_mode,
- GimpLayerModeEffects paint_mode)
+do_layer_blend (GeglBuffer *src_buffer,
+ GeglBuffer *dst_buffer,
+ GimpTempBuf *paint_buf,
+ GeglBuffer *mask_buffer,
+ gfloat opacity,
+ gint x_offset,
+ gint y_offset,
+ gint mask_x_offset,
+ gint mask_y_offset,
+ gboolean linear_mode,
+ GimpLayerMode paint_mode)
{
GeglRectangle roi;
GeglRectangle mask_roi;
@@ -303,7 +303,8 @@ do_layer_blend (GeglBuffer *src_buffer,
const guint paint_stride = gimp_temp_buf_get_width (paint_buf);
gfloat *paint_data = (gfloat *) gimp_temp_buf_get_data (paint_buf);
- GimpLayerModeFunction apply_func = get_layer_mode_function (paint_mode, linear_mode);
+ GimpLayerModeFunction apply_func = get_layer_mode_function (paint_mode,
+ linear_mode);
if (linear_mode)
iterator_format = babl_format ("RGBA float");
diff --git a/app/paint/gimppaintcore-loops.h b/app/paint/gimppaintcore-loops.h
index e8ceafa..7e58a8f 100644
--- a/app/paint/gimppaintcore-loops.h
+++ b/app/paint/gimppaintcore-loops.h
@@ -35,17 +35,17 @@ void paint_mask_to_paint_buffer (const GimpTempBuf *paint_mask,
GimpTempBuf *paint_buf,
gfloat paint_opacity);
-void do_layer_blend (GeglBuffer *src_buffer,
- GeglBuffer *dst_buffer,
- GimpTempBuf *paint_buf,
- GeglBuffer *mask_buffer,
- gfloat opacity,
- gint x_offset,
- gint y_offset,
- gint mask_x_offset,
- gint mask_y_offset,
- gboolean linear_mode,
- GimpLayerModeEffects paint_mode);
+void do_layer_blend (GeglBuffer *src_buffer,
+ GeglBuffer *dst_buffer,
+ GimpTempBuf *paint_buf,
+ GeglBuffer *mask_buffer,
+ gfloat opacity,
+ gint x_offset,
+ gint y_offset,
+ gint mask_x_offset,
+ gint mask_y_offset,
+ gboolean linear_mode,
+ GimpLayerMode paint_mode);
void mask_components_onto (GeglBuffer *src_buffer,
GeglBuffer *aux_buffer,
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index ac39c82..2a66da4 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -822,7 +822,7 @@ gimp_paint_core_paste (GimpPaintCore *core,
GimpDrawable *drawable,
gdouble paint_opacity,
gdouble image_opacity,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
GimpPaintApplicationMode mode)
{
gint width = gegl_buffer_get_width (core->paint_buffer);
@@ -1031,7 +1031,8 @@ gimp_paint_core_replace (GimpPaintCore *core,
paint_mask_offset_y,
drawable,
paint_opacity,
- image_opacity, GIMP_NORMAL_MODE,
+ image_opacity,
+ GIMP_LAYER_MODE_NORMAL,
mode);
return;
}
diff --git a/app/paint/gimppaintcore.h b/app/paint/gimppaintcore.h
index e880c83..6faab77 100644
--- a/app/paint/gimppaintcore.h
+++ b/app/paint/gimppaintcore.h
@@ -184,7 +184,7 @@ void gimp_paint_core_paste (GimpPaintCore *core,
GimpDrawable *drawable,
gdouble paint_opacity,
gdouble image_opacity,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
GimpPaintApplicationMode mode);
void gimp_paint_core_replace (GimpPaintCore *core,
diff --git a/app/pdb/brush-select-cmds.c b/app/pdb/brush-select-cmds.c
index a28baff..b5a7c01 100644
--- a/app/pdb/brush-select-cmds.c
+++ b/app/pdb/brush-select-cmds.c
@@ -61,8 +61,8 @@ brushes_popup_invoker (GimpProcedure *procedure,
if (success)
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
@@ -129,8 +129,8 @@ brushes_set_popup_invoker (GimpProcedure *procedure,
if (success)
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
@@ -203,8 +203,8 @@ register_brush_select_procs (GimpPDB *pdb)
g_param_spec_enum ("paint-mode",
"paint mode",
"The initial paint mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -277,8 +277,8 @@ register_brush_select_procs (GimpPDB *pdb)
g_param_spec_enum ("paint-mode",
"paint mode",
"The initial paint mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/app/pdb/brushes-cmds.c b/app/pdb/brushes-cmds.c
index 30e7e84..a5b4119 100644
--- a/app/pdb/brushes-cmds.c
+++ b/app/pdb/brushes-cmds.c
@@ -207,8 +207,8 @@ brushes_get_brush_data_invoker (GimpProcedure *procedure,
{
GimpBrush *brush;
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
if (name && strlen (name))
brush = gimp_pdb_get_brush (gimp, name, FALSE, error);
@@ -439,8 +439,8 @@ register_brushes_procs (GimpPDB *pdb)
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("width",
diff --git a/app/pdb/context-cmds.c b/app/pdb/context-cmds.c
index 7be3ed0..f31cda7 100644
--- a/app/pdb/context-cmds.c
+++ b/app/pdb/context-cmds.c
@@ -419,8 +419,8 @@ context_set_paint_mode_invoker (GimpProcedure *procedure,
if (success)
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
gimp_context_set_paint_mode (context, paint_mode);
}
@@ -3138,8 +3138,8 @@ register_context_procs (GimpPDB *pdb)
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3162,8 +3162,8 @@ register_context_procs (GimpPDB *pdb)
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/app/pdb/edit-cmds.c b/app/pdb/edit-cmds.c
index c792750..47841cd 100644
--- a/app/pdb/edit-cmds.c
+++ b/app/pdb/edit-cmds.c
@@ -621,8 +621,8 @@ edit_bucket_fill_invoker (GimpProcedure *procedure,
if (gimp_fill_options_set_by_fill_mode (options, context,
fill_mode, error))
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
gimp_context_set_opacity (GIMP_CONTEXT (options), opacity / 100.0);
gimp_context_set_paint_mode (GIMP_CONTEXT (options), paint_mode);
@@ -698,8 +698,8 @@ edit_bucket_fill_full_invoker (GimpProcedure *procedure,
if (gimp_fill_options_set_by_fill_mode (options, context,
fill_mode, error))
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
gimp_context_set_opacity (GIMP_CONTEXT (options), opacity / 100.0);
gimp_context_set_paint_mode (GIMP_CONTEXT (options), paint_mode);
@@ -794,8 +794,8 @@ edit_blend_invoker (GimpProcedure *procedure,
{
GimpGradient *gradient;
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
if (progress)
gimp_progress_start (progress, FALSE, _("Blending"));
@@ -1348,8 +1348,8 @@ register_edit_procs (GimpPDB *pdb)
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint application mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
@@ -1415,8 +1415,8 @@ register_edit_procs (GimpPDB *pdb)
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint application mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
@@ -1495,8 +1495,8 @@ register_edit_procs (GimpPDB *pdb)
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint application mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("gradient-type",
diff --git a/app/pdb/layer-cmds.c b/app/pdb/layer-cmds.c
index f7764ec..3372e58 100644
--- a/app/pdb/layer-cmds.c
+++ b/app/pdb/layer-cmds.c
@@ -88,8 +88,8 @@ layer_new_invoker (GimpProcedure *procedure,
gboolean has_alpha = FALSE;
const Babl *format;
- if (mode == GIMP_OVERLAY_MODE)
- mode = GIMP_SOFTLIGHT_MODE;
+ if (mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
switch (type)
{
@@ -181,7 +181,7 @@ layer_new_from_visible_invoker (GimpProcedure *procedure,
TRUE),
name,
GIMP_OPACITY_OPAQUE,
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
profile);
}
@@ -1140,8 +1140,8 @@ layer_set_mode_invoker (GimpProcedure *procedure,
if (success)
{
- if (mode == GIMP_OVERLAY_MODE)
- mode = GIMP_SOFTLIGHT_MODE;
+ if (mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
gimp_layer_set_mode (layer, mode, TRUE);
}
@@ -1211,8 +1211,8 @@ register_layer_procs (GimpPDB *pdb)
g_param_spec_enum ("mode",
"mode",
"The layer combination mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_layer_id ("layer",
@@ -2147,8 +2147,8 @@ register_layer_procs (GimpPDB *pdb)
g_param_spec_enum ("mode",
"mode",
"The layer combination mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2177,8 +2177,8 @@ register_layer_procs (GimpPDB *pdb)
g_param_spec_enum ("mode",
"mode",
"The new layer combination mode",
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/app/tests/gimp-app-test-utils.c b/app/tests/gimp-app-test-utils.c
index f7b6a07..a39927f 100644
--- a/app/tests/gimp-app-test-utils.c
+++ b/app/tests/gimp-app-test-utils.c
@@ -138,7 +138,7 @@ gimp_test_utils_create_image (Gimp *gimp,
gimp_image_get_layer_format (image, TRUE),
"layer1",
1.0,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_add_layer (image,
layer,
diff --git a/app/tests/test-core.c b/app/tests/test-core.c
index 9ce79d6..cf27bc1 100644
--- a/app/tests/test-core.c
+++ b/app/tests/test-core.c
@@ -126,8 +126,8 @@ rotate_non_overlapping (GimpTestFixture *fixture,
GIMP_TEST_IMAGE_SIZE,
babl_format ("R'G'B'A u8"),
"Test Layer",
- 1.0,
- GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
g_assert_cmpint (GIMP_IS_LAYER (layer), ==, TRUE);
@@ -166,8 +166,8 @@ add_layer (GimpTestFixture *fixture,
GIMP_TEST_IMAGE_SIZE,
babl_format ("R'G'B'A u8"),
"Test Layer",
- 1.0,
- GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
g_assert_cmpint (GIMP_IS_LAYER (layer), ==, TRUE);
@@ -203,8 +203,8 @@ remove_layer (GimpTestFixture *fixture,
GIMP_TEST_IMAGE_SIZE,
babl_format ("R'G'B'A u8"),
"Test Layer",
- 1.0,
- GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
g_assert_cmpint (GIMP_IS_LAYER (layer), ==, TRUE);
diff --git a/app/tests/test-ui.c b/app/tests/test-ui.c
index 0701aef..61b245c 100644
--- a/app/tests/test-ui.c
+++ b/app/tests/test-ui.c
@@ -235,7 +235,8 @@ create_new_image_via_dialog (gconstpointer data)
gimp_image_get_height (image),
gimp_image_get_layer_format (image, TRUE),
"Layer for testing",
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_add_layer (image, layer,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
diff --git a/app/tests/test-xcf.c b/app/tests/test-xcf.c
index 6195321..1988ff9 100644
--- a/app/tests/test-xcf.c
+++ b/app/tests/test-xcf.c
@@ -67,15 +67,15 @@
#define GIMP_MAINIMAGE_LAYER1_WIDTH 50
#define GIMP_MAINIMAGE_LAYER1_HEIGHT 51
#define GIMP_MAINIMAGE_LAYER1_FORMAT babl_format ("R'G'B'A u8")
-#define GIMP_MAINIMAGE_LAYER1_OPACITY 1.0
-#define GIMP_MAINIMAGE_LAYER1_MODE GIMP_NORMAL_MODE
+#define GIMP_MAINIMAGE_LAYER1_OPACITY GIMP_OPACITY_OPAQUE
+#define GIMP_MAINIMAGE_LAYER1_MODE GIMP_LAYER_MODE_NORMAL
#define GIMP_MAINIMAGE_LAYER2_NAME "layer2"
#define GIMP_MAINIMAGE_LAYER2_WIDTH 25
#define GIMP_MAINIMAGE_LAYER2_HEIGHT 251
#define GIMP_MAINIMAGE_LAYER2_FORMAT babl_format ("R'G'B' u8")
-#define GIMP_MAINIMAGE_LAYER2_OPACITY 0.0
-#define GIMP_MAINIMAGE_LAYER2_MODE GIMP_MULTIPLY_MODE
+#define GIMP_MAINIMAGE_LAYER2_OPACITY GIMP_OPACITY_TRANSPARENT
+#define GIMP_MAINIMAGE_LAYER2_MODE GIMP_LAYER_MODE_MULTIPLY_BROKEN
#define GIMP_MAINIMAGE_GROUP1_NAME "group1"
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index e0a7aa6..0846c6e 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -918,7 +918,7 @@ gimp_warp_tool_animate (GimpWarpTool *wt)
gimp_item_set_offset (GIMP_ITEM (layer), 0, 0);
gimp_item_set_visible (GIMP_ITEM (layer), TRUE, FALSE);
- gimp_layer_set_mode (layer, GIMP_NORMAL_MODE, FALSE);
+ gimp_layer_set_mode (layer, GIMP_LAYER_MODE_NORMAL, FALSE);
gimp_layer_set_opacity (layer, GIMP_OPACITY_OPAQUE, FALSE);
gimp_image_add_layer (image, layer, NULL, 0, FALSE);
diff --git a/app/widgets/gimpbrushselect.c b/app/widgets/gimpbrushselect.c
index fea1641..d5ae867 100644
--- a/app/widgets/gimpbrushselect.c
+++ b/app/widgets/gimpbrushselect.c
@@ -69,7 +69,7 @@ static void gimp_brush_select_opacity_changed (GimpContext *context
gdouble opacity,
GimpBrushSelect *select);
static void gimp_brush_select_mode_changed (GimpContext *context,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
GimpBrushSelect *select);
static void gimp_brush_select_opacity_update (GtkAdjustment *adj,
@@ -106,8 +106,8 @@ gimp_brush_select_class_init (GimpBrushSelectClass *klass)
g_object_class_install_property (object_class, PROP_PAINT_MODE,
g_param_spec_enum ("paint-mode", NULL, NULL,
- GIMP_TYPE_LAYER_MODE_EFFECTS,
- GIMP_NORMAL_MODE,
+ GIMP_TYPE_LAYER_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_WRITABLE |
G_PARAM_CONSTRUCT));
@@ -307,9 +307,9 @@ gimp_brush_select_opacity_changed (GimpContext *context,
}
static void
-gimp_brush_select_mode_changed (GimpContext *context,
- GimpLayerModeEffects paint_mode,
- GimpBrushSelect *select)
+gimp_brush_select_mode_changed (GimpContext *context,
+ GimpLayerMode paint_mode,
+ GimpBrushSelect *select)
{
g_signal_handlers_block_by_func (select->paint_mode_menu,
gimp_brush_select_mode_update,
@@ -343,7 +343,7 @@ gimp_brush_select_mode_update (GtkWidget *widget,
&paint_mode))
{
gimp_context_set_paint_mode (GIMP_PDB_DIALOG (select)->context,
- (GimpLayerModeEffects) paint_mode);
+ (GimpLayerMode) paint_mode);
}
}
diff --git a/app/widgets/gimpbrushselect.h b/app/widgets/gimpbrushselect.h
index c5accc9..237c8be 100644
--- a/app/widgets/gimpbrushselect.h
+++ b/app/widgets/gimpbrushselect.h
@@ -38,14 +38,14 @@ typedef struct _GimpBrushSelectClass GimpBrushSelectClass;
struct _GimpBrushSelect
{
- GimpPdbDialog parent_instance;
+ GimpPdbDialog parent_instance;
- gdouble initial_opacity;
- GimpLayerModeEffects initial_mode;
+ gdouble initial_opacity;
+ GimpLayerMode initial_mode;
- gint spacing;
- GtkAdjustment *opacity_data;
- GtkWidget *paint_mode_menu;
+ gint spacing;
+ GtkAdjustment *opacity_data;
+ GtkWidget *paint_mode_menu;
};
struct _GimpBrushSelectClass
diff --git a/app/widgets/gimplayertreeview.c b/app/widgets/gimplayertreeview.c
index 7add51f..d189329 100644
--- a/app/widgets/gimplayertreeview.c
+++ b/app/widgets/gimplayertreeview.c
@@ -271,7 +271,7 @@ gimp_layer_tree_view_init (GimpLayerTreeView *view)
NULL, view->priv->paint_mode_menu);
gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (view->priv->paint_mode_menu),
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
G_CALLBACK (gimp_layer_tree_view_paint_mode_menu_callback),
view);
@@ -808,7 +808,8 @@ gimp_layer_tree_view_drop_pixbuf (GimpContainerTreeView *tree_view,
gimp_layer_new_from_pixbuf (pixbuf, image,
gimp_image_get_layer_format (image, TRUE),
_("Dropped Buffer"),
- GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_add_layer (image, new_layer, parent, index, TRUE);
@@ -848,7 +849,9 @@ gimp_layer_tree_view_item_new (GimpImage *image)
gimp_image_get_width (image),
gimp_image_get_height (image),
gimp_image_get_layer_format (image, TRUE),
- NULL, 1.0, GIMP_NORMAL_MODE);
+ NULL,
+ GIMP_OPACITY_OPAQUE,
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_add_layer (image, new_layer,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
@@ -938,7 +941,7 @@ gimp_layer_tree_view_paint_mode_menu_callback (GtkWidget *widget,
if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget),
&mode) &&
- gimp_layer_get_mode (layer) != (GimpLayerModeEffects) mode)
+ gimp_layer_get_mode (layer) != (GimpLayerMode) mode)
{
GimpUndo *undo;
gboolean push_undo = TRUE;
@@ -951,7 +954,7 @@ gimp_layer_tree_view_paint_mode_menu_callback (GtkWidget *widget,
push_undo = FALSE;
BLOCK();
- gimp_layer_set_mode (layer, (GimpLayerModeEffects) mode, push_undo);
+ gimp_layer_set_mode (layer, (GimpLayerMode) mode, push_undo);
UNBLOCK();
gimp_image_flush (image);
diff --git a/app/widgets/gimpwidgets-constructors.c b/app/widgets/gimpwidgets-constructors.c
index de47f96..46f7d70 100644
--- a/app/widgets/gimpwidgets-constructors.c
+++ b/app/widgets/gimpwidgets-constructors.c
@@ -103,79 +103,79 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
GtkListStore *store;
GtkWidget *combo;
- store = gimp_enum_store_new_with_values (GIMP_TYPE_LAYER_MODE_EFFECTS,
+ store = gimp_enum_store_new_with_values (GIMP_TYPE_LAYER_MODE,
25,
- GIMP_NORMAL_MODE,
- GIMP_DISSOLVE_MODE,
-
- GIMP_LIGHTEN_ONLY_MODE,
- GIMP_SCREEN_MODE,
- GIMP_DODGE_MODE,
- GIMP_ADDITION_MODE,
-
- GIMP_DARKEN_ONLY_MODE,
- GIMP_MULTIPLY_MODE,
- GIMP_BURN_MODE,
-
- GIMP_NEW_OVERLAY_MODE,
- GIMP_SOFTLIGHT_MODE,
- GIMP_HARDLIGHT_MODE,
-
- GIMP_DIFFERENCE_MODE,
- GIMP_SUBTRACT_MODE,
- GIMP_GRAIN_EXTRACT_MODE,
- GIMP_GRAIN_MERGE_MODE,
- GIMP_DIVIDE_MODE,
-
- GIMP_HUE_MODE,
- GIMP_SATURATION_MODE,
- GIMP_COLOR_MODE,
- GIMP_VALUE_MODE,
-
- GIMP_LCH_HUE_MODE,
- GIMP_LCH_CHROMA_MODE,
- GIMP_LCH_COLOR_MODE,
- GIMP_LCH_LIGHTNESS_MODE);
+ GIMP_LAYER_MODE_NORMAL,
+ GIMP_LAYER_MODE_DISSOLVE,
+
+ GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN,
+ GIMP_LAYER_MODE_SCREEN_BROKEN,
+ GIMP_LAYER_MODE_DODGE_BROKEN,
+ GIMP_LAYER_MODE_ADDITION_BROKEN,
+
+ GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN,
+ GIMP_LAYER_MODE_MULTIPLY_BROKEN,
+ GIMP_LAYER_MODE_BURN_BROKEN,
+
+ GIMP_LAYER_MODE_OVERLAY,
+ GIMP_LAYER_MODE_SOFTLIGHT_BROKEN,
+ GIMP_LAYER_MODE_HARDLIGHT_BROKEN,
+
+ GIMP_LAYER_MODE_DIFFERENCE_BROKEN,
+ GIMP_LAYER_MODE_SUBTRACT_BROKEN,
+ GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN,
+ GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN,
+ GIMP_LAYER_MODE_DIVIDE_BROKEN,
+
+ GIMP_LAYER_MODE_HSV_HUE_BROKEN,
+ GIMP_LAYER_MODE_HSV_SATURATION_BROKEN,
+ GIMP_LAYER_MODE_HSV_COLOR_BROKEN,
+ GIMP_LAYER_MODE_HSV_VALUE_BROKEN,
+
+ GIMP_LAYER_MODE_LCH_HUE,
+ GIMP_LAYER_MODE_LCH_CHROMA,
+ GIMP_LAYER_MODE_LCH_COLOR,
+ GIMP_LAYER_MODE_LCH_LIGHTNESS);
gimp_int_store_insert_separator_after (GIMP_INT_STORE (store),
- GIMP_DISSOLVE_MODE, -1);
+ GIMP_LAYER_MODE_DISSOLVE, -1);
gimp_int_store_insert_separator_after (GIMP_INT_STORE (store),
- GIMP_ADDITION_MODE, -1);
+ GIMP_LAYER_MODE_ADDITION_BROKEN, -1);
gimp_int_store_insert_separator_after (GIMP_INT_STORE (store),
- GIMP_BURN_MODE, -1);
+ GIMP_LAYER_MODE_BURN_BROKEN, -1);
gimp_int_store_insert_separator_after (GIMP_INT_STORE (store),
- GIMP_HARDLIGHT_MODE, -1);
+ GIMP_LAYER_MODE_HARDLIGHT_BROKEN, -1);
gimp_int_store_insert_separator_after (GIMP_INT_STORE (store),
- GIMP_DIVIDE_MODE, -1);
+ GIMP_LAYER_MODE_DIVIDE_BROKEN, -1);
gimp_int_store_insert_separator_after (GIMP_INT_STORE (store),
- GIMP_VALUE_MODE, -1);
+ GIMP_LAYER_MODE_HSV_VALUE_BROKEN, -1);
if (with_behind_mode)
{
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
- GIMP_DISSOLVE_MODE,
- GIMP_BEHIND_MODE);
+ GIMP_LAYER_MODE_DISSOLVE,
+ GIMP_LAYER_MODE_BEHIND);
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
- GIMP_BEHIND_MODE,
- GIMP_COLOR_ERASE_MODE);
+ GIMP_LAYER_MODE_BEHIND,
+ GIMP_LAYER_MODE_COLOR_ERASE);
}
if (with_replace_modes)
{
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
- GIMP_NORMAL_MODE,
- GIMP_REPLACE_MODE);
+ GIMP_LAYER_MODE_NORMAL,
+ GIMP_LAYER_MODE_REPLACE);
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
- GIMP_COLOR_ERASE_MODE,
- GIMP_ERASE_MODE);
+ GIMP_LAYER_MODE_COLOR_ERASE,
+ GIMP_LAYER_MODE_ERASE);
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
- GIMP_ERASE_MODE,
- GIMP_ANTI_ERASE_MODE);
+ GIMP_LAYER_MODE_ERASE,
+ GIMP_LAYER_MODE_ANTI_ERASE);
}
combo = gimp_enum_combo_box_new_with_model (GIMP_ENUM_STORE (store));
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index 5be2a71..33c1be2 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -1093,10 +1093,10 @@ xcf_load_layer_props (XcfInfo *info,
info->cp += xcf_read_int32 (info->input, &mode, 1);
- if (mode == GIMP_OVERLAY_MODE)
- mode = GIMP_SOFTLIGHT_MODE;
+ if (mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
- gimp_layer_set_mode (*layer, (GimpLayerModeEffects) mode, FALSE);
+ gimp_layer_set_mode (*layer, (GimpLayerMode) mode, FALSE);
}
break;
@@ -1525,7 +1525,7 @@ xcf_load_layer (XcfInfo *info,
/* create a new layer */
layer = gimp_layer_new (image, width, height,
- format, name, 255, GIMP_NORMAL_MODE);
+ format, name, 255, GIMP_LAYER_MODE_NORMAL);
g_free (name);
if (! layer)
return NULL;
diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c
index 7930b0f..f49c214 100644
--- a/app/xcf/xcf-save.c
+++ b/app/xcf/xcf-save.c
@@ -726,8 +726,8 @@ xcf_save_prop (XcfInfo *info,
mode = va_arg (args, gint32);
size = 4;
- if (mode == GIMP_OVERLAY_MODE)
- mode = GIMP_SOFTLIGHT_MODE;
+ if (mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
xcf_write_prop_type_check_error (info, prop_type);
xcf_write_int32_check_error (info, &size, 1);
diff --git a/libgimp/gimp.def b/libgimp/gimp.def
index ac54622..2d7213b 100644
--- a/libgimp/gimp.def
+++ b/libgimp/gimp.def
@@ -604,7 +604,7 @@ EXPORTS
gimp_layer_get_show_mask
gimp_layer_group_new
gimp_layer_is_floating_sel
- gimp_layer_mode_effects_get_type
+ gimp_layer_mode_get_type
gimp_layer_new
gimp_layer_new_from_drawable
gimp_layer_new_from_pixbuf
diff --git a/libgimp/gimpbrushes.c b/libgimp/gimpbrushes.c
index 3875937..76f7e43 100644
--- a/libgimp/gimpbrushes.c
+++ b/libgimp/gimpbrushes.c
@@ -59,7 +59,7 @@ gimp_brushes_set_opacity (gdouble opacity)
*
* Returns: The paint mode.
*/
-GimpLayerModeEffects
+GimpLayerMode
gimp_brushes_get_paint_mode (void)
{
return gimp_context_get_paint_mode ();
@@ -74,7 +74,7 @@ gimp_brushes_get_paint_mode (void)
* Returns: TRUE on success.
*/
gboolean
-gimp_brushes_set_paint_mode (GimpLayerModeEffects paint_mode)
+gimp_brushes_set_paint_mode (GimpLayerMode paint_mode)
{
return gimp_context_set_paint_mode (paint_mode);
}
diff --git a/libgimp/gimpbrushes.h b/libgimp/gimpbrushes.h
index badf300..943d4b6 100644
--- a/libgimp/gimpbrushes.h
+++ b/libgimp/gimpbrushes.h
@@ -30,15 +30,15 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
GIMP_DEPRECATED_FOR(gimp_context_get_opacity)
-gdouble gimp_brushes_get_opacity (void);
+gdouble gimp_brushes_get_opacity (void);
GIMP_DEPRECATED_FOR(gimp_context_set_opacity)
-gboolean gimp_brushes_set_opacity (gdouble opacity);
+gboolean gimp_brushes_set_opacity (gdouble opacity);
GIMP_DEPRECATED_FOR(gimp_context_get_paint_mode)
-GimpLayerModeEffects gimp_brushes_get_paint_mode (void);
+GimpLayerMode gimp_brushes_get_paint_mode (void);
GIMP_DEPRECATED_FOR(gimp_context_set_paint_mode)
-gboolean gimp_brushes_set_paint_mode (GimpLayerModeEffects paint_mode);
+gboolean gimp_brushes_set_paint_mode (GimpLayerMode paint_mode);
GIMP_DEPRECATED_FOR(gimp_context_set_brush)
-gboolean gimp_brushes_set_brush (const gchar *name);
+gboolean gimp_brushes_set_brush (const gchar *name);
G_END_DECLS
diff --git a/libgimp/gimpbrushes_pdb.c b/libgimp/gimpbrushes_pdb.c
index 8f4c8e5..fa947bc 100644
--- a/libgimp/gimpbrushes_pdb.c
+++ b/libgimp/gimpbrushes_pdb.c
@@ -215,14 +215,14 @@ gimp_brushes_set_spacing (gint spacing)
* Returns: The brush name.
**/
gchar *
-gimp_brushes_get_brush_data (const gchar *name,
- gdouble *opacity,
- gint *spacing,
- GimpLayerModeEffects *paint_mode,
- gint *width,
- gint *height,
- gint *length,
- guint8 **mask_data)
+gimp_brushes_get_brush_data (const gchar *name,
+ gdouble *opacity,
+ gint *spacing,
+ GimpLayerMode *paint_mode,
+ gint *width,
+ gint *height,
+ gint *length,
+ guint8 **mask_data)
{
GimpParam *return_vals;
gint nreturn_vals;
diff --git a/libgimp/gimpbrushes_pdb.h b/libgimp/gimpbrushes_pdb.h
index 1970259..f281b9c 100644
--- a/libgimp/gimpbrushes_pdb.h
+++ b/libgimp/gimpbrushes_pdb.h
@@ -33,25 +33,25 @@ G_BEGIN_DECLS
gboolean gimp_brushes_refresh (void);
-gchar** gimp_brushes_get_list (const gchar *filter,
- gint *num_brushes);
+gchar** gimp_brushes_get_list (const gchar *filter,
+ gint *num_brushes);
GIMP_DEPRECATED_FOR(gimp_context_get_brush)
-gchar* gimp_brushes_get_brush (gint *width,
- gint *height,
- gint *spacing);
+gchar* gimp_brushes_get_brush (gint *width,
+ gint *height,
+ gint *spacing);
GIMP_DEPRECATED_FOR(gimp_brush_get_spacing)
gint gimp_brushes_get_spacing (void);
GIMP_DEPRECATED_FOR(gimp_brush_set_spacing)
-gboolean gimp_brushes_set_spacing (gint spacing);
+gboolean gimp_brushes_set_spacing (gint spacing);
GIMP_DEPRECATED_FOR(gimp_brush_get_pixels)
-gchar* gimp_brushes_get_brush_data (const gchar *name,
- gdouble *opacity,
- gint *spacing,
- GimpLayerModeEffects *paint_mode,
- gint *width,
- gint *height,
- gint *length,
- guint8 **mask_data);
+gchar* gimp_brushes_get_brush_data (const gchar *name,
+ gdouble *opacity,
+ gint *spacing,
+ GimpLayerMode *paint_mode,
+ gint *width,
+ gint *height,
+ gint *length,
+ guint8 **mask_data);
G_END_DECLS
diff --git a/libgimp/gimpbrushmenu.c b/libgimp/gimpbrushmenu.c
index 0cd0b7b..341a6b7 100644
--- a/libgimp/gimpbrushmenu.c
+++ b/libgimp/gimpbrushmenu.c
@@ -50,7 +50,7 @@ static void compat_callback (GimpBrushSelectButton *brush_button,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
gint width,
gint height,
const guchar *mask_data,
@@ -80,7 +80,7 @@ gimp_brush_select_widget_new (const gchar *title,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
GimpRunBrushCallback callback,
gpointer data)
{
@@ -132,11 +132,11 @@ gimp_brush_select_widget_close (GtkWidget *widget)
* call to gimp_brush_select_widget_new().
*/
void
-gimp_brush_select_widget_set (GtkWidget *widget,
- const gchar *brush_name,
- gdouble opacity,
- gint spacing,
- GimpLayerModeEffects paint_mode)
+gimp_brush_select_widget_set (GtkWidget *widget,
+ const gchar *brush_name,
+ gdouble opacity,
+ gint spacing,
+ GimpLayerMode paint_mode)
{
g_return_if_fail (widget != NULL);
@@ -150,7 +150,7 @@ compat_callback (GimpBrushSelectButton *brush_button,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
gint width,
gint height,
const guchar *mask_data,
diff --git a/libgimp/gimpbrushmenu.h b/libgimp/gimpbrushmenu.h
index c11aad1..f009a15 100644
--- a/libgimp/gimpbrushmenu.h
+++ b/libgimp/gimpbrushmenu.h
@@ -36,7 +36,7 @@ GtkWidget * gimp_brush_select_widget_new (const gchar *title,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
GimpRunBrushCallback callback,
gpointer data);
@@ -47,7 +47,7 @@ void gimp_brush_select_widget_set (GtkWidget *widget,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode);
+ GimpLayerMode paint_mode);
G_END_DECLS
diff --git a/libgimp/gimpbrushselect.c b/libgimp/gimpbrushselect.c
index 7cd4c05..263953c 100644
--- a/libgimp/gimpbrushselect.c
+++ b/libgimp/gimpbrushselect.c
@@ -64,7 +64,7 @@ gimp_brush_select_new (const gchar *title,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
GimpRunBrushCallback callback,
gpointer data)
{
diff --git a/libgimp/gimpbrushselect.h b/libgimp/gimpbrushselect.h
index f90c7c2..a24b607 100644
--- a/libgimp/gimpbrushselect.h
+++ b/libgimp/gimpbrushselect.h
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
typedef void (* GimpRunBrushCallback) (const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
gint width,
gint height,
const guchar *mask_data,
@@ -43,7 +43,7 @@ const gchar * gimp_brush_select_new (const gchar *title,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
GimpRunBrushCallback callback,
gpointer data);
void gimp_brush_select_destroy (const gchar *brush_callback);
diff --git a/libgimp/gimpbrushselect_pdb.c b/libgimp/gimpbrushselect_pdb.c
index fbe5d37..1b81ee2 100644
--- a/libgimp/gimpbrushselect_pdb.c
+++ b/libgimp/gimpbrushselect_pdb.c
@@ -50,12 +50,12 @@
* Returns: TRUE on success.
**/
gboolean
-gimp_brushes_popup (const gchar *brush_callback,
- const gchar *popup_title,
- const gchar *initial_brush,
- gdouble opacity,
- gint spacing,
- GimpLayerModeEffects paint_mode)
+gimp_brushes_popup (const gchar *brush_callback,
+ const gchar *popup_title,
+ const gchar *initial_brush,
+ gdouble opacity,
+ gint spacing,
+ GimpLayerMode paint_mode)
{
GimpParam *return_vals;
gint nreturn_vals;
@@ -122,11 +122,11 @@ gimp_brushes_close_popup (const gchar *brush_callback)
* Returns: TRUE on success.
**/
gboolean
-gimp_brushes_set_popup (const gchar *brush_callback,
- const gchar *brush_name,
- gdouble opacity,
- gint spacing,
- GimpLayerModeEffects paint_mode)
+gimp_brushes_set_popup (const gchar *brush_callback,
+ const gchar *brush_name,
+ gdouble opacity,
+ gint spacing,
+ GimpLayerMode paint_mode)
{
GimpParam *return_vals;
gint nreturn_vals;
diff --git a/libgimp/gimpbrushselect_pdb.h b/libgimp/gimpbrushselect_pdb.h
index 3c6e3fc..a1c86a8 100644
--- a/libgimp/gimpbrushselect_pdb.h
+++ b/libgimp/gimpbrushselect_pdb.h
@@ -32,18 +32,18 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-gboolean gimp_brushes_popup (const gchar *brush_callback,
- const gchar *popup_title,
- const gchar *initial_brush,
- gdouble opacity,
- gint spacing,
- GimpLayerModeEffects paint_mode);
-gboolean gimp_brushes_close_popup (const gchar *brush_callback);
-gboolean gimp_brushes_set_popup (const gchar *brush_callback,
- const gchar *brush_name,
- gdouble opacity,
- gint spacing,
- GimpLayerModeEffects paint_mode);
+gboolean gimp_brushes_popup (const gchar *brush_callback,
+ const gchar *popup_title,
+ const gchar *initial_brush,
+ gdouble opacity,
+ gint spacing,
+ GimpLayerMode paint_mode);
+gboolean gimp_brushes_close_popup (const gchar *brush_callback);
+gboolean gimp_brushes_set_popup (const gchar *brush_callback,
+ const gchar *brush_name,
+ gdouble opacity,
+ gint spacing,
+ GimpLayerMode paint_mode);
G_END_DECLS
diff --git a/libgimp/gimpbrushselectbutton.c b/libgimp/gimpbrushselectbutton.c
index fa0e877..bfb784d 100644
--- a/libgimp/gimpbrushselectbutton.c
+++ b/libgimp/gimpbrushselectbutton.c
@@ -53,19 +53,19 @@ typedef struct _GimpBrushSelectButtonPrivate GimpBrushSelectButtonPrivate;
struct _GimpBrushSelectButtonPrivate
{
- gchar *title;
-
- gchar *brush_name; /* Local copy */
- gdouble opacity;
- gint spacing;
- GimpLayerModeEffects paint_mode;
- gint width;
- gint height;
- guchar *mask_data; /* local copy */
-
- GtkWidget *inside;
- GtkWidget *preview;
- GtkWidget *popup;
+ gchar *title;
+
+ gchar *brush_name; /* Local copy */
+ gdouble opacity;
+ gint spacing;
+ GimpLayerMode paint_mode;
+ gint width;
+ gint height;
+ guchar *mask_data; /* local copy */
+
+ GtkWidget *inside;
+ GtkWidget *preview;
+ GtkWidget *popup;
};
enum
@@ -103,7 +103,7 @@ static void gimp_brush_select_button_clicked (GimpBrushSelectButton *button);
static void gimp_brush_select_button_callback (const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
gint width,
gint height,
const guchar *mask_data,
@@ -225,7 +225,7 @@ gimp_brush_select_button_class_init (GimpBrushSelectButtonClass *klass)
/**
* GimpBrushSelectButton:paint-mode:
*
- * The name of the currently selected brush.
+ * The paint mode.
*
* Since: 2.4
*/
@@ -233,7 +233,7 @@ gimp_brush_select_button_class_init (GimpBrushSelectButtonClass *klass)
g_param_spec_int ("brush-paint-mode",
"Brush paint mode",
"The paint mode of the currently selected brush",
- -1, GIMP_COLOR_ERASE_MODE,
+ -1, GIMP_LAYER_MODE_LCH_LIGHTNESS,
-1,
GIMP_PARAM_READWRITE));
@@ -324,11 +324,11 @@ gimp_brush_select_button_init (GimpBrushSelectButton *button)
* Since: 2.4
*/
GtkWidget *
-gimp_brush_select_button_new (const gchar *title,
- const gchar *brush_name,
- gdouble opacity,
- gint spacing,
- GimpLayerModeEffects paint_mode)
+gimp_brush_select_button_new (const gchar *title,
+ const gchar *brush_name,
+ gdouble opacity,
+ gint spacing,
+ GimpLayerMode paint_mode)
{
GtkWidget *button;
@@ -368,7 +368,7 @@ const gchar *
gimp_brush_select_button_get_brush (GimpBrushSelectButton *button,
gdouble *opacity,
gint *spacing,
- GimpLayerModeEffects *paint_mode)
+ GimpLayerMode *paint_mode)
{
GimpBrushSelectButtonPrivate *priv;
@@ -406,7 +406,7 @@ gimp_brush_select_button_set_brush (GimpBrushSelectButton *button,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode)
+ GimpLayerMode paint_mode)
{
GimpSelectButton *select_button;
@@ -572,15 +572,15 @@ gimp_brush_select_button_get_property (GObject *object,
}
static void
-gimp_brush_select_button_callback (const gchar *name,
- gdouble opacity,
- gint spacing,
- GimpLayerModeEffects paint_mode,
- gint width,
- gint height,
- const guchar *mask_data,
- gboolean dialog_closing,
- gpointer data)
+gimp_brush_select_button_callback (const gchar *name,
+ gdouble opacity,
+ gint spacing,
+ GimpLayerMode paint_mode,
+ gint width,
+ gint height,
+ const guchar *mask_data,
+ gboolean dialog_closing,
+ gpointer data)
{
GimpBrushSelectButton *button;
GimpBrushSelectButtonPrivate *priv;
diff --git a/libgimp/gimpbrushselectbutton.h b/libgimp/gimpbrushselectbutton.h
index 2e7972a..1cad155 100644
--- a/libgimp/gimpbrushselectbutton.h
+++ b/libgimp/gimpbrushselectbutton.h
@@ -56,7 +56,7 @@ struct _GimpBrushSelectButtonClass
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
gint width,
gint height,
const guchar *mask_data,
@@ -76,17 +76,17 @@ GtkWidget * gimp_brush_select_button_new (const gchar *title,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode);
+ GimpLayerMode paint_mode);
const gchar * gimp_brush_select_button_get_brush (GimpBrushSelectButton *button,
gdouble *opacity,
gint *spacing,
- GimpLayerModeEffects *paint_mode);
+ GimpLayerMode *paint_mode);
void gimp_brush_select_button_set_brush (GimpBrushSelectButton *button,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode);
+ GimpLayerMode paint_mode);
G_END_DECLS
diff --git a/libgimp/gimpcontext_pdb.c b/libgimp/gimpcontext_pdb.c
index 3364351..27e2dc6 100644
--- a/libgimp/gimpcontext_pdb.c
+++ b/libgimp/gimpcontext_pdb.c
@@ -585,12 +585,12 @@ gimp_context_set_opacity (gdouble opacity)
*
* Since: 2.2
**/
-GimpLayerModeEffects
+GimpLayerMode
gimp_context_get_paint_mode (void)
{
GimpParam *return_vals;
gint nreturn_vals;
- GimpLayerModeEffects paint_mode = 0;
+ GimpLayerMode paint_mode = 0;
return_vals = gimp_run_procedure ("gimp-context-get-paint-mode",
&nreturn_vals,
@@ -617,7 +617,7 @@ gimp_context_get_paint_mode (void)
* Since: 2.2
**/
gboolean
-gimp_context_set_paint_mode (GimpLayerModeEffects paint_mode)
+gimp_context_set_paint_mode (GimpLayerMode paint_mode)
{
GimpParam *return_vals;
gint nreturn_vals;
diff --git a/libgimp/gimpcontext_pdb.h b/libgimp/gimpcontext_pdb.h
index 675abf2..85f0942 100644
--- a/libgimp/gimpcontext_pdb.h
+++ b/libgimp/gimpcontext_pdb.h
@@ -49,8 +49,8 @@ gboolean gimp_context_set_default_colors (void);
gboolean gimp_context_swap_colors (void);
gdouble gimp_context_get_opacity (void);
gboolean gimp_context_set_opacity (gdouble opacity);
-GimpLayerModeEffects gimp_context_get_paint_mode (void);
-gboolean gimp_context_set_paint_mode (GimpLayerModeEffects paint_mode);
+GimpLayerMode gimp_context_get_paint_mode (void);
+gboolean gimp_context_set_paint_mode (GimpLayerMode paint_mode);
gdouble gimp_context_get_line_width (void);
gboolean gimp_context_set_line_width (gdouble line_width);
GimpUnit gimp_context_get_line_width_unit (void);
diff --git a/libgimp/gimpedit_pdb.c b/libgimp/gimpedit_pdb.c
index d1678d7..e605bcf 100644
--- a/libgimp/gimpedit_pdb.c
+++ b/libgimp/gimpedit_pdb.c
@@ -517,14 +517,14 @@ gimp_edit_fill (gint32 drawable_ID,
* Returns: TRUE on success.
**/
gboolean
-gimp_edit_bucket_fill (gint32 drawable_ID,
- GimpBucketFillMode fill_mode,
- GimpLayerModeEffects paint_mode,
- gdouble opacity,
- gdouble threshold,
- gboolean sample_merged,
- gdouble x,
- gdouble y)
+gimp_edit_bucket_fill (gint32 drawable_ID,
+ GimpBucketFillMode fill_mode,
+ GimpLayerMode paint_mode,
+ gdouble opacity,
+ gdouble threshold,
+ gboolean sample_merged,
+ gdouble x,
+ gdouble y)
{
GimpParam *return_vals;
gint nreturn_vals;
@@ -583,16 +583,16 @@ gimp_edit_bucket_fill (gint32 drawable_ID,
* Since: 2.4
**/
gboolean
-gimp_edit_bucket_fill_full (gint32 drawable_ID,
- GimpBucketFillMode fill_mode,
- GimpLayerModeEffects paint_mode,
- gdouble opacity,
- gdouble threshold,
- gboolean sample_merged,
- gboolean fill_transparent,
- GimpSelectCriterion select_criterion,
- gdouble x,
- gdouble y)
+gimp_edit_bucket_fill_full (gint32 drawable_ID,
+ GimpBucketFillMode fill_mode,
+ GimpLayerMode paint_mode,
+ gdouble opacity,
+ gdouble threshold,
+ gboolean sample_merged,
+ gboolean fill_transparent,
+ GimpSelectCriterion select_criterion,
+ gdouble x,
+ gdouble y)
{
GimpParam *return_vals;
gint nreturn_vals;
@@ -649,22 +649,22 @@ gimp_edit_bucket_fill_full (gint32 drawable_ID,
* Returns: TRUE on success.
**/
gboolean
-gimp_edit_blend (gint32 drawable_ID,
- GimpBlendMode blend_mode,
- GimpLayerModeEffects paint_mode,
- GimpGradientType gradient_type,
- gdouble opacity,
- gdouble offset,
- GimpRepeatMode repeat,
- gboolean reverse,
- gboolean supersample,
- gint max_depth,
- gdouble threshold,
- gboolean dither,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2)
+gimp_edit_blend (gint32 drawable_ID,
+ GimpBlendMode blend_mode,
+ GimpLayerMode paint_mode,
+ GimpGradientType gradient_type,
+ gdouble opacity,
+ gdouble offset,
+ GimpRepeatMode repeat,
+ gboolean reverse,
+ gboolean supersample,
+ gint max_depth,
+ gdouble threshold,
+ gboolean dither,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2)
{
GimpParam *return_vals;
gint nreturn_vals;
diff --git a/libgimp/gimpedit_pdb.h b/libgimp/gimpedit_pdb.h
index 9108c1a..7a9f27d 100644
--- a/libgimp/gimpedit_pdb.h
+++ b/libgimp/gimpedit_pdb.h
@@ -32,62 +32,62 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-gboolean gimp_edit_cut (gint32 drawable_ID);
-gboolean gimp_edit_copy (gint32 drawable_ID);
-gboolean gimp_edit_copy_visible (gint32 image_ID);
-gint32 gimp_edit_paste (gint32 drawable_ID,
- gboolean paste_into);
+gboolean gimp_edit_cut (gint32 drawable_ID);
+gboolean gimp_edit_copy (gint32 drawable_ID);
+gboolean gimp_edit_copy_visible (gint32 image_ID);
+gint32 gimp_edit_paste (gint32 drawable_ID,
+ gboolean paste_into);
gint32 gimp_edit_paste_as_new_image (void);
-gchar* gimp_edit_named_cut (gint32 drawable_ID,
- const gchar *buffer_name);
-gchar* gimp_edit_named_copy (gint32 drawable_ID,
- const gchar *buffer_name);
-gchar* gimp_edit_named_copy_visible (gint32 image_ID,
- const gchar *buffer_name);
-gint32 gimp_edit_named_paste (gint32 drawable_ID,
- const gchar *buffer_name,
- gboolean paste_into);
-gint32 gimp_edit_named_paste_as_new_image (const gchar *buffer_name);
-gboolean gimp_edit_clear (gint32 drawable_ID);
-gboolean gimp_edit_fill (gint32 drawable_ID,
- GimpFillType fill_type);
-gboolean gimp_edit_bucket_fill (gint32 drawable_ID,
- GimpBucketFillMode fill_mode,
- GimpLayerModeEffects paint_mode,
- gdouble opacity,
- gdouble threshold,
- gboolean sample_merged,
- gdouble x,
- gdouble y);
-gboolean gimp_edit_bucket_fill_full (gint32 drawable_ID,
- GimpBucketFillMode fill_mode,
- GimpLayerModeEffects paint_mode,
- gdouble opacity,
- gdouble threshold,
- gboolean sample_merged,
- gboolean fill_transparent,
- GimpSelectCriterion select_criterion,
- gdouble x,
- gdouble y);
-gboolean gimp_edit_blend (gint32 drawable_ID,
- GimpBlendMode blend_mode,
- GimpLayerModeEffects paint_mode,
- GimpGradientType gradient_type,
- gdouble opacity,
- gdouble offset,
- GimpRepeatMode repeat,
- gboolean reverse,
- gboolean supersample,
- gint max_depth,
- gdouble threshold,
- gboolean dither,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2);
-gboolean gimp_edit_stroke (gint32 drawable_ID);
-gboolean gimp_edit_stroke_vectors (gint32 drawable_ID,
- gint32 vectors_ID);
+gchar* gimp_edit_named_cut (gint32 drawable_ID,
+ const gchar *buffer_name);
+gchar* gimp_edit_named_copy (gint32 drawable_ID,
+ const gchar *buffer_name);
+gchar* gimp_edit_named_copy_visible (gint32 image_ID,
+ const gchar *buffer_name);
+gint32 gimp_edit_named_paste (gint32 drawable_ID,
+ const gchar *buffer_name,
+ gboolean paste_into);
+gint32 gimp_edit_named_paste_as_new_image (const gchar *buffer_name);
+gboolean gimp_edit_clear (gint32 drawable_ID);
+gboolean gimp_edit_fill (gint32 drawable_ID,
+ GimpFillType fill_type);
+gboolean gimp_edit_bucket_fill (gint32 drawable_ID,
+ GimpBucketFillMode fill_mode,
+ GimpLayerMode paint_mode,
+ gdouble opacity,
+ gdouble threshold,
+ gboolean sample_merged,
+ gdouble x,
+ gdouble y);
+gboolean gimp_edit_bucket_fill_full (gint32 drawable_ID,
+ GimpBucketFillMode fill_mode,
+ GimpLayerMode paint_mode,
+ gdouble opacity,
+ gdouble threshold,
+ gboolean sample_merged,
+ gboolean fill_transparent,
+ GimpSelectCriterion select_criterion,
+ gdouble x,
+ gdouble y);
+gboolean gimp_edit_blend (gint32 drawable_ID,
+ GimpBlendMode blend_mode,
+ GimpLayerMode paint_mode,
+ GimpGradientType gradient_type,
+ gdouble opacity,
+ gdouble offset,
+ GimpRepeatMode repeat,
+ gboolean reverse,
+ gboolean supersample,
+ gint max_depth,
+ gdouble threshold,
+ gboolean dither,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2);
+gboolean gimp_edit_stroke (gint32 drawable_ID);
+gboolean gimp_edit_stroke_vectors (gint32 drawable_ID,
+ gint32 vectors_ID);
G_END_DECLS
diff --git a/libgimp/gimpenums.c.tail b/libgimp/gimpenums.c.tail
index 2d616e9..4a186ca 100644
--- a/libgimp/gimpenums.c.tail
+++ b/libgimp/gimpenums.c.tail
@@ -35,7 +35,7 @@ static const GimpGetTypeFunc get_type_funcs[] =
gimp_ink_blob_type_get_type,
gimp_interpolation_type_get_type,
gimp_join_style_get_type,
- gimp_layer_mode_effects_get_type,
+ gimp_layer_mode_get_type,
gimp_mask_apply_mode_get_type,
gimp_merge_type_get_type,
gimp_message_handler_type_get_type,
@@ -99,7 +99,7 @@ static const gchar * const type_names[] =
"GimpInkBlobType",
"GimpInterpolationType",
"GimpJoinStyle",
- "GimpLayerModeEffects",
+ "GimpLayerMode",
"GimpMaskApplyMode",
"GimpMergeType",
"GimpMessageHandlerType",
@@ -146,6 +146,7 @@ void
gimp_enums_init (void)
{
const GimpGetTypeFunc *funcs = get_type_funcs;
+ GQuark quark;
gint i;
if (enums_initialized)
@@ -158,6 +159,12 @@ gimp_enums_init (void)
g_type_class_ref (type);
}
+ /* keep compat enum code in sync with app/app.c (app_libs_init) */
+ quark = g_quark_from_static_string ("gimp-compat-enum");
+
+ g_type_set_qdata (GIMP_TYPE_LAYER_MODE, quark,
+ (gpointer) GIMP_TYPE_LAYER_MODE_EFFECTS);
+
enums_initialized = TRUE;
}
diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h
index 2f1165e..fcaeef5 100644
--- a/libgimp/gimpenums.h
+++ b/libgimp/gimpenums.h
@@ -63,41 +63,41 @@ typedef enum
} GimpHistogramChannel;
-#define GIMP_TYPE_LAYER_MODE_EFFECTS (gimp_layer_mode_effects_get_type ())
+#define GIMP_TYPE_LAYER_MODE (gimp_layer_mode_get_type ())
-GType gimp_layer_mode_effects_get_type (void) G_GNUC_CONST;
+GType gimp_layer_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
- 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,
- GIMP_NEW_OVERLAY_MODE,
- GIMP_LCH_HUE_MODE,
- GIMP_LCH_CHROMA_MODE,
- GIMP_LCH_COLOR_MODE,
- GIMP_LCH_LIGHTNESS_MODE
-} GimpLayerModeEffects;
+ GIMP_LAYER_MODE_NORMAL,
+ GIMP_LAYER_MODE_DISSOLVE,
+ GIMP_LAYER_MODE_BEHIND,
+ GIMP_LAYER_MODE_MULTIPLY_BROKEN,
+ GIMP_LAYER_MODE_SCREEN_BROKEN,
+ GIMP_LAYER_MODE_OVERLAY_BROKEN,
+ GIMP_LAYER_MODE_DIFFERENCE_BROKEN,
+ GIMP_LAYER_MODE_ADDITION_BROKEN,
+ GIMP_LAYER_MODE_SUBTRACT_BROKEN,
+ GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN,
+ GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN,
+ GIMP_LAYER_MODE_HSV_HUE_BROKEN,
+ GIMP_LAYER_MODE_HSV_SATURATION_BROKEN,
+ GIMP_LAYER_MODE_HSV_COLOR_BROKEN,
+ GIMP_LAYER_MODE_HSV_VALUE_BROKEN,
+ GIMP_LAYER_MODE_DIVIDE_BROKEN,
+ GIMP_LAYER_MODE_DODGE_BROKEN,
+ GIMP_LAYER_MODE_BURN_BROKEN,
+ GIMP_LAYER_MODE_HARDLIGHT_BROKEN,
+ GIMP_LAYER_MODE_SOFTLIGHT_BROKEN,
+ GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN,
+ GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN,
+ GIMP_LAYER_MODE_COLOR_ERASE,
+ GIMP_LAYER_MODE_OVERLAY,
+ GIMP_LAYER_MODE_LCH_HUE,
+ GIMP_LAYER_MODE_LCH_CHROMA,
+ GIMP_LAYER_MODE_LCH_COLOR,
+ GIMP_LAYER_MODE_LCH_LIGHTNESS
+} GimpLayerMode;
void gimp_enums_init (void);
diff --git a/libgimp/gimpexport.c b/libgimp/gimpexport.c
index 1d984ce..c3f3fcc 100644
--- a/libgimp/gimpexport.c
+++ b/libgimp/gimpexport.c
@@ -95,7 +95,7 @@ export_merge (gint32 image_ID,
gimp_image_width (image_ID),
gimp_image_height (image_ID),
gimp_drawable_type (*drawable_ID) | 1,
- 100.0, GIMP_NORMAL_MODE);
+ 100.0, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, transp, -1, 1);
gimp_selection_none (image_ID);
gimp_edit_clear (transp);
diff --git a/libgimp/gimpimagemetadata.c b/libgimp/gimpimagemetadata.c
index 5591403..0ee7b33 100644
--- a/libgimp/gimpimagemetadata.c
+++ b/libgimp/gimpimagemetadata.c
@@ -604,7 +604,7 @@ gimp_image_metadata_load_thumbnail (GFile *file,
layer_ID = gimp_layer_new_from_pixbuf (image_ID, _("Background"),
pixbuf,
- 100.0, GIMP_NORMAL_MODE,
+ 100.0, GIMP_LAYER_MODE_NORMAL,
0.0, 0.0);
g_object_unref (pixbuf);
diff --git a/libgimp/gimplayer.c b/libgimp/gimplayer.c
index 6668000..7178121 100644
--- a/libgimp/gimplayer.c
+++ b/libgimp/gimplayer.c
@@ -49,13 +49,13 @@
* Returns: The newly created layer.
*/
gint32
-gimp_layer_new (gint32 image_ID,
- const gchar *name,
- gint width,
- gint height,
- GimpImageType type,
- gdouble opacity,
- GimpLayerModeEffects mode)
+gimp_layer_new (gint32 image_ID,
+ const gchar *name,
+ gint width,
+ gint height,
+ GimpImageType type,
+ gdouble opacity,
+ GimpLayerMode mode)
{
return _gimp_layer_new (image_ID,
width,
@@ -109,13 +109,13 @@ gimp_layer_copy (gint32 layer_ID)
* Since: 2.4
*/
gint32
-gimp_layer_new_from_pixbuf (gint32 image_ID,
- const gchar *name,
- GdkPixbuf *pixbuf,
- gdouble opacity,
- GimpLayerModeEffects mode,
- gdouble progress_start,
- gdouble progress_end)
+gimp_layer_new_from_pixbuf (gint32 image_ID,
+ const gchar *name,
+ GdkPixbuf *pixbuf,
+ gdouble opacity,
+ GimpLayerMode mode,
+ gdouble progress_start,
+ gdouble progress_end)
{
gint32 layer;
gint width;
@@ -274,7 +274,7 @@ gimp_layer_new_from_surface (gint32 image_ID,
layer = gimp_layer_new (image_ID, name, width, height,
format == CAIRO_FORMAT_RGB24 ?
GIMP_RGB_IMAGE : GIMP_RGBA_IMAGE,
- 100.0, GIMP_NORMAL_MODE);
+ 100.0, GIMP_LAYER_MODE_NORMAL);
if (layer == -1)
return -1;
diff --git a/libgimp/gimplayer.h b/libgimp/gimplayer.h
index 1c9a308..f80b947 100644
--- a/libgimp/gimplayer.h
+++ b/libgimp/gimplayer.h
@@ -30,33 +30,33 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-gint32 gimp_layer_new (gint32 image_ID,
- const gchar *name,
- gint width,
- gint height,
- GimpImageType type,
- gdouble opacity,
- GimpLayerModeEffects mode);
-gint32 gimp_layer_copy (gint32 layer_ID);
-
-gint32 gimp_layer_new_from_pixbuf (gint32 image_ID,
- const gchar *name,
- GdkPixbuf *pixbuf,
- gdouble opacity,
- GimpLayerModeEffects mode,
- gdouble progress_start,
- gdouble progress_end);
-gint32 gimp_layer_new_from_surface (gint32 image_ID,
- const gchar *name,
- cairo_surface_t *surface,
- gdouble progress_start,
- gdouble progress_end);
+gint32 gimp_layer_new (gint32 image_ID,
+ const gchar *name,
+ gint width,
+ gint height,
+ GimpImageType type,
+ gdouble opacity,
+ GimpLayerMode mode);
+gint32 gimp_layer_copy (gint32 layer_ID);
+
+gint32 gimp_layer_new_from_pixbuf (gint32 image_ID,
+ const gchar *name,
+ GdkPixbuf *pixbuf,
+ gdouble opacity,
+ GimpLayerMode mode,
+ gdouble progress_start,
+ gdouble progress_end);
+gint32 gimp_layer_new_from_surface (gint32 image_ID,
+ const gchar *name,
+ cairo_surface_t *surface,
+ gdouble progress_start,
+ gdouble progress_end);
GIMP_DEPRECATED_FOR(gimp_layer_get_lock_alpha)
-gboolean gimp_layer_get_preserve_trans (gint32 layer_ID);
+gboolean gimp_layer_get_preserve_trans (gint32 layer_ID);
GIMP_DEPRECATED_FOR(gimp_layer_set_lock_alpha)
-gboolean gimp_layer_set_preserve_trans (gint32 layer_ID,
- gboolean preserve_trans);
+gboolean gimp_layer_set_preserve_trans (gint32 layer_ID,
+ gboolean preserve_trans);
G_END_DECLS
diff --git a/libgimp/gimplayer_pdb.c b/libgimp/gimplayer_pdb.c
index d251faf..dce0dcf 100644
--- a/libgimp/gimplayer_pdb.c
+++ b/libgimp/gimplayer_pdb.c
@@ -56,13 +56,13 @@
* Returns: The newly created layer.
**/
gint32
-_gimp_layer_new (gint32 image_ID,
- gint width,
- gint height,
- GimpImageType type,
- const gchar *name,
- gdouble opacity,
- GimpLayerModeEffects mode)
+_gimp_layer_new (gint32 image_ID,
+ gint width,
+ gint height,
+ GimpImageType type,
+ const gchar *name,
+ gdouble opacity,
+ GimpLayerMode mode)
{
GimpParam *return_vals;
gint nreturn_vals;
@@ -1101,12 +1101,12 @@ gimp_layer_set_opacity (gint32 layer_ID,
*
* Returns: The layer combination mode.
**/
-GimpLayerModeEffects
+GimpLayerMode
gimp_layer_get_mode (gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
- GimpLayerModeEffects mode = 0;
+ GimpLayerMode mode = 0;
return_vals = gimp_run_procedure ("gimp-layer-get-mode",
&nreturn_vals,
@@ -1133,8 +1133,8 @@ gimp_layer_get_mode (gint32 layer_ID)
* Returns: TRUE on success.
**/
gboolean
-gimp_layer_set_mode (gint32 layer_ID,
- GimpLayerModeEffects mode)
+gimp_layer_set_mode (gint32 layer_ID,
+ GimpLayerMode mode)
{
GimpParam *return_vals;
gint nreturn_vals;
diff --git a/libgimp/gimplayer_pdb.h b/libgimp/gimplayer_pdb.h
index 88bfe69..d5a8fef 100644
--- a/libgimp/gimplayer_pdb.h
+++ b/libgimp/gimplayer_pdb.h
@@ -38,7 +38,7 @@ G_GNUC_INTERNAL gint32 _gimp_layer_new (gint32 i
GimpImageType type,
const gchar *name,
gdouble opacity,
- GimpLayerModeEffects mode);
+ GimpLayerMode mode);
gint32 gimp_layer_new_from_visible (gint32 image_ID,
gint32 dest_image_ID,
const gchar *name);
@@ -95,9 +95,9 @@ gboolean gimp_layer_set_edit_mask (gint32 l
gdouble gimp_layer_get_opacity (gint32 layer_ID);
gboolean gimp_layer_set_opacity (gint32 layer_ID,
gdouble opacity);
-GimpLayerModeEffects gimp_layer_get_mode (gint32 layer_ID);
+GimpLayerMode gimp_layer_get_mode (gint32 layer_ID);
gboolean gimp_layer_set_mode (gint32 layer_ID,
- GimpLayerModeEffects mode);
+ GimpLayerMode mode);
G_END_DECLS
diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def
index 5897ed8..b13a4a7 100644
--- a/libgimpbase/gimpbase.def
+++ b/libgimpbase/gimpbase.def
@@ -60,6 +60,7 @@ EXPORTS
gimp_installation_directory
gimp_interpolation_type_get_type
gimp_join_style_get_type
+ gimp_layer_mode_effects_get_type
gimp_locale_directory
gimp_locale_directory_file
gimp_major_version
diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c
index e67923c..cd2191d 100644
--- a/libgimpbase/gimpbaseenums.c
+++ b/libgimpbase/gimpbaseenums.c
@@ -1021,6 +1021,78 @@ gimp_join_style_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" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_NORMAL_MODE, "GIMP_NORMAL_MODE", NULL },
+ { GIMP_DISSOLVE_MODE, "GIMP_DISSOLVE_MODE", NULL },
+ { GIMP_BEHIND_MODE, "GIMP_BEHIND_MODE", NULL },
+ { GIMP_MULTIPLY_MODE, "GIMP_MULTIPLY_MODE", NULL },
+ { GIMP_SCREEN_MODE, "GIMP_SCREEN_MODE", NULL },
+ { GIMP_OVERLAY_MODE, "GIMP_OVERLAY_MODE", NULL },
+ { GIMP_DIFFERENCE_MODE, "GIMP_DIFFERENCE_MODE", NULL },
+ { GIMP_ADDITION_MODE, "GIMP_ADDITION_MODE", NULL },
+ { GIMP_SUBTRACT_MODE, "GIMP_SUBTRACT_MODE", NULL },
+ { GIMP_DARKEN_ONLY_MODE, "GIMP_DARKEN_ONLY_MODE", NULL },
+ { GIMP_LIGHTEN_ONLY_MODE, "GIMP_LIGHTEN_ONLY_MODE", NULL },
+ { GIMP_HUE_MODE, "GIMP_HUE_MODE", NULL },
+ { GIMP_SATURATION_MODE, "GIMP_SATURATION_MODE", NULL },
+ { GIMP_COLOR_MODE, "GIMP_COLOR_MODE", NULL },
+ { GIMP_VALUE_MODE, "GIMP_VALUE_MODE", NULL },
+ { GIMP_DIVIDE_MODE, "GIMP_DIVIDE_MODE", NULL },
+ { GIMP_DODGE_MODE, "GIMP_DODGE_MODE", NULL },
+ { GIMP_BURN_MODE, "GIMP_BURN_MODE", NULL },
+ { GIMP_HARDLIGHT_MODE, "GIMP_HARDLIGHT_MODE", NULL },
+ { GIMP_SOFTLIGHT_MODE, "GIMP_SOFTLIGHT_MODE", NULL },
+ { GIMP_GRAIN_EXTRACT_MODE, "GIMP_GRAIN_EXTRACT_MODE", NULL },
+ { GIMP_GRAIN_MERGE_MODE, "GIMP_GRAIN_MERGE_MODE", NULL },
+ { GIMP_COLOR_ERASE_MODE, "GIMP_COLOR_ERASE_MODE", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpLayerModeEffects", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "layer-mode-effects");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
gimp_mask_apply_mode_get_type (void)
{
static const GEnumValue values[] =
diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h
index 32e97d6..d6fa70b 100644
--- a/libgimpbase/gimpbaseenums.h
+++ b/libgimpbase/gimpbaseenums.h
@@ -483,6 +483,40 @@ typedef enum
} GimpJoinStyle;
+#ifndef GIMP_DISABLE_DEPRECATED
+#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 /*< pdb-skip >*/
+{
+ 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
+} GimpLayerModeEffects;
+#endif /* GIMP_DISABLE_DEPRECATED */
+
+
#define GIMP_TYPE_MASK_APPLY_MODE (gimp_mask_apply_mode_get_type ())
GType gimp_mask_apply_mode_get_type (void) G_GNUC_CONST;
diff --git a/plug-ins/common/animation-optimize.c b/plug-ins/common/animation-optimize.c
index ab598b8..9131f44 100644
--- a/plug-ins/common/animation-optimize.c
+++ b/plug-ins/common/animation-optimize.c
@@ -642,7 +642,7 @@ do_optimizations (GimpRunMode run_mode,
width, height,
drawabletype_alpha,
100.0,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (new_image_id, new_layer_id, -1, 0);
@@ -1065,7 +1065,7 @@ do_optimizations (GimpRunMode run_mode,
bbox_bottom-bbox_top,
drawabletype_alpha,
100.0,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
g_free (newlayer_name);
gimp_image_insert_layer (new_image_id, new_layer_id, -1, 0);
diff --git a/plug-ins/common/compose.c b/plug-ins/common/compose.c
index 1cdb501..917d1cb 100644
--- a/plug-ins/common/compose.c
+++ b/plug-ins/common/compose.c
@@ -1020,7 +1020,8 @@ create_new_image (const gchar *filename,
gimp_image_set_filename (image_ID, filename);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
- gdtype, 100, GIMP_NORMAL_MODE);
+ gdtype,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
*buffer = gimp_drawable_get_buffer (*layer_ID);
diff --git a/plug-ins/common/curve-bend.c b/plug-ins/common/curve-bend.c
index 005e5a6..14bf50b 100644
--- a/plug-ins/common/curve-bend.c
+++ b/plug-ins/common/curve-bend.c
@@ -2753,7 +2753,7 @@ p_add_layer (gint width,
char *l_name;
char *l_name2;
gdouble l_opacity;
- GimpLayerModeEffects l_mode;
+ GimpLayerMode l_mode;
gint l_visible;
gint32 image_id;
gint stack_position;
diff --git a/plug-ins/common/decompose.c b/plug-ins/common/decompose.c
index fe658ac..e1531bd 100644
--- a/plug-ins/common/decompose.c
+++ b/plug-ins/common/decompose.c
@@ -607,7 +607,8 @@ create_new_layer (gint32 image_ID,
layername = _("Background");
layer_ID = gimp_layer_new (image_ID, layername, width, height,
- gdtype, 100, GIMP_NORMAL_MODE);
+ gdtype,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, position);
return layer_ID;
diff --git a/plug-ins/common/edge-dog.c b/plug-ins/common/edge-dog.c
index fd75cad..2b65ccd 100644
--- a/plug-ins/common/edge-dog.c
+++ b/plug-ins/common/edge-dog.c
@@ -993,7 +993,7 @@ preview_update_preview (GimpPreview *preview,
preview_id = gimp_layer_new (image_id, "preview", width, height,
gimp_drawable_type (drawable->drawable_id),
100,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
preview_drawable = gimp_drawable_get (preview_id);
gimp_image_insert_layer (image_id, preview_id, -1, 0);
gimp_layer_set_offsets (preview_id, 0, 0);
diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c
index 284dc9e..7fb320f 100644
--- a/plug-ins/common/file-cel.c
+++ b/plug-ins/common/file-cel.c
@@ -439,10 +439,12 @@ load_image (const gchar *file,
/* Create an indexed-alpha layer to hold the image... */
if (bpp == 32)
layer = gimp_layer_new (image, _("Background"), width, height,
- GIMP_RGBA_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_RGBA_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
else
layer = gimp_layer_new (image, _("Background"), width, height,
- GIMP_INDEXEDA_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_INDEXEDA_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image, layer, -1, 0);
gimp_layer_set_offsets (layer, offx, offy);
diff --git a/plug-ins/common/file-dicom.c b/plug-ins/common/file-dicom.c
index 49c501f..adabf80 100644
--- a/plug-ins/common/file-dicom.c
+++ b/plug-ins/common/file-dicom.c
@@ -612,7 +612,7 @@ load_image (const gchar *filename,
dicominfo->width, dicominfo->height,
(dicominfo->samples_per_pixel >= 3 ?
GIMP_RGB_IMAGE : GIMP_GRAY_IMAGE),
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c
index eccde9c..99d4702 100644
--- a/plug-ins/common/file-gbr.c
+++ b/plug-ins/common/file-gbr.c
@@ -621,7 +621,8 @@ load_image (GFile *file,
gimp_parasite_free (parasite);
layer_ID = gimp_layer_new (image_ID, name, bh.width, bh.height,
- image_type, 100, GIMP_NORMAL_MODE);
+ image_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
g_free (name);
diff --git a/plug-ins/common/file-gegl.c b/plug-ins/common/file-gegl.c
index 706c6e4..e604fe4 100644
--- a/plug-ins/common/file-gegl.c
+++ b/plug-ins/common/file-gegl.c
@@ -413,7 +413,8 @@ load_image (const gchar *filename,
layer_ID = gimp_layer_new (image_ID,
_("Background"),
width, height,
- image_type, 100, GIMP_NORMAL_MODE);
+ image_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
dest_buf = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-gif-load.c b/plug-ins/common/file-gif-load.c
index d6717fc..18ff925 100644
--- a/plug-ins/common/file-gif-load.c
+++ b/plug-ins/common/file-gif-load.c
@@ -988,13 +988,15 @@ ReadImage (FILE *fd,
{
layer_ID = gimp_layer_new (*image_ID, framename,
len, height,
- GIMP_INDEXED_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_INDEXED_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
}
else
{
layer_ID = gimp_layer_new (*image_ID, framename,
len, height,
- GIMP_INDEXEDA_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_INDEXEDA_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
alpha_frame=TRUE;
}
@@ -1079,7 +1081,7 @@ ReadImage (FILE *fd,
len, height,
promote_to_rgb ?
GIMP_RGBA_IMAGE : GIMP_INDEXEDA_IMAGE,
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
alpha_frame = TRUE;
g_free (framename);
}
diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c
index 968fa2b..82ecc0c 100644
--- a/plug-ins/common/file-gih.c
+++ b/plug-ins/common/file-gih.c
@@ -618,7 +618,8 @@ gih_load_one_brush (GInputStream *input,
layer_ID = gimp_layer_new (image_ID, name,
bh.width, bh.height,
- image_type, 100, GIMP_NORMAL_MODE);
+ image_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
g_free (name);
if (layer_ID != -1)
diff --git a/plug-ins/common/file-jp2-load.c b/plug-ins/common/file-jp2-load.c
index 0facb3c..b9ab329 100644
--- a/plug-ins/common/file-jp2-load.c
+++ b/plug-ins/common/file-jp2-load.c
@@ -394,7 +394,8 @@ load_image (const gchar *filename,
layer_ID = gimp_layer_new (image_ID,
_("Background"),
width, height,
- image_type, 100, GIMP_NORMAL_MODE);
+ image_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c
index 2d718fa..7c3f2b9 100644
--- a/plug-ins/common/file-pat.c
+++ b/plug-ins/common/file-pat.c
@@ -440,7 +440,8 @@ load_image (GFile *file,
gimp_parasite_free (parasite);
layer_ID = gimp_layer_new (image_ID, name, ph.width, ph.height,
- image_type, 100, GIMP_NORMAL_MODE);
+ image_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
g_free (name);
diff --git a/plug-ins/common/file-pcx.c b/plug-ins/common/file-pcx.c
index 531ef5d..a9f5fe7 100644
--- a/plug-ins/common/file-pcx.c
+++ b/plug-ins/common/file-pcx.c
@@ -435,13 +435,15 @@ load_image (const gchar *filename,
{
image= gimp_image_new (width, height, GIMP_RGB);
layer= gimp_layer_new (image, _("Background"), width, height,
- GIMP_RGB_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_RGB_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
}
else
{
image= gimp_image_new (width, height, GIMP_INDEXED);
layer= gimp_layer_new (image, _("Background"), width, height,
- GIMP_INDEXED_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_INDEXED_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
}
gimp_image_set_filename (image, filename);
diff --git a/plug-ins/common/file-pix.c b/plug-ins/common/file-pix.c
index 0e9940e..98d038b 100644
--- a/plug-ins/common/file-pix.c
+++ b/plug-ins/common/file-pix.c
@@ -398,9 +398,9 @@ load_image (GFile *file,
gimp_image_set_filename (image_ID, g_file_get_uri (file));
layer_ID = gimp_layer_new (image_ID, _("Background"),
- width,
- height,
- gdtype, 100, GIMP_NORMAL_MODE);
+ width, height,
+ gdtype,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index 6efb7f1..7aa5466 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -1048,7 +1048,8 @@ load_image (const gchar *filename,
*/
layer = gimp_layer_new (image, _("Background"), width, height,
- layer_type, 100, GIMP_NORMAL_MODE);
+ layer_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image, layer, -1, 0);
file_format = gimp_drawable_get_format (layer);
diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c
index 12bd34a..9038e2b 100644
--- a/plug-ins/common/file-pnm.c
+++ b/plug-ins/common/file-pnm.c
@@ -672,7 +672,7 @@ load_image (GFile *file,
pnminfo->xres, pnminfo->yres,
(pnminfo->np >= 3 ?
GIMP_RGB_IMAGE : GIMP_GRAY_IMAGE),
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-ps.c b/plug-ins/common/file-ps.c
index c3393a7..2f17dbb 100644
--- a/plug-ins/common/file-ps.c
+++ b/plug-ins/common/file-ps.c
@@ -1914,7 +1914,8 @@ create_new_image (const gchar *filename,
tmp = g_strdup_printf (_("Page %d"), pagenum);
*layer_ID = gimp_layer_new (image_ID, tmp, width, height,
- gdtype, 100, GIMP_NORMAL_MODE);
+ gdtype,
+ 100, GIMP_LAYER_MODE_NORMAL);
g_free (tmp);
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
diff --git a/plug-ins/common/file-psp.c b/plug-ins/common/file-psp.c
index 87a9762..82a97e1 100644
--- a/plug-ins/common/file-psp.c
+++ b/plug-ins/common/file-psp.c
@@ -986,53 +986,74 @@ swab_rect (guint32 *rect)
rect[3] = GUINT32_FROM_LE (rect[3]);
}
-static GimpLayerModeEffects
+static GimpLayerMode
gimp_layer_mode_from_psp_blend_mode (PSPBlendModes mode)
{
switch (mode)
{
case PSP_BLEND_NORMAL:
- return GIMP_NORMAL_MODE;
+ return GIMP_LAYER_MODE_NORMAL;
+
case PSP_BLEND_DARKEN:
- return GIMP_DARKEN_ONLY_MODE;
+ return GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN;
+
case PSP_BLEND_LIGHTEN:
- return GIMP_LIGHTEN_ONLY_MODE;
+ return GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN;
+
case PSP_BLEND_HUE:
- return GIMP_HUE_MODE;
+ return GIMP_LAYER_MODE_HSV_HUE_BROKEN;
+
case PSP_BLEND_SATURATION:
- return GIMP_SATURATION_MODE;
+ return GIMP_LAYER_MODE_HSV_SATURATION_BROKEN;
+
case PSP_BLEND_COLOR:
- return GIMP_COLOR_MODE;
+ return GIMP_LAYER_MODE_HSV_COLOR_BROKEN;
+
case PSP_BLEND_LUMINOSITY:
- return GIMP_VALUE_MODE; /* ??? */
+ return GIMP_LAYER_MODE_HSV_VALUE_BROKEN; /* ??? */
+
case PSP_BLEND_MULTIPLY:
- return GIMP_MULTIPLY_MODE;
+ return GIMP_LAYER_MODE_MULTIPLY_BROKEN;
+
case PSP_BLEND_SCREEN:
- return GIMP_SCREEN_MODE;
+ return GIMP_LAYER_MODE_SCREEN_BROKEN;
+
case PSP_BLEND_DISSOLVE:
- return GIMP_DISSOLVE_MODE;
+ return GIMP_LAYER_MODE_DISSOLVE;
+
case PSP_BLEND_OVERLAY:
- return GIMP_NEW_OVERLAY_MODE;
+ return GIMP_LAYER_MODE_OVERLAY;
+
case PSP_BLEND_HARD_LIGHT:
- return GIMP_HARDLIGHT_MODE;
+ return GIMP_LAYER_MODE_HARDLIGHT_BROKEN;
+
case PSP_BLEND_SOFT_LIGHT:
- return GIMP_SOFTLIGHT_MODE;
+ return GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
+
case PSP_BLEND_DIFFERENCE:
- return GIMP_DIFFERENCE_MODE;
+ return GIMP_LAYER_MODE_DIFFERENCE_BROKEN;
+
case PSP_BLEND_DODGE:
- return GIMP_DODGE_MODE;
+ return GIMP_LAYER_MODE_DODGE_BROKEN;
+
case PSP_BLEND_BURN:
- return GIMP_BURN_MODE;
+ return GIMP_LAYER_MODE_BURN_BROKEN;
+
case PSP_BLEND_EXCLUSION:
return -1; /* ??? */
+
case PSP_BLEND_ADJUST:
return -1; /* ??? */
+
case PSP_BLEND_TRUE_HUE:
return -1; /* ??? */
+
case PSP_BLEND_TRUE_SATURATION:
return -1; /* ??? */
+
case PSP_BLEND_TRUE_COLOR:
return -1; /* ??? */
+
case PSP_BLEND_TRUE_LIGHTNESS:
return -1; /* ??? */
}
@@ -1299,7 +1320,7 @@ read_layer_block (FILE *f,
guint16 bitmap_count, channel_count;
GimpImageType drawable_type;
guint32 layer_ID = 0;
- GimpLayerModeEffects layer_mode;
+ GimpLayerMode layer_mode;
guint32 channel_init_len, channel_total_len;
guint32 compressed_len, uncompressed_len;
guint16 bitmap_type, channel_type;
@@ -1401,7 +1422,7 @@ read_layer_block (FILE *f,
g_message ("Unsupported PSP layer blend mode %s "
"for layer %s, setting layer invisible",
blend_mode_name (blend_mode), name);
- layer_mode = GIMP_NORMAL_MODE;
+ layer_mode = GIMP_LAYER_MODE_NORMAL;
visibility = FALSE;
}
diff --git a/plug-ins/common/file-raw-data.c b/plug-ins/common/file-raw-data.c
index 779a79c..a8eaf6c 100644
--- a/plug-ins/common/file-raw-data.c
+++ b/plug-ins/common/file-raw-data.c
@@ -1160,8 +1160,9 @@ load_image (const gchar *filename,
itype);
gimp_image_set_filename(data->image_id, filename);
layer_id = gimp_layer_new (data->image_id, _("Background"),
- runtime->image_width, runtime->image_height, ltype,
- 100, GIMP_NORMAL_MODE);
+ runtime->image_width, runtime->image_height,
+ ltype,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (data->image_id, layer_id, -1, 0);
data->buffer = gimp_drawable_get_buffer (layer_id);
diff --git a/plug-ins/common/file-sunras.c b/plug-ins/common/file-sunras.c
index c7f8cd8..b8a3ff6 100644
--- a/plug-ins/common/file-sunras.c
+++ b/plug-ins/common/file-sunras.c
@@ -1047,7 +1047,8 @@ create_new_image (const gchar *filename,
gimp_image_set_filename (image_ID, filename);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
- gdtype, 100, GIMP_NORMAL_MODE);
+ gdtype,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
*buffer = gimp_drawable_get_buffer (*layer_ID);
diff --git a/plug-ins/common/file-svg.c b/plug-ins/common/file-svg.c
index ceca7a4..f001fa9 100644
--- a/plug-ins/common/file-svg.c
+++ b/plug-ins/common/file-svg.c
@@ -347,7 +347,8 @@ load_image (const gchar *filename,
load_vals.resolution, load_vals.resolution);
layer = gimp_layer_new_from_pixbuf (image, _("Rendered SVG"), pixbuf,
- 100, GIMP_NORMAL_MODE, 0.0, 1.0);
+ 100, GIMP_LAYER_MODE_NORMAL,
+ 0.0, 1.0);
gimp_image_insert_layer (image, layer, -1, 0);
gimp_image_undo_enable (image);
diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c
index f55168d..f6a20cd 100644
--- a/plug-ins/common/file-tga.c
+++ b/plug-ins/common/file-tga.c
@@ -1091,8 +1091,8 @@ ReadImage (FILE *fp,
layer_ID = gimp_layer_new (image_ID,
_("Background"),
info->width, info->height,
- dtype, 100,
- GIMP_NORMAL_MODE);
+ dtype,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
diff --git a/plug-ins/common/file-wmf.c b/plug-ins/common/file-wmf.c
index a4d5c9e..af27d18 100644
--- a/plug-ins/common/file-wmf.c
+++ b/plug-ins/common/file-wmf.c
@@ -997,7 +997,8 @@ load_image (const gchar *filename,
layer = gimp_layer_new (image,
_("Rendered WMF"),
width, height,
- GIMP_RGBA_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_RGBA_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
buffer = gimp_drawable_get_buffer (layer);
diff --git a/plug-ins/common/file-xbm.c b/plug-ins/common/file-xbm.c
index be0c2d7..7b84487 100644
--- a/plug-ins/common/file-xbm.c
+++ b/plug-ins/common/file-xbm.c
@@ -905,7 +905,7 @@ load_image (const gchar *filename,
width, height,
GIMP_INDEXED_IMAGE,
100,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c
index 43543c0..eec964d 100644
--- a/plug-ins/common/file-xmc.c
+++ b/plug-ins/common/file-xmc.c
@@ -727,7 +727,8 @@ load_image (const gchar *filename,
return -1;
layer_ID = gimp_layer_new (image_ID, framename, width, height,
- GIMP_RGBA_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_RGBA_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
/* Adjust layer position to let hotspot sit on the same point. */
@@ -950,8 +951,8 @@ load_thumbnail (const gchar *filename,
image_ID = gimp_image_new (width, height, GIMP_RGB);
layer_ID = gimp_layer_new (image_ID, NULL, width, height,
- GIMP_RGBA_IMAGE, 100,
- GIMP_NORMAL_MODE);
+ GIMP_RGBA_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
diff --git a/plug-ins/common/file-xpm.c b/plug-ins/common/file-xpm.c
index 85e6a30..8664c5c 100644
--- a/plug-ins/common/file-xpm.c
+++ b/plug-ins/common/file-xpm.c
@@ -482,7 +482,7 @@ parse_image (gint32 image_ID,
xpm_image->height,
GIMP_RGBA_IMAGE,
100,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c
index 203a497..39f851b 100644
--- a/plug-ins/common/file-xwd.c
+++ b/plug-ins/common/file-xwd.c
@@ -1271,7 +1271,8 @@ create_new_image (const gchar *filename,
gimp_image_set_filename (image_ID, filename);
*layer_ID = gimp_layer_new (image_ID, "Background", width, height,
- gdtype, 100, GIMP_NORMAL_MODE);
+ gdtype,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
*buffer = gimp_drawable_get_buffer (*layer_ID);
diff --git a/plug-ins/common/film.c b/plug-ins/common/film.c
index 2a1928e..7bb20bc 100644
--- a/plug-ins/common/film.c
+++ b/plug-ins/common/film.c
@@ -743,7 +743,8 @@ create_new_image (const gchar *filename,
gimp_image_undo_disable (image_ID);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
- gdtype, 100, GIMP_NORMAL_MODE);
+ gdtype,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
if (drawable)
diff --git a/plug-ins/common/hot.c b/plug-ins/common/hot.c
index 7c3d62e..a3c0f4c 100644
--- a/plug-ins/common/hot.c
+++ b/plug-ins/common/hot.c
@@ -349,7 +349,8 @@ pluginCore (piArgs *argp)
action_names[argp->action]);
nl = gimp_layer_new (argp->image, name, width, height,
- GIMP_RGBA_IMAGE, (gdouble)100, GIMP_NORMAL_MODE);
+ GIMP_RGBA_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
ndrw = gimp_drawable_get (nl);
gimp_drawable_fill (nl, GIMP_FILL_TRANSPARENT);
gimp_image_insert_layer (argp->image, nl, -1, 0);
diff --git a/plug-ins/common/smooth-palette.c b/plug-ins/common/smooth-palette.c
index 59226bc..77d6197 100644
--- a/plug-ins/common/smooth-palette.c
+++ b/plug-ins/common/smooth-palette.c
@@ -258,7 +258,7 @@ smooth_palette (gint32 drawable_id,
*layer_id = gimp_layer_new (new_image_id, _("Background"),
config.width, config.height,
gimp_drawable_type (drawable_id),
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (new_image_id, *layer_id, -1, 0);
diff --git a/plug-ins/common/tile.c b/plug-ins/common/tile.c
index a4c1e56..05ccbf0 100644
--- a/plug-ins/common/tile.c
+++ b/plug-ins/common/tile.c
@@ -354,7 +354,7 @@ tile (gint32 image_id,
*new_layer_id = gimp_layer_new (*new_image_id, _("Background"),
dst_width, dst_height,
gimp_drawable_type (drawable_id),
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
if (*new_layer_id == -1)
return;
diff --git a/plug-ins/common/warp.c b/plug-ins/common/warp.c
index 49be022..1c81f2b 100644
--- a/plug-ins/common/warp.c
+++ b/plug-ins/common/warp.c
@@ -940,11 +940,13 @@ diff (GimpDrawable *drawable,
xlayer_id = gimp_layer_new (new_image_id, "Warp_X_Vectors",
width, height,
- GIMP_RGB_IMAGE, 100.0, GIMP_NORMAL_MODE);
+ GIMP_RGB_IMAGE,
+ 100.0, GIMP_LAYER_MODE_NORMAL);
ylayer_id = gimp_layer_new (new_image_id, "Warp_Y_Vectors",
width, height,
- GIMP_RGB_IMAGE, 100.0, GIMP_NORMAL_MODE);
+ GIMP_RGB_IMAGE,
+ 100.0, GIMP_LAYER_MODE_NORMAL);
draw_yd = gimp_drawable_get (ylayer_id);
draw_xd = gimp_drawable_get (xlayer_id);
diff --git a/plug-ins/common/web-page.c b/plug-ins/common/web-page.c
index 9aa140e..e401f08 100644
--- a/plug-ins/common/web-page.c
+++ b/plug-ins/common/web-page.c
@@ -533,7 +533,8 @@ webpage_capture (void)
gimp_image_undo_disable (image);
layer = gimp_layer_new_from_pixbuf (image, _("Webpage"), webpagevals.pixbuf,
- 100, GIMP_NORMAL_MODE, 0.0, 1.0);
+ 100, GIMP_LAYER_MODE_NORMAL,
+ 0.0, 1.0);
gimp_image_insert_layer (image, layer, -1, 0);
gimp_image_undo_enable (image);
diff --git a/plug-ins/file-bmp/bmp-load.c b/plug-ins/file-bmp/bmp-load.c
index 723bf86..49add48 100644
--- a/plug-ins/file-bmp/bmp-load.c
+++ b/plug-ins/file-bmp/bmp-load.c
@@ -733,7 +733,7 @@ ReadImage (FILE *fd,
image = gimp_image_new (width, height, base_type);
layer = gimp_layer_new (image, _("Background"),
width, height,
- image_type, 100, GIMP_NORMAL_MODE);
+ image_type, 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_set_filename (image, filename);
diff --git a/plug-ins/file-exr/file-exr.c b/plug-ins/file-exr/file-exr.c
index 135a3c0..ab0da22 100644
--- a/plug-ins/file-exr/file-exr.c
+++ b/plug-ins/file-exr/file-exr.c
@@ -256,7 +256,7 @@ load_image (const gchar *filename,
gimp_image_set_filename (image, filename);
layer = gimp_layer_new (image, _("Background"), width, height,
- layer_type, 100, GIMP_NORMAL_MODE);
+ layer_type, 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image, layer, -1, 0);
buffer = gimp_drawable_get_buffer (layer);
diff --git a/plug-ins/file-faxg3/faxg3.c b/plug-ins/file-faxg3/faxg3.c
index daf3152..d95dbcb 100644
--- a/plug-ins/file-faxg3/faxg3.c
+++ b/plug-ins/file-faxg3/faxg3.c
@@ -525,7 +525,7 @@ emitgimp (gint hcol,
layer_ID = gimp_layer_new (image_ID, _("Background"),
hcol,
row,
- GIMP_GRAY_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_GRAY_IMAGE, 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/file-fits/fits.c b/plug-ins/file-fits/fits.c
index d6b770e..0384863 100644
--- a/plug-ins/file-fits/fits.c
+++ b/plug-ins/file-fits/fits.c
@@ -527,7 +527,7 @@ create_new_image (const gchar *filename,
gimp_image_undo_disable (image_ID);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
- dtype, 100, GIMP_NORMAL_MODE);
+ dtype, 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
*buffer = gimp_drawable_get_buffer (*layer_ID);
diff --git a/plug-ins/file-fli/fli-gimp.c b/plug-ins/file-fli/fli-gimp.c
index c73e428..a78b0a4 100644
--- a/plug-ins/file-fli/fli-gimp.c
+++ b/plug-ins/file-fli/fli-gimp.c
@@ -564,7 +564,8 @@ load_image (const gchar *filename,
layer_ID = gimp_layer_new (image_id, name_buf,
fli_header.width, fli_header.height,
- GIMP_INDEXED_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_INDEXED_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
g_free (name_buf);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/file-ico/ico-dialog.c b/plug-ins/file-ico/ico-dialog.c
index df92bac..ff8e486 100644
--- a/plug-ins/file-ico/ico-dialog.c
+++ b/plug-ins/file-ico/ico-dialog.c
@@ -288,7 +288,7 @@ ico_dialog_update_icon_preview (GtkWidget *dialog,
tmp_layer = gimp_layer_new (tmp_image, "temporary", w, h,
gimp_drawable_type (layer),
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (tmp_image, tmp_layer, -1, 0);
buffer = gimp_drawable_get_buffer (layer);
@@ -386,7 +386,7 @@ ico_dialog_update_icon_preview (GtkWidget *dialog,
tmp_layer = gimp_layer_new (tmp_image, "temporary", w, h,
gimp_drawable_type (layer),
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (tmp_image, tmp_layer, -1, 0);
buffer = gimp_drawable_get_buffer (layer);
diff --git a/plug-ins/file-ico/ico-load.c b/plug-ins/file-ico/ico-load.c
index 8cce94f..4db0c41 100644
--- a/plug-ins/file-ico/ico-load.c
+++ b/plug-ins/file-ico/ico-load.c
@@ -633,7 +633,8 @@ ico_load_layer (FILE *fp,
/* read successfully. add to image */
g_snprintf (name, sizeof (name), _("Icon #%i"), icon_num+1);
layer = gimp_layer_new (image, name, width, height,
- GIMP_RGBA_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_RGBA_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image, layer, -1, icon_num);
buffer = gimp_drawable_get_buffer (layer);
diff --git a/plug-ins/file-ico/ico-save.c b/plug-ins/file-ico/ico-save.c
index 26d9c62..04b6abf 100644
--- a/plug-ins/file-ico/ico-save.c
+++ b/plug-ins/file-ico/ico-save.c
@@ -628,7 +628,7 @@ ico_image_get_reduced_buf (guint32 layer,
tmp_layer = gimp_layer_new (tmp_image, "tmp", w, h,
gimp_drawable_type (layer),
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (tmp_image, tmp_layer, -1, 0);
tmp = gimp_drawable_get_buffer (tmp_layer);
diff --git a/plug-ins/file-jpeg/jpeg-load.c b/plug-ins/file-jpeg/jpeg-load.c
index 6cc945f..4386b1b 100644
--- a/plug-ins/file-jpeg/jpeg-load.c
+++ b/plug-ins/file-jpeg/jpeg-load.c
@@ -231,7 +231,8 @@ load_image (const gchar *filename,
preview_layer_ID = gimp_layer_new (preview_image_ID, _("JPEG preview"),
cinfo.output_width,
cinfo.output_height,
- layer_type, 100, GIMP_NORMAL_MODE);
+ layer_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
layer_ID = preview_layer_ID;
}
else
@@ -239,7 +240,8 @@ load_image (const gchar *filename,
layer_ID = gimp_layer_new (image_ID, _("Background"),
cinfo.output_width,
cinfo.output_height,
- layer_type, 100, GIMP_NORMAL_MODE);
+ layer_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
}
if (! preview)
diff --git a/plug-ins/file-psd/psd-image-res-load.c b/plug-ins/file-psd/psd-image-res-load.c
index fdd3375..387725d 100644
--- a/plug-ins/file-psd/psd-image-res-load.c
+++ b/plug-ins/file-psd/psd-image-res-load.c
@@ -1033,7 +1033,8 @@ load_resource_1033 (const PSDimageres *res_a,
layer_id = gimp_layer_new (image_id, _("Background"),
cinfo.output_width,
cinfo.output_height,
- GIMP_RGB_IMAGE, 100, GIMP_NORMAL_MODE);
+ GIMP_RGB_IMAGE,
+ 100, GIMP_LAYER_MODE_NORMAL);
buffer = gimp_drawable_get_buffer (layer_id);
format = babl_format ("R'G'B' u8");
diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c
index d13294b..04316d4 100644
--- a/plug-ins/file-psd/psd-load.c
+++ b/plug-ins/file-psd/psd-load.c
@@ -1141,7 +1141,7 @@ add_layers (gint32 image_id,
gboolean empty_mask;
GeglBuffer *buffer;
GimpImageType image_type;
- GimpLayerModeEffects layer_mode;
+ GimpLayerMode layer_mode;
IFDBG(2) g_debug ("Number of layers: %d", img_a->num_layers);
@@ -1427,7 +1427,8 @@ add_layers (gint32 image_id,
image_type = get_gimp_image_type (img_a->base_type, TRUE);
layer_id = gimp_layer_new (image_id, lyr_a[lidx]->name,
img_a->columns, img_a->rows,
- image_type, 0, GIMP_NORMAL_MODE);
+ image_type,
+ 0, GIMP_LAYER_MODE_NORMAL);
g_free (lyr_a[lidx]->name);
gimp_image_insert_layer (image_id, layer_id, parent_group_id, 0);
gimp_drawable_fill (layer_id, GIMP_FILL_TRANSPARENT);
@@ -1772,7 +1773,7 @@ add_merged_image (gint32 image_id,
layer_id = gimp_layer_new (image_id, _("Background"),
img_a->columns, img_a->rows,
image_type,
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_id, layer_id, -1, 0);
buffer = gimp_drawable_get_buffer (layer_id);
gegl_buffer_set (buffer,
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index 1c550f5..2fce841 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -196,57 +196,57 @@ psd_lmode_layer (gint32 idLayer,
{
switch (gimp_layer_get_mode (idLayer))
{
- case GIMP_NORMAL_MODE:
+ case GIMP_LAYER_MODE_NORMAL:
strcpy (psdMode, "norm");
break;
- case GIMP_DARKEN_ONLY_MODE:
+ case GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN:
strcpy (psdMode, "dark");
break;
- case GIMP_LIGHTEN_ONLY_MODE:
+ case GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN:
strcpy (psdMode, "lite");
break;
- case GIMP_HUE_MODE:
+ case GIMP_LAYER_MODE_HSV_HUE_BROKEN:
strcpy (psdMode, "hue ");
break;
- case GIMP_SATURATION_MODE:
+ case GIMP_LAYER_MODE_HSV_SATURATION_BROKEN:
strcpy (psdMode, "sat ");
break;
- case GIMP_COLOR_MODE:
+ case GIMP_LAYER_MODE_HSV_COLOR_BROKEN:
strcpy (psdMode, "colr");
break;
- case GIMP_ADDITION_MODE:
+ case GIMP_LAYER_MODE_ADDITION_BROKEN:
strcpy (psdMode, "lddg");
break;
- case GIMP_MULTIPLY_MODE:
+ case GIMP_LAYER_MODE_MULTIPLY_BROKEN:
strcpy (psdMode, "mul ");
break;
- case GIMP_SCREEN_MODE:
+ case GIMP_LAYER_MODE_SCREEN_BROKEN:
strcpy (psdMode, "scrn");
break;
- case GIMP_DISSOLVE_MODE:
+ case GIMP_LAYER_MODE_DISSOLVE:
strcpy (psdMode, "diss");
break;
- case GIMP_DIFFERENCE_MODE:
+ case GIMP_LAYER_MODE_DIFFERENCE_BROKEN:
strcpy (psdMode, "diff");
break;
- case GIMP_VALUE_MODE: /* ? */
+ case GIMP_LAYER_MODE_HSV_VALUE_BROKEN: /* ? */
strcpy (psdMode, "lum ");
break;
- case GIMP_HARDLIGHT_MODE:
+ case GIMP_LAYER_MODE_HARDLIGHT_BROKEN:
strcpy (psdMode, "hLit");
break;
- case GIMP_OVERLAY_MODE:
- case GIMP_SOFTLIGHT_MODE:
+ case GIMP_LAYER_MODE_OVERLAY_BROKEN:
+ case GIMP_LAYER_MODE_SOFTLIGHT_BROKEN:
strcpy (psdMode, "sLit");
break;
- case GIMP_NEW_OVERLAY_MODE:
+ case GIMP_LAYER_MODE_OVERLAY:
strcpy (psdMode, "over");
break;
default:
{
const gchar *nick = "?";
- gimp_enum_get_value (GIMP_TYPE_LAYER_MODE_EFFECTS,
+ gimp_enum_get_value (GIMP_TYPE_LAYER_MODE,
gimp_layer_get_mode (idLayer),
NULL, &nick, NULL, NULL);
diff --git a/plug-ins/file-psd/psd-util.c b/plug-ins/file-psd/psd-util.c
index 0fac559..69395e4 100644
--- a/plug-ins/file-psd/psd-util.c
+++ b/plug-ins/file-psd/psd-util.c
@@ -35,7 +35,7 @@
#define MIN_RUN 3
/* Local function prototypes */
-static gchar * gimp_layer_mode_effects_name (GimpLayerModeEffects mode);
+static gchar * gimp_layer_mode_effects_name (GimpLayerMode mode);
/* Utility function */
@@ -605,17 +605,17 @@ encode_packbits (const gchar *src,
return g_string_free (dst_str, FALSE);
}
-GimpLayerModeEffects
+GimpLayerMode
psd_to_gimp_blend_mode (const gchar *psd_mode)
{
if (g_ascii_strncasecmp (psd_mode, "norm", 4) == 0) /* Normal (ps3) */
- return GIMP_NORMAL_MODE;
+ return GIMP_LAYER_MODE_NORMAL;
if (g_ascii_strncasecmp (psd_mode, "dark", 4) == 0) /* Darken (ps3) */
- return GIMP_DARKEN_ONLY_MODE;
+ return GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "lite", 4) == 0) /* Lighten (ps3) */
- return GIMP_LIGHTEN_ONLY_MODE;
+ return GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "hue ", 4) == 0) /* Hue (ps3) */
- return GIMP_HUE_MODE;
+ return GIMP_LAYER_MODE_HSV_HUE_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "sat ", 4) == 0) /* Saturation (ps3) */
{
if (CONVERSION_WARNINGS)
@@ -625,10 +625,10 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
"blend mode: %s. Results will differ.",
mode_name);
}
- return GIMP_SATURATION_MODE;
+ return GIMP_LAYER_MODE_HSV_SATURATION_BROKEN;
}
if (g_ascii_strncasecmp (psd_mode, "colr", 4) == 0) /* Color (ps3) */
- return GIMP_COLOR_MODE;
+ return GIMP_LAYER_MODE_HSV_COLOR_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "lum ", 4) == 0) /* Luminosity (ps3) */
{
if (CONVERSION_WARNINGS)
@@ -638,20 +638,20 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
"blend mode: %s. Results will differ.",
mode_name);
}
- return GIMP_VALUE_MODE;
+ return GIMP_LAYER_MODE_HSV_VALUE_BROKEN;
}
if (g_ascii_strncasecmp (psd_mode, "mul ", 4) == 0) /* Multiply (ps3) */
- return GIMP_MULTIPLY_MODE;
+ return GIMP_LAYER_MODE_MULTIPLY_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "lddg", 4) == 0) /* Linear Dodge (cs2) */
- return GIMP_ADDITION_MODE;
+ return GIMP_LAYER_MODE_ADDITION_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "scrn", 4) == 0) /* Screen (ps3) */
- return GIMP_SCREEN_MODE;
+ return GIMP_LAYER_MODE_SCREEN_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "diss", 4) == 0) /* Dissolve (ps3) */
- return GIMP_DISSOLVE_MODE;
+ return GIMP_LAYER_MODE_DISSOLVE;
if (g_ascii_strncasecmp (psd_mode, "over", 4) == 0) /* Overlay (ps3) */
- return GIMP_NEW_OVERLAY_MODE;
+ return GIMP_LAYER_MODE_OVERLAY;
if (g_ascii_strncasecmp (psd_mode, "hLit", 4) == 0) /* Hard light (ps3) */
- return GIMP_HARDLIGHT_MODE;
+ return GIMP_LAYER_MODE_HARDLIGHT_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "sLit", 4) == 0) /* Soft light (ps3) */
{
if (CONVERSION_WARNINGS)
@@ -661,10 +661,10 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
"blend mode: %s. Results will differ.",
mode_name);
}
- return GIMP_SOFTLIGHT_MODE;
+ return GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
}
if (g_ascii_strncasecmp (psd_mode, "diff", 4) == 0) /* Difference (ps3) */
- return GIMP_DIFFERENCE_MODE;
+ return GIMP_LAYER_MODE_DIFFERENCE_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "smud", 4) == 0) /* Exclusion (ps6) */
{
if (CONVERSION_WARNINGS)
@@ -673,12 +673,12 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
mode_name);
}
- return GIMP_NORMAL_MODE;
+ return GIMP_LAYER_MODE_NORMAL;
}
if (g_ascii_strncasecmp (psd_mode, "div ", 4) == 0) /* Color dodge (ps6) */
- return GIMP_DODGE_MODE;
+ return GIMP_LAYER_MODE_DODGE_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "idiv", 4) == 0) /* Color burn (ps6) */
- return GIMP_BURN_MODE;
+ return GIMP_LAYER_MODE_BURN_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "lbrn", 4) == 0) /* Linear burn (ps7)*/
{
if (CONVERSION_WARNINGS)
@@ -687,10 +687,10 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
mode_name);
}
- return GIMP_NORMAL_MODE;
+ return GIMP_LAYER_MODE_NORMAL;
}
if (g_ascii_strncasecmp (psd_mode, "lddg", 4) == 0) /* Linear dodge (ps7)*/
- return GIMP_ADDITION_MODE;
+ return GIMP_LAYER_MODE_ADDITION_BROKEN;
if (g_ascii_strncasecmp (psd_mode, "lLit", 4) == 0) /* Linear light (ps7)*/
{
if (CONVERSION_WARNINGS)
@@ -699,7 +699,7 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
mode_name);
}
- return GIMP_NORMAL_MODE;
+ return GIMP_LAYER_MODE_NORMAL;
}
if (g_ascii_strncasecmp (psd_mode, "pLit", 4) == 0) /* Pin light (ps7)*/
{
@@ -709,7 +709,7 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
mode_name);
}
- return GIMP_NORMAL_MODE;
+ return GIMP_LAYER_MODE_NORMAL;
}
if (g_ascii_strncasecmp (psd_mode, "vLit", 4) == 0) /* Vivid light (ps7)*/
{
@@ -719,7 +719,7 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
mode_name);
}
- return GIMP_NORMAL_MODE;
+ return GIMP_LAYER_MODE_NORMAL;
}
if (g_ascii_strncasecmp (psd_mode, "hMix", 4) == 0) /* Hard Mix (CS)*/
{
@@ -729,7 +729,7 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
mode_name);
}
- return GIMP_NORMAL_MODE;
+ return GIMP_LAYER_MODE_NORMAL;
}
if (CONVERSION_WARNINGS)
@@ -739,110 +739,110 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
mode_name);
g_free (mode_name);
}
- return GIMP_NORMAL_MODE;
+ return GIMP_LAYER_MODE_NORMAL;
}
gchar *
-gimp_to_psd_blend_mode (GimpLayerModeEffects gimp_layer_mode)
+gimp_to_psd_blend_mode (GimpLayerMode gimp_layer_mode)
{
gchar *psd_mode;
switch (gimp_layer_mode)
{
- case GIMP_NORMAL_MODE:
+ case GIMP_LAYER_MODE_NORMAL:
psd_mode = g_strndup ("norm", 4); /* Normal (ps3) */
break;
- case GIMP_DISSOLVE_MODE:
+ case GIMP_LAYER_MODE_DISSOLVE:
psd_mode = g_strndup ("diss", 4); /* Dissolve (ps3) */
break;
- case GIMP_BEHIND_MODE:
+ case GIMP_LAYER_MODE_BEHIND:
if (CONVERSION_WARNINGS)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
gimp_layer_mode_effects_name (gimp_layer_mode));
psd_mode = g_strndup ("norm", 4);
break;
- case GIMP_MULTIPLY_MODE:
+ case GIMP_LAYER_MODE_MULTIPLY_BROKEN:
psd_mode = g_strndup ("mul ", 4); /* Multiply (ps3) */
break;
- case GIMP_SCREEN_MODE:
+ case GIMP_LAYER_MODE_SCREEN_BROKEN:
psd_mode = g_strndup ("scrn", 4); /* Screen (ps3) */
break;
- case GIMP_NEW_OVERLAY_MODE:
+ case GIMP_LAYER_MODE_OVERLAY:
psd_mode = g_strndup ("over", 4); /* Overlay (ps3) */
break;
- case GIMP_DIFFERENCE_MODE:
+ case GIMP_LAYER_MODE_DIFFERENCE_BROKEN:
psd_mode = g_strndup ("diff", 4); /* Difference (ps3) */
break;
- case GIMP_ADDITION_MODE:
+ case GIMP_LAYER_MODE_ADDITION_BROKEN:
psd_mode = g_strndup ("lddg", 4); /* Linear dodge (ps7)*/
break;
- case GIMP_SUBTRACT_MODE:
+ case GIMP_LAYER_MODE_SUBTRACT_BROKEN:
if (CONVERSION_WARNINGS)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
gimp_layer_mode_effects_name (gimp_layer_mode));
psd_mode = g_strndup ("norm", 4);
break;
- case GIMP_DARKEN_ONLY_MODE:
+ case GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN:
psd_mode = g_strndup ("dark", 4); /* Darken (ps3) */
break;
- case GIMP_LIGHTEN_ONLY_MODE:
+ case GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN:
psd_mode = g_strndup ("lite", 4); /* Lighten (ps3) */
break;
- case GIMP_HUE_MODE:
+ case GIMP_LAYER_MODE_HSV_HUE_BROKEN:
psd_mode = g_strndup ("hue ", 4); /* Hue (ps3) */
break;
- case GIMP_SATURATION_MODE:
+ case GIMP_LAYER_MODE_HSV_SATURATION_BROKEN:
if (CONVERSION_WARNINGS)
g_message ("Gimp uses a different equation to photoshop for "
"blend mode: %s. Results will differ.",
gimp_layer_mode_effects_name (gimp_layer_mode));
psd_mode = g_strndup ("sat ", 4); /* Saturation (ps3) */
break;
- case GIMP_COLOR_MODE:
+ case GIMP_LAYER_MODE_HSV_COLOR_BROKEN:
psd_mode = g_strndup ("colr", 4); /* Color (ps3) */
break;
- case GIMP_VALUE_MODE:
+ case GIMP_LAYER_MODE_HSV_VALUE_BROKEN:
if (CONVERSION_WARNINGS)
g_message ("Gimp uses a different equation to photoshop for "
"blend mode: %s. Results will differ.",
gimp_layer_mode_effects_name (gimp_layer_mode));
psd_mode = g_strndup ("lum ", 4); /* Luminosity (ps3) */
break;
- case GIMP_DIVIDE_MODE:
+ case GIMP_LAYER_MODE_DIVIDE_BROKEN:
if (CONVERSION_WARNINGS)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
gimp_layer_mode_effects_name (gimp_layer_mode));
psd_mode = g_strndup ("norm", 4);
break;
- case GIMP_DODGE_MODE:
+ case GIMP_LAYER_MODE_DODGE_BROKEN:
psd_mode = g_strndup ("div ", 4); /* Color Dodge (ps6) */
break;
- case GIMP_BURN_MODE:
+ case GIMP_LAYER_MODE_BURN_BROKEN:
psd_mode = g_strndup ("idiv", 4); /* Color Burn (ps6) */
break;
- case GIMP_HARDLIGHT_MODE:
+ case GIMP_LAYER_MODE_HARDLIGHT_BROKEN:
psd_mode = g_strndup ("hLit", 4); /* Hard Light (ps3) */
break;
- case GIMP_OVERLAY_MODE:
- case GIMP_SOFTLIGHT_MODE:
+ case GIMP_LAYER_MODE_OVERLAY_BROKEN:
+ case GIMP_LAYER_MODE_SOFTLIGHT_BROKEN:
if (CONVERSION_WARNINGS)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
gimp_layer_mode_effects_name (gimp_layer_mode));
psd_mode = g_strndup ("sLit", 4); /* Soft Light (ps3) */
break;
- case GIMP_GRAIN_EXTRACT_MODE:
+ case GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN:
if (CONVERSION_WARNINGS)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
gimp_layer_mode_effects_name (gimp_layer_mode));
psd_mode = g_strndup ("norm", 4);
break;
- case GIMP_GRAIN_MERGE_MODE:
+ case GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN:
if (CONVERSION_WARNINGS)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
gimp_layer_mode_effects_name (gimp_layer_mode));
psd_mode = g_strndup ("norm", 4);
break;
- case GIMP_COLOR_ERASE_MODE:
+ case GIMP_LAYER_MODE_COLOR_ERASE:
if (CONVERSION_WARNINGS)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",
gimp_layer_mode_effects_name (gimp_layer_mode));
@@ -860,7 +860,7 @@ gimp_to_psd_blend_mode (GimpLayerModeEffects gimp_layer_mode)
}
static gchar *
-gimp_layer_mode_effects_name (GimpLayerModeEffects mode)
+gimp_layer_mode_effects_name (GimpLayerMode mode)
{
static gchar *layer_mode_effects_names[] =
{
@@ -889,7 +889,7 @@ gimp_layer_mode_effects_name (GimpLayerModeEffects mode)
"COLOR ERASE"
};
static gchar *err_name = NULL;
- if (mode >= 0 && mode <= GIMP_COLOR_ERASE_MODE)
+ if (mode >= 0 && mode <= GIMP_LAYER_MODE_COLOR_ERASE)
return layer_mode_effects_names[mode];
g_free (err_name);
diff --git a/plug-ins/file-psd/psd-util.h b/plug-ins/file-psd/psd-util.h
index 3fe2b2d..29385f1 100644
--- a/plug-ins/file-psd/psd-util.h
+++ b/plug-ins/file-psd/psd-util.h
@@ -75,8 +75,8 @@ gchar * encode_packbits (const gchar *src,
guint32 unpacked_len,
guint16 *packed_len);
-GimpLayerModeEffects psd_to_gimp_blend_mode (const gchar *psd_mode);
+GimpLayerMode psd_to_gimp_blend_mode (const gchar *psd_mode);
-gchar * gimp_to_psd_blend_mode (GimpLayerModeEffects gimp_layer_mode);
+gchar * gimp_to_psd_blend_mode (GimpLayerMode gimp_layer_mode);
#endif /* __PSD_UTIL_H__ */
diff --git a/plug-ins/file-sgi/sgi.c b/plug-ins/file-sgi/sgi.c
index c3b13a9..cc8ee76 100644
--- a/plug-ins/file-sgi/sgi.c
+++ b/plug-ins/file-sgi/sgi.c
@@ -409,7 +409,8 @@ load_image (const gchar *filename,
*/
layer = gimp_layer_new (image, _("Background"), sgip->xsize, sgip->ysize,
- layer_type, 100, GIMP_NORMAL_MODE);
+ layer_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image, layer, -1, 0);
/*
diff --git a/plug-ins/file-tiff/file-tiff-load.c b/plug-ins/file-tiff/file-tiff-load.c
index fe83b94..65d998c 100644
--- a/plug-ins/file-tiff/file-tiff-load.c
+++ b/plug-ins/file-tiff/file-tiff-load.c
@@ -912,7 +912,8 @@ load_image (GFile *file,
{
layer = gimp_layer_new (image, name,
cols, rows,
- layer_type, 100, GIMP_NORMAL_MODE);
+ layer_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
}
else
{
@@ -925,7 +926,8 @@ load_image (GFile *file,
layer = gimp_layer_new (image, name,
cols, rows,
- layer_type, 100, GIMP_NORMAL_MODE);
+ layer_type,
+ 100, GIMP_LAYER_MODE_NORMAL);
g_free (name);
}
diff --git a/plug-ins/file-webp/file-webp-load.c b/plug-ins/file-webp/file-webp-load.c
index 72372c3..4825e3c 100644
--- a/plug-ins/file-webp/file-webp-load.c
+++ b/plug-ins/file-webp/file-webp-load.c
@@ -55,7 +55,7 @@ create_layer (gint32 image_ID,
width, height,
GIMP_RGBA_IMAGE,
100,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_ID, layer_ID, -1, position);
diff --git a/plug-ins/gfig/gfig-dialog.c b/plug-ins/gfig/gfig-dialog.c
index 96638c5..6ccf155 100644
--- a/plug-ins/gfig/gfig-dialog.c
+++ b/plug-ins/gfig/gfig-dialog.c
@@ -247,7 +247,8 @@ gfig_dialog (void)
{
newlayer = gimp_layer_new (gfig_context->image_id, "GFig",
img_width, img_height,
- img_type, 100.0, GIMP_NORMAL_MODE);
+ img_type,
+ 100.0, GIMP_LAYER_MODE_NORMAL);
gimp_drawable_fill (newlayer, GIMP_FILL_TRANSPARENT);
gimp_image_insert_layer (gfig_context->image_id, newlayer, -1, -1);
gfig_context->drawable_id = newlayer;
@@ -1921,7 +1922,7 @@ paint_layer_fill (gdouble x1, gdouble y1, gdouble x2, gdouble y2)
case FILL_GRADIENT:
gimp_edit_blend (gfig_context->drawable_id,
GIMP_BLEND_CUSTOM,
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_GRADIENT_SHAPEBURST_DIMPLED,
100.0, /* opacity */
0.0, /* offset */
@@ -1937,7 +1938,7 @@ paint_layer_fill (gdouble x1, gdouble y1, gdouble x2, gdouble y2)
case FILL_VERTICAL:
gimp_edit_blend (gfig_context->drawable_id,
GIMP_BLEND_CUSTOM,
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_GRADIENT_LINEAR,
100.0,
0.0,
@@ -1953,7 +1954,7 @@ paint_layer_fill (gdouble x1, gdouble y1, gdouble x2, gdouble y2)
case FILL_HORIZONTAL:
gimp_edit_blend (gfig_context->drawable_id,
GIMP_BLEND_CUSTOM,
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
GIMP_GRADIENT_LINEAR,
100.0,
0.0,
@@ -1970,7 +1971,7 @@ paint_layer_fill (gdouble x1, gdouble y1, gdouble x2, gdouble y2)
gimp_edit_bucket_fill (gfig_context->drawable_id,
fill_mode, /* Fill mode */
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
current_style->fill_opacity, /* Fill opacity */
0.0, /* threshold - ignored */
FALSE, /* Sample merged - ignored */
diff --git a/plug-ins/gfig/gfig-style.c b/plug-ins/gfig/gfig-style.c
index 2297121..a8b77bf 100644
--- a/plug-ins/gfig/gfig-style.c
+++ b/plug-ins/gfig/gfig-style.c
@@ -504,7 +504,7 @@ gfig_brush_changed_callback (GimpBrushSelectButton *button,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
gint width,
gint height,
const guchar *mask_data,
diff --git a/plug-ins/gfig/gfig-style.h b/plug-ins/gfig/gfig-style.h
index de0ca35..d97f093 100644
--- a/plug-ins/gfig/gfig-style.h
+++ b/plug-ins/gfig/gfig-style.h
@@ -79,7 +79,7 @@ void gfig_brush_changed_callback (GimpBrushSelectButton *button,
const gchar *brush_name,
gdouble opacity,
gint spacing,
- GimpLayerModeEffects paint_mode,
+ GimpLayerMode paint_mode,
gint width,
gint height,
const guchar *mask_data,
diff --git a/plug-ins/gfig/gfig.h b/plug-ins/gfig/gfig.h
index 2561bd1..589986c 100644
--- a/plug-ins/gfig/gfig.h
+++ b/plug-ins/gfig/gfig.h
@@ -115,16 +115,16 @@ struct _GFigObj
/* this is temp, should be able to get rid of */
typedef struct BrushDesc
{
- gchar *name;
- gdouble opacity;
- gint spacing;
- GimpLayerModeEffects paint_mode;
- gint width;
- gint height;
- guchar *pv_buf; /* Buffer where brush placed */
- gint16 x_off;
- gint16 y_off;
- const gchar *popup;
+ gchar *name;
+ gdouble opacity;
+ gint spacing;
+ GimpLayerMode paint_mode;
+ gint width;
+ gint height;
+ guchar *pv_buf; /* Buffer where brush placed */
+ gint16 x_off;
+ gint16 y_off;
+ const gchar *popup;
} BrushDesc;
typedef struct
diff --git a/plug-ins/lighting/lighting-apply.c b/plug-ins/lighting/lighting-apply.c
index df46e0d..2cb106c 100644
--- a/plug-ins/lighting/lighting-apply.c
+++ b/plug-ins/lighting/lighting-apply.c
@@ -55,7 +55,7 @@ compute_image (void)
width, height,
GIMP_RGBA_IMAGE,
100.0,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
}
else
{
@@ -66,7 +66,7 @@ compute_image (void)
width, height,
GIMP_RGB_IMAGE,
100.0,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
}
gimp_image_insert_layer (new_image_id, new_layer_id, -1, 0);
diff --git a/plug-ins/map-object/map-object-apply.c b/plug-ins/map-object/map-object-apply.c
index 6369ba3..1d1c2d7 100644
--- a/plug-ins/map-object/map-object-apply.c
+++ b/plug-ins/map-object/map-object-apply.c
@@ -251,13 +251,15 @@ compute_image (void)
gchar *layername[] = {_("Map to plane"), _("Map to sphere"), _("Map to box"),
_("Map to cylinder"), _("Background")};
- new_layer_id = gimp_layer_new (new_image_id, layername[mapvals.create_new_image ? 4 :
- mapvals.maptype],
+ new_layer_id = gimp_layer_new (new_image_id,
+ layername[mapvals.create_new_image ? 4 :
+ mapvals.maptype],
width, height,
- mapvals.transparent_background ? GIMP_RGBA_IMAGE
- : GIMP_RGB_IMAGE,
+ mapvals.transparent_background ?
+ GIMP_RGBA_IMAGE :
+ GIMP_RGB_IMAGE,
100.0,
- GIMP_NORMAL_MODE);
+ GIMP_LAYER_MODE_NORMAL);
insert_layer = TRUE;
output_drawable = gimp_drawable_get (new_layer_id);
diff --git a/plug-ins/pagecurl/pagecurl.c b/plug-ins/pagecurl/pagecurl.c
index 2b46b9f..727fa70 100644
--- a/plug-ins/pagecurl/pagecurl.c
+++ b/plug-ins/pagecurl/pagecurl.c
@@ -721,7 +721,7 @@ do_curl_effect (gint32 drawable_id)
true_sel_height,
color_image ?
GIMP_RGBA_IMAGE : GIMP_GRAYA_IMAGE,
- 100, GIMP_NORMAL_MODE);
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer (image_id, curl_layer_id,
gimp_item_get_parent (drawable_id),
diff --git a/plug-ins/pygimp/gimpenumsmodule.c b/plug-ins/pygimp/gimpenumsmodule.c
index d2cf1d4..c830904 100644
--- a/plug-ins/pygimp/gimpenumsmodule.c
+++ b/plug-ins/pygimp/gimpenumsmodule.c
@@ -181,6 +181,53 @@ add_compat_enums(PyObject *m)
GIMP_EXPORT_IGNORE);
PyModule_AddIntConstant(m, "EXPORT_EXPORT",
GIMP_EXPORT_EXPORT);
+
+ PyModule_AddIntConstant (m, "NORMAL_MODE",
+ GIMP_LAYER_MODE_NORMAL);
+ PyModule_AddIntConstant (m, "DISSOLVE_MODE",
+ GIMP_LAYER_MODE_DISSOLVE);
+ PyModule_AddIntConstant (m, "BEHIND_MODE",
+ GIMP_LAYER_MODE_BEHIND);
+ PyModule_AddIntConstant (m, "MULTIPLY_MODE",
+ GIMP_LAYER_MODE_MULTIPLY_BROKEN);
+ PyModule_AddIntConstant (m, "SCREEN_MODE",
+ GIMP_LAYER_MODE_SCREEN_BROKEN);
+ PyModule_AddIntConstant (m, "OVERLAY_MODE",
+ GIMP_LAYER_MODE_OVERLAY_BROKEN);
+ PyModule_AddIntConstant (m, "DIFFERENCE_MODE",
+ GIMP_LAYER_MODE_DIFFERENCE_BROKEN);
+ PyModule_AddIntConstant (m, "ADDITION_MODE",
+ GIMP_LAYER_MODE_ADDITION_BROKEN);
+ PyModule_AddIntConstant (m, "SUBTRACT_MODE",
+ GIMP_LAYER_MODE_SUBTRACT_BROKEN);
+ PyModule_AddIntConstant (m, "DARKEN_ONLY_MODE",
+ GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN);
+ PyModule_AddIntConstant (m, "LIGHTEN_ONLY_MODE",
+ GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN);
+ PyModule_AddIntConstant (m, "HUE_MODE",
+ GIMP_LAYER_MODE_HSV_HUE_BROKEN);
+ PyModule_AddIntConstant (m, "SATURATION_MODE",
+ GIMP_LAYER_MODE_HSV_SATURATION_BROKEN);
+ PyModule_AddIntConstant (m, "COLOR_MODE",
+ GIMP_LAYER_MODE_HSV_COLOR_BROKEN);
+ PyModule_AddIntConstant (m, "VALUE_MODE",
+ GIMP_LAYER_MODE_HSV_VALUE_BROKEN);
+ PyModule_AddIntConstant (m, "DIVIDE_MODE",
+ GIMP_LAYER_MODE_DIVIDE_BROKEN);
+ PyModule_AddIntConstant (m, "DODGE_MODE",
+ GIMP_LAYER_MODE_DODGE_BROKEN);
+ PyModule_AddIntConstant (m, "BURN_MODE",
+ GIMP_LAYER_MODE_BURN_BROKEN);
+ PyModule_AddIntConstant (m, "HARDLIGHT_MODE",
+ GIMP_LAYER_MODE_HARDLIGHT_BROKEN);
+ PyModule_AddIntConstant (m, "SOFTLIGHT_MODE",
+ GIMP_LAYER_MODE_SOFTLIGHT_BROKEN);
+ PyModule_AddIntConstant (m, "GRAIN_EXTRACT_MODE",
+ GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN);
+ PyModule_AddIntConstant (m, "GRAIN_MERGE_MODE",
+ GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN);
+ PyModule_AddIntConstant (m, "COLOR_ERASE_MODE",
+ GIMP_LAYER_MODE_COLOR_ERASE);
}
static void
diff --git a/plug-ins/pygimp/gimpui.defs b/plug-ins/pygimp/gimpui.defs
index 0dbbe51..1540534 100644
--- a/plug-ins/pygimp/gimpui.defs
+++ b/plug-ins/pygimp/gimpui.defs
@@ -3129,7 +3129,7 @@
(parameters
'("gdouble*" "opacity")
'("gint*" "spacing")
- '("GimpLayerModeEffects*" "paint_mode")
+ '("GimpLayerMode*" "paint_mode")
)
)
@@ -3141,7 +3141,7 @@
'("const-gchar*" "brush_name")
'("gdouble" "opacity")
'("gint" "spacing")
- '("GimpLayerModeEffects" "paint_mode")
+ '("GimpLayerMode" "paint_mode")
)
)
diff --git a/plug-ins/pygimp/gimpui.override b/plug-ins/pygimp/gimpui.override
index 84e559d..5851989 100644
--- a/plug-ins/pygimp/gimpui.override
+++ b/plug-ins/pygimp/gimpui.override
@@ -917,14 +917,14 @@ _wrap_gimp_brush_select_button_get_brush(PyGObject *self)
const gchar *brush_name;
gdouble opacity;
gint spacing;
- GimpLayerModeEffects paint_mode;
+ GimpLayerMode paint_mode;
brush_name =
gimp_brush_select_button_get_brush(GIMP_BRUSH_SELECT_BUTTON(self->obj),
&opacity, &spacing, &paint_mode);
return Py_BuildValue("(sdiN)", brush_name, opacity, spacing,
- pyg_enum_from_gtype(GIMP_TYPE_LAYER_MODE_EFFECTS,
+ pyg_enum_from_gtype(GIMP_TYPE_LAYER_MODE,
paint_mode));
}
%%
diff --git a/plug-ins/pygimp/plug-ins/file-openraster.py b/plug-ins/pygimp/plug-ins/file-openraster.py
index b08b9f0..c3e5b81 100755
--- a/plug-ins/pygimp/plug-ins/file-openraster.py
+++ b/plug-ins/pygimp/plug-ins/file-openraster.py
@@ -23,22 +23,22 @@ NESTED_STACK_END = object()
layermodes_map = {
- "svg:src-over": NORMAL_MODE,
- "svg:multiply": MULTIPLY_MODE,
- "svg:screen": SCREEN_MODE,
- "svg:overlay": NEW_OVERLAY_MODE,
- "svg:darken": DARKEN_ONLY_MODE,
- "svg:lighten": LIGHTEN_ONLY_MODE,
- "svg:color-dodge": DODGE_MODE,
- "svg:color-burn": BURN_MODE,
- "svg:hard-light": HARDLIGHT_MODE,
- "svg:soft-light": SOFTLIGHT_MODE,
- "svg:difference": DIFFERENCE_MODE,
- "svg:color": COLOR_MODE,
- "svg:luminosity": VALUE_MODE,
- "svg:hue": HUE_MODE,
- "svg:saturation": SATURATION_MODE,
- "svg:plus": ADDITION_MODE,
+ "svg:src-over": LAYER_MODE_NORMAL,
+ "svg:multiply": LAYER_MODE_MULTIPLY_BROKEN,
+ "svg:screen": LAYER_MODE_SCREEN_BROKEN,
+ "svg:overlay": LAYER_MODE_OVERLAY,
+ "svg:darken": LAYER_MODE_DARKEN_ONLY_BROKEN,
+ "svg:lighten": LAYER_MODE_LIGHTEN_ONLY_BROKEN,
+ "svg:color-dodge": LAYER_MODE_DODGE_BROKEN,
+ "svg:color-burn": LAYER_MODE_BURN_BROKEN,
+ "svg:hard-light": LAYER_MODE_HARDLIGHT_BROKEN,
+ "svg:soft-light": LAYER_MODE_SOFTLIGHT_BROKEN,
+ "svg:difference": LAYER_MODE_DIFFERENCE_BROKEN,
+ "svg:color": LAYER_MODE_HSV_COLOR_BROKEN,
+ "svg:luminosity": LAYER_MODE_HSV_VALUE_BROKEN,
+ "svg:hue": LAYER_MODE_HSV_HUE_BROKEN,
+ "svg:saturation": LAYER_MODE_HSV_SATURATION_BROKEN,
+ "svg:plus": LAYER_MODE_ADDITION_BROKEN,
}
def reverse_map(mapping):
@@ -62,7 +62,7 @@ def get_layer_attributes(layer):
opac = float(a.get('opacity', '1.0'))
visible = a.get('visibility', 'visible') != 'hidden'
m = a.get('composite-op', 'svg:src-over')
- layer_mode = layermodes_map.get(m, NORMAL_MODE)
+ layer_mode = layermodes_map.get(m, LAYER_MODE_NORMAL)
return path, name, x, y, opac, visible, layer_mode
diff --git a/plug-ins/pygimp/pygimp-drawable.c b/plug-ins/pygimp/pygimp-drawable.c
index a0ec593..2eea367 100644
--- a/plug-ins/pygimp/pygimp-drawable.c
+++ b/plug-ins/pygimp/pygimp-drawable.c
@@ -1913,7 +1913,7 @@ lay_init(PyGimpLayer *self, PyObject *args, PyObject *kwargs)
unsigned int width, height;
GimpImageType type = GIMP_RGB_IMAGE;
double opacity = 100.0;
- GimpLayerModeEffects mode = GIMP_NORMAL_MODE;
+ GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL;
if (!PyArg_ParseTuple(args, "O!sii|idi:gimp.Layer.__init__",
@@ -2071,7 +2071,7 @@ grouplay_init(PyGimpLayer *self, PyObject *args, PyObject *kwargs)
char *name = "Layer Group";
GimpImageType type = GIMP_RGB_IMAGE;
double opacity = 100.0;
- GimpLayerModeEffects mode = GIMP_NORMAL_MODE;
+ GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL;
if (!PyArg_ParseTuple(args, "O!|sdi:gimp.Layer.__init__",
diff --git a/plug-ins/pygimp/pygimp-image.c b/plug-ins/pygimp/pygimp-image.c
index 450769f..69098ca 100644
--- a/plug-ins/pygimp/pygimp-image.c
+++ b/plug-ins/pygimp/pygimp-image.c
@@ -131,7 +131,7 @@ img_new_layer(PyGimpImage *self, PyObject *args, PyObject *kwargs)
gboolean alpha = TRUE;
int pos = -1;
double opacity = 100.0;
- GimpLayerModeEffects mode = GIMP_NORMAL_MODE;
+ GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL;
GimpFillType fill_mode = -1;
static char *kwlist[] = { "name", "width", "height", "offset_x", "offset_y",
diff --git a/plug-ins/screenshot/screenshot-win32.c b/plug-ins/screenshot/screenshot-win32.c
index ff83291..ee25563 100644
--- a/plug-ins/screenshot/screenshot-win32.c
+++ b/plug-ins/screenshot/screenshot-win32.c
@@ -229,7 +229,8 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect)
new_image_id = gimp_image_new(width, height, imageType);
layer_id = gimp_layer_new(new_image_id, _("Background"),
ROUND4(width), height,
- layerType, 100, GIMP_NORMAL_MODE);
+ layerType,
+ 100, GIMP_LAYER_MODE_NORMAL);
gimp_image_insert_layer(new_image_id, layer_id, -1, 0);
/* make rectangle */
diff --git a/plug-ins/screenshot/screenshot-x11.c b/plug-ins/screenshot/screenshot-x11.c
index 60ae44f..fbede76 100644
--- a/plug-ins/screenshot/screenshot-x11.c
+++ b/plug-ins/screenshot/screenshot-x11.c
@@ -464,7 +464,8 @@ add_cursor_image (gint32 image,
layer = gimp_layer_new (image, _("Mouse Pointer"),
cursor->width, cursor->height,
- GIMP_RGBA_IMAGE, 100.0, GIMP_NORMAL_MODE);
+ GIMP_RGBA_IMAGE,
+ 100.0, GIMP_LAYER_MODE_NORMAL);
buffer = gimp_drawable_get_buffer (layer);
diff --git a/plug-ins/script-fu/scheme-wrapper.c b/plug-ins/script-fu/scheme-wrapper.c
index b421bff..7c60bbf 100644
--- a/plug-ins/script-fu/scheme-wrapper.c
+++ b/plug-ins/script-fu/scheme-wrapper.c
@@ -125,9 +125,9 @@ static const NamedConstant const script_constants[] =
{ NULL, 0 }
};
-/* The following constants are deprecated. They are
- * included to keep backwards compatibility with
- * older scripts used with version 2.0 of GIMP.
+/* The following constants are deprecated. They are included to keep
+ * backwards compatibility with older scripts used with older versions
+ * of GIMP.
*/
static const NamedConstant const old_constants[] =
{
@@ -171,6 +171,30 @@ static const NamedConstant const old_constants[] =
{ "DESATURATE-LUMINOSITY", GIMP_DESATURATE_LUMA },
+ { "NORMAL-MODE", GIMP_LAYER_MODE_NORMAL },
+ { "DISSOLVE-MODE", GIMP_LAYER_MODE_DISSOLVE },
+ { "BEHIND-MODE", GIMP_LAYER_MODE_BEHIND },
+ { "MULTIPLY-MODE", GIMP_LAYER_MODE_MULTIPLY_BROKEN },
+ { "SCREEN-MODE", GIMP_LAYER_MODE_SCREEN_BROKEN },
+ { "OVERLAY-MODE", GIMP_LAYER_MODE_OVERLAY_BROKEN },
+ { "DIFFERENCE-MODE", GIMP_LAYER_MODE_DIFFERENCE_BROKEN },
+ { "ADDITION-MODE", GIMP_LAYER_MODE_ADDITION_BROKEN },
+ { "SUBTRACT-MODE", GIMP_LAYER_MODE_SUBTRACT_BROKEN },
+ { "DARKEN-ONLY-MODE", GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN },
+ { "LIGHTEN-ONLY-MODE", GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN },
+ { "HUE-MODE", GIMP_LAYER_MODE_HSV_HUE_BROKEN },
+ { "SATURATION-MODE", GIMP_LAYER_MODE_HSV_SATURATION_BROKEN },
+ { "COLOR-MODE", GIMP_LAYER_MODE_HSV_COLOR_BROKEN },
+ { "VALUE-MODE", GIMP_LAYER_MODE_HSV_VALUE_BROKEN },
+ { "DIVIDE-MODE", GIMP_LAYER_MODE_DIVIDE_BROKEN },
+ { "DODGE-MODE", GIMP_LAYER_MODE_DODGE_BROKEN },
+ { "BURN-MODE", GIMP_LAYER_MODE_BURN_BROKEN },
+ { "HARDLIGHT-MODE", GIMP_LAYER_MODE_HARDLIGHT_BROKEN },
+ { "SOFTLIGHT-MODE", GIMP_LAYER_MODE_SOFTLIGHT_BROKEN },
+ { "GRAIN-EXTRACT-MODE", GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN },
+ { "GRAIN-MERGE-MODE", GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN },
+ { "COLOR-ERASE-MODE", GIMP_LAYER_MODE_COLOR_ERASE },
+
{ NULL, 0 }
};
diff --git a/plug-ins/script-fu/script-fu-interface.c b/plug-ins/script-fu/script-fu-interface.c
index e918f43..3659c08 100644
--- a/plug-ins/script-fu/script-fu-interface.c
+++ b/plug-ins/script-fu/script-fu-interface.c
@@ -69,45 +69,45 @@ typedef struct
* Local Functions
*/
-static void script_fu_interface_quit (SFScript *script);
-
-static void script_fu_response (GtkWidget *widget,
- gint response_id,
- SFScript *script);
-static void script_fu_ok (SFScript *script);
-static void script_fu_reset (SFScript *script);
-
-static void script_fu_file_callback (GtkWidget *widget,
- SFFilename *file);
-static void script_fu_combo_callback (GtkWidget *widget,
- SFOption *option);
-static void script_fu_pattern_callback (gpointer data,
- const gchar *name,
- gint width,
- gint height,
- gint bytes,
- const guchar *mask_data,
- gboolean closing);
-static void script_fu_gradient_callback (gpointer data,
- const gchar *name,
- gint width,
- const gdouble *mask_data,
- gboolean closing);
-static void script_fu_font_callback (gpointer data,
- const gchar *name,
- gboolean closing);
-static void script_fu_palette_callback (gpointer data,
- const gchar *name,
- gboolean closing);
-static void script_fu_brush_callback (gpointer data,
- const gchar *name,
- gdouble opacity,
- gint spacing,
- GimpLayerModeEffects paint_mode,
- gint width,
- gint height,
- const guchar *mask_data,
- gboolean closing);
+static void script_fu_interface_quit (SFScript *script);
+
+static void script_fu_response (GtkWidget *widget,
+ gint response_id,
+ SFScript *script);
+static void script_fu_ok (SFScript *script);
+static void script_fu_reset (SFScript *script);
+
+static void script_fu_file_callback (GtkWidget *widget,
+ SFFilename *file);
+static void script_fu_combo_callback (GtkWidget *widget,
+ SFOption *option);
+static void script_fu_pattern_callback (gpointer data,
+ const gchar *name,
+ gint width,
+ gint height,
+ gint bytes,
+ const guchar *mask_data,
+ gboolean closing);
+static void script_fu_gradient_callback (gpointer data,
+ const gchar *name,
+ gint width,
+ const gdouble *mask_data,
+ gboolean closing);
+static void script_fu_font_callback (gpointer data,
+ const gchar *name,
+ gboolean closing);
+static void script_fu_palette_callback (gpointer data,
+ const gchar *name,
+ gboolean closing);
+static void script_fu_brush_callback (gpointer data,
+ const gchar *name,
+ gdouble opacity,
+ gint spacing,
+ GimpLayerMode paint_mode,
+ gint width,
+ gint height,
+ const guchar *mask_data,
+ gboolean closing);
/*
@@ -709,15 +709,15 @@ script_fu_palette_callback (gpointer data,
}
static void
-script_fu_brush_callback (gpointer data,
- const gchar *name,
- gdouble opacity,
- gint spacing,
- GimpLayerModeEffects paint_mode,
- gint width,
- gint height,
- const guchar *mask_data,
- gboolean closing)
+script_fu_brush_callback (gpointer data,
+ const gchar *name,
+ gdouble opacity,
+ gint spacing,
+ GimpLayerMode paint_mode,
+ gint width,
+ gint height,
+ const guchar *mask_data,
+ gboolean closing)
{
SFBrush *brush = data;
diff --git a/plug-ins/script-fu/script-fu-types.h b/plug-ins/script-fu/script-fu-types.h
index 9bd9297..32aa32d 100644
--- a/plug-ins/script-fu/script-fu-types.h
+++ b/plug-ins/script-fu/script-fu-types.h
@@ -41,10 +41,10 @@ typedef struct
typedef struct
{
- gchar *name;
- gdouble opacity;
- gint spacing;
- GimpLayerModeEffects paint_mode;
+ gchar *name;
+ gdouble opacity;
+ gint spacing;
+ GimpLayerMode paint_mode;
} SFBrush;
typedef struct
diff --git a/tools/pdbgen/enumcode.pl b/tools/pdbgen/enumcode.pl
index 1f4e408..75e04ca 100755
--- a/tools/pdbgen/enumcode.pl
+++ b/tools/pdbgen/enumcode.pl
@@ -177,6 +177,7 @@ void
gimp_enums_init (void)
{
const GimpGetTypeFunc *funcs = get_type_funcs;
+ GQuark quark;
gint i;
if (enums_initialized)
@@ -189,6 +190,12 @@ gimp_enums_init (void)
g_type_class_ref (type);
}
+ /* keep compat enum code in sync with app/app.c (app_libs_init) */
+ quark = g_quark_from_static_string ("gimp-compat-enum");
+
+ g_type_set_qdata (GIMP_TYPE_LAYER_MODE, quark,
+ (gpointer) GIMP_TYPE_LAYER_MODE_EFFECTS);
+
enums_initialized = TRUE;
}
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 0d6839f..5755850 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -691,51 +691,63 @@ package Gimp::CodeGen::enums;
GIMP_HISTOGRAM_ALPHA => '4',
GIMP_HISTOGRAM_LUMINANCE => '5' }
},
- GimpLayerModeEffects =>
+ GimpLayerMode =>
{ 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
- GIMP_NEW_OVERLAY_MODE GIMP_LCH_HUE_MODE
- GIMP_LCH_CHROMA_MODE GIMP_LCH_COLOR_MODE
- GIMP_LCH_LIGHTNESS_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',
- GIMP_NEW_OVERLAY_MODE => '23',
- GIMP_LCH_HUE_MODE => '24',
- GIMP_LCH_CHROMA_MODE => '25',
- GIMP_LCH_COLOR_MODE => '26',
- GIMP_LCH_LIGHTNESS_MODE => '27' }
+ symbols => [ qw(GIMP_LAYER_MODE_NORMAL GIMP_LAYER_MODE_DISSOLVE
+ GIMP_LAYER_MODE_BEHIND
+ GIMP_LAYER_MODE_MULTIPLY_BROKEN
+ GIMP_LAYER_MODE_SCREEN_BROKEN
+ GIMP_LAYER_MODE_OVERLAY_BROKEN
+ GIMP_LAYER_MODE_DIFFERENCE_BROKEN
+ GIMP_LAYER_MODE_ADDITION_BROKEN
+ GIMP_LAYER_MODE_SUBTRACT_BROKEN
+ GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN
+ GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN
+ GIMP_LAYER_MODE_HSV_HUE_BROKEN
+ GIMP_LAYER_MODE_HSV_SATURATION_BROKEN
+ GIMP_LAYER_MODE_HSV_COLOR_BROKEN
+ GIMP_LAYER_MODE_HSV_VALUE_BROKEN
+ GIMP_LAYER_MODE_DIVIDE_BROKEN
+ GIMP_LAYER_MODE_DODGE_BROKEN
+ GIMP_LAYER_MODE_BURN_BROKEN
+ GIMP_LAYER_MODE_HARDLIGHT_BROKEN
+ GIMP_LAYER_MODE_SOFTLIGHT_BROKEN
+ GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN
+ GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN
+ GIMP_LAYER_MODE_COLOR_ERASE
+ GIMP_LAYER_MODE_OVERLAY GIMP_LAYER_MODE_LCH_HUE
+ GIMP_LAYER_MODE_LCH_CHROMA
+ GIMP_LAYER_MODE_LCH_COLOR
+ GIMP_LAYER_MODE_LCH_LIGHTNESS) ],
+ mapping => { GIMP_LAYER_MODE_NORMAL => '0',
+ GIMP_LAYER_MODE_DISSOLVE => '1',
+ GIMP_LAYER_MODE_BEHIND => '2',
+ GIMP_LAYER_MODE_MULTIPLY_BROKEN => '3',
+ GIMP_LAYER_MODE_SCREEN_BROKEN => '4',
+ GIMP_LAYER_MODE_OVERLAY_BROKEN => '5',
+ GIMP_LAYER_MODE_DIFFERENCE_BROKEN => '6',
+ GIMP_LAYER_MODE_ADDITION_BROKEN => '7',
+ GIMP_LAYER_MODE_SUBTRACT_BROKEN => '8',
+ GIMP_LAYER_MODE_DARKEN_ONLY_BROKEN => '9',
+ GIMP_LAYER_MODE_LIGHTEN_ONLY_BROKEN => '10',
+ GIMP_LAYER_MODE_HSV_HUE_BROKEN => '11',
+ GIMP_LAYER_MODE_HSV_SATURATION_BROKEN => '12',
+ GIMP_LAYER_MODE_HSV_COLOR_BROKEN => '13',
+ GIMP_LAYER_MODE_HSV_VALUE_BROKEN => '14',
+ GIMP_LAYER_MODE_DIVIDE_BROKEN => '15',
+ GIMP_LAYER_MODE_DODGE_BROKEN => '16',
+ GIMP_LAYER_MODE_BURN_BROKEN => '17',
+ GIMP_LAYER_MODE_HARDLIGHT_BROKEN => '18',
+ GIMP_LAYER_MODE_SOFTLIGHT_BROKEN => '19',
+ GIMP_LAYER_MODE_GRAIN_EXTRACT_BROKEN => '20',
+ GIMP_LAYER_MODE_GRAIN_MERGE_BROKEN => '21',
+ GIMP_LAYER_MODE_COLOR_ERASE => '22',
+ GIMP_LAYER_MODE_OVERLAY => '23',
+ GIMP_LAYER_MODE_LCH_HUE => '24',
+ GIMP_LAYER_MODE_LCH_CHROMA => '25',
+ GIMP_LAYER_MODE_LCH_COLOR => '26',
+ GIMP_LAYER_MODE_LCH_LIGHTNESS => '27' }
},
GimpBrushApplicationMode =>
{ contig => 1,
diff --git a/tools/pdbgen/pdb/brush_select.pdb b/tools/pdbgen/pdb/brush_select.pdb
index bc7c274..79811c6 100644
--- a/tools/pdbgen/pdb/brush_select.pdb
+++ b/tools/pdbgen/pdb/brush_select.pdb
@@ -35,15 +35,15 @@ sub brushes_popup {
{ name => 'spacing', type => 'int32 <= 1000',
desc => 'The initial spacing of the brush (if < 0 then use brush
default spacing)' },
- { name => 'paint_mode', type => 'enum GimpLayerModeEffects',
+ { name => 'paint_mode', type => 'enum GimpLayerMode',
desc => 'The initial paint mode' }
);
%invoke = (
code => <<'CODE'
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
@@ -100,15 +100,15 @@ sub brushes_set_popup {
{ name => 'spacing', type => 'int32 <= 1000',
desc => 'The initial spacing of the brush (if < 0 then use brush
default spacing)' },
- { name => 'paint_mode', type => 'enum GimpLayerModeEffects',
+ { name => 'paint_mode', type => 'enum GimpLayerMode',
desc => 'The initial paint mode' }
);
%invoke = (
code => <<'CODE'
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
diff --git a/tools/pdbgen/pdb/brushes.pdb b/tools/pdbgen/pdb/brushes.pdb
index 5846299..f334864 100644
--- a/tools/pdbgen/pdb/brushes.pdb
+++ b/tools/pdbgen/pdb/brushes.pdb
@@ -156,7 +156,7 @@ sub brushes_get_brush_data {
desc => 'The brush opacity' },
{ name => 'spacing', type => '0 <= int32 <= 1000',
desc => 'The brush spacing' },
- { name => 'paint_mode', type => 'enum GimpLayerModeEffects',
+ { name => 'paint_mode', type => 'enum GimpLayerMode',
desc => 'The paint mode' },
{ name => 'width', type => 'int32',
desc => 'The brush width' },
@@ -173,8 +173,8 @@ sub brushes_get_brush_data {
{
GimpBrush *brush;
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
if (name && strlen (name))
brush = gimp_pdb_get_brush (gimp, name, FALSE, error);
diff --git a/tools/pdbgen/pdb/context.pdb b/tools/pdbgen/pdb/context.pdb
index aeab63a..f2927bc 100644
--- a/tools/pdbgen/pdb/context.pdb
+++ b/tools/pdbgen/pdb/context.pdb
@@ -446,7 +446,7 @@ HELP
&pdb_misc;
@outargs = (
- { name => 'paint_mode', type => 'enum GimpLayerModeEffects',
+ { name => 'paint_mode', type => 'enum GimpLayerMode',
desc => 'The paint mode' }
);
@@ -469,15 +469,15 @@ HELP
&pdb_misc;
@inargs = (
- { name => 'paint_mode', type => 'enum GimpLayerModeEffects',
+ { name => 'paint_mode', type => 'enum GimpLayerMode',
desc => 'The paint mode' }
);
%invoke = (
code => <<'CODE'
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
gimp_context_set_paint_mode (context, paint_mode);
}
diff --git a/tools/pdbgen/pdb/edit.pdb b/tools/pdbgen/pdb/edit.pdb
index a93d83a..682326c 100644
--- a/tools/pdbgen/pdb/edit.pdb
+++ b/tools/pdbgen/pdb/edit.pdb
@@ -625,7 +625,7 @@ HELP
desc => 'The affected drawable' },
{ name => 'fill_mode', type => 'enum GimpBucketFillMode',
desc => 'The type of fill' },
- { name => paint_mode, type => 'enum GimpLayerModeEffects',
+ { name => paint_mode, type => 'enum GimpLayerMode',
desc => 'The paint application mode' },
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The opacity of the final bucket fill' },
@@ -661,8 +661,8 @@ HELP
if (gimp_fill_options_set_by_fill_mode (options, context,
fill_mode, error))
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
gimp_context_set_opacity (GIMP_CONTEXT (options), opacity / 100.0);
gimp_context_set_paint_mode (GIMP_CONTEXT (options), paint_mode);
@@ -722,7 +722,7 @@ HELP
desc => 'The affected drawable' },
{ name => 'fill_mode', type => 'enum GimpBucketFillMode',
desc => 'The type of fill' },
- { name => paint_mode, type => 'enum GimpLayerModeEffects',
+ { name => paint_mode, type => 'enum GimpLayerMode',
desc => 'The paint application mode' },
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The opacity of the final bucket fill' },
@@ -766,8 +766,8 @@ HELP
if (gimp_fill_options_set_by_fill_mode (options, context,
fill_mode, error))
{
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
gimp_context_set_opacity (GIMP_CONTEXT (options), opacity / 100.0);
gimp_context_set_paint_mode (GIMP_CONTEXT (options), paint_mode);
@@ -819,7 +819,7 @@ HELP
desc => 'The affected drawable' },
{ name => 'blend_mode', type => 'enum GimpBlendMode',
desc => 'The type of blend' },
- { name => 'paint_mode', type => 'enum GimpLayerModeEffects',
+ { name => 'paint_mode', type => 'enum GimpLayerMode',
desc => 'The paint application mode' },
{ name => 'gradient_type', type => 'enum GimpGradientType',
desc => 'The type of gradient' },
@@ -871,8 +871,8 @@ HELP
{
GimpGradient *gradient;
- if (paint_mode == GIMP_OVERLAY_MODE)
- paint_mode = GIMP_SOFTLIGHT_MODE;
+ if (paint_mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
if (progress)
gimp_progress_start (progress, FALSE, _("Blending"));
diff --git a/tools/pdbgen/pdb/layer.pdb b/tools/pdbgen/pdb/layer.pdb
index a9e0983..a499160 100644
--- a/tools/pdbgen/pdb/layer.pdb
+++ b/tools/pdbgen/pdb/layer.pdb
@@ -43,7 +43,7 @@ HELP
desc => 'The layer name', null_ok => 1 },
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The layer opacity' },
- { name => 'mode', type => 'enum GimpLayerModeEffects',
+ { name => 'mode', type => 'enum GimpLayerMode',
desc => 'The layer combination mode' }
);
@@ -59,8 +59,8 @@ HELP
gboolean has_alpha = FALSE;
const Babl *format;
- if (mode == GIMP_OVERLAY_MODE)
- mode = GIMP_SOFTLIGHT_MODE;
+ if (mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
switch (type)
{
@@ -155,7 +155,7 @@ HELP
TRUE),
name,
GIMP_OPACITY_OPAQUE,
- GIMP_NORMAL_MODE,
+ GIMP_LAYER_MODE_NORMAL,
profile);
}
CODE
@@ -1160,7 +1160,7 @@ sub layer_get_mode {
);
@outargs = (
- { name => 'mode', type => 'enum GimpLayerModeEffects',
+ { name => 'mode', type => 'enum GimpLayerMode',
desc => 'The layer combination mode' }
);
@@ -1182,15 +1182,15 @@ sub layer_set_mode {
@inargs = (
{ name => 'layer', type => 'layer',
desc => 'The layer' },
- { name => 'mode', type => 'enum GimpLayerModeEffects',
+ { name => 'mode', type => 'enum GimpLayerMode',
desc => 'The new layer combination mode' }
);
%invoke = (
code => <<'CODE'
{
- if (mode == GIMP_OVERLAY_MODE)
- mode = GIMP_SOFTLIGHT_MODE;
+ if (mode == GIMP_LAYER_MODE_OVERLAY_BROKEN)
+ mode = GIMP_LAYER_MODE_SOFTLIGHT_BROKEN;
gimp_layer_set_mode (layer, mode, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]