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

tools/pdbgen/pdb/channel.pdb removed gimp_layer_delete() and

2003-12-03  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/layer.pdb: removed gimp_layer_delete() and
	gimp_channel_delete() PDB wrappers...

	* tools/pdbgen/pdb/drawable.pdb: ...added gimp_drawable_delete().

	* libgimp/gimpdrawable.[ch]: removed gimp_drawable_delete()
	(having this function work on the GimpDrawable wrapper and not on
	the drawable_id was more than questionable anyway).

	* libgimp/gimpcompat.h: added gimp_layer_delete and
	gimp_channel_delete cruft #defines.

	* app/pdb/channel_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/layer_cmds.c
	* libgimp/gimpchannel_pdb.[ch]
	* libgimp/gimpdrawable_pdb.[ch]
	* libgimp/gimplayer_pdb.[ch]: regenerated.

	* plug-ins/script-fu/scripts/add-bevel.scm
	* plug-ins/xjt/xjt.c: changed accordingly.

	* plug-ins/imagemap/imap_main.c: just removed the call to
	gimp_channel_delete(), it was wrong anyway.

2003-12-03  Michael Natterer  <mitch@gimp.org>

	* libgimp/libgimp-sections.txt
	* libgimp/tmpl/gimpchannel.sgml
	* libgimp/tmpl/gimpdrawable.sgml
	* libgimp/tmpl/gimplayer.sgml: updated again.
parent ce07d9ea
2003-12-03 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: removed gimp_layer_delete() and
gimp_channel_delete() PDB wrappers...
* tools/pdbgen/pdb/drawable.pdb: ...added gimp_drawable_delete().
* libgimp/gimpdrawable.[ch]: removed gimp_drawable_delete()
(having this function work on the GimpDrawable wrapper and not on
the drawable_id was more than questionable anyway).
* libgimp/gimpcompat.h: added gimp_layer_delete and
gimp_channel_delete cruft #defines.
* app/pdb/channel_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/internal_procs.c
* app/pdb/layer_cmds.c
* libgimp/gimpchannel_pdb.[ch]
* libgimp/gimpdrawable_pdb.[ch]
* libgimp/gimplayer_pdb.[ch]: regenerated.
* plug-ins/script-fu/scripts/add-bevel.scm
* plug-ins/xjt/xjt.c: changed accordingly.
* plug-ins/imagemap/imap_main.c: just removed the call to
gimp_channel_delete(), it was wrong anyway.
2003-12-03 Manish Singh <yosh@gimp.org>
* plug-ins/pygimp/pygimp-drawable.c
......@@ -36,7 +36,6 @@
static ProcRecord channel_new_proc;
static ProcRecord channel_copy_proc;
static ProcRecord channel_delete_proc;
static ProcRecord channel_combine_masks_proc;
static ProcRecord channel_get_show_masked_proc;
static ProcRecord channel_set_show_masked_proc;
......@@ -50,7 +49,6 @@ register_channel_procs (Gimp *gimp)
{
procedural_db_register (gimp, &channel_new_proc);
procedural_db_register (gimp, &channel_copy_proc);
procedural_db_register (gimp, &channel_delete_proc);
procedural_db_register (gimp, &channel_combine_masks_proc);
procedural_db_register (gimp, &channel_get_show_masked_proc);
procedural_db_register (gimp, &channel_set_show_masked_proc);
......@@ -230,55 +228,6 @@ static ProcRecord channel_copy_proc =
{ { channel_copy_invoker } }
};
static Argument *
channel_delete_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
if (success)
{
if (! gimp_item_get_image (GIMP_ITEM (channel)))
{
g_object_unref (channel);
success = TRUE;
}
}
return procedural_db_return_args (&channel_delete_proc, success);
}
static ProcArg channel_delete_inargs[] =
{
{
GIMP_PDB_CHANNEL,
"channel",
"The channel to delete"
}
};
static ProcRecord channel_delete_proc =
{
"gimp_channel_delete",
"Delete a channel.",
"This procedure deletes the specified channel. This must not be done if the gimage containing this channel was already deleted or if the channel was already removed from the image. The only case in which this procedure is useful is if you want to get rid of a channel which has not yet been added to an image.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
channel_delete_inargs,
0,
NULL,
{ { channel_delete_invoker } }
};
static Argument *
channel_combine_masks_invoker (Gimp *gimp,
Argument *args)
......
......@@ -70,6 +70,7 @@ static ProcRecord drawable_set_pixel_proc;
static ProcRecord drawable_set_image_proc;
static ProcRecord drawable_thumbnail_proc;
static ProcRecord drawable_offset_proc;
static ProcRecord drawable_delete_proc;
void
register_drawable_procs (Gimp *gimp)
......@@ -103,6 +104,7 @@ register_drawable_procs (Gimp *gimp)
procedural_db_register (gimp, &drawable_set_image_proc);
procedural_db_register (gimp, &drawable_thumbnail_proc);
procedural_db_register (gimp, &drawable_offset_proc);
procedural_db_register (gimp, &drawable_delete_proc);
}
static Argument *
......@@ -1944,3 +1946,50 @@ static ProcRecord drawable_offset_proc =
NULL,
{ { drawable_offset_invoker } }
};
static Argument *
drawable_delete_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
if (success)
{
if (! gimp_item_get_image (GIMP_ITEM (drawable)))
g_object_unref (drawable);
else
success = FALSE;
}
return procedural_db_return_args (&drawable_delete_proc, success);
}
static ProcArg drawable_delete_inargs[] =
{
{
GIMP_PDB_DRAWABLE,
"drawable",
"The drawable to delete"
}
};
static ProcRecord drawable_delete_proc =
{
"gimp_drawable_delete",
"Delete a drawable.",
"This procedure deletes the specified drawable. This must not be done if the gimage containing this drawable was already deleted or if the drawable was already removed from the image. The only case in which this procedure is useful is if you want to get rid of a drawable which has not yet been added to an image.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
drawable_delete_inargs,
0,
NULL,
{ { drawable_delete_invoker } }
};
......@@ -69,7 +69,7 @@ void register_transform_tools_procs (Gimp *gimp);
void register_undo_procs (Gimp *gimp);
void register_unit_procs (Gimp *gimp);
/* 345 procedures registered total */
/* 344 procedures registered total */
void
internal_procs_init (Gimp *gimp,
......@@ -87,94 +87,94 @@ internal_procs_init (Gimp *gimp,
(* status_callback) (NULL, _("Channel"), 0.041);
register_channel_procs (gimp);
(* status_callback) (NULL, _("Color"), 0.07);
(* status_callback) (NULL, _("Color"), 0.067);
register_color_procs (gimp);
(* status_callback) (NULL, _("Convert"), 0.107);
(* status_callback) (NULL, _("Convert"), 0.105);
register_convert_procs (gimp);
(* status_callback) (NULL, _("Display procedures"), 0.116);
(* status_callback) (NULL, _("Display procedures"), 0.113);
register_display_procs (gimp);
(* status_callback) (NULL, _("Drawable procedures"), 0.128);
(* status_callback) (NULL, _("Drawable procedures"), 0.125);
register_drawable_procs (gimp);
(* status_callback) (NULL, _("Edit procedures"), 0.212);
register_edit_procs (gimp);
(* status_callback) (NULL, _("File Operations"), 0.229);
(* status_callback) (NULL, _("File Operations"), 0.23);
register_fileops_procs (gimp);
(* status_callback) (NULL, _("Floating selections"), 0.252);
(* status_callback) (NULL, _("Floating selections"), 0.253);
register_floating_sel_procs (gimp);
(* status_callback) (NULL, _("Font UI"), 0.27);
register_font_select_procs (gimp);
(* status_callback) (NULL, _("Fonts"), 0.278);
(* status_callback) (NULL, _("Fonts"), 0.279);
register_fonts_procs (gimp);
(* status_callback) (NULL, _("Gimprc procedures"), 0.284);
(* status_callback) (NULL, _("Gimprc procedures"), 0.285);
register_gimprc_procs (gimp);
(* status_callback) (NULL, _("Gradient UI"), 0.301);
(* status_callback) (NULL, _("Gradient UI"), 0.302);
register_gradient_select_procs (gimp);
(* status_callback) (NULL, _("Gradients"), 0.31);
(* status_callback) (NULL, _("Gradients"), 0.311);
register_gradients_procs (gimp);
(* status_callback) (NULL, _("Guide procedures"), 0.33);
(* status_callback) (NULL, _("Guide procedures"), 0.331);
register_guides_procs (gimp);
(* status_callback) (NULL, _("Help procedures"), 0.348);
(* status_callback) (NULL, _("Help procedures"), 0.349);
register_help_procs (gimp);
(* status_callback) (NULL, _("Image"), 0.351);
(* status_callback) (NULL, _("Image"), 0.352);
register_image_procs (gimp);
(* status_callback) (NULL, _("Layer"), 0.536);
(* status_callback) (NULL, _("Layer"), 0.538);
register_layer_procs (gimp);
(* status_callback) (NULL, _("Message procedures"), 0.614);
(* status_callback) (NULL, _("Message procedures"), 0.613);
register_message_procs (gimp);
(* status_callback) (NULL, _("Miscellaneous"), 0.623);
(* status_callback) (NULL, _("Miscellaneous"), 0.622);
register_misc_procs (gimp);
(* status_callback) (NULL, _("Misc Tool procedures"), 0.629);
(* status_callback) (NULL, _("Misc Tool procedures"), 0.628);
register_misc_tools_procs (gimp);
(* status_callback) (NULL, _("Paint Tool procedures"), 0.638);
(* status_callback) (NULL, _("Paint Tool procedures"), 0.637);
register_paint_tools_procs (gimp);
(* status_callback) (NULL, _("Palette"), 0.681);
(* status_callback) (NULL, _("Palette"), 0.68);
register_palette_procs (gimp);
(* status_callback) (NULL, _("Palette UI"), 0.699);
(* status_callback) (NULL, _("Palette UI"), 0.698);
register_palette_select_procs (gimp);
(* status_callback) (NULL, _("Palettes"), 0.707);
(* status_callback) (NULL, _("Palettes"), 0.706);
register_palettes_procs (gimp);
(* status_callback) (NULL, _("Parasite procedures"), 0.722);
(* status_callback) (NULL, _("Parasite procedures"), 0.721);
register_parasite_procs (gimp);
(* status_callback) (NULL, _("Paths"), 0.757);
(* status_callback) (NULL, _("Paths"), 0.756);
register_paths_procs (gimp);
(* status_callback) (NULL, _("Pattern UI"), 0.8);
(* status_callback) (NULL, _("Pattern UI"), 0.799);
register_pattern_select_procs (gimp);
(* status_callback) (NULL, _("Patterns"), 0.809);
(* status_callback) (NULL, _("Patterns"), 0.808);
register_patterns_procs (gimp);
(* status_callback) (NULL, _("Plug-in"), 0.823);
register_plug_in_procs (gimp);
(* status_callback) (NULL, _("Procedural database"), 0.841);
(* status_callback) (NULL, _("Procedural database"), 0.84);
register_procedural_db_procs (gimp);
(* status_callback) (NULL, _("Image mask"), 0.864);
(* status_callback) (NULL, _("Image mask"), 0.863);
register_selection_procs (gimp);
(* status_callback) (NULL, _("Selection Tool procedures"), 0.916);
......
......@@ -46,7 +46,6 @@ static ProcRecord layer_create_mask_proc;
static ProcRecord layer_scale_proc;
static ProcRecord layer_resize_proc;
static ProcRecord layer_resize_to_image_size_proc;
static ProcRecord layer_delete_proc;
static ProcRecord layer_translate_proc;
static ProcRecord layer_add_alpha_proc;
static ProcRecord layer_set_offsets_proc;
......@@ -77,7 +76,6 @@ register_layer_procs (Gimp *gimp)
procedural_db_register (gimp, &layer_scale_proc);
procedural_db_register (gimp, &layer_resize_proc);
procedural_db_register (gimp, &layer_resize_to_image_size_proc);
procedural_db_register (gimp, &layer_delete_proc);
procedural_db_register (gimp, &layer_translate_proc);
procedural_db_register (gimp, &layer_add_alpha_proc);
procedural_db_register (gimp, &layer_set_offsets_proc);
......@@ -598,53 +596,6 @@ static ProcRecord layer_resize_to_image_size_proc =
{ { layer_resize_to_image_size_invoker } }
};
static Argument *
layer_delete_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_LAYER (layer))
success = FALSE;
if (success)
{
if (! gimp_item_get_image (GIMP_ITEM (layer)))
g_object_unref (layer);
else
success = FALSE;
}
return procedural_db_return_args (&layer_delete_proc, success);
}
static ProcArg layer_delete_inargs[] =
{
{
GIMP_PDB_LAYER,
"layer",
"The layer to delete"
}
};
static ProcRecord layer_delete_proc =
{
"gimp_layer_delete",
"Delete a layer.",
"This procedure deletes the specified layer. This must not be done if the gimage containing this layer was already deleted or if the layer was already removed from the image. The only case in which this procedure is useful is if you want to get rid of a layer which has not yet been added to an image.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
layer_delete_inargs,
0,
NULL,
{ { layer_delete_invoker } }
};
static Argument *
layer_translate_invoker (Gimp *gimp,
Argument *args)
......
2003-12-03 Michael Natterer <mitch@gimp.org>
* libgimp/libgimp-sections.txt
* libgimp/tmpl/gimpchannel.sgml
* libgimp/tmpl/gimpdrawable.sgml
* libgimp/tmpl/gimplayer.sgml: updated again.
2003-12-03 Michael Natterer <mitch@gimp.org>
* libgimp/libgimp-sections.txt
......
......@@ -125,7 +125,6 @@ gimp_brushes_set_popup
<FILE>gimpchannel</FILE>
gimp_channel_new
gimp_channel_copy
gimp_channel_delete
gimp_channel_get_show_masked
gimp_channel_set_show_masked
gimp_channel_get_opacity
......@@ -391,7 +390,6 @@ gimp_layer_create_mask
gimp_layer_scale
gimp_layer_resize
gimp_layer_resize_to_image_size
gimp_layer_delete
gimp_layer_translate
gimp_layer_add_alpha
gimp_layer_set_offsets
......
......@@ -37,15 +37,6 @@ Functions for manipulating channels.
@Returns:
<!-- ##### FUNCTION gimp_channel_delete ##### -->
<para>
</para>
@channel_ID:
@Returns:
<!-- ##### FUNCTION gimp_channel_get_show_masked ##### -->
<para>
......
......@@ -59,6 +59,9 @@ Functions to manipulate drawables.
</para>
@drawable_ID:
@Returns:
<!-- # Unused Parameters # -->
@drawable:
......
......@@ -83,15 +83,6 @@ Operations on single layers.
@Returns:
<!-- ##### FUNCTION gimp_layer_delete ##### -->
<para>
</para>
@layer_ID:
@Returns:
<!-- ##### FUNCTION gimp_layer_translate ##### -->
<para>
......
......@@ -106,39 +106,6 @@ gimp_channel_copy (gint32 channel_ID)
return channel_copy_ID;
}
/**
* gimp_channel_delete:
* @channel_ID: The channel to delete.
*
* Delete a channel.
*
* This procedure deletes the specified channel. This must not be done
* if the gimage containing this channel was already deleted or if the
* channel was already removed from the image. The only case in which
* this procedure is useful is if you want to get rid of a channel
* which has not yet been added to an image.
*
* Returns: TRUE on success.
*/
gboolean
gimp_channel_delete (gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_delete",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_channel_combine_masks:
* @channel1_ID: The channel1.
......
......@@ -36,7 +36,6 @@ gint32 _gimp_channel_new (gint32 image_ID,
gdouble opacity,
const GimpRGB *color);
gint32 gimp_channel_copy (gint32 channel_ID);
gboolean gimp_channel_delete (gint32 channel_ID);
gboolean gimp_channel_combine_masks (gint32 channel1_ID,
gint32 channel2_ID,
GimpChannelOps operation,
......
......@@ -44,6 +44,7 @@ G_BEGIN_DECLS
#define gimp_crop gimp_image_crop
#define gimp_channel_delete gimp_drawable_delete
#define gimp_channel_get_name gimp_drawable_get_name
#define gimp_channel_set_name gimp_drawable_set_name
#define gimp_channel_get_visible gimp_drawable_get_visible
......@@ -51,6 +52,7 @@ G_BEGIN_DECLS
#define gimp_channel_get_tattoo gimp_drawable_get_tattoo
#define gimp_channel_set_tattoo gimp_drawable_set_tattoo
#define gimp_layer_delete gimp_drawable_delete
#define gimp_layer_get_name gimp_drawable_get_name
#define gimp_layer_set_name gimp_drawable_set_name
#define gimp_layer_get_visible gimp_drawable_get_visible
......
......@@ -52,10 +52,12 @@ gimp_drawable_detach (GimpDrawable *drawable)
if (drawable)
{
gimp_drawable_flush (drawable);
if (drawable->tiles)
g_free (drawable->tiles);
if (drawable->shadow_tiles)
g_free (drawable->shadow_tiles);
g_free (drawable);
}
}
......@@ -64,45 +66,33 @@ void
gimp_drawable_flush (GimpDrawable *drawable)
{
GimpTile *tiles;
gint ntiles;
gint i;
gint n_tiles;
gint i;
if (drawable)
{
if (drawable->tiles)
{
tiles = drawable->tiles;
ntiles = drawable->ntile_rows * drawable->ntile_cols;
tiles = drawable->tiles;
n_tiles = drawable->ntile_rows * drawable->ntile_cols;
for (i = 0; i < ntiles; i++)
for (i = 0; i < n_tiles; i++)
if ((tiles[i].ref_count > 0) && tiles[i].dirty)
gimp_tile_flush (&tiles[i]);
}
if (drawable->shadow_tiles)
{
tiles = drawable->shadow_tiles;
ntiles = drawable->ntile_rows * drawable->ntile_cols;
tiles = drawable->shadow_tiles;
n_tiles = drawable->ntile_rows * drawable->ntile_cols;
for (i = 0; i < ntiles; i++)
for (i = 0; i < n_tiles; i++)
if ((tiles[i].ref_count > 0) && tiles[i].dirty)
gimp_tile_flush (&tiles[i]);
}
}
}
void
gimp_drawable_delete (GimpDrawable *drawable)
{
if (drawable)
{
if (gimp_drawable_is_layer (drawable->drawable_id))
gimp_layer_delete (drawable->drawable_id);
else
gimp_channel_delete (drawable->drawable_id);
}
}
GimpTile *
gimp_drawable_get_tile (GimpDrawable *drawable,
gboolean shadow,
......@@ -110,11 +100,11 @@ gimp_drawable_get_tile (GimpDrawable *drawable,
gint col)
{
GimpTile *tiles;
guint right_tile;
guint bottom_tile;
gint ntiles;
gint tile_num;
gint i, j, k;
guint right_tile;
guint bottom_tile;
gint n_tiles;
gint tile_num;
gint i, j, k;
if (drawable)
{
......@@ -125,8 +115,8 @@ gimp_drawable_get_tile (GimpDrawable *drawable,
if (!tiles)
{
ntiles = drawable->ntile_rows * drawable->ntile_cols;
tiles = g_new (GimpTile, ntiles);
n_tiles = drawable->ntile_rows * drawable->ntile_cols;
tiles = g_new (GimpTile, n_tiles);
right_tile = drawable->width - ((drawable->ntile_cols - 1) * TILE_WIDTH);
bottom_tile = drawable->height - ((drawable->ntile_rows - 1) * TILE_HEIGHT);
......@@ -162,6 +152,7 @@ gimp_drawable_get_tile (GimpDrawable *drawable,
}
tile_num = row * drawable->ntile_cols + col;
return &tiles[tile_num];
}
......
......@@ -43,29 +43,28 @@ struct _GimpDrawable
};
GimpDrawable * gimp_drawable_get (gint32 drawable_ID);
void gimp_drawable_detach (GimpDrawable *drawable);
void gimp_drawable_flush (GimpDrawable *drawable);
void gimp_drawable_delete (GimpDrawable *drawable);
GimpTile * gimp_drawable_get_tile (GimpDrawable *drawable,
gint shadow,
gint row,
gint col);
GimpTile * gimp_drawable_get_tile2 (GimpDrawable *drawable,
gint shadow,
gint x,
gint y);
GimpDrawable * gimp_drawable_get (gint32 drawable_ID);
void gimp_drawable_detach (GimpDrawable *drawable);
void gimp_drawable_flush (GimpDrawable *drawable);
GimpTile * gimp_drawable_get_tile (GimpDrawable *drawable,
gint shadow,
gint row,
gint col);
GimpTile * gimp_drawable_get_tile2 (GimpDrawable *drawable,
gint shadow,
gint x,
gint y);
guchar * gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
gint *width,
gint *height,
gint *bpp);
guchar * gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
gint *width,
gint *height,
gint *bpp);
void gimp_drawable_attach_new_parasite (gint32 drawable_ID,
const gchar *name,
gint flags,
gint size,
gconstpointer data);
void gimp_drawable_attach_new_parasite (gint32 drawable_ID,
const gchar *name,
gint flags,
gint size,
gconstpointer data);
G_END_DECLS
......
......@@ -1073,3 +1073,36 @@ gimp_drawable_offset (gint32 drawable_ID,
return success;
}
/**
* gimp_drawable_delete:
* @drawable_ID: The drawable to delete.
*
* Delete a drawable.
*
* This procedure deletes the specified drawable. This must not be done
* if the gimage containing this drawable was already deleted or if the
* drawable was already removed from the image. The only case in which
* this procedure is useful is if you want to get rid of a drawable
* which has not yet been added to an image.
*
* Returns: TRUE on success.
*/
gboolean
gimp_drawable_delete (gint32 drawable_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_drawable_delete",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
......@@ -92,6 +92,7 @@ gboolean gimp_drawable_offset (gint32 drawable_ID,
GimpOffsetType fill_type,
gint offset_x,
gint offset_y);
gboolean gimp_drawable_delete (gint32 drawable_ID);
G_END_DECLS
......
......@@ -274,39 +274,6 @@ gimp_layer_resize_to_image_size (gint32 layer_ID)
return success;
}
/**
* gimp_layer_delete:
* @layer_ID: The layer to delete.
*
* Delete a layer.
*
* This procedure deletes the specified layer. This must not be done if
* the gimage containing this layer was already deleted or if the layer
* was already removed from the image. The only case in which this
* procedure is useful is if you want to get rid of a layer which has
* not yet been added to an image.
*
* Returns: TRUE on success.
*/
gboolean
gimp_layer_delete (gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_layer_delete",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,