[gimp] libgimp: deprecate the entire old gimp_foo_select() API



commit 1931cca5ab57f1cfac85075e37f5da1cbdccd9dc
Author: Michael Natterer <mitch gimp org>
Date:   Fri Feb 4 18:41:41 2011 +0100

    libgimp: deprecate the entire old gimp_foo_select() API
    
    It's now completely replaced by the new gimp_image_select_foo() functions.

 app/pdb/image-select-cmds.c          |    4 +-
 app/pdb/selection-tools-cmds.c       |   38 +++++++-------
 libgimp/gimpimageselect_pdb.c        |    3 +-
 libgimp/gimpselectiontools_pdb.c     |   79 ++---------------------------
 libgimp/gimpselectiontools_pdb.h     |    4 +-
 tools/pdbgen/pdb/selection_tools.pdb |   92 ++--------------------------------
 6 files changed, 31 insertions(+), 189 deletions(-)
---
diff --git a/app/pdb/image-select-cmds.c b/app/pdb/image-select-cmds.c
index 362c8ab..6a19018 100644
--- a/app/pdb/image-select-cmds.c
+++ b/app/pdb/image-select-cmds.c
@@ -496,8 +496,8 @@ register_image_select_procs (GimpPDB *pdb)
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-image-select-fuzzy",
                                      "Create a fuzzy selection starting at the specified coordinates on the specified drawable.",
-                                     "This tool creates a fuzzy selection over the specified image. A fuzzy selection is determined by a seed fill under the constraints of the current context settings. Essentially, the color at the specified coordinates (in the drawable) is measured and the selection expands outwards from that point to any adjacent pixels which are not significantly different (as determined by the threshold and criterion context settings). This process continues until no more expansion is possible. If antialiasing is turned on, the final selection mask will contain intermediate values based on close misses to the threshold bar at pixels along the seed fill boundary. This prodecure is affected by the following context setters: 'gimp-context-set-antialias', 'gimp-context-set-feather', 'gimp-context-set-feather-radius', 'gimp-context-set-sample-merged', 'gimp-context-set-sample-criterion', 'gimp-context-set-sample-threshold'. In the case of a merged sampling, t
 he supplied drawable is ignored. If the"
-  "sample is merged, the specified coordinates are relative to the image origin; otherwise, they are relative to the drawable's origin.",
+                                     "This tool creates a fuzzy selection over the specified image. A fuzzy selection is determined by a seed fill under the constraints of the current context settings. Essentially, the color at the specified coordinates (in the drawable) is measured and the selection expands outwards from that point to any adjacent pixels which are not significantly different (as determined by the threshold and criterion context settings). This process continues until no more expansion is possible. If antialiasing is turned on, the final selection mask will contain intermediate values based on close misses to the threshold bar at pixels along the seed fill boundary. This prodecure is affected by the following context setters: 'gimp-context-set-antialias', 'gimp-context-set-feather', 'gimp-context-set-feather-radius', 'gimp-context-set-sample-merged', 'gimp-context-set-sample-criterion', 'gimp-context-set-sample-threshold', 'gimp-context-set-sample-transparen
 t'. In the case of a merged sampling, the"
+  "supplied drawable is ignored. If the sample is merged, the specified coordinates are relative to the image origin; otherwise, they are relative to the drawable's origin.",
                                      "David Gowers",
                                      "David Gowers",
                                      "2010",
diff --git a/app/pdb/selection-tools-cmds.c b/app/pdb/selection-tools-cmds.c
index debae44..2ce863b 100644
--- a/app/pdb/selection-tools-cmds.c
+++ b/app/pdb/selection-tools-cmds.c
@@ -447,12 +447,12 @@ register_selection_tools_procs (GimpPDB *pdb)
                                "gimp-by-color-select");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-by-color-select",
-                                     "Create a selection by selecting all pixels (in the specified drawable) with the same (or similar) color to that specified.",
-                                     "This tool creates a selection over the specified image. A by-color selection is determined by the supplied color under the constraints of the specified threshold. Essentially, all pixels (in the drawable) that have color sufficiently close to the specified color (as determined by the threshold value) are included in the selection. The antialiasing parameter allows the final selection mask to contain intermediate values based on close misses to the threshold bar. Feathering can be enabled optionally and is controlled with the 'feather-radius' parameter. If the 'sample-merged' parameter is TRUE, the data of the composite image will be used instead of that for the specified drawable. This is equivalent to sampling for colors after merging all visible layers. In the case of a merged sampling, the supplied drawable is ignored.",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "1995-1996",
-                                     NULL);
+                                     "Deprecated: Use 'gimp-image-select-color' instead.",
+                                     "Deprecated: Use 'gimp-image-select-color' instead.",
+                                     "",
+                                     "",
+                                     "",
+                                     "gimp-image-select-color");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_drawable_id ("drawable",
                                                             "drawable",
@@ -514,12 +514,12 @@ register_selection_tools_procs (GimpPDB *pdb)
                                "gimp-by-color-select-full");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-by-color-select-full",
-                                     "Create a selection by selecting all pixels (in the specified drawable) with the same (or similar) color to that specified.",
-                                     "This tool creates a selection over the specified image. A by-color selection is determined by the supplied color under the constraints of the specified threshold. Essentially, all pixels (in the drawable) that have color sufficiently close to the specified color (as determined by the threshold value) are included in the selection. To select transparent regions, the color specified must also have minimum alpha. The antialiasing parameter allows the final selection mask to contain intermediate values based on close misses to the threshold bar. Feathering can be enabled optionally and is controlled with the 'feather-radius' parameter. If the 'sample-merged' parameter is TRUE, the data of the composite image will be used instead of that for the specified drawable. This is equivalent to sampling for colors after merging all visible layers. In the case of a merged sampling, the supplied drawable is ignored.",
+                                     "Deprecated: Use 'gimp-image-select-color' instead.",
+                                     "Deprecated: Use 'gimp-image-select-color' instead.",
                                      "David Gowers",
                                      "David Gowers",
                                      "2006",
-                                     NULL);
+                                     "gimp-image-select-color");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_drawable_id ("drawable",
                                                             "drawable",
@@ -731,13 +731,12 @@ register_selection_tools_procs (GimpPDB *pdb)
                                "gimp-fuzzy-select");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-fuzzy-select",
-                                     "Create a fuzzy selection starting at the specified coordinates on the specified drawable.",
-                                     "This tool creates a fuzzy selection over the specified image. A fuzzy selection is determined by a seed fill under the constraints of the specified threshold. Essentially, the color at the specified coordinates (in the drawable) is measured and the selection expands outwards from that point to any adjacent pixels which are not significantly different (as determined by the threshold value). This process continues until no more expansion is possible. The antialiasing parameter allows the final selection mask to contain intermediate values based on close misses to the threshold bar at pixels along the seed fill boundary. Feathering can be enabled optionally and is controlled with the 'feather-radius' paramter. If the 'sample-merged' parameter is TRUE, the data of the composite image will be used instead of that for the specified drawable. This is equivalent to sampling for colors after merging all visible layers. In the case of a merged sam
 pling, the supplied drawable is ignored. If"
-  "the sample is merged, the specified coordinates are relative to the image origin; otherwise, they are relative to the drawable's origin.",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "1995-1996",
-                                     NULL);
+                                     "Deprecated: Use 'gimp-image-select-fuzzy' instead.",
+                                     "Deprecated: Use 'gimp-image-select-fuzzy' instead.",
+                                     "",
+                                     "",
+                                     "",
+                                     "gimp-image-select-fuzzy");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_drawable_id ("drawable",
                                                             "drawable",
@@ -804,13 +803,12 @@ register_selection_tools_procs (GimpPDB *pdb)
                                "gimp-fuzzy-select-full");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-fuzzy-select-full",
-                                     "Create a fuzzy selection starting at the specified coordinates on the specified drawable.",
-                                     "This tool creates a fuzzy selection over the specified image. A fuzzy selection is determined by a seed fill under the constraints of the specified threshold. Essentially, the color at the specified coordinates (in the drawable) is measured and the selection expands outwards from that point to any adjacent pixels which are not significantly different (as determined by the threshold value). This process continues until no more expansion is possible. The antialiasing parameter allows the final selection mask to contain intermediate values based on close misses to the threshold bar at pixels along the seed fill boundary. Feathering can be enabled optionally and is controlled with the 'feather-radius' paramter. If the 'sample-merged' parameter is TRUE, the data of the composite image will be used instead of that for the specified drawable. This is equivalent to sampling for colors after merging all visible layers. In the case of a merged sam
 pling, the supplied drawable is ignored. If"
-  "the sample is merged, the specified coordinates are relative to the image origin; otherwise, they are relative to the drawable's origin.",
+                                     "Deprecated: Use 'gimp-image-select-fuzzy' instead.",
+                                     "Deprecated: Use 'gimp-image-select-fuzzy' instead.",
                                      "David Gowers",
                                      "David Gowers",
                                      "2006",
-                                     NULL);
+                                     "gimp-image-select-fuzzy");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_drawable_id ("drawable",
                                                             "drawable",
diff --git a/libgimp/gimpimageselect_pdb.c b/libgimp/gimpimageselect_pdb.c
index f642c4b..e349171 100644
--- a/libgimp/gimpimageselect_pdb.c
+++ b/libgimp/gimpimageselect_pdb.c
@@ -214,7 +214,8 @@ gimp_image_select_polygon (gint32          image_ID,
  * setters: gimp_context_set_antialias(), gimp_context_set_feather(),
  * gimp_context_set_feather_radius(), gimp_context_set_sample_merged(),
  * gimp_context_set_sample_criterion(),
- * gimp_context_set_sample_threshold(). In the case of a merged
+ * gimp_context_set_sample_threshold(),
+ * gimp_context_set_sample_transparent(). In the case of a merged
  * sampling, the supplied drawable is ignored. If the sample is merged,
  * the specified coordinates are relative to the image origin;
  * otherwise, they are relative to the drawable's origin.
diff --git a/libgimp/gimpselectiontools_pdb.c b/libgimp/gimpselectiontools_pdb.c
index 4ba9d0b..c859e3d 100644
--- a/libgimp/gimpselectiontools_pdb.c
+++ b/libgimp/gimpselectiontools_pdb.c
@@ -48,22 +48,7 @@
  * @feather_radius: Radius for feather operation.
  * @sample_merged: Use the composite image, not the drawable.
  *
- * Create a selection by selecting all pixels (in the specified
- * drawable) with the same (or similar) color to that specified.
- *
- * This tool creates a selection over the specified image. A by-color
- * selection is determined by the supplied color under the constraints
- * of the specified threshold. Essentially, all pixels (in the
- * drawable) that have color sufficiently close to the specified color
- * (as determined by the threshold value) are included in the
- * selection. The antialiasing parameter allows the final selection
- * mask to contain intermediate values based on close misses to the
- * threshold bar. Feathering can be enabled optionally and is
- * controlled with the 'feather-radius' parameter. If the
- * 'sample-merged' parameter is TRUE, the data of the composite image
- * will be used instead of that for the specified drawable. This is
- * equivalent to sampling for colors after merging all visible layers.
- * In the case of a merged sampling, the supplied drawable is ignored.
+ * Deprecated: Use gimp_image_select_color() instead.
  *
  * Returns: TRUE on success.
  **/
@@ -114,23 +99,7 @@ gimp_by_color_select (gint32          drawable_ID,
  * @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.
  *
- * Create a selection by selecting all pixels (in the specified
- * drawable) with the same (or similar) color to that specified.
- *
- * This tool creates a selection over the specified image. A by-color
- * selection is determined by the supplied color under the constraints
- * of the specified threshold. Essentially, all pixels (in the
- * drawable) that have color sufficiently close to the specified color
- * (as determined by the threshold value) are included in the
- * selection. To select transparent regions, the color specified must
- * also have minimum alpha. The antialiasing parameter allows the final
- * selection mask to contain intermediate values based on close misses
- * to the threshold bar. Feathering can be enabled optionally and is
- * controlled with the 'feather-radius' parameter. If the
- * 'sample-merged' parameter is TRUE, the data of the composite image
- * will be used instead of that for the specified drawable. This is
- * equivalent to sampling for colors after merging all visible layers.
- * In the case of a merged sampling, the supplied drawable is ignored.
+ * Deprecated: Use gimp_image_select_color() instead.
  *
  * Returns: TRUE on success.
  *
@@ -283,27 +252,7 @@ gimp_free_select (gint32          image_ID,
  * @feather_radius: Radius for feather operation.
  * @sample_merged: Use the composite image, not the drawable.
  *
- * Create a fuzzy selection starting at the specified coordinates on
- * the specified drawable.
- *
- * This tool creates a fuzzy selection over the specified image. A
- * fuzzy selection is determined by a seed fill under the constraints
- * of the specified threshold. Essentially, the color at the specified
- * coordinates (in the drawable) is measured and the selection expands
- * outwards from that point to any adjacent pixels which are not
- * significantly different (as determined by the threshold value). This
- * process continues until no more expansion is possible. The
- * antialiasing parameter allows the final selection mask to contain
- * intermediate values based on close misses to the threshold bar at
- * pixels along the seed fill boundary. Feathering can be enabled
- * optionally and is controlled with the 'feather-radius' paramter. If
- * the 'sample-merged' parameter is TRUE, the data of the composite
- * image will be used instead of that for the specified drawable. This
- * is equivalent to sampling for colors after merging all visible
- * layers. In the case of a merged sampling, the supplied drawable is
- * ignored. If the sample is merged, the specified coordinates are
- * relative to the image origin; otherwise, they are relative to the
- * drawable's origin.
+ * Deprecated: Use gimp_image_select_fuzzy() instead.
  *
  * Returns: TRUE on success.
  **/
@@ -357,27 +306,7 @@ gimp_fuzzy_select (gint32         drawable_ID,
  * @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.
  *
- * Create a fuzzy selection starting at the specified coordinates on
- * the specified drawable.
- *
- * This tool creates a fuzzy selection over the specified image. A
- * fuzzy selection is determined by a seed fill under the constraints
- * of the specified threshold. Essentially, the color at the specified
- * coordinates (in the drawable) is measured and the selection expands
- * outwards from that point to any adjacent pixels which are not
- * significantly different (as determined by the threshold value). This
- * process continues until no more expansion is possible. The
- * antialiasing parameter allows the final selection mask to contain
- * intermediate values based on close misses to the threshold bar at
- * pixels along the seed fill boundary. Feathering can be enabled
- * optionally and is controlled with the 'feather-radius' paramter. If
- * the 'sample-merged' parameter is TRUE, the data of the composite
- * image will be used instead of that for the specified drawable. This
- * is equivalent to sampling for colors after merging all visible
- * layers. In the case of a merged sampling, the supplied drawable is
- * ignored. If the sample is merged, the specified coordinates are
- * relative to the image origin; otherwise, they are relative to the
- * drawable's origin.
+ * Deprecated: Use gimp_image_select_fuzzy() instead.
  *
  * Returns: TRUE on success.
  *
diff --git a/libgimp/gimpselectiontools_pdb.h b/libgimp/gimpselectiontools_pdb.h
index 54b1ca2..034ebdf 100644
--- a/libgimp/gimpselectiontools_pdb.h
+++ b/libgimp/gimpselectiontools_pdb.h
@@ -28,6 +28,7 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
+#ifndef GIMP_DISABLE_DEPRECATED
 gboolean gimp_by_color_select      (gint32               drawable_ID,
                                     const GimpRGB       *color,
                                     gint                 threshold,
@@ -47,7 +48,6 @@ gboolean gimp_by_color_select_full (gint32               drawable_ID,
                                     gboolean             sample_merged,
                                     gboolean             select_transparent,
                                     GimpSelectCriterion  select_criterion);
-#ifndef GIMP_DISABLE_DEPRECATED
 gboolean gimp_ellipse_select       (gint32               image_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -64,7 +64,6 @@ gboolean gimp_free_select          (gint32               image_ID,
                                     gboolean             antialias,
                                     gboolean             feather,
                                     gdouble              feather_radius);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean gimp_fuzzy_select         (gint32               drawable_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -86,7 +85,6 @@ gboolean gimp_fuzzy_select_full    (gint32               drawable_ID,
                                     gboolean             sample_merged,
                                     gboolean             select_transparent,
                                     GimpSelectCriterion  select_criterion);
-#ifndef GIMP_DISABLE_DEPRECATED
 gboolean gimp_rect_select          (gint32               image_ID,
                                     gdouble              x,
                                     gdouble              y,
diff --git a/tools/pdbgen/pdb/selection_tools.pdb b/tools/pdbgen/pdb/selection_tools.pdb
index b72d645..49e2505 100644
--- a/tools/pdbgen/pdb/selection_tools.pdb
+++ b/tools/pdbgen/pdb/selection_tools.pdb
@@ -17,26 +17,7 @@
 # "Perlized" from C source by Manish Singh <yosh gimp org>
 
 sub by_color_select {
-    $blurb = <<'BLURB';
-Create a selection by selecting all pixels (in the specified drawable) with the
-same (or similar) color to that specified.
-BLURB
-
-    $help = <<'HELP';
-This tool creates a selection over the specified image. A by-color selection is
-determined by the supplied color under the constraints of the specified
-threshold. Essentially, all pixels (in the drawable) that have color
-sufficiently close to the specified color (as determined by the threshold
-value) are included in the selection. The antialiasing parameter allows the
-final selection mask to contain intermediate values based on close misses to
-the threshold bar. Feathering can be enabled optionally and is controlled with
-the 'feather-radius' parameter. If the 'sample-merged' parameter is TRUE,
-the data of the composite image will be used instead of that for the specified
-drawable. This is equivalent to sampling for colors after merging all visible
-layers. In the case of a merged sampling, the supplied drawable is ignored.
-HELP
-
-    &std_pdb_misc;
+    &std_pdb_deprecated ('gimp-image-select-color');
 
     @inargs = (
 	{ name => 'drawable', type => 'drawable',
@@ -80,26 +61,7 @@ CODE
 
 
 sub by_color_select_full {
-    $blurb = <<'BLURB';
-Create a selection by selecting all pixels (in the specified drawable) with the
-same (or similar) color to that specified.
-BLURB
-
-    $help = <<'HELP';
-This tool creates a selection over the specified image. A by-color selection is
-determined by the supplied color under the constraints of the specified
-threshold. Essentially, all pixels (in the drawable) that have color
-sufficiently close to the specified color (as determined by the threshold
-value) are included in the selection. To select transparent regions, the color 
-specified must also have minimum alpha. The antialiasing parameter allows the 
-final selection mask to contain intermediate values based on close misses to 
-the threshold bar. Feathering can be enabled optionally and is controlled with 
-the 'feather-radius' parameter. If the 'sample-merged' parameter is TRUE, the data
- of the composite image will be used instead of that for the specified drawable. 
-This is equivalent to sampling for colors after merging all visible layers. 
-In the case of a merged sampling, the supplied drawable is ignored.
-HELP
-
+    &std_pdb_deprecated ('gimp-image-select-color');
     &david_pdb_misc('2006','2.4');
 
     @inargs = (
@@ -237,30 +199,7 @@ CODE
 
 
 sub fuzzy_select {
-    $blurb = <<'BLURB';
-Create a fuzzy selection starting at the specified coordinates on the specified
-drawable.
-BLURB
-
-    $help = <<'HELP';
-This tool creates a fuzzy selection over the specified image. A fuzzy selection
-is determined by a seed fill under the constraints of the specified threshold.
-Essentially, the color at the specified coordinates (in the drawable) is
-measured and the selection expands outwards from that point to any adjacent
-pixels which are not significantly different (as determined by the threshold
-value). This process continues until no more expansion is possible. The
-antialiasing parameter allows the final selection mask to contain intermediate
-values based on close misses to the threshold bar at pixels along the seed fill
-boundary. Feathering can be enabled optionally and is controlled with the
-'feather-radius' paramter. If the 'sample-merged' parameter is TRUE, the data
-of the composite image will be used instead of that for the specified drawable.
-This is equivalent to sampling for colors after merging all visible layers. In
-the case of a merged sampling, the supplied drawable is ignored. If the sample
-is merged, the specified coordinates are relative to the image origin;
-otherwise, they are relative to the drawable's origin.
-HELP
-
-    &std_pdb_misc;
+    &std_pdb_deprecated ('gimp-image-select-fuzzy');
 
     @inargs = (
 	{ name => 'drawable', type => 'drawable',
@@ -309,29 +248,7 @@ CODE
 
 
 sub fuzzy_select_full {
-    $blurb = <<'BLURB';
-Create a fuzzy selection starting at the specified coordinates on the specified
-drawable.
-BLURB
-
-    $help = <<'HELP';
-This tool creates a fuzzy selection over the specified image. A fuzzy selection
-is determined by a seed fill under the constraints of the specified threshold.
-Essentially, the color at the specified coordinates (in the drawable) is
-measured and the selection expands outwards from that point to any adjacent
-pixels which are not significantly different (as determined by the threshold
-value). This process continues until no more expansion is possible. The
-antialiasing parameter allows the final selection mask to contain intermediate
-values based on close misses to the threshold bar at pixels along the seed fill
-boundary. Feathering can be enabled optionally and is controlled with the
-'feather-radius' paramter. If the 'sample-merged' parameter is TRUE, the data
-of the composite image will be used instead of that for the specified drawable.
-This is equivalent to sampling for colors after merging all visible layers. In
-the case of a merged sampling, the supplied drawable is ignored. If the sample
-is merged, the specified coordinates are relative to the image origin;
-otherwise, they are relative to the drawable's origin.
-HELP
-
+    &std_pdb_deprecated ('gimp-image-select-fuzzy');
     &david_pdb_misc("2006","2.4");
 
     @inargs = (
@@ -431,7 +348,6 @@ CODE
 
 sub round_rect_select {
     &std_pdb_deprecated ('gimp-image-select-round-rectangle');
-
     &martin_pdb_misc("2006","2.4");
 
     @inargs = (



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