[gimp] libgimpbase: proper names for the GimpChannelType enum
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpbase: proper names for the GimpChannelType enum
- Date: Mon, 9 Jan 2017 18:41:37 +0000 (UTC)
commit 07600c6db65eaf6b9f4e07aa76423a57257f7eb2
Author: Michael Natterer <mitch gimp org>
Date: Mon Jan 9 19:40:30 2017 +0100
libgimpbase: proper names for the GimpChannelType enum
Register the old value names as compat. Also add some forgotten
values and enums to gimpcompatenums.h
app/core/gimpchannel.c | 2 +-
app/core/gimpdrawable.c | 24 ++--
app/core/gimpimage.c | 24 ++--
app/core/gimplayer.c | 2 +-
app/pdb/channel-cmds.c | 2 +-
app/pdb/image-cmds.c | 24 ++--
app/tools/gimpforegroundselectoptions.c | 12 +-
app/widgets/gimpcomponenteditor.c | 12 +-
app/widgets/gimpviewrendererimage.c | 14 +-
libgimpbase/gimpbase-private.c | 12 ++
libgimpbase/gimpbaseenums.c | 24 ++--
libgimpbase/gimpbaseenums.h | 21 +++-
libgimpbase/gimpcompatenums.c | 184 +++++++++++++++++++++++++++++++
libgimpbase/gimpcompatenums.h | 82 +++++++++++++-
tools/pdbgen/enums.pl | 18 ++--
tools/pdbgen/pdb/image.pdb | 16 ++--
16 files changed, 373 insertions(+), 100 deletions(-)
---
diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c
index 21a458d..7d61562 100644
--- a/app/core/gimpchannel.c
+++ b/app/core/gimpchannel.c
@@ -1716,7 +1716,7 @@ gimp_channel_new_from_alpha (GimpImage *image,
gegl_buffer_set_format (dest_buffer,
gimp_drawable_get_component_format (drawable,
- GIMP_ALPHA_CHANNEL));
+ GIMP_CHANNEL_ALPHA));
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
dest_buffer, NULL);
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index 9212fba..7a965c6 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -1430,32 +1430,32 @@ gimp_drawable_get_component_format (GimpDrawable *drawable,
switch (channel)
{
- case GIMP_RED_CHANNEL:
+ case GIMP_CHANNEL_RED:
return gimp_babl_component_format (GIMP_RGB,
gimp_drawable_get_precision (drawable),
RED);
- case GIMP_GREEN_CHANNEL:
+ case GIMP_CHANNEL_GREEN:
return gimp_babl_component_format (GIMP_RGB,
gimp_drawable_get_precision (drawable),
GREEN);
- case GIMP_BLUE_CHANNEL:
+ case GIMP_CHANNEL_BLUE:
return gimp_babl_component_format (GIMP_RGB,
gimp_drawable_get_precision (drawable),
BLUE);
- case GIMP_ALPHA_CHANNEL:
+ case GIMP_CHANNEL_ALPHA:
return gimp_babl_component_format (GIMP_RGB,
gimp_drawable_get_precision (drawable),
ALPHA);
- case GIMP_GRAY_CHANNEL:
+ case GIMP_CHANNEL_GRAY:
return gimp_babl_component_format (GIMP_GRAY,
gimp_drawable_get_precision (drawable),
GRAY);
- case GIMP_INDEXED_CHANNEL:
+ case GIMP_CHANNEL_INDEXED:
return babl_format ("Y u8"); /* will extract grayscale, the best
* we can do here */
}
@@ -1471,12 +1471,12 @@ gimp_drawable_get_component_index (GimpDrawable *drawable,
switch (channel)
{
- case GIMP_RED_CHANNEL: return RED;
- case GIMP_GREEN_CHANNEL: return GREEN;
- case GIMP_BLUE_CHANNEL: return BLUE;
- case GIMP_GRAY_CHANNEL: return GRAY;
- case GIMP_INDEXED_CHANNEL: return INDEXED;
- case GIMP_ALPHA_CHANNEL:
+ case GIMP_CHANNEL_RED: return RED;
+ case GIMP_CHANNEL_GREEN: return GREEN;
+ case GIMP_CHANNEL_BLUE: return BLUE;
+ case GIMP_CHANNEL_GRAY: return GRAY;
+ case GIMP_CHANNEL_INDEXED: return INDEXED;
+ case GIMP_CHANNEL_ALPHA:
switch (gimp_drawable_get_base_type (drawable))
{
case GIMP_RGB: return ALPHA;
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index f400f9c..5a81a91 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -2696,32 +2696,32 @@ gimp_image_get_component_format (GimpImage *image,
switch (channel)
{
- case GIMP_RED_CHANNEL:
+ case GIMP_CHANNEL_RED:
return gimp_babl_component_format (GIMP_RGB,
gimp_image_get_precision (image),
RED);
- case GIMP_GREEN_CHANNEL:
+ case GIMP_CHANNEL_GREEN:
return gimp_babl_component_format (GIMP_RGB,
gimp_image_get_precision (image),
GREEN);
- case GIMP_BLUE_CHANNEL:
+ case GIMP_CHANNEL_BLUE:
return gimp_babl_component_format (GIMP_RGB,
gimp_image_get_precision (image),
BLUE);
- case GIMP_ALPHA_CHANNEL:
+ case GIMP_CHANNEL_ALPHA:
return gimp_babl_component_format (GIMP_RGB,
gimp_image_get_precision (image),
ALPHA);
- case GIMP_GRAY_CHANNEL:
+ case GIMP_CHANNEL_GRAY:
return gimp_babl_component_format (GIMP_GRAY,
gimp_image_get_precision (image),
GRAY);
- case GIMP_INDEXED_CHANNEL:
+ case GIMP_CHANNEL_INDEXED:
return babl_format ("Y u8"); /* will extract grayscale, the best
* we can do here */
}
@@ -2737,12 +2737,12 @@ gimp_image_get_component_index (GimpImage *image,
switch (channel)
{
- case GIMP_RED_CHANNEL: return RED;
- case GIMP_GREEN_CHANNEL: return GREEN;
- case GIMP_BLUE_CHANNEL: return BLUE;
- case GIMP_GRAY_CHANNEL: return GRAY;
- case GIMP_INDEXED_CHANNEL: return INDEXED;
- case GIMP_ALPHA_CHANNEL:
+ case GIMP_CHANNEL_RED: return RED;
+ case GIMP_CHANNEL_GREEN: return GREEN;
+ case GIMP_CHANNEL_BLUE: return BLUE;
+ case GIMP_CHANNEL_GRAY: return GRAY;
+ case GIMP_CHANNEL_INDEXED: return INDEXED;
+ case GIMP_CHANNEL_ALPHA:
switch (gimp_image_get_base_type (image))
{
case GIMP_RGB: return ALPHA;
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index dbea13a..3e73075 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -1486,7 +1486,7 @@ gimp_layer_create_mask (GimpLayer *layer,
dest_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (mask));
component_format =
- gimp_image_get_component_format (image, GIMP_ALPHA_CHANNEL);
+ gimp_image_get_component_format (image, GIMP_CHANNEL_ALPHA);
gegl_buffer_set_format (dest_buffer, component_format);
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
diff --git a/app/pdb/channel-cmds.c b/app/pdb/channel-cmds.c
index 4502531..a80c6f5 100644
--- a/app/pdb/channel-cmds.c
+++ b/app/pdb/channel-cmds.c
@@ -460,7 +460,7 @@ register_channel_procs (GimpPDB *pdb)
"component",
"The image component",
GIMP_TYPE_CHANNEL_TYPE,
- GIMP_RED_CHANNEL,
+ GIMP_CHANNEL_RED,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index c53ee66..00c3e10 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -1885,9 +1885,9 @@ image_get_component_active_invoker (GimpProcedure *procedure,
if (success)
{
- if (component == GIMP_GRAY_CHANNEL)
+ if (component == GIMP_CHANNEL_GRAY)
success = gimp_pdb_image_is_base_type (image, GIMP_GRAY, error);
- else if (component == GIMP_INDEXED_CHANNEL)
+ else if (component == GIMP_CHANNEL_INDEXED)
success = gimp_pdb_image_is_base_type (image, GIMP_INDEXED, error);
else
success = gimp_pdb_image_is_base_type (image, GIMP_RGB, error);
@@ -1924,9 +1924,9 @@ image_set_component_active_invoker (GimpProcedure *procedure,
if (success)
{
- if (component == GIMP_GRAY_CHANNEL)
+ if (component == GIMP_CHANNEL_GRAY)
success = gimp_pdb_image_is_base_type (image, GIMP_GRAY, error);
- else if (component == GIMP_INDEXED_CHANNEL)
+ else if (component == GIMP_CHANNEL_INDEXED)
success = gimp_pdb_image_is_base_type (image, GIMP_INDEXED, error);
else
success = gimp_pdb_image_is_base_type (image, GIMP_RGB, error);
@@ -1958,9 +1958,9 @@ image_get_component_visible_invoker (GimpProcedure *procedure,
if (success)
{
- if (component == GIMP_GRAY_CHANNEL)
+ if (component == GIMP_CHANNEL_GRAY)
success = gimp_pdb_image_is_base_type (image, GIMP_GRAY, error);
- else if (component == GIMP_INDEXED_CHANNEL)
+ else if (component == GIMP_CHANNEL_INDEXED)
success = gimp_pdb_image_is_base_type (image, GIMP_INDEXED, error);
else
success = gimp_pdb_image_is_base_type (image, GIMP_RGB, error);
@@ -1997,9 +1997,9 @@ image_set_component_visible_invoker (GimpProcedure *procedure,
if (success)
{
- if (component == GIMP_GRAY_CHANNEL)
+ if (component == GIMP_CHANNEL_GRAY)
success = gimp_pdb_image_is_base_type (image, GIMP_GRAY, error);
- else if (component == GIMP_INDEXED_CHANNEL)
+ else if (component == GIMP_CHANNEL_INDEXED)
success = gimp_pdb_image_is_base_type (image, GIMP_INDEXED, error);
else
success = gimp_pdb_image_is_base_type (image, GIMP_RGB, error);
@@ -4559,7 +4559,7 @@ register_image_procs (GimpPDB *pdb)
"component",
"The image component",
GIMP_TYPE_CHANNEL_TYPE,
- GIMP_RED_CHANNEL,
+ GIMP_CHANNEL_RED,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("active",
@@ -4595,7 +4595,7 @@ register_image_procs (GimpPDB *pdb)
"component",
"The image component",
GIMP_TYPE_CHANNEL_TYPE,
- GIMP_RED_CHANNEL,
+ GIMP_CHANNEL_RED,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("active",
@@ -4631,7 +4631,7 @@ register_image_procs (GimpPDB *pdb)
"component",
"The image component",
GIMP_TYPE_CHANNEL_TYPE,
- GIMP_RED_CHANNEL,
+ GIMP_CHANNEL_RED,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("visible",
@@ -4667,7 +4667,7 @@ register_image_procs (GimpPDB *pdb)
"component",
"The image component",
GIMP_TYPE_CHANNEL_TYPE,
- GIMP_RED_CHANNEL,
+ GIMP_CHANNEL_RED,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("visible",
diff --git a/app/tools/gimpforegroundselectoptions.c b/app/tools/gimpforegroundselectoptions.c
index c6ad679..18ef257 100644
--- a/app/tools/gimpforegroundselectoptions.c
+++ b/app/tools/gimpforegroundselectoptions.c
@@ -100,7 +100,7 @@ gimp_foreground_select_options_class_init (GimpForegroundSelectOptionsClass *kla
_("Preview color"),
_("Color of selection preview mask"),
GIMP_TYPE_CHANNEL_TYPE,
- GIMP_BLUE_CHANNEL,
+ GIMP_CHANNEL_BLUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_ENUM (object_class, PROP_ENGINE,
@@ -301,7 +301,7 @@ gimp_foreground_select_options_gui (GimpToolOptions *tool_options)
/* mask color */
combo = gimp_prop_enum_combo_box_new (config, "mask-color",
- GIMP_RED_CHANNEL, GIMP_GRAY_CHANNEL);
+ GIMP_CHANNEL_RED, GIMP_CHANNEL_GRAY);
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Preview color"));
g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
@@ -374,19 +374,19 @@ gimp_foreground_select_options_get_mask_color (GimpForegroundSelectOptions *opti
switch (options->mask_color)
{
- case GIMP_RED_CHANNEL:
+ case GIMP_CHANNEL_RED:
gimp_rgba_set (color, 1, 0, 0, 0.7);
break;
- case GIMP_GREEN_CHANNEL:
+ case GIMP_CHANNEL_GREEN:
gimp_rgba_set (color, 0, 1, 0, 0.7);
break;
- case GIMP_BLUE_CHANNEL:
+ case GIMP_CHANNEL_BLUE:
gimp_rgba_set (color, 0, 0, 1, 0.7);
break;
- case GIMP_GRAY_CHANNEL:
+ case GIMP_CHANNEL_GRAY:
gimp_rgba_set (color, 1, 1, 1, 0.7);
break;
diff --git a/app/widgets/gimpcomponenteditor.c b/app/widgets/gimpcomponenteditor.c
index d6e5a2b..52291c4 100644
--- a/app/widgets/gimpcomponenteditor.c
+++ b/app/widgets/gimpcomponenteditor.c
@@ -342,24 +342,24 @@ gimp_component_editor_create_components (GimpComponentEditor *editor)
{
case GIMP_RGB:
n_components = 3;
- components[0] = GIMP_RED_CHANNEL;
- components[1] = GIMP_GREEN_CHANNEL;
- components[2] = GIMP_BLUE_CHANNEL;
+ components[0] = GIMP_CHANNEL_RED;
+ components[1] = GIMP_CHANNEL_GREEN;
+ components[2] = GIMP_CHANNEL_BLUE;
break;
case GIMP_GRAY:
n_components = 1;
- components[0] = GIMP_GRAY_CHANNEL;
+ components[0] = GIMP_CHANNEL_GRAY;
break;
case GIMP_INDEXED:
n_components = 1;
- components[0] = GIMP_INDEXED_CHANNEL;
+ components[0] = GIMP_CHANNEL_INDEXED;
break;
}
if (gimp_image_has_alpha (image))
- components[n_components++] = GIMP_ALPHA_CHANNEL;
+ components[n_components++] = GIMP_CHANNEL_ALPHA;
enum_class = g_type_class_ref (GIMP_TYPE_CHANNEL_TYPE);
diff --git a/app/widgets/gimpviewrendererimage.c b/app/widgets/gimpviewrendererimage.c
index 17686a3..ae51436 100644
--- a/app/widgets/gimpviewrendererimage.c
+++ b/app/widgets/gimpviewrendererimage.c
@@ -72,7 +72,7 @@ gimp_view_renderer_image_render (GimpViewRenderer *renderer,
*/
if (rendererimage->channel == -1 ||
(gimp_image_get_component_visible (image, rendererimage->channel) &&
- gimp_image_get_component_visible (image, GIMP_ALPHA_CHANNEL)))
+ gimp_image_get_component_visible (image, GIMP_CHANNEL_ALPHA)))
{
gint view_width;
gint view_height;
@@ -158,12 +158,12 @@ gimp_view_renderer_image_render (GimpViewRenderer *renderer,
switch (rendererimage->channel)
{
- case GIMP_RED_CHANNEL: icon_name = GIMP_STOCK_CHANNEL_RED; break;
- case GIMP_GREEN_CHANNEL: icon_name = GIMP_STOCK_CHANNEL_GREEN; break;
- case GIMP_BLUE_CHANNEL: icon_name = GIMP_STOCK_CHANNEL_BLUE; break;
- case GIMP_GRAY_CHANNEL: icon_name = GIMP_STOCK_CHANNEL_GRAY; break;
- case GIMP_INDEXED_CHANNEL: icon_name = GIMP_STOCK_CHANNEL_INDEXED; break;
- case GIMP_ALPHA_CHANNEL: icon_name = GIMP_STOCK_CHANNEL_ALPHA; break;
+ case GIMP_CHANNEL_RED: icon_name = GIMP_STOCK_CHANNEL_RED; break;
+ case GIMP_CHANNEL_GREEN: icon_name = GIMP_STOCK_CHANNEL_GREEN; break;
+ case GIMP_CHANNEL_BLUE: icon_name = GIMP_STOCK_CHANNEL_BLUE; break;
+ case GIMP_CHANNEL_GRAY: icon_name = GIMP_STOCK_CHANNEL_GRAY; break;
+ case GIMP_CHANNEL_INDEXED: icon_name = GIMP_STOCK_CHANNEL_INDEXED; break;
+ case GIMP_CHANNEL_ALPHA: icon_name = GIMP_STOCK_CHANNEL_ALPHA; break;
default:
icon_name = gimp_viewable_get_icon_name (renderer->viewable);
diff --git a/libgimpbase/gimpbase-private.c b/libgimpbase/gimpbase-private.c
index 43550cd..180d83a 100644
--- a/libgimpbase/gimpbase-private.c
+++ b/libgimpbase/gimpbase-private.c
@@ -53,14 +53,26 @@ gimp_base_init (GimpUnitVtable *vtable)
(gpointer) GIMP_TYPE_BLEND_MODE_COMPAT);
g_type_set_qdata (GIMP_TYPE_BUCKET_FILL_MODE, quark,
(gpointer) GIMP_TYPE_BUCKET_FILL_MODE_COMPAT);
+ g_type_set_qdata (GIMP_TYPE_CHANNEL_TYPE, quark,
+ (gpointer) GIMP_TYPE_CHANNEL_TYPE_COMPAT);
g_type_set_qdata (GIMP_TYPE_CLONE_TYPE, quark,
(gpointer) GIMP_TYPE_CLONE_TYPE_COMPAT);
g_type_set_qdata (GIMP_TYPE_CONVOLVE_TYPE, quark,
(gpointer) GIMP_TYPE_CONVOLVE_TYPE_COMPAT);
+ g_type_set_qdata (GIMP_TYPE_DESATURATE_MODE, quark,
+ (gpointer) GIMP_TYPE_DESATURATE_MODE_COMPAT);
+ g_type_set_qdata (GIMP_TYPE_DODGE_BURN_TYPE, quark,
+ (gpointer) GIMP_TYPE_DODGE_BURN_TYPE_COMPAT);
g_type_set_qdata (GIMP_TYPE_FILL_TYPE, quark,
(gpointer) GIMP_TYPE_FILL_TYPE_COMPAT);
g_type_set_qdata (GIMP_TYPE_HUE_RANGE, quark,
(gpointer) GIMP_TYPE_HUE_RANGE_COMPAT);
+ g_type_set_qdata (GIMP_TYPE_ICON_TYPE, quark,
+ (gpointer) GIMP_TYPE_ICON_TYPE_COMPAT);
+ g_type_set_qdata (GIMP_TYPE_INTERPOLATION_TYPE, quark,
+ (gpointer) GIMP_TYPE_INTERPOLATION_TYPE_COMPAT);
+ g_type_set_qdata (GIMP_TYPE_TRANSFER_MODE, quark,
+ (gpointer) GIMP_TYPE_TRANSFER_MODE_COMPAT);
gimp_base_initialized = TRUE;
}
diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c
index d7eb98c..0e70378 100644
--- a/libgimpbase/gimpbaseenums.c
+++ b/libgimpbase/gimpbaseenums.c
@@ -217,23 +217,23 @@ gimp_channel_type_get_type (void)
{
static const GEnumValue values[] =
{
- { GIMP_RED_CHANNEL, "GIMP_RED_CHANNEL", "red-channel" },
- { GIMP_GREEN_CHANNEL, "GIMP_GREEN_CHANNEL", "green-channel" },
- { GIMP_BLUE_CHANNEL, "GIMP_BLUE_CHANNEL", "blue-channel" },
- { GIMP_GRAY_CHANNEL, "GIMP_GRAY_CHANNEL", "gray-channel" },
- { GIMP_INDEXED_CHANNEL, "GIMP_INDEXED_CHANNEL", "indexed-channel" },
- { GIMP_ALPHA_CHANNEL, "GIMP_ALPHA_CHANNEL", "alpha-channel" },
+ { GIMP_CHANNEL_RED, "GIMP_CHANNEL_RED", "red" },
+ { GIMP_CHANNEL_GREEN, "GIMP_CHANNEL_GREEN", "green" },
+ { GIMP_CHANNEL_BLUE, "GIMP_CHANNEL_BLUE", "blue" },
+ { GIMP_CHANNEL_GRAY, "GIMP_CHANNEL_GRAY", "gray" },
+ { GIMP_CHANNEL_INDEXED, "GIMP_CHANNEL_INDEXED", "indexed" },
+ { GIMP_CHANNEL_ALPHA, "GIMP_CHANNEL_ALPHA", "alpha" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
- { GIMP_RED_CHANNEL, NC_("channel-type", "Red"), NULL },
- { GIMP_GREEN_CHANNEL, NC_("channel-type", "Green"), NULL },
- { GIMP_BLUE_CHANNEL, NC_("channel-type", "Blue"), NULL },
- { GIMP_GRAY_CHANNEL, NC_("channel-type", "Gray"), NULL },
- { GIMP_INDEXED_CHANNEL, NC_("channel-type", "Indexed"), NULL },
- { GIMP_ALPHA_CHANNEL, NC_("channel-type", "Alpha"), NULL },
+ { GIMP_CHANNEL_RED, NC_("channel-type", "Red"), NULL },
+ { GIMP_CHANNEL_GREEN, NC_("channel-type", "Green"), NULL },
+ { GIMP_CHANNEL_BLUE, NC_("channel-type", "Blue"), NULL },
+ { GIMP_CHANNEL_GRAY, NC_("channel-type", "Gray"), NULL },
+ { GIMP_CHANNEL_INDEXED, NC_("channel-type", "Indexed"), NULL },
+ { GIMP_CHANNEL_ALPHA, NC_("channel-type", "Alpha"), NULL },
{ 0, NULL, NULL }
};
diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h
index 69757b7..056a7f1 100644
--- a/libgimpbase/gimpbaseenums.h
+++ b/libgimpbase/gimpbaseenums.h
@@ -141,12 +141,21 @@ GType gimp_channel_type_get_type (void) G_GNUC_CONST;
typedef enum
{
- GIMP_RED_CHANNEL, /*< desc="Red" >*/
- GIMP_GREEN_CHANNEL, /*< desc="Green" >*/
- GIMP_BLUE_CHANNEL, /*< desc="Blue" >*/
- GIMP_GRAY_CHANNEL, /*< desc="Gray" >*/
- GIMP_INDEXED_CHANNEL, /*< desc="Indexed" >*/
- GIMP_ALPHA_CHANNEL /*< desc="Alpha" >*/
+ GIMP_CHANNEL_RED, /*< desc="Red" >*/
+ GIMP_CHANNEL_GREEN, /*< desc="Green" >*/
+ GIMP_CHANNEL_BLUE, /*< desc="Blue" >*/
+ GIMP_CHANNEL_GRAY, /*< desc="Gray" >*/
+ GIMP_CHANNEL_INDEXED, /*< desc="Indexed" >*/
+ GIMP_CHANNEL_ALPHA, /*< desc="Alpha" >*/
+
+#ifndef GIMP_DISABLE_DEPRECATED
+ GIMP_RED_CHANNEL = GIMP_CHANNEL_RED, /*< skip, pdb-skip >*/
+ GIMP_GREEN_CHANNEL = GIMP_CHANNEL_GREEN, /*< skip, pdb-skip >*/
+ GIMP_BLUE_CHANNEL = GIMP_CHANNEL_BLUE, /*< skip, pdb-skip >*/
+ GIMP_GRAY_CHANNEL = GIMP_CHANNEL_GRAY, /*< skip, pdb-skip >*/
+ GIMP_INDEXED_CHANNEL = GIMP_CHANNEL_INDEXED, /*< skip, pdb-skip >*/
+ GIMP_ALPHA_CHANNEL = GIMP_CHANNEL_ALPHA /*< skip, pdb-skip >*/
+#endif /* GIMP_DISABLE_DEPRECATED */
} GimpChannelType;
diff --git a/libgimpbase/gimpcompatenums.c b/libgimpbase/gimpcompatenums.c
index 41bb79a..7736665 100644
--- a/libgimpbase/gimpcompatenums.c
+++ b/libgimpbase/gimpcompatenums.c
@@ -115,6 +115,44 @@ gimp_bucket_fill_mode_compat_get_type (void)
}
GType
+gimp_channel_type_compat_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_RED_CHANNEL, "GIMP_RED_CHANNEL", "red-channel" },
+ { GIMP_GREEN_CHANNEL, "GIMP_GREEN_CHANNEL", "green-channel" },
+ { GIMP_BLUE_CHANNEL, "GIMP_BLUE_CHANNEL", "blue-channel" },
+ { GIMP_GRAY_CHANNEL, "GIMP_GRAY_CHANNEL", "gray-channel" },
+ { GIMP_INDEXED_CHANNEL, "GIMP_INDEXED_CHANNEL", "indexed-channel" },
+ { GIMP_ALPHA_CHANNEL, "GIMP_ALPHA_CHANNEL", "alpha-channel" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_RED_CHANNEL, "GIMP_RED_CHANNEL", NULL },
+ { GIMP_GREEN_CHANNEL, "GIMP_GREEN_CHANNEL", NULL },
+ { GIMP_BLUE_CHANNEL, "GIMP_BLUE_CHANNEL", NULL },
+ { GIMP_GRAY_CHANNEL, "GIMP_GRAY_CHANNEL", NULL },
+ { GIMP_INDEXED_CHANNEL, "GIMP_INDEXED_CHANNEL", NULL },
+ { GIMP_ALPHA_CHANNEL, "GIMP_ALPHA_CHANNEL", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpChannelTypeCompat", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "channel-type-compat");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
gimp_clone_type_compat_get_type (void)
{
static const GEnumValue values[] =
@@ -175,6 +213,64 @@ gimp_convolve_type_compat_get_type (void)
}
GType
+gimp_desaturate_mode_compat_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_DESATURATE_LUMINOSITY, "GIMP_DESATURATE_LUMINOSITY", "luminosity" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_DESATURATE_LUMINOSITY, "GIMP_DESATURATE_LUMINOSITY", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpDesaturateModeCompat", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "desaturate-mode-compat");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
+gimp_dodge_burn_type_compat_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_DODGE, "GIMP_DODGE", "dodge" },
+ { GIMP_BURN, "GIMP_BURN", "burn" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_DODGE, "GIMP_DODGE", NULL },
+ { GIMP_BURN, "GIMP_BURN", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpDodgeBurnTypeCompat", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "dodge-burn-type-compat");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
gimp_fill_type_compat_get_type (void)
{
static const GEnumValue values[] =
@@ -250,6 +346,94 @@ gimp_hue_range_compat_get_type (void)
return type;
}
+GType
+gimp_icon_type_compat_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_ICON_TYPE_STOCK_ID, "GIMP_ICON_TYPE_STOCK_ID", "id" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_ICON_TYPE_STOCK_ID, "GIMP_ICON_TYPE_STOCK_ID", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpIconTypeCompat", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "icon-type-compat");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
+gimp_interpolation_type_compat_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_INTERPOLATION_LANCZOS, "GIMP_INTERPOLATION_LANCZOS", "lanczos" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_INTERPOLATION_LANCZOS, "GIMP_INTERPOLATION_LANCZOS", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpInterpolationTypeCompat", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "interpolation-type-compat");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
+gimp_transfer_mode_compat_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_SHADOWS, "GIMP_SHADOWS", "shadows" },
+ { GIMP_MIDTONES, "GIMP_MIDTONES", "midtones" },
+ { GIMP_HIGHLIGHTS, "GIMP_HIGHLIGHTS", "highlights" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_SHADOWS, "GIMP_SHADOWS", NULL },
+ { GIMP_MIDTONES, "GIMP_MIDTONES", NULL },
+ { GIMP_HIGHLIGHTS, "GIMP_HIGHLIGHTS", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpTransferModeCompat", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "transfer-mode-compat");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
/* Generated data ends here */
diff --git a/libgimpbase/gimpcompatenums.h b/libgimpbase/gimpcompatenums.h
index c748697..32fffc4 100644
--- a/libgimpbase/gimpcompatenums.h
+++ b/libgimpbase/gimpcompatenums.h
@@ -68,6 +68,21 @@ typedef enum
} GimpBucketFillModeCompat;
+#define GIMP_TYPE_CHANNEL_TYPE_COMPAT (gimp_channel_type_compat_get_type ())
+
+GType gimp_channel_type_compat_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_RED_CHANNEL = GIMP_CHANNEL_RED,
+ GIMP_GREEN_CHANNEL = GIMP_CHANNEL_GREEN,
+ GIMP_BLUE_CHANNEL = GIMP_CHANNEL_BLUE,
+ GIMP_GRAY_CHANNEL = GIMP_CHANNEL_GRAY,
+ GIMP_INDEXED_CHANNEL = GIMP_CHANNEL_INDEXED,
+ GIMP_ALPHA_CHANNEL = GIMP_CHANNEL_ALPHA
+} GimpChannelTypeCompat;
+
+
#define GIMP_TYPE_CLONE_TYPE_COMPAT (gimp_clone_type_compat_get_type ())
GType gimp_clone_type_compat_get_type (void) G_GNUC_CONST;
@@ -90,6 +105,27 @@ typedef enum
} GimpConvolveTypeCompat;
+#define GIMP_TYPE_DESATURATE_MODE_COMPAT (gimp_desaturate_mode_compat_get_type ())
+
+GType gimp_desaturate_mode_compat_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_DESATURATE_LUMINOSITY = GIMP_DESATURATE_LUMA
+} GimpDesaturateModeCompat;
+
+
+#define GIMP_TYPE_DODGE_BURN_TYPE_COMPAT (gimp_dodge_burn_type_compat_get_type ())
+
+GType gimp_dodge_burn_type_compat_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_DODGE = GIMP_DODGE_BURN_TYPE_DODGE,
+ GIMP_BURN = GIMP_DODGE_BURN_TYPE_BURN
+} GimpDodgeBurnTypeCompat;
+
+
#define GIMP_TYPE_FILL_TYPE_COMPAT (gimp_fill_type_compat_get_type ())
GType gimp_fill_type_compat_get_type (void) G_GNUC_CONST;
@@ -110,16 +146,48 @@ GType gimp_hue_range_compat_get_type (void) G_GNUC_CONST;
typedef enum
{
- GIMP_ALL_HUES,
- GIMP_RED_HUES,
- GIMP_YELLOW_HUES,
- GIMP_GREEN_HUES,
- GIMP_CYAN_HUES,
- GIMP_BLUE_HUES,
- GIMP_MAGENTA_HUES
+ GIMP_ALL_HUES = GIMP_HUE_RANGE_ALL,
+ GIMP_RED_HUES = GIMP_HUE_RANGE_RED,
+ GIMP_YELLOW_HUES = GIMP_HUE_RANGE_YELLOW,
+ GIMP_GREEN_HUES = GIMP_HUE_RANGE_GREEN,
+ GIMP_CYAN_HUES = GIMP_HUE_RANGE_CYAN,
+ GIMP_BLUE_HUES = GIMP_HUE_RANGE_BLUE,
+ GIMP_MAGENTA_HUES = GIMP_HUE_RANGE_MAGENTA
} GimpHueRangeCompat;
+#define GIMP_TYPE_ICON_TYPE_COMPAT (gimp_icon_type_compat_get_type ())
+
+GType gimp_icon_type_compat_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_ICON_TYPE_STOCK_ID = GIMP_ICON_TYPE_ICON_NAME
+} GimpIconTypeCompat;
+
+
+#define GIMP_TYPE_INTERPOLATION_TYPE_COMPAT (gimp_interpolation_type_compat_get_type ())
+
+GType gimp_interpolation_type_compat_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_INTERPOLATION_LANCZOS = GIMP_INTERPOLATION_NOHALO
+} GimpInterpolationTypeCompat;
+
+
+#define GIMP_TYPE_TRANSFER_MODE_COMPAT (gimp_transfer_mode_compat_get_type ())
+
+GType gimp_transfer_mode_compat_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_SHADOWS = GIMP_TRANSFER_SHADOWS,
+ GIMP_MIDTONES = GIMP_TRANSFER_MIDTONES,
+ GIMP_HIGHLIGHTS = GIMP_TRANSFER_HIGHLIGHTS
+} GimpTransferModeCompat;
+
+
G_END_DECLS
#endif /* __GIMP_COMPAT_ENUMS_H__ */
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index fefc0aa..a1632c2 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -84,15 +84,15 @@ package Gimp::CodeGen::enums;
GimpChannelType =>
{ contig => 1,
header => 'libgimpbase/gimpbaseenums.h',
- symbols => [ qw(GIMP_RED_CHANNEL GIMP_GREEN_CHANNEL
- GIMP_BLUE_CHANNEL GIMP_GRAY_CHANNEL
- GIMP_INDEXED_CHANNEL GIMP_ALPHA_CHANNEL) ],
- mapping => { GIMP_RED_CHANNEL => '0',
- GIMP_GREEN_CHANNEL => '1',
- GIMP_BLUE_CHANNEL => '2',
- GIMP_GRAY_CHANNEL => '3',
- GIMP_INDEXED_CHANNEL => '4',
- GIMP_ALPHA_CHANNEL => '5' }
+ symbols => [ qw(GIMP_CHANNEL_RED GIMP_CHANNEL_GREEN
+ GIMP_CHANNEL_BLUE GIMP_CHANNEL_GRAY
+ GIMP_CHANNEL_INDEXED GIMP_CHANNEL_ALPHA) ],
+ mapping => { GIMP_CHANNEL_RED => '0',
+ GIMP_CHANNEL_GREEN => '1',
+ GIMP_CHANNEL_BLUE => '2',
+ GIMP_CHANNEL_GRAY => '3',
+ GIMP_CHANNEL_INDEXED => '4',
+ GIMP_CHANNEL_ALPHA => '5' }
},
GimpCloneType =>
{ contig => 1,
diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb
index a487a73..b9feb9e 100644
--- a/tools/pdbgen/pdb/image.pdb
+++ b/tools/pdbgen/pdb/image.pdb
@@ -1847,9 +1847,9 @@ HELP
%invoke = (
code => <<'CODE'
{
- if (component == GIMP_GRAY_CHANNEL)
+ if (component == GIMP_CHANNEL_GRAY)
success = gimp_pdb_image_is_base_type (image, GIMP_GRAY, error);
- else if (component == GIMP_INDEXED_CHANNEL)
+ else if (component == GIMP_CHANNEL_INDEXED)
success = gimp_pdb_image_is_base_type (image, GIMP_INDEXED, error);
else
success = gimp_pdb_image_is_base_type (image, GIMP_RGB, error);
@@ -1885,9 +1885,9 @@ HELP
%invoke = (
code => <<'CODE'
{
- if (component == GIMP_GRAY_CHANNEL)
+ if (component == GIMP_CHANNEL_GRAY)
success = gimp_pdb_image_is_base_type (image, GIMP_GRAY, error);
- else if (component == GIMP_INDEXED_CHANNEL)
+ else if (component == GIMP_CHANNEL_INDEXED)
success = gimp_pdb_image_is_base_type (image, GIMP_INDEXED, error);
else
success = gimp_pdb_image_is_base_type (image, GIMP_RGB, error);
@@ -1926,9 +1926,9 @@ HELP
%invoke = (
code => <<'CODE'
{
- if (component == GIMP_GRAY_CHANNEL)
+ if (component == GIMP_CHANNEL_GRAY)
success = gimp_pdb_image_is_base_type (image, GIMP_GRAY, error);
- else if (component == GIMP_INDEXED_CHANNEL)
+ else if (component == GIMP_CHANNEL_INDEXED)
success = gimp_pdb_image_is_base_type (image, GIMP_INDEXED, error);
else
success = gimp_pdb_image_is_base_type (image, GIMP_RGB, error);
@@ -1964,9 +1964,9 @@ HELP
%invoke = (
code => <<'CODE'
{
- if (component == GIMP_GRAY_CHANNEL)
+ if (component == GIMP_CHANNEL_GRAY)
success = gimp_pdb_image_is_base_type (image, GIMP_GRAY, error);
- else if (component == GIMP_INDEXED_CHANNEL)
+ else if (component == GIMP_CHANNEL_INDEXED)
success = gimp_pdb_image_is_base_type (image, GIMP_INDEXED, error);
else
success = gimp_pdb_image_is_base_type (image, GIMP_RGB, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]