[gimp] libgimp: reorder the parameters of the new and unused gimp-image-select API



commit 9703bed2ef220e0427f31f9334284e67cabeef7d
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jan 24 14:53:42 2011 +0100

    libgimp: reorder the parameters of the new and unused gimp-image-select API
    
    Make the common "image" and "operation" parameters come first.

 app/pdb/image-select-cmds.c       |  172 ++++++++++++++++++------------------
 libgimp/gimpimageselect_pdb.c     |   52 ++++++------
 libgimp/gimpimageselect_pdb.h     |   24 +++---
 plug-ins/common/lcms.c            |    2 +-
 plug-ins/file-xjt/xjt.c           |    5 +-
 plug-ins/pygimp/pygimp-vectors.c  |    2 +-
 tools/pdbgen/pdb/image_select.pdb |   38 ++++----
 7 files changed, 148 insertions(+), 147 deletions(-)
---
diff --git a/app/pdb/image-select-cmds.c b/app/pdb/image-select-cmds.c
index 4481913..97712c9 100644
--- a/app/pdb/image-select-cmds.c
+++ b/app/pdb/image-select-cmds.c
@@ -51,19 +51,19 @@ image_select_color_invoker (GimpProcedure      *procedure,
 {
   gboolean success = TRUE;
   GimpImage *image;
+  gint32 operation;
   GimpDrawable *drawable;
   GimpRGB color;
   gint32 threshold;
-  gint32 operation;
   gboolean sample_merged;
   gboolean select_transparent;
   gint32 select_criterion;
 
   image = gimp_value_get_image (&args->values[0], gimp);
-  drawable = gimp_value_get_drawable (&args->values[1], gimp);
-  gimp_value_get_rgb (&args->values[2], &color);
-  threshold = g_value_get_int (&args->values[3]);
-  operation = g_value_get_enum (&args->values[4]);
+  operation = g_value_get_enum (&args->values[1]);
+  drawable = gimp_value_get_drawable (&args->values[2], gimp);
+  gimp_value_get_rgb (&args->values[3], &color);
+  threshold = g_value_get_int (&args->values[4]);
   sample_merged = g_value_get_boolean (&args->values[5]);
   select_transparent = g_value_get_boolean (&args->values[6]);
   select_criterion = g_value_get_enum (&args->values[7]);
@@ -105,18 +105,18 @@ image_select_ellipse_invoker (GimpProcedure      *procedure,
 {
   gboolean success = TRUE;
   GimpImage *image;
+  gint32 operation;
   gdouble x;
   gdouble y;
   gdouble width;
   gdouble height;
-  gint32 operation;
 
   image = gimp_value_get_image (&args->values[0], gimp);
-  x = g_value_get_double (&args->values[1]);
-  y = g_value_get_double (&args->values[2]);
-  width = g_value_get_double (&args->values[3]);
-  height = g_value_get_double (&args->values[4]);
-  operation = g_value_get_enum (&args->values[5]);
+  operation = g_value_get_enum (&args->values[1]);
+  x = g_value_get_double (&args->values[2]);
+  y = g_value_get_double (&args->values[3]);
+  width = g_value_get_double (&args->values[4]);
+  height = g_value_get_double (&args->values[5]);
 
   if (success)
     {
@@ -147,14 +147,14 @@ image_select_polygon_invoker (GimpProcedure      *procedure,
 {
   gboolean success = TRUE;
   GimpImage *image;
+  gint32 operation;
   gint32 num_segs;
   const gdouble *segs;
-  gint32 operation;
 
   image = gimp_value_get_image (&args->values[0], gimp);
-  num_segs = g_value_get_int (&args->values[1]);
-  segs = gimp_value_get_floatarray (&args->values[2]);
-  operation = g_value_get_enum (&args->values[3]);
+  operation = g_value_get_enum (&args->values[1]);
+  num_segs = g_value_get_int (&args->values[2]);
+  segs = gimp_value_get_floatarray (&args->values[3]);
 
   if (success)
     {
@@ -186,21 +186,21 @@ image_select_fuzzy_invoker (GimpProcedure      *procedure,
 {
   gboolean success = TRUE;
   GimpImage *image;
+  gint32 operation;
   GimpDrawable *drawable;
   gdouble x;
   gdouble y;
   gint32 threshold;
-  gint32 operation;
   gboolean sample_merged;
   gboolean select_transparent;
   gint32 select_criterion;
 
   image = gimp_value_get_image (&args->values[0], gimp);
-  drawable = gimp_value_get_drawable (&args->values[1], gimp);
-  x = g_value_get_double (&args->values[2]);
-  y = g_value_get_double (&args->values[3]);
-  threshold = g_value_get_int (&args->values[4]);
-  operation = g_value_get_enum (&args->values[5]);
+  operation = g_value_get_enum (&args->values[1]);
+  drawable = gimp_value_get_drawable (&args->values[2], gimp);
+  x = g_value_get_double (&args->values[3]);
+  y = g_value_get_double (&args->values[4]);
+  threshold = g_value_get_int (&args->values[5]);
   sample_merged = g_value_get_boolean (&args->values[6]);
   select_transparent = g_value_get_boolean (&args->values[7]);
   select_criterion = g_value_get_enum (&args->values[8]);
@@ -243,18 +243,18 @@ image_select_rectangle_invoker (GimpProcedure      *procedure,
 {
   gboolean success = TRUE;
   GimpImage *image;
+  gint32 operation;
   gdouble x;
   gdouble y;
   gdouble width;
   gdouble height;
-  gint32 operation;
 
   image = gimp_value_get_image (&args->values[0], gimp);
-  x = g_value_get_double (&args->values[1]);
-  y = g_value_get_double (&args->values[2]);
-  width = g_value_get_double (&args->values[3]);
-  height = g_value_get_double (&args->values[4]);
-  operation = g_value_get_enum (&args->values[5]);
+  operation = g_value_get_enum (&args->values[1]);
+  x = g_value_get_double (&args->values[2]);
+  y = g_value_get_double (&args->values[3]);
+  width = g_value_get_double (&args->values[4]);
+  height = g_value_get_double (&args->values[5]);
 
   if (success)
     {
@@ -284,22 +284,22 @@ image_select_round_rectangle_invoker (GimpProcedure      *procedure,
 {
   gboolean success = TRUE;
   GimpImage *image;
+  gint32 operation;
   gdouble x;
   gdouble y;
   gdouble width;
   gdouble height;
   gdouble corner_radius_x;
   gdouble corner_radius_y;
-  gint32 operation;
 
   image = gimp_value_get_image (&args->values[0], gimp);
-  x = g_value_get_double (&args->values[1]);
-  y = g_value_get_double (&args->values[2]);
-  width = g_value_get_double (&args->values[3]);
-  height = g_value_get_double (&args->values[4]);
-  corner_radius_x = g_value_get_double (&args->values[5]);
-  corner_radius_y = g_value_get_double (&args->values[6]);
-  operation = g_value_get_enum (&args->values[7]);
+  operation = g_value_get_enum (&args->values[1]);
+  x = g_value_get_double (&args->values[2]);
+  y = g_value_get_double (&args->values[3]);
+  width = g_value_get_double (&args->values[4]);
+  height = g_value_get_double (&args->values[5]);
+  corner_radius_x = g_value_get_double (&args->values[6]);
+  corner_radius_y = g_value_get_double (&args->values[7]);
 
   if (success)
     {
@@ -332,12 +332,12 @@ image_select_item_invoker (GimpProcedure      *procedure,
 {
   gboolean success = TRUE;
   GimpImage *image;
-  GimpItem *item;
   gint32 operation;
+  GimpItem *item;
 
   image = gimp_value_get_image (&args->values[0], gimp);
-  item = gimp_value_get_item (&args->values[1], gimp);
-  operation = g_value_get_enum (&args->values[2]);
+  operation = g_value_get_enum (&args->values[1]);
+  item = gimp_value_get_item (&args->values[2], gimp);
 
   if (success)
     {
@@ -385,6 +385,13 @@ register_image_select_procs (GimpPDB *pdb)
                                                          pdb->gimp, FALSE,
                                                          GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
+                               g_param_spec_enum ("operation",
+                                                  "operation",
+                                                  "The selection operation",
+                                                  GIMP_TYPE_CHANNEL_OPS,
+                                                  GIMP_CHANNEL_OP_ADD,
+                                                  GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
                                gimp_param_spec_drawable_id ("drawable",
                                                             "drawable",
                                                             "The affected drawable",
@@ -404,13 +411,6 @@ register_image_select_procs (GimpPDB *pdb)
                                                       0, 255, 0,
                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
-                               g_param_spec_enum ("operation",
-                                                  "operation",
-                                                  "The selection operation",
-                                                  GIMP_TYPE_CHANNEL_OPS,
-                                                  GIMP_CHANNEL_OP_ADD,
-                                                  GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
                                g_param_spec_boolean ("sample-merged",
                                                      "sample merged",
                                                      "Use the composite image, not the drawable",
@@ -453,6 +453,13 @@ register_image_select_procs (GimpPDB *pdb)
                                                          pdb->gimp, FALSE,
                                                          GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
+                               g_param_spec_enum ("operation",
+                                                  "operation",
+                                                  "The selection operation",
+                                                  GIMP_TYPE_CHANNEL_OPS,
+                                                  GIMP_CHANNEL_OP_ADD,
+                                                  GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
                                g_param_spec_double ("x",
                                                     "x",
                                                     "x coordinate of upper-left corner of ellipse bounding box",
@@ -476,13 +483,6 @@ register_image_select_procs (GimpPDB *pdb)
                                                     "The height of the ellipse",
                                                     0, G_MAXDOUBLE, 0,
                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               g_param_spec_enum ("operation",
-                                                  "operation",
-                                                  "The selection operation",
-                                                  GIMP_TYPE_CHANNEL_OPS,
-                                                  GIMP_CHANNEL_OP_ADD,
-                                                  GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
@@ -507,6 +507,13 @@ register_image_select_procs (GimpPDB *pdb)
                                                          pdb->gimp, FALSE,
                                                          GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
+                               g_param_spec_enum ("operation",
+                                                  "operation",
+                                                  "The selection operation",
+                                                  GIMP_TYPE_CHANNEL_OPS,
+                                                  GIMP_CHANNEL_OP_ADD,
+                                                  GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
                                gimp_param_spec_int32 ("num-segs",
                                                       "num segs",
                                                       "Number of points (count 1 coordinate as two points)",
@@ -517,13 +524,6 @@ register_image_select_procs (GimpPDB *pdb)
                                                             "segs",
                                                             "Array of points: { p1.x, p1.y, p2.x, p2.y, ..., pn.x, pn.y}",
                                                             GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               g_param_spec_enum ("operation",
-                                                  "operation",
-                                                  "The selection operation",
-                                                  GIMP_TYPE_CHANNEL_OPS,
-                                                  GIMP_CHANNEL_OP_ADD,
-                                                  GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
@@ -549,6 +549,13 @@ register_image_select_procs (GimpPDB *pdb)
                                                          pdb->gimp, FALSE,
                                                          GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
+                               g_param_spec_enum ("operation",
+                                                  "operation",
+                                                  "The selection operation",
+                                                  GIMP_TYPE_CHANNEL_OPS,
+                                                  GIMP_CHANNEL_OP_ADD,
+                                                  GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
                                gimp_param_spec_drawable_id ("drawable",
                                                             "drawable",
                                                             "The affected drawable",
@@ -573,13 +580,6 @@ register_image_select_procs (GimpPDB *pdb)
                                                       0, 255, 0,
                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
-                               g_param_spec_enum ("operation",
-                                                  "operation",
-                                                  "The selection operation",
-                                                  GIMP_TYPE_CHANNEL_OPS,
-                                                  GIMP_CHANNEL_OP_ADD,
-                                                  GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
                                g_param_spec_boolean ("sample-merged",
                                                      "sample merged",
                                                      "Use the composite image, not the drawable",
@@ -622,6 +622,13 @@ register_image_select_procs (GimpPDB *pdb)
                                                          pdb->gimp, FALSE,
                                                          GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
+                               g_param_spec_enum ("operation",
+                                                  "operation",
+                                                  "The selection operation",
+                                                  GIMP_TYPE_CHANNEL_OPS,
+                                                  GIMP_CHANNEL_OP_ADD,
+                                                  GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
                                g_param_spec_double ("x",
                                                     "x",
                                                     "x coordinate of upper-left corner of rectangle",
@@ -645,13 +652,6 @@ register_image_select_procs (GimpPDB *pdb)
                                                     "The height of the rectangle",
                                                     0, G_MAXDOUBLE, 0,
                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               g_param_spec_enum ("operation",
-                                                  "operation",
-                                                  "The selection operation",
-                                                  GIMP_TYPE_CHANNEL_OPS,
-                                                  GIMP_CHANNEL_OP_ADD,
-                                                  GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
@@ -676,6 +676,13 @@ register_image_select_procs (GimpPDB *pdb)
                                                          pdb->gimp, FALSE,
                                                          GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
+                               g_param_spec_enum ("operation",
+                                                  "operation",
+                                                  "The selection operation",
+                                                  GIMP_TYPE_CHANNEL_OPS,
+                                                  GIMP_CHANNEL_OP_ADD,
+                                                  GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
                                g_param_spec_double ("x",
                                                     "x",
                                                     "x coordinate of upper-left corner of rectangle",
@@ -711,13 +718,6 @@ register_image_select_procs (GimpPDB *pdb)
                                                     "The corner radius in Y direction",
                                                     0, GIMP_MAX_IMAGE_SIZE, 0,
                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               g_param_spec_enum ("operation",
-                                                  "operation",
-                                                  "The selection operation",
-                                                  GIMP_TYPE_CHANNEL_OPS,
-                                                  GIMP_CHANNEL_OP_ADD,
-                                                  GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
@@ -742,18 +742,18 @@ register_image_select_procs (GimpPDB *pdb)
                                                          pdb->gimp, FALSE,
                                                          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_procedure_add_argument (procedure,
                                g_param_spec_enum ("operation",
                                                   "operation",
                                                   "The desired operation with current selection",
                                                   GIMP_TYPE_CHANNEL_OPS,
                                                   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_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 }
diff --git a/libgimp/gimpimageselect_pdb.c b/libgimp/gimpimageselect_pdb.c
index 5fc3dda..d76a4fa 100644
--- a/libgimp/gimpimageselect_pdb.c
+++ b/libgimp/gimpimageselect_pdb.c
@@ -37,10 +37,10 @@
 /**
  * gimp_image_select_color:
  * @image_ID: The affected image.
+ * @operation: The selection operation.
  * @drawable_ID: The affected drawable.
  * @color: The color to select.
  * @threshold: Threshold in intensity levels.
- * @operation: The selection operation.
  * @sample_merged: Use the composite image, not the drawable.
  * @select_transparent: Whether to consider transparent pixels for selection. If TRUE, transparency is considered as a unique selectable color.
  * @select_criterion: The criterion used to determine color similarity. SELECT_CRITERION_COMPOSITE is the standard choice.
@@ -66,10 +66,10 @@
  **/
 gboolean
 gimp_image_select_color (gint32               image_ID,
+                         GimpChannelOps       operation,
                          gint32               drawable_ID,
                          const GimpRGB       *color,
                          gint                 threshold,
-                         GimpChannelOps       operation,
                          gboolean             sample_merged,
                          gboolean             select_transparent,
                          GimpSelectCriterion  select_criterion)
@@ -81,10 +81,10 @@ gimp_image_select_color (gint32               image_ID,
   return_vals = gimp_run_procedure ("gimp-image-select-color",
                                     &nreturn_vals,
                                     GIMP_PDB_IMAGE, image_ID,
+                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_DRAWABLE, drawable_ID,
                                     GIMP_PDB_COLOR, color,
                                     GIMP_PDB_INT32, threshold,
-                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_INT32, sample_merged,
                                     GIMP_PDB_INT32, select_transparent,
                                     GIMP_PDB_INT32, select_criterion,
@@ -100,11 +100,11 @@ gimp_image_select_color (gint32               image_ID,
 /**
  * gimp_image_select_ellipse:
  * @image_ID: The image.
+ * @operation: The selection operation.
  * @x: x coordinate of upper-left corner of ellipse bounding box.
  * @y: y coordinate of upper-left corner of ellipse bounding box.
  * @width: The width of the ellipse.
  * @height: The height of the ellipse.
- * @operation: The selection operation.
  *
  * Create an elliptical selection over the specified image.
  *
@@ -118,11 +118,11 @@ gimp_image_select_color (gint32               image_ID,
  **/
 gboolean
 gimp_image_select_ellipse (gint32         image_ID,
+                           GimpChannelOps operation,
                            gdouble        x,
                            gdouble        y,
                            gdouble        width,
-                           gdouble        height,
-                           GimpChannelOps operation)
+                           gdouble        height)
 {
   GimpParam *return_vals;
   gint nreturn_vals;
@@ -131,11 +131,11 @@ gimp_image_select_ellipse (gint32         image_ID,
   return_vals = gimp_run_procedure ("gimp-image-select-ellipse",
                                     &nreturn_vals,
                                     GIMP_PDB_IMAGE, image_ID,
+                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_FLOAT, x,
                                     GIMP_PDB_FLOAT, y,
                                     GIMP_PDB_FLOAT, width,
                                     GIMP_PDB_FLOAT, height,
-                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_END);
 
   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
@@ -148,9 +148,9 @@ gimp_image_select_ellipse (gint32         image_ID,
 /**
  * gimp_image_select_polygon:
  * @image_ID: The image.
+ * @operation: The selection operation.
  * @num_segs: Number of points (count 1 coordinate as two points).
  * @segs: Array of points: { p1.x, p1.y, p2.x, p2.y, ..., pn.x, pn.y}.
- * @operation: The selection operation.
  *
  * Create a polygonal selection over the specified image.
  *
@@ -169,9 +169,9 @@ gimp_image_select_ellipse (gint32         image_ID,
  **/
 gboolean
 gimp_image_select_polygon (gint32          image_ID,
+                           GimpChannelOps  operation,
                            gint            num_segs,
-                           const gdouble  *segs,
-                           GimpChannelOps  operation)
+                           const gdouble  *segs)
 {
   GimpParam *return_vals;
   gint nreturn_vals;
@@ -180,9 +180,9 @@ gimp_image_select_polygon (gint32          image_ID,
   return_vals = gimp_run_procedure ("gimp-image-select-polygon",
                                     &nreturn_vals,
                                     GIMP_PDB_IMAGE, image_ID,
+                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_INT32, num_segs,
                                     GIMP_PDB_FLOATARRAY, segs,
-                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_END);
 
   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
@@ -195,11 +195,11 @@ gimp_image_select_polygon (gint32          image_ID,
 /**
  * gimp_image_select_fuzzy:
  * @image_ID: The affected image.
+ * @operation: The selection operation.
  * @drawable_ID: The affected drawable.
  * @x: x coordinate of initial seed fill point: (image coordinates).
  * @y: y coordinate of initial seed fill point: (image coordinates).
  * @threshold: Threshold in intensity levels.
- * @operation: The selection operation.
  * @sample_merged: Use the composite image, not the drawable.
  * @select_transparent: Whether to consider transparent pixels for selection. If TRUE, transparency is considered as a unique selectable color.
  * @select_criterion: The criterion used to determine color similarity. SELECT_CRITERION_COMPOSITE is the standard choice.
@@ -230,11 +230,11 @@ gimp_image_select_polygon (gint32          image_ID,
  **/
 gboolean
 gimp_image_select_fuzzy (gint32              image_ID,
+                         GimpChannelOps      operation,
                          gint32              drawable_ID,
                          gdouble             x,
                          gdouble             y,
                          gint                threshold,
-                         GimpChannelOps      operation,
                          gboolean            sample_merged,
                          gboolean            select_transparent,
                          GimpSelectCriterion select_criterion)
@@ -246,11 +246,11 @@ gimp_image_select_fuzzy (gint32              image_ID,
   return_vals = gimp_run_procedure ("gimp-image-select-fuzzy",
                                     &nreturn_vals,
                                     GIMP_PDB_IMAGE, image_ID,
+                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_DRAWABLE, drawable_ID,
                                     GIMP_PDB_FLOAT, x,
                                     GIMP_PDB_FLOAT, y,
                                     GIMP_PDB_INT32, threshold,
-                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_INT32, sample_merged,
                                     GIMP_PDB_INT32, select_transparent,
                                     GIMP_PDB_INT32, select_criterion,
@@ -266,11 +266,11 @@ gimp_image_select_fuzzy (gint32              image_ID,
 /**
  * gimp_image_select_rectangle:
  * @image_ID: The image.
+ * @operation: The selection operation.
  * @x: x coordinate of upper-left corner of rectangle.
  * @y: y coordinate of upper-left corner of rectangle.
  * @width: The width of the rectangle.
  * @height: The height of the rectangle.
- * @operation: The selection operation.
  *
  * Create a rectangular selection over the specified image;
  *
@@ -284,11 +284,11 @@ gimp_image_select_fuzzy (gint32              image_ID,
  **/
 gboolean
 gimp_image_select_rectangle (gint32         image_ID,
+                             GimpChannelOps operation,
                              gdouble        x,
                              gdouble        y,
                              gdouble        width,
-                             gdouble        height,
-                             GimpChannelOps operation)
+                             gdouble        height)
 {
   GimpParam *return_vals;
   gint nreturn_vals;
@@ -297,11 +297,11 @@ gimp_image_select_rectangle (gint32         image_ID,
   return_vals = gimp_run_procedure ("gimp-image-select-rectangle",
                                     &nreturn_vals,
                                     GIMP_PDB_IMAGE, image_ID,
+                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_FLOAT, x,
                                     GIMP_PDB_FLOAT, y,
                                     GIMP_PDB_FLOAT, width,
                                     GIMP_PDB_FLOAT, height,
-                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_END);
 
   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
@@ -314,13 +314,13 @@ gimp_image_select_rectangle (gint32         image_ID,
 /**
  * gimp_image_select_round_rectangle:
  * @image_ID: The image.
+ * @operation: The selection operation.
  * @x: x coordinate of upper-left corner of rectangle.
  * @y: y coordinate of upper-left corner of rectangle.
  * @width: The width of the rectangle.
  * @height: The height of the rectangle.
  * @corner_radius_x: The corner radius in X direction.
  * @corner_radius_y: The corner radius in Y direction.
- * @operation: The selection operation.
  *
  * Create a rectangular selection with round corners over the specified
  * image;
@@ -336,13 +336,13 @@ gimp_image_select_rectangle (gint32         image_ID,
  **/
 gboolean
 gimp_image_select_round_rectangle (gint32         image_ID,
+                                   GimpChannelOps operation,
                                    gdouble        x,
                                    gdouble        y,
                                    gdouble        width,
                                    gdouble        height,
                                    gdouble        corner_radius_x,
-                                   gdouble        corner_radius_y,
-                                   GimpChannelOps operation)
+                                   gdouble        corner_radius_y)
 {
   GimpParam *return_vals;
   gint nreturn_vals;
@@ -351,13 +351,13 @@ gimp_image_select_round_rectangle (gint32         image_ID,
   return_vals = gimp_run_procedure ("gimp-image-select-round-rectangle",
                                     &nreturn_vals,
                                     GIMP_PDB_IMAGE, image_ID,
+                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_FLOAT, x,
                                     GIMP_PDB_FLOAT, y,
                                     GIMP_PDB_FLOAT, width,
                                     GIMP_PDB_FLOAT, height,
                                     GIMP_PDB_FLOAT, corner_radius_x,
                                     GIMP_PDB_FLOAT, corner_radius_y,
-                                    GIMP_PDB_INT32, operation,
                                     GIMP_PDB_END);
 
   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
@@ -370,8 +370,8 @@ gimp_image_select_round_rectangle (gint32         image_ID,
 /**
  * gimp_image_select_item:
  * @image_ID: The image.
- * @item_ID: The item to render to the selection.
  * @operation: The desired operation with current selection.
+ * @item_ID: The item to render to the selection.
  *
  * Transforms the specified item into a selection
  *
@@ -386,8 +386,8 @@ gimp_image_select_round_rectangle (gint32         image_ID,
  **/
 gboolean
 gimp_image_select_item (gint32         image_ID,
-                        gint32         item_ID,
-                        GimpChannelOps operation)
+                        GimpChannelOps operation,
+                        gint32         item_ID)
 {
   GimpParam *return_vals;
   gint nreturn_vals;
@@ -396,8 +396,8 @@ gimp_image_select_item (gint32         image_ID,
   return_vals = gimp_run_procedure ("gimp-image-select-item",
                                     &nreturn_vals,
                                     GIMP_PDB_IMAGE, image_ID,
-                                    GIMP_PDB_ITEM, item_ID,
                                     GIMP_PDB_INT32, operation,
+                                    GIMP_PDB_ITEM, item_ID,
                                     GIMP_PDB_END);
 
   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
diff --git a/libgimp/gimpimageselect_pdb.h b/libgimp/gimpimageselect_pdb.h
index 623099b..7d68f7a 100644
--- a/libgimp/gimpimageselect_pdb.h
+++ b/libgimp/gimpimageselect_pdb.h
@@ -29,49 +29,49 @@ G_BEGIN_DECLS
 
 
 gboolean gimp_image_select_color           (gint32               image_ID,
+                                            GimpChannelOps       operation,
                                             gint32               drawable_ID,
                                             const GimpRGB       *color,
                                             gint                 threshold,
-                                            GimpChannelOps       operation,
                                             gboolean             sample_merged,
                                             gboolean             select_transparent,
                                             GimpSelectCriterion  select_criterion);
 gboolean gimp_image_select_ellipse         (gint32               image_ID,
+                                            GimpChannelOps       operation,
                                             gdouble              x,
                                             gdouble              y,
                                             gdouble              width,
-                                            gdouble              height,
-                                            GimpChannelOps       operation);
+                                            gdouble              height);
 gboolean gimp_image_select_polygon         (gint32               image_ID,
+                                            GimpChannelOps       operation,
                                             gint                 num_segs,
-                                            const gdouble       *segs,
-                                            GimpChannelOps       operation);
+                                            const gdouble       *segs);
 gboolean gimp_image_select_fuzzy           (gint32               image_ID,
+                                            GimpChannelOps       operation,
                                             gint32               drawable_ID,
                                             gdouble              x,
                                             gdouble              y,
                                             gint                 threshold,
-                                            GimpChannelOps       operation,
                                             gboolean             sample_merged,
                                             gboolean             select_transparent,
                                             GimpSelectCriterion  select_criterion);
 gboolean gimp_image_select_rectangle       (gint32               image_ID,
+                                            GimpChannelOps       operation,
                                             gdouble              x,
                                             gdouble              y,
                                             gdouble              width,
-                                            gdouble              height,
-                                            GimpChannelOps       operation);
+                                            gdouble              height);
 gboolean gimp_image_select_round_rectangle (gint32               image_ID,
+                                            GimpChannelOps       operation,
                                             gdouble              x,
                                             gdouble              y,
                                             gdouble              width,
                                             gdouble              height,
                                             gdouble              corner_radius_x,
-                                            gdouble              corner_radius_y,
-                                            GimpChannelOps       operation);
+                                            gdouble              corner_radius_y);
 gboolean gimp_image_select_item            (gint32               image_ID,
-                                            gint32               item_ID,
-                                            GimpChannelOps       operation);
+                                            GimpChannelOps       operation,
+                                            gint32               item_ID);
 
 
 G_END_DECLS
diff --git a/plug-ins/common/lcms.c b/plug-ins/common/lcms.c
index 6c75607..a2d1479 100644
--- a/plug-ins/common/lcms.c
+++ b/plug-ins/common/lcms.c
@@ -915,7 +915,7 @@ lcms_image_apply_profile (gint32                    image,
 
   if (saved_selection != -1)
     {
-      gimp_image_select_item (image, saved_selection, GIMP_CHANNEL_OP_REPLACE);
+      gimp_image_select_item (image, GIMP_CHANNEL_OP_REPLACE, saved_selection);
       gimp_image_remove_channel (image, saved_selection);
     }
 
diff --git a/plug-ins/file-xjt/xjt.c b/plug-ins/file-xjt/xjt.c
index 79263e4..ec41cac 100644
--- a/plug-ins/file-xjt/xjt.c
+++ b/plug-ins/file-xjt/xjt.c
@@ -3602,8 +3602,9 @@ load_xjt_image (const gchar  *filename,
           if (xjt_debug) printf ("XJT-DEBUG: SELECTION loaded channel id = %d\n",
                                  (int) l_channel_id);
 
-          gimp_image_select_item (l_image_id, l_channel_id,
-                                  GIMP_CHANNEL_OP_REPLACE);
+          gimp_image_select_item (l_image_id,
+                                  GIMP_CHANNEL_OP_REPLACE,
+                                  l_channel_id);
 
           /* delete the channel after load into selection */
           gimp_drawable_delete (l_channel_id);
diff --git a/plug-ins/pygimp/pygimp-vectors.c b/plug-ins/pygimp/pygimp-vectors.c
index 2fd6f2b..83cdf0b 100644
--- a/plug-ins/pygimp/pygimp-vectors.c
+++ b/plug-ins/pygimp/pygimp-vectors.c
@@ -635,7 +635,7 @@ vectors_to_selection(PyGimpVectors *self, PyObject *args, PyObject *kwargs)
     gimp_context_set_antialias(antialias);
     gimp_context_set_feather(feather);
     gimp_context_set_feather_radius(feather_radius_x, feather_radius_y);
-    gimp_image_select_item(gimp_item_get_image(self->ID), self->ID, operation);
+    gimp_image_select_item(gimp_item_get_image(self->ID), operation, self->ID);
     gimp_context_pop();
 
     Py_INCREF(Py_None);
diff --git a/tools/pdbgen/pdb/image_select.pdb b/tools/pdbgen/pdb/image_select.pdb
index f86915c..559396d 100644
--- a/tools/pdbgen/pdb/image_select.pdb
+++ b/tools/pdbgen/pdb/image_select.pdb
@@ -41,14 +41,14 @@ HELP
     @inargs = (
 	{ name => 'image', type => 'image',
 	  desc => 'The affected image' },
+	{ name => 'operation', type => 'enum GimpChannelOps',
+	  desc => 'The selection operation' },
 	{ name => 'drawable', type => 'drawable',
 	  desc => 'The affected drawable' },
 	{ name => 'color', type => 'color',
 	  desc => 'The color to select' },
 	{ name => 'threshold', type => '0 <= int32 <= 255',
 	  desc => 'Threshold in intensity levels' },
-	{ name => 'operation', type => 'enum GimpChannelOps',
-	  desc => 'The selection operation' },
 	{ name => 'sample_merged', type => 'boolean',
 	  desc => 'Use the composite image, not the drawable' },
         { name => 'select_transparent', type => 'boolean',
@@ -103,6 +103,8 @@ HELP
     @inargs = (
 	{ name => 'image', type => 'image',
 	  desc => 'The image' },
+	{ name => 'operation', type => 'enum GimpChannelOps',
+	  desc => 'The selection operation' },
 	{ name => 'x', type => 'float',
 	  desc => 'x coordinate of upper-left corner of ellipse bounding box' },
 	{ name => 'y', type => 'float',
@@ -110,9 +112,7 @@ HELP
 	{ name => 'width', type => '0 < float',
 	  desc => 'The width of the ellipse' },
 	{ name => 'height', type => '0 < float',
-	  desc => 'The height of the ellipse' },
-	{ name => 'operation', type => 'enum GimpChannelOps',
-	  desc => 'The selection operation' }
+	  desc => 'The height of the ellipse' }
     );
 
     %invoke = (
@@ -154,14 +154,14 @@ HELP
     @inargs = (
 	{ name => 'image', type => 'image',
 	  desc => 'The image' },
+	{ name => 'operation', type => 'enum GimpChannelOps',
+	  desc => 'The selection operation' },
         { name => 'segs', type => 'floatarray',
           desc => 'Array of points: { p1.x, p1.y, p2.x, p2.y, ...,
                    pn.x, pn.y}',
           array => { type => '2 <= int32',
                      desc => 'Number of points (count 1 coordinate as two
-                              points)' } },
-	{ name => 'operation', type => 'enum GimpChannelOps',
-	  desc => 'The selection operation' }
+                              points)' } }
     );
 
     %invoke = (
@@ -215,6 +215,8 @@ HELP
     @inargs = (
 	{ name => 'image', type => 'image',
 	  desc => 'The affected image' },
+	{ name => 'operation', type => 'enum GimpChannelOps',
+	  desc => 'The selection operation' },
 	{ name => 'drawable', type => 'drawable',
 	  desc => 'The affected drawable' },
 	{ name => 'x', type => 'float',
@@ -225,8 +227,6 @@ HELP
 	  	   coordinates)' },
 	{ name => 'threshold', type => '0 <= int32 <= 255',
 	  desc => 'Threshold in intensity levels' },
-	{ name => 'operation', type => 'enum GimpChannelOps',
-	  desc => 'The selection operation' },
 	{ name => 'sample_merged', type => 'boolean',
 	  desc => 'Use the composite image, not the drawable' },
 	{ name => 'select_transparent', type => 'boolean',
@@ -282,6 +282,8 @@ HELP
     @inargs = (
 	{ name => 'image', type => 'image',
 	  desc => 'The image' },
+	{ name => 'operation', type => 'enum GimpChannelOps',
+	  desc => 'The selection operation' },
 	{ name => 'x', type => 'float',
 	  desc => 'x coordinate of upper-left corner of rectangle' },
 	{ name => 'y', type => 'float',
@@ -289,9 +291,7 @@ HELP
 	{ name => 'width', type => '0 < float',
 	  desc => 'The width of the rectangle' },
 	{ name => 'height', type => '0 < float',
-	  desc => 'The height of the rectangle' },
-	{ name => 'operation', type => 'enum GimpChannelOps',
-	  desc => 'The selection operation' }
+	  desc => 'The height of the rectangle' }
     );
 
     %invoke = (
@@ -328,6 +328,8 @@ HELP
     @inargs = (
 	{ name => 'image', type => 'image',
 	  desc => 'The image' },
+	{ name => 'operation', type => 'enum GimpChannelOps',
+	  desc => 'The selection operation' },
 	{ name => 'x', type => 'float',
 	  desc => 'x coordinate of upper-left corner of rectangle' },
 	{ name => 'y', type => 'float',
@@ -339,9 +341,7 @@ HELP
         { name => 'corner_radius_x', type => '0 < float < GIMP_MAX_IMAGE_SIZE',
           desc => 'The corner radius in X direction' },
         { name => 'corner_radius_y', type => '0 < float < GIMP_MAX_IMAGE_SIZE',
-          desc => 'The corner radius in Y direction' },
-	{ name => 'operation', type => 'enum GimpChannelOps',
-	  desc => 'The selection operation' }
+          desc => 'The corner radius in Y direction' }
     );
 
     %invoke = (
@@ -381,10 +381,10 @@ HELP
     @inargs = (
 	{ name => 'image', type => 'image',
 	  desc => 'The image' },
-        { name => 'item', type => 'item',
-          desc => 'The item to render to the selection' },
         { name => 'operation', type => 'enum GimpChannelOps',
-          desc => 'The desired operation with current selection' }
+          desc => 'The desired operation with current selection' },
+        { name => 'item', type => 'item',
+          desc => 'The item to render to the selection' }
     );
 
     %invoke = (



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]