Commit bba46560 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/core/core-enums.h moved some more enums into the right place and

2002-03-18  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.h
	* app/core/core-types.h: moved some more enums into the right place
	and namespacified them.

	* app/undo.c
	* app/core/gimpdrawable-bucket-fill.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpedit.c
	* app/core/gimpimage-mask.c
	* app/core/gimpimage-new.c
	* app/core/gimpimage-qmask.c
	* app/core/gimplayer.[ch]
	* app/display/gimpdisplayshell-dnd.c
	* app/gui/channels-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/layers-commands.c
	* app/gui/menus.c
	* app/paint-funcs/paint-funcs.c
	* app/tools/gimpbucketfilltool.c
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/misc_tools.pdb: changed accordingly.

	* libgimp/gimpcompat.h
	* plug-ins/script-fu/siod-wrapper.c: added compat defines for changed
	GimpMaskApplyMode enum.

	* tools/pdbgen/enums.pl
	* app/pdb/drawable_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/misc_tools_cmds.c
	* libgimp/gimpenums.h
	* plug-ins/script-fu/script-fu-constants.c: regenerated.
parent a177dd11
2002-03-18 Sven Neumann <sven@gimp.org>
* app/core/core-enums.h
* app/core/core-types.h: moved some more enums into the right place
and namespacified them.
* app/undo.c
* app/core/gimpdrawable-bucket-fill.[ch]
* app/core/gimpdrawable.c
* app/core/gimpedit.c
* app/core/gimpimage-mask.c
* app/core/gimpimage-new.c
* app/core/gimpimage-qmask.c
* app/core/gimplayer.[ch]
* app/display/gimpdisplayshell-dnd.c
* app/gui/channels-commands.c
* app/gui/file-new-dialog.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/paint-funcs/paint-funcs.c
* app/tools/gimpbucketfilltool.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/misc_tools.pdb: changed accordingly.
* libgimp/gimpcompat.h
* plug-ins/script-fu/siod-wrapper.c: added compat defines for changed
GimpMaskApplyMode enum.
* tools/pdbgen/enums.pl
* app/pdb/drawable_cmds.c
* app/pdb/edit_cmds.c
* app/pdb/image_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/misc_tools_cmds.c
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c: regenerated.
2002-03-18 Tuomas Kuosmanen <tigert@ximian.com>
* themes/Default/images/stock-button-eye.png: Added some
......
......@@ -232,7 +232,7 @@ new_channel_query_ok_callback (GtkWidget *widget,
gimp_drawable_fill_by_type (GIMP_DRAWABLE (new_channel),
gimp_get_user_context (gimage->gimp),
TRANSPARENT_FILL);
GIMP_TRANSPARENT_FILL);
gimp_image_add_channel (gimage, new_channel, -1);
gdisplays_flush ();
......@@ -273,7 +273,7 @@ channels_new_channel_query (GimpImage *gimage,
gimp_drawable_fill_by_type (GIMP_DRAWABLE (new_channel),
gimp_get_user_context (gimage->gimp),
TRANSPARENT_FILL);
GIMP_TRANSPARENT_FILL);
gimp_channel_translate (new_channel, off_x, off_y);
gimp_image_add_channel (gimage, new_channel, -1);
......
......@@ -299,7 +299,7 @@ layers_apply_layer_mask_cmd_callback (GtkWidget *widget,
flush = ! active_layer->mask->apply_mask || active_layer->mask->show_mask;
gimp_layer_apply_mask (active_layer, APPLY, TRUE);
gimp_layer_apply_mask (active_layer, GIMP_MASK_APPLY, TRUE);
if (flush)
gdisplays_flush ();
......@@ -320,7 +320,7 @@ layers_delete_layer_mask_cmd_callback (GtkWidget *widget,
flush = active_layer->mask->apply_mask || active_layer->mask->show_mask;
gimp_layer_apply_mask (active_layer, DISCARD, TRUE);
gimp_layer_apply_mask (active_layer, GIMP_MASK_DISCARD, TRUE);
if (flush)
gdisplays_flush ();
......@@ -425,7 +425,7 @@ struct _NewLayerOptions
GimpImage *gimage;
};
static GimpFillType fill_type = TRANSPARENT_FILL;
static GimpFillType fill_type = GIMP_TRANSPARENT_FILL;
static gchar *layer_name = NULL;
static void
......@@ -525,7 +525,7 @@ layers_new_layer_query (GimpImage *gimage,
gimp_drawable_fill_by_type (GIMP_DRAWABLE (new_layer),
gimp_get_user_context (gimage->gimp),
TRANSPARENT_FILL);
GIMP_TRANSPARENT_FILL);
gimp_layer_translate (new_layer, off_x, off_y);
gimp_image_add_layer (gimage, new_layer, -1);
......@@ -651,10 +651,10 @@ layers_new_layer_query (GimpImage *gimage,
&options->fill_type,
GINT_TO_POINTER (options->fill_type),
_("Foreground"), GINT_TO_POINTER (FOREGROUND_FILL), NULL,
_("Background"), GINT_TO_POINTER (BACKGROUND_FILL), NULL,
_("White"), GINT_TO_POINTER (WHITE_FILL), NULL,
_("Transparent"), GINT_TO_POINTER (TRANSPARENT_FILL), NULL,
_("Foreground"), GINT_TO_POINTER (GIMP_FOREGROUND_FILL), NULL,
_("Background"), GINT_TO_POINTER (GIMP_BACKGROUND_FILL), NULL,
_("White"), GINT_TO_POINTER (GIMP_WHITE_FILL), NULL,
_("Transparent"), GINT_TO_POINTER (GIMP_TRANSPARENT_FILL), NULL,
NULL);
......@@ -796,9 +796,9 @@ typedef struct _AddMaskOptions AddMaskOptions;
struct _AddMaskOptions
{
GtkWidget *query_box;
GimpLayer *layer;
AddMaskType add_mask_type;
GtkWidget *query_box;
GimpLayer *layer;
GimpAddMaskType add_mask_type;
};
static void
......@@ -832,7 +832,7 @@ layers_add_mask_query (GimpLayer *layer)
/* The new options structure */
options = g_new (AddMaskOptions, 1);
options->layer = layer;
options->add_mask_type = ADD_WHITE_MASK;
options->add_mask_type = GIMP_ADD_WHITE_MASK;
gimage = gimp_item_get_image (GIMP_ITEM (layer));
......@@ -864,7 +864,7 @@ layers_add_mask_query (GimpLayer *layer)
/* The radio frame and box */
if (gimage->selection_mask)
{
options->add_mask_type = ADD_SELECTION_MASK;
options->add_mask_type = GIMP_ADD_SELECTION_MASK;
frame =
gimp_radio_group_new2 (TRUE, _("Initialize Layer Mask to:"),
......@@ -873,21 +873,21 @@ layers_add_mask_query (GimpLayer *layer)
GINT_TO_POINTER (options->add_mask_type),
_("Selection"),
GINT_TO_POINTER (ADD_SELECTION_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_SELECTION_MASK), NULL,
_("Inverse Selection"),
GINT_TO_POINTER (ADD_INVERSE_SELECTION_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_INVERSE_SELECTION_MASK), NULL,
_("Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_COPY_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_COPY_MASK), NULL,
_("Inverse Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_INVERSE_COPY_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_INVERSE_COPY_MASK), NULL,
_("White (Full Opacity)"),
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_WHITE_MASK), NULL,
_("Black (Full Transparency)"),
GINT_TO_POINTER (ADD_BLACK_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_BLACK_MASK), NULL,
_("Layer's Alpha Channel"),
GINT_TO_POINTER (ADD_ALPHA_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_ALPHA_MASK), NULL,
NULL);
}
......@@ -900,16 +900,16 @@ layers_add_mask_query (GimpLayer *layer)
GINT_TO_POINTER (options->add_mask_type),
_("Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_COPY_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_COPY_MASK), NULL,
_("Inverse Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_INVERSE_COPY_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_INVERSE_COPY_MASK), NULL,
_("White (Full Opacity)"),
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_WHITE_MASK), NULL,
_("Black (Full Transparency)"),
GINT_TO_POINTER (ADD_BLACK_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_BLACK_MASK), NULL,
_("Layer's Alpha Channel"),
GINT_TO_POINTER (ADD_ALPHA_MASK), NULL,
GINT_TO_POINTER (GIMP_ADD_ALPHA_MASK), NULL,
NULL);
}
......
......@@ -156,6 +156,22 @@ typedef enum /*< pdb-skip >*/
* non-registered enums; register them if needed
*/
typedef enum /*< skip >*/
{
GIMP_FG_BUCKET_FILL,
GIMP_BG_BUCKET_FILL,
GIMP_PATTERN_BUCKET_FILL
} GimpBucketFillMode;
typedef enum /*< skip >*/
{
GIMP_FOREGROUND_FILL,
GIMP_BACKGROUND_FILL,
GIMP_WHITE_FILL,
GIMP_TRANSPARENT_FILL,
GIMP_NO_FILL
} GimpFillType;
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
GIMP_GRAD_LINEAR = 0,
......@@ -182,6 +198,23 @@ typedef enum /*< skip >*/
GIMP_INDEXEDA_IMAGE
} GimpImageType;
typedef enum /*< skip >*/
{
GIMP_ADD_WHITE_MASK,
GIMP_ADD_BLACK_MASK,
GIMP_ADD_ALPHA_MASK,
GIMP_ADD_SELECTION_MASK,
GIMP_ADD_INVERSE_SELECTION_MASK,
GIMP_ADD_COPY_MASK,
GIMP_ADD_INVERSE_COPY_MASK
} GimpAddMaskType;
typedef enum /*< skip >*/
{
GIMP_MASK_APPLY,
GIMP_MASK_DISCARD
} GimpMaskApplyMode;
typedef enum /*< skip >*/
{
GIMP_SHADOWS,
......
......@@ -36,23 +36,6 @@
/* enums */
typedef enum
{
ADD_WHITE_MASK,
ADD_BLACK_MASK,
ADD_ALPHA_MASK,
ADD_SELECTION_MASK,
ADD_INVERSE_SELECTION_MASK,
ADD_COPY_MASK,
ADD_INVERSE_COPY_MASK
} AddMaskType;
typedef enum
{
APPLY,
DISCARD
} MaskApplyMode;
typedef enum
{
HORIZONTAL,
......@@ -76,15 +59,6 @@ typedef enum
CHANNEL_OP_INTERSECT
} ChannelOps;
typedef enum
{
FOREGROUND_FILL,
BACKGROUND_FILL,
WHITE_FILL,
TRANSPARENT_FILL,
NO_FILL
} GimpFillType;
typedef enum
{
OFFSET_BACKGROUND,
......@@ -118,13 +92,6 @@ typedef enum
NODESTRUCT_DITHER = 4 /* NEVER USE NODESTRUCT_DITHER EXPLICITLY */
} ConvertDitherType;
typedef enum
{
FG_BUCKET_FILL,
BG_BUCKET_FILL,
PATTERN_BUCKET_FILL
} BucketFillMode;
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
/* NOTE: If you change this list, please update the textual mapping at
......
......@@ -335,21 +335,21 @@ gimp_edit_fill (GimpImage *gimage,
switch (fill_type)
{
case FOREGROUND_FILL:
case GIMP_FOREGROUND_FILL:
gimp_image_get_foreground (gimage, drawable, col);
break;
case BACKGROUND_FILL:
case GIMP_BACKGROUND_FILL:
gimp_image_get_background (gimage, drawable, col);
break;
case WHITE_FILL:
case GIMP_WHITE_FILL:
col[RED_PIX] = 255;
col[GREEN_PIX] = 255;
col[BLUE_PIX] = 255;
break;
case TRANSPARENT_FILL:
case GIMP_TRANSPARENT_FILL:
col[RED_PIX] = 0;
col[GREEN_PIX] = 0;
col[BLUE_PIX] = 0;
......@@ -357,7 +357,7 @@ gimp_edit_fill (GimpImage *gimage,
col [gimp_drawable_bytes (drawable) - 1] = TRANSPARENT_OPACITY;
break;
case NO_FILL:
case GIMP_NO_FILL:
return TRUE; /* nothing to do, but the fill succeded */
default:
......
......@@ -48,7 +48,7 @@
/* local function prototypes */
static void gimp_drawable_bucket_fill_region (BucketFillMode fill_mode,
static void gimp_drawable_bucket_fill_region (GimpBucketFillMode fill_mode,
PixelRegion *bufPR,
PixelRegion *maskPR,
guchar *col,
......@@ -75,15 +75,15 @@ static void gimp_drawable_bucket_fill_line_pattern (guchar *buf,
/* public functions */
void
gimp_drawable_bucket_fill (GimpDrawable *drawable,
BucketFillMode fill_mode,
gint paint_mode,
gdouble opacity,
gboolean fill_transparent,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y)
gimp_drawable_bucket_fill (GimpDrawable *drawable,
GimpBucketFillMode fill_mode,
gint paint_mode,
gdouble opacity,
gboolean fill_transparent,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y)
{
GimpImage *gimage;
GimpRGB color;
......@@ -95,17 +95,17 @@ gimp_drawable_bucket_fill (GimpDrawable *drawable,
g_return_if_fail (GIMP_IS_IMAGE (gimage));
if (fill_mode == FG_BUCKET_FILL)
if (fill_mode == GIMP_FG_BUCKET_FILL)
{
gimp_context_get_foreground (gimp_get_current_context (gimage->gimp),
&color);
}
else if (fill_mode == BG_BUCKET_FILL)
else if (fill_mode == GIMP_BG_BUCKET_FILL)
{
gimp_context_get_background (gimp_get_current_context (gimage->gimp),
&color);
}
else if (fill_mode == PATTERN_BUCKET_FILL)
else if (fill_mode == GIMP_PATTERN_BUCKET_FILL)
{
pattern =
gimp_context_get_pattern (gimp_get_current_context (gimage->gimp));
......@@ -133,18 +133,18 @@ gimp_drawable_bucket_fill (GimpDrawable *drawable,
}
void
gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
BucketFillMode fill_mode,
const GimpRGB *color,
GimpPattern *pattern,
gint paint_mode,
gdouble opacity,
gboolean do_seed_fill,
gboolean fill_transparent,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y)
gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
GimpBucketFillMode fill_mode,
const GimpRGB *color,
GimpPattern *pattern,
gint paint_mode,
gdouble opacity,
gboolean do_seed_fill,
gboolean fill_transparent,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y)
{
GimpImage *gimage;
TileManager *buf_tiles;
......@@ -158,17 +158,17 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
gboolean new_buf = FALSE;
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (fill_mode != PATTERN_BUCKET_FILL ||
g_return_if_fail (fill_mode != GIMP_PATTERN_BUCKET_FILL ||
GIMP_IS_PATTERN (pattern));
g_return_if_fail ((fill_mode != FG_BUCKET_FILL &&
fill_mode != BG_BUCKET_FILL) || color != NULL);
g_return_if_fail ((fill_mode != GIMP_FG_BUCKET_FILL &&
fill_mode != GIMP_BG_BUCKET_FILL) || color != NULL);
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
g_return_if_fail (GIMP_IS_IMAGE (gimage));
if (fill_mode == FG_BUCKET_FILL ||
fill_mode == BG_BUCKET_FILL)
if (fill_mode == GIMP_FG_BUCKET_FILL ||
fill_mode == GIMP_BG_BUCKET_FILL)
{
guchar tmp_col[MAX_CHANNELS];
......@@ -176,7 +176,7 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
gimp_image_transform_color (gimage, drawable, tmp_col, col, GIMP_RGB);
}
else if (fill_mode == PATTERN_BUCKET_FILL)
else if (fill_mode == GIMP_PATTERN_BUCKET_FILL)
{
/* If the pattern doesn't match the image in terms of color type,
* transform it. (ie pattern is RGB, image is indexed)
......@@ -320,14 +320,14 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
/* private functions */
static void
gimp_drawable_bucket_fill_region (BucketFillMode fill_mode,
PixelRegion *bufPR,
PixelRegion *maskPR,
guchar *col,
TempBuf *pattern,
gint off_x,
gint off_y,
gboolean has_alpha)
gimp_drawable_bucket_fill_region (GimpBucketFillMode fill_mode,
PixelRegion *bufPR,
PixelRegion *maskPR,
guchar *col,
TempBuf *pattern,
gint off_x,
gint off_y,
gboolean has_alpha)
{
guchar *s, *m;
gint y;
......@@ -347,14 +347,14 @@ gimp_drawable_bucket_fill_region (BucketFillMode fill_mode,
{
switch (fill_mode)
{
case FG_BUCKET_FILL:
case BG_BUCKET_FILL:
case GIMP_FG_BUCKET_FILL:
case GIMP_BG_BUCKET_FILL:
gimp_drawable_bucket_fill_line_color (s, m,
col,
has_alpha,
bufPR->bytes, bufPR->w);
break;
case PATTERN_BUCKET_FILL:
case GIMP_PATTERN_BUCKET_FILL:
gimp_drawable_bucket_fill_line_pattern (s, m,
pattern,
has_alpha,
......
......@@ -20,28 +20,28 @@
#define __GIMP_DRAWABLE_BUCKET_FILL_H__
void gimp_drawable_bucket_fill (GimpDrawable *drawable,
BucketFillMode fill_mode,
gint paint_mode,
gdouble opacity,
gboolean fill_transparent,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y);
void gimp_drawable_bucket_fill (GimpDrawable *drawable,
GimpBucketFillMode fill_mode,
gint paint_mode,
gdouble opacity,
gboolean fill_transparent,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y);
void gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
BucketFillMode fill_mode,
const GimpRGB *color,
GimpPattern *pattern,
gint paint_mode,
gdouble opacity,
gboolean do_seed_fill,
gboolean fill_transparent,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y);
void gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
GimpBucketFillMode fill_mode,
const GimpRGB *color,
GimpPattern *pattern,
gint paint_mode,
gdouble opacity,
gboolean do_seed_fill,
gboolean fill_transparent,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y);
#endif /* __GIMP_DRAWABLE_BUCKET_FILL_H__ */
......@@ -508,23 +508,23 @@ gimp_drawable_fill_by_type (GimpDrawable *drawable,
switch (fill_type)
{
case FOREGROUND_FILL:
case GIMP_FOREGROUND_FILL:
gimp_context_get_foreground (context, &color);
break;
case BACKGROUND_FILL:
case GIMP_BACKGROUND_FILL:
gimp_context_get_background (context, &color);
break;
case WHITE_FILL:
case GIMP_WHITE_FILL:
gimp_rgb_set (&color, 1.0, 1.0, 1.0);
break;
case TRANSPARENT_FILL:
case GIMP_TRANSPARENT_FILL:
gimp_rgba_set (&color, 0.0, 0.0, 0.0, GIMP_OPACITY_TRANSPARENT);
break;
case NO_FILL:
case GIMP_NO_FILL:
return;
default:
......
......@@ -335,21 +335,21 @@ gimp_edit_fill (GimpImage *gimage,
switch (fill_type)
{
case FOREGROUND_FILL:
case GIMP_FOREGROUND_FILL:
gimp_image_get_foreground (gimage, drawable, col);
break;
case BACKGROUND_FILL:
case GIMP_BACKGROUND_FILL:
gimp_image_get_background (gimage, drawable, col);
break;
case WHITE_FILL:
case GIMP_WHITE_FILL:
col[RED_PIX] = 255;
col[GREEN_PIX] = 255;
col[BLUE_PIX] = 255;
break;
case TRANSPARENT_FILL:
case GIMP_TRANSPARENT_FILL:
col[RED_PIX] = 0;
col[GREEN_PIX] = 0;
col[BLUE_PIX] = 0;
......@@ -357,7 +357,7 @@ gimp_edit_fill (GimpImage *gimage,
col [gimp_drawable_bytes (drawable) - 1] = TRANSPARENT_OPACITY;
break;
case NO_FILL:
case GIMP_NO_FILL:
return TRUE; /* nothing to do, but the fill succeded */
default:
......
......@@ -352,7 +352,7 @@ gimp_image_mask_extract (GimpImage *gimage,
else if (GIMP_IS_LAYER_MASK (drawable))
{
gimp_layer_apply_mask (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)),
DISCARD, TRUE);
GIMP_MASK_DISCARD, TRUE);
}
else if (GIMP_IS_CHANNEL (drawable))
{
......
......@@ -64,25 +64,25 @@ gimp_image_new_init (Gimp *gimp)
/* Available Fill Types */
new_fill_type = g_new (GimpFillTypeName, 1);
new_fill_type->type = FOREGROUND_FILL;
new_fill_type->type = GIMP_FOREGROUND_FILL;
new_fill_type->name = _("Foreground");
gimp->fill_type_names = g_list_append (gimp->fill_type_names, new_fill_type);
new_fill_type = g_new (GimpFillTypeName, 1);
new_fill_type->type = BACKGROUND_FILL;
new_fill_type->type = GIMP_BACKGROUND_FILL;
new_fill_type->name = _("Background");
gimp->fill_type_names = g_list_append (gimp->fill_type_names, new_fill_type);
new_fill_type = g_new (GimpFillTypeName, 1);
new_fill_type->type = WHITE_FILL;
new_fill_type->type = GIMP_WHITE_FILL;
new_fill_type->name = _("White");
gimp->fill_type_names = g_list_append (gimp->fill_type_names, new_fill_type);
new_fill_type = g_new (GimpFillTypeName, 1);
new_fill_type->type = TRANSPARENT_FILL;
new_fill_type->type = GIMP_TRANSPARENT_FILL;
new_fill_type->name = _("Transparent");
gimp->fill_type_names = g_list_append (gimp->fill_type_names, new_fill_type);
......@@ -96,7 +96,7 @@ gimp_image_new_init (Gimp *gimp)
gimp->image_new_last_values.yresolution = gimp->config->default_yresolution;
gimp->image_new_last_values.res_unit = gimp->config->default_resolution_units;
gimp->image_new_last_values.type = gimp->config->default_type;
gimp->image_new_last_values.fill_type = BACKGROUND_FILL;
gimp->image_new_last_values.fill_type = GIMP_BACKGROUND_FILL;
gimp->have_current_cut_buffer = FALSE;
}
......@@ -187,9 +187,9 @@ gimp_image_new_calculate_memsize (GimpImageNewValues *values)
{
gint channels;
channels = ((values->type == GIMP_RGB ? 3 : 1) /* color */ +
(values->fill_type == TRANSPARENT_FILL) /* alpha */ +
1 /* selection */);
channels = ((values->type == GIMP_RGB ? 3 : 1) /* color */ +
(values->fill_type == GIMP_TRANSPARENT_FILL) /* alpha */ +
1 /* selection */);
return channels * values->width * values->height;
}
......@@ -244,12 +244,12 @@ gimp_image_new_create_image (Gimp *gimp,
switch (values->fill_type)
{
case FOREGROUND_FILL:
case BACKGROUND_FILL:
case WHITE_FILL:
case GIMP_FOREGROUND_FILL:
case GIMP_BACKGROUND_FILL:
case GIMP_WHITE_FILL:
type = (values->type == GIMP_RGB) ? GIMP_RGB_IMAGE : GIMP_GRAY_IMAGE;
break;
case TRANSPARENT_FILL:
case GIMP_TRANSPARENT_FILL:
type = (values->type == GIMP_RGB) ? GIMP_RGBA_IMAGE : GIMP_GRAYA_IMAGE;
break;
default:
......
......@@ -89,7 +89,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
gimp_drawable_fill_by_type (GIMP_DRAWABLE (mask),
gimp_get_current_context (gimage->gimp),
TRANSPARENT_FILL);
GIMP_TRANSPARENT_FILL);
}
else /* if selection */
{
......
......@@ -89,7 +89,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
gimp_drawable_fill_by_type (GIMP_DRAWABLE (mask),
gimp_get_current_context (gimage->gimp),
TRANSPARENT_FILL);
GIMP_TRANSPARENT_FILL);
}
else /* if selection */
{
......
......@@ -1917,7 +1917,7 @@ undo_pop_layer_mask (GimpImage *gimage,
{
/* remove layer mask */
gimp_layer_apply_mask (lmu->layer, DISCARD, FALSE);
gimp_layer_apply_mask (lmu->layer, GIMP_MASK_DISCARD, FALSE);
}
else
{
......
......@@ -607,7 +607,7 @@ gimp_layer_add_mask (GimpLayer *layer,
GimpLayerMask *
gimp_layer_create_mask (const GimpLayer *layer,
AddMaskType add_mask_type)
GimpAddMaskType add_mask_type)
{
PixelRegion srcPR;
PixelRegion destPR;
......@@ -639,7 +639,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
switch (add_mask_type)
{
case ADD_WHITE_MASK:
case GIMP_ADD_WHITE_MASK:
{
guchar white_mask = OPAQUE_OPACITY;
......@@ -647,7 +647,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
}
break;
case ADD_BLACK_MASK:
case GIMP_ADD_BLACK_MASK:
{
guchar black_mask = TRANSPARENT_OPACITY;
......@@ -655,7 +655,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
}
break;