[gimp/wip/Jehan/classy-GIMP: 33/60] libgimp: GimpImageProcedure now uses GimpImage/GimpDrawable too.



commit a90edcf158b50063bcd354516455cd184f60cf3c
Author: Jehan <jehan girinstud io>
Date:   Sun Aug 18 18:31:45 2019 +0200

    libgimp: GimpImageProcedure now uses GimpImage/GimpDrawable too.

 libgimp/gimpimageprocedure.c | 12 ++++++------
 libgimp/gimpimageprocedure.h | 22 +++++++++++-----------
 2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/libgimp/gimpimageprocedure.c b/libgimp/gimpimageprocedure.c
index d78304ed99..e701a4dbab 100644
--- a/libgimp/gimpimageprocedure.c
+++ b/libgimp/gimpimageprocedure.c
@@ -111,13 +111,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);
 
@@ -130,7 +130,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]