Commit dec20d82 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Enabled skipping enum values for either the PDB or GType registration

2004-01-06  Michael Natterer  <mitch@gimp.org>

	Enabled skipping enum values for either the PDB or GType
	registration (don't always skip both targets):

	* tools/gimp-mkenums: skip enum values only if there is a literal
	"skip" (don't match "pdb-skip").

	* tools/pdbgen/enumgen.pl: skip only "pdb-skip" values, not "skip"
	ones.

	* app/base/base-enums.h
	* app/core/core-enums.h
	* app/paint/paint-enums.h
	* libgimpbase/gimpbaseenums.h: use the right "pdb-skip"/"skip"
	combination to skip enum values. Changed comments accordingly.

	Cleaned up the fill functions:

	* app/core/core-enums.[ch]: added GIMP_PATTERN_FILL enum value to
	the GimpFillType enum. Don't export GIMP_NO_FILL to the PDB
	because it's completely useless to export a NOP.

	* app/core/gimp-edit.c (gimp_edit_fill, gimp_edit_fill_internal):
	handle pattern fill requests.

	* app/core/gimpdrawable.[ch] (gimp_drawable_fill): added GimpPattern
	parameter and fill with it if it's non-NULL.

	(gimp_drawable_fill_by_type): handle pattern fill and pass the
	current pattern to gimp_drawable_fill().

	* app/text/gimptextlayer.c: changed accordingly.

	* app/gui/edit-commands.c
	* app/gui/image-menu.c: use gimp_edit_fill() instead of
	gimp_drawable_bucket_fill() for FG, BG and pattern filling.

	* libgimp/gimpcompat.h
	* plug-ins/script-fu/siod-wrapper.c: removed NO_IMAGE_FILL compat
	enum value. It should have never been exported to the PDB.

	* app/pdb/drawable_cmds.c
	* app/pdb/edit_cmds.c
	* libgimp/gimpenums.h
	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.
parent 53a6199c
2004-01-06 Michael Natterer <mitch@gimp.org>
Enabled skipping enum values for either the PDB or GType
registration (don't always skip both targets):
* tools/gimp-mkenums: skip enum values only if there is a literal
"skip" (don't match "pdb-skip").
* tools/pdbgen/enumgen.pl: skip only "pdb-skip" values, not "skip"
ones.
* app/base/base-enums.h
* app/core/core-enums.h
* app/paint/paint-enums.h
* libgimpbase/gimpbaseenums.h: use the right "pdb-skip"/"skip"
combination to skip enum values. Changed comments accordingly.
Cleaned up the fill functions:
* app/core/core-enums.[ch]: added GIMP_PATTERN_FILL enum value to
the GimpFillType enum. Don't export GIMP_NO_FILL to the PDB
because it's completely useless to export a NOP.
* app/core/gimp-edit.c (gimp_edit_fill, gimp_edit_fill_internal):
handle pattern fill requests.
* app/core/gimpdrawable.[ch] (gimp_drawable_fill): added GimpPattern
parameter and fill with it if it's non-NULL.
(gimp_drawable_fill_by_type): handle pattern fill and pass the
current pattern to gimp_drawable_fill().
* app/text/gimptextlayer.c: changed accordingly.
* app/gui/edit-commands.c
* app/gui/image-menu.c: use gimp_edit_fill() instead of
gimp_drawable_bucket_fill() for FG, BG and pattern filling.
* libgimp/gimpcompat.h
* plug-ins/script-fu/siod-wrapper.c: removed NO_IMAGE_FILL compat
enum value. It should have never been exported to the PDB.
* app/pdb/drawable_cmds.c
* app/pdb/edit_cmds.c
* libgimp/gimpenums.h
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
2004-01-06 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/gimprc.pdb: use gimp->config; edit_config is
......@@ -32,7 +32,6 @@
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable.h"
#include "core/gimpdrawable-bucket-fill.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "core/gimptoolinfo.h"
......@@ -247,17 +246,13 @@ edit_fill_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
GimpImage *gimage;
GimpBucketFillMode fill_mode;
GimpImage *gimage;
GimpFillType fill_type;
return_if_no_image (gimage, data);
fill_mode = (GimpBucketFillMode) action;
fill_type = (GimpFillType) action;
gimp_drawable_bucket_fill (gimp_image_active_drawable (gimage),
fill_mode,
GIMP_NORMAL_MODE, 1.0,
FALSE /* no seed fill */,
FALSE, 0.0, FALSE, 0.0, 0.0);
gimp_edit_fill (gimage, gimp_image_active_drawable (gimage), fill_type);
gimp_image_flush (gimage);
}
......
......@@ -21,18 +21,17 @@
#if 0
This file is parsed by two scripts, enumgen.pl in tools/pdbgen,
and gimp-mkenums. All enums that are not marked with
and gimp-mkenums. All enums that are not marked with
/*< pdb-skip >*/ are exported to libgimp and the PDB. Enums that are
not marked with /*< skip >*/ are registered with the GType system.
If you want the enum to be skipped by both scripts, you have to use
/*< pdb-skip, skip >*/.
not marked with /*< skip >*/ are registered with the GType system.
If you want the enum to be skipped by both scripts, you have to use
/*< pdb-skip, skip >*/.
All enum values that are marked with /*< skip >*/ are skipped for
both targets.
The same syntax applies to enum values.
#endif
/*
/*
* these enums that are registered with the type system
*/
......@@ -42,7 +41,7 @@ GType gimp_check_size_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_SMALL_CHECKS = 0, /*< desc="Small" >*/
GIMP_SMALL_CHECKS = 0, /*< desc="Small" >*/
GIMP_MEDIUM_CHECKS = 1, /*< desc="Medium" >*/
GIMP_LARGE_CHECKS = 2 /*< desc="Large" >*/
} GimpCheckSize;
......@@ -129,9 +128,9 @@ typedef enum
GIMP_GRAIN_EXTRACT_MODE,
GIMP_GRAIN_MERGE_MODE,
GIMP_COLOR_ERASE_MODE,
GIMP_ERASE_MODE, /*< skip >*/
GIMP_REPLACE_MODE, /*< skip >*/
GIMP_ANTI_ERASE_MODE /*< skip >*/
GIMP_ERASE_MODE, /*< pdb-skip, skip >*/
GIMP_REPLACE_MODE, /*< pdb-skip, skip >*/
GIMP_ANTI_ERASE_MODE /*< pdb-skip, skip >*/
} GimpLayerModeEffects;
......@@ -151,7 +150,7 @@ typedef enum
* non-registered enums; register them if needed
*/
typedef enum /*< skip >*/
typedef enum /*< skip >*/
{
GIMP_NORMAL_CONVOL, /* Negative numbers truncated */
GIMP_ABSOLUTE_CONVOL, /* Absolute value */
......@@ -165,7 +164,7 @@ typedef enum /*< skip >*/
GIMP_GREEN_LUT,
GIMP_BLUE_LUT,
GIMP_ALPHA_LUT,
GIMP_GRAY_LUT = 0 /*< skip >*/
GIMP_GRAY_LUT = 0 /*< pdb-skip, skip >*/
} GimpChannelLutType;
typedef enum /*< skip >*/
......
......@@ -189,6 +189,7 @@ static const GEnumValue gimp_fill_type_enum_values[] =
{ GIMP_BACKGROUND_FILL, N_("Background"), "background-fill" },
{ GIMP_WHITE_FILL, N_("White"), "white-fill" },
{ GIMP_TRANSPARENT_FILL, N_("Transparent"), "transparent-fill" },
{ GIMP_PATTERN_FILL, N_("Pattern"), "pattern-fill" },
{ GIMP_NO_FILL, N_("None"), "no-fill" },
{ 0, NULL, NULL }
};
......
......@@ -27,8 +27,7 @@
If you want the enum to be skipped by both scripts, you have to use
/*< pdb-skip, skip >*/.
All enum values that are marked with /*< skip >*/ are skipped for
both targets.
The same syntax applies to enum values.
#endif
......@@ -125,7 +124,7 @@ typedef enum
GIMP_FS_DITHER, /*< desc="Floyd-Steinberg Color Dithering (Normal)" >*/
GIMP_FSLOWBLEED_DITHER, /*< desc="Floyd-Steinberg Color Dithering (Reduced Color Bleeding)" >*/
GIMP_FIXED_DITHER, /*< desc="Positioned Color Dithering" >*/
GIMP_NODESTRUCT_DITHER /*< skip >*/
GIMP_NODESTRUCT_DITHER /*< pdb-skip, skip >*/
} GimpConvertDitherType;
......@@ -154,11 +153,12 @@ GType gimp_fill_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_FOREGROUND_FILL, /*< desc="Foreground" >*/
GIMP_BACKGROUND_FILL, /*< desc="Background" >*/
GIMP_WHITE_FILL, /*< desc="White" >*/
GIMP_TRANSPARENT_FILL, /*< desc="Transparent" >*/
GIMP_NO_FILL /*< desc="None" >*/
GIMP_FOREGROUND_FILL, /*< desc="Foreground" >*/
GIMP_BACKGROUND_FILL, /*< desc="Background" >*/
GIMP_WHITE_FILL, /*< desc="White" >*/
GIMP_TRANSPARENT_FILL, /*< desc="Transparent" >*/
GIMP_PATTERN_FILL, /*< desc="Pattern" >*/
GIMP_NO_FILL /*< desc="None", pdb-skip >*/
} GimpFillType;
......
......@@ -25,6 +25,7 @@
#include "core-types.h"
#include "base/pixel-region.h"
#include "base/temp-buf.h"
#include "base/tile-manager.h"
#include "base/tile-manager-crop.h"
......@@ -40,6 +41,7 @@
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
#include "gimplist.h"
#include "gimppattern.h"
#include "gimpselection.h"
#include "gimp-intl.h"
......@@ -52,6 +54,7 @@ static const GimpBuffer * gimp_edit_extract (GimpImage *gimage,
gboolean cut_pixels);
static gboolean gimp_edit_fill_internal (GimpImage *gimage,
GimpDrawable *drawable,
GimpContext *context,
GimpFillType fill_type,
const gchar *undo_desc);
......@@ -208,6 +211,7 @@ gimp_edit_clear (GimpImage *gimage,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
return gimp_edit_fill_internal (gimage, drawable,
gimp_get_current_context (gimage->gimp),
GIMP_TRANSPARENT_FILL,
_("Clear"));
}
......@@ -240,6 +244,10 @@ gimp_edit_fill (GimpImage *gimage,
undo_desc = _("Fill with Transparency");
break;
case GIMP_PATTERN_FILL:
undo_desc = _("Fill with Pattern");
break;
case GIMP_NO_FILL:
return TRUE; /* nothing to do, but the fill succeded */
......@@ -250,7 +258,9 @@ gimp_edit_fill (GimpImage *gimage,
break;
}
return gimp_edit_fill_internal (gimage, drawable, fill_type, undo_desc);
return gimp_edit_fill_internal (gimage, drawable,
gimp_get_current_context (gimage->gimp),
fill_type, undo_desc);
}
......@@ -311,14 +321,24 @@ gimp_edit_extract (GimpImage *gimage,
static gboolean
gimp_edit_fill_internal (GimpImage *gimage,
GimpDrawable *drawable,
GimpContext *context,
GimpFillType fill_type,
const gchar *undo_desc)
{
TileManager *buf_tiles;
PixelRegion bufPR;
gint x1, y1, x2, y2;
guchar tmp_col[MAX_CHANNELS];
gint tiles_bytes;
guchar col[MAX_CHANNELS];
TempBuf *pat_buf = NULL;
gboolean new_buf;
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
if (x1 == x2 || y1 == y2)
return TRUE; /* nothing to do, but the fill succeded */
tiles_bytes = gimp_drawable_bytes (drawable);
switch (fill_type)
{
......@@ -332,30 +352,51 @@ gimp_edit_fill_internal (GimpImage *gimage,
break;
case GIMP_WHITE_FILL:
tmp_col[RED_PIX] = 255;
tmp_col[GREEN_PIX] = 255;
tmp_col[BLUE_PIX] = 255;
gimp_image_transform_color (gimage, drawable, col, GIMP_RGB, tmp_col);
undo_desc = _("Fill with White");
{
guchar tmp_col[MAX_CHANNELS];
tmp_col[RED_PIX] = 255;
tmp_col[GREEN_PIX] = 255;
tmp_col[BLUE_PIX] = 255;
gimp_image_transform_color (gimage, drawable, col, GIMP_RGB, tmp_col);
}
break;
case GIMP_PATTERN_FILL:
{
GimpPattern *pattern = gimp_context_get_pattern (context);
pat_buf = gimp_image_transform_temp_buf (gimage, drawable,
pattern->mask, &new_buf);
if (! gimp_drawable_has_alpha (drawable) &&
(pat_buf->bytes == 2 || pat_buf->bytes == 4))
tiles_bytes++;
}
break;
case GIMP_NO_FILL:
return TRUE; /* nothing to do, but the fill succeded */
}
if (gimp_drawable_has_alpha (drawable))
col[gimp_drawable_bytes (drawable) - 1] = OPAQUE_OPACITY;
buf_tiles = tile_manager_new (x2 - x1, y2 - y1, tiles_bytes);
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
pixel_region_init (&bufPR, buf_tiles, 0, 0, x2 - x1, y2 - y1, TRUE);
if (x1 == x2 || y1 == y2)
return TRUE; /* nothing to do, but the fill succeded */
if (pat_buf)
{
pattern_region (&bufPR, NULL, pat_buf, 0, 0);
buf_tiles = tile_manager_new (x2 - x1, y2 - y1,
gimp_drawable_bytes (drawable));
if (new_buf)
temp_buf_free (pat_buf);
}
else
{
if (gimp_drawable_has_alpha (drawable))
col[gimp_drawable_bytes (drawable) - 1] = OPAQUE_OPACITY;
pixel_region_init (&bufPR, buf_tiles, 0, 0, x2 - x1, y2 - y1, TRUE);
color_region (&bufPR, col);
color_region (&bufPR, col);
}
pixel_region_init (&bufPR, buf_tiles, 0, 0, x2 - x1, y2 - y1, FALSE);
gimp_drawable_apply_region (drawable, &bufPR,
......
......@@ -25,6 +25,7 @@
#include "core-types.h"
#include "base/pixel-region.h"
#include "base/temp-buf.h"
#include "base/tile.h"
#include "base/tile-manager.h"
......@@ -40,6 +41,7 @@
#include "gimpimage.h"
#include "gimpimage-undo-push.h"
#include "gimpmarshal.h"
#include "gimppattern.h"
#include "gimppreviewcache.h"
#include "gimp-intl.h"
......@@ -754,16 +756,18 @@ gimp_drawable_merge_shadow (GimpDrawable *drawable,
}
void
gimp_drawable_fill (GimpDrawable *drawable,
const GimpRGB *color)
gimp_drawable_fill (GimpDrawable *drawable,
const GimpRGB *color,
const GimpPattern *pattern)
{
GimpItem *item;
GimpImage *gimage;
GimpImageType drawable_type;
PixelRegion destPR;
guchar c[MAX_CHANNELS];
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (color != NULL || pattern != NULL);
g_return_if_fail (pattern == NULL || GIMP_IS_PATTERN (pattern));
item = GIMP_ITEM (drawable);
gimage = gimp_item_get_image (item);
......@@ -772,52 +776,43 @@ gimp_drawable_fill (GimpDrawable *drawable,
drawable_type = gimp_drawable_type (drawable);
gimp_rgba_get_uchar (color,
&c[RED_PIX],
&c[GREEN_PIX],
&c[BLUE_PIX],
&c[ALPHA_PIX]);
pixel_region_init (&destPR, gimp_drawable_data (drawable),
0, 0, gimp_item_width (item), gimp_item_height (item),
TRUE);
switch (GIMP_IMAGE_TYPE_BASE_TYPE (drawable_type))
if (color)
{
case GIMP_RGB:
if (drawable_type != GIMP_RGBA_IMAGE)
c[ALPHA_PIX] = OPAQUE_OPACITY;
break;
guchar tmp[MAX_CHANNELS];
guchar c[MAX_CHANNELS];
case GIMP_GRAY:
c[GRAY_PIX] = GIMP_RGB_INTENSITY (c[RED_PIX],
c[GREEN_PIX],
c[BLUE_PIX]) + 0.5;
c[ALPHA_G_PIX] = c[ALPHA_PIX];
gimp_rgba_get_uchar (color,
&tmp[RED_PIX],
&tmp[GREEN_PIX],
&tmp[BLUE_PIX],
&tmp[ALPHA_PIX]);
if (drawable_type != GIMP_GRAYA_IMAGE)
c[ALPHA_G_PIX] = OPAQUE_OPACITY;
break;
gimp_image_transform_color (gimage, drawable, c, GIMP_RGB, tmp);
case GIMP_INDEXED:
{
guchar index;
if (GIMP_IMAGE_TYPE_HAS_ALPHA (drawable_type))
c[GIMP_IMAGE_TYPE_BYTES (drawable_type) - 1] = tmp[ALPHA_PIX];
else
c[GIMP_IMAGE_TYPE_BYTES (drawable_type)] = OPAQUE_OPACITY;
gimp_image_transform_color (gimage, drawable, &index, GIMP_RGB, c);
c[INDEXED_PIX] = index;
c[ALPHA_I_PIX] = c[ALPHA_PIX];
color_region (&destPR, c);
}
else
{
TempBuf *pat_buf;
gboolean new_buf;
if (drawable_type != GIMP_INDEXEDA_IMAGE)
c[ALPHA_I_PIX] = OPAQUE_OPACITY;
}
break;
pat_buf = gimp_image_transform_temp_buf (gimage, drawable,
pattern->mask, &new_buf);
default:
g_warning ("%s: Cannot fill unknown image type.",
G_GNUC_PRETTY_FUNCTION);
break;
}
pattern_region (&destPR, NULL, pat_buf, 0, 0);
pixel_region_init (&destPR, gimp_drawable_data (drawable),
0, 0, gimp_item_width (item), gimp_item_height (item),
TRUE);
color_region (&destPR, c);
if (new_buf)
temp_buf_free (pat_buf);
}
gimp_drawable_update (drawable,
0, 0,
......@@ -830,7 +825,8 @@ gimp_drawable_fill_by_type (GimpDrawable *drawable,
GimpContext *context,
GimpFillType fill_type)
{
GimpRGB color;
GimpRGB color;
GimpPattern *pattern = NULL;
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
......@@ -852,6 +848,10 @@ gimp_drawable_fill_by_type (GimpDrawable *drawable,
gimp_rgba_set (&color, 0.0, 0.0, 0.0, GIMP_OPACITY_TRANSPARENT);
break;
case GIMP_PATTERN_FILL:
pattern = gimp_context_get_pattern (context);
break;
case GIMP_NO_FILL:
return;
......@@ -860,7 +860,7 @@ gimp_drawable_fill_by_type (GimpDrawable *drawable,
return;
}
gimp_drawable_fill (drawable, &color);
gimp_drawable_fill (drawable, pattern ? NULL : &color, pattern);
}
gboolean
......
......@@ -139,7 +139,8 @@ void gimp_drawable_merge_shadow (GimpDrawable *drawable,
const gchar *undo_desc);
void gimp_drawable_fill (GimpDrawable *drawable,
const GimpRGB *color);
const GimpRGB *color,
const GimpPattern *pattern);
void gimp_drawable_fill_by_type (GimpDrawable *drawable,
GimpContext *context,
GimpFillType fill_type);
......
......@@ -32,7 +32,6 @@
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable.h"
#include "core/gimpdrawable-bucket-fill.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "core/gimptoolinfo.h"
......@@ -247,17 +246,13 @@ edit_fill_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
GimpImage *gimage;
GimpBucketFillMode fill_mode;
GimpImage *gimage;
GimpFillType fill_type;
return_if_no_image (gimage, data);
fill_mode = (GimpBucketFillMode) action;
fill_type = (GimpFillType) action;
gimp_drawable_bucket_fill (gimp_image_active_drawable (gimage),
fill_mode,
GIMP_NORMAL_MODE, 1.0,
FALSE /* no seed fill */,
FALSE, 0.0, FALSE, 0.0, 0.0);
gimp_edit_fill (gimage, gimp_image_active_drawable (gimage), fill_type);
gimp_image_flush (gimage);
}
......
......@@ -230,17 +230,17 @@ GimpItemFactoryEntry image_menu_entries[] =
NULL,
GIMP_HELP_EDIT_CLEAR, NULL },
{ { N_("/Edit/Fill with _FG Color"), "<control>comma",
edit_fill_cmd_callback, (guint) GIMP_FG_BUCKET_FILL,
edit_fill_cmd_callback, (guint) GIMP_FOREGROUND_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL,
GIMP_HELP_EDIT_FILL_FG, NULL },
{ { N_("/Edit/Fill with B_G Color"), "<control>period",
edit_fill_cmd_callback, (guint) GIMP_BG_BUCKET_FILL,
edit_fill_cmd_callback, (guint) GIMP_BACKGROUND_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL,
GIMP_HELP_EDIT_FILL_BG, NULL },
{ { N_("/Edit/Fill with P_attern"), NULL,
edit_fill_cmd_callback, (guint) GIMP_PATTERN_BUCKET_FILL,
edit_fill_cmd_callback, (guint) GIMP_PATTERN_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL,
GIMP_HELP_EDIT_FILL_PATTERN, NULL },
......
......@@ -230,17 +230,17 @@ GimpItemFactoryEntry image_menu_entries[] =
NULL,
GIMP_HELP_EDIT_CLEAR, NULL },
{ { N_("/Edit/Fill with _FG Color"), "<control>comma",
edit_fill_cmd_callback, (guint) GIMP_FG_BUCKET_FILL,
edit_fill_cmd_callback, (guint) GIMP_FOREGROUND_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL,
GIMP_HELP_EDIT_FILL_FG, NULL },
{ { N_("/Edit/Fill with B_G Color"), "<control>period",
edit_fill_cmd_callback, (guint) GIMP_BG_BUCKET_FILL,
edit_fill_cmd_callback, (guint) GIMP_BACKGROUND_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL,
GIMP_HELP_EDIT_FILL_BG, NULL },
{ { N_("/Edit/Fill with P_attern"), NULL,
edit_fill_cmd_callback, (guint) GIMP_PATTERN_BUCKET_FILL,
edit_fill_cmd_callback, (guint) GIMP_PATTERN_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL,
GIMP_HELP_EDIT_FILL_PATTERN, NULL },
......
......@@ -21,18 +21,17 @@
#if 0
This file is parsed by two scripts, enumgen.pl in tools/pdbgen,
and gimp-mkenums. All enums that are not marked with
and gimp-mkenums. All enums that are not marked with
/*< pdb-skip >*/ are exported to libgimp and the PDB. Enums that are
not marked with /*< skip >*/ are registered with the GType system.
If you want the enum to be skipped by both scripts, you have to use
/*< pdb-skip, skip >*/.
not marked with /*< skip >*/ are registered with the GType system.
If you want the enum to be skipped by both scripts, you have to use
/*< pdb-skip, skip >*/.
All enum values that are marked with /*< skip >*/ are skipped for
both targets.
The same syntax applies to enum values.
#endif
/*
/*
* these enums that are registered with the type system
*/
......@@ -78,7 +77,7 @@ typedef enum
{
GIMP_BLUR_CONVOLVE, /*< desc="Blur" >*/
GIMP_SHARPEN_CONVOLVE, /*< desc="Sharpen" >*/
GIMP_CUSTOM_CONVOLVE /*< skip >*/
GIMP_CUSTOM_CONVOLVE /*< pdb-skip, skip >*/
} GimpConvolveType;
......@@ -113,7 +112,7 @@ typedef enum /*< skip >*/
{
GIMP_BRUSH_HARD,
GIMP_BRUSH_SOFT,
GIMP_BRUSH_PRESSURE /*< skip >*/
GIMP_BRUSH_PRESSURE /*< pdb-skip, skip >*/
} GimpBrushApplicationMode;
......
......@@ -1850,7 +1850,7 @@ drawable_fill_invoker (Gimp *gimp,
success = FALSE;
fill_type = args[1].value.pdb_int;
if (fill_type < GIMP_FOREGROUND_FILL || fill_type > GIMP_NO_FILL)
if (fill_type < GIMP_FOREGROUND_FILL || fill_type > GIMP_PATTERN_FILL)
success = FALSE;
if (success)
......@@ -1869,7 +1869,7 @@ static ProcArg drawable_fill_inargs[] =
{
GIMP_PDB_INT32,
"fill_type",
"The type of fill: GIMP_FOREGROUND_FILL (0), GIMP_BACKGROUND_FILL (1), GIMP_WHITE_FILL (2), GIMP_TRANSPARENT_FILL (3), GIMP_NO_FILL (4)"
"The type of fill: GIMP_FOREGROUND_FILL (0), GIMP_BACKGROUND_FILL (1), GIMP_WHITE_FILL (2), GIMP_TRANSPARENT_FILL (3), GIMP_PATTERN_FILL (4)"
}
};
......
......@@ -284,7 +284,7 @@ edit_fill_invoker (Gimp *gimp,
success = FALSE;
fill_type = args[1].value.pdb_int;
if (fill_type < GIMP_FOREGROUND_FILL || fill_type > GIMP_NO_FILL)
if (fill_type < GIMP_FOREGROUND_FILL || fill_type > GIMP_PATTERN_FILL)
success = FALSE;
if (success)
......@@ -306,7 +306,7 @@ static ProcArg edit_fill_inargs[] =
{
GIMP_PDB_INT32,
"fill_type",
"The type of fill: GIMP_FOREGROUND_FILL (0), GIMP_BACKGROUND_FILL (1), GIMP_WHITE_FILL (2), GIMP_TRANSPARENT_FILL (3), GIMP_NO_FILL (4)"
"The type of fill: GIMP_FOREGROUND_FILL (0), GIMP_BACKGROUND_FILL (1), GIMP_WHITE_FILL (2), GIMP_TRANSPARENT_FILL (3), GIMP_PATTERN_FILL (4)"
}
};
......
......@@ -482,7 +482,7 @@ gimp_text_layer_render_layout (GimpTextLayer *layer,
drawable = GIMP_DRAWABLE (layer);
item = GIMP_ITEM (layer);
gimp_drawable_fill (drawable, &layer->text->color);
gimp_drawable_fill (drawable, &layer->text->color, NULL);
bitmap.width = gimp_item_width (item);
bitmap.rows = gimp_item_height (item);
......
......@@ -165,8 +165,7 @@ enum
GIMP_FG_IMAGE_FILL = GIMP_FOREGROUND_FILL,
GIMP_BG_IMAGE_FILL = GIMP_BACKGROUND_FILL,
GIMP_WHITE_IMAGE_FILL = GIMP_WHITE_FILL,
GIMP_TRANS_IMAGE_FILL = GIMP_TRANSPARENT_FILL,
GIMP_NO_IMAGE_FILL = GIMP_NO_FILL
GIMP_TRANS_IMAGE_FILL = GIMP_TRANSPARENT_FILL
};
enum
......
......@@ -130,7 +130,7 @@ typedef enum
GIMP_BACKGROUND_FILL,
GIMP_WHITE_FILL,
GIMP_TRANSPARENT_FILL,
GIMP_NO_FILL
GIMP_PATTERN_FILL
} GimpFillType;
typedef enum
......
......@@ -49,7 +49,7 @@ typedef enum
GIMP_UNIT_END = 5,
GIMP_UNIT_PERCENT = 65536 /*< skip >*/
GIMP_UNIT_PERCENT = 65536 /*< pdb-skip >*/
} GimpUnit;
typedef enum
......
......@@ -112,7 +112,7 @@ FOREGROUND_FILL = 0
BACKGROUND_FILL = 1
WHITE_FILL = 2
TRANSPARENT_FILL = 3
NO_FILL = 4
PATTERN_FILL = 4
# GimpGradientType
GRADIENT_LINEAR = 0
......
......@@ -306,7 +306,6 @@ init_constants (void)
setvar (cintern ("BG-IMAGE-FILL"), flocons (GIMP_BACKGROUND_FILL), NIL);
setvar (cintern ("WHITE-IMAGE-FILL"), flocons (GIMP_WHITE_FILL), NIL);
setvar (cintern ("TRANS-IMAGE-FILL"), flocons (GIMP_TRANSPARENT_FILL), NIL);
setvar (cintern ("NO-IMAGE-FILL"), flocons (GIMP_NO_FILL), NIL);
setvar (cintern ("APPLY"), flocons (GIMP_MASK_APPLY), NIL);
setvar (cintern ("DISCARD"), flocons (GIMP_MASK_DISCARD), NIL);
......
......@@ -88,7 +88,7 @@ init_generated_constants (void)
setvar (cintern ("BACKGROUND-FILL"), flocons (1), NIL);
setvar (cintern ("WHITE-FILL"), flocons (2), NIL);
setvar (cintern ("TRANSPARENT-FILL"), flocons (3), NIL);
setvar (cintern ("NO-FILL"), flocons (4), NIL);
setvar (cintern ("PATTERN-FILL"), flocons (4), NIL);
setvar (cintern ("GRADIENT-LINEAR"), flocons (0), NIL);
setvar (cintern ("GRADIENT-BILINEAR"), flocons (1), NIL);
......
......@@ -306,7 +306,6 @@ init_constants (void)
setvar (cintern ("BG-IMAGE-FILL"), flocons (GIMP_BACKGROUND_FILL), NIL);
setvar (cintern ("WHITE-IMAGE-FILL"), flocons (GIMP_WHITE_FILL), NIL);
setvar (cintern ("TRANS-IMAGE-FILL"), flocons (GIMP_TRANSPARENT_FILL), NIL);
setvar (cintern ("NO-IMAGE-FILL"), flocons (GIMP_NO_FILL), NIL);
setvar (cintern ("APPLY"), flocons (GIMP_MASK_APPLY), NIL);
setvar (cintern ("DISCARD"), flocons (GIMP_MASK_DISCARD), NIL);
......
......@@ -104,7 +104,7 @@ sub parse_entries {
if (defined $options) {
my %options = parse_trigraph($options);
if (!defined $options{skip}) {
if (!defined $options{"skip"}) {
push @entries, [ $name, $options{nick}, $options{desc} ];
}
} else {
......@@ -227,7 +227,7 @@ while (<>) {
@x) {
if (defined $2) {
my %options = parse_trigraph ($2);
next if defined $options{skip};
next if defined $options{"skip"};
$enum_prefix = $options{prefix};
$flags = $options{flags};
} else {
......