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/.
This commit is contained in:
Michael Natterer 2019-08-29 11:25:35 +02:00
parent d68ef36974
commit 392f00baf5
115 changed files with 7588 additions and 9166 deletions

View File

@ -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",

View File

@ -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);
}

View File

@ -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

View File

@ -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),

File diff suppressed because it is too large Load Diff

View File

@ -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;
struct _GimpParamSpecImage
{
GParamSpecObject parent_instance;
gboolean none_ok;
};
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_PARAM_IMAGE_ID
* GIMP_TYPE_PARAM_ITEM
*/
#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))
#define GIMP_VALUE_HOLDS_ITEM(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_ITEM))
typedef struct _GimpParamSpecImageID GimpParamSpecImageID;
#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))
struct _GimpParamSpecImageID
typedef struct _GimpParamSpecItem GimpParamSpecItem;
struct _GimpParamSpecItem
{
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;
GType gimp_param_item_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_image_id (const gchar *name,
GParamSpec * gimp_param_spec_item (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_PARAM_DRAWABLE
*/
#define GIMP_VALUE_HOLDS_DRAWABLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_DRAWABLE))
#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;
struct _GimpParamSpecDrawable
{
GimpParamSpecItem parent_instance;
};
GType gimp_param_drawable_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_drawable (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);
/*
* GIMP_TYPE_ITEM_ID
* GIMP_TYPE_PARAM_LAYER
*/
#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_LAYER(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_LAYER))
GType gimp_item_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_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 _GimpParamSpecLayer
{
GParamSpecInt parent_instance;
Gimp *gimp;
GType item_type;
gboolean none_ok;
GimpParamSpecDrawable parent_instance;
};
GType gimp_param_item_id_get_type (void) G_GNUC_CONST;
GType gimp_param_layer_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_item_id (const gchar *name,
GParamSpec * gimp_param_spec_layer (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_PARAM_CHANNEL
*/
#define GIMP_VALUE_HOLDS_CHANNEL(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_CHANNEL))
#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;
struct _GimpParamSpecChannel
{
GimpParamSpecDrawable parent_instance;
};
GType gimp_param_channel_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_channel (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_PARAM_LAYER_MASK
*/
#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))
typedef struct _GimpParamSpecLayerMask GimpParamSpecLayerMask;
struct _GimpParamSpecLayerMask
{
GimpParamSpecChannel parent_instance;
};
GType gimp_param_layer_mask_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_layer_mask (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_PARAM_SELECTION
*/
#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))
typedef struct _GimpParamSpecSelection GimpParamSpecSelection;
struct _GimpParamSpecSelection
{
GimpParamSpecChannel parent_instance;
};
GType gimp_param_selection_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_selection (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_PARAM_VECTORS
*/
#define GIMP_VALUE_HOLDS_VECTORS(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_VECTORS))
#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;
struct _GimpParamSpecVectors
{
GimpParamSpecItem parent_instance;
};
GType gimp_param_vectors_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_vectors (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags);
GimpItem * gimp_value_get_item (const GValue *value,
Gimp *gimp);
void gimp_value_set_item (GValue *value,
GimpItem *item);
/*
* GIMP_TYPE_DRAWABLE_ID
* GIMP_TYPE_PARAM_DISPLAY
*/
#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_DISPLAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_OBJECT))
GType gimp_drawable_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_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 _GimpParamSpecDisplay
{
GimpParamSpecItemID parent_instance;
GParamSpecObject parent_instance;
gboolean none_ok;
};
GType gimp_param_drawable_id_get_type (void) G_GNUC_CONST;
GType gimp_param_display_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);
GimpDrawable * gimp_value_get_drawable (const GValue *value,
Gimp *gimp);
void gimp_value_set_drawable (GValue *value,
GimpDrawable *drawable);
/*
* GIMP_TYPE_LAYER_ID
*/
#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;
/*
* 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
{
GimpParamSpecDrawableID 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);
GimpLayer * gimp_value_get_layer (const GValue *value,
Gimp *gimp);
void gimp_value_set_layer (GValue *value,
GimpLayer *layer);
/*
* GIMP_TYPE_CHANNEL_ID
*/
#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))
GType gimp_channel_id_get_type (void) G_GNUC_CONST;
/*
* 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
{
GimpParamSpecDrawableID 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);
GimpChannel * gimp_value_get_channel (const GValue *value,
Gimp *gimp);
void gimp_value_set_channel (GValue *value,
GimpChannel *channel);
/*
* GIMP_TYPE_LAYER_MASK_ID
*/
#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;
/*
* 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
{
GimpParamSpecChannelID 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,
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);
/*
* GIMP_TYPE_SELECTION_ID
*/
#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_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 _GimpParamSpecSelectionID GimpParamSpecSelectionID;
struct _GimpParamSpecSelectionID
{
GimpParamSpecChannelID 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);
GimpSelection * gimp_value_get_selection (const GValue *value,
Gimp *gimp);
void gimp_value_set_selection (GValue *value,
GimpSelection *selection);
/*
* GIMP_TYPE_VECTORS_ID
*/
#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_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
{
GimpParamSpecItemID 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,
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);
/*
* GIMP_TYPE_DISPLAY_ID
*/
#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_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
{
GParamSpecInt parent_instance;
Gimp *gimp;
gboolean none_ok;
};
GType gimp_param_display_id_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__ */

View File

@ -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++;
}

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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_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, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_drawable ("drawable",
"Drawable",
"Active drawable "
"of input image",
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_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, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_drawable ("drawable",
"Drawable",
"Active drawable "
"of input image",
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_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, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_drawable ("drawable",
"Drawable",
"Active drawable "
"of input image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("uri",
"URI",

View File

@ -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)) &&

View File

@ -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));

View File

@ -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

View File

@ -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",

View File

@ -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));
valid = (display != NULL);
if (success)
{
valid = (gimp_get_display_by_id (gimp, display_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;
}
@ -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);
}

View File

@ -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);
}

View File

@ -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",

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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",

View File

@ -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);
}

View File

@ -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));

View File

@ -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)
{

File diff suppressed because it is too large Load Diff

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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);
}

View File

@ -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",

View File

@ -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",

File diff suppressed because it is too large Load Diff

View File

@ -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);
}

File diff suppressed because it is too large Load Diff

View File

@ -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",

File diff suppressed because it is too large Load Diff

View File

@ -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);

View File

@ -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);
}

View File

@ -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",

View File

@ -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);

View File

@ -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",

View File

@ -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, "GimpParamLayerID"))
return gimp_param_spec_layer_id (name, nick, blurb,
gimp,
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, "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,
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, "GimpParamLayerMask"))
return gimp_param_spec_layer_mask (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, "GimpParamSelection"))
return gimp_param_spec_selection (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,
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,
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:

View File

@ -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 "

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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));
}

View File

@ -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

View File

@ -35,20 +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
* Since: 3.0
**/
gboolean
gimp_display_is_valid (GimpDisplay *display)
gimp_display_id_is_valid (gint display_id)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
@ -56,57 +56,15 @@ gimp_display_is_valid (GimpDisplay *display)
gboolean valid = FALSE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_DISPLAY_ID, gimp_display_get_id (display),
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",
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
**/
gboolean
_gimp_display_is_valid (gint32 display_ID)
{
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, display_ID,
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",
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)

View File

@ -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);

View File

@ -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)

View File

@ -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,

View File

@ -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)

View File

@ -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);

View File

@ -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);

View File

@ -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)

View File

@ -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,
pspec = gimp_param_spec_item (name, nick, blurb,
TRUE,
G_PARAM_READWRITE);
break;
case GIMP_PDB_DISPLAY:
pspec = gimp_param_spec_display (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);
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,
pspec = gimp_param_spec_layer (name, nick, blurb,
TRUE,
G_PARAM_READWRITE);
break;
case GIMP_PDB_CHANNEL:
pspec = gimp_param_spec_channel (name, nick, blurb,
TRUE,
G_PARAM_READWRITE);
break;
case GIMP_PDB_DRAWABLE:
pspec = gimp_param_spec_drawable (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);
break;
case GIMP_PDB_DRAWABLE:
pspec = gimp_param_spec_drawable_id (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 },

View File

@ -131,25 +131,25 @@ _gimp_param_spec_to_gp_param_def (GParamSpec *pspec,
gimp_param_spec_rgb_get_default (pspec,
&param_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,19 +587,43 @@ _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 (GIMP_VALUE_HOLDS_ITEM (value))
{
GimpItem *item = g_value_get_object (value);
param->param_type = GP_PARAM_TYPE_INT;
param->data.d_int = item ? gimp_item_get_id (item) : -1;
}
else if (GIMP_VALUE_HOLDS_DISPLAY (value))
{
GObject *display = g_value_get_object (value);
gint id = -1;
#if 0
if (full_copy)
{
g_free (param->type_name);
param->type_name = "GObject";
}
else
param->type_name = (gchar *) "GObject";
#endif
param->param_type = GP_PARAM_TYPE_INT;
if (display)
g_object_get (display, "id", &id, NULL);
param->data.d_int = id;
}
else if (G_VALUE_HOLDS_PARAM (value))
{
@ -632,79 +632,6 @@ _gimp_value_to_gp_param (const GValue *value,
_gimp_param_spec_to_gp_param_def (g_value_get_param (value),
&param->data.d_param_def);
}
else if (G_VALUE_HOLDS_OBJECT (value))
{
const gchar *type_name = NULL;
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)
{
type_name = "GimpVectorsID";
}
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;
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
{
g_printerr ("%s: GValue contains unsupported object type "
"which has no ID '%s'\n",
G_STRFUNC, param->type_name);
return;
}
}
if (param->param_type == -1)
g_printerr ("%s: GValue contains unsupported type '%s'\n",

View File

@ -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, "GimpParamLayerID"))
return gimp_param_spec_layer_id (name, nick, blurb,
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, "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,
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, "GimpParamLayerMask"))
return gimp_param_spec_layer_mask (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, "GimpParamSelection"))
return gimp_param_spec_selection (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, "GimpParamVectorsID"))
return gimp_param_spec_vectors_id (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:

View File

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

View File

@ -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);

File diff suppressed because it is too large Load Diff

View File

@ -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);

View File

@ -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,

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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)

View File

@ -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);

View File

@ -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)

View File

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

View File

@ -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,

File diff suppressed because it is too large Load Diff

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -94,6 +94,7 @@ gimp_load_procedure_constructed (GObject *object)
GIMP_PROC_VAL_IMAGE (procedure, "image",
"Image",
"Output image",
TRUE,
GIMP_PARAM_READWRITE);
}

View File

@ -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);

File diff suppressed because it is too large Load Diff

View File

@ -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;
struct _GimpParamSpecImage
{
GParamSpecObject parent_instance;
gboolean none_ok;
};
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_PARAM_IMAGE_ID
* GIMP_TYPE_PARAM_ITEM
*/
#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))
#define GIMP_VALUE_HOLDS_ITEM(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_ITEM))
typedef struct _GimpParamSpecImageID GimpParamSpecImageID;
#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))
struct _GimpParamSpecImageID
typedef struct _GimpParamSpecItem GimpParamSpecItem;
struct _GimpParamSpecItem
{
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_item_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_image_id (const gchar *name,
GParamSpec * gimp_param_spec_item (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_PARAM_DRAWABLE
*/
#define GIMP_VALUE_HOLDS_DRAWABLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_DRAWABLE))
#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;
struct _GimpParamSpecDrawable
{
GimpParamSpecItem parent_instance;
};
GType gimp_param_drawable_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_drawable (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);
/*
* GIMP_TYPE_ITEM_ID
* GIMP_TYPE_PARAM_LAYER
*/
#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_LAYER(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_LAYER))
GType gimp_item_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_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 _GimpParamSpecLayer
{
GParamSpecInt parent_instance;
gboolean none_ok;
GimpParamSpecDrawable parent_instance;
};
GType gimp_param_item_id_get_type (void) G_GNUC_CONST;
GType gimp_param_layer_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_item_id (const gchar *name,
GParamSpec * gimp_param_spec_layer (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_PARAM_CHANNEL
*/
#define GIMP_VALUE_HOLDS_CHANNEL(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_CHANNEL))
#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;
struct _GimpParamSpecChannel
{
GimpParamSpecDrawable parent_instance;
};
GType gimp_param_channel_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_channel (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
gint32 gimp_value_get_item_id (const GValue *value);
void gimp_value_set_item_id (GValue *value,
gint32 item_id);
/*
* GIMP_TYPE_DRAWABLE_ID
* GIMP_TYPE_PARAM_LAYER_MASK
*/
#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_LAYER_MASK(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_LAYER_MASK))
GType gimp_drawable_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_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 _GimpParamSpecLayerMask
{
GimpParamSpecItemID parent_instance;
GimpParamSpecChannel parent_instance;
};
GType gimp_param_drawable_id_get_type (void) G_GNUC_CONST;
GType gimp_param_layer_mask_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);
gint32 gimp_value_get_drawable_id (const GValue *value);
void gimp_value_set_drawable_id (GValue *value,
gint32 drawable_id);
GParamSpec * gimp_param_spec_layer_mask (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_LAYER_ID
* GIMP_TYPE_PARAM_SELECTION
*/
#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_SELECTION(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_SELECTION))
GType gimp_layer_id_get_type (void) G_GNUC_CONST;
#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 _GimpParamSpecSelection GimpParamSpecSelection;
/*
* 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 _GimpParamSpecSelection
{
GimpParamSpecDrawableID parent_instance;
GimpParamSpecChannel parent_instance;
};
GType gimp_param_layer_id_get_type (void) G_GNUC_CONST;
GType gimp_param_selection_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);
gint32 gimp_value_get_layer_id (const GValue *value);
void gimp_value_set_layer_id (GValue *value,
gint32 layer_id);
GParamSpec * gimp_param_spec_selection (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_CHANNEL_ID
* GIMP_TYPE_PARAM_VECTORS
*/
#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_VECTORS(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_VECTORS))
GType gimp_channel_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_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 _GimpParamSpecVectors
{
GimpParamSpecDrawableID parent_instance;
GimpParamSpecItem parent_instance;
};
GType gimp_param_channel_id_get_type (void) G_GNUC_CONST;
GType gimp_param_vectors_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);
gint32 gimp_value_get_channel_id (const GValue *value);
void gimp_value_set_channel_id (GValue *value,
gint32 channel_id);
GParamSpec * gimp_param_spec_vectors (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
/*
* GIMP_TYPE_LAYER_MASK_ID
* GIMP_TYPE_PARAM_DISPLAY
*/
#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_DISPLAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_DISPLAY))
GType gimp_layer_mask_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_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 _GimpParamSpecDisplay
{
GimpParamSpecChannelID parent_instance;
GParamSpecObject parent_instance;
gboolean none_ok;
};
GType gimp_param_layer_mask_id_get_type (void) G_GNUC_CONST;
GType gimp_param_display_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);
GParamSpec * gimp_param_spec_display (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
gint32 gimp_value_get_layer_mask_id (const GValue *value);
void gimp_value_set_layer_mask_id (GValue *value,
gint32 layer_mask_id);
/*
* GIMP_TYPE_SELECTION_ID
*/
#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_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 _GimpParamSpecSelectionID GimpParamSpecSelectionID;
struct _GimpParamSpecSelectionID
{
GimpParamSpecChannelID 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,
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);
/*
* GIMP_TYPE_VECTORS_ID
*/
#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_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
{
GimpParamSpecItemID 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);
gint32 gimp_value_get_vectors_id (const GValue *value);
void gimp_value_set_vectors_id (GValue *value,
gint32 vectors_id);
/*
* GIMP_TYPE_DISPLAY_ID
*/
#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_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
{
GParamSpecInt parent_instance;
gboolean none_ok;
};
GType gimp_param_display_id_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);
gint32 gimp_value_get_display_id (const GValue *value);
void gimp_value_set_display_id (GValue *value,
gint32 display_id);
G_END_DECLS

View File

@ -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,

View File

@ -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) \

View File

@ -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 =

View File

@ -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)

View File

@ -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",

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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",

View File

@ -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)

View File

@ -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') {

View File

@ -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

View File

@ -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);
}
}

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More