Commit a3b8d0ce authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

app: some cleanup and adding const in gimp-layer-modes.c

parent daf206c7
...@@ -33,7 +33,7 @@ typedef struct _GimpLayerModeInfo GimpLayerModeInfo; ...@@ -33,7 +33,7 @@ typedef struct _GimpLayerModeInfo GimpLayerModeInfo;
struct _GimpLayerModeInfo struct _GimpLayerModeInfo
{ {
GimpLayerMode layer_mode; GimpLayerMode layer_mode;
gchar *op_name; const gchar *op_name;
GimpLayerModeFlags flags; GimpLayerModeFlags flags;
GimpLayerCompositeMode composite_mode; GimpLayerCompositeMode composite_mode;
GimpLayerColorSpace composite_space; GimpLayerColorSpace composite_space;
...@@ -43,7 +43,7 @@ struct _GimpLayerModeInfo ...@@ -43,7 +43,7 @@ struct _GimpLayerModeInfo
/* static variables */ /* static variables */
static GimpLayerModeInfo layer_mode_infos[]= static const GimpLayerModeInfo layer_mode_infos[]=
{ {
{ GIMP_LAYER_MODE_NORMAL, { GIMP_LAYER_MODE_NORMAL,
"gimp:normal", "gimp:normal",
...@@ -774,243 +774,209 @@ static const GimpLayerMode layer_mode_group_legacy[] = ...@@ -774,243 +774,209 @@ static const GimpLayerMode layer_mode_group_legacy[] =
static const GimpLayerMode layer_mode_groups[][4] = static const GimpLayerMode layer_mode_groups[][4] =
{ {
{ { GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LINEAR, GIMP_LAYER_MODE_NORMAL_LINEAR,
GIMP_LAYER_MODE_NORMAL, GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL GIMP_LAYER_MODE_NORMAL
}, },
{ { GIMP_LAYER_MODE_DISSOLVE,
GIMP_LAYER_MODE_DISSOLVE,
GIMP_LAYER_MODE_DISSOLVE, GIMP_LAYER_MODE_DISSOLVE,
GIMP_LAYER_MODE_DISSOLVE, GIMP_LAYER_MODE_DISSOLVE,
GIMP_LAYER_MODE_DISSOLVE GIMP_LAYER_MODE_DISSOLVE
}, },
{ { GIMP_LAYER_MODE_BEHIND,
GIMP_LAYER_MODE_BEHIND,
GIMP_LAYER_MODE_BEHIND_LINEAR, GIMP_LAYER_MODE_BEHIND_LINEAR,
GIMP_LAYER_MODE_BEHIND, GIMP_LAYER_MODE_BEHIND,
GIMP_LAYER_MODE_BEHIND GIMP_LAYER_MODE_BEHIND
}, },
{ { GIMP_LAYER_MODE_MULTIPLY,
GIMP_LAYER_MODE_MULTIPLY,
GIMP_LAYER_MODE_MULTIPLY_LINEAR, GIMP_LAYER_MODE_MULTIPLY_LINEAR,
GIMP_LAYER_MODE_MULTIPLY, GIMP_LAYER_MODE_MULTIPLY,
GIMP_LAYER_MODE_MULTIPLY_LEGACY GIMP_LAYER_MODE_MULTIPLY_LEGACY
}, },
{ { GIMP_LAYER_MODE_SCREEN,
GIMP_LAYER_MODE_SCREEN,
GIMP_LAYER_MODE_SCREEN_LINEAR, GIMP_LAYER_MODE_SCREEN_LINEAR,
GIMP_LAYER_MODE_SCREEN, GIMP_LAYER_MODE_SCREEN,
GIMP_LAYER_MODE_SCREEN_LEGACY GIMP_LAYER_MODE_SCREEN_LEGACY
}, },
{ { GIMP_LAYER_MODE_OVERLAY,
GIMP_LAYER_MODE_OVERLAY,
GIMP_LAYER_MODE_OVERLAY_LINEAR, GIMP_LAYER_MODE_OVERLAY_LINEAR,
GIMP_LAYER_MODE_OVERLAY, GIMP_LAYER_MODE_OVERLAY,
-1 -1
}, },
{ { GIMP_LAYER_MODE_DIFFERENCE,
GIMP_LAYER_MODE_DIFFERENCE,
GIMP_LAYER_MODE_DIFFERENCE_LINEAR, GIMP_LAYER_MODE_DIFFERENCE_LINEAR,
GIMP_LAYER_MODE_DIFFERENCE, GIMP_LAYER_MODE_DIFFERENCE,
GIMP_LAYER_MODE_DIFFERENCE_LEGACY GIMP_LAYER_MODE_DIFFERENCE_LEGACY
}, },
{ { GIMP_LAYER_MODE_ADDITION,
GIMP_LAYER_MODE_ADDITION,
GIMP_LAYER_MODE_ADDITION_LINEAR, GIMP_LAYER_MODE_ADDITION_LINEAR,
GIMP_LAYER_MODE_ADDITION, GIMP_LAYER_MODE_ADDITION,
GIMP_LAYER_MODE_ADDITION_LEGACY GIMP_LAYER_MODE_ADDITION_LEGACY
}, },
{ { GIMP_LAYER_MODE_SUBTRACT,
GIMP_LAYER_MODE_SUBTRACT,
GIMP_LAYER_MODE_SUBTRACT_LINEAR, GIMP_LAYER_MODE_SUBTRACT_LINEAR,
GIMP_LAYER_MODE_SUBTRACT, GIMP_LAYER_MODE_SUBTRACT,
GIMP_LAYER_MODE_SUBTRACT_LEGACY GIMP_LAYER_MODE_SUBTRACT_LEGACY
}, },
{ { GIMP_LAYER_MODE_DARKEN_ONLY,
GIMP_LAYER_MODE_DARKEN_ONLY,
GIMP_LAYER_MODE_DARKEN_ONLY, GIMP_LAYER_MODE_DARKEN_ONLY,
GIMP_LAYER_MODE_DARKEN_ONLY, GIMP_LAYER_MODE_DARKEN_ONLY,
GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY
}, },
{ { GIMP_LAYER_MODE_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LIGHTEN_ONLY, GIMP_LAYER_MODE_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LIGHTEN_ONLY, GIMP_LAYER_MODE_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY
}, },
{ { -1,
-1,
-1, -1,
GIMP_LAYER_MODE_HSV_HUE, GIMP_LAYER_MODE_HSV_HUE,
GIMP_LAYER_MODE_HSV_HUE_LEGACY GIMP_LAYER_MODE_HSV_HUE_LEGACY
}, },
{ { -1,
-1,
-1, -1,
GIMP_LAYER_MODE_HSV_SATURATION, GIMP_LAYER_MODE_HSV_SATURATION,
GIMP_LAYER_MODE_HSV_SATURATION_LEGACY GIMP_LAYER_MODE_HSV_SATURATION_LEGACY
}, },
{ { -1,
-1,
-1, -1,
GIMP_LAYER_MODE_HSV_COLOR, GIMP_LAYER_MODE_HSV_COLOR,
GIMP_LAYER_MODE_HSV_COLOR_LEGACY GIMP_LAYER_MODE_HSV_COLOR_LEGACY
}, },
{ { -1,
-1,
-1, -1,
GIMP_LAYER_MODE_HSV_VALUE, GIMP_LAYER_MODE_HSV_VALUE,
GIMP_LAYER_MODE_HSV_VALUE_LEGACY GIMP_LAYER_MODE_HSV_VALUE_LEGACY
}, },
{ { GIMP_LAYER_MODE_DIVIDE,
GIMP_LAYER_MODE_DIVIDE,
GIMP_LAYER_MODE_DIVIDE_LINEAR, GIMP_LAYER_MODE_DIVIDE_LINEAR,
GIMP_LAYER_MODE_DIVIDE, GIMP_LAYER_MODE_DIVIDE,
GIMP_LAYER_MODE_DIVIDE_LEGACY GIMP_LAYER_MODE_DIVIDE_LEGACY
}, },
{ { GIMP_LAYER_MODE_DODGE,
GIMP_LAYER_MODE_DODGE,
GIMP_LAYER_MODE_DODGE_LINEAR, GIMP_LAYER_MODE_DODGE_LINEAR,
GIMP_LAYER_MODE_DODGE, GIMP_LAYER_MODE_DODGE,
GIMP_LAYER_MODE_DODGE_LEGACY GIMP_LAYER_MODE_DODGE_LEGACY
}, },
{ { GIMP_LAYER_MODE_BURN,
GIMP_LAYER_MODE_BURN,
GIMP_LAYER_MODE_BURN_LINEAR, GIMP_LAYER_MODE_BURN_LINEAR,
GIMP_LAYER_MODE_BURN, GIMP_LAYER_MODE_BURN,
GIMP_LAYER_MODE_BURN_LEGACY GIMP_LAYER_MODE_BURN_LEGACY
}, },
{ { GIMP_LAYER_MODE_HARDLIGHT,
GIMP_LAYER_MODE_HARDLIGHT,
GIMP_LAYER_MODE_HARDLIGHT_LINEAR, GIMP_LAYER_MODE_HARDLIGHT_LINEAR,
GIMP_LAYER_MODE_HARDLIGHT, GIMP_LAYER_MODE_HARDLIGHT,
GIMP_LAYER_MODE_HARDLIGHT_LEGACY GIMP_LAYER_MODE_HARDLIGHT_LEGACY
}, },
{ { GIMP_LAYER_MODE_SOFTLIGHT,
GIMP_LAYER_MODE_SOFTLIGHT,
GIMP_LAYER_MODE_SOFTLIGHT_LINEAR, GIMP_LAYER_MODE_SOFTLIGHT_LINEAR,
GIMP_LAYER_MODE_SOFTLIGHT, GIMP_LAYER_MODE_SOFTLIGHT,
GIMP_LAYER_MODE_SOFTLIGHT_LEGACY GIMP_LAYER_MODE_SOFTLIGHT_LEGACY
}, },
{ { GIMP_LAYER_MODE_GRAIN_EXTRACT,
GIMP_LAYER_MODE_GRAIN_EXTRACT,
GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR, GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR,
GIMP_LAYER_MODE_GRAIN_EXTRACT, GIMP_LAYER_MODE_GRAIN_EXTRACT,
GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY
}, },
{ { GIMP_LAYER_MODE_GRAIN_MERGE,
GIMP_LAYER_MODE_GRAIN_MERGE,
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR, GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR,
GIMP_LAYER_MODE_GRAIN_MERGE, GIMP_LAYER_MODE_GRAIN_MERGE,
GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY
}, },
{ { GIMP_LAYER_MODE_COLOR_ERASE,
GIMP_LAYER_MODE_COLOR_ERASE,
-1, -1,
GIMP_LAYER_MODE_COLOR_ERASE, GIMP_LAYER_MODE_COLOR_ERASE,
-1, -1,
}, },
{ { GIMP_LAYER_MODE_VIVID_LIGHT,
GIMP_LAYER_MODE_VIVID_LIGHT,
GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR, GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR,
GIMP_LAYER_MODE_VIVID_LIGHT, GIMP_LAYER_MODE_VIVID_LIGHT,
-1 -1
}, },
{ { GIMP_LAYER_MODE_PIN_LIGHT,
GIMP_LAYER_MODE_PIN_LIGHT,
GIMP_LAYER_MODE_PIN_LIGHT_LINEAR, GIMP_LAYER_MODE_PIN_LIGHT_LINEAR,
GIMP_LAYER_MODE_PIN_LIGHT, GIMP_LAYER_MODE_PIN_LIGHT,
-1 -1
}, },
{ { GIMP_LAYER_MODE_LINEAR_LIGHT,
GIMP_LAYER_MODE_LINEAR_LIGHT,
GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR, GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR,
GIMP_LAYER_MODE_LINEAR_LIGHT, GIMP_LAYER_MODE_LINEAR_LIGHT,
-1 -1
}, },
{ { GIMP_LAYER_MODE_HARD_MIX,
GIMP_LAYER_MODE_HARD_MIX,
GIMP_LAYER_MODE_HARD_MIX_LINEAR, GIMP_LAYER_MODE_HARD_MIX_LINEAR,
GIMP_LAYER_MODE_HARD_MIX, GIMP_LAYER_MODE_HARD_MIX,
-1 -1
}, },
{ { GIMP_LAYER_MODE_EXCLUSION,
GIMP_LAYER_MODE_EXCLUSION,
GIMP_LAYER_MODE_EXCLUSION_LINEAR, GIMP_LAYER_MODE_EXCLUSION_LINEAR,
GIMP_LAYER_MODE_EXCLUSION, GIMP_LAYER_MODE_EXCLUSION,
-1 -1
}, },
{ { GIMP_LAYER_MODE_LINEAR_BURN,
GIMP_LAYER_MODE_LINEAR_BURN,
GIMP_LAYER_MODE_LINEAR_BURN_LINEAR, GIMP_LAYER_MODE_LINEAR_BURN_LINEAR,
GIMP_LAYER_MODE_LINEAR_BURN, GIMP_LAYER_MODE_LINEAR_BURN,
-1 -1
}, },
{ { GIMP_LAYER_MODE_LUMINANCE_DARKEN_ONLY,
GIMP_LAYER_MODE_LUMINANCE_DARKEN_ONLY,
GIMP_LAYER_MODE_LUMINANCE_DARKEN_ONLY, GIMP_LAYER_MODE_LUMINANCE_DARKEN_ONLY,
GIMP_LAYER_MODE_LUMA_DARKEN_ONLY, GIMP_LAYER_MODE_LUMA_DARKEN_ONLY,
-1 -1
}, },
{ { GIMP_LAYER_MODE_LUMINANCE_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LUMINANCE_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LUMINANCE_LIGHTEN_ONLY, GIMP_LAYER_MODE_LUMINANCE_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY, GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY,
-1 -1
}, },
{ { GIMP_LAYER_MODE_ERASE,
GIMP_LAYER_MODE_ERASE,
GIMP_LAYER_MODE_ERASE, GIMP_LAYER_MODE_ERASE,
-1, -1,
-1 -1
}, },
{ { GIMP_LAYER_MODE_REPLACE,
GIMP_LAYER_MODE_REPLACE,
GIMP_LAYER_MODE_REPLACE, GIMP_LAYER_MODE_REPLACE,
-1, -1,
-1 -1
}, },
{ { GIMP_LAYER_MODE_ANTI_ERASE,
GIMP_LAYER_MODE_ANTI_ERASE,
GIMP_LAYER_MODE_ANTI_ERASE, GIMP_LAYER_MODE_ANTI_ERASE,
-1, -1,
-1 -1
}, }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment