[gimp] devel-docs, libgimpbase: getting rid of gimp_checks_get_shades().



commit 0c01a4436962719776b4a4d535bfc11961a64d11
Author: Jehan <jehan girinstud io>
Date:   Sat May 14 17:33:07 2022 +0200

    devel-docs, libgimpbase: getting rid of gimp_checks_get_shades().
    
    In the original gimp-2-10 branch where this feature was originally
    worked on, we had to keep gimp_checks_get_shades(). But on `master`
    where we will reset and break API, let's get rid of this function which
    should not be used anymore.

 .../removed_functions.md                           |  1 +
 libgimpbase/gimpbase.def                           |  1 -
 libgimpbase/gimpchecks.c                           | 36 ----------------------
 libgimpbase/gimpchecks.h                           |  5 ---
 4 files changed, 1 insertion(+), 42 deletions(-)
---
diff --git a/devel-docs/GIMP3-plug-in-porting-guide/removed_functions.md 
b/devel-docs/GIMP3-plug-in-porting-guide/removed_functions.md
index 6e9ea38d9a..b71df05721 100644
--- a/devel-docs/GIMP3-plug-in-porting-guide/removed_functions.md
+++ b/devel-docs/GIMP3-plug-in-porting-guide/removed_functions.md
@@ -21,6 +21,7 @@ possible in the previous API is obviously still possible.
 | `gimp_by_color_select()`                        | `gimp_image_select_color()`                       |
 | `gimp_by_color_select_full()`                   | `gimp_image_select_color()`                       |
 | `gimp_channel_menu_new()`                       | `gimp_channel_combo_box_new()`                    |
+| `gimp_checks_get_shades()`                      | `gimp_checks_get_colors()`                        |
 | `gimp_color_balance()`                          | `gimp_drawable_color_color_balance()`             |
 | `gimp_color_display_convert()`                  | `gimp_color_display_convert_buffer()`             |
 | `gimp_color_display_convert_surface()`          | `gimp_color_display_convert_buffer()`             |
diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def
index b0a4cf11b5..2d4279133d 100644
--- a/libgimpbase/gimpbase.def
+++ b/libgimpbase/gimpbase.def
@@ -16,7 +16,6 @@ EXPORTS
        gimp_check_size_get_type
        gimp_check_type_get_type
        gimp_checks_get_colors
-       gimp_checks_get_shades
        gimp_clone_type_get_type
        gimp_color_tag_get_type
        gimp_component_type_get_type
diff --git a/libgimpbase/gimpchecks.c b/libgimpbase/gimpchecks.c
index 988333b468..901b4da244 100644
--- a/libgimpbase/gimpchecks.c
+++ b/libgimpbase/gimpchecks.c
@@ -38,42 +38,6 @@
  **/
 
 
-/**
- * gimp_checks_get_shades:
- * @type:  the checkerboard type
- * @light: (out) (optional): return location for the light shade
- * @dark:  (out) (optional): return location for the dark shade
- *
- * Deprecated: use gimp_checks_get_colors() instead.
- *
- * Retrieves the actual shades of gray to use when drawing a
- * checkerboard for a certain #GimpCheckType.
- *
- * Since: 2.2
- **/
-void
-gimp_checks_get_shades (GimpCheckType  type,
-                        guchar        *light,
-                        guchar        *dark)
-{
-  const guchar shades[6][2] =
-    {
-      { 204, 255 },  /*  LIGHT_CHECKS  */
-      { 102, 153 },  /*  GRAY_CHECKS   */
-      {   0,  51 },  /*  DARK_CHECKS   */
-      { 255, 255 },  /*  WHITE_ONLY    */
-      { 127, 127 },  /*  GRAY_ONLY     */
-      {   0,   0 }   /*  BLACK_ONLY    */
-    };
-
-  type = MIN (type, 5);
-
-  if (light)
-    *light = shades[type][1];
-  if (dark)
-    *dark  = shades[type][0];
-}
-
 /**
  * gimp_checks_get_colors:
  * @type:            the checkerboard type
diff --git a/libgimpbase/gimpchecks.h b/libgimpbase/gimpchecks.h
index adea3e0953..289b74cb72 100644
--- a/libgimpbase/gimpchecks.h
+++ b/libgimpbase/gimpchecks.h
@@ -135,11 +135,6 @@ G_BEGIN_DECLS
 #define GIMP_CHECKS_CUSTOM_COLOR2 GIMP_CHECKS_GRAY_COLOR_DARK
 
 
-GIMP_DEPRECATED_FOR(gimp_checks_get_colors)
-void  gimp_checks_get_shades (GimpCheckType  type,
-                              guchar        *light,
-                              guchar        *dark);
-
 void  gimp_checks_get_colors (GimpCheckType  type,
                               GimpRGB       *color1,
                               GimpRGB       *color2);


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