[gimp/wip/Jehan/classy-GIMP: 39/64] libgimp: GimpImageProcedure now uses GimpImage/GimpDrawable too.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/classy-GIMP: 39/64] libgimp: GimpImageProcedure now uses GimpImage/GimpDrawable too.
- Date: Sun, 18 Aug 2019 19:59:34 +0000 (UTC)
commit 6ecaac45f88a1b184496ea9271a5f3a1d08d7b22
Author: Jehan <jehan girinstud io>
Date: Sun Aug 18 18:31:45 2019 +0200
libgimp: GimpImageProcedure now uses GimpImage/GimpDrawable too.
libgimp/gimpimageprocedure.c | 32 ++++++++++++++++----------------
libgimp/gimpimageprocedure.h | 22 +++++++++++-----------
2 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/libgimp/gimpimageprocedure.c b/libgimp/gimpimageprocedure.c
index c300bf1e07..c2b293e52d 100644
--- a/libgimp/gimpimageprocedure.c
+++ b/libgimp/gimpimageprocedure.c
@@ -82,17 +82,17 @@ gimp_image_procedure_constructed (GObject *object)
GIMP_RUN_NONINTERACTIVE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "Image",
- "The input image",
- FALSE,
- G_PARAM_READWRITE));
+ g_param_spec_object ("image",
+ "Image",
+ "The input image",
+ GIMP_TYPE_IMAGE,
+ G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "Drawable",
- "The input drawable",
- FALSE,
- G_PARAM_READWRITE));
+ g_param_spec_object ("drawable",
+ "Drawable",
+ "The input drawable",
+ GIMP_TYPE_DRAWABLE,
+ G_PARAM_READWRITE));
}
static void
@@ -114,13 +114,13 @@ gimp_image_procedure_run (GimpProcedure *procedure,
GimpValueArray *remaining;
GimpValueArray *return_values;
GimpRunMode run_mode;
- gint32 image_id;
- gint32 drawable_id;
+ GimpImage *image;
+ GimpDrawable *drawable;
gint i;
- run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
- image_id = gimp_value_get_image_id (gimp_value_array_index (args, 1));
- drawable_id = gimp_value_get_drawable_id (gimp_value_array_index (args, 2));
+ run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
+ image = g_value_get_object (gimp_value_array_index (args, 1));
+ drawable = g_value_get_object (gimp_value_array_index (args, 2));
remaining = gimp_value_array_new (gimp_value_array_length (args) - 3);
@@ -133,7 +133,7 @@ gimp_image_procedure_run (GimpProcedure *procedure,
return_values = image_proc->priv->run_func (procedure,
run_mode,
- image_id, drawable_id,
+ image, drawable,
remaining,
image_proc->priv->run_data);
diff --git a/libgimp/gimpimageprocedure.h b/libgimp/gimpimageprocedure.h
index 7473dff863..89f08064ed 100644
--- a/libgimp/gimpimageprocedure.h
+++ b/libgimp/gimpimageprocedure.h
@@ -31,12 +31,12 @@ G_BEGIN_DECLS
/**
* GimpRunImageFunc:
- * @procedure: the #GimpProcedure that runs.
- * @run_mode: the #GimpRunMode.
- * @image_id: the image id.
- * @drawable_id: the drawable id.
- * @args: the @procedure's remaining arguments.
- * @run_data: the run_data given in gimp_image_procedure_new().
+ * @procedure: the #GimpProcedure that runs.
+ * @run_mode: the #GimpRunMode.
+ * @image: the #GimpImage.
+ * @drawable: the #GimpDrawable.
+ * @args: the @procedure's remaining arguments.
+ * @run_data: the run_data given in gimp_image_procedure_new().
*
* The image function is run during the lifetime of the GIMP session,
* each time a plug-in image procedure is called.
@@ -46,11 +46,11 @@ G_BEGIN_DECLS
* Since: 3.0
**/
typedef GimpValueArray * (* GimpRunImageFunc) (GimpProcedure *procedure,
- GimpRunMode run_mode,
- gint32 image_id,
- gint32 drawable_id,
- const GimpValueArray *args,
- gpointer run_data);
+ GimpRunMode run_mode,
+ GimpImage *image,
+ GimpDrawable *drawable,
+ const GimpValueArray *args,
+ gpointer run_data);
#define GIMP_TYPE_IMAGE_PROCEDURE (gimp_image_procedure_get_type ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]