added check_funcs (GIMP_IS_LAYER, GIMP_IS_IMAGE etc.) to all data types

2002-08-29  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb.pl: added check_funcs (GIMP_IS_LAYER,
	GIMP_IS_IMAGE etc.) to all data types which are looked up by ID...

	* tools/pdbgen/app.pl: ...and call them here instead of just
	checking for (item != NULL). This way image item lookup becomes
	type safe.

	* app/pdb/channel_cmds.c
	* app/pdb/color_cmds.c
	* app/pdb/convert_cmds.c
	* app/pdb/display_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/fileops_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/guides_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/misc_tools_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/parasite_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/selection_tools_cmds.c
	* app/pdb/text_tool_cmds.c
	* app/pdb/transform_tools_cmds.c
	* app/pdb/undo_cmds.c: regenerated.
This commit is contained in:
Michael Natterer 2002-08-29 17:21:21 +00:00 committed by Michael Natterer
parent 3ddc24d805
commit a8b08c7de7
23 changed files with 311 additions and 267 deletions

View File

@ -1,3 +1,33 @@
2002-08-29 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb.pl: added check_funcs (GIMP_IS_LAYER,
GIMP_IS_IMAGE etc.) to all data types which are looked up by ID...
* tools/pdbgen/app.pl: ...and call them here instead of just
checking for (item != NULL). This way image item lookup becomes
type safe.
* app/pdb/channel_cmds.c
* app/pdb/color_cmds.c
* app/pdb/convert_cmds.c
* app/pdb/display_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/edit_cmds.c
* app/pdb/fileops_cmds.c
* app/pdb/floating_sel_cmds.c
* app/pdb/guides_cmds.c
* app/pdb/image_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/misc_tools_cmds.c
* app/pdb/paint_tools_cmds.c
* app/pdb/parasite_cmds.c
* app/pdb/paths_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/selection_tools_cmds.c
* app/pdb/text_tool_cmds.c
* app/pdb/transform_tools_cmds.c
* app/pdb/undo_cmds.c: regenerated.
2002-08-29 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c: fixed wrong g_return_if_fail() in

View File

@ -88,7 +88,7 @@ channel_new_invoker (Gimp *gimp,
GimpChannel *channel = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
width = args[1].value.pdb_int;
@ -195,7 +195,7 @@ channel_copy_invoker (Gimp *gimp,
GimpChannel *copy = NULL;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
if (success)
@ -251,7 +251,7 @@ channel_delete_invoker (Gimp *gimp,
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
if (success)
@ -304,11 +304,11 @@ channel_combine_masks_invoker (Gimp *gimp,
gint32 offy;
channel1 = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel1 == NULL)
if (! GIMP_IS_CHANNEL (channel1))
success = FALSE;
channel2 = (GimpChannel *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (channel2 == NULL)
if (! GIMP_IS_CHANNEL (channel2))
success = FALSE;
operation = args[2].value.pdb_int;
@ -381,7 +381,7 @@ channel_get_name_invoker (Gimp *gimp,
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
return_args = procedural_db_return_args (&channel_get_name_proc, success);
@ -435,7 +435,7 @@ channel_set_name_invoker (Gimp *gimp,
gchar *name;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
@ -487,7 +487,7 @@ channel_get_visible_invoker (Gimp *gimp,
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
return_args = procedural_db_return_args (&channel_get_visible_proc, success);
@ -541,7 +541,7 @@ channel_set_visible_invoker (Gimp *gimp,
gboolean visible;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
visible = args[1].value.pdb_int ? TRUE : FALSE;
@ -591,7 +591,7 @@ channel_get_show_masked_invoker (Gimp *gimp,
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
return_args = procedural_db_return_args (&channel_get_show_masked_proc, success);
@ -645,7 +645,7 @@ channel_set_show_masked_invoker (Gimp *gimp,
gboolean show_masked;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
show_masked = args[1].value.pdb_int ? TRUE : FALSE;
@ -695,7 +695,7 @@ channel_get_opacity_invoker (Gimp *gimp,
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
return_args = procedural_db_return_args (&channel_get_opacity_proc, success);
@ -749,7 +749,7 @@ channel_set_opacity_invoker (Gimp *gimp,
gdouble opacity;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
opacity = args[1].value.pdb_float;
@ -802,7 +802,7 @@ channel_get_color_invoker (Gimp *gimp,
GimpRGB color;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
if (success)
@ -861,7 +861,7 @@ channel_set_color_invoker (Gimp *gimp,
GimpRGB color;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
color = args[1].value.pdb_color;
@ -916,7 +916,7 @@ channel_get_tattoo_invoker (Gimp *gimp,
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
return_args = procedural_db_return_args (&channel_get_tattoo_proc, success);
@ -970,7 +970,7 @@ channel_set_tattoo_invoker (Gimp *gimp,
gint32 tattoo;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
tattoo = args[1].value.pdb_int;

View File

@ -88,7 +88,7 @@ brightness_contrast_invoker (Gimp *gimp,
int x1, y1, x2, y2;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
brightness = args[1].value.pdb_int;
@ -189,7 +189,7 @@ levels_invoker (Gimp *gimp,
int high_output[5];
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
channel = args[1].value.pdb_int;
@ -333,7 +333,7 @@ posterize_invoker (Gimp *gimp,
int x1, y1, x2, y2;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
levels = args[1].value.pdb_int;
@ -408,7 +408,7 @@ desaturate_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -456,7 +456,7 @@ equalize_invoker (Gimp *gimp,
gboolean mask_only;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
mask_only = args[1].value.pdb_int ? TRUE : FALSE;
@ -510,7 +510,7 @@ invert_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -565,7 +565,7 @@ curves_spline_invoker (Gimp *gimp,
GimpLut *lut;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
channel = args[1].value.pdb_int;
@ -678,7 +678,7 @@ curves_explicit_invoker (Gimp *gimp,
GimpLut *lut;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
channel = args[1].value.pdb_int;
@ -787,7 +787,7 @@ color_balance_invoker (Gimp *gimp,
gint x1, y1, x2, y2;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
transfer_mode = args[1].value.pdb_int;
@ -926,7 +926,7 @@ histogram_invoker (Gimp *gimp,
GimpChannel *mask;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
channel = args[1].value.pdb_int;
@ -1090,7 +1090,7 @@ hue_saturation_invoker (Gimp *gimp,
gint x1, y1, x2, y2;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
hue_range = args[1].value.pdb_int;
@ -1210,7 +1210,7 @@ threshold_invoker (Gimp *gimp,
PixelRegion srcPR, destPR;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
low_threshold = args[1].value.pdb_int;

View File

@ -56,7 +56,7 @@ convert_rgb_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -99,7 +99,7 @@ convert_grayscale_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -148,7 +148,7 @@ convert_indexed_invoker (Gimp *gimp,
gchar *palette_name;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
dither_type = args[1].value.pdb_int;

View File

@ -56,7 +56,7 @@ display_new_invoker (Gimp *gimp,
GimpDisplay *gdisp = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -116,7 +116,7 @@ display_delete_invoker (Gimp *gimp,
GimpDisplay *gdisp;
gdisp = gimp_display_get_by_ID (gimp, args[0].value.pdb_int);
if (gdisp == NULL)
if (! GIMP_IS_DISPLAY (gdisp))
success = FALSE;
if (success)

View File

@ -103,7 +103,7 @@ drawable_merge_shadow_invoker (Gimp *gimp,
gboolean undo;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
undo = args[1].value.pdb_int ? TRUE : FALSE;
@ -153,7 +153,7 @@ drawable_fill_invoker (Gimp *gimp,
gint32 fill_type;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
fill_type = args[1].value.pdb_int;
@ -208,7 +208,7 @@ drawable_update_invoker (Gimp *gimp,
gint32 height;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
x = args[1].value.pdb_int;
@ -284,7 +284,7 @@ drawable_mask_bounds_invoker (Gimp *gimp,
gint32 y2;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -368,7 +368,7 @@ drawable_image_invoker (Gimp *gimp,
GimpImage *gimage = NULL;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -425,7 +425,7 @@ drawable_type_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_type_proc, success);
@ -479,7 +479,7 @@ drawable_has_alpha_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_has_alpha_proc, success);
@ -533,7 +533,7 @@ drawable_type_with_alpha_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_type_with_alpha_proc, success);
@ -587,7 +587,7 @@ drawable_is_rgb_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_is_rgb_proc, success);
@ -641,7 +641,7 @@ drawable_is_gray_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_is_gray_proc, success);
@ -695,7 +695,7 @@ drawable_is_indexed_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_is_indexed_proc, success);
@ -749,7 +749,7 @@ drawable_bytes_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_bytes_proc, success);
@ -803,7 +803,7 @@ drawable_width_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_width_proc, success);
@ -857,7 +857,7 @@ drawable_height_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_height_proc, success);
@ -913,7 +913,7 @@ drawable_offsets_invoker (Gimp *gimp,
gint32 offset_y;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -978,7 +978,7 @@ drawable_is_layer_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_is_layer_proc, success);
@ -1032,7 +1032,7 @@ drawable_is_layer_mask_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_is_layer_mask_proc, success);
@ -1086,7 +1086,7 @@ drawable_is_channel_invoker (Gimp *gimp,
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_is_channel_proc, success);
@ -1147,7 +1147,7 @@ drawable_get_pixel_invoker (Gimp *gimp,
Tile *tile;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
x = args[1].value.pdb_int;
@ -1256,7 +1256,7 @@ drawable_set_pixel_invoker (Gimp *gimp,
Tile *tile;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
x = args[1].value.pdb_int;
@ -1350,11 +1350,11 @@ drawable_set_image_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
gimage = gimp_image_get_by_ID (gimp, args[1].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -1409,7 +1409,7 @@ drawable_thumbnail_invoker (Gimp *gimp,
guint8 *thumbnail_data = NULL;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
req_width = args[1].value.pdb_int;
@ -1538,7 +1538,7 @@ drawable_offset_invoker (Gimp *gimp,
gint32 offset_y;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
wrap_around = args[1].value.pdb_int ? TRUE : FALSE;

View File

@ -63,7 +63,7 @@ edit_cut_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -109,7 +109,7 @@ edit_copy_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -158,7 +158,7 @@ edit_paste_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
paste_into = args[1].value.pdb_int ? TRUE : FALSE;
@ -226,7 +226,7 @@ edit_clear_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -273,7 +273,7 @@ edit_fill_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
fill_type = args[1].value.pdb_int;
@ -328,7 +328,7 @@ edit_stroke_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)

View File

@ -336,7 +336,7 @@ file_save_thumbnail_invoker (Gimp *gimp,
const gchar *image_uri;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
filename = (gchar *) args[1].value.pdb_pointer;

View File

@ -58,7 +58,7 @@ floating_sel_remove_invoker (Gimp *gimp,
GimpLayer *floating_sel;
floating_sel = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (floating_sel == NULL)
if (! GIMP_IS_LAYER (floating_sel))
success = FALSE;
if (success)
@ -105,7 +105,7 @@ floating_sel_anchor_invoker (Gimp *gimp,
GimpLayer *floating_sel;
floating_sel = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (floating_sel == NULL)
if (! GIMP_IS_LAYER (floating_sel))
success = FALSE;
if (success)
@ -152,7 +152,7 @@ floating_sel_to_layer_invoker (Gimp *gimp,
GimpLayer *floating_sel;
floating_sel = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (floating_sel == NULL)
if (! GIMP_IS_LAYER (floating_sel))
success = FALSE;
if (success)
@ -200,11 +200,11 @@ floating_sel_attach_invoker (Gimp *gimp,
GimpDrawable *drawable;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -252,7 +252,7 @@ floating_sel_rigor_invoker (Gimp *gimp,
gboolean undo;
floating_sel = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (floating_sel == NULL)
if (! GIMP_IS_LAYER (floating_sel))
success = FALSE;
undo = args[1].value.pdb_int ? TRUE : FALSE;
@ -307,7 +307,7 @@ floating_sel_relax_invoker (Gimp *gimp,
gboolean undo;
floating_sel = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (floating_sel == NULL)
if (! GIMP_IS_LAYER (floating_sel))
success = FALSE;
undo = args[1].value.pdb_int ? TRUE : FALSE;

View File

@ -63,7 +63,7 @@ image_add_hguide_invoker (Gimp *gimp,
GimpGuide *guide;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
offset = args[1].value.pdb_int;
@ -142,7 +142,7 @@ image_add_vguide_invoker (Gimp *gimp,
GimpGuide *guide;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
offset = args[1].value.pdb_int;
@ -219,7 +219,7 @@ image_delete_guide_invoker (Gimp *gimp,
GList *guides;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
guide = args[1].value.pdb_int;
@ -295,7 +295,7 @@ image_find_next_guide_invoker (Gimp *gimp,
GList *guides;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
guide = args[1].value.pdb_int;
@ -406,7 +406,7 @@ image_get_guide_orientation_invoker (Gimp *gimp,
GList *guides;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
guide = args[1].value.pdb_int;
@ -490,7 +490,7 @@ image_get_guide_position_invoker (Gimp *gimp,
GList *guides;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
guide = args[1].value.pdb_int;

View File

@ -335,7 +335,7 @@ image_delete_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -385,7 +385,7 @@ image_base_type_invoker (Gimp *gimp,
gint32 base_type = 0;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -445,7 +445,7 @@ image_resize_invoker (Gimp *gimp,
gint32 offy;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
new_width = args[1].value.pdb_int;
@ -523,7 +523,7 @@ image_scale_invoker (Gimp *gimp,
gint32 new_height;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
new_width = args[1].value.pdb_int;
@ -591,7 +591,7 @@ image_crop_invoker (Gimp *gimp,
gint32 offy;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
new_width = args[1].value.pdb_int;
@ -677,7 +677,7 @@ image_free_shadow_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -724,7 +724,7 @@ image_get_layers_invoker (Gimp *gimp,
int i;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -803,7 +803,7 @@ image_get_channels_invoker (Gimp *gimp,
int i;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -879,7 +879,7 @@ image_active_drawable_invoker (Gimp *gimp,
GimpDrawable *drawable = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -935,7 +935,7 @@ image_unset_active_channel_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -981,7 +981,7 @@ image_pick_correlate_layer_invoker (Gimp *gimp,
GimpLayer *layer = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
x = args[1].value.pdb_int;
@ -1052,11 +1052,11 @@ image_raise_layer_invoker (Gimp *gimp,
GimpLayer *layer;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
@ -1104,11 +1104,11 @@ image_lower_layer_invoker (Gimp *gimp,
GimpLayer *layer;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
@ -1156,11 +1156,11 @@ image_raise_layer_to_top_invoker (Gimp *gimp,
GimpLayer *layer;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
@ -1208,11 +1208,11 @@ image_lower_layer_to_bottom_invoker (Gimp *gimp,
GimpLayer *layer;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
@ -1262,7 +1262,7 @@ image_merge_visible_layers_invoker (Gimp *gimp,
GimpLayer *layer = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
merge_type = args[1].value.pdb_int;
@ -1334,11 +1334,11 @@ image_merge_down_invoker (Gimp *gimp,
GimpLayer *layer = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
merge_layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (merge_layer == NULL)
if (! GIMP_IS_LAYER (merge_layer))
success = FALSE;
merge_type = args[2].value.pdb_int;
@ -1413,7 +1413,7 @@ image_flatten_invoker (Gimp *gimp,
GimpLayer *layer = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -1471,11 +1471,11 @@ image_add_layer_invoker (Gimp *gimp,
gint32 position;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
position = args[2].value.pdb_int;
@ -1540,11 +1540,11 @@ image_remove_layer_invoker (Gimp *gimp,
GimpLayer *layer;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
@ -1593,15 +1593,15 @@ image_add_layer_mask_invoker (Gimp *gimp,
GimpLayerMask *mask;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
mask = (GimpLayerMask *) gimp_item_get_by_ID (gimp, args[2].value.pdb_int);
if (mask == NULL)
if (! GIMP_IS_LAYER_MASK (mask))
success = FALSE;
if (success)
@ -1655,11 +1655,11 @@ image_remove_layer_mask_invoker (Gimp *gimp,
gint32 mode;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
mode = args[2].value.pdb_int;
@ -1716,11 +1716,11 @@ image_raise_channel_invoker (Gimp *gimp,
GimpChannel *channel;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
if (success)
@ -1768,11 +1768,11 @@ image_lower_channel_invoker (Gimp *gimp,
GimpLayer *layer;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
@ -1821,11 +1821,11 @@ image_add_channel_invoker (Gimp *gimp,
gint32 position;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
position = args[2].value.pdb_int;
@ -1880,11 +1880,11 @@ image_remove_channel_invoker (Gimp *gimp,
GimpChannel *channel;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
if (success)
@ -1934,7 +1934,7 @@ image_get_cmap_invoker (Gimp *gimp,
guint8 *cmap = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2004,7 +2004,7 @@ image_set_cmap_invoker (Gimp *gimp,
guint8 *cmap;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
num_bytes = args[1].value.pdb_int;
@ -2074,7 +2074,7 @@ image_undo_is_enabled_invoker (Gimp *gimp,
gboolean enabled = FALSE;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2131,7 +2131,7 @@ image_undo_enable_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2188,7 +2188,7 @@ image_undo_disable_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2245,7 +2245,7 @@ image_undo_freeze_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2302,7 +2302,7 @@ image_undo_thaw_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2358,7 +2358,7 @@ image_clean_all_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2402,7 +2402,7 @@ image_floating_selection_invoker (Gimp *gimp,
GimpLayer *floating_sel = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2461,7 +2461,7 @@ image_floating_sel_attached_to_invoker (Gimp *gimp,
GimpLayer *floating_sel;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2532,7 +2532,7 @@ image_thumbnail_invoker (Gimp *gimp,
guint8 *thumbnail_data = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
req_width = args[1].value.pdb_int;
@ -2659,7 +2659,7 @@ image_set_tattoo_state_invoker (Gimp *gimp,
gint32 tattoo;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
tattoo = args[1].value.pdb_int;
@ -2712,7 +2712,7 @@ image_get_tattoo_state_invoker (Gimp *gimp,
gint32 tattoo = 0;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2772,7 +2772,7 @@ image_duplicate_invoker (Gimp *gimp,
GimpImage *new_gimage = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2829,7 +2829,7 @@ image_width_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
return_args = procedural_db_return_args (&image_width_proc, success);
@ -2883,7 +2883,7 @@ image_height_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
return_args = procedural_db_return_args (&image_height_proc, success);
@ -2938,7 +2938,7 @@ image_get_active_layer_invoker (Gimp *gimp,
GimpLayer *active_layer = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -2995,11 +2995,11 @@ image_set_active_layer_invoker (Gimp *gimp,
GimpLayer *active_layer;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
active_layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (active_layer == NULL)
if (! GIMP_IS_LAYER (active_layer))
success = FALSE;
if (success)
@ -3048,7 +3048,7 @@ image_get_active_channel_invoker (Gimp *gimp,
GimpChannel *active_channel = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -3105,11 +3105,11 @@ image_set_active_channel_invoker (Gimp *gimp,
GimpChannel *active_channel;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
active_channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (active_channel == NULL)
if (! GIMP_IS_CHANNEL (active_channel))
success = FALSE;
if (success)
@ -3158,7 +3158,7 @@ image_get_selection_invoker (Gimp *gimp,
GimpChannel *selection = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -3216,7 +3216,7 @@ image_get_component_active_invoker (Gimp *gimp,
gint32 component;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
component = args[1].value.pdb_int;
@ -3290,7 +3290,7 @@ image_set_component_active_invoker (Gimp *gimp,
gboolean active;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
component = args[1].value.pdb_int;
@ -3360,7 +3360,7 @@ image_get_component_visible_invoker (Gimp *gimp,
gint32 component;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
component = args[1].value.pdb_int;
@ -3434,7 +3434,7 @@ image_set_component_visible_invoker (Gimp *gimp,
gboolean visible;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
component = args[1].value.pdb_int;
@ -3503,7 +3503,7 @@ image_get_filename_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
return_args = procedural_db_return_args (&image_get_filename_proc, success);
@ -3557,7 +3557,7 @@ image_set_filename_invoker (Gimp *gimp,
gchar *filename;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
filename = (gchar *) args[1].value.pdb_pointer;
@ -3611,7 +3611,7 @@ image_get_name_invoker (Gimp *gimp,
gchar *filename;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -3680,7 +3680,7 @@ image_get_resolution_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
return_args = procedural_db_return_args (&image_get_resolution_proc, success);
@ -3743,7 +3743,7 @@ image_set_resolution_invoker (Gimp *gimp,
gdouble yresolution;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
xresolution = args[1].value.pdb_float;
@ -3833,7 +3833,7 @@ image_get_unit_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
return_args = procedural_db_return_args (&image_get_unit_proc, success);
@ -3887,7 +3887,7 @@ image_set_unit_invoker (Gimp *gimp,
GimpUnit unit;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
unit = args[1].value.pdb_int;
@ -3941,7 +3941,7 @@ image_get_layer_by_tattoo_invoker (Gimp *gimp,
GimpLayer *layer = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
tattoo = args[1].value.pdb_int;
@ -4012,7 +4012,7 @@ image_get_channel_by_tattoo_invoker (Gimp *gimp,
GimpChannel *channel = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
tattoo = args[1].value.pdb_int;

View File

@ -124,7 +124,7 @@ layer_new_invoker (Gimp *gimp,
GimpLayer *layer = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
width = args[1].value.pdb_int;
@ -242,7 +242,7 @@ layer_copy_invoker (Gimp *gimp,
GimpLayer *copy = NULL;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
add_alpha = args[1].value.pdb_int ? TRUE : FALSE;
@ -308,7 +308,7 @@ layer_create_mask_invoker (Gimp *gimp,
GimpLayerMask *mask = NULL;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
mask_type = args[1].value.pdb_int;
@ -378,7 +378,7 @@ layer_scale_invoker (Gimp *gimp,
GimpLayer *floating_layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
new_width = args[1].value.pdb_int;
@ -470,7 +470,7 @@ layer_resize_invoker (Gimp *gimp,
GimpLayer *floating_layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
new_width = args[1].value.pdb_int;
@ -563,7 +563,7 @@ layer_delete_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
@ -617,7 +617,7 @@ layer_translate_invoker (Gimp *gimp,
GList *layer_list;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
offx = args[1].value.pdb_int;
@ -700,7 +700,7 @@ layer_add_alpha_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
@ -748,7 +748,7 @@ layer_set_offsets_invoker (Gimp *gimp,
GList *layer_list;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
offx = args[1].value.pdb_int;
@ -834,7 +834,7 @@ layer_mask_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_mask_proc, success);
@ -888,7 +888,7 @@ layer_is_floating_sel_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_is_floating_sel_proc, success);
@ -942,7 +942,7 @@ layer_get_name_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_name_proc, success);
@ -996,7 +996,7 @@ layer_set_name_invoker (Gimp *gimp,
gchar *name;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
@ -1048,7 +1048,7 @@ layer_get_visible_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_visible_proc, success);
@ -1102,7 +1102,7 @@ layer_set_visible_invoker (Gimp *gimp,
gboolean visible;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
visible = args[1].value.pdb_int ? TRUE : FALSE;
@ -1152,7 +1152,7 @@ layer_get_preserve_trans_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_preserve_trans_proc, success);
@ -1206,7 +1206,7 @@ layer_set_preserve_trans_invoker (Gimp *gimp,
gboolean preserve_trans;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
preserve_trans = args[1].value.pdb_int ? TRUE : FALSE;
@ -1256,7 +1256,7 @@ layer_get_apply_mask_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_apply_mask_proc, success);
@ -1310,7 +1310,7 @@ layer_set_apply_mask_invoker (Gimp *gimp,
gboolean apply_mask;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
apply_mask = args[1].value.pdb_int ? TRUE : FALSE;
@ -1360,7 +1360,7 @@ layer_get_show_mask_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_show_mask_proc, success);
@ -1414,7 +1414,7 @@ layer_set_show_mask_invoker (Gimp *gimp,
gboolean show_mask;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
show_mask = args[1].value.pdb_int ? TRUE : FALSE;
@ -1464,7 +1464,7 @@ layer_get_edit_mask_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_edit_mask_proc, success);
@ -1518,7 +1518,7 @@ layer_set_edit_mask_invoker (Gimp *gimp,
gboolean edit_mask;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
edit_mask = args[1].value.pdb_int ? TRUE : FALSE;
@ -1568,7 +1568,7 @@ layer_get_opacity_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_opacity_proc, success);
@ -1622,7 +1622,7 @@ layer_set_opacity_invoker (Gimp *gimp,
gdouble opacity;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
opacity = args[1].value.pdb_float;
@ -1674,7 +1674,7 @@ layer_get_mode_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_mode_proc, success);
@ -1728,7 +1728,7 @@ layer_set_mode_invoker (Gimp *gimp,
gint32 mode;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
mode = args[1].value.pdb_int;
@ -1780,7 +1780,7 @@ layer_get_linked_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_linked_proc, success);
@ -1834,7 +1834,7 @@ layer_set_linked_invoker (Gimp *gimp,
gboolean linked;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
linked = args[1].value.pdb_int ? TRUE : FALSE;
@ -1884,7 +1884,7 @@ layer_get_tattoo_invoker (Gimp *gimp,
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_tattoo_proc, success);
@ -1938,7 +1938,7 @@ layer_set_tattoo_invoker (Gimp *gimp,
gint32 tattoo;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
tattoo = args[1].value.pdb_int;

View File

@ -72,7 +72,7 @@ blend_invoker (Gimp *gimp,
gdouble y2;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
blend_mode = args[1].value.pdb_int;
@ -246,7 +246,7 @@ bucket_fill_invoker (Gimp *gimp,
gdouble y;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
fill_mode = args[1].value.pdb_int;
@ -365,7 +365,7 @@ color_picker_invoker (Gimp *gimp,
GimpRGB color;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);

View File

@ -128,7 +128,7 @@ airbrush_invoker (Gimp *gimp,
GimpAirbrushOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
pressure = args[1].value.pdb_float;
@ -210,7 +210,7 @@ airbrush_default_invoker (Gimp *gimp,
GimpAirbrushOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
num_strokes = args[1].value.pdb_int;
@ -285,11 +285,11 @@ clone_invoker (Gimp *gimp,
GimpCloneOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
src_drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
if (src_drawable == NULL)
if (! GIMP_IS_DRAWABLE (src_drawable))
success = FALSE;
clone_type = args[2].value.pdb_int;
@ -398,7 +398,7 @@ clone_default_invoker (Gimp *gimp,
GimpCloneOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
num_strokes = args[1].value.pdb_int;
@ -471,7 +471,7 @@ convolve_invoker (Gimp *gimp,
GimpConvolveOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
pressure = args[1].value.pdb_float;
@ -563,7 +563,7 @@ convolve_default_invoker (Gimp *gimp,
GimpConvolveOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
num_strokes = args[1].value.pdb_int;
@ -637,7 +637,7 @@ dodgeburn_invoker (Gimp *gimp,
GimpDodgeBurnOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
exposure = args[1].value.pdb_float;
@ -739,7 +739,7 @@ dodgeburn_default_invoker (Gimp *gimp,
GimpDodgeBurnOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
num_strokes = args[1].value.pdb_int;
@ -812,7 +812,7 @@ eraser_invoker (Gimp *gimp,
GimpEraserOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
num_strokes = args[1].value.pdb_int;
@ -905,7 +905,7 @@ eraser_default_invoker (Gimp *gimp,
GimpEraserOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
num_strokes = args[1].value.pdb_int;
@ -979,7 +979,7 @@ paintbrush_invoker (Gimp *gimp,
GimpPaintOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
fade_out = args[1].value.pdb_float;
@ -1082,7 +1082,7 @@ paintbrush_default_invoker (Gimp *gimp,
GimpPaintOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
num_strokes = args[1].value.pdb_int;
@ -1153,7 +1153,7 @@ pencil_invoker (Gimp *gimp,
GimpPaintOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
num_strokes = args[1].value.pdb_int;
@ -1225,7 +1225,7 @@ smudge_invoker (Gimp *gimp,
GimpSmudgeOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
pressure = args[1].value.pdb_float;
@ -1307,7 +1307,7 @@ smudge_default_invoker (Gimp *gimp,
GimpSmudgeOptions *options;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
num_strokes = args[1].value.pdb_int;

View File

@ -269,7 +269,7 @@ drawable_parasite_find_invoker (Gimp *gimp,
GimpParasite *parasite = NULL;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
@ -338,7 +338,7 @@ drawable_parasite_attach_invoker (Gimp *gimp,
GimpParasite *parasite;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
parasite = (GimpParasite *) args[1].value.pdb_pointer;
@ -390,7 +390,7 @@ drawable_parasite_detach_invoker (Gimp *gimp,
gchar *name;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
@ -444,7 +444,7 @@ drawable_parasite_list_invoker (Gimp *gimp,
gchar **parasites = NULL;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
@ -511,7 +511,7 @@ image_parasite_find_invoker (Gimp *gimp,
GimpParasite *parasite = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
@ -580,7 +580,7 @@ image_parasite_attach_invoker (Gimp *gimp,
GimpParasite *parasite;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
parasite = (GimpParasite *) args[1].value.pdb_pointer;
@ -632,7 +632,7 @@ image_parasite_detach_invoker (Gimp *gimp,
gchar *name;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
@ -686,7 +686,7 @@ image_parasite_list_invoker (Gimp *gimp,
gchar **parasites = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)

View File

@ -78,7 +78,7 @@ path_list_invoker (Gimp *gimp,
PathList *plist;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -166,7 +166,7 @@ path_get_points_invoker (Gimp *gimp,
Path *pptr = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
pname = (gchar *) args[1].value.pdb_pointer;
@ -302,7 +302,7 @@ path_get_current_invoker (Gimp *gimp,
Path *pptr = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -367,7 +367,7 @@ path_set_current_invoker (Gimp *gimp,
gchar *pname;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
pname = (gchar *) args[1].value.pdb_pointer;
@ -423,7 +423,7 @@ path_set_points_invoker (Gimp *gimp,
gboolean pclosed = FALSE;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
pname = (gchar *) args[1].value.pdb_pointer;
@ -508,7 +508,7 @@ path_stroke_current_invoker (Gimp *gimp,
Path *pptr = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -572,7 +572,7 @@ path_get_point_at_dist_invoker (Gimp *gimp,
Path *pptr = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
distance = args[1].value.pdb_float;
@ -667,7 +667,7 @@ path_get_tattoo_invoker (Gimp *gimp,
Path *pptr = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
pname = (gchar *) args[1].value.pdb_pointer;
@ -762,7 +762,7 @@ get_path_by_tattoo_invoker (Gimp *gimp,
Path *pptr = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
tattoo = args[1].value.pdb_int;
@ -837,7 +837,7 @@ path_delete_invoker (Gimp *gimp,
gchar *pname;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
pname = (gchar *) args[1].value.pdb_pointer;
@ -893,7 +893,7 @@ path_get_locked_invoker (Gimp *gimp,
Path *pptr = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
pname = (gchar *) args[1].value.pdb_pointer;
@ -988,7 +988,7 @@ path_set_locked_invoker (Gimp *gimp,
Path *pptr = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
pname = (gchar *) args[1].value.pdb_pointer;
@ -1076,7 +1076,7 @@ path_set_tattoo_invoker (Gimp *gimp,
Path *pptr = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
pname = (gchar *) args[1].value.pdb_pointer;

View File

@ -91,7 +91,7 @@ selection_bounds_invoker (Gimp *gimp,
gint32 y2;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -176,7 +176,7 @@ selection_value_invoker (Gimp *gimp,
gint32 y;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
x = args[1].value.pdb_int;
@ -244,7 +244,7 @@ selection_is_empty_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
return_args = procedural_db_return_args (&selection_is_empty_proc, success);
@ -299,7 +299,7 @@ selection_translate_invoker (Gimp *gimp,
gint32 offy;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
offx = args[1].value.pdb_int;
@ -360,7 +360,7 @@ selection_float_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
offx = args[1].value.pdb_int;
@ -434,7 +434,7 @@ selection_clear_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -476,7 +476,7 @@ selection_invert_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -518,7 +518,7 @@ selection_sharpen_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -560,7 +560,7 @@ selection_all_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -602,7 +602,7 @@ selection_none_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -645,7 +645,7 @@ selection_feather_invoker (Gimp *gimp,
gdouble radius;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
radius = args[1].value.pdb_float;
@ -697,7 +697,7 @@ selection_border_invoker (Gimp *gimp,
gint32 radius;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
radius = args[1].value.pdb_int;
@ -749,7 +749,7 @@ selection_grow_invoker (Gimp *gimp,
gint32 steps;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
steps = args[1].value.pdb_int;
@ -801,7 +801,7 @@ selection_shrink_invoker (Gimp *gimp,
gint32 radius;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
radius = args[1].value.pdb_int;
@ -853,7 +853,7 @@ selection_layer_alpha_invoker (Gimp *gimp,
GimpImage *gimage;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (layer == NULL)
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
@ -899,7 +899,7 @@ selection_load_invoker (Gimp *gimp,
GimpImage *gimage;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
if (success)
@ -951,7 +951,7 @@ selection_save_invoker (Gimp *gimp,
GimpChannel *channel = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -1010,7 +1010,7 @@ selection_combine_invoker (Gimp *gimp,
GimpChannel *new_channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (channel == NULL)
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
operation = args[1].value.pdb_int;

View File

@ -67,7 +67,7 @@ by_color_select_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
color = args[1].value.pdb_color;
@ -183,7 +183,7 @@ ellipse_select_invoker (Gimp *gimp,
gdouble feather_radius;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
x = args[1].value.pdb_float;
@ -300,7 +300,7 @@ free_select_invoker (Gimp *gimp,
gdouble feather_radius;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
num_segs = args[1].value.pdb_int;
@ -406,7 +406,7 @@ fuzzy_select_invoker (Gimp *gimp,
GimpImage *gimage;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
x = args[1].value.pdb_float;
@ -530,7 +530,7 @@ rect_select_invoker (Gimp *gimp,
gdouble feather_radius;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
x = args[1].value.pdb_float;

View File

@ -87,7 +87,7 @@ text_fontname_invoker (Gimp *gimp,
gchar *real_fontname;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);

View File

@ -65,7 +65,7 @@ flip_invoker (Gimp *gimp,
gint32 flip_type;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
flip_type = args[1].value.pdb_int;
@ -142,7 +142,7 @@ perspective_invoker (Gimp *gimp,
GimpInterpolationType interpolation_type;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
interpolation = args[1].value.pdb_int ? TRUE : FALSE;
@ -294,7 +294,7 @@ rotate_invoker (Gimp *gimp,
GimpInterpolationType interpolation_type;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
interpolation = args[1].value.pdb_int ? TRUE : FALSE;
@ -389,7 +389,7 @@ scale_invoker (Gimp *gimp,
GimpInterpolationType interpolation_type;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
interpolation = args[1].value.pdb_int ? TRUE : FALSE;
@ -517,7 +517,7 @@ shear_invoker (Gimp *gimp,
GimpInterpolationType interpolation_type;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
interpolation = args[1].value.pdb_int ? TRUE : FALSE;
@ -631,7 +631,7 @@ transform_2d_invoker (Gimp *gimp,
GimpInterpolationType interpolation_type;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (drawable == NULL)
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
interpolation = args[1].value.pdb_int ? TRUE : FALSE;

View File

@ -49,7 +49,7 @@ undo_push_group_start_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)
@ -91,7 +91,7 @@ undo_push_group_end_invoker (Gimp *gimp,
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
if (success)

View File

@ -243,8 +243,14 @@ sub marshal_inargs {
$id_func = $_->{id_func} if exists $_->{id_func};
$result .= " $var = $id_func (gimp, $value);\n";
$result .= &make_arg_test($_, sub { ${$_[0]} =~ s/==/!=/ },
"$var == NULL");
if (exists $arg->{check_func}) {
$result .= &make_arg_test($_, sub { ${$_[0]} =~ s/==/!=/ },
"! $arg->{check_func} ($var)");
} else {
$result .= &make_arg_test($_, sub { ${$_[0]} =~ s/==/!=/ },
"$var == NULL");
}
}
else {
$result .= ' ' x 2 . "$var = $value";

View File

@ -39,42 +39,50 @@ package Gimp::CodeGen::pdb;
type => 'GimpDisplay *',
headers => [ qw("display/gimpdisplay.h") ],
id_func => 'gimp_display_get_by_ID',
id_ret_func => 'gimp_display_get_ID ($var)' },
id_ret_func => 'gimp_display_get_ID ($var)',
check_func => 'GIMP_IS_DISPLAY' },
image => { name => 'IMAGE',
type => 'GimpImage *',
headers => [ qw("core/gimpimage.h") ],
id_func => 'gimp_image_get_by_ID',
id_ret_func => 'gimp_image_get_ID ($var)' },
id_ret_func => 'gimp_image_get_ID ($var)',
check_func => 'GIMP_IS_IMAGE' },
layer => { name => 'LAYER',
type => 'GimpLayer *',
headers => [ qw("core/gimplayer.h") ],
id_func => '(GimpLayer *) gimp_item_get_by_ID',
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))' },
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))',
check_func => 'GIMP_IS_LAYER' },
channel => { name => 'CHANNEL',
type => 'GimpChannel *',
headers => [ qw("core/gimpchannel.h") ],
id_func => '(GimpChannel *) gimp_item_get_by_ID',
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))' },
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))',
check_func => 'GIMP_IS_CHANNEL' },
drawable => { name => 'DRAWABLE',
type => 'GimpDrawable *',
headers => [ qw("core/gimpdrawable.h") ],
id_func => '(GimpDrawable *) gimp_item_get_by_ID',
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))' },
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))',
check_func => 'GIMP_IS_DRAWABLE' },
selection => { name => 'SELECTION',
type => 'GimpChannel *',
headers => [ qw("core/gimpchannel.h") ],
id_func => '(GimpChannel *) gimp_item_get_by_ID',
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))' },
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))',
check_func => 'GIMP_IS_CHANNEL' },
layer_mask => { name => 'CHANNEL',
type => 'GimpLayerMask *',
headers => [ qw("core/gimplayermask.h") ],
id_func => '(GimpLayerMask *) gimp_item_get_by_ID',
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))' },
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))',
check_func => 'GIMP_IS_LAYER_MASK' },
vectors => { name => 'VECTORS',
type => 'GimpVectors *',
headers => [ qw("vectors/gimpvectors.h") ],
id_func => '(GimpVectors *) gimp_item_get_by_ID',
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))' },
id_ret_func => 'gimp_item_get_ID (GIMP_ITEM ($var))',
check_func => 'GIMP_IS_VECTORS' },
parasite => { name => 'PARASITE',
type => 'GimpParasite *',
headers => [ qw("libgimpbase/gimpparasite.h") ] },