[gimp] app, libgimp: reorder enum GimpLayerMode
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, libgimp: reorder enum GimpLayerMode
- Date: Sat, 14 Jan 2017 20:53:57 +0000 (UTC)
commit 5951d399387f7b28122b9e2abab89df1d9d163cc
Author: Michael Natterer <mitch gimp org>
Date: Sat Jan 14 21:52:54 2017 +0100
app, libgimp: reorder enum GimpLayerMode
so LEGACY and new modes have the same order, if possible.
app/core/core-enums.c | 8 ++--
app/core/core-enums.h | 107 +++++++++++++++++++++++++-----------------------
libgimp/gimpenums.h | 6 +-
tools/pdbgen/enums.pl | 29 +++++++------
4 files changed, 78 insertions(+), 72 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index cb65061..a158693 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -318,9 +318,9 @@ gimp_layer_mode_get_type (void)
{ 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_NORMAL, "GIMP_LAYER_MODE_NORMAL", "normal" },
+ { GIMP_LAYER_MODE_BEHIND, "GIMP_LAYER_MODE_BEHIND", "behind" },
{ GIMP_LAYER_MODE_MULTIPLY, "GIMP_LAYER_MODE_MULTIPLY", "multiply" },
{ GIMP_LAYER_MODE_MULTIPLY_LINEAR, "GIMP_LAYER_MODE_MULTIPLY_LINEAR", "multiply-linear" },
- { GIMP_LAYER_MODE_DODGE, "GIMP_LAYER_MODE_DODGE", "dodge" },
{ GIMP_LAYER_MODE_SCREEN, "GIMP_LAYER_MODE_SCREEN", "screen" },
{ GIMP_LAYER_MODE_DIFFERENCE, "GIMP_LAYER_MODE_DIFFERENCE", "difference" },
{ GIMP_LAYER_MODE_ADDITION, "GIMP_LAYER_MODE_ADDITION", "addition" },
@@ -332,12 +332,12 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_HSV_COLOR, "GIMP_LAYER_MODE_HSV_COLOR", "hsv-color" },
{ GIMP_LAYER_MODE_HSV_VALUE, "GIMP_LAYER_MODE_HSV_VALUE", "hsv-value" },
{ GIMP_LAYER_MODE_DIVIDE, "GIMP_LAYER_MODE_DIVIDE", "divide" },
+ { GIMP_LAYER_MODE_DODGE, "GIMP_LAYER_MODE_DODGE", "dodge" },
{ GIMP_LAYER_MODE_BURN, "GIMP_LAYER_MODE_BURN", "burn" },
{ GIMP_LAYER_MODE_HARDLIGHT, "GIMP_LAYER_MODE_HARDLIGHT", "hardlight" },
{ GIMP_LAYER_MODE_SOFTLIGHT, "GIMP_LAYER_MODE_SOFTLIGHT", "softlight" },
{ GIMP_LAYER_MODE_GRAIN_EXTRACT, "GIMP_LAYER_MODE_GRAIN_EXTRACT", "grain-extract" },
{ GIMP_LAYER_MODE_GRAIN_MERGE, "GIMP_LAYER_MODE_GRAIN_MERGE", "grain-merge" },
- { GIMP_LAYER_MODE_BEHIND, "GIMP_LAYER_MODE_BEHIND", "behind" },
{ 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" },
@@ -375,9 +375,9 @@ gimp_layer_mode_get_type (void)
{ 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_NORMAL, NC_("layer-mode", "Normal"), NULL },
+ { GIMP_LAYER_MODE_BEHIND, NC_("layer-mode", "Behind"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY, NC_("layer-mode", "Multiply"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY_LINEAR, NC_("layer-mode", "Multiply (linear)"), NULL },
- { GIMP_LAYER_MODE_DODGE, NC_("layer-mode", "Dodge"), NULL },
{ GIMP_LAYER_MODE_SCREEN, NC_("layer-mode", "Screen"), NULL },
{ GIMP_LAYER_MODE_DIFFERENCE, NC_("layer-mode", "Difference"), NULL },
{ GIMP_LAYER_MODE_ADDITION, NC_("layer-mode", "Addition"), NULL },
@@ -389,12 +389,12 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_HSV_COLOR, NC_("layer-mode", "Color (HSV)"), NULL },
{ GIMP_LAYER_MODE_HSV_VALUE, NC_("layer-mode", "Value (HSV)"), NULL },
{ GIMP_LAYER_MODE_DIVIDE, NC_("layer-mode", "Divide"), NULL },
+ { GIMP_LAYER_MODE_DODGE, NC_("layer-mode", "Dodge"), NULL },
{ GIMP_LAYER_MODE_BURN, NC_("layer-mode", "Burn"), NULL },
{ GIMP_LAYER_MODE_HARDLIGHT, NC_("layer-mode", "Hard light"), NULL },
{ GIMP_LAYER_MODE_SOFTLIGHT, NC_("layer-mode", "Soft light"), NULL },
{ GIMP_LAYER_MODE_GRAIN_EXTRACT, NC_("layer-mode", "Grain extract"), NULL },
{ GIMP_LAYER_MODE_GRAIN_MERGE, NC_("layer-mode", "Grain merge"), NULL },
- { GIMP_LAYER_MODE_BEHIND, NC_("layer-mode", "Behind"), 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 },
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 0f10a58..33c8aa9 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -154,57 +154,62 @@ GType gimp_layer_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
- GIMP_LAYER_MODE_NORMAL_NON_LINEAR, /*< desc="Normal (non-linear)" >*/
- GIMP_LAYER_MODE_DISSOLVE, /*< desc="Dissolve" >*/
- GIMP_LAYER_MODE_BEHIND_NON_LINEAR, /*< desc="Behind (non-linear)" >*/
- GIMP_LAYER_MODE_MULTIPLY_LEGACY, /*< desc="Multiply (legacy)" >*/
- GIMP_LAYER_MODE_SCREEN_LEGACY, /*< desc="Screen (legacy)" >*/
- GIMP_LAYER_MODE_OVERLAY_LEGACY, /*< desc="Old broken Overlay" >*/
- GIMP_LAYER_MODE_DIFFERENCE_LEGACY, /*< desc="Difference (legacy)" >*/
- GIMP_LAYER_MODE_ADDITION_LEGACY, /*< desc="Addition (legacy)" >*/
- GIMP_LAYER_MODE_SUBTRACT_LEGACY, /*< desc="Subtract (legacy)" >*/
- GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY, /*< desc="Darken only (legacy)" >*/
- GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY, /*< desc="Lighten only (legacy)">*/
- GIMP_LAYER_MODE_HSV_HUE_LEGACY, /*< desc="Hue (HSV) (legacy)" >*/
- GIMP_LAYER_MODE_HSV_SATURATION_LEGACY, /*< desc="Saturation (HSV) (legacy)">*/
- GIMP_LAYER_MODE_HSV_COLOR_LEGACY, /*< desc="Color (HSV) (legacy)" >*/
- GIMP_LAYER_MODE_HSV_VALUE_LEGACY, /*< desc="Value (HSV) (legacy)" >*/
- GIMP_LAYER_MODE_DIVIDE_LEGACY, /*< desc="Divide (legacy)" >*/
- GIMP_LAYER_MODE_DODGE_LEGACY, /*< desc="Dodge (legacy)" >*/
- GIMP_LAYER_MODE_BURN_LEGACY, /*< desc="Burn (legacy)" >*/
- GIMP_LAYER_MODE_HARDLIGHT_LEGACY, /*< desc="Hard light (legacy)" >*/
- GIMP_LAYER_MODE_SOFTLIGHT_LEGACY, /*< desc="Soft light (legacy)" >*/
- GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY, /*< desc="Grain extract (legacy)">*/
- GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY, /*< desc="Grain merge (legacy)" >*/
- 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)" >*/
- GIMP_LAYER_MODE_NORMAL, /*< desc="Normal" >*/
- GIMP_LAYER_MODE_MULTIPLY, /*< desc="Multiply" >*/
- GIMP_LAYER_MODE_MULTIPLY_LINEAR, /*< desc="Multiply (linear)" >*/
- GIMP_LAYER_MODE_DODGE, /*< desc="Dodge" >*/
- GIMP_LAYER_MODE_SCREEN, /*< desc="Screen" >*/
- GIMP_LAYER_MODE_DIFFERENCE, /*< desc="Difference" >*/
- GIMP_LAYER_MODE_ADDITION, /*< desc="Addition" >*/
- GIMP_LAYER_MODE_SUBTRACT, /*< desc="Subtract" >*/
- GIMP_LAYER_MODE_DARKEN_ONLY, /*< desc="Darken only" >*/
- GIMP_LAYER_MODE_LIGHTEN_ONLY, /*< desc="Lighten only" >*/
- GIMP_LAYER_MODE_HSV_HUE, /*< desc="Hue (HSV)" >*/
- GIMP_LAYER_MODE_HSV_SATURATION, /*< desc="Saturation (HSV)" >*/
- GIMP_LAYER_MODE_HSV_COLOR, /*< desc="Color (HSV)" >*/
- GIMP_LAYER_MODE_HSV_VALUE, /*< desc="Value (HSV)" >*/
- GIMP_LAYER_MODE_DIVIDE, /*< desc="Divide" >*/
- GIMP_LAYER_MODE_BURN, /*< desc="Burn" >*/
- GIMP_LAYER_MODE_HARDLIGHT, /*< desc="Hard light" >*/
- GIMP_LAYER_MODE_SOFTLIGHT, /*< desc="Soft light" >*/
- GIMP_LAYER_MODE_GRAIN_EXTRACT, /*< desc="Grain extract" >*/
- GIMP_LAYER_MODE_GRAIN_MERGE, /*< desc="Grain merge" >*/
- GIMP_LAYER_MODE_BEHIND, /*< desc="Behind" >*/
-
- /* internal modes, not available to the PDB */
+ /* Modes that exist since ancient times */
+ GIMP_LAYER_MODE_NORMAL_NON_LINEAR, /*< desc="Normal (non-linear)" >*/
+ GIMP_LAYER_MODE_DISSOLVE, /*< desc="Dissolve" >*/
+ GIMP_LAYER_MODE_BEHIND_NON_LINEAR, /*< desc="Behind (non-linear)" >*/
+ GIMP_LAYER_MODE_MULTIPLY_LEGACY, /*< desc="Multiply (legacy)" >*/
+ GIMP_LAYER_MODE_SCREEN_LEGACY, /*< desc="Screen (legacy)" >*/
+ GIMP_LAYER_MODE_OVERLAY_LEGACY, /*< desc="Old broken Overlay" >*/
+ GIMP_LAYER_MODE_DIFFERENCE_LEGACY, /*< desc="Difference (legacy)" >*/
+ GIMP_LAYER_MODE_ADDITION_LEGACY, /*< desc="Addition (legacy)" >*/
+ GIMP_LAYER_MODE_SUBTRACT_LEGACY, /*< desc="Subtract (legacy)" >*/
+ GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY, /*< desc="Darken only (legacy)" >*/
+ GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY, /*< desc="Lighten only (legacy)" >*/
+ GIMP_LAYER_MODE_HSV_HUE_LEGACY, /*< desc="Hue (HSV) (legacy)" >*/
+ GIMP_LAYER_MODE_HSV_SATURATION_LEGACY, /*< desc="Saturation (HSV) (legacy)">*/
+ GIMP_LAYER_MODE_HSV_COLOR_LEGACY, /*< desc="Color (HSV) (legacy)" >*/
+ GIMP_LAYER_MODE_HSV_VALUE_LEGACY, /*< desc="Value (HSV) (legacy)" >*/
+ GIMP_LAYER_MODE_DIVIDE_LEGACY, /*< desc="Divide (legacy)" >*/
+ GIMP_LAYER_MODE_DODGE_LEGACY, /*< desc="Dodge (legacy)" >*/
+ GIMP_LAYER_MODE_BURN_LEGACY, /*< desc="Burn (legacy)" >*/
+ GIMP_LAYER_MODE_HARDLIGHT_LEGACY, /*< desc="Hard light (legacy)" >*/
+ GIMP_LAYER_MODE_SOFTLIGHT_LEGACY, /*< desc="Soft light (legacy)" >*/
+ GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY, /*< desc="Grain extract (legacy)" >*/
+ GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY, /*< desc="Grain merge (legacy)" >*/
+ GIMP_LAYER_MODE_COLOR_ERASE, /*< desc="Color erase" >*/
+
+ /* Since 2.8 */
+ 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)" >*/
+
+ /* Since 2.10 */
+ GIMP_LAYER_MODE_NORMAL, /*< desc="Normal" >*/
+ GIMP_LAYER_MODE_BEHIND, /*< desc="Behind" >*/
+ GIMP_LAYER_MODE_MULTIPLY, /*< desc="Multiply" >*/
+ GIMP_LAYER_MODE_MULTIPLY_LINEAR, /*< desc="Multiply (linear)" >*/
+ GIMP_LAYER_MODE_SCREEN, /*< desc="Screen" >*/
+ GIMP_LAYER_MODE_DIFFERENCE, /*< desc="Difference" >*/
+ GIMP_LAYER_MODE_ADDITION, /*< desc="Addition" >*/
+ GIMP_LAYER_MODE_SUBTRACT, /*< desc="Subtract" >*/
+ GIMP_LAYER_MODE_DARKEN_ONLY, /*< desc="Darken only" >*/
+ GIMP_LAYER_MODE_LIGHTEN_ONLY, /*< desc="Lighten only" >*/
+ GIMP_LAYER_MODE_HSV_HUE, /*< desc="Hue (HSV)" >*/
+ GIMP_LAYER_MODE_HSV_SATURATION, /*< desc="Saturation (HSV)" >*/
+ GIMP_LAYER_MODE_HSV_COLOR, /*< desc="Color (HSV)" >*/
+ GIMP_LAYER_MODE_HSV_VALUE, /*< desc="Value (HSV)" >*/
+ GIMP_LAYER_MODE_DIVIDE, /*< desc="Divide" >*/
+ GIMP_LAYER_MODE_DODGE, /*< desc="Dodge" >*/
+ GIMP_LAYER_MODE_BURN, /*< desc="Burn" >*/
+ GIMP_LAYER_MODE_HARDLIGHT, /*< desc="Hard light" >*/
+ GIMP_LAYER_MODE_SOFTLIGHT, /*< desc="Soft light" >*/
+ GIMP_LAYER_MODE_GRAIN_EXTRACT, /*< desc="Grain extract" >*/
+ GIMP_LAYER_MODE_GRAIN_MERGE, /*< desc="Grain merge" >*/
+
+ /* Internal modes, not available to the PDB */
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" >*/
diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h
index e56921b..4b4bbb4 100644
--- a/libgimp/gimpenums.h
+++ b/libgimp/gimpenums.h
@@ -98,9 +98,9 @@ typedef enum
GIMP_LAYER_MODE_LCH_COLOR,
GIMP_LAYER_MODE_LCH_LIGHTNESS,
GIMP_LAYER_MODE_NORMAL,
+ GIMP_LAYER_MODE_BEHIND,
GIMP_LAYER_MODE_MULTIPLY,
GIMP_LAYER_MODE_MULTIPLY_LINEAR,
- GIMP_LAYER_MODE_DODGE,
GIMP_LAYER_MODE_SCREEN,
GIMP_LAYER_MODE_DIFFERENCE,
GIMP_LAYER_MODE_ADDITION,
@@ -112,12 +112,12 @@ typedef enum
GIMP_LAYER_MODE_HSV_COLOR,
GIMP_LAYER_MODE_HSV_VALUE,
GIMP_LAYER_MODE_DIVIDE,
+ GIMP_LAYER_MODE_DODGE,
GIMP_LAYER_MODE_BURN,
GIMP_LAYER_MODE_HARDLIGHT,
GIMP_LAYER_MODE_SOFTLIGHT,
GIMP_LAYER_MODE_GRAIN_EXTRACT,
- GIMP_LAYER_MODE_GRAIN_MERGE,
- GIMP_LAYER_MODE_BEHIND
+ GIMP_LAYER_MODE_GRAIN_MERGE
} GimpLayerMode;
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 49126b8..64d9f03 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -722,10 +722,10 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_LCH_CHROMA
GIMP_LAYER_MODE_LCH_COLOR
GIMP_LAYER_MODE_LCH_LIGHTNESS
- GIMP_LAYER_MODE_NORMAL GIMP_LAYER_MODE_MULTIPLY
+ GIMP_LAYER_MODE_NORMAL GIMP_LAYER_MODE_BEHIND
+ GIMP_LAYER_MODE_MULTIPLY
GIMP_LAYER_MODE_MULTIPLY_LINEAR
- GIMP_LAYER_MODE_DODGE GIMP_LAYER_MODE_SCREEN
- GIMP_LAYER_MODE_DIFFERENCE
+ GIMP_LAYER_MODE_SCREEN GIMP_LAYER_MODE_DIFFERENCE
GIMP_LAYER_MODE_ADDITION GIMP_LAYER_MODE_SUBTRACT
GIMP_LAYER_MODE_DARKEN_ONLY
GIMP_LAYER_MODE_LIGHTEN_ONLY
@@ -733,10 +733,11 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_HSV_SATURATION
GIMP_LAYER_MODE_HSV_COLOR
GIMP_LAYER_MODE_HSV_VALUE GIMP_LAYER_MODE_DIVIDE
- GIMP_LAYER_MODE_BURN GIMP_LAYER_MODE_HARDLIGHT
+ GIMP_LAYER_MODE_DODGE GIMP_LAYER_MODE_BURN
+ GIMP_LAYER_MODE_HARDLIGHT
GIMP_LAYER_MODE_SOFTLIGHT
GIMP_LAYER_MODE_GRAIN_EXTRACT
- GIMP_LAYER_MODE_GRAIN_MERGE GIMP_LAYER_MODE_BEHIND) ],
+ GIMP_LAYER_MODE_GRAIN_MERGE) ],
mapping => { GIMP_LAYER_MODE_NORMAL_NON_LINEAR => '0',
GIMP_LAYER_MODE_DISSOLVE => '1',
GIMP_LAYER_MODE_BEHIND_NON_LINEAR => '2',
@@ -766,9 +767,9 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_LCH_COLOR => '26',
GIMP_LAYER_MODE_LCH_LIGHTNESS => '27',
GIMP_LAYER_MODE_NORMAL => '28',
- GIMP_LAYER_MODE_MULTIPLY => '29',
- GIMP_LAYER_MODE_MULTIPLY_LINEAR => '30',
- GIMP_LAYER_MODE_DODGE => '31',
+ GIMP_LAYER_MODE_BEHIND => '29',
+ GIMP_LAYER_MODE_MULTIPLY => '30',
+ GIMP_LAYER_MODE_MULTIPLY_LINEAR => '31',
GIMP_LAYER_MODE_SCREEN => '32',
GIMP_LAYER_MODE_DIFFERENCE => '33',
GIMP_LAYER_MODE_ADDITION => '34',
@@ -780,12 +781,12 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_HSV_COLOR => '40',
GIMP_LAYER_MODE_HSV_VALUE => '41',
GIMP_LAYER_MODE_DIVIDE => '42',
- GIMP_LAYER_MODE_BURN => '43',
- GIMP_LAYER_MODE_HARDLIGHT => '44',
- GIMP_LAYER_MODE_SOFTLIGHT => '45',
- GIMP_LAYER_MODE_GRAIN_EXTRACT => '46',
- GIMP_LAYER_MODE_GRAIN_MERGE => '47',
- GIMP_LAYER_MODE_BEHIND => '48' }
+ GIMP_LAYER_MODE_DODGE => '43',
+ GIMP_LAYER_MODE_BURN => '44',
+ GIMP_LAYER_MODE_HARDLIGHT => '45',
+ GIMP_LAYER_MODE_SOFTLIGHT => '46',
+ GIMP_LAYER_MODE_GRAIN_EXTRACT => '47',
+ GIMP_LAYER_MODE_GRAIN_MERGE => '48' }
},
GimpBrushApplicationMode =>
{ contig => 1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]