tools/pdbgen/pdb/channel.pdb removed duplicated APIs for "name", "visible"

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

	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/layer.pdb: removed duplicated APIs for "name",
	"visible" and "tattoo"...

	* tools/pdbgen/pdb/drawable.pdb: ...and added them as drawable APIs.

	* libgimp/gimpdrawable.[ch]: removed faked layer/channel
	polymorphisms, the functions are real drawable functions now.

	* libgimp/gimpcompat.h: added the old cruft here.

	* 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.

	* libgimp/gimpexport.c
	* libgimp/gimpmenu.c
	* plug-ins/common/align_layers.c
	* plug-ins/common/animationplay.c
	* plug-ins/common/animoptimize.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/gbr.c
	* plug-ins/common/gif.c
	* plug-ins/common/gih.c
	* plug-ins/common/iwarp.c
	* plug-ins/common/mng.c
	* plug-ins/common/psd.c
	* plug-ins/common/psd_save.c
	* plug-ins/common/psp.c
	* plug-ins/xjt/xjt.c
	* plug-ins/gfig/gfig.c
	* plug-ins/script-fu/scripts/*.scm: changed accordingly.

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

	* libgimp/libgimp-sections.txt: updated.
This commit is contained in:
Michael Natterer 2003-12-03 16:39:32 +00:00 committed by Michael Natterer
parent 2899728857
commit a1f064c2ea
77 changed files with 1286 additions and 1669 deletions

View file

@ -1,3 +1,42 @@
2003-12-03 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: removed duplicated APIs for "name",
"visible" and "tattoo"...
* tools/pdbgen/pdb/drawable.pdb: ...and added them as drawable APIs.
* libgimp/gimpdrawable.[ch]: removed faked layer/channel
polymorphisms, the functions are real drawable functions now.
* libgimp/gimpcompat.h: added the old cruft here.
* 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.
* libgimp/gimpexport.c
* libgimp/gimpmenu.c
* plug-ins/common/align_layers.c
* plug-ins/common/animationplay.c
* plug-ins/common/animoptimize.c
* plug-ins/common/curve_bend.c
* plug-ins/common/gbr.c
* plug-ins/common/gif.c
* plug-ins/common/gih.c
* plug-ins/common/iwarp.c
* plug-ins/common/mng.c
* plug-ins/common/psd.c
* plug-ins/common/psd_save.c
* plug-ins/common/psp.c
* plug-ins/xjt/xjt.c
* plug-ins/gfig/gfig.c
* plug-ins/script-fu/scripts/*.scm: changed accordingly.
2003-12-03 Jakub Steiner <jimmac@ximian.com>
* data/patterns/Stripes1px.pat

View file

@ -38,18 +38,12 @@ 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_name_proc;
static ProcRecord channel_set_name_proc;
static ProcRecord channel_get_visible_proc;
static ProcRecord channel_set_visible_proc;
static ProcRecord channel_get_show_masked_proc;
static ProcRecord channel_set_show_masked_proc;
static ProcRecord channel_get_opacity_proc;
static ProcRecord channel_set_opacity_proc;
static ProcRecord channel_get_color_proc;
static ProcRecord channel_set_color_proc;
static ProcRecord channel_get_tattoo_proc;
static ProcRecord channel_set_tattoo_proc;
void
register_channel_procs (Gimp *gimp)
@ -58,18 +52,12 @@ register_channel_procs (Gimp *gimp)
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_name_proc);
procedural_db_register (gimp, &channel_set_name_proc);
procedural_db_register (gimp, &channel_get_visible_proc);
procedural_db_register (gimp, &channel_set_visible_proc);
procedural_db_register (gimp, &channel_get_show_masked_proc);
procedural_db_register (gimp, &channel_set_show_masked_proc);
procedural_db_register (gimp, &channel_get_opacity_proc);
procedural_db_register (gimp, &channel_set_opacity_proc);
procedural_db_register (gimp, &channel_get_color_proc);
procedural_db_register (gimp, &channel_set_color_proc);
procedural_db_register (gimp, &channel_get_tattoo_proc);
procedural_db_register (gimp, &channel_set_tattoo_proc);
}
static Argument *
@ -371,216 +359,6 @@ static ProcRecord channel_combine_masks_proc =
{ { channel_combine_masks_invoker } }
};
static Argument *
channel_get_name_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
return_args = procedural_db_return_args (&channel_get_name_proc, success);
if (success)
return_args[1].value.pdb_pointer = g_strdup (gimp_object_get_name (GIMP_OBJECT (channel)));
return return_args;
}
static ProcArg channel_get_name_inargs[] =
{
{
GIMP_PDB_CHANNEL,
"channel",
"The channel"
}
};
static ProcArg channel_get_name_outargs[] =
{
{
GIMP_PDB_STRING,
"name",
"The channel name"
}
};
static ProcRecord channel_get_name_proc =
{
"gimp_channel_get_name",
"Get the name of the specified channel.",
"This procedure returns the specified channel's name.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
channel_get_name_inargs,
1,
channel_get_name_outargs,
{ { channel_get_name_invoker } }
};
static Argument *
channel_set_name_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpChannel *channel;
gchar *name;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
gimp_item_rename (GIMP_ITEM (channel), name);
return procedural_db_return_args (&channel_set_name_proc, success);
}
static ProcArg channel_set_name_inargs[] =
{
{
GIMP_PDB_CHANNEL,
"channel",
"The channel"
},
{
GIMP_PDB_STRING,
"name",
"The new channel name"
}
};
static ProcRecord channel_set_name_proc =
{
"gimp_channel_set_name",
"Set the name of the specified channel.",
"This procedure sets the specified channel's name.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
2,
channel_set_name_inargs,
0,
NULL,
{ { channel_set_name_invoker } }
};
static Argument *
channel_get_visible_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
return_args = procedural_db_return_args (&channel_get_visible_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_item_get_visible (GIMP_ITEM (channel));
return return_args;
}
static ProcArg channel_get_visible_inargs[] =
{
{
GIMP_PDB_CHANNEL,
"channel",
"The channel"
}
};
static ProcArg channel_get_visible_outargs[] =
{
{
GIMP_PDB_INT32,
"visible",
"The channel visibility"
}
};
static ProcRecord channel_get_visible_proc =
{
"gimp_channel_get_visible",
"Get the visibility of the specified channel.",
"This procedure returns the specified channel's visibility.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
channel_get_visible_inargs,
1,
channel_get_visible_outargs,
{ { channel_get_visible_invoker } }
};
static Argument *
channel_set_visible_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpChannel *channel;
gboolean visible;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
visible = args[1].value.pdb_int ? TRUE : FALSE;
if (success)
gimp_item_set_visible (GIMP_ITEM (channel), visible, TRUE);
return procedural_db_return_args (&channel_set_visible_proc, success);
}
static ProcArg channel_set_visible_inargs[] =
{
{
GIMP_PDB_CHANNEL,
"channel",
"The channel"
},
{
GIMP_PDB_INT32,
"visible",
"The new channel visibility"
}
};
static ProcRecord channel_set_visible_proc =
{
"gimp_channel_set_visible",
"Set the visibility of the specified channel.",
"This procedure sets the specified channel's visibility.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
2,
channel_set_visible_inargs,
0,
NULL,
{ { channel_set_visible_invoker } }
};
static Argument *
channel_get_show_masked_invoker (Gimp *gimp,
Argument *args)
@ -905,109 +683,3 @@ static ProcRecord channel_set_color_proc =
NULL,
{ { channel_set_color_invoker } }
};
static Argument *
channel_get_tattoo_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpChannel *channel;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
return_args = procedural_db_return_args (&channel_get_tattoo_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_item_get_tattoo (GIMP_ITEM (channel));
return return_args;
}
static ProcArg channel_get_tattoo_inargs[] =
{
{
GIMP_PDB_CHANNEL,
"channel",
"The channel"
}
};
static ProcArg channel_get_tattoo_outargs[] =
{
{
GIMP_PDB_INT32,
"tattoo",
"The channel tattoo"
}
};
static ProcRecord channel_get_tattoo_proc =
{
"gimp_channel_get_tattoo",
"Get the tattoo of the specified channel.",
"This procedure returns the specified channel's tattoo. A tattoo is a unique and permanent identifier attached to a channel that can be used to uniquely identify a channel within an image even between sessions.",
"Jay Cox",
"Jay Cox",
"1998",
GIMP_INTERNAL,
1,
channel_get_tattoo_inargs,
1,
channel_get_tattoo_outargs,
{ { channel_get_tattoo_invoker } }
};
static Argument *
channel_set_tattoo_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpChannel *channel;
gint32 tattoo;
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_CHANNEL (channel))
success = FALSE;
tattoo = args[1].value.pdb_int;
if (tattoo == 0)
success = FALSE;
if (success)
gimp_item_set_tattoo (GIMP_ITEM (channel), tattoo);
return procedural_db_return_args (&channel_set_tattoo_proc, success);
}
static ProcArg channel_set_tattoo_inargs[] =
{
{
GIMP_PDB_CHANNEL,
"channel",
"The channel"
},
{
GIMP_PDB_INT32,
"tattoo",
"The new channel tattoo"
}
};
static ProcRecord channel_set_tattoo_proc =
{
"gimp_channel_set_tattoo",
"Set the tattoo of the specified channel.",
"This procedure sets the specified channel's tattoo. A tattoo is a unique and permanent identifier attached to a channel that can be used to uniquely identify a channel within an image even between sessions.",
"Jay Cox",
"Jay Cox",
"1998",
GIMP_INTERNAL,
2,
channel_set_tattoo_inargs,
0,
NULL,
{ { channel_set_tattoo_invoker } }
};

View file

@ -59,6 +59,12 @@ static ProcRecord drawable_offsets_proc;
static ProcRecord drawable_is_layer_proc;
static ProcRecord drawable_is_layer_mask_proc;
static ProcRecord drawable_is_channel_proc;
static ProcRecord drawable_get_name_proc;
static ProcRecord drawable_set_name_proc;
static ProcRecord drawable_get_visible_proc;
static ProcRecord drawable_set_visible_proc;
static ProcRecord drawable_get_tattoo_proc;
static ProcRecord drawable_set_tattoo_proc;
static ProcRecord drawable_get_pixel_proc;
static ProcRecord drawable_set_pixel_proc;
static ProcRecord drawable_set_image_proc;
@ -86,6 +92,12 @@ register_drawable_procs (Gimp *gimp)
procedural_db_register (gimp, &drawable_is_layer_proc);
procedural_db_register (gimp, &drawable_is_layer_mask_proc);
procedural_db_register (gimp, &drawable_is_channel_proc);
procedural_db_register (gimp, &drawable_get_name_proc);
procedural_db_register (gimp, &drawable_set_name_proc);
procedural_db_register (gimp, &drawable_get_visible_proc);
procedural_db_register (gimp, &drawable_set_visible_proc);
procedural_db_register (gimp, &drawable_get_tattoo_proc);
procedural_db_register (gimp, &drawable_set_tattoo_proc);
procedural_db_register (gimp, &drawable_get_pixel_proc);
procedural_db_register (gimp, &drawable_set_pixel_proc);
procedural_db_register (gimp, &drawable_set_image_proc);
@ -1141,6 +1153,322 @@ static ProcRecord drawable_is_channel_proc =
{ { drawable_is_channel_invoker } }
};
static Argument *
drawable_get_name_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_get_name_proc, success);
if (success)
return_args[1].value.pdb_pointer = g_strdup (gimp_object_get_name (GIMP_OBJECT (drawable)));
return return_args;
}
static ProcArg drawable_get_name_inargs[] =
{
{
GIMP_PDB_DRAWABLE,
"drawable",
"The drawable"
}
};
static ProcArg drawable_get_name_outargs[] =
{
{
GIMP_PDB_STRING,
"name",
"The drawable name"
}
};
static ProcRecord drawable_get_name_proc =
{
"gimp_drawable_get_name",
"Get the name of the specified drawable.",
"This procedure returns the specified drawable's name.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
drawable_get_name_inargs,
1,
drawable_get_name_outargs,
{ { drawable_get_name_invoker } }
};
static Argument *
drawable_set_name_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpDrawable *drawable;
gchar *name;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
gimp_item_rename (GIMP_ITEM (drawable), name);
return procedural_db_return_args (&drawable_set_name_proc, success);
}
static ProcArg drawable_set_name_inargs[] =
{
{
GIMP_PDB_DRAWABLE,
"drawable",
"The drawable"
},
{
GIMP_PDB_STRING,
"name",
"The new drawable name"
}
};
static ProcRecord drawable_set_name_proc =
{
"gimp_drawable_set_name",
"Set the name of the specified drawable.",
"This procedure sets the specified drawable's name.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
2,
drawable_set_name_inargs,
0,
NULL,
{ { drawable_set_name_invoker } }
};
static Argument *
drawable_get_visible_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_get_visible_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_item_get_visible (GIMP_ITEM (drawable));
return return_args;
}
static ProcArg drawable_get_visible_inargs[] =
{
{
GIMP_PDB_DRAWABLE,
"drawable",
"The drawable"
}
};
static ProcArg drawable_get_visible_outargs[] =
{
{
GIMP_PDB_INT32,
"visible",
"The drawable visibility"
}
};
static ProcRecord drawable_get_visible_proc =
{
"gimp_drawable_get_visible",
"Get the visibility of the specified drawable.",
"This procedure returns the specified drawable's visibility.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
drawable_get_visible_inargs,
1,
drawable_get_visible_outargs,
{ { drawable_get_visible_invoker } }
};
static Argument *
drawable_set_visible_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpDrawable *drawable;
gboolean visible;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
visible = args[1].value.pdb_int ? TRUE : FALSE;
if (success)
gimp_item_set_visible (GIMP_ITEM (drawable), visible, TRUE);
return procedural_db_return_args (&drawable_set_visible_proc, success);
}
static ProcArg drawable_set_visible_inargs[] =
{
{
GIMP_PDB_DRAWABLE,
"drawable",
"The drawable"
},
{
GIMP_PDB_INT32,
"visible",
"The new drawable visibility"
}
};
static ProcRecord drawable_set_visible_proc =
{
"gimp_drawable_set_visible",
"Set the visibility of the specified drawable.",
"This procedure sets the specified drawable's visibility.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
2,
drawable_set_visible_inargs,
0,
NULL,
{ { drawable_set_visible_invoker } }
};
static Argument *
drawable_get_tattoo_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpDrawable *drawable;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
return_args = procedural_db_return_args (&drawable_get_tattoo_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_item_get_tattoo (GIMP_ITEM (drawable));
return return_args;
}
static ProcArg drawable_get_tattoo_inargs[] =
{
{
GIMP_PDB_DRAWABLE,
"drawable",
"The drawable"
}
};
static ProcArg drawable_get_tattoo_outargs[] =
{
{
GIMP_PDB_INT32,
"tattoo",
"The drawable tattoo"
}
};
static ProcRecord drawable_get_tattoo_proc =
{
"gimp_drawable_get_tattoo",
"Get the tattoo of the specified drawable.",
"This procedure returns the specified drawable's tattoo. A tattoo is a unique and permanent identifier attached to a drawable that can be used to uniquely identify a drawable within an image even between sessions",
"Jay Cox",
"Jay Cox",
"1998",
GIMP_INTERNAL,
1,
drawable_get_tattoo_inargs,
1,
drawable_get_tattoo_outargs,
{ { drawable_get_tattoo_invoker } }
};
static Argument *
drawable_set_tattoo_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpDrawable *drawable;
gint32 tattoo;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_DRAWABLE (drawable))
success = FALSE;
tattoo = args[1].value.pdb_int;
if (tattoo == 0)
success = FALSE;
if (success)
gimp_item_set_tattoo (GIMP_ITEM (drawable), tattoo);
return procedural_db_return_args (&drawable_set_tattoo_proc, success);
}
static ProcArg drawable_set_tattoo_inargs[] =
{
{
GIMP_PDB_DRAWABLE,
"drawable",
"The drawable"
},
{
GIMP_PDB_INT32,
"tattoo",
"The new drawable tattoo"
}
};
static ProcRecord drawable_set_tattoo_proc =
{
"gimp_drawable_set_tattoo",
"Set the tattoo of the specified drawable.",
"This procedure sets the specified drawable's tattoo. A tattoo is a unique and permanent identifier attached to a drawable that can be used to uniquely identify a drawable within an image even between sessions",
"Jay Cox",
"Jay Cox",
"1998",
GIMP_INTERNAL,
2,
drawable_set_tattoo_inargs,
0,
NULL,
{ { drawable_set_tattoo_invoker } }
};
static Argument *
drawable_get_pixel_invoker (Gimp *gimp,
Argument *args)
@ -1340,7 +1668,7 @@ static ProcRecord drawable_set_pixel_proc =
{
"gimp_drawable_set_pixel",
"Sets the value of the pixel at the specified coordinates.",
"This procedure sets the pixel value at the specified coordinates. The 'num_channels' argument must always be equal to the bytes-per-pixel value for the spec ified drawable.",
"This procedure sets the pixel value at the specified coordinates. The 'num_channels' argument must always be equal to the bytes-per-pixel value for the spec ified drawable. Note that this function is not undoable, you should use it only on drawables you just created yourself.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1997",

View file

@ -69,7 +69,7 @@ void register_transform_tools_procs (Gimp *gimp);
void register_undo_procs (Gimp *gimp);
void register_unit_procs (Gimp *gimp);
/* 351 procedures registered total */
/* 345 procedures registered total */
void
internal_procs_init (Gimp *gimp,
@ -84,112 +84,112 @@ internal_procs_init (Gimp *gimp,
(* status_callback) (NULL, _("Brushes"), 0.009);
register_brushes_procs (gimp);
(* status_callback) (NULL, _("Channel"), 0.04);
(* status_callback) (NULL, _("Channel"), 0.041);
register_channel_procs (gimp);
(* status_callback) (NULL, _("Color"), 0.085);
(* status_callback) (NULL, _("Color"), 0.07);
register_color_procs (gimp);
(* status_callback) (NULL, _("Convert"), 0.123);
(* status_callback) (NULL, _("Convert"), 0.107);
register_convert_procs (gimp);
(* status_callback) (NULL, _("Display procedures"), 0.131);
(* status_callback) (NULL, _("Display procedures"), 0.116);
register_display_procs (gimp);
(* status_callback) (NULL, _("Drawable procedures"), 0.142);
(* status_callback) (NULL, _("Drawable procedures"), 0.128);
register_drawable_procs (gimp);
(* status_callback) (NULL, _("Edit procedures"), 0.208);
(* status_callback) (NULL, _("Edit procedures"), 0.212);
register_edit_procs (gimp);
(* status_callback) (NULL, _("File Operations"), 0.225);
(* status_callback) (NULL, _("File Operations"), 0.229);
register_fileops_procs (gimp);
(* status_callback) (NULL, _("Floating selections"), 0.248);
(* status_callback) (NULL, _("Floating selections"), 0.252);
register_floating_sel_procs (gimp);
(* status_callback) (NULL, _("Font UI"), 0.265);
(* status_callback) (NULL, _("Font UI"), 0.27);
register_font_select_procs (gimp);
(* status_callback) (NULL, _("Fonts"), 0.274);
(* status_callback) (NULL, _("Fonts"), 0.278);
register_fonts_procs (gimp);
(* status_callback) (NULL, _("Gimprc procedures"), 0.279);
(* status_callback) (NULL, _("Gimprc procedures"), 0.284);
register_gimprc_procs (gimp);
(* status_callback) (NULL, _("Gradient UI"), 0.296);
(* status_callback) (NULL, _("Gradient UI"), 0.301);
register_gradient_select_procs (gimp);
(* status_callback) (NULL, _("Gradients"), 0.305);
(* status_callback) (NULL, _("Gradients"), 0.31);
register_gradients_procs (gimp);
(* status_callback) (NULL, _("Guide procedures"), 0.325);
(* status_callback) (NULL, _("Guide procedures"), 0.33);
register_guides_procs (gimp);
(* status_callback) (NULL, _("Help procedures"), 0.342);
(* status_callback) (NULL, _("Help procedures"), 0.348);
register_help_procs (gimp);
(* status_callback) (NULL, _("Image"), 0.345);
(* status_callback) (NULL, _("Image"), 0.351);
register_image_procs (gimp);
(* status_callback) (NULL, _("Layer"), 0.527);
(* status_callback) (NULL, _("Layer"), 0.536);
register_layer_procs (gimp);
(* status_callback) (NULL, _("Message procedures"), 0.621);
(* status_callback) (NULL, _("Message procedures"), 0.614);
register_message_procs (gimp);
(* status_callback) (NULL, _("Miscellaneous"), 0.63);
(* status_callback) (NULL, _("Miscellaneous"), 0.623);
register_misc_procs (gimp);
(* status_callback) (NULL, _("Misc Tool procedures"), 0.635);
(* status_callback) (NULL, _("Misc Tool procedures"), 0.629);
register_misc_tools_procs (gimp);
(* status_callback) (NULL, _("Paint Tool procedures"), 0.644);
(* status_callback) (NULL, _("Paint Tool procedures"), 0.638);
register_paint_tools_procs (gimp);
(* status_callback) (NULL, _("Palette"), 0.687);
(* status_callback) (NULL, _("Palette"), 0.681);
register_palette_procs (gimp);
(* status_callback) (NULL, _("Palette UI"), 0.704);
(* status_callback) (NULL, _("Palette UI"), 0.699);
register_palette_select_procs (gimp);
(* status_callback) (NULL, _("Palettes"), 0.712);
(* status_callback) (NULL, _("Palettes"), 0.707);
register_palettes_procs (gimp);
(* status_callback) (NULL, _("Parasite procedures"), 0.726);
(* status_callback) (NULL, _("Parasite procedures"), 0.722);
register_parasite_procs (gimp);
(* status_callback) (NULL, _("Paths"), 0.761);
(* status_callback) (NULL, _("Paths"), 0.757);
register_paths_procs (gimp);
(* status_callback) (NULL, _("Pattern UI"), 0.803);
(* status_callback) (NULL, _("Pattern UI"), 0.8);
register_pattern_select_procs (gimp);
(* status_callback) (NULL, _("Patterns"), 0.812);
(* status_callback) (NULL, _("Patterns"), 0.809);
register_patterns_procs (gimp);
(* status_callback) (NULL, _("Plug-in"), 0.826);
(* status_callback) (NULL, _("Plug-in"), 0.823);
register_plug_in_procs (gimp);
(* status_callback) (NULL, _("Procedural database"), 0.843);
(* status_callback) (NULL, _("Procedural database"), 0.841);
register_procedural_db_procs (gimp);
(* status_callback) (NULL, _("Image mask"), 0.866);
(* status_callback) (NULL, _("Image mask"), 0.864);
register_selection_procs (gimp);
(* status_callback) (NULL, _("Selection Tool procedures"), 0.917);
(* status_callback) (NULL, _("Selection Tool procedures"), 0.916);
register_selection_tools_procs (gimp);
(* status_callback) (NULL, _("Text procedures"), 0.932);
(* status_callback) (NULL, _("Text procedures"), 0.93);
register_text_tool_procs (gimp);
(* status_callback) (NULL, _("Transform Tool procedures"), 0.943);
(* status_callback) (NULL, _("Transform Tool procedures"), 0.942);
register_transform_tools_procs (gimp);
(* status_callback) (NULL, _("Undo"), 0.96);
(* status_callback) (NULL, _("Undo"), 0.959);
register_undo_procs (gimp);
(* status_callback) (NULL, _("Units"), 0.966);
(* status_callback) (NULL, _("Units"), 0.965);
register_unit_procs (gimp);
}

View file

@ -53,10 +53,6 @@ static ProcRecord layer_set_offsets_proc;
static ProcRecord layer_mask_proc;
static ProcRecord layer_is_floating_sel_proc;
static ProcRecord layer_new_from_drawable_proc;
static ProcRecord layer_get_name_proc;
static ProcRecord layer_set_name_proc;
static ProcRecord layer_get_visible_proc;
static ProcRecord layer_set_visible_proc;
static ProcRecord layer_get_preserve_trans_proc;
static ProcRecord layer_set_preserve_trans_proc;
static ProcRecord layer_get_apply_mask_proc;
@ -71,8 +67,6 @@ static ProcRecord layer_get_mode_proc;
static ProcRecord layer_set_mode_proc;
static ProcRecord layer_get_linked_proc;
static ProcRecord layer_set_linked_proc;
static ProcRecord layer_get_tattoo_proc;
static ProcRecord layer_set_tattoo_proc;
void
register_layer_procs (Gimp *gimp)
@ -90,10 +84,6 @@ register_layer_procs (Gimp *gimp)
procedural_db_register (gimp, &layer_mask_proc);
procedural_db_register (gimp, &layer_is_floating_sel_proc);
procedural_db_register (gimp, &layer_new_from_drawable_proc);
procedural_db_register (gimp, &layer_get_name_proc);
procedural_db_register (gimp, &layer_set_name_proc);
procedural_db_register (gimp, &layer_get_visible_proc);
procedural_db_register (gimp, &layer_set_visible_proc);
procedural_db_register (gimp, &layer_get_preserve_trans_proc);
procedural_db_register (gimp, &layer_set_preserve_trans_proc);
procedural_db_register (gimp, &layer_get_apply_mask_proc);
@ -108,8 +98,6 @@ register_layer_procs (Gimp *gimp)
procedural_db_register (gimp, &layer_set_mode_proc);
procedural_db_register (gimp, &layer_get_linked_proc);
procedural_db_register (gimp, &layer_set_linked_proc);
procedural_db_register (gimp, &layer_get_tattoo_proc);
procedural_db_register (gimp, &layer_set_tattoo_proc);
}
static Argument *
@ -1071,216 +1059,6 @@ static ProcRecord layer_new_from_drawable_proc =
{ { layer_new_from_drawable_invoker } }
};
static Argument *
layer_get_name_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_name_proc, success);
if (success)
return_args[1].value.pdb_pointer = g_strdup (gimp_object_get_name (GIMP_OBJECT (layer)));
return return_args;
}
static ProcArg layer_get_name_inargs[] =
{
{
GIMP_PDB_LAYER,
"layer",
"The layer"
}
};
static ProcArg layer_get_name_outargs[] =
{
{
GIMP_PDB_STRING,
"name",
"The layer name"
}
};
static ProcRecord layer_get_name_proc =
{
"gimp_layer_get_name",
"Get the name of the specified layer.",
"This procedure returns the specified layer's name.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
layer_get_name_inargs,
1,
layer_get_name_outargs,
{ { layer_get_name_invoker } }
};
static Argument *
layer_set_name_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gchar *name;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_LAYER (layer))
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
gimp_item_rename (GIMP_ITEM (layer), name);
return procedural_db_return_args (&layer_set_name_proc, success);
}
static ProcArg layer_set_name_inargs[] =
{
{
GIMP_PDB_LAYER,
"layer",
"The layer"
},
{
GIMP_PDB_STRING,
"name",
"The new layer name"
}
};
static ProcRecord layer_set_name_proc =
{
"gimp_layer_set_name",
"Set the name of the specified layer.",
"This procedure sets the specified layer's name.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
2,
layer_set_name_inargs,
0,
NULL,
{ { layer_set_name_invoker } }
};
static Argument *
layer_get_visible_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_visible_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_item_get_visible (GIMP_ITEM (layer));
return return_args;
}
static ProcArg layer_get_visible_inargs[] =
{
{
GIMP_PDB_LAYER,
"layer",
"The layer"
}
};
static ProcArg layer_get_visible_outargs[] =
{
{
GIMP_PDB_INT32,
"visible",
"The layer visibility"
}
};
static ProcRecord layer_get_visible_proc =
{
"gimp_layer_get_visible",
"Get the visibility of the specified layer.",
"This procedure returns the specified layer's visibility.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
layer_get_visible_inargs,
1,
layer_get_visible_outargs,
{ { layer_get_visible_invoker } }
};
static Argument *
layer_set_visible_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean visible;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_LAYER (layer))
success = FALSE;
visible = args[1].value.pdb_int ? TRUE : FALSE;
if (success)
gimp_item_set_visible (GIMP_ITEM (layer), visible, TRUE);
return procedural_db_return_args (&layer_set_visible_proc, success);
}
static ProcArg layer_set_visible_inargs[] =
{
{
GIMP_PDB_LAYER,
"layer",
"The layer"
},
{
GIMP_PDB_INT32,
"visible",
"The new layer visibility"
}
};
static ProcRecord layer_set_visible_proc =
{
"gimp_layer_set_visible",
"Set the visibility of the specified layer.",
"This procedure sets the specified layer's visibility.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
2,
layer_set_visible_inargs,
0,
NULL,
{ { layer_set_visible_invoker } }
};
static Argument *
layer_get_preserve_trans_invoker (Gimp *gimp,
Argument *args)
@ -2012,109 +1790,3 @@ static ProcRecord layer_set_linked_proc =
NULL,
{ { layer_set_linked_invoker } }
};
static Argument *
layer_get_tattoo_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpLayer *layer;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_LAYER (layer))
success = FALSE;
return_args = procedural_db_return_args (&layer_get_tattoo_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_item_get_tattoo (GIMP_ITEM (layer));
return return_args;
}
static ProcArg layer_get_tattoo_inargs[] =
{
{
GIMP_PDB_LAYER,
"layer",
"The layer"
}
};
static ProcArg layer_get_tattoo_outargs[] =
{
{
GIMP_PDB_INT32,
"tattoo",
"The layer tattoo"
}
};
static ProcRecord layer_get_tattoo_proc =
{
"gimp_layer_get_tattoo",
"Get the tattoo of the specified layer.",
"This procedure returns the specified layer's tattoo. A tattoo is a unique and permanent identifier attached to a layer that can be used to uniquely identify a layer within an image even between sessions",
"Jay Cox",
"Jay Cox",
"1998",
GIMP_INTERNAL,
1,
layer_get_tattoo_inargs,
1,
layer_get_tattoo_outargs,
{ { layer_get_tattoo_invoker } }
};
static Argument *
layer_set_tattoo_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gint32 tattoo;
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_LAYER (layer))
success = FALSE;
tattoo = args[1].value.pdb_int;
if (tattoo == 0)
success = FALSE;
if (success)
gimp_item_set_tattoo (GIMP_ITEM (layer), tattoo);
return procedural_db_return_args (&layer_set_tattoo_proc, success);
}
static ProcArg layer_set_tattoo_inargs[] =
{
{
GIMP_PDB_LAYER,
"layer",
"The layer"
},
{
GIMP_PDB_INT32,
"tattoo",
"The new layer tattoo"
}
};
static ProcRecord layer_set_tattoo_proc =
{
"gimp_layer_set_tattoo",
"Set the tattoo of the specified layer.",
"This procedure sets the specified layer's tattoo. A tattoo is a unique and permanent identifier attached to a layer that can be used to uniquely identify a layer within an image even between sessions",
"Jay Cox",
"Jay Cox",
"1998",
GIMP_INTERNAL,
2,
layer_set_tattoo_inargs,
0,
NULL,
{ { layer_set_tattoo_invoker } }
};

View file

@ -1,3 +1,7 @@
2003-12-03 Michael Natterer <mitch@gimp.org>
* libgimp/libgimp-sections.txt: updated.
2003-11-25 Sven Neumann <sven@gimp.org>
* libgimpbase/libgimpbase-sections.txt

View file

@ -126,18 +126,12 @@ gimp_brushes_set_popup
gimp_channel_new
gimp_channel_copy
gimp_channel_delete
gimp_channel_get_name
gimp_channel_set_name
gimp_channel_get_visible
gimp_channel_set_visible
gimp_channel_get_show_masked
gimp_channel_set_show_masked
gimp_channel_get_opacity
gimp_channel_set_opacity
gimp_channel_get_color
gimp_channel_set_color
gimp_channel_get_tattoo
gimp_channel_set_tattoo
gimp_channel_get_image_id
gimp_channel_combine_masks
</SECTION>
@ -181,10 +175,15 @@ gimp_drawable_get
gimp_drawable_detach
gimp_drawable_flush
gimp_drawable_delete
gimp_drawable_name
gimp_drawable_visible
gimp_drawable_get_name
gimp_drawable_set_name
gimp_drawable_get_visible
gimp_drawable_set_visible
gimp_drawable_get_tattoo
gimp_drawable_set_tattoo
gimp_drawable_get_pixel
gimp_drawable_set_pixel
gimp_drawable_set_image
gimp_drawable_get_tile
gimp_drawable_get_tile2
gimp_drawable_get_thumbnail_data
@ -398,10 +397,6 @@ gimp_layer_add_alpha
gimp_layer_set_offsets
gimp_layer_mask
gimp_layer_new_from_drawable
gimp_layer_get_name
gimp_layer_set_name
gimp_layer_get_visible
gimp_layer_set_visible
gimp_layer_get_preserve_trans
gimp_layer_set_preserve_trans
gimp_layer_get_apply_mask
@ -416,8 +411,6 @@ gimp_layer_get_mode
gimp_layer_set_mode
gimp_layer_get_linked
gimp_layer_set_linked
gimp_layer_get_tattoo
gimp_layer_set_tattoo
gimp_layer_get_mask_id
gimp_layer_get_image_id
gimp_layer_is_floating_sel

View file

@ -46,44 +46,6 @@ Functions for manipulating channels.
@Returns:
<!-- ##### FUNCTION gimp_channel_get_name ##### -->
<para>
</para>
@channel_ID:
@Returns:
<!-- ##### FUNCTION gimp_channel_set_name ##### -->
<para>
</para>
@channel_ID:
@name:
@Returns:
<!-- ##### FUNCTION gimp_channel_get_visible ##### -->
<para>
</para>
@channel_ID:
@Returns:
<!-- ##### FUNCTION gimp_channel_set_visible ##### -->
<para>
</para>
@channel_ID:
@visible:
@Returns:
<!-- ##### FUNCTION gimp_channel_get_show_masked ##### -->
<para>
@ -142,25 +104,6 @@ Functions for manipulating channels.
@Returns:
<!-- ##### FUNCTION gimp_channel_get_tattoo ##### -->
<para>
</para>
@channel_ID:
@Returns:
<!-- ##### FUNCTION gimp_channel_set_tattoo ##### -->
<para>
</para>
@channel_ID:
@tattoo:
@Returns:
<!-- ##### MACRO gimp_channel_get_image_id ##### -->
<para>

View file

@ -62,16 +62,7 @@ Functions to manipulate drawables.
@drawable:
<!-- ##### FUNCTION gimp_drawable_name ##### -->
<para>
</para>
@drawable_ID:
@Returns:
<!-- ##### FUNCTION gimp_drawable_visible ##### -->
<!-- ##### FUNCTION gimp_drawable_get_name ##### -->
<para>
</para>
@ -87,6 +78,16 @@ Functions to manipulate drawables.
@drawable_ID:
@name:
@Returns:
<!-- ##### FUNCTION gimp_drawable_get_visible ##### -->
<para>
</para>
@drawable_ID:
@Returns:
<!-- ##### FUNCTION gimp_drawable_set_visible ##### -->
@ -96,6 +97,61 @@ Functions to manipulate drawables.
@drawable_ID:
@visible:
@Returns:
<!-- ##### FUNCTION gimp_drawable_get_tattoo ##### -->
<para>
</para>
@drawable_ID:
@Returns:
<!-- ##### FUNCTION gimp_drawable_set_tattoo ##### -->
<para>
</para>
@drawable_ID:
@tattoo:
@Returns:
<!-- ##### FUNCTION gimp_drawable_get_pixel ##### -->
<para>
</para>
@drawable_ID:
@x_coord:
@y_coord:
@num_channels:
@Returns:
<!-- ##### FUNCTION gimp_drawable_set_pixel ##### -->
<para>
</para>
@drawable_ID:
@x_coord:
@y_coord:
@num_channels:
@pixel:
@Returns:
<!-- ##### FUNCTION gimp_drawable_set_image ##### -->
<para>
</para>
@drawable_ID:
@image_ID:
@Returns:
<!-- ##### FUNCTION gimp_drawable_get_tile ##### -->

View file

@ -142,44 +142,6 @@ Operations on single layers.
@Returns:
<!-- ##### FUNCTION gimp_layer_get_name ##### -->
<para>
</para>
@layer_ID:
@Returns:
<!-- ##### FUNCTION gimp_layer_set_name ##### -->
<para>
</para>
@layer_ID:
@name:
@Returns:
<!-- ##### FUNCTION gimp_layer_get_visible ##### -->
<para>
</para>
@layer_ID:
@Returns:
<!-- ##### FUNCTION gimp_layer_set_visible ##### -->
<para>
</para>
@layer_ID:
@visible:
@Returns:
<!-- ##### FUNCTION gimp_layer_get_preserve_trans ##### -->
<para>
@ -313,25 +275,6 @@ Operations on single layers.
@Returns:
<!-- ##### FUNCTION gimp_layer_get_tattoo ##### -->
<para>
</para>
@layer_ID:
@Returns:
<!-- ##### FUNCTION gimp_layer_set_tattoo ##### -->
<para>
</para>
@layer_ID:
@tattoo:
@Returns:
<!-- ##### MACRO gimp_layer_get_mask_id ##### -->
<para>

View file

@ -181,130 +181,6 @@ gimp_channel_combine_masks (gint32 channel1_ID,
return success;
}
/**
* gimp_channel_get_name:
* @channel_ID: The channel.
*
* Get the name of the specified channel.
*
* This procedure returns the specified channel's name.
*
* Returns: The channel name.
*/
gchar *
gimp_channel_get_name (gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gchar *name = NULL;
return_vals = gimp_run_procedure ("gimp_channel_get_name",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
name = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return name;
}
/**
* gimp_channel_set_name:
* @channel_ID: The channel.
* @name: The new channel name.
*
* Set the name of the specified channel.
*
* This procedure sets the specified channel's name.
*
* Returns: TRUE on success.
*/
gboolean
gimp_channel_set_name (gint32 channel_ID,
const gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_set_name",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_channel_get_visible:
* @channel_ID: The channel.
*
* Get the visibility of the specified channel.
*
* This procedure returns the specified channel's visibility.
*
* Returns: The channel visibility.
*/
gboolean
gimp_channel_get_visible (gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean visible = FALSE;
return_vals = gimp_run_procedure ("gimp_channel_get_visible",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
visible = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return visible;
}
/**
* gimp_channel_set_visible:
* @channel_ID: The channel.
* @visible: The new channel visibility.
*
* Set the visibility of the specified channel.
*
* This procedure sets the specified channel's visibility.
*
* Returns: TRUE on success.
*/
gboolean
gimp_channel_set_visible (gint32 channel_ID,
gboolean visible)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_set_visible",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_INT32, visible,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_channel_get_show_masked:
* @channel_ID: The channel.
@ -499,71 +375,3 @@ gimp_channel_set_color (gint32 channel_ID,
return success;
}
/**
* gimp_channel_get_tattoo:
* @channel_ID: The channel.
*
* Get the tattoo of the specified channel.
*
* This procedure returns the specified channel's tattoo. A tattoo is a
* unique and permanent identifier attached to a channel that can be
* used to uniquely identify a channel within an image even between
* sessions.
*
* Returns: The channel tattoo.
*/
gint
gimp_channel_get_tattoo (gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint tattoo = 0;
return_vals = gimp_run_procedure ("gimp_channel_get_tattoo",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
tattoo = return_vals[1].data.d_tattoo;
gimp_destroy_params (return_vals, nreturn_vals);
return tattoo;
}
/**
* gimp_channel_set_tattoo:
* @channel_ID: The channel.
* @tattoo: The new channel tattoo.
*
* Set the tattoo of the specified channel.
*
* This procedure sets the specified channel's tattoo. A tattoo is a
* unique and permanent identifier attached to a channel that can be
* used to uniquely identify a channel within an image even between
* sessions.
*
* Returns: TRUE on success.
*/
gboolean
gimp_channel_set_tattoo (gint32 channel_ID,
gint tattoo)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_set_tattoo",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_INT32, tattoo,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}

View file

@ -42,12 +42,6 @@ gboolean gimp_channel_combine_masks (gint32 channel1_ID,
GimpChannelOps operation,
gint offx,
gint offy);
gchar* gimp_channel_get_name (gint32 channel_ID);
gboolean gimp_channel_set_name (gint32 channel_ID,
const gchar *name);
gboolean gimp_channel_get_visible (gint32 channel_ID);
gboolean gimp_channel_set_visible (gint32 channel_ID,
gboolean visible);
gboolean gimp_channel_get_show_masked (gint32 channel_ID);
gboolean gimp_channel_set_show_masked (gint32 channel_ID,
gboolean show_masked);
@ -58,9 +52,6 @@ gboolean gimp_channel_get_color (gint32 channel_ID,
GimpRGB *color);
gboolean gimp_channel_set_color (gint32 channel_ID,
const GimpRGB *color);
gint gimp_channel_get_tattoo (gint32 channel_ID);
gboolean gimp_channel_set_tattoo (gint32 channel_ID,
gint tattoo);
G_END_DECLS

View file

@ -44,6 +44,23 @@ G_BEGIN_DECLS
#define gimp_crop gimp_image_crop
#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
#define gimp_channel_set_visible gimp_drawable_set_visible
#define gimp_channel_get_tattoo gimp_drawable_get_tattoo
#define gimp_channel_set_tattoo gimp_drawable_set_tattoo
#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
#define gimp_layer_set_visible gimp_drawable_set_visible
#define gimp_layer_get_tattoo gimp_drawable_get_tattoo
#define gimp_layer_set_tattoo gimp_drawable_set_tattoo
#define gimp_drawable_name gimp_drawable_get_name
#define gimp_drawable_visible gimp_drawable_get_visible
#define gimp_gradients_get_active gimp_gradients_get_gradient
#define gimp_gradients_set_active gimp_gradients_set_gradient

View file

@ -103,44 +103,6 @@ gimp_drawable_delete (GimpDrawable *drawable)
}
}
gchar *
gimp_drawable_name (gint32 drawable_ID)
{
if (gimp_drawable_is_layer (drawable_ID))
return gimp_layer_get_name (drawable_ID);
return gimp_channel_get_name (drawable_ID);
}
gboolean
gimp_drawable_visible (gint32 drawable_ID)
{
if (gimp_drawable_is_layer (drawable_ID))
return gimp_layer_get_visible (drawable_ID);
return gimp_channel_get_visible (drawable_ID);
}
void
gimp_drawable_set_name (gint32 drawable_ID,
const gchar *name)
{
if (gimp_drawable_is_layer (drawable_ID))
gimp_layer_set_name (drawable_ID, name);
else
gimp_channel_set_name (drawable_ID, name);
}
void
gimp_drawable_set_visible (gint32 drawable_ID,
gboolean visible)
{
if (gimp_drawable_is_layer (drawable_ID))
gimp_layer_set_visible (drawable_ID, visible);
else
gimp_channel_set_visible (drawable_ID, visible);
}
GimpTile *
gimp_drawable_get_tile (GimpDrawable *drawable,
gboolean shadow,
@ -262,9 +224,9 @@ gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
*/
void
gimp_drawable_attach_new_parasite (gint32 drawable_ID,
const gchar *name,
const gchar *name,
gint flags,
gint size,
gint size,
gconstpointer data)
{
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);

View file

@ -7,17 +7,17 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_DRAWABLE_H__
#define __GIMP_DRAWABLE_H__
@ -47,12 +47,6 @@ 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);
gchar * gimp_drawable_name (gint32 drawable_ID);
gboolean gimp_drawable_visible (gint32 drawable_ID);
void gimp_drawable_set_name (gint32 drawable_ID,
const gchar *name);
void gimp_drawable_set_visible (gint32 drawable_ID,
gboolean visible);
GimpTile * gimp_drawable_get_tile (GimpDrawable *drawable,
gint shadow,
gint row,
@ -68,9 +62,9 @@ guchar * gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
gint *bpp);
void gimp_drawable_attach_new_parasite (gint32 drawable_ID,
const gchar *name,
const gchar *name,
gint flags,
gint size,
gint size,
gconstpointer data);
G_END_DECLS

View file

@ -644,6 +644,323 @@ gimp_drawable_is_channel (gint32 drawable_ID)
return channel;
}
/**
* gimp_drawable_get_name:
* @drawable_ID: The drawable.
*
* Get the name of the specified drawable.
*
* This procedure returns the specified drawable's name.
*
* Returns: The drawable name.
*/
gchar *
gimp_drawable_get_name (gint32 drawable_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gchar *name = NULL;
return_vals = gimp_run_procedure ("gimp_drawable_get_name",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
name = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return name;
}
/**
* gimp_drawable_set_name:
* @drawable_ID: The drawable.
* @name: The new drawable name.
*
* Set the name of the specified drawable.
*
* This procedure sets the specified drawable's name.
*
* Returns: TRUE on success.
*/
gboolean
gimp_drawable_set_name (gint32 drawable_ID,
const gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_drawable_set_name",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_drawable_get_visible:
* @drawable_ID: The drawable.
*
* Get the visibility of the specified drawable.
*
* This procedure returns the specified drawable's visibility.
*
* Returns: The drawable visibility.
*/
gboolean
gimp_drawable_get_visible (gint32 drawable_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean visible = FALSE;
return_vals = gimp_run_procedure ("gimp_drawable_get_visible",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
visible = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return visible;
}
/**
* gimp_drawable_set_visible:
* @drawable_ID: The drawable.
* @visible: The new drawable visibility.
*
* Set the visibility of the specified drawable.
*
* This procedure sets the specified drawable's visibility.
*
* Returns: TRUE on success.
*/
gboolean
gimp_drawable_set_visible (gint32 drawable_ID,
gboolean visible)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_drawable_set_visible",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_INT32, visible,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_drawable_get_tattoo:
* @drawable_ID: The drawable.
*
* Get the tattoo of the specified drawable.
*
* This procedure returns the specified drawable's tattoo. A tattoo is
* a unique and permanent identifier attached to a drawable that can be
* used to uniquely identify a drawable within an image even between
* sessions
*
* Returns: The drawable tattoo.
*/
gint
gimp_drawable_get_tattoo (gint32 drawable_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint tattoo = 0;
return_vals = gimp_run_procedure ("gimp_drawable_get_tattoo",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
tattoo = return_vals[1].data.d_tattoo;
gimp_destroy_params (return_vals, nreturn_vals);
return tattoo;
}
/**
* gimp_drawable_set_tattoo:
* @drawable_ID: The drawable.
* @tattoo: The new drawable tattoo.
*
* Set the tattoo of the specified drawable.
*
* This procedure sets the specified drawable's tattoo. A tattoo is a
* unique and permanent identifier attached to a drawable that can be
* used to uniquely identify a drawable within an image even between
* sessions
*
* Returns: TRUE on success.
*/
gboolean
gimp_drawable_set_tattoo (gint32 drawable_ID,
gint tattoo)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_drawable_set_tattoo",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_INT32, tattoo,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_drawable_get_pixel:
* @drawable_ID: The drawable.
* @x_coord: The x coordinate.
* @y_coord: The y coordinate.
* @num_channels: The number of channels for the pixel.
*
* Gets the value of the pixel at the specified coordinates.
*
* This procedure gets the pixel value at the specified coordinates.
* The 'num_channels' argument must always be equal to the
* bytes-per-pixel value for the specified drawable.
*
* Returns: The pixel value.
*/
guint8 *
gimp_drawable_get_pixel (gint32 drawable_ID,
gint x_coord,
gint y_coord,
gint *num_channels)
{
GimpParam *return_vals;
gint nreturn_vals;
guint8 *pixel = NULL;
return_vals = gimp_run_procedure ("gimp_drawable_get_pixel",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_INT32, x_coord,
GIMP_PDB_INT32, y_coord,
GIMP_PDB_END);
*num_channels = 0;
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
*num_channels = return_vals[1].data.d_int32;
pixel = g_new (guint8, *num_channels);
memcpy (pixel, return_vals[2].data.d_int8array,
*num_channels * sizeof (guint8));
}
gimp_destroy_params (return_vals, nreturn_vals);
return pixel;
}
/**
* gimp_drawable_set_pixel:
* @drawable_ID: The drawable.
* @x_coord: The x coordinate.
* @y_coord: The y coordinate.
* @num_channels: The number of channels for the pixel.
* @pixel: The pixel value.
*
* Sets the value of the pixel at the specified coordinates.
*
* This procedure sets the pixel value at the specified coordinates.
* The 'num_channels' argument must always be equal to the
* bytes-per-pixel value for the spec ified drawable. Note that this
* function is not undoable, you should use it only on drawables you
* just created yourself.
*
* Returns: TRUE on success.
*/
gboolean
gimp_drawable_set_pixel (gint32 drawable_ID,
gint x_coord,
gint y_coord,
gint num_channels,
const guint8 *pixel)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_drawable_set_pixel",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_INT32, x_coord,
GIMP_PDB_INT32, y_coord,
GIMP_PDB_INT32, num_channels,
GIMP_PDB_INT8ARRAY, pixel,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_drawable_set_image:
* @drawable_ID: The drawable.
* @image_ID: The image.
*
* Set image where drawable belongs to.
*
* Set the image the drawable should be a part of (Use this before
* adding a drawable to another image).
*
* Returns: TRUE on success.
*/
gboolean
gimp_drawable_set_image (gint32 drawable_ID,
gint32 image_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_drawable_set_image",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* _gimp_drawable_thumbnail:
* @drawable_ID: The drawable.

View file

@ -59,6 +59,26 @@ gboolean gimp_drawable_offsets (gint32 drawable_ID,
gboolean gimp_drawable_is_layer (gint32 drawable_ID);
gboolean gimp_drawable_is_layer_mask (gint32 drawable_ID);
gboolean gimp_drawable_is_channel (gint32 drawable_ID);
gchar* gimp_drawable_get_name (gint32 drawable_ID);
gboolean gimp_drawable_set_name (gint32 drawable_ID,
const gchar *name);
gboolean gimp_drawable_get_visible (gint32 drawable_ID);
gboolean gimp_drawable_set_visible (gint32 drawable_ID,
gboolean visible);
gint gimp_drawable_get_tattoo (gint32 drawable_ID);
gboolean gimp_drawable_set_tattoo (gint32 drawable_ID,
gint tattoo);
guint8* gimp_drawable_get_pixel (gint32 drawable_ID,
gint x_coord,
gint y_coord,
gint *num_channels);
gboolean gimp_drawable_set_pixel (gint32 drawable_ID,
gint x_coord,
gint y_coord,
gint num_channels,
const guint8 *pixel);
gboolean gimp_drawable_set_image (gint32 drawable_ID,
gint32 image_ID);
gboolean _gimp_drawable_thumbnail (gint32 drawable_ID,
gint width,
gint height,

View file

@ -61,7 +61,7 @@ export_merge (gint32 image_ID,
layers = gimp_image_get_layers (image_ID, &nlayers);
for (i = 0; i < nlayers; i++)
{
if (gimp_drawable_visible (layers[i]))
if (gimp_drawable_get_visible (layers[i]))
nvisible++;
}
@ -701,7 +701,7 @@ gimp_export_image (gint32 *image_ID,
/* If this is the last layer, it's visible and has no alpha
* channel, then the image has a "flat" background
*/
if (i == n_layers - 1 && gimp_layer_get_visible (layers[i]))
if (i == n_layers - 1 && gimp_drawable_get_visible (layers[i]))
background_has_alpha = FALSE;
if (capabilities & GIMP_EXPORT_NEEDS_ALPHA)

View file

@ -518,130 +518,6 @@ gimp_layer_new_from_drawable (gint32 drawable_ID,
return layer_copy_ID;
}
/**
* gimp_layer_get_name:
* @layer_ID: The layer.
*
* Get the name of the specified layer.
*
* This procedure returns the specified layer's name.
*
* Returns: The layer name.
*/
gchar *
gimp_layer_get_name (gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gchar *name = NULL;
return_vals = gimp_run_procedure ("gimp_layer_get_name",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
name = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return name;
}
/**
* gimp_layer_set_name:
* @layer_ID: The layer.
* @name: The new layer name.
*
* Set the name of the specified layer.
*
* This procedure sets the specified layer's name.
*
* Returns: TRUE on success.
*/
gboolean
gimp_layer_set_name (gint32 layer_ID,
const gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_layer_set_name",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_layer_get_visible:
* @layer_ID: The layer.
*
* Get the visibility of the specified layer.
*
* This procedure returns the specified layer's visibility.
*
* Returns: The layer visibility.
*/
gboolean
gimp_layer_get_visible (gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean visible = FALSE;
return_vals = gimp_run_procedure ("gimp_layer_get_visible",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
visible = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return visible;
}
/**
* gimp_layer_set_visible:
* @layer_ID: The layer.
* @visible: The new layer visibility.
*
* Set the visibility of the specified layer.
*
* This procedure sets the specified layer's visibility.
*
* Returns: TRUE on success.
*/
gboolean
gimp_layer_set_visible (gint32 layer_ID,
gboolean visible)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_layer_set_visible",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_INT32, visible,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_layer_get_preserve_trans:
* @layer_ID: The layer.
@ -1091,69 +967,3 @@ gimp_layer_set_linked (gint32 layer_ID,
return success;
}
/**
* gimp_layer_get_tattoo:
* @layer_ID: The layer.
*
* Get the tattoo of the specified layer.
*
* This procedure returns the specified layer's tattoo. A tattoo is a
* unique and permanent identifier attached to a layer that can be used
* to uniquely identify a layer within an image even between sessions
*
* Returns: The layer tattoo.
*/
gint
gimp_layer_get_tattoo (gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint tattoo = 0;
return_vals = gimp_run_procedure ("gimp_layer_get_tattoo",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
tattoo = return_vals[1].data.d_tattoo;
gimp_destroy_params (return_vals, nreturn_vals);
return tattoo;
}
/**
* gimp_layer_set_tattoo:
* @layer_ID: The layer.
* @tattoo: The new layer tattoo.
*
* Set the tattoo of the specified layer.
*
* This procedure sets the specified layer's tattoo. A tattoo is a
* unique and permanent identifier attached to a layer that can be used
* to uniquely identify a layer within an image even between sessions
*
* Returns: TRUE on success.
*/
gboolean
gimp_layer_set_tattoo (gint32 layer_ID,
gint tattoo)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_layer_set_tattoo",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_INT32, tattoo,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}

View file

@ -62,12 +62,6 @@ gint32 gimp_layer_mask (gint32 laye
gboolean gimp_layer_is_floating_sel (gint32 layer_ID);
gint32 gimp_layer_new_from_drawable (gint32 drawable_ID,
gint32 dest_image_ID);
gchar* gimp_layer_get_name (gint32 layer_ID);
gboolean gimp_layer_set_name (gint32 layer_ID,
const gchar *name);
gboolean gimp_layer_get_visible (gint32 layer_ID);
gboolean gimp_layer_set_visible (gint32 layer_ID,
gboolean visible);
gboolean gimp_layer_get_preserve_trans (gint32 layer_ID);
gboolean gimp_layer_set_preserve_trans (gint32 layer_ID,
gboolean preserve_trans);
@ -89,9 +83,6 @@ gboolean gimp_layer_set_mode (gint32 laye
gboolean gimp_layer_get_linked (gint32 layer_ID);
gboolean gimp_layer_set_linked (gint32 layer_ID,
gboolean linked);
gint gimp_layer_get_tattoo (gint32 layer_ID);
gboolean gimp_layer_set_tattoo (gint32 layer_ID,
gint tattoo);
G_END_DECLS

View file

@ -145,7 +145,7 @@ gimp_layer_menu_new (GimpConstraintFunc constraint,
for (j = 0; j < n_layers; j++)
if (! constraint || (* constraint) (images[i], layers[j], data))
{
name = gimp_layer_get_name (layers[j]);
name = gimp_drawable_get_name (layers[j]);
gimp_menu_add_item (menu, image_label, name, layers[j]);
g_free (name);
@ -212,7 +212,7 @@ gimp_channel_menu_new (GimpConstraintFunc constraint,
for (j = 0; j < n_channels; j++)
if (! constraint || (* constraint) (images[i], channels[j], data))
{
name = gimp_channel_get_name (channels[j]);
name = gimp_drawable_get_name (channels[j]);
gimp_menu_add_item (menu, image_label, name, channels[j]);
g_free (name);
@ -279,7 +279,7 @@ gimp_drawable_menu_new (GimpConstraintFunc constraint,
for (j = 0; j < n_layers; j++)
if (! constraint || (* constraint) (images[i], layers[j], data))
{
name = gimp_layer_get_name (layers[j]);
name = gimp_drawable_get_name (layers[j]);
gimp_menu_add_item (menu, image_label, name, layers[j]);
g_free (name);
@ -297,7 +297,7 @@ gimp_drawable_menu_new (GimpConstraintFunc constraint,
for (j = 0; j < n_channels; j++)
if (! constraint || (* constraint) (images[i], channels[j], data))
{
name = gimp_channel_get_name (channels[j]);
name = gimp_drawable_get_name (channels[j]);
gimp_menu_add_item (menu, image_label, name, channels[j]);
g_free (name);

View file

@ -224,14 +224,14 @@ align_layers (gint32 image_id)
for (index = 0; index < layer_num; index++)
{
if (gimp_layer_get_visible (layers[index]))
if (gimp_drawable_get_visible (layers[index]))
visible_layer_num++;
}
if (VALS.ignore_bottom)
{
layer_num--;
if (gimp_layer_get_visible (layers[bg_index]))
if (gimp_drawable_get_visible (layers[bg_index]))
visible_layer_num--;
}
@ -245,7 +245,7 @@ align_layers (gint32 image_id)
/* 0 is the top layer */
for (index = 0; index < layer_num; index++)
{
if (gimp_layer_get_visible (layers[index]))
if (gimp_drawable_get_visible (layers[index]))
{
gimp_drawable_offsets (layers[index], &orig_x, &orig_y);
align_layers_get_align_offsets (layers[index], &offset_x,
@ -288,7 +288,7 @@ align_layers (gint32 image_id)
for (vindex = -1, index = 0; index < layer_num; index++)
{
if (gimp_layer_get_visible (layers[index]))
if (gimp_drawable_get_visible (layers[index]))
vindex++;
else
continue;

View file

@ -1427,7 +1427,7 @@ get_frame_disposal (const guint whichframe)
gchar* layer_name;
DisposeType disposal;
layer_name = gimp_layer_get_name(layers[total_frames-(whichframe+1)]);
layer_name = gimp_drawable_get_name(layers[total_frames-(whichframe+1)]);
disposal = parse_disposal_tag(layer_name);
g_free(layer_name);
@ -1442,7 +1442,7 @@ get_frame_duration (const guint whichframe)
gchar* layer_name;
gint duration = 0;
layer_name = gimp_layer_get_name(layers[total_frames-(whichframe+1)]);
layer_name = gimp_drawable_get_name(layers[total_frames-(whichframe+1)]);
if (layer_name != NULL)
{
duration = parse_ms_tag(layer_name);

View file

@ -1051,7 +1051,7 @@ do_optimizations (GimpRunMode run_mode,
*/
oldlayer_name =
gimp_layer_get_name(layers[total_frames-(this_frame_num+1)]);
gimp_drawable_get_name(layers[total_frames-(this_frame_num+1)]);
buflen = strlen(oldlayer_name) + 40;
@ -1079,7 +1079,7 @@ do_optimizations (GimpRunMode run_mode,
g_free (newlayer_name);
oldlayer_name = gimp_layer_get_name (last_true_frame);
oldlayer_name = gimp_drawable_get_name (last_true_frame);
buflen = strlen (oldlayer_name) + 40;
@ -1097,7 +1097,7 @@ do_optimizations (GimpRunMode run_mode,
(this_frame_num == 0) ? "" :
can_combine ? "(combine)" : "(replace)");
gimp_layer_set_name (last_true_frame, newlayer_name);
gimp_drawable_set_name (last_true_frame, newlayer_name);
g_free (newlayer_name);
}
@ -1106,13 +1106,13 @@ do_optimizations (GimpRunMode run_mode,
cumulated_delay = this_delay;
last_true_frame =
new_layer_id = gimp_layer_new(new_image_id,
newlayer_name,
bbox_right-bbox_left,
bbox_bottom-bbox_top,
drawabletype_alpha,
100.0,
GIMP_NORMAL_MODE);
new_layer_id = gimp_layer_new (new_image_id,
newlayer_name,
bbox_right-bbox_left,
bbox_bottom-bbox_top,
drawabletype_alpha,
100.0,
GIMP_NORMAL_MODE);
g_free (newlayer_name);
gimp_image_add_layer (new_image_id, new_layer_id, 0);
@ -1170,7 +1170,7 @@ get_frame_disposal (guint whichframe)
gchar *layer_name;
DisposeType disposal;
layer_name = gimp_layer_get_name(layers[total_frames-(whichframe+1)]);
layer_name = gimp_drawable_get_name(layers[total_frames-(whichframe+1)]);
disposal = parse_disposal_tag(layer_name);
g_free(layer_name);
@ -1185,7 +1185,7 @@ get_frame_duration (guint whichframe)
gchar* layer_name;
gint duration = 0;
layer_name = gimp_layer_get_name(layers[total_frames-(whichframe+1)]);
layer_name = gimp_drawable_get_name(layers[total_frames-(whichframe+1)]);
if (layer_name != NULL)
{
duration = parse_ms_tag(layer_name);

View file

@ -2734,41 +2734,41 @@ p_add_layer (gint width,
stack_position = 0; /* TODO: should be same as src_layer */
/* copy type, name, opacity and mode from src_drawable */
l_type = gimp_drawable_type(src_drawable->drawable_id);
l_visible = gimp_layer_get_visible(src_drawable->drawable_id);
l_type = gimp_drawable_type (src_drawable->drawable_id);
l_visible = gimp_drawable_get_visible (src_drawable->drawable_id);
l_name2 = gimp_layer_get_name(src_drawable->drawable_id);
l_name = g_strdup_printf("%s_b", l_name2);
g_free(l_name2);
l_name2 = gimp_drawable_get_name (src_drawable->drawable_id);
l_name = g_strdup_printf ("%s_b", l_name2);
g_free (l_name2);
l_mode = gimp_layer_get_mode(src_drawable->drawable_id);
l_opacity = gimp_layer_get_opacity(src_drawable->drawable_id); /* full opacity */
l_mode = gimp_layer_get_mode (src_drawable->drawable_id);
l_opacity = gimp_layer_get_opacity (src_drawable->drawable_id); /* full opacity */
l_new_layer_id = gimp_layer_new(image_id, l_name,
width, height,
l_type,
l_opacity,
l_mode);
l_new_layer_id = gimp_layer_new (image_id, l_name,
width, height,
l_type,
l_opacity,
l_mode);
g_free (l_name);
if (!gimp_drawable_has_alpha(l_new_layer_id))
{
/* always add alpha channel */
gimp_layer_add_alpha(l_new_layer_id);
}
if (!gimp_drawable_has_alpha (l_new_layer_id))
{
/* always add alpha channel */
gimp_layer_add_alpha (l_new_layer_id);
}
l_new_drawable = gimp_drawable_get (l_new_layer_id);
if (!l_new_drawable)
{
fprintf(stderr, "p_ad_layer: cant get new_drawable\n");
return NULL;
}
{
fprintf (stderr, "p_ad_layer: cant get new_drawable\n");
return NULL;
}
/* add the copied layer to the temp. working image */
gimp_image_add_layer (image_id, l_new_layer_id, stack_position);
/* copy visiblity state */
gimp_layer_set_visible(l_new_layer_id, l_visible);
gimp_drawable_set_visible (l_new_layer_id, l_visible);
return l_new_drawable;
}
@ -2790,91 +2790,91 @@ p_bender_calculate_iter_curve (BenderDialog *cd,
l_outline = cd->outline;
if((cd->bval_from == NULL) || (cd->bval_to == NULL) || (cd->bval_curr == NULL))
{
if(gb_debug) printf("p_bender_calculate_iter_curve NORMAL1\n");
if (cd->curve_type == SMOOTH)
if ((cd->bval_from == NULL) ||
(cd->bval_to == NULL) ||
(cd->bval_curr == NULL))
{
cd->outline = OUTLINE_UPPER;
bender_calculate_curve (cd, xmax, ymax, FALSE);
cd->outline = OUTLINE_LOWER;
bender_calculate_curve (cd, xmax, ymax, FALSE);
if(gb_debug) printf("p_bender_calculate_iter_curve NORMAL1\n");
if (cd->curve_type == SMOOTH)
{
cd->outline = OUTLINE_UPPER;
bender_calculate_curve (cd, xmax, ymax, FALSE);
cd->outline = OUTLINE_LOWER;
bender_calculate_curve (cd, xmax, ymax, FALSE);
}
else
{
p_stretch_curves(cd, xmax, ymax);
}
}
else
{
p_stretch_curves(cd, xmax, ymax);
}
}
else
{
/* compose curves by iterating between FROM/TO values */
if(gb_debug) printf("p_bender_calculate_iter_curve ITERmode 1\n");
/* init FROM curves */
cd_from = g_new (BenderDialog, 1);
p_cd_from_bval(cd_from, cd->bval_from);
cd_from->curve_ptr[OUTLINE_UPPER] = g_new (gint32, 1+xmax);
cd_from->curve_ptr[OUTLINE_LOWER] = g_new (gint32, 1+xmax);
/* init TO curves */
cd_to = g_new (BenderDialog, 1);
p_cd_from_bval(cd_to, cd->bval_to);
cd_to->curve_ptr[OUTLINE_UPPER] = g_new (gint32, 1+xmax);
cd_to->curve_ptr[OUTLINE_LOWER] = g_new (gint32, 1+xmax);
if (cd_from->curve_type == SMOOTH)
{
/* calculate FROM curves */
cd_from->outline = OUTLINE_UPPER;
bender_calculate_curve (cd_from, xmax, ymax, FALSE);
cd_from->outline = OUTLINE_LOWER;
bender_calculate_curve (cd_from, xmax, ymax, FALSE);
/* compose curves by iterating between FROM/TO values */
if(gb_debug) printf ("p_bender_calculate_iter_curve ITERmode 1\n");
/* init FROM curves */
cd_from = g_new (BenderDialog, 1);
p_cd_from_bval (cd_from, cd->bval_from);
cd_from->curve_ptr[OUTLINE_UPPER] = g_new (gint32, 1+xmax);
cd_from->curve_ptr[OUTLINE_LOWER] = g_new (gint32, 1+xmax);
/* init TO curves */
cd_to = g_new (BenderDialog, 1);
p_cd_from_bval (cd_to, cd->bval_to);
cd_to->curve_ptr[OUTLINE_UPPER] = g_new (gint32, 1+xmax);
cd_to->curve_ptr[OUTLINE_LOWER] = g_new (gint32, 1+xmax);
if (cd_from->curve_type == SMOOTH)
{
/* calculate FROM curves */
cd_from->outline = OUTLINE_UPPER;
bender_calculate_curve (cd_from, xmax, ymax, FALSE);
cd_from->outline = OUTLINE_LOWER;
bender_calculate_curve (cd_from, xmax, ymax, FALSE);
}
else
{
p_stretch_curves (cd_from, xmax, ymax);
}
if (cd_to->curve_type == SMOOTH)
{
/* calculate TO curves */
cd_to->outline = OUTLINE_UPPER;
bender_calculate_curve (cd_to, xmax, ymax, FALSE);
cd_to->outline = OUTLINE_LOWER;
bender_calculate_curve (cd_to, xmax, ymax, FALSE);
}
else
{
p_stretch_curves (cd_to, xmax, ymax);
}
/* MIX Y-koords of the curves according to current iteration step */
for (l_x = 0; l_x <= xmax; l_x++)
{
p_delta_gint32 (&cd->curve_ptr[OUTLINE_UPPER][l_x],
cd_from->curve_ptr[OUTLINE_UPPER][l_x],
cd_to->curve_ptr[OUTLINE_UPPER][l_x],
cd->bval_curr->total_steps,
cd->bval_curr->current_step);
p_delta_gint32 (&cd->curve_ptr[OUTLINE_LOWER][l_x],
cd_from->curve_ptr[OUTLINE_LOWER][l_x],
cd_to->curve_ptr[OUTLINE_LOWER][l_x],
cd->bval_curr->total_steps,
cd->bval_curr->current_step);
}
g_free (cd_from->curve_ptr[OUTLINE_UPPER]);
g_free (cd_from->curve_ptr[OUTLINE_LOWER]);
g_free (cd_from);
g_free (cd_to);
}
else
{
p_stretch_curves(cd_from, xmax, ymax);
}
if (cd_to->curve_type == SMOOTH)
{
/* calculate TO curves */
cd_to->outline = OUTLINE_UPPER;
bender_calculate_curve (cd_to, xmax, ymax, FALSE);
cd_to->outline = OUTLINE_LOWER;
bender_calculate_curve (cd_to, xmax, ymax, FALSE);
}
else
{
p_stretch_curves(cd_to, xmax, ymax);
}
/* MIX Y-koords of the curves according to current iteration step */
for(l_x = 0; l_x <= xmax; l_x++)
{
p_delta_gint32(&cd->curve_ptr[OUTLINE_UPPER][l_x],
cd_from->curve_ptr[OUTLINE_UPPER][l_x],
cd_to->curve_ptr[OUTLINE_UPPER][l_x],
cd->bval_curr->total_steps,
cd->bval_curr->current_step);
p_delta_gint32(&cd->curve_ptr[OUTLINE_LOWER][l_x],
cd_from->curve_ptr[OUTLINE_LOWER][l_x],
cd_to->curve_ptr[OUTLINE_LOWER][l_x],
cd->bval_curr->total_steps,
cd->bval_curr->current_step);
}
g_free(cd_from->curve_ptr[OUTLINE_UPPER]);
g_free(cd_from->curve_ptr[OUTLINE_LOWER]);
g_free(cd_from);
g_free(cd_to);
}
cd->outline = l_outline;
} /* end p_bender_calculate_iter_curve */
}
/* ============================================================================
* p_vertical_bend
@ -2886,28 +2886,29 @@ p_vertical_bend (BenderDialog *cd,
t_GDRW *src_gdrw,
t_GDRW *dst_gdrw)
{
gint32 l_row, l_col;
gint32 l_first_row, l_first_col, l_last_row, l_last_col;
gint32 l_x, l_y;
gint32 l_x2, l_y2;
gint32 l_curvy, l_nb_curvy, l_nb2_curvy;
gint32 l_desty, l_othery;
gint32 l_miny, l_maxy;
gint32 l_sign, l_dy, l_diff;
gint32 l_topshift;
float l_progress_step;
float l_progress_max;
float l_progress;
gint32 l_row, l_col;
gint32 l_first_row, l_first_col, l_last_row, l_last_col;
gint32 l_x, l_y;
gint32 l_x2, l_y2;
gint32 l_curvy, l_nb_curvy, l_nb2_curvy;
gint32 l_desty, l_othery;
gint32 l_miny, l_maxy;
gint32 l_sign, l_dy, l_diff;
gint32 l_topshift;
float l_progress_step;
float l_progress_max;
float l_progress;
t_Last *last_arr;
t_Last *first_arr;
guchar color[4];
guchar mixcolor[4];
guchar l_alpha_lo;
gint l_alias_dir;
guchar l_mixmask;
t_Last *last_arr;
t_Last *first_arr;
guchar color[4];
guchar mixcolor[4];
guchar l_alpha_lo;
gint l_alias_dir;
guchar l_mixmask;
l_topshift = p_upper_curve_extend(cd, src_gdrw->drawable->width, src_gdrw->drawable->height);
l_topshift = p_upper_curve_extend (cd, src_gdrw->drawable->width,
src_gdrw->drawable->height);
l_diff = l_curvy = l_nb_curvy = l_nb2_curvy= l_miny = l_maxy = 0;
l_alpha_lo = 20;
@ -3202,16 +3203,16 @@ p_main_bend (BenderDialog *cd,
* that the layer was part of the image)
*/
gimp_image_add_layer (l_image_id, l_tmp_layer_id, 0);
gimp_layer_set_visible(l_tmp_layer_id, FALSE);
gimp_layer_set_name(l_tmp_layer_id, "curve_bend_dummylayer");
gimp_drawable_set_visible (l_tmp_layer_id, FALSE);
gimp_drawable_set_name (l_tmp_layer_id, "curve_bend_dummylayer");
if(gb_debug) printf("p_main_bend l_tmp_layer_id %d\n", (int)l_tmp_layer_id);
if (cd->rotation != 0.0)
{
if(gb_debug) printf("p_main_bend rotate: %f\n", (float)cd->rotation);
p_gimp_rotate(l_image_id, l_tmp_layer_id, l_interpolation, cd->rotation);
}
{
if(gb_debug) printf("p_main_bend rotate: %f\n", (float)cd->rotation);
p_gimp_rotate(l_image_id, l_tmp_layer_id, l_interpolation, cd->rotation);
}
src_drawable = gimp_drawable_get (l_tmp_layer_id);
xmax = ymax = src_drawable->width -1;
@ -3228,25 +3229,25 @@ p_main_bend (BenderDialog *cd,
if(gb_debug) printf("p_main_bend: l_dst_height:%d\n", (int)l_dst_height);
if(work_on_copy)
{
dst_drawable = p_add_layer(src_drawable->width, l_dst_height, src_drawable);
if(gb_debug) printf("p_main_bend: DONE add layer\n");
}
else
{
/* work on the original */
gimp_layer_resize(original_drawable->drawable_id,
src_drawable->width,
l_dst_height,
l_offset_x, l_offset_y);
if(gb_debug) printf("p_main_bend: DONE layer resize\n");
if(!gimp_drawable_has_alpha(original_drawable->drawable_id))
{
/* always add alpha channel */
gimp_layer_add_alpha(original_drawable->drawable_id);
dst_drawable = p_add_layer(src_drawable->width, l_dst_height, src_drawable);
if(gb_debug) printf("p_main_bend: DONE add layer\n");
}
else
{
/* work on the original */
gimp_layer_resize(original_drawable->drawable_id,
src_drawable->width,
l_dst_height,
l_offset_x, l_offset_y);
if(gb_debug) printf("p_main_bend: DONE layer resize\n");
if(!gimp_drawable_has_alpha(original_drawable->drawable_id))
{
/* always add alpha channel */
gimp_layer_add_alpha(original_drawable->drawable_id);
}
dst_drawable = gimp_drawable_get (original_drawable->drawable_id);
}
dst_drawable = gimp_drawable_get (original_drawable->drawable_id);
}
p_clear_drawable(dst_drawable);
p_init_gdrw(&l_src_gdrw, src_drawable, FALSE, FALSE);
@ -3260,11 +3261,12 @@ p_main_bend (BenderDialog *cd,
p_end_gdrw(&l_dst_gdrw);
if(cd->rotation != 0.0)
{
p_gimp_rotate(l_image_id, dst_drawable->drawable_id, l_interpolation, (gdouble)(360.0 - cd->rotation));
/* TODO: here we should crop dst_drawable to cut off full transparent borderpixels */
{
p_gimp_rotate (l_image_id, dst_drawable->drawable_id,
l_interpolation, (gdouble)(360.0 - cd->rotation));
/* TODO: here we should crop dst_drawable to cut off full transparent borderpixels */
}
/* set offsets of the resulting new layer
@ -3275,12 +3277,12 @@ p_main_bend (BenderDialog *cd,
gimp_layer_set_offsets (dst_drawable->drawable_id, l_offset_x, l_offset_y);
/* delete the temp layer */
gimp_image_remove_layer(l_image_id, l_tmp_layer_id);
gimp_image_remove_layer (l_image_id, l_tmp_layer_id);
g_free(cd->curve_ptr[OUTLINE_UPPER]);
g_free(cd->curve_ptr[OUTLINE_LOWER]);
g_free (cd->curve_ptr[OUTLINE_UPPER]);
g_free (cd->curve_ptr[OUTLINE_LOWER]);
if(gb_debug) printf("p_main_bend: DONE bend main\n");
if (gb_debug) printf("p_main_bend: DONE bend main\n");
return dst_drawable->drawable_id;
} /* end p_main_bend */
}

View file

@ -223,7 +223,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
strncpy (info.description, gimp_drawable_name (drawable_ID), 256);
strncpy (info.description, gimp_drawable_get_name (drawable_ID), 256);
gimp_get_data ("file_gbr_save", &info);
if (! save_dialog ())
status = GIMP_PDB_CANCEL;

View file

@ -1123,18 +1123,18 @@ save_image (const gchar *filename,
if (is_gif89)
{
if (i>0)
if (i > 0)
{
layer_name = gimp_layer_get_name(layers[i-1]);
Disposal = parse_disposal_tag(layer_name);
g_free(layer_name);
layer_name = gimp_drawable_get_name (layers[i - 1]);
Disposal = parse_disposal_tag (layer_name);
g_free (layer_name);
}
else
Disposal = gsvals.default_dispose;
layer_name = gimp_layer_get_name(layers[i]);
Delay89 = parse_ms_tag(layer_name);
g_free(layer_name);
layer_name = gimp_drawable_get_name (layers[i]);
Delay89 = parse_ms_tag (layer_name);
g_free (layer_name);
if (Delay89 < 0)
Delay89 = (gsvals.default_delay + 5) / 10;
@ -1170,8 +1170,6 @@ save_image (const gchar *filename,
GetPixel,
offset_x, offset_y);
gimp_drawable_detach (drawable);
g_free (pixels);

View file

@ -298,7 +298,7 @@ run (const gchar *name,
{
if (!gimp_drawable_has_alpha (layer_ID[layer]))
{
layer_name = gimp_layer_get_name (layer_ID[layer]);
layer_name = gimp_drawable_get_name (layer_ID[layer]);
g_message (_("Layer %s doesn't have an alpha channel, skipped"),
layer_name);
g_free (layer_name);
@ -1281,7 +1281,7 @@ gih_save_image (const gchar *filename,
thisw, thish, FALSE, FALSE);
if (! gih_save_one_brush (fd, &pixel_rgn,
gimp_drawable_name (layer_ID[layer])))
gimp_drawable_get_name (layer_ID[layer])))
{
close (fd);
return FALSE;
@ -1300,4 +1300,3 @@ gih_save_image (const gchar *filename,
return TRUE;
}

View file

@ -782,7 +782,7 @@ iwarp (void)
st = g_strdup_printf (_("Frame %d"), i);
animlayers[i] = gimp_layer_copy (layerID);
gimp_layer_add_alpha (animlayers[i]);
gimp_layer_set_name (animlayers[i], st);
gimp_drawable_set_name (animlayers[i], st);
g_free (st);
destdrawable = gimp_drawable_get (animlayers[i]);
@ -809,7 +809,7 @@ iwarp (void)
gimp_undo_push_group_end (imageID);
gimp_layer_add_alpha (layerID);
st = g_strdup_printf (_("Frame %d"), i + animate_num_frames);
gimp_layer_set_name (layerID, st);
gimp_drawable_set_name (layerID, st);
g_free (st);
gimp_image_add_layer (imageID, layerID, 0);
}

View file

@ -561,7 +561,7 @@ mng_save_image (const gchar *filename,
mng_putchunk_term (handle, MNG_TERMACTION_REPEAT,
MNG_ITERACTION_LASTFRAME,
parse_ms_tag_from_layer_name
(gimp_layer_get_name (layers[0])),
(gimp_drawable_get_name (layers[0])),
0x7fffffff)) != MNG_NOERROR)
{
g_warning ("Unable to mng_putchunk_term() in mng_save_image()");
@ -577,7 +577,7 @@ mng_save_image (const gchar *filename,
mng_putchunk_term (handle, MNG_TERMACTION_LASTFRAME,
MNG_ITERACTION_LASTFRAME,
parse_ms_tag_from_layer_name
(gimp_layer_get_name (layers[0])),
(gimp_drawable_get_name (layers[0])),
0x7fffffff)) != MNG_NOERROR)
{
g_warning ("Unable to mng_putchunk_term() in mng_save_image()");
@ -695,7 +695,7 @@ mng_save_image (const gchar *filename,
for (i = (num_layers - 1); i >= 0; i--)
{
layer_name = gimp_layer_get_name (layers[i]);
layer_name = gimp_drawable_get_name (layers[i]);
layer_chunks_type = parse_chunks_type_from_layer_name (layer_name);
layer_drawable_type = gimp_drawable_type (layers[i]);

View file

@ -1563,9 +1563,9 @@ void extract_data_and_channels(guchar* src, gint gimpstep, gint psstep,
gimp_drawable_flush (drawable);
gimp_drawable_detach (drawable);
}
g_free(primary_data);
g_free (primary_data);
aux_data = g_malloc(width * height);
aux_data = g_malloc (width * height);
{
int pix, chan;
gint32 channel_ID;
@ -1585,10 +1585,10 @@ void extract_data_and_channels(guchar* src, gint gimpstep, gint psstep,
psd_image.aux_channel[chan-gimpstep].name,
width, height,
100.0, &colour);
gimp_image_add_channel(image_ID, channel_ID, 0);
gimp_channel_set_visible(channel_ID, FALSE);
gimp_image_add_channel (image_ID, channel_ID, 0);
gimp_drawable_set_visible (channel_ID, FALSE);
chdrawable = gimp_drawable_get(channel_ID);
chdrawable = gimp_drawable_get (channel_ID);
gimp_pixel_rgn_init (&pixel_rgn, chdrawable,
0, 0, chdrawable->width, chdrawable->height,
@ -1635,10 +1635,10 @@ extract_channels(guchar* src, gint num_wanted, gint psstep,
psd_image.aux_channel[chan-(psstep-num_wanted)].name,
width, height,
100.0, &colour);
gimp_image_add_channel(image_ID, channel_ID, 0);
gimp_channel_set_visible(channel_ID, FALSE);
gimp_image_add_channel (image_ID, channel_ID, 0);
gimp_drawable_set_visible (channel_ID, FALSE);
chdrawable = gimp_drawable_get(channel_ID);
chdrawable = gimp_drawable_get (channel_ID);
gimp_pixel_rgn_init (&pixel_rgn, chdrawable,
0, 0, chdrawable->width, chdrawable->height,
@ -1960,10 +1960,10 @@ load_image (const gchar *name)
IFDBG
fprintf(stderr, "YAH4\n");
gimp_layer_translate(layer_ID, layer->x, layer->y);
gimp_layer_translate (layer_ID, layer->x, layer->y);
gimp_layer_set_preserve_transparency(layer_ID, layer->protecttrans);
gimp_layer_set_visible(layer_ID, layer->visible);
gimp_layer_set_preserve_transparency (layer_ID, layer->protecttrans);
gimp_drawable_set_visible (layer_ID, layer->visible);
drawable = gimp_drawable_get (layer_ID);

View file

@ -795,7 +795,7 @@ save_resources (FILE *fd, gint32 image_id)
for (i = 0; i < PSDImageData.nChannels; i++)
{
chName[i] = gimp_channel_get_name (PSDImageData.lChannels[i]);
chName[i] = gimp_drawable_get_name (PSDImageData.lChannels[i]);
IFDBG printf (" Channel %d name: %s\n", i, chName[i]);
}
@ -1143,7 +1143,7 @@ save_layer_and_mask (FILE *fd, gint32 image_id)
flags = 0;
if (gimp_layer_get_preserve_transparency (PSDImageData.lLayers[i])) flags |= 1;
if (! gimp_layer_get_visible (PSDImageData.lLayers[i])) flags |= 2;
if (! gimp_drawable_get_visible (PSDImageData.lLayers[i])) flags |= 2;
IFDBG printf (" Flags: %u\n", flags);
write_gchar (fd, flags, "Flags");
@ -1161,7 +1161,7 @@ save_layer_and_mask (FILE *fd, gint32 image_id)
write_glong (fd, 0, "Layer blending size");
IFDBG printf ("\n Layer blending size: %d\n", 0);
layerName = gimp_layer_get_name (PSDImageData.lLayers[i]);
layerName = gimp_drawable_get_name (PSDImageData.lLayers[i]);
write_pascalstring (fd, layerName, 4, "layer name");
IFDBG printf ("\n Layer name: %s\n", layerName);

View file

@ -1207,7 +1207,7 @@ read_layer_block (FILE *f,
saved_image_rect[0], saved_image_rect[1]);
if (!visibility)
gimp_layer_set_visible (layer_ID, FALSE);
gimp_drawable_set_visible (layer_ID, FALSE);
gimp_layer_set_preserve_transparency (layer_ID, transparency_protected);

View file

@ -3432,7 +3432,7 @@ paint_layer_copy (gchar *new_name)
return;
}
gimp_layer_set_name (gfig_drawable, new_name);
gimp_drawable_set_name (gfig_drawable, new_name);
gimp_image_add_layer (gfig_image, gfig_drawable, -1);
}

View file

@ -49,7 +49,7 @@
(gimp-layer-set-preserve-trans logo-layer FALSE)
(plug-in-gauss-iir 1 img logo-layer outline-blur-radius TRUE TRUE)
(gimp-layer-set-visible pattern FALSE)
(gimp-drawable-set-visible pattern FALSE)
(set! layer2 (car (gimp-image-merge-visible-layers img 1)))
(plug-in-edge 1 img layer2 2 1 0)
(set! layer3 (car (gimp-layer-copy layer2 TRUE)))
@ -75,8 +75,8 @@
(gimp-drawable-offset layer3 0 1 s-offset-x s-offset-y)
(gimp-layer-set-visible layer2 FALSE)
(gimp-layer-set-visible pattern TRUE)
(gimp-drawable-set-visible layer2 FALSE)
(gimp-drawable-set-visible pattern TRUE)
;;(set! final (car (gimp-image-flatten img)))
(gimp-palette-set-background old-bg)

View file

@ -187,7 +187,7 @@
(if (= keep-bump-layer TRUE)
(begin
(gimp-image-add-layer image bump-layer 1)
(gimp-layer-set-visible bump-layer 0))
(gimp-drawable-set-visible bump-layer 0))
(gimp-layer-delete bump-layer)
)

View file

@ -82,7 +82,7 @@
(old-bg (car (gimp-palette-get-background))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-alien-glow-logo-effect img text-layer size glow-color)
(gimp-image-undo-enable img)
(gimp-display-new img)))

View file

@ -95,7 +95,7 @@
; Clean up and exit.
(gimp-palette-set-foreground old-fg)
(gimp-palette-set-background old-bg)
(gimp-layer-set-visible logo-layer 0)
(gimp-drawable-set-visible logo-layer 0)
(gimp-image-set-active-layer img bands-layer)
(gimp-displays-flush)))
@ -144,7 +144,7 @@
(fade-size (- (* (+ band-size gap-size) num-bands) 1))
(text-layer (car (gimp-text-fontname img -1 0 0 text (+ fade-size 10) TRUE size PIXELS fontname))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-alien-neon-logo-effect img text-layer fg-color bg-color
band-size gap-size num-bands do-fade)
(gimp-image-undo-enable img)

View file

@ -45,7 +45,7 @@
NORMAL-MODE) ) )
(gimp-palette-set-background inBackColor)
(gimp-layer-set-name theLayer "Background")
(gimp-drawable-set-name theLayer "Background")
(gimp-image-add-layer theImage theLayer 0)
(script-fu-asc-2-img-layer theImage theLayer inFile inFont inFontSize
@ -196,7 +196,7 @@
(gimp-floating-sel-anchor theText)
()
)
(gimp-layer-set-name theText theLine)
(gimp-drawable-set-name theText theLine)
)
)
(set! theImageHeight

View file

@ -69,7 +69,7 @@
(text-layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-basic1-logo-effect img text-layer bg-color text-color)
(gimp-image-undo-enable img)
(gimp-display-new img)))

View file

@ -53,7 +53,7 @@
(gimp-layer-translate shadow-layer 3 3)
(gimp-layer-translate highlight-layer (- posx 2) (- posy 2))
(gimp-layer-set-name highlight-layer "Highlight")
(gimp-drawable-set-name highlight-layer "Highlight")
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)))
@ -88,7 +88,7 @@
(text-layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-basic2-logo-effect img text-layer bg-color text-color)
(gimp-image-undo-enable img)
(gimp-display-new img)))

View file

@ -77,7 +77,7 @@
(let* ((min-offset-x width)
(min-offset-y height)
(layer-count slots))
(gimp-layer-set-visible bg-layer FALSE)
(gimp-drawable-set-visible bg-layer FALSE)
(while (> layer-count -1)
(let* ((layer (aref layer-array layer-count))
(layer-width (+ (car (gimp-drawable-width layer))
@ -87,7 +87,7 @@
(layer-offsets (gimp-drawable-offsets layer))
(layer-offset-x (- (car layer-offsets) max-blur))
(layer-offset-y (- (cadr layer-offsets) max-blur)))
(gimp-layer-set-visible layer FALSE)
(gimp-drawable-set-visible layer FALSE)
(set! max-width (max max-width layer-width))
(set! max-height (max max-height layer-height))
(set! min-offset-x (min min-offset-x layer-offset-x))
@ -114,9 +114,9 @@
(gimp-image-add-layer image bg-copy 0)
(gimp-image-add-layer image lower-copy 0)
(gimp-image-add-layer image upper-copy 0)
(gimp-layer-set-visible upper-copy TRUE)
(gimp-layer-set-visible lower-copy TRUE)
(gimp-layer-set-visible bg-copy TRUE)
(gimp-drawable-set-visible upper-copy TRUE)
(gimp-drawable-set-visible lower-copy TRUE)
(gimp-drawable-set-visible bg-copy TRUE)
(gimp-layer-set-opacity upper-copy (- 100 opacity))
(gimp-layer-set-opacity lower-copy opacity)
(gimp-layer-set-opacity bg-copy 100)
@ -159,7 +159,7 @@
offset-y)
(let* ((merged-layer (car (gimp-image-merge-visible-layers
image CLIP-TO-IMAGE))))
(gimp-layer-set-visible merged-layer FALSE))
(gimp-drawable-set-visible merged-layer FALSE))
(set! frame-count (- frame-count 1))))
(set! layer-count (- layer-count 1)))))
@ -175,8 +175,8 @@
(multi-raise-layer image
orig-layer
(+ (* (- slots layer-count) frames) 1))
(gimp-layer-set-visible orig-layer TRUE)
(gimp-layer-set-visible bg-copy TRUE)
(gimp-drawable-set-visible orig-layer TRUE)
(gimp-drawable-set-visible bg-copy TRUE)
(gimp-layer-resize bg-copy
max-width
max-height
@ -184,13 +184,13 @@
offset-y)
(let* ((merged-layer (car (gimp-image-merge-visible-layers
image CLIP-TO-IMAGE))))
(gimp-layer-set-visible merged-layer FALSE))
(gimp-drawable-set-visible merged-layer FALSE))
(set! layer-count (+ layer-count 1)))))
; merge the lowest blend layer with the background layer
(let* ((orig-layer (aref layer-array (- num-layers 2))))
(gimp-layer-set-visible bg-layer TRUE)
(gimp-layer-set-visible orig-layer TRUE)
(gimp-drawable-set-visible bg-layer TRUE)
(gimp-drawable-set-visible orig-layer TRUE)
(gimp-image-merge-visible-layers image CLIP-TO-IMAGE))
; make all layers visible again
@ -203,8 +203,8 @@
(name (string-append "Frame "
(number->string
(- num-result-layers layer-count) 10))))
(gimp-layer-set-visible layer TRUE)
(gimp-layer-set-name layer name)
(gimp-drawable-set-visible layer TRUE)
(gimp-drawable-set-name layer name)
(set! layer-count (- layer-count 1))))
(if (= looped TRUE)

View file

@ -151,7 +151,7 @@
(text-layer (car (gimp-text-fontname img -1 0 0 text b-size TRUE size PIXELS font)))
(old-fg (car (gimp-palette-get-foreground))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(gimp-palette-set-foreground text-color)
(gimp-layer-set-preserve-trans text-layer TRUE)
(gimp-edit-fill text-layer FOREGROUND-FILL)

View file

@ -99,7 +99,7 @@
(border (/ size 4))
(text-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-bovinated-logo-effect img text-layer spots-x spots-y bg-color)
(gimp-image-undo-enable img)
(gimp-display-new img)))

View file

@ -46,8 +46,8 @@
(set! source-layer-width (car (gimp-drawable-width source-layer)))
;--- hide layers, cause we want to "merge visible layers" later
(gimp-layer-set-visible source-layer FALSE)
(gimp-layer-set-visible bg-source-layer FALSE)
(gimp-drawable-set-visible source-layer FALSE)
(gimp-drawable-set-visible bg-source-layer FALSE)
;--- process image horizontal with pixel-speed
(while (< bl-x (+ source-layer-width bl-width))
@ -56,8 +56,8 @@
(number->string frame-nr 10) ) )
(gimp-image-add-layer img bl-layer -2)
(gimp-layer-set-name bl-layer bl-layer-name)
(gimp-layer-set-visible bl-layer TRUE)
(gimp-drawable-set-name bl-layer bl-layer-name)
(gimp-drawable-set-visible bl-layer TRUE)
(gimp-layer-set-preserve-trans bl-layer TRUE)
(gimp-layer-add-alpha bl-layer)
@ -140,12 +140,12 @@
(gimp-image-lower-layer img bg-layer)
(set! bg-layer-name (string-append "bg-"
(number->string frame-nr 10)))
(gimp-layer-set-name bg-layer bg-layer-name)
(gimp-layer-set-visible bg-layer TRUE)
(gimp-drawable-set-name bg-layer bg-layer-name)
(gimp-drawable-set-visible bg-layer TRUE)
(set! blended-layer (car (gimp-image-merge-visible-layers img
CLIP-TO-IMAGE)))
;(set! blended-layer bl-layer)
(gimp-layer-set-visible blended-layer FALSE)
(gimp-drawable-set-visible blended-layer FALSE)
;--- end of "while" loop
(set! frame-nr (+ frame-nr 1))
@ -165,7 +165,7 @@
img
bl-layer)))))
(gimp-layer-set-visible (aref (cadr (gimp-image-get-layers img)) 0)
(gimp-drawable-set-visible (aref (cadr (gimp-image-get-layers img)) 0)
TRUE)
(gimp-image-undo-enable img)
(gimp-image-clean-all img)

View file

@ -164,11 +164,11 @@
(gimp-image-remove-channel img mask-highlight)
(gimp-image-remove-channel img mask-shadow)
(gimp-layer-set-name layer1 "Carved Surface")
(gimp-layer-set-name shadow-layer "Bevel Shadow")
(gimp-layer-set-name highlight-layer "Bevel Highlight")
(gimp-layer-set-name cast-shadow-layer "Cast Shadow")
(gimp-layer-set-name inset-layer "Inset")
(gimp-drawable-set-name layer1 "Carved Surface")
(gimp-drawable-set-name shadow-layer "Bevel Shadow")
(gimp-drawable-set-name highlight-layer "Bevel Highlight")
(gimp-drawable-set-name cast-shadow-layer "Cast Shadow")
(gimp-drawable-set-name inset-layer "Inset")
(gimp-palette-set-foreground old-fg)
(gimp-palette-set-background old-bg)

View file

@ -140,11 +140,11 @@
(gimp-image-remove-channel img mask-highlight)
(gimp-image-remove-channel img mask-shadow)
(gimp-layer-set-name layer1 "Carved Surface")
(gimp-layer-set-name shadow-layer "Bevel Shadow")
(gimp-layer-set-name highlight-layer "Bevel Highlight")
(gimp-layer-set-name cast-shadow-layer "Cast Shadow")
(gimp-layer-set-name inset-layer "Inset")
(gimp-drawable-set-name layer1 "Carved Surface")
(gimp-drawable-set-name shadow-layer "Bevel Shadow")
(gimp-drawable-set-name highlight-layer "Bevel Highlight")
(gimp-drawable-set-name cast-shadow-layer "Cast Shadow")
(gimp-drawable-set-name inset-layer "Inset")
(gimp-palette-set-foreground old-fg)
(gimp-palette-set-background old-bg)

View file

@ -87,7 +87,7 @@
(text-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font)))
(old-fg (car (gimp-palette-get-foreground))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(gimp-palette-set-foreground chalk-color)
(gimp-layer-set-preserve-trans text-layer TRUE)
(gimp-edit-fill text-layer FOREGROUND-FILL)

View file

@ -84,7 +84,7 @@
(plug-in-bump-map 1 img logo-layer bump-layer 135.00 25.0 60 0 0 0 0 TRUE invert 1)
(gimp-layer-set-visible bump-layer FALSE)
(gimp-drawable-set-visible bump-layer FALSE)
(if (= drop-shadow TRUE)
(begin
@ -164,7 +164,7 @@
(text-layer (car (gimp-text-fontname img -1 0 0
text 30 TRUE font-size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-chip-away-logo-effect img text-layer spread-amount blur-amount
invert drop-shadow keep-bump bg-fill
keep-back pattern)

View file

@ -110,8 +110,8 @@
(gimp-edit-fill layer3 BACKGROUND-FILL)
(gimp-edit-clear shadow)
(gimp-layer-set-visible bg-layer FALSE)
(gimp-layer-set-visible shadow FALSE)
(gimp-drawable-set-visible bg-layer FALSE)
(gimp-drawable-set-visible shadow FALSE)
(gimp-selection-load mask)
(gimp-palette-set-background '(0 0 0))
@ -166,11 +166,11 @@
(gimp-color-balance layer2 2 TRUE (highlights (rval cc)) (highlights (gval cc)) (highlights (bval cc)))
(gimp-hue-saturation layer2 0 0 chrome-lightness chrome-saturation)
(gimp-layer-set-visible shadow TRUE)
(gimp-layer-set-visible bg-layer TRUE)
(gimp-drawable-set-visible shadow TRUE)
(gimp-drawable-set-visible bg-layer TRUE)
(gimp-layer-set-name layer2 "Chrome")
(gimp-layer-set-name layer1 "Highlight")
(gimp-drawable-set-name layer2 "Chrome")
(gimp-drawable-set-name layer1 "Highlight")
(gimp-image-remove-channel img mask)

View file

@ -32,9 +32,9 @@
(gimp-edit-fill layer3 BACKGROUND-FILL)
(gimp-edit-clear shadow)
(gimp-selection-layer-alpha logo-layer)
(gimp-layer-set-visible logo-layer FALSE)
(gimp-layer-set-visible shadow FALSE)
(gimp-layer-set-visible background FALSE)
(gimp-drawable-set-visible logo-layer FALSE)
(gimp-drawable-set-visible shadow FALSE)
(gimp-drawable-set-visible background FALSE)
(gimp-palette-set-background '(0 0 0))
(gimp-edit-fill layer1 BACKGROUND-FILL)
(gimp-selection-translate img offx1 offy1)
@ -56,9 +56,9 @@
(gimp-selection-none img)
(gimp-palette-set-background bg-color)
(gimp-edit-fill background BACKGROUND-FILL)
(gimp-layer-set-visible shadow TRUE)
(gimp-layer-set-visible background TRUE)
(gimp-layer-set-name layer1 (car (gimp-layer-get-name logo-layer)))
(gimp-drawable-set-visible shadow TRUE)
(gimp-drawable-set-visible background TRUE)
(gimp-drawable-set-name layer1 (car (gimp-drawable-get-name logo-layer)))
(gimp-image-remove-layer img logo-layer)
(gimp-palette-set-foreground old-fg)
(gimp-palette-set-background old-bg)))
@ -94,7 +94,7 @@
(b-size (* size 0.2))
(text-layer (car (gimp-text-fontname img -1 0 0 text b-size TRUE size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-chrome-logo-effect img text-layer (* size 0.1) bg-color)
(gimp-image-undo-enable img)
(gimp-display-new img)))

View file

@ -42,10 +42,10 @@
(gimp-image-add-layer img bg-layer 1)
(gimp-image-add-layer img white-layer 1)
(gimp-layer-translate white-layer posx posy)
(gimp-layer-set-name white-layer "White")
(gimp-drawable-set-name white-layer "White")
(gimp-image-add-layer img black-layer 1)
(gimp-layer-translate black-layer posx posy)
(gimp-layer-set-name black-layer "Black")
(gimp-drawable-set-name black-layer "Black")
(gimp-selection-all img)
(gimp-palette-set-background bg-color)
@ -134,7 +134,7 @@
(text-layer (car (gimp-text-fontname
img -1 0 0 text border TRUE size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-comic-logo-effect img text-layer gradient gradient-reverse
ol-width ol-color bg-color)
(gimp-image-undo-enable img)

View file

@ -145,7 +145,7 @@
(text-layer (car (gimp-text-fontname img -1 0 0 text 0 TRUE
size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-cool-metal-logo-effect img text-layer size bg-color
gradient gradient-reverse)
(gimp-image-undo-enable img)

View file

@ -37,13 +37,13 @@
(while (<= layer-count num-layers)
(set! layer (aref layer-array (- num-layers layer-count)))
(aset visi-array (- num-layers layer-count)
(car (gimp-layer-get-visible layer)))
(if (= TRUE (car (gimp-layer-get-visible layer)))
(car (gimp-drawable-get-visible layer)))
(if (= TRUE (car (gimp-drawable-get-visible layer)))
(begin
(set! copy (car (gimp-layer-copy layer TRUE)))
(gimp-image-add-layer image copy -1)
(gimp-layer-set-visible copy TRUE)
(gimp-layer-set-visible layer FALSE)
(gimp-drawable-set-visible copy TRUE)
(gimp-drawable-set-visible layer FALSE)
(set! num-visi-layers (+ num-visi-layers 1))))
(set! layer-count (+ layer-count 1)))
@ -63,7 +63,7 @@
(set! layer-count 0)
(while (< layer-count num-layers)
(set! layer (aref layer-array layer-count))
(gimp-layer-set-visible layer (aref visi-array layer-count))
(gimp-drawable-set-visible layer (aref visi-array layer-count))
(set! layer-count (+ layer-count 1)))
(gimp-image-set-active-layer image drawable)

View file

@ -105,7 +105,7 @@
(gimp-selection-none img)
(gimp-edit-fill layer2 BACKGROUND-FILL)
(gimp-edit-fill layer3 BACKGROUND-FILL)
(gimp-layer-set-visible text-layer FALSE)
(gimp-drawable-set-visible text-layer FALSE)
(gimp-selection-layer-alpha text-layer)
(gimp-palette-set-background '(0 0 0))
@ -173,11 +173,11 @@
(gimp-image-remove-channel img disp-map)
(gimp-layer-set-visible text-layer TRUE)
(gimp-layer-set-name layer1 "Crystal")
(gimp-layer-set-name layer2 "Interior")
(gimp-layer-set-name bg-layer "Background")
(gimp-layer-set-name text-layer "Shadow")
(gimp-drawable-set-visible text-layer TRUE)
(gimp-drawable-set-name layer1 "Crystal")
(gimp-drawable-set-name layer2 "Interior")
(gimp-drawable-set-name bg-layer "Background")
(gimp-drawable-set-name text-layer "Shadow")
(gimp-palette-set-foreground old-fg)
(gimp-palette-set-background old-bg)

View file

@ -104,7 +104,7 @@
(border (/ size 5))
(text-layer (car (gimp-text-fontname img -1 0 0 text (* border 2) TRUE size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-frosty-logo-effect img text-layer size bg-color)
(gimp-image-undo-enable img)
(gimp-display-new img)))

View file

@ -53,7 +53,7 @@
(old-bg (car (gimp-palette-get-background))))
(script-fu-util-image-resize-from-layer img logo-layer)
(gimp-layer-set-name grow-me "Grow-me")
(gimp-drawable-set-name grow-me "Grow-me")
(gimp-image-add-layer img grow-me 1)
(gimp-layer-translate grow-me posx posy)
(gimp-image-add-layer img bg-layer 2)
@ -220,7 +220,7 @@
(let* ((img (car (gimp-image-new 256 256 RGB)))
(text-layer (car (gimp-text-fontname img -1 0 0 text 30 TRUE size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-glossy-logo-effect img text-layer
blend-gradient-text
blend-gradient-text-reverse

View file

@ -50,7 +50,7 @@
(gimp-selection-none img)
(gimp-layer-set-mode logo-layer OVERLAY)
(gimp-layer-set-name glow-layer "Glow Layer")
(gimp-drawable-set-name glow-layer "Glow Layer")
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)))

View file

@ -112,7 +112,7 @@
(text-layer (car (gimp-text-fontname img -1 0 0 text
border TRUE size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-gradient-bevel-logo-effect img text-layer border
bevel-height bevel-width bg-color)
(gimp-image-undo-enable img)

View file

@ -48,7 +48,7 @@
;(gimp-undo-push-group-start img)
(set! grid-layer (car (gimp-layer-copy drw TRUE)))
(gimp-edit-clear grid-layer)
(gimp-layer-set-name grid-layer "grid layer")
(gimp-drawable-set-name grid-layer "grid layer")
(while (not (null? (cdr x-divides)))
(set! stepped-x (+ stepped-x (car x-divides)))
(set! temp (* drw-width (/ stepped-x total-step-x)))

View file

@ -263,7 +263,7 @@
(gimp-image-add-layer gimg hsv-layer -1)
(gimp-edit-clear hsv-layer)
(gimp-image-add-layer gimg rgb-layer -1)
(gimp-layer-set-visible rgb-layer FALSE)
(gimp-drawable-set-visible rgb-layer FALSE)
(gimp-edit-clear rgb-layer)
(gimp-image-add-layer gimg clayer -1)
(gimp-edit-clear clayer)

View file

@ -69,11 +69,11 @@
(gimp-selection-none img)
(while (< index num-of-layers)
(set! layer (aref layers index))
(if (equal? "Background" (car (gimp-layer-get-name layer)))
(if (equal? "Background" (car (gimp-drawable-get-name layer)))
(begin
(gimp-layer-add-alpha layer)
(gimp-layer-set-name layer "Original Background")))
(set! layer-names (cons (car (gimp-layer-get-name layer)) layer-names))
(gimp-drawable-set-name layer "Original Background")))
(set! layer-names (cons (car (gimp-drawable-get-name layer)) layer-names))
(if (not (= -1 (car (gimp-layer-mask layer))))
(gimp-image-remove-layer-mask img layer
(if (= TRUE apply-layer-mask?)

View file

@ -157,7 +157,7 @@
(gimp-edit-fill shadow-layer BACKGROUND-FILL)))
(gimp-selection-none img)
(gimp-layer-set-name tube-layer "Neon Tubes")
(gimp-drawable-set-name tube-layer "Neon Tubes")
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)
(gimp-image-remove-channel img selection)))
@ -199,7 +199,7 @@
(border (/ size 4))
(tube-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font))))
(gimp-image-undo-disable img)
(gimp-layer-set-name tube-layer text)
(gimp-drawable-set-name tube-layer text)
(apply-neon-logo-effect img tube-layer size bg-color glow-color shadow)
(gimp-image-undo-enable img)
(gimp-display-new img)))

View file

@ -99,8 +99,8 @@
(gimp-edit-fill layer2 BACKGROUND-FILL)
(gimp-edit-fill layer3 BACKGROUND-FILL)
(gimp-edit-clear shadow)
(gimp-layer-set-visible text-layer FALSE)
(gimp-layer-set-visible shadow FALSE)
(gimp-drawable-set-visible text-layer FALSE)
(gimp-drawable-set-visible shadow FALSE)
(gimp-rect-select img (/ b-size 2) (/ b-size 2) (- width b-size) (- height b-size) REPLACE 0 0)
(gimp-rect-select img b-size b-size (- width (* b-size 2)) (- height (* b-size 2)) SUB 0 0)
@ -114,8 +114,8 @@
(gimp-selection-translate img (* 2 offx2) (* 2 offy2))
(gimp-edit-fill layer3 BACKGROUND-FILL)
(gimp-selection-none img)
(gimp-layer-set-visible layer2 TRUE)
(gimp-layer-set-visible layer3 TRUE)
(gimp-drawable-set-visible layer2 TRUE)
(gimp-drawable-set-visible layer3 TRUE)
(set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(gimp-invert layer2)
@ -125,8 +125,8 @@
(gimp-layer-scale layer1 width height FALSE)
(plug-in-gauss-iir 1 img layer1 10 TRUE TRUE)
(gimp-layer-set-opacity layer1 50)
(gimp-layer-set-visible layer1 TRUE)
(gimp-layer-set-visible layer2 TRUE)
(gimp-drawable-set-visible layer1 TRUE)
(gimp-drawable-set-visible layer2 TRUE)
(set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(gimp-curves-spline layer1 0 18 (spline1))
@ -163,12 +163,12 @@
(gimp-color-balance layer2 2 TRUE (highlights (rval cc)) (highlights (gval cc)) (highlights (bval cc)))
(gimp-hue-saturation layer2 0 0 chrome-lightness chrome-saturation)
(gimp-layer-set-visible shadow TRUE)
(gimp-layer-set-visible text-layer TRUE)
(gimp-drawable-set-visible shadow TRUE)
(gimp-drawable-set-visible text-layer TRUE)
(gimp-layer-set-name text-layer "Background")
(gimp-layer-set-name layer2 "Chrome")
(gimp-layer-set-name layer1 "Highlight")
(gimp-drawable-set-name text-layer "Background")
(gimp-drawable-set-name layer2 "Chrome")
(gimp-drawable-set-name layer1 "Highlight")
(gimp-layer-translate shadow (/ b-size -4) (/ b-size -4))
(gimp-layer-translate layer2 (/ b-size -4) (/ b-size -4))

View file

@ -41,7 +41,7 @@
(set! n (+ n 1))
(set! theFrame (car (gimp-layer-copy theLayer FALSE)))
(gimp-image-add-layer theImage theFrame 0)
(gimp-layer-set-name theFrame
(gimp-drawable-set-name theFrame
(string-append "Anim Frame: "
(number->string (- inFrames n) 10)
" (replace)"))

View file

@ -97,7 +97,7 @@
(border (+ feather off))
(text-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS fontname))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-starburst-logo-effect img text-layer size burst-color bg-color)
(gimp-image-undo-enable img)
(gimp-display-new img)))

View file

@ -145,7 +145,7 @@
(text-layer (car (gimp-text-fontname img -1 0 0 text border
TRUE size PIXELS fontname))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-starscape-logo-effect img text-layer size glow-color)
(gimp-image-undo-enable img)
(gimp-display-new img)))

View file

@ -75,7 +75,7 @@
(gimp-palette-set-background old-bg)
(gimp-brushes-set-brush old-brush)
(gimp-brushes-set-paint-mode old-paint-mode)
(gimp-layer-set-visible logo-layer 0)
(gimp-drawable-set-visible logo-layer 0)
(gimp-image-set-active-layer img sparkle-layer)))
@ -124,7 +124,7 @@
(border (/ size 5))
(text-layer (car (gimp-text-fontname img -1 0 0 text (* border 2) TRUE size PIXELS fontname))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-t-o-p-logo-effect img text-layer border hit-rate
edge-size edge-only base-color bg-color)
(gimp-image-undo-enable img)

View file

@ -147,16 +147,16 @@
(gimp-rotate new-layer 1
((if (< 0 fill-angle-rad) + -) angle rad-90))))))
(set! index (+ index 1)))
(gimp-layer-set-visible BG-layer 0)
(gimp-drawable-set-visible BG-layer 0)
(if (not script-fu-text-circle-debug?)
(begin
(set! merged-layer
(car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(gimp-layer-set-name merged-layer
(gimp-drawable-set-name merged-layer
(if (< (length text) 16)
(wrap-string text)
"Text Circle"))))
(gimp-layer-set-visible BG-layer 1)
(gimp-drawable-set-visible BG-layer 1)
(gimp-image-undo-enable img)
(gimp-image-clean-all img)
(gimp-display-new img)

View file

@ -143,7 +143,7 @@
(text-layer (car (gimp-text-fontname img -1 0 0 text b-size
TRUE size PIXELS fontname))))
(gimp-image-undo-disable img)
(gimp-layer-set-name text-layer text)
(gimp-drawable-set-name text-layer text)
(apply-textured-logo-effect img text-layer b-size text-pattern tile-type
bg-color blend-fg blend-bg)
(gimp-image-undo-enable img)

View file

@ -118,7 +118,7 @@
; Text layer
(gimp-layer-set-visible text-layer TRUE)
(gimp-drawable-set-visible text-layer TRUE)
(gimp-layer-set-preserve-trans text-layer TRUE)
(gimp-blend text-layer CUSTOM-MODE NORMAL-MODE

View file

@ -29,7 +29,7 @@
(set! original-layer-for-darker (car (gimp-layer-copy original-layer TRUE)))
(set! original-layer-for-lighter (car (gimp-layer-copy original-layer TRUE)))
(set! blured-layer-for-darker (car (gimp-layer-copy original-layer TRUE)))
(gimp-layer-set-visible original-layer FALSE)
(gimp-drawable-set-visible original-layer FALSE)
(gimp-display-new new-image)
;; make darker mask
@ -42,8 +42,8 @@
(gimp-layer-set-mode original-layer-for-darker SUBTRACT)
(set! darker-layer
(car (gimp-image-merge-visible-layers new-image CLIP-TO-IMAGE)))
(gimp-layer-set-name darker-layer "darker mask")
(gimp-layer-set-visible darker-layer FALSE)
(gimp-drawable-set-name darker-layer "darker mask")
(gimp-drawable-set-visible darker-layer FALSE)
;; make lighter mask
(gimp-image-add-layer new-image original-layer-for-lighter -1)
@ -51,16 +51,16 @@
(gimp-layer-set-mode blured-layer-for-lighter SUBTRACT)
(set! lighter-layer
(car (gimp-image-merge-visible-layers new-image CLIP-TO-IMAGE)))
(gimp-layer-set-name lighter-layer "lighter mask")
(gimp-drawable-set-name lighter-layer "lighter mask")
;; combine them
(gimp-layer-set-visible original-layer TRUE)
(gimp-drawable-set-visible original-layer TRUE)
(gimp-layer-set-mode darker-layer SUBTRACT)
(gimp-layer-set-opacity darker-layer mask-opacity)
(gimp-layer-set-visible darker-layer TRUE)
(gimp-drawable-set-visible darker-layer TRUE)
(gimp-layer-set-mode lighter-layer ADDITION)
(gimp-layer-set-opacity lighter-layer mask-opacity)
(gimp-layer-set-visible lighter-layer TRUE)
(gimp-drawable-set-visible lighter-layer TRUE)
(gimp-image-undo-enable new-image)
(gimp-displays-flush)))

View file

@ -58,7 +58,7 @@
" (replace)")))
(gimp-layer-set-preserve-trans waves-layer FALSE)
(gimp-image-add-layer image waves-layer -1)
(gimp-layer-set-name waves-layer layer-name)
(gimp-drawable-set-name waves-layer layer-name)
(plug-in-waves 1
image
@ -72,7 +72,7 @@
(set! remaining-frames (- remaining-frames 1))
(set! phase (- phase phaseshift))))
(gimp-layer-set-name source-layer "Frame 1")
(gimp-drawable-set-name source-layer "Frame 1")
(plug-in-waves 1
image
source-layer

View file

@ -1437,7 +1437,7 @@ p_write_layer_prp(const gchar *dirname,
l_param.int_val1 = (gint32)p_to_XJTLayerModeEffects(gimp_layer_get_mode(layer_id));
p_write_prop (fp, PROP_MODE, &l_param, wr_all_prp);
l_param.int_val1 = p_invert(gimp_layer_get_visible(layer_id));
l_param.int_val1 = p_invert(gimp_drawable_get_visible(layer_id));
p_write_prop (fp, PROP_VISIBLE, &l_param, wr_all_prp);
l_param.int_val1 = gimp_layer_get_linked (layer_id);
@ -1460,10 +1460,10 @@ p_write_layer_prp(const gchar *dirname,
l_param.int_val2 = l_ofsy;
p_write_prop (fp, PROP_OFFSETS, &l_param, wr_all_prp);
l_param.int_val1 = gimp_layer_get_tattoo(layer_id);
l_param.int_val1 = gimp_drawable_get_tattoo(layer_id);
p_write_prop (fp, PROP_TATTOO, &l_param, wr_all_prp);
l_param.string_val = gimp_layer_get_name(layer_id);
l_param.string_val = gimp_drawable_get_name(layer_id);
p_write_prop (fp, PROP_NAME, &l_param, wr_all_prp);
p_write_drawable_parasites(dirname, fp, layer_id, wr_all_prp);
@ -1507,7 +1507,7 @@ p_write_channel_prp(const gchar *dirname,
l_param.flt_val1 = gimp_channel_get_opacity(channel_id);
p_write_prop (fp, PROP_OPACITY, &l_param, wr_all_prp);
l_param.int_val1 = p_invert(gimp_channel_get_visible(channel_id));
l_param.int_val1 = p_invert(gimp_drawable_get_visible(channel_id));
p_write_prop (fp, PROP_VISIBLE, &l_param, wr_all_prp);
l_param.int_val1 = gimp_channel_get_show_masked(channel_id);
@ -1525,10 +1525,10 @@ p_write_channel_prp(const gchar *dirname,
l_param.int_val2 = l_ofsy;
p_write_prop (fp, PROP_OFFSETS, &l_param, wr_all_prp);
l_param.int_val1 = gimp_channel_get_tattoo (channel_id);
l_param.int_val1 = gimp_drawable_get_tattoo (channel_id);
p_write_prop (fp, PROP_TATTOO, &l_param, wr_all_prp);
l_param.string_val = gimp_channel_get_name(channel_id);
l_param.string_val = gimp_drawable_get_name(channel_id);
p_write_prop (fp, PROP_NAME, &l_param, wr_all_prp);
p_write_drawable_parasites(dirname, fp, channel_id, wr_all_prp);
@ -3466,12 +3466,12 @@ load_xjt_image (const gchar *filename)
/* adjust offsets and other layerproperties */
gimp_layer_set_offsets(l_layer_id, l_layer_prp_ptr->offx, l_layer_prp_ptr->offy);
gimp_layer_set_visible (l_layer_id, l_layer_prp_ptr->visible);
gimp_drawable_set_visible (l_layer_id, l_layer_prp_ptr->visible);
gimp_layer_set_linked (l_layer_id, l_layer_prp_ptr->linked);
gimp_layer_set_preserve_transparency (l_layer_id, l_layer_prp_ptr->preserve_transparency);
if (l_layer_prp_ptr->tattoo >= 0)
{
gimp_layer_set_tattoo(l_layer_id, l_layer_prp_ptr->tattoo);
gimp_drawable_set_tattoo(l_layer_id, l_layer_prp_ptr->tattoo);
}
if (l_layer_prp_ptr->active_layer)
@ -3524,7 +3524,7 @@ load_xjt_image (const gchar *filename)
if (l_channel_prp_ptr->tattoo >= 0)
{
gimp_channel_set_tattoo(l_channel_id, l_channel_prp_ptr->tattoo);
gimp_drawable_set_tattoo(l_channel_id, l_channel_prp_ptr->tattoo);
}
/* gimp_layer_set_offsets(l_channel_id, l_layer_prp_ptr->offx, l_layer_prp_ptr->offy); */
@ -3578,7 +3578,7 @@ load_xjt_image (const gchar *filename)
if(l_channel_prp_ptr->tattoo >= 0)
{
gimp_channel_set_tattoo(l_channel_id, l_channel_prp_ptr->tattoo);
gimp_drawable_set_tattoo(l_channel_id, l_channel_prp_ptr->tattoo);
}
if(l_channel_prp_ptr->selection)
{
@ -3595,7 +3595,7 @@ load_xjt_image (const gchar *filename)
gimp_image_add_channel (l_image_id, l_channel_id, 0);
/* adjust offsets and other channelproperties */
gimp_channel_set_visible (l_channel_id, l_channel_prp_ptr->visible);
gimp_drawable_set_visible (l_channel_id, l_channel_prp_ptr->visible);
gimp_channel_set_show_masked (l_channel_id, l_channel_prp_ptr->show_masked);
if(l_channel_prp_ptr->floating_attached)

View file

@ -261,15 +261,6 @@ CODE
);
}
&channel_accessors('name', 'string', 'name', 0, [ undef, <<'CODE' ],
$invoke{code} =~ s/gimp_object_set_name/gimp_item_rename/;
$invoke{code} =~ s/GIMP_OBJECT/GIMP_ITEM/;
CODE
'object', 'GIMP_OBJECT (channel)');
&channel_accessors('visible', 'boolean', 'visibility', 1, undef,
'item', 'GIMP_ITEM (channel)');
&channel_accessors('show_masked', 'boolean', 'composite method', 0,
<<'CODE');
$help .= <<'HELP'
@ -287,17 +278,6 @@ CODE
&channel_accessors('color', 'color', 'compositing color', 0,
[ '$outargs[0]->{void_ret} = 1', '' ]);
&channel_accessors('tattoo', 'tattoo', 'tattoo', 0,
<<'CODE', 'item', 'GIMP_ITEM (channel)');
$help .= <<'HELP';
A tattoo is a unique and permanent identifier attached to a channel that can be
used to uniquely identify a channel within an image even between sessions.
HELP
$author = $copyright = 'Jay Cox';
$date = '1998';
CODE
unshift @procs, qw(channel_new channel_copy channel_delete
channel_combine_masks);
%exports = (app => [@procs], lib => [@procs]);

View file

@ -88,6 +88,80 @@ HELP
$outargs[0]->{alias} = $check . ' (drawable) ? TRUE : FALSE';
}
sub drawable_get_prop_proc {
my ($prop, $type, $desc, $undo, $core_type, $core_var) = @_;
$core_type = 'drawable' unless $core_type;
$core_var = 'drawable' unless $core_var;
$blurb = "Get the $desc of the specified drawable.";
$help = "This procedure returns the specified drawable's $desc. ";
&std_pdb_misc;
@inargs = ( &drawable_arg );
@outargs = (
{ name => $prop, type => $type,
desc => "The drawable $desc", no_declare => 1 }
);
my $alias = "gimp_${core_type}_get_$prop ($core_var)";
$alias = "g_strdup ($alias)" if $type eq 'string';
$outargs[0]->{alias} .= "$alias";
}
sub drawable_set_prop_proc {
my ($prop, $type, $desc, $undo, $core_type, $core_var) = @_;
$core_type = 'drawable' unless $core_type;
$core_var = 'drawable' unless $core_var;
$blurb = "Set the $desc of the specified drawable.";
$help = "This procedure sets the specified drawable's $desc. ";
&std_pdb_misc;
@inargs = (
&drawable_arg,
{ name => $prop, type => $type,
desc => "The new drawable $desc" }
);
if ($type =~ /float/) {
$inargs[1]->{desc} .= ' (%%desc%%)';
}
$invoke{code} = $undo ? "gimp_${core_type}_set_$prop ($core_var, $prop, TRUE);"
: "gimp_${core_type}_set_$prop ($core_var, $prop);";
}
sub drawable_accessors {
my ($prop, $type, $desc, $undo, $extra, $core_type, $core_var) = @_;
$core_type = 'drawable' unless $core_type;
$core_var = 'drawable' unless $core_var;
my (@extra, %extra); my $once = 0;
ref($extra) ? (@extra = @$extra) : (@extra = ($extra, $extra));
%extra = map { $once++ ? 'set' : 'get', $_ ? $_ : "" } @extra;
foreach (sort keys %extra) {
my $proc = "drawable_${_}_$prop";
eval <<SUB;
sub @{[ scalar caller ]}::$proc {
\&drawable_${_}_prop_proc('$prop', '$type', '$desc', $undo,
'$core_type', '$core_var');
$extra{$_}
}
SUB
}
}
sub drawable_merge_shadow {
$blurb = 'Merge the shadow buffer with the specified drawable.';
@ -340,6 +414,26 @@ sub drawable_is_channel {
&drawable_is_proc('channel', 'GIMP_IS_CHANNEL');
}
&drawable_accessors('name', 'string', 'name', 0, [ undef, <<'CODE' ],
$invoke{code} =~ s/gimp_object_set_name/gimp_item_rename/;
$invoke{code} =~ s/GIMP_OBJECT/GIMP_ITEM/;
CODE
'object', 'GIMP_OBJECT (drawable)');
&drawable_accessors('visible', 'boolean', 'visibility', 1, undef,
'item', 'GIMP_ITEM (drawable)');
&drawable_accessors('tattoo', 'tattoo', 'tattoo', 0,
<<'CODE', 'item', 'GIMP_ITEM (drawable)');
$help .= <<'HELP';
A tattoo is a unique and permanent identifier attached to a drawable that can be
used to uniquely identify a drawable within an image even between sessions
HELP
$author = $copyright = 'Jay Cox';
$date = '1998';
CODE
sub drawable_get_pixel {
$blurb = 'Gets the value of the pixel at the specified coordinates.';
@ -392,7 +486,8 @@ sub drawable_set_pixel {
$help = <<'HELP';
This procedure sets the pixel value at the specified coordinates. The
'num_channels' argument must always be equal to the bytes-per-pixel value for
the spec ified drawable.
the spec ified drawable. Note that this function is not undoable, you should
use it only on drawables you just created yourself.
HELP
&std_pdb_misc;
@ -570,11 +665,14 @@ CODE
drawable_mask_bounds drawable_image drawable_type
drawable_has_alpha drawable_type_with_alpha drawable_is_rgb
drawable_is_gray drawable_is_indexed drawable_bytes drawable_width
drawable_height drawable_offsets drawable_is_layer
drawable_is_layer_mask drawable_is_channel drawable_get_pixel
drawable_set_pixel drawable_set_image drawable_thumbnail
drawable_offset);
%exports = (app => [@procs], lib => [@procs[0..17,21..22]]);
drawable_height drawable_offsets
drawable_is_layer drawable_is_layer_mask drawable_is_channel
drawable_get_name drawable_set_name
drawable_get_visible drawable_set_visible
drawable_get_tattoo drawable_set_tattoo
drawable_get_pixel drawable_set_pixel drawable_set_image
drawable_thumbnail drawable_offset);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Drawable procedures';

View file

@ -564,15 +564,6 @@ CODE
);
}
&layer_accessors('name', 'string', 'name', 0, 0, [ undef, <<'CODE' ],
$invoke{code} =~ s/gimp_object_set_name/gimp_item_rename/;
$invoke{code} =~ s/GIMP_OBJECT/GIMP_ITEM/;
CODE
'object', 'GIMP_OBJECT (layer)');
&layer_accessors('visible', 'boolean', 'visibility', 0, 1, undef,
'item', 'GIMP_ITEM (layer)');
&layer_accessors('preserve_trans', 'boolean', 'preserve transperancy', 1, 1);
&layer_accessors('apply_mask', 'boolean', 'apply mask', 0, 0,
@ -634,17 +625,6 @@ CODE2
}
CODE
&layer_accessors('tattoo', 'tattoo', 'tattoo', 0, 0,
<<'CODE', 'item', 'GIMP_ITEM (layer)');
$help .= <<'HELP';
A tattoo is a unique and permanent identifier attached to a
layer that can be used to uniquely identify a layer within an image even between sessions
HELP
$author = $copyright = 'Jay Cox';
$date = '1998';
CODE
@headers = qw("config/gimpcoreconfig.h" "core/gimp.h" "core/gimpimage-undo.h"
"core/gimpitem-linked.h" "pdb_glue.h" "gimp-intl.h");