[gimp] app, libgimp: get rid of all ID GTypes and ID param specs
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, libgimp: get rid of all ID GTypes and ID param specs
- Date: Thu, 29 Aug 2019 09:42:38 +0000 (UTC)
commit 392f00baf5dfdfe118b9a9a4935e28ab7fdd25b9
Author: Michael Natterer <mitch gimp org>
Date: Thu Aug 29 11:25:35 2019 +0200
app, libgimp: get rid of all ID GTypes and ID param specs
Turn all ID param specs into object param specs (e.g. GimpParamImageID
becomes GimpParamImage) and convert between IDs and objects in
gimpgpparams.c directly above the the wire protocol, so all of app/,
libgimp/ and plug-ins/ can deal directly with objects down to the
lowest level and not care about IDs.
Use the actual object param specs for procedure arguments and return
values again instead of a plain g_param_spec_object() and bring back
the none_ok parameter.
This implies changing the PDB type checking functions to work on pure
integers instead of IDs (one can't check whether object creation is
possible if performing that check requires the object to already
exist).
For example gimp_foo_is_valid() becomes gimp_foo_id_is_valid() and is
not involved in automatic object creation magic at the protocol
level. Added wrappers which still say gimp_foo_is_valid() and take the
respective objects.
Adapted all code, and it all becomes nicer and less convoluted, even
the generated PDB wrappers in app/ and libgimp/.
app/actions/gimpgeglprocedure.c | 26 +-
app/actions/plug-in-commands.c | 2 +-
app/actions/procedure-commands.c | 31 +-
app/actions/vectors-commands.c | 10 +-
app/core/gimpparamspecs.c | 1090 ++++---------------
app/core/gimpparamspecs.h | 407 +++-----
app/errors.c | 10 +-
app/file-data/file-data-gbr.c | 6 +-
app/file-data/file-data-gih.c | 4 +-
app/file-data/file-data-pat.c | 6 +-
app/file-data/file-data.c | 96 +-
app/file/file-open.c | 8 +-
app/file/file-save.c | 15 +-
app/gui/gui.c | 7 +-
app/pdb/channel-cmds.c | 168 +--
app/pdb/display-cmds.c | 119 ++-
app/pdb/drawable-cmds.c | 300 +++---
app/pdb/drawable-color-cmds.c | 168 +--
app/pdb/drawable-edit-cmds.c | 84 +-
app/pdb/edit-cmds.c | 144 +--
app/pdb/fileops-cmds.c | 83 +-
app/pdb/floating-sel-cmds.c | 60 +-
app/pdb/gimp-pdb-compat.c | 31 +-
app/pdb/gimpprocedure.c | 8 +-
app/pdb/image-cmds.c | 1479 +++++++++++++-------------
app/pdb/image-color-profile-cmds.c | 72 +-
app/pdb/image-convert-cmds.c | 48 +-
app/pdb/image-grid-cmds.c | 120 +--
app/pdb/image-guides-cmds.c | 72 +-
app/pdb/image-sample-points-cmds.c | 48 +-
app/pdb/image-select-cmds.c | 120 +--
app/pdb/image-transform-cmds.c | 72 +-
app/pdb/image-undo-cmds.c | 84 +-
app/pdb/item-cmds.c | 821 ++++++++-------
app/pdb/item-transform-cmds.c | 240 ++---
app/pdb/layer-cmds.c | 552 +++++-----
app/pdb/paint-tools-cmds.c | 228 ++--
app/pdb/plug-in-compat-cmds.c | 1842 ++++++++++++++++-----------------
app/pdb/progress-cmds.c | 12 +-
app/pdb/selection-cmds.c | 204 ++--
app/pdb/text-layer-cmds.c | 360 +++----
app/pdb/text-tool-cmds.c | 36 +-
app/pdb/vectors-cmds.c | 372 +++----
app/plug-in/gimpgpparams.c | 77 +-
app/plug-in/gimppluginmanager-file.c | 14 +-
app/plug-in/gimppluginprocedure.c | 50 +-
app/xcf/xcf.c | 34 +-
libgimp/gimp.c | 18 +-
libgimp/gimp.def | 73 +-
libgimp/gimpchannel_pdb.c | 52 +-
libgimp/gimpdisplay.c | 19 +
libgimp/gimpdisplay.h | 2 +
libgimp/gimpdisplay_pdb.c | 82 +-
libgimp/gimpdisplay_pdb.h | 6 +-
libgimp/gimpdrawable_pdb.c | 92 +-
libgimp/gimpdrawablecolor_pdb.c | 56 +-
libgimp/gimpdrawableedit_pdb.c | 28 +-
libgimp/gimpedit_pdb.c | 48 +-
libgimp/gimpfileops_pdb.c | 28 +-
libgimp/gimpfloatingsel_pdb.c | 20 +-
libgimp/gimpgpcompat.c | 82 +-
libgimp/gimpgpparams-body.c | 225 ++--
libgimp/gimpgpparams.c | 68 +-
libgimp/gimpimage.c | 19 +
libgimp/gimpimage.h | 2 +
libgimp/gimpimage_pdb.c | 524 +++++-----
libgimp/gimpimage_pdb.h | 6 +-
libgimp/gimpimagecolorprofile_pdb.c | 16 +-
libgimp/gimpimageconvert_pdb.c | 16 +-
libgimp/gimpimagegrid_pdb.c | 40 +-
libgimp/gimpimageguides_pdb.c | 24 +-
libgimp/gimpimageprocedure.c | 2 +
libgimp/gimpimagesamplepoints_pdb.c | 16 +-
libgimp/gimpimageselect_pdb.c | 40 +-
libgimp/gimpimagetransform_pdb.c | 24 +-
libgimp/gimpimageundo_pdb.c | 28 +-
libgimp/gimpitem.c | 147 +++
libgimp/gimpitem.h | 9 +
libgimp/gimpitem_pdb.c | 707 ++++---------
libgimp/gimpitem_pdb.h | 33 +-
libgimp/gimpitemtransform_pdb.c | 80 +-
libgimp/gimplayer_pdb.c | 176 ++--
libgimp/gimploadprocedure.c | 1 +
libgimp/gimppainttools_pdb.c | 76 +-
libgimp/gimpparamspecs.c | 1075 ++++++-------------
libgimp/gimpparamspecs.h | 383 +++----
libgimp/gimpplugin.c | 10 +-
libgimp/gimpprocedure-params.h | 108 +-
libgimp/gimpprocedure.c | 39 +-
libgimp/gimpprogress_pdb.c | 2 +-
libgimp/gimpsaveprocedure.c | 2 +
libgimp/gimpselection_pdb.c | 64 +-
libgimp/gimptextlayer_pdb.c | 120 +--
libgimp/gimptexttool_pdb.c | 12 +-
libgimp/gimpthumbnailprocedure.c | 1 +
libgimp/gimpvectors_pdb.c | 124 +--
pdb/app.pl | 90 +-
pdb/groups/display.pdb | 14 +-
pdb/groups/fileops.pdb | 5 +-
pdb/groups/image.pdb | 18 +-
pdb/groups/item.pdb | 240 +++--
pdb/lib.pl | 2 +-
pdb/pdb.pl | 126 +--
plug-ins/common/file-gbr.c | 14 +-
plug-ins/common/file-gih.c | 16 +-
plug-ins/common/file-pat.c | 12 +-
plug-ins/common/film.c | 1 +
plug-ins/common/web-page.c | 1 +
plug-ins/file-ico/ico-dialog.c | 8 +-
plug-ins/file-ico/ico-save.c | 8 +-
plug-ins/metadata/metadata-editor.c | 1 +
plug-ins/metadata/metadata-viewer.c | 1 +
plug-ins/pagecurl/pagecurl.c | 1 +
plug-ins/screenshot/screenshot.c | 1 +
plug-ins/script-fu/script-fu-script.c | 96 +-
115 files changed, 6871 insertions(+), 8449 deletions(-)
---
diff --git a/app/actions/gimpgeglprocedure.c b/app/actions/gimpgeglprocedure.c
index 0f1b1887b7..c56946cb29 100644
--- a/app/actions/gimpgeglprocedure.c
+++ b/app/actions/gimpgeglprocedure.c
@@ -242,9 +242,9 @@ gimp_gegl_procedure_execute (GimpProcedure *procedure,
GObject *config;
GeglNode *node;
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
- config = g_value_get_object (gimp_value_array_index (args, 3));
+ image = g_value_get_object (gimp_value_array_index (args, 1));
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
+ config = g_value_get_object (gimp_value_array_index (args, 3));
node = gegl_node_new_child (NULL,
"operation",
@@ -458,17 +458,17 @@ gimp_gegl_procedure_new (Gimp *gimp,
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "Input image",
- gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "Image",
+ "Input image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "Drawable",
- "Input drawable",
- gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "Drawable",
+ "Input drawable",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_object ("settings",
"Settings",
diff --git a/app/actions/plug-in-commands.c b/app/actions/plug-in-commands.c
index 9b08b6f27f..295a68bd41 100644
--- a/app/actions/plug-in-commands.c
+++ b/app/actions/plug-in-commands.c
@@ -152,7 +152,7 @@ plug_in_run_cmd_callback (GimpAction *action,
{
/* remember only image plug-ins */
if (procedure->num_args >= 2 &&
- GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]))
+ GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]))
{
gimp_filter_history_add (gimp, procedure);
}
diff --git a/app/actions/procedure-commands.c b/app/actions/procedure-commands.c
index b12fb4461e..bcb4586a0d 100644
--- a/app/actions/procedure-commands.c
+++ b/app/actions/procedure-commands.c
@@ -126,11 +126,11 @@ procedure_commands_get_image_args (GimpProcedure *procedure,
}
if (gimp_value_array_length (args) > n_args &&
- GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[n_args]))
+ GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[n_args]))
{
if (image)
{
- gimp_value_set_image (gimp_value_array_index (args, n_args), image);
+ g_value_set_object (gimp_value_array_index (args, n_args), image);
n_args++;
}
else
@@ -167,22 +167,22 @@ procedure_commands_get_item_args (GimpProcedure *procedure,
}
if (gimp_value_array_length (args) > n_args &&
- GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[n_args]))
+ GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[n_args]))
{
if (image)
{
- gimp_value_set_image (gimp_value_array_index (args, n_args), image);
+ g_value_set_object (gimp_value_array_index (args, n_args), image);
n_args++;
if (gimp_value_array_length (args) > n_args &&
- GIMP_IS_PARAM_SPEC_ITEM_ID (procedure->args[n_args]))
+ GIMP_IS_PARAM_SPEC_ITEM (procedure->args[n_args]))
{
if (item &&
g_type_is_a (G_TYPE_FROM_INSTANCE (item),
- GIMP_PARAM_SPEC_ITEM_ID (procedure->args[n_args])->item_type))
+ G_PARAM_SPEC_VALUE_TYPE (procedure->args[n_args])))
{
- gimp_value_set_item (gimp_value_array_index (args, n_args),
- item);
+ g_value_set_object (gimp_value_array_index (args, n_args),
+ item);
n_args++;
}
else
@@ -221,12 +221,11 @@ procedure_commands_get_display_args (GimpProcedure *procedure,
}
if (gimp_value_array_length (args) > n_args &&
- GIMP_IS_PARAM_SPEC_DISPLAY_ID (procedure->args[n_args]))
+ GIMP_IS_PARAM_SPEC_DISPLAY (procedure->args[n_args]))
{
if (display)
{
- gimp_value_set_display (gimp_value_array_index (args, n_args),
- GIMP_OBJECT (display));
+ g_value_set_object (gimp_value_array_index (args, n_args), display);
n_args++;
}
else
@@ -238,24 +237,24 @@ procedure_commands_get_display_args (GimpProcedure *procedure,
}
if (gimp_value_array_length (args) > n_args &&
- GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[n_args]))
+ GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[n_args]))
{
GimpImage *image = display ? gimp_display_get_image (display) : NULL;
if (image)
{
- gimp_value_set_image (gimp_value_array_index (args, n_args), image);
+ g_value_set_object (gimp_value_array_index (args, n_args), image);
n_args++;
if (gimp_value_array_length (args) > n_args &&
- GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[n_args]))
+ GIMP_IS_PARAM_SPEC_DRAWABLE (procedure->args[n_args]))
{
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (drawable)
{
- gimp_value_set_drawable (gimp_value_array_index (args, n_args),
- drawable);
+ g_value_set_object (gimp_value_array_index (args, n_args),
+ drawable);
n_args++;
}
else
diff --git a/app/actions/vectors-commands.c b/app/actions/vectors-commands.c
index 89709cf586..5a2967ac10 100644
--- a/app/actions/vectors-commands.c
+++ b/app/actions/vectors-commands.c
@@ -401,11 +401,11 @@ vectors_selection_to_vectors_cmd_callback (GimpAction *action,
args = gimp_procedure_get_arguments (procedure);
- g_value_set_enum (gimp_value_array_index (args, 0),
- advanced ?
- GIMP_RUN_INTERACTIVE : GIMP_RUN_NONINTERACTIVE);
- gimp_value_set_image (gimp_value_array_index (args, 1),
- image);
+ g_value_set_enum (gimp_value_array_index (args, 0),
+ advanced ?
+ GIMP_RUN_INTERACTIVE : GIMP_RUN_NONINTERACTIVE);
+ g_value_set_object (gimp_value_array_index (args, 1),
+ image);
gimp_procedure_execute_async (procedure, image->gimp,
action_data_get_context (data),
diff --git a/app/core/gimpparamspecs.c b/app/core/gimpparamspecs.c
index 789436b94a..5182261f4c 100644
--- a/app/core/gimpparamspecs.c
+++ b/app/core/gimpparamspecs.c
@@ -333,41 +333,16 @@ gimp_param_spec_enum_exclude_value (GimpParamSpecEnum *espec,
/*
- * GIMP_TYPE_IMAGE_ID
+ * GIMP_TYPE_PARAM_IMAGE
*/
-GType
-gimp_image_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpImageID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_IMAGE_ID
- */
-
-static void gimp_param_image_id_class_init (GParamSpecClass *klass);
-static void gimp_param_image_id_init (GParamSpec *pspec);
-static void gimp_param_image_id_set_default (GParamSpec *pspec,
- GValue *value);
-static gboolean gimp_param_image_id_validate (GParamSpec *pspec,
- GValue *value);
-static gint gimp_param_image_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2);
+static void gimp_param_image_class_init (GParamSpecClass *klass);
+static void gimp_param_image_init (GParamSpec *pspec);
+static gboolean gimp_param_image_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_image_id_get_type (void)
+gimp_param_image_get_type (void)
{
static GType type = 0;
@@ -377,163 +352,84 @@ gimp_param_image_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_image_id_class_init,
+ (GClassInitFunc) gimp_param_image_class_init,
NULL, NULL,
- sizeof (GimpParamSpecImageID),
+ sizeof (GimpParamSpecImage),
0,
- (GInstanceInitFunc) gimp_param_image_id_init
+ (GInstanceInitFunc) gimp_param_image_init
};
- type = g_type_register_static (G_TYPE_PARAM_INT,
- "GimpParamImageID", &info, 0);
+ type = g_type_register_static (G_TYPE_PARAM_OBJECT,
+ "GimpParamImage", &info, 0);
}
return type;
}
static void
-gimp_param_image_id_class_init (GParamSpecClass *klass)
+gimp_param_image_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_IMAGE_ID;
- klass->value_set_default = gimp_param_image_id_set_default;
- klass->value_validate = gimp_param_image_id_validate;
- klass->values_cmp = gimp_param_image_id_values_cmp;
+ klass->value_type = GIMP_TYPE_IMAGE;
+ klass->value_validate = gimp_param_image_validate;
}
static void
-gimp_param_image_id_init (GParamSpec *pspec)
+gimp_param_image_init (GParamSpec *pspec)
{
- GimpParamSpecImageID *ispec = GIMP_PARAM_SPEC_IMAGE_ID (pspec);
+ GimpParamSpecImage *ispec = GIMP_PARAM_SPEC_IMAGE (pspec);
- ispec->gimp = NULL;
ispec->none_ok = FALSE;
}
-static void
-gimp_param_image_id_set_default (GParamSpec *pspec,
- GValue *value)
-{
- value->data[0].v_int = -1;
-}
-
static gboolean
-gimp_param_image_id_validate (GParamSpec *pspec,
+gimp_param_image_validate (GParamSpec *pspec,
GValue *value)
{
- GimpParamSpecImageID *ispec = GIMP_PARAM_SPEC_IMAGE_ID (pspec);
- gint image_id = value->data[0].v_int;
- GimpImage *image;
-
- if (ispec->none_ok && (image_id == 0 || image_id == -1))
- return FALSE;
+ GimpParamSpecImage *ispec = GIMP_PARAM_SPEC_IMAGE (pspec);
+ GimpImage *image = value->data[0].v_pointer;
- image = gimp_image_get_by_id (ispec->gimp, image_id);
+ if (! ispec->none_ok && image == NULL)
+ return TRUE;
- if (! GIMP_IS_IMAGE (image))
+ if (image && ! GIMP_IS_IMAGE (image))
{
- value->data[0].v_int = -1;
+ g_object_unref (image);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
return FALSE;
}
-static gint
-gimp_param_image_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2)
-{
- gint image_id1 = value1->data[0].v_int;
- gint image_id2 = value2->data[0].v_int;
-
- /* try to return at least *something*, it's useless anyway... */
-
- if (image_id1 < image_id2)
- return -1;
- else if (image_id1 > image_id2)
- return 1;
- else
- return 0;
-}
-
GParamSpec *
-gimp_param_spec_image_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_image (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecImageID *ispec;
+ GimpParamSpecImage *ispec;
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_IMAGE_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_IMAGE,
name, nick, blurb, flags);
- ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
-GimpImage *
-gimp_value_get_image (const GValue *value,
- Gimp *gimp)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_IMAGE_ID (value), NULL);
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- return gimp_image_get_by_id (gimp, value->data[0].v_int);
-}
-
-void
-gimp_value_set_image (GValue *value,
- GimpImage *image)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_IMAGE_ID (value));
- g_return_if_fail (image == NULL || GIMP_IS_IMAGE (image));
-
- value->data[0].v_int = image ? gimp_image_get_id (image) : -1;
-}
-
-
-/*
- * GIMP_TYPE_ITEM_ID
- */
-
-GType
-gimp_item_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpItemID", &info, 0);
- }
-
- return type;
-}
-
/*
- * GIMP_TYPE_PARAM_ITEM_ID
+ * GIMP_TYPE_PARAM_ITEM
*/
-static void gimp_param_item_id_class_init (GParamSpecClass *klass);
-static void gimp_param_item_id_init (GParamSpec *pspec);
-static void gimp_param_item_id_set_default (GParamSpec *pspec,
- GValue *value);
-static gboolean gimp_param_item_id_validate (GParamSpec *pspec,
- GValue *value);
-static gint gimp_param_item_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2);
+static void gimp_param_item_class_init (GParamSpecClass *klass);
+static void gimp_param_item_init (GParamSpec *pspec);
+static gboolean gimp_param_item_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_item_id_get_type (void)
+gimp_param_item_get_type (void)
{
static GType type = 0;
@@ -543,209 +439,82 @@ gimp_param_item_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_item_id_class_init,
+ (GClassInitFunc) gimp_param_item_class_init,
NULL, NULL,
- sizeof (GimpParamSpecItemID),
+ sizeof (GimpParamSpecItem),
0,
- (GInstanceInitFunc) gimp_param_item_id_init
+ (GInstanceInitFunc) gimp_param_item_init
};
- type = g_type_register_static (G_TYPE_PARAM_INT,
- "GimpParamItemID", &info, 0);
+ type = g_type_register_static (G_TYPE_PARAM_OBJECT,
+ "GimpParamItem", &info, 0);
}
return type;
}
static void
-gimp_param_item_id_class_init (GParamSpecClass *klass)
+gimp_param_item_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_ITEM_ID;
- klass->value_set_default = gimp_param_item_id_set_default;
- klass->value_validate = gimp_param_item_id_validate;
- klass->values_cmp = gimp_param_item_id_values_cmp;
+ klass->value_type = GIMP_TYPE_ITEM;
+ klass->value_validate = gimp_param_item_validate;
}
static void
-gimp_param_item_id_init (GParamSpec *pspec)
+gimp_param_item_init (GParamSpec *pspec)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
-
- ispec->gimp = NULL;
- ispec->item_type = GIMP_TYPE_ITEM;
- ispec->none_ok = FALSE;
-}
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
-static void
-gimp_param_item_id_set_default (GParamSpec *pspec,
- GValue *value)
-{
- value->data[0].v_int = -1;
+ ispec->none_ok = FALSE;
}
static gboolean
-gimp_param_item_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_item_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
- gint item_id = value->data[0].v_int;
- GimpItem *item;
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
+ GimpItem *item = value->data[0].v_pointer;
- if (ispec->none_ok && (item_id == 0 || item_id == -1))
- return FALSE;
-
- item = gimp_item_get_by_id (ispec->gimp, item_id);
+ if (! ispec->none_ok && item == NULL)
+ return TRUE;
- if (! item || ! g_type_is_a (G_TYPE_FROM_INSTANCE (item), ispec->item_type))
- {
- value->data[0].v_int = -1;
- return TRUE;
- }
- else if (gimp_item_is_removed (item))
+ if (item && ! g_type_is_a (G_OBJECT_TYPE (item), pspec->value_type))
{
- value->data[0].v_int = -1;
+ g_object_unref (item);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
return FALSE;
}
-static gint
-gimp_param_item_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2)
-{
- gint item_id1 = value1->data[0].v_int;
- gint item_id2 = value2->data[0].v_int;
-
- /* try to return at least *something*, it's useless anyway... */
-
- if (item_id1 < item_id2)
- return -1;
- else if (item_id1 > item_id2)
- return 1;
- else
- return 0;
-}
-
GParamSpec *
-gimp_param_spec_item_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_item (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
-
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_ITEM_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_ITEM,
name, nick, blurb, flags);
- ispec->gimp = gimp;
ispec->none_ok = none_ok;
return G_PARAM_SPEC (ispec);
}
-GimpItem *
-gimp_value_get_item (const GValue *value,
- Gimp *gimp)
-{
- GimpItem *item;
-
- g_return_val_if_fail (GIMP_VALUE_HOLDS_ITEM_ID (value), NULL);
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- item = gimp_item_get_by_id (gimp, value->data[0].v_int);
-
- if (item && ! GIMP_IS_ITEM (item))
- return NULL;
-
- return item;
-}
-
-void
-gimp_value_set_item (GValue *value,
- GimpItem *item)
-{
- g_return_if_fail (item == NULL || GIMP_IS_ITEM (item));
-
- /* This could all be less messy, see
- * https://gitlab.gnome.org/GNOME/glib/issues/66
- */
-
- if (GIMP_VALUE_HOLDS_ITEM_ID (value))
- {
- value->data[0].v_int = item ? gimp_item_get_id (item) : -1;
- }
- else if (GIMP_VALUE_HOLDS_DRAWABLE_ID (value) &&
- (item == NULL || GIMP_IS_DRAWABLE (item)))
- {
- gimp_value_set_drawable (value, GIMP_DRAWABLE (item));
- }
- else if (GIMP_VALUE_HOLDS_LAYER_ID (value) &&
- (item == NULL || GIMP_IS_LAYER (item)))
- {
- gimp_value_set_layer (value, GIMP_LAYER (item));
- }
- else if (GIMP_VALUE_HOLDS_CHANNEL_ID (value) &&
- (item == NULL || GIMP_IS_CHANNEL (item)))
- {
- gimp_value_set_channel (value, GIMP_CHANNEL (item));
- }
- else if (GIMP_VALUE_HOLDS_LAYER_MASK_ID (value) &&
- (item == NULL || GIMP_IS_LAYER_MASK (item)))
- {
- gimp_value_set_layer_mask (value, GIMP_LAYER_MASK (item));
- }
- else if (GIMP_VALUE_HOLDS_SELECTION_ID (value) &&
- (item == NULL || GIMP_IS_SELECTION (item)))
- {
- gimp_value_set_selection (value, GIMP_SELECTION (item));
- }
- else if (GIMP_VALUE_HOLDS_VECTORS_ID (value) &&
- (item == NULL || GIMP_IS_VECTORS (item)))
- {
- gimp_value_set_vectors (value, GIMP_VECTORS (item));
- }
- else
- {
- g_return_if_reached ();
- }
-}
-
/*
- * GIMP_TYPE_DRAWABLE_ID
+ * GIMP_TYPE_PARAM_DRAWABLE
*/
-GType
-gimp_drawable_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpDrawableID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_DRAWABLE_ID
- */
-
-static void gimp_param_drawable_id_class_init (GParamSpecClass *klass);
-static void gimp_param_drawable_id_init (GParamSpec *pspec);
+static void gimp_param_drawable_class_init (GParamSpecClass *klass);
+static void gimp_param_drawable_init (GParamSpec *pspec);
GType
-gimp_param_drawable_id_get_type (void)
+gimp_param_drawable_get_type (void)
{
static GType type = 0;
@@ -755,140 +524,58 @@ gimp_param_drawable_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_drawable_id_class_init,
+ (GClassInitFunc) gimp_param_drawable_class_init,
NULL, NULL,
- sizeof (GimpParamSpecDrawableID),
+ sizeof (GimpParamSpecDrawable),
0,
- (GInstanceInitFunc) gimp_param_drawable_id_init
+ (GInstanceInitFunc) gimp_param_drawable_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_ITEM_ID,
- "GimpParamDrawableID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_ITEM,
+ "GimpParamDrawable", &info, 0);
}
return type;
}
static void
-gimp_param_drawable_id_class_init (GParamSpecClass *klass)
+gimp_param_drawable_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_DRAWABLE_ID;
+ klass->value_type = GIMP_TYPE_DRAWABLE;
}
static void
-gimp_param_drawable_id_init (GParamSpec *pspec)
+gimp_param_drawable_init (GParamSpec *pspec)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
-
- ispec->item_type = GIMP_TYPE_DRAWABLE;
}
GParamSpec *
-gimp_param_spec_drawable_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_drawable (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
-
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DRAWABLE_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DRAWABLE,
name, nick, blurb, flags);
- ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
-GimpDrawable *
-gimp_value_get_drawable (const GValue *value,
- Gimp *gimp)
-{
- GimpItem *item;
-
- g_return_val_if_fail (GIMP_VALUE_HOLDS_DRAWABLE_ID (value), NULL);
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- item = gimp_item_get_by_id (gimp, value->data[0].v_int);
-
- if (item && ! GIMP_IS_DRAWABLE (item))
- return NULL;
-
- return GIMP_DRAWABLE (item);
-}
-
-void
-gimp_value_set_drawable (GValue *value,
- GimpDrawable *drawable)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_DRAWABLE_ID (value));
- g_return_if_fail (drawable == NULL || GIMP_IS_DRAWABLE (drawable));
-
- if (GIMP_VALUE_HOLDS_DRAWABLE_ID (value))
- {
- value->data[0].v_int =
- drawable ? gimp_item_get_id (GIMP_ITEM (drawable)) : -1;
- }
- else if (GIMP_VALUE_HOLDS_LAYER_ID (value) &&
- (drawable == NULL || GIMP_IS_LAYER (drawable)))
- {
- gimp_value_set_layer (value, GIMP_LAYER (drawable));
- }
- else if (GIMP_VALUE_HOLDS_CHANNEL_ID (value) &&
- (drawable == NULL || GIMP_IS_CHANNEL (drawable)))
- {
- gimp_value_set_channel (value, GIMP_CHANNEL (drawable));
- }
- else if (GIMP_VALUE_HOLDS_LAYER_MASK_ID (value) &&
- (drawable == NULL || GIMP_IS_LAYER_MASK (drawable)))
- {
- gimp_value_set_layer_mask (value, GIMP_LAYER_MASK (drawable));
- }
- else if (GIMP_VALUE_HOLDS_SELECTION_ID (value) &&
- (drawable == NULL || GIMP_IS_SELECTION (drawable)))
- {
- gimp_value_set_selection (value, GIMP_SELECTION (drawable));
- }
- else
- {
- g_return_if_reached ();
- }
-}
-
/*
- * GIMP_TYPE_LAYER_ID
+ * GIMP_TYPE_PARAM_LAYER
*/
-GType
-gimp_layer_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpLayerID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_LAYER_ID
- */
-
-static void gimp_param_layer_id_class_init (GParamSpecClass *klass);
-static void gimp_param_layer_id_init (GParamSpec *pspec);
+static void gimp_param_layer_class_init (GParamSpecClass *klass);
+static void gimp_param_layer_init (GParamSpec *pspec);
GType
-gimp_param_layer_id_get_type (void)
+gimp_param_layer_get_type (void)
{
static GType type = 0;
@@ -898,112 +585,58 @@ gimp_param_layer_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_layer_id_class_init,
+ (GClassInitFunc) gimp_param_layer_class_init,
NULL, NULL,
- sizeof (GimpParamSpecLayerID),
+ sizeof (GimpParamSpecLayer),
0,
- (GInstanceInitFunc) gimp_param_layer_id_init
+ (GInstanceInitFunc) gimp_param_layer_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_DRAWABLE_ID,
- "GimpParamLayerID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_DRAWABLE,
+ "GimpParamLayer", &info, 0);
}
return type;
}
static void
-gimp_param_layer_id_class_init (GParamSpecClass *klass)
+gimp_param_layer_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_LAYER_ID;
+ klass->value_type = GIMP_TYPE_LAYER;
}
static void
-gimp_param_layer_id_init (GParamSpec *pspec)
+gimp_param_layer_init (GParamSpec *pspec)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
-
- ispec->item_type = GIMP_TYPE_LAYER;
}
GParamSpec *
-gimp_param_spec_layer_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_layer (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
-
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER,
name, nick, blurb, flags);
- ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
-GimpLayer *
-gimp_value_get_layer (const GValue *value,
- Gimp *gimp)
-{
- GimpItem *item;
-
- g_return_val_if_fail (GIMP_VALUE_HOLDS_LAYER_ID (value), NULL);
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- item = gimp_item_get_by_id (gimp, value->data[0].v_int);
-
- if (item && ! GIMP_IS_LAYER (item))
- return NULL;
-
- return GIMP_LAYER (item);
-}
-
-void
-gimp_value_set_layer (GValue *value,
- GimpLayer *layer)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_LAYER_ID (value));
- g_return_if_fail (layer == NULL || GIMP_IS_LAYER (layer));
-
- value->data[0].v_int = layer ? gimp_item_get_id (GIMP_ITEM (layer)) : -1;
-}
-
/*
- * GIMP_TYPE_CHANNEL_ID
+ * GIMP_TYPE_PARAM_CHANNEL
*/
-GType
-gimp_channel_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpChannelID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_CHANNEL_ID
- */
-
-static void gimp_param_channel_id_class_init (GParamSpecClass *klass);
-static void gimp_param_channel_id_init (GParamSpec *pspec);
+static void gimp_param_channel_class_init (GParamSpecClass *klass);
+static void gimp_param_channel_init (GParamSpec *pspec);
GType
-gimp_param_channel_id_get_type (void)
+gimp_param_channel_get_type (void)
{
static GType type = 0;
@@ -1013,130 +646,58 @@ gimp_param_channel_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_channel_id_class_init,
+ (GClassInitFunc) gimp_param_channel_class_init,
NULL, NULL,
- sizeof (GimpParamSpecChannelID),
+ sizeof (GimpParamSpecChannel),
0,
- (GInstanceInitFunc) gimp_param_channel_id_init
+ (GInstanceInitFunc) gimp_param_channel_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_DRAWABLE_ID,
- "GimpParamChannelID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_DRAWABLE,
+ "GimpParamChannel", &info, 0);
}
return type;
}
static void
-gimp_param_channel_id_class_init (GParamSpecClass *klass)
+gimp_param_channel_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_CHANNEL_ID;
+ klass->value_type = GIMP_TYPE_CHANNEL;
}
static void
-gimp_param_channel_id_init (GParamSpec *pspec)
+gimp_param_channel_init (GParamSpec *pspec)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
-
- ispec->item_type = GIMP_TYPE_CHANNEL;
}
GParamSpec *
-gimp_param_spec_channel_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_channel (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
-
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_CHANNEL_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_CHANNEL,
name, nick, blurb, flags);
- ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
-GimpChannel *
-gimp_value_get_channel (const GValue *value,
- Gimp *gimp)
-{
- GimpItem *item;
-
- g_return_val_if_fail (GIMP_VALUE_HOLDS_CHANNEL_ID (value), NULL);
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- item = gimp_item_get_by_id (gimp, value->data[0].v_int);
-
- if (item && ! GIMP_IS_CHANNEL (item))
- return NULL;
-
- return GIMP_CHANNEL (item);
-}
-
-void
-gimp_value_set_channel (GValue *value,
- GimpChannel *channel)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_CHANNEL_ID (value));
- g_return_if_fail (channel == NULL || GIMP_IS_CHANNEL (channel));
-
- if (GIMP_VALUE_HOLDS_CHANNEL_ID (value))
- {
- value->data[0].v_int =
- channel ? gimp_item_get_id (GIMP_ITEM (channel)) : -1;
- }
- else if (GIMP_VALUE_HOLDS_LAYER_MASK_ID (value) &&
- (channel == NULL || GIMP_IS_LAYER_MASK (channel)))
- {
- gimp_value_set_layer_mask (value, GIMP_LAYER_MASK (channel));
- }
- else if (GIMP_VALUE_HOLDS_SELECTION_ID (value) &&
- (channel == NULL || GIMP_IS_SELECTION (channel)))
- {
- gimp_value_set_selection (value, GIMP_SELECTION (channel));
- }
- else
- {
- g_return_if_reached ();
- }
-}
-
-
-/*
- * GIMP_TYPE_LAYER_MASK_ID
- */
-
-GType
-gimp_layer_mask_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpLayerMaskID", &info, 0);
- }
-
- return type;
-}
-
/*
- * GIMP_TYPE_PARAM_LAYER_MASK_ID
+ * GIMP_TYPE_PARAM_LAYER_MASK
*/
-static void gimp_param_layer_mask_id_class_init (GParamSpecClass *klass);
-static void gimp_param_layer_mask_id_init (GParamSpec *pspec);
+static void gimp_param_layer_mask_class_init (GParamSpecClass *klass);
+static void gimp_param_layer_mask_init (GParamSpec *pspec);
GType
-gimp_param_layer_mask_id_get_type (void)
+gimp_param_layer_mask_get_type (void)
{
static GType type = 0;
@@ -1146,113 +707,58 @@ gimp_param_layer_mask_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_layer_mask_id_class_init,
+ (GClassInitFunc) gimp_param_layer_mask_class_init,
NULL, NULL,
- sizeof (GimpParamSpecLayerMaskID),
+ sizeof (GimpParamSpecLayerMask),
0,
- (GInstanceInitFunc) gimp_param_layer_mask_id_init
+ (GInstanceInitFunc) gimp_param_layer_mask_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_CHANNEL_ID,
- "GimpParamLayerMaskID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_CHANNEL,
+ "GimpParamLayerMask", &info, 0);
}
return type;
}
static void
-gimp_param_layer_mask_id_class_init (GParamSpecClass *klass)
+gimp_param_layer_mask_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_LAYER_MASK_ID;
+ klass->value_type = GIMP_TYPE_LAYER_MASK;
}
static void
-gimp_param_layer_mask_id_init (GParamSpec *pspec)
+gimp_param_layer_mask_init (GParamSpec *pspec)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
-
- ispec->item_type = GIMP_TYPE_LAYER_MASK;
}
GParamSpec *
-gimp_param_spec_layer_mask_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_layer_mask (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
-
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER_MASK_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER_MASK,
name, nick, blurb, flags);
- ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
-GimpLayerMask *
-gimp_value_get_layer_mask (const GValue *value,
- Gimp *gimp)
-{
- GimpItem *item;
-
- g_return_val_if_fail (GIMP_VALUE_HOLDS_LAYER_MASK_ID (value), NULL);
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- item = gimp_item_get_by_id (gimp, value->data[0].v_int);
-
- if (item && ! GIMP_IS_LAYER_MASK (item))
- return NULL;
-
- return GIMP_LAYER_MASK (item);
-}
-
-void
-gimp_value_set_layer_mask (GValue *value,
- GimpLayerMask *layer_mask)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_LAYER_MASK_ID (value));
- g_return_if_fail (layer_mask == NULL || GIMP_IS_LAYER_MASK (layer_mask));
-
- value->data[0].v_int =
- layer_mask ? gimp_item_get_id (GIMP_ITEM (layer_mask)) : -1;
-}
-
-
-/*
- * GIMP_TYPE_SELECTION_ID
- */
-
-GType
-gimp_selection_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpSelectionID", &info, 0);
- }
-
- return type;
-}
-
/*
- * GIMP_TYPE_PARAM_SELECTION_ID
+ * GIMP_TYPE_PARAM_SELECTION
*/
-static void gimp_param_selection_id_class_init (GParamSpecClass *klass);
-static void gimp_param_selection_id_init (GParamSpec *pspec);
+static void gimp_param_selection_class_init (GParamSpecClass *klass);
+static void gimp_param_selection_init (GParamSpec *pspec);
GType
-gimp_param_selection_id_get_type (void)
+gimp_param_selection_get_type (void)
{
static GType type = 0;
@@ -1262,113 +768,58 @@ gimp_param_selection_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_selection_id_class_init,
+ (GClassInitFunc) gimp_param_selection_class_init,
NULL, NULL,
- sizeof (GimpParamSpecSelectionID),
+ sizeof (GimpParamSpecSelection),
0,
- (GInstanceInitFunc) gimp_param_selection_id_init
+ (GInstanceInitFunc) gimp_param_selection_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_CHANNEL_ID,
- "GimpParamSelectionID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_CHANNEL,
+ "GimpParamSelection", &info, 0);
}
return type;
}
static void
-gimp_param_selection_id_class_init (GParamSpecClass *klass)
+gimp_param_selection_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_SELECTION_ID;
+ klass->value_type = GIMP_TYPE_SELECTION;
}
static void
-gimp_param_selection_id_init (GParamSpec *pspec)
+gimp_param_selection_init (GParamSpec *pspec)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
-
- ispec->item_type = GIMP_TYPE_SELECTION;
}
GParamSpec *
-gimp_param_spec_selection_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_selection (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
-
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_SELECTION_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_SELECTION,
name, nick, blurb, flags);
- ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
-GimpSelection *
-gimp_value_get_selection (const GValue *value,
- Gimp *gimp)
-{
- GimpItem *item;
-
- g_return_val_if_fail (GIMP_VALUE_HOLDS_SELECTION_ID (value), NULL);
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- item = gimp_item_get_by_id (gimp, value->data[0].v_int);
-
- if (item && ! GIMP_IS_SELECTION (item))
- return NULL;
-
- return GIMP_SELECTION (item);
-}
-
-void
-gimp_value_set_selection (GValue *value,
- GimpSelection *selection)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_SELECTION_ID (value));
- g_return_if_fail (selection == NULL || GIMP_IS_SELECTION (selection));
-
- value->data[0].v_int =
- selection ? gimp_item_get_id (GIMP_ITEM (selection)) : -1;
-}
-
/*
- * GIMP_TYPE_VECTORS_ID
+ * GIMP_TYPE_PARAM_VECTORS
*/
-GType
-gimp_vectors_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpVectorsID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_VECTORS_ID
- */
-
-static void gimp_param_vectors_id_class_init (GParamSpecClass *klass);
-static void gimp_param_vectors_id_init (GParamSpec *pspec);
+static void gimp_param_vectors_class_init (GParamSpecClass *klass);
+static void gimp_param_vectors_init (GParamSpec *pspec);
GType
-gimp_param_vectors_id_get_type (void)
+gimp_param_vectors_get_type (void)
{
static GType type = 0;
@@ -1378,120 +829,60 @@ gimp_param_vectors_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_vectors_id_class_init,
+ (GClassInitFunc) gimp_param_vectors_class_init,
NULL, NULL,
- sizeof (GimpParamSpecVectorsID),
+ sizeof (GimpParamSpecVectors),
0,
- (GInstanceInitFunc) gimp_param_vectors_id_init
+ (GInstanceInitFunc) gimp_param_vectors_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_ITEM_ID,
- "GimpParamVectorsID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_ITEM,
+ "GimpParamVectors", &info, 0);
}
return type;
}
static void
-gimp_param_vectors_id_class_init (GParamSpecClass *klass)
+gimp_param_vectors_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_VECTORS_ID;
+ klass->value_type = GIMP_TYPE_VECTORS;
}
static void
-gimp_param_vectors_id_init (GParamSpec *pspec)
+gimp_param_vectors_init (GParamSpec *pspec)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
-
- ispec->item_type = GIMP_TYPE_VECTORS;
}
GParamSpec *
-gimp_param_spec_vectors_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_vectors (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
-
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_VECTORS_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_VECTORS,
name, nick, blurb, flags);
- ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
-GimpVectors *
-gimp_value_get_vectors (const GValue *value,
- Gimp *gimp)
-{
- GimpItem *item;
-
- g_return_val_if_fail (GIMP_VALUE_HOLDS_VECTORS_ID (value), NULL);
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- item = gimp_item_get_by_id (gimp, value->data[0].v_int);
-
- if (item && ! GIMP_IS_VECTORS (item))
- return NULL;
-
- return GIMP_VECTORS (item);
-}
-
-void
-gimp_value_set_vectors (GValue *value,
- GimpVectors *vectors)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_VECTORS_ID (value));
- g_return_if_fail (vectors == NULL || GIMP_IS_VECTORS (vectors));
-
- value->data[0].v_int =
- vectors ? gimp_item_get_id (GIMP_ITEM (vectors)) : -1;
-}
-
/*
- * GIMP_TYPE_DISPLAY_ID
+ * GIMP_TYPE_PARAM_DISPLAY
*/
-GType
-gimp_display_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpDisplayID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_DISPLAY_ID
- */
-
-static void gimp_param_display_id_class_init (GParamSpecClass *klass);
-static void gimp_param_display_id_init (GParamSpec *pspec);
-static void gimp_param_display_id_set_default (GParamSpec *pspec,
- GValue *value);
-static gboolean gimp_param_display_id_validate (GParamSpec *pspec,
+static void gimp_param_display_class_init (GParamSpecClass *klass);
+static void gimp_param_display_init (GParamSpec *pspec);
+static gboolean gimp_param_display_validate (GParamSpec *pspec,
GValue *value);
-static gint gimp_param_display_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2);
GType
-gimp_param_display_id_get_type (void)
+gimp_param_display_get_type (void)
{
static GType type = 0;
@@ -1501,127 +892,72 @@ gimp_param_display_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_display_id_class_init,
+ (GClassInitFunc) gimp_param_display_class_init,
NULL, NULL,
- sizeof (GimpParamSpecDisplayID),
+ sizeof (GimpParamSpecDisplay),
0,
- (GInstanceInitFunc) gimp_param_display_id_init
+ (GInstanceInitFunc) gimp_param_display_init
};
- type = g_type_register_static (G_TYPE_PARAM_INT,
- "GimpParamDisplayID", &info, 0);
+ type = g_type_register_static (G_TYPE_PARAM_OBJECT,
+ "GimpParamDisplay", &info, 0);
}
return type;
}
static void
-gimp_param_display_id_class_init (GParamSpecClass *klass)
+gimp_param_display_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_DISPLAY_ID;
- klass->value_set_default = gimp_param_display_id_set_default;
- klass->value_validate = gimp_param_display_id_validate;
- klass->values_cmp = gimp_param_display_id_values_cmp;
-}
+ klass->value_type = g_type_from_name ("GimpDisplay");
-static void
-gimp_param_display_id_init (GParamSpec *pspec)
-{
- GimpParamSpecDisplayID *ispec = GIMP_PARAM_SPEC_DISPLAY_ID (pspec);
+ g_assert (klass->value_type != G_TYPE_NONE);
- ispec->gimp = NULL;
- ispec->none_ok = FALSE;
+ klass->value_validate = gimp_param_display_validate;
}
static void
-gimp_param_display_id_set_default (GParamSpec *pspec,
- GValue *value)
+gimp_param_display_init (GParamSpec *pspec)
{
- value->data[0].v_int = -1;
+ GimpParamSpecDisplay *ispec = GIMP_PARAM_SPEC_DISPLAY (pspec);
+
+ ispec->none_ok = FALSE;
}
static gboolean
-gimp_param_display_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_display_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecDisplayID *ispec = GIMP_PARAM_SPEC_DISPLAY_ID (pspec);
- gint display_id = value->data[0].v_int;
- GimpObject *display;
+ GimpParamSpecDisplay *ispec = GIMP_PARAM_SPEC_DISPLAY (pspec);
+ GObject *display = value->data[0].v_pointer;
- if (ispec->none_ok && (display_id == 0 || display_id == -1))
- return FALSE;
-
- display = gimp_get_display_by_id (ispec->gimp, display_id);
+ if (! ispec->none_ok && display == NULL)
+ return TRUE;
- if (! GIMP_IS_OBJECT (display))
+ if (display && ! g_value_type_compatible (G_OBJECT_TYPE (display),
+ G_PARAM_SPEC_VALUE_TYPE (pspec)))
{
- value->data[0].v_int = -1;
+ g_object_unref (display);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
return FALSE;
}
-static gint
-gimp_param_display_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2)
-{
- gint display_id1 = value1->data[0].v_int;
- gint display_id2 = value2->data[0].v_int;
-
- /* try to return at least *something*, it's useless anyway... */
-
- if (display_id1 < display_id2)
- return -1;
- else if (display_id1 > display_id2)
- return 1;
- else
- return 0;
-}
-
GParamSpec *
-gimp_param_spec_display_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_display (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecDisplayID *ispec;
+ GimpParamSpecDisplay *ispec;
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DISPLAY_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DISPLAY,
name, nick, blurb, flags);
- ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
-
-GimpObject *
-gimp_value_get_display (const GValue *value,
- Gimp *gimp)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_DISPLAY_ID (value), NULL);
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
-
- return gimp_get_display_by_id (gimp, value->data[0].v_int);
-}
-
-void
-gimp_value_set_display (GValue *value,
- GimpObject *display)
-{
- gint id = -1;
-
- g_return_if_fail (GIMP_VALUE_HOLDS_DISPLAY_ID (value));
- g_return_if_fail (display == NULL || GIMP_IS_OBJECT (display));
-
- if (display)
- g_object_get (display, "id", &id, NULL);
-
- value->data[0].v_int = id;
-}
diff --git a/app/core/gimpparamspecs.h b/app/core/gimpparamspecs.h
index ef6ab5e913..c89a615718 100644
--- a/app/core/gimpparamspecs.h
+++ b/app/core/gimpparamspecs.h
@@ -81,383 +81,252 @@ void gimp_param_spec_enum_exclude_value (GimpParamSpecEnum *espec,
/*
- * GIMP_TYPE_IMAGE_ID
+ * GIMP_TYPE_PARAM_IMAGE
*/
-#define GIMP_TYPE_IMAGE_ID (gimp_image_id_get_type ())
-#define GIMP_VALUE_HOLDS_IMAGE_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_IMAGE_ID))
+#define GIMP_VALUE_HOLDS_IMAGE(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_IMAGE))
-GType gimp_image_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_IMAGE (gimp_param_image_get_type ())
+#define GIMP_PARAM_SPEC_IMAGE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_IMAGE,
GimpParamSpecImage))
+#define GIMP_IS_PARAM_SPEC_IMAGE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_IMAGE))
+typedef struct _GimpParamSpecImage GimpParamSpecImage;
-/*
- * GIMP_TYPE_PARAM_IMAGE_ID
- */
-
-#define GIMP_TYPE_PARAM_IMAGE_ID (gimp_param_image_id_get_type ())
-#define GIMP_PARAM_SPEC_IMAGE_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_IMAGE_ID,
GimpParamSpecImageID))
-#define GIMP_IS_PARAM_SPEC_IMAGE_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_IMAGE_ID))
-
-typedef struct _GimpParamSpecImageID GimpParamSpecImageID;
-
-struct _GimpParamSpecImageID
+struct _GimpParamSpecImage
{
- GParamSpecInt parent_instance;
+ GParamSpecObject parent_instance;
- Gimp *gimp;
- gboolean none_ok;
+ gboolean none_ok;
};
-GType gimp_param_image_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_image_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags);
-
-GimpImage * gimp_value_get_image (const GValue *value,
- Gimp *gimp);
-void gimp_value_set_image (GValue *value,
- GimpImage *image);
+GType gimp_param_image_get_type (void) G_GNUC_CONST;
+GParamSpec * gimp_param_spec_image (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_ITEM_ID
+ * GIMP_TYPE_PARAM_ITEM
*/
-#define GIMP_TYPE_ITEM_ID (gimp_item_id_get_type ())
-#define GIMP_VALUE_HOLDS_ITEM_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_ITEM_ID))
+#define GIMP_VALUE_HOLDS_ITEM(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_ITEM))
-GType gimp_item_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_ITEM (gimp_param_item_get_type ())
+#define GIMP_PARAM_SPEC_ITEM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_ITEM,
GimpParamSpecItem))
+#define GIMP_IS_PARAM_SPEC_ITEM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_ITEM))
+typedef struct _GimpParamSpecItem GimpParamSpecItem;
-/*
- * GIMP_TYPE_PARAM_ITEM_ID
- */
-
-#define GIMP_TYPE_PARAM_ITEM_ID (gimp_param_item_id_get_type ())
-#define GIMP_PARAM_SPEC_ITEM_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_ITEM_ID,
GimpParamSpecItemID))
-#define GIMP_IS_PARAM_SPEC_ITEM_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_ITEM_ID))
-
-typedef struct _GimpParamSpecItemID GimpParamSpecItemID;
-
-struct _GimpParamSpecItemID
+struct _GimpParamSpecItem
{
- GParamSpecInt parent_instance;
+ GParamSpecObject parent_instance;
- Gimp *gimp;
- GType item_type;
- gboolean none_ok;
+ gboolean none_ok;
};
-GType gimp_param_item_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_item_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_item_get_type (void) G_GNUC_CONST;
-GimpItem * gimp_value_get_item (const GValue *value,
- Gimp *gimp);
-void gimp_value_set_item (GValue *value,
- GimpItem *item);
+GParamSpec * gimp_param_spec_item (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_DRAWABLE_ID
+ * GIMP_TYPE_PARAM_DRAWABLE
*/
-#define GIMP_TYPE_DRAWABLE_ID (gimp_drawable_id_get_type ())
-#define GIMP_VALUE_HOLDS_DRAWABLE_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_DRAWABLE_ID))
+#define GIMP_VALUE_HOLDS_DRAWABLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_DRAWABLE))
-GType gimp_drawable_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_DRAWABLE (gimp_param_drawable_get_type ())
+#define GIMP_PARAM_SPEC_DRAWABLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_DRAWABLE,
GimpParamSpecDrawable))
+#define GIMP_IS_PARAM_SPEC_DRAWABLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_DRAWABLE))
+typedef struct _GimpParamSpecDrawable GimpParamSpecDrawable;
-/*
- * GIMP_TYPE_PARAM_DRAWABLE_ID
- */
-
-#define GIMP_TYPE_PARAM_DRAWABLE_ID (gimp_param_drawable_id_get_type ())
-#define GIMP_PARAM_SPEC_DRAWABLE_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_DRAWABLE_ID, GimpParamSpecDrawableID))
-#define GIMP_IS_PARAM_SPEC_DRAWABLE_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_DRAWABLE_ID))
-
-typedef struct _GimpParamSpecDrawableID GimpParamSpecDrawableID;
-
-struct _GimpParamSpecDrawableID
+struct _GimpParamSpecDrawable
{
- GimpParamSpecItemID parent_instance;
+ GimpParamSpecItem parent_instance;
};
-GType gimp_param_drawable_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_drawable_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_drawable_get_type (void) G_GNUC_CONST;
-GimpDrawable * gimp_value_get_drawable (const GValue *value,
- Gimp *gimp);
-void gimp_value_set_drawable (GValue *value,
- GimpDrawable *drawable);
+GParamSpec * gimp_param_spec_drawable (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_LAYER_ID
+ * GIMP_TYPE_PARAM_LAYER
*/
-#define GIMP_TYPE_LAYER_ID (gimp_layer_id_get_type ())
-#define GIMP_VALUE_HOLDS_LAYER_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_LAYER_ID))
+#define GIMP_VALUE_HOLDS_LAYER(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_LAYER))
-GType gimp_layer_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_LAYER (gimp_param_layer_get_type ())
+#define GIMP_PARAM_SPEC_LAYER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_LAYER,
GimpParamSpecLayer))
+#define GIMP_IS_PARAM_SPEC_LAYER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_LAYER))
+typedef struct _GimpParamSpecLayer GimpParamSpecLayer;
-/*
- * GIMP_TYPE_PARAM_LAYER_ID
- */
-
-#define GIMP_TYPE_PARAM_LAYER_ID (gimp_param_layer_id_get_type ())
-#define GIMP_PARAM_SPEC_LAYER_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_LAYER_ID,
GimpParamSpecLayerID))
-#define GIMP_IS_PARAM_SPEC_LAYER_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_LAYER_ID))
-
-typedef struct _GimpParamSpecLayerID GimpParamSpecLayerID;
-
-struct _GimpParamSpecLayerID
+struct _GimpParamSpecLayer
{
- GimpParamSpecDrawableID parent_instance;
+ GimpParamSpecDrawable parent_instance;
};
-GType gimp_param_layer_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_layer_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_layer_get_type (void) G_GNUC_CONST;
-GimpLayer * gimp_value_get_layer (const GValue *value,
- Gimp *gimp);
-void gimp_value_set_layer (GValue *value,
- GimpLayer *layer);
+GParamSpec * gimp_param_spec_layer (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_CHANNEL_ID
+ * GIMP_TYPE_PARAM_CHANNEL
*/
-#define GIMP_TYPE_CHANNEL_ID (gimp_channel_id_get_type ())
-#define GIMP_VALUE_HOLDS_CHANNEL_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_CHANNEL_ID))
+#define GIMP_VALUE_HOLDS_CHANNEL(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_CHANNEL))
-GType gimp_channel_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_CHANNEL (gimp_param_channel_get_type ())
+#define GIMP_PARAM_SPEC_CHANNEL(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_CHANNEL,
GimpParamSpecChannel))
+#define GIMP_IS_PARAM_SPEC_CHANNEL(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_CHANNEL))
+typedef struct _GimpParamSpecChannel GimpParamSpecChannel;
-/*
- * GIMP_TYPE_PARAM_CHANNEL_ID
- */
-
-#define GIMP_TYPE_PARAM_CHANNEL_ID (gimp_param_channel_id_get_type ())
-#define GIMP_PARAM_SPEC_CHANNEL_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_CHANNEL_ID, GimpParamSpecChannelID))
-#define GIMP_IS_PARAM_SPEC_CHANNEL_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_CHANNEL_ID))
-
-typedef struct _GimpParamSpecChannelID GimpParamSpecChannelID;
-
-struct _GimpParamSpecChannelID
+struct _GimpParamSpecChannel
{
- GimpParamSpecDrawableID parent_instance;
+ GimpParamSpecDrawable parent_instance;
};
-GType gimp_param_channel_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_channel_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_channel_get_type (void) G_GNUC_CONST;
-GimpChannel * gimp_value_get_channel (const GValue *value,
- Gimp *gimp);
-void gimp_value_set_channel (GValue *value,
- GimpChannel *channel);
+GParamSpec * gimp_param_spec_channel (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_LAYER_MASK_ID
+ * GIMP_TYPE_PARAM_LAYER_MASK
*/
-#define GIMP_TYPE_LAYER_MASK_ID (gimp_layer_mask_id_get_type ())
-#define GIMP_VALUE_HOLDS_LAYER_MASK_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_LAYER_MASK_ID))
+#define GIMP_VALUE_HOLDS_LAYER_MASK(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_LAYER_MASK))
-GType gimp_layer_mask_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_LAYER_MASK (gimp_param_layer_mask_get_type ())
+#define GIMP_PARAM_SPEC_LAYER_MASK(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_LAYER_MASK, GimpParamSpecLayerMask))
+#define GIMP_IS_PARAM_SPEC_LAYER_MASK(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_LAYER_MASK))
+typedef struct _GimpParamSpecLayerMask GimpParamSpecLayerMask;
-/*
- * GIMP_TYPE_PARAM_LAYER_MASK_ID
- */
-
-#define GIMP_TYPE_PARAM_LAYER_MASK_ID (gimp_param_layer_mask_id_get_type ())
-#define GIMP_PARAM_SPEC_LAYER_MASK_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_LAYER_MASK_ID, GimpParamSpecLayerMaskID))
-#define GIMP_IS_PARAM_SPEC_LAYER_MASK_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_LAYER_MASK_ID))
-
-typedef struct _GimpParamSpecLayerMaskID GimpParamSpecLayerMaskID;
-
-struct _GimpParamSpecLayerMaskID
+struct _GimpParamSpecLayerMask
{
- GimpParamSpecChannelID parent_instance;
+ GimpParamSpecChannel parent_instance;
};
-GType gimp_param_layer_mask_id_get_type (void) G_GNUC_CONST;
+GType gimp_param_layer_mask_get_type (void) G_GNUC_CONST;
-GParamSpec * gimp_param_spec_layer_mask_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags);
-
-GimpLayerMask * gimp_value_get_layer_mask (const GValue *value,
- Gimp *gimp);
-void gimp_value_set_layer_mask (GValue *value,
- GimpLayerMask *layer_mask);
+GParamSpec * gimp_param_spec_layer_mask (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_SELECTION_ID
+ * GIMP_TYPE_PARAM_SELECTION
*/
-#define GIMP_TYPE_SELECTION_ID (gimp_selection_id_get_type ())
-#define GIMP_VALUE_HOLDS_SELECTION_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_SELECTION_ID))
-
-GType gimp_selection_id_get_type (void) G_GNUC_CONST;
+#define GIMP_VALUE_HOLDS_SELECTION(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_SELECTION))
+#define GIMP_TYPE_PARAM_SELECTION (gimp_param_selection_get_type ())
+#define GIMP_PARAM_SPEC_SELECTION(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_SELECTION,
GimpParamSpecSelection))
+#define GIMP_IS_PARAM_SPEC_SELECTION(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_SELECTION))
-/*
- * GIMP_TYPE_PARAM_SELECTION_ID
- */
-
-#define GIMP_TYPE_PARAM_SELECTION_ID (gimp_param_selection_id_get_type ())
-#define GIMP_PARAM_SPEC_SELECTION_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_SELECTION_ID, GimpParamSpecSelectionID))
-#define GIMP_IS_PARAM_SPEC_SELECTION_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_SELECTION_ID))
+typedef struct _GimpParamSpecSelection GimpParamSpecSelection;
-typedef struct _GimpParamSpecSelectionID GimpParamSpecSelectionID;
-
-struct _GimpParamSpecSelectionID
+struct _GimpParamSpecSelection
{
- GimpParamSpecChannelID parent_instance;
+ GimpParamSpecChannel parent_instance;
};
-GType gimp_param_selection_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_selection_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_selection_get_type (void) G_GNUC_CONST;
-GimpSelection * gimp_value_get_selection (const GValue *value,
- Gimp *gimp);
-void gimp_value_set_selection (GValue *value,
- GimpSelection *selection);
+GParamSpec * gimp_param_spec_selection (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_VECTORS_ID
+ * GIMP_TYPE_PARAM_VECTORS
*/
-#define GIMP_TYPE_VECTORS_ID (gimp_vectors_id_get_type ())
-#define GIMP_VALUE_HOLDS_VECTORS_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_VECTORS_ID))
+#define GIMP_VALUE_HOLDS_VECTORS(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_VECTORS))
-GType gimp_vectors_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_VECTORS (gimp_param_vectors_get_type ())
+#define GIMP_PARAM_SPEC_VECTORS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_VECTORS,
GimpParamSpecVectors))
+#define GIMP_IS_PARAM_SPEC_VECTORS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_VECTORS))
+typedef struct _GimpParamSpecVectors GimpParamSpecVectors;
-/*
- * GIMP_TYPE_PARAM_VECTORS_ID
- */
-
-#define GIMP_TYPE_PARAM_VECTORS_ID (gimp_param_vectors_id_get_type ())
-#define GIMP_PARAM_SPEC_VECTORS_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_VECTORS_ID, GimpParamSpecVectorsID))
-#define GIMP_IS_PARAM_SPEC_VECTORS_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_VECTORS_ID))
-
-typedef struct _GimpParamSpecVectorsID GimpParamSpecVectorsID;
-
-struct _GimpParamSpecVectorsID
+struct _GimpParamSpecVectors
{
- GimpParamSpecItemID parent_instance;
+ GimpParamSpecItem parent_instance;
};
-GType gimp_param_vectors_id_get_type (void) G_GNUC_CONST;
+GType gimp_param_vectors_get_type (void) G_GNUC_CONST;
-GParamSpec * gimp_param_spec_vectors_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags);
-
-GimpVectors * gimp_value_get_vectors (const GValue *value,
- Gimp *gimp);
-void gimp_value_set_vectors (GValue *value,
- GimpVectors *vectors);
+GParamSpec * gimp_param_spec_vectors (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_DISPLAY_ID
+ * GIMP_TYPE_PARAM_DISPLAY
*/
-#define GIMP_TYPE_DISPLAY_ID (gimp_display_id_get_type ())
-#define GIMP_VALUE_HOLDS_DISPLAY_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_DISPLAY_ID))
+#define GIMP_VALUE_HOLDS_DISPLAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_OBJECT))
-GType gimp_display_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_DISPLAY (gimp_param_display_get_type ())
+#define GIMP_PARAM_SPEC_DISPLAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_DISPLAY,
GimpParamSpecDisplay))
+#define GIMP_IS_PARAM_SPEC_DISPLAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_DISPLAY))
+typedef struct _GimpParamSpecDisplay GimpParamSpecDisplay;
-/*
- * GIMP_TYPE_PARAM_DISPLAY_ID
- */
-
-#define GIMP_TYPE_PARAM_DISPLAY_ID (gimp_param_display_id_get_type ())
-#define GIMP_PARAM_SPEC_DISPLAY_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_DISPLAY_ID, GimpParamSpecDisplayID))
-#define GIMP_IS_PARAM_SPEC_DISPLAY_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_DISPLAY_ID))
-
-typedef struct _GimpParamSpecDisplayID GimpParamSpecDisplayID;
-
-struct _GimpParamSpecDisplayID
+struct _GimpParamSpecDisplay
{
- GParamSpecInt parent_instance;
+ GParamSpecObject parent_instance;
- Gimp *gimp;
- gboolean none_ok;
+ gboolean none_ok;
};
-GType gimp_param_display_id_get_type (void) G_GNUC_CONST;
+GType gimp_param_display_get_type (void) G_GNUC_CONST;
-GParamSpec * gimp_param_spec_display_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- Gimp *gimp,
- gboolean none_ok,
- GParamFlags flags);
-
-GimpObject * gimp_value_get_display (const GValue *value,
- Gimp *gimp);
-void gimp_value_set_display (GValue *value,
- GimpObject *display);
+GParamSpec * gimp_param_spec_display (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
#endif /* __APP_GIMP_PARAM_SPECS_H__ */
diff --git a/app/errors.c b/app/errors.c
index 9a141e9362..10f1f44888 100644
--- a/app/errors.c
+++ b/app/errors.c
@@ -488,11 +488,11 @@ gimp_eek (const gchar *reason,
gimp_get_user_context (the_errors_gimp),
NULL, NULL,
"gimp-xcf-save",
- GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (item),
- G_TYPE_STRING, backup_path,
- G_TYPE_STRING, backup_path,
+ GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_DRAWABLE, item,
+ G_TYPE_STRING, backup_path,
+ G_TYPE_STRING, backup_path,
G_TYPE_NONE);
i++;
}
diff --git a/app/file-data/file-data-gbr.c b/app/file-data/file-data-gbr.c
index 199aa12a00..2a5d73df33 100644
--- a/app/file-data/file-data-gbr.c
+++ b/app/file-data/file-data-gbr.c
@@ -103,7 +103,7 @@ file_gbr_load_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (image)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), image);
gimp_unset_busy (gimp);
@@ -130,8 +130,8 @@ file_gbr_save_invoker (GimpProcedure *procedure,
gimp_set_busy (gimp);
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
uri = g_value_get_string (gimp_value_array_index (args, 3));
spacing = g_value_get_int (gimp_value_array_index (args, 5));
name = g_value_get_string (gimp_value_array_index (args, 6));
diff --git a/app/file-data/file-data-gih.c b/app/file-data/file-data-gih.c
index 99e2a13eaa..7a2c13a80c 100644
--- a/app/file-data/file-data-gih.c
+++ b/app/file-data/file-data-gih.c
@@ -108,7 +108,7 @@ file_gih_load_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (image)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), image);
gimp_unset_busy (gimp);
@@ -135,7 +135,7 @@ file_gih_save_invoker (GimpProcedure *procedure,
gimp_set_busy (gimp);
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
uri = g_value_get_string (gimp_value_array_index (args, 3));
spacing = g_value_get_int (gimp_value_array_index (args, 5));
name = g_value_get_string (gimp_value_array_index (args, 6));
diff --git a/app/file-data/file-data-pat.c b/app/file-data/file-data-pat.c
index 5d41f883f9..4045602f89 100644
--- a/app/file-data/file-data-pat.c
+++ b/app/file-data/file-data-pat.c
@@ -104,7 +104,7 @@ file_pat_load_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (image)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), image);
gimp_unset_busy (gimp);
@@ -130,8 +130,8 @@ file_pat_save_invoker (GimpProcedure *procedure,
gimp_set_busy (gimp);
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
uri = g_value_get_string (gimp_value_array_index (args, 3));
name = g_value_get_string (gimp_value_array_index (args, 5));
diff --git a/app/file-data/file-data.c b/app/file-data/file-data.c
index 8da5c8f09a..1a3d198e45 100644
--- a/app/file-data/file-data.c
+++ b/app/file-data/file-data.c
@@ -104,11 +104,11 @@ file_data_init (Gimp *gimp)
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "Output image",
- gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "Image",
+ "Output image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc);
g_object_unref (procedure);
@@ -153,18 +153,18 @@ file_data_init (Gimp *gimp)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "Input image",
- gimp, FALSE,
+ gimp_param_spec_image ("image",
+ "Image",
+ "Input image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_drawable ("drawable",
+ "Drawable",
+ "Active drawable "
+ "of input image",
+ FALSE,
GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "Drawable",
- "Active drawable "
- "of input image",
- gimp, FALSE,
- GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("uri",
"URI",
@@ -252,11 +252,11 @@ file_data_init (Gimp *gimp)
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "Output image",
- gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "Image",
+ "Output image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc);
g_object_unref (procedure);
@@ -301,18 +301,18 @@ file_data_init (Gimp *gimp)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "Input image",
- gimp, FALSE,
+ gimp_param_spec_image ("image",
+ "Image",
+ "Input image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_drawable ("drawable",
+ "Drawable",
+ "Active drawable "
+ "of input image",
+ FALSE,
GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "Drawable",
- "Active drawable "
- "of input image",
- gimp, FALSE,
- GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("uri",
"URI",
@@ -406,11 +406,11 @@ file_data_init (Gimp *gimp)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "Output image",
- gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "Image",
+ "Output image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc);
g_object_unref (procedure);
@@ -455,18 +455,18 @@ file_data_init (Gimp *gimp)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "Input image",
- gimp, FALSE,
+ gimp_param_spec_image ("image",
+ "Image",
+ "Input image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_drawable ("drawable",
+ "Drawable",
+ "Active drawable "
+ "of input image",
+ FALSE,
GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "Drawable",
- "Active drawable "
- "of input image",
- gimp, FALSE,
- GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("uri",
"URI",
diff --git a/app/file/file-open.c b/app/file/file-open.c
index ec9da9e05e..b87e6e7005 100644
--- a/app/file/file-open.c
+++ b/app/file/file-open.c
@@ -237,8 +237,7 @@ file_open_image (Gimp *gimp,
*status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
if (*status == GIMP_PDB_SUCCESS && ! file_proc->generic_file_proc)
- image = gimp_value_get_image (gimp_value_array_index (return_vals, 1),
- gimp);
+ image = g_value_get_object (gimp_value_array_index (return_vals, 1));
if (local_file)
{
@@ -383,10 +382,9 @@ file_open_thumbnail (Gimp *gimp,
status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
if (status == GIMP_PDB_SUCCESS &&
- GIMP_VALUE_HOLDS_IMAGE_ID (gimp_value_array_index (return_vals, 1)))
+ GIMP_VALUE_HOLDS_IMAGE (gimp_value_array_index (return_vals, 1)))
{
- image = gimp_value_get_image (gimp_value_array_index (return_vals, 1),
- gimp);
+ image = g_value_get_object (gimp_value_array_index (return_vals, 1));
if (gimp_value_array_length (return_vals) >= 3 &&
G_VALUE_HOLDS_INT (gimp_value_array_index (return_vals, 2)) &&
diff --git a/app/file/file-save.c b/app/file/file-save.c
index 163587172d..5cff69c6ee 100644
--- a/app/file/file-save.c
+++ b/app/file/file-save.c
@@ -69,8 +69,6 @@ file_save (Gimp *gimp,
GFile *local_file = NULL;
gchar *uri = NULL;
gboolean mounted = TRUE;
- gint32 image_id;
- gint32 drawable_id;
GError *my_error = NULL;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), GIMP_PDB_CALLING_ERROR);
@@ -188,19 +186,16 @@ file_save (Gimp *gimp,
if (! uri)
uri = g_file_get_uri (file);
- image_id = gimp_image_get_id (image);
- drawable_id = gimp_item_get_id (GIMP_ITEM (drawable));
-
return_vals =
gimp_pdb_execute_procedure_by_name (image->gimp->pdb,
gimp_get_user_context (gimp),
progress, error,
gimp_object_get_name (file_proc),
- GIMP_TYPE_RUN_MODE, run_mode,
- GIMP_TYPE_IMAGE_ID, image_id,
- GIMP_TYPE_DRAWABLE_ID, drawable_id,
- G_TYPE_STRING, uri,
- G_TYPE_STRING, uri,
+ GIMP_TYPE_RUN_MODE, run_mode,
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_DRAWABLE, drawable,
+ G_TYPE_STRING, uri,
+ G_TYPE_STRING, uri,
G_TYPE_NONE);
status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
diff --git a/app/gui/gui.c b/app/gui/gui.c
index 2492b2e9a8..37d329fa4d 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -150,12 +150,12 @@ static void gui_compare_accelerator (gpointer data,
guint accel_key,
GdkModifierType accel_mods,
gboolean changed);
-static void gui_check_unique_accelerator (gpointer data,
+static void gui_check_unique_accelerator (gpointer data,
const gchar *accel_path,
guint accel_key,
GdkModifierType accel_mods,
gboolean changed);
-static gboolean gui_check_action_exists (const gchar *accel_path);
+static gboolean gui_check_action_exists (const gchar *accel_path);
/* private variables */
@@ -174,6 +174,9 @@ gui_libs_init (GOptionContext *context)
g_return_if_fail (context != NULL);
g_option_context_add_group (context, gtk_get_option_group (TRUE));
+
+ /* make the GimpDisplay type known by name early, needed for the PDB */
+ g_type_class_ref (GIMP_TYPE_DISPLAY);
}
void
diff --git a/app/pdb/channel-cmds.c b/app/pdb/channel-cmds.c
index edeb3e7dc0..57f10b3521 100644
--- a/app/pdb/channel-cmds.c
+++ b/app/pdb/channel-cmds.c
@@ -62,7 +62,7 @@ channel_new_invoker (GimpProcedure *procedure,
GimpRGB color;
GimpChannel *channel = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
width = g_value_get_int (gimp_value_array_index (args, 1));
height = g_value_get_int (gimp_value_array_index (args, 2));
name = g_value_get_string (gimp_value_array_index (args, 3));
@@ -84,7 +84,7 @@ channel_new_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), channel);
return return_vals;
}
@@ -104,7 +104,7 @@ channel_new_from_component_invoker (GimpProcedure *procedure,
const gchar *name;
GimpChannel *channel = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
component = g_value_get_enum (gimp_value_array_index (args, 1));
name = g_value_get_string (gimp_value_array_index (args, 2));
@@ -124,7 +124,7 @@ channel_new_from_component_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), channel);
return return_vals;
}
@@ -142,7 +142,7 @@ channel_copy_invoker (GimpProcedure *procedure,
GimpChannel *channel;
GimpChannel *channel_copy = NULL;
- channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+ channel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -167,7 +167,7 @@ channel_copy_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel_copy);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), channel_copy);
return return_vals;
}
@@ -187,8 +187,8 @@ channel_combine_masks_invoker (GimpProcedure *procedure,
gint offx;
gint offy;
- channel1 = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
- channel2 = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
+ channel1 = g_value_get_object (gimp_value_array_index (args, 0));
+ channel2 = g_value_get_object (gimp_value_array_index (args, 1));
operation = g_value_get_enum (gimp_value_array_index (args, 2));
offx = g_value_get_int (gimp_value_array_index (args, 3));
offy = g_value_get_int (gimp_value_array_index (args, 4));
@@ -218,7 +218,7 @@ channel_get_show_masked_invoker (GimpProcedure *procedure,
GimpChannel *channel;
gboolean show_masked = FALSE;
- channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+ channel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -246,7 +246,7 @@ channel_set_show_masked_invoker (GimpProcedure *procedure,
GimpChannel *channel;
gboolean show_masked;
- channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+ channel = g_value_get_object (gimp_value_array_index (args, 0));
show_masked = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -271,7 +271,7 @@ channel_get_opacity_invoker (GimpProcedure *procedure,
GimpChannel *channel;
gdouble opacity = 0.0;
- channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+ channel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -299,7 +299,7 @@ channel_set_opacity_invoker (GimpProcedure *procedure,
GimpChannel *channel;
gdouble opacity;
- channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+ channel = g_value_get_object (gimp_value_array_index (args, 0));
opacity = g_value_get_double (gimp_value_array_index (args, 1));
if (success)
@@ -324,7 +324,7 @@ channel_get_color_invoker (GimpProcedure *procedure,
GimpChannel *channel;
GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
- channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+ channel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -353,7 +353,7 @@ channel_set_color_invoker (GimpProcedure *procedure,
GimpChannel *channel;
GimpRGB color;
- channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+ channel = g_value_get_object (gimp_value_array_index (args, 0));
gimp_value_get_rgb (gimp_value_array_index (args, 1), &color);
if (success)
@@ -389,11 +389,11 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image to which to add the channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image to which to add the channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("width",
"width",
@@ -427,11 +427,11 @@ register_channel_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The newly created channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The newly created channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -450,11 +450,11 @@ register_channel_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image to which to add the channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image to which to add the channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("component",
"component",
@@ -470,11 +470,11 @@ register_channel_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The newly created channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The newly created channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -493,17 +493,17 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel to copy",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel to copy",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_channel_id ("channel-copy",
- "channel copy",
- "The newly copied channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel-copy",
+ "channel copy",
+ "The newly copied channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -521,17 +521,17 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel1",
- "channel1",
- "The channel1",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel1",
+ "channel1",
+ "The channel1",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel2",
- "channel2",
- "The channel2",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel2",
+ "channel2",
+ "The channel2",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
"operation",
@@ -568,11 +568,11 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("show-masked",
"show masked",
@@ -596,11 +596,11 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("show-masked",
"show masked",
@@ -624,11 +624,11 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("opacity",
"opacity",
@@ -652,11 +652,11 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
"opacity",
@@ -680,11 +680,11 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_rgb ("color",
"color",
@@ -709,11 +709,11 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_rgb ("color",
"color",
diff --git a/app/pdb/display-cmds.c b/app/pdb/display-cmds.c
index f9ead97dd2..c98d6e4ba1 100644
--- a/app/pdb/display-cmds.c
+++ b/app/pdb/display-cmds.c
@@ -38,23 +38,30 @@
static GimpValueArray *
-display_is_valid_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+display_id_is_valid_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
+ gboolean success = TRUE;
GimpValueArray *return_vals;
- GimpObject *display;
+ gint display_id;
gboolean valid = FALSE;
- display = gimp_value_get_display (gimp_value_array_index (args, 0), gimp);
+ display_id = g_value_get_int (gimp_value_array_index (args, 0));
+
+ if (success)
+ {
+ valid = (gimp_get_display_by_id (gimp, display_id) != NULL);
+ }
- valid = (display != NULL);
+ return_vals = gimp_procedure_get_return_values (procedure, success,
+ error ? *error : NULL);
- return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), valid);
+ if (success)
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), valid);
return return_vals;
}
@@ -72,7 +79,7 @@ display_new_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpObject *display = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -96,7 +103,7 @@ display_new_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_display (gimp_value_array_index (return_vals, 1), display);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), display);
return return_vals;
}
@@ -112,7 +119,7 @@ display_delete_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpObject *display;
- display = gimp_value_get_display (gimp_value_array_index (args, 0), gimp);
+ display = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -136,7 +143,7 @@ display_get_window_handle_invoker (GimpProcedure *procedure,
GimpObject *display;
gint window = 0;
- display = gimp_value_get_display (gimp_value_array_index (args, 0), gimp);
+ display = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -177,8 +184,8 @@ displays_reconnect_invoker (GimpProcedure *procedure,
GimpImage *old_image;
GimpImage *new_image;
- old_image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- new_image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+ old_image = g_value_get_object (gimp_value_array_index (args, 0));
+ new_image = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -206,24 +213,24 @@ register_display_procs (GimpPDB *pdb)
GimpProcedure *procedure;
/*
- * gimp-display-is-valid
+ * gimp-display-id-is-valid
*/
- procedure = gimp_procedure_new (display_is_valid_invoker);
+ procedure = gimp_procedure_new (display_id_is_valid_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-display-is-valid");
+ "gimp-display-id-is-valid");
gimp_procedure_set_static_strings (procedure,
- "Returns TRUE if the display is valid.",
+ "Returns TRUE if the display ID is valid.",
"This procedure checks if the given display ID is valid and refers to
an existing display.",
"Sven Neumann <sven gimp org>",
"Sven Neumann",
"2007",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_display_id ("display",
- "display",
- "The display to check",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
+ g_param_spec_int ("display-id",
+ "display id",
+ "The display ID to check",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("valid",
"valid",
@@ -247,17 +254,17 @@ register_display_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_display_id ("display",
- "display",
- "The new display",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_display ("display",
+ "display",
+ "The new display",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -275,11 +282,11 @@ register_display_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_display_id ("display",
- "display",
- "The display to delete",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_display ("display",
+ "display",
+ "The display to delete",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -297,11 +304,11 @@ register_display_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_display_id ("display",
- "display",
- "The display to get the window handle from",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_display ("display",
+ "display",
+ "The display to get the window handle from",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("window",
"window",
@@ -341,17 +348,17 @@ register_display_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("old-image",
- "old image",
- "The old image (must have at least one display)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("old-image",
+ "old image",
+ "The old image (must have at least one display)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("new-image",
- "new image",
- "The new image (must not have a display)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("new-image",
+ "new image",
+ "The new image (must not have a display)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c
index 26eaf7e966..449fffbf0e 100644
--- a/app/pdb/drawable-cmds.c
+++ b/app/pdb/drawable-cmds.c
@@ -67,7 +67,7 @@ drawable_get_format_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gchar *format = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -100,7 +100,7 @@ drawable_get_thumbnail_format_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gchar *format = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -130,7 +130,7 @@ drawable_type_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint type = 0;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -159,7 +159,7 @@ drawable_type_with_alpha_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint type_with_alpha = 0;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -190,7 +190,7 @@ drawable_has_alpha_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gboolean has_alpha = FALSE;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -219,7 +219,7 @@ drawable_is_rgb_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gboolean is_rgb = FALSE;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -248,7 +248,7 @@ drawable_is_gray_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gboolean is_gray = FALSE;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -277,7 +277,7 @@ drawable_is_indexed_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gboolean is_indexed = FALSE;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -306,7 +306,7 @@ drawable_bpp_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint bpp = 0;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -337,7 +337,7 @@ drawable_width_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint width = 0;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -366,7 +366,7 @@ drawable_height_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint height = 0;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -396,7 +396,7 @@ drawable_offsets_invoker (GimpProcedure *procedure,
gint offset_x = 0;
gint offset_y = 0;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -432,7 +432,7 @@ drawable_mask_bounds_invoker (GimpProcedure *procedure,
gint x2 = 0;
gint y2 = 0;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -474,7 +474,7 @@ drawable_mask_intersect_invoker (GimpProcedure *procedure,
gint width = 0;
gint height = 0;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -512,7 +512,7 @@ drawable_merge_shadow_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gboolean undo;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
undo = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -547,7 +547,7 @@ drawable_free_shadow_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -577,7 +577,7 @@ drawable_update_invoker (GimpProcedure *procedure,
gint width;
gint height;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
x = g_value_get_int (gimp_value_array_index (args, 1));
y = g_value_get_int (gimp_value_array_index (args, 2));
width = g_value_get_int (gimp_value_array_index (args, 3));
@@ -608,7 +608,7 @@ drawable_get_pixel_invoker (GimpProcedure *procedure,
gint num_channels = 0;
guint8 *pixel = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
x_coord = g_value_get_int (gimp_value_array_index (args, 1));
y_coord = g_value_get_int (gimp_value_array_index (args, 2));
@@ -657,7 +657,7 @@ drawable_set_pixel_invoker (GimpProcedure *procedure,
gint num_channels;
const guint8 *pixel;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
x_coord = g_value_get_int (gimp_value_array_index (args, 1));
y_coord = g_value_get_int (gimp_value_array_index (args, 2));
num_channels = g_value_get_int (gimp_value_array_index (args, 3));
@@ -698,7 +698,7 @@ drawable_fill_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint fill_type;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
fill_type = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -732,7 +732,7 @@ drawable_offset_invoker (GimpProcedure *procedure,
gint offset_x;
gint offset_y;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
wrap_around = g_value_get_boolean (gimp_value_array_index (args, 1));
fill_type = g_value_get_enum (gimp_value_array_index (args, 2));
offset_x = g_value_get_int (gimp_value_array_index (args, 3));
@@ -772,7 +772,7 @@ drawable_thumbnail_invoker (GimpProcedure *procedure,
gint thumbnail_data_count = 0;
guint8 *thumbnail_data = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
width = g_value_get_int (gimp_value_array_index (args, 1));
height = g_value_get_int (gimp_value_array_index (args, 2));
@@ -854,7 +854,7 @@ drawable_sub_thumbnail_invoker (GimpProcedure *procedure,
gint thumbnail_data_count = 0;
guint8 *thumbnail_data = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
src_x = g_value_get_int (gimp_value_array_index (args, 1));
src_y = g_value_get_int (gimp_value_array_index (args, 2));
src_width = g_value_get_int (gimp_value_array_index (args, 3));
@@ -926,9 +926,9 @@ drawable_foreground_extract_invoker (GimpProcedure *procedure,
gint mode;
GimpDrawable *mask;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
mode = g_value_get_enum (gimp_value_array_index (args, 1));
- mask = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ mask = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -987,11 +987,11 @@ register_drawable_procs (GimpPDB *pdb)
"2012",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("format",
"format",
@@ -1017,11 +1017,11 @@ register_drawable_procs (GimpPDB *pdb)
"2019",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("format",
"format",
@@ -1046,11 +1046,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("type",
"type",
@@ -1075,11 +1075,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_enum ("type-with-alpha",
"type with alpha",
@@ -1110,11 +1110,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("has-alpha",
"has alpha",
@@ -1138,11 +1138,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("is-rgb",
"is rgb",
@@ -1166,11 +1166,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("is-gray",
"is gray",
@@ -1194,11 +1194,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("is-indexed",
"is indexed",
@@ -1222,11 +1222,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("bpp",
"bpp",
@@ -1250,11 +1250,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("width",
"width",
@@ -1278,11 +1278,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("height",
"height",
@@ -1306,11 +1306,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("offset-x",
"offset x",
@@ -1341,11 +1341,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("non-empty",
"non empty",
@@ -1394,11 +1394,11 @@ register_drawable_procs (GimpPDB *pdb)
"2004",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("non-empty",
"non empty",
@@ -1446,11 +1446,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("undo",
"undo",
@@ -1474,11 +1474,11 @@ register_drawable_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1496,11 +1496,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("x",
"x",
@@ -1542,11 +1542,11 @@ register_drawable_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("x-coord",
"x coord",
@@ -1587,11 +1587,11 @@ register_drawable_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("x-coord",
"x coord",
@@ -1633,11 +1633,11 @@ register_drawable_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("fill-type",
"fill type",
@@ -1662,11 +1662,11 @@ register_drawable_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to offset",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to offset",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("wrap-around",
"wrap around",
@@ -1709,11 +1709,11 @@ register_drawable_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("width",
"width",
@@ -1772,11 +1772,11 @@ register_drawable_procs (GimpPDB *pdb)
"2004",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("src-x",
"src x",
@@ -1859,11 +1859,11 @@ register_drawable_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("mode",
"mode",
@@ -1872,11 +1872,11 @@ register_drawable_procs (GimpPDB *pdb)
GIMP_FOREGROUND_EXTRACT_SIOX,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("mask",
- "mask",
- "Tri-Map",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("mask",
+ "mask",
+ "Tri-Map",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
diff --git a/app/pdb/drawable-color-cmds.c b/app/pdb/drawable-color-cmds.c
index 5a2df2d951..f8961a3cf2 100644
--- a/app/pdb/drawable-color-cmds.c
+++ b/app/pdb/drawable-color-cmds.c
@@ -64,7 +64,7 @@ drawable_brightness_contrast_invoker (GimpProcedure *procedure,
gdouble brightness;
gdouble contrast;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
brightness = g_value_get_double (gimp_value_array_index (args, 1));
contrast = g_value_get_double (gimp_value_array_index (args, 2));
@@ -109,7 +109,7 @@ drawable_color_balance_invoker (GimpProcedure *procedure,
gdouble magenta_green;
gdouble yellow_blue;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
transfer_mode = g_value_get_enum (gimp_value_array_index (args, 1));
preserve_lum = g_value_get_boolean (gimp_value_array_index (args, 2));
cyan_red = g_value_get_double (gimp_value_array_index (args, 3));
@@ -161,7 +161,7 @@ drawable_colorize_hsl_invoker (GimpProcedure *procedure,
gdouble saturation;
gdouble lightness;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
hue = g_value_get_double (gimp_value_array_index (args, 1));
saturation = g_value_get_double (gimp_value_array_index (args, 2));
lightness = g_value_get_double (gimp_value_array_index (args, 3));
@@ -208,7 +208,7 @@ drawable_curves_explicit_invoker (GimpProcedure *procedure,
gint num_values;
const gdouble *values;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
channel = g_value_get_enum (gimp_value_array_index (args, 1));
num_values = g_value_get_int (gimp_value_array_index (args, 2));
values = gimp_value_get_float_array (gimp_value_array_index (args, 3));
@@ -257,7 +257,7 @@ drawable_curves_spline_invoker (GimpProcedure *procedure,
gint num_points;
const gdouble *points;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
channel = g_value_get_enum (gimp_value_array_index (args, 1));
num_points = g_value_get_int (gimp_value_array_index (args, 2));
points = gimp_value_get_float_array (gimp_value_array_index (args, 3));
@@ -303,7 +303,7 @@ drawable_desaturate_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint desaturate_mode;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
desaturate_mode = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -344,7 +344,7 @@ drawable_equalize_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gboolean mask_only;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
mask_only = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -383,7 +383,7 @@ drawable_histogram_invoker (GimpProcedure *procedure,
gdouble count = 0.0;
gdouble percentile = 0.0;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
channel = g_value_get_enum (gimp_value_array_index (args, 1));
start_range = g_value_get_double (gimp_value_array_index (args, 2));
end_range = g_value_get_double (gimp_value_array_index (args, 3));
@@ -469,7 +469,7 @@ drawable_hue_saturation_invoker (GimpProcedure *procedure,
gdouble saturation;
gdouble overlap;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
hue_range = g_value_get_enum (gimp_value_array_index (args, 1));
hue_offset = g_value_get_double (gimp_value_array_index (args, 2));
lightness = g_value_get_double (gimp_value_array_index (args, 3));
@@ -519,7 +519,7 @@ drawable_invert_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gboolean linear;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
linear = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -562,7 +562,7 @@ drawable_levels_invoker (GimpProcedure *procedure,
gdouble high_output;
gboolean clamp_output;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
channel = g_value_get_enum (gimp_value_array_index (args, 1));
low_input = g_value_get_double (gimp_value_array_index (args, 2));
high_input = g_value_get_double (gimp_value_array_index (args, 3));
@@ -621,7 +621,7 @@ drawable_levels_stretch_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -651,7 +651,7 @@ drawable_posterize_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint levels;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
levels = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -693,7 +693,7 @@ drawable_threshold_invoker (GimpProcedure *procedure,
gdouble low_threshold;
gdouble high_threshold;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
channel = g_value_get_enum (gimp_value_array_index (args, 1));
low_threshold = g_value_get_double (gimp_value_array_index (args, 2));
high_threshold = g_value_get_double (gimp_value_array_index (args, 3));
@@ -744,11 +744,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("brightness",
"brightness",
@@ -778,11 +778,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("transfer-mode",
"transfer mode",
@@ -831,11 +831,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"2004",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("hue",
"hue",
@@ -871,11 +871,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
"channel",
@@ -911,11 +911,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
"channel",
@@ -951,11 +951,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("desaturate-mode",
"desaturate mode",
@@ -980,11 +980,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("mask-only",
"mask only",
@@ -1008,11 +1008,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
"channel",
@@ -1085,11 +1085,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("hue-range",
"hue range",
@@ -1138,11 +1138,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("linear",
"linear",
@@ -1166,11 +1166,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
"channel",
@@ -1237,11 +1237,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"2003",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1259,11 +1259,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("levels",
"levels",
@@ -1287,11 +1287,11 @@ register_drawable_color_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
"channel",
diff --git a/app/pdb/drawable-edit-cmds.c b/app/pdb/drawable-edit-cmds.c
index bff8e3a962..26e8394564 100644
--- a/app/pdb/drawable-edit-cmds.c
+++ b/app/pdb/drawable-edit-cmds.c
@@ -63,7 +63,7 @@ drawable_edit_clear_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -93,7 +93,7 @@ drawable_edit_fill_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint fill_type;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
fill_type = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -141,7 +141,7 @@ drawable_edit_bucket_fill_invoker (GimpProcedure *procedure,
gdouble x;
gdouble y;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
fill_type = g_value_get_enum (gimp_value_array_index (args, 1));
x = g_value_get_double (gimp_value_array_index (args, 2));
y = g_value_get_double (gimp_value_array_index (args, 3));
@@ -207,7 +207,7 @@ drawable_edit_gradient_fill_invoker (GimpProcedure *procedure,
gdouble x2;
gdouble y2;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
gradient_type = g_value_get_enum (gimp_value_array_index (args, 1));
offset = g_value_get_double (gimp_value_array_index (args, 2));
supersample = g_value_get_boolean (gimp_value_array_index (args, 3));
@@ -290,7 +290,7 @@ drawable_edit_stroke_selection_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -334,8 +334,8 @@ drawable_edit_stroke_item_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
GimpItem *item;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
- item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
+ item = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -390,11 +390,11 @@ register_drawable_edit_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to clear from",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to clear from",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -414,11 +414,11 @@ register_drawable_edit_procs (GimpPDB *pdb)
"1995-2000",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to fill to",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to fill to",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("fill-type",
"fill type",
@@ -446,11 +446,11 @@ register_drawable_edit_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("fill-type",
"fill type",
@@ -489,11 +489,11 @@ register_drawable_edit_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("gradient-type",
"gradient type",
@@ -574,11 +574,11 @@ register_drawable_edit_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to stroke to",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to stroke to",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -598,17 +598,17 @@ register_drawable_edit_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to stroke to",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to stroke to",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item to stroke",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item to stroke",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
diff --git a/app/pdb/edit-cmds.c b/app/pdb/edit-cmds.c
index 6f3fe9c05d..8ca3b12c00 100644
--- a/app/pdb/edit-cmds.c
+++ b/app/pdb/edit-cmds.c
@@ -61,7 +61,7 @@ edit_cut_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gboolean non_empty = FALSE;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -108,7 +108,7 @@ edit_copy_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gboolean non_empty = FALSE;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -153,7 +153,7 @@ edit_copy_visible_invoker (GimpProcedure *procedure,
GimpImage *image;
gboolean non_empty = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -193,7 +193,7 @@ edit_paste_invoker (GimpProcedure *procedure,
gboolean paste_into;
GimpLayer *floating_sel = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
paste_into = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -223,7 +223,7 @@ edit_paste_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), floating_sel);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), floating_sel);
return return_vals;
}
@@ -254,7 +254,7 @@ edit_paste_as_new_image_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), image);
return return_vals;
}
@@ -273,7 +273,7 @@ edit_named_cut_invoker (GimpProcedure *procedure,
const gchar *buffer_name;
gchar *real_name = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
buffer_name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -327,7 +327,7 @@ edit_named_copy_invoker (GimpProcedure *procedure,
const gchar *buffer_name;
gchar *real_name = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
buffer_name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -379,7 +379,7 @@ edit_named_copy_visible_invoker (GimpProcedure *procedure,
const gchar *buffer_name;
gchar *real_name = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
buffer_name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -426,7 +426,7 @@ edit_named_paste_invoker (GimpProcedure *procedure,
gboolean paste_into;
GimpLayer *floating_sel = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
buffer_name = g_value_get_string (gimp_value_array_index (args, 1));
paste_into = g_value_get_boolean (gimp_value_array_index (args, 2));
@@ -456,7 +456,7 @@ edit_named_paste_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), floating_sel);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), floating_sel);
return return_vals;
}
@@ -495,7 +495,7 @@ edit_named_paste_as_new_image_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), image);
return return_vals;
}
@@ -519,11 +519,11 @@ register_edit_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to cut from",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to cut from",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("non-empty",
"non empty",
@@ -547,11 +547,11 @@ register_edit_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to copy from",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to copy from",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("non-empty",
"non empty",
@@ -575,11 +575,11 @@ register_edit_procs (GimpPDB *pdb)
"2004",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image to copy from",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image to copy from",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("non-empty",
"non empty",
@@ -603,11 +603,11 @@ register_edit_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to paste to",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to paste to",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("paste-into",
"paste into",
@@ -615,11 +615,11 @@ register_edit_procs (GimpPDB *pdb)
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("floating-sel",
- "floating sel",
- "The new floating selection",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("floating-sel",
+ "floating sel",
+ "The new floating selection",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -637,11 +637,11 @@ register_edit_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The new image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The new image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -659,11 +659,11 @@ register_edit_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to cut from",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to cut from",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("buffer-name",
"buffer name",
@@ -695,11 +695,11 @@ register_edit_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to copy from",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to copy from",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("buffer-name",
"buffer name",
@@ -731,11 +731,11 @@ register_edit_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image to copy from",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image to copy from",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("buffer-name",
"buffer name",
@@ -767,11 +767,11 @@ register_edit_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to paste to",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to paste to",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("buffer-name",
"buffer name",
@@ -786,11 +786,11 @@ register_edit_procs (GimpPDB *pdb)
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("floating-sel",
- "floating sel",
- "The new floating selection",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("floating-sel",
+ "floating sel",
+ "The new floating selection",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -815,11 +815,11 @@ register_edit_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The new image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The new image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
diff --git a/app/pdb/fileops-cmds.c b/app/pdb/fileops-cmds.c
index 19f5ce81c5..10f3775562 100644
--- a/app/pdb/fileops-cmds.c
+++ b/app/pdb/fileops-cmds.c
@@ -113,11 +113,10 @@ file_load_invoker (GimpProcedure *procedure,
GIMP_PDB_SUCCESS)
{
if (gimp_value_array_length (return_vals) > 1 &&
- GIMP_VALUE_HOLDS_IMAGE_ID (gimp_value_array_index (return_vals, 1)))
+ GIMP_VALUE_HOLDS_IMAGE (gimp_value_array_index (return_vals, 1)))
{
GimpImage *image =
- gimp_value_get_image (gimp_value_array_index (return_vals, 1),
- gimp);
+ g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_image_set_load_proc (image, file_proc);
}
}
@@ -143,7 +142,7 @@ file_load_layer_invoker (GimpProcedure *procedure,
GimpLayer *layer = NULL;
run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
filename = g_value_get_string (gimp_value_array_index (args, 2));
if (success)
@@ -177,7 +176,7 @@ file_load_layer_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -199,7 +198,7 @@ file_load_layers_invoker (GimpProcedure *procedure,
gint32 *layer_ids = NULL;
run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
filename = g_value_get_string (gimp_value_array_index (args, 2));
if (success)
@@ -388,7 +387,7 @@ file_save_thumbnail_invoker (GimpProcedure *procedure,
GimpImage *image;
const gchar *filename;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
filename = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -661,11 +660,11 @@ register_fileops_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The output image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The output image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -692,11 +691,11 @@ register_fileops_procs (GimpPDB *pdb)
gimp_param_spec_enum_exclude_value (GIMP_PARAM_SPEC_ENUM (procedure->args[0]),
GIMP_RUN_WITH_LAST_VALS);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Destination image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Destination image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("filename",
"filename",
@@ -705,11 +704,11 @@ register_fileops_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer created when loading the image file",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer created when loading the image file",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -736,11 +735,11 @@ register_fileops_procs (GimpPDB *pdb)
gimp_param_spec_enum_exclude_value (GIMP_PARAM_SPEC_ENUM (procedure->args[0]),
GIMP_RUN_WITH_LAST_VALS);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Destination image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Destination image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("filename",
"filename",
@@ -783,17 +782,17 @@ register_fileops_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Drawable to save",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Drawable to save",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("filename",
"filename",
@@ -871,11 +870,11 @@ register_fileops_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("filename",
"filename",
diff --git a/app/pdb/floating-sel-cmds.c b/app/pdb/floating-sel-cmds.c
index a28f6105d6..24e5fd89d3 100644
--- a/app/pdb/floating-sel-cmds.c
+++ b/app/pdb/floating-sel-cmds.c
@@ -53,7 +53,7 @@ floating_sel_remove_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpLayer *floating_sel;
- floating_sel = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ floating_sel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -87,7 +87,7 @@ floating_sel_anchor_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpLayer *floating_sel;
- floating_sel = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ floating_sel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -120,7 +120,7 @@ floating_sel_to_layer_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpLayer *floating_sel;
- floating_sel = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ floating_sel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -154,8 +154,8 @@ floating_sel_attach_invoker (GimpProcedure *procedure,
GimpLayer *layer;
GimpDrawable *drawable;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
+ drawable = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -197,11 +197,11 @@ register_floating_sel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("floating-sel",
- "floating sel",
- "The floating selection",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("floating-sel",
+ "floating sel",
+ "The floating selection",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -219,11 +219,11 @@ register_floating_sel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("floating-sel",
- "floating sel",
- "The floating selection",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("floating-sel",
+ "floating sel",
+ "The floating selection",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -241,11 +241,11 @@ register_floating_sel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("floating-sel",
- "floating sel",
- "The floating selection",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("floating-sel",
+ "floating sel",
+ "The floating selection",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -263,17 +263,17 @@ register_floating_sel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer (is attached as floating selection)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer (is attached as floating selection)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable (where to attach the floating
selection)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable (where to attach the floating
selection)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
diff --git a/app/pdb/gimp-pdb-compat.c b/app/pdb/gimp-pdb-compat.c
index e26ef1e648..24ab0e857b 100644
--- a/app/pdb/gimp-pdb-compat.c
+++ b/app/pdb/gimp-pdb-compat.c
@@ -27,8 +27,14 @@
#include "pdb-types.h"
#include "core/gimp.h"
+#include "core/gimpimage.h"
+#include "core/gimplayer.h"
+#include "core/gimplayermask.h"
+#include "core/gimpselection.h"
#include "core/gimpparamspecs.h"
+#include "vectors/gimpvectors.h"
+
#include "gimppdb.h"
#include "gimp-pdb-compat.h"
@@ -69,28 +75,33 @@ gimp_pdb_compat_arg_type_from_gtype (GType type)
{ GIMP_TYPE_STRING_ARRAY, GIMP_PDB_STRINGARRAY },
{ GIMP_TYPE_RGB_ARRAY, GIMP_PDB_COLORARRAY },
- { GIMP_TYPE_ITEM_ID, GIMP_PDB_ITEM },
- { GIMP_TYPE_DISPLAY_ID, GIMP_PDB_DISPLAY },
- { GIMP_TYPE_IMAGE_ID, GIMP_PDB_IMAGE },
- { GIMP_TYPE_LAYER_ID, GIMP_PDB_LAYER },
- { GIMP_TYPE_CHANNEL_ID, GIMP_PDB_CHANNEL },
- { GIMP_TYPE_DRAWABLE_ID, GIMP_PDB_DRAWABLE },
- { GIMP_TYPE_SELECTION_ID, GIMP_PDB_SELECTION },
- { GIMP_TYPE_LAYER_MASK_ID, GIMP_PDB_CHANNEL },
- { GIMP_TYPE_VECTORS_ID, GIMP_PDB_VECTORS },
+ { GIMP_TYPE_ITEM, GIMP_PDB_ITEM },
+ { GIMP_TYPE_IMAGE, GIMP_PDB_IMAGE },
+ { GIMP_TYPE_LAYER, GIMP_PDB_LAYER },
+ { GIMP_TYPE_CHANNEL, GIMP_PDB_CHANNEL },
+ { GIMP_TYPE_DRAWABLE, GIMP_PDB_DRAWABLE },
+ { GIMP_TYPE_SELECTION, GIMP_PDB_SELECTION },
+ { GIMP_TYPE_LAYER_MASK, GIMP_PDB_CHANNEL },
+ { GIMP_TYPE_VECTORS, GIMP_PDB_VECTORS },
{ GIMP_TYPE_PARASITE, GIMP_PDB_PARASITE },
{ GIMP_TYPE_PDB_STATUS_TYPE, GIMP_PDB_STATUS }
};
- gint i;
+ GType type;
+ gint i;
pdb_type_quark = g_quark_from_static_string ("gimp-pdb-type");
for (i = 0; i < G_N_ELEMENTS (type_mapping); i++)
g_type_set_qdata (type_mapping[i].g_type, pdb_type_quark,
GINT_TO_POINTER (type_mapping[i].pdb_type));
+
+ type = g_type_from_name ("GimpDisplay");
+ if (type)
+ g_type_set_qdata (type, pdb_type_quark,
+ GINT_TO_POINTER (GIMP_PDB_DISPLAY));
}
pdb_type = GPOINTER_TO_INT (g_type_get_qdata (type, pdb_type_quark));
diff --git a/app/pdb/gimpprocedure.c b/app/pdb/gimpprocedure.c
index 38baf68b40..6e977ada40 100644
--- a/app/pdb/gimpprocedure.c
+++ b/app/pdb/gimpprocedure.c
@@ -780,8 +780,8 @@ gimp_procedure_validate_args (GimpProcedure *procedure,
if (g_param_value_validate (pspec, arg))
{
- if (GIMP_IS_PARAM_SPEC_DRAWABLE_ID (pspec) &&
- g_value_get_int (arg) == -1)
+ if (GIMP_IS_PARAM_SPEC_DRAWABLE (pspec) &&
+ g_value_get_object (arg) == NULL)
{
if (return_vals)
{
@@ -810,8 +810,8 @@ gimp_procedure_validate_args (GimpProcedure *procedure,
g_param_spec_get_name (pspec));
}
}
- else if (GIMP_IS_PARAM_SPEC_IMAGE_ID (pspec) &&
- g_value_get_int (arg) == -1)
+ else if (GIMP_IS_PARAM_SPEC_IMAGE (pspec) &&
+ g_value_get_object (arg) == NULL)
{
if (return_vals)
{
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index c28d9c84b3..42747a4351 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -79,23 +79,30 @@
#endif
static GimpValueArray *
-image_is_valid_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+image_id_is_valid_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
+ gboolean success = TRUE;
GimpValueArray *return_vals;
- GimpImage *image;
+ gint image_id;
gboolean valid = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image_id = g_value_get_int (gimp_value_array_index (args, 0));
- valid = GIMP_IS_IMAGE (image);
+ if (success)
+ {
+ valid = (gimp_image_get_by_id (gimp, image_id) != NULL);
+ }
- return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), valid);
+ return_vals = gimp_procedure_get_return_values (procedure, success,
+ error ? *error : NULL);
+
+ if (success)
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), valid);
return return_vals;
}
@@ -166,7 +173,7 @@ image_new_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), image);
return return_vals;
}
@@ -209,7 +216,7 @@ image_new_with_precision_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), image);
return return_vals;
}
@@ -227,7 +234,7 @@ image_duplicate_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpImage *new_image = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -241,7 +248,7 @@ image_duplicate_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), new_image);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), new_image);
return return_vals;
}
@@ -257,7 +264,7 @@ image_delete_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -284,7 +291,7 @@ image_base_type_invoker (GimpProcedure *procedure,
GimpImage *image;
gint base_type = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -313,7 +320,7 @@ image_get_precision_invoker (GimpProcedure *procedure,
GimpImage *image;
gint precision = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -342,7 +349,7 @@ image_get_default_new_layer_mode_invoker (GimpProcedure *procedure,
GimpImage *image;
gint mode = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -371,7 +378,7 @@ image_width_invoker (GimpProcedure *procedure,
GimpImage *image;
gint width = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -400,7 +407,7 @@ image_height_invoker (GimpProcedure *procedure,
GimpImage *image;
gint height = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -430,7 +437,7 @@ image_get_layers_invoker (GimpProcedure *procedure,
gint num_layers = 0;
gint32 *layer_ids = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -475,7 +482,7 @@ image_get_channels_invoker (GimpProcedure *procedure,
gint num_channels = 0;
gint32 *channel_ids = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -520,7 +527,7 @@ image_get_vectors_invoker (GimpProcedure *procedure,
gint num_vectors = 0;
gint32 *vector_ids = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -564,7 +571,7 @@ image_get_active_drawable_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpDrawable *drawable = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -575,7 +582,7 @@ image_get_active_drawable_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), drawable);
return return_vals;
}
@@ -591,7 +598,7 @@ image_unset_active_channel_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -615,7 +622,7 @@ image_get_floating_sel_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpLayer *floating_sel = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -626,7 +633,7 @@ image_get_floating_sel_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), floating_sel);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), floating_sel);
return return_vals;
}
@@ -644,7 +651,7 @@ image_floating_sel_attached_to_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpDrawable *drawable = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -660,7 +667,7 @@ image_floating_sel_attached_to_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), drawable);
return return_vals;
}
@@ -684,8 +691,8 @@ image_pick_color_invoker (GimpProcedure *procedure,
gdouble average_radius;
GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ drawable = g_value_get_object (gimp_value_array_index (args, 1));
x = g_value_get_double (gimp_value_array_index (args, 2));
y = g_value_get_double (gimp_value_array_index (args, 3));
sample_merged = g_value_get_boolean (gimp_value_array_index (args, 4));
@@ -747,7 +754,7 @@ image_pick_correlate_layer_invoker (GimpProcedure *procedure,
gint y;
GimpLayer *layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
x = g_value_get_int (gimp_value_array_index (args, 1));
y = g_value_get_int (gimp_value_array_index (args, 2));
@@ -760,7 +767,7 @@ image_pick_correlate_layer_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -779,9 +786,9 @@ image_insert_layer_invoker (GimpProcedure *procedure,
GimpLayer *parent;
gint position;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
- parent = gimp_value_get_layer (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ layer = g_value_get_object (gimp_value_array_index (args, 1));
+ parent = g_value_get_object (gimp_value_array_index (args, 2));
position = g_value_get_int (gimp_value_array_index (args, 3));
if (success)
@@ -826,8 +833,8 @@ image_remove_layer_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpLayer *layer;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ layer = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -852,7 +859,7 @@ image_freeze_layers_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -881,7 +888,7 @@ image_thaw_layers_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -916,9 +923,9 @@ image_insert_channel_invoker (GimpProcedure *procedure,
GimpChannel *parent;
gint position;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- channel = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
- parent = gimp_value_get_channel (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ channel = g_value_get_object (gimp_value_array_index (args, 1));
+ parent = g_value_get_object (gimp_value_array_index (args, 2));
position = g_value_get_int (gimp_value_array_index (args, 3));
if (success)
@@ -956,8 +963,8 @@ image_remove_channel_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpChannel *channel;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- channel = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ channel = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -982,7 +989,7 @@ image_freeze_channels_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1011,7 +1018,7 @@ image_thaw_channels_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1046,9 +1053,9 @@ image_insert_vectors_invoker (GimpProcedure *procedure,
GimpVectors *parent;
gint position;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
- parent = gimp_value_get_vectors (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ vectors = g_value_get_object (gimp_value_array_index (args, 1));
+ parent = g_value_get_object (gimp_value_array_index (args, 2));
position = g_value_get_int (gimp_value_array_index (args, 3));
if (success)
@@ -1086,8 +1093,8 @@ image_remove_vectors_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpVectors *vectors;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ vectors = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1112,7 +1119,7 @@ image_freeze_vectors_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1141,7 +1148,7 @@ image_thaw_vectors_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1176,8 +1183,8 @@ image_get_item_position_invoker (GimpProcedure *procedure,
GimpItem *item;
gint position = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ item = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1208,8 +1215,8 @@ image_raise_item_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpItem *item;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ item = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1235,8 +1242,8 @@ image_lower_item_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpItem *item;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ item = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1262,8 +1269,8 @@ image_raise_item_to_top_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpItem *item;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ item = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1289,8 +1296,8 @@ image_lower_item_to_bottom_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpItem *item;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ item = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1318,9 +1325,9 @@ image_reorder_item_invoker (GimpProcedure *procedure,
GimpItem *parent;
gint position;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
- parent = gimp_value_get_item (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ item = g_value_get_object (gimp_value_array_index (args, 1));
+ parent = g_value_get_object (gimp_value_array_index (args, 2));
position = g_value_get_int (gimp_value_array_index (args, 3));
if (success)
@@ -1355,7 +1362,7 @@ image_flatten_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpLayer *layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1370,7 +1377,7 @@ image_flatten_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -1389,7 +1396,7 @@ image_merge_visible_layers_invoker (GimpProcedure *procedure,
gint merge_type;
GimpLayer *layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
merge_type = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -1406,7 +1413,7 @@ image_merge_visible_layers_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -1426,8 +1433,8 @@ image_merge_down_invoker (GimpProcedure *procedure,
gint merge_type;
GimpLayer *layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- merge_layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ merge_layer = g_value_get_object (gimp_value_array_index (args, 1));
merge_type = g_value_get_enum (gimp_value_array_index (args, 2));
if (success)
@@ -1448,7 +1455,7 @@ image_merge_down_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -1467,7 +1474,7 @@ image_get_colormap_invoker (GimpProcedure *procedure,
gint num_bytes = 0;
guint8 *colormap = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1500,7 +1507,7 @@ image_set_colormap_invoker (GimpProcedure *procedure,
gint num_bytes;
const guint8 *colormap;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
num_bytes = g_value_get_int (gimp_value_array_index (args, 1));
colormap = gimp_value_get_uint8_array (gimp_value_array_index (args, 2));
@@ -1526,7 +1533,7 @@ image_get_metadata_invoker (GimpProcedure *procedure,
GimpImage *image;
gchar *metadata_string = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1557,7 +1564,7 @@ image_set_metadata_invoker (GimpProcedure *procedure,
GimpImage *image;
const gchar *metadata_string;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
metadata_string = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -1585,7 +1592,7 @@ image_clean_all_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1609,7 +1616,7 @@ image_is_dirty_invoker (GimpProcedure *procedure,
GimpImage *image;
gboolean dirty = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1644,7 +1651,7 @@ image_thumbnail_invoker (GimpProcedure *procedure,
gint thumbnail_data_count = 0;
guint8 *thumbnail_data = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
width = g_value_get_int (gimp_value_array_index (args, 1));
height = g_value_get_int (gimp_value_array_index (args, 2));
@@ -1712,7 +1719,7 @@ image_get_active_layer_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpLayer *active_layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1723,7 +1730,7 @@ image_get_active_layer_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), active_layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), active_layer);
return return_vals;
}
@@ -1740,8 +1747,8 @@ image_set_active_layer_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpLayer *active_layer;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- active_layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ active_layer = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1766,7 +1773,7 @@ image_get_active_channel_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpChannel *active_channel = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1777,7 +1784,7 @@ image_get_active_channel_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_channel (gimp_value_array_index (return_vals, 1), active_channel);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), active_channel);
return return_vals;
}
@@ -1794,8 +1801,8 @@ image_set_active_channel_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpChannel *active_channel;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- active_channel = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ active_channel = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1820,7 +1827,7 @@ image_get_active_vectors_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpVectors *active_vectors = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1831,7 +1838,7 @@ image_get_active_vectors_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), active_vectors);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), active_vectors);
return return_vals;
}
@@ -1848,8 +1855,8 @@ image_set_active_vectors_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpVectors *active_vectors;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- active_vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ active_vectors = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1874,7 +1881,7 @@ image_get_selection_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpSelection *selection = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1888,7 +1895,7 @@ image_get_selection_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_selection (gimp_value_array_index (return_vals, 1), selection);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), selection);
return return_vals;
}
@@ -1907,7 +1914,7 @@ image_get_component_active_invoker (GimpProcedure *procedure,
gint component;
gboolean active = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
component = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -1945,7 +1952,7 @@ image_set_component_active_invoker (GimpProcedure *procedure,
gint component;
gboolean active;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
component = g_value_get_enum (gimp_value_array_index (args, 1));
active = g_value_get_boolean (gimp_value_array_index (args, 2));
@@ -1980,7 +1987,7 @@ image_get_component_visible_invoker (GimpProcedure *procedure,
gint component;
gboolean visible = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
component = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -2018,7 +2025,7 @@ image_set_component_visible_invoker (GimpProcedure *procedure,
gint component;
gboolean visible;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
component = g_value_get_enum (gimp_value_array_index (args, 1));
visible = g_value_get_boolean (gimp_value_array_index (args, 2));
@@ -2052,7 +2059,7 @@ image_get_filename_invoker (GimpProcedure *procedure,
GimpImage *image;
gchar *filename = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2082,7 +2089,7 @@ image_set_filename_invoker (GimpProcedure *procedure,
GimpImage *image;
const gchar *filename;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
filename = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -2135,7 +2142,7 @@ image_get_uri_invoker (GimpProcedure *procedure,
GimpImage *image;
gchar *uri = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2166,7 +2173,7 @@ image_get_xcf_uri_invoker (GimpProcedure *procedure,
GimpImage *image;
gchar *uri = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2197,7 +2204,7 @@ image_get_imported_uri_invoker (GimpProcedure *procedure,
GimpImage *image;
gchar *uri = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2228,7 +2235,7 @@ image_get_exported_uri_invoker (GimpProcedure *procedure,
GimpImage *image;
gchar *uri = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2259,7 +2266,7 @@ image_get_name_invoker (GimpProcedure *procedure,
GimpImage *image;
gchar *name = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2289,7 +2296,7 @@ image_get_resolution_invoker (GimpProcedure *procedure,
gdouble xresolution = 0.0;
gdouble yresolution = 0.0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2321,7 +2328,7 @@ image_set_resolution_invoker (GimpProcedure *procedure,
gdouble xresolution;
gdouble yresolution;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
xresolution = g_value_get_double (gimp_value_array_index (args, 1));
yresolution = g_value_get_double (gimp_value_array_index (args, 2));
@@ -2361,7 +2368,7 @@ image_get_unit_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpUnit unit = GIMP_UNIT_PIXEL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2389,7 +2396,7 @@ image_set_unit_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpUnit unit;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
unit = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -2414,7 +2421,7 @@ image_get_tattoo_state_invoker (GimpProcedure *procedure,
GimpImage *image;
guint tattoo_state = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2442,7 +2449,7 @@ image_set_tattoo_state_invoker (GimpProcedure *procedure,
GimpImage *image;
guint tattoo_state;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
tattoo_state = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -2468,7 +2475,7 @@ image_get_layer_by_tattoo_invoker (GimpProcedure *procedure,
guint tattoo;
GimpLayer *layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -2480,7 +2487,7 @@ image_get_layer_by_tattoo_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -2499,7 +2506,7 @@ image_get_channel_by_tattoo_invoker (GimpProcedure *procedure,
guint tattoo;
GimpChannel *channel = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -2511,7 +2518,7 @@ image_get_channel_by_tattoo_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), channel);
return return_vals;
}
@@ -2530,7 +2537,7 @@ image_get_vectors_by_tattoo_invoker (GimpProcedure *procedure,
guint tattoo;
GimpVectors *vectors = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -2542,7 +2549,7 @@ image_get_vectors_by_tattoo_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), vectors);
return return_vals;
}
@@ -2561,7 +2568,7 @@ image_get_layer_by_name_invoker (GimpProcedure *procedure,
const gchar *name;
GimpLayer *layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -2573,7 +2580,7 @@ image_get_layer_by_name_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -2592,7 +2599,7 @@ image_get_channel_by_name_invoker (GimpProcedure *procedure,
const gchar *name;
GimpChannel *channel = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -2604,7 +2611,7 @@ image_get_channel_by_name_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), channel);
return return_vals;
}
@@ -2623,7 +2630,7 @@ image_get_vectors_by_name_invoker (GimpProcedure *procedure,
const gchar *name;
GimpVectors *vectors = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -2635,7 +2642,7 @@ image_get_vectors_by_name_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), vectors);
return return_vals;
}
@@ -2652,7 +2659,7 @@ image_attach_parasite_invoker (GimpProcedure *procedure,
GimpImage *image;
const GimpParasite *parasite;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
parasite = g_value_get_boxed (gimp_value_array_index (args, 1));
if (success)
@@ -2679,7 +2686,7 @@ image_detach_parasite_invoker (GimpProcedure *procedure,
GimpImage *image;
const gchar *name;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -2705,7 +2712,7 @@ image_get_parasite_invoker (GimpProcedure *procedure,
const gchar *name;
GimpParasite *parasite = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -2739,7 +2746,7 @@ image_get_parasite_list_invoker (GimpProcedure *procedure,
gint num_parasites = 0;
gchar **parasites = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -2764,28 +2771,28 @@ register_image_procs (GimpPDB *pdb)
GimpProcedure *procedure;
/*
- * gimp-image-is-valid
+ * gimp-image-id-is-valid
*/
- procedure = gimp_procedure_new (image_is_valid_invoker);
+ procedure = gimp_procedure_new (image_id_is_valid_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-image-is-valid");
+ "gimp-image-id-is-valid");
gimp_procedure_set_static_strings (procedure,
- "Returns TRUE if the image is valid.",
- "This procedure checks if the given image is valid and refers to an
existing image.",
+ "Returns TRUE if the image ID is valid.",
+ "This procedure checks if the given image ID is valid and refers to an
existing image.",
"Sven Neumann <sven gimp org>",
"Sven Neumann",
"2007",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image to check",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
+ g_param_spec_int ("image-id",
+ "image id",
+ "The image ID to check",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("valid",
"valid",
- "Whether the image is valid",
+ "Whether the image ID is valid",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
@@ -2853,11 +2860,11 @@ register_image_procs (GimpPDB *pdb)
GIMP_RGB,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The newly created image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The newly created image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2901,11 +2908,11 @@ register_image_procs (GimpPDB *pdb)
GIMP_PRECISION_U8_LINEAR,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The newly created image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The newly created image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2923,17 +2930,17 @@ register_image_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("new-image",
- "new image",
- "The new, duplicated image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("new-image",
+ "new image",
+ "The new, duplicated image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2951,11 +2958,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2973,11 +2980,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("base-type",
"base type",
@@ -3002,11 +3009,11 @@ register_image_procs (GimpPDB *pdb)
"2012",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("precision",
"precision",
@@ -3031,11 +3038,11 @@ register_image_procs (GimpPDB *pdb)
"2017",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("mode",
"mode",
@@ -3060,11 +3067,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("width",
"width",
@@ -3088,11 +3095,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("height",
"height",
@@ -3116,11 +3123,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-layers",
"num layers",
@@ -3149,11 +3156,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-channels",
"num channels",
@@ -3182,11 +3189,11 @@ register_image_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-vectors",
"num vectors",
@@ -3215,17 +3222,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The active drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The active drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3243,11 +3250,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3265,17 +3272,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("floating-sel",
- "floating sel",
- "The image's floating selection",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("floating-sel",
+ "floating sel",
+ "The image's floating selection",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3293,17 +3300,17 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable the floating selection is
attached to",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable the floating selection is
attached to",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3321,17 +3328,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable to pick from",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable to pick from",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("x",
"x",
@@ -3386,11 +3393,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("x",
"x",
@@ -3404,11 +3411,11 @@ register_image_procs (GimpPDB *pdb)
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer found at the specified coordinates",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer found at the specified coordinates",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3426,23 +3433,23 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("parent",
- "parent",
- "The parent layer",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("parent",
+ "parent",
+ "The parent layer",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("position",
"position",
@@ -3466,17 +3473,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3496,11 +3503,11 @@ register_image_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3520,11 +3527,11 @@ register_image_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3542,23 +3549,23 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("parent",
- "parent",
- "The parent channel",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("parent",
+ "parent",
+ "The parent channel",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("position",
"position",
@@ -3582,17 +3589,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3612,11 +3619,11 @@ register_image_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3636,11 +3643,11 @@ register_image_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3658,23 +3665,23 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("parent",
- "parent",
- "The parent vectors",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("parent",
+ "parent",
+ "The parent vectors",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("position",
"position",
@@ -3698,17 +3705,17 @@ register_image_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3728,11 +3735,11 @@ register_image_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3752,11 +3759,11 @@ register_image_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3774,17 +3781,17 @@ register_image_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("position",
"position",
@@ -3808,17 +3815,17 @@ register_image_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item to raise",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item to raise",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3836,17 +3843,17 @@ register_image_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item to lower",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item to lower",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3864,17 +3871,17 @@ register_image_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item to raise to top",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item to raise to top",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3892,17 +3899,17 @@ register_image_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item to lower to bottom",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item to lower to bottom",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3920,23 +3927,23 @@ register_image_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item to reorder",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item to reorder",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("parent",
- "parent",
- "The new parent item",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("parent",
+ "parent",
+ "The new parent item",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("position",
"position",
@@ -3960,17 +3967,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The resulting layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The resulting layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3988,11 +3995,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_enum ("merge-type",
"merge type",
@@ -4003,11 +4010,11 @@ register_image_procs (GimpPDB *pdb)
gimp_param_spec_enum_exclude_value (GIMP_PARAM_SPEC_ENUM (procedure->args[1]),
GIMP_FLATTEN_IMAGE);
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The resulting layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The resulting layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4025,17 +4032,17 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("merge-layer",
- "merge layer",
- "The layer to merge down from",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("merge-layer",
+ "merge layer",
+ "The layer to merge down from",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_enum ("merge-type",
"merge type",
@@ -4046,11 +4053,11 @@ register_image_procs (GimpPDB *pdb)
gimp_param_spec_enum_exclude_value (GIMP_PARAM_SPEC_ENUM (procedure->args[2]),
GIMP_FLATTEN_IMAGE);
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The resulting layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The resulting layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4068,11 +4075,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-bytes",
"num bytes",
@@ -4101,11 +4108,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-bytes",
"num bytes",
@@ -4134,11 +4141,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("metadata-string",
"metadata string",
@@ -4163,11 +4170,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("metadata-string",
"metadata string",
@@ -4192,11 +4199,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4214,11 +4221,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("dirty",
"dirty",
@@ -4242,11 +4249,11 @@ register_image_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("width",
"width",
@@ -4305,17 +4312,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("active-layer",
- "active layer",
- "The active layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("active-layer",
+ "active layer",
+ "The active layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4333,17 +4340,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("active-layer",
- "active layer",
- "The new image active layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("active-layer",
+ "active layer",
+ "The new image active layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4361,17 +4368,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_channel_id ("active-channel",
- "active channel",
- "The active channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("active-channel",
+ "active channel",
+ "The active channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4389,17 +4396,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_channel_id ("active-channel",
- "active channel",
- "The new image active channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("active-channel",
+ "active channel",
+ "The new image active channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4417,17 +4424,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_vectors_id ("active-vectors",
- "active vectors",
- "The active vectors",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("active-vectors",
+ "active vectors",
+ "The active vectors",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4445,17 +4452,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("active-vectors",
- "active vectors",
- "The new image active vectors",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("active-vectors",
+ "active vectors",
+ "The new image active vectors",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4473,17 +4480,17 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_selection_id ("selection",
- "selection",
- "The selection channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_selection ("selection",
+ "selection",
+ "The selection channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4501,11 +4508,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("component",
"component",
@@ -4536,11 +4543,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("component",
"component",
@@ -4571,11 +4578,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("component",
"component",
@@ -4606,11 +4613,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("component",
"component",
@@ -4641,11 +4648,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("filename",
"filename",
@@ -4670,11 +4677,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("filename",
"filename",
@@ -4699,11 +4706,11 @@ register_image_procs (GimpPDB *pdb)
"2009",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("uri",
"uri",
@@ -4728,11 +4735,11 @@ register_image_procs (GimpPDB *pdb)
"2011",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("uri",
"uri",
@@ -4757,11 +4764,11 @@ register_image_procs (GimpPDB *pdb)
"2011",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("uri",
"uri",
@@ -4786,11 +4793,11 @@ register_image_procs (GimpPDB *pdb)
"2011",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("uri",
"uri",
@@ -4815,11 +4822,11 @@ register_image_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
@@ -4844,11 +4851,11 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("xresolution",
"xresolution",
@@ -4878,11 +4885,11 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("xresolution",
"xresolution",
@@ -4912,11 +4919,11 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_unit ("unit",
"unit",
@@ -4942,11 +4949,11 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_unit ("unit",
"unit",
@@ -4972,11 +4979,11 @@ register_image_procs (GimpPDB *pdb)
"2000",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_uint ("tattoo-state",
"tattoo state",
@@ -5000,11 +5007,11 @@ register_image_procs (GimpPDB *pdb)
"2000",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("tattoo-state",
"tattoo state",
@@ -5028,11 +5035,11 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("tattoo",
"tattoo",
@@ -5040,11 +5047,11 @@ register_image_procs (GimpPDB *pdb)
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer with the specified tattoo",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer with the specified tattoo",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5062,11 +5069,11 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("tattoo",
"tattoo",
@@ -5074,11 +5081,11 @@ register_image_procs (GimpPDB *pdb)
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel with the specified tattoo",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel with the specified tattoo",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5096,11 +5103,11 @@ register_image_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("tattoo",
"tattoo",
@@ -5108,11 +5115,11 @@ register_image_procs (GimpPDB *pdb)
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors with the specified tattoo",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors with the specified tattoo",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5130,11 +5137,11 @@ register_image_procs (GimpPDB *pdb)
"2011",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -5143,11 +5150,11 @@ register_image_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer with the specified name",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer with the specified name",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5165,11 +5172,11 @@ register_image_procs (GimpPDB *pdb)
"2011",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -5178,11 +5185,11 @@ register_image_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The channel with the specified name",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The channel with the specified name",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5200,11 +5207,11 @@ register_image_procs (GimpPDB *pdb)
"2011",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -5213,11 +5220,11 @@ register_image_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors with the specified name",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors with the specified name",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5235,11 +5242,11 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_parasite ("parasite",
"parasite",
@@ -5262,11 +5269,11 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -5291,11 +5298,11 @@ register_image_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -5325,11 +5332,11 @@ register_image_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-parasites",
"num parasites",
diff --git a/app/pdb/image-color-profile-cmds.c b/app/pdb/image-color-profile-cmds.c
index dab663b27f..beba23501c 100644
--- a/app/pdb/image-color-profile-cmds.c
+++ b/app/pdb/image-color-profile-cmds.c
@@ -56,7 +56,7 @@ image_get_color_profile_invoker (GimpProcedure *procedure,
gint num_bytes = 0;
guint8 *profile_data = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -102,7 +102,7 @@ image_get_effective_color_profile_invoker (GimpProcedure *procedure,
gint num_bytes = 0;
guint8 *profile_data = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -147,7 +147,7 @@ image_set_color_profile_invoker (GimpProcedure *procedure,
gint num_bytes;
const guint8 *color_profile;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
num_bytes = g_value_get_int (gimp_value_array_index (args, 1));
color_profile = gimp_value_get_uint8_array (gimp_value_array_index (args, 2));
@@ -193,7 +193,7 @@ image_set_color_profile_from_file_invoker (GimpProcedure *procedure,
GimpImage *image;
const gchar *uri;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
uri = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -242,7 +242,7 @@ image_convert_color_profile_invoker (GimpProcedure *procedure,
gint intent;
gboolean bpc;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
num_bytes = g_value_get_int (gimp_value_array_index (args, 1));
color_profile = gimp_value_get_uint8_array (gimp_value_array_index (args, 2));
intent = g_value_get_enum (gimp_value_array_index (args, 3));
@@ -290,7 +290,7 @@ image_convert_color_profile_from_file_invoker (GimpProcedure *procedure,
gint intent;
gboolean bpc;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
uri = g_value_get_string (gimp_value_array_index (args, 1));
intent = g_value_get_enum (gimp_value_array_index (args, 2));
bpc = g_value_get_boolean (gimp_value_array_index (args, 3));
@@ -343,11 +343,11 @@ register_image_color_profile_procs (GimpPDB *pdb)
"2015",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-bytes",
"num bytes",
@@ -376,11 +376,11 @@ register_image_color_profile_procs (GimpPDB *pdb)
"2015",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-bytes",
"num bytes",
@@ -409,11 +409,11 @@ register_image_color_profile_procs (GimpPDB *pdb)
"2015",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-bytes",
"num bytes",
@@ -442,11 +442,11 @@ register_image_color_profile_procs (GimpPDB *pdb)
"2015",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("uri",
"uri",
@@ -471,11 +471,11 @@ register_image_color_profile_procs (GimpPDB *pdb)
"2015",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-bytes",
"num bytes",
@@ -517,11 +517,11 @@ register_image_color_profile_procs (GimpPDB *pdb)
"2015",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("uri",
"uri",
diff --git a/app/pdb/image-convert-cmds.c b/app/pdb/image-convert-cmds.c
index d5a9911eb0..c1bf45d31a 100644
--- a/app/pdb/image-convert-cmds.c
+++ b/app/pdb/image-convert-cmds.c
@@ -57,7 +57,7 @@ image_convert_rgb_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -87,7 +87,7 @@ image_convert_grayscale_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -123,7 +123,7 @@ image_convert_indexed_invoker (GimpProcedure *procedure,
gboolean remove_unused;
const gchar *palette;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
dither_type = g_value_get_enum (gimp_value_array_index (args, 1));
palette_type = g_value_get_enum (gimp_value_array_index (args, 2));
num_cols = g_value_get_int (gimp_value_array_index (args, 3));
@@ -235,7 +235,7 @@ image_convert_precision_invoker (GimpProcedure *procedure,
GimpImage *image;
gint precision;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
precision = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -279,11 +279,11 @@ register_image_convert_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -301,11 +301,11 @@ register_image_convert_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -323,11 +323,11 @@ register_image_convert_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("dither-type",
"dither type",
@@ -423,11 +423,11 @@ register_image_convert_procs (GimpPDB *pdb)
"2012",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("precision",
"precision",
diff --git a/app/pdb/image-grid-cmds.c b/app/pdb/image-grid-cmds.c
index 5831d16053..7f77858e5e 100644
--- a/app/pdb/image-grid-cmds.c
+++ b/app/pdb/image-grid-cmds.c
@@ -56,7 +56,7 @@ image_grid_get_spacing_invoker (GimpProcedure *procedure,
gdouble xspacing = 0.0;
gdouble yspacing = 0.0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -96,7 +96,7 @@ image_grid_set_spacing_invoker (GimpProcedure *procedure,
gdouble xspacing;
gdouble yspacing;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
xspacing = g_value_get_double (gimp_value_array_index (args, 1));
yspacing = g_value_get_double (gimp_value_array_index (args, 2));
@@ -131,7 +131,7 @@ image_grid_get_offset_invoker (GimpProcedure *procedure,
gdouble xoffset = 0.0;
gdouble yoffset = 0.0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -171,7 +171,7 @@ image_grid_set_offset_invoker (GimpProcedure *procedure,
gdouble xoffset;
gdouble yoffset;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
xoffset = g_value_get_double (gimp_value_array_index (args, 1));
yoffset = g_value_get_double (gimp_value_array_index (args, 2));
@@ -205,7 +205,7 @@ image_grid_get_foreground_color_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpRGB fgcolor = { 0.0, 0.0, 0.0, 1.0 };
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -238,7 +238,7 @@ image_grid_set_foreground_color_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpRGB fgcolor;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
gimp_value_get_rgb (gimp_value_array_index (args, 1), &fgcolor);
if (success)
@@ -268,7 +268,7 @@ image_grid_get_background_color_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpRGB bgcolor = { 0.0, 0.0, 0.0, 1.0 };
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -301,7 +301,7 @@ image_grid_set_background_color_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpRGB bgcolor;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
gimp_value_get_rgb (gimp_value_array_index (args, 1), &bgcolor);
if (success)
@@ -331,7 +331,7 @@ image_grid_get_style_invoker (GimpProcedure *procedure,
GimpImage *image;
gint style = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -364,7 +364,7 @@ image_grid_set_style_invoker (GimpProcedure *procedure,
GimpImage *image;
gint style;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
style = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -400,11 +400,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("xspacing",
"xspacing",
@@ -434,11 +434,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("xspacing",
"xspacing",
@@ -468,11 +468,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("xoffset",
"xoffset",
@@ -502,11 +502,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("xoffset",
"xoffset",
@@ -536,11 +536,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_rgb ("fgcolor",
"fgcolor",
@@ -565,11 +565,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_rgb ("fgcolor",
"fgcolor",
@@ -594,11 +594,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_rgb ("bgcolor",
"bgcolor",
@@ -623,11 +623,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_rgb ("bgcolor",
"bgcolor",
@@ -652,11 +652,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("style",
"style",
@@ -681,11 +681,11 @@ register_image_grid_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("style",
"style",
diff --git a/app/pdb/image-guides-cmds.c b/app/pdb/image-guides-cmds.c
index 81a224cf79..16f7688bee 100644
--- a/app/pdb/image-guides-cmds.c
+++ b/app/pdb/image-guides-cmds.c
@@ -57,7 +57,7 @@ image_add_hguide_invoker (GimpProcedure *procedure,
gint yposition;
guint guide = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
yposition = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -96,7 +96,7 @@ image_add_vguide_invoker (GimpProcedure *procedure,
gint xposition;
guint guide = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
xposition = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -133,7 +133,7 @@ image_delete_guide_invoker (GimpProcedure *procedure,
GimpImage *image;
guint guide;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
guide = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -164,7 +164,7 @@ image_find_next_guide_invoker (GimpProcedure *procedure,
guint guide;
guint next_guide = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
guide = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -205,7 +205,7 @@ image_get_guide_orientation_invoker (GimpProcedure *procedure,
guint guide;
gint orientation = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
guide = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -241,7 +241,7 @@ image_get_guide_position_invoker (GimpProcedure *procedure,
guint guide;
gint position = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
guide = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -282,11 +282,11 @@ register_image_guides_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("yposition",
"yposition",
@@ -316,11 +316,11 @@ register_image_guides_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("xposition",
"xposition",
@@ -350,11 +350,11 @@ register_image_guides_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("guide",
"guide",
@@ -378,11 +378,11 @@ register_image_guides_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("guide",
"guide",
@@ -412,11 +412,11 @@ register_image_guides_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("guide",
"guide",
@@ -449,11 +449,11 @@ register_image_guides_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("guide",
"guide",
diff --git a/app/pdb/image-sample-points-cmds.c b/app/pdb/image-sample-points-cmds.c
index 6491fa4868..6d83005f91 100644
--- a/app/pdb/image-sample-points-cmds.c
+++ b/app/pdb/image-sample-points-cmds.c
@@ -56,7 +56,7 @@ image_add_sample_point_invoker (GimpProcedure *procedure,
gint position_y;
guint sample_point = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
position_x = g_value_get_int (gimp_value_array_index (args, 1));
position_y = g_value_get_int (gimp_value_array_index (args, 2));
@@ -96,7 +96,7 @@ image_delete_sample_point_invoker (GimpProcedure *procedure,
GimpImage *image;
guint sample_point;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
sample_point = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -128,7 +128,7 @@ image_find_next_sample_point_invoker (GimpProcedure *procedure,
guint sample_point;
guint next_sample_point = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
sample_point = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -171,7 +171,7 @@ image_get_sample_point_position_invoker (GimpProcedure *procedure,
gint position_x = 0;
gint position_y = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
sample_point = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -216,11 +216,11 @@ register_image_sample_points_procs (GimpPDB *pdb)
"2016",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("position-x",
"position x",
@@ -256,11 +256,11 @@ register_image_sample_points_procs (GimpPDB *pdb)
"2016",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("sample-point",
"sample point",
@@ -284,11 +284,11 @@ register_image_sample_points_procs (GimpPDB *pdb)
"2016",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("sample-point",
"sample point",
@@ -318,11 +318,11 @@ register_image_sample_points_procs (GimpPDB *pdb)
"2016",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("sample-point",
"sample point",
diff --git a/app/pdb/image-select-cmds.c b/app/pdb/image-select-cmds.c
index 2ba0624fdc..2dc83c7edd 100644
--- a/app/pdb/image-select-cmds.c
+++ b/app/pdb/image-select-cmds.c
@@ -61,9 +61,9 @@ image_select_color_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
GimpRGB color;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
operation = g_value_get_enum (gimp_value_array_index (args, 1));
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
gimp_value_get_rgb (gimp_value_array_index (args, 3), &color);
if (success)
@@ -108,9 +108,9 @@ image_select_contiguous_color_invoker (GimpProcedure *procedure,
gdouble x;
gdouble y;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
operation = g_value_get_enum (gimp_value_array_index (args, 1));
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
x = g_value_get_double (gimp_value_array_index (args, 3));
y = g_value_get_double (gimp_value_array_index (args, 4));
@@ -160,7 +160,7 @@ image_select_rectangle_invoker (GimpProcedure *procedure,
gdouble width;
gdouble height;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
operation = g_value_get_enum (gimp_value_array_index (args, 1));
x = g_value_get_double (gimp_value_array_index (args, 2));
y = g_value_get_double (gimp_value_array_index (args, 3));
@@ -203,7 +203,7 @@ image_select_round_rectangle_invoker (GimpProcedure *procedure,
gdouble corner_radius_x;
gdouble corner_radius_y;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
operation = g_value_get_enum (gimp_value_array_index (args, 1));
x = g_value_get_double (gimp_value_array_index (args, 2));
y = g_value_get_double (gimp_value_array_index (args, 3));
@@ -249,7 +249,7 @@ image_select_ellipse_invoker (GimpProcedure *procedure,
gdouble width;
gdouble height;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
operation = g_value_get_enum (gimp_value_array_index (args, 1));
x = g_value_get_double (gimp_value_array_index (args, 2));
y = g_value_get_double (gimp_value_array_index (args, 3));
@@ -289,7 +289,7 @@ image_select_polygon_invoker (GimpProcedure *procedure,
gint num_segs;
const gdouble *segs;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
operation = g_value_get_enum (gimp_value_array_index (args, 1));
num_segs = g_value_get_int (gimp_value_array_index (args, 2));
segs = gimp_value_get_float_array (gimp_value_array_index (args, 3));
@@ -327,9 +327,9 @@ image_select_item_invoker (GimpProcedure *procedure,
gint operation;
GimpItem *item;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
operation = g_value_get_enum (gimp_value_array_index (args, 1));
- item = gimp_value_get_item (gimp_value_array_index (args, 2), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -374,11 +374,11 @@ register_image_select_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The affected image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The affected image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
"operation",
@@ -387,11 +387,11 @@ register_image_select_procs (GimpPDB *pdb)
GIMP_CHANNEL_OP_ADD,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_rgb ("color",
"color",
@@ -420,11 +420,11 @@ register_image_select_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The affected image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The affected image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
"operation",
@@ -433,11 +433,11 @@ register_image_select_procs (GimpPDB *pdb)
GIMP_CHANNEL_OP_ADD,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("x",
"x",
@@ -469,11 +469,11 @@ register_image_select_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
"operation",
@@ -524,11 +524,11 @@ register_image_select_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
"operation",
@@ -591,11 +591,11 @@ register_image_select_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
"operation",
@@ -646,11 +646,11 @@ register_image_select_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
"operation",
@@ -688,11 +688,11 @@ register_image_select_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
"operation",
@@ -701,11 +701,11 @@ register_image_select_procs (GimpPDB *pdb)
GIMP_CHANNEL_OP_ADD,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item to render to the selection",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item to render to the selection",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
diff --git a/app/pdb/image-transform-cmds.c b/app/pdb/image-transform-cmds.c
index b3629f5ce1..45d7450314 100644
--- a/app/pdb/image-transform-cmds.c
+++ b/app/pdb/image-transform-cmds.c
@@ -59,7 +59,7 @@ image_resize_invoker (GimpProcedure *procedure,
gint offx;
gint offy;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
new_width = g_value_get_int (gimp_value_array_index (args, 1));
new_height = g_value_get_int (gimp_value_array_index (args, 2));
offx = g_value_get_int (gimp_value_array_index (args, 3));
@@ -86,7 +86,7 @@ image_resize_to_layers_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -110,7 +110,7 @@ image_scale_invoker (GimpProcedure *procedure,
gint new_width;
gint new_height;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
new_width = g_value_get_int (gimp_value_array_index (args, 1));
new_height = g_value_get_int (gimp_value_array_index (args, 2));
@@ -148,7 +148,7 @@ image_crop_invoker (GimpProcedure *procedure,
gint offx;
gint offy;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
new_width = g_value_get_int (gimp_value_array_index (args, 1));
new_height = g_value_get_int (gimp_value_array_index (args, 2));
offx = g_value_get_int (gimp_value_array_index (args, 3));
@@ -183,7 +183,7 @@ image_flip_invoker (GimpProcedure *procedure,
GimpImage *image;
gint flip_type;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
flip_type = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -207,7 +207,7 @@ image_rotate_invoker (GimpProcedure *procedure,
GimpImage *image;
gint rotate_type;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
rotate_type = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -244,11 +244,11 @@ register_image_transform_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("new-width",
"new width",
@@ -290,11 +290,11 @@ register_image_transform_procs (GimpPDB *pdb)
"2004",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -312,11 +312,11 @@ register_image_transform_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("new-width",
"new width",
@@ -346,11 +346,11 @@ register_image_transform_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("new-width",
"new width",
@@ -392,11 +392,11 @@ register_image_transform_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_enum ("flip-type",
"flip type",
@@ -423,11 +423,11 @@ register_image_transform_procs (GimpPDB *pdb)
"2003",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("rotate-type",
"rotate type",
diff --git a/app/pdb/image-undo-cmds.c b/app/pdb/image-undo-cmds.c
index b991ff5974..18baf1087f 100644
--- a/app/pdb/image-undo-cmds.c
+++ b/app/pdb/image-undo-cmds.c
@@ -51,7 +51,7 @@ image_undo_group_start_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -85,7 +85,7 @@ image_undo_group_end_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -115,7 +115,7 @@ image_undo_is_enabled_invoker (GimpProcedure *procedure,
GimpImage *image;
gboolean enabled = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -144,7 +144,7 @@ image_undo_disable_invoker (GimpProcedure *procedure,
GimpImage *image;
gboolean disabled = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -181,7 +181,7 @@ image_undo_enable_invoker (GimpProcedure *procedure,
GimpImage *image;
gboolean enabled = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -218,7 +218,7 @@ image_undo_freeze_invoker (GimpProcedure *procedure,
GimpImage *image;
gboolean frozen = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -255,7 +255,7 @@ image_undo_thaw_invoker (GimpProcedure *procedure,
GimpImage *image;
gboolean thawed = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -298,11 +298,11 @@ register_image_undo_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The ID of the image in which to open an undo
group",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The ID of the image in which to open an undo group",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -320,11 +320,11 @@ register_image_undo_procs (GimpPDB *pdb)
"1997",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The ID of the image in which to close an undo
group",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The ID of the image in which to close an undo group",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -342,11 +342,11 @@ register_image_undo_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("enabled",
"enabled",
@@ -370,11 +370,11 @@ register_image_undo_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("disabled",
"disabled",
@@ -398,11 +398,11 @@ register_image_undo_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("enabled",
"enabled",
@@ -426,11 +426,11 @@ register_image_undo_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("frozen",
"frozen",
@@ -454,11 +454,11 @@ register_image_undo_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("thawed",
"thawed",
diff --git a/app/pdb/item-cmds.c b/app/pdb/item-cmds.c
index eba1e40477..f103ba68a0 100644
--- a/app/pdb/item-cmds.c
+++ b/app/pdb/item-cmds.c
@@ -48,87 +48,71 @@
static GimpValueArray *
-item_is_valid_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
-{
- GimpValueArray *return_vals;
- GimpItem *item;
- gboolean valid = FALSE;
-
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
-
- valid = (GIMP_IS_ITEM (item) &&
- ! gimp_item_is_removed (GIMP_ITEM (item)));
-
- return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), valid);
-
- return return_vals;
-}
-
-static GimpValueArray *
-item_get_image_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+item_id_is_valid_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
- GimpItem *item;
- GimpImage *image = NULL;
+ gint item_id;
+ gboolean valid = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item_id = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
- image = gimp_item_get_image (GIMP_ITEM (item));
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ valid = (GIMP_IS_ITEM (item) &&
+ ! gimp_item_is_removed (GIMP_ITEM (item)));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), valid);
return return_vals;
}
static GimpValueArray *
-item_delete_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+item_id_is_drawable_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
- GimpItem *item;
+ GimpValueArray *return_vals;
+ gint item_id;
+ gboolean drawable = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item_id = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
- if (g_object_is_floating (item))
- {
- g_object_ref_sink (item);
- g_object_unref (item);
- }
- else
- success = FALSE;
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ drawable = (GIMP_IS_DRAWABLE (item) &&
+ ! gimp_item_is_removed (item));
}
- return gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
+ return_vals = gimp_procedure_get_return_values (procedure, success,
+ error ? *error : NULL);
+
+ if (success)
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), drawable);
+
+ return return_vals;
}
static GimpValueArray *
-item_is_drawable_invoker (GimpProcedure *procedure,
+item_id_is_layer_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
@@ -137,56 +121,63 @@ item_is_drawable_invoker (GimpProcedure *procedure,
{
gboolean success = TRUE;
GimpValueArray *return_vals;
- GimpItem *item;
- gboolean drawable = FALSE;
+ gint item_id;
+ gboolean layer = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item_id = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
- drawable = GIMP_IS_DRAWABLE (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ layer = (GIMP_IS_LAYER (item) &&
+ ! gimp_item_is_removed (item));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), drawable);
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
static GimpValueArray *
-item_is_layer_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+item_id_is_text_layer_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
- GimpItem *item;
- gboolean layer = FALSE;
+ gint item_id;
+ gboolean text_layer = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item_id = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
- layer = GIMP_IS_LAYER (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ text_layer = (GIMP_IS_LAYER (item) &&
+ ! gimp_item_is_removed (item) &&
+ gimp_item_is_text_layer (item));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), text_layer);
return return_vals;
}
static GimpValueArray *
-item_is_text_layer_invoker (GimpProcedure *procedure,
+item_id_is_channel_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
@@ -195,141 +186,181 @@ item_is_text_layer_invoker (GimpProcedure *procedure,
{
gboolean success = TRUE;
GimpValueArray *return_vals;
- GimpItem *item;
- gboolean text_layer = FALSE;
+ gint item_id;
+ gboolean channel = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item_id = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
- text_layer = gimp_item_is_text_layer (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ channel = (GIMP_IS_CHANNEL (item) &&
+ ! gimp_item_is_removed (item));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), text_layer);
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), channel);
return return_vals;
}
static GimpValueArray *
-item_is_channel_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+item_id_is_layer_mask_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
- GimpItem *item;
- gboolean channel = FALSE;
+ gint item_id;
+ gboolean layer_mask = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item_id = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
- channel = GIMP_IS_CHANNEL (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ layer_mask = (GIMP_IS_LAYER_MASK (item) &&
+ ! gimp_item_is_removed (item));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), channel);
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), layer_mask);
return return_vals;
}
static GimpValueArray *
-item_is_layer_mask_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+item_id_is_selection_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
- GimpItem *item;
- gboolean layer_mask = FALSE;
+ gint item_id;
+ gboolean selection = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item_id = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
- layer_mask = GIMP_IS_LAYER_MASK (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ selection = (GIMP_IS_SELECTION (item) &&
+ ! gimp_item_is_removed (item));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), layer_mask);
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), selection);
return return_vals;
}
static GimpValueArray *
-item_is_selection_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+item_id_is_vectors_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
- GimpItem *item;
- gboolean selection = FALSE;
+ gint item_id;
+ gboolean vectors = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item_id = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
- selection = GIMP_IS_SELECTION (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ vectors = (GIMP_IS_DRAWABLE (item) &&
+ ! gimp_item_is_removed (item));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), selection);
+ g_value_set_boolean (gimp_value_array_index (return_vals, 1), vectors);
return return_vals;
}
static GimpValueArray *
-item_is_vectors_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+item_get_image_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
GimpItem *item;
- gboolean vectors = FALSE;
+ GimpImage *image = NULL;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
- vectors = GIMP_IS_VECTORS (item);
+ image = gimp_item_get_image (GIMP_ITEM (item));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), vectors);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), image);
return return_vals;
}
+static GimpValueArray *
+item_delete_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
+{
+ gboolean success = TRUE;
+ GimpItem *item;
+
+ item = g_value_get_object (gimp_value_array_index (args, 0));
+
+ if (success)
+ {
+ if (g_object_is_floating (item))
+ {
+ g_object_ref_sink (item);
+ g_object_unref (item);
+ }
+ else
+ success = FALSE;
+ }
+
+ return gimp_procedure_get_return_values (procedure, success,
+ error ? *error : NULL);
+}
+
static GimpValueArray *
item_is_group_invoker (GimpProcedure *procedure,
Gimp *gimp,
@@ -343,7 +374,7 @@ item_is_group_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean group = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -372,7 +403,7 @@ item_get_parent_invoker (GimpProcedure *procedure,
GimpItem *item;
GimpItem *parent = NULL;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -383,7 +414,7 @@ item_get_parent_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), parent);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), parent);
return return_vals;
}
@@ -402,7 +433,7 @@ item_get_children_invoker (GimpProcedure *procedure,
gint num_children = 0;
gint32 *child_ids = NULL;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -457,7 +488,7 @@ item_get_expanded_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean expanded = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -485,7 +516,7 @@ item_set_expanded_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean expanded;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
expanded = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -510,7 +541,7 @@ item_get_name_invoker (GimpProcedure *procedure,
GimpItem *item;
gchar *name = NULL;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -538,7 +569,7 @@ item_set_name_invoker (GimpProcedure *procedure,
GimpItem *item;
const gchar *name;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -563,7 +594,7 @@ item_get_visible_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean visible = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -591,7 +622,7 @@ item_set_visible_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean visible;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
visible = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -616,7 +647,7 @@ item_get_linked_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean linked = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -644,7 +675,7 @@ item_set_linked_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean linked;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
linked = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -669,7 +700,7 @@ item_get_lock_content_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean lock_content = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -697,7 +728,7 @@ item_set_lock_content_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean lock_content;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
lock_content = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -725,7 +756,7 @@ item_get_lock_position_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean lock_position = FALSE;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -753,7 +784,7 @@ item_set_lock_position_invoker (GimpProcedure *procedure,
GimpItem *item;
gboolean lock_position;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
lock_position = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -781,7 +812,7 @@ item_get_color_tag_invoker (GimpProcedure *procedure,
GimpItem *item;
gint color_tag = 0;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -809,7 +840,7 @@ item_set_color_tag_invoker (GimpProcedure *procedure,
GimpItem *item;
gint color_tag;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
color_tag = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -834,7 +865,7 @@ item_get_tattoo_invoker (GimpProcedure *procedure,
GimpItem *item;
guint tattoo = 0;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -862,7 +893,7 @@ item_set_tattoo_invoker (GimpProcedure *procedure,
GimpItem *item;
guint tattoo;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
if (success)
@@ -886,7 +917,7 @@ item_attach_parasite_invoker (GimpProcedure *procedure,
GimpItem *item;
const GimpParasite *parasite;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
parasite = g_value_get_boxed (gimp_value_array_index (args, 1));
if (success)
@@ -913,7 +944,7 @@ item_detach_parasite_invoker (GimpProcedure *procedure,
GimpItem *item;
const gchar *name;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -939,7 +970,7 @@ item_get_parasite_invoker (GimpProcedure *procedure,
const gchar *name;
GimpParasite *parasite = NULL;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -973,7 +1004,7 @@ item_get_parasite_list_invoker (GimpProcedure *procedure,
gint num_parasites = 0;
gchar **parasites = NULL;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -998,24 +1029,24 @@ register_item_procs (GimpPDB *pdb)
GimpProcedure *procedure;
/*
- * gimp-item-is-valid
+ * gimp-item-id-is-valid
*/
- procedure = gimp_procedure_new (item_is_valid_invoker);
+ procedure = gimp_procedure_new (item_id_is_valid_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-is-valid");
+ "gimp-item-id-is-valid");
gimp_procedure_set_static_strings (procedure,
- "Returns TRUE if the item is valid.",
+ "Returns TRUE if the item ID is valid.",
"This procedure checks if the given item ID is valid and refers to an
existing item.",
"Sven Neumann <sven gimp org>",
"Sven Neumann",
"2007",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item to check",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
+ g_param_spec_int ("item-id",
+ "item id",
+ "The item ID to check",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("valid",
"valid",
@@ -1026,102 +1057,52 @@ register_item_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-item-get-image
+ * gimp-item-id-is-drawable
*/
- procedure = gimp_procedure_new (item_get_image_invoker);
+ procedure = gimp_procedure_new (item_id_is_drawable_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-get-image");
+ "gimp-item-id-is-drawable");
gimp_procedure_set_static_strings (procedure,
- "Returns the item's image.",
- "This procedure returns the item's image.",
+ "Returns whether the item ID is a drawable.",
+ "This procedure returns TRUE if the specified item ID is a drawable.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The item's image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-item-delete
- */
- procedure = gimp_procedure_new (item_delete_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-delete");
- gimp_procedure_set_static_strings (procedure,
- "Delete a item.",
- "This procedure deletes the specified item. This must not be done if
the image containing this item was already deleted or if the item was already removed from the image. The
only case in which this procedure is useful is if you want to get rid of a item which has not yet been added
to an image.",
- "Spencer Kimball & Peter Mattis",
- "Spencer Kimball & Peter Mattis",
- "1995-1996",
- NULL);
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item to delete",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-item-is-drawable
- */
- procedure = gimp_procedure_new (item_is_drawable_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-is-drawable");
- gimp_procedure_set_static_strings (procedure,
- "Returns whether the item is a drawable.",
- "This procedure returns TRUE if the specified item is a drawable.",
- "Spencer Kimball & Peter Mattis",
- "Spencer Kimball & Peter Mattis",
- "1995-1996",
- NULL);
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ g_param_spec_int ("item-id",
+ "item id",
+ "The item ID",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("drawable",
"drawable",
- "TRUE if the item is a drawable, FALSE otherwise",
+ "TRUE if the item ID is a drawable, FALSE
otherwise",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
- * gimp-item-is-layer
+ * gimp-item-id-is-layer
*/
- procedure = gimp_procedure_new (item_is_layer_invoker);
+ procedure = gimp_procedure_new (item_id_is_layer_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-is-layer");
+ "gimp-item-id-is-layer");
gimp_procedure_set_static_strings (procedure,
- "Returns whether the item is a layer.",
- "This procedure returns TRUE if the specified item is a layer.",
+ "Returns whether the item ID is a layer.",
+ "This procedure returns TRUE if the specified item ID is a layer.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ g_param_spec_int ("item-id",
+ "item id",
+ "The item ID",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("layer",
"layer",
@@ -1132,24 +1113,24 @@ register_item_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-item-is-text-layer
+ * gimp-item-id-is-text-layer
*/
- procedure = gimp_procedure_new (item_is_text_layer_invoker);
+ procedure = gimp_procedure_new (item_id_is_text_layer_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-is-text-layer");
+ "gimp-item-id-is-text-layer");
gimp_procedure_set_static_strings (procedure,
- "Returns whether the item is a text layer.",
- "This procedure returns TRUE if the specified item is a text layer.",
+ "Returns whether the item ID is a text layer.",
+ "This procedure returns TRUE if the specified item ID is a text layer.",
"Michael Natterer <mitch gimp org>",
"Michael Natterer",
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ g_param_spec_int ("item-id",
+ "item id",
+ "The item ID",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("text-layer",
"text layer",
@@ -1160,117 +1141,167 @@ register_item_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-item-is-channel
+ * gimp-item-id-is-channel
*/
- procedure = gimp_procedure_new (item_is_channel_invoker);
+ procedure = gimp_procedure_new (item_id_is_channel_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-is-channel");
+ "gimp-item-id-is-channel");
gimp_procedure_set_static_strings (procedure,
- "Returns whether the item is a channel.",
- "This procedure returns TRUE if the specified item is a channel.",
+ "Returns whether the item ID is a channel.",
+ "This procedure returns TRUE if the specified item ID is a channel.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ g_param_spec_int ("item-id",
+ "item id",
+ "The item ID",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("channel",
"channel",
- "TRUE if the item is a channel, FALSE otherwise",
+ "TRUE if the item ID is a channel, FALSE otherwise",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
- * gimp-item-is-layer-mask
+ * gimp-item-id-is-layer-mask
*/
- procedure = gimp_procedure_new (item_is_layer_mask_invoker);
+ procedure = gimp_procedure_new (item_id_is_layer_mask_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-is-layer-mask");
+ "gimp-item-id-is-layer-mask");
gimp_procedure_set_static_strings (procedure,
- "Returns whether the item is a layer mask.",
- "This procedure returns TRUE if the specified item is a layer mask.",
+ "Returns whether the item ID is a layer mask.",
+ "This procedure returns TRUE if the specified item ID is a layer mask.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ g_param_spec_int ("item-id",
+ "item id",
+ "The item",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("layer-mask",
"layer mask",
- "TRUE if the item is a layer mask, FALSE otherwise",
+ "TRUE if the item ID is a layer mask, FALSE
otherwise",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
- * gimp-item-is-selection
+ * gimp-item-id-is-selection
*/
- procedure = gimp_procedure_new (item_is_selection_invoker);
+ procedure = gimp_procedure_new (item_id_is_selection_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-is-selection");
+ "gimp-item-id-is-selection");
gimp_procedure_set_static_strings (procedure,
- "Returns whether the item is a selection.",
- "This procedure returns TRUE if the specified item is a selection.",
+ "Returns whether the item ID is a selection.",
+ "This procedure returns TRUE if the specified item ID is a selection.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ g_param_spec_int ("item-id",
+ "item id",
+ "The item ID",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("selection",
"selection",
- "TRUE if the item is a selection, FALSE otherwise",
+ "TRUE if the item ID is a selection, FALSE
otherwise",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
- * gimp-item-is-vectors
+ * gimp-item-id-is-vectors
*/
- procedure = gimp_procedure_new (item_is_vectors_invoker);
+ procedure = gimp_procedure_new (item_id_is_vectors_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-item-is-vectors");
+ "gimp-item-id-is-vectors");
gimp_procedure_set_static_strings (procedure,
- "Returns whether the item is a vectors.",
- "This procedure returns TRUE if the specified item is a vectors.",
+ "Returns whether the item ID is a vectors.",
+ "This procedure returns TRUE if the specified item ID is a vectors.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ g_param_spec_int ("item-id",
+ "item id",
+ "The item ID",
+ G_MININT32, G_MAXINT32, 0,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("vectors",
"vectors",
- "TRUE if the item is a vectors, FALSE otherwise",
+ "TRUE if the item ID is a vectors, FALSE otherwise",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
+ /*
+ * gimp-item-get-image
+ */
+ procedure = gimp_procedure_new (item_get_image_invoker);
+ gimp_object_set_static_name (GIMP_OBJECT (procedure),
+ "gimp-item-get-image");
+ gimp_procedure_set_static_strings (procedure,
+ "Returns the item's image.",
+ "This procedure returns the item's image.",
+ "Spencer Kimball & Peter Mattis",
+ "Spencer Kimball & Peter Mattis",
+ "1995-1996",
+ NULL);
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_return_value (procedure,
+ gimp_param_spec_image ("image",
+ "image",
+ "The item's image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
+ gimp_pdb_register_procedure (pdb, procedure);
+ g_object_unref (procedure);
+
+ /*
+ * gimp-item-delete
+ */
+ procedure = gimp_procedure_new (item_delete_invoker);
+ gimp_object_set_static_name (GIMP_OBJECT (procedure),
+ "gimp-item-delete");
+ gimp_procedure_set_static_strings (procedure,
+ "Delete a item.",
+ "This procedure deletes the specified item. This must not be done if
the image containing this item was already deleted or if the item was already removed from the image. The
only case in which this procedure is useful is if you want to get rid of a item which has not yet been added
to an image.",
+ "Spencer Kimball & Peter Mattis",
+ "Spencer Kimball & Peter Mattis",
+ "1995-1996",
+ NULL);
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_item ("item",
+ "item",
+ "The item to delete",
+ FALSE,
+ GIMP_PARAM_READWRITE));
+ gimp_pdb_register_procedure (pdb, procedure);
+ g_object_unref (procedure);
+
/*
* gimp-item-is-group
*/
@@ -1285,11 +1316,11 @@ register_item_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("group",
"group",
@@ -1313,17 +1344,17 @@ register_item_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("parent",
- "parent",
- "The item's parent item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("parent",
+ "parent",
+ "The item's parent item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1341,11 +1372,11 @@ register_item_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-children",
"num children",
@@ -1374,11 +1405,11 @@ register_item_procs (GimpPDB *pdb)
"2017",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("expanded",
"expanded",
@@ -1402,11 +1433,11 @@ register_item_procs (GimpPDB *pdb)
"2017",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("expanded",
"expanded",
@@ -1430,11 +1461,11 @@ register_item_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
@@ -1459,11 +1490,11 @@ register_item_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -1488,11 +1519,11 @@ register_item_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("visible",
"visible",
@@ -1516,11 +1547,11 @@ register_item_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("visible",
"visible",
@@ -1544,11 +1575,11 @@ register_item_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("linked",
"linked",
@@ -1572,11 +1603,11 @@ register_item_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("linked",
"linked",
@@ -1600,11 +1631,11 @@ register_item_procs (GimpPDB *pdb)
"2009",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("lock-content",
"lock content",
@@ -1628,11 +1659,11 @@ register_item_procs (GimpPDB *pdb)
"2009",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("lock-content",
"lock content",
@@ -1656,11 +1687,11 @@ register_item_procs (GimpPDB *pdb)
"2012",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("lock-position",
"lock position",
@@ -1684,11 +1715,11 @@ register_item_procs (GimpPDB *pdb)
"2009",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("lock-position",
"lock position",
@@ -1712,11 +1743,11 @@ register_item_procs (GimpPDB *pdb)
"2016",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("color-tag",
"color tag",
@@ -1741,11 +1772,11 @@ register_item_procs (GimpPDB *pdb)
"2016",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("color-tag",
"color tag",
@@ -1770,11 +1801,11 @@ register_item_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_uint ("tattoo",
"tattoo",
@@ -1798,11 +1829,11 @@ register_item_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uint ("tattoo",
"tattoo",
@@ -1826,11 +1857,11 @@ register_item_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_parasite ("parasite",
"parasite",
@@ -1853,11 +1884,11 @@ register_item_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -1882,11 +1913,11 @@ register_item_procs (GimpPDB *pdb)
"1998",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -1916,11 +1947,11 @@ register_item_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-parasites",
"num parasites",
diff --git a/app/pdb/item-transform-cmds.c b/app/pdb/item-transform-cmds.c
index 425417f347..0fa42c560a 100644
--- a/app/pdb/item-transform-cmds.c
+++ b/app/pdb/item-transform-cmds.c
@@ -62,7 +62,7 @@ item_transform_translate_invoker (GimpProcedure *procedure,
gdouble off_x;
gdouble off_y;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
off_x = g_value_get_double (gimp_value_array_index (args, 1));
off_y = g_value_get_double (gimp_value_array_index (args, 2));
@@ -88,7 +88,7 @@ item_transform_translate_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -108,7 +108,7 @@ item_transform_flip_simple_invoker (GimpProcedure *procedure,
gboolean auto_center;
gdouble axis;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
flip_type = g_value_get_enum (gimp_value_array_index (args, 1));
auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
axis = g_value_get_double (gimp_value_array_index (args, 3));
@@ -172,7 +172,7 @@ item_transform_flip_simple_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -193,7 +193,7 @@ item_transform_flip_invoker (GimpProcedure *procedure,
gdouble x1;
gdouble y1;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
x0 = g_value_get_double (gimp_value_array_index (args, 1));
y0 = g_value_get_double (gimp_value_array_index (args, 2));
x1 = g_value_get_double (gimp_value_array_index (args, 3));
@@ -273,7 +273,7 @@ item_transform_flip_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -298,7 +298,7 @@ item_transform_perspective_invoker (GimpProcedure *procedure,
gdouble x3;
gdouble y3;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
x0 = g_value_get_double (gimp_value_array_index (args, 1));
y0 = g_value_get_double (gimp_value_array_index (args, 2));
x1 = g_value_get_double (gimp_value_array_index (args, 3));
@@ -385,7 +385,7 @@ item_transform_perspective_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -406,7 +406,7 @@ item_transform_rotate_simple_invoker (GimpProcedure *procedure,
gdouble center_x;
gdouble center_y;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
rotate_type = g_value_get_enum (gimp_value_array_index (args, 1));
auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
center_x = g_value_get_double (gimp_value_array_index (args, 3));
@@ -475,7 +475,7 @@ item_transform_rotate_simple_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -496,7 +496,7 @@ item_transform_rotate_invoker (GimpProcedure *procedure,
gdouble center_x;
gdouble center_y;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
angle = g_value_get_double (gimp_value_array_index (args, 1));
auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
center_x = g_value_get_double (gimp_value_array_index (args, 3));
@@ -581,7 +581,7 @@ item_transform_rotate_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -602,7 +602,7 @@ item_transform_scale_invoker (GimpProcedure *procedure,
gdouble x1;
gdouble y1;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
x0 = g_value_get_double (gimp_value_array_index (args, 1));
y0 = g_value_get_double (gimp_value_array_index (args, 2));
x1 = g_value_get_double (gimp_value_array_index (args, 3));
@@ -685,7 +685,7 @@ item_transform_scale_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -704,7 +704,7 @@ item_transform_shear_invoker (GimpProcedure *procedure,
gint shear_type;
gdouble magnitude;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
shear_type = g_value_get_enum (gimp_value_array_index (args, 1));
magnitude = g_value_get_double (gimp_value_array_index (args, 2));
@@ -784,7 +784,7 @@ item_transform_shear_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -808,7 +808,7 @@ item_transform_2d_invoker (GimpProcedure *procedure,
gdouble dest_x;
gdouble dest_y;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
source_x = g_value_get_double (gimp_value_array_index (args, 1));
source_y = g_value_get_double (gimp_value_array_index (args, 2));
scale_x = g_value_get_double (gimp_value_array_index (args, 3));
@@ -894,7 +894,7 @@ item_transform_2d_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -920,7 +920,7 @@ item_transform_matrix_invoker (GimpProcedure *procedure,
gdouble coeff_2_1;
gdouble coeff_2_2;
- item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+ item = g_value_get_object (gimp_value_array_index (args, 0));
coeff_0_0 = g_value_get_double (gimp_value_array_index (args, 1));
coeff_0_1 = g_value_get_double (gimp_value_array_index (args, 2));
coeff_0_2 = g_value_get_double (gimp_value_array_index (args, 3));
@@ -1012,7 +1012,7 @@ item_transform_matrix_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), item);
return return_vals;
}
@@ -1038,11 +1038,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2018",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("off-x",
"off x",
@@ -1056,11 +1056,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The translated item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The translated item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1084,11 +1084,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2004",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The affected item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The affected item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_enum ("flip-type",
"flip type",
@@ -1111,11 +1111,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The flipped item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The flipped item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1139,11 +1139,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The affected item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The affected item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("x0",
"x0",
@@ -1169,11 +1169,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The flipped item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The flipped item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1199,11 +1199,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The affected item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The affected item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("x0",
"x0",
@@ -1253,11 +1253,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The transformed item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The transformed item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1281,11 +1281,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The affected item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The affected item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("rotate-type",
"rotate type",
@@ -1312,11 +1312,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The rotated item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The rotated item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1340,11 +1340,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The affected item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The affected item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("angle",
"angle",
@@ -1370,11 +1370,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The rotated item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The rotated item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1400,11 +1400,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The affected item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The affected item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("x0",
"x0",
@@ -1430,11 +1430,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The scaled item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The scaled item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1460,11 +1460,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The affected item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The affected item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_enum ("shear-type",
"shear type",
@@ -1481,11 +1481,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The sheared item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The sheared item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1511,11 +1511,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The affected item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The affected item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("source-x",
"source x",
@@ -1559,11 +1559,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The transformed item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The transformed item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1589,11 +1589,11 @@ register_item_transform_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The affected item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The affected item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("coeff-0-0",
"coeff 0 0",
@@ -1649,11 +1649,11 @@ register_item_transform_procs (GimpPDB *pdb)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_item_id ("item",
- "item",
- "The transformed item",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_item ("item",
+ "item",
+ "The transformed item",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
diff --git a/app/pdb/layer-cmds.c b/app/pdb/layer-cmds.c
index c0bfa8513a..b8c2285771 100644
--- a/app/pdb/layer-cmds.c
+++ b/app/pdb/layer-cmds.c
@@ -75,7 +75,7 @@ layer_new_invoker (GimpProcedure *procedure,
gint mode;
GimpLayer *layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
width = g_value_get_int (gimp_value_array_index (args, 1));
height = g_value_get_int (gimp_value_array_index (args, 2));
type = g_value_get_enum (gimp_value_array_index (args, 3));
@@ -152,7 +152,7 @@ layer_new_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -172,8 +172,8 @@ layer_new_from_visible_invoker (GimpProcedure *procedure,
const gchar *name;
GimpLayer *layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- dest_image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ dest_image = g_value_get_object (gimp_value_array_index (args, 1));
name = g_value_get_string (gimp_value_array_index (args, 2));
if (success)
@@ -199,7 +199,7 @@ layer_new_from_visible_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -218,8 +218,8 @@ layer_new_from_drawable_invoker (GimpProcedure *procedure,
GimpImage *dest_image;
GimpLayer *layer_copy = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
- dest_image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
+ dest_image = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -243,7 +243,7 @@ layer_new_from_drawable_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer_copy);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer_copy);
return return_vals;
}
@@ -261,7 +261,7 @@ layer_group_new_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpLayer *layer_group = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -275,7 +275,7 @@ layer_group_new_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer_group);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer_group);
return return_vals;
}
@@ -294,7 +294,7 @@ layer_copy_invoker (GimpProcedure *procedure,
gboolean add_alpha;
GimpLayer *layer_copy = NULL;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
add_alpha = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -316,7 +316,7 @@ layer_copy_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer_copy);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer_copy);
return return_vals;
}
@@ -332,7 +332,7 @@ layer_add_alpha_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpLayer *layer;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -361,7 +361,7 @@ layer_flatten_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpLayer *layer;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -393,7 +393,7 @@ layer_scale_invoker (GimpProcedure *procedure,
gint new_height;
gboolean local_origin;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
new_width = g_value_get_int (gimp_value_array_index (args, 1));
new_height = g_value_get_int (gimp_value_array_index (args, 2));
local_origin = g_value_get_boolean (gimp_value_array_index (args, 3));
@@ -441,7 +441,7 @@ layer_resize_invoker (GimpProcedure *procedure,
gint offx;
gint offy;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
new_width = g_value_get_int (gimp_value_array_index (args, 1));
new_height = g_value_get_int (gimp_value_array_index (args, 2));
offx = g_value_get_int (gimp_value_array_index (args, 3));
@@ -473,7 +473,7 @@ layer_resize_to_image_size_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpLayer *layer;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -502,7 +502,7 @@ layer_set_offsets_invoker (GimpProcedure *procedure,
gint offx;
gint offy;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
offx = g_value_get_int (gimp_value_array_index (args, 1));
offy = g_value_get_int (gimp_value_array_index (args, 2));
@@ -549,7 +549,7 @@ layer_create_mask_invoker (GimpProcedure *procedure,
gint mask_type;
GimpLayerMask *mask = NULL;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
mask_type = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -577,7 +577,7 @@ layer_create_mask_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer_mask (gimp_value_array_index (return_vals, 1), mask);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), mask);
return return_vals;
}
@@ -595,7 +595,7 @@ layer_get_mask_invoker (GimpProcedure *procedure,
GimpLayer *layer;
GimpLayerMask *mask = NULL;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -606,7 +606,7 @@ layer_get_mask_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer_mask (gimp_value_array_index (return_vals, 1), mask);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), mask);
return return_vals;
}
@@ -624,7 +624,7 @@ layer_from_mask_invoker (GimpProcedure *procedure,
GimpLayerMask *mask;
GimpLayer *layer = NULL;
- mask = gimp_value_get_layer_mask (gimp_value_array_index (args, 0), gimp);
+ mask = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -635,7 +635,7 @@ layer_from_mask_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -652,8 +652,8 @@ layer_add_mask_invoker (GimpProcedure *procedure,
GimpLayer *layer;
GimpLayerMask *mask;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
- mask = gimp_value_get_layer_mask (gimp_value_array_index (args, 1), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
+ mask = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -681,7 +681,7 @@ layer_remove_mask_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint mode;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
mode = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -717,7 +717,7 @@ layer_is_floating_sel_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean is_floating_sel = FALSE;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -746,7 +746,7 @@ layer_get_lock_alpha_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean lock_alpha = FALSE;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -774,7 +774,7 @@ layer_set_lock_alpha_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean lock_alpha;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
lock_alpha = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -802,7 +802,7 @@ layer_get_apply_mask_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean apply_mask = FALSE;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -833,7 +833,7 @@ layer_set_apply_mask_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean apply_mask;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
apply_mask = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -861,7 +861,7 @@ layer_get_show_mask_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean show_mask = FALSE;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -892,7 +892,7 @@ layer_set_show_mask_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean show_mask;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
show_mask = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -920,7 +920,7 @@ layer_get_edit_mask_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean edit_mask = FALSE;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -951,7 +951,7 @@ layer_set_edit_mask_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean edit_mask;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
edit_mask = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -979,7 +979,7 @@ layer_get_opacity_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gdouble opacity = 0.0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1007,7 +1007,7 @@ layer_set_opacity_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gdouble opacity;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
opacity = g_value_get_double (gimp_value_array_index (args, 1));
if (success)
@@ -1032,7 +1032,7 @@ layer_get_mode_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint mode = 0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1060,7 +1060,7 @@ layer_set_mode_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint mode;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
mode = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -1100,7 +1100,7 @@ layer_get_blend_space_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint blend_space = 0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1128,7 +1128,7 @@ layer_set_blend_space_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint blend_space;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
blend_space = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -1153,7 +1153,7 @@ layer_get_composite_space_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint composite_space = 0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1181,7 +1181,7 @@ layer_set_composite_space_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint composite_space;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
composite_space = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -1206,7 +1206,7 @@ layer_get_composite_mode_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint composite_mode = 0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1234,7 +1234,7 @@ layer_set_composite_mode_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint composite_mode;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
composite_mode = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -1265,11 +1265,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image to which to add the layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image to which to add the layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("width",
"width",
@@ -1310,11 +1310,11 @@ register_layer_procs (GimpPDB *pdb)
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The newly created layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The newly created layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1332,17 +1332,17 @@ register_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The source image from where the content is copied",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The source image from where the content is copied",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("dest-image",
- "dest image",
- "The destination image to which to add the layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("dest-image",
+ "dest image",
+ "The destination image to which to add the layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -1351,11 +1351,11 @@ register_layer_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The newly created layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The newly created layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1373,23 +1373,23 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The source drawable from where the new layer is
copied",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("dest-image",
- "dest image",
- "The destination image to which to add the layer",
- pdb->gimp, FALSE,
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The source drawable from where the new layer is
copied",
+ FALSE,
GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_image ("dest-image",
+ "dest image",
+ "The destination image to which to add the layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer-copy",
- "layer copy",
- "The newly copied layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer-copy",
+ "layer copy",
+ "The newly copied layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1408,17 +1408,17 @@ register_layer_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image to which to add the layer group",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image to which to add the layer group",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer-group",
- "layer group",
- "The newly created layer group",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer-group",
+ "layer group",
+ "The newly created layer group",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1436,11 +1436,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer to copy",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer to copy",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("add-alpha",
"add alpha",
@@ -1448,11 +1448,11 @@ register_layer_procs (GimpPDB *pdb)
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer-copy",
- "layer copy",
- "The newly copied layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer-copy",
+ "layer copy",
+ "The newly copied layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1470,11 +1470,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1492,11 +1492,11 @@ register_layer_procs (GimpPDB *pdb)
"2007",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1514,11 +1514,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("new-width",
"new width",
@@ -1554,11 +1554,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("new-width",
"new width",
@@ -1600,11 +1600,11 @@ register_layer_procs (GimpPDB *pdb)
"2003",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer to resize",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer to resize",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1622,11 +1622,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("offx",
"offx",
@@ -1667,11 +1667,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer to which to add the mask",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer to which to add the mask",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("mask-type",
"mask type",
@@ -1680,11 +1680,11 @@ register_layer_procs (GimpPDB *pdb)
GIMP_ADD_MASK_WHITE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_mask_id ("mask",
- "mask",
- "The newly created mask",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer_mask ("mask",
+ "mask",
+ "The newly created mask",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1702,17 +1702,17 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_mask_id ("mask",
- "mask",
- "The layer mask",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer_mask ("mask",
+ "mask",
+ "The layer mask",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1730,17 +1730,17 @@ register_layer_procs (GimpPDB *pdb)
"2004",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_mask_id ("mask",
- "mask",
- "Mask for which to return the layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer_mask ("mask",
+ "mask",
+ "Mask for which to return the layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The mask's layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The mask's layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1758,17 +1758,17 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer to receive the mask",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer to receive the mask",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_mask_id ("mask",
- "mask",
- "The mask to add to the layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer_mask ("mask",
+ "mask",
+ "The mask to add to the layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1786,11 +1786,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer from which to remove mask",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer from which to remove mask",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("mode",
"mode",
@@ -1815,11 +1815,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("is-floating-sel",
"is floating sel",
@@ -1843,11 +1843,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("lock-alpha",
"lock alpha",
@@ -1871,11 +1871,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("lock-alpha",
"lock alpha",
@@ -1899,11 +1899,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("apply-mask",
"apply mask",
@@ -1927,11 +1927,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("apply-mask",
"apply mask",
@@ -1955,11 +1955,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("show-mask",
"show mask",
@@ -1983,11 +1983,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("show-mask",
"show mask",
@@ -2011,11 +2011,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("edit-mask",
"edit mask",
@@ -2039,11 +2039,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("edit-mask",
"edit mask",
@@ -2067,11 +2067,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("opacity",
"opacity",
@@ -2095,11 +2095,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
"opacity",
@@ -2123,11 +2123,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("mode",
"mode",
@@ -2152,11 +2152,11 @@ register_layer_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("mode",
"mode",
@@ -2181,11 +2181,11 @@ register_layer_procs (GimpPDB *pdb)
"2017",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("blend-space",
"blend space",
@@ -2210,11 +2210,11 @@ register_layer_procs (GimpPDB *pdb)
"2017",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("blend-space",
"blend space",
@@ -2239,11 +2239,11 @@ register_layer_procs (GimpPDB *pdb)
"2017",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("composite-space",
"composite space",
@@ -2268,11 +2268,11 @@ register_layer_procs (GimpPDB *pdb)
"2017",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("composite-space",
"composite space",
@@ -2297,11 +2297,11 @@ register_layer_procs (GimpPDB *pdb)
"2017",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("composite-mode",
"composite mode",
@@ -2326,11 +2326,11 @@ register_layer_procs (GimpPDB *pdb)
"2017",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("composite-mode",
"composite mode",
diff --git a/app/pdb/paint-tools-cmds.c b/app/pdb/paint-tools-cmds.c
index 7dc9d1461b..50807aac46 100644
--- a/app/pdb/paint-tools-cmds.c
+++ b/app/pdb/paint-tools-cmds.c
@@ -114,7 +114,7 @@ airbrush_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
pressure = g_value_get_double (gimp_value_array_index (args, 1));
num_strokes = g_value_get_int (gimp_value_array_index (args, 2));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 3));
@@ -162,7 +162,7 @@ airbrush_default_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
@@ -209,8 +209,8 @@ clone_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
- src_drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
+ src_drawable = g_value_get_object (gimp_value_array_index (args, 1));
clone_type = g_value_get_enum (gimp_value_array_index (args, 2));
src_x = g_value_get_double (gimp_value_array_index (args, 3));
src_y = g_value_get_double (gimp_value_array_index (args, 4));
@@ -263,7 +263,7 @@ clone_default_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
@@ -308,7 +308,7 @@ convolve_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
pressure = g_value_get_double (gimp_value_array_index (args, 1));
convolve_type = g_value_get_enum (gimp_value_array_index (args, 2));
num_strokes = g_value_get_int (gimp_value_array_index (args, 3));
@@ -358,7 +358,7 @@ convolve_default_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
@@ -404,7 +404,7 @@ dodgeburn_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
exposure = g_value_get_double (gimp_value_array_index (args, 1));
dodgeburn_type = g_value_get_enum (gimp_value_array_index (args, 2));
dodgeburn_mode = g_value_get_enum (gimp_value_array_index (args, 3));
@@ -456,7 +456,7 @@ dodgeburn_default_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
@@ -501,7 +501,7 @@ eraser_invoker (GimpProcedure *procedure,
gint hardness;
gint method;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
hardness = g_value_get_enum (gimp_value_array_index (args, 3));
@@ -551,7 +551,7 @@ eraser_default_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
@@ -597,8 +597,8 @@ heal_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
- src_drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
+ src_drawable = g_value_get_object (gimp_value_array_index (args, 1));
src_x = g_value_get_double (gimp_value_array_index (args, 2));
src_y = g_value_get_double (gimp_value_array_index (args, 3));
num_strokes = g_value_get_int (gimp_value_array_index (args, 4));
@@ -646,7 +646,7 @@ heal_default_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
@@ -692,7 +692,7 @@ paintbrush_invoker (GimpProcedure *procedure,
gint method;
gdouble gradient_length;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
fade_out = g_value_get_double (gimp_value_array_index (args, 1));
num_strokes = g_value_get_int (gimp_value_array_index (args, 2));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 3));
@@ -774,7 +774,7 @@ paintbrush_default_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
@@ -817,7 +817,7 @@ pencil_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
@@ -861,7 +861,7 @@ smudge_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
pressure = g_value_get_double (gimp_value_array_index (args, 1));
num_strokes = g_value_get_int (gimp_value_array_index (args, 2));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 3));
@@ -909,7 +909,7 @@ smudge_default_invoker (GimpProcedure *procedure,
gint num_strokes;
const gdouble *strokes;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
strokes = gimp_value_get_float_array (gimp_value_array_index (args, 2));
@@ -958,11 +958,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("pressure",
"pressure",
@@ -997,11 +997,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1030,17 +1030,17 @@ register_paint_tools_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("src-drawable",
- "src drawable",
- "The source drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("src-drawable",
+ "src drawable",
+ "The source drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("clone-type",
"clone type",
@@ -1088,11 +1088,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1121,11 +1121,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("pressure",
"pressure",
@@ -1167,11 +1167,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1200,11 +1200,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("exposure",
"exposure",
@@ -1253,11 +1253,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1286,11 +1286,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1333,11 +1333,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1366,17 +1366,17 @@ register_paint_tools_procs (GimpPDB *pdb)
"2006",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("src-drawable",
- "src drawable",
- "The source drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("src-drawable",
+ "src drawable",
+ "The source drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("src-x",
"src x",
@@ -1417,11 +1417,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"2006",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1450,11 +1450,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("fade-out",
"fade out",
@@ -1502,11 +1502,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1535,11 +1535,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1568,11 +1568,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("pressure",
"pressure",
@@ -1607,11 +1607,11 @@ register_paint_tools_procs (GimpPDB *pdb)
"1999",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
diff --git a/app/pdb/plug-in-compat-cmds.c b/app/pdb/plug-in-compat-cmds.c
index 500b445145..dd3dd2dbe0 100644
--- a/app/pdb/plug-in-compat-cmds.c
+++ b/app/pdb/plug-in-compat-cmds.c
@@ -410,7 +410,7 @@ plug_in_alienmap2_invoker (GimpProcedure *procedure,
guchar greenmode;
guchar bluemode;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
redfrequency = g_value_get_double (gimp_value_array_index (args, 3));
redangle = g_value_get_double (gimp_value_array_index (args, 4));
greenfrequency = g_value_get_double (gimp_value_array_index (args, 5));
@@ -467,7 +467,7 @@ plug_in_antialias_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -506,7 +506,7 @@ plug_in_apply_canvas_invoker (GimpProcedure *procedure,
gint direction;
gint depth;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
direction = g_value_get_int (gimp_value_array_index (args, 3));
depth = g_value_get_int (gimp_value_array_index (args, 4));
@@ -550,7 +550,7 @@ plug_in_applylens_invoker (GimpProcedure *procedure,
gboolean keep_surroundings;
gboolean set_background;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
refraction = g_value_get_double (gimp_value_array_index (args, 3));
keep_surroundings = g_value_get_boolean (gimp_value_array_index (args, 4));
set_background = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -608,8 +608,8 @@ plug_in_autocrop_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpDrawable *drawable;
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -671,8 +671,8 @@ plug_in_autocrop_layer_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpDrawable *drawable;
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -725,7 +725,7 @@ plug_in_autostretch_hsv_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -773,8 +773,8 @@ plug_in_bump_map_invoker (GimpProcedure *procedure,
gboolean invert;
gint type;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
- bumpmap = gimp_value_get_drawable (gimp_value_array_index (args, 3), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
+ bumpmap = g_value_get_object (gimp_value_array_index (args, 3));
azimuth = g_value_get_double (gimp_value_array_index (args, 4));
elevation = g_value_get_double (gimp_value_array_index (args, 5));
depth = g_value_get_int (gimp_value_array_index (args, 6));
@@ -831,8 +831,8 @@ plug_in_bump_map_tiled_invoker (GimpProcedure *procedure,
gboolean invert;
gint type;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
- bumpmap = gimp_value_get_drawable (gimp_value_array_index (args, 3), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
+ bumpmap = g_value_get_object (gimp_value_array_index (args, 3));
azimuth = g_value_get_double (gimp_value_array_index (args, 4));
elevation = g_value_get_double (gimp_value_array_index (args, 5));
depth = g_value_get_int (gimp_value_array_index (args, 6));
@@ -878,7 +878,7 @@ plug_in_c_astretch_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -918,7 +918,7 @@ plug_in_cartoon_invoker (GimpProcedure *procedure,
gdouble mask_radius;
gdouble pct_black;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
mask_radius = g_value_get_double (gimp_value_array_index (args, 3));
pct_black = g_value_get_double (gimp_value_array_index (args, 4));
@@ -969,7 +969,7 @@ plug_in_colors_channel_mixer_invoker (GimpProcedure *procedure,
gdouble bg_gain;
gdouble bb_gain;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
monochrome = g_value_get_int (gimp_value_array_index (args, 3));
rr_gain = g_value_get_double (gimp_value_array_index (args, 4));
rg_gain = g_value_get_double (gimp_value_array_index (args, 5));
@@ -1039,7 +1039,7 @@ plug_in_colortoalpha_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
GimpRGB color;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
gimp_value_get_rgb (gimp_value_array_index (args, 3), &color);
if (success)
@@ -1090,7 +1090,7 @@ plug_in_convmatrix_invoker (GimpProcedure *procedure,
const gint32 *channels;
gint bmode;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
argc_matrix = g_value_get_int (gimp_value_array_index (args, 3));
matrix = gimp_value_get_float_array (gimp_value_array_index (args, 4));
alpha_alg = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -1211,7 +1211,7 @@ plug_in_cubism_invoker (GimpProcedure *procedure,
gdouble tile_saturation;
gint bg_color;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
tile_size = g_value_get_double (gimp_value_array_index (args, 3));
tile_saturation = g_value_get_double (gimp_value_array_index (args, 4));
bg_color = g_value_get_int (gimp_value_array_index (args, 5));
@@ -1271,7 +1271,7 @@ plug_in_deinterlace_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint evenodd;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
evenodd = g_value_get_int (gimp_value_array_index (args, 3));
if (success)
@@ -1327,7 +1327,7 @@ plug_in_diffraction_invoker (GimpProcedure *procedure,
gdouble scattering;
gdouble polarization;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
lam_r = g_value_get_double (gimp_value_array_index (args, 3));
lam_g = g_value_get_double (gimp_value_array_index (args, 4));
lam_b = g_value_get_double (gimp_value_array_index (args, 5));
@@ -1401,13 +1401,13 @@ plug_in_displace_invoker (GimpProcedure *procedure,
GimpDrawable *displace_map_y;
gint displace_type;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
amount_x = g_value_get_double (gimp_value_array_index (args, 3));
amount_y = g_value_get_double (gimp_value_array_index (args, 4));
do_x = g_value_get_boolean (gimp_value_array_index (args, 5));
do_y = g_value_get_boolean (gimp_value_array_index (args, 6));
- displace_map_x = gimp_value_get_drawable (gimp_value_array_index (args, 7), gimp);
- displace_map_y = gimp_value_get_drawable (gimp_value_array_index (args, 8), gimp);
+ displace_map_x = g_value_get_object (gimp_value_array_index (args, 7));
+ displace_map_y = g_value_get_object (gimp_value_array_index (args, 8));
displace_type = g_value_get_int (gimp_value_array_index (args, 9));
if (success)
@@ -1447,13 +1447,13 @@ plug_in_displace_polar_invoker (GimpProcedure *procedure,
GimpDrawable *displace_map_y;
gint displace_type;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
amount_x = g_value_get_double (gimp_value_array_index (args, 3));
amount_y = g_value_get_double (gimp_value_array_index (args, 4));
do_x = g_value_get_boolean (gimp_value_array_index (args, 5));
do_y = g_value_get_boolean (gimp_value_array_index (args, 6));
- displace_map_x = gimp_value_get_drawable (gimp_value_array_index (args, 7), gimp);
- displace_map_y = gimp_value_get_drawable (gimp_value_array_index (args, 8), gimp);
+ displace_map_x = g_value_get_object (gimp_value_array_index (args, 7));
+ displace_map_y = g_value_get_object (gimp_value_array_index (args, 8));
displace_type = g_value_get_int (gimp_value_array_index (args, 9));
if (success)
@@ -1491,8 +1491,8 @@ plug_in_dog_invoker (GimpProcedure *procedure,
gboolean normalize;
gboolean invert;
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
inner = g_value_get_double (gimp_value_array_index (args, 3));
outer = g_value_get_double (gimp_value_array_index (args, 4));
normalize = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -1568,7 +1568,7 @@ plug_in_edge_invoker (GimpProcedure *procedure,
gint warpmode;
gint edgemode;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
amount = g_value_get_double (gimp_value_array_index (args, 3));
warpmode = g_value_get_int (gimp_value_array_index (args, 4));
edgemode = g_value_get_int (gimp_value_array_index (args, 5));
@@ -1636,7 +1636,7 @@ plug_in_emboss_invoker (GimpProcedure *procedure,
gint depth;
gboolean emboss;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
azimuth = g_value_get_double (gimp_value_array_index (args, 3));
elevation = g_value_get_double (gimp_value_array_index (args, 4));
depth = g_value_get_int (gimp_value_array_index (args, 5));
@@ -1685,7 +1685,7 @@ plug_in_engrave_invoker (GimpProcedure *procedure,
gint height;
gboolean limit;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
height = g_value_get_int (gimp_value_array_index (args, 3));
limit = g_value_get_boolean (gimp_value_array_index (args, 4));
@@ -1735,7 +1735,7 @@ plug_in_exchange_invoker (GimpProcedure *procedure,
guchar green_threshold;
guchar blue_threshold;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
from_red = g_value_get_uchar (gimp_value_array_index (args, 3));
from_green = g_value_get_uchar (gimp_value_array_index (args, 4));
from_blue = g_value_get_uchar (gimp_value_array_index (args, 5));
@@ -1802,7 +1802,7 @@ plug_in_flarefx_invoker (GimpProcedure *procedure,
gint pos_x;
gint pos_y;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
pos_x = g_value_get_int (gimp_value_array_index (args, 3));
pos_y = g_value_get_int (gimp_value_array_index (args, 4));
@@ -1854,7 +1854,7 @@ plug_in_fractal_trace_invoker (GimpProcedure *procedure,
gint depth;
gint outside_type;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
xmin = g_value_get_double (gimp_value_array_index (args, 3));
xmax = g_value_get_double (gimp_value_array_index (args, 4));
ymin = g_value_get_double (gimp_value_array_index (args, 5));
@@ -1915,7 +1915,7 @@ plug_in_gauss_invoker (GimpProcedure *procedure,
gdouble horizontal;
gdouble vertical;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
horizontal = g_value_get_double (gimp_value_array_index (args, 3));
vertical = g_value_get_double (gimp_value_array_index (args, 4));
@@ -1942,7 +1942,7 @@ plug_in_gauss_iir_invoker (GimpProcedure *procedure,
gboolean horizontal;
gboolean vertical;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
radius = g_value_get_double (gimp_value_array_index (args, 3));
horizontal = g_value_get_boolean (gimp_value_array_index (args, 4));
vertical = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -1972,7 +1972,7 @@ plug_in_gauss_iir2_invoker (GimpProcedure *procedure,
gdouble horizontal;
gdouble vertical;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
horizontal = g_value_get_double (gimp_value_array_index (args, 3));
vertical = g_value_get_double (gimp_value_array_index (args, 4));
@@ -1999,7 +1999,7 @@ plug_in_gauss_rle_invoker (GimpProcedure *procedure,
gboolean horizontal;
gboolean vertical;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
radius = g_value_get_double (gimp_value_array_index (args, 3));
horizontal = g_value_get_boolean (gimp_value_array_index (args, 4));
vertical = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -2029,7 +2029,7 @@ plug_in_gauss_rle2_invoker (GimpProcedure *procedure,
gdouble horizontal;
gdouble vertical;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
horizontal = g_value_get_double (gimp_value_array_index (args, 3));
vertical = g_value_get_double (gimp_value_array_index (args, 4));
@@ -2055,7 +2055,7 @@ plug_in_glasstile_invoker (GimpProcedure *procedure,
gint tilex;
gint tiley;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
tilex = g_value_get_int (gimp_value_array_index (args, 3));
tiley = g_value_get_int (gimp_value_array_index (args, 4));
@@ -2101,7 +2101,7 @@ plug_in_hsv_noise_invoker (GimpProcedure *procedure,
gint saturation_distance;
gint value_distance;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
holdness = g_value_get_int (gimp_value_array_index (args, 3));
hue_distance = g_value_get_int (gimp_value_array_index (args, 4));
saturation_distance = g_value_get_int (gimp_value_array_index (args, 5));
@@ -2152,7 +2152,7 @@ plug_in_illusion_invoker (GimpProcedure *procedure,
gint division;
gint type;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
division = g_value_get_int (gimp_value_array_index (args, 3));
type = g_value_get_int (gimp_value_array_index (args, 4));
@@ -2193,7 +2193,7 @@ plug_in_laplace_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -2236,7 +2236,7 @@ plug_in_lens_distortion_invoker (GimpProcedure *procedure,
gdouble rescale;
gdouble brighten;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
offset_x = g_value_get_double (gimp_value_array_index (args, 3));
offset_y = g_value_get_double (gimp_value_array_index (args, 4));
main_adjust = g_value_get_double (gimp_value_array_index (args, 5));
@@ -2307,7 +2307,7 @@ plug_in_make_seamless_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -2351,7 +2351,7 @@ plug_in_maze_invoker (GimpProcedure *procedure,
guchar algorithm;
gint seed;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
width = g_value_get_int (gimp_value_array_index (args, 3));
height = g_value_get_int (gimp_value_array_index (args, 4));
tileable = g_value_get_uchar (gimp_value_array_index (args, 5));
@@ -2418,7 +2418,7 @@ plug_in_mblur_invoker (GimpProcedure *procedure,
gdouble center_x;
gdouble center_y;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
type = g_value_get_int (gimp_value_array_index (args, 3));
length = g_value_get_double (gimp_value_array_index (args, 4));
angle = g_value_get_double (gimp_value_array_index (args, 5));
@@ -2505,7 +2505,7 @@ plug_in_mblur_inward_invoker (GimpProcedure *procedure,
gdouble center_x;
gdouble center_y;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
type = g_value_get_int (gimp_value_array_index (args, 3));
length = g_value_get_double (gimp_value_array_index (args, 4));
angle = g_value_get_double (gimp_value_array_index (args, 5));
@@ -2596,7 +2596,7 @@ plug_in_mosaic_invoker (GimpProcedure *procedure,
gint tile_surface;
gint grout_color;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
tile_size = g_value_get_double (gimp_value_array_index (args, 3));
tile_height = g_value_get_double (gimp_value_array_index (args, 4));
tile_spacing = g_value_get_double (gimp_value_array_index (args, 5));
@@ -2683,7 +2683,7 @@ plug_in_neon_invoker (GimpProcedure *procedure,
gdouble radius;
gdouble amount;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
radius = g_value_get_double (gimp_value_array_index (args, 3));
amount = g_value_get_double (gimp_value_array_index (args, 4));
@@ -2737,7 +2737,7 @@ plug_in_newsprint_invoker (GimpProcedure *procedure,
gint blu_spotfn;
gint oversample;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
cell_width = g_value_get_int (gimp_value_array_index (args, 3));
colorspace = g_value_get_int (gimp_value_array_index (args, 4));
k_pullout = g_value_get_int (gimp_value_array_index (args, 5));
@@ -2813,7 +2813,7 @@ plug_in_normalize_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -2859,7 +2859,7 @@ plug_in_nova_invoker (GimpProcedure *procedure,
gint nspoke;
gint randomhue;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
xcenter = g_value_get_int (gimp_value_array_index (args, 3));
ycenter = g_value_get_int (gimp_value_array_index (args, 4));
gimp_value_get_rgb (gimp_value_array_index (args, 5), &color);
@@ -2917,7 +2917,7 @@ plug_in_oilify_invoker (GimpProcedure *procedure,
gint mask_size;
gint mode;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
mask_size = g_value_get_int (gimp_value_array_index (args, 3));
mode = g_value_get_int (gimp_value_array_index (args, 4));
@@ -2964,12 +2964,12 @@ plug_in_oilify_enhanced_invoker (GimpProcedure *procedure,
gint exponent;
GimpDrawable *exponent_map;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
mode = g_value_get_int (gimp_value_array_index (args, 3));
mask_size = g_value_get_int (gimp_value_array_index (args, 4));
- mask_size_map = gimp_value_get_drawable (gimp_value_array_index (args, 5), gimp);
+ mask_size_map = g_value_get_object (gimp_value_array_index (args, 5));
exponent = g_value_get_int (gimp_value_array_index (args, 6));
- exponent_map = gimp_value_get_drawable (gimp_value_array_index (args, 7), gimp);
+ exponent_map = g_value_get_object (gimp_value_array_index (args, 7));
if (success)
{
@@ -3031,7 +3031,7 @@ plug_in_papertile_invoker (GimpProcedure *procedure,
gint background_type;
GimpRGB background_color;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
tile_size = g_value_get_int (gimp_value_array_index (args, 3));
move_max = g_value_get_double (gimp_value_array_index (args, 4));
fractional_type = g_value_get_int (gimp_value_array_index (args, 5));
@@ -3118,7 +3118,7 @@ plug_in_photocopy_invoker (GimpProcedure *procedure,
gdouble pct_black;
gdouble pct_white;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
mask_radius = g_value_get_double (gimp_value_array_index (args, 3));
sharpness = g_value_get_double (gimp_value_array_index (args, 4));
pct_black = g_value_get_double (gimp_value_array_index (args, 5));
@@ -3164,7 +3164,7 @@ plug_in_pixelize_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint pixel_width;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
pixel_width = g_value_get_int (gimp_value_array_index (args, 3));
if (success)
@@ -3206,7 +3206,7 @@ plug_in_pixelize2_invoker (GimpProcedure *procedure,
gint pixel_width;
gint pixel_height;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
pixel_width = g_value_get_int (gimp_value_array_index (args, 3));
pixel_height = g_value_get_int (gimp_value_array_index (args, 4));
@@ -3249,7 +3249,7 @@ plug_in_plasma_invoker (GimpProcedure *procedure,
gint seed;
gdouble turbulence;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
seed = g_value_get_int (gimp_value_array_index (args, 3));
turbulence = g_value_get_double (gimp_value_array_index (args, 4));
@@ -3303,7 +3303,7 @@ plug_in_polar_coords_invoker (GimpProcedure *procedure,
gboolean inverse;
gboolean polrec;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
circle = g_value_get_double (gimp_value_array_index (args, 3));
angle = g_value_get_double (gimp_value_array_index (args, 4));
backwards = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -3353,7 +3353,7 @@ plug_in_red_eye_removal_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint threshold;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
threshold = g_value_get_int (gimp_value_array_index (args, 3));
if (success)
@@ -3396,7 +3396,7 @@ plug_in_randomize_hurl_invoker (GimpProcedure *procedure,
gboolean randomize;
gint seed;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
rndm_pct = g_value_get_double (gimp_value_array_index (args, 3));
rndm_rcount = g_value_get_double (gimp_value_array_index (args, 4));
randomize = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -3449,7 +3449,7 @@ plug_in_randomize_pick_invoker (GimpProcedure *procedure,
gboolean randomize;
gint seed;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
rndm_pct = g_value_get_double (gimp_value_array_index (args, 3));
rndm_rcount = g_value_get_double (gimp_value_array_index (args, 4));
randomize = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -3502,7 +3502,7 @@ plug_in_randomize_slur_invoker (GimpProcedure *procedure,
gboolean randomize;
gint seed;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
rndm_pct = g_value_get_double (gimp_value_array_index (args, 3));
rndm_rcount = g_value_get_double (gimp_value_array_index (args, 4));
randomize = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -3557,7 +3557,7 @@ plug_in_rgb_noise_invoker (GimpProcedure *procedure,
gdouble noise_3;
gdouble noise_4;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
independent = g_value_get_boolean (gimp_value_array_index (args, 3));
correlated = g_value_get_boolean (gimp_value_array_index (args, 4));
noise_1 = g_value_get_double (gimp_value_array_index (args, 5));
@@ -3633,7 +3633,7 @@ plug_in_ripple_invoker (GimpProcedure *procedure,
gboolean antialias;
gboolean tile;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
period = g_value_get_int (gimp_value_array_index (args, 3));
amplitude = g_value_get_int (gimp_value_array_index (args, 4));
orientation = g_value_get_int (gimp_value_array_index (args, 5));
@@ -3701,8 +3701,8 @@ plug_in_rotate_invoker (GimpProcedure *procedure,
gint angle;
gboolean everything;
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
angle = g_value_get_int (gimp_value_array_index (args, 3));
everything = g_value_get_boolean (gimp_value_array_index (args, 4));
@@ -3753,7 +3753,7 @@ plug_in_noisify_invoker (GimpProcedure *procedure,
gdouble noise_3;
gdouble noise_4;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
independent = g_value_get_boolean (gimp_value_array_index (args, 3));
noise_1 = g_value_get_double (gimp_value_array_index (args, 4));
noise_2 = g_value_get_double (gimp_value_array_index (args, 5));
@@ -3823,7 +3823,7 @@ plug_in_sel_gauss_invoker (GimpProcedure *procedure,
gdouble radius;
gint max_delta;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
radius = g_value_get_double (gimp_value_array_index (args, 3));
max_delta = g_value_get_int (gimp_value_array_index (args, 4));
@@ -3865,7 +3865,7 @@ plug_in_semiflatten_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -3911,7 +3911,7 @@ plug_in_shift_invoker (GimpProcedure *procedure,
gint shift_amount;
gint orientation;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
shift_amount = g_value_get_int (gimp_value_array_index (args, 3));
orientation = g_value_get_int (gimp_value_array_index (args, 4));
@@ -3965,7 +3965,7 @@ plug_in_sinus_invoker (GimpProcedure *procedure,
gint blend;
gdouble blend_power;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
xscale = g_value_get_double (gimp_value_array_index (args, 3));
yscale = g_value_get_double (gimp_value_array_index (args, 4));
complex = g_value_get_double (gimp_value_array_index (args, 5));
@@ -4058,7 +4058,7 @@ plug_in_sobel_invoker (GimpProcedure *procedure,
gboolean vertical;
gboolean keep_sign;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
horizontal = g_value_get_boolean (gimp_value_array_index (args, 3));
vertical = g_value_get_boolean (gimp_value_array_index (args, 4));
keep_sign = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -4106,7 +4106,7 @@ plug_in_softglow_invoker (GimpProcedure *procedure,
gdouble brightness;
gdouble sharpness;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
glow_radius = g_value_get_double (gimp_value_array_index (args, 3));
brightness = g_value_get_double (gimp_value_array_index (args, 4));
sharpness = g_value_get_double (gimp_value_array_index (args, 5));
@@ -4157,7 +4157,7 @@ plug_in_solid_noise_invoker (GimpProcedure *procedure,
gdouble xsize;
gdouble ysize;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
tileable = g_value_get_boolean (gimp_value_array_index (args, 3));
turbulent = g_value_get_boolean (gimp_value_array_index (args, 4));
seed = g_value_get_int (gimp_value_array_index (args, 5));
@@ -4214,7 +4214,7 @@ plug_in_spread_invoker (GimpProcedure *procedure,
gdouble spread_amount_x;
gdouble spread_amount_y;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
spread_amount_x = g_value_get_double (gimp_value_array_index (args, 3));
spread_amount_y = g_value_get_double (gimp_value_array_index (args, 4));
@@ -4257,7 +4257,7 @@ plug_in_threshold_alpha_invoker (GimpProcedure *procedure,
GimpDrawable *drawable;
gint threshold;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
threshold = g_value_get_int (gimp_value_array_index (args, 3));
if (success)
@@ -4300,7 +4300,7 @@ plug_in_unsharp_mask_invoker (GimpProcedure *procedure,
gdouble amount;
gint threshold;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
radius = g_value_get_double (gimp_value_array_index (args, 3));
amount = g_value_get_double (gimp_value_array_index (args, 4));
threshold = g_value_get_int (gimp_value_array_index (args, 5));
@@ -4346,7 +4346,7 @@ plug_in_video_invoker (GimpProcedure *procedure,
gboolean additive;
gboolean rotated;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
pattern_number = g_value_get_int (gimp_value_array_index (args, 3));
additive = g_value_get_boolean (gimp_value_array_index (args, 4));
rotated = g_value_get_boolean (gimp_value_array_index (args, 5));
@@ -4389,7 +4389,7 @@ plug_in_vinvert_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -4432,7 +4432,7 @@ plug_in_vpropagate_invoker (GimpProcedure *procedure,
gint lower_limit;
gint upper_limit;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
propagate_mode = g_value_get_int (gimp_value_array_index (args, 3));
propagating_channel = g_value_get_int (gimp_value_array_index (args, 4));
propagating_rate = g_value_get_double (gimp_value_array_index (args, 5));
@@ -4530,7 +4530,7 @@ plug_in_dilate_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -4577,7 +4577,7 @@ plug_in_erode_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpDrawable *drawable;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -4628,7 +4628,7 @@ plug_in_waves_invoker (GimpProcedure *procedure,
gdouble wavelength;
gboolean type;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
amplitude = g_value_get_double (gimp_value_array_index (args, 3));
phase = g_value_get_double (gimp_value_array_index (args, 4));
wavelength = g_value_get_double (gimp_value_array_index (args, 5));
@@ -4690,7 +4690,7 @@ plug_in_whirl_pinch_invoker (GimpProcedure *procedure,
gdouble pinch;
gdouble radius;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
whirl = g_value_get_double (gimp_value_array_index (args, 3));
pinch = g_value_get_double (gimp_value_array_index (args, 4));
radius = g_value_get_double (gimp_value_array_index (args, 5));
@@ -4740,7 +4740,7 @@ plug_in_wind_invoker (GimpProcedure *procedure,
gint algorithm;
gint edge;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
threshold = g_value_get_int (gimp_value_array_index (args, 3));
direction = g_value_get_int (gimp_value_array_index (args, 4));
strength = g_value_get_int (gimp_value_array_index (args, 5));
@@ -4802,17 +4802,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("redfrequency",
"redfrequency",
@@ -4897,17 +4897,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -4932,17 +4932,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("direction",
"direction",
@@ -4979,17 +4979,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("refraction",
"refraction",
@@ -5038,17 +5038,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5073,17 +5073,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5108,17 +5108,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5143,23 +5143,23 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("bumpmap",
- "bumpmap",
- "Bump map drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("bumpmap",
+ "bumpmap",
+ "Bump map drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("azimuth",
"azimuth",
@@ -5244,23 +5244,23 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("bumpmap",
- "bumpmap",
- "Bump map drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("bumpmap",
+ "bumpmap",
+ "Bump map drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("azimuth",
"azimuth",
@@ -5345,17 +5345,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -5381,17 +5381,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("mask-radius",
"mask radius",
@@ -5428,17 +5428,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("monochrome",
"monochrome",
@@ -5523,17 +5523,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_rgb ("color",
"color",
@@ -5565,17 +5565,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("argc-matrix",
"argc matrix",
@@ -5646,17 +5646,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("tile-size",
"tile size",
@@ -5699,17 +5699,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("evenodd",
"evenodd",
@@ -5740,17 +5740,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("lam-r",
"lam r",
@@ -5847,17 +5847,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("amount-x",
"amount x",
@@ -5883,17 +5883,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("displace-map-x",
- "displace map x",
- "Displacement map for x direction",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("displace-map-x",
+ "displace map x",
+ "Displacement map for x direction",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("displace-map-y",
- "displace map y",
- "Displacement map for y direction",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("displace-map-y",
+ "displace map y",
+ "Displacement map for y direction",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("displace-type",
"displace type",
@@ -5924,17 +5924,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("amount-x",
"amount x",
@@ -5960,17 +5960,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("displace-map-x",
- "displace map x",
- "Displacement map for radial direction",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("displace-map-x",
+ "displace map x",
+ "Displacement map for radial direction",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("displace-map-y",
- "displace map y",
- "Displacement map for tangent direction",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("displace-map-y",
+ "displace map y",
+ "Displacement map for tangent direction",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("displace-type",
"displace type",
@@ -6001,17 +6001,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("inner",
"inner",
@@ -6060,17 +6060,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("amount",
"amount",
@@ -6113,17 +6113,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("azimuth",
"azimuth",
@@ -6172,17 +6172,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("height",
"height",
@@ -6219,17 +6219,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uchar ("from-red",
"from red",
@@ -6308,17 +6308,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("pos-x",
"pos x",
@@ -6355,17 +6355,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("xmin",
"xmin",
@@ -6426,17 +6426,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("horizontal",
"horizontal",
@@ -6479,17 +6479,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("radius",
"radius",
@@ -6532,17 +6532,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("horizontal",
"horizontal",
@@ -6579,17 +6579,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("radius",
"radius",
@@ -6632,17 +6632,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("horizontal",
"horizontal",
@@ -6679,17 +6679,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("tilex",
"tilex",
@@ -6726,17 +6726,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("holdness",
"holdness",
@@ -6785,17 +6785,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("division",
"division",
@@ -6832,17 +6832,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -6867,17 +6867,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("offset-x",
"offset x",
@@ -6938,17 +6938,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -6973,17 +6973,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("width",
"width",
@@ -7050,17 +7050,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("type",
"type",
@@ -7115,17 +7115,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("type",
"type",
@@ -7180,17 +7180,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("tile-size",
"tile size",
@@ -7287,17 +7287,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("radius",
"radius",
@@ -7334,17 +7334,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("cell-width",
"cell width",
@@ -7441,17 +7441,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -7476,17 +7476,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("xcenter",
"xcenter",
@@ -7548,17 +7548,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("mask-size",
"mask size",
@@ -7595,17 +7595,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("mode",
"mode",
@@ -7619,11 +7619,11 @@ register_plug_in_compat_procs (GimpPDB *pdb)
1, 200, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("mask-size-map",
- "mask size map",
- "Mask size control map",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("mask-size-map",
+ "mask size map",
+ "Mask size control map",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("exponent",
"exponent",
@@ -7631,11 +7631,11 @@ register_plug_in_compat_procs (GimpPDB *pdb)
1, 20, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("exponent-map",
- "exponent map",
- "Exponent control map",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("exponent-map",
+ "exponent map",
+ "Exponent control map",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -7660,17 +7660,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("tile-size",
"tile size",
@@ -7745,17 +7745,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("mask-radius",
"mask radius",
@@ -7804,17 +7804,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("pixel-width",
"pixel width",
@@ -7845,17 +7845,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("pixel-width",
"pixel width",
@@ -7892,17 +7892,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("seed",
"seed",
@@ -7939,17 +7939,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("circle",
"circle",
@@ -8004,17 +8004,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("threshold",
"threshold",
@@ -8045,17 +8045,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("rndm-pct",
"rndm pct",
@@ -8104,17 +8104,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("rndm-pct",
"rndm pct",
@@ -8163,17 +8163,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("rndm-pct",
"rndm pct",
@@ -8222,17 +8222,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("independent",
"independent",
@@ -8293,17 +8293,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("period",
"period",
@@ -8370,17 +8370,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("angle",
"angle",
@@ -8417,17 +8417,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("independent",
"independent",
@@ -8482,17 +8482,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("radius",
"radius",
@@ -8529,17 +8529,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -8564,17 +8564,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("shift-amount",
"shift amount",
@@ -8611,17 +8611,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("xscale",
"xscale",
@@ -8726,17 +8726,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("horizontal",
"horizontal",
@@ -8779,17 +8779,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("glow-radius",
"glow radius",
@@ -8832,17 +8832,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("tileable",
"tileable",
@@ -8903,17 +8903,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("spread-amount-x",
"spread amount x",
@@ -8950,17 +8950,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("threshold",
"threshold",
@@ -8991,17 +8991,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("radius",
"radius",
@@ -9044,17 +9044,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("pattern-number",
"pattern number",
@@ -9097,17 +9097,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -9132,17 +9132,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("propagate-mode",
"propagate mode",
@@ -9203,17 +9203,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("propagate-mode",
"propagate mode",
@@ -9274,17 +9274,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("propagate-mode",
"propagate mode",
@@ -9345,17 +9345,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("amplitude",
"amplitude",
@@ -9410,17 +9410,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("whirl",
"whirl",
@@ -9463,17 +9463,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "Input image (unused)",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "Input drawable",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("threshold",
"threshold",
diff --git a/app/pdb/progress-cmds.c b/app/pdb/progress-cmds.c
index 84b78ec6e9..af91745e59 100644
--- a/app/pdb/progress-cmds.c
+++ b/app/pdb/progress-cmds.c
@@ -51,7 +51,7 @@ progress_init_invoker (GimpProcedure *procedure,
GimpObject *gdisplay;
message = g_value_get_string (gimp_value_array_index (args, 0));
- gdisplay = gimp_value_get_display (gimp_value_array_index (args, 1), gimp);
+ gdisplay = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -315,11 +315,11 @@ register_progress_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_display_id ("gdisplay",
- "gdisplay",
- "GimpDisplay to update progressbar in, or %NULL
for a separate window",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_display ("gdisplay",
+ "gdisplay",
+ "GimpDisplay to update progressbar in, or %NULL for
a separate window",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/app/pdb/selection-cmds.c b/app/pdb/selection-cmds.c
index 5bc4d24823..ca6b8141ce 100644
--- a/app/pdb/selection-cmds.c
+++ b/app/pdb/selection-cmds.c
@@ -62,7 +62,7 @@ selection_bounds_invoker (GimpProcedure *procedure,
gint x2 = 0;
gint y2 = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -107,7 +107,7 @@ selection_value_invoker (GimpProcedure *procedure,
gint y;
gint value = 0;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
x = g_value_get_int (gimp_value_array_index (args, 1));
y = g_value_get_int (gimp_value_array_index (args, 2));
@@ -143,7 +143,7 @@ selection_is_empty_invoker (GimpProcedure *procedure,
GimpImage *image;
gboolean is_empty = FALSE;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -172,7 +172,7 @@ selection_translate_invoker (GimpProcedure *procedure,
gint offx;
gint offy;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
offx = g_value_get_int (gimp_value_array_index (args, 1));
offy = g_value_get_int (gimp_value_array_index (args, 2));
@@ -201,7 +201,7 @@ selection_float_invoker (GimpProcedure *procedure,
gint offy;
GimpLayer *layer = NULL;
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+ drawable = g_value_get_object (gimp_value_array_index (args, 0));
offx = g_value_get_int (gimp_value_array_index (args, 1));
offy = g_value_get_int (gimp_value_array_index (args, 2));
@@ -227,7 +227,7 @@ selection_float_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -243,7 +243,7 @@ selection_invert_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -265,7 +265,7 @@ selection_sharpen_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -287,7 +287,7 @@ selection_all_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -309,7 +309,7 @@ selection_none_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -332,7 +332,7 @@ selection_feather_invoker (GimpProcedure *procedure,
GimpImage *image;
gdouble radius;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
radius = g_value_get_double (gimp_value_array_index (args, 1));
if (success)
@@ -358,7 +358,7 @@ selection_border_invoker (GimpProcedure *procedure,
GimpImage *image;
gint radius;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
radius = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -386,7 +386,7 @@ selection_grow_invoker (GimpProcedure *procedure,
GimpImage *image;
gint steps;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
steps = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -411,7 +411,7 @@ selection_shrink_invoker (GimpProcedure *procedure,
GimpImage *image;
gint steps;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
steps = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -435,7 +435,7 @@ selection_flood_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
GimpImage *image;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -459,7 +459,7 @@ selection_save_invoker (GimpProcedure *procedure,
GimpImage *image;
GimpChannel *channel = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -482,7 +482,7 @@ selection_save_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), channel);
return return_vals;
}
@@ -506,11 +506,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("non-empty",
"non empty",
@@ -558,11 +558,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("x",
"x",
@@ -598,11 +598,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("is-empty",
"is empty",
@@ -626,11 +626,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("offx",
"offx",
@@ -660,11 +660,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The drawable from which to float selection",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The drawable from which to float selection",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("offx",
"offx",
@@ -678,11 +678,11 @@ register_selection_procs (GimpPDB *pdb)
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The floated layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The floated layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -700,11 +700,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -722,11 +722,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -744,11 +744,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -766,11 +766,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -788,11 +788,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("radius",
"radius",
@@ -816,11 +816,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("radius",
"radius",
@@ -844,11 +844,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("steps",
"steps",
@@ -872,11 +872,11 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("steps",
"steps",
@@ -900,11 +900,11 @@ register_selection_procs (GimpPDB *pdb)
"2016",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -922,17 +922,17 @@ register_selection_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_channel_id ("channel",
- "channel",
- "The new channel",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_channel ("channel",
+ "channel",
+ "The new channel",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
diff --git a/app/pdb/text-layer-cmds.c b/app/pdb/text-layer-cmds.c
index 09d239b9b1..1a65a6b92a 100644
--- a/app/pdb/text-layer-cmds.c
+++ b/app/pdb/text-layer-cmds.c
@@ -65,7 +65,7 @@ text_layer_new_invoker (GimpProcedure *procedure,
GimpUnit unit;
GimpLayer *layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
text = g_value_get_string (gimp_value_array_index (args, 1));
fontname = g_value_get_string (gimp_value_array_index (args, 2));
size = g_value_get_double (gimp_value_array_index (args, 3));
@@ -102,7 +102,7 @@ text_layer_new_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
@@ -120,7 +120,7 @@ text_layer_get_text_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gchar *text = NULL;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -157,7 +157,7 @@ text_layer_set_text_invoker (GimpProcedure *procedure,
GimpLayer *layer;
const gchar *text;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
text = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -192,7 +192,7 @@ text_layer_get_markup_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gchar *markup = NULL;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -230,7 +230,7 @@ text_layer_get_font_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gchar *font = NULL;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -267,7 +267,7 @@ text_layer_set_font_invoker (GimpProcedure *procedure,
GimpLayer *layer;
const gchar *font;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
font = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -303,7 +303,7 @@ text_layer_get_font_size_invoker (GimpProcedure *procedure,
gdouble font_size = 0.0;
GimpUnit unit = GIMP_UNIT_PIXEL;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -345,7 +345,7 @@ text_layer_set_font_size_invoker (GimpProcedure *procedure,
gdouble font_size;
GimpUnit unit;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
font_size = g_value_get_double (gimp_value_array_index (args, 1));
unit = g_value_get_int (gimp_value_array_index (args, 2));
@@ -382,7 +382,7 @@ text_layer_get_antialias_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean antialias = FALSE;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -419,7 +419,7 @@ text_layer_set_antialias_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean antialias;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
antialias = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -454,7 +454,7 @@ text_layer_get_hint_style_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint style = 0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -491,7 +491,7 @@ text_layer_set_hint_style_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint style;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
style = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -526,7 +526,7 @@ text_layer_get_kerning_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean kerning = FALSE;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -563,7 +563,7 @@ text_layer_set_kerning_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gboolean kerning;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
kerning = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
@@ -598,7 +598,7 @@ text_layer_get_language_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gchar *language = NULL;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -635,7 +635,7 @@ text_layer_set_language_invoker (GimpProcedure *procedure,
GimpLayer *layer;
const gchar *language;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
language = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -670,7 +670,7 @@ text_layer_get_base_direction_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint direction = 0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -707,7 +707,7 @@ text_layer_set_base_direction_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint direction;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
direction = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -742,7 +742,7 @@ text_layer_get_justification_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint justify = 0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -779,7 +779,7 @@ text_layer_set_justification_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gint justify;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
justify = g_value_get_enum (gimp_value_array_index (args, 1));
if (success)
@@ -814,7 +814,7 @@ text_layer_get_color_invoker (GimpProcedure *procedure,
GimpLayer *layer;
GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -849,7 +849,7 @@ text_layer_set_color_invoker (GimpProcedure *procedure,
GimpLayer *layer;
GimpRGB color;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
gimp_value_get_rgb (gimp_value_array_index (args, 1), &color);
if (success)
@@ -884,7 +884,7 @@ text_layer_get_indent_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gdouble indent = 0.0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -921,7 +921,7 @@ text_layer_set_indent_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gdouble indent;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
indent = g_value_get_double (gimp_value_array_index (args, 1));
if (success)
@@ -956,7 +956,7 @@ text_layer_get_line_spacing_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gdouble line_spacing = 0.0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -993,7 +993,7 @@ text_layer_set_line_spacing_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gdouble line_spacing;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
line_spacing = g_value_get_double (gimp_value_array_index (args, 1));
if (success)
@@ -1028,7 +1028,7 @@ text_layer_get_letter_spacing_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gdouble letter_spacing = 0.0;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -1065,7 +1065,7 @@ text_layer_set_letter_spacing_invoker (GimpProcedure *procedure,
GimpLayer *layer;
gdouble letter_spacing;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
letter_spacing = g_value_get_double (gimp_value_array_index (args, 1));
if (success)
@@ -1100,7 +1100,7 @@ text_layer_resize_invoker (GimpProcedure *procedure,
gdouble width;
gdouble height;
- layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+ layer = g_value_get_object (gimp_value_array_index (args, 0));
width = g_value_get_double (gimp_value_array_index (args, 1));
height = g_value_get_double (gimp_value_array_index (args, 2));
@@ -1154,11 +1154,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("text",
"text",
@@ -1188,11 +1188,11 @@ register_text_layer_procs (GimpPDB *pdb)
GIMP_UNIT_PIXEL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The new text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The new text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1210,11 +1210,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("text",
"text",
@@ -1239,11 +1239,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("text",
"text",
@@ -1268,11 +1268,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2010",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("markup",
"markup",
@@ -1297,11 +1297,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("font",
"font",
@@ -1326,11 +1326,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("font",
"font",
@@ -1355,11 +1355,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("font-size",
"font size",
@@ -1391,11 +1391,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("font-size",
"font size",
@@ -1427,11 +1427,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("antialias",
"antialias",
@@ -1455,11 +1455,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("antialias",
"antialias",
@@ -1483,11 +1483,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("style",
"style",
@@ -1512,11 +1512,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("style",
"style",
@@ -1541,11 +1541,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("kerning",
"kerning",
@@ -1569,11 +1569,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("kerning",
"kerning",
@@ -1597,11 +1597,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("language",
"language",
@@ -1626,11 +1626,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("language",
"language",
@@ -1655,11 +1655,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("direction",
"direction",
@@ -1684,11 +1684,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("direction",
"direction",
@@ -1713,11 +1713,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("justify",
"justify",
@@ -1742,11 +1742,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("justify",
"justify",
@@ -1771,11 +1771,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_rgb ("color",
"color",
@@ -1800,11 +1800,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_rgb ("color",
"color",
@@ -1829,11 +1829,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("indent",
"indent",
@@ -1857,11 +1857,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("indent",
"indent",
@@ -1885,11 +1885,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("line-spacing",
"line spacing",
@@ -1913,11 +1913,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("line-spacing",
"line spacing",
@@ -1941,11 +1941,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("letter-spacing",
"letter spacing",
@@ -1969,11 +1969,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("letter-spacing",
"letter spacing",
@@ -1997,11 +1997,11 @@ register_text_layer_procs (GimpPDB *pdb)
"2009",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("width",
"width",
diff --git a/app/pdb/text-tool-cmds.c b/app/pdb/text-tool-cmds.c
index 7d1e8c6e34..e633bb37d1 100644
--- a/app/pdb/text-tool-cmds.c
+++ b/app/pdb/text-tool-cmds.c
@@ -62,8 +62,8 @@ text_fontname_invoker (GimpProcedure *procedure,
const gchar *fontname;
GimpLayer *text_layer = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ drawable = g_value_get_object (gimp_value_array_index (args, 1));
x = g_value_get_double (gimp_value_array_index (args, 2));
y = g_value_get_double (gimp_value_array_index (args, 3));
text = g_value_get_string (gimp_value_array_index (args, 4));
@@ -96,7 +96,7 @@ text_fontname_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_layer (gimp_value_array_index (return_vals, 1), text_layer);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), text_layer);
return return_vals;
}
@@ -168,17 +168,17 @@ register_text_tool_procs (GimpPDB *pdb)
"1998- 2001",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "The affected drawable: (%NULL for a new text
layer)",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "drawable",
+ "The affected drawable: (%NULL for a new text
layer)",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("x",
"x",
@@ -231,11 +231,11 @@ register_text_tool_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_layer_id ("text-layer",
- "text layer",
- "The new text layer or %NULL if no layer was
created.",
- pdb->gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("text-layer",
+ "text layer",
+ "The new text layer or %NULL if no layer was
created.",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/app/pdb/vectors-cmds.c b/app/pdb/vectors-cmds.c
index f18ee3c038..ad6c6de774 100644
--- a/app/pdb/vectors-cmds.c
+++ b/app/pdb/vectors-cmds.c
@@ -65,7 +65,7 @@ vectors_new_invoker (GimpProcedure *procedure,
const gchar *name;
GimpVectors *vectors = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
@@ -77,7 +77,7 @@ vectors_new_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), vectors);
return return_vals;
}
@@ -96,8 +96,8 @@ vectors_new_from_text_layer_invoker (GimpProcedure *procedure,
GimpLayer *layer;
GimpVectors *vectors = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ layer = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -121,7 +121,7 @@ vectors_new_from_text_layer_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), vectors);
return return_vals;
}
@@ -139,7 +139,7 @@ vectors_copy_invoker (GimpProcedure *procedure,
GimpVectors *vectors;
GimpVectors *vectors_copy = NULL;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -154,7 +154,7 @@ vectors_copy_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
- gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors_copy);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), vectors_copy);
return return_vals;
}
@@ -173,7 +173,7 @@ vectors_get_strokes_invoker (GimpProcedure *procedure,
gint num_strokes = 0;
gint32 *stroke_ids = NULL;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
@@ -223,7 +223,7 @@ vectors_stroke_get_length_invoker (GimpProcedure *procedure,
gdouble precision;
gdouble length = 0.0;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
precision = g_value_get_double (gimp_value_array_index (args, 2));
@@ -265,7 +265,7 @@ vectors_stroke_get_point_at_dist_invoker (GimpProcedure *procedure,
gdouble slope = 0.0;
gboolean valid = FALSE;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
dist = g_value_get_double (gimp_value_array_index (args, 2));
precision = g_value_get_double (gimp_value_array_index (args, 3));
@@ -313,7 +313,7 @@ vectors_remove_stroke_invoker (GimpProcedure *procedure,
GimpVectors *vectors;
gint stroke_id;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -350,7 +350,7 @@ vectors_stroke_close_invoker (GimpProcedure *procedure,
GimpVectors *vectors;
gint stroke_id;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -391,7 +391,7 @@ vectors_stroke_translate_invoker (GimpProcedure *procedure,
gint off_x;
gint off_y;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
off_x = g_value_get_int (gimp_value_array_index (args, 2));
off_y = g_value_get_int (gimp_value_array_index (args, 3));
@@ -436,7 +436,7 @@ vectors_stroke_scale_invoker (GimpProcedure *procedure,
gdouble scale_x;
gdouble scale_y;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
scale_x = g_value_get_double (gimp_value_array_index (args, 2));
scale_y = g_value_get_double (gimp_value_array_index (args, 3));
@@ -482,7 +482,7 @@ vectors_stroke_rotate_invoker (GimpProcedure *procedure,
gdouble center_y;
gdouble angle;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
center_x = g_value_get_double (gimp_value_array_index (args, 2));
center_y = g_value_get_double (gimp_value_array_index (args, 3));
@@ -528,7 +528,7 @@ vectors_stroke_flip_invoker (GimpProcedure *procedure,
gint flip_type;
gdouble axis;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
flip_type = g_value_get_enum (gimp_value_array_index (args, 2));
axis = g_value_get_double (gimp_value_array_index (args, 3));
@@ -575,7 +575,7 @@ vectors_stroke_flip_free_invoker (GimpProcedure *procedure,
gdouble x2;
gdouble y2;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
x1 = g_value_get_double (gimp_value_array_index (args, 2));
y1 = g_value_get_double (gimp_value_array_index (args, 3));
@@ -625,7 +625,7 @@ vectors_stroke_get_points_invoker (GimpProcedure *procedure,
gdouble *controlpoints = NULL;
gboolean closed = FALSE;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
if (success)
@@ -693,7 +693,7 @@ vectors_stroke_new_from_points_invoker (GimpProcedure *procedure,
gboolean closed;
gint stroke_id = 0;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
type = g_value_get_enum (gimp_value_array_index (args, 1));
num_points = g_value_get_int (gimp_value_array_index (args, 2));
controlpoints = gimp_value_get_float_array (gimp_value_array_index (args, 3));
@@ -765,7 +765,7 @@ vectors_stroke_interpolate_invoker (GimpProcedure *procedure,
gdouble *coords = NULL;
gboolean closed = FALSE;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
precision = g_value_get_double (gimp_value_array_index (args, 2));
@@ -828,7 +828,7 @@ vectors_bezier_stroke_new_moveto_invoker (GimpProcedure *procedure,
gdouble y0;
gint stroke_id = 0;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
x0 = g_value_get_double (gimp_value_array_index (args, 1));
y0 = g_value_get_double (gimp_value_array_index (args, 2));
@@ -883,7 +883,7 @@ vectors_bezier_stroke_lineto_invoker (GimpProcedure *procedure,
gdouble x0;
gdouble y0;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
x0 = g_value_get_double (gimp_value_array_index (args, 2));
y0 = g_value_get_double (gimp_value_array_index (args, 3));
@@ -933,7 +933,7 @@ vectors_bezier_stroke_conicto_invoker (GimpProcedure *procedure,
gdouble x1;
gdouble y1;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
x0 = g_value_get_double (gimp_value_array_index (args, 2));
y0 = g_value_get_double (gimp_value_array_index (args, 3));
@@ -991,7 +991,7 @@ vectors_bezier_stroke_cubicto_invoker (GimpProcedure *procedure,
gdouble x2;
gdouble y2;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
x0 = g_value_get_double (gimp_value_array_index (args, 2));
y0 = g_value_get_double (gimp_value_array_index (args, 3));
@@ -1055,7 +1055,7 @@ vectors_bezier_stroke_new_ellipse_invoker (GimpProcedure *procedure,
gdouble angle;
gint stroke_id = 0;
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 0));
x0 = g_value_get_double (gimp_value_array_index (args, 1));
y0 = g_value_get_double (gimp_value_array_index (args, 2));
radius_x = g_value_get_double (gimp_value_array_index (args, 3));
@@ -1116,7 +1116,7 @@ vectors_import_from_file_invoker (GimpProcedure *procedure,
gint num_vectors = 0;
gint32 *vectors_ids = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
filename = g_value_get_string (gimp_value_array_index (args, 1));
merge = g_value_get_boolean (gimp_value_array_index (args, 2));
scale = g_value_get_boolean (gimp_value_array_index (args, 3));
@@ -1183,7 +1183,7 @@ vectors_import_from_string_invoker (GimpProcedure *procedure,
gint num_vectors = 0;
gint32 *vectors_ids = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
string = g_value_get_string (gimp_value_array_index (args, 1));
length = g_value_get_int (gimp_value_array_index (args, 2));
merge = g_value_get_boolean (gimp_value_array_index (args, 3));
@@ -1242,9 +1242,9 @@ vectors_export_to_file_invoker (GimpProcedure *procedure,
const gchar *filename;
GimpVectors *vectors;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
filename = g_value_get_string (gimp_value_array_index (args, 1));
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 2), gimp);
+ vectors = g_value_get_object (gimp_value_array_index (args, 2));
if (success)
{
@@ -1273,8 +1273,8 @@ vectors_export_to_string_invoker (GimpProcedure *procedure,
GimpVectors *vectors;
gchar *string = NULL;
- image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
- vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 0));
+ vectors = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
@@ -1311,11 +1311,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
@@ -1324,11 +1324,11 @@ register_vectors_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "the current vector object, 0 if no vector
exists in the image.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "the current vector object, 0 if no vector
exists in the image.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1346,23 +1346,23 @@ register_vectors_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_layer_id ("layer",
- "layer",
- "The text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_layer ("layer",
+ "layer",
+ "The text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors of the text layer.",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors of the text layer.",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1380,17 +1380,17 @@ register_vectors_procs (GimpPDB *pdb)
"2008",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object to copy",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object to copy",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_vectors_id ("vectors-copy",
- "vectors copy",
- "The newly copied vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors-copy",
+ "vectors copy",
+ "The newly copied vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -1408,11 +1408,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-strokes",
"num strokes",
@@ -1441,11 +1441,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1481,11 +1481,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1545,11 +1545,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1573,11 +1573,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1601,11 +1601,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1641,11 +1641,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1681,11 +1681,11 @@ register_vectors_procs (GimpPDB *pdb)
"2006",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1727,11 +1727,11 @@ register_vectors_procs (GimpPDB *pdb)
"2006",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1770,11 +1770,11 @@ register_vectors_procs (GimpPDB *pdb)
"2006",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1822,11 +1822,11 @@ register_vectors_procs (GimpPDB *pdb)
"2006",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1874,11 +1874,11 @@ register_vectors_procs (GimpPDB *pdb)
"2006",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("type",
"type",
@@ -1926,11 +1926,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -1977,11 +1977,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("x0",
"x0",
@@ -2017,11 +2017,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -2057,11 +2057,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -2109,11 +2109,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id",
"stroke id",
@@ -2173,11 +2173,11 @@ register_vectors_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("x0",
"x0",
@@ -2231,11 +2231,11 @@ register_vectors_procs (GimpPDB *pdb)
"2006",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("filename",
"filename",
@@ -2283,11 +2283,11 @@ register_vectors_procs (GimpPDB *pdb)
"2006",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("string",
"string",
@@ -2341,11 +2341,11 @@ register_vectors_procs (GimpPDB *pdb)
"2007",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("filename",
"filename",
@@ -2354,11 +2354,11 @@ register_vectors_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object to be saved, or 0 for all in
the image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object to be saved, or 0 for all in the
image",
+ FALSE,
+ GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2376,17 +2376,17 @@ register_vectors_procs (GimpPDB *pdb)
"2007",
NULL);
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "The image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "image",
+ "The image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_vectors_id ("vectors",
- "vectors",
- "The vectors object to save, or 0 for all in the
image",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
+ gimp_param_spec_vectors ("vectors",
+ "vectors",
+ "The vectors object to save, or 0 for all in the
image",
+ FALSE,
+ GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("string",
"string",
diff --git a/app/plug-in/gimpgpparams.c b/app/plug-in/gimpgpparams.c
index f14c6bbbb1..1e30c37127 100644
--- a/app/plug-in/gimpgpparams.c
+++ b/app/plug-in/gimpgpparams.c
@@ -167,59 +167,50 @@ _gimp_gp_param_def_to_param_spec (gpointer gimp,
flags);
case GP_PARAM_DEF_TYPE_ID:
- if (! strcmp (param_def->type_name, "GimpParamDisplayID"))
- return gimp_param_spec_display_id (name, nick, blurb,
- gimp,
- param_def->meta.m_id.none_ok,
- flags);
-
- if (! strcmp (param_def->type_name, "GimpParamImageID"))
- return gimp_param_spec_image_id (name, nick, blurb,
- gimp,
- param_def->meta.m_id.none_ok,
- flags);
-
- if (! strcmp (param_def->type_name, "GimpParamItemID"))
- return gimp_param_spec_item_id (name, nick, blurb,
- gimp,
+ if (! strcmp (param_def->type_name, "GimpParamDisplay"))
+ return gimp_param_spec_display (name, nick, blurb,
param_def->meta.m_id.none_ok,
flags);
- if (! strcmp (param_def->type_name, "GimpParamDrawableID"))
- return gimp_param_spec_drawable_id (name, nick, blurb,
- gimp,
- param_def->meta.m_id.none_ok,
- flags);
+ if (! strcmp (param_def->type_name, "GimpParamImage"))
+ return gimp_param_spec_image (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
+
+ if (! strcmp (param_def->type_name, "GimpParamItem"))
+ return gimp_param_spec_item (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
- if (! strcmp (param_def->type_name, "GimpParamLayerID"))
- return gimp_param_spec_layer_id (name, nick, blurb,
- gimp,
+ if (! strcmp (param_def->type_name, "GimpParamDrawable"))
+ return gimp_param_spec_drawable (name, nick, blurb,
param_def->meta.m_id.none_ok,
flags);
- if (! strcmp (param_def->type_name, "GimpParamChannelID"))
- return gimp_param_spec_channel_id (name, nick, blurb,
- gimp,
- param_def->meta.m_id.none_ok,
- flags);
+ if (! strcmp (param_def->type_name, "GimpParamLayer"))
+ return gimp_param_spec_layer (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
+
+ if (! strcmp (param_def->type_name, "GimpParamChannel"))
+ return gimp_param_spec_channel (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
- if (! strcmp (param_def->type_name, "GimpParamLayerMaskID"))
- return gimp_param_spec_layer_mask_id (name, nick, blurb,
- gimp,
- param_def->meta.m_id.none_ok,
- flags);
-
- if (! strcmp (param_def->type_name, "GimpParamSelectionID"))
- return gimp_param_spec_selection_id (name, nick, blurb,
- gimp,
- param_def->meta.m_id.none_ok,
- flags);
-
- if (! strcmp (param_def->type_name, "GimpParamVectorsID"))
- return gimp_param_spec_vectors_id (name, nick, blurb,
- gimp,
+ if (! strcmp (param_def->type_name, "GimpParamLayerMask"))
+ return gimp_param_spec_layer_mask (name, nick, blurb,
param_def->meta.m_id.none_ok,
flags);
+
+ if (! strcmp (param_def->type_name, "GimpParamSelection"))
+ return gimp_param_spec_selection (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
+
+ if (! strcmp (param_def->type_name, "GimpParamVectors"))
+ return gimp_param_spec_vectors (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
break;
case GP_PARAM_DEF_TYPE_PARAM_DEF:
diff --git a/app/plug-in/gimppluginmanager-file.c b/app/plug-in/gimppluginmanager-file.c
index 15f157d048..e01db26d92 100644
--- a/app/plug-in/gimppluginmanager-file.c
+++ b/app/plug-in/gimppluginmanager-file.c
@@ -89,7 +89,7 @@ gimp_plug_in_manager_register_load_handler (GimpPlugInManager *manager,
! G_IS_PARAM_SPEC_STRING (procedure->args[1]) ||
! G_IS_PARAM_SPEC_STRING (procedure->args[2]) ||
(! file_proc->generic_file_proc &&
- ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->values[0]))))
+ ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->values[0]))))
{
gimp_message (manager->gimp, NULL, GIMP_MESSAGE_ERROR,
"load handler \"%s\" does not take the standard "
@@ -136,12 +136,12 @@ gimp_plug_in_manager_register_save_handler (GimpPlugInManager *manager,
procedure = GIMP_PROCEDURE (file_proc);
- if ((procedure->num_args < 5) ||
- ! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
- ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) ||
- ! GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[2]) ||
- ! G_IS_PARAM_SPEC_STRING (procedure->args[3]) ||
- ! G_IS_PARAM_SPEC_STRING (procedure->args[4]))
+ if ((procedure->num_args < 5) ||
+ ! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
+ ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) ||
+ ! GIMP_IS_PARAM_SPEC_DRAWABLE (procedure->args[2]) ||
+ ! G_IS_PARAM_SPEC_STRING (procedure->args[3]) ||
+ ! G_IS_PARAM_SPEC_STRING (procedure->args[4]))
{
gimp_message (manager->gimp, NULL, GIMP_MESSAGE_ERROR,
"save handler \"%s\" does not take the standard "
diff --git a/app/plug-in/gimppluginprocedure.c b/app/plug-in/gimppluginprocedure.c
index 8c91808bb8..b6e0e5afc1 100644
--- a/app/plug-in/gimppluginprocedure.c
+++ b/app/plug-in/gimppluginprocedure.c
@@ -477,16 +477,16 @@ gimp_plug_in_procedure_validate_args (GimpPlugInProcedure *proc,
GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) &&
G_IS_PARAM_SPEC_STRING (procedure->args[1]) &&
G_IS_PARAM_SPEC_STRING (procedure->args[2]) &&
- GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->values[0]))
+ GIMP_IS_PARAM_SPEC_IMAGE (procedure->values[0]))
{
uri_value = gimp_value_array_index (args, 1);
}
- else if ((procedure->num_args >= 5) &&
- GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) &&
- GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) &&
- GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[2]) &&
- G_IS_PARAM_SPEC_STRING (procedure->args[3]) &&
- G_IS_PARAM_SPEC_STRING (procedure->args[4]))
+ else if ((procedure->num_args >= 5) &&
+ GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) &&
+ GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) &&
+ GIMP_IS_PARAM_SPEC_DRAWABLE (procedure->args[2]) &&
+ G_IS_PARAM_SPEC_STRING (procedure->args[3]) &&
+ G_IS_PARAM_SPEC_STRING (procedure->args[4]))
{
uri_value = gimp_value_array_index (args, 3);
}
@@ -649,11 +649,11 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
{
if ((procedure->num_args < 3) ||
! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
- ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) ||
+ ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) ||
! (G_TYPE_FROM_INSTANCE (procedure->args[2])
- == GIMP_TYPE_PARAM_LAYER_ID ||
+ == GIMP_TYPE_PARAM_LAYER ||
G_TYPE_FROM_INSTANCE (procedure->args[2])
- == GIMP_TYPE_PARAM_DRAWABLE_ID))
+ == GIMP_TYPE_PARAM_DRAWABLE))
{
required = "(INT | ENUM GimpRunMode), IMAGE, (LAYER | DRAWABLE)";
goto failure;
@@ -663,11 +663,11 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
{
if ((procedure->num_args < 3) ||
! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
- ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) ||
+ ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) ||
! (G_TYPE_FROM_INSTANCE (procedure->args[2])
- == GIMP_TYPE_PARAM_CHANNEL_ID ||
+ == GIMP_TYPE_PARAM_CHANNEL ||
G_TYPE_FROM_INSTANCE (procedure->args[2])
- == GIMP_TYPE_PARAM_DRAWABLE_ID))
+ == GIMP_TYPE_PARAM_DRAWABLE))
{
required = "(INT | ENUM GimpRunMode), IMAGE, (CHANNEL | DRAWABLE)";
goto failure;
@@ -675,10 +675,10 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
}
else if (g_str_has_prefix (menu_path, "<Vectors>"))
{
- if ((procedure->num_args < 3) ||
- ! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
- ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) ||
- ! GIMP_IS_PARAM_SPEC_VECTORS_ID (procedure->args[2]))
+ if ((procedure->num_args < 3) ||
+ ! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
+ ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) ||
+ ! GIMP_IS_PARAM_SPEC_VECTORS (procedure->args[2]))
{
required = "(INT | ENUM GimpRunMode), IMAGE, VECTORS";
goto failure;
@@ -688,7 +688,7 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
{
if ((procedure->num_args < 2) ||
! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
- ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]))
+ ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]))
{
required = "(INT | ENUM GimpRunMode), IMAGE";
goto failure;
@@ -706,7 +706,7 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
}
if ((procedure->num_values < 1) ||
- ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->values[0]))
+ ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->values[0]))
{
required = "IMAGE";
goto failure;
@@ -714,12 +714,12 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
}
else if (g_str_has_prefix (menu_path, "<Save>"))
{
- if ((procedure->num_args < 5) ||
- ! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
- ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) ||
- ! GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[2]) ||
- ! G_IS_PARAM_SPEC_STRING (procedure->args[3]) ||
- ! G_IS_PARAM_SPEC_STRING (procedure->args[4]))
+ if ((procedure->num_args < 5) ||
+ ! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
+ ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) ||
+ ! GIMP_IS_PARAM_SPEC_DRAWABLE (procedure->args[2]) ||
+ ! G_IS_PARAM_SPEC_STRING (procedure->args[3]) ||
+ ! G_IS_PARAM_SPEC_STRING (procedure->args[4]))
{
required = "(INT | ENUM GimpRunMode), IMAGE, DRAWABLE, STRING, STRING";
goto failure;
diff --git a/app/xcf/xcf.c b/app/xcf/xcf.c
index 4dcaa49f95..7c90d4986a 100644
--- a/app/xcf/xcf.c
+++ b/app/xcf/xcf.c
@@ -141,17 +141,17 @@ xcf_init (Gimp *gimp)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "Input image",
- gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "Image",
+ "Input image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "Drawable",
- "Active drawable of input image",
- gimp, TRUE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_drawable ("drawable",
+ "Drawable",
+ "Active drawable of input image",
+ TRUE,
+ GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("filename",
"Filename",
@@ -232,11 +232,11 @@ xcf_init (Gimp *gimp)
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "Output image",
- gimp, FALSE,
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_image ("image",
+ "Image",
+ "Output image",
+ FALSE,
+ GIMP_PARAM_READWRITE));
gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc);
g_object_unref (procedure);
}
@@ -459,7 +459,7 @@ xcf_load_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (image)
- gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
+ g_value_set_object (gimp_value_array_index (return_vals, 1), image);
gimp_unset_busy (gimp);
@@ -484,7 +484,7 @@ xcf_save_invoker (GimpProcedure *procedure,
gimp_set_busy (gimp);
- image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+ image = g_value_get_object (gimp_value_array_index (args, 1));
uri = g_value_get_string (gimp_value_array_index (args, 3));
file = g_file_new_for_uri (uri);
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index d7895a98cc..da05669e90 100644
--- a/libgimp/gimp.c
+++ b/libgimp/gimp.c
@@ -459,15 +459,15 @@ _gimp_main_internal (GType plug_in_type,
GIMP_TYPE_STRING_ARRAY, GIMP_TYPE_PARAM_STRING_ARRAY,
GIMP_TYPE_RGB_ARRAY, GIMP_TYPE_PARAM_RGB_ARRAY,
- GIMP_TYPE_DISPLAY_ID, GIMP_TYPE_PARAM_DISPLAY_ID,
- GIMP_TYPE_IMAGE_ID, GIMP_TYPE_PARAM_IMAGE_ID,
- GIMP_TYPE_ITEM_ID, GIMP_TYPE_PARAM_ITEM_ID,
- GIMP_TYPE_DRAWABLE_ID, GIMP_TYPE_PARAM_DRAWABLE_ID,
- GIMP_TYPE_LAYER_ID, GIMP_TYPE_PARAM_LAYER_ID,
- GIMP_TYPE_CHANNEL_ID, GIMP_TYPE_PARAM_CHANNEL_ID,
- GIMP_TYPE_LAYER_MASK_ID, GIMP_TYPE_PARAM_LAYER_MASK_ID,
- GIMP_TYPE_SELECTION_ID, GIMP_TYPE_PARAM_SELECTION_ID,
- GIMP_TYPE_VECTORS_ID, GIMP_TYPE_PARAM_VECTORS_ID
+ GIMP_TYPE_DISPLAY, GIMP_TYPE_PARAM_DISPLAY,
+ GIMP_TYPE_IMAGE, GIMP_TYPE_PARAM_IMAGE,
+ GIMP_TYPE_ITEM, GIMP_TYPE_PARAM_ITEM,
+ GIMP_TYPE_DRAWABLE, GIMP_TYPE_PARAM_DRAWABLE,
+ GIMP_TYPE_LAYER, GIMP_TYPE_PARAM_LAYER,
+ GIMP_TYPE_CHANNEL, GIMP_TYPE_PARAM_CHANNEL,
+ GIMP_TYPE_LAYER_MASK, GIMP_TYPE_PARAM_LAYER_MASK,
+ GIMP_TYPE_SELECTION, GIMP_TYPE_PARAM_SELECTION,
+ GIMP_TYPE_VECTORS, GIMP_TYPE_PARAM_VECTORS
};
gint i;
diff --git a/libgimp/gimp.def b/libgimp/gimp.def
index afca909501..12f90ed20e 100644
--- a/libgimp/gimp.def
+++ b/libgimp/gimp.def
@@ -45,7 +45,6 @@ EXPORTS
gimp_channel_get_opacity
gimp_channel_get_show_masked
gimp_channel_get_type
- gimp_channel_id_get_type
gimp_channel_new
gimp_channel_new_from_component
gimp_channel_set_color
@@ -180,7 +179,7 @@ EXPORTS
gimp_display_get_id
gimp_display_get_type
gimp_display_get_window_handle
- gimp_display_id_get_type
+ gimp_display_id_is_valid
gimp_display_is_valid
gimp_display_name
gimp_display_new
@@ -223,7 +222,6 @@ EXPORTS
gimp_drawable_height
gimp_drawable_histogram
gimp_drawable_hue_saturation
- gimp_drawable_id_get_type
gimp_drawable_invert
gimp_drawable_is_gray
gimp_drawable_is_indexed
@@ -431,7 +429,7 @@ EXPORTS
gimp_image_grid_set_spacing
gimp_image_grid_set_style
gimp_image_height
- gimp_image_id_get_type
+ gimp_image_id_is_valid
gimp_image_insert_channel
gimp_image_insert_layer
gimp_image_insert_vectors
@@ -514,7 +512,14 @@ EXPORTS
gimp_item_get_tattoo
gimp_item_get_type
gimp_item_get_visible
- gimp_item_id_get_type
+ gimp_item_id_is_channel
+ gimp_item_id_is_drawable
+ gimp_item_id_is_layer
+ gimp_item_id_is_layer_mask
+ gimp_item_id_is_selection
+ gimp_item_id_is_text_layer
+ gimp_item_id_is_valid
+ gimp_item_id_is_vectors
gimp_item_is_channel
gimp_item_is_drawable
gimp_item_is_group
@@ -564,10 +569,8 @@ EXPORTS
gimp_layer_get_show_mask
gimp_layer_get_type
gimp_layer_group_new
- gimp_layer_id_get_type
gimp_layer_is_floating_sel
gimp_layer_mask_get_type
- gimp_layer_mask_id_get_type
gimp_layer_mode_get_type
gimp_layer_new
gimp_layer_new_deprecated
@@ -626,24 +629,24 @@ EXPORTS
gimp_palettes_popup
gimp_palettes_refresh
gimp_palettes_set_popup
- gimp_param_channel_id_get_type
- gimp_param_display_id_get_type
- gimp_param_drawable_id_get_type
- gimp_param_image_id_get_type
- gimp_param_item_id_get_type
- gimp_param_layer_id_get_type
- gimp_param_layer_mask_id_get_type
- gimp_param_selection_id_get_type
- gimp_param_spec_channel_id
- gimp_param_spec_display_id
- gimp_param_spec_drawable_id
- gimp_param_spec_image_id
- gimp_param_spec_item_id
- gimp_param_spec_layer_id
- gimp_param_spec_layer_mask_id
- gimp_param_spec_selection_id
- gimp_param_spec_vectors_id
- gimp_param_vectors_id_get_type
+ gimp_param_channel_get_type
+ gimp_param_display_get_type
+ gimp_param_drawable_get_type
+ gimp_param_image_get_type
+ gimp_param_item_get_type
+ gimp_param_layer_get_type
+ gimp_param_layer_mask_get_type
+ gimp_param_selection_get_type
+ gimp_param_spec_channel
+ gimp_param_spec_display
+ gimp_param_spec_drawable
+ gimp_param_spec_image
+ gimp_param_spec_item
+ gimp_param_spec_layer
+ gimp_param_spec_layer_mask
+ gimp_param_spec_selection
+ gimp_param_spec_vectors
+ gimp_param_vectors_get_type
gimp_pattern_get_info
gimp_pattern_get_pixels
gimp_pattern_select_destroy
@@ -741,7 +744,6 @@ EXPORTS
gimp_selection_flood
gimp_selection_get_type
gimp_selection_grow
- gimp_selection_id_get_type
gimp_selection_invert
gimp_selection_is_empty
gimp_selection_none
@@ -790,24 +792,6 @@ EXPORTS
gimp_tile_height
gimp_tile_width
gimp_user_time
- gimp_value_get_channel_id
- gimp_value_get_display_id
- gimp_value_get_drawable_id
- gimp_value_get_image_id
- gimp_value_get_item_id
- gimp_value_get_layer_id
- gimp_value_get_layer_mask_id
- gimp_value_get_selection_id
- gimp_value_get_vectors_id
- gimp_value_set_channel_id
- gimp_value_set_display_id
- gimp_value_set_drawable_id
- gimp_value_set_image_id
- gimp_value_set_item_id
- gimp_value_set_layer_id
- gimp_value_set_layer_mask_id
- gimp_value_set_selection_id
- gimp_value_set_vectors_id
gimp_vectors_bezier_stroke_conicto
gimp_vectors_bezier_stroke_cubicto
gimp_vectors_bezier_stroke_lineto
@@ -818,7 +802,6 @@ EXPORTS
gimp_vectors_export_to_string
gimp_vectors_get_strokes
gimp_vectors_get_type
- gimp_vectors_id_get_type
gimp_vectors_import_from_file
gimp_vectors_import_from_string
gimp_vectors_new
diff --git a/libgimp/gimpchannel_pdb.c b/libgimp/gimpchannel_pdb.c
index e39734cd62..1b97081de7 100644
--- a/libgimp/gimpchannel_pdb.c
+++ b/libgimp/gimpchannel_pdb.c
@@ -69,7 +69,7 @@ _gimp_channel_new (GimpImage *image,
GimpChannel *channel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, width,
G_TYPE_INT, height,
G_TYPE_STRING, name,
@@ -87,7 +87,7 @@ _gimp_channel_new (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel = GIMP_CHANNEL (gimp_item_get_by_id (gimp_value_get_channel_id (gimp_value_array_index
(return_vals, 1))));
+ channel = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -123,7 +123,7 @@ gimp_channel_new_from_component (GimpImage *image,
GimpChannel *channel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -138,7 +138,7 @@ gimp_channel_new_from_component (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel = GIMP_CHANNEL (gimp_item_get_by_id (gimp_value_get_channel_id (gimp_value_array_index
(return_vals, 1))));
+ channel = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -174,7 +174,7 @@ _gimp_channel_new_from_component (gint32 image_ID,
gint32 channel_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -189,7 +189,7 @@ _gimp_channel_new_from_component (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel_ID = gimp_value_get_channel_id (gimp_value_array_index (return_vals, 1));
+ channel_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -217,7 +217,7 @@ gimp_channel_copy (GimpChannel *channel)
GimpChannel *channel_copy = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel)),
+ GIMP_TYPE_CHANNEL, channel,
G_TYPE_NONE);
if (pdb)
@@ -230,7 +230,7 @@ gimp_channel_copy (GimpChannel *channel)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel_copy = GIMP_CHANNEL (gimp_item_get_by_id (gimp_value_get_channel_id (gimp_value_array_index
(return_vals, 1))));
+ channel_copy = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -258,7 +258,7 @@ _gimp_channel_copy (gint32 channel_ID)
gint32 channel_copy_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, channel_ID,
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel_ID),
G_TYPE_NONE);
if (pdb)
@@ -271,7 +271,7 @@ _gimp_channel_copy (gint32 channel_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel_copy_ID = gimp_value_get_channel_id (gimp_value_array_index (return_vals, 1));
+ channel_copy_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -306,8 +306,8 @@ gimp_channel_combine_masks (GimpChannel *channel1,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel1)),
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel2)),
+ GIMP_TYPE_CHANNEL, channel1,
+ GIMP_TYPE_CHANNEL, channel2,
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_INT, offx,
G_TYPE_INT, offy,
@@ -357,8 +357,8 @@ _gimp_channel_combine_masks (gint32 channel1_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, channel1_ID,
- GIMP_TYPE_CHANNEL_ID, channel2_ID,
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel1_ID),
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel2_ID),
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_INT, offx,
G_TYPE_INT, offy,
@@ -401,7 +401,7 @@ gimp_channel_get_show_masked (GimpChannel *channel)
gboolean show_masked = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel)),
+ GIMP_TYPE_CHANNEL, channel,
G_TYPE_NONE);
if (pdb)
@@ -442,7 +442,7 @@ _gimp_channel_get_show_masked (gint32 channel_ID)
gboolean show_masked = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, channel_ID,
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel_ID),
G_TYPE_NONE);
if (pdb)
@@ -485,7 +485,7 @@ gimp_channel_set_show_masked (GimpChannel *channel,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel)),
+ GIMP_TYPE_CHANNEL, channel,
G_TYPE_BOOLEAN, show_masked,
G_TYPE_NONE);
@@ -528,7 +528,7 @@ _gimp_channel_set_show_masked (gint32 channel_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, channel_ID,
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel_ID),
G_TYPE_BOOLEAN, show_masked,
G_TYPE_NONE);
@@ -567,7 +567,7 @@ gimp_channel_get_opacity (GimpChannel *channel)
gdouble opacity = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel)),
+ GIMP_TYPE_CHANNEL, channel,
G_TYPE_NONE);
if (pdb)
@@ -606,7 +606,7 @@ _gimp_channel_get_opacity (gint32 channel_ID)
gdouble opacity = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, channel_ID,
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel_ID),
G_TYPE_NONE);
if (pdb)
@@ -647,7 +647,7 @@ gimp_channel_set_opacity (GimpChannel *channel,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel)),
+ GIMP_TYPE_CHANNEL, channel,
G_TYPE_DOUBLE, opacity,
G_TYPE_NONE);
@@ -688,7 +688,7 @@ _gimp_channel_set_opacity (gint32 channel_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, channel_ID,
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel_ID),
G_TYPE_DOUBLE, opacity,
G_TYPE_NONE);
@@ -729,7 +729,7 @@ gimp_channel_get_color (GimpChannel *channel,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel)),
+ GIMP_TYPE_CHANNEL, channel,
G_TYPE_NONE);
if (pdb)
@@ -772,7 +772,7 @@ _gimp_channel_get_color (gint32 channel_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, channel_ID,
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel_ID),
G_TYPE_NONE);
if (pdb)
@@ -815,7 +815,7 @@ gimp_channel_set_color (GimpChannel *channel,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel)),
+ GIMP_TYPE_CHANNEL, channel,
GIMP_TYPE_RGB, color,
G_TYPE_NONE);
@@ -856,7 +856,7 @@ _gimp_channel_set_color (gint32 channel_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_CHANNEL_ID, channel_ID,
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel_ID),
GIMP_TYPE_RGB, color,
G_TYPE_NONE);
diff --git a/libgimp/gimpdisplay.c b/libgimp/gimpdisplay.c
index af6ea38deb..f796231b40 100644
--- a/libgimp/gimpdisplay.c
+++ b/libgimp/gimpdisplay.c
@@ -168,3 +168,22 @@ gimp_display_get_by_id (gint32 display_id)
return NULL;
}
+
+/**
+ * gimp_display_is_valid:
+ * @display: The display to check.
+ *
+ * Returns TRUE if the display is valid.
+ *
+ * This procedure checks if the given display is valid and refers to
+ * an existing display.
+ *
+ * Returns: Whether the display is valid.
+ *
+ * Since: 2.4
+ **/
+gboolean
+gimp_display_is_valid (GimpDisplay *display)
+{
+ return gimp_display_id_is_valid (gimp_display_get_id (display));
+}
diff --git a/libgimp/gimpdisplay.h b/libgimp/gimpdisplay.h
index 8b91dfd3f1..b122824a8e 100644
--- a/libgimp/gimpdisplay.h
+++ b/libgimp/gimpdisplay.h
@@ -70,6 +70,8 @@ GType gimp_display_get_type (void) G_GNUC_CONST;
gint32 gimp_display_get_id (GimpDisplay *display);
GimpDisplay * gimp_display_get_by_id (gint32 display_id);
+gboolean gimp_display_is_valid (GimpDisplay *display);
+
G_END_DECLS
diff --git a/libgimp/gimpdisplay_pdb.c b/libgimp/gimpdisplay_pdb.c
index d01c7be5f0..beb5e40ad3 100644
--- a/libgimp/gimpdisplay_pdb.c
+++ b/libgimp/gimpdisplay_pdb.c
@@ -35,62 +35,20 @@
/**
- * gimp_display_is_valid:
- * @display: The display to check.
+ * gimp_display_id_is_valid:
+ * @display_id: The display ID to check.
*
- * Returns TRUE if the display is valid.
+ * Returns TRUE if the display ID is valid.
*
* This procedure checks if the given display ID is valid and refers to
* an existing display.
*
* Returns: Whether the display ID is valid.
*
- * Since: 2.4
- **/
-gboolean
-gimp_display_is_valid (GimpDisplay *display)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- gboolean valid = FALSE;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DISPLAY_ID, gimp_display_get_id (display),
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-display-is-valid",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-display-is-valid",
- args);
- gimp_value_array_unref (args);
-
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- valid = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
-
- gimp_value_array_unref (return_vals);
-
- return valid;
-}
-
-/**
- * _gimp_display_is_valid: (skip)
- * @display_ID: The display to check.
- *
- * Returns TRUE if the display is valid.
- *
- * This procedure checks if the given display ID is valid and refers to
- * an existing display.
- *
- * Returns: Whether the display ID is valid.
- *
- * Since: 2.4
+ * Since: 3.0
**/
gboolean
-_gimp_display_is_valid (gint32 display_ID)
+gimp_display_id_is_valid (gint display_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
@@ -98,15 +56,15 @@ _gimp_display_is_valid (gint32 display_ID)
gboolean valid = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DISPLAY_ID, display_ID,
+ G_TYPE_INT, display_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-display-is-valid",
+ "gimp-display-id-is-valid",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-display-is-valid",
+ return_vals = gimp_run_procedure_array ("gimp-display-id-is-valid",
args);
gimp_value_array_unref (args);
@@ -142,7 +100,7 @@ gimp_display_new (GimpImage *image)
GimpDisplay *display = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -155,7 +113,7 @@ gimp_display_new (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- display = gimp_display_get_by_id (gimp_value_get_display_id (gimp_value_array_index (return_vals, 1)));
+ display = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -186,7 +144,7 @@ _gimp_display_new (gint32 image_ID)
gint32 display_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -199,7 +157,7 @@ _gimp_display_new (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- display_ID = gimp_value_get_display_id (gimp_value_array_index (return_vals, 1));
+ display_ID = gimp_display_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -229,7 +187,7 @@ gimp_display_delete (GimpDisplay *display)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DISPLAY_ID, gimp_display_get_id (display),
+ GIMP_TYPE_DISPLAY, display,
G_TYPE_NONE);
if (pdb)
@@ -271,7 +229,7 @@ _gimp_display_delete (gint32 display_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DISPLAY_ID, display_ID,
+ GIMP_TYPE_DISPLAY, gimp_display_get_by_id (display_ID),
G_TYPE_NONE);
if (pdb)
@@ -315,7 +273,7 @@ gimp_display_get_window_handle (GimpDisplay *display)
gint window = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DISPLAY_ID, gimp_display_get_id (display),
+ GIMP_TYPE_DISPLAY, display,
G_TYPE_NONE);
if (pdb)
@@ -360,7 +318,7 @@ _gimp_display_get_window_handle (gint32 display_ID)
gint window = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DISPLAY_ID, display_ID,
+ GIMP_TYPE_DISPLAY, gimp_display_get_by_id (display_ID),
G_TYPE_NONE);
if (pdb)
@@ -443,8 +401,8 @@ gimp_displays_reconnect (GimpImage *old_image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (old_image),
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (new_image),
+ GIMP_TYPE_IMAGE, old_image,
+ GIMP_TYPE_IMAGE, new_image,
G_TYPE_NONE);
if (pdb)
@@ -487,8 +445,8 @@ _gimp_displays_reconnect (gint32 old_image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, old_image_ID,
- GIMP_TYPE_IMAGE_ID, new_image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (old_image_ID),
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (new_image_ID),
G_TYPE_NONE);
if (pdb)
diff --git a/libgimp/gimpdisplay_pdb.h b/libgimp/gimpdisplay_pdb.h
index 2bfb981ec5..45f6db1917 100644
--- a/libgimp/gimpdisplay_pdb.h
+++ b/libgimp/gimpdisplay_pdb.h
@@ -32,11 +32,11 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-gboolean gimp_displays_flush (void);
+gboolean gimp_display_id_is_valid (gint display_id);
+gboolean gimp_displays_flush (void);
#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
-gboolean gimp_display_is_valid (GimpDisplay *display);
GimpDisplay* gimp_display_new (GimpImage *image);
gboolean gimp_display_delete (GimpDisplay *display);
gint gimp_display_get_window_handle (GimpDisplay *display);
@@ -45,7 +45,6 @@ gboolean gimp_displays_reconnect (GimpImage *old_image,
#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
-#define gimp_display_is_valid _gimp_display_is_valid
#define gimp_display_new _gimp_display_new
#define gimp_display_delete _gimp_display_delete
#define gimp_display_get_window_handle _gimp_display_get_window_handle
@@ -58,7 +57,6 @@ gboolean gimp_displays_reconnect (GimpImage *old_image,
* They are not marked internal as a trick to keep the old API alive for now.
*/
-gboolean _gimp_display_is_valid (gint32 display_ID);
gint32 _gimp_display_new (gint32 image_ID);
gboolean _gimp_display_delete (gint32 display_ID);
gint _gimp_display_get_window_handle (gint32 display_ID);
diff --git a/libgimp/gimpdrawable_pdb.c b/libgimp/gimpdrawable_pdb.c
index c23cd3c43e..bb9cb93927 100644
--- a/libgimp/gimpdrawable_pdb.c
+++ b/libgimp/gimpdrawable_pdb.c
@@ -59,7 +59,7 @@ _gimp_drawable_get_format (GimpDrawable *drawable)
gchar *format = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -103,7 +103,7 @@ _gimp_drawable_get_thumbnail_format (GimpDrawable *drawable)
gchar *format = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -142,7 +142,7 @@ gimp_drawable_type (GimpDrawable *drawable)
GimpImageType type = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -181,7 +181,7 @@ _gimp_drawable_type (gint32 drawable_ID)
GimpImageType type = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -223,7 +223,7 @@ gimp_drawable_type_with_alpha (GimpDrawable *drawable)
GimpImageType type_with_alpha = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -265,7 +265,7 @@ _gimp_drawable_type_with_alpha (gint32 drawable_ID)
GimpImageType type_with_alpha = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -306,7 +306,7 @@ gimp_drawable_has_alpha (GimpDrawable *drawable)
gboolean has_alpha = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -347,7 +347,7 @@ _gimp_drawable_has_alpha (gint32 drawable_ID)
gboolean has_alpha = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -387,7 +387,7 @@ gimp_drawable_is_rgb (GimpDrawable *drawable)
gboolean is_rgb = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -427,7 +427,7 @@ _gimp_drawable_is_rgb (gint32 drawable_ID)
gboolean is_rgb = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -467,7 +467,7 @@ gimp_drawable_is_gray (GimpDrawable *drawable)
gboolean is_gray = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -507,7 +507,7 @@ _gimp_drawable_is_gray (gint32 drawable_ID)
gboolean is_gray = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -547,7 +547,7 @@ gimp_drawable_is_indexed (GimpDrawable *drawable)
gboolean is_indexed = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -587,7 +587,7 @@ _gimp_drawable_is_indexed (gint32 drawable_ID)
gboolean is_indexed = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -626,7 +626,7 @@ gimp_drawable_bpp (GimpDrawable *drawable)
gint bpp = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -665,7 +665,7 @@ _gimp_drawable_bpp (gint32 drawable_ID)
gint bpp = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -704,7 +704,7 @@ gimp_drawable_width (GimpDrawable *drawable)
gint width = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -743,7 +743,7 @@ _gimp_drawable_width (gint32 drawable_ID)
gint width = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -782,7 +782,7 @@ gimp_drawable_height (GimpDrawable *drawable)
gint height = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -821,7 +821,7 @@ _gimp_drawable_height (gint32 drawable_ID)
gint height = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -866,7 +866,7 @@ gimp_drawable_offsets (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -919,7 +919,7 @@ _gimp_drawable_offsets (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -986,7 +986,7 @@ gimp_drawable_mask_bounds (GimpDrawable *drawable,
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -1051,7 +1051,7 @@ _gimp_drawable_mask_bounds (gint32 drawable_ID,
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -1111,7 +1111,7 @@ gimp_drawable_mask_intersect (GimpDrawable *drawable,
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -1171,7 +1171,7 @@ _gimp_drawable_mask_intersect (gint32 drawable_ID,
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -1221,7 +1221,7 @@ gimp_drawable_merge_shadow (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_BOOLEAN, undo,
G_TYPE_NONE);
@@ -1265,7 +1265,7 @@ _gimp_drawable_merge_shadow (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_BOOLEAN, undo,
G_TYPE_NONE);
@@ -1309,7 +1309,7 @@ gimp_drawable_free_shadow (GimpDrawable *drawable)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -1352,7 +1352,7 @@ _gimp_drawable_free_shadow (gint32 drawable_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -1401,7 +1401,7 @@ gimp_drawable_update (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, x,
G_TYPE_INT, y,
G_TYPE_INT, width,
@@ -1454,7 +1454,7 @@ _gimp_drawable_update (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, x,
G_TYPE_INT, y,
G_TYPE_INT, width,
@@ -1506,7 +1506,7 @@ gimp_drawable_get_pixel (GimpDrawable *drawable,
guint8 *pixel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, x_coord,
G_TYPE_INT, y_coord,
G_TYPE_NONE);
@@ -1561,7 +1561,7 @@ _gimp_drawable_get_pixel (gint32 drawable_ID,
guint8 *pixel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, x_coord,
G_TYPE_INT, y_coord,
G_TYPE_NONE);
@@ -1619,7 +1619,7 @@ gimp_drawable_set_pixel (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, x_coord,
G_TYPE_INT, y_coord,
G_TYPE_INT, num_channels,
@@ -1674,7 +1674,7 @@ _gimp_drawable_set_pixel (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, x_coord,
G_TYPE_INT, y_coord,
G_TYPE_INT, num_channels,
@@ -1729,7 +1729,7 @@ gimp_drawable_fill (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_FILL_TYPE, fill_type,
G_TYPE_NONE);
@@ -1780,7 +1780,7 @@ _gimp_drawable_fill (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_FILL_TYPE, fill_type,
G_TYPE_NONE);
@@ -1833,7 +1833,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_BOOLEAN, wrap_around,
GIMP_TYPE_OFFSET_TYPE, fill_type,
G_TYPE_INT, offset_x,
@@ -1889,7 +1889,7 @@ _gimp_drawable_offset (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_BOOLEAN, wrap_around,
GIMP_TYPE_OFFSET_TYPE, fill_type,
G_TYPE_INT, offset_x,
@@ -1948,7 +1948,7 @@ _gimp_drawable_thumbnail (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, width,
G_TYPE_INT, height,
G_TYPE_NONE);
@@ -2030,7 +2030,7 @@ _gimp_drawable_sub_thumbnail (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, src_x,
G_TYPE_INT, src_y,
G_TYPE_INT, src_width,
@@ -2096,9 +2096,9 @@ gimp_drawable_foreground_extract (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_FOREGROUND_EXTRACT_MODE, mode,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (mask)),
+ GIMP_TYPE_DRAWABLE, mask,
G_TYPE_NONE);
if (pdb)
@@ -2143,9 +2143,9 @@ _gimp_drawable_foreground_extract (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_FOREGROUND_EXTRACT_MODE, mode,
- GIMP_TYPE_DRAWABLE_ID, mask_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (mask_ID),
G_TYPE_NONE);
if (pdb)
diff --git a/libgimp/gimpdrawablecolor_pdb.c b/libgimp/gimpdrawablecolor_pdb.c
index b472e694c0..d12f43423f 100644
--- a/libgimp/gimpdrawablecolor_pdb.c
+++ b/libgimp/gimpdrawablecolor_pdb.c
@@ -62,7 +62,7 @@ gimp_drawable_brightness_contrast (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, brightness,
G_TYPE_DOUBLE, contrast,
G_TYPE_NONE);
@@ -110,7 +110,7 @@ _gimp_drawable_brightness_contrast (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, brightness,
G_TYPE_DOUBLE, contrast,
G_TYPE_NONE);
@@ -169,7 +169,7 @@ gimp_drawable_color_balance (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_TRANSFER_MODE, transfer_mode,
G_TYPE_BOOLEAN, preserve_lum,
G_TYPE_DOUBLE, cyan_red,
@@ -231,7 +231,7 @@ _gimp_drawable_color_balance (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_TRANSFER_MODE, transfer_mode,
G_TYPE_BOOLEAN, preserve_lum,
G_TYPE_DOUBLE, cyan_red,
@@ -285,7 +285,7 @@ gimp_drawable_colorize_hsl (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, hue,
G_TYPE_DOUBLE, saturation,
G_TYPE_DOUBLE, lightness,
@@ -337,7 +337,7 @@ _gimp_drawable_colorize_hsl (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, hue,
G_TYPE_DOUBLE, saturation,
G_TYPE_DOUBLE, lightness,
@@ -391,7 +391,7 @@ gimp_drawable_curves_explicit (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_INT, num_values,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -446,7 +446,7 @@ _gimp_drawable_curves_explicit (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_INT, num_values,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -501,7 +501,7 @@ gimp_drawable_curves_spline (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_INT, num_points,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -556,7 +556,7 @@ _gimp_drawable_curves_spline (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_INT, num_points,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -605,7 +605,7 @@ gimp_drawable_desaturate (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_DESATURATE_MODE, desaturate_mode,
G_TYPE_NONE);
@@ -651,7 +651,7 @@ _gimp_drawable_desaturate (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_DESATURATE_MODE, desaturate_mode,
G_TYPE_NONE);
@@ -700,7 +700,7 @@ gimp_drawable_equalize (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_BOOLEAN, mask_only,
G_TYPE_NONE);
@@ -749,7 +749,7 @@ _gimp_drawable_equalize (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_BOOLEAN, mask_only,
G_TYPE_NONE);
@@ -823,7 +823,7 @@ gimp_drawable_histogram (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_DOUBLE, start_range,
G_TYPE_DOUBLE, end_range,
@@ -916,7 +916,7 @@ _gimp_drawable_histogram (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_DOUBLE, start_range,
G_TYPE_DOUBLE, end_range,
@@ -990,7 +990,7 @@ gimp_drawable_hue_saturation (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_HUE_RANGE, hue_range,
G_TYPE_DOUBLE, hue_offset,
G_TYPE_DOUBLE, lightness,
@@ -1049,7 +1049,7 @@ _gimp_drawable_hue_saturation (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_HUE_RANGE, hue_range,
G_TYPE_DOUBLE, hue_offset,
G_TYPE_DOUBLE, lightness,
@@ -1099,7 +1099,7 @@ gimp_drawable_invert (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_BOOLEAN, linear,
G_TYPE_NONE);
@@ -1145,7 +1145,7 @@ _gimp_drawable_invert (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_BOOLEAN, linear,
G_TYPE_NONE);
@@ -1213,7 +1213,7 @@ gimp_drawable_levels (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_DOUBLE, low_input,
G_TYPE_DOUBLE, high_input,
@@ -1288,7 +1288,7 @@ _gimp_drawable_levels (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_DOUBLE, low_input,
G_TYPE_DOUBLE, high_input,
@@ -1338,7 +1338,7 @@ gimp_drawable_levels_stretch (GimpDrawable *drawable)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -1380,7 +1380,7 @@ _gimp_drawable_levels_stretch (gint32 drawable_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -1423,7 +1423,7 @@ gimp_drawable_posterize (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, levels,
G_TYPE_NONE);
@@ -1467,7 +1467,7 @@ _gimp_drawable_posterize (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, levels,
G_TYPE_NONE);
@@ -1517,7 +1517,7 @@ gimp_drawable_threshold (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_DOUBLE, low_threshold,
G_TYPE_DOUBLE, high_threshold,
@@ -1569,7 +1569,7 @@ _gimp_drawable_threshold (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_HISTOGRAM_CHANNEL, channel,
G_TYPE_DOUBLE, low_threshold,
G_TYPE_DOUBLE, high_threshold,
diff --git a/libgimp/gimpdrawableedit_pdb.c b/libgimp/gimpdrawableedit_pdb.c
index b570bbbd21..650fc99cb2 100644
--- a/libgimp/gimpdrawableedit_pdb.c
+++ b/libgimp/gimpdrawableedit_pdb.c
@@ -60,7 +60,7 @@ gimp_drawable_edit_clear (GimpDrawable *drawable)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -105,7 +105,7 @@ _gimp_drawable_edit_clear (gint32 drawable_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -153,7 +153,7 @@ gimp_drawable_edit_fill (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_FILL_TYPE, fill_type,
G_TYPE_NONE);
@@ -202,7 +202,7 @@ _gimp_drawable_edit_fill (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_FILL_TYPE, fill_type,
G_TYPE_NONE);
@@ -261,7 +261,7 @@ gimp_drawable_edit_bucket_fill (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_FILL_TYPE, fill_type,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
@@ -322,7 +322,7 @@ _gimp_drawable_edit_bucket_fill (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_FILL_TYPE, fill_type,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
@@ -396,7 +396,7 @@ gimp_drawable_edit_gradient_fill (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_GRADIENT_TYPE, gradient_type,
G_TYPE_DOUBLE, offset,
G_TYPE_BOOLEAN, supersample,
@@ -477,7 +477,7 @@ _gimp_drawable_edit_gradient_fill (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_GRADIENT_TYPE, gradient_type,
G_TYPE_DOUBLE, offset,
G_TYPE_BOOLEAN, supersample,
@@ -536,7 +536,7 @@ gimp_drawable_edit_stroke_selection (GimpDrawable *drawable)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -585,7 +585,7 @@ _gimp_drawable_edit_stroke_selection (gint32 drawable_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -638,8 +638,8 @@ gimp_drawable_edit_stroke_item (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_DRAWABLE, drawable,
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -692,8 +692,8 @@ _gimp_drawable_edit_stroke_item (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
diff --git a/libgimp/gimpedit_pdb.c b/libgimp/gimpedit_pdb.c
index a6600ed675..5521eb493e 100644
--- a/libgimp/gimpedit_pdb.c
+++ b/libgimp/gimpedit_pdb.c
@@ -60,7 +60,7 @@ gimp_edit_cut (GimpDrawable *drawable)
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -106,7 +106,7 @@ _gimp_edit_cut (gint32 drawable_ID)
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -152,7 +152,7 @@ gimp_edit_copy (GimpDrawable *drawable)
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -198,7 +198,7 @@ _gimp_edit_copy (gint32 drawable_ID)
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
@@ -244,7 +244,7 @@ gimp_edit_copy_visible (GimpImage *image)
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -290,7 +290,7 @@ _gimp_edit_copy_visible (gint32 image_ID)
gboolean non_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -345,7 +345,7 @@ gimp_edit_paste (GimpDrawable *drawable,
GimpLayer *floating_sel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_BOOLEAN, paste_into,
G_TYPE_NONE);
@@ -359,7 +359,7 @@ gimp_edit_paste (GimpDrawable *drawable,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- floating_sel = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index
(return_vals, 1))));
+ floating_sel = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -401,7 +401,7 @@ _gimp_edit_paste (gint32 drawable_ID,
gint32 floating_sel_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_BOOLEAN, paste_into,
G_TYPE_NONE);
@@ -415,7 +415,7 @@ _gimp_edit_paste (gint32 drawable_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- floating_sel_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ floating_sel_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -457,7 +457,7 @@ gimp_edit_paste_as_new_image (void)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image = gimp_image_get_by_id (gimp_value_get_image_id (gimp_value_array_index (return_vals, 1)));
+ image = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -499,7 +499,7 @@ _gimp_edit_paste_as_new_image (void)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image_ID = gimp_value_get_image_id (gimp_value_array_index (return_vals, 1));
+ image_ID = gimp_image_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -534,7 +534,7 @@ gimp_edit_named_cut (GimpDrawable *drawable,
gchar *real_name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
@@ -582,7 +582,7 @@ _gimp_edit_named_cut (gint32 drawable_ID,
gchar *real_name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
@@ -631,7 +631,7 @@ gimp_edit_named_copy (GimpDrawable *drawable,
gchar *real_name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
@@ -679,7 +679,7 @@ _gimp_edit_named_copy (gint32 drawable_ID,
gchar *real_name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
@@ -728,7 +728,7 @@ gimp_edit_named_copy_visible (GimpImage *image,
gchar *real_name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
@@ -776,7 +776,7 @@ _gimp_edit_named_copy_visible (gint32 image_ID,
gchar *real_name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
@@ -823,7 +823,7 @@ gimp_edit_named_paste (GimpDrawable *drawable,
GimpLayer *floating_sel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_STRING, buffer_name,
G_TYPE_BOOLEAN, paste_into,
G_TYPE_NONE);
@@ -838,7 +838,7 @@ gimp_edit_named_paste (GimpDrawable *drawable,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- floating_sel = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index
(return_vals, 1))));
+ floating_sel = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -871,7 +871,7 @@ _gimp_edit_named_paste (gint32 drawable_ID,
gint32 floating_sel_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_STRING, buffer_name,
G_TYPE_BOOLEAN, paste_into,
G_TYPE_NONE);
@@ -886,7 +886,7 @@ _gimp_edit_named_paste (gint32 drawable_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- floating_sel_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ floating_sel_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -928,7 +928,7 @@ gimp_edit_named_paste_as_new_image (const gchar *buffer_name)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image = gimp_image_get_by_id (gimp_value_get_image_id (gimp_value_array_index (return_vals, 1)));
+ image = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -970,7 +970,7 @@ _gimp_edit_named_paste_as_new_image (const gchar *buffer_name)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image_ID = gimp_value_get_image_id (gimp_value_array_index (return_vals, 1));
+ image_ID = gimp_image_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
diff --git a/libgimp/gimpfileops_pdb.c b/libgimp/gimpfileops_pdb.c
index f47e08c943..284e0d59ca 100644
--- a/libgimp/gimpfileops_pdb.c
+++ b/libgimp/gimpfileops_pdb.c
@@ -78,7 +78,7 @@ gimp_file_load (GimpRunMode run_mode,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image = gimp_image_get_by_id (gimp_value_get_image_id (gimp_value_array_index (return_vals, 1)));
+ image = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -129,7 +129,7 @@ _gimp_file_load (GimpRunMode run_mode,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image_ID = gimp_value_get_image_id (gimp_value_array_index (return_vals, 1));
+ image_ID = gimp_image_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -165,7 +165,7 @@ gimp_file_load_layer (GimpRunMode run_mode,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_RUN_MODE, run_mode,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, filename,
G_TYPE_NONE);
@@ -179,7 +179,7 @@ gimp_file_load_layer (GimpRunMode run_mode,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -215,7 +215,7 @@ _gimp_file_load_layer (GimpRunMode run_mode,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_RUN_MODE, run_mode,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, filename,
G_TYPE_NONE);
@@ -229,7 +229,7 @@ _gimp_file_load_layer (GimpRunMode run_mode,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -269,7 +269,7 @@ gimp_file_load_layers (GimpRunMode run_mode,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_RUN_MODE, run_mode,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, filename,
G_TYPE_NONE);
@@ -327,7 +327,7 @@ _gimp_file_load_layers (GimpRunMode run_mode,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_RUN_MODE, run_mode,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, filename,
G_TYPE_NONE);
@@ -387,8 +387,8 @@ gimp_file_save (GimpRunMode run_mode,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_RUN_MODE, run_mode,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_STRING, filename,
G_TYPE_STRING, raw_filename,
G_TYPE_NONE);
@@ -443,8 +443,8 @@ _gimp_file_save (GimpRunMode run_mode,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_RUN_MODE, run_mode,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_STRING, filename,
G_TYPE_STRING, raw_filename,
G_TYPE_NONE);
@@ -491,7 +491,7 @@ gimp_file_save_thumbnail (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, filename,
G_TYPE_NONE);
@@ -537,7 +537,7 @@ _gimp_file_save_thumbnail (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, filename,
G_TYPE_NONE);
diff --git a/libgimp/gimpfloatingsel_pdb.c b/libgimp/gimpfloatingsel_pdb.c
index e14c58a891..47b45841e8 100644
--- a/libgimp/gimpfloatingsel_pdb.c
+++ b/libgimp/gimpfloatingsel_pdb.c
@@ -55,7 +55,7 @@ gimp_floating_sel_remove (GimpLayer *floating_sel)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (floating_sel)),
+ GIMP_TYPE_LAYER, floating_sel,
G_TYPE_NONE);
if (pdb)
@@ -95,7 +95,7 @@ _gimp_floating_sel_remove (gint32 floating_sel_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, floating_sel_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (floating_sel_ID),
G_TYPE_NONE);
if (pdb)
@@ -136,7 +136,7 @@ gimp_floating_sel_anchor (GimpLayer *floating_sel)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (floating_sel)),
+ GIMP_TYPE_LAYER, floating_sel,
G_TYPE_NONE);
if (pdb)
@@ -177,7 +177,7 @@ _gimp_floating_sel_anchor (gint32 floating_sel_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, floating_sel_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (floating_sel_ID),
G_TYPE_NONE);
if (pdb)
@@ -222,7 +222,7 @@ gimp_floating_sel_to_layer (GimpLayer *floating_sel)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (floating_sel)),
+ GIMP_TYPE_LAYER, floating_sel,
G_TYPE_NONE);
if (pdb)
@@ -267,7 +267,7 @@ _gimp_floating_sel_to_layer (gint32 floating_sel_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, floating_sel_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (floating_sel_ID),
G_TYPE_NONE);
if (pdb)
@@ -308,8 +308,8 @@ gimp_floating_sel_attach (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_LAYER, layer,
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_NONE);
if (pdb)
@@ -350,8 +350,8 @@ _gimp_floating_sel_attach (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_NONE);
if (pdb)
diff --git a/libgimp/gimpgpcompat.c b/libgimp/gimpgpcompat.c
index 6528272325..895849abd3 100644
--- a/libgimp/gimpgpcompat.c
+++ b/libgimp/gimpgpcompat.c
@@ -107,45 +107,45 @@ _gimp_gp_compat_param_spec (GimpPDBArgType arg_type,
break;
case GIMP_PDB_ITEM:
- pspec = gimp_param_spec_item_id (name, nick, blurb,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_item (name, nick, blurb,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case GIMP_PDB_DISPLAY:
- pspec = gimp_param_spec_display_id (name, nick, blurb,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_display (name, nick, blurb,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case GIMP_PDB_IMAGE:
- pspec = gimp_param_spec_image_id (name, nick, blurb,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_image (name, nick, blurb,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case GIMP_PDB_LAYER:
- pspec = gimp_param_spec_layer_id (name, nick, blurb,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_layer (name, nick, blurb,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case GIMP_PDB_CHANNEL:
- pspec = gimp_param_spec_channel_id (name, nick, blurb,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_channel (name, nick, blurb,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case GIMP_PDB_DRAWABLE:
- pspec = gimp_param_spec_drawable_id (name, nick, blurb,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_drawable (name, nick, blurb,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case GIMP_PDB_SELECTION:
- pspec = gimp_param_spec_selection_id (name, nick, blurb,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_selection (name, nick, blurb,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case GIMP_PDB_COLORARRAY:
@@ -154,9 +154,9 @@ _gimp_gp_compat_param_spec (GimpPDBArgType arg_type,
break;
case GIMP_PDB_VECTORS:
- pspec = gimp_param_spec_vectors_id (name, nick, blurb,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_vectors (name, nick, blurb,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case GIMP_PDB_PARASITE:
@@ -221,31 +221,31 @@ _gimp_pdb_arg_type_to_gtype (GimpPDBArgType type)
return GIMP_TYPE_RGB;
case GIMP_PDB_ITEM:
- return GIMP_TYPE_ITEM_ID;
+ return GIMP_TYPE_ITEM;
case GIMP_PDB_DISPLAY:
- return GIMP_TYPE_DISPLAY_ID;
+ return GIMP_TYPE_DISPLAY;
case GIMP_PDB_IMAGE:
- return GIMP_TYPE_IMAGE_ID;
+ return GIMP_TYPE_IMAGE;
case GIMP_PDB_LAYER:
- return GIMP_TYPE_LAYER_ID;
+ return GIMP_TYPE_LAYER;
case GIMP_PDB_CHANNEL:
- return GIMP_TYPE_CHANNEL_ID;
+ return GIMP_TYPE_CHANNEL;
case GIMP_PDB_DRAWABLE:
- return GIMP_TYPE_DRAWABLE_ID;
+ return GIMP_TYPE_DRAWABLE;
case GIMP_PDB_SELECTION:
- return GIMP_TYPE_SELECTION_ID;
+ return GIMP_TYPE_SELECTION;
case GIMP_PDB_COLORARRAY:
return GIMP_TYPE_RGB_ARRAY;
case GIMP_PDB_VECTORS:
- return GIMP_TYPE_VECTORS_ID;
+ return GIMP_TYPE_VECTORS;
case GIMP_PDB_PARASITE:
return GIMP_TYPE_PARASITE;
@@ -297,15 +297,15 @@ _gimp_pdb_gtype_to_arg_type (GType type)
{ GIMP_TYPE_STRING_ARRAY, GIMP_PDB_STRINGARRAY },
{ GIMP_TYPE_RGB_ARRAY, GIMP_PDB_COLORARRAY },
- { GIMP_TYPE_ITEM_ID, GIMP_PDB_ITEM },
- { GIMP_TYPE_DISPLAY_ID, GIMP_PDB_DISPLAY },
- { GIMP_TYPE_IMAGE_ID, GIMP_PDB_IMAGE },
- { GIMP_TYPE_LAYER_ID, GIMP_PDB_LAYER },
- { GIMP_TYPE_CHANNEL_ID, GIMP_PDB_CHANNEL },
- { GIMP_TYPE_DRAWABLE_ID, GIMP_PDB_DRAWABLE },
- { GIMP_TYPE_SELECTION_ID, GIMP_PDB_SELECTION },
- { GIMP_TYPE_LAYER_MASK_ID, GIMP_PDB_CHANNEL },
- { GIMP_TYPE_VECTORS_ID, GIMP_PDB_VECTORS },
+ { GIMP_TYPE_ITEM, GIMP_PDB_ITEM },
+ { GIMP_TYPE_DISPLAY, GIMP_PDB_DISPLAY },
+ { GIMP_TYPE_IMAGE, GIMP_PDB_IMAGE },
+ { GIMP_TYPE_LAYER, GIMP_PDB_LAYER },
+ { GIMP_TYPE_CHANNEL, GIMP_PDB_CHANNEL },
+ { GIMP_TYPE_DRAWABLE, GIMP_PDB_DRAWABLE },
+ { GIMP_TYPE_SELECTION, GIMP_PDB_SELECTION },
+ { GIMP_TYPE_LAYER_MASK, GIMP_PDB_CHANNEL },
+ { GIMP_TYPE_VECTORS, GIMP_PDB_VECTORS },
{ GIMP_TYPE_PARASITE, GIMP_PDB_PARASITE },
diff --git a/libgimp/gimpgpparams-body.c b/libgimp/gimpgpparams-body.c
index d57cca3f1a..62b5829df8 100644
--- a/libgimp/gimpgpparams-body.c
+++ b/libgimp/gimpgpparams-body.c
@@ -131,25 +131,25 @@ _gimp_param_spec_to_gp_param_def (GParamSpec *pspec,
gimp_param_spec_rgb_get_default (pspec,
¶m_def->meta.m_color.default_val);
}
- else if (pspec_type == GIMP_TYPE_PARAM_DISPLAY_ID)
+ else if (pspec_type == GIMP_TYPE_PARAM_IMAGE)
{
- GimpParamSpecDisplayID *ispec = GIMP_PARAM_SPEC_DISPLAY_ID (pspec);
+ GimpParamSpecImage *ispec = GIMP_PARAM_SPEC_IMAGE (pspec);
param_def->param_def_type = GP_PARAM_DEF_TYPE_ID;
param_def->meta.m_id.none_ok = ispec->none_ok;
}
- else if (pspec_type == GIMP_TYPE_PARAM_IMAGE_ID)
+ else if (GIMP_IS_PARAM_SPEC_ITEM (pspec))
{
- GimpParamSpecImageID *ispec = GIMP_PARAM_SPEC_IMAGE_ID (pspec);
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
param_def->param_def_type = GP_PARAM_DEF_TYPE_ID;
param_def->meta.m_id.none_ok = ispec->none_ok;
}
- else if (GIMP_IS_PARAM_SPEC_ITEM_ID (pspec))
+ else if (pspec_type == GIMP_TYPE_PARAM_DISPLAY)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
+ GimpParamSpecDisplay *ispec = GIMP_PARAM_SPEC_DISPLAY (pspec);
param_def->param_def_type = GP_PARAM_DEF_TYPE_ID;
@@ -162,63 +162,39 @@ _gimp_param_spec_to_gp_param_def (GParamSpec *pspec,
param_def->meta.m_param_def.type_name =
(gchar *) g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec));
}
- else if (pspec_type == G_TYPE_PARAM_OBJECT)
- {
- GType value_type = G_PARAM_SPEC_VALUE_TYPE (pspec);
- const gchar *type_name = NULL;
+}
- if (! strcmp (g_type_name (value_type), "GimpDisplay"))
- {
- /* strcmp() because GimpDisplay is not visible from app/plug-in */
- type_name = "GimpParamDisplayID";
- }
- else if (value_type == GIMP_TYPE_IMAGE)
- {
- type_name = "GimpParamImageID";
- }
- else if (value_type == GIMP_TYPE_ITEM)
- {
- type_name = "GimpParamItemID";
- }
- else if (value_type == GIMP_TYPE_DRAWABLE)
- {
- type_name = "GimpParamDrawableID";
- }
- else if (g_type_is_a (value_type, GIMP_TYPE_LAYER))
- {
- /* g_type_is_a() because the core has layer subclasses */
- type_name = "GimpParamLayerID";
- }
- else if (value_type == GIMP_TYPE_CHANNEL)
- {
- type_name = "GimpParamChannelID";
- }
- else if (value_type == GIMP_TYPE_LAYER_MASK)
- {
- type_name = "GimpParamLayerMaskID";
- }
- else if (value_type == GIMP_TYPE_SELECTION)
- {
- type_name = "GimpParamSelectionID";
- }
- else if (value_type == GIMP_TYPE_VECTORS)
- {
- type_name = "GimpParamVectorsID";
- }
+static GimpImage *
+get_image_by_id (gpointer gimp,
+ gint id)
+{
+#ifdef LIBGIMP_COMPILATION
+ return gimp_image_get_by_id (id);
+#else
+ return gimp_image_get_by_id (gimp, id);
+#endif
+}
- if (type_name)
- {
- param_def->param_def_type = GP_PARAM_DEF_TYPE_ID;
- param_def->type_name = (gchar *) type_name;
- param_def->meta.m_id.none_ok = TRUE;
- }
- else
- {
- g_printerr ("%s: GParamSpec is for object type "
- "which has no ID '%s'\n",
- G_STRFUNC, param_def->type_name);
- }
- }
+static GimpItem *
+get_item_by_id (gpointer gimp,
+ gint id)
+{
+#ifdef LIBGIMP_COMPILATION
+ return gimp_item_get_by_id (id);
+#else
+ return gimp_item_get_by_id (gimp, id);
+#endif
+}
+
+static GObject *
+get_display_by_id (gpointer gimp,
+ gint id)
+{
+#ifdef LIBGIMP_COMPILATION
+ return (GObject *) gimp_display_get_by_id (id);
+#else
+ return (GObject *) gimp_get_display_by_id (gimp, id);
+#endif
}
void
@@ -357,17 +333,17 @@ _gimp_gp_param_to_value (gpointer gimp,
param->data.d_array.size /
sizeof (GimpRGB));
}
- else if (GIMP_VALUE_HOLDS_DISPLAY_ID (value) ||
- GIMP_VALUE_HOLDS_IMAGE_ID (value) ||
- GIMP_VALUE_HOLDS_ITEM_ID (value) ||
- GIMP_VALUE_HOLDS_DRAWABLE_ID (value) ||
- GIMP_VALUE_HOLDS_LAYER_ID (value) ||
- GIMP_VALUE_HOLDS_CHANNEL_ID (value) ||
- GIMP_VALUE_HOLDS_LAYER_MASK_ID (value) ||
- GIMP_VALUE_HOLDS_SELECTION_ID (value) ||
- GIMP_VALUE_HOLDS_VECTORS_ID (value))
+ else if (GIMP_VALUE_HOLDS_IMAGE (value))
{
- g_value_set_int (value, param->data.d_int);
+ g_value_set_object (value, get_image_by_id (gimp, param->data.d_int));
+ }
+ else if (GIMP_VALUE_HOLDS_ITEM (value))
+ {
+ g_value_set_object (value, get_item_by_id (gimp, param->data.d_int));
+ }
+ else if (GIMP_VALUE_HOLDS_DISPLAY (value))
+ {
+ g_value_set_object (value, get_display_by_id (gimp, param->data.d_int));
}
else if (G_VALUE_HOLDS_PARAM (value))
{
@@ -611,99 +587,50 @@ _gimp_value_to_gp_param (const GValue *value,
param->data.d_string_array.data = NULL;
}
}
- else if (GIMP_VALUE_HOLDS_DISPLAY_ID (value) ||
- GIMP_VALUE_HOLDS_IMAGE_ID (value) ||
- GIMP_VALUE_HOLDS_ITEM_ID (value) ||
- GIMP_VALUE_HOLDS_DRAWABLE_ID (value) ||
- GIMP_VALUE_HOLDS_LAYER_ID (value) ||
- GIMP_VALUE_HOLDS_CHANNEL_ID (value) ||
- GIMP_VALUE_HOLDS_LAYER_MASK_ID (value) ||
- GIMP_VALUE_HOLDS_SELECTION_ID (value) ||
- GIMP_VALUE_HOLDS_VECTORS_ID (value))
+ else if (GIMP_VALUE_HOLDS_IMAGE (value))
{
+ GimpImage *image = g_value_get_object (value);
+
param->param_type = GP_PARAM_TYPE_INT;
- param->data.d_int = g_value_get_int (value);
+ param->data.d_int = image ? gimp_image_get_id (image) : -1;
}
- else if (G_VALUE_HOLDS_PARAM (value))
+ else if (GIMP_VALUE_HOLDS_ITEM (value))
{
- param->param_type = GP_PARAM_TYPE_PARAM_DEF;
+ GimpItem *item = g_value_get_object (value);
- _gimp_param_spec_to_gp_param_def (g_value_get_param (value),
- ¶m->data.d_param_def);
+ param->param_type = GP_PARAM_TYPE_INT;
+
+ param->data.d_int = item ? gimp_item_get_id (item) : -1;
}
- else if (G_VALUE_HOLDS_OBJECT (value))
+ else if (GIMP_VALUE_HOLDS_DISPLAY (value))
{
- const gchar *type_name = NULL;
+ GObject *display = g_value_get_object (value);
+ gint id = -1;
- if (! strcmp (g_type_name (type), "GimpDisplay"))
- {
- /* strcmp() because GimpDisplay is not visible from app/plug-in */
- type_name = "GimpDisplayID";
- }
- else if (type == GIMP_TYPE_IMAGE)
- {
- type_name = "GimpImageID";
- }
- else if (type == GIMP_TYPE_ITEM)
- {
- type_name = "GimpItemID";
- }
- else if (type == GIMP_TYPE_DRAWABLE)
- {
- type_name = "GimpDrawableID";
- }
- else if (g_type_is_a (type, GIMP_TYPE_LAYER))
- {
- /* g_type_is_a() because the core has layer subclasses */
- type_name = "GimpLayerID";
- }
- else if (type == GIMP_TYPE_CHANNEL)
- {
- type_name = "GimpChannelID";
- }
- else if (type == GIMP_TYPE_LAYER_MASK)
- {
- type_name = "GimpLayerMaskID";
- }
- else if (type == GIMP_TYPE_SELECTION)
- {
- type_name = "GimpSelectionID";
- }
- else if (type == GIMP_TYPE_VECTORS)
+#if 0
+ if (full_copy)
{
- type_name = "GimpVectorsID";
+ g_free (param->type_name);
+ param->type_name = "GObject";
}
+ else
+ param->type_name = (gchar *) "GObject";
+#endif
- if (type_name)
- {
- GObject *object = g_value_get_object (value);
- gint id = -1;
-
- if (object)
- g_object_get (object, "id", &id, NULL);
+ param->param_type = GP_PARAM_TYPE_INT;
- param->param_type = GP_PARAM_TYPE_INT;
+ if (display)
+ g_object_get (display, "id", &id, NULL);
- if (full_copy)
- {
- g_free (param->type_name);
- param->type_name = g_strdup (type_name);
- }
- else
- {
- param->type_name = (gchar *) type_name;
- }
+ param->data.d_int = id;
+ }
+ else if (G_VALUE_HOLDS_PARAM (value))
+ {
+ param->param_type = GP_PARAM_TYPE_PARAM_DEF;
- param->data.d_int = id;
- }
- else
- {
- g_printerr ("%s: GValue contains unsupported object type "
- "which has no ID '%s'\n",
- G_STRFUNC, param->type_name);
- return;
- }
+ _gimp_param_spec_to_gp_param_def (g_value_get_param (value),
+ ¶m->data.d_param_def);
}
if (param->param_type == -1)
diff --git a/libgimp/gimpgpparams.c b/libgimp/gimpgpparams.c
index a7bfd1daaf..cb39e1f70d 100644
--- a/libgimp/gimpgpparams.c
+++ b/libgimp/gimpgpparams.c
@@ -37,7 +37,9 @@
/* include the implementation, they are shared between app/ and
* libgimp/ but need different headers.
*/
+#define LIBGIMP_COMPILATION
#include "gimpgpparams-body.c"
+#undef LIBGIMP_COMPILATION
GParamSpec *
_gimp_gp_param_def_to_param_spec (gpointer gimp,
@@ -153,50 +155,50 @@ _gimp_gp_param_def_to_param_spec (gpointer gimp,
flags);
case GP_PARAM_DEF_TYPE_ID:
- if (! strcmp (param_def->type_name, "GimpParamDisplayID"))
- return gimp_param_spec_display_id (name, nick, blurb,
- param_def->meta.m_id.none_ok,
- flags);
-
- if (! strcmp (param_def->type_name, "GimpParamImageID"))
- return gimp_param_spec_image_id (name, nick, blurb,
- param_def->meta.m_id.none_ok,
- flags);
-
- if (! strcmp (param_def->type_name, "GimpParamItemID"))
- return gimp_param_spec_item_id (name, nick, blurb,
+ if (! strcmp (param_def->type_name, "GimpParamDisplay"))
+ return gimp_param_spec_display (name, nick, blurb,
param_def->meta.m_id.none_ok,
flags);
- if (! strcmp (param_def->type_name, "GimpParamDrawableID"))
- return gimp_param_spec_drawable_id (name, nick, blurb,
- param_def->meta.m_id.none_ok,
- flags);
+ if (! strcmp (param_def->type_name, "GimpParamImage"))
+ return gimp_param_spec_image (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
+
+ if (! strcmp (param_def->type_name, "GimpParamItem"))
+ return gimp_param_spec_item (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
- if (! strcmp (param_def->type_name, "GimpParamLayerID"))
- return gimp_param_spec_layer_id (name, nick, blurb,
+ if (! strcmp (param_def->type_name, "GimpParamDrawable"))
+ return gimp_param_spec_drawable (name, nick, blurb,
param_def->meta.m_id.none_ok,
flags);
- if (! strcmp (param_def->type_name, "GimpParamChannelID"))
- return gimp_param_spec_channel_id (name, nick, blurb,
- param_def->meta.m_id.none_ok,
- flags);
-
- if (! strcmp (param_def->type_name, "GimpParamLayerMaskID"))
- return gimp_param_spec_layer_mask_id (name, nick, blurb,
- param_def->meta.m_id.none_ok,
- flags);
+ if (! strcmp (param_def->type_name, "GimpParamLayer"))
+ return gimp_param_spec_layer (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
- if (! strcmp (param_def->type_name, "GimpParamSelectionID"))
- return gimp_param_spec_selection_id (name, nick, blurb,
- param_def->meta.m_id.none_ok,
- flags);
+ if (! strcmp (param_def->type_name, "GimpParamChannel"))
+ return gimp_param_spec_channel (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
- if (! strcmp (param_def->type_name, "GimpParamVectorsID"))
- return gimp_param_spec_vectors_id (name, nick, blurb,
+ if (! strcmp (param_def->type_name, "GimpParamLayerMask"))
+ return gimp_param_spec_layer_mask (name, nick, blurb,
param_def->meta.m_id.none_ok,
flags);
+
+ if (! strcmp (param_def->type_name, "GimpParamSelection"))
+ return gimp_param_spec_selection (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
+
+ if (! strcmp (param_def->type_name, "GimpParamVectors"))
+ return gimp_param_spec_vectors (name, nick, blurb,
+ param_def->meta.m_id.none_ok,
+ flags);
break;
case GP_PARAM_DEF_TYPE_PARAM_DEF:
diff --git a/libgimp/gimpimage.c b/libgimp/gimpimage.c
index 8898cce1f9..c5020d5aea 100644
--- a/libgimp/gimpimage.c
+++ b/libgimp/gimpimage.c
@@ -167,6 +167,25 @@ gimp_image_get_by_id (gint32 image_id)
return NULL;
}
+/**
+ * gimp_image_is_valid:
+ * @image: The image to check.
+ *
+ * Returns TRUE if the image is valid.
+ *
+ * This procedure checks if the given image is valid and refers to
+ * an existing image.
+ *
+ * Returns: Whether the image is valid.
+ *
+ * Since: 2.4
+ **/
+gboolean
+gimp_image_is_valid (GimpImage *image)
+{
+ return gimp_image_id_is_valid (gimp_image_get_id (image));
+}
+
/**
* gimp_get_images:
* @num_images: (out): The number of images in the returned array.
diff --git a/libgimp/gimpimage.h b/libgimp/gimpimage.h
index 2e915cc634..f5fbc7d824 100644
--- a/libgimp/gimpimage.h
+++ b/libgimp/gimpimage.h
@@ -69,6 +69,8 @@ GType gimp_image_get_type (void) G_GNUC_CONST;
gint32 gimp_image_get_id (GimpImage *image);
GimpImage * gimp_image_get_by_id (gint32 image_id);
+gboolean gimp_image_is_valid (GimpImage *image);
+
GimpImage ** gimp_get_images (gint *num_images);
GList * gimp_list_images (void);
diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c
index 0d9a2bd8ad..f55c64d755 100644
--- a/libgimp/gimpimage_pdb.c
+++ b/libgimp/gimpimage_pdb.c
@@ -36,62 +36,20 @@
/**
- * gimp_image_is_valid:
- * @image: The image to check.
+ * gimp_image_id_is_valid:
+ * @image_id: The image ID to check.
*
- * Returns TRUE if the image is valid.
+ * Returns TRUE if the image ID is valid.
*
- * This procedure checks if the given image is valid and refers to an
- * existing image.
+ * This procedure checks if the given image ID is valid and refers to
+ * an existing image.
*
- * Returns: Whether the image is valid.
+ * Returns: Whether the image ID is valid.
*
- * Since: 2.4
- **/
-gboolean
-gimp_image_is_valid (GimpImage *image)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- gboolean valid = FALSE;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-image-is-valid",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-image-is-valid",
- args);
- gimp_value_array_unref (args);
-
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- valid = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
-
- gimp_value_array_unref (return_vals);
-
- return valid;
-}
-
-/**
- * _gimp_image_is_valid: (skip)
- * @image_ID: The image to check.
- *
- * Returns TRUE if the image is valid.
- *
- * This procedure checks if the given image is valid and refers to an
- * existing image.
- *
- * Returns: Whether the image is valid.
- *
- * Since: 2.4
+ * Since: 3.0
**/
gboolean
-_gimp_image_is_valid (gint32 image_ID)
+gimp_image_id_is_valid (gint image_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
@@ -99,15 +57,15 @@ _gimp_image_is_valid (gint32 image_ID)
gboolean valid = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ G_TYPE_INT, image_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-image-is-valid",
+ "gimp-image-id-is-valid",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-image-is-valid",
+ return_vals = gimp_run_procedure_array ("gimp-image-id-is-valid",
args);
gimp_value_array_unref (args);
@@ -211,7 +169,7 @@ gimp_image_new (gint width,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image = gimp_image_get_by_id (gimp_value_get_image_id (gimp_value_array_index (return_vals, 1)));
+ image = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -265,7 +223,7 @@ _gimp_image_new (gint width,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image_ID = gimp_value_get_image_id (gimp_value_array_index (return_vals, 1));
+ image_ID = gimp_image_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -319,7 +277,7 @@ gimp_image_new_with_precision (gint width,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image = gimp_image_get_by_id (gimp_value_get_image_id (gimp_value_array_index (return_vals, 1)));
+ image = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -373,7 +331,7 @@ _gimp_image_new_with_precision (gint width,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image_ID = gimp_value_get_image_id (gimp_value_array_index (return_vals, 1));
+ image_ID = gimp_image_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -400,7 +358,7 @@ gimp_image_duplicate (GimpImage *image)
GimpImage *new_image = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -413,7 +371,7 @@ gimp_image_duplicate (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- new_image = gimp_image_get_by_id (gimp_value_get_image_id (gimp_value_array_index (return_vals, 1)));
+ new_image = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -440,7 +398,7 @@ _gimp_image_duplicate (gint32 image_ID)
gint32 new_image_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -453,7 +411,7 @@ _gimp_image_duplicate (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- new_image_ID = gimp_value_get_image_id (gimp_value_array_index (return_vals, 1));
+ new_image_ID = gimp_image_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -484,7 +442,7 @@ gimp_image_delete (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -527,7 +485,7 @@ _gimp_image_delete (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -566,7 +524,7 @@ gimp_image_base_type (GimpImage *image)
GimpImageBaseType base_type = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -606,7 +564,7 @@ _gimp_image_base_type (gint32 image_ID)
GimpImageBaseType base_type = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -647,7 +605,7 @@ gimp_image_get_precision (GimpImage *image)
GimpPrecision precision = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -688,7 +646,7 @@ _gimp_image_get_precision (gint32 image_ID)
GimpPrecision precision = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -729,7 +687,7 @@ gimp_image_get_default_new_layer_mode (GimpImage *image)
GimpLayerMode mode = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -770,7 +728,7 @@ _gimp_image_get_default_new_layer_mode (gint32 image_ID)
GimpLayerMode mode = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -810,7 +768,7 @@ gimp_image_width (GimpImage *image)
gint width = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -850,7 +808,7 @@ _gimp_image_width (gint32 image_ID)
gint width = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -890,7 +848,7 @@ gimp_image_height (GimpImage *image)
gint height = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -930,7 +888,7 @@ _gimp_image_height (gint32 image_ID)
gint height = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -974,7 +932,7 @@ _gimp_image_get_layers (GimpImage *image,
gint *layer_ids = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1026,7 +984,7 @@ _gimp_image_get_channels (GimpImage *image,
gint *channel_ids = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1077,7 +1035,7 @@ _gimp_image_get_vectors (GimpImage *image,
gint *vector_ids = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1126,7 +1084,7 @@ gimp_image_get_active_drawable (GimpImage *image)
GimpDrawable *drawable = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1139,7 +1097,7 @@ gimp_image_get_active_drawable (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- drawable = GIMP_DRAWABLE (gimp_item_get_by_id (gimp_value_get_drawable_id (gimp_value_array_index
(return_vals, 1))));
+ drawable = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1170,7 +1128,7 @@ _gimp_image_get_active_drawable (gint32 image_ID)
gint32 drawable_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -1183,7 +1141,7 @@ _gimp_image_get_active_drawable (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- drawable_ID = gimp_value_get_drawable_id (gimp_value_array_index (return_vals, 1));
+ drawable_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1212,7 +1170,7 @@ gimp_image_unset_active_channel (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1253,7 +1211,7 @@ _gimp_image_unset_active_channel (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -1292,7 +1250,7 @@ gimp_image_get_floating_sel (GimpImage *image)
GimpLayer *floating_sel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1305,7 +1263,7 @@ gimp_image_get_floating_sel (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- floating_sel = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index
(return_vals, 1))));
+ floating_sel = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1332,7 +1290,7 @@ _gimp_image_get_floating_sel (gint32 image_ID)
gint32 floating_sel_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -1345,7 +1303,7 @@ _gimp_image_get_floating_sel (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- floating_sel_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ floating_sel_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1374,7 +1332,7 @@ gimp_image_floating_sel_attached_to (GimpImage *image)
GimpDrawable *drawable = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1387,7 +1345,7 @@ gimp_image_floating_sel_attached_to (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- drawable = GIMP_DRAWABLE (gimp_item_get_by_id (gimp_value_get_drawable_id (gimp_value_array_index
(return_vals, 1))));
+ drawable = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1415,7 +1373,7 @@ _gimp_image_floating_sel_attached_to (gint32 image_ID)
gint32 drawable_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -1428,7 +1386,7 @@ _gimp_image_floating_sel_attached_to (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- drawable_ID = gimp_value_get_drawable_id (gimp_value_array_index (return_vals, 1));
+ drawable_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1478,8 +1436,8 @@ gimp_image_pick_color (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
G_TYPE_BOOLEAN, sample_merged,
@@ -1549,8 +1507,8 @@ _gimp_image_pick_color (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
G_TYPE_BOOLEAN, sample_merged,
@@ -1604,7 +1562,7 @@ gimp_image_pick_correlate_layer (GimpImage *image,
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, x,
G_TYPE_INT, y,
G_TYPE_NONE);
@@ -1619,7 +1577,7 @@ gimp_image_pick_correlate_layer (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1653,7 +1611,7 @@ _gimp_image_pick_correlate_layer (gint32 image_ID,
gint32 layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, x,
G_TYPE_INT, y,
G_TYPE_NONE);
@@ -1668,7 +1626,7 @@ _gimp_image_pick_correlate_layer (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1710,9 +1668,9 @@ gimp_image_insert_layer (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (parent)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_LAYER, layer,
+ GIMP_TYPE_LAYER, parent,
G_TYPE_INT, position,
G_TYPE_NONE);
@@ -1767,9 +1725,9 @@ _gimp_image_insert_layer (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_LAYER_ID, layer_ID,
- GIMP_TYPE_LAYER_ID, parent_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (parent_ID),
G_TYPE_INT, position,
G_TYPE_NONE);
@@ -1814,8 +1772,8 @@ gimp_image_remove_layer (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1859,8 +1817,8 @@ _gimp_image_remove_layer (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1906,7 +1864,7 @@ gimp_image_freeze_layers (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1952,7 +1910,7 @@ _gimp_image_freeze_layers (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -1996,7 +1954,7 @@ gimp_image_thaw_layers (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -2040,7 +1998,7 @@ _gimp_image_thaw_layers (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -2089,9 +2047,9 @@ gimp_image_insert_channel (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel)),
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (parent)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_CHANNEL, channel,
+ GIMP_TYPE_CHANNEL, parent,
G_TYPE_INT, position,
G_TYPE_NONE);
@@ -2141,9 +2099,9 @@ _gimp_image_insert_channel (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_CHANNEL_ID, channel_ID,
- GIMP_TYPE_CHANNEL_ID, parent_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel_ID),
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (parent_ID),
G_TYPE_INT, position,
G_TYPE_NONE);
@@ -2185,8 +2143,8 @@ gimp_image_remove_channel (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM (channel)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_CHANNEL, channel,
G_TYPE_NONE);
if (pdb)
@@ -2227,8 +2185,8 @@ _gimp_image_remove_channel (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_CHANNEL_ID, channel_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (channel_ID),
G_TYPE_NONE);
if (pdb)
@@ -2275,7 +2233,7 @@ gimp_image_freeze_channels (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -2322,7 +2280,7 @@ _gimp_image_freeze_channels (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -2366,7 +2324,7 @@ gimp_image_thaw_channels (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -2410,7 +2368,7 @@ _gimp_image_thaw_channels (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -2459,9 +2417,9 @@ gimp_image_insert_vectors (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (parent)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_VECTORS, vectors,
+ GIMP_TYPE_VECTORS, parent,
G_TYPE_INT, position,
G_TYPE_NONE);
@@ -2511,9 +2469,9 @@ _gimp_image_insert_vectors (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
- GIMP_TYPE_VECTORS_ID, parent_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (parent_ID),
G_TYPE_INT, position,
G_TYPE_NONE);
@@ -2557,8 +2515,8 @@ gimp_image_remove_vectors (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_NONE);
if (pdb)
@@ -2601,8 +2559,8 @@ _gimp_image_remove_vectors (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_NONE);
if (pdb)
@@ -2649,7 +2607,7 @@ gimp_image_freeze_vectors (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -2696,7 +2654,7 @@ _gimp_image_freeze_vectors (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -2740,7 +2698,7 @@ gimp_image_thaw_vectors (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -2784,7 +2742,7 @@ _gimp_image_thaw_vectors (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -2829,8 +2787,8 @@ gimp_image_get_item_position (GimpImage *image,
gint position = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -2876,8 +2834,8 @@ _gimp_image_get_item_position (gint32 image_ID,
gint position = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -2921,8 +2879,8 @@ gimp_image_raise_item (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -2965,8 +2923,8 @@ _gimp_image_raise_item (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -3009,8 +2967,8 @@ gimp_image_lower_item (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -3053,8 +3011,8 @@ _gimp_image_lower_item (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -3097,8 +3055,8 @@ gimp_image_raise_item_to_top (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -3141,8 +3099,8 @@ _gimp_image_raise_item_to_top (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -3186,8 +3144,8 @@ gimp_image_lower_item_to_bottom (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -3231,8 +3189,8 @@ _gimp_image_lower_item_to_bottom (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -3278,9 +3236,9 @@ gimp_image_reorder_item (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (parent)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_ITEM, item,
+ GIMP_TYPE_ITEM, parent,
G_TYPE_INT, position,
G_TYPE_NONE);
@@ -3327,9 +3285,9 @@ _gimp_image_reorder_item (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_ITEM_ID, item_ID,
- GIMP_TYPE_ITEM_ID, parent_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (parent_ID),
G_TYPE_INT, position,
G_TYPE_NONE);
@@ -3371,7 +3329,7 @@ gimp_image_flatten (GimpImage *image)
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -3384,7 +3342,7 @@ gimp_image_flatten (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -3413,7 +3371,7 @@ _gimp_image_flatten (gint32 image_ID)
gint32 layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -3426,7 +3384,7 @@ _gimp_image_flatten (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -3459,7 +3417,7 @@ gimp_image_merge_visible_layers (GimpImage *image,
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_MERGE_TYPE, merge_type,
G_TYPE_NONE);
@@ -3473,7 +3431,7 @@ gimp_image_merge_visible_layers (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -3506,7 +3464,7 @@ _gimp_image_merge_visible_layers (gint32 image_ID,
gint32 layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_MERGE_TYPE, merge_type,
G_TYPE_NONE);
@@ -3520,7 +3478,7 @@ _gimp_image_merge_visible_layers (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -3556,8 +3514,8 @@ gimp_image_merge_down (GimpImage *image,
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (merge_layer)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_LAYER, merge_layer,
GIMP_TYPE_MERGE_TYPE, merge_type,
G_TYPE_NONE);
@@ -3571,7 +3529,7 @@ gimp_image_merge_down (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -3607,8 +3565,8 @@ _gimp_image_merge_down (gint32 image_ID,
gint32 layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_LAYER_ID, merge_layer_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (merge_layer_ID),
GIMP_TYPE_MERGE_TYPE, merge_type,
G_TYPE_NONE);
@@ -3622,7 +3580,7 @@ _gimp_image_merge_down (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -3656,7 +3614,7 @@ _gimp_image_get_colormap (GimpImage *image,
guint8 *colormap = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -3708,7 +3666,7 @@ _gimp_image_set_colormap (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, num_bytes,
GIMP_TYPE_UINT8_ARRAY, NULL,
G_TYPE_NONE);
@@ -3750,7 +3708,7 @@ _gimp_image_get_metadata (GimpImage *image)
gchar *metadata_string = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -3791,7 +3749,7 @@ _gimp_image_set_metadata (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, metadata_string,
G_TYPE_NONE);
@@ -3835,7 +3793,7 @@ gimp_image_clean_all (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -3878,7 +3836,7 @@ _gimp_image_clean_all (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -3919,7 +3877,7 @@ gimp_image_is_dirty (GimpImage *image)
gboolean dirty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -3961,7 +3919,7 @@ _gimp_image_is_dirty (gint32 image_ID)
gboolean dirty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -4017,7 +3975,7 @@ _gimp_image_thumbnail (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, width,
G_TYPE_INT, height,
G_TYPE_NONE);
@@ -4074,7 +4032,7 @@ gimp_image_get_active_layer (GimpImage *image)
GimpLayer *active_layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -4087,7 +4045,7 @@ gimp_image_get_active_layer (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- active_layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index
(return_vals, 1))));
+ active_layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -4115,7 +4073,7 @@ _gimp_image_get_active_layer (gint32 image_ID)
gint32 active_layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -4128,7 +4086,7 @@ _gimp_image_get_active_layer (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- active_layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ active_layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -4159,8 +4117,8 @@ gimp_image_set_active_layer (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (active_layer)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_LAYER, active_layer,
G_TYPE_NONE);
if (pdb)
@@ -4203,8 +4161,8 @@ _gimp_image_set_active_layer (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_LAYER_ID, active_layer_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (active_layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -4243,7 +4201,7 @@ gimp_image_get_active_channel (GimpImage *image)
GimpChannel *active_channel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -4256,7 +4214,7 @@ gimp_image_get_active_channel (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- active_channel = GIMP_CHANNEL (gimp_item_get_by_id (gimp_value_get_channel_id (gimp_value_array_index
(return_vals, 1))));
+ active_channel = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -4283,7 +4241,7 @@ _gimp_image_get_active_channel (gint32 image_ID)
gint32 active_channel_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -4296,7 +4254,7 @@ _gimp_image_get_active_channel (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- active_channel_ID = gimp_value_get_channel_id (gimp_value_array_index (return_vals, 1));
+ active_channel_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -4327,8 +4285,8 @@ gimp_image_set_active_channel (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_CHANNEL_ID, gimp_item_get_id (GIMP_ITEM
(active_channel)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_CHANNEL, active_channel,
G_TYPE_NONE);
if (pdb)
@@ -4371,8 +4329,8 @@ _gimp_image_set_active_channel (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_CHANNEL_ID, active_channel_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_CHANNEL, gimp_item_get_by_id (active_channel_ID),
G_TYPE_NONE);
if (pdb)
@@ -4410,7 +4368,7 @@ gimp_image_get_active_vectors (GimpImage *image)
GimpVectors *active_vectors = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -4423,7 +4381,7 @@ gimp_image_get_active_vectors (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- active_vectors = GIMP_VECTORS (gimp_item_get_by_id (gimp_value_get_vectors_id (gimp_value_array_index
(return_vals, 1))));
+ active_vectors = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -4449,7 +4407,7 @@ _gimp_image_get_active_vectors (gint32 image_ID)
gint32 active_vectors_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -4462,7 +4420,7 @@ _gimp_image_get_active_vectors (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- active_vectors_ID = gimp_value_get_vectors_id (gimp_value_array_index (return_vals, 1));
+ active_vectors_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -4490,8 +4448,8 @@ gimp_image_set_active_vectors (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM
(active_vectors)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_VECTORS, active_vectors,
G_TYPE_NONE);
if (pdb)
@@ -4531,8 +4489,8 @@ _gimp_image_set_active_vectors (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_VECTORS_ID, active_vectors_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (active_vectors_ID),
G_TYPE_NONE);
if (pdb)
@@ -4571,7 +4529,7 @@ gimp_image_get_selection (GimpImage *image)
GimpSelection *selection = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -4584,7 +4542,7 @@ gimp_image_get_selection (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- selection = GIMP_SELECTION (gimp_item_get_by_id (gimp_value_get_selection_id (gimp_value_array_index
(return_vals, 1))));
+ selection = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -4611,7 +4569,7 @@ _gimp_image_get_selection (gint32 image_ID)
gint32 selection_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -4624,7 +4582,7 @@ _gimp_image_get_selection (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- selection_ID = gimp_value_get_selection_id (gimp_value_array_index (return_vals, 1));
+ selection_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -4655,7 +4613,7 @@ gimp_image_get_component_active (GimpImage *image,
gboolean active = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_NONE);
@@ -4700,7 +4658,7 @@ _gimp_image_get_component_active (gint32 image_ID,
gboolean active = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_NONE);
@@ -4747,7 +4705,7 @@ gimp_image_set_component_active (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_BOOLEAN, active,
G_TYPE_NONE);
@@ -4794,7 +4752,7 @@ _gimp_image_set_component_active (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_BOOLEAN, active,
G_TYPE_NONE);
@@ -4840,7 +4798,7 @@ gimp_image_get_component_visible (GimpImage *image,
gboolean visible = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_NONE);
@@ -4886,7 +4844,7 @@ _gimp_image_get_component_visible (gint32 image_ID,
gboolean visible = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_NONE);
@@ -4933,7 +4891,7 @@ gimp_image_set_component_visible (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_BOOLEAN, visible,
G_TYPE_NONE);
@@ -4980,7 +4938,7 @@ _gimp_image_set_component_visible (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_BOOLEAN, visible,
G_TYPE_NONE);
@@ -5025,7 +4983,7 @@ gimp_image_get_filename (GimpImage *image)
gchar *filename = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -5069,7 +5027,7 @@ _gimp_image_get_filename (gint32 image_ID)
gchar *filename = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -5111,7 +5069,7 @@ gimp_image_set_filename (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, filename,
G_TYPE_NONE);
@@ -5153,7 +5111,7 @@ _gimp_image_set_filename (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, filename,
G_TYPE_NONE);
@@ -5201,7 +5159,7 @@ gimp_image_get_uri (GimpImage *image)
gchar *uri = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -5249,7 +5207,7 @@ _gimp_image_get_uri (gint32 image_ID)
gchar *uri = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -5292,7 +5250,7 @@ gimp_image_get_xcf_uri (GimpImage *image)
gchar *uri = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -5335,7 +5293,7 @@ _gimp_image_get_xcf_uri (gint32 image_ID)
gchar *uri = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -5380,7 +5338,7 @@ gimp_image_get_imported_uri (GimpImage *image)
gchar *uri = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -5425,7 +5383,7 @@ _gimp_image_get_imported_uri (gint32 image_ID)
gchar *uri = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -5469,7 +5427,7 @@ gimp_image_get_exported_uri (GimpImage *image)
gchar *uri = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -5513,7 +5471,7 @@ _gimp_image_get_exported_uri (gint32 image_ID)
gchar *uri = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -5559,7 +5517,7 @@ gimp_image_get_name (GimpImage *image)
gchar *name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -5605,7 +5563,7 @@ _gimp_image_get_name (gint32 image_ID)
gchar *name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -5649,7 +5607,7 @@ gimp_image_get_resolution (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -5701,7 +5659,7 @@ _gimp_image_get_resolution (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -5754,7 +5712,7 @@ gimp_image_set_resolution (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_DOUBLE, xresolution,
G_TYPE_DOUBLE, yresolution,
G_TYPE_NONE);
@@ -5800,7 +5758,7 @@ _gimp_image_set_resolution (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_DOUBLE, xresolution,
G_TYPE_DOUBLE, yresolution,
G_TYPE_NONE);
@@ -5843,7 +5801,7 @@ gimp_image_get_unit (GimpImage *image)
GimpUnit unit = GIMP_UNIT_PIXEL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -5885,7 +5843,7 @@ _gimp_image_get_unit (gint32 image_ID)
GimpUnit unit = GIMP_UNIT_PIXEL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -5930,7 +5888,7 @@ gimp_image_set_unit (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_UNIT, unit,
G_TYPE_NONE);
@@ -5975,7 +5933,7 @@ _gimp_image_set_unit (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_UNIT, unit,
G_TYPE_NONE);
@@ -6016,7 +5974,7 @@ gimp_image_get_tattoo_state (GimpImage *image)
guint tattoo_state = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -6057,7 +6015,7 @@ _gimp_image_get_tattoo_state (gint32 image_ID)
guint tattoo_state = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -6109,7 +6067,7 @@ gimp_image_set_tattoo_state (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, tattoo_state,
G_TYPE_NONE);
@@ -6161,7 +6119,7 @@ _gimp_image_set_tattoo_state (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, tattoo_state,
G_TYPE_NONE);
@@ -6203,7 +6161,7 @@ gimp_image_get_layer_by_tattoo (GimpImage *image,
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, tattoo,
G_TYPE_NONE);
@@ -6217,7 +6175,7 @@ gimp_image_get_layer_by_tattoo (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -6246,7 +6204,7 @@ _gimp_image_get_layer_by_tattoo (gint32 image_ID,
gint32 layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, tattoo,
G_TYPE_NONE);
@@ -6260,7 +6218,7 @@ _gimp_image_get_layer_by_tattoo (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -6289,7 +6247,7 @@ gimp_image_get_channel_by_tattoo (GimpImage *image,
GimpChannel *channel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, tattoo,
G_TYPE_NONE);
@@ -6303,7 +6261,7 @@ gimp_image_get_channel_by_tattoo (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel = GIMP_CHANNEL (gimp_item_get_by_id (gimp_value_get_channel_id (gimp_value_array_index
(return_vals, 1))));
+ channel = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -6332,7 +6290,7 @@ _gimp_image_get_channel_by_tattoo (gint32 image_ID,
gint32 channel_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, tattoo,
G_TYPE_NONE);
@@ -6346,7 +6304,7 @@ _gimp_image_get_channel_by_tattoo (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel_ID = gimp_value_get_channel_id (gimp_value_array_index (return_vals, 1));
+ channel_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -6377,7 +6335,7 @@ gimp_image_get_vectors_by_tattoo (GimpImage *image,
GimpVectors *vectors = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, tattoo,
G_TYPE_NONE);
@@ -6391,7 +6349,7 @@ gimp_image_get_vectors_by_tattoo (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors = GIMP_VECTORS (gimp_item_get_by_id (gimp_value_get_vectors_id (gimp_value_array_index
(return_vals, 1))));
+ vectors = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -6422,7 +6380,7 @@ _gimp_image_get_vectors_by_tattoo (gint32 image_ID,
gint32 vectors_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, tattoo,
G_TYPE_NONE);
@@ -6436,7 +6394,7 @@ _gimp_image_get_vectors_by_tattoo (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors_ID = gimp_value_get_vectors_id (gimp_value_array_index (return_vals, 1));
+ vectors_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -6467,7 +6425,7 @@ gimp_image_get_layer_by_name (GimpImage *image,
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -6481,7 +6439,7 @@ gimp_image_get_layer_by_name (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -6512,7 +6470,7 @@ _gimp_image_get_layer_by_name (gint32 image_ID,
gint32 layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -6526,7 +6484,7 @@ _gimp_image_get_layer_by_name (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -6557,7 +6515,7 @@ gimp_image_get_channel_by_name (GimpImage *image,
GimpChannel *channel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -6571,7 +6529,7 @@ gimp_image_get_channel_by_name (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel = GIMP_CHANNEL (gimp_item_get_by_id (gimp_value_get_channel_id (gimp_value_array_index
(return_vals, 1))));
+ channel = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -6602,7 +6560,7 @@ _gimp_image_get_channel_by_name (gint32 image_ID,
gint32 channel_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -6616,7 +6574,7 @@ _gimp_image_get_channel_by_name (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel_ID = gimp_value_get_channel_id (gimp_value_array_index (return_vals, 1));
+ channel_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -6647,7 +6605,7 @@ gimp_image_get_vectors_by_name (GimpImage *image,
GimpVectors *vectors = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -6661,7 +6619,7 @@ gimp_image_get_vectors_by_name (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors = GIMP_VECTORS (gimp_item_get_by_id (gimp_value_get_vectors_id (gimp_value_array_index
(return_vals, 1))));
+ vectors = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -6692,7 +6650,7 @@ _gimp_image_get_vectors_by_name (gint32 image_ID,
gint32 vectors_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -6706,7 +6664,7 @@ _gimp_image_get_vectors_by_name (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors_ID = gimp_value_get_vectors_id (gimp_value_array_index (return_vals, 1));
+ vectors_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -6737,7 +6695,7 @@ gimp_image_attach_parasite (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_PARASITE, parasite,
G_TYPE_NONE);
@@ -6781,7 +6739,7 @@ _gimp_image_attach_parasite (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_PARASITE, parasite,
G_TYPE_NONE);
@@ -6825,7 +6783,7 @@ gimp_image_detach_parasite (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -6869,7 +6827,7 @@ _gimp_image_detach_parasite (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -6913,7 +6871,7 @@ gimp_image_get_parasite (GimpImage *image,
GimpParasite *parasite = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -6958,7 +6916,7 @@ _gimp_image_get_parasite (gint32 image_ID,
GimpParasite *parasite = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -7004,7 +6962,7 @@ gimp_image_get_parasite_list (GimpImage *image,
gchar **parasites = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -7054,7 +7012,7 @@ _gimp_image_get_parasite_list (gint32 image_ID,
gchar **parasites = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
diff --git a/libgimp/gimpimage_pdb.h b/libgimp/gimpimage_pdb.h
index 6c4eef584c..bba1c4928c 100644
--- a/libgimp/gimpimage_pdb.h
+++ b/libgimp/gimpimage_pdb.h
@@ -32,11 +32,11 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-G_GNUC_INTERNAL gint* _gimp_image_list (gint *num_images);
+gboolean gimp_image_id_is_valid (gint image_id);
+G_GNUC_INTERNAL gint* _gimp_image_list (gint *num_images);
#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
-gboolean gimp_image_is_valid (GimpImage *image);
GimpImage* gimp_image_new (gint width,
gint height,
GimpImageBaseType type);
@@ -197,7 +197,6 @@ gchar** gimp_image_get_parasite_list (GimpImage
#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
-#define gimp_image_is_valid _gimp_image_is_valid
#define gimp_image_new _gimp_image_new
#define gimp_image_new_with_precision _gimp_image_new_with_precision
#define gimp_image_duplicate _gimp_image_duplicate
@@ -278,7 +277,6 @@ gchar** gimp_image_get_parasite_list (GimpImage
* They are not marked internal as a trick to keep the old API alive for now.
*/
-gboolean _gimp_image_is_valid (gint32 image_ID);
gint32 _gimp_image_new (gint width,
gint height,
GimpImageBaseType type);
diff --git a/libgimp/gimpimagecolorprofile_pdb.c b/libgimp/gimpimagecolorprofile_pdb.c
index 48a9092d71..cd29891f16 100644
--- a/libgimp/gimpimagecolorprofile_pdb.c
+++ b/libgimp/gimpimagecolorprofile_pdb.c
@@ -60,7 +60,7 @@ _gimp_image_get_color_profile (GimpImage *image,
guint8 *profile_data = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -114,7 +114,7 @@ _gimp_image_get_effective_color_profile (GimpImage *image,
guint8 *profile_data = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -168,7 +168,7 @@ _gimp_image_set_color_profile (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, num_bytes,
GIMP_TYPE_UINT8_ARRAY, NULL,
G_TYPE_NONE);
@@ -218,7 +218,7 @@ gimp_image_set_color_profile_from_file (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, uri,
G_TYPE_NONE);
@@ -266,7 +266,7 @@ _gimp_image_set_color_profile_from_file (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, uri,
G_TYPE_NONE);
@@ -318,7 +318,7 @@ _gimp_image_convert_color_profile (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, num_bytes,
GIMP_TYPE_UINT8_ARRAY, NULL,
GIMP_TYPE_COLOR_RENDERING_INTENT, intent,
@@ -372,7 +372,7 @@ gimp_image_convert_color_profile_from_file (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, uri,
GIMP_TYPE_COLOR_RENDERING_INTENT, intent,
G_TYPE_BOOLEAN, bpc,
@@ -424,7 +424,7 @@ _gimp_image_convert_color_profile_from_file (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, uri,
GIMP_TYPE_COLOR_RENDERING_INTENT, intent,
G_TYPE_BOOLEAN, bpc,
diff --git a/libgimp/gimpimageconvert_pdb.c b/libgimp/gimpimageconvert_pdb.c
index ed49b3ec9d..fe2cb4d935 100644
--- a/libgimp/gimpimageconvert_pdb.c
+++ b/libgimp/gimpimageconvert_pdb.c
@@ -56,7 +56,7 @@ gimp_image_convert_rgb (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -97,7 +97,7 @@ _gimp_image_convert_rgb (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -136,7 +136,7 @@ gimp_image_convert_grayscale (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -175,7 +175,7 @@ _gimp_image_convert_grayscale (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -237,7 +237,7 @@ gimp_image_convert_indexed (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CONVERT_DITHER_TYPE, dither_type,
GIMP_TYPE_CONVERT_PALETTE_TYPE, palette_type,
G_TYPE_INT, num_cols,
@@ -305,7 +305,7 @@ _gimp_image_convert_indexed (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CONVERT_DITHER_TYPE, dither_type,
GIMP_TYPE_CONVERT_PALETTE_TYPE, palette_type,
G_TYPE_INT, num_cols,
@@ -406,7 +406,7 @@ gimp_image_convert_precision (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_PRECISION, precision,
G_TYPE_NONE);
@@ -451,7 +451,7 @@ _gimp_image_convert_precision (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_PRECISION, precision,
G_TYPE_NONE);
diff --git a/libgimp/gimpimagegrid_pdb.c b/libgimp/gimpimagegrid_pdb.c
index 78d45f333c..ae05ca8e9b 100644
--- a/libgimp/gimpimagegrid_pdb.c
+++ b/libgimp/gimpimagegrid_pdb.c
@@ -60,7 +60,7 @@ gimp_image_grid_get_spacing (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -114,7 +114,7 @@ _gimp_image_grid_get_spacing (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -168,7 +168,7 @@ gimp_image_grid_set_spacing (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_DOUBLE, xspacing,
G_TYPE_DOUBLE, yspacing,
G_TYPE_NONE);
@@ -215,7 +215,7 @@ _gimp_image_grid_set_spacing (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_DOUBLE, xspacing,
G_TYPE_DOUBLE, yspacing,
G_TYPE_NONE);
@@ -262,7 +262,7 @@ gimp_image_grid_get_offset (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -316,7 +316,7 @@ _gimp_image_grid_get_offset (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -370,7 +370,7 @@ gimp_image_grid_set_offset (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_DOUBLE, xoffset,
G_TYPE_DOUBLE, yoffset,
G_TYPE_NONE);
@@ -417,7 +417,7 @@ _gimp_image_grid_set_offset (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_DOUBLE, xoffset,
G_TYPE_DOUBLE, yoffset,
G_TYPE_NONE);
@@ -461,7 +461,7 @@ gimp_image_grid_get_foreground_color (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -506,7 +506,7 @@ _gimp_image_grid_get_foreground_color (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -551,7 +551,7 @@ gimp_image_grid_set_foreground_color (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_RGB, fgcolor,
G_TYPE_NONE);
@@ -594,7 +594,7 @@ _gimp_image_grid_set_foreground_color (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_RGB, fgcolor,
G_TYPE_NONE);
@@ -637,7 +637,7 @@ gimp_image_grid_get_background_color (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -682,7 +682,7 @@ _gimp_image_grid_get_background_color (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -727,7 +727,7 @@ gimp_image_grid_set_background_color (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_RGB, bgcolor,
G_TYPE_NONE);
@@ -770,7 +770,7 @@ _gimp_image_grid_set_background_color (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_RGB, bgcolor,
G_TYPE_NONE);
@@ -811,7 +811,7 @@ gimp_image_grid_get_style (GimpImage *image)
GimpGridStyle style = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -852,7 +852,7 @@ _gimp_image_grid_get_style (gint32 image_ID)
GimpGridStyle style = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -896,7 +896,7 @@ gimp_image_grid_set_style (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_GRID_STYLE, style,
G_TYPE_NONE);
@@ -940,7 +940,7 @@ _gimp_image_grid_set_style (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_GRID_STYLE, style,
G_TYPE_NONE);
diff --git a/libgimp/gimpimageguides_pdb.c b/libgimp/gimpimageguides_pdb.c
index 08b5c1b04a..48e3c53dce 100644
--- a/libgimp/gimpimageguides_pdb.c
+++ b/libgimp/gimpimageguides_pdb.c
@@ -57,7 +57,7 @@ gimp_image_add_hguide (GimpImage *image,
guint guide = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, yposition,
G_TYPE_NONE);
@@ -101,7 +101,7 @@ _gimp_image_add_hguide (gint32 image_ID,
gint32 guide_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, yposition,
G_TYPE_NONE);
@@ -145,7 +145,7 @@ gimp_image_add_vguide (GimpImage *image,
guint guide = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, xposition,
G_TYPE_NONE);
@@ -189,7 +189,7 @@ _gimp_image_add_vguide (gint32 image_ID,
gint32 guide_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, xposition,
G_TYPE_NONE);
@@ -232,7 +232,7 @@ gimp_image_delete_guide (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, guide,
G_TYPE_NONE);
@@ -274,7 +274,7 @@ _gimp_image_delete_guide (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, guide_ID,
G_TYPE_NONE);
@@ -319,7 +319,7 @@ gimp_image_find_next_guide (GimpImage *image,
guint next_guide = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, guide,
G_TYPE_NONE);
@@ -365,7 +365,7 @@ _gimp_image_find_next_guide (gint32 image_ID,
gint32 next_guide_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, guide_ID,
G_TYPE_NONE);
@@ -408,7 +408,7 @@ gimp_image_get_guide_orientation (GimpImage *image,
GimpOrientationType orientation = GIMP_ORIENTATION_UNKNOWN;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, guide,
G_TYPE_NONE);
@@ -451,7 +451,7 @@ _gimp_image_get_guide_orientation (gint32 image_ID,
GimpOrientationType orientation = GIMP_ORIENTATION_UNKNOWN;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, guide_ID,
G_TYPE_NONE);
@@ -494,7 +494,7 @@ gimp_image_get_guide_position (GimpImage *image,
gint position = G_MININT /* GIMP_GUIDE_POSITION_UNDEFINED */;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, guide,
G_TYPE_NONE);
@@ -537,7 +537,7 @@ _gimp_image_get_guide_position (gint32 image_ID,
gint position = G_MININT /* GIMP_GUIDE_POSITION_UNDEFINED */;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, guide_ID,
G_TYPE_NONE);
diff --git a/libgimp/gimpimageprocedure.c b/libgimp/gimpimageprocedure.c
index b09d49c9b0..e351596e35 100644
--- a/libgimp/gimpimageprocedure.c
+++ b/libgimp/gimpimageprocedure.c
@@ -84,11 +84,13 @@ gimp_image_procedure_constructed (GObject *object)
GIMP_PROC_ARG_IMAGE (procedure, "image",
"Image",
"The input image",
+ FALSE,
G_PARAM_READWRITE);
GIMP_PROC_ARG_DRAWABLE (procedure, "drawable",
"Drawable",
"The input drawable",
+ TRUE,
G_PARAM_READWRITE);
}
diff --git a/libgimp/gimpimagesamplepoints_pdb.c b/libgimp/gimpimagesamplepoints_pdb.c
index 7394bc6de7..85941e2daf 100644
--- a/libgimp/gimpimagesamplepoints_pdb.c
+++ b/libgimp/gimpimagesamplepoints_pdb.c
@@ -61,7 +61,7 @@ gimp_image_add_sample_point (GimpImage *image,
guint sample_point = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, position_x,
G_TYPE_INT, position_y,
G_TYPE_NONE);
@@ -110,7 +110,7 @@ _gimp_image_add_sample_point (gint32 image_ID,
gint32 sample_point_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, position_x,
G_TYPE_INT, position_y,
G_TYPE_NONE);
@@ -156,7 +156,7 @@ gimp_image_delete_sample_point (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, sample_point,
G_TYPE_NONE);
@@ -200,7 +200,7 @@ _gimp_image_delete_sample_point (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, sample_point_ID,
G_TYPE_NONE);
@@ -248,7 +248,7 @@ gimp_image_find_next_sample_point (GimpImage *image,
guint next_sample_point = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, sample_point,
G_TYPE_NONE);
@@ -297,7 +297,7 @@ _gimp_image_find_next_sample_point (gint32 image_ID,
gint32 next_sample_point_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, sample_point_ID,
G_TYPE_NONE);
@@ -345,7 +345,7 @@ gimp_image_get_sample_point_position (GimpImage *image,
gint position_x = G_MININT;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_UINT, sample_point,
G_TYPE_NONE);
@@ -396,7 +396,7 @@ _gimp_image_get_sample_point_position (gint32 image_ID,
gint position_x = G_MININT;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_UINT, sample_point_ID,
G_TYPE_NONE);
diff --git a/libgimp/gimpimageselect_pdb.c b/libgimp/gimpimageselect_pdb.c
index efc229fb6a..4702c2599c 100644
--- a/libgimp/gimpimageselect_pdb.c
+++ b/libgimp/gimpimageselect_pdb.c
@@ -77,9 +77,9 @@ gimp_image_select_color (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_OPS, operation,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
GIMP_TYPE_RGB, color,
G_TYPE_NONE);
@@ -142,9 +142,9 @@ _gimp_image_select_color (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_OPS, operation,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
GIMP_TYPE_RGB, color,
G_TYPE_NONE);
@@ -218,9 +218,9 @@ gimp_image_select_contiguous_color (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_OPS, operation,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
G_TYPE_NONE);
@@ -295,9 +295,9 @@ _gimp_image_select_contiguous_color (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_OPS, operation,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
G_TYPE_NONE);
@@ -354,7 +354,7 @@ gimp_image_select_rectangle (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
@@ -414,7 +414,7 @@ _gimp_image_select_rectangle (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
@@ -481,7 +481,7 @@ gimp_image_select_round_rectangle (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
@@ -550,7 +550,7 @@ _gimp_image_select_round_rectangle (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
@@ -613,7 +613,7 @@ gimp_image_select_ellipse (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
@@ -674,7 +674,7 @@ _gimp_image_select_ellipse (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
@@ -736,7 +736,7 @@ gimp_image_select_polygon (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_INT, num_segs,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -797,7 +797,7 @@ _gimp_image_select_polygon (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_OPS, operation,
G_TYPE_INT, num_segs,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -852,9 +852,9 @@ gimp_image_select_item (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_CHANNEL_OPS, operation,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -905,9 +905,9 @@ _gimp_image_select_item (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_CHANNEL_OPS, operation,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
diff --git a/libgimp/gimpimagetransform_pdb.c b/libgimp/gimpimagetransform_pdb.c
index daff6083c3..93a334ca06 100644
--- a/libgimp/gimpimagetransform_pdb.c
+++ b/libgimp/gimpimagetransform_pdb.c
@@ -67,7 +67,7 @@ gimp_image_resize (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_INT, offx,
@@ -123,7 +123,7 @@ _gimp_image_resize (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_INT, offx,
@@ -170,7 +170,7 @@ gimp_image_resize_to_layers (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -213,7 +213,7 @@ _gimp_image_resize_to_layers (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -259,7 +259,7 @@ gimp_image_scale (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_NONE);
@@ -307,7 +307,7 @@ _gimp_image_scale (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_NONE);
@@ -360,7 +360,7 @@ gimp_image_crop (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_INT, offx,
@@ -415,7 +415,7 @@ _gimp_image_crop (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_INT, offx,
@@ -459,7 +459,7 @@ gimp_image_flip (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_ORIENTATION_TYPE, flip_type,
G_TYPE_NONE);
@@ -500,7 +500,7 @@ _gimp_image_flip (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_ORIENTATION_TYPE, flip_type,
G_TYPE_NONE);
@@ -541,7 +541,7 @@ gimp_image_rotate (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
GIMP_TYPE_ROTATION_TYPE, rotate_type,
G_TYPE_NONE);
@@ -582,7 +582,7 @@ _gimp_image_rotate (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
GIMP_TYPE_ROTATION_TYPE, rotate_type,
G_TYPE_NONE);
diff --git a/libgimp/gimpimageundo_pdb.c b/libgimp/gimpimageundo_pdb.c
index 6fec1695a5..b93ec92107 100644
--- a/libgimp/gimpimageundo_pdb.c
+++ b/libgimp/gimpimageundo_pdb.c
@@ -56,7 +56,7 @@ gimp_image_undo_group_start (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -97,7 +97,7 @@ _gimp_image_undo_group_start (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -136,7 +136,7 @@ gimp_image_undo_group_end (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -175,7 +175,7 @@ _gimp_image_undo_group_end (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -216,7 +216,7 @@ gimp_image_undo_is_enabled (GimpImage *image)
gboolean enabled = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -258,7 +258,7 @@ _gimp_image_undo_is_enabled (gint32 image_ID)
gboolean enabled = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -301,7 +301,7 @@ gimp_image_undo_disable (GimpImage *image)
gboolean disabled = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -344,7 +344,7 @@ _gimp_image_undo_disable (gint32 image_ID)
gboolean disabled = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -386,7 +386,7 @@ gimp_image_undo_enable (GimpImage *image)
gboolean enabled = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -428,7 +428,7 @@ _gimp_image_undo_enable (gint32 image_ID)
gboolean enabled = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -477,7 +477,7 @@ gimp_image_undo_freeze (GimpImage *image)
gboolean frozen = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -526,7 +526,7 @@ _gimp_image_undo_freeze (gint32 image_ID)
gboolean frozen = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -574,7 +574,7 @@ gimp_image_undo_thaw (GimpImage *image)
gboolean thawed = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -622,7 +622,7 @@ _gimp_image_undo_thaw (gint32 image_ID)
gboolean thawed = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
diff --git a/libgimp/gimpitem.c b/libgimp/gimpitem.c
index 4d16574ce8..5500bab53a 100644
--- a/libgimp/gimpitem.c
+++ b/libgimp/gimpitem.c
@@ -172,6 +172,153 @@ gimp_item_get_by_id (gint32 item_id)
return NULL;
}
+/**
+ * gimp_item_is_valid:
+ * @item: The item to check.
+ *
+ * Returns TRUE if the item is valid.
+ *
+ * This procedure checks if the given item is valid and refers to an
+ * existing item.
+ *
+ * Returns: Whether the item is valid.
+ *
+ * Since: 2.8
+ **/
+gboolean
+gimp_item_is_valid (GimpItem *item)
+{
+ return gimp_item_id_is_valid (gimp_item_get_id (item));
+}
+
+/**
+ * gimp_item_is_drawable:
+ * @item: The item.
+ *
+ * Returns whether the item is a drawable.
+ *
+ * This procedure returns TRUE if the specified item is a drawable.
+ *
+ * Returns: TRUE if the item is a drawable, FALSE otherwise.
+ *
+ * Since: 2.8
+ **/
+gboolean
+gimp_item_is_drawable (GimpItem *item)
+{
+ return gimp_item_id_is_drawable (gimp_item_get_id (item));
+}
+
+/**
+ * gimp_item_is_layer:
+ * @item: The item.
+ *
+ * Returns whether the item is a layer.
+ *
+ * This procedure returns TRUE if the specified item is a layer.
+ *
+ * Returns: TRUE if the item is a layer, FALSE otherwise.
+ *
+ * Since: 2.8
+ **/
+gboolean
+gimp_item_is_layer (GimpItem *item)
+{
+ return gimp_item_id_is_layer (gimp_item_get_id (item));
+}
+
+/**
+ * gimp_item_is_text_layer:
+ * @item: The item.
+ *
+ * Returns whether the item is a text layer.
+ *
+ * This procedure returns TRUE if the specified item is a text
+ * layer.
+ *
+ * Returns: TRUE if the item is a text layer, FALSE otherwise.
+ *
+ * Since: 2.8
+ **/
+gboolean
+gimp_item_is_text_layer (GimpItem *item)
+{
+ return gimp_item_id_is_text_layer (gimp_item_get_id (item));
+}
+
+/**
+ * gimp_item_is_channel:
+ * @item: The item.
+ *
+ * Returns whether the item is a channel.
+ *
+ * This procedure returns TRUE if the specified item is a channel.
+ *
+ * Returns: TRUE if the item is a channel, FALSE otherwise.
+ *
+ * Since: 2.8
+ **/
+gboolean
+gimp_item_is_channel (GimpItem *item)
+{
+ return gimp_item_id_is_channel (gimp_item_get_id (item));
+}
+
+/**
+ * gimp_item_is_layer_mask:
+ * @item: The item.
+ *
+ * Returns whether the item is a layer mask.
+ *
+ * This procedure returns TRUE if the specified item is a layer
+ * mask.
+ *
+ * Returns: TRUE if the item is a layer mask, FALSE otherwise.
+ *
+ * Since: 2.8
+ **/
+gboolean
+gimp_item_is_layer_mask (GimpItem *item)
+{
+ return gimp_item_id_is_layer_mask (gimp_item_get_id (item));
+}
+
+/**
+ * gimp_item_is_selection:
+ * @item: The item.
+ *
+ * Returns whether the item is a selection.
+ *
+ * This procedure returns TRUE if the specified item is a selection.
+ *
+ * Returns: TRUE if the item is a selection, FALSE otherwise.
+ *
+ * Since: 2.8
+ **/
+gboolean
+gimp_item_is_selection (GimpItem *item)
+{
+ return gimp_item_id_is_selection (gimp_item_get_id (item));
+}
+
+/**
+ * gimp_item_is_vectors:
+ * @item: The item.
+ *
+ * Returns whether the item is a vectors.
+ *
+ * This procedure returns TRUE if the specified item is a vectors.
+ *
+ * Returns: TRUE if the item is a vectors, FALSE otherwise.
+ *
+ * Since: 2.8
+ **/
+gboolean
+gimp_item_is_vectors (GimpItem *item)
+{
+ return gimp_item_id_is_vectors (gimp_item_get_id (item));
+}
+
/**
* gimp_item_get_children:
* @item: The item.
diff --git a/libgimp/gimpitem.h b/libgimp/gimpitem.h
index 743583a02e..c7ebd67519 100644
--- a/libgimp/gimpitem.h
+++ b/libgimp/gimpitem.h
@@ -70,6 +70,15 @@ GType gimp_item_get_type (void) G_GNUC_CONST;
gint32 gimp_item_get_id (GimpItem *item);
GimpItem * gimp_item_get_by_id (gint32 item_id);
+gboolean gimp_item_is_valid (GimpItem *item);
+gboolean gimp_item_is_drawable (GimpItem *item);
+gboolean gimp_item_is_layer (GimpItem *item);
+gboolean gimp_item_is_text_layer (GimpItem *item);
+gboolean gimp_item_is_channel (GimpItem *item);
+gboolean gimp_item_is_layer_mask (GimpItem *item);
+gboolean gimp_item_is_selection (GimpItem *item);
+gboolean gimp_item_is_vectors (GimpItem *item);
+
#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
GimpItem ** gimp_item_get_children (GimpItem *item,
diff --git a/libgimp/gimpitem_pdb.c b/libgimp/gimpitem_pdb.c
index eb0a886f44..84533e68f9 100644
--- a/libgimp/gimpitem_pdb.c
+++ b/libgimp/gimpitem_pdb.c
@@ -35,20 +35,20 @@
/**
- * gimp_item_is_valid:
- * @item: The item to check.
+ * gimp_item_id_is_valid:
+ * @item_id: The item ID to check.
*
- * Returns TRUE if the item is valid.
+ * Returns TRUE if the item ID is valid.
*
* This procedure checks if the given item ID is valid and refers to an
* existing item.
*
* Returns: Whether the item ID is valid.
*
- * Since: 2.8
+ * Since: 3.0
**/
gboolean
-gimp_item_is_valid (GimpItem *item)
+gimp_item_id_is_valid (gint item_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
@@ -56,15 +56,15 @@ gimp_item_is_valid (GimpItem *item)
gboolean valid = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ G_TYPE_INT, item_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-valid",
+ "gimp-item-id-is-valid",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-valid",
+ return_vals = gimp_run_procedure_array ("gimp-item-id-is-valid",
args);
gimp_value_array_unref (args);
@@ -77,272 +77,19 @@ gimp_item_is_valid (GimpItem *item)
}
/**
- * _gimp_item_is_valid: (skip)
- * @item_ID: The item to check.
+ * gimp_item_id_is_drawable:
+ * @item_id: The item ID.
*
- * Returns TRUE if the item is valid.
+ * Returns whether the item ID is a drawable.
*
- * This procedure checks if the given item ID is valid and refers to an
- * existing item.
+ * This procedure returns TRUE if the specified item ID is a drawable.
*
- * Returns: Whether the item ID is valid.
+ * Returns: TRUE if the item ID is a drawable, FALSE otherwise.
*
- * Since: 2.8
+ * Since: 3.0
**/
gboolean
-_gimp_item_is_valid (gint32 item_ID)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- gboolean valid = FALSE;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-valid",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-item-is-valid",
- args);
- gimp_value_array_unref (args);
-
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- valid = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
-
- gimp_value_array_unref (return_vals);
-
- return valid;
-}
-
-/**
- * gimp_item_get_image:
- * @item: The item.
- *
- * Returns the item's image.
- *
- * This procedure returns the item's image.
- *
- * Returns: (transfer none): The item's image.
- *
- * Since: 2.8
- **/
-GimpImage *
-gimp_item_get_image (GimpItem *item)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- GimpImage *image = NULL;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-get-image",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-item-get-image",
- args);
- gimp_value_array_unref (args);
-
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image = gimp_image_get_by_id (gimp_value_get_image_id (gimp_value_array_index (return_vals, 1)));
-
- gimp_value_array_unref (return_vals);
-
- return image;
-}
-
-/**
- * _gimp_item_get_image: (skip)
- * @item_ID: The item.
- *
- * Returns the item's image.
- *
- * This procedure returns the item's image.
- *
- * Returns: The item's image.
- *
- * Since: 2.8
- **/
-gint32
-_gimp_item_get_image (gint32 item_ID)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- gint32 image_ID = -1;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-get-image",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-item-get-image",
- args);
- gimp_value_array_unref (args);
-
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- image_ID = gimp_value_get_image_id (gimp_value_array_index (return_vals, 1));
-
- gimp_value_array_unref (return_vals);
-
- return image_ID;
-}
-
-/**
- * gimp_item_delete:
- * @item: The item to delete.
- *
- * Delete a item.
- *
- * This procedure deletes the specified item. This must not be done if
- * the image containing this item was already deleted or if the item
- * was already removed from the image. The only case in which this
- * procedure is useful is if you want to get rid of a item which has
- * not yet been added to an image.
- *
- * Returns: TRUE on success.
- *
- * Since: 2.8
- **/
-gboolean
-gimp_item_delete (GimpItem *item)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- gboolean success = TRUE;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-delete",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-item-delete",
- args);
- gimp_value_array_unref (args);
-
- success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
-
- gimp_value_array_unref (return_vals);
-
- return success;
-}
-
-/**
- * _gimp_item_delete: (skip)
- * @item_ID: The item to delete.
- *
- * Delete a item.
- *
- * This procedure deletes the specified item. This must not be done if
- * the image containing this item was already deleted or if the item
- * was already removed from the image. The only case in which this
- * procedure is useful is if you want to get rid of a item which has
- * not yet been added to an image.
- *
- * Returns: TRUE on success.
- *
- * Since: 2.8
- **/
-gboolean
-_gimp_item_delete (gint32 item_ID)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- gboolean success = TRUE;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-delete",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-item-delete",
- args);
- gimp_value_array_unref (args);
-
- success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
-
- gimp_value_array_unref (return_vals);
-
- return success;
-}
-
-/**
- * gimp_item_is_drawable:
- * @item: The item.
- *
- * Returns whether the item is a drawable.
- *
- * This procedure returns TRUE if the specified item is a drawable.
- *
- * Returns: TRUE if the item is a drawable, FALSE otherwise.
- *
- * Since: 2.8
- **/
-gboolean
-gimp_item_is_drawable (GimpItem *item)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- gboolean drawable = FALSE;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-drawable",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-item-is-drawable",
- args);
- gimp_value_array_unref (args);
-
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- drawable = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
-
- gimp_value_array_unref (return_vals);
-
- return drawable;
-}
-
-/**
- * _gimp_item_is_drawable: (skip)
- * @item_ID: The item.
- *
- * Returns whether the item is a drawable.
- *
- * This procedure returns TRUE if the specified item is a drawable.
- *
- * Returns: TRUE if the item is a drawable, FALSE otherwise.
- *
- * Since: 2.8
- **/
-gboolean
-_gimp_item_is_drawable (gint32 item_ID)
+gimp_item_id_is_drawable (gint item_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
@@ -350,15 +97,15 @@ _gimp_item_is_drawable (gint32 item_ID)
gboolean drawable = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ G_TYPE_INT, item_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-drawable",
+ "gimp-item-id-is-drawable",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-drawable",
+ return_vals = gimp_run_procedure_array ("gimp-item-id-is-drawable",
args);
gimp_value_array_unref (args);
@@ -371,60 +118,19 @@ _gimp_item_is_drawable (gint32 item_ID)
}
/**
- * gimp_item_is_layer:
- * @item: The item.
- *
- * Returns whether the item is a layer.
- *
- * This procedure returns TRUE if the specified item is a layer.
- *
- * Returns: TRUE if the item is a layer, FALSE otherwise.
- *
- * Since: 2.8
- **/
-gboolean
-gimp_item_is_layer (GimpItem *item)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- gboolean layer = FALSE;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-layer",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-item-is-layer",
- args);
- gimp_value_array_unref (args);
-
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
-
- gimp_value_array_unref (return_vals);
-
- return layer;
-}
-
-/**
- * _gimp_item_is_layer: (skip)
- * @item_ID: The item.
+ * gimp_item_id_is_layer:
+ * @item_id: The item ID.
*
- * Returns whether the item is a layer.
+ * Returns whether the item ID is a layer.
*
- * This procedure returns TRUE if the specified item is a layer.
+ * This procedure returns TRUE if the specified item ID is a layer.
*
* Returns: TRUE if the item is a layer, FALSE otherwise.
*
- * Since: 2.8
+ * Since: 3.0
**/
gboolean
-_gimp_item_is_layer (gint32 item_ID)
+gimp_item_id_is_layer (gint item_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
@@ -432,15 +138,15 @@ _gimp_item_is_layer (gint32 item_ID)
gboolean layer = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ G_TYPE_INT, item_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-layer",
+ "gimp-item-id-is-layer",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-layer",
+ return_vals = gimp_run_procedure_array ("gimp-item-id-is-layer",
args);
gimp_value_array_unref (args);
@@ -453,60 +159,20 @@ _gimp_item_is_layer (gint32 item_ID)
}
/**
- * gimp_item_is_text_layer:
- * @item: The item.
- *
- * Returns whether the item is a text layer.
- *
- * This procedure returns TRUE if the specified item is a text layer.
- *
- * Returns: TRUE if the item is a text layer, FALSE otherwise.
- *
- * Since: 2.8
- **/
-gboolean
-gimp_item_is_text_layer (GimpItem *item)
-{
- GimpPDB *pdb = gimp_get_pdb ();
- GimpValueArray *args;
- GimpValueArray *return_vals;
- gboolean text_layer = FALSE;
-
- args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
- G_TYPE_NONE);
-
- if (pdb)
- return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-text-layer",
- args);
- else
- return_vals = gimp_run_procedure_array ("gimp-item-is-text-layer",
- args);
- gimp_value_array_unref (args);
-
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- text_layer = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
-
- gimp_value_array_unref (return_vals);
-
- return text_layer;
-}
-
-/**
- * _gimp_item_is_text_layer: (skip)
- * @item_ID: The item.
+ * gimp_item_id_is_text_layer:
+ * @item_id: The item ID.
*
- * Returns whether the item is a text layer.
+ * Returns whether the item ID is a text layer.
*
- * This procedure returns TRUE if the specified item is a text layer.
+ * This procedure returns TRUE if the specified item ID is a text
+ * layer.
*
* Returns: TRUE if the item is a text layer, FALSE otherwise.
*
- * Since: 2.8
+ * Since: 3.0
**/
gboolean
-_gimp_item_is_text_layer (gint32 item_ID)
+gimp_item_id_is_text_layer (gint item_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
@@ -514,15 +180,15 @@ _gimp_item_is_text_layer (gint32 item_ID)
gboolean text_layer = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ G_TYPE_INT, item_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-text-layer",
+ "gimp-item-id-is-text-layer",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-text-layer",
+ return_vals = gimp_run_procedure_array ("gimp-item-id-is-text-layer",
args);
gimp_value_array_unref (args);
@@ -535,19 +201,19 @@ _gimp_item_is_text_layer (gint32 item_ID)
}
/**
- * gimp_item_is_channel:
- * @item: The item.
+ * gimp_item_id_is_channel:
+ * @item_id: The item ID.
*
- * Returns whether the item is a channel.
+ * Returns whether the item ID is a channel.
*
- * This procedure returns TRUE if the specified item is a channel.
+ * This procedure returns TRUE if the specified item ID is a channel.
*
- * Returns: TRUE if the item is a channel, FALSE otherwise.
+ * Returns: TRUE if the item ID is a channel, FALSE otherwise.
*
- * Since: 2.8
+ * Since: 3.0
**/
gboolean
-gimp_item_is_channel (GimpItem *item)
+gimp_item_id_is_channel (gint item_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
@@ -555,15 +221,15 @@ gimp_item_is_channel (GimpItem *item)
gboolean channel = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ G_TYPE_INT, item_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-channel",
+ "gimp-item-id-is-channel",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-channel",
+ return_vals = gimp_run_procedure_array ("gimp-item-id-is-channel",
args);
gimp_value_array_unref (args);
@@ -576,290 +242,297 @@ gimp_item_is_channel (GimpItem *item)
}
/**
- * _gimp_item_is_channel: (skip)
- * @item_ID: The item.
+ * gimp_item_id_is_layer_mask:
+ * @item_id: The item.
*
- * Returns whether the item is a channel.
+ * Returns whether the item ID is a layer mask.
*
- * This procedure returns TRUE if the specified item is a channel.
+ * This procedure returns TRUE if the specified item ID is a layer
+ * mask.
*
- * Returns: TRUE if the item is a channel, FALSE otherwise.
+ * Returns: TRUE if the item ID is a layer mask, FALSE otherwise.
*
- * Since: 2.8
+ * Since: 3.0
**/
gboolean
-_gimp_item_is_channel (gint32 item_ID)
+gimp_item_id_is_layer_mask (gint item_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
- gboolean channel = FALSE;
+ gboolean layer_mask = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ G_TYPE_INT, item_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-channel",
+ "gimp-item-id-is-layer-mask",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-channel",
+ return_vals = gimp_run_procedure_array ("gimp-item-id-is-layer-mask",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
+ layer_mask = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
- return channel;
+ return layer_mask;
}
/**
- * gimp_item_is_layer_mask:
- * @item: The item.
+ * gimp_item_id_is_selection:
+ * @item_id: The item ID.
*
- * Returns whether the item is a layer mask.
+ * Returns whether the item ID is a selection.
*
- * This procedure returns TRUE if the specified item is a layer mask.
+ * This procedure returns TRUE if the specified item ID is a selection.
*
- * Returns: TRUE if the item is a layer mask, FALSE otherwise.
+ * Returns: TRUE if the item ID is a selection, FALSE otherwise.
*
- * Since: 2.8
+ * Since: 3,0
**/
gboolean
-gimp_item_is_layer_mask (GimpItem *item)
+gimp_item_id_is_selection (gint item_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
- gboolean layer_mask = FALSE;
+ gboolean selection = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ G_TYPE_INT, item_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-layer-mask",
+ "gimp-item-id-is-selection",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-layer-mask",
+ return_vals = gimp_run_procedure_array ("gimp-item-id-is-selection",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_mask = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
+ selection = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
- return layer_mask;
+ return selection;
}
/**
- * _gimp_item_is_layer_mask: (skip)
- * @item_ID: The item.
+ * gimp_item_id_is_vectors:
+ * @item_id: The item ID.
*
- * Returns whether the item is a layer mask.
+ * Returns whether the item ID is a vectors.
*
- * This procedure returns TRUE if the specified item is a layer mask.
+ * This procedure returns TRUE if the specified item ID is a vectors.
*
- * Returns: TRUE if the item is a layer mask, FALSE otherwise.
+ * Returns: TRUE if the item ID is a vectors, FALSE otherwise.
*
- * Since: 2.8
+ * Since: 3.0
**/
gboolean
-_gimp_item_is_layer_mask (gint32 item_ID)
+gimp_item_id_is_vectors (gint item_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
- gboolean layer_mask = FALSE;
+ gboolean vectors = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ G_TYPE_INT, item_id,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-layer-mask",
+ "gimp-item-id-is-vectors",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-layer-mask",
+ return_vals = gimp_run_procedure_array ("gimp-item-id-is-vectors",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_mask = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
+ vectors = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
- return layer_mask;
+ return vectors;
}
/**
- * gimp_item_is_selection:
+ * gimp_item_get_image:
* @item: The item.
*
- * Returns whether the item is a selection.
+ * Returns the item's image.
*
- * This procedure returns TRUE if the specified item is a selection.
+ * This procedure returns the item's image.
*
- * Returns: TRUE if the item is a selection, FALSE otherwise.
+ * Returns: (transfer none): The item's image.
*
* Since: 2.8
**/
-gboolean
-gimp_item_is_selection (GimpItem *item)
+GimpImage *
+gimp_item_get_image (GimpItem *item)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
- gboolean selection = FALSE;
+ GimpImage *image = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-selection",
+ "gimp-item-get-image",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-selection",
+ return_vals = gimp_run_procedure_array ("gimp-item-get-image",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- selection = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
+ image = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
- return selection;
+ return image;
}
/**
- * _gimp_item_is_selection: (skip)
+ * _gimp_item_get_image: (skip)
* @item_ID: The item.
*
- * Returns whether the item is a selection.
+ * Returns the item's image.
*
- * This procedure returns TRUE if the specified item is a selection.
+ * This procedure returns the item's image.
*
- * Returns: TRUE if the item is a selection, FALSE otherwise.
+ * Returns: The item's image.
*
* Since: 2.8
**/
-gboolean
-_gimp_item_is_selection (gint32 item_ID)
+gint32
+_gimp_item_get_image (gint32 item_ID)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
- gboolean selection = FALSE;
+ gint32 image_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-selection",
+ "gimp-item-get-image",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-selection",
+ return_vals = gimp_run_procedure_array ("gimp-item-get-image",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- selection = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
+ image_ID = gimp_image_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
- return selection;
+ return image_ID;
}
/**
- * gimp_item_is_vectors:
- * @item: The item.
+ * gimp_item_delete:
+ * @item: The item to delete.
*
- * Returns whether the item is a vectors.
+ * Delete a item.
*
- * This procedure returns TRUE if the specified item is a vectors.
+ * This procedure deletes the specified item. This must not be done if
+ * the image containing this item was already deleted or if the item
+ * was already removed from the image. The only case in which this
+ * procedure is useful is if you want to get rid of a item which has
+ * not yet been added to an image.
*
- * Returns: TRUE if the item is a vectors, FALSE otherwise.
+ * Returns: TRUE on success.
*
* Since: 2.8
**/
gboolean
-gimp_item_is_vectors (GimpItem *item)
+gimp_item_delete (GimpItem *item)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
- gboolean vectors = FALSE;
+ gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-vectors",
+ "gimp-item-delete",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-vectors",
+ return_vals = gimp_run_procedure_array ("gimp-item-delete",
args);
gimp_value_array_unref (args);
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
+ success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
gimp_value_array_unref (return_vals);
- return vectors;
+ return success;
}
/**
- * _gimp_item_is_vectors: (skip)
- * @item_ID: The item.
+ * _gimp_item_delete: (skip)
+ * @item_ID: The item to delete.
*
- * Returns whether the item is a vectors.
+ * Delete a item.
*
- * This procedure returns TRUE if the specified item is a vectors.
+ * This procedure deletes the specified item. This must not be done if
+ * the image containing this item was already deleted or if the item
+ * was already removed from the image. The only case in which this
+ * procedure is useful is if you want to get rid of a item which has
+ * not yet been added to an image.
*
- * Returns: TRUE if the item is a vectors, FALSE otherwise.
+ * Returns: TRUE on success.
*
* Since: 2.8
**/
gboolean
-_gimp_item_is_vectors (gint32 item_ID)
+_gimp_item_delete (gint32 item_ID)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
- gboolean vectors = FALSE;
+ gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
- "gimp-item-is-vectors",
+ "gimp-item-delete",
args);
else
- return_vals = gimp_run_procedure_array ("gimp-item-is-vectors",
+ return_vals = gimp_run_procedure_array ("gimp-item-delete",
args);
gimp_value_array_unref (args);
- if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
+ success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
gimp_value_array_unref (return_vals);
- return vectors;
+ return success;
}
/**
@@ -884,7 +557,7 @@ gimp_item_is_group (GimpItem *item)
gboolean group = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -926,7 +599,7 @@ _gimp_item_is_group (gint32 item_ID)
gboolean group = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -967,7 +640,7 @@ gimp_item_get_parent (GimpItem *item)
GimpItem *parent = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -980,7 +653,7 @@ gimp_item_get_parent (GimpItem *item)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- parent = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ parent = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1008,7 +681,7 @@ _gimp_item_get_parent (gint32 item_ID)
gint32 parent_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -1021,7 +694,7 @@ _gimp_item_get_parent (gint32 item_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- parent_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ parent_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1054,7 +727,7 @@ _gimp_item_get_children (GimpItem *item,
gint *child_ids = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -1100,7 +773,7 @@ gimp_item_get_expanded (GimpItem *item)
gboolean expanded = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -1141,7 +814,7 @@ _gimp_item_get_expanded (gint32 item_ID)
gboolean expanded = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -1184,7 +857,7 @@ gimp_item_set_expanded (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_BOOLEAN, expanded,
G_TYPE_NONE);
@@ -1227,7 +900,7 @@ _gimp_item_set_expanded (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_BOOLEAN, expanded,
G_TYPE_NONE);
@@ -1269,7 +942,7 @@ gimp_item_get_name (GimpItem *item)
gchar *name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -1311,7 +984,7 @@ _gimp_item_get_name (gint32 item_ID)
gchar *name = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -1354,7 +1027,7 @@ gimp_item_set_name (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -1397,7 +1070,7 @@ _gimp_item_set_name (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -1438,7 +1111,7 @@ gimp_item_get_visible (GimpItem *item)
gboolean visible = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -1479,7 +1152,7 @@ _gimp_item_get_visible (gint32 item_ID)
gboolean visible = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -1522,7 +1195,7 @@ gimp_item_set_visible (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_BOOLEAN, visible,
G_TYPE_NONE);
@@ -1565,7 +1238,7 @@ _gimp_item_set_visible (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_BOOLEAN, visible,
G_TYPE_NONE);
@@ -1606,7 +1279,7 @@ gimp_item_get_linked (GimpItem *item)
gboolean linked = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -1647,7 +1320,7 @@ _gimp_item_get_linked (gint32 item_ID)
gboolean linked = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -1690,7 +1363,7 @@ gimp_item_set_linked (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_BOOLEAN, linked,
G_TYPE_NONE);
@@ -1733,7 +1406,7 @@ _gimp_item_set_linked (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_BOOLEAN, linked,
G_TYPE_NONE);
@@ -1774,7 +1447,7 @@ gimp_item_get_lock_content (GimpItem *item)
gboolean lock_content = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -1815,7 +1488,7 @@ _gimp_item_get_lock_content (gint32 item_ID)
gboolean lock_content = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -1858,7 +1531,7 @@ gimp_item_set_lock_content (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_BOOLEAN, lock_content,
G_TYPE_NONE);
@@ -1901,7 +1574,7 @@ _gimp_item_set_lock_content (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_BOOLEAN, lock_content,
G_TYPE_NONE);
@@ -1942,7 +1615,7 @@ gimp_item_get_lock_position (GimpItem *item)
gboolean lock_position = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -1983,7 +1656,7 @@ _gimp_item_get_lock_position (gint32 item_ID)
gboolean lock_position = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -2026,7 +1699,7 @@ gimp_item_set_lock_position (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_BOOLEAN, lock_position,
G_TYPE_NONE);
@@ -2069,7 +1742,7 @@ _gimp_item_set_lock_position (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_BOOLEAN, lock_position,
G_TYPE_NONE);
@@ -2110,7 +1783,7 @@ gimp_item_get_color_tag (GimpItem *item)
GimpColorTag color_tag = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -2151,7 +1824,7 @@ _gimp_item_get_color_tag (gint32 item_ID)
GimpColorTag color_tag = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -2194,7 +1867,7 @@ gimp_item_set_color_tag (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
GIMP_TYPE_COLOR_TAG, color_tag,
G_TYPE_NONE);
@@ -2237,7 +1910,7 @@ _gimp_item_set_color_tag (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
GIMP_TYPE_COLOR_TAG, color_tag,
G_TYPE_NONE);
@@ -2280,7 +1953,7 @@ gimp_item_get_tattoo (GimpItem *item)
guint tattoo = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -2323,7 +1996,7 @@ _gimp_item_get_tattoo (gint32 item_ID)
guint tattoo = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
@@ -2368,7 +2041,7 @@ gimp_item_set_tattoo (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_UINT, tattoo,
G_TYPE_NONE);
@@ -2413,7 +2086,7 @@ _gimp_item_set_tattoo (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_UINT, tattoo,
G_TYPE_NONE);
@@ -2457,7 +2130,7 @@ gimp_item_attach_parasite (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
GIMP_TYPE_PARASITE, parasite,
G_TYPE_NONE);
@@ -2501,7 +2174,7 @@ _gimp_item_attach_parasite (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
GIMP_TYPE_PARASITE, parasite,
G_TYPE_NONE);
@@ -2545,7 +2218,7 @@ gimp_item_detach_parasite (GimpItem *item,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -2589,7 +2262,7 @@ _gimp_item_detach_parasite (gint32 item_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -2632,7 +2305,7 @@ gimp_item_get_parasite (GimpItem *item,
GimpParasite *parasite = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -2676,7 +2349,7 @@ _gimp_item_get_parasite (gint32 item_ID,
GimpParasite *parasite = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -2722,7 +2395,7 @@ gimp_item_get_parasite_list (GimpItem *item,
gchar **parasites = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_NONE);
if (pdb)
@@ -2772,7 +2445,7 @@ _gimp_item_get_parasite_list (gint32 item_ID,
gchar **parasites = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_NONE);
if (pdb)
diff --git a/libgimp/gimpitem_pdb.h b/libgimp/gimpitem_pdb.h
index 4ed8a2ea98..68b6d9d89a 100644
--- a/libgimp/gimpitem_pdb.h
+++ b/libgimp/gimpitem_pdb.h
@@ -32,20 +32,19 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-
+gboolean gimp_item_id_is_valid (gint item_id);
+gboolean gimp_item_id_is_drawable (gint item_id);
+gboolean gimp_item_id_is_layer (gint item_id);
+gboolean gimp_item_id_is_text_layer (gint item_id);
+gboolean gimp_item_id_is_channel (gint item_id);
+gboolean gimp_item_id_is_layer_mask (gint item_id);
+gboolean gimp_item_id_is_selection (gint item_id);
+gboolean gimp_item_id_is_vectors (gint item_id);
#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
-gboolean gimp_item_is_valid (GimpItem *item);
GimpImage* gimp_item_get_image (GimpItem *item);
gboolean gimp_item_delete (GimpItem *item);
-gboolean gimp_item_is_drawable (GimpItem *item);
-gboolean gimp_item_is_layer (GimpItem *item);
-gboolean gimp_item_is_text_layer (GimpItem *item);
-gboolean gimp_item_is_channel (GimpItem *item);
-gboolean gimp_item_is_layer_mask (GimpItem *item);
-gboolean gimp_item_is_selection (GimpItem *item);
-gboolean gimp_item_is_vectors (GimpItem *item);
gboolean gimp_item_is_group (GimpItem *item);
GimpItem* gimp_item_get_parent (GimpItem *item);
G_GNUC_INTERNAL gint* _gimp_item_get_children (GimpItem *item,
@@ -85,16 +84,8 @@ gchar** gimp_item_get_parasite_list (GimpItem *item,
#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
-#define gimp_item_is_valid _gimp_item_is_valid
#define gimp_item_get_image _gimp_item_get_image
#define gimp_item_delete _gimp_item_delete
-#define gimp_item_is_drawable _gimp_item_is_drawable
-#define gimp_item_is_layer _gimp_item_is_layer
-#define gimp_item_is_text_layer _gimp_item_is_text_layer
-#define gimp_item_is_channel _gimp_item_is_channel
-#define gimp_item_is_layer_mask _gimp_item_is_layer_mask
-#define gimp_item_is_selection _gimp_item_is_selection
-#define gimp_item_is_vectors _gimp_item_is_vectors
#define gimp_item_is_group _gimp_item_is_group
#define gimp_item_get_parent _gimp_item_get_parent
#define gimp_item_get_expanded _gimp_item_get_expanded
@@ -125,16 +116,8 @@ gchar** gimp_item_get_parasite_list (GimpItem *item,
* They are not marked internal as a trick to keep the old API alive for now.
*/
-gboolean _gimp_item_is_valid (gint32 item_ID);
gint32 _gimp_item_get_image (gint32 item_ID);
gboolean _gimp_item_delete (gint32 item_ID);
-gboolean _gimp_item_is_drawable (gint32 item_ID);
-gboolean _gimp_item_is_layer (gint32 item_ID);
-gboolean _gimp_item_is_text_layer (gint32 item_ID);
-gboolean _gimp_item_is_channel (gint32 item_ID);
-gboolean _gimp_item_is_layer_mask (gint32 item_ID);
-gboolean _gimp_item_is_selection (gint32 item_ID);
-gboolean _gimp_item_is_vectors (gint32 item_ID);
gboolean _gimp_item_is_group (gint32 item_ID);
gint32 _gimp_item_get_parent (gint32 item_ID);
gboolean _gimp_item_get_expanded (gint32 item_ID);
diff --git a/libgimp/gimpitemtransform_pdb.c b/libgimp/gimpitemtransform_pdb.c
index 0e02214502..6b934c43cf 100644
--- a/libgimp/gimpitemtransform_pdb.c
+++ b/libgimp/gimpitemtransform_pdb.c
@@ -67,7 +67,7 @@ gimp_item_transform_translate (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_DOUBLE, off_x,
G_TYPE_DOUBLE, off_y,
G_TYPE_NONE);
@@ -82,7 +82,7 @@ gimp_item_transform_translate (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -122,7 +122,7 @@ _gimp_item_transform_translate (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_DOUBLE, off_x,
G_TYPE_DOUBLE, off_y,
G_TYPE_NONE);
@@ -137,7 +137,7 @@ _gimp_item_transform_translate (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -189,7 +189,7 @@ gimp_item_transform_flip_simple (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
GIMP_TYPE_ORIENTATION_TYPE, flip_type,
G_TYPE_BOOLEAN, auto_center,
G_TYPE_DOUBLE, axis,
@@ -205,7 +205,7 @@ gimp_item_transform_flip_simple (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -257,7 +257,7 @@ _gimp_item_transform_flip_simple (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
GIMP_TYPE_ORIENTATION_TYPE, flip_type,
G_TYPE_BOOLEAN, auto_center,
G_TYPE_DOUBLE, axis,
@@ -273,7 +273,7 @@ _gimp_item_transform_flip_simple (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -327,7 +327,7 @@ gimp_item_transform_flip (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_DOUBLE, x1,
@@ -344,7 +344,7 @@ gimp_item_transform_flip (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -398,7 +398,7 @@ _gimp_item_transform_flip (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_DOUBLE, x1,
@@ -415,7 +415,7 @@ _gimp_item_transform_flip (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -486,7 +486,7 @@ gimp_item_transform_perspective (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_DOUBLE, x1,
@@ -507,7 +507,7 @@ gimp_item_transform_perspective (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -578,7 +578,7 @@ _gimp_item_transform_perspective (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_DOUBLE, x1,
@@ -599,7 +599,7 @@ _gimp_item_transform_perspective (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -656,7 +656,7 @@ gimp_item_transform_rotate_simple (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
GIMP_TYPE_ROTATION_TYPE, rotate_type,
G_TYPE_BOOLEAN, auto_center,
G_TYPE_DOUBLE, center_x,
@@ -673,7 +673,7 @@ gimp_item_transform_rotate_simple (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -730,7 +730,7 @@ _gimp_item_transform_rotate_simple (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
GIMP_TYPE_ROTATION_TYPE, rotate_type,
G_TYPE_BOOLEAN, auto_center,
G_TYPE_DOUBLE, center_x,
@@ -747,7 +747,7 @@ _gimp_item_transform_rotate_simple (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -806,7 +806,7 @@ gimp_item_transform_rotate (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_DOUBLE, angle,
G_TYPE_BOOLEAN, auto_center,
G_TYPE_DOUBLE, center_x,
@@ -823,7 +823,7 @@ gimp_item_transform_rotate (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -882,7 +882,7 @@ _gimp_item_transform_rotate (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_DOUBLE, angle,
G_TYPE_BOOLEAN, auto_center,
G_TYPE_DOUBLE, center_x,
@@ -899,7 +899,7 @@ _gimp_item_transform_rotate (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -955,7 +955,7 @@ gimp_item_transform_scale (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_DOUBLE, x1,
@@ -972,7 +972,7 @@ gimp_item_transform_scale (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1028,7 +1028,7 @@ _gimp_item_transform_scale (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_DOUBLE, x1,
@@ -1045,7 +1045,7 @@ _gimp_item_transform_scale (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1099,7 +1099,7 @@ gimp_item_transform_shear (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
GIMP_TYPE_ORIENTATION_TYPE, shear_type,
G_TYPE_DOUBLE, magnitude,
G_TYPE_NONE);
@@ -1114,7 +1114,7 @@ gimp_item_transform_shear (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1168,7 +1168,7 @@ _gimp_item_transform_shear (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
GIMP_TYPE_ORIENTATION_TYPE, shear_type,
G_TYPE_DOUBLE, magnitude,
G_TYPE_NONE);
@@ -1183,7 +1183,7 @@ _gimp_item_transform_shear (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1248,7 +1248,7 @@ gimp_item_transform_2d (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_DOUBLE, source_x,
G_TYPE_DOUBLE, source_y,
G_TYPE_DOUBLE, scale_x,
@@ -1268,7 +1268,7 @@ gimp_item_transform_2d (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1333,7 +1333,7 @@ _gimp_item_transform_2d (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_DOUBLE, source_x,
G_TYPE_DOUBLE, source_y,
G_TYPE_DOUBLE, scale_x,
@@ -1353,7 +1353,7 @@ _gimp_item_transform_2d (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1420,7 +1420,7 @@ gimp_item_transform_matrix (GimpItem *item,
GimpItem *ret_item = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, gimp_item_get_id (GIMP_ITEM (item)),
+ GIMP_TYPE_ITEM, item,
G_TYPE_DOUBLE, coeff_0_0,
G_TYPE_DOUBLE, coeff_0_1,
G_TYPE_DOUBLE, coeff_0_2,
@@ -1442,7 +1442,7 @@ gimp_item_transform_matrix (GimpItem *item,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item = gimp_item_get_by_id (gimp_value_get_item_id (gimp_value_array_index (return_vals, 1)));
+ ret_item = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1509,7 +1509,7 @@ _gimp_item_transform_matrix (gint32 item_ID,
gint32 ret_item_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_ITEM_ID, item_ID,
+ GIMP_TYPE_ITEM, gimp_item_get_by_id (item_ID),
G_TYPE_DOUBLE, coeff_0_0,
G_TYPE_DOUBLE, coeff_0_1,
G_TYPE_DOUBLE, coeff_0_2,
@@ -1531,7 +1531,7 @@ _gimp_item_transform_matrix (gint32 item_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- ret_item_ID = gimp_value_get_item_id (gimp_value_array_index (return_vals, 1));
+ ret_item_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
diff --git a/libgimp/gimplayer_pdb.c b/libgimp/gimplayer_pdb.c
index 5d355307bc..bad56d997a 100644
--- a/libgimp/gimplayer_pdb.c
+++ b/libgimp/gimplayer_pdb.c
@@ -70,7 +70,7 @@ _gimp_layer_new (GimpImage *image,
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, width,
G_TYPE_INT, height,
GIMP_TYPE_IMAGE_TYPE, type,
@@ -89,7 +89,7 @@ _gimp_layer_new (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -125,8 +125,8 @@ gimp_layer_new_from_visible (GimpImage *image,
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (dest_image),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_IMAGE, dest_image,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -140,7 +140,7 @@ gimp_layer_new_from_visible (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -176,8 +176,8 @@ _gimp_layer_new_from_visible (gint32 image_ID,
gint32 layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_IMAGE_ID, dest_image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (dest_image_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -191,7 +191,7 @@ _gimp_layer_new_from_visible (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -223,8 +223,8 @@ gimp_layer_new_from_drawable (GimpDrawable *drawable,
GimpLayer *layer_copy = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (dest_image),
+ GIMP_TYPE_DRAWABLE, drawable,
+ GIMP_TYPE_IMAGE, dest_image,
G_TYPE_NONE);
if (pdb)
@@ -237,7 +237,7 @@ gimp_layer_new_from_drawable (GimpDrawable *drawable,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_copy = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index
(return_vals, 1))));
+ layer_copy = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -269,8 +269,8 @@ _gimp_layer_new_from_drawable (gint32 drawable_ID,
gint32 layer_copy_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
- GIMP_TYPE_IMAGE_ID, dest_image_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (dest_image_ID),
G_TYPE_NONE);
if (pdb)
@@ -283,7 +283,7 @@ _gimp_layer_new_from_drawable (gint32 drawable_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_copy_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_copy_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -317,7 +317,7 @@ gimp_layer_group_new (GimpImage *image)
GimpLayer *layer_group = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -330,7 +330,7 @@ gimp_layer_group_new (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_group = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index
(return_vals, 1))));
+ layer_group = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -364,7 +364,7 @@ _gimp_layer_group_new (gint32 image_ID)
gint32 layer_group_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -377,7 +377,7 @@ _gimp_layer_group_new (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_group_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_group_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -410,7 +410,7 @@ _gimp_layer_copy (GimpLayer *layer,
GimpLayer *layer_copy = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_BOOLEAN, add_alpha,
G_TYPE_NONE);
@@ -424,7 +424,7 @@ _gimp_layer_copy (GimpLayer *layer,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_copy = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index
(return_vals, 1))));
+ layer_copy = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -454,7 +454,7 @@ gimp_layer_add_alpha (GimpLayer *layer)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -496,7 +496,7 @@ _gimp_layer_add_alpha (gint32 layer_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -539,7 +539,7 @@ gimp_layer_flatten (GimpLayer *layer)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -582,7 +582,7 @@ _gimp_layer_flatten (gint32 layer_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -631,7 +631,7 @@ gimp_layer_scale (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_BOOLEAN, local_origin,
@@ -683,7 +683,7 @@ _gimp_layer_scale (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_BOOLEAN, local_origin,
@@ -735,7 +735,7 @@ gimp_layer_resize (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_INT, offx,
@@ -788,7 +788,7 @@ _gimp_layer_resize (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_INT, new_width,
G_TYPE_INT, new_height,
G_TYPE_INT, offx,
@@ -831,7 +831,7 @@ gimp_layer_resize_to_image_size (GimpLayer *layer)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -870,7 +870,7 @@ _gimp_layer_resize_to_image_size (gint32 layer_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -914,7 +914,7 @@ gimp_layer_set_offsets (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_INT, offx,
G_TYPE_INT, offy,
G_TYPE_NONE);
@@ -960,7 +960,7 @@ _gimp_layer_set_offsets (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_INT, offx,
G_TYPE_INT, offy,
G_TYPE_NONE);
@@ -1021,7 +1021,7 @@ gimp_layer_create_mask (GimpLayer *layer,
GimpLayerMask *mask = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_ADD_MASK_TYPE, mask_type,
G_TYPE_NONE);
@@ -1035,7 +1035,7 @@ gimp_layer_create_mask (GimpLayer *layer,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- mask = GIMP_LAYER_MASK (gimp_item_get_by_id (gimp_value_get_layer_mask_id (gimp_value_array_index
(return_vals, 1))));
+ mask = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1082,7 +1082,7 @@ _gimp_layer_create_mask (gint32 layer_ID,
gint32 mask_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_ADD_MASK_TYPE, mask_type,
G_TYPE_NONE);
@@ -1096,7 +1096,7 @@ _gimp_layer_create_mask (gint32 layer_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- mask_ID = gimp_value_get_layer_mask_id (gimp_value_array_index (return_vals, 1));
+ mask_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1123,7 +1123,7 @@ gimp_layer_get_mask (GimpLayer *layer)
GimpLayerMask *mask = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1136,7 +1136,7 @@ gimp_layer_get_mask (GimpLayer *layer)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- mask = GIMP_LAYER_MASK (gimp_item_get_by_id (gimp_value_get_layer_mask_id (gimp_value_array_index
(return_vals, 1))));
+ mask = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1163,7 +1163,7 @@ _gimp_layer_get_mask (gint32 layer_ID)
gint32 mask_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1176,7 +1176,7 @@ _gimp_layer_get_mask (gint32 layer_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- mask_ID = gimp_value_get_layer_mask_id (gimp_value_array_index (return_vals, 1));
+ mask_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1205,7 +1205,7 @@ gimp_layer_from_mask (GimpLayerMask *mask)
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_MASK_ID, gimp_item_get_id (GIMP_ITEM (mask)),
+ GIMP_TYPE_LAYER_MASK, mask,
G_TYPE_NONE);
if (pdb)
@@ -1218,7 +1218,7 @@ gimp_layer_from_mask (GimpLayerMask *mask)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1247,7 +1247,7 @@ _gimp_layer_from_mask (gint32 mask_ID)
gint32 layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_MASK_ID, mask_ID,
+ GIMP_TYPE_LAYER_MASK, gimp_item_get_by_id (mask_ID),
G_TYPE_NONE);
if (pdb)
@@ -1260,7 +1260,7 @@ _gimp_layer_from_mask (gint32 mask_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -1294,8 +1294,8 @@ gimp_layer_add_mask (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
- GIMP_TYPE_LAYER_MASK_ID, gimp_item_get_id (GIMP_ITEM (mask)),
+ GIMP_TYPE_LAYER, layer,
+ GIMP_TYPE_LAYER_MASK, mask,
G_TYPE_NONE);
if (pdb)
@@ -1341,8 +1341,8 @@ _gimp_layer_add_mask (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
- GIMP_TYPE_LAYER_MASK_ID, mask_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
+ GIMP_TYPE_LAYER_MASK, gimp_item_get_by_id (mask_ID),
G_TYPE_NONE);
if (pdb)
@@ -1383,7 +1383,7 @@ gimp_layer_remove_mask (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_MASK_APPLY_MODE, mode,
G_TYPE_NONE);
@@ -1425,7 +1425,7 @@ _gimp_layer_remove_mask (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_MASK_APPLY_MODE, mode,
G_TYPE_NONE);
@@ -1466,7 +1466,7 @@ gimp_layer_is_floating_sel (GimpLayer *layer)
gboolean is_floating_sel = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1507,7 +1507,7 @@ _gimp_layer_is_floating_sel (gint32 layer_ID)
gboolean is_floating_sel = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1547,7 +1547,7 @@ gimp_layer_get_lock_alpha (GimpLayer *layer)
gboolean lock_alpha = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1587,7 +1587,7 @@ _gimp_layer_get_lock_alpha (gint32 layer_ID)
gboolean lock_alpha = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1629,7 +1629,7 @@ gimp_layer_set_lock_alpha (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_BOOLEAN, lock_alpha,
G_TYPE_NONE);
@@ -1671,7 +1671,7 @@ _gimp_layer_set_lock_alpha (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_BOOLEAN, lock_alpha,
G_TYPE_NONE);
@@ -1712,7 +1712,7 @@ gimp_layer_get_apply_mask (GimpLayer *layer)
gboolean apply_mask = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1753,7 +1753,7 @@ _gimp_layer_get_apply_mask (gint32 layer_ID)
gboolean apply_mask = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1797,7 +1797,7 @@ gimp_layer_set_apply_mask (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_BOOLEAN, apply_mask,
G_TYPE_NONE);
@@ -1841,7 +1841,7 @@ _gimp_layer_set_apply_mask (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_BOOLEAN, apply_mask,
G_TYPE_NONE);
@@ -1883,7 +1883,7 @@ gimp_layer_get_show_mask (GimpLayer *layer)
gboolean show_mask = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1925,7 +1925,7 @@ _gimp_layer_get_show_mask (gint32 layer_ID)
gboolean show_mask = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1969,7 +1969,7 @@ gimp_layer_set_show_mask (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_BOOLEAN, show_mask,
G_TYPE_NONE);
@@ -2013,7 +2013,7 @@ _gimp_layer_set_show_mask (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_BOOLEAN, show_mask,
G_TYPE_NONE);
@@ -2054,7 +2054,7 @@ gimp_layer_get_edit_mask (GimpLayer *layer)
gboolean edit_mask = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -2095,7 +2095,7 @@ _gimp_layer_get_edit_mask (gint32 layer_ID)
gboolean edit_mask = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -2139,7 +2139,7 @@ gimp_layer_set_edit_mask (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_BOOLEAN, edit_mask,
G_TYPE_NONE);
@@ -2183,7 +2183,7 @@ _gimp_layer_set_edit_mask (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_BOOLEAN, edit_mask,
G_TYPE_NONE);
@@ -2222,7 +2222,7 @@ gimp_layer_get_opacity (GimpLayer *layer)
gdouble opacity = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -2261,7 +2261,7 @@ _gimp_layer_get_opacity (gint32 layer_ID)
gdouble opacity = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -2302,7 +2302,7 @@ gimp_layer_set_opacity (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_DOUBLE, opacity,
G_TYPE_NONE);
@@ -2343,7 +2343,7 @@ _gimp_layer_set_opacity (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_DOUBLE, opacity,
G_TYPE_NONE);
@@ -2382,7 +2382,7 @@ gimp_layer_get_mode (GimpLayer *layer)
GimpLayerMode mode = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -2421,7 +2421,7 @@ _gimp_layer_get_mode (gint32 layer_ID)
GimpLayerMode mode = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -2462,7 +2462,7 @@ gimp_layer_set_mode (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_LAYER_MODE, mode,
G_TYPE_NONE);
@@ -2503,7 +2503,7 @@ _gimp_layer_set_mode (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_LAYER_MODE, mode,
G_TYPE_NONE);
@@ -2544,7 +2544,7 @@ gimp_layer_get_blend_space (GimpLayer *layer)
GimpLayerColorSpace blend_space = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -2585,7 +2585,7 @@ _gimp_layer_get_blend_space (gint32 layer_ID)
GimpLayerColorSpace blend_space = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -2628,7 +2628,7 @@ gimp_layer_set_blend_space (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_LAYER_COLOR_SPACE, blend_space,
G_TYPE_NONE);
@@ -2671,7 +2671,7 @@ _gimp_layer_set_blend_space (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_LAYER_COLOR_SPACE, blend_space,
G_TYPE_NONE);
@@ -2712,7 +2712,7 @@ gimp_layer_get_composite_space (GimpLayer *layer)
GimpLayerColorSpace composite_space = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -2753,7 +2753,7 @@ _gimp_layer_get_composite_space (gint32 layer_ID)
GimpLayerColorSpace composite_space = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -2796,7 +2796,7 @@ gimp_layer_set_composite_space (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_LAYER_COLOR_SPACE, composite_space,
G_TYPE_NONE);
@@ -2839,7 +2839,7 @@ _gimp_layer_set_composite_space (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_LAYER_COLOR_SPACE, composite_space,
G_TYPE_NONE);
@@ -2880,7 +2880,7 @@ gimp_layer_get_composite_mode (GimpLayer *layer)
GimpLayerCompositeMode composite_mode = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -2921,7 +2921,7 @@ _gimp_layer_get_composite_mode (gint32 layer_ID)
GimpLayerCompositeMode composite_mode = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -2964,7 +2964,7 @@ gimp_layer_set_composite_mode (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_LAYER_COMPOSITE_MODE, composite_mode,
G_TYPE_NONE);
@@ -3007,7 +3007,7 @@ _gimp_layer_set_composite_mode (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_LAYER_COMPOSITE_MODE, composite_mode,
G_TYPE_NONE);
diff --git a/libgimp/gimploadprocedure.c b/libgimp/gimploadprocedure.c
index 137a574af0..21b8d389b6 100644
--- a/libgimp/gimploadprocedure.c
+++ b/libgimp/gimploadprocedure.c
@@ -94,6 +94,7 @@ gimp_load_procedure_constructed (GObject *object)
GIMP_PROC_VAL_IMAGE (procedure, "image",
"Image",
"Output image",
+ TRUE,
GIMP_PARAM_READWRITE);
}
diff --git a/libgimp/gimppainttools_pdb.c b/libgimp/gimppainttools_pdb.c
index 4563025c57..e6770c9739 100644
--- a/libgimp/gimppainttools_pdb.c
+++ b/libgimp/gimppainttools_pdb.c
@@ -63,7 +63,7 @@ gimp_airbrush (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, pressure,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -115,7 +115,7 @@ _gimp_airbrush (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, pressure,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -165,7 +165,7 @@ gimp_airbrush_default (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -214,7 +214,7 @@ _gimp_airbrush_default (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -278,8 +278,8 @@ gimp_clone (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (src_drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
+ GIMP_TYPE_DRAWABLE, src_drawable,
GIMP_TYPE_CLONE_TYPE, clone_type,
G_TYPE_DOUBLE, src_x,
G_TYPE_DOUBLE, src_y,
@@ -346,8 +346,8 @@ _gimp_clone (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
- GIMP_TYPE_DRAWABLE_ID, src_drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (src_drawable_ID),
GIMP_TYPE_CLONE_TYPE, clone_type,
G_TYPE_DOUBLE, src_x,
G_TYPE_DOUBLE, src_y,
@@ -400,7 +400,7 @@ gimp_clone_default (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -450,7 +450,7 @@ _gimp_clone_default (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -502,7 +502,7 @@ gimp_convolve (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, pressure,
GIMP_TYPE_CONVOLVE_TYPE, convolve_type,
G_TYPE_INT, num_strokes,
@@ -556,7 +556,7 @@ _gimp_convolve (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, pressure,
GIMP_TYPE_CONVOLVE_TYPE, convolve_type,
G_TYPE_INT, num_strokes,
@@ -607,7 +607,7 @@ gimp_convolve_default (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -656,7 +656,7 @@ _gimp_convolve_default (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -707,7 +707,7 @@ gimp_dodgeburn (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, exposure,
GIMP_TYPE_DODGE_BURN_TYPE, dodgeburn_type,
GIMP_TYPE_TRANSFER_MODE, dodgeburn_mode,
@@ -761,7 +761,7 @@ _gimp_dodgeburn (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, exposure,
GIMP_TYPE_DODGE_BURN_TYPE, dodgeburn_type,
GIMP_TYPE_TRANSFER_MODE, dodgeburn_mode,
@@ -812,7 +812,7 @@ gimp_dodgeburn_default (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -860,7 +860,7 @@ _gimp_dodgeburn_default (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -913,7 +913,7 @@ gimp_eraser (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
GIMP_TYPE_BRUSH_APPLICATION_MODE, hardness,
@@ -968,7 +968,7 @@ _gimp_eraser (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
GIMP_TYPE_BRUSH_APPLICATION_MODE, hardness,
@@ -1019,7 +1019,7 @@ gimp_eraser_default (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -1068,7 +1068,7 @@ _gimp_eraser_default (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -1126,8 +1126,8 @@ gimp_heal (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (src_drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
+ GIMP_TYPE_DRAWABLE, src_drawable,
G_TYPE_DOUBLE, src_x,
G_TYPE_DOUBLE, src_y,
G_TYPE_INT, num_strokes,
@@ -1187,8 +1187,8 @@ _gimp_heal (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
- GIMP_TYPE_DRAWABLE_ID, src_drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (src_drawable_ID),
G_TYPE_DOUBLE, src_x,
G_TYPE_DOUBLE, src_y,
G_TYPE_INT, num_strokes,
@@ -1242,7 +1242,7 @@ gimp_heal_default (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -1294,7 +1294,7 @@ _gimp_heal_default (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -1354,7 +1354,7 @@ gimp_paintbrush (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, fade_out,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -1417,7 +1417,7 @@ _gimp_paintbrush (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, fade_out,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -1478,7 +1478,7 @@ gimp_paintbrush_default (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -1536,7 +1536,7 @@ _gimp_paintbrush_default (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -1586,7 +1586,7 @@ gimp_pencil (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -1636,7 +1636,7 @@ _gimp_pencil (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -1685,7 +1685,7 @@ gimp_smudge (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, pressure,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -1735,7 +1735,7 @@ _gimp_smudge (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, pressure,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -1784,7 +1784,7 @@ gimp_smudge_default (GimpDrawable *drawable,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
@@ -1832,7 +1832,7 @@ _gimp_smudge_default (gint32 drawable_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_INT, num_strokes,
GIMP_TYPE_FLOAT_ARRAY, NULL,
G_TYPE_NONE);
diff --git a/libgimp/gimpparamspecs.c b/libgimp/gimpparamspecs.c
index de792f0504..bcfd76f662 100644
--- a/libgimp/gimpparamspecs.c
+++ b/libgimp/gimpparamspecs.c
@@ -29,41 +29,16 @@
/*
- * GIMP_TYPE_IMAGE_ID
+ * GIMP_TYPE_PARAM_IMAGE
*/
-GType
-gimp_image_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpImageID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_IMAGE_ID
- */
-
-static void gimp_param_image_id_class_init (GParamSpecClass *klass);
-static void gimp_param_image_id_init (GParamSpec *pspec);
-static void gimp_param_image_id_set_default (GParamSpec *pspec,
- GValue *value);
-static gboolean gimp_param_image_id_validate (GParamSpec *pspec,
- GValue *value);
-static gint gimp_param_image_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2);
+static void gimp_param_image_class_init (GParamSpecClass *klass);
+static void gimp_param_image_init (GParamSpec *pspec);
+static gboolean gimp_param_image_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_image_id_get_type (void)
+gimp_param_image_get_type (void)
{
static GType type = 0;
@@ -73,108 +48,83 @@ gimp_param_image_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_image_id_class_init,
+ (GClassInitFunc) gimp_param_image_class_init,
NULL, NULL,
- sizeof (GimpParamSpecImageID),
+ sizeof (GimpParamSpecImage),
0,
- (GInstanceInitFunc) gimp_param_image_id_init
+ (GInstanceInitFunc) gimp_param_image_init
};
- type = g_type_register_static (G_TYPE_PARAM_INT,
- "GimpParamImageID", &info, 0);
+ type = g_type_register_static (G_TYPE_PARAM_OBJECT,
+ "GimpParamImage", &info, 0);
}
return type;
}
static void
-gimp_param_image_id_class_init (GParamSpecClass *klass)
+gimp_param_image_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_IMAGE_ID;
- klass->value_set_default = gimp_param_image_id_set_default;
- klass->value_validate = gimp_param_image_id_validate;
- klass->values_cmp = gimp_param_image_id_values_cmp;
+ klass->value_type = GIMP_TYPE_IMAGE;
+ klass->value_validate = gimp_param_image_validate;
}
static void
-gimp_param_image_id_init (GParamSpec *pspec)
+gimp_param_image_init (GParamSpec *pspec)
{
- GimpParamSpecImageID *ispec = GIMP_PARAM_SPEC_IMAGE_ID (pspec);
+ GimpParamSpecImage *ispec = GIMP_PARAM_SPEC_IMAGE (pspec);
ispec->none_ok = FALSE;
}
-static void
-gimp_param_image_id_set_default (GParamSpec *pspec,
- GValue *value)
-{
- value->data[0].v_int = -1;
-}
-
static gboolean
-gimp_param_image_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_image_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecImageID *ispec = GIMP_PARAM_SPEC_IMAGE_ID (pspec);
- gint image_id = value->data[0].v_int;
+ GimpParamSpecImage *ispec = GIMP_PARAM_SPEC_IMAGE (pspec);
+ GimpImage *image = value->data[0].v_pointer;
- if (ispec->none_ok && (image_id == 0 || image_id == -1))
- return FALSE;
+ if (! ispec->none_ok && image == NULL)
+ return TRUE;
- if (! _gimp_image_is_valid (image_id))
+ if (image && (! GIMP_IS_IMAGE (image) ||
+ ! gimp_image_is_valid (image)))
{
- value->data[0].v_int = -1;
+ g_object_unref (image);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
return FALSE;
}
-static gint
-gimp_param_image_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2)
-{
- gint image_id1 = value1->data[0].v_int;
- gint image_id2 = value2->data[0].v_int;
-
- /* try to return at least *something*, it's useless anyway... */
-
- if (image_id1 < image_id2)
- return -1;
- else if (image_id1 > image_id2)
- return 1;
- else
- return 0;
-}
-
/**
- * gimp_param_spec_image_id:
+ * gimp_param_spec_image:
* @name: Canonical name of the property specified.
* @nick: Nick name of the property specified.
* @blurb: Description of the property specified.
- * @none_ok: Whether no ID is a valid value.
+ * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified.
*
- * Creates a new #GimpParamSpecImageID specifying a
- * #GIMP_TYPE_IMAGE_ID property.
+ * Creates a new #GimpParamSpecImage specifying a
+ * #GIMP_TYPE_IMAGE property.
*
* See g_param_spec_internal() for details on property names.
*
- * Returns: (transfer full): The newly created #GimpParamSpecImageID.
+ * Returns: (transfer full): The newly created #GimpParamSpecImage.
*
* Since: 3.0
**/
GParamSpec *
-gimp_param_spec_image_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_image (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecImageID *ispec;
+ GimpParamSpecImage *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_IMAGE_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_IMAGE,
name, nick, blurb, flags);
ispec->none_ok = none_ok ? TRUE : FALSE;
@@ -182,60 +132,18 @@ gimp_param_spec_image_id (const gchar *name,
return G_PARAM_SPEC (ispec);
}
-gint32
-gimp_value_get_image_id (const GValue *value)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_IMAGE_ID (value), -1);
-
- return value->data[0].v_int;
-}
-
-void
-gimp_value_set_image_id (GValue *value,
- gint32 image_id)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_IMAGE_ID (value));
-
- value->data[0].v_int = image_id;
-}
-
/*
- * GIMP_TYPE_ITEM_ID
+ * GIMP_TYPE_PARAM_ITEM
*/
-GType
-gimp_item_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpItemID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_ITEM_ID
- */
-
-static void gimp_param_item_id_class_init (GParamSpecClass *klass);
-static void gimp_param_item_id_init (GParamSpec *pspec);
-static void gimp_param_item_id_set_default (GParamSpec *pspec,
- GValue *value);
-static gboolean gimp_param_item_id_validate (GParamSpec *pspec,
- GValue *value);
-static gint gimp_param_item_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2);
+static void gimp_param_item_class_init (GParamSpecClass *klass);
+static void gimp_param_item_init (GParamSpec *pspec);
+static gboolean gimp_param_item_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_item_id_get_type (void)
+gimp_param_item_get_type (void)
{
static GType type = 0;
@@ -245,108 +153,83 @@ gimp_param_item_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_item_id_class_init,
+ (GClassInitFunc) gimp_param_item_class_init,
NULL, NULL,
- sizeof (GimpParamSpecItemID),
+ sizeof (GimpParamSpecItem),
0,
- (GInstanceInitFunc) gimp_param_item_id_init
+ (GInstanceInitFunc) gimp_param_item_init
};
- type = g_type_register_static (G_TYPE_PARAM_INT,
- "GimpParamItemID", &info, 0);
+ type = g_type_register_static (G_TYPE_PARAM_OBJECT,
+ "GimpParamItem", &info, 0);
}
return type;
}
static void
-gimp_param_item_id_class_init (GParamSpecClass *klass)
+gimp_param_item_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_ITEM_ID;
- klass->value_set_default = gimp_param_item_id_set_default;
- klass->value_validate = gimp_param_item_id_validate;
- klass->values_cmp = gimp_param_item_id_values_cmp;
+ klass->value_type = GIMP_TYPE_ITEM;
+ klass->value_validate = gimp_param_item_validate;
}
static void
-gimp_param_item_id_init (GParamSpec *pspec)
+gimp_param_item_init (GParamSpec *pspec)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
ispec->none_ok = FALSE;
}
-static void
-gimp_param_item_id_set_default (GParamSpec *pspec,
- GValue *value)
-{
- value->data[0].v_int = -1;
-}
-
static gboolean
-gimp_param_item_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_item_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
- gint item_id = value->data[0].v_int;
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
+ GimpItem *item = value->data[0].v_pointer;
- if (ispec->none_ok && (item_id == 0 || item_id == -1))
- return FALSE;
+ if (! ispec->none_ok && item == NULL)
+ return TRUE;
- if (! _gimp_item_is_valid (item_id))
+ if (item && (! GIMP_IS_ITEM (item) ||
+ ! gimp_item_is_valid (item)))
{
- value->data[0].v_int = -1;
+ g_object_unref (item);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
return FALSE;
}
-static gint
-gimp_param_item_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2)
-{
- gint item_id1 = value1->data[0].v_int;
- gint item_id2 = value2->data[0].v_int;
-
- /* try to return at least *something*, it's useless anyway... */
-
- if (item_id1 < item_id2)
- return -1;
- else if (item_id1 > item_id2)
- return 1;
- else
- return 0;
-}
-
/**
- * gimp_param_spec_item_id:
+ * gimp_param_spec_item:
* @name: Canonical name of the property specified.
* @nick: Nick name of the property specified.
* @blurb: Description of the property specified.
- * @none_ok: Whether no ID is a valid value.
+ * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified.
*
- * Creates a new #GimpParamSpecItemID specifying a
- * #GIMP_TYPE_ITEM_ID property.
+ * Creates a new #GimpParamSpecItem specifying a
+ * #GIMP_TYPE_ITEM property.
*
* See g_param_spec_internal() for details on property names.
*
- * Returns: (transfer full): The newly created #GimpParamSpecItemID.
+ * Returns: (transfer full): The newly created #GimpParamSpecItem.
*
* Since: 3.0
**/
GParamSpec *
-gimp_param_spec_item_id (const gchar *name,
+gimp_param_spec_item (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_ITEM_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_ITEM,
name, nick, blurb, flags);
ispec->none_ok = none_ok;
@@ -354,55 +237,18 @@ gimp_param_spec_item_id (const gchar *name,
return G_PARAM_SPEC (ispec);
}
-gint32
-gimp_value_get_item_id (const GValue *value)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_ITEM_ID (value), -1);
-
- return value->data[0].v_int;
-}
-
-void
-gimp_value_set_item_id (GValue *value,
- gint32 item_id)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_ITEM_ID (value));
-
- value->data[0].v_int = item_id;
-}
-
/*
- * GIMP_TYPE_DRAWABLE_ID
+ * GIMP_TYPE_PARAM_DRAWABLE
*/
-GType
-gimp_drawable_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpDrawableID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_DRAWABLE_ID
- */
-
-static void gimp_param_drawable_id_class_init (GParamSpecClass *klass);
-static void gimp_param_drawable_id_init (GParamSpec *pspec);
-static gboolean gimp_param_drawable_id_validate (GParamSpec *pspec,
- GValue *value);
+static void gimp_param_drawable_class_init (GParamSpecClass *klass);
+static void gimp_param_drawable_init (GParamSpec *pspec);
+static gboolean gimp_param_drawable_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_drawable_id_get_type (void)
+gimp_param_drawable_get_type (void)
{
static GType type = 0;
@@ -412,45 +258,47 @@ gimp_param_drawable_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_drawable_id_class_init,
+ (GClassInitFunc) gimp_param_drawable_class_init,
NULL, NULL,
- sizeof (GimpParamSpecDrawableID),
+ sizeof (GimpParamSpecDrawable),
0,
- (GInstanceInitFunc) gimp_param_drawable_id_init
+ (GInstanceInitFunc) gimp_param_drawable_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_ITEM_ID,
- "GimpParamDrawableID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_ITEM,
+ "GimpParamDrawable", &info, 0);
}
return type;
}
static void
-gimp_param_drawable_id_class_init (GParamSpecClass *klass)
+gimp_param_drawable_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_DRAWABLE_ID;
- klass->value_validate = gimp_param_drawable_id_validate;
+ klass->value_type = GIMP_TYPE_DRAWABLE;
+ klass->value_validate = gimp_param_drawable_validate;
}
static void
-gimp_param_drawable_id_init (GParamSpec *pspec)
+gimp_param_drawable_init (GParamSpec *pspec)
{
}
static gboolean
-gimp_param_drawable_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_drawable_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
- gint item_id = value->data[0].v_int;
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
+ GimpItem *item = value->data[0].v_pointer;
- if (ispec->none_ok && (item_id == 0 || item_id == -1))
- return FALSE;
+ if (! ispec->none_ok && item == NULL)
+ return TRUE;
- if (! _gimp_item_is_drawable (item_id))
+ if (item && (! GIMP_IS_DRAWABLE (item) ||
+ ! gimp_item_is_drawable (item)))
{
- value->data[0].v_int = -1;
+ g_object_unref (item);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
@@ -458,32 +306,32 @@ gimp_param_drawable_id_validate (GParamSpec *pspec,
}
/**
- * gimp_param_spec_drawable_id:
+ * gimp_param_spec_drawable:
* @name: Canonical name of the property specified.
* @nick: Nick name of the property specified.
* @blurb: Description of the property specified.
- * @none_ok: Whether no ID is a valid value.
+ * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified.
*
- * Creates a new #GimpParamSpecDrawableID specifying a
- * #GIMP_TYPE_DRAWABLE_ID property.
+ * Creates a new #GimpParamSpecDrawable specifying a
+ * #GIMP_TYPE_DRAWABLE property.
*
* See g_param_spec_internal() for details on property names.
*
- * Returns: (transfer full): The newly created #GimpParamSpecDrawableID.
+ * Returns: (transfer full): The newly created #GimpParamSpecDrawable.
*
* Since: 3.0
**/
GParamSpec *
-gimp_param_spec_drawable_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_drawable (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DRAWABLE_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DRAWABLE,
name, nick, blurb, flags);
ispec->none_ok = none_ok ? TRUE : FALSE;
@@ -491,55 +339,18 @@ gimp_param_spec_drawable_id (const gchar *name,
return G_PARAM_SPEC (ispec);
}
-gint32
-gimp_value_get_drawable_id (const GValue *value)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_DRAWABLE_ID (value), -1);
-
- return value->data[0].v_int;
-}
-
-void
-gimp_value_set_drawable_id (GValue *value,
- gint32 drawable_id)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_DRAWABLE_ID (value));
-
- value->data[0].v_int = drawable_id;
-}
-
-
-/*
- * GIMP_TYPE_LAYER_ID
- */
-
-GType
-gimp_layer_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpLayerID", &info, 0);
- }
-
- return type;
-}
-
/*
- * GIMP_TYPE_PARAM_LAYER_ID
+ * GIMP_TYPE_PARAM_LAYER
*/
-static void gimp_param_layer_id_class_init (GParamSpecClass *klass);
-static void gimp_param_layer_id_init (GParamSpec *pspec);
-static gboolean gimp_param_layer_id_validate (GParamSpec *pspec,
- GValue *value);
+static void gimp_param_layer_class_init (GParamSpecClass *klass);
+static void gimp_param_layer_init (GParamSpec *pspec);
+static gboolean gimp_param_layer_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_layer_id_get_type (void)
+gimp_param_layer_get_type (void)
{
static GType type = 0;
@@ -549,45 +360,47 @@ gimp_param_layer_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_layer_id_class_init,
+ (GClassInitFunc) gimp_param_layer_class_init,
NULL, NULL,
- sizeof (GimpParamSpecLayerID),
+ sizeof (GimpParamSpecLayer),
0,
- (GInstanceInitFunc) gimp_param_layer_id_init
+ (GInstanceInitFunc) gimp_param_layer_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_DRAWABLE_ID,
- "GimpParamLayerID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_DRAWABLE,
+ "GimpParamLayer", &info, 0);
}
return type;
}
static void
-gimp_param_layer_id_class_init (GParamSpecClass *klass)
+gimp_param_layer_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_LAYER_ID;
- klass->value_validate = gimp_param_layer_id_validate;
+ klass->value_type = GIMP_TYPE_LAYER;
+ klass->value_validate = gimp_param_layer_validate;
}
static void
-gimp_param_layer_id_init (GParamSpec *pspec)
+gimp_param_layer_init (GParamSpec *pspec)
{
}
static gboolean
-gimp_param_layer_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_layer_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
- gint item_id = value->data[0].v_int;
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
+ GimpItem *item = value->data[0].v_pointer;
- if (ispec->none_ok && (item_id == 0 || item_id == -1))
- return FALSE;
+ if (! ispec->none_ok && item == NULL)
+ return TRUE;
- if (! _gimp_item_is_layer (item_id))
+ if (item && (! GIMP_IS_LAYER (item) ||
+ ! gimp_item_is_layer (item)))
{
- value->data[0].v_int = -1;
+ g_object_unref (item);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
@@ -595,32 +408,32 @@ gimp_param_layer_id_validate (GParamSpec *pspec,
}
/**
- * gimp_param_spec_layer_id:
+ * gimp_param_spec_layer:
* @name: Canonical name of the property specified.
* @nick: Nick name of the property specified.
* @blurb: Description of the property specified.
- * @none_ok: Whether no ID is a valid value.
+ * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified.
*
- * Creates a new #GimpParamSpecLayerID specifying a
- * #GIMP_TYPE_LAYER_ID property.
+ * Creates a new #GimpParamSpecLayer specifying a
+ * #GIMP_TYPE_LAYER property.
*
* See g_param_spec_internal() for details on property names.
*
- * Returns: (transfer full): The newly created #GimpParamSpecLayerID.
+ * Returns: (transfer full): The newly created #GimpParamSpecLayer.
*
* Since: 3.0
**/
GParamSpec *
-gimp_param_spec_layer_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_layer (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER,
name, nick, blurb, flags);
ispec->none_ok = none_ok ? TRUE : FALSE;
@@ -628,55 +441,18 @@ gimp_param_spec_layer_id (const gchar *name,
return G_PARAM_SPEC (ispec);
}
-gint32
-gimp_value_get_layer_id (const GValue *value)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_LAYER_ID (value), -1);
-
- return value->data[0].v_int;
-}
-
-void
-gimp_value_set_layer_id (GValue *value,
- gint32 layer_id)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_LAYER_ID (value));
-
- value->data[0].v_int = layer_id;
-}
-
/*
- * GIMP_TYPE_CHANNEL_ID
+ * GIMP_TYPE_PARAM_CHANNEL
*/
-GType
-gimp_channel_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpChannelID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_CHANNEL_ID
- */
-
-static void gimp_param_channel_id_class_init (GParamSpecClass *klass);
-static void gimp_param_channel_id_init (GParamSpec *pspec);
-static gboolean gimp_param_channel_id_validate (GParamSpec *pspec,
- GValue *value);
+static void gimp_param_channel_class_init (GParamSpecClass *klass);
+static void gimp_param_channel_init (GParamSpec *pspec);
+static gboolean gimp_param_channel_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_channel_id_get_type (void)
+gimp_param_channel_get_type (void)
{
static GType type = 0;
@@ -686,45 +462,47 @@ gimp_param_channel_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_channel_id_class_init,
+ (GClassInitFunc) gimp_param_channel_class_init,
NULL, NULL,
- sizeof (GimpParamSpecChannelID),
+ sizeof (GimpParamSpecChannel),
0,
- (GInstanceInitFunc) gimp_param_channel_id_init
+ (GInstanceInitFunc) gimp_param_channel_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_DRAWABLE_ID,
- "GimpParamChannelID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_DRAWABLE,
+ "GimpParamChannel", &info, 0);
}
return type;
}
static void
-gimp_param_channel_id_class_init (GParamSpecClass *klass)
+gimp_param_channel_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_CHANNEL_ID;
- klass->value_validate = gimp_param_channel_id_validate;
+ klass->value_type = GIMP_TYPE_CHANNEL;
+ klass->value_validate = gimp_param_channel_validate;
}
static void
-gimp_param_channel_id_init (GParamSpec *pspec)
+gimp_param_channel_init (GParamSpec *pspec)
{
}
static gboolean
-gimp_param_channel_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_channel_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
- gint item_id = value->data[0].v_int;
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
+ GimpItem *item = value->data[0].v_pointer;
- if (ispec->none_ok && (item_id == 0 || item_id == -1))
- return FALSE;
+ if (! ispec->none_ok && item == NULL)
+ return TRUE;
- if (! _gimp_item_is_channel (item_id))
+ if (item && (! GIMP_IS_CHANNEL (item) ||
+ ! gimp_item_is_channel (item)))
{
- value->data[0].v_int = -1;
+ g_object_unref (item);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
@@ -732,32 +510,32 @@ gimp_param_channel_id_validate (GParamSpec *pspec,
}
/**
- * gimp_param_spec_channel_id:
+ * gimp_param_spec_channel:
* @name: Canonical name of the property specified.
* @nick: Nick name of the property specified.
* @blurb: Description of the property specified.
- * @none_ok: Whether no ID is a valid value.
+ * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified.
*
- * Creates a new #GimpParamSpecChannelID specifying a
- * #GIMP_TYPE_CHANNEL_ID property.
+ * Creates a new #GimpParamSpecChannel specifying a
+ * #GIMP_TYPE_CHANNEL property.
*
* See g_param_spec_internal() for details on property names.
*
- * Returns: (transfer full): The newly created #GimpParamSpecChannelID.
+ * Returns: (transfer full): The newly created #GimpParamSpecChannel.
*
* Since: 3.0
**/
GParamSpec *
-gimp_param_spec_channel_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_channel (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_CHANNEL_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_CHANNEL,
name, nick, blurb, flags);
ispec->none_ok = none_ok ? TRUE : FALSE;
@@ -765,55 +543,18 @@ gimp_param_spec_channel_id (const gchar *name,
return G_PARAM_SPEC (ispec);
}
-gint32
-gimp_value_get_channel_id (const GValue *value)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_CHANNEL_ID (value), -1);
-
- return value->data[0].v_int;
-}
-
-void
-gimp_value_set_channel_id (GValue *value,
- gint32 channel_id)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_CHANNEL_ID (value));
-
- value->data[0].v_int = channel_id;
-}
-
/*
- * GIMP_TYPE_LAYER_MASK_ID
+ * GIMP_TYPE_PARAM_LAYER_MASK
*/
-GType
-gimp_layer_mask_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpLayerMaskID", &info, 0);
- }
-
- return type;
-}
-
-
-/*
- * GIMP_TYPE_PARAM_LAYER_MASK_ID
- */
-
-static void gimp_param_layer_mask_id_class_init (GParamSpecClass *klass);
-static void gimp_param_layer_mask_id_init (GParamSpec *pspec);
-static gboolean gimp_param_layer_mask_id_validate (GParamSpec *pspec,
- GValue *value);
+static void gimp_param_layer_mask_class_init (GParamSpecClass *klass);
+static void gimp_param_layer_mask_init (GParamSpec *pspec);
+static gboolean gimp_param_layer_mask_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_layer_mask_id_get_type (void)
+gimp_param_layer_mask_get_type (void)
{
static GType type = 0;
@@ -823,45 +564,47 @@ gimp_param_layer_mask_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_layer_mask_id_class_init,
+ (GClassInitFunc) gimp_param_layer_mask_class_init,
NULL, NULL,
- sizeof (GimpParamSpecLayerMaskID),
+ sizeof (GimpParamSpecLayerMask),
0,
- (GInstanceInitFunc) gimp_param_layer_mask_id_init
+ (GInstanceInitFunc) gimp_param_layer_mask_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_CHANNEL_ID,
- "GimpParamLayerMaskID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_CHANNEL,
+ "GimpParamLayerMask", &info, 0);
}
return type;
}
static void
-gimp_param_layer_mask_id_class_init (GParamSpecClass *klass)
+gimp_param_layer_mask_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_LAYER_MASK_ID;
- klass->value_validate = gimp_param_layer_mask_id_validate;
+ klass->value_type = GIMP_TYPE_LAYER_MASK;
+ klass->value_validate = gimp_param_layer_mask_validate;
}
static void
-gimp_param_layer_mask_id_init (GParamSpec *pspec)
+gimp_param_layer_mask_init (GParamSpec *pspec)
{
}
static gboolean
-gimp_param_layer_mask_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_layer_mask_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
- gint item_id = value->data[0].v_int;
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
+ GimpItem *item = value->data[0].v_pointer;
- if (ispec->none_ok && (item_id == 0 || item_id == -1))
- return FALSE;
+ if (! ispec->none_ok && item == NULL)
+ return TRUE;
- if (! _gimp_item_is_layer_mask (item_id))
+ if (item && (! GIMP_IS_LAYER_MASK (item) ||
+ ! gimp_item_is_layer_mask (item)))
{
- value->data[0].v_int = -1;
+ g_object_unref (item);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
@@ -869,32 +612,32 @@ gimp_param_layer_mask_id_validate (GParamSpec *pspec,
}
/**
- * gimp_param_spec_layer_mask_id:
+ * gimp_param_spec_layer_mask:
* @name: Canonical name of the property specified.
* @nick: Nick name of the property specified.
* @blurb: Description of the property specified.
- * @none_ok: Whether no ID is a valid value.
+ * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified.
*
- * Creates a new #GimpParamSpecLayerMaskID specifying a
- * #GIMP_TYPE_LAYER_MASK_ID property.
+ * Creates a new #GimpParamSpecLayerMask specifying a
+ * #GIMP_TYPE_LAYER_MASK property.
*
* See g_param_spec_internal() for details on property names.
*
- * Returns: (transfer full): The newly created #GimpParamSpecLayerMaskID.
+ * Returns: (transfer full): The newly created #GimpParamSpecLayerMask.
*
* Since: 3.0
**/
GParamSpec *
-gimp_param_spec_layer_mask_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_layer_mask (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER_MASK_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER_MASK,
name, nick, blurb, flags);
ispec->none_ok = none_ok ? TRUE : FALSE;
@@ -902,55 +645,18 @@ gimp_param_spec_layer_mask_id (const gchar *name,
return G_PARAM_SPEC (ispec);
}
-gint32
-gimp_value_get_layer_mask_id (const GValue *value)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_LAYER_MASK_ID (value), -1);
-
- return value->data[0].v_int;
-}
-
-void
-gimp_value_set_layer_mask_id (GValue *value,
- gint32 layer_mask_id)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_LAYER_MASK_ID (value));
-
- value->data[0].v_int = layer_mask_id;
-}
-
-
-/*
- * GIMP_TYPE_SELECTION_ID
- */
-
-GType
-gimp_selection_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpSelectionID", &info, 0);
- }
-
- return type;
-}
-
/*
- * GIMP_TYPE_PARAM_SELECTION_ID
+ * GIMP_TYPE_PARAM_SELECTION
*/
-static void gimp_param_selection_id_class_init (GParamSpecClass *klass);
-static void gimp_param_selection_id_init (GParamSpec *pspec);
-static gboolean gimp_param_selection_id_validate (GParamSpec *pspec,
- GValue *value);
+static void gimp_param_selection_class_init (GParamSpecClass *klass);
+static void gimp_param_selection_init (GParamSpec *pspec);
+static gboolean gimp_param_selection_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_selection_id_get_type (void)
+gimp_param_selection_get_type (void)
{
static GType type = 0;
@@ -960,45 +666,47 @@ gimp_param_selection_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_selection_id_class_init,
+ (GClassInitFunc) gimp_param_selection_class_init,
NULL, NULL,
- sizeof (GimpParamSpecSelectionID),
+ sizeof (GimpParamSpecSelection),
0,
- (GInstanceInitFunc) gimp_param_selection_id_init
+ (GInstanceInitFunc) gimp_param_selection_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_CHANNEL_ID,
- "GimpParamSelectionID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_CHANNEL,
+ "GimpParamSelection", &info, 0);
}
return type;
}
static void
-gimp_param_selection_id_class_init (GParamSpecClass *klass)
+gimp_param_selection_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_SELECTION_ID;
- klass->value_validate = gimp_param_selection_id_validate;
+ klass->value_type = GIMP_TYPE_SELECTION;
+ klass->value_validate = gimp_param_selection_validate;
}
static void
-gimp_param_selection_id_init (GParamSpec *pspec)
+gimp_param_selection_init (GParamSpec *pspec)
{
}
static gboolean
-gimp_param_selection_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_selection_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
- gint item_id = value->data[0].v_int;
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
+ GimpItem *item = value->data[0].v_pointer;
- if (ispec->none_ok && (item_id == 0 || item_id == -1))
- return FALSE;
+ if (! ispec->none_ok && item == NULL)
+ return TRUE;
- if (! _gimp_item_is_selection (item_id))
+ if (item && (! GIMP_IS_SELECTION (item) ||
+ ! gimp_item_is_selection (item)))
{
- value->data[0].v_int = -1;
+ g_object_unref (item);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
@@ -1006,32 +714,32 @@ gimp_param_selection_id_validate (GParamSpec *pspec,
}
/**
- * gimp_param_spec_selection_id:
+ * gimp_param_spec_selection:
* @name: Canonical name of the property specified.
* @nick: Nick name of the property specified.
* @blurb: Description of the property specified.
- * @none_ok: Whether no ID is a valid value.
+ * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified.
*
- * Creates a new #GimpParamSpecSelectionID specifying a
- * #GIMP_TYPE_SELECTION_ID property.
+ * Creates a new #GimpParamSpecSelection specifying a
+ * #GIMP_TYPE_SELECTION property.
*
* See g_param_spec_internal() for details on property names.
*
- * Returns: (transfer full): The newly created #GimpParamSpecSelectionID.
+ * Returns: (transfer full): The newly created #GimpParamSpecSelection.
*
* Since: 3.0
**/
GParamSpec *
-gimp_param_spec_selection_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_selection (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_SELECTION_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_SELECTION,
name, nick, blurb, flags);
ispec->none_ok = none_ok ? TRUE : FALSE;
@@ -1039,55 +747,18 @@ gimp_param_spec_selection_id (const gchar *name,
return G_PARAM_SPEC (ispec);
}
-gint32
-gimp_value_get_selection_id (const GValue *value)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_SELECTION_ID (value), -1);
-
- return value->data[0].v_int;
-}
-
-void
-gimp_value_set_selection_id (GValue *value,
- gint32 selection_id)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_SELECTION_ID (value));
-
- value->data[0].v_int = selection_id;
-}
-
-
-/*
- * GIMP_TYPE_VECTORS_ID
- */
-
-GType
-gimp_vectors_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpVectorsID", &info, 0);
- }
-
- return type;
-}
-
/*
- * GIMP_TYPE_PARAM_VECTORS_ID
+ * GIMP_TYPE_PARAM_VECTORS
*/
-static void gimp_param_vectors_id_class_init (GParamSpecClass *klass);
-static void gimp_param_vectors_id_init (GParamSpec *pspec);
-static gboolean gimp_param_vectors_id_validate (GParamSpec *pspec,
- GValue *value);
+static void gimp_param_vectors_class_init (GParamSpecClass *klass);
+static void gimp_param_vectors_init (GParamSpec *pspec);
+static gboolean gimp_param_vectors_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_vectors_id_get_type (void)
+gimp_param_vectors_get_type (void)
{
static GType type = 0;
@@ -1097,45 +768,47 @@ gimp_param_vectors_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_vectors_id_class_init,
+ (GClassInitFunc) gimp_param_vectors_class_init,
NULL, NULL,
- sizeof (GimpParamSpecVectorsID),
+ sizeof (GimpParamSpecVectors),
0,
- (GInstanceInitFunc) gimp_param_vectors_id_init
+ (GInstanceInitFunc) gimp_param_vectors_init
};
- type = g_type_register_static (GIMP_TYPE_PARAM_ITEM_ID,
- "GimpParamVectorsID", &info, 0);
+ type = g_type_register_static (GIMP_TYPE_PARAM_ITEM,
+ "GimpParamVectors", &info, 0);
}
return type;
}
static void
-gimp_param_vectors_id_class_init (GParamSpecClass *klass)
+gimp_param_vectors_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_VECTORS_ID;
- klass->value_validate = gimp_param_vectors_id_validate;
+ klass->value_type = GIMP_TYPE_VECTORS;
+ klass->value_validate = gimp_param_vectors_validate;
}
static void
-gimp_param_vectors_id_init (GParamSpec *pspec)
+gimp_param_vectors_init (GParamSpec *pspec)
{
}
static gboolean
-gimp_param_vectors_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_vectors_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecItemID *ispec = GIMP_PARAM_SPEC_ITEM_ID (pspec);
- gint item_id = value->data[0].v_int;
+ GimpParamSpecItem *ispec = GIMP_PARAM_SPEC_ITEM (pspec);
+ GimpItem *item = value->data[0].v_pointer;
- if (ispec->none_ok && (item_id == 0 || item_id == -1))
- return FALSE;
+ if (! ispec->none_ok && item == NULL)
+ return TRUE;
- if (! _gimp_item_is_vectors (item_id))
+ if (item && (! GIMP_IS_VECTORS (item) ||
+ ! gimp_item_is_vectors (item)))
{
- value->data[0].v_int = -1;
+ g_object_unref (item);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
@@ -1143,32 +816,32 @@ gimp_param_vectors_id_validate (GParamSpec *pspec,
}
/**
- * gimp_param_spec_vectors_id:
+ * gimp_param_spec_vectors:
* @name: Canonical name of the property specified.
* @nick: Nick name of the property specified.
* @blurb: Description of the property specified.
- * @none_ok: Whether no ID is a valid value.
+ * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified.
*
- * Creates a new #GimpParamSpecVectorsID specifying a
- * #GIMP_TYPE_VECTORS_ID property.
+ * Creates a new #GimpParamSpecVectors specifying a
+ * #GIMP_TYPE_VECTORS property.
*
* See g_param_spec_internal() for details on property names.
*
- * Returns: (transfer full): The newly created #GimpParamSpecVectorsID.
+ * Returns: (transfer full): The newly created #GimpParamSpecVectors.
*
* Since: 3.0
**/
GParamSpec *
-gimp_param_spec_vectors_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_vectors (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecItemID *ispec;
+ GimpParamSpecItem *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_VECTORS_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_VECTORS,
name, nick, blurb, flags);
ispec->none_ok = none_ok ? TRUE : FALSE;
@@ -1176,60 +849,18 @@ gimp_param_spec_vectors_id (const gchar *name,
return G_PARAM_SPEC (ispec);
}
-gint32
-gimp_value_get_vectors_id (const GValue *value)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_VECTORS_ID (value), -1);
-
- return value->data[0].v_int;
-}
-
-void
-gimp_value_set_vectors_id (GValue *value,
- gint32 vectors_id)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_VECTORS_ID (value));
-
- value->data[0].v_int = vectors_id;
-}
-
-
-/*
- * GIMP_TYPE_DISPLAY_ID
- */
-
-GType
-gimp_display_id_get_type (void)
-{
- static GType type = 0;
-
- if (! type)
- {
- const GTypeInfo info = { 0, };
-
- type = g_type_register_static (G_TYPE_INT, "GimpDisplayID", &info, 0);
- }
-
- return type;
-}
-
/*
- * GIMP_TYPE_PARAM_DISPLAY_ID
+ * GIMP_TYPE_PARAM_DISPLAY
*/
-static void gimp_param_display_id_class_init (GParamSpecClass *klass);
-static void gimp_param_display_id_init (GParamSpec *pspec);
-static void gimp_param_display_id_set_default (GParamSpec *pspec,
- GValue *value);
-static gboolean gimp_param_display_id_validate (GParamSpec *pspec,
- GValue *value);
-static gint gimp_param_display_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2);
+static void gimp_param_display_class_init (GParamSpecClass *klass);
+static void gimp_param_display_init (GParamSpec *pspec);
+static gboolean gimp_param_display_validate (GParamSpec *pspec,
+ GValue *value);
GType
-gimp_param_display_id_get_type (void)
+gimp_param_display_get_type (void)
{
static GType type = 0;
@@ -1239,128 +870,86 @@ gimp_param_display_id_get_type (void)
{
sizeof (GParamSpecClass),
NULL, NULL,
- (GClassInitFunc) gimp_param_display_id_class_init,
+ (GClassInitFunc) gimp_param_display_class_init,
NULL, NULL,
- sizeof (GimpParamSpecDisplayID),
+ sizeof (GimpParamSpecDisplay),
0,
- (GInstanceInitFunc) gimp_param_display_id_init
+ (GInstanceInitFunc) gimp_param_display_init
};
- type = g_type_register_static (G_TYPE_PARAM_INT,
- "GimpParamDisplayID", &info, 0);
+ type = g_type_register_static (G_TYPE_PARAM_OBJECT,
+ "GimpParamDisplay", &info, 0);
}
return type;
}
static void
-gimp_param_display_id_class_init (GParamSpecClass *klass)
+gimp_param_display_class_init (GParamSpecClass *klass)
{
- klass->value_type = GIMP_TYPE_DISPLAY_ID;
- klass->value_set_default = gimp_param_display_id_set_default;
- klass->value_validate = gimp_param_display_id_validate;
- klass->values_cmp = gimp_param_display_id_values_cmp;
+ klass->value_type = GIMP_TYPE_DISPLAY;
+ klass->value_validate = gimp_param_display_validate;
}
static void
-gimp_param_display_id_init (GParamSpec *pspec)
+gimp_param_display_init (GParamSpec *pspec)
{
- GimpParamSpecDisplayID *ispec = GIMP_PARAM_SPEC_DISPLAY_ID (pspec);
+ GimpParamSpecDisplay *ispec = GIMP_PARAM_SPEC_DISPLAY (pspec);
ispec->none_ok = FALSE;
}
-static void
-gimp_param_display_id_set_default (GParamSpec *pspec,
- GValue *value)
-{
- value->data[0].v_int = -1;
-}
-
static gboolean
-gimp_param_display_id_validate (GParamSpec *pspec,
- GValue *value)
+gimp_param_display_validate (GParamSpec *pspec,
+ GValue *value)
{
- GimpParamSpecDisplayID *ispec = GIMP_PARAM_SPEC_DISPLAY_ID (pspec);
- gint display_id = value->data[0].v_int;
+ GimpParamSpecDisplay *dspec = GIMP_PARAM_SPEC_DISPLAY (pspec);
+ GimpDisplay *display = value->data[0].v_pointer;
- if (ispec->none_ok && (display_id == 0 || display_id == -1))
- return FALSE;
+ if (! dspec->none_ok && display == NULL)
+ return TRUE;
- if (! _gimp_display_is_valid (display_id))
+ if (display && (! GIMP_IS_DISPLAY (display) ||
+ ! gimp_display_is_valid (display)))
{
- value->data[0].v_int = -1;
+ g_object_unref (display);
+ value->data[0].v_pointer = NULL;
return TRUE;
}
return FALSE;
}
-static gint
-gimp_param_display_id_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2)
-{
- gint display_id1 = value1->data[0].v_int;
- gint display_id2 = value2->data[0].v_int;
-
- /* try to return at least *something*, it's useless anyway... */
-
- if (display_id1 < display_id2)
- return -1;
- else if (display_id1 > display_id2)
- return 1;
- else
- return 0;
-}
-
/**
- * gimp_param_spec_display_id:
+ * gimp_param_spec_display:
* @name: Canonical name of the property specified.
* @nick: Nick name of the property specified.
* @blurb: Description of the property specified.
- * @none_ok: Whether no ID is a valid value.
+ * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified.
*
- * Creates a new #GimpParamSpecDisplayID specifying a
- * #GIMP_TYPE_DISPLAY_ID property.
+ * Creates a new #GimpParamSpecDisplay specifying a
+ * #GIMP_TYPE_DISPLAY property.
*
* See g_param_spec_internal() for details on property names.
*
- * Returns: (transfer full): The newly created #GimpParamSpecDisplayID.
+ * Returns: (transfer full): The newly created #GimpParamSpecDisplay.
*
* Since: 3.0
**/
GParamSpec *
-gimp_param_spec_display_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags)
+gimp_param_spec_display (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags)
{
- GimpParamSpecDisplayID *ispec;
+ GimpParamSpecDisplay *ispec;
- ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DISPLAY_ID,
+ ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DISPLAY,
name, nick, blurb, flags);
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
-
-gint32
-gimp_value_get_display_id (const GValue *value)
-{
- g_return_val_if_fail (GIMP_VALUE_HOLDS_DISPLAY_ID (value), -1);
-
- return value->data[0].v_int;
-}
-
-void
-gimp_value_set_display_id (GValue *value,
- gint32 display_id)
-{
- g_return_if_fail (GIMP_VALUE_HOLDS_DISPLAY_ID (value));
-
- value->data[0].v_int = display_id;
-}
diff --git a/libgimp/gimpparamspecs.h b/libgimp/gimpparamspecs.h
index d289fea25d..f1bba739cc 100644
--- a/libgimp/gimpparamspecs.h
+++ b/libgimp/gimpparamspecs.h
@@ -31,360 +31,253 @@ G_BEGIN_DECLS
/*
- * GIMP_TYPE_IMAGE_ID
+ * GIMP_TYPE_PARAM_IMAGE
*/
-#define GIMP_TYPE_IMAGE_ID (gimp_image_id_get_type ())
-#define GIMP_VALUE_HOLDS_IMAGE_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_IMAGE_ID))
+#define GIMP_VALUE_HOLDS_IMAGE(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_IMAGE))
-GType gimp_image_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_IMAGE (gimp_param_image_get_type ())
+#define GIMP_PARAM_SPEC_IMAGE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_IMAGE,
GimpParamSpecImage))
+#define GIMP_IS_PARAM_SPEC_IMAGE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_IMAGE))
+typedef struct _GimpParamSpecImage GimpParamSpecImage;
-/*
- * GIMP_TYPE_PARAM_IMAGE_ID
- */
-
-#define GIMP_TYPE_PARAM_IMAGE_ID (gimp_param_image_id_get_type ())
-#define GIMP_PARAM_SPEC_IMAGE_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_IMAGE_ID,
GimpParamSpecImageID))
-#define GIMP_IS_PARAM_SPEC_IMAGE_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_IMAGE_ID))
-
-typedef struct _GimpParamSpecImageID GimpParamSpecImageID;
-
-struct _GimpParamSpecImageID
+struct _GimpParamSpecImage
{
- GParamSpecInt parent_instance;
+ GParamSpecObject parent_instance;
- gboolean none_ok;
+ gboolean none_ok;
};
-GType gimp_param_image_id_get_type (void) G_GNUC_CONST;
+GType gimp_param_image_get_type (void) G_GNUC_CONST;
-GParamSpec * gimp_param_spec_image_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags);
-
-gint32 gimp_value_get_image_id (const GValue *value);
-void gimp_value_set_image_id (GValue *value,
- gint32 image_id);
+GParamSpec * gimp_param_spec_image (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_ITEM_ID
+ * GIMP_TYPE_PARAM_ITEM
*/
-#define GIMP_TYPE_ITEM_ID (gimp_item_id_get_type ())
-#define GIMP_VALUE_HOLDS_ITEM_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_ITEM_ID))
+#define GIMP_VALUE_HOLDS_ITEM(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_ITEM))
-GType gimp_item_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_ITEM (gimp_param_item_get_type ())
+#define GIMP_PARAM_SPEC_ITEM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_ITEM,
GimpParamSpecItem))
+#define GIMP_IS_PARAM_SPEC_ITEM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_ITEM))
+typedef struct _GimpParamSpecItem GimpParamSpecItem;
-/*
- * GIMP_TYPE_PARAM_ITEM_ID
- */
-
-#define GIMP_TYPE_PARAM_ITEM_ID (gimp_param_item_id_get_type ())
-#define GIMP_PARAM_SPEC_ITEM_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_ITEM_ID,
GimpParamSpecItemID))
-#define GIMP_IS_PARAM_SPEC_ITEM_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_ITEM_ID))
-
-typedef struct _GimpParamSpecItemID GimpParamSpecItemID;
-
-struct _GimpParamSpecItemID
+struct _GimpParamSpecItem
{
- GParamSpecInt parent_instance;
+ GParamSpecObject parent_instance;
- gboolean none_ok;
+ gboolean none_ok;
};
-GType gimp_param_item_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_item_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_item_get_type (void) G_GNUC_CONST;
-gint32 gimp_value_get_item_id (const GValue *value);
-void gimp_value_set_item_id (GValue *value,
- gint32 item_id);
+GParamSpec * gimp_param_spec_item (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_DRAWABLE_ID
+ * GIMP_TYPE_PARAM_DRAWABLE
*/
-#define GIMP_TYPE_DRAWABLE_ID (gimp_drawable_id_get_type ())
-#define GIMP_VALUE_HOLDS_DRAWABLE_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_DRAWABLE_ID))
+#define GIMP_VALUE_HOLDS_DRAWABLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_DRAWABLE))
-GType gimp_drawable_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_DRAWABLE (gimp_param_drawable_get_type ())
+#define GIMP_PARAM_SPEC_DRAWABLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_DRAWABLE,
GimpParamSpecDrawable))
+#define GIMP_IS_PARAM_SPEC_DRAWABLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_DRAWABLE))
+typedef struct _GimpParamSpecDrawable GimpParamSpecDrawable;
-/*
- * GIMP_TYPE_PARAM_DRAWABLE_ID
- */
-
-#define GIMP_TYPE_PARAM_DRAWABLE_ID (gimp_param_drawable_id_get_type ())
-#define GIMP_PARAM_SPEC_DRAWABLE_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_DRAWABLE_ID, GimpParamSpecDrawableID))
-#define GIMP_IS_PARAM_SPEC_DRAWABLE_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_DRAWABLE_ID))
-
-typedef struct _GimpParamSpecDrawableID GimpParamSpecDrawableID;
-
-struct _GimpParamSpecDrawableID
+struct _GimpParamSpecDrawable
{
- GimpParamSpecItemID parent_instance;
+ GimpParamSpecItem parent_instance;
};
-GType gimp_param_drawable_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_drawable_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_drawable_get_type (void) G_GNUC_CONST;
-gint32 gimp_value_get_drawable_id (const GValue *value);
-void gimp_value_set_drawable_id (GValue *value,
- gint32 drawable_id);
+GParamSpec * gimp_param_spec_drawable (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_LAYER_ID
+ * GIMP_TYPE_PARAM_LAYER
*/
-#define GIMP_TYPE_LAYER_ID (gimp_layer_id_get_type ())
-#define GIMP_VALUE_HOLDS_LAYER_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_LAYER_ID))
-
-GType gimp_layer_id_get_type (void) G_GNUC_CONST;
+#define GIMP_VALUE_HOLDS_LAYER(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_LAYER))
+#define GIMP_TYPE_PARAM_LAYER (gimp_param_layer_get_type ())
+#define GIMP_PARAM_SPEC_LAYER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_LAYER,
GimpParamSpecLayer))
+#define GIMP_IS_PARAM_SPEC_LAYER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_LAYER))
-/*
- * GIMP_TYPE_PARAM_LAYER_ID
- */
-
-#define GIMP_TYPE_PARAM_LAYER_ID (gimp_param_layer_id_get_type ())
-#define GIMP_PARAM_SPEC_LAYER_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_LAYER_ID,
GimpParamSpecLayerID))
-#define GIMP_IS_PARAM_SPEC_LAYER_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_LAYER_ID))
+typedef struct _GimpParamSpecLayer GimpParamSpecLayer;
-typedef struct _GimpParamSpecLayerID GimpParamSpecLayerID;
-
-struct _GimpParamSpecLayerID
+struct _GimpParamSpecLayer
{
- GimpParamSpecDrawableID parent_instance;
+ GimpParamSpecDrawable parent_instance;
};
-GType gimp_param_layer_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_layer_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_layer_get_type (void) G_GNUC_CONST;
-gint32 gimp_value_get_layer_id (const GValue *value);
-void gimp_value_set_layer_id (GValue *value,
- gint32 layer_id);
+GParamSpec * gimp_param_spec_layer (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_CHANNEL_ID
+ * GIMP_TYPE_PARAM_CHANNEL
*/
-#define GIMP_TYPE_CHANNEL_ID (gimp_channel_id_get_type ())
-#define GIMP_VALUE_HOLDS_CHANNEL_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_CHANNEL_ID))
+#define GIMP_VALUE_HOLDS_CHANNEL(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_CHANNEL))
-GType gimp_channel_id_get_type (void) G_GNUC_CONST;
+#define GIMP_TYPE_PARAM_CHANNEL (gimp_param_channel_get_type ())
+#define GIMP_PARAM_SPEC_CHANNEL(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_CHANNEL,
GimpParamSpecChannel))
+#define GIMP_IS_PARAM_SPEC_CHANNEL(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_CHANNEL))
+typedef struct _GimpParamSpecChannel GimpParamSpecChannel;
-/*
- * GIMP_TYPE_PARAM_CHANNEL_ID
- */
-
-#define GIMP_TYPE_PARAM_CHANNEL_ID (gimp_param_channel_id_get_type ())
-#define GIMP_PARAM_SPEC_CHANNEL_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_CHANNEL_ID, GimpParamSpecChannelID))
-#define GIMP_IS_PARAM_SPEC_CHANNEL_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_CHANNEL_ID))
-
-typedef struct _GimpParamSpecChannelID GimpParamSpecChannelID;
-
-struct _GimpParamSpecChannelID
+struct _GimpParamSpecChannel
{
- GimpParamSpecDrawableID parent_instance;
+ GimpParamSpecDrawable parent_instance;
};
-GType gimp_param_channel_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_channel_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_channel_get_type (void) G_GNUC_CONST;
-gint32 gimp_value_get_channel_id (const GValue *value);
-void gimp_value_set_channel_id (GValue *value,
- gint32 channel_id);
+GParamSpec * gimp_param_spec_channel (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_LAYER_MASK_ID
+ * GIMP_TYPE_PARAM_LAYER_MASK
*/
-#define GIMP_TYPE_LAYER_MASK_ID (gimp_layer_mask_id_get_type ())
-#define GIMP_VALUE_HOLDS_LAYER_MASK_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_LAYER_MASK_ID))
-
-GType gimp_layer_mask_id_get_type (void) G_GNUC_CONST;
+#define GIMP_VALUE_HOLDS_LAYER_MASK(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_LAYER_MASK))
+#define GIMP_TYPE_PARAM_LAYER_MASK (gimp_param_layer_mask_get_type ())
+#define GIMP_PARAM_SPEC_LAYER_MASK(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_LAYER_MASK, GimpParamSpecLayerMask))
+#define GIMP_IS_PARAM_SPEC_LAYER_MASK(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_LAYER_MASK))
-/*
- * GIMP_TYPE_PARAM_LAYER_MASK_ID
- */
-
-#define GIMP_TYPE_PARAM_LAYER_MASK_ID (gimp_param_layer_mask_id_get_type ())
-#define GIMP_PARAM_SPEC_LAYER_MASK_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_LAYER_MASK_ID, GimpParamSpecLayerMaskID))
-#define GIMP_IS_PARAM_SPEC_LAYER_MASK_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_LAYER_MASK_ID))
+typedef struct _GimpParamSpecLayerMask GimpParamSpecLayerMask;
-typedef struct _GimpParamSpecLayerMaskID GimpParamSpecLayerMaskID;
-
-struct _GimpParamSpecLayerMaskID
+struct _GimpParamSpecLayerMask
{
- GimpParamSpecChannelID parent_instance;
+ GimpParamSpecChannel parent_instance;
};
-GType gimp_param_layer_mask_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_layer_mask_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_layer_mask_get_type (void) G_GNUC_CONST;
-gint32 gimp_value_get_layer_mask_id (const GValue *value);
-void gimp_value_set_layer_mask_id (GValue *value,
- gint32 layer_mask_id);
+GParamSpec * gimp_param_spec_layer_mask (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_SELECTION_ID
+ * GIMP_TYPE_PARAM_SELECTION
*/
-#define GIMP_TYPE_SELECTION_ID (gimp_selection_id_get_type ())
-#define GIMP_VALUE_HOLDS_SELECTION_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_SELECTION_ID))
-
-GType gimp_selection_id_get_type (void) G_GNUC_CONST;
-
-
-/*
- * GIMP_TYPE_PARAM_SELECTION_ID
- */
+#define GIMP_VALUE_HOLDS_SELECTION(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_SELECTION))
-#define GIMP_TYPE_PARAM_SELECTION_ID (gimp_param_selection_id_get_type ())
-#define GIMP_PARAM_SPEC_SELECTION_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_SELECTION_ID, GimpParamSpecSelectionID))
-#define GIMP_IS_PARAM_SPEC_SELECTION_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_SELECTION_ID))
+#define GIMP_TYPE_PARAM_SELECTION (gimp_param_selection_get_type ())
+#define GIMP_PARAM_SPEC_SELECTION(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_SELECTION,
GimpParamSpecSelection))
+#define GIMP_IS_PARAM_SPEC_SELECTION(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_SELECTION))
-typedef struct _GimpParamSpecSelectionID GimpParamSpecSelectionID;
+typedef struct _GimpParamSpecSelection GimpParamSpecSelection;
-struct _GimpParamSpecSelectionID
+struct _GimpParamSpecSelection
{
- GimpParamSpecChannelID parent_instance;
+ GimpParamSpecChannel parent_instance;
};
-GType gimp_param_selection_id_get_type (void) G_GNUC_CONST;
+GType gimp_param_selection_get_type (void) G_GNUC_CONST;
-GParamSpec * gimp_param_spec_selection_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags);
-
-gint32 gimp_value_get_selection_id (const GValue *value);
-void gimp_value_set_selection_id (GValue *value,
- gint32 selection_id);
+GParamSpec * gimp_param_spec_selection (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_VECTORS_ID
+ * GIMP_TYPE_PARAM_VECTORS
*/
-#define GIMP_TYPE_VECTORS_ID (gimp_vectors_id_get_type ())
-#define GIMP_VALUE_HOLDS_VECTORS_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_VECTORS_ID))
-
-GType gimp_vectors_id_get_type (void) G_GNUC_CONST;
-
-
-/*
- * GIMP_TYPE_PARAM_VECTORS_ID
- */
+#define GIMP_VALUE_HOLDS_VECTORS(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_VECTORS))
-#define GIMP_TYPE_PARAM_VECTORS_ID (gimp_param_vectors_id_get_type ())
-#define GIMP_PARAM_SPEC_VECTORS_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_VECTORS_ID, GimpParamSpecVectorsID))
-#define GIMP_IS_PARAM_SPEC_VECTORS_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_VECTORS_ID))
+#define GIMP_TYPE_PARAM_VECTORS (gimp_param_vectors_get_type ())
+#define GIMP_PARAM_SPEC_VECTORS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_VECTORS,
GimpParamSpecVectors))
+#define GIMP_IS_PARAM_SPEC_VECTORS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_VECTORS))
-typedef struct _GimpParamSpecVectorsID GimpParamSpecVectorsID;
+typedef struct _GimpParamSpecVectors GimpParamSpecVectors;
-struct _GimpParamSpecVectorsID
+struct _GimpParamSpecVectors
{
- GimpParamSpecItemID parent_instance;
+ GimpParamSpecItem parent_instance;
};
-GType gimp_param_vectors_id_get_type (void) G_GNUC_CONST;
-
-GParamSpec * gimp_param_spec_vectors_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags);
+GType gimp_param_vectors_get_type (void) G_GNUC_CONST;
-gint32 gimp_value_get_vectors_id (const GValue *value);
-void gimp_value_set_vectors_id (GValue *value,
- gint32 vectors_id);
+GParamSpec * gimp_param_spec_vectors (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
/*
- * GIMP_TYPE_DISPLAY_ID
+ * GIMP_TYPE_PARAM_DISPLAY
*/
-#define GIMP_TYPE_DISPLAY_ID (gimp_display_id_get_type ())
-#define GIMP_VALUE_HOLDS_DISPLAY_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
- GIMP_TYPE_DISPLAY_ID))
-
-GType gimp_display_id_get_type (void) G_GNUC_CONST;
-
-
-/*
- * GIMP_TYPE_PARAM_DISPLAY_ID
- */
+#define GIMP_VALUE_HOLDS_DISPLAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
+ GIMP_TYPE_DISPLAY))
-#define GIMP_TYPE_PARAM_DISPLAY_ID (gimp_param_display_id_get_type ())
-#define GIMP_PARAM_SPEC_DISPLAY_ID(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec),
GIMP_TYPE_PARAM_DISPLAY_ID, GimpParamSpecDisplayID))
-#define GIMP_IS_PARAM_SPEC_DISPLAY_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec),
GIMP_TYPE_PARAM_DISPLAY_ID))
+#define GIMP_TYPE_PARAM_DISPLAY (gimp_param_display_get_type ())
+#define GIMP_PARAM_SPEC_DISPLAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_DISPLAY,
GimpParamSpecDisplay))
+#define GIMP_IS_PARAM_SPEC_DISPLAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_DISPLAY))
-typedef struct _GimpParamSpecDisplayID GimpParamSpecDisplayID;
+typedef struct _GimpParamSpecDisplay GimpParamSpecDisplay;
-struct _GimpParamSpecDisplayID
+struct _GimpParamSpecDisplay
{
- GParamSpecInt parent_instance;
+ GParamSpecObject parent_instance;
- gboolean none_ok;
+ gboolean none_ok;
};
-GType gimp_param_display_id_get_type (void) G_GNUC_CONST;
+GType gimp_param_display_get_type (void) G_GNUC_CONST;
-GParamSpec * gimp_param_spec_display_id (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- gboolean none_ok,
- GParamFlags flags);
+GParamSpec * gimp_param_spec_display (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ gboolean none_ok,
+ GParamFlags flags);
-gint32 gimp_value_get_display_id (const GValue *value);
-void gimp_value_set_display_id (GValue *value,
- gint32 display_id);
G_END_DECLS
diff --git a/libgimp/gimpplugin.c b/libgimp/gimpplugin.c
index 6c7be62a36..50942b8dab 100644
--- a/libgimp/gimpplugin.c
+++ b/libgimp/gimpplugin.c
@@ -1311,31 +1311,31 @@ _gimp_plug_in_get_item (GimpPlugIn *plug_in,
if (! item)
{
- if (_gimp_item_is_layer (item_id))
+ if (gimp_item_id_is_layer (item_id))
{
item = g_object_new (GIMP_TYPE_LAYER,
"id", item_id,
NULL);
}
- else if (_gimp_item_is_layer_mask (item_id))
+ else if (gimp_item_id_is_layer_mask (item_id))
{
item = g_object_new (GIMP_TYPE_LAYER_MASK,
"id", item_id,
NULL);
}
- else if (_gimp_item_is_selection (item_id))
+ else if (gimp_item_id_is_selection (item_id))
{
item = g_object_new (GIMP_TYPE_SELECTION,
"id", item_id,
NULL);
}
- else if (_gimp_item_is_channel (item_id))
+ else if (gimp_item_id_is_channel (item_id))
{
item = g_object_new (GIMP_TYPE_CHANNEL,
"id", item_id,
NULL);
}
- else if (_gimp_item_is_vectors (item_id))
+ else if (gimp_item_id_is_vectors (item_id))
{
item = g_object_new (GIMP_TYPE_VECTORS,
"id", item_id,
diff --git a/libgimp/gimpprocedure-params.h b/libgimp/gimpprocedure-params.h
index f7aae6c6c0..5c4bbdf849 100644
--- a/libgimp/gimpprocedure-params.h
+++ b/libgimp/gimpprocedure-params.h
@@ -376,31 +376,31 @@ G_BEGIN_DECLS
/* display */
-#define GIMP_PROC_ARG_DISPLAY(class, name, nick, blurb, flags) \
+#define GIMP_PROC_ARG_DISPLAY(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_argument (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_DISPLAY, \
+ gimp_param_spec_display (name, nick, blurb,\
+ none_ok, \
flags))
-#define GIMP_PROC_VAL_DISPLAY(class, name, nick, blurb, flags) \
+#define GIMP_PROC_VAL_DISPLAY(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_return_value (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_DISPLAY, \
+ gimp_param_spec_display (name, nick, blurb,\
+ none_ok, \
flags))
/* image */
-#define GIMP_PROC_ARG_IMAGE(class, name, nick, blurb, flags) \
+#define GIMP_PROC_ARG_IMAGE(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_argument (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_IMAGE, \
+ gimp_param_spec_image (name, nick, blurb,\
+ none_ok, \
flags))
-#define GIMP_PROC_VAL_IMAGE(class, name, nick, blurb, flags) \
+#define GIMP_PROC_VAL_IMAGE(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_return_value (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_IMAGE, \
+ gimp_param_spec_image (name, nick, blurb,\
+ none_ok, \
flags))
#define GIMP_VALUES_GET_IMAGE(args, n) \
@@ -412,16 +412,16 @@ G_BEGIN_DECLS
/* item */
-#define GIMP_PROC_ARG_ITEM(class, name, nick, blurb, flags) \
+#define GIMP_PROC_ARG_ITEM(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_argument (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_ITEM, \
+ gimp_param_spec_item (name, nick, blurb,\
+ none_ok, \
flags))
-#define GIMP_PROC_VAL_ITEM(class, name, nick, blurb, flags) \
+#define GIMP_PROC_VAL_ITEM(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_return_value (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_ITEM, \
+ gimp_param_spec_item (name, nick, blurb,\
+ none_ok, \
flags))
#define GIMP_VALUES_GET_ITEM(args, n) \
@@ -433,16 +433,16 @@ G_BEGIN_DECLS
/* drawable */
-#define GIMP_PROC_ARG_DRAWABLE(class, name, nick, blurb, flags) \
+#define GIMP_PROC_ARG_DRAWABLE(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_argument (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_DRAWABLE, \
+ gimp_param_spec_drawable (name, nick, blurb,\
+ none_ok, \
flags))
-#define GIMP_PROC_VAL_DRAWABLE(class, name, nick, blurb, flags) \
+#define GIMP_PROC_VAL_DRAWABLE(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_return_value (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_DRAWABLE, \
+ gimp_param_spec_drawable (name, nick, blurb,\
+ none_ok, \
flags))
#define GIMP_VALUES_GET_DRAWABLE(args, n) \
@@ -454,16 +454,16 @@ G_BEGIN_DECLS
/* layer */
-#define GIMP_PROC_ARG_LAYER(class, name, nick, blurb, flags) \
+#define GIMP_PROC_ARG_LAYER(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_argument (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_LAYER, \
+ gimp_param_spec_layer (name, nick, blurb,\
+ none_ok, \
flags))
-#define GIMP_PROC_VAL_LAYER(class, name, nick, blurb, flags) \
+#define GIMP_PROC_VAL_LAYER(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_return_value (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_LAYER, \
+ gimp_param_spec_layer (name, nick, blurb,\
+ none_ok, \
flags))
#define GIMP_VALUES_GET_LAYER(args, n) \
@@ -475,16 +475,16 @@ G_BEGIN_DECLS
/* channel */
-#define GIMP_PROC_ARG_CHANNEL(class, name, nick, blurb, flags) \
+#define GIMP_PROC_ARG_CHANNEL(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_argument (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_CHANNEL, \
+ gimp_param_spec_channel (name, nick, blurb,\
+ none_ok, \
flags))
-#define GIMP_PROC_VAL_CHANNEL(class, name, nick, blurb, flags) \
+#define GIMP_PROC_VAL_CHANNEL(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_return_value (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_CHANNEL, \
+ gimp_param_spec_channe (name, nick, blurb,\
+ none_ok, \
flags))
#define GIMP_VALUES_GET_CHANNEL(args, n) \
@@ -496,16 +496,16 @@ G_BEGIN_DECLS
/* layer mask */
-#define GIMP_PROC_ARG_LAYER_MASK(class, name, nick, blurb, flags) \
+#define GIMP_PROC_ARG_LAYER_MASK(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_argument (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_LAYER_MASK, \
+ gimp_param_spec_layer_mask (name, nick, blurb,\
+ none_ok, \
flags))
-#define GIMP_PROC_VAL_LAYER_MASK(class, name, nick, blurb, flags) \
+#define GIMP_PROC_VAL_LAYER_MASK(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_return_value (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_LAYER_MASK, \
+ gimp_param_spec_layer_mask (name, nick, blurb,\
+ none_ok, \
flags))
#define GIMP_VALUES_GET_LAYER_MASK(args, n) \
@@ -517,16 +517,16 @@ G_BEGIN_DECLS
/* selection */
-#define GIMP_PROC_ARG_SELECTION(class, name, nick, blurb, flags) \
+#define GIMP_PROC_ARG_SELECTION(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_argument (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_SELECTION, \
+ gimp_param_spec_selection (name, nick, blurb,\
+ none_ok, \
flags))
-#define GIMP_PROC_VAL_SELECTION(class, name, nick, blurb, flags) \
+#define GIMP_PROC_VAL_SELECTION(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_return_value (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_SELECTION, \
+ gimp_param_spec_selection (name, nick, blurb,\
+ none_ok, \
flags))
#define GIMP_VALUES_GET_SELECTION(args, n) \
@@ -538,16 +538,16 @@ G_BEGIN_DECLS
/* vectors */
-#define GIMP_PROC_ARG_VECTORS(class, name, nick, blurb, flags) \
+#define GIMP_PROC_ARG_VECTORS(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_argument (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_VECTORS, \
+ gimp_param_spec_vectors (name, nick, blurb,\
+ none_ok, \
flags))
-#define GIMP_PROC_VAL_VECTORS(class, name, nick, blurb, flags) \
+#define GIMP_PROC_VAL_VECTORS(class, name, nick, blurb, none_ok, flags) \
gimp_procedure_add_return_value (procedure,\
- g_param_spec_object (name, nick, blurb,\
- GIMP_TYPE_VECTORS, \
+ gimp_param_spec_vectors (name, nick, blurb,\
+ none_ok, \
flags))
#define GIMP_VALUES_GET_VECTORS(args, n) \
diff --git a/libgimp/gimpprocedure.c b/libgimp/gimpprocedure.c
index fe5e3f6583..5abcd6b44a 100644
--- a/libgimp/gimpprocedure.c
+++ b/libgimp/gimpprocedure.c
@@ -1432,38 +1432,7 @@ gimp_procedure_validate_args (GimpProcedure *procedure,
GType arg_type = G_VALUE_TYPE (arg);
GType spec_type = G_PARAM_SPEC_VALUE_TYPE (pspec);
- /* As special cases, validation can transform IDs into their
- * respective object.
- */
- if (arg_type == GIMP_TYPE_IMAGE_ID &&
- spec_type == GIMP_TYPE_IMAGE)
- {
- GValue value = G_VALUE_INIT;
-
- g_value_init (&value, GIMP_TYPE_IMAGE);
- g_value_set_object (&value,
- gimp_image_get_by_id (g_value_get_int (arg)));
- gimp_value_array_remove (args, i);
- gimp_value_array_insert (args, i, &value);
- g_value_unset (&value);
- }
- else if ((arg_type == GIMP_TYPE_ITEM_ID &&
- spec_type == GIMP_TYPE_ITEM) ||
- (arg_type == GIMP_TYPE_DRAWABLE_ID &&
- spec_type == GIMP_TYPE_DRAWABLE) ||
- (arg_type == GIMP_TYPE_LAYER_ID &&
- spec_type == GIMP_TYPE_LAYER))
- {
- GValue value = G_VALUE_INIT;
-
- g_value_init (&value, spec_type);
- g_value_set_object (&value,
- gimp_item_get_by_id (g_value_get_int (arg)));
- gimp_value_array_remove (args, i);
- gimp_value_array_insert (args, i, &value);
- g_value_unset (&value);
- }
- else if (arg_type != spec_type)
+ if (arg_type != spec_type)
{
if (return_vals)
{
@@ -1659,7 +1628,7 @@ _gimp_procedure_get_display (GimpProcedure *procedure,
GimpDisplay *display = NULL;
g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure), NULL);
- g_return_val_if_fail (_gimp_display_is_valid (display_id), NULL);
+ g_return_val_if_fail (gimp_display_id_is_valid (display_id), NULL);
if (G_UNLIKELY (! procedure->priv->displays))
procedure->priv->displays =
@@ -1692,7 +1661,7 @@ _gimp_procedure_get_image (GimpProcedure *procedure,
GimpImage *image = NULL;
g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure), NULL);
- g_return_val_if_fail (_gimp_image_is_valid (image_id), NULL);
+ g_return_val_if_fail (gimp_image_id_is_valid (image_id), NULL);
if (G_UNLIKELY (! procedure->priv->images))
procedure->priv->images =
@@ -1725,7 +1694,7 @@ _gimp_procedure_get_item (GimpProcedure *procedure,
GimpItem *item = NULL;
g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure), NULL);
- g_return_val_if_fail (_gimp_item_is_valid (item_id), NULL);
+ g_return_val_if_fail (gimp_item_id_is_valid (item_id), NULL);
if (G_UNLIKELY (! procedure->priv->items))
procedure->priv->items =
diff --git a/libgimp/gimpprogress_pdb.c b/libgimp/gimpprogress_pdb.c
index a3e30badb1..4280ed9c01 100644
--- a/libgimp/gimpprogress_pdb.c
+++ b/libgimp/gimpprogress_pdb.c
@@ -57,7 +57,7 @@ _gimp_progress_init (const gchar *message,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, message,
- GIMP_TYPE_DISPLAY_ID, gimp_display_get_id (gdisplay),
+ GIMP_TYPE_DISPLAY, gdisplay,
G_TYPE_NONE);
if (pdb)
diff --git a/libgimp/gimpsaveprocedure.c b/libgimp/gimpsaveprocedure.c
index b1b622afba..9376e8e1cf 100644
--- a/libgimp/gimpsaveprocedure.c
+++ b/libgimp/gimpsaveprocedure.c
@@ -79,11 +79,13 @@ gimp_save_procedure_constructed (GObject *object)
GIMP_PROC_ARG_IMAGE (procedure, "image",
"Image",
"The image to save",
+ FALSE,
G_PARAM_READWRITE);
GIMP_PROC_ARG_DRAWABLE (procedure, "drawable",
"Drawable",
"The drawable to save",
+ FALSE,
G_PARAM_READWRITE);
GIMP_PROC_ARG_STRING (procedure, "uri",
diff --git a/libgimp/gimpselection_pdb.c b/libgimp/gimpselection_pdb.c
index e98dbf5f2a..ab5d0a60ba 100644
--- a/libgimp/gimpselection_pdb.c
+++ b/libgimp/gimpselection_pdb.c
@@ -70,7 +70,7 @@ gimp_selection_bounds (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -140,7 +140,7 @@ _gimp_selection_bounds (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -198,7 +198,7 @@ gimp_selection_value (GimpImage *image,
gint value = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, x,
G_TYPE_INT, y,
G_TYPE_NONE);
@@ -244,7 +244,7 @@ _gimp_selection_value (gint32 image_ID,
gint value = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, x,
G_TYPE_INT, y,
G_TYPE_NONE);
@@ -286,7 +286,7 @@ gimp_selection_is_empty (GimpImage *image)
gboolean is_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -326,7 +326,7 @@ _gimp_selection_is_empty (gint32 image_ID)
gboolean is_empty = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -373,7 +373,7 @@ gimp_selection_translate (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, offx,
G_TYPE_INT, offy,
G_TYPE_NONE);
@@ -421,7 +421,7 @@ _gimp_selection_translate (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, offx,
G_TYPE_INT, offy,
G_TYPE_NONE);
@@ -470,7 +470,7 @@ _gimp_selection_float (GimpDrawable *drawable,
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_INT, offx,
G_TYPE_INT, offy,
G_TYPE_NONE);
@@ -485,7 +485,7 @@ _gimp_selection_float (GimpDrawable *drawable,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -512,7 +512,7 @@ gimp_selection_invert (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -551,7 +551,7 @@ _gimp_selection_invert (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -592,7 +592,7 @@ gimp_selection_sharpen (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -633,7 +633,7 @@ _gimp_selection_sharpen (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -672,7 +672,7 @@ gimp_selection_all (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -711,7 +711,7 @@ _gimp_selection_all (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -750,7 +750,7 @@ gimp_selection_none (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -789,7 +789,7 @@ _gimp_selection_none (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -830,7 +830,7 @@ gimp_selection_feather (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_DOUBLE, radius,
G_TYPE_NONE);
@@ -872,7 +872,7 @@ _gimp_selection_feather (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_DOUBLE, radius,
G_TYPE_NONE);
@@ -915,7 +915,7 @@ gimp_selection_border (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, radius,
G_TYPE_NONE);
@@ -958,7 +958,7 @@ _gimp_selection_border (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, radius,
G_TYPE_NONE);
@@ -1000,7 +1000,7 @@ gimp_selection_grow (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, steps,
G_TYPE_NONE);
@@ -1042,7 +1042,7 @@ _gimp_selection_grow (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, steps,
G_TYPE_NONE);
@@ -1085,7 +1085,7 @@ gimp_selection_shrink (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_INT, steps,
G_TYPE_NONE);
@@ -1128,7 +1128,7 @@ _gimp_selection_shrink (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_INT, steps,
G_TYPE_NONE);
@@ -1172,7 +1172,7 @@ gimp_selection_flood (GimpImage *image)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1215,7 +1215,7 @@ _gimp_selection_flood (gint32 image_ID)
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -1255,7 +1255,7 @@ gimp_selection_save (GimpImage *image)
GimpChannel *channel = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_NONE);
if (pdb)
@@ -1268,7 +1268,7 @@ gimp_selection_save (GimpImage *image)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel = GIMP_CHANNEL (gimp_item_get_by_id (gimp_value_get_channel_id (gimp_value_array_index
(return_vals, 1))));
+ channel = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -1296,7 +1296,7 @@ _gimp_selection_save (gint32 image_ID)
gint32 channel_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_NONE);
if (pdb)
@@ -1309,7 +1309,7 @@ _gimp_selection_save (gint32 image_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- channel_ID = gimp_value_get_channel_id (gimp_value_array_index (return_vals, 1));
+ channel_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
diff --git a/libgimp/gimptextlayer_pdb.c b/libgimp/gimptextlayer_pdb.c
index 759e224b5d..8723a6e00b 100644
--- a/libgimp/gimptextlayer_pdb.c
+++ b/libgimp/gimptextlayer_pdb.c
@@ -68,7 +68,7 @@ gimp_text_layer_new (GimpImage *image,
GimpLayer *layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, text,
G_TYPE_STRING, fontname,
G_TYPE_DOUBLE, size,
@@ -85,7 +85,7 @@ gimp_text_layer_new (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index (return_vals,
1))));
+ layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -126,7 +126,7 @@ _gimp_text_layer_new (gint32 image_ID,
gint32 layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, text,
G_TYPE_STRING, fontname,
G_TYPE_DOUBLE, size,
@@ -143,7 +143,7 @@ _gimp_text_layer_new (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -172,7 +172,7 @@ gimp_text_layer_get_text (GimpLayer *layer)
gchar *text = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -214,7 +214,7 @@ _gimp_text_layer_get_text (gint32 layer_ID)
gchar *text = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -257,7 +257,7 @@ gimp_text_layer_set_text (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_STRING, text,
G_TYPE_NONE);
@@ -300,7 +300,7 @@ _gimp_text_layer_set_text (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_STRING, text,
G_TYPE_NONE);
@@ -347,7 +347,7 @@ gimp_text_layer_get_markup (GimpLayer *layer)
gchar *markup = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -393,7 +393,7 @@ _gimp_text_layer_get_markup (gint32 layer_ID)
gchar *markup = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -436,7 +436,7 @@ gimp_text_layer_get_font (GimpLayer *layer)
gchar *font = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -478,7 +478,7 @@ _gimp_text_layer_get_font (gint32 layer_ID)
gchar *font = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -521,7 +521,7 @@ gimp_text_layer_set_font (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_STRING, font,
G_TYPE_NONE);
@@ -564,7 +564,7 @@ _gimp_text_layer_set_font (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_STRING, font,
G_TYPE_NONE);
@@ -609,7 +609,7 @@ gimp_text_layer_get_font_size (GimpLayer *layer,
gdouble font_size = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -657,7 +657,7 @@ _gimp_text_layer_get_font_size (gint32 layer_ID,
gdouble font_size = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -706,7 +706,7 @@ gimp_text_layer_set_font_size (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_DOUBLE, font_size,
GIMP_TYPE_UNIT, unit,
G_TYPE_NONE);
@@ -753,7 +753,7 @@ _gimp_text_layer_set_font_size (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_DOUBLE, font_size,
GIMP_TYPE_UNIT, unit,
G_TYPE_NONE);
@@ -796,7 +796,7 @@ gimp_text_layer_get_antialias (GimpLayer *layer)
gboolean antialias = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -838,7 +838,7 @@ _gimp_text_layer_get_antialias (gint32 layer_ID)
gboolean antialias = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -882,7 +882,7 @@ gimp_text_layer_set_antialias (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_BOOLEAN, antialias,
G_TYPE_NONE);
@@ -926,7 +926,7 @@ _gimp_text_layer_set_antialias (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_BOOLEAN, antialias,
G_TYPE_NONE);
@@ -969,7 +969,7 @@ gimp_text_layer_get_hint_style (GimpLayer *layer)
GimpTextHintStyle style = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1012,7 +1012,7 @@ _gimp_text_layer_get_hint_style (gint32 layer_ID)
GimpTextHintStyle style = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1057,7 +1057,7 @@ gimp_text_layer_set_hint_style (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_TEXT_HINT_STYLE, style,
G_TYPE_NONE);
@@ -1102,7 +1102,7 @@ _gimp_text_layer_set_hint_style (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_TEXT_HINT_STYLE, style,
G_TYPE_NONE);
@@ -1144,7 +1144,7 @@ gimp_text_layer_get_kerning (GimpLayer *layer)
gboolean kerning = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1186,7 +1186,7 @@ _gimp_text_layer_get_kerning (gint32 layer_ID)
gboolean kerning = FALSE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1229,7 +1229,7 @@ gimp_text_layer_set_kerning (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_BOOLEAN, kerning,
G_TYPE_NONE);
@@ -1272,7 +1272,7 @@ _gimp_text_layer_set_kerning (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_BOOLEAN, kerning,
G_TYPE_NONE);
@@ -1315,7 +1315,7 @@ gimp_text_layer_get_language (GimpLayer *layer)
gchar *language = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1358,7 +1358,7 @@ _gimp_text_layer_get_language (gint32 layer_ID)
gchar *language = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1402,7 +1402,7 @@ gimp_text_layer_set_language (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_STRING, language,
G_TYPE_NONE);
@@ -1446,7 +1446,7 @@ _gimp_text_layer_set_language (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_STRING, language,
G_TYPE_NONE);
@@ -1488,7 +1488,7 @@ gimp_text_layer_get_base_direction (GimpLayer *layer)
GimpTextDirection direction = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1530,7 +1530,7 @@ _gimp_text_layer_get_base_direction (gint32 layer_ID)
GimpTextDirection direction = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1574,7 +1574,7 @@ gimp_text_layer_set_base_direction (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_TEXT_DIRECTION, direction,
G_TYPE_NONE);
@@ -1618,7 +1618,7 @@ _gimp_text_layer_set_base_direction (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_TEXT_DIRECTION, direction,
G_TYPE_NONE);
@@ -1660,7 +1660,7 @@ gimp_text_layer_get_justification (GimpLayer *layer)
GimpTextJustification justify = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1702,7 +1702,7 @@ _gimp_text_layer_get_justification (gint32 layer_ID)
GimpTextJustification justify = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1746,7 +1746,7 @@ gimp_text_layer_set_justification (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_TEXT_JUSTIFICATION, justify,
G_TYPE_NONE);
@@ -1790,7 +1790,7 @@ _gimp_text_layer_set_justification (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_TEXT_JUSTIFICATION, justify,
G_TYPE_NONE);
@@ -1833,7 +1833,7 @@ gimp_text_layer_get_color (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -1878,7 +1878,7 @@ _gimp_text_layer_get_color (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -1923,7 +1923,7 @@ gimp_text_layer_set_color (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
GIMP_TYPE_RGB, color,
G_TYPE_NONE);
@@ -1966,7 +1966,7 @@ _gimp_text_layer_set_color (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
GIMP_TYPE_RGB, color,
G_TYPE_NONE);
@@ -2008,7 +2008,7 @@ gimp_text_layer_get_indent (GimpLayer *layer)
gdouble indent = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -2050,7 +2050,7 @@ _gimp_text_layer_get_indent (gint32 layer_ID)
gdouble indent = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -2094,7 +2094,7 @@ gimp_text_layer_set_indent (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_DOUBLE, indent,
G_TYPE_NONE);
@@ -2138,7 +2138,7 @@ _gimp_text_layer_set_indent (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_DOUBLE, indent,
G_TYPE_NONE);
@@ -2180,7 +2180,7 @@ gimp_text_layer_get_line_spacing (GimpLayer *layer)
gdouble line_spacing = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -2222,7 +2222,7 @@ _gimp_text_layer_get_line_spacing (gint32 layer_ID)
gdouble line_spacing = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -2266,7 +2266,7 @@ gimp_text_layer_set_line_spacing (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_DOUBLE, line_spacing,
G_TYPE_NONE);
@@ -2310,7 +2310,7 @@ _gimp_text_layer_set_line_spacing (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_DOUBLE, line_spacing,
G_TYPE_NONE);
@@ -2352,7 +2352,7 @@ gimp_text_layer_get_letter_spacing (GimpLayer *layer)
gdouble letter_spacing = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -2394,7 +2394,7 @@ _gimp_text_layer_get_letter_spacing (gint32 layer_ID)
gdouble letter_spacing = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -2438,7 +2438,7 @@ gimp_text_layer_set_letter_spacing (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_DOUBLE, letter_spacing,
G_TYPE_NONE);
@@ -2482,7 +2482,7 @@ _gimp_text_layer_set_letter_spacing (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_DOUBLE, letter_spacing,
G_TYPE_NONE);
@@ -2529,7 +2529,7 @@ gimp_text_layer_resize (GimpLayer *layer,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_LAYER, layer,
G_TYPE_DOUBLE, width,
G_TYPE_DOUBLE, height,
G_TYPE_NONE);
@@ -2577,7 +2577,7 @@ _gimp_text_layer_resize (gint32 layer_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_DOUBLE, width,
G_TYPE_DOUBLE, height,
G_TYPE_NONE);
diff --git a/libgimp/gimptexttool_pdb.c b/libgimp/gimptexttool_pdb.c
index 29ca4e88b6..b842a3e0be 100644
--- a/libgimp/gimptexttool_pdb.c
+++ b/libgimp/gimptexttool_pdb.c
@@ -85,8 +85,8 @@ gimp_text_fontname (GimpImage *image,
GimpLayer *text_layer = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
G_TYPE_STRING, text,
@@ -107,7 +107,7 @@ gimp_text_fontname (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- text_layer = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id (gimp_value_array_index
(return_vals, 1))));
+ text_layer = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -164,8 +164,8 @@ _gimp_text_fontname (gint32 image_ID,
gint32 text_layer_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_DRAWABLE_ID, drawable_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_DRAWABLE, gimp_item_get_by_id (drawable_ID),
G_TYPE_DOUBLE, x,
G_TYPE_DOUBLE, y,
G_TYPE_STRING, text,
@@ -186,7 +186,7 @@ _gimp_text_fontname (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- text_layer_ID = gimp_value_get_layer_id (gimp_value_array_index (return_vals, 1));
+ text_layer_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
diff --git a/libgimp/gimpthumbnailprocedure.c b/libgimp/gimpthumbnailprocedure.c
index 48a612f432..78e3aaab73 100644
--- a/libgimp/gimpthumbnailprocedure.c
+++ b/libgimp/gimpthumbnailprocedure.c
@@ -89,6 +89,7 @@ gimp_thumbnail_procedure_constructed (GObject *object)
GIMP_PROC_VAL_IMAGE (procedure, "image",
"Image",
"Thumbnail image",
+ TRUE,
GIMP_PARAM_READWRITE);
GIMP_PROC_VAL_INT (procedure, "image-width",
diff --git a/libgimp/gimpvectors_pdb.c b/libgimp/gimpvectors_pdb.c
index 69c6acb91d..f6e21e8ee6 100644
--- a/libgimp/gimpvectors_pdb.c
+++ b/libgimp/gimpvectors_pdb.c
@@ -59,7 +59,7 @@ gimp_vectors_new (GimpImage *image,
GimpVectors *vectors = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -73,7 +73,7 @@ gimp_vectors_new (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors = GIMP_VECTORS (gimp_item_get_by_id (gimp_value_get_vectors_id (gimp_value_array_index
(return_vals, 1))));
+ vectors = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -104,7 +104,7 @@ _gimp_vectors_new (gint32 image_ID,
gint32 vectors_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, name,
G_TYPE_NONE);
@@ -118,7 +118,7 @@ _gimp_vectors_new (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors_ID = gimp_value_get_vectors_id (gimp_value_array_index (return_vals, 1));
+ vectors_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -149,8 +149,8 @@ gimp_vectors_new_from_text_layer (GimpImage *image,
GimpVectors *vectors = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_LAYER_ID, gimp_item_get_id (GIMP_ITEM (layer)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_LAYER, layer,
G_TYPE_NONE);
if (pdb)
@@ -163,7 +163,7 @@ gimp_vectors_new_from_text_layer (GimpImage *image,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors = GIMP_VECTORS (gimp_item_get_by_id (gimp_value_get_vectors_id (gimp_value_array_index
(return_vals, 1))));
+ vectors = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -194,8 +194,8 @@ _gimp_vectors_new_from_text_layer (gint32 image_ID,
gint32 vectors_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_LAYER_ID, layer_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_LAYER, gimp_item_get_by_id (layer_ID),
G_TYPE_NONE);
if (pdb)
@@ -208,7 +208,7 @@ _gimp_vectors_new_from_text_layer (gint32 image_ID,
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors_ID = gimp_value_get_vectors_id (gimp_value_array_index (return_vals, 1));
+ vectors_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -237,7 +237,7 @@ gimp_vectors_copy (GimpVectors *vectors)
GimpVectors *vectors_copy = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_NONE);
if (pdb)
@@ -250,7 +250,7 @@ gimp_vectors_copy (GimpVectors *vectors)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors_copy = GIMP_VECTORS (gimp_item_get_by_id (gimp_value_get_vectors_id (gimp_value_array_index
(return_vals, 1))));
+ vectors_copy = g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
@@ -279,7 +279,7 @@ _gimp_vectors_copy (gint32 vectors_ID)
gint32 vectors_copy_ID = -1;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_NONE);
if (pdb)
@@ -292,7 +292,7 @@ _gimp_vectors_copy (gint32 vectors_ID)
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
- vectors_copy_ID = gimp_value_get_vectors_id (gimp_value_array_index (return_vals, 1));
+ vectors_copy_ID = gimp_item_get_id (g_value_get_object (gimp_value_array_index (return_vals, 1)));
gimp_value_array_unref (return_vals);
@@ -325,7 +325,7 @@ gimp_vectors_get_strokes (GimpVectors *vectors,
gint *stroke_ids = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_NONE);
if (pdb)
@@ -376,7 +376,7 @@ _gimp_vectors_get_strokes (gint32 vectors_ID,
gint *stroke_ids = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_NONE);
if (pdb)
@@ -426,7 +426,7 @@ gimp_vectors_stroke_get_length (GimpVectors *vectors,
gdouble length = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, precision,
G_TYPE_NONE);
@@ -473,7 +473,7 @@ _gimp_vectors_stroke_get_length (gint32 vectors_ID,
gdouble length = 0.0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, precision,
G_TYPE_NONE);
@@ -535,7 +535,7 @@ gimp_vectors_stroke_get_point_at_dist (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, dist,
G_TYPE_DOUBLE, precision,
@@ -610,7 +610,7 @@ _gimp_vectors_stroke_get_point_at_dist (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, dist,
G_TYPE_DOUBLE, precision,
@@ -668,7 +668,7 @@ gimp_vectors_remove_stroke (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_NONE);
@@ -711,7 +711,7 @@ _gimp_vectors_remove_stroke (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_NONE);
@@ -754,7 +754,7 @@ gimp_vectors_stroke_close (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_NONE);
@@ -797,7 +797,7 @@ _gimp_vectors_stroke_close (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_NONE);
@@ -844,7 +844,7 @@ gimp_vectors_stroke_translate (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_INT, off_x,
G_TYPE_INT, off_y,
@@ -893,7 +893,7 @@ _gimp_vectors_stroke_translate (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_INT, off_x,
G_TYPE_INT, off_y,
@@ -942,7 +942,7 @@ gimp_vectors_stroke_scale (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, scale_x,
G_TYPE_DOUBLE, scale_y,
@@ -991,7 +991,7 @@ _gimp_vectors_stroke_scale (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, scale_x,
G_TYPE_DOUBLE, scale_y,
@@ -1042,7 +1042,7 @@ gimp_vectors_stroke_rotate (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, center_x,
G_TYPE_DOUBLE, center_y,
@@ -1094,7 +1094,7 @@ _gimp_vectors_stroke_rotate (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, center_x,
G_TYPE_DOUBLE, center_y,
@@ -1144,7 +1144,7 @@ gimp_vectors_stroke_flip (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
GIMP_TYPE_ORIENTATION_TYPE, flip_type,
G_TYPE_DOUBLE, axis,
@@ -1193,7 +1193,7 @@ _gimp_vectors_stroke_flip (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
GIMP_TYPE_ORIENTATION_TYPE, flip_type,
G_TYPE_DOUBLE, axis,
@@ -1248,7 +1248,7 @@ gimp_vectors_stroke_flip_free (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x1,
G_TYPE_DOUBLE, y1,
@@ -1305,7 +1305,7 @@ _gimp_vectors_stroke_flip_free (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x1,
G_TYPE_DOUBLE, y1,
@@ -1361,7 +1361,7 @@ gimp_vectors_stroke_get_points (GimpVectors *vectors,
GimpVectorsStrokeType type = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_NONE);
@@ -1421,7 +1421,7 @@ _gimp_vectors_stroke_get_points (gint32 vectors_ID,
GimpVectorsStrokeType type = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_NONE);
@@ -1485,7 +1485,7 @@ gimp_vectors_stroke_new_from_points (GimpVectors *vectors,
gint stroke_id = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
GIMP_TYPE_VECTORS_STROKE_TYPE, type,
G_TYPE_INT, num_points,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -1546,7 +1546,7 @@ _gimp_vectors_stroke_new_from_points (gint32 vectors_ID,
gint stroke_id = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
GIMP_TYPE_VECTORS_STROKE_TYPE, type,
G_TYPE_INT, num_points,
GIMP_TYPE_FLOAT_ARRAY, NULL,
@@ -1602,7 +1602,7 @@ gimp_vectors_stroke_interpolate (GimpVectors *vectors,
gdouble *coords = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, precision,
G_TYPE_NONE);
@@ -1661,7 +1661,7 @@ _gimp_vectors_stroke_interpolate (gint32 vectors_ID,
gdouble *coords = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, precision,
G_TYPE_NONE);
@@ -1714,7 +1714,7 @@ gimp_vectors_bezier_stroke_new_moveto (GimpVectors *vectors,
gint stroke_id = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_NONE);
@@ -1761,7 +1761,7 @@ _gimp_vectors_bezier_stroke_new_moveto (gint32 vectors_ID,
gint stroke_id = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_NONE);
@@ -1810,7 +1810,7 @@ gimp_vectors_bezier_stroke_lineto (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
@@ -1859,7 +1859,7 @@ _gimp_vectors_bezier_stroke_lineto (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
@@ -1914,7 +1914,7 @@ gimp_vectors_bezier_stroke_conicto (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
@@ -1971,7 +1971,7 @@ _gimp_vectors_bezier_stroke_conicto (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
@@ -2030,7 +2030,7 @@ gimp_vectors_bezier_stroke_cubicto (GimpVectors *vectors,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
@@ -2091,7 +2091,7 @@ _gimp_vectors_bezier_stroke_cubicto (gint32 vectors_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
@@ -2148,7 +2148,7 @@ gimp_vectors_bezier_stroke_new_ellipse (GimpVectors *vectors,
gint stroke_id = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_DOUBLE, radius_x,
@@ -2204,7 +2204,7 @@ _gimp_vectors_bezier_stroke_new_ellipse (gint32 vectors_ID,
gint stroke_id = 0;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0,
G_TYPE_DOUBLE, radius_x,
@@ -2261,7 +2261,7 @@ gimp_vectors_import_from_file (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, filename,
G_TYPE_BOOLEAN, merge,
G_TYPE_BOOLEAN, scale,
@@ -2324,7 +2324,7 @@ _gimp_vectors_import_from_file (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, filename,
G_TYPE_BOOLEAN, merge,
G_TYPE_BOOLEAN, scale,
@@ -2390,7 +2390,7 @@ gimp_vectors_import_from_string (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, string,
G_TYPE_INT, length,
G_TYPE_BOOLEAN, merge,
@@ -2457,7 +2457,7 @@ _gimp_vectors_import_from_string (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, string,
G_TYPE_INT, length,
G_TYPE_BOOLEAN, merge,
@@ -2517,9 +2517,9 @@ gimp_vectors_export_to_file (GimpImage *image,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
+ GIMP_TYPE_IMAGE, image,
G_TYPE_STRING, filename,
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_NONE);
if (pdb)
@@ -2566,9 +2566,9 @@ _gimp_vectors_export_to_file (gint32 image_ID,
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
G_TYPE_STRING, filename,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_NONE);
if (pdb)
@@ -2615,8 +2615,8 @@ gimp_vectors_export_to_string (GimpImage *image,
gchar *string = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_VECTORS_ID, gimp_item_get_id (GIMP_ITEM (vectors)),
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_VECTORS, vectors,
G_TYPE_NONE);
if (pdb)
@@ -2663,8 +2663,8 @@ _gimp_vectors_export_to_string (gint32 image_ID,
gchar *string = NULL;
args = gimp_value_array_new_from_types (NULL,
- GIMP_TYPE_IMAGE_ID, image_ID,
- GIMP_TYPE_VECTORS_ID, vectors_ID,
+ GIMP_TYPE_IMAGE, gimp_image_get_by_id (image_ID),
+ GIMP_TYPE_VECTORS, gimp_item_get_by_id (vectors_ID),
G_TYPE_NONE);
if (pdb)
diff --git a/pdb/app.pl b/pdb/app.pl
index dc55dd7070..7de0475c02 100644
--- a/pdb/app.pl
+++ b/pdb/app.pl
@@ -232,91 +232,91 @@ sub generate_pspec {
if ($pdbtype eq 'image') {
$none_ok = exists $arg->{none_ok} ? 'TRUE' : 'FALSE';
$pspec = <<CODE;
-gimp_param_spec_image_id ("$name",
- "$nick",
- "$blurb",
- pdb->gimp, $none_ok,
- $flags)
+gimp_param_spec_image ("$name",
+ "$nick",
+ "$blurb",
+ $none_ok,
+ $flags)
CODE
}
elsif ($pdbtype eq 'item') {
$none_ok = exists $arg->{none_ok} ? 'TRUE' : 'FALSE';
$pspec = <<CODE;
-gimp_param_spec_item_id ("$name",
- "$nick",
- "$blurb",
- pdb->gimp, $none_ok,
- $flags)
+gimp_param_spec_item ("$name",
+ "$nick",
+ "$blurb",
+ $none_ok,
+ $flags)
CODE
}
elsif ($pdbtype eq 'drawable') {
$none_ok = exists $arg->{none_ok} ? 'TRUE' : 'FALSE';
$pspec = <<CODE;
-gimp_param_spec_drawable_id ("$name",
- "$nick",
- "$blurb",
- pdb->gimp, $none_ok,
- $flags)
+gimp_param_spec_drawable ("$name",
+ "$nick",
+ "$blurb",
+ $none_ok,
+ $flags)
CODE
}
elsif ($pdbtype eq 'layer') {
$none_ok = exists $arg->{none_ok} ? 'TRUE' : 'FALSE';
$pspec = <<CODE;
-gimp_param_spec_layer_id ("$name",
- "$nick",
- "$blurb",
- pdb->gimp, $none_ok,
- $flags)
+gimp_param_spec_layer ("$name",
+ "$nick",
+ "$blurb",
+ $none_ok,
+ $flags)
CODE
}
elsif ($pdbtype eq 'channel') {
$none_ok = exists $arg->{none_ok} ? 'TRUE' : 'FALSE';
$pspec = <<CODE;
-gimp_param_spec_channel_id ("$name",
- "$nick",
- "$blurb",
- pdb->gimp, $none_ok,
- $flags)
+gimp_param_spec_channel ("$name",
+ "$nick",
+ "$blurb",
+ $none_ok,
+ $flags)
CODE
}
elsif ($pdbtype eq 'layer_mask') {
$none_ok = exists $arg->{none_ok} ? 'TRUE' : 'FALSE';
$pspec = <<CODE;
-gimp_param_spec_layer_mask_id ("$name",
- "$nick",
- "$blurb",
- pdb->gimp, $none_ok,
- $flags)
+gimp_param_spec_layer_mask ("$name",
+ "$nick",
+ "$blurb",
+ $none_ok,
+ $flags)
CODE
}
elsif ($pdbtype eq 'selection') {
$none_ok = exists $arg->{none_ok} ? 'TRUE' : 'FALSE';
$pspec = <<CODE;
-gimp_param_spec_selection_id ("$name",
- "$nick",
- "$blurb",
- pdb->gimp, $none_ok,
- $flags)
+gimp_param_spec_selection ("$name",
+ "$nick",
+ "$blurb",
+ $none_ok,
+ $flags)
CODE
}
elsif ($pdbtype eq 'vectors') {
$none_ok = exists $arg->{none_ok} ? 'TRUE' : 'FALSE';
$pspec = <<CODE;
-gimp_param_spec_vectors_id ("$name",
- "$nick",
- "$blurb",
- pdb->gimp, $none_ok,
- $flags)
+gimp_param_spec_vectors ("$name",
+ "$nick",
+ "$blurb",
+ $none_ok,
+ $flags)
CODE
}
elsif ($pdbtype eq 'display') {
$none_ok = exists $arg->{none_ok} ? 'TRUE' : 'FALSE';
$pspec = <<CODE;
-gimp_param_spec_display_id ("$name",
- "$nick",
- "$blurb",
- pdb->gimp, $none_ok,
- $flags)
+gimp_param_spec_display ("$name",
+ "$nick",
+ "$blurb",
+ $none_ok,
+ $flags)
CODE
}
elsif ($pdbtype eq 'tattoo') {
diff --git a/pdb/groups/display.pdb b/pdb/groups/display.pdb
index 6eba4c23fd..932335c001 100644
--- a/pdb/groups/display.pdb
+++ b/pdb/groups/display.pdb
@@ -16,19 +16,19 @@
# "Perlized" from C source by Manish Singh <yosh gimp org>
-sub display_is_valid {
- $blurb = 'Returns TRUE if the display is valid.';
+sub display_id_is_valid {
+ $blurb = 'Returns TRUE if the display ID is valid.';
$help = <<'HELP';
This procedure checks if the given display ID is valid and refers to an
existing display.
HELP
- &neo_pdb_misc('2007', '2.4');
+ &neo_pdb_misc('2007', '3.0');
@inargs = (
- { name => 'display', type => 'display', no_validate => 1,
- desc => 'The display to check' }
+ { name => 'display_id', type => 'int32',
+ desc => 'The display ID to check' }
);
@outargs = (
@@ -39,7 +39,7 @@ HELP
%invoke = (
code => <<'CODE'
{
- valid = (display != NULL);
+ valid = (gimp_get_display_by_id (gimp, display_id) != NULL);
}
CODE
);
@@ -212,7 +212,7 @@ CODE
@headers = qw("core/gimp.h");
-@procs = qw(display_is_valid
+@procs = qw(display_id_is_valid
display_new
display_delete
display_get_window_handle
diff --git a/pdb/groups/fileops.pdb b/pdb/groups/fileops.pdb
index 987af02e13..b0f47eca69 100644
--- a/pdb/groups/fileops.pdb
+++ b/pdb/groups/fileops.pdb
@@ -107,11 +107,10 @@ HELP
GIMP_PDB_SUCCESS)
{
if (gimp_value_array_length (return_vals) > 1 &&
- GIMP_VALUE_HOLDS_IMAGE_ID (gimp_value_array_index (return_vals, 1)))
+ GIMP_VALUE_HOLDS_IMAGE (gimp_value_array_index (return_vals, 1)))
{
GimpImage *image =
- gimp_value_get_image (gimp_value_array_index (return_vals, 1),
- gimp);
+ g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_image_set_load_proc (image, file_proc);
}
}
diff --git a/pdb/groups/image.pdb b/pdb/groups/image.pdb
index 098d2f6949..fcc617052a 100644
--- a/pdb/groups/image.pdb
+++ b/pdb/groups/image.pdb
@@ -16,30 +16,30 @@
# "Perlized" from C source by Manish Singh <yosh gimp org>
-sub image_is_valid {
- $blurb = 'Returns TRUE if the image is valid.';
+sub image_id_is_valid {
+ $blurb = 'Returns TRUE if the image ID is valid.';
$help = <<'HELP';
-This procedure checks if the given image is valid and refers to an
+This procedure checks if the given image ID is valid and refers to an
existing image.
HELP
- &neo_pdb_misc('2007', '2.4');
+ &neo_pdb_misc('2007', '3.0');
@inargs = (
- { name => 'image', type => 'image', no_validate => 1,
- desc => 'The image to check' }
+ { name => 'image_id', type => 'int32',
+ desc => 'The image ID to check' }
);
@outargs = (
{ name => 'valid', type => 'boolean',
- desc => 'Whether the image is valid' }
+ desc => 'Whether the image ID is valid' }
);
%invoke = (
code => <<'CODE'
{
- valid = GIMP_IS_IMAGE (image);
+ valid = (gimp_image_get_by_id (gimp, image_id) != NULL);
}
CODE
);
@@ -2947,7 +2947,7 @@ CODE
"gimppdb-utils.h"
"gimp-intl.h");
-@procs = qw(image_is_valid
+@procs = qw(image_id_is_valid
image_list
image_new image_new_with_precision
image_duplicate image_delete
diff --git a/pdb/groups/item.pdb b/pdb/groups/item.pdb
index 3dcf66448a..f715b03da7 100644
--- a/pdb/groups/item.pdb
+++ b/pdb/groups/item.pdb
@@ -16,19 +16,19 @@
# "Perlized" from C source by Manish Singh <yosh gimp org>
-sub item_is_valid {
- $blurb = 'Returns TRUE if the item is valid.';
+sub item_id_is_valid {
+ $blurb = 'Returns TRUE if the item ID is valid.';
$help = <<'HELP';
This procedure checks if the given item ID is valid and refers to an
existing item.
HELP
- &neo_pdb_misc('2007', '2.8');
+ &neo_pdb_misc('2007', '3.0');
@inargs = (
- { name => 'item', type => 'item', no_validate => 1,
- desc => 'The item to check' }
+ { name => 'item_id', type => 'int32',
+ desc => 'The item ID to check' }
);
@outargs = (
@@ -39,6 +39,8 @@ HELP
%invoke = (
code => <<'CODE'
{
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
valid = (GIMP_IS_ITEM (item) &&
! gimp_item_is_removed (GIMP_ITEM (item)));
}
@@ -46,217 +48,234 @@ CODE
);
}
-sub item_get_image {
- $blurb = "Returns the item's image.";
+sub item_id_is_drawable {
+ $blurb = 'Returns whether the item ID is a drawable.';
- $help = "This procedure returns the item's image.";
+ $help = <<HELP;
+This procedure returns TRUE if the specified item ID is a drawable.
+HELP
&std_pdb_misc;
- $since = '2.8';
+ $since = '3.0';
@inargs = (
- { name => 'item', type => 'item',
- desc => 'The item' }
+ { name => 'item_id', type => 'int32',
+ desc => 'The item ID' }
);
@outargs = (
- { name => 'image', type => 'image',
- desc => "The item's image" }
+ { name => 'drawable', type => 'boolean',
+ desc => 'TRUE if the item ID is a drawable, FALSE otherwise' }
);
%invoke = (
code => <<'CODE'
{
- image = gimp_item_get_image (GIMP_ITEM (item));
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ drawable = (GIMP_IS_DRAWABLE (item) &&
+ ! gimp_item_is_removed (item));
}
CODE
);
}
-sub item_delete {
- $blurb = 'Delete a item.';
+sub item_id_is_layer {
+ $blurb = 'Returns whether the item ID is a layer.';
- $help = <<'HELP';
-This procedure deletes the specified item. This must not be done if the
-image containing this item was already deleted or if the item was
-already removed from the image. The only case in which this procedure is
-useful is if you want to get rid of a item which has not yet been
-added to an image.
+ $help = <<HELP;
+This procedure returns TRUE if the specified item ID is a layer.
HELP
&std_pdb_misc;
- $since = '2.8';
+ $since = '3.0';
@inargs = (
- { name => 'item', type => 'item',
- desc => 'The item to delete' }
+ { name => 'item_id', type => 'int32',
+ desc => 'The item ID' }
+ );
+
+ @outargs = (
+ { name => 'layer', type => 'boolean',
+ desc => 'TRUE if the item is a layer, FALSE otherwise' }
);
%invoke = (
code => <<'CODE'
{
- if (g_object_is_floating (item))
- {
- g_object_ref_sink (item);
- g_object_unref (item);
- }
- else
- success = FALSE;
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ layer = (GIMP_IS_LAYER (item) &&
+ ! gimp_item_is_removed (item));
}
CODE
);
}
-sub item_is_drawable {
- $blurb = 'Returns whether the item is a drawable.';
+sub item_id_is_text_layer {
+ $blurb = 'Returns whether the item ID is a text layer.';
- $help = <<HELP;
-This procedure returns TRUE if the specified item is a drawable.
+ $help = <<'HELP';
+This procedure returns TRUE if the specified item ID is a text layer.
HELP
- &std_pdb_misc;
- $since = '2.8';
+ &mitch_pdb_misc('2010', '3.0');
@inargs = (
- { name => 'item', type => 'item',
- desc => 'The item' }
+ { name => 'item_id', type => 'int32',
+ desc => 'The item ID' }
);
@outargs = (
- { name => 'drawable', type => 'boolean',
- desc => 'TRUE if the item is a drawable, FALSE otherwise' }
+ { name => 'text_layer', type => 'boolean',
+ desc => 'TRUE if the item is a text layer, FALSE otherwise.' }
);
%invoke = (
- code => <<'CODE'
+ code => <<'CODE'
{
- drawable = GIMP_IS_DRAWABLE (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ text_layer = (GIMP_IS_LAYER (item) &&
+ ! gimp_item_is_removed (item) &&
+ gimp_item_is_text_layer (item));
}
CODE
);
}
-sub item_is_layer {
- $blurb = 'Returns whether the item is a layer.';
+sub item_id_is_channel {
+ $blurb = 'Returns whether the item ID is a channel.';
$help = <<HELP;
-This procedure returns TRUE if the specified item is a layer.
+This procedure returns TRUE if the specified item ID is a channel.
HELP
&std_pdb_misc;
- $since = '2.8';
+ $since = '3.0';
@inargs = (
- { name => 'item', type => 'item',
- desc => 'The item' }
+ { name => 'item_id', type => 'int32',
+ desc => 'The item ID' }
);
@outargs = (
- { name => 'layer', type => 'boolean',
- desc => 'TRUE if the item is a layer, FALSE otherwise' }
+ { name => 'channel', type => 'boolean',
+ desc => 'TRUE if the item ID is a channel, FALSE otherwise' }
);
%invoke = (
code => <<'CODE'
{
- layer = GIMP_IS_LAYER (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ channel = (GIMP_IS_CHANNEL (item) &&
+ ! gimp_item_is_removed (item));
}
CODE
);
}
-sub item_is_text_layer {
- $blurb = 'Returns whether the item is a text layer.';
+sub item_id_is_layer_mask {
+ $blurb = 'Returns whether the item ID is a layer mask.';
- $help = <<'HELP';
-This procedure returns TRUE if the specified item is a text layer.
+ $help = <<HELP;
+This procedure returns TRUE if the specified item ID is a layer mask.
HELP
- &mitch_pdb_misc('2010', '2.8');
+ &std_pdb_misc;
+ $since = '3.0';
@inargs = (
- { name => 'item', type => 'item',
+ { name => 'item_id', type => 'int32',
desc => 'The item' }
);
@outargs = (
- { name => 'text_layer', type => 'boolean',
- desc => 'TRUE if the item is a text layer, FALSE otherwise.' }
+ { name => 'layer_mask', type => 'boolean',
+ desc => 'TRUE if the item ID is a layer mask, FALSE otherwise' }
);
%invoke = (
- code => <<'CODE'
+ code => <<'CODE'
{
- text_layer = gimp_item_is_text_layer (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ layer_mask = (GIMP_IS_LAYER_MASK (item) &&
+ ! gimp_item_is_removed (item));
}
CODE
);
}
-sub item_is_channel {
- $blurb = 'Returns whether the item is a channel.';
+sub item_id_is_selection {
+ $blurb = 'Returns whether the item ID is a selection.';
$help = <<HELP;
-This procedure returns TRUE if the specified item is a channel.
+This procedure returns TRUE if the specified item ID is a selection.
HELP
&std_pdb_misc;
- $since = '2.8';
+ $since = '3,0';
@inargs = (
- { name => 'item', type => 'item',
- desc => 'The item' }
+ { name => 'item_id', type => 'int32',
+ desc => 'The item ID' }
);
@outargs = (
- { name => 'channel', type => 'boolean',
- desc => 'TRUE if the item is a channel, FALSE otherwise' }
+ { name => 'selection', type => 'boolean',
+ desc => 'TRUE if the item ID is a selection, FALSE otherwise' }
);
%invoke = (
code => <<'CODE'
{
- channel = GIMP_IS_CHANNEL (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ selection = (GIMP_IS_SELECTION (item) &&
+ ! gimp_item_is_removed (item));
}
CODE
);
}
-sub item_is_layer_mask {
- $blurb = 'Returns whether the item is a layer mask.';
+sub item_id_is_vectors {
+ $blurb = 'Returns whether the item ID is a vectors.';
$help = <<HELP;
-This procedure returns TRUE if the specified item is a layer mask.
+This procedure returns TRUE if the specified item ID is a vectors.
HELP
&std_pdb_misc;
- $since = '2.8';
+ $since = '3.0';
@inargs = (
- { name => 'item', type => 'item',
- desc => 'The item' }
+ { name => 'item_id', type => 'int32',
+ desc => 'The item ID' }
);
@outargs = (
- { name => 'layer_mask', type => 'boolean',
- desc => 'TRUE if the item is a layer mask, FALSE otherwise' }
+ { name => 'vectors', type => 'boolean',
+ desc => 'TRUE if the item ID is a vectors, FALSE otherwise' }
);
%invoke = (
code => <<'CODE'
{
- layer_mask = GIMP_IS_LAYER_MASK (item);
+ GimpItem *item = gimp_item_get_by_id (gimp, item_id);
+
+ vectors = (GIMP_IS_DRAWABLE (item) &&
+ ! gimp_item_is_removed (item));
}
CODE
);
}
-sub item_is_selection {
- $blurb = 'Returns whether the item is a selection.';
+sub item_get_image {
+ $blurb = "Returns the item's image.";
- $help = <<HELP;
-This procedure returns TRUE if the specified item is a selection.
-HELP
+ $help = "This procedure returns the item's image.";
&std_pdb_misc;
$since = '2.8';
@@ -267,24 +286,28 @@ HELP
);
@outargs = (
- { name => 'selection', type => 'boolean',
- desc => 'TRUE if the item is a selection, FALSE otherwise' }
+ { name => 'image', type => 'image',
+ desc => "The item's image" }
);
%invoke = (
code => <<'CODE'
{
- selection = GIMP_IS_SELECTION (item);
+ image = gimp_item_get_image (GIMP_ITEM (item));
}
CODE
);
}
-sub item_is_vectors {
- $blurb = 'Returns whether the item is a vectors.';
+sub item_delete {
+ $blurb = 'Delete a item.';
- $help = <<HELP;
-This procedure returns TRUE if the specified item is a vectors.
+ $help = <<'HELP';
+This procedure deletes the specified item. This must not be done if the
+image containing this item was already deleted or if the item was
+already removed from the image. The only case in which this procedure is
+useful is if you want to get rid of a item which has not yet been
+added to an image.
HELP
&std_pdb_misc;
@@ -292,18 +315,19 @@ HELP
@inargs = (
{ name => 'item', type => 'item',
- desc => 'The item' }
- );
-
- @outargs = (
- { name => 'vectors', type => 'boolean',
- desc => 'TRUE if the item is a vectors, FALSE otherwise' }
+ desc => 'The item to delete' }
);
%invoke = (
code => <<'CODE'
{
- vectors = GIMP_IS_VECTORS (item);
+ if (g_object_is_floating (item))
+ {
+ g_object_ref_sink (item);
+ g_object_unref (item);
+ }
+ else
+ success = FALSE;
}
CODE
);
@@ -958,16 +982,16 @@ CODE
"gimppdbcontext.h"
"gimp-intl.h");
-@procs = qw(item_is_valid
+@procs = qw(item_id_is_valid
+ item_id_is_drawable
+ item_id_is_layer
+ item_id_is_text_layer
+ item_id_is_channel
+ item_id_is_layer_mask
+ item_id_is_selection
+ item_id_is_vectors
item_get_image
item_delete
- item_is_drawable
- item_is_layer
- item_is_text_layer
- item_is_channel
- item_is_layer_mask
- item_is_selection
- item_is_vectors
item_is_group
item_get_parent
item_get_children
diff --git a/pdb/lib.pl b/pdb/lib.pl
index c787b544a0..2274f43f4c 100644
--- a/pdb/lib.pl
+++ b/pdb/lib.pl
@@ -236,7 +236,7 @@ sub generate_fun {
if (exists $_->{array}) {
$value_array .= "NULL";
}
- elsif (exists $arg->{convert_func} && ! $api_deprecated) {
+ elsif (exists $arg->{convert_func} && $api_deprecated) {
$value_array .= eval qq/"$arg->{convert_func}"/;
}
else {
diff --git a/pdb/pdb.pl b/pdb/pdb.pl
index c5f4a691b6..1487d3ac42 100644
--- a/pdb/pdb.pl
+++ b/pdb/pdb.pl
@@ -149,7 +149,7 @@ package Gimp::CodeGen::pdb;
headers => [ qw(<cairo.h> "libgimpcolor/gimpcolor.h") ] },
display => { name => 'DISPLAY',
- gtype => 'GIMP_TYPE_DISPLAY_ID',
+ gtype => 'GIMP_TYPE_DISPLAY',
type => 'GimpDisplay *',
const_type => 'GimpDisplay *',
app_type => 'GimpObject *',
@@ -157,131 +157,131 @@ package Gimp::CodeGen::pdb;
id => 1,
init_value => 'NULL',
out_annotate => '(transfer none)',
- get_value_func => '$var = gimp_value_get_display ($value, gimp)',
- dup_value_func => '$var = gimp_display_get_by_id (gimp_value_get_display_id ($value))',
- dup_value_func_d=> '$var = gimp_value_get_display_id ($value)',
- set_value_func => 'gimp_value_set_display_id ($value, gimp_display_get_id ($var))',
- take_value_func => 'gimp_value_set_display ($value, $var)' ,
- convert_func => 'gimp_display_get_id ($var)'},
+ get_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func_d=> '$var = gimp_display_get_id (g_value_get_object ($value))',
+ set_value_func => 'g_value_set_object ($value, $var)',
+ take_value_func => 'g_value_set_object ($value, $var)' ,
+ convert_func => 'gimp_display_get_by_id ($var)'},
image => { name => 'IMAGE',
- gtype => 'GIMP_TYPE_IMAGE_ID',
+ gtype => 'GIMP_TYPE_IMAGE',
type => 'GimpImage *',
const_type => 'GimpImage *',
id => 1,
init_value => 'NULL',
out_annotate => '(transfer none)',
- get_value_func => '$var = gimp_value_get_image ($value, gimp)',
- dup_value_func => '$var = gimp_image_get_by_id (gimp_value_get_image_id ($value))',
- dup_value_func_d=> '$var = gimp_value_get_image_id ($value)',
- set_value_func => 'gimp_value_set_image_id ($value, gimp_image_get_id ($var))',
- take_value_func => 'gimp_value_set_image ($value, $var)',
- convert_func => 'gimp_image_get_id ($var)',
+ get_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func_d=> '$var = gimp_image_get_id (g_value_get_object ($value))',
+ set_value_func => 'g_value_set_object ($value, $var)',
+ take_value_func => 'g_value_set_object ($value, $var)',
+ convert_func => 'gimp_image_get_by_id ($var)',
headers => [ qw("core/gimpimage.h") ] },
item => { name => 'ITEM',
- gtype => 'GIMP_TYPE_ITEM_ID',
+ gtype => 'GIMP_TYPE_ITEM',
type => 'GimpItem *',
const_type => 'GimpItem *',
id => 1,
init_value => 'NULL',
out_annotate => '(transfer none)',
- get_value_func => '$var = gimp_value_get_item ($value, gimp)',
- dup_value_func => '$var = gimp_item_get_by_id (gimp_value_get_item_id ($value))',
- dup_value_func_d=> '$var = gimp_value_get_item_id ($value)',
- set_value_func => 'gimp_value_set_item_id ($value, $var)',
- take_value_func => 'gimp_value_set_item ($value, $var)',
- convert_func => 'gimp_item_get_id (GIMP_ITEM ($var))',
+ get_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func_d=> '$var = gimp_item_get_id (g_value_get_object ($value))',
+ set_value_func => 'g_value_set_object ($value, $var)',
+ take_value_func => 'g_value_set_object ($value, $var)',
+ convert_func => 'gimp_item_get_by_id ($var)',
headers => [ qw("core/gimpitem.h") ] },
layer => { name => 'LAYER',
- gtype => 'GIMP_TYPE_LAYER_ID',
+ gtype => 'GIMP_TYPE_LAYER',
type => 'GimpLayer *',
const_type => 'GimpLayer *',
id => 1,
init_value => 'NULL',
out_annotate => '(transfer none)',
- get_value_func => '$var = gimp_value_get_layer ($value, gimp)',
- dup_value_func => '$var = GIMP_LAYER (gimp_item_get_by_id (gimp_value_get_layer_id
($value)))',
- dup_value_func_d=> '$var = gimp_value_get_layer_id ($value)',
- set_value_func => 'gimp_value_set_layer_id ($value, $var)',
- take_value_func => 'gimp_value_set_layer ($value, $var)',
- convert_func => 'gimp_item_get_id (GIMP_ITEM ($var))',
+ get_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func_d=> '$var = gimp_item_get_id (g_value_get_object ($value))',
+ set_value_func => 'g_value_set_object ($value, $var)',
+ take_value_func => 'g_value_set_object ($value, $var)',
+ convert_func => 'gimp_item_get_by_id ($var)',
headers => [ qw("core/gimplayer.h") ] },
channel => { name => 'CHANNEL',
- gtype => 'GIMP_TYPE_CHANNEL_ID',
+ gtype => 'GIMP_TYPE_CHANNEL',
type => 'GimpChannel *',
const_type => 'GimpChannel *',
id => 1,
init_value => 'NULL',
out_annotate => '(transfer none)',
- get_value_func => '$var = gimp_value_get_channel ($value, gimp)',
- dup_value_func => '$var = GIMP_CHANNEL (gimp_item_get_by_id (gimp_value_get_channel_id
($value)))',
- dup_value_func_d=> '$var = gimp_value_get_channel_id ($value)',
- set_value_func => 'gimp_value_set_channel_id ($value, $var)',
- take_value_func => 'gimp_value_set_channel ($value, $var)',
- convert_func => 'gimp_item_get_id (GIMP_ITEM ($var))',
+ get_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func_d=> '$var = gimp_item_get_id (g_value_get_object ($value))',
+ set_value_func => 'g_value_set_object ($value, $var)',
+ take_value_func => 'g_value_set_object ($value, $var)',
+ convert_func => 'gimp_item_get_by_id ($var)',
headers => [ qw("core/gimpchannel.h") ] },
drawable => { name => 'DRAWABLE',
- gtype => 'GIMP_TYPE_DRAWABLE_ID',
+ gtype => 'GIMP_TYPE_DRAWABLE',
type => 'GimpDrawable *',
const_type => 'GimpDrawable *',
id => 1,
init_value => 'NULL',
out_annotate => '(transfer none)',
- get_value_func => '$var = gimp_value_get_drawable ($value, gimp)',
- dup_value_func => '$var = GIMP_DRAWABLE (gimp_item_get_by_id
(gimp_value_get_drawable_id ($value)))',
- dup_value_func_d=> '$var = gimp_value_get_drawable_id ($value)',
- set_value_func => 'gimp_value_set_drawable_id ($value, $var)',
- take_value_func => 'gimp_value_set_drawable ($value, $var)',
- convert_func => 'gimp_item_get_id (GIMP_ITEM ($var))',
+ get_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func_d=> '$var = gimp_item_get_id (g_value_get_object ($value))',
+ set_value_func => 'g_value_set_object ($value, $var)',
+ take_value_func => 'g_value_set_object ($value, $var)',
+ convert_func => 'gimp_item_get_by_id ($var)',
headers => [ qw("core/gimpdrawable.h") ] },
selection => { name => 'SELECTION',
- gtype => 'GIMP_TYPE_SELECTION_ID',
+ gtype => 'GIMP_TYPE_SELECTION',
type => 'GimpSelection *',
const_type => 'GimpSelection *',
id => 1,
init_value => 'NULL',
out_annotate => '(transfer none)',
- get_value_func => '$var = gimp_value_get_selection ($value, gimp)',
- dup_value_func => '$var = GIMP_SELECTION (gimp_item_get_by_id
(gimp_value_get_selection_id ($value)))',
- dup_value_func_d=> '$var = gimp_value_get_selection_id ($value)',
- set_value_func => 'gimp_value_set_selection_id ($value, $var)',
- take_value_func => 'gimp_value_set_selection ($value, $var)',
- convert_func => 'gimp_item_get_id (GIMP_ITEM ($var))',
+ get_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func_d=> '$var = gimp_item_get_id (g_value_get_object ($value))',
+ set_value_func => 'g_value_set_object ($value, $var)',
+ take_value_func => 'g_value_set_object ($value, $var)',
+ convert_func => 'gimp_item_get_by_id ($var)',
headers => [ qw("core/gimpselection.h") ] },
layer_mask => { name => 'CHANNEL',
- gtype => 'GIMP_TYPE_LAYER_MASK_ID',
+ gtype => 'GIMP_TYPE_LAYER_MASK',
type => 'GimpLayerMask *',
const_type => 'GimpLayerMask *',
id => 1,
init_value => 'NULL',
out_annotate => '(transfer none)',
- get_value_func => '$var = gimp_value_get_layer_mask ($value, gimp)',
- dup_value_func => '$var = GIMP_LAYER_MASK (gimp_item_get_by_id
(gimp_value_get_layer_mask_id ($value)))',
- dup_value_func_d=> '$var = gimp_value_get_layer_mask_id ($value)',
- set_value_func => 'gimp_value_set_layer_mask_id ($value, $var)',
- take_value_func => 'gimp_value_set_layer_mask ($value, $var)',
- convert_func => 'gimp_item_get_id (GIMP_ITEM ($var))',
+ get_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func_d=> '$var = gimp_item_get_id (g_value_get_object ($value))',
+ set_value_func => 'g_value_set_object ($value, $var)',
+ take_value_func => 'g_value_set_object ($value, $var)',
+ convert_func => 'gimp_item_get_by_id ($var)',
headers => [ qw("core/gimplayermask.h") ] },
vectors => { name => 'VECTORS',
- gtype => 'GIMP_TYPE_VECTORS_ID',
+ gtype => 'GIMP_TYPE_VECTORS',
type => 'GimpVectors *',
const_type => 'GimpVectors *',
id => 1,
init_value => 'NULL',
out_annotate => '(transfer none)',
- get_value_func => '$var = gimp_value_get_vectors ($value, gimp)',
- dup_value_func => '$var = GIMP_VECTORS (gimp_item_get_by_id (gimp_value_get_vectors_id
($value)))',
- dup_value_func_d=> '$var = gimp_value_get_vectors_id ($value)',
- set_value_func => 'gimp_value_set_vectors_id ($value, $var)',
- take_value_func => 'gimp_value_set_vectors ($value, $var)',
- convert_func => 'gimp_item_get_id (GIMP_ITEM ($var))',
+ get_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func => '$var = g_value_get_object ($value)',
+ dup_value_func_d=> '$var = gimp_item_get_id (g_value_get_object ($value))',
+ set_value_func => 'g_value_set_object ($value, $var)',
+ take_value_func => 'g_value_set_object ($value, $var)',
+ convert_func => 'gimp_item_get_by_id ($var)',
headers => [ qw("vectors/gimpvectors.h") ] },
parasite => { name => 'PARASITE',
diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c
index 51daafdaf5..37b26f074b 100644
--- a/plug-ins/common/file-gbr.c
+++ b/plug-ins/common/file-gbr.c
@@ -268,13 +268,13 @@ gbr_save (GimpProcedure *procedure,
save_retvals =
gimp_pdb_run_procedure (gimp_get_pdb (),
"file-gbr-save-internal",
- GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
- G_TYPE_STRING, uri,
- G_TYPE_STRING, uri,
- G_TYPE_INT, info.spacing,
- G_TYPE_STRING, info.description,
+ GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_DRAWABLE, drawable,
+ G_TYPE_STRING, uri,
+ G_TYPE_STRING, uri,
+ G_TYPE_INT, info.spacing,
+ G_TYPE_STRING, info.description,
G_TYPE_NONE);
g_free (uri);
diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c
index 7d714ae379..39674c081d 100644
--- a/plug-ins/common/file-gih.c
+++ b/plug-ins/common/file-gih.c
@@ -426,14 +426,14 @@ gih_save (GimpProcedure *procedure,
save_retvals =
gimp_pdb_run_procedure (gimp_get_pdb (),
"file-gih-save-internal",
- GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
- G_TYPE_STRING, uri,
- G_TYPE_STRING, uri,
- G_TYPE_INT, info.spacing,
- G_TYPE_STRING, info.description,
- G_TYPE_STRING, paramstring,
+ GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_DRAWABLE, drawable,
+ G_TYPE_STRING, uri,
+ G_TYPE_STRING, uri,
+ G_TYPE_INT, info.spacing,
+ G_TYPE_STRING, info.description,
+ G_TYPE_STRING, paramstring,
G_TYPE_NONE);
g_free (uri);
diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c
index b2141d08ed..d141fff3f3 100644
--- a/plug-ins/common/file-pat.c
+++ b/plug-ins/common/file-pat.c
@@ -231,12 +231,12 @@ pat_save (GimpProcedure *procedure,
save_retvals =
gimp_pdb_run_procedure (gimp_get_pdb (),
"file-pat-save-internal",
- GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (drawable)),
- G_TYPE_STRING, uri,
- G_TYPE_STRING, uri,
- G_TYPE_STRING, description,
+ GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
+ GIMP_TYPE_IMAGE, image,
+ GIMP_TYPE_DRAWABLE, drawable,
+ G_TYPE_STRING, uri,
+ G_TYPE_STRING, uri,
+ G_TYPE_STRING, description,
G_TYPE_NONE);
g_free (uri);
diff --git a/plug-ins/common/film.c b/plug-ins/common/film.c
index 34ea2ffb5c..8606a62102 100644
--- a/plug-ins/common/film.c
+++ b/plug-ins/common/film.c
@@ -292,6 +292,7 @@ film_create_procedure (GimpPlugIn *plug_in,
GIMP_PROC_VAL_IMAGE (procedure, "new-image",
"New image",
"Outout image",
+ FALSE,
G_PARAM_READWRITE);
}
diff --git a/plug-ins/common/web-page.c b/plug-ins/common/web-page.c
index 341fa5c46d..f3e37c4e4c 100644
--- a/plug-ins/common/web-page.c
+++ b/plug-ins/common/web-page.c
@@ -165,6 +165,7 @@ webpage_create_procedure (GimpPlugIn *plug_in,
GIMP_PROC_VAL_IMAGE (procedure, "image",
"Image",
"The output image",
+ FALSE,
G_PARAM_READWRITE);
}
diff --git a/plug-ins/file-ico/ico-dialog.c b/plug-ins/file-ico/ico-dialog.c
index f1bca792c6..b42d36409c 100644
--- a/plug-ins/file-ico/ico-dialog.c
+++ b/plug-ins/file-ico/ico-dialog.c
@@ -405,10 +405,10 @@ ico_dialog_update_icon_preview (GtkWidget *dialog,
return_vals =
gimp_pdb_run_procedure (gimp_get_pdb (),
"plug-in-threshold-alpha",
- GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (tmp_image),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (tmp_layer)),
- G_TYPE_INT, ICO_ALPHA_THRESHOLD,
+ GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
+ GIMP_TYPE_IMAGE, tmp_image,
+ GIMP_TYPE_DRAWABLE, tmp_layer,
+ G_TYPE_INT, ICO_ALPHA_THRESHOLD,
G_TYPE_NONE);
gimp_value_array_unref (return_vals);
diff --git a/plug-ins/file-ico/ico-save.c b/plug-ins/file-ico/ico-save.c
index dee9e747c8..44043cc914 100644
--- a/plug-ins/file-ico/ico-save.c
+++ b/plug-ins/file-ico/ico-save.c
@@ -715,10 +715,10 @@ ico_image_get_reduced_buf (GimpDrawable *layer,
return_vals =
gimp_pdb_run_procedure (gimp_get_pdb (),
"plug-in-threshold-alpha",
- GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
- GIMP_TYPE_IMAGE_ID, gimp_image_get_id (tmp_image),
- GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (GIMP_ITEM (tmp_layer)),
- G_TYPE_INT, ICO_ALPHA_THRESHOLD,
+ GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
+ GIMP_TYPE_IMAGE, tmp_image,
+ GIMP_TYPE_DRAWABLE, tmp_layer,
+ G_TYPE_INT, ICO_ALPHA_THRESHOLD,
G_TYPE_NONE);
gimp_value_array_unref (return_vals);
diff --git a/plug-ins/metadata/metadata-editor.c b/plug-ins/metadata/metadata-editor.c
index f40232f3cc..bc694c3912 100644
--- a/plug-ins/metadata/metadata-editor.c
+++ b/plug-ins/metadata/metadata-editor.c
@@ -454,6 +454,7 @@ metadata_create_procedure (GimpPlugIn *plug_in,
GIMP_PROC_ARG_IMAGE (procedure, "image",
"Image",
"The input image",
+ FALSE,
G_PARAM_READWRITE);
}
diff --git a/plug-ins/metadata/metadata-viewer.c b/plug-ins/metadata/metadata-viewer.c
index 93348ee145..03225ad495 100644
--- a/plug-ins/metadata/metadata-viewer.c
+++ b/plug-ins/metadata/metadata-viewer.c
@@ -176,6 +176,7 @@ metadata_create_procedure (GimpPlugIn *plug_in,
GIMP_PROC_ARG_IMAGE (procedure, "image",
"Image",
"The input image",
+ FALSE,
G_PARAM_READWRITE);
}
diff --git a/plug-ins/pagecurl/pagecurl.c b/plug-ins/pagecurl/pagecurl.c
index dcd784a39d..ccefe42ffe 100644
--- a/plug-ins/pagecurl/pagecurl.c
+++ b/plug-ins/pagecurl/pagecurl.c
@@ -265,6 +265,7 @@ pagecurl_create_procedure (GimpPlugIn *plug_in,
GIMP_PROC_VAL_LAYER (procedure, "curl-layer",
"Curl layer",
"The new layer with the curl.",
+ FALSE,
G_PARAM_READWRITE);
}
diff --git a/plug-ins/screenshot/screenshot.c b/plug-ins/screenshot/screenshot.c
index f8516d62a2..949c5a0a12 100644
--- a/plug-ins/screenshot/screenshot.c
+++ b/plug-ins/screenshot/screenshot.c
@@ -220,6 +220,7 @@ screenshot_create_procedure (GimpPlugIn *plug_in,
GIMP_PROC_VAL_IMAGE (procedure, "image",
"Image",
"Output image",
+ FALSE,
G_PARAM_READWRITE);
}
diff --git a/plug-ins/script-fu/script-fu-script.c b/plug-ins/script-fu/script-fu-script.c
index f492ce93c8..cee356f530 100644
--- a/plug-ins/script-fu/script-fu-script.c
+++ b/plug-ins/script-fu/script-fu-script.c
@@ -214,51 +214,51 @@ script_fu_script_install_proc (GimpPlugIn *plug_in,
switch (script->args[i].type)
{
case SF_IMAGE:
- pspec = gimp_param_spec_image_id ("image",
- "Image",
- script->args[i].label,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_image ("image",
+ "Image",
+ script->args[i].label,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case SF_DRAWABLE:
- pspec = gimp_param_spec_drawable_id ("drawable",
- "Drawable",
- script->args[i].label,
- TRUE,
- G_PARAM_READWRITE);
- break;
-
- case SF_LAYER:
- pspec = gimp_param_spec_layer_id ("layer",
- "Layer",
+ pspec = gimp_param_spec_drawable ("drawable",
+ "Drawable",
script->args[i].label,
TRUE,
G_PARAM_READWRITE);
break;
+ case SF_LAYER:
+ pspec = gimp_param_spec_layer ("layer",
+ "Layer",
+ script->args[i].label,
+ TRUE,
+ G_PARAM_READWRITE);
+ break;
+
case SF_CHANNEL:
- pspec = gimp_param_spec_channel_id ("channel",
- "Channel",
- script->args[i].label,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_channel ("channel",
+ "Channel",
+ script->args[i].label,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case SF_VECTORS:
- pspec = gimp_param_spec_vectors_id ("vectors",
- "Vectors",
- script->args[i].label,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_vectors ("vectors",
+ "Vectors",
+ script->args[i].label,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case SF_DISPLAY:
- pspec = gimp_param_spec_display_id ("display",
- "Display",
- script->args[i].label,
- TRUE,
- G_PARAM_READWRITE);
+ pspec = gimp_param_spec_display ("display",
+ "Display",
+ script->args[i].label,
+ TRUE,
+ G_PARAM_READWRITE);
break;
case SF_COLOR:
@@ -806,49 +806,61 @@ script_fu_script_param_init (SFScript *script,
switch (type)
{
case SF_IMAGE:
- if (GIMP_VALUE_HOLDS_IMAGE_ID (value))
+ if (GIMP_VALUE_HOLDS_IMAGE (value))
{
- arg->value.sfa_image = gimp_value_get_image_id (value);
+ GimpImage *image = g_value_get_object (value);
+
+ arg->value.sfa_image = gimp_image_get_id (image);
return TRUE;
}
break;
case SF_DRAWABLE:
- if (GIMP_VALUE_HOLDS_DRAWABLE_ID (value))
+ if (GIMP_VALUE_HOLDS_DRAWABLE (value))
{
- arg->value.sfa_drawable = gimp_value_get_drawable_id (value);
+ GimpItem *item = g_value_get_object (value);
+
+ arg->value.sfa_drawable = gimp_item_get_id (item);
return TRUE;
}
break;
case SF_LAYER:
- if (GIMP_VALUE_HOLDS_LAYER_ID (value))
+ if (GIMP_VALUE_HOLDS_LAYER (value))
{
- arg->value.sfa_layer = gimp_value_get_layer_id (value);
+ GimpItem *item = g_value_get_object (value);
+
+ arg->value.sfa_layer = gimp_item_get_id (item);
return TRUE;
}
break;
case SF_CHANNEL:
- if (GIMP_VALUE_HOLDS_CHANNEL_ID (value))
+ if (GIMP_VALUE_HOLDS_CHANNEL (value))
{
- arg->value.sfa_channel = gimp_value_get_channel_id (value);
+ GimpItem *item = g_value_get_object (value);
+
+ arg->value.sfa_channel = gimp_item_get_id (item);
return TRUE;
}
break;
case SF_VECTORS:
- if (GIMP_VALUE_HOLDS_VECTORS_ID (value))
+ if (GIMP_VALUE_HOLDS_VECTORS (value))
{
- arg->value.sfa_vectors = gimp_value_get_vectors_id (value);
+ GimpItem *item = g_value_get_object (value);
+
+ arg->value.sfa_vectors = gimp_item_get_id (item);
return TRUE;
}
break;
case SF_DISPLAY:
- if (GIMP_VALUE_HOLDS_DISPLAY_ID (value))
+ if (GIMP_VALUE_HOLDS_DISPLAY (value))
{
- arg->value.sfa_display = gimp_value_get_display_id (value);
+ GimpDisplay *display = g_value_get_object (value);
+
+ arg->value.sfa_display = gimp_display_get_id (display);
return TRUE;
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]