[gimp] pdb: remove deprecated drawable procedures
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pdb: remove deprecated drawable procedures
- Date: Wed, 15 Sep 2010 19:43:32 +0000 (UTC)
commit c56f0568c5dc51fa6741c772ad28e1480d9189c8
Author: Michael Natterer <mitch gimp org>
Date: Wed Sep 15 21:43:03 2010 +0200
pdb: remove deprecated drawable procedures
and do the same stuff as for vectors procedures below.
app/pdb/drawable-cmds.c | 781 -----------------------------------------
app/pdb/gimp-pdb-compat.c | 14 +
app/pdb/internal-procs.c | 2 +-
libgimp/gimpdrawable.c | 206 +++++++++++
libgimp/gimpdrawable.h | 18 +
libgimp/gimpdrawable_pdb.c | 401 ---------------------
libgimp/gimpdrawable_pdb.h | 22 --
tools/pdbgen/pdb/drawable.pdb | 322 +-----------------
8 files changed, 247 insertions(+), 1519 deletions(-)
---
diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c
index 673d5ca..de783c5 100644
--- a/app/pdb/drawable-cmds.c
+++ b/app/pdb/drawable-cmds.c
@@ -51,58 +51,6 @@
static GValueArray *
-drawable_is_valid_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- GValueArray *return_vals;
- GimpDrawable *drawable;
- gboolean valid = FALSE;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- valid = (GIMP_IS_DRAWABLE (drawable) &&
- ! gimp_item_is_removed (GIMP_ITEM (drawable)));
-
- return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
- g_value_set_boolean (&return_vals->values[1], valid);
-
- return return_vals;
-}
-
-static GValueArray *
-drawable_is_layer_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GValueArray *return_vals;
- GimpDrawable *drawable;
- gboolean layer = FALSE;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- if (success)
- {
- layer = GIMP_IS_LAYER (drawable);
- }
-
- return_vals = gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-
- if (success)
- g_value_set_boolean (&return_vals->values[1], layer);
-
- return return_vals;
-}
-
-static GValueArray *
drawable_is_text_layer_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
@@ -132,64 +80,6 @@ drawable_is_text_layer_invoker (GimpProcedure *procedure,
}
static GValueArray *
-drawable_is_layer_mask_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GValueArray *return_vals;
- GimpDrawable *drawable;
- gboolean layer_mask = FALSE;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- if (success)
- {
- layer_mask = GIMP_IS_LAYER_MASK (drawable);
- }
-
- return_vals = gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-
- if (success)
- g_value_set_boolean (&return_vals->values[1], layer_mask);
-
- return return_vals;
-}
-
-static GValueArray *
-drawable_is_channel_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GValueArray *return_vals;
- GimpDrawable *drawable;
- gboolean channel = FALSE;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- if (success)
- {
- channel = GIMP_IS_CHANNEL (drawable);
- }
-
- return_vals = gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-
- if (success)
- g_value_set_boolean (&return_vals->values[1], channel);
-
- return return_vals;
-}
-
-static GValueArray *
drawable_type_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
@@ -484,63 +374,6 @@ drawable_offsets_invoker (GimpProcedure *procedure,
}
static GValueArray *
-drawable_delete_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GimpDrawable *drawable;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- if (success)
- {
- if (g_object_is_floating (drawable))
- {
- g_object_ref_sink (drawable);
- g_object_unref (drawable);
- }
- else
- success = FALSE;
- }
-
- return gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-}
-
-static GValueArray *
-drawable_get_image_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GValueArray *return_vals;
- GimpDrawable *drawable;
- GimpImage *image = NULL;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- if (success)
- {
- image = gimp_item_get_image (GIMP_ITEM (drawable));
- }
-
- return_vals = gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-
- if (success)
- gimp_value_set_image (&return_vals->values[1], image);
-
- return return_vals;
-}
-
-static GValueArray *
drawable_set_image_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
@@ -566,218 +399,6 @@ drawable_set_image_invoker (GimpProcedure *procedure,
}
static GValueArray *
-drawable_get_name_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GValueArray *return_vals;
- GimpDrawable *drawable;
- gchar *name = NULL;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- if (success)
- {
- name = g_strdup (gimp_object_get_name (drawable));
- }
-
- return_vals = gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-
- if (success)
- g_value_take_string (&return_vals->values[1], name);
-
- return return_vals;
-}
-
-static GValueArray *
-drawable_set_name_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GimpDrawable *drawable;
- const gchar *name;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
- name = g_value_get_string (&args->values[1]);
-
- if (success)
- {
- success = gimp_item_rename (GIMP_ITEM (drawable), name, error);
- }
-
- return gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-}
-
-static GValueArray *
-drawable_get_visible_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GValueArray *return_vals;
- GimpDrawable *drawable;
- gboolean visible = FALSE;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- if (success)
- {
- visible = gimp_item_get_visible (GIMP_ITEM (drawable));
- }
-
- return_vals = gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-
- if (success)
- g_value_set_boolean (&return_vals->values[1], visible);
-
- return return_vals;
-}
-
-static GValueArray *
-drawable_set_visible_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GimpDrawable *drawable;
- gboolean visible;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
- visible = g_value_get_boolean (&args->values[1]);
-
- if (success)
- {
- gimp_item_set_visible (GIMP_ITEM (drawable), visible, TRUE);
- }
-
- return gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-}
-
-static GValueArray *
-drawable_get_linked_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GValueArray *return_vals;
- GimpDrawable *drawable;
- gboolean linked = FALSE;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- if (success)
- {
- linked = gimp_item_get_linked (GIMP_ITEM (drawable));
- }
-
- return_vals = gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-
- if (success)
- g_value_set_boolean (&return_vals->values[1], linked);
-
- return return_vals;
-}
-
-static GValueArray *
-drawable_set_linked_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GimpDrawable *drawable;
- gboolean linked;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
- linked = g_value_get_boolean (&args->values[1]);
-
- if (success)
- {
- gimp_item_set_linked (GIMP_ITEM (drawable), linked, TRUE);
- }
-
- return gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-}
-
-static GValueArray *
-drawable_get_tattoo_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GValueArray *return_vals;
- GimpDrawable *drawable;
- gint32 tattoo = 0;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
- if (success)
- {
- tattoo = gimp_item_get_tattoo (GIMP_ITEM (drawable));
- }
-
- return_vals = gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-
- if (success)
- g_value_set_uint (&return_vals->values[1], tattoo);
-
- return return_vals;
-}
-
-static GValueArray *
-drawable_set_tattoo_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GimpDrawable *drawable;
- gint32 tattoo;
-
- drawable = gimp_value_get_drawable (&args->values[0], gimp);
- tattoo = g_value_get_uint (&args->values[1]);
-
- if (success)
- {
- gimp_item_set_tattoo (GIMP_ITEM (drawable), tattoo);
- }
-
- return gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-}
-
-static GValueArray *
drawable_mask_bounds_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
@@ -1328,64 +949,6 @@ register_drawable_procs (GimpPDB *pdb)
GimpProcedure *procedure;
/*
- * gimp-drawable-is-valid
- */
- procedure = gimp_procedure_new (drawable_is_valid_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-is-valid");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-is-valid",
- "Deprecated: Use 'gimp-item-is-valid' instead.",
- "Deprecated: Use 'gimp-item-is-valid' instead.",
- "Sven Neumann <sven gimp org>",
- "Sven Neumann",
- "2007",
- "gimp-item-is-valid");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to check",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
- gimp_procedure_add_return_value (procedure,
- g_param_spec_boolean ("valid",
- "valid",
- "Whether the drawable ID is valid",
- FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-is-layer
- */
- procedure = gimp_procedure_new (drawable_is_layer_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-is-layer");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-is-layer",
- "Deprecated: Use 'gimp-item-is-layer' instead.",
- "Deprecated: Use 'gimp-item-is-layer' instead.",
- "",
- "",
- "",
- "gimp-item-is-layer");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_return_value (procedure,
- g_param_spec_boolean ("layer",
- "layer",
- "TRUE if the drawable is a layer, FALSE otherwise",
- FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
* gimp-drawable-is-text-layer
*/
procedure = gimp_procedure_new (drawable_is_text_layer_invoker);
@@ -1415,64 +978,6 @@ register_drawable_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-drawable-is-layer-mask
- */
- procedure = gimp_procedure_new (drawable_is_layer_mask_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-is-layer-mask");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-is-layer-mask",
- "Deprecated: Use 'gimp-item-is-layer-mask' instead.",
- "Deprecated: Use 'gimp-item-is-layer-mask' instead.",
- "",
- "",
- "",
- "gimp-item-is-layer-mask");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_return_value (procedure,
- g_param_spec_boolean ("layer-mask",
- "layer mask",
- "TRUE if the drawable is a layer mask, FALSE otherwise",
- FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-is-channel
- */
- procedure = gimp_procedure_new (drawable_is_channel_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-is-channel");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-is-channel",
- "Deprecated: Use 'gimp-item-is-channel' instead.",
- "Deprecated: Use 'gimp-item-is-channel' instead.",
- "",
- "",
- "",
- "gimp-item-is-channel");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_return_value (procedure,
- g_param_spec_boolean ("channel",
- "channel",
- "TRUE if the drawable is a channel, FALSE otherwise",
- FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
* gimp-drawable-type
*/
procedure = gimp_procedure_new (drawable_type_invoker);
@@ -1777,58 +1282,6 @@ register_drawable_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-drawable-delete
- */
- procedure = gimp_procedure_new (drawable_delete_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-delete");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-delete",
- "Deprecated: Use 'gimp-item-delete' instead.",
- "Deprecated: Use 'gimp-item-delete' instead.",
- "",
- "",
- "",
- "gimp-item-delete");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to delete",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-get-image
- */
- procedure = gimp_procedure_new (drawable_get_image_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-get-image");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-get-image",
- "Deprecated: Use 'gimp-item-get-image' instead.",
- "Deprecated: Use 'gimp-item-get-image' instead.",
- "",
- "",
- "",
- "gimp-item-get-image");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The drawable's image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
* gimp-drawable-set-image
*/
procedure = gimp_procedure_new (drawable_set_image_invoker);
@@ -1858,240 +1311,6 @@ register_drawable_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-drawable-get-name
- */
- procedure = gimp_procedure_new (drawable_get_name_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-get-name");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-get-name",
- "Deprecated: Use 'gimp-item-get-name' instead.",
- "Deprecated: Use 'gimp-item-get-name' instead.",
- "",
- "",
- "",
- "gimp-item-get-name");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_return_value (procedure,
- gimp_param_spec_string ("name",
- "name",
- "The drawable name",
- FALSE, FALSE, FALSE,
- NULL,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-set-name
- */
- procedure = gimp_procedure_new (drawable_set_name_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-set-name");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-set-name",
- "Deprecated: Use 'gimp-item-set-name' instead.",
- "Deprecated: Use 'gimp-item-set-name' instead.",
- "",
- "",
- "",
- "gimp-item-set-name");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_string ("name",
- "name",
- "The new drawable name",
- FALSE, FALSE, FALSE,
- NULL,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-get-visible
- */
- procedure = gimp_procedure_new (drawable_get_visible_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-get-visible");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-get-visible",
- "Deprecated: Use 'gimp-item-get-visible' instead.",
- "Deprecated: Use 'gimp-item-get-visible' instead.",
- "",
- "",
- "",
- "gimp-item-get-visible");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_return_value (procedure,
- g_param_spec_boolean ("visible",
- "visible",
- "The drawable visibility",
- FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-set-visible
- */
- procedure = gimp_procedure_new (drawable_set_visible_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-set-visible");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-set-visible",
- "Deprecated: Use 'gimp-item-set-visible' instead.",
- "Deprecated: Use 'gimp-item-set-visible' instead.",
- "",
- "",
- "",
- "gimp-item-set-visible");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- g_param_spec_boolean ("visible",
- "visible",
- "The new drawable visibility",
- FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-get-linked
- */
- procedure = gimp_procedure_new (drawable_get_linked_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-get-linked");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-get-linked",
- "Deprecated: Use 'gimp-item-get-linked' instead.",
- "Deprecated: Use 'gimp-item-get-linked' instead.",
- "Wolfgang Hofer",
- "Wolfgang Hofer",
- "1998",
- "gimp-item-get-linked");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_return_value (procedure,
- g_param_spec_boolean ("linked",
- "linked",
- "The drawable linked state (for moves)",
- FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-set-linked
- */
- procedure = gimp_procedure_new (drawable_set_linked_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-set-linked");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-set-linked",
- "Deprecated: Use 'gimp-item-set-linked' instead.",
- "Deprecated: Use 'gimp-item-set-linked' instead.",
- "Wolfgang Hofer",
- "Wolfgang Hofer",
- "1998",
- "gimp-item-set-linked");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- g_param_spec_boolean ("linked",
- "linked",
- "The new drawable linked state",
- FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-get-tattoo
- */
- procedure = gimp_procedure_new (drawable_get_tattoo_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-get-tattoo");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-get-tattoo",
- "Deprecated: Use 'gimp-item-get-tattoo' instead.",
- "Deprecated: Use 'gimp-item-get-tattoo' instead.",
- "Jay Cox",
- "Jay Cox",
- "1998",
- "gimp-item-get-tattoo");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_return_value (procedure,
- g_param_spec_uint ("tattoo",
- "tattoo",
- "The drawable tattoo",
- 1, G_MAXUINT32, 1,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-drawable-set-tattoo
- */
- procedure = gimp_procedure_new (drawable_set_tattoo_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-drawable-set-tattoo");
- gimp_procedure_set_static_strings (procedure,
- "gimp-drawable-set-tattoo",
- "Deprecated: Use 'gimp-item-set-tattoo' instead.",
- "Deprecated: Use 'gimp-item-set-tattoo' instead.",
- "Jay Cox",
- "Jay Cox",
- "1998",
- "gimp-item-set-tattoo");
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- g_param_spec_uint ("tattoo",
- "tattoo",
- "The new drawable tattoo",
- 1, G_MAXUINT32, 1,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
* gimp-drawable-mask-bounds
*/
procedure = gimp_procedure_new (drawable_mask_bounds_invoker);
diff --git a/app/pdb/gimp-pdb-compat.c b/app/pdb/gimp-pdb-compat.c
index 60442f1..28117a6 100644
--- a/app/pdb/gimp-pdb-compat.c
+++ b/app/pdb/gimp-pdb-compat.c
@@ -426,6 +426,20 @@ gimp_pdb_compat_procs_register (GimpPDB *pdb,
{ "gimp-layer-set-preserve-trans", "gimp-layer-set-lock-alpha" },
/* deprecations since 2.6 */
+ { "gimp-drawable-is-valid", "gimp-item-is-valid" },
+ { "gimp-drawable-is-layer", "gimp-item-is-layer" },
+ { "gimp-drawable-is-layer-mask", "gimp-item-is-layer-mask" },
+ { "gimp-drawable-is-channel", "gimp-item-is-channel" },
+ { "gimp-drawable-delete", "gimp-item-delete" },
+ { "gimp-drawable-get-image", "gimp-item-get-image" },
+ { "gimp-drawable-get-name", "gimp-item-get-name" },
+ { "gimp-drawable-set-name", "gimp-item-set-name" },
+ { "gimp-drawable-get-visible", "gimp-item-get-visible" },
+ { "gimp-drawable-set-visible", "gimp-item-set-visible" },
+ { "gimp-drawable-get-linked", "gimp-item-get-linked" },
+ { "gimp-drawable-set-linked", "gimp-item-set-linked" },
+ { "gimp-drawable-get-tattoo", "gimp-item-get-tattoo" },
+ { "gimp-drawable-set-tattoo", "gimp-item-set-tattoo" },
{ "gimp-vectors-is-valid", "gimp-item-is-valid" },
{ "gimp-vectors-get-image", "gimp-item-get-image" },
{ "gimp-vectors-get-name", "gimp-item-get-name" },
diff --git a/app/pdb/internal-procs.c b/app/pdb/internal-procs.c
index 9e208fc..915332f 100644
--- a/app/pdb/internal-procs.c
+++ b/app/pdb/internal-procs.c
@@ -28,7 +28,7 @@
#include "internal-procs.h"
-/* 648 procedures registered total */
+/* 634 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)
diff --git a/libgimp/gimpdrawable.c b/libgimp/gimpdrawable.c
index 7a9a847..5da38b4 100644
--- a/libgimp/gimpdrawable.c
+++ b/libgimp/gimpdrawable.c
@@ -322,6 +322,212 @@ gimp_drawable_get_sub_thumbnail_data (gint32 drawable_ID,
}
/**
+ * gimp_drawable_is_valid:
+ * @drawable_ID: The drawable to check.
+ *
+ * Deprecated: Use gimp_item_is_valid() instead.
+ *
+ * Returns: Whether the drawable ID is valid.
+ *
+ * Since: GIMP 2.4
+ */
+gboolean
+gimp_drawable_is_valid (gint32 drawable_ID)
+{
+ return gimp_item_is_valid (drawable_ID);
+}
+
+/**
+ * gimp_drawable_is_layer:
+ * @drawable_ID: The drawable.
+ *
+ * Deprecated: Use gimp_item_is_layer() instead.
+ *
+ * Returns: TRUE if the drawable is a layer, FALSE otherwise.
+ */
+gboolean
+gimp_drawable_is_layer (gint32 drawable_ID)
+{
+ return gimp_item_is_layer (drawable_ID);
+}
+
+/**
+ * gimp_drawable_is_layer_mask:
+ * @drawable_ID: The drawable.
+ *
+ * Deprecated: Use gimp_item_is_layer_mask() instead.
+ *
+ * Returns: TRUE if the drawable is a layer mask, FALSE otherwise.
+ */
+gboolean
+gimp_drawable_is_layer_mask (gint32 drawable_ID)
+{
+ return gimp_item_is_layer_mask (drawable_ID);
+}
+
+/**
+ * gimp_drawable_is_channel:
+ * @drawable_ID: The drawable.
+ *
+ * Deprecated: Use gimp_item_is_channel() instead.
+ *
+ * Returns: TRUE if the drawable is a channel, FALSE otherwise.
+ */
+gboolean
+gimp_drawable_is_channel (gint32 drawable_ID)
+{
+ return gimp_item_is_channel (drawable_ID);
+}
+
+/**
+ * gimp_drawable_delete:
+ * @drawable_ID: The drawable to delete.
+ *
+ * Deprecated: Use gimp_item_delete() instead.
+ *
+ * Returns: TRUE on success.
+ */
+gboolean
+gimp_drawable_delete (gint32 drawable_ID)
+{
+ return gimp_item_delete (drawable_ID);
+}
+
+/**
+ * gimp_drawable_get_image:
+ * @drawable_ID: The drawable.
+ *
+ * Deprecated: Use gimp_item_get_image() instead.
+ *
+ * Returns: The drawable's image.
+ */
+gint32
+gimp_drawable_get_image (gint32 drawable_ID)
+{
+ return gimp_item_get_image (drawable_ID);
+}
+
+/**
+ * gimp_drawable_get_name:
+ * @drawable_ID: The drawable.
+ *
+ * Deprecated: Use gimp_item_get_name() instead.
+ *
+ * Returns: The drawable name.
+ */
+gchar *
+gimp_drawable_get_name (gint32 drawable_ID)
+{
+ return gimp_item_get_name (drawable_ID);
+}
+
+/**
+ * gimp_drawable_set_name:
+ * @drawable_ID: The drawable.
+ * @name: The new drawable name.
+ *
+ * Deprecated: Use gimp_item_set_name() instead.
+ *
+ * Returns: TRUE on success.
+ */
+gboolean
+gimp_drawable_set_name (gint32 drawable_ID,
+ const gchar *name)
+{
+ return gimp_item_set_name (drawable_ID, name);
+}
+
+/**
+ * gimp_drawable_get_visible:
+ * @drawable_ID: The drawable.
+ *
+ * Deprecated: Use gimp_item_get_visible() instead.
+ *
+ * Returns: The drawable visibility.
+ */
+gboolean
+gimp_drawable_get_visible (gint32 drawable_ID)
+{
+ return gimp_item_get_visible (drawable_ID);
+}
+
+/**
+ * gimp_drawable_set_visible:
+ * @drawable_ID: The drawable.
+ * @visible: The new drawable visibility.
+ *
+ * Deprecated: Use gimp_item_set_visible() instead.
+ *
+ * Returns: TRUE on success.
+ */
+gboolean
+gimp_drawable_set_visible (gint32 drawable_ID,
+ gboolean visible)
+{
+ return gimp_item_set_visible (drawable_ID, visible);
+}
+
+/**
+ * gimp_drawable_get_linked:
+ * @drawable_ID: The drawable.
+ *
+ * Deprecated: Use gimp_item_get_linked() instead.
+ *
+ * Returns: The drawable linked state (for moves).
+ */
+gboolean
+gimp_drawable_get_linked (gint32 drawable_ID)
+{
+ return gimp_item_get_linked (drawable_ID);
+}
+
+/**
+ * gimp_drawable_set_linked:
+ * @drawable_ID: The drawable.
+ * @linked: The new drawable linked state.
+ *
+ * Deprecated: Use gimp_item_set_linked() instead.
+ *
+ * Returns: TRUE on success.
+ */
+gboolean
+gimp_drawable_set_linked (gint32 drawable_ID,
+ gboolean linked)
+{
+ return gimp_item_set_linked (drawable_ID, linked);
+}
+
+/**
+ * gimp_drawable_get_tattoo:
+ * @drawable_ID: The drawable.
+ *
+ * Deprecated: Use gimp_item_get_tattoo() instead.
+ *
+ * Returns: The drawable tattoo.
+ */
+gint
+gimp_drawable_get_tattoo (gint32 drawable_ID)
+{
+ return gimp_item_get_tattoo (drawable_ID);
+}
+
+/**
+ * gimp_drawable_set_tattoo:
+ * @drawable_ID: The drawable.
+ * @tattoo: The new drawable tattoo.
+ *
+ * Deprecated: Use gimp_item_set_tattoo() instead.
+ *
+ * Returns: TRUE on success.
+ */
+gboolean
+gimp_drawable_set_tattoo (gint32 drawable_ID,
+ gint tattoo)
+{
+ return gimp_item_set_tattoo (drawable_ID, tattoo);
+}
+
+/**
* gimp_drawable_attach_new_parasite:
* @drawable_ID: the ID of the #GimpDrawable to attach the #GimpParasite to.
* @name: the name of the #GimpParasite to create and attach.
diff --git a/libgimp/gimpdrawable.h b/libgimp/gimpdrawable.h
index dd18987..e846ab9 100644
--- a/libgimp/gimpdrawable.h
+++ b/libgimp/gimpdrawable.h
@@ -69,6 +69,24 @@ guchar * gimp_drawable_get_sub_thumbnail_data (gint32 drawable_ID,
gint *bpp);
#ifndef GIMP_DISABLE_DEPRECATED
+gboolean gimp_drawable_is_valid (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);
+gboolean gimp_drawable_delete (gint32 drawable_ID);
+gint32 gimp_drawable_get_image (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);
+gboolean gimp_drawable_get_linked (gint32 drawable_ID);
+gboolean gimp_drawable_set_linked (gint32 drawable_ID,
+ gboolean linked);
+gint gimp_drawable_get_tattoo (gint32 drawable_ID);
+gboolean gimp_drawable_set_tattoo (gint32 drawable_ID,
+ gint tattoo);
gboolean gimp_drawable_attach_new_parasite (gint32 drawable_ID,
const gchar *name,
gint flags,
diff --git a/libgimp/gimpdrawable_pdb.c b/libgimp/gimpdrawable_pdb.c
index 18cc8aa..f055905 100644
--- a/libgimp/gimpdrawable_pdb.c
+++ b/libgimp/gimpdrawable_pdb.c
@@ -40,64 +40,6 @@
/**
- * gimp_drawable_is_valid:
- * @drawable_ID: The drawable to check.
- *
- * Deprecated: Use gimp_item_is_valid() instead.
- *
- * Returns: Whether the drawable ID is valid.
- *
- * Since: GIMP 2.4
- */
-gboolean
-gimp_drawable_is_valid (gint32 drawable_ID)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gboolean valid = FALSE;
-
- return_vals = gimp_run_procedure ("gimp-drawable-is-valid",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_END);
-
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- valid = return_vals[1].data.d_int32;
-
- gimp_destroy_params (return_vals, nreturn_vals);
-
- return valid;
-}
-
-/**
- * gimp_drawable_is_layer:
- * @drawable_ID: The drawable.
- *
- * Deprecated: Use gimp_item_is_layer() instead.
- *
- * Returns: TRUE if the drawable is a layer, FALSE otherwise.
- */
-gboolean
-gimp_drawable_is_layer (gint32 drawable_ID)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gboolean layer = FALSE;
-
- return_vals = gimp_run_procedure ("gimp-drawable-is-layer",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_END);
-
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- layer = return_vals[1].data.d_int32;
-
- gimp_destroy_params (return_vals, nreturn_vals);
-
- return layer;
-}
-
-/**
* gimp_drawable_is_text_layer:
* @drawable_ID: The drawable.
*
@@ -131,62 +73,6 @@ gimp_drawable_is_text_layer (gint32 drawable_ID)
}
/**
- * gimp_drawable_is_layer_mask:
- * @drawable_ID: The drawable.
- *
- * Deprecated: Use gimp_item_is_layer_mask() instead.
- *
- * Returns: TRUE if the drawable is a layer mask, FALSE otherwise.
- */
-gboolean
-gimp_drawable_is_layer_mask (gint32 drawable_ID)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gboolean layer_mask = FALSE;
-
- return_vals = gimp_run_procedure ("gimp-drawable-is-layer-mask",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_END);
-
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- layer_mask = return_vals[1].data.d_int32;
-
- gimp_destroy_params (return_vals, nreturn_vals);
-
- return layer_mask;
-}
-
-/**
- * gimp_drawable_is_channel:
- * @drawable_ID: The drawable.
- *
- * Deprecated: Use gimp_item_is_channel() instead.
- *
- * Returns: TRUE if the drawable is a channel, FALSE otherwise.
- */
-gboolean
-gimp_drawable_is_channel (gint32 drawable_ID)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gboolean channel = FALSE;
-
- return_vals = gimp_run_procedure ("gimp-drawable-is-channel",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_END);
-
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- channel = return_vals[1].data.d_int32;
-
- gimp_destroy_params (return_vals, nreturn_vals);
-
- return channel;
-}
-
-/**
* gimp_drawable_type:
* @drawable_ID: The drawable.
*
@@ -510,61 +396,6 @@ gimp_drawable_offsets (gint32 drawable_ID,
}
/**
- * gimp_drawable_delete:
- * @drawable_ID: The drawable to delete.
- *
- * Deprecated: Use gimp_item_delete() instead.
- *
- * Returns: TRUE on success.
- */
-gboolean
-gimp_drawable_delete (gint32 drawable_ID)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gboolean success = TRUE;
-
- return_vals = gimp_run_procedure ("gimp-drawable-delete",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_END);
-
- success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
-
- gimp_destroy_params (return_vals, nreturn_vals);
-
- return success;
-}
-
-/**
- * gimp_drawable_get_image:
- * @drawable_ID: The drawable.
- *
- * Deprecated: Use gimp_item_get_image() instead.
- *
- * Returns: The drawable's image.
- */
-gint32
-gimp_drawable_get_image (gint32 drawable_ID)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 image_ID = -1;
-
- return_vals = gimp_run_procedure ("gimp-drawable-get-image",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_END);
-
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- image_ID = return_vals[1].data.d_image;
-
- gimp_destroy_params (return_vals, nreturn_vals);
-
- return image_ID;
-}
-
-/**
* gimp_drawable_set_image:
* @drawable_ID: The drawable.
* @image_ID: The image.
@@ -595,238 +426,6 @@ gimp_drawable_set_image (gint32 drawable_ID,
}
/**
- * gimp_drawable_get_name:
- * @drawable_ID: The drawable.
- *
- * Deprecated: Use gimp_item_get_name() instead.
- *
- * 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.
- *
- * Deprecated: Use gimp_item_set_name() instead.
- *
- * 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.
- *
- * Deprecated: Use gimp_item_get_visible() instead.
- *
- * 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.
- *
- * Deprecated: Use gimp_item_set_visible() instead.
- *
- * 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_linked:
- * @drawable_ID: The drawable.
- *
- * Deprecated: Use gimp_item_get_linked() instead.
- *
- * Returns: The drawable linked state (for moves).
- */
-gboolean
-gimp_drawable_get_linked (gint32 drawable_ID)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gboolean linked = FALSE;
-
- return_vals = gimp_run_procedure ("gimp-drawable-get-linked",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_END);
-
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- linked = return_vals[1].data.d_int32;
-
- gimp_destroy_params (return_vals, nreturn_vals);
-
- return linked;
-}
-
-/**
- * gimp_drawable_set_linked:
- * @drawable_ID: The drawable.
- * @linked: The new drawable linked state.
- *
- * Deprecated: Use gimp_item_set_linked() instead.
- *
- * Returns: TRUE on success.
- */
-gboolean
-gimp_drawable_set_linked (gint32 drawable_ID,
- gboolean linked)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gboolean success = TRUE;
-
- return_vals = gimp_run_procedure ("gimp-drawable-set-linked",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_INT32, linked,
- 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.
- *
- * Deprecated: Use gimp_item_get_tattoo() instead.
- *
- * 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.
- *
- * Deprecated: Use gimp_item_set_tattoo() instead.
- *
- * 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_mask_bounds:
* @drawable_ID: The drawable.
* @x1: x coordinate of the upper left corner of selection bounds.
diff --git a/libgimp/gimpdrawable_pdb.h b/libgimp/gimpdrawable_pdb.h
index b5cf415..7f3330c 100644
--- a/libgimp/gimpdrawable_pdb.h
+++ b/libgimp/gimpdrawable_pdb.h
@@ -28,15 +28,7 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-#ifndef GIMP_DISABLE_DEPRECATED
-gboolean gimp_drawable_is_valid (gint32 drawable_ID);
-gboolean gimp_drawable_is_layer (gint32 drawable_ID);
-#endif /* GIMP_DISABLE_DEPRECATED */
gboolean gimp_drawable_is_text_layer (gint32 drawable_ID);
-#ifndef GIMP_DISABLE_DEPRECATED
-gboolean gimp_drawable_is_layer_mask (gint32 drawable_ID);
-gboolean gimp_drawable_is_channel (gint32 drawable_ID);
-#endif /* GIMP_DISABLE_DEPRECATED */
GimpImageType gimp_drawable_type (gint32 drawable_ID);
GimpImageType gimp_drawable_type_with_alpha (gint32 drawable_ID);
gboolean gimp_drawable_has_alpha (gint32 drawable_ID);
@@ -50,22 +42,8 @@ gboolean gimp_drawable_offsets (gint32
gint *offset_x,
gint *offset_y);
#ifndef GIMP_DISABLE_DEPRECATED
-gboolean gimp_drawable_delete (gint32 drawable_ID);
-gint32 gimp_drawable_get_image (gint32 drawable_ID);
gboolean gimp_drawable_set_image (gint32 drawable_ID,
gint32 image_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);
-gboolean gimp_drawable_get_linked (gint32 drawable_ID);
-gboolean gimp_drawable_set_linked (gint32 drawable_ID,
- gboolean linked);
-gint gimp_drawable_get_tattoo (gint32 drawable_ID);
-gboolean gimp_drawable_set_tattoo (gint32 drawable_ID,
- gint tattoo);
#endif /* GIMP_DISABLE_DEPRECATED */
gboolean gimp_drawable_mask_bounds (gint32 drawable_ID,
gint *x1,
diff --git a/tools/pdbgen/pdb/drawable.pdb b/tools/pdbgen/pdb/drawable.pdb
index efc342a..8660ef6 100644
--- a/tools/pdbgen/pdb/drawable.pdb
+++ b/tools/pdbgen/pdb/drawable.pdb
@@ -16,30 +16,6 @@
# "Perlized" from C source by Manish Singh <yosh gimp org>
-sub drawable_is_valid {
- &std_pdb_deprecated('gimp-item-is-valid');
- &neo_pdb_misc('2007', '2.4');
-
- @inargs = (
- { name => 'drawable', type => 'drawable', no_validate => 1,
- desc => 'The drawable to check' }
- );
-
- @outargs = (
- { name => 'valid', type => 'boolean',
- desc => 'Whether the drawable ID is valid' }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- valid = (GIMP_IS_DRAWABLE (drawable) &&
- ! gimp_item_is_removed (GIMP_ITEM (drawable)));
-}
-CODE
- );
-}
-
sub drawable_merge_shadow {
$blurb = 'Merge the shadow buffer with the specified drawable.';
@@ -288,28 +264,6 @@ CODE
);
}
-sub drawable_get_image {
- &std_pdb_deprecated('gimp-item-get-image');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' }
- );
-
- @outargs = (
- { name => 'image', type => 'image',
- desc => "The drawable's image" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- image = gimp_item_get_image (GIMP_ITEM (drawable));
-}
-CODE
- );
-}
-
sub drawable_type {
$blurb = "Returns the drawable's type.";
$help = "This procedure returns the drawable's type.";
@@ -597,28 +551,6 @@ CODE
);
}
-sub drawable_is_layer {
- &std_pdb_deprecated('gimp-item-is-layer');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' }
- );
-
- @outargs = (
- { name => 'layer', type => 'boolean',
- desc => 'TRUE if the drawable is a layer, FALSE otherwise' }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- layer = GIMP_IS_LAYER (drawable);
-}
-CODE
- );
-}
-
sub drawable_is_text_layer {
$blurb = 'Returns whether the drawable is a text layer.';
@@ -647,218 +579,6 @@ CODE
);
}
-sub drawable_is_layer_mask {
- &std_pdb_deprecated('gimp-item-is-layer-mask');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' }
- );
-
- @outargs = (
- { name => 'layer_mask', type => 'boolean',
- desc => 'TRUE if the drawable is a layer mask, FALSE otherwise' }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- layer_mask = GIMP_IS_LAYER_MASK (drawable);
-}
-CODE
- );
-}
-
-sub drawable_is_channel {
- &std_pdb_deprecated('gimp-item-is-channel');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' }
- );
-
- @outargs = (
- { name => 'channel', type => 'boolean',
- desc => 'TRUE if the drawable is a channel, FALSE otherwise' }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- channel = GIMP_IS_CHANNEL (drawable);
-}
-CODE
- );
-}
-
-sub drawable_get_name {
- &std_pdb_deprecated('gimp-item-get-name');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' }
- );
-
- @outargs = (
- { name => 'name', type => 'string',
- desc => "The drawable name" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- name = g_strdup (gimp_object_get_name (drawable));
-}
-CODE
- );
-}
-
-sub drawable_set_name {
- &std_pdb_deprecated('gimp-item-set-name');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' },
- { name => 'name', type => 'string',
- desc => "The new drawable name" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- success = gimp_item_rename (GIMP_ITEM (drawable), name, error);
-}
-CODE
- );
-}
-
-sub drawable_get_visible {
- &std_pdb_deprecated('gimp-item-get-visible');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' }
- );
-
- @outargs = (
- { name => 'visible', type => 'boolean',
- desc => "The drawable visibility" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- visible = gimp_item_get_visible (GIMP_ITEM (drawable));
-}
-CODE
- );
-}
-
-sub drawable_set_visible {
- &std_pdb_deprecated('gimp-item-set-visible');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' },
- { name => 'visible', type => 'boolean',
- desc => "The new drawable visibility" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- gimp_item_set_visible (GIMP_ITEM (drawable), visible, TRUE);
-}
-CODE
- );
-}
-
-sub drawable_get_linked {
- &std_pdb_deprecated('gimp-item-get-linked');
- &wolfgang_pdb_misc('1998');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' }
- );
-
- @outargs = (
- { name => 'linked', type => 'boolean',
- desc => "The drawable linked state (for moves)" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- linked = gimp_item_get_linked (GIMP_ITEM (drawable));
-}
-CODE
- );
-}
-
-sub drawable_set_linked {
- &std_pdb_deprecated('gimp-item-set-linked');
- &wolfgang_pdb_misc('1998');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' },
- { name => 'linked', type => 'boolean',
- desc => "The new drawable linked state" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- gimp_item_set_linked (GIMP_ITEM (drawable), linked, TRUE);
-}
-CODE
- );
-}
-
-sub drawable_get_tattoo {
- &std_pdb_deprecated('gimp-item-get-tattoo');
- &jay_pdb_misc('1998');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' }
- );
-
- @outargs = (
- { name => 'tattoo', type => 'tattoo',
- desc => "The drawable tattoo" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- tattoo = gimp_item_get_tattoo (GIMP_ITEM (drawable));
-}
-CODE
- );
-}
-
-sub drawable_set_tattoo {
- &std_pdb_deprecated('gimp-item-set-tattoo');
- &jay_pdb_misc('1998');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable' },
- { name => 'tattoo', type => 'tattoo',
- desc => "The new drawable tattoo" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- gimp_item_set_tattoo (GIMP_ITEM (drawable), tattoo);
-}
-CODE
- );
-}
-
sub drawable_get_pixel {
$blurb = 'Gets the value of the pixel at the specified coordinates.';
@@ -1206,29 +926,6 @@ CODE
);
}
-sub drawable_delete {
- &std_pdb_deprecated('gimp-item-delete');
-
- @inargs = (
- { name => 'drawable', type => 'drawable',
- desc => 'The drawable to delete' }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- if (g_object_is_floating (drawable))
- {
- g_object_ref_sink (drawable);
- g_object_unref (drawable);
- }
- else
- success = FALSE;
-}
-CODE
- );
-}
-
sub drawable_foreground_extract {
$blurb = 'Extract the foreground of a drawable using a given trimap.';
@@ -1276,21 +973,18 @@ CODE
"gimppdb-utils.h"
"gimp-intl.h");
- procs = qw(drawable_is_valid
- drawable_is_layer drawable_is_text_layer
- drawable_is_layer_mask drawable_is_channel
- drawable_type drawable_type_with_alpha drawable_has_alpha
- drawable_is_rgb drawable_is_gray drawable_is_indexed
+ procs = qw(drawable_is_text_layer
+ drawable_type
+ drawable_type_with_alpha
+ drawable_has_alpha
+ drawable_is_rgb
+ drawable_is_gray
+ drawable_is_indexed
drawable_bpp
drawable_width
drawable_height
drawable_offsets
- drawable_delete
- drawable_get_image drawable_set_image
- drawable_get_name drawable_set_name
- drawable_get_visible drawable_set_visible
- drawable_get_linked drawable_set_linked
- drawable_get_tattoo drawable_set_tattoo
+ drawable_set_image
drawable_mask_bounds
drawable_mask_intersect
drawable_merge_shadow
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]