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



commit 7f91f6bc25f33364e59ab504aeadb81f7f27102a
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 c499d87b9c..b09d49c9b0 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    = GIMP_VALUES_GET_ENUM     (args, 0);
-  image_id    = GIMP_VALUES_GET_IMAGE    (args, 1);
-  drawable_id = GIMP_VALUES_GET_DRAWABLE (args, 2);
+  run_mode = GIMP_VALUES_GET_ENUM     (args, 0);
+  image    = GIMP_VALUES_GET_IMAGE    (args, 1);
+  drawable = GIMP_VALUES_GET_DRAWABLE (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]