From d68b730a827ad504ffca3defecb1a119ab43a86d Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Mon, 18 Mar 2002 16:22:14 +0000 Subject: [PATCH] app/core/core-enums.h more enum cleanup (ChannelOps this time). 2002-03-18 Sven Neumann * app/core/core-enums.h * app/core/core-types.h: more enum cleanup (ChannelOps this time). * app/core/gimpchannel.[ch] * app/core/gimpimage-mask-select.[ch] * app/gui/channels-commands.c * app/gui/vectors-commands.c * app/tools/gimpbezierselecttool.c * app/tools/tools-types.h * app/widgets/gimpchannellistview.[ch] * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/selection_tools.pdb: changed accordingly. * app/pdb/channel_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. --- ChangeLog | 23 ++++ app/actions/channels-commands.c | 14 +-- app/actions/vectors-commands.c | 14 +-- app/core/core-enums.h | 8 ++ app/core/core-types.h | 9 -- app/core/gimpchannel-combine.c | 87 ++++++++------ app/core/gimpchannel-combine.h | 6 +- app/core/gimpchannel-select.c | 147 ++++++++++++----------- app/core/gimpchannel-select.h | 130 ++++++++++---------- app/core/gimpchannel.c | 87 ++++++++------ app/core/gimpchannel.h | 6 +- app/core/gimpimage-mask-select.c | 147 ++++++++++++----------- app/core/gimpimage-mask-select.h | 130 ++++++++++---------- app/gui/channels-commands.c | 14 +-- app/gui/vectors-commands.c | 14 +-- app/pdb/channel_cmds.c | 6 +- app/pdb/selection_cmds.c | 6 +- app/pdb/selection_tools_cmds.c | 22 ++-- app/tools/gimpbezierselecttool.c | 14 +-- app/tools/tools-types.h | 8 +- app/widgets/gimpchannellistview.c | 14 +-- app/widgets/gimpchanneltreeview.c | 14 +-- app/widgets/gimpvectorslistview.c | 12 +- app/widgets/gimpvectorstreeview.c | 12 +- libgimp/gimpenums.h | 16 +-- plug-ins/script-fu/script-fu-constants.c | 10 +- tools/pdbgen/enums.pl | 20 +-- tools/pdbgen/pdb/channel.pdb | 2 +- tools/pdbgen/pdb/selection.pdb | 2 +- tools/pdbgen/pdb/selection_tools.pdb | 2 +- 30 files changed, 519 insertions(+), 477 deletions(-) diff --git a/ChangeLog b/ChangeLog index ece9e14a98..bbbbd2422d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2002-03-18 Sven Neumann + + * app/core/core-enums.h + * app/core/core-types.h: more enum cleanup (ChannelOps this time). + + * app/core/gimpchannel.[ch] + * app/core/gimpimage-mask-select.[ch] + * app/gui/channels-commands.c + * app/gui/vectors-commands.c + * app/tools/gimpbezierselecttool.c + * app/tools/tools-types.h + * app/widgets/gimpchannellistview.[ch] + * tools/pdbgen/pdb/channel.pdb + * tools/pdbgen/pdb/selection.pdb + * tools/pdbgen/pdb/selection_tools.pdb: changed accordingly. + + * app/pdb/channel_cmds.c + * app/pdb/selection_cmds.c + * app/pdb/selection_tools_cmds.c + * libgimp/gimpenums.h + * plug-ins/script-fu/script-fu-constants.c + * tools/pdbgen/enums.pl: regenerated. + 2002-03-18 Sven Neumann * app/core/core-enums.h diff --git a/app/actions/channels-commands.c b/app/actions/channels-commands.c index 1cfb111ccb..3aa4234e80 100644 --- a/app/actions/channels-commands.c +++ b/app/actions/channels-commands.c @@ -133,9 +133,9 @@ channels_delete_channel_cmd_callback (GtkWidget *widget, } static void -channels_channel_to_sel (GtkWidget *widget, - gpointer data, - ChannelOps op) +channels_channel_to_sel (GtkWidget *widget, + gpointer data, + GimpChannelOps op) { GimpImage *gimage; GimpChannel *active_channel; @@ -153,28 +153,28 @@ void channels_channel_to_sel_cmd_callback (GtkWidget *widget, gpointer data) { - channels_channel_to_sel (widget, data, CHANNEL_OP_REPLACE); + channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE); } void channels_add_channel_to_sel_cmd_callback (GtkWidget *widget, gpointer data) { - channels_channel_to_sel (widget, data, CHANNEL_OP_ADD); + channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_ADD); } void channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget, gpointer data) { - channels_channel_to_sel (widget, data, CHANNEL_OP_SUBTRACT); + channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT); } void channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget, gpointer data) { - channels_channel_to_sel (widget, data, CHANNEL_OP_INTERSECT); + channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT); } void diff --git a/app/actions/vectors-commands.c b/app/actions/vectors-commands.c index c5a783d5d0..fa90b3b4ab 100644 --- a/app/actions/vectors-commands.c +++ b/app/actions/vectors-commands.c @@ -137,9 +137,9 @@ vectors_delete_vectors_cmd_callback (GtkWidget *widget, } static void -vectors_vectors_to_sel (GtkWidget *widget, - gpointer data, - ChannelOps op) +vectors_vectors_to_sel (GtkWidget *widget, + gpointer data, + GimpChannelOps op) { GimpImage *gimage; GimpVectors *active_vectors; @@ -157,28 +157,28 @@ void vectors_vectors_to_sel_cmd_callback (GtkWidget *widget, gpointer data) { - vectors_vectors_to_sel (widget, data, CHANNEL_OP_REPLACE); + vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE); } void vectors_add_vectors_to_sel_cmd_callback (GtkWidget *widget, gpointer data) { - vectors_vectors_to_sel (widget, data, CHANNEL_OP_ADD); + vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_ADD); } void vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget, gpointer data) { - vectors_vectors_to_sel (widget, data, CHANNEL_OP_SUBTRACT); + vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT); } void vectors_intersect_vectors_with_sel_cmd_callback (GtkWidget *widget, gpointer data) { - vectors_vectors_to_sel (widget, data, CHANNEL_OP_INTERSECT); + vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT); } void diff --git a/app/core/core-enums.h b/app/core/core-enums.h index 44c7c5f6f1..7e73ee2b99 100644 --- a/app/core/core-enums.h +++ b/app/core/core-enums.h @@ -163,6 +163,14 @@ typedef enum /*< skip >*/ GIMP_PATTERN_BUCKET_FILL } GimpBucketFillMode; +typedef enum /*< skip >*/ +{ + GIMP_CHANNEL_OP_ADD, + GIMP_CHANNEL_OP_SUBTRACT, + GIMP_CHANNEL_OP_REPLACE, + GIMP_CHANNEL_OP_INTERSECT +} GimpChannelOps; + typedef enum /*< skip >*/ { GIMP_MAKE_PALETTE, diff --git a/app/core/core-types.h b/app/core/core-types.h index c841ac14c5..9d4df70838 100644 --- a/app/core/core-types.h +++ b/app/core/core-types.h @@ -50,15 +50,6 @@ typedef enum /*< pdb-skip >*/ ORIENTATION_VERTICAL } InternalOrientationType; -/* Selection Boolean operations */ -typedef enum -{ - CHANNEL_OP_ADD, - CHANNEL_OP_SUBTRACT, - CHANNEL_OP_REPLACE, - CHANNEL_OP_INTERSECT -} ChannelOps; - typedef enum { OFFSET_BACKGROUND, diff --git a/app/core/gimpchannel-combine.c b/app/core/gimpchannel-combine.c index d6e24b3740..eeb6cfe54a 100644 --- a/app/core/gimpchannel-combine.c +++ b/app/core/gimpchannel-combine.c @@ -827,12 +827,12 @@ gimp_channel_sub_segment (GimpChannel *mask, } void -gimp_channel_combine_rect (GimpChannel *mask, - ChannelOps op, - gint x, - gint y, - gint w, - gint h) +gimp_channel_combine_rect (GimpChannel *mask, + GimpChannelOps op, + gint x, + gint y, + gint w, + gint h) { gint x2, y2; PixelRegion maskPR; @@ -853,14 +853,16 @@ gimp_channel_combine_rect (GimpChannel *mask, pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles, x, y, x2 - x, y2 - y, TRUE); - if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE) + + if (op == GIMP_CHANNEL_OP_ADD || op == GIMP_CHANNEL_OP_REPLACE) color = 255; else color = 0; + color_region (&maskPR, &color); /* Determine new boundary */ - if (mask->bounds_known && (op == CHANNEL_OP_ADD) && !mask->empty) + if (mask->bounds_known && (op == GIMP_CHANNEL_OP_ADD) && !mask->empty) { if (x < mask->x1) mask->x1 = x; @@ -871,7 +873,7 @@ gimp_channel_combine_rect (GimpChannel *mask, if ((y + h) > mask->y2) mask->y2 = (y + h); } - else if (op == CHANNEL_OP_REPLACE || mask->empty) + else if (op == GIMP_CHANNEL_OP_REPLACE || mask->empty) { mask->empty = FALSE; mask->x1 = x; @@ -889,13 +891,13 @@ gimp_channel_combine_rect (GimpChannel *mask, } void -gimp_channel_combine_ellipse (GimpChannel *mask, - ChannelOps op, - gint x, - gint y, - gint w, - gint h, - gboolean antialias) +gimp_channel_combine_ellipse (GimpChannel *mask, + GimpChannelOps op, + gint x, + gint y, + gint w, + gint h, + gboolean antialias) { gint i, j; gint x0, x1, x2; @@ -935,11 +937,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask, switch (op) { - case CHANNEL_OP_ADD: - case CHANNEL_OP_REPLACE: + case GIMP_CHANNEL_OP_ADD: + case GIMP_CHANNEL_OP_REPLACE: gimp_channel_add_segment (mask, x1, i, (x2 - x1), 255); break; - case CHANNEL_OP_SUBTRACT: + case GIMP_CHANNEL_OP_SUBTRACT: gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255); break; default: @@ -979,11 +981,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask, { switch (op) { - case CHANNEL_OP_ADD: - case CHANNEL_OP_REPLACE: + case GIMP_CHANNEL_OP_ADD: + case GIMP_CHANNEL_OP_REPLACE: gimp_channel_add_segment (mask, x0, i, j - x0, last); break; - case CHANNEL_OP_SUBTRACT: + case GIMP_CHANNEL_OP_SUBTRACT: gimp_channel_sub_segment (mask, x0, i, j - x0, last); break; default: @@ -1005,12 +1007,19 @@ gimp_channel_combine_ellipse (GimpChannel *mask, if (last) { - if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE) - gimp_channel_add_segment (mask, x0, i, j - x0, last); - else if (op == CHANNEL_OP_SUBTRACT) - gimp_channel_sub_segment (mask, x0, i, j - x0, last); - else - g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!"); + switch (op) + { + case GIMP_CHANNEL_OP_ADD: + case GIMP_CHANNEL_OP_REPLACE: + gimp_channel_add_segment (mask, x0, i, j - x0, last); + break; + case GIMP_CHANNEL_OP_SUBTRACT: + gimp_channel_sub_segment (mask, x0, i, j - x0, last); + break; + default: + g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!"); + break; + } } } @@ -1018,7 +1027,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, } /* Determine new boundary */ - if (mask->bounds_known && (op == CHANNEL_OP_ADD) && !mask->empty) + if (mask->bounds_known && (op == GIMP_CHANNEL_OP_ADD) && !mask->empty) { if (x < mask->x1) mask->x1 = x; @@ -1029,7 +1038,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, if ((y + h) > mask->y2) mask->y2 = (y + h); } - else if (op == CHANNEL_OP_REPLACE || mask->empty) + else if (op == GIMP_CHANNEL_OP_REPLACE || mask->empty) { mask->empty = FALSE; mask->x1 = x; @@ -1120,11 +1129,11 @@ gimp_channel_combine_sub_region_intersect (gpointer unused, } void -gimp_channel_combine_mask (GimpChannel *mask, - GimpChannel *add_on, - ChannelOps op, - gint off_x, - gint off_y) +gimp_channel_combine_mask (GimpChannel *mask, + GimpChannel *add_on, + GimpChannelOps op, + gint off_x, + gint off_y) { PixelRegion srcPR, destPR; gint x1, y1, x2, y2; @@ -1149,18 +1158,18 @@ gimp_channel_combine_mask (GimpChannel *mask, switch (op) { - case CHANNEL_OP_ADD: - case CHANNEL_OP_REPLACE: + case GIMP_CHANNEL_OP_ADD: + case GIMP_CHANNEL_OP_REPLACE: pixel_regions_process_parallel ((p_func) gimp_channel_combine_sub_region_add, NULL, 2, &srcPR, &destPR); break; - case CHANNEL_OP_SUBTRACT: + case GIMP_CHANNEL_OP_SUBTRACT: pixel_regions_process_parallel ((p_func) gimp_channel_combine_sub_region_sub, NULL, 2, &srcPR, &destPR); break; - case CHANNEL_OP_INTERSECT: + case GIMP_CHANNEL_OP_INTERSECT: pixel_regions_process_parallel ((p_func) gimp_channel_combine_sub_region_intersect, NULL, 2, &srcPR, &destPR); diff --git a/app/core/gimpchannel-combine.h b/app/core/gimpchannel-combine.h index 44581612fc..17ca3aa18e 100644 --- a/app/core/gimpchannel-combine.h +++ b/app/core/gimpchannel-combine.h @@ -132,13 +132,13 @@ void gimp_channel_sub_segment (GimpChannel *mask, gint width, gint value); void gimp_channel_combine_rect (GimpChannel *mask, - ChannelOps op, + GimpChannelOps op, gint x, gint y, gint w, gint h); void gimp_channel_combine_ellipse (GimpChannel *mask, - ChannelOps op, + GimpChannelOps op, gint x, gint y, gint w, @@ -146,7 +146,7 @@ void gimp_channel_combine_ellipse (GimpChannel *mask, gboolean antialias); void gimp_channel_combine_mask (GimpChannel *mask, GimpChannel *add_on, - ChannelOps op, + GimpChannelOps op, gint off_x, gint off_y); diff --git a/app/core/gimpchannel-select.c b/app/core/gimpchannel-select.c index a2a10ec210..5f31355953 100644 --- a/app/core/gimpchannel-select.c +++ b/app/core/gimpchannel-select.c @@ -34,20 +34,20 @@ void -gimp_image_mask_select_rectangle (GimpImage *gimage, - gint x, - gint y, - gint w, - gint h, - ChannelOps op, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_rectangle (GimpImage *gimage, + gint x, + gint y, + gint w, + gint h, + GimpChannelOps op, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { g_return_if_fail (GIMP_IS_IMAGE (gimage)); /* if applicable, replace the current selection */ - if (op == CHANNEL_OP_REPLACE) + if (op == GIMP_CHANNEL_OP_REPLACE) gimp_image_mask_clear (gimage); else gimp_image_mask_undo (gimage); @@ -55,12 +55,12 @@ gimp_image_mask_select_rectangle (GimpImage *gimage, /* if feathering for rect, make a new mask with the * rectangle and feather that with the old mask */ - if (feather || op == CHANNEL_OP_INTERSECT) + if (feather || op == GIMP_CHANNEL_OP_INTERSECT) { GimpChannel *mask; mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height); - gimp_channel_combine_rect (mask, CHANNEL_OP_ADD, x, y, w, h); + gimp_channel_combine_rect (mask, GIMP_CHANNEL_OP_ADD, x, y, w, h); if (feather) gimp_channel_feather (mask, @@ -78,21 +78,21 @@ gimp_image_mask_select_rectangle (GimpImage *gimage, } void -gimp_image_mask_select_ellipse (GimpImage *gimage, - gint x, - gint y, - gint w, - gint h, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_ellipse (GimpImage *gimage, + gint x, + gint y, + gint w, + gint h, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { g_return_if_fail (GIMP_IS_IMAGE (gimage)); /* if applicable, replace the current selection */ - if (op == CHANNEL_OP_REPLACE) + if (op == GIMP_CHANNEL_OP_REPLACE) gimp_image_mask_clear (gimage); else gimp_image_mask_undo (gimage); @@ -100,12 +100,13 @@ gimp_image_mask_select_ellipse (GimpImage *gimage, /* if feathering for rect, make a new mask with the * rectangle and feather that with the old mask */ - if (feather || op == CHANNEL_OP_INTERSECT) + if (feather || op == GIMP_CHANNEL_OP_INTERSECT) { GimpChannel *mask; mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height); - gimp_channel_combine_ellipse (mask, CHANNEL_OP_ADD, x, y, w, h, antialias); + gimp_channel_combine_ellipse (mask, GIMP_CHANNEL_OP_ADD, + x, y, w, h, antialias); if (feather) gimp_channel_feather (mask, @@ -124,14 +125,14 @@ gimp_image_mask_select_ellipse (GimpImage *gimage, } void -gimp_image_mask_select_polygon (GimpImage *gimage, - gint n_points, - GimpVector2 *points, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_polygon (GimpImage *gimage, + gint n_points, + GimpVector2 *points, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { GimpScanConvert *scan_convert; GimpChannel *mask; @@ -141,7 +142,7 @@ gimp_image_mask_select_polygon (GimpImage *gimage, /* if applicable, replace the current selection * or insure that a floating selection is anchored down... */ - if (op == CHANNEL_OP_REPLACE) + if (op == GIMP_CHANNEL_OP_REPLACE) gimp_image_mask_clear (gimage); else gimp_image_mask_undo (gimage); @@ -173,13 +174,13 @@ gimp_image_mask_select_polygon (GimpImage *gimage, } void -gimp_image_mask_select_vectors (GimpImage *gimage, - GimpVectors *vectors, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_vectors (GimpImage *gimage, + GimpVectors *vectors, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { GimpStroke *stroke; GimpCoords *coords = NULL; @@ -230,20 +231,20 @@ gimp_image_mask_select_vectors (GimpImage *gimage, } void -gimp_image_mask_select_channel (GimpImage *gimage, - GimpChannel *channel, - gint offset_x, - gint offset_y, - ChannelOps op, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_channel (GimpImage *gimage, + GimpChannel *channel, + gint offset_x, + gint offset_y, + GimpChannelOps op, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { g_return_if_fail (GIMP_IS_IMAGE (gimage)); g_return_if_fail (GIMP_IS_CHANNEL (channel)); /* if applicable, replace the current selection */ - if (op == CHANNEL_OP_REPLACE) + if (op == GIMP_CHANNEL_OP_REPLACE) gimp_image_mask_clear (gimage); else gimp_image_mask_undo (gimage); @@ -259,18 +260,18 @@ gimp_image_mask_select_channel (GimpImage *gimage, } void -gimp_image_mask_select_fuzzy (GimpImage *gimage, - GimpDrawable *drawable, - gboolean sample_merged, - gint x, - gint y, - gint threshold, - gboolean select_transparent, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_fuzzy (GimpImage *gimage, + GimpDrawable *drawable, + gboolean sample_merged, + gint x, + gint y, + gint threshold, + gboolean select_transparent, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { GimpChannel *mask; gint mask_x; @@ -309,17 +310,17 @@ gimp_image_mask_select_fuzzy (GimpImage *gimage, } void -gimp_image_mask_select_by_color (GimpImage *gimage, - GimpDrawable *drawable, - gboolean sample_merged, - const GimpRGB *color, - gint threshold, - gboolean select_transparent, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_by_color (GimpImage *gimage, + GimpDrawable *drawable, + gboolean sample_merged, + const GimpRGB *color, + gint threshold, + gboolean select_transparent, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { GimpChannel *mask; gint mask_x; diff --git a/app/core/gimpchannel-select.h b/app/core/gimpchannel-select.h index 10be9561c2..0d233cafeb 100644 --- a/app/core/gimpchannel-select.h +++ b/app/core/gimpchannel-select.h @@ -20,77 +20,77 @@ #define __GIMP_IMAGE_MASK_SELECT_H__ -void gimp_image_mask_select_rectangle (GimpImage *gimage, - gint x, - gint y, - gint w, - gint h, - ChannelOps op, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_rectangle (GimpImage *gimage, + gint x, + gint y, + gint w, + gint h, + GimpChannelOps op, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_ellipse (GimpImage *gimage, - gint x, - gint y, - gint w, - gint h, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_ellipse (GimpImage *gimage, + gint x, + gint y, + gint w, + gint h, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_polygon (GimpImage *gimage, - gint n_points, - GimpVector2 *points, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_polygon (GimpImage *gimage, + gint n_points, + GimpVector2 *points, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_vectors (GimpImage *gimage, - GimpVectors *vectors, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_vectors (GimpImage *gimage, + GimpVectors *vectors, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_channel (GimpImage *gimage, - GimpChannel *channel, - gint offset_x, - gint offset_y, - ChannelOps op, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_channel (GimpImage *gimage, + GimpChannel *channel, + gint offset_x, + gint offset_y, + GimpChannelOps op, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_fuzzy (GimpImage *gimage, - GimpDrawable *drawable, - gboolean sample_merged, - gint x, - gint y, - gint threshold, - gboolean select_transparent, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_fuzzy (GimpImage *gimage, + GimpDrawable *drawable, + gboolean sample_merged, + gint x, + gint y, + gint threshold, + gboolean select_transparent, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_by_color (GimpImage *gimage, - GimpDrawable *drawable, - gboolean sample_merged, - const GimpRGB *color, - gint threshold, - gboolean select_transparent, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_by_color (GimpImage *gimage, + GimpDrawable *drawable, + gboolean sample_merged, + const GimpRGB *color, + gint threshold, + gboolean select_transparent, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); #endif /* __GIMP_IMAGE_MASK_SELECT_H__ */ diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c index d6e24b3740..eeb6cfe54a 100644 --- a/app/core/gimpchannel.c +++ b/app/core/gimpchannel.c @@ -827,12 +827,12 @@ gimp_channel_sub_segment (GimpChannel *mask, } void -gimp_channel_combine_rect (GimpChannel *mask, - ChannelOps op, - gint x, - gint y, - gint w, - gint h) +gimp_channel_combine_rect (GimpChannel *mask, + GimpChannelOps op, + gint x, + gint y, + gint w, + gint h) { gint x2, y2; PixelRegion maskPR; @@ -853,14 +853,16 @@ gimp_channel_combine_rect (GimpChannel *mask, pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles, x, y, x2 - x, y2 - y, TRUE); - if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE) + + if (op == GIMP_CHANNEL_OP_ADD || op == GIMP_CHANNEL_OP_REPLACE) color = 255; else color = 0; + color_region (&maskPR, &color); /* Determine new boundary */ - if (mask->bounds_known && (op == CHANNEL_OP_ADD) && !mask->empty) + if (mask->bounds_known && (op == GIMP_CHANNEL_OP_ADD) && !mask->empty) { if (x < mask->x1) mask->x1 = x; @@ -871,7 +873,7 @@ gimp_channel_combine_rect (GimpChannel *mask, if ((y + h) > mask->y2) mask->y2 = (y + h); } - else if (op == CHANNEL_OP_REPLACE || mask->empty) + else if (op == GIMP_CHANNEL_OP_REPLACE || mask->empty) { mask->empty = FALSE; mask->x1 = x; @@ -889,13 +891,13 @@ gimp_channel_combine_rect (GimpChannel *mask, } void -gimp_channel_combine_ellipse (GimpChannel *mask, - ChannelOps op, - gint x, - gint y, - gint w, - gint h, - gboolean antialias) +gimp_channel_combine_ellipse (GimpChannel *mask, + GimpChannelOps op, + gint x, + gint y, + gint w, + gint h, + gboolean antialias) { gint i, j; gint x0, x1, x2; @@ -935,11 +937,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask, switch (op) { - case CHANNEL_OP_ADD: - case CHANNEL_OP_REPLACE: + case GIMP_CHANNEL_OP_ADD: + case GIMP_CHANNEL_OP_REPLACE: gimp_channel_add_segment (mask, x1, i, (x2 - x1), 255); break; - case CHANNEL_OP_SUBTRACT: + case GIMP_CHANNEL_OP_SUBTRACT: gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255); break; default: @@ -979,11 +981,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask, { switch (op) { - case CHANNEL_OP_ADD: - case CHANNEL_OP_REPLACE: + case GIMP_CHANNEL_OP_ADD: + case GIMP_CHANNEL_OP_REPLACE: gimp_channel_add_segment (mask, x0, i, j - x0, last); break; - case CHANNEL_OP_SUBTRACT: + case GIMP_CHANNEL_OP_SUBTRACT: gimp_channel_sub_segment (mask, x0, i, j - x0, last); break; default: @@ -1005,12 +1007,19 @@ gimp_channel_combine_ellipse (GimpChannel *mask, if (last) { - if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE) - gimp_channel_add_segment (mask, x0, i, j - x0, last); - else if (op == CHANNEL_OP_SUBTRACT) - gimp_channel_sub_segment (mask, x0, i, j - x0, last); - else - g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!"); + switch (op) + { + case GIMP_CHANNEL_OP_ADD: + case GIMP_CHANNEL_OP_REPLACE: + gimp_channel_add_segment (mask, x0, i, j - x0, last); + break; + case GIMP_CHANNEL_OP_SUBTRACT: + gimp_channel_sub_segment (mask, x0, i, j - x0, last); + break; + default: + g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!"); + break; + } } } @@ -1018,7 +1027,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, } /* Determine new boundary */ - if (mask->bounds_known && (op == CHANNEL_OP_ADD) && !mask->empty) + if (mask->bounds_known && (op == GIMP_CHANNEL_OP_ADD) && !mask->empty) { if (x < mask->x1) mask->x1 = x; @@ -1029,7 +1038,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, if ((y + h) > mask->y2) mask->y2 = (y + h); } - else if (op == CHANNEL_OP_REPLACE || mask->empty) + else if (op == GIMP_CHANNEL_OP_REPLACE || mask->empty) { mask->empty = FALSE; mask->x1 = x; @@ -1120,11 +1129,11 @@ gimp_channel_combine_sub_region_intersect (gpointer unused, } void -gimp_channel_combine_mask (GimpChannel *mask, - GimpChannel *add_on, - ChannelOps op, - gint off_x, - gint off_y) +gimp_channel_combine_mask (GimpChannel *mask, + GimpChannel *add_on, + GimpChannelOps op, + gint off_x, + gint off_y) { PixelRegion srcPR, destPR; gint x1, y1, x2, y2; @@ -1149,18 +1158,18 @@ gimp_channel_combine_mask (GimpChannel *mask, switch (op) { - case CHANNEL_OP_ADD: - case CHANNEL_OP_REPLACE: + case GIMP_CHANNEL_OP_ADD: + case GIMP_CHANNEL_OP_REPLACE: pixel_regions_process_parallel ((p_func) gimp_channel_combine_sub_region_add, NULL, 2, &srcPR, &destPR); break; - case CHANNEL_OP_SUBTRACT: + case GIMP_CHANNEL_OP_SUBTRACT: pixel_regions_process_parallel ((p_func) gimp_channel_combine_sub_region_sub, NULL, 2, &srcPR, &destPR); break; - case CHANNEL_OP_INTERSECT: + case GIMP_CHANNEL_OP_INTERSECT: pixel_regions_process_parallel ((p_func) gimp_channel_combine_sub_region_intersect, NULL, 2, &srcPR, &destPR); diff --git a/app/core/gimpchannel.h b/app/core/gimpchannel.h index 44581612fc..17ca3aa18e 100644 --- a/app/core/gimpchannel.h +++ b/app/core/gimpchannel.h @@ -132,13 +132,13 @@ void gimp_channel_sub_segment (GimpChannel *mask, gint width, gint value); void gimp_channel_combine_rect (GimpChannel *mask, - ChannelOps op, + GimpChannelOps op, gint x, gint y, gint w, gint h); void gimp_channel_combine_ellipse (GimpChannel *mask, - ChannelOps op, + GimpChannelOps op, gint x, gint y, gint w, @@ -146,7 +146,7 @@ void gimp_channel_combine_ellipse (GimpChannel *mask, gboolean antialias); void gimp_channel_combine_mask (GimpChannel *mask, GimpChannel *add_on, - ChannelOps op, + GimpChannelOps op, gint off_x, gint off_y); diff --git a/app/core/gimpimage-mask-select.c b/app/core/gimpimage-mask-select.c index a2a10ec210..5f31355953 100644 --- a/app/core/gimpimage-mask-select.c +++ b/app/core/gimpimage-mask-select.c @@ -34,20 +34,20 @@ void -gimp_image_mask_select_rectangle (GimpImage *gimage, - gint x, - gint y, - gint w, - gint h, - ChannelOps op, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_rectangle (GimpImage *gimage, + gint x, + gint y, + gint w, + gint h, + GimpChannelOps op, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { g_return_if_fail (GIMP_IS_IMAGE (gimage)); /* if applicable, replace the current selection */ - if (op == CHANNEL_OP_REPLACE) + if (op == GIMP_CHANNEL_OP_REPLACE) gimp_image_mask_clear (gimage); else gimp_image_mask_undo (gimage); @@ -55,12 +55,12 @@ gimp_image_mask_select_rectangle (GimpImage *gimage, /* if feathering for rect, make a new mask with the * rectangle and feather that with the old mask */ - if (feather || op == CHANNEL_OP_INTERSECT) + if (feather || op == GIMP_CHANNEL_OP_INTERSECT) { GimpChannel *mask; mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height); - gimp_channel_combine_rect (mask, CHANNEL_OP_ADD, x, y, w, h); + gimp_channel_combine_rect (mask, GIMP_CHANNEL_OP_ADD, x, y, w, h); if (feather) gimp_channel_feather (mask, @@ -78,21 +78,21 @@ gimp_image_mask_select_rectangle (GimpImage *gimage, } void -gimp_image_mask_select_ellipse (GimpImage *gimage, - gint x, - gint y, - gint w, - gint h, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_ellipse (GimpImage *gimage, + gint x, + gint y, + gint w, + gint h, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { g_return_if_fail (GIMP_IS_IMAGE (gimage)); /* if applicable, replace the current selection */ - if (op == CHANNEL_OP_REPLACE) + if (op == GIMP_CHANNEL_OP_REPLACE) gimp_image_mask_clear (gimage); else gimp_image_mask_undo (gimage); @@ -100,12 +100,13 @@ gimp_image_mask_select_ellipse (GimpImage *gimage, /* if feathering for rect, make a new mask with the * rectangle and feather that with the old mask */ - if (feather || op == CHANNEL_OP_INTERSECT) + if (feather || op == GIMP_CHANNEL_OP_INTERSECT) { GimpChannel *mask; mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height); - gimp_channel_combine_ellipse (mask, CHANNEL_OP_ADD, x, y, w, h, antialias); + gimp_channel_combine_ellipse (mask, GIMP_CHANNEL_OP_ADD, + x, y, w, h, antialias); if (feather) gimp_channel_feather (mask, @@ -124,14 +125,14 @@ gimp_image_mask_select_ellipse (GimpImage *gimage, } void -gimp_image_mask_select_polygon (GimpImage *gimage, - gint n_points, - GimpVector2 *points, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_polygon (GimpImage *gimage, + gint n_points, + GimpVector2 *points, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { GimpScanConvert *scan_convert; GimpChannel *mask; @@ -141,7 +142,7 @@ gimp_image_mask_select_polygon (GimpImage *gimage, /* if applicable, replace the current selection * or insure that a floating selection is anchored down... */ - if (op == CHANNEL_OP_REPLACE) + if (op == GIMP_CHANNEL_OP_REPLACE) gimp_image_mask_clear (gimage); else gimp_image_mask_undo (gimage); @@ -173,13 +174,13 @@ gimp_image_mask_select_polygon (GimpImage *gimage, } void -gimp_image_mask_select_vectors (GimpImage *gimage, - GimpVectors *vectors, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_vectors (GimpImage *gimage, + GimpVectors *vectors, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { GimpStroke *stroke; GimpCoords *coords = NULL; @@ -230,20 +231,20 @@ gimp_image_mask_select_vectors (GimpImage *gimage, } void -gimp_image_mask_select_channel (GimpImage *gimage, - GimpChannel *channel, - gint offset_x, - gint offset_y, - ChannelOps op, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_channel (GimpImage *gimage, + GimpChannel *channel, + gint offset_x, + gint offset_y, + GimpChannelOps op, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { g_return_if_fail (GIMP_IS_IMAGE (gimage)); g_return_if_fail (GIMP_IS_CHANNEL (channel)); /* if applicable, replace the current selection */ - if (op == CHANNEL_OP_REPLACE) + if (op == GIMP_CHANNEL_OP_REPLACE) gimp_image_mask_clear (gimage); else gimp_image_mask_undo (gimage); @@ -259,18 +260,18 @@ gimp_image_mask_select_channel (GimpImage *gimage, } void -gimp_image_mask_select_fuzzy (GimpImage *gimage, - GimpDrawable *drawable, - gboolean sample_merged, - gint x, - gint y, - gint threshold, - gboolean select_transparent, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_fuzzy (GimpImage *gimage, + GimpDrawable *drawable, + gboolean sample_merged, + gint x, + gint y, + gint threshold, + gboolean select_transparent, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { GimpChannel *mask; gint mask_x; @@ -309,17 +310,17 @@ gimp_image_mask_select_fuzzy (GimpImage *gimage, } void -gimp_image_mask_select_by_color (GimpImage *gimage, - GimpDrawable *drawable, - gboolean sample_merged, - const GimpRGB *color, - gint threshold, - gboolean select_transparent, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y) +gimp_image_mask_select_by_color (GimpImage *gimage, + GimpDrawable *drawable, + gboolean sample_merged, + const GimpRGB *color, + gint threshold, + gboolean select_transparent, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y) { GimpChannel *mask; gint mask_x; diff --git a/app/core/gimpimage-mask-select.h b/app/core/gimpimage-mask-select.h index 10be9561c2..0d233cafeb 100644 --- a/app/core/gimpimage-mask-select.h +++ b/app/core/gimpimage-mask-select.h @@ -20,77 +20,77 @@ #define __GIMP_IMAGE_MASK_SELECT_H__ -void gimp_image_mask_select_rectangle (GimpImage *gimage, - gint x, - gint y, - gint w, - gint h, - ChannelOps op, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_rectangle (GimpImage *gimage, + gint x, + gint y, + gint w, + gint h, + GimpChannelOps op, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_ellipse (GimpImage *gimage, - gint x, - gint y, - gint w, - gint h, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_ellipse (GimpImage *gimage, + gint x, + gint y, + gint w, + gint h, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_polygon (GimpImage *gimage, - gint n_points, - GimpVector2 *points, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_polygon (GimpImage *gimage, + gint n_points, + GimpVector2 *points, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_vectors (GimpImage *gimage, - GimpVectors *vectors, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_vectors (GimpImage *gimage, + GimpVectors *vectors, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_channel (GimpImage *gimage, - GimpChannel *channel, - gint offset_x, - gint offset_y, - ChannelOps op, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_channel (GimpImage *gimage, + GimpChannel *channel, + gint offset_x, + gint offset_y, + GimpChannelOps op, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_fuzzy (GimpImage *gimage, - GimpDrawable *drawable, - gboolean sample_merged, - gint x, - gint y, - gint threshold, - gboolean select_transparent, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_fuzzy (GimpImage *gimage, + GimpDrawable *drawable, + gboolean sample_merged, + gint x, + gint y, + gint threshold, + gboolean select_transparent, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); -void gimp_image_mask_select_by_color (GimpImage *gimage, - GimpDrawable *drawable, - gboolean sample_merged, - const GimpRGB *color, - gint threshold, - gboolean select_transparent, - ChannelOps op, - gboolean antialias, - gboolean feather, - gdouble feather_radius_x, - gdouble feather_radius_y); +void gimp_image_mask_select_by_color (GimpImage *gimage, + GimpDrawable *drawable, + gboolean sample_merged, + const GimpRGB *color, + gint threshold, + gboolean select_transparent, + GimpChannelOps op, + gboolean antialias, + gboolean feather, + gdouble feather_radius_x, + gdouble feather_radius_y); #endif /* __GIMP_IMAGE_MASK_SELECT_H__ */ diff --git a/app/gui/channels-commands.c b/app/gui/channels-commands.c index 1cfb111ccb..3aa4234e80 100644 --- a/app/gui/channels-commands.c +++ b/app/gui/channels-commands.c @@ -133,9 +133,9 @@ channels_delete_channel_cmd_callback (GtkWidget *widget, } static void -channels_channel_to_sel (GtkWidget *widget, - gpointer data, - ChannelOps op) +channels_channel_to_sel (GtkWidget *widget, + gpointer data, + GimpChannelOps op) { GimpImage *gimage; GimpChannel *active_channel; @@ -153,28 +153,28 @@ void channels_channel_to_sel_cmd_callback (GtkWidget *widget, gpointer data) { - channels_channel_to_sel (widget, data, CHANNEL_OP_REPLACE); + channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE); } void channels_add_channel_to_sel_cmd_callback (GtkWidget *widget, gpointer data) { - channels_channel_to_sel (widget, data, CHANNEL_OP_ADD); + channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_ADD); } void channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget, gpointer data) { - channels_channel_to_sel (widget, data, CHANNEL_OP_SUBTRACT); + channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT); } void channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget, gpointer data) { - channels_channel_to_sel (widget, data, CHANNEL_OP_INTERSECT); + channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT); } void diff --git a/app/gui/vectors-commands.c b/app/gui/vectors-commands.c index c5a783d5d0..fa90b3b4ab 100644 --- a/app/gui/vectors-commands.c +++ b/app/gui/vectors-commands.c @@ -137,9 +137,9 @@ vectors_delete_vectors_cmd_callback (GtkWidget *widget, } static void -vectors_vectors_to_sel (GtkWidget *widget, - gpointer data, - ChannelOps op) +vectors_vectors_to_sel (GtkWidget *widget, + gpointer data, + GimpChannelOps op) { GimpImage *gimage; GimpVectors *active_vectors; @@ -157,28 +157,28 @@ void vectors_vectors_to_sel_cmd_callback (GtkWidget *widget, gpointer data) { - vectors_vectors_to_sel (widget, data, CHANNEL_OP_REPLACE); + vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE); } void vectors_add_vectors_to_sel_cmd_callback (GtkWidget *widget, gpointer data) { - vectors_vectors_to_sel (widget, data, CHANNEL_OP_ADD); + vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_ADD); } void vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget, gpointer data) { - vectors_vectors_to_sel (widget, data, CHANNEL_OP_SUBTRACT); + vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT); } void vectors_intersect_vectors_with_sel_cmd_callback (GtkWidget *widget, gpointer data) { - vectors_vectors_to_sel (widget, data, CHANNEL_OP_INTERSECT); + vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT); } void diff --git a/app/pdb/channel_cmds.c b/app/pdb/channel_cmds.c index 32f40dffd7..1ac34e1644 100644 --- a/app/pdb/channel_cmds.c +++ b/app/pdb/channel_cmds.c @@ -28,7 +28,7 @@ #include "pdb-types.h" #include "procedural_db.h" -#include "core/core-types.h" +#include "core/core-enums.h" #include "core/gimpchannel.h" #include "core/gimpimage.h" #include "pdb_glue.h" @@ -312,7 +312,7 @@ channel_combine_masks_invoker (Gimp *gimp, success = FALSE; operation = args[2].value.pdb_int; - if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT) + if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT) success = FALSE; offx = args[3].value.pdb_int; @@ -342,7 +342,7 @@ static ProcArg channel_combine_masks_inargs[] = { GIMP_PDB_INT32, "operation", - "The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }" + "The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }" }, { GIMP_PDB_INT32, diff --git a/app/pdb/selection_cmds.c b/app/pdb/selection_cmds.c index 8c9f76d774..870cbf18ed 100644 --- a/app/pdb/selection_cmds.c +++ b/app/pdb/selection_cmds.c @@ -28,7 +28,7 @@ #include "pdb-types.h" #include "procedural_db.h" -#include "core/core-types.h" +#include "core/core-enums.h" #include "core/gimpchannel.h" #include "core/gimpdrawable.h" #include "core/gimpimage-mask.h" @@ -1014,7 +1014,7 @@ selection_combine_invoker (Gimp *gimp, success = FALSE; operation = args[1].value.pdb_int; - if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT) + if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT) success = FALSE; if (success) @@ -1051,7 +1051,7 @@ static ProcArg selection_combine_inargs[] = { GIMP_PDB_INT32, "operation", - "The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }" + "The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }" } }; diff --git a/app/pdb/selection_tools_cmds.c b/app/pdb/selection_tools_cmds.c index c1d17456eb..1f2a11d423 100644 --- a/app/pdb/selection_tools_cmds.c +++ b/app/pdb/selection_tools_cmds.c @@ -28,7 +28,7 @@ #include "pdb-types.h" #include "procedural_db.h" -#include "core/core-types.h" +#include "core/core-enums.h" #include "core/gimpdrawable.h" #include "core/gimpimage-mask-select.h" #include "core/gimpimage.h" @@ -77,7 +77,7 @@ by_color_select_invoker (Gimp *gimp, success = FALSE; operation = args[3].value.pdb_int; - if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT) + if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT) success = FALSE; antialias = args[4].value.pdb_int ? TRUE : FALSE; @@ -127,7 +127,7 @@ static ProcArg by_color_select_inargs[] = { GIMP_PDB_INT32, "operation", - "The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }" + "The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }" }, { GIMP_PDB_INT32, @@ -199,7 +199,7 @@ ellipse_select_invoker (Gimp *gimp, success = FALSE; operation = args[5].value.pdb_int; - if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT) + if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT) success = FALSE; antialias = args[6].value.pdb_int ? TRUE : FALSE; @@ -251,7 +251,7 @@ static ProcArg ellipse_select_inargs[] = { GIMP_PDB_INT32, "operation", - "The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }" + "The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }" }, { GIMP_PDB_INT32, @@ -312,7 +312,7 @@ free_select_invoker (Gimp *gimp, segs = (gdouble *) args[2].value.pdb_pointer; operation = args[3].value.pdb_int; - if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT) + if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT) success = FALSE; antialias = args[4].value.pdb_int ? TRUE : FALSE; @@ -354,7 +354,7 @@ static ProcArg free_select_inargs[] = { GIMP_PDB_INT32, "operation", - "The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }" + "The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }" }, { GIMP_PDB_INT32, @@ -418,7 +418,7 @@ fuzzy_select_invoker (Gimp *gimp, success = FALSE; operation = args[4].value.pdb_int; - if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT) + if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT) success = FALSE; antialias = args[5].value.pdb_int ? TRUE : FALSE; @@ -474,7 +474,7 @@ static ProcArg fuzzy_select_inargs[] = { GIMP_PDB_INT32, "operation", - "The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }" + "The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }" }, { GIMP_PDB_INT32, @@ -546,7 +546,7 @@ rect_select_invoker (Gimp *gimp, success = FALSE; operation = args[5].value.pdb_int; - if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT) + if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT) success = FALSE; feather = args[6].value.pdb_int ? TRUE : FALSE; @@ -595,7 +595,7 @@ static ProcArg rect_select_inargs[] = { GIMP_PDB_INT32, "operation", - "The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }" + "The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }" }, { GIMP_PDB_INT32, diff --git a/app/tools/gimpbezierselecttool.c b/app/tools/gimpbezierselecttool.c index bd00e1a45b..f7aa28934e 100644 --- a/app/tools/gimpbezierselecttool.c +++ b/app/tools/gimpbezierselecttool.c @@ -203,7 +203,7 @@ static gboolean test_add_point_on_segment (GimpBezierSelectTool *bezier_s static void bezier_to_sel_internal (GimpBezierSelectTool *bezier_sel, GimpTool *tool, GimpDisplay *gdisp, - ChannelOps op); + GimpChannelOps op); static void bezier_stack_points_aux (GdkPoint *points, gint start, gint end, @@ -658,19 +658,19 @@ gimp_bezier_select_tool_button_press (GimpTool *tool, { if ((state & GDK_CONTROL_MASK) && (state & GDK_SHIFT_MASK)) { - op = CHANNEL_OP_INTERSECT; + op = GIMP_CHANNEL_OP_INTERSECT; } else if (state & GDK_SHIFT_MASK) { - op = CHANNEL_OP_ADD; + op = GIMP_CHANNEL_OP_ADD; } else if (state & GDK_CONTROL_MASK) { - op = CHANNEL_OP_SUBTRACT; + op = GIMP_CHANNEL_OP_SUBTRACT; } else { - op = CHANNEL_OP_REPLACE; + op = GIMP_CHANNEL_OP_REPLACE; } bezier_to_sel_internal (bezier_sel, tool, gdisp, op); @@ -2889,7 +2889,7 @@ static void bezier_to_sel_internal (GimpBezierSelectTool *bezier_sel, GimpTool *tool, GimpDisplay *gdisp, - ChannelOps op) + GimpChannelOps op) { SelectionOptions *sel_options; @@ -3178,7 +3178,7 @@ bezier_to_selection (GimpBezierSelectTool *bezier_sel, */ bezier_paste_bezierselect_to_current (gdisp, bezier_sel); bezier_to_sel_internal (curSel, (GimpTool *) curTool, gdisp, - CHANNEL_OP_REPLACE); + GIMP_CHANNEL_OP_REPLACE); } /* check whether vectors (offx, offy), (l_offx, l_offy) have the same angle. */ diff --git a/app/tools/tools-types.h b/app/tools/tools-types.h index 9dd843a29c..79d9b0585e 100644 --- a/app/tools/tools-types.h +++ b/app/tools/tools-types.h @@ -69,10 +69,10 @@ typedef void (* GimpToolRegisterFunc) (Gimp *gimp, typedef enum /*< pdb-skip >*/ { - SELECTION_ADD = CHANNEL_OP_ADD, - SELECTION_SUBTRACT = CHANNEL_OP_SUBTRACT, - SELECTION_REPLACE = CHANNEL_OP_REPLACE, - SELECTION_INTERSECT = CHANNEL_OP_INTERSECT, + SELECTION_ADD = GIMP_CHANNEL_OP_ADD, + SELECTION_SUBTRACT = GIMP_CHANNEL_OP_SUBTRACT, + SELECTION_REPLACE = GIMP_CHANNEL_OP_REPLACE, + SELECTION_INTERSECT = GIMP_CHANNEL_OP_INTERSECT, SELECTION_MOVE_MASK, SELECTION_MOVE, SELECTION_ANCHOR diff --git a/app/widgets/gimpchannellistview.c b/app/widgets/gimpchannellistview.c index 38866228ad..c678a9b115 100644 --- a/app/widgets/gimpchannellistview.c +++ b/app/widgets/gimpchannellistview.c @@ -62,7 +62,7 @@ static void gimp_channel_list_view_set_preview_size (GimpContainerView *view); static void gimp_channel_list_view_to_selection (GimpChannelListView *view, GimpChannel *channel, - ChannelOps operation); + GimpChannelOps operation); static void gimp_channel_list_view_toselection_clicked (GtkWidget *widget, GimpChannelListView *view); @@ -293,7 +293,7 @@ gimp_channel_list_view_set_preview_size (GimpContainerView *view) static void gimp_channel_list_view_to_selection (GimpChannelListView *view, GimpChannel *channel, - ChannelOps operation) + GimpChannelOps operation) { if (channel) { @@ -302,7 +302,7 @@ gimp_channel_list_view_to_selection (GimpChannelListView *view, gimage = gimp_item_get_image (GIMP_ITEM (channel)); - if (operation == CHANNEL_OP_REPLACE) + if (operation == GIMP_CHANNEL_OP_REPLACE) { new_channel = channel; @@ -349,18 +349,18 @@ gimp_channel_list_view_toselection_extended_clicked (GtkWidget *widget if (viewable) { - ChannelOps operation = CHANNEL_OP_REPLACE; + GimpChannelOps operation = GIMP_CHANNEL_OP_REPLACE; if (state & GDK_SHIFT_MASK) { if (state & GDK_CONTROL_MASK) - operation = CHANNEL_OP_INTERSECT; + operation = GIMP_CHANNEL_OP_INTERSECT; else - operation = CHANNEL_OP_ADD; + operation = GIMP_CHANNEL_OP_ADD; } else if (state & GDK_CONTROL_MASK) { - operation = CHANNEL_OP_SUBTRACT; + operation = GIMP_CHANNEL_OP_SUBTRACT; } gimp_channel_list_view_to_selection (view, GIMP_CHANNEL (viewable), diff --git a/app/widgets/gimpchanneltreeview.c b/app/widgets/gimpchanneltreeview.c index 38866228ad..c678a9b115 100644 --- a/app/widgets/gimpchanneltreeview.c +++ b/app/widgets/gimpchanneltreeview.c @@ -62,7 +62,7 @@ static void gimp_channel_list_view_set_preview_size (GimpContainerView *view); static void gimp_channel_list_view_to_selection (GimpChannelListView *view, GimpChannel *channel, - ChannelOps operation); + GimpChannelOps operation); static void gimp_channel_list_view_toselection_clicked (GtkWidget *widget, GimpChannelListView *view); @@ -293,7 +293,7 @@ gimp_channel_list_view_set_preview_size (GimpContainerView *view) static void gimp_channel_list_view_to_selection (GimpChannelListView *view, GimpChannel *channel, - ChannelOps operation) + GimpChannelOps operation) { if (channel) { @@ -302,7 +302,7 @@ gimp_channel_list_view_to_selection (GimpChannelListView *view, gimage = gimp_item_get_image (GIMP_ITEM (channel)); - if (operation == CHANNEL_OP_REPLACE) + if (operation == GIMP_CHANNEL_OP_REPLACE) { new_channel = channel; @@ -349,18 +349,18 @@ gimp_channel_list_view_toselection_extended_clicked (GtkWidget *widget if (viewable) { - ChannelOps operation = CHANNEL_OP_REPLACE; + GimpChannelOps operation = GIMP_CHANNEL_OP_REPLACE; if (state & GDK_SHIFT_MASK) { if (state & GDK_CONTROL_MASK) - operation = CHANNEL_OP_INTERSECT; + operation = GIMP_CHANNEL_OP_INTERSECT; else - operation = CHANNEL_OP_ADD; + operation = GIMP_CHANNEL_OP_ADD; } else if (state & GDK_CONTROL_MASK) { - operation = CHANNEL_OP_SUBTRACT; + operation = GIMP_CHANNEL_OP_SUBTRACT; } gimp_channel_list_view_to_selection (view, GIMP_CHANNEL (viewable), diff --git a/app/widgets/gimpvectorslistview.c b/app/widgets/gimpvectorslistview.c index 4e7d922755..5746b117dc 100644 --- a/app/widgets/gimpvectorslistview.c +++ b/app/widgets/gimpvectorslistview.c @@ -60,7 +60,7 @@ static void gimp_vectors_list_view_select_item (GimpContainerView *view, gpointer insert_data); static void gimp_vectors_list_view_to_selection (GimpVectorsListView *view, GimpVectors *vectors, - ChannelOps operation); + GimpChannelOps operation); static void gimp_vectors_list_view_toselection_clicked (GtkWidget *widget, GimpVectorsListView *view); @@ -189,7 +189,7 @@ gimp_vectors_list_view_select_item (GimpContainerView *view, static void gimp_vectors_list_view_to_selection (GimpVectorsListView *view, GimpVectors *vectors, - ChannelOps operation) + GimpChannelOps operation) { if (vectors) { @@ -224,18 +224,18 @@ gimp_vectors_list_view_toselection_extended_clicked (GtkWidget *widget if (viewable) { - ChannelOps operation = CHANNEL_OP_REPLACE; + GimpChannelOps operation = GIMP_CHANNEL_OP_REPLACE; if (state & GDK_SHIFT_MASK) { if (state & GDK_CONTROL_MASK) - operation = CHANNEL_OP_INTERSECT; + operation = GIMP_CHANNEL_OP_INTERSECT; else - operation = CHANNEL_OP_ADD; + operation = GIMP_CHANNEL_OP_ADD; } else if (state & GDK_CONTROL_MASK) { - operation = CHANNEL_OP_SUBTRACT; + operation = GIMP_CHANNEL_OP_SUBTRACT; } gimp_vectors_list_view_to_selection (view, GIMP_VECTORS (viewable), diff --git a/app/widgets/gimpvectorstreeview.c b/app/widgets/gimpvectorstreeview.c index 4e7d922755..5746b117dc 100644 --- a/app/widgets/gimpvectorstreeview.c +++ b/app/widgets/gimpvectorstreeview.c @@ -60,7 +60,7 @@ static void gimp_vectors_list_view_select_item (GimpContainerView *view, gpointer insert_data); static void gimp_vectors_list_view_to_selection (GimpVectorsListView *view, GimpVectors *vectors, - ChannelOps operation); + GimpChannelOps operation); static void gimp_vectors_list_view_toselection_clicked (GtkWidget *widget, GimpVectorsListView *view); @@ -189,7 +189,7 @@ gimp_vectors_list_view_select_item (GimpContainerView *view, static void gimp_vectors_list_view_to_selection (GimpVectorsListView *view, GimpVectors *vectors, - ChannelOps operation) + GimpChannelOps operation) { if (vectors) { @@ -224,18 +224,18 @@ gimp_vectors_list_view_toselection_extended_clicked (GtkWidget *widget if (viewable) { - ChannelOps operation = CHANNEL_OP_REPLACE; + GimpChannelOps operation = GIMP_CHANNEL_OP_REPLACE; if (state & GDK_SHIFT_MASK) { if (state & GDK_CONTROL_MASK) - operation = CHANNEL_OP_INTERSECT; + operation = GIMP_CHANNEL_OP_INTERSECT; else - operation = CHANNEL_OP_ADD; + operation = GIMP_CHANNEL_OP_ADD; } else if (state & GDK_CONTROL_MASK) { - operation = CHANNEL_OP_SUBTRACT; + operation = GIMP_CHANNEL_OP_SUBTRACT; } gimp_vectors_list_view_to_selection (view, GIMP_VECTORS (viewable), diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h index 1ed4a30702..0c1fc63130 100644 --- a/libgimp/gimpenums.h +++ b/libgimp/gimpenums.h @@ -31,14 +31,6 @@ typedef enum GIMP_PRESSURE } GimpBrushApplicationMode; -typedef enum -{ - GIMP_CHANNEL_OP_ADD, - GIMP_CHANNEL_OP_SUBTRACT, - GIMP_CHANNEL_OP_REPLACE, - GIMP_CHANNEL_OP_INTERSECT -} GimpChannelOps; - typedef enum { GIMP_IMAGE_CLONE, @@ -93,6 +85,14 @@ typedef enum GIMP_ALPHA_LUT } GimpChannelLutType; +typedef enum +{ + GIMP_CHANNEL_OP_ADD, + GIMP_CHANNEL_OP_SUBTRACT, + GIMP_CHANNEL_OP_REPLACE, + GIMP_CHANNEL_OP_INTERSECT +} GimpChannelOps; + typedef enum { GIMP_RED_CHANNEL, diff --git a/plug-ins/script-fu/script-fu-constants.c b/plug-ins/script-fu/script-fu-constants.c index f1de13232c..d53f288623 100644 --- a/plug-ins/script-fu/script-fu-constants.c +++ b/plug-ins/script-fu/script-fu-constants.c @@ -27,11 +27,6 @@ init_generated_constants (void) setvar (cintern ("SOFT"), flocons (1), NIL); setvar (cintern ("PRESSURE"), flocons (2), NIL); - setvar (cintern ("CHANNEL-OP-ADD"), flocons (0), NIL); - setvar (cintern ("CHANNEL-OP-SUBTRACT"), flocons (1), NIL); - setvar (cintern ("CHANNEL-OP-REPLACE"), flocons (2), NIL); - setvar (cintern ("CHANNEL-OP-INTERSECT"), flocons (3), NIL); - setvar (cintern ("IMAGE-CLONE"), flocons (0), NIL); setvar (cintern ("PATTERN-CLONE"), flocons (1), NIL); @@ -65,6 +60,11 @@ init_generated_constants (void) setvar (cintern ("BLUE-LUT"), flocons (3), NIL); setvar (cintern ("ALPHA-LUT"), flocons (4), NIL); + setvar (cintern ("CHANNEL-OP-ADD"), flocons (0), NIL); + setvar (cintern ("CHANNEL-OP-SUBTRACT"), flocons (1), NIL); + setvar (cintern ("CHANNEL-OP-REPLACE"), flocons (2), NIL); + setvar (cintern ("CHANNEL-OP-INTERSECT"), flocons (3), NIL); + setvar (cintern ("RED-CHANNEL"), flocons (0), NIL); setvar (cintern ("GREEN-CHANNEL"), flocons (1), NIL); setvar (cintern ("BLUE-CHANNEL"), flocons (2), NIL); diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl index 540b8eef01..ce3ec5f6c7 100644 --- a/tools/pdbgen/enums.pl +++ b/tools/pdbgen/enums.pl @@ -169,16 +169,6 @@ package Gimp::CodeGen::enums; VERTICAL => '1', UNKNOWN => '2' } }, - ChannelOps => - { contig => 1, - header => 'core/core-types.h', - symbols => [ qw(CHANNEL_OP_ADD CHANNEL_OP_SUBTRACT - CHANNEL_OP_REPLACE CHANNEL_OP_INTERSECT) ], - mapping => { CHANNEL_OP_ADD => '0', - CHANNEL_OP_SUBTRACT => '1', - CHANNEL_OP_REPLACE => '2', - CHANNEL_OP_INTERSECT => '3' } - }, GimpOffsetType => { contig => 1, header => 'core/core-types.h', @@ -265,6 +255,16 @@ package Gimp::CodeGen::enums; GIMP_BG_BUCKET_FILL => '1', GIMP_PATTERN_BUCKET_FILL => '2' } }, + GimpChannelOps => + { contig => 1, + header => 'core/core-enums.h', + symbols => [ qw(GIMP_CHANNEL_OP_ADD GIMP_CHANNEL_OP_SUBTRACT + GIMP_CHANNEL_OP_REPLACE GIMP_CHANNEL_OP_INTERSECT) ], + mapping => { GIMP_CHANNEL_OP_ADD => '0', + GIMP_CHANNEL_OP_SUBTRACT => '1', + GIMP_CHANNEL_OP_REPLACE => '2', + GIMP_CHANNEL_OP_INTERSECT => '3' } + }, GimpConvertPaletteType => { contig => 1, header => 'core/core-enums.h', diff --git a/tools/pdbgen/pdb/channel.pdb b/tools/pdbgen/pdb/channel.pdb index c57f07c87e..adee670036 100644 --- a/tools/pdbgen/pdb/channel.pdb +++ b/tools/pdbgen/pdb/channel.pdb @@ -25,7 +25,7 @@ sub channel_arg () {{ sub operation_arg () {{ name => 'operation', - type => 'enum ChannelOps', + type => 'enum GimpChannelOps', desc => 'The selection operation: { %%desc%% }' }} diff --git a/tools/pdbgen/pdb/selection.pdb b/tools/pdbgen/pdb/selection.pdb index 9193311601..bf5e0fb549 100644 --- a/tools/pdbgen/pdb/selection.pdb +++ b/tools/pdbgen/pdb/selection.pdb @@ -25,7 +25,7 @@ sub channel_arg () {{ sub operation_arg () {{ name => 'operation', - type => 'enum ChannelOps', + type => 'enum GimpChannelOps', desc => 'The selection operation: { %%desc%% }' }} diff --git a/tools/pdbgen/pdb/selection_tools.pdb b/tools/pdbgen/pdb/selection_tools.pdb index 8e421b1c4b..59707fa8b1 100644 --- a/tools/pdbgen/pdb/selection_tools.pdb +++ b/tools/pdbgen/pdb/selection_tools.pdb @@ -43,7 +43,7 @@ sub sample_merged_arg () {{ sub operation_arg () {{ name => 'operation', - type => 'enum ChannelOps', + type => 'enum GimpChannelOps', desc => 'The selection operation: { %%desc%% }' }}