diff --git a/ChangeLog b/ChangeLog index 050ad028ff..82f7ae3b43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2001-12-11 Sven Neumann + + * app/core/core-enums.h + * app/core/core-types.h: moved gradient enums to core-enums.h and + namespaceified them. + + * app/core/gimpdrawable-blend.[ch] + * app/core/gimpgradient.c + * app/gui/gradient-editor-commands.c + * app/pdb/misc_tools_cmds.c + * app/tools/gimpblendtool.c + * tools/pdbgen/pdb/misc_tools.pdb: changed accordingly. + + * libgimp/gimpenums.h + * plug-ins/script-fu/script-fu-constants.c + * tools/pdbgen/enums.pl: regenerated. + 2001-12-11 Sven Neumann * app/base/base-enums.h diff --git a/app/actions/gradient-editor-commands.c b/app/actions/gradient-editor-commands.c index 502292386e..220af4847a 100644 --- a/app/actions/gradient-editor-commands.c +++ b/app/actions/gradient-editor-commands.c @@ -423,12 +423,12 @@ gradient_editor_flip_cmd_callback (GtkWidget *widget, switch (oseg->type) { - case GRAD_SPHERE_INCREASING: - seg->type = GRAD_SPHERE_DECREASING; + case GIMP_GRAD_SPHERE_INCREASING: + seg->type = GIMP_GRAD_SPHERE_DECREASING; break; - case GRAD_SPHERE_DECREASING: - seg->type = GRAD_SPHERE_INCREASING; + case GIMP_GRAD_SPHERE_DECREASING: + seg->type = GIMP_GRAD_SPHERE_INCREASING; break; default: @@ -437,12 +437,12 @@ gradient_editor_flip_cmd_callback (GtkWidget *widget, switch (oseg->color) { - case GRAD_HSV_CCW: - seg->color = GRAD_HSV_CW; + case GIMP_GRAD_HSV_CCW: + seg->color = GIMP_GRAD_HSV_CW; break; - case GRAD_HSV_CW: - seg->color = GRAD_HSV_CCW; + case GIMP_GRAD_HSV_CW: + seg->color = GIMP_GRAD_HSV_CCW; break; default: @@ -1075,19 +1075,19 @@ gradient_editor_menu_update (GtkItemFactory *factory, switch (editor->control_sel_l->type) { - case GRAD_LINEAR: + case GIMP_GRAD_LINEAR: SET_ACTIVE ("/blendingfunction/Linear", TRUE); break; - case GRAD_CURVED: + case GIMP_GRAD_CURVED: SET_ACTIVE ("/blendingfunction/Curved", TRUE); break; - case GRAD_SINE: + case GIMP_GRAD_SINE: SET_ACTIVE ("/blendingfunction/Sinusodial", TRUE); break; - case GRAD_SPHERE_INCREASING: + case GIMP_GRAD_SPHERE_INCREASING: SET_ACTIVE ("/blendingfunction/Spherical (increasing)", TRUE); break; - case GRAD_SPHERE_DECREASING: + case GIMP_GRAD_SPHERE_DECREASING: SET_ACTIVE ("/blendingfunction/Spherical (decreasing)", TRUE); break; } @@ -1104,13 +1104,13 @@ gradient_editor_menu_update (GtkItemFactory *factory, switch (editor->control_sel_l->color) { - case GRAD_RGB: + case GIMP_GRAD_RGB: SET_ACTIVE ("/coloringtype/RGB", TRUE); break; - case GRAD_HSV_CCW: + case GIMP_GRAD_HSV_CCW: SET_ACTIVE ("/coloringtype/HSV (counter-clockwise hue)", TRUE); break; - case GRAD_HSV_CW: + case GIMP_GRAD_HSV_CW: SET_ACTIVE ("/coloringtype/HSV (clockwise hue)", TRUE); break; } diff --git a/app/core/core-enums.h b/app/core/core-enums.h index 6169ab5d26..9af75a21d7 100644 --- a/app/core/core-enums.h +++ b/app/core/core-enums.h @@ -71,6 +71,52 @@ typedef enum /*< pdb-skip >*/ * non-registered enums; register them if needed */ +typedef enum /*< skip >*/ +{ + GIMP_LINEAR, + GIMP_BILINEAR, + GIMP_RADIAL, + GIMP_SQUARE, + GIMP_CONICAL_SYMMETRIC, + GIMP_CONICAL_ASYMMETRIC, + GIMP_SHAPEBURST_ANGULAR, + GIMP_SHAPEBURST_SPHERICAL, + GIMP_SHAPEBURST_DIMPLED, + GIMP_SPIRAL_CLOCKWISE, + GIMP_SPIRAL_ANTICLOCKWISE +} GimpGradientType; + +typedef enum /*< pdb-skip >*/ /*< skip >*/ +{ + GIMP_GRAD_LINEAR = 0, + GIMP_GRAD_CURVED, + GIMP_GRAD_SINE, + GIMP_GRAD_SPHERE_INCREASING, + GIMP_GRAD_SPHERE_DECREASING +} GimpGradientSegmentType; + +typedef enum /*< pdb-skip >*/ /*< skip >*/ +{ + GIMP_GRAD_RGB = 0, /* normal RGB */ + GIMP_GRAD_HSV_CCW, /* counterclockwise hue */ + GIMP_GRAD_HSV_CW /* clockwise hue */ +} GimpGradientSegmentColor; + +typedef enum /*< chop=_MODE >*/ /*< skip >*/ +{ + GIMP_FG_BG_RGB_MODE, + GIMP_FG_BG_HSV_MODE, + GIMP_FG_TRANS_MODE, + GIMP_CUSTOM_MODE +} GimpBlendMode; + +typedef enum /*< skip >*/ +{ + GIMP_REPEAT_NONE, + GIMP_REPEAT_SAWTOOTH, + GIMP_REPEAT_TRIANGULAR +} GimpRepeatMode; + typedef enum /*< skip >*/ { GIMP_RGB_IMAGE, diff --git a/app/core/core-types.h b/app/core/core-types.h index 68f4d57ecc..1004b6c60f 100644 --- a/app/core/core-types.h +++ b/app/core/core-types.h @@ -131,52 +131,6 @@ typedef enum PATTERN_BUCKET_FILL } BucketFillMode; -typedef enum -{ - LINEAR, - BILINEAR, - RADIAL, - SQUARE, - CONICAL_SYMMETRIC, - CONICAL_ASYMMETRIC, - SHAPEBURST_ANGULAR, - SHAPEBURST_SPHERICAL, - SHAPEBURST_DIMPLED, - SPIRAL_CLOCKWISE, - SPIRAL_ANTICLOCKWISE -} GradientType; - -typedef enum /*< pdb-skip >*/ -{ - GRAD_LINEAR = 0, - GRAD_CURVED, - GRAD_SINE, - GRAD_SPHERE_INCREASING, - GRAD_SPHERE_DECREASING -} GimpGradientSegmentType; - -typedef enum /*< pdb-skip >*/ -{ - GRAD_RGB = 0, /* normal RGB */ - GRAD_HSV_CCW, /* counterclockwise hue */ - GRAD_HSV_CW /* clockwise hue */ -} GimpGradientSegmentColor; - -typedef enum /*< chop=_MODE >*/ -{ - FG_BG_RGB_MODE, - FG_BG_HSV_MODE, - FG_TRANS_MODE, - CUSTOM_MODE -} BlendMode; - -typedef enum -{ - REPEAT_NONE, - REPEAT_SAWTOOTH, - REPEAT_TRIANGULAR -} RepeatMode; - /* base objects */ diff --git a/app/core/gimpdrawable-blend.c b/app/core/gimpdrawable-blend.c index 181f7c8525..8da61b2c7e 100644 --- a/app/core/gimpdrawable-blend.c +++ b/app/core/gimpdrawable-blend.c @@ -41,20 +41,20 @@ #include "gimpimage-mask.h" -typedef gdouble (* RepeatFunc) (gdouble); +typedef gdouble (* BlendRepeatFunc) (gdouble); typedef struct { - GimpGradient *gradient; - gdouble offset; - gdouble sx, sy; - BlendMode blend_mode; - GradientType gradient_type; - GimpRGB fg, bg; - gdouble dist; - gdouble vec[2]; - RepeatFunc repeat_func; + GimpGradient *gradient; + gdouble offset; + gdouble sx, sy; + GimpBlendMode blend_mode; + GimpGradientType gradient_type; + GimpRGB fg, bg; + gdouble dist; + gdouble vec[2]; + BlendRepeatFunc repeat_func; } RenderBlendData; typedef struct @@ -128,24 +128,24 @@ static void gradient_put_pixel (gint x, GimpRGB *color, gpointer put_pixel_data); -static void gradient_fill_region (GimpImage *gimage, - GimpDrawable *drawable, - PixelRegion *PR, - gint width, - gint height, - BlendMode blend_mode, - GradientType gradient_type, - gdouble offset, - RepeatMode repeat, - gint supersample, - gint max_depth, - gdouble threshold, - gdouble sx, - gdouble sy, - gdouble ex, - gdouble ey, - GimpProgressFunc progress_callback, - gpointer progress_data); +static void gradient_fill_region (GimpImage *gimage, + GimpDrawable *drawable, + PixelRegion *PR, + gint width, + gint height, + GimpBlendMode blend_mode, + GimpGradientType gradient_type, + gdouble offset, + GimpRepeatMode repeat, + gint supersample, + gint max_depth, + gdouble threshold, + gdouble sx, + gdouble sy, + gdouble ex, + gdouble ey, + GimpProgressFunc progress_callback, + gpointer progress_data); /* variables for the shapeburst algs */ @@ -166,12 +166,12 @@ static PixelRegion distR = void gimp_drawable_blend (GimpDrawable *drawable, - BlendMode blend_mode, + GimpBlendMode blend_mode, int paint_mode, - GradientType gradient_type, + GimpGradientType gradient_type, gdouble opacity, gdouble offset, - RepeatMode repeat, + GimpRepeatMode repeat, gint supersample, gint max_depth, gdouble threshold, @@ -191,10 +191,6 @@ gimp_drawable_blend (GimpDrawable *drawable, gint x1, y1, x2, y2; g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); - g_return_if_fail (gradient_type >= LINEAR && - gradient_type <= SPIRAL_ANTICLOCKWISE); - g_return_if_fail (blend_mode >= FG_BG_RGB_MODE && blend_mode <= CUSTOM_MODE); - g_return_if_fail (repeat >= REPEAT_NONE && repeat <= REPEAT_TRIANGULAR); gimage = gimp_drawable_gimage (drawable); @@ -694,54 +690,54 @@ gradient_render_pixel (double x, switch (rbd->gradient_type) { - case LINEAR: + case GIMP_LINEAR: factor = gradient_calc_linear_factor (rbd->dist, rbd->vec, rbd->offset, x - rbd->sx, y - rbd->sy); break; - case BILINEAR: + case GIMP_BILINEAR: factor = gradient_calc_bilinear_factor (rbd->dist, rbd->vec, rbd->offset, x - rbd->sx, y - rbd->sy); break; - case RADIAL: + case GIMP_RADIAL: factor = gradient_calc_radial_factor (rbd->dist, rbd->offset, x - rbd->sx, y - rbd->sy); break; - case SQUARE: + case GIMP_SQUARE: factor = gradient_calc_square_factor (rbd->dist, rbd->offset, x - rbd->sx, y - rbd->sy); break; - case CONICAL_SYMMETRIC: + case GIMP_CONICAL_SYMMETRIC: factor = gradient_calc_conical_sym_factor (rbd->dist, rbd->vec, rbd->offset, x - rbd->sx, y - rbd->sy); break; - case CONICAL_ASYMMETRIC: + case GIMP_CONICAL_ASYMMETRIC: factor = gradient_calc_conical_asym_factor (rbd->dist, rbd->vec, rbd->offset, x - rbd->sx, y - rbd->sy); break; - case SHAPEBURST_ANGULAR: + case GIMP_SHAPEBURST_ANGULAR: factor = gradient_calc_shapeburst_angular_factor (x, y); break; - case SHAPEBURST_SPHERICAL: + case GIMP_SHAPEBURST_SPHERICAL: factor = gradient_calc_shapeburst_spherical_factor (x, y); break; - case SHAPEBURST_DIMPLED: + case GIMP_SHAPEBURST_DIMPLED: factor = gradient_calc_shapeburst_dimpled_factor (x, y); break; - case SPIRAL_CLOCKWISE: + case GIMP_SPIRAL_CLOCKWISE: factor = gradient_calc_spiral_factor (rbd->dist, rbd->vec, rbd->offset, x - rbd->sx, y - rbd->sy,TRUE); break; - case SPIRAL_ANTICLOCKWISE: + case GIMP_SPIRAL_ANTICLOCKWISE: factor = gradient_calc_spiral_factor (rbd->dist, rbd->vec, rbd->offset, x - rbd->sx, y - rbd->sy,FALSE); break; @@ -757,7 +753,7 @@ gradient_render_pixel (double x, /* Blend the colors */ - if (rbd->blend_mode == CUSTOM_MODE) + if (rbd->blend_mode == GIMP_CUSTOM_MODE) { gimp_gradient_get_color_at (rbd->gradient, factor, color); } @@ -770,7 +766,7 @@ gradient_render_pixel (double x, color->b = rbd->fg.b + (rbd->bg.b - rbd->fg.b) * factor; color->a = rbd->fg.a + (rbd->bg.a - rbd->fg.a) * factor; - if (rbd->blend_mode == FG_BG_HSV_MODE) + if (rbd->blend_mode == GIMP_FG_BG_HSV_MODE) gimp_hsv_to_rgb_double (&color->r, &color->g, &color->b); } } @@ -817,10 +813,10 @@ gradient_fill_region (GimpImage *gimage, PixelRegion *PR, gint width, gint height, - BlendMode blend_mode, - GradientType gradient_type, + GimpBlendMode blend_mode, + GimpGradientType gradient_type, gdouble offset, - RepeatMode repeat, + GimpRepeatMode repeat, gint supersample, gint max_depth, gdouble threshold, @@ -856,10 +852,10 @@ gradient_fill_region (GimpImage *gimage, switch (blend_mode) { - case FG_BG_RGB_MODE: + case GIMP_FG_BG_RGB_MODE: break; - case FG_BG_HSV_MODE: + case GIMP_FG_BG_HSV_MODE: /* Convert to HSV */ gimp_rgb_to_hsv_double (&rbd.fg.r, &rbd.fg.g, &rbd.fg.b); @@ -867,7 +863,7 @@ gradient_fill_region (GimpImage *gimage, break; - case FG_TRANS_MODE: + case GIMP_FG_TRANS_MODE: /* Color does not change, just the opacity */ rbd.bg = rbd.fg; @@ -875,7 +871,7 @@ gradient_fill_region (GimpImage *gimage, break; - case CUSTOM_MODE: + case GIMP_CUSTOM_MODE: break; default: @@ -887,20 +883,20 @@ gradient_fill_region (GimpImage *gimage, switch (gradient_type) { - case RADIAL: + case GIMP_RADIAL: rbd.dist = sqrt(SQR(ex - sx) + SQR(ey - sy)); break; - case SQUARE: + case GIMP_SQUARE: rbd.dist = MAX (fabs (ex - sx), fabs (ey - sy)); break; - case CONICAL_SYMMETRIC: - case CONICAL_ASYMMETRIC: - case SPIRAL_CLOCKWISE: - case SPIRAL_ANTICLOCKWISE: - case LINEAR: - case BILINEAR: + case GIMP_CONICAL_SYMMETRIC: + case GIMP_CONICAL_ASYMMETRIC: + case GIMP_SPIRAL_CLOCKWISE: + case GIMP_SPIRAL_ANTICLOCKWISE: + case GIMP_LINEAR: + case GIMP_BILINEAR: rbd.dist = sqrt (SQR (ex - sx) + SQR (ey - sy)); if (rbd.dist > 0.0) @@ -911,9 +907,9 @@ gradient_fill_region (GimpImage *gimage, break; - case SHAPEBURST_ANGULAR: - case SHAPEBURST_SPHERICAL: - case SHAPEBURST_DIMPLED: + case GIMP_SHAPEBURST_ANGULAR: + case GIMP_SHAPEBURST_SPHERICAL: + case GIMP_SHAPEBURST_DIMPLED: rbd.dist = sqrt (SQR (ex - sx) + SQR (ey - sy)); gradient_precalc_shapeburst (gimage, drawable, PR, rbd.dist); break; @@ -927,15 +923,15 @@ gradient_fill_region (GimpImage *gimage, switch (repeat) { - case REPEAT_NONE: + case GIMP_REPEAT_NONE: rbd.repeat_func = gradient_repeat_none; break; - case REPEAT_SAWTOOTH: + case GIMP_REPEAT_SAWTOOTH: rbd.repeat_func = gradient_repeat_sawtooth; break; - case REPEAT_TRIANGULAR: + case GIMP_REPEAT_TRIANGULAR: rbd.repeat_func = gradient_repeat_triangular; break; diff --git a/app/core/gimpdrawable-blend.h b/app/core/gimpdrawable-blend.h index 9ae8a8b860..9d62c403fb 100644 --- a/app/core/gimpdrawable-blend.h +++ b/app/core/gimpdrawable-blend.h @@ -21,12 +21,12 @@ void gimp_drawable_blend (GimpDrawable *drawable, - BlendMode blend_mode, + GimpBlendMode blend_mode, gint paint_mode, - GradientType gradient_type, + GimpGradientType gradient_type, gdouble opacity, gdouble offset, - RepeatMode repeat, + GimpRepeatMode repeat, gint supersample, gint max_depth, gdouble threshold, diff --git a/app/core/gimpgradient.c b/app/core/gimpgradient.c index 82f66b236f..3312ab81d0 100644 --- a/app/core/gimpgradient.c +++ b/app/core/gimpgradient.c @@ -552,23 +552,23 @@ gimp_gradient_get_color_at (GimpGradient *gradient, switch (seg->type) { - case GRAD_LINEAR: + case GIMP_GRAD_LINEAR: factor = gimp_gradient_calc_linear_factor (middle, pos); break; - case GRAD_CURVED: + case GIMP_GRAD_CURVED: factor = gimp_gradient_calc_curved_factor (middle, pos); break; - case GRAD_SINE: + case GIMP_GRAD_SINE: factor = gimp_gradient_calc_sine_factor (middle, pos); break; - case GRAD_SPHERE_INCREASING: + case GIMP_GRAD_SPHERE_INCREASING: factor = gimp_gradient_calc_sphere_increasing_factor (middle, pos); break; - case GRAD_SPHERE_DECREASING: + case GIMP_GRAD_SPHERE_DECREASING: factor = gimp_gradient_calc_sphere_decreasing_factor (middle, pos); break; @@ -580,12 +580,13 @@ gimp_gradient_get_color_at (GimpGradient *gradient, /* Calculate color components */ - rgb.a = seg->left_color.a + (seg->right_color.a - seg->left_color.a) * factor; + rgb.a = + seg->left_color.a + (seg->right_color.a - seg->left_color.a) * factor; - if (seg->color == GRAD_RGB) + if (seg->color == GIMP_GRAD_RGB) { - rgb.r - = seg->left_color.r + (seg->right_color.r - seg->left_color.r) * factor; + rgb.r = + seg->left_color.r + (seg->right_color.r - seg->left_color.r) * factor; rgb.g = seg->left_color.g + (seg->right_color.g - seg->left_color.g) * factor; @@ -606,7 +607,7 @@ gimp_gradient_get_color_at (GimpGradient *gradient, switch (seg->color) { - case GRAD_HSV_CCW: + case GIMP_GRAD_HSV_CCW: if (left_hsv.h < right_hsv.h) { left_hsv.h += (right_hsv.h - left_hsv.h) * factor; @@ -620,7 +621,7 @@ gimp_gradient_get_color_at (GimpGradient *gradient, } break; - case GRAD_HSV_CW: + case GIMP_GRAD_HSV_CW: if (right_hsv.h < left_hsv.h) { left_hsv.h -= (left_hsv.h - right_hsv.h) * factor; @@ -766,8 +767,8 @@ gimp_gradient_segment_new (void) gimp_rgba_set (&seg->left_color, 0.0, 0.0, 0.0, 1.0); gimp_rgba_set (&seg->right_color, 1.0, 1.0, 1.0, 1.0); - seg->type = GRAD_LINEAR; - seg->color = GRAD_RGB; + seg->type = GIMP_GRAD_LINEAR; + seg->color = GIMP_GRAD_RGB; seg->prev = seg->next = NULL; diff --git a/app/gui/gradient-editor-commands.c b/app/gui/gradient-editor-commands.c index 502292386e..220af4847a 100644 --- a/app/gui/gradient-editor-commands.c +++ b/app/gui/gradient-editor-commands.c @@ -423,12 +423,12 @@ gradient_editor_flip_cmd_callback (GtkWidget *widget, switch (oseg->type) { - case GRAD_SPHERE_INCREASING: - seg->type = GRAD_SPHERE_DECREASING; + case GIMP_GRAD_SPHERE_INCREASING: + seg->type = GIMP_GRAD_SPHERE_DECREASING; break; - case GRAD_SPHERE_DECREASING: - seg->type = GRAD_SPHERE_INCREASING; + case GIMP_GRAD_SPHERE_DECREASING: + seg->type = GIMP_GRAD_SPHERE_INCREASING; break; default: @@ -437,12 +437,12 @@ gradient_editor_flip_cmd_callback (GtkWidget *widget, switch (oseg->color) { - case GRAD_HSV_CCW: - seg->color = GRAD_HSV_CW; + case GIMP_GRAD_HSV_CCW: + seg->color = GIMP_GRAD_HSV_CW; break; - case GRAD_HSV_CW: - seg->color = GRAD_HSV_CCW; + case GIMP_GRAD_HSV_CW: + seg->color = GIMP_GRAD_HSV_CCW; break; default: @@ -1075,19 +1075,19 @@ gradient_editor_menu_update (GtkItemFactory *factory, switch (editor->control_sel_l->type) { - case GRAD_LINEAR: + case GIMP_GRAD_LINEAR: SET_ACTIVE ("/blendingfunction/Linear", TRUE); break; - case GRAD_CURVED: + case GIMP_GRAD_CURVED: SET_ACTIVE ("/blendingfunction/Curved", TRUE); break; - case GRAD_SINE: + case GIMP_GRAD_SINE: SET_ACTIVE ("/blendingfunction/Sinusodial", TRUE); break; - case GRAD_SPHERE_INCREASING: + case GIMP_GRAD_SPHERE_INCREASING: SET_ACTIVE ("/blendingfunction/Spherical (increasing)", TRUE); break; - case GRAD_SPHERE_DECREASING: + case GIMP_GRAD_SPHERE_DECREASING: SET_ACTIVE ("/blendingfunction/Spherical (decreasing)", TRUE); break; } @@ -1104,13 +1104,13 @@ gradient_editor_menu_update (GtkItemFactory *factory, switch (editor->control_sel_l->color) { - case GRAD_RGB: + case GIMP_GRAD_RGB: SET_ACTIVE ("/coloringtype/RGB", TRUE); break; - case GRAD_HSV_CCW: + case GIMP_GRAD_HSV_CCW: SET_ACTIVE ("/coloringtype/HSV (counter-clockwise hue)", TRUE); break; - case GRAD_HSV_CW: + case GIMP_GRAD_HSV_CW: SET_ACTIVE ("/coloringtype/HSV (clockwise hue)", TRUE); break; } diff --git a/app/gui/menus.c b/app/gui/menus.c index 70406918d7..ace2c92e2c 100644 --- a/app/gui/menus.c +++ b/app/gui/menus.c @@ -1517,27 +1517,27 @@ static GimpItemFactoryEntry gradient_editor_entries[] = { { N_("/blendingfunction/Linear"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_LINEAR, "" }, + GIMP_GRAD_LINEAR, "" }, NULL, NULL, NULL }, { { N_("/blendingfunction/Curved"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_CURVED, "/blendingfunction/Linear" }, + GIMP_GRAD_CURVED, "/blendingfunction/Linear" }, NULL, NULL, NULL }, { { N_("/blendingfunction/Sinusodial"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_SINE, "/blendingfunction/Linear" }, + GIMP_GRAD_SINE, "/blendingfunction/Linear" }, NULL, NULL, NULL }, { { N_("/blendingfunction/Spherical (increasing)"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_SPHERE_INCREASING, "/blendingfunction/Linear" }, + GIMP_GRAD_SPHERE_INCREASING, "/blendingfunction/Linear" }, NULL, NULL, NULL }, { { N_("/blendingfunction/Spherical (decreasing)"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_SPHERE_DECREASING, "/blendingfunction/Linear" }, + GIMP_GRAD_SPHERE_DECREASING, "/blendingfunction/Linear" }, NULL, NULL, NULL }, { { N_("/blendingfunction/(Varies)"), NULL, NULL, @@ -1547,17 +1547,17 @@ static GimpItemFactoryEntry gradient_editor_entries[] = { { N_("/coloringtype/RGB"), NULL, gradient_editor_coloring_type_cmd_callback, - GRAD_RGB, "" }, + GIMP_GRAD_RGB, "" }, NULL, NULL, NULL }, { { N_("/coloringtype/HSV (counter-clockwise hue)"), NULL, gradient_editor_coloring_type_cmd_callback, - GRAD_HSV_CCW, "/coloringtype/RGB" }, + GIMP_GRAD_HSV_CCW, "/coloringtype/RGB" }, NULL, NULL, NULL }, { { N_("/coloringtype/HSV (clockwise hue)"), NULL, gradient_editor_coloring_type_cmd_callback, - GRAD_HSV_CW, "/coloringtype/RGB" }, + GIMP_GRAD_HSV_CW, "/coloringtype/RGB" }, NULL, NULL, NULL }, { { N_("/coloringtype/(Varies)"), NULL, NULL, diff --git a/app/menus/menus.c b/app/menus/menus.c index 70406918d7..ace2c92e2c 100644 --- a/app/menus/menus.c +++ b/app/menus/menus.c @@ -1517,27 +1517,27 @@ static GimpItemFactoryEntry gradient_editor_entries[] = { { N_("/blendingfunction/Linear"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_LINEAR, "" }, + GIMP_GRAD_LINEAR, "" }, NULL, NULL, NULL }, { { N_("/blendingfunction/Curved"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_CURVED, "/blendingfunction/Linear" }, + GIMP_GRAD_CURVED, "/blendingfunction/Linear" }, NULL, NULL, NULL }, { { N_("/blendingfunction/Sinusodial"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_SINE, "/blendingfunction/Linear" }, + GIMP_GRAD_SINE, "/blendingfunction/Linear" }, NULL, NULL, NULL }, { { N_("/blendingfunction/Spherical (increasing)"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_SPHERE_INCREASING, "/blendingfunction/Linear" }, + GIMP_GRAD_SPHERE_INCREASING, "/blendingfunction/Linear" }, NULL, NULL, NULL }, { { N_("/blendingfunction/Spherical (decreasing)"), NULL, gradient_editor_blending_func_cmd_callback, - GRAD_SPHERE_DECREASING, "/blendingfunction/Linear" }, + GIMP_GRAD_SPHERE_DECREASING, "/blendingfunction/Linear" }, NULL, NULL, NULL }, { { N_("/blendingfunction/(Varies)"), NULL, NULL, @@ -1547,17 +1547,17 @@ static GimpItemFactoryEntry gradient_editor_entries[] = { { N_("/coloringtype/RGB"), NULL, gradient_editor_coloring_type_cmd_callback, - GRAD_RGB, "" }, + GIMP_GRAD_RGB, "" }, NULL, NULL, NULL }, { { N_("/coloringtype/HSV (counter-clockwise hue)"), NULL, gradient_editor_coloring_type_cmd_callback, - GRAD_HSV_CCW, "/coloringtype/RGB" }, + GIMP_GRAD_HSV_CCW, "/coloringtype/RGB" }, NULL, NULL, NULL }, { { N_("/coloringtype/HSV (clockwise hue)"), NULL, gradient_editor_coloring_type_cmd_callback, - GRAD_HSV_CW, "/coloringtype/RGB" }, + GIMP_GRAD_HSV_CW, "/coloringtype/RGB" }, NULL, NULL, NULL }, { { N_("/coloringtype/(Varies)"), NULL, NULL, diff --git a/app/pdb/misc_tools_cmds.c b/app/pdb/misc_tools_cmds.c index 8d67517739..aa790f6786 100644 --- a/app/pdb/misc_tools_cmds.c +++ b/app/pdb/misc_tools_cmds.c @@ -31,6 +31,7 @@ #include "base/base-enums.h" #include "base/tile-manager.h" +#include "core/core-enums.h" #include "core/core-types.h" #include "core/gimpdrawable-blend.h" #include "core/gimpdrawable-bucket-fill.h" @@ -78,7 +79,7 @@ blend_invoker (Gimp *gimp, success = FALSE; blend_mode = args[1].value.pdb_int; - if (blend_mode < FG_BG_RGB_MODE || blend_mode > CUSTOM_MODE) + if (blend_mode < GIMP_FG_BG_RGB_MODE || blend_mode > GIMP_CUSTOM_MODE) success = FALSE; paint_mode = args[2].value.pdb_int; @@ -86,7 +87,7 @@ blend_invoker (Gimp *gimp, success = FALSE; gradient_type = args[3].value.pdb_int; - if (gradient_type < LINEAR || gradient_type > SPIRAL_ANTICLOCKWISE) + if (gradient_type < GIMP_LINEAR || gradient_type > GIMP_SPIRAL_ANTICLOCKWISE) success = FALSE; opacity = args[4].value.pdb_float; @@ -98,7 +99,7 @@ blend_invoker (Gimp *gimp, success = FALSE; repeat = args[6].value.pdb_int; - if (repeat < REPEAT_NONE || repeat > REPEAT_TRIANGULAR) + if (repeat < GIMP_REPEAT_NONE || repeat > GIMP_REPEAT_TRIANGULAR) success = FALSE; supersample = args[7].value.pdb_int ? TRUE : FALSE; @@ -153,7 +154,7 @@ static ProcArg blend_inargs[] = { GIMP_PDB_INT32, "blend_mode", - "The type of blend: { FG_BG_RGB (0), FG_BG_HSV (1), FG_TRANS (2), CUSTOM (3) }" + "The type of blend: { GIMP_FG_BG_RGB (0), GIMP_FG_BG_HSV (1), GIMP_FG_TRANS (2), GIMP_CUSTOM (3) }" }, { GIMP_PDB_INT32, @@ -163,7 +164,7 @@ static ProcArg blend_inargs[] = { GIMP_PDB_INT32, "gradient_type", - "The type of gradient: { LINEAR (0), BILINEAR (1), RADIAL (2), SQUARE (3), CONICAL_SYMMETRIC (4), CONICAL_ASYMMETRIC (5), SHAPEBURST_ANGULAR (6), SHAPEBURST_SPHERICAL (7), SHAPEBURST_DIMPLED (8), SPIRAL_CLOCKWISE (9), SPIRAL_ANTICLOCKWISE (10) }" + "The type of gradient: { GIMP_LINEAR (0), GIMP_BILINEAR (1), GIMP_RADIAL (2), GIMP_SQUARE (3), GIMP_CONICAL_SYMMETRIC (4), GIMP_CONICAL_ASYMMETRIC (5), GIMP_SHAPEBURST_ANGULAR (6), GIMP_SHAPEBURST_SPHERICAL (7), GIMP_SHAPEBURST_DIMPLED (8), GIMP_SPIRAL_CLOCKWISE (9), GIMP_SPIRAL_ANTICLOCKWISE (10) }" }, { GIMP_PDB_FLOAT, @@ -178,7 +179,7 @@ static ProcArg blend_inargs[] = { GIMP_PDB_INT32, "repeat", - "Repeat mode: { REPEAT_NONE (0), REPEAT_SAWTOOTH (1), REPEAT_TRIANGULAR (2) }" + "Repeat mode: { GIMP_REPEAT_NONE (0), GIMP_REPEAT_SAWTOOTH (1), GIMP_REPEAT_TRIANGULAR (2) }" }, { GIMP_PDB_INT32, diff --git a/app/tools/gimpblendtool.c b/app/tools/gimpblendtool.c index 161cb75718..303debf000 100644 --- a/app/tools/gimpblendtool.c +++ b/app/tools/gimpblendtool.c @@ -59,35 +59,35 @@ typedef struct _BlendOptions BlendOptions; struct _BlendOptions { - PaintOptions paint_options; + PaintOptions paint_options; - gdouble offset; - gdouble offset_d; - GtkObject *offset_w; + gdouble offset; + gdouble offset_d; + GtkObject *offset_w; - BlendMode blend_mode; - BlendMode blend_mode_d; - GtkWidget *blend_mode_w; + GimpBlendMode blend_mode; + GimpBlendMode blend_mode_d; + GtkWidget *blend_mode_w; - GradientType gradient_type; - GradientType gradient_type_d; - GtkWidget *gradient_type_w; + GimpGradientType gradient_type; + GimpGradientType gradient_type_d; + GtkWidget *gradient_type_w; - RepeatMode repeat; - RepeatMode repeat_d; - GtkWidget *repeat_w; + GimpRepeatMode repeat; + GimpRepeatMode repeat_d; + GtkWidget *repeat_w; + + gint supersample; + gint supersample_d; + GtkWidget *supersample_w; - gint supersample; - gint supersample_d; - GtkWidget *supersample_w; + gint max_depth; + gint max_depth_d; + GtkObject *max_depth_w; - gint max_depth; - gint max_depth_d; - GtkObject *max_depth_w; - - gdouble threshold; - gdouble threshold_d; - GtkObject *threshold_w; + gdouble threshold; + gdouble threshold_d; + GtkObject *threshold_w; }; @@ -536,9 +536,9 @@ blend_options_new (GimpToolInfo *tool_info) ((GimpToolOptions *) options)->reset_func = blend_options_reset; options->offset = options->offset_d = 0.0; - options->blend_mode = options->blend_mode_d = FG_BG_RGB_MODE; - options->gradient_type = options->gradient_type_d = LINEAR; - options->repeat = options->repeat_d = REPEAT_NONE; + options->blend_mode = options->blend_mode_d = GIMP_FG_BG_RGB_MODE; + options->gradient_type = options->gradient_type_d = GIMP_LINEAR; + options->repeat = options->repeat_d = GIMP_REPEAT_NONE; options->supersample = options->supersample_d = FALSE; options->max_depth = options->max_depth_d = 3; options->threshold = options->threshold_d = 0.2; @@ -589,10 +589,10 @@ blend_options_new (GimpToolInfo *tool_info) &options->blend_mode, GINT_TO_POINTER (options->blend_mode_d), - _("FG to BG (RGB)"), GINT_TO_POINTER (FG_BG_RGB_MODE), NULL, - _("FG to BG (HSV)"), GINT_TO_POINTER (FG_BG_HSV_MODE), NULL, - _("FG to Transparent"), GINT_TO_POINTER (FG_TRANS_MODE), NULL, - _("Custom Gradient"), GINT_TO_POINTER (CUSTOM_MODE), NULL, + _("FG to BG (RGB)"), GINT_TO_POINTER (GIMP_FG_BG_RGB_MODE), NULL, + _("FG to BG (HSV)"), GINT_TO_POINTER (GIMP_FG_BG_HSV_MODE), NULL, + _("FG to Transparent"), GINT_TO_POINTER (GIMP_FG_TRANS_MODE), NULL, + _("Custom Gradient"), GINT_TO_POINTER (GIMP_CUSTOM_MODE), NULL, NULL); @@ -607,17 +607,17 @@ blend_options_new (GimpToolInfo *tool_info) options, GINT_TO_POINTER (options->gradient_type_d), - _("Linear"), GINT_TO_POINTER (LINEAR), NULL, - _("Bi-Linear"), GINT_TO_POINTER (BILINEAR), NULL, - _("Radial"), GINT_TO_POINTER (RADIAL), NULL, - _("Square"), GINT_TO_POINTER (SQUARE), NULL, - _("Conical (symmetric)"), GINT_TO_POINTER (CONICAL_SYMMETRIC), NULL, - _("Conical (asymmetric)"), GINT_TO_POINTER (CONICAL_ASYMMETRIC), NULL, - _("Shapeburst (angular)"), GINT_TO_POINTER (SHAPEBURST_ANGULAR), NULL, - _("Shapeburst (spherical)"), GINT_TO_POINTER (SHAPEBURST_SPHERICAL), NULL, - _("Shapeburst (dimpled)"), GINT_TO_POINTER (SHAPEBURST_DIMPLED), NULL, - _("Spiral (clockwise)"), GINT_TO_POINTER (SPIRAL_CLOCKWISE), NULL, - _("Spiral (anticlockwise)"), GINT_TO_POINTER (SPIRAL_ANTICLOCKWISE), NULL, + _("Linear"), GINT_TO_POINTER (GIMP_LINEAR), NULL, + _("Bi-Linear"), GINT_TO_POINTER (GIMP_BILINEAR), NULL, + _("Radial"), GINT_TO_POINTER (GIMP_RADIAL), NULL, + _("Square"), GINT_TO_POINTER (GIMP_SQUARE), NULL, + _("Conical (symmetric)"), GINT_TO_POINTER (GIMP_CONICAL_SYMMETRIC), NULL, + _("Conical (asymmetric)"), GINT_TO_POINTER (GIMP_CONICAL_ASYMMETRIC), NULL, + _("Shapeburst (angular)"), GINT_TO_POINTER (GIMP_SHAPEBURST_ANGULAR), NULL, + _("Shapeburst (spherical)"), GINT_TO_POINTER (GIMP_SHAPEBURST_SPHERICAL), NULL, + _("Shapeburst (dimpled)"), GINT_TO_POINTER (GIMP_SHAPEBURST_DIMPLED), NULL, + _("Spiral (clockwise)"), GINT_TO_POINTER (GIMP_SPIRAL_CLOCKWISE), NULL, + _("Spiral (anticlockwise)"), GINT_TO_POINTER (GIMP_SPIRAL_ANTICLOCKWISE), NULL, NULL); @@ -632,9 +632,9 @@ blend_options_new (GimpToolInfo *tool_info) &options->repeat, GINT_TO_POINTER (options->repeat_d), - _("None"), GINT_TO_POINTER (REPEAT_NONE), NULL, - _("Sawtooth Wave"), GINT_TO_POINTER (REPEAT_SAWTOOTH), NULL, - _("Triangular Wave"), GINT_TO_POINTER (REPEAT_TRIANGULAR), NULL, + _("None"), GINT_TO_POINTER (GIMP_REPEAT_NONE), NULL, + _("Sawtooth Wave"), GINT_TO_POINTER (GIMP_REPEAT_SAWTOOTH), NULL, + _("Triangular Wave"), GINT_TO_POINTER (GIMP_REPEAT_TRIANGULAR), NULL, NULL); @@ -775,8 +775,8 @@ blend_options_drop_gradient (GtkWidget *widget, gimp_context_set_gradient (context, GIMP_GRADIENT (viewable)); gtk_option_menu_set_history (GTK_OPTION_MENU (options->blend_mode_w), - CUSTOM_MODE); - options->blend_mode = CUSTOM_MODE; + GIMP_CUSTOM_MODE); + options->blend_mode = GIMP_CUSTOM_MODE; } static void diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h index 11ea88ccfc..63bf595389 100644 --- a/libgimp/gimpenums.h +++ b/libgimp/gimpenums.h @@ -33,14 +33,6 @@ typedef enum GIMP_INV_SELECTION_MASK } GimpAddMaskType; -typedef enum -{ - GIMP_FG_BG_RGB, - GIMP_FG_BG_HSV, - GIMP_FG_TRANS, - GIMP_CUSTOM -} GimpBlendMode; - typedef enum { GIMP_HARD, @@ -110,6 +102,14 @@ typedef enum GIMP_BURN } GimpDodgeBurnType; +typedef enum +{ + GIMP_FG_BG_RGB, + GIMP_FG_BG_HSV, + GIMP_FG_TRANS, + GIMP_CUSTOM +} GimpBlendMode; + typedef enum { GIMP_VALUE_LUT, @@ -135,6 +135,21 @@ typedef enum GIMP_NO_IMAGE_FILL } GimpFillType; +typedef enum +{ + GIMP_LINEAR, + GIMP_BILINEAR, + GIMP_RADIAL, + GIMP_SQUARE, + GIMP_CONICAL_SYMMETRIC, + GIMP_CONICAL_ASYMMETRIC, + GIMP_SHAPEBURST_ANGULAR, + GIMP_SHAPEBURST_SPHERICAL, + GIMP_SHAPEBURST_DIMPLED, + GIMP_SPIRAL_CLOCKWISE, + GIMP_SPIRAL_ANTICLOCKWISE +} GimpGradientType; + typedef enum { GIMP_RGB, @@ -189,6 +204,13 @@ typedef enum GIMP_OFFSET_TRANSPARENT } GimpOffsetType; +typedef enum +{ + GIMP_REPEAT_NONE, + GIMP_REPEAT_SAWTOOTH, + GIMP_REPEAT_TRIANGULAR +} GimpRepeatMode; + typedef enum { GIMP_SHADOWS, @@ -205,21 +227,6 @@ typedef enum GIMP_ONCE_END_COLOR } GimpGradientPaintMode; -typedef enum -{ - GIMP_LINEAR, - GIMP_BILINEAR, - GIMP_RADIAL, - GIMP_SQUARE, - GIMP_CONICAL_SYMMETRIC, - GIMP_CONICAL_ASYMMETRIC, - GIMP_SHAPEBURST_ANGULAR, - GIMP_SHAPEBURST_SPHERICAL, - GIMP_SHAPEBURST_DIMPLED, - GIMP_SPIRAL_CLOCKWISE, - GIMP_SPIRAL_ANTICLOCKWISE -} GimpGradientType; - typedef enum { GIMP_ALL_HUES, @@ -258,13 +265,6 @@ typedef enum GIMP_INCREMENTAL } GimpPaintApplicationMode; -typedef enum -{ - GIMP_REPEAT_NONE, - GIMP_REPEAT_SAWTOOTH, - GIMP_REPEAT_TRIANGULAR -} GimpRepeatMode; - typedef enum { GIMP_RUN_INTERACTIVE, diff --git a/plug-ins/script-fu/script-fu-constants.c b/plug-ins/script-fu/script-fu-constants.c index cae1106bc3..8666b0c972 100644 --- a/plug-ins/script-fu/script-fu-constants.c +++ b/plug-ins/script-fu/script-fu-constants.c @@ -29,11 +29,6 @@ init_generated_constants (void) setvar (cintern ("SELECTION-MASK"), flocons (3), NIL); setvar (cintern ("INV-SELECTION-MASK"), flocons (4), NIL); - setvar (cintern ("FG-BG-RGB"), flocons (0), NIL); - setvar (cintern ("FG-BG-HSV"), flocons (1), NIL); - setvar (cintern ("FG-TRANS"), flocons (2), NIL); - setvar (cintern ("CUSTOM"), flocons (3), NIL); - setvar (cintern ("HARD"), flocons (0), NIL); setvar (cintern ("SOFT"), flocons (1), NIL); setvar (cintern ("PRESSURE"), flocons (2), NIL); @@ -76,6 +71,11 @@ init_generated_constants (void) setvar (cintern ("DODGE"), flocons (0), NIL); setvar (cintern ("BURN"), flocons (1), NIL); + setvar (cintern ("FG-BG-RGB"), flocons (0), NIL); + setvar (cintern ("FG-BG-HSV"), flocons (1), NIL); + setvar (cintern ("FG-TRANS"), flocons (2), NIL); + setvar (cintern ("CUSTOM"), flocons (3), NIL); + setvar (cintern ("VALUE-LUT"), flocons (0), NIL); setvar (cintern ("RED-LUT"), flocons (1), NIL); setvar (cintern ("GREEN-LUT"), flocons (2), NIL); @@ -92,6 +92,18 @@ init_generated_constants (void) setvar (cintern ("TRANS-IMAGE-FILL"), flocons (3), NIL); setvar (cintern ("NO-IMAGE-FILL"), flocons (4), NIL); + setvar (cintern ("LINEAR"), flocons (0), NIL); + setvar (cintern ("BILINEAR"), flocons (1), NIL); + setvar (cintern ("RADIAL"), flocons (2), NIL); + setvar (cintern ("SQUARE"), flocons (3), NIL); + setvar (cintern ("CONICAL-SYMMETRIC"), flocons (4), NIL); + setvar (cintern ("CONICAL-ASYMMETRIC"), flocons (5), NIL); + setvar (cintern ("SHAPEBURST-ANGULAR"), flocons (6), NIL); + setvar (cintern ("SHAPEBURST-SPHERICAL"), flocons (7), NIL); + setvar (cintern ("SHAPEBURST-DIMPLED"), flocons (8), NIL); + setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (9), NIL); + setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (10), NIL); + setvar (cintern ("RGB"), flocons (0), NIL); setvar (cintern ("GRAY"), flocons (1), NIL); setvar (cintern ("INDEXED"), flocons (2), NIL); @@ -170,6 +182,10 @@ init_generated_constants (void) setvar (cintern ("PDB-SUCCESS"), flocons (3), NIL); setvar (cintern ("PDB-CANCEL"), flocons (4), NIL); + setvar (cintern ("REPEAT-NONE"), flocons (0), NIL); + setvar (cintern ("REPEAT-SAWTOOTH"), flocons (1), NIL); + setvar (cintern ("REPEAT-TRIANGULAR"), flocons (2), NIL); + setvar (cintern ("STACK-TRACE-NEVER"), flocons (0), NIL); setvar (cintern ("STACK-TRACE-QUERY"), flocons (1), NIL); setvar (cintern ("STACK-TRACE-ALWAYS"), flocons (2), NIL); @@ -191,18 +207,6 @@ init_generated_constants (void) setvar (cintern ("LOOP-TRIANGLE"), flocons (3), NIL); setvar (cintern ("ONCE-END-COLOR"), flocons (4), NIL); - setvar (cintern ("LINEAR"), flocons (0), NIL); - setvar (cintern ("BILINEAR"), flocons (1), NIL); - setvar (cintern ("RADIAL"), flocons (2), NIL); - setvar (cintern ("SQUARE"), flocons (3), NIL); - setvar (cintern ("CONICAL-SYMMETRIC"), flocons (4), NIL); - setvar (cintern ("CONICAL-ASYMMETRIC"), flocons (5), NIL); - setvar (cintern ("SHAPEBURST-ANGULAR"), flocons (6), NIL); - setvar (cintern ("SHAPEBURST-SPHERICAL"), flocons (7), NIL); - setvar (cintern ("SHAPEBURST-DIMPLED"), flocons (8), NIL); - setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (9), NIL); - setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (10), NIL); - setvar (cintern ("ALL-HUES"), flocons (0), NIL); setvar (cintern ("RED-HUES"), flocons (1), NIL); setvar (cintern ("YELLOW-HUES"), flocons (2), NIL); @@ -226,10 +230,6 @@ init_generated_constants (void) setvar (cintern ("CONTINUOUS"), flocons (0), NIL); setvar (cintern ("INCREMENTAL"), flocons (1), NIL); - setvar (cintern ("REPEAT-NONE"), flocons (0), NIL); - setvar (cintern ("REPEAT-SAWTOOTH"), flocons (1), NIL); - setvar (cintern ("REPEAT-TRIANGULAR"), flocons (2), NIL); - setvar (cintern ("RUN-INTERACTIVE"), flocons (0), NIL); setvar (cintern ("RUN-NONINTERACTIVE"), flocons (1), NIL); setvar (cintern ("RUN-WITH-LAST-VALS"), flocons (2), NIL); diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl index 2ee6a2fc99..0084112e0f 100644 --- a/tools/pdbgen/enums.pl +++ b/tools/pdbgen/enums.pl @@ -290,47 +290,6 @@ package Gimp::CodeGen::enums; BG_BUCKET_FILL => '1', PATTERN_BUCKET_FILL => '2' } }, - GradientType => - { contig => 1, - header => 'core/core-types.h', - symbols => [ qw(LINEAR BILINEAR RADIAL SQUARE CONICAL_SYMMETRIC - CONICAL_ASYMMETRIC SHAPEBURST_ANGULAR - SHAPEBURST_SPHERICAL SHAPEBURST_DIMPLED - SPIRAL_CLOCKWISE SPIRAL_ANTICLOCKWISE) ], - mapping => { LINEAR => '0', - BILINEAR => '1', - RADIAL => '2', - SQUARE => '3', - CONICAL_SYMMETRIC => '4', - CONICAL_ASYMMETRIC => '5', - SHAPEBURST_ANGULAR => '6', - SHAPEBURST_SPHERICAL => '7', - SHAPEBURST_DIMPLED => '8', - SPIRAL_CLOCKWISE => '9', - SPIRAL_ANTICLOCKWISE => '10' } - }, - BlendMode => - { contig => 1, - header => 'core/core-types.h', - symbols => [ qw(FG_BG_RGB_MODE FG_BG_HSV_MODE FG_TRANS_MODE - CUSTOM_MODE) ], - mapping => { FG_BG_RGB_MODE => '0', - FG_BG_HSV_MODE => '1', - FG_TRANS_MODE => '2', - CUSTOM_MODE => '3' }, - nicks => { FG_BG_RGB_MODE => 'FG_BG_RGB', - FG_BG_HSV_MODE => 'FG_BG_HSV', - FG_TRANS_MODE => 'FG_TRANS', - CUSTOM_MODE => 'CUSTOM' } - }, - RepeatMode => - { contig => 1, - header => 'core/core-types.h', - symbols => [ qw(REPEAT_NONE REPEAT_SAWTOOTH REPEAT_TRIANGULAR) ], - mapping => { REPEAT_NONE => '0', - REPEAT_SAWTOOTH => '1', - REPEAT_TRIANGULAR => '2' } - }, GimpImageBaseType => { contig => 1, header => 'core/core-enums.h', @@ -339,6 +298,49 @@ package Gimp::CodeGen::enums; GIMP_GRAY => '1', GIMP_INDEXED => '2' } }, + GimpGradientType => + { contig => 1, + header => 'core/core-enums.h', + symbols => [ qw(GIMP_LINEAR GIMP_BILINEAR GIMP_RADIAL GIMP_SQUARE + GIMP_CONICAL_SYMMETRIC GIMP_CONICAL_ASYMMETRIC + GIMP_SHAPEBURST_ANGULAR GIMP_SHAPEBURST_SPHERICAL + GIMP_SHAPEBURST_DIMPLED GIMP_SPIRAL_CLOCKWISE + GIMP_SPIRAL_ANTICLOCKWISE) ], + mapping => { GIMP_LINEAR => '0', + GIMP_BILINEAR => '1', + GIMP_RADIAL => '2', + GIMP_SQUARE => '3', + GIMP_CONICAL_SYMMETRIC => '4', + GIMP_CONICAL_ASYMMETRIC => '5', + GIMP_SHAPEBURST_ANGULAR => '6', + GIMP_SHAPEBURST_SPHERICAL => '7', + GIMP_SHAPEBURST_DIMPLED => '8', + GIMP_SPIRAL_CLOCKWISE => '9', + GIMP_SPIRAL_ANTICLOCKWISE => '10' } + }, + GimpBlendMode => + { contig => 1, + header => 'core/core-enums.h', + symbols => [ qw(GIMP_FG_BG_RGB_MODE GIMP_FG_BG_HSV_MODE + GIMP_FG_TRANS_MODE GIMP_CUSTOM_MODE) ], + mapping => { GIMP_FG_BG_RGB_MODE => '0', + GIMP_FG_BG_HSV_MODE => '1', + GIMP_FG_TRANS_MODE => '2', + GIMP_CUSTOM_MODE => '3' }, + nicks => { GIMP_FG_BG_RGB_MODE => 'GIMP_FG_BG_RGB', + GIMP_FG_BG_HSV_MODE => 'GIMP_FG_BG_HSV', + GIMP_FG_TRANS_MODE => 'GIMP_FG_TRANS', + GIMP_CUSTOM_MODE => 'GIMP_CUSTOM' } + }, + GimpRepeatMode => + { contig => 1, + header => 'core/core-enums.h', + symbols => [ qw(GIMP_REPEAT_NONE GIMP_REPEAT_SAWTOOTH + GIMP_REPEAT_TRIANGULAR) ], + mapping => { GIMP_REPEAT_NONE => '0', + GIMP_REPEAT_SAWTOOTH => '1', + GIMP_REPEAT_TRIANGULAR => '2' } + }, GimpImageType => { contig => 1, header => 'core/core-enums.h', diff --git a/tools/pdbgen/pdb/misc_tools.pdb b/tools/pdbgen/pdb/misc_tools.pdb index dcd66d3907..df7599396e 100644 --- a/tools/pdbgen/pdb/misc_tools.pdb +++ b/tools/pdbgen/pdb/misc_tools.pdb @@ -66,11 +66,11 @@ HELP @inargs = ( &drawable_arg, - { name => 'blend_mode', type => 'enum BlendMode', + { name => 'blend_mode', type => 'enum GimpBlendMode', desc => 'The type of blend: { %%desc%% }' }, { name => 'paint_mode', type => 'enum GimpLayerModeEffects', desc => 'The paint application mode: { %%desc%% }' }, - { name => 'gradient_type', type => 'enum GradientType', + { name => 'gradient_type', type => 'enum GimpGradientType', desc => 'The type of gradient: { %%desc%% }' }, { name => 'opacity', type => '0 <= float <= 100', desc => 'The opacity of the final blend (%%desc%%)' }, @@ -78,7 +78,7 @@ HELP desc => 'Offset relates to the starting and ending coordinates specified for the blend. This parameter is mode dependent (%%desc%%)' }, - { name => 'repeat', type => 'enum RepeatMode', + { name => 'repeat', type => 'enum GimpRepeatMode', desc => 'Repeat mode: { %%desc%% }' }, { name => 'supersample', type => 'boolean', desc => 'Do adaptive supersampling (%%desc%%)' },