[gimp] libgimp: make pdbgen generate GIMP_DEPRECATED stuff



commit 86f53a3ceb8f5f73d6558f58ca978b7d480cc606
Author: Michael Natterer <mitch gimp org>
Date:   Thu May 3 01:12:25 2012 +0200

    libgimp: make pdbgen generate GIMP_DEPRECATED stuff
    
    instead of GIMP_DISABLE_DEPRECATED.

 libgimp/gimpbrushes_pdb.c           |    3 ---
 libgimp/gimpbrushes_pdb.h           |    6 ++++--
 libgimp/gimpcolor_pdb.c             |    3 ---
 libgimp/gimpcolor_pdb.h             |    3 +--
 libgimp/gimpdrawable_pdb.c          |    3 ---
 libgimp/gimpdrawable_pdb.h          |    3 +--
 libgimp/gimpdrawabletransform_pdb.c |    3 ---
 libgimp/gimpdrawabletransform_pdb.h |   18 ++++++++++++++++--
 libgimp/gimpfloatingsel_pdb.c       |    3 ---
 libgimp/gimpfloatingsel_pdb.h       |    4 ++--
 libgimp/gimpgradients_pdb.c         |    3 ---
 libgimp/gimpgradients_pdb.h         |    5 +++--
 libgimp/gimpimage_pdb.c             |    3 ---
 libgimp/gimpimage_pdb.h             |   15 +++++----------
 libgimp/gimplayer_pdb.c             |    3 ---
 libgimp/gimplayer_pdb.h             |    3 +--
 libgimp/gimppalettes_pdb.c          |    3 ---
 libgimp/gimppalettes_pdb.h          |    4 ++--
 libgimp/gimppaths_pdb.c             |    3 ---
 libgimp/gimppaths_pdb.h             |   17 +++++++++++++++--
 libgimp/gimppatterns_pdb.c          |    3 ---
 libgimp/gimppatterns_pdb.h          |    4 ++--
 libgimp/gimpselection_pdb.c         |    3 ---
 libgimp/gimpselection_pdb.h         |    7 +++----
 libgimp/gimpselectiontools_pdb.c    |    3 ---
 libgimp/gimpselectiontools_pdb.h    |   10 ++++++++--
 libgimp/gimptextlayer_pdb.c         |    3 ---
 libgimp/gimptextlayer_pdb.h         |    4 ++--
 libgimp/gimptexttool_pdb.c          |    3 ---
 libgimp/gimptexttool_pdb.h          |    4 ++--
 libgimp/gimptransformtools_pdb.c    |    3 ---
 libgimp/gimptransformtools_pdb.h    |    8 ++++++--
 libgimp/gimpvectors_pdb.c           |    3 ---
 libgimp/gimpvectors_pdb.h           |    3 +--
 tools/pdbgen/lib.pl                 |   30 +++++++++++-------------------
 35 files changed, 85 insertions(+), 114 deletions(-)
---
diff --git a/libgimp/gimpbrushes_pdb.c b/libgimp/gimpbrushes_pdb.c
index 3d1ba48..a640be8 100644
--- a/libgimp/gimpbrushes_pdb.c
+++ b/libgimp/gimpbrushes_pdb.c
@@ -25,9 +25,6 @@
 #include <string.h>
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_BRUSHES_PDB_H__
-#include "gimpbrushes_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpbrushes_pdb.h b/libgimp/gimpbrushes_pdb.h
index baaf71c..1970259 100644
--- a/libgimp/gimpbrushes_pdb.h
+++ b/libgimp/gimpbrushes_pdb.h
@@ -35,12 +35,15 @@ G_BEGIN_DECLS
 gboolean gimp_brushes_refresh        (void);
 gchar**  gimp_brushes_get_list       (const gchar           *filter,
                                       gint                  *num_brushes);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_context_get_brush)
 gchar*   gimp_brushes_get_brush      (gint                  *width,
                                       gint                  *height,
                                       gint                  *spacing);
+GIMP_DEPRECATED_FOR(gimp_brush_get_spacing)
 gint     gimp_brushes_get_spacing    (void);
+GIMP_DEPRECATED_FOR(gimp_brush_set_spacing)
 gboolean gimp_brushes_set_spacing    (gint                   spacing);
+GIMP_DEPRECATED_FOR(gimp_brush_get_pixels)
 gchar*   gimp_brushes_get_brush_data (const gchar           *name,
                                       gdouble               *opacity,
                                       gint                  *spacing,
@@ -49,7 +52,6 @@ gchar*   gimp_brushes_get_brush_data (const gchar           *name,
                                       gint                  *height,
                                       gint                  *length,
                                       guint8               **mask_data);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimpcolor_pdb.c b/libgimp/gimpcolor_pdb.c
index 9233618..cc4bc0f 100644
--- a/libgimp/gimpcolor_pdb.c
+++ b/libgimp/gimpcolor_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_COLOR_PDB_H__
-#include "gimpcolor_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpcolor_pdb.h b/libgimp/gimpcolor_pdb.h
index 6c7d06c..a7b6b6b 100644
--- a/libgimp/gimpcolor_pdb.h
+++ b/libgimp/gimpcolor_pdb.h
@@ -42,9 +42,8 @@ gboolean gimp_levels              (gint32                drawable_ID,
                                    gdouble               gamma,
                                    gint                  low_output,
                                    gint                  high_output);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_levels_stretch)
 gboolean gimp_levels_auto         (gint32                drawable_ID);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean gimp_levels_stretch      (gint32                drawable_ID);
 gboolean gimp_posterize           (gint32                drawable_ID,
                                    gint                  levels);
diff --git a/libgimp/gimpdrawable_pdb.c b/libgimp/gimpdrawable_pdb.c
index 8337837..6f7237e 100644
--- a/libgimp/gimpdrawable_pdb.c
+++ b/libgimp/gimpdrawable_pdb.c
@@ -25,9 +25,6 @@
 #include <string.h>
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_DRAWABLE_PDB_H__
-#include "gimpdrawable_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpdrawable_pdb.h b/libgimp/gimpdrawable_pdb.h
index 6ad3054..beed194 100644
--- a/libgimp/gimpdrawable_pdb.h
+++ b/libgimp/gimpdrawable_pdb.h
@@ -45,10 +45,9 @@ gint                     gimp_drawable_height             (gint32
 gboolean                 gimp_drawable_offsets            (gint32                      drawable_ID,
                                                            gint                       *offset_x,
                                                            gint                       *offset_y);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED
 gboolean                 gimp_drawable_set_image          (gint32                      drawable_ID,
                                                            gint32                      image_ID);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean                 gimp_drawable_mask_bounds        (gint32                      drawable_ID,
                                                            gint                       *x1,
                                                            gint                       *y1,
diff --git a/libgimp/gimpdrawabletransform_pdb.c b/libgimp/gimpdrawabletransform_pdb.c
index b7ed98b..01e8819 100644
--- a/libgimp/gimpdrawabletransform_pdb.c
+++ b/libgimp/gimpdrawabletransform_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_DRAWABLE_TRANSFORM_PDB_H__
-#include "gimpdrawabletransform_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpdrawabletransform_pdb.h b/libgimp/gimpdrawabletransform_pdb.h
index 17dca0f..db54925 100644
--- a/libgimp/gimpdrawabletransform_pdb.h
+++ b/libgimp/gimpdrawabletransform_pdb.h
@@ -32,12 +32,13 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_item_transform_flip_simple)
 gint32 gimp_drawable_transform_flip_simple         (gint32                 drawable_ID,
                                                     GimpOrientationType    flip_type,
                                                     gboolean               auto_center,
                                                     gdouble                axis,
                                                     gboolean               clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_flip)
 gint32 gimp_drawable_transform_flip                (gint32                 drawable_ID,
                                                     gdouble                x0,
                                                     gdouble                y0,
@@ -48,6 +49,7 @@ gint32 gimp_drawable_transform_flip                (gint32                 drawa
                                                     gboolean               supersample,
                                                     gint                   recursion_level,
                                                     gboolean               clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_flip)
 gint32 gimp_drawable_transform_flip_default        (gint32                 drawable_ID,
                                                     gdouble                x0,
                                                     gdouble                y0,
@@ -55,6 +57,7 @@ gint32 gimp_drawable_transform_flip_default        (gint32                 drawa
                                                     gdouble                y1,
                                                     gboolean               interpolate,
                                                     gboolean               clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_perspective)
 gint32 gimp_drawable_transform_perspective         (gint32                 drawable_ID,
                                                     gdouble                x0,
                                                     gdouble                y0,
@@ -69,6 +72,7 @@ gint32 gimp_drawable_transform_perspective         (gint32                 drawa
                                                     gboolean               supersample,
                                                     gint                   recursion_level,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_perspective)
 gint32 gimp_drawable_transform_perspective_default (gint32                 drawable_ID,
                                                     gdouble                x0,
                                                     gdouble                y0,
@@ -80,12 +84,14 @@ gint32 gimp_drawable_transform_perspective_default (gint32                 drawa
                                                     gdouble                y3,
                                                     gboolean               interpolate,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_rotate_simple)
 gint32 gimp_drawable_transform_rotate_simple       (gint32                 drawable_ID,
                                                     GimpRotationType       rotate_type,
                                                     gboolean               auto_center,
                                                     gint                   center_x,
                                                     gint                   center_y,
                                                     gboolean               clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_rotate)
 gint32 gimp_drawable_transform_rotate              (gint32                 drawable_ID,
                                                     gdouble                angle,
                                                     gboolean               auto_center,
@@ -96,6 +102,7 @@ gint32 gimp_drawable_transform_rotate              (gint32                 drawa
                                                     gboolean               supersample,
                                                     gint                   recursion_level,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_rotate)
 gint32 gimp_drawable_transform_rotate_default      (gint32                 drawable_ID,
                                                     gdouble                angle,
                                                     gboolean               auto_center,
@@ -103,6 +110,7 @@ gint32 gimp_drawable_transform_rotate_default      (gint32                 drawa
                                                     gint                   center_y,
                                                     gboolean               interpolate,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_scale)
 gint32 gimp_drawable_transform_scale               (gint32                 drawable_ID,
                                                     gdouble                x0,
                                                     gdouble                y0,
@@ -113,6 +121,7 @@ gint32 gimp_drawable_transform_scale               (gint32                 drawa
                                                     gboolean               supersample,
                                                     gint                   recursion_level,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_scale)
 gint32 gimp_drawable_transform_scale_default       (gint32                 drawable_ID,
                                                     gdouble                x0,
                                                     gdouble                y0,
@@ -120,6 +129,7 @@ gint32 gimp_drawable_transform_scale_default       (gint32                 drawa
                                                     gdouble                y1,
                                                     gboolean               interpolate,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_shear)
 gint32 gimp_drawable_transform_shear               (gint32                 drawable_ID,
                                                     GimpOrientationType    shear_type,
                                                     gdouble                magnitude,
@@ -128,11 +138,13 @@ gint32 gimp_drawable_transform_shear               (gint32                 drawa
                                                     gboolean               supersample,
                                                     gint                   recursion_level,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_shear)
 gint32 gimp_drawable_transform_shear_default       (gint32                 drawable_ID,
                                                     GimpOrientationType    shear_type,
                                                     gdouble                magnitude,
                                                     gboolean               interpolate,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_2d)
 gint32 gimp_drawable_transform_2d                  (gint32                 drawable_ID,
                                                     gdouble                source_x,
                                                     gdouble                source_y,
@@ -146,6 +158,7 @@ gint32 gimp_drawable_transform_2d                  (gint32                 drawa
                                                     gboolean               supersample,
                                                     gint                   recursion_level,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_2d)
 gint32 gimp_drawable_transform_2d_default          (gint32                 drawable_ID,
                                                     gdouble                source_x,
                                                     gdouble                source_y,
@@ -156,6 +169,7 @@ gint32 gimp_drawable_transform_2d_default          (gint32                 drawa
                                                     gdouble                dest_y,
                                                     gboolean               interpolate,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_matrix)
 gint32 gimp_drawable_transform_matrix              (gint32                 drawable_ID,
                                                     gdouble                coeff_0_0,
                                                     gdouble                coeff_0_1,
@@ -171,6 +185,7 @@ gint32 gimp_drawable_transform_matrix              (gint32                 drawa
                                                     gboolean               supersample,
                                                     gint                   recursion_level,
                                                     GimpTransformResize    clip_result);
+GIMP_DEPRECATED_FOR(gimp_item_transform_matrix)
 gint32 gimp_drawable_transform_matrix_default      (gint32                 drawable_ID,
                                                     gdouble                coeff_0_0,
                                                     gdouble                coeff_0_1,
@@ -183,7 +198,6 @@ gint32 gimp_drawable_transform_matrix_default      (gint32                 drawa
                                                     gdouble                coeff_2_2,
                                                     gboolean               interpolate,
                                                     GimpTransformResize    clip_result);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimpfloatingsel_pdb.c b/libgimp/gimpfloatingsel_pdb.c
index 561594c..cdfaf15 100644
--- a/libgimp/gimpfloatingsel_pdb.c
+++ b/libgimp/gimpfloatingsel_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_FLOATING_SEL_PDB_H__
-#include "gimpfloatingsel_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpfloatingsel_pdb.h b/libgimp/gimpfloatingsel_pdb.h
index 0254494..14d66cf 100644
--- a/libgimp/gimpfloatingsel_pdb.h
+++ b/libgimp/gimpfloatingsel_pdb.h
@@ -37,12 +37,12 @@ gboolean gimp_floating_sel_anchor   (gint32   floating_sel_ID);
 gboolean gimp_floating_sel_to_layer (gint32   floating_sel_ID);
 gboolean gimp_floating_sel_attach   (gint32   layer_ID,
                                      gint32   drawable_ID);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED
 gboolean gimp_floating_sel_rigor    (gint32   floating_sel_ID,
                                      gboolean undo);
+GIMP_DEPRECATED
 gboolean gimp_floating_sel_relax    (gint32   floating_sel_ID,
                                      gboolean undo);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimpgradients_pdb.c b/libgimp/gimpgradients_pdb.c
index be71d91..ab0c596 100644
--- a/libgimp/gimpgradients_pdb.c
+++ b/libgimp/gimpgradients_pdb.c
@@ -25,9 +25,6 @@
 #include <string.h>
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_GRADIENTS_PDB_H__
-#include "gimpgradients_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpgradients_pdb.h b/libgimp/gimpgradients_pdb.h
index aa901ec..a483bc5 100644
--- a/libgimp/gimpgradients_pdb.h
+++ b/libgimp/gimpgradients_pdb.h
@@ -35,18 +35,19 @@ G_BEGIN_DECLS
 gboolean gimp_gradients_refresh           (void);
 gchar**  gimp_gradients_get_list          (const gchar    *filter,
                                            gint           *num_gradients);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_gradient_get_uniform_samples)
 gdouble* gimp_gradients_sample_uniform    (gint            num_samples,
                                            gboolean        reverse);
+GIMP_DEPRECATED_FOR(gimp_gradient_get_custom_samples)
 gdouble* gimp_gradients_sample_custom     (gint            num_samples,
                                            const gdouble  *positions,
                                            gboolean        reverse);
+GIMP_DEPRECATED_FOR(gimp_gradient_get_uniform_samples)
 gchar*   gimp_gradients_get_gradient_data (const gchar    *name,
                                            gint            sample_size,
                                            gboolean        reverse,
                                            gint           *width,
                                            gdouble       **grad_data);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c
index ca0d930..3ea7415 100644
--- a/libgimp/gimpimage_pdb.c
+++ b/libgimp/gimpimage_pdb.c
@@ -25,9 +25,6 @@
 #include <string.h>
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_IMAGE_PDB_H__
-#include "gimpimage_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpimage_pdb.h b/libgimp/gimpimage_pdb.h
index 8c6da10..ae5015e 100644
--- a/libgimp/gimpimage_pdb.h
+++ b/libgimp/gimpimage_pdb.h
@@ -47,9 +47,8 @@ GimpImageBaseType        gimp_image_base_type                (gint32
 GimpPrecision            gimp_image_get_precision            (gint32                  image_ID);
 gint                     gimp_image_width                    (gint32                  image_ID);
 gint                     gimp_image_height                   (gint32                  image_ID);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_drawable_free_shadow)
 gboolean                 gimp_image_free_shadow              (gint32                  image_ID);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean                 gimp_image_resize                   (gint32                  image_ID,
                                                               gint                    new_width,
                                                               gint                    new_height,
@@ -59,12 +58,11 @@ gboolean                 gimp_image_resize_to_layers         (gint32
 gboolean                 gimp_image_scale                    (gint32                  image_ID,
                                                               gint                    new_width,
                                                               gint                    new_height);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_image_scale)
 gboolean                 gimp_image_scale_full               (gint32                  image_ID,
                                                               gint                    new_width,
                                                               gint                    new_height,
                                                               GimpInterpolationType   interpolation);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean                 gimp_image_crop                     (gint32                  image_ID,
                                                               gint                    new_width,
                                                               gint                    new_height,
@@ -95,33 +93,30 @@ gboolean                 gimp_image_pick_color               (gint32
 gint32                   gimp_image_pick_correlate_layer     (gint32                  image_ID,
                                                               gint                    x,
                                                               gint                    y);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_image_insert_layer)
 gboolean                 gimp_image_add_layer                (gint32                  image_ID,
                                                               gint32                  layer_ID,
                                                               gint                    position);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean                 gimp_image_insert_layer             (gint32                  image_ID,
                                                               gint32                  layer_ID,
                                                               gint32                  parent_ID,
                                                               gint                    position);
 gboolean                 gimp_image_remove_layer             (gint32                  image_ID,
                                                               gint32                  layer_ID);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_image_insert_channel)
 gboolean                 gimp_image_add_channel              (gint32                  image_ID,
                                                               gint32                  channel_ID,
                                                               gint                    position);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean                 gimp_image_insert_channel           (gint32                  image_ID,
                                                               gint32                  channel_ID,
                                                               gint32                  parent_ID,
                                                               gint                    position);
 gboolean                 gimp_image_remove_channel           (gint32                  image_ID,
                                                               gint32                  channel_ID);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_image_insert_vectors)
 gboolean                 gimp_image_add_vectors              (gint32                  image_ID,
                                                               gint32                  vectors_ID,
                                                               gint                    position);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean                 gimp_image_insert_vectors           (gint32                  image_ID,
                                                               gint32                  vectors_ID,
                                                               gint32                  parent_ID,
diff --git a/libgimp/gimplayer_pdb.c b/libgimp/gimplayer_pdb.c
index d8e4702..11a2436 100644
--- a/libgimp/gimplayer_pdb.c
+++ b/libgimp/gimplayer_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_LAYER_PDB_H__
-#include "gimplayer_pdb.h"
 
 
 /**
diff --git a/libgimp/gimplayer_pdb.h b/libgimp/gimplayer_pdb.h
index 4c192cd..88bfe69 100644
--- a/libgimp/gimplayer_pdb.h
+++ b/libgimp/gimplayer_pdb.h
@@ -53,13 +53,12 @@ gboolean               gimp_layer_scale                (gint32                 l
                                                         gint                   new_width,
                                                         gint                   new_height,
                                                         gboolean               local_origin);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_layer_scale)
 gboolean               gimp_layer_scale_full           (gint32                 layer_ID,
                                                         gint                   new_width,
                                                         gint                   new_height,
                                                         gboolean               local_origin,
                                                         GimpInterpolationType  interpolation);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean               gimp_layer_resize               (gint32                 layer_ID,
                                                         gint                   new_width,
                                                         gint                   new_height,
diff --git a/libgimp/gimppalettes_pdb.c b/libgimp/gimppalettes_pdb.c
index 23645a1..3864b3d 100644
--- a/libgimp/gimppalettes_pdb.c
+++ b/libgimp/gimppalettes_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_PALETTES_PDB_H__
-#include "gimppalettes_pdb.h"
 
 
 /**
diff --git a/libgimp/gimppalettes_pdb.h b/libgimp/gimppalettes_pdb.h
index 877c922..fd4fa58 100644
--- a/libgimp/gimppalettes_pdb.h
+++ b/libgimp/gimppalettes_pdb.h
@@ -35,13 +35,13 @@ G_BEGIN_DECLS
 gboolean gimp_palettes_refresh           (void);
 gchar**  gimp_palettes_get_list          (const gchar *filter,
                                           gint        *num_palettes);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_context_get_palette)
 gchar*   gimp_palettes_get_palette       (gint        *num_colors);
+GIMP_DEPRECATED_FOR(gimp_palette_entry_get_color)
 gchar*   gimp_palettes_get_palette_entry (const gchar *name,
                                           gint         entry_num,
                                           gint        *num_colors,
                                           GimpRGB     *color);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimppaths_pdb.c b/libgimp/gimppaths_pdb.c
index 8fc972d..dec1381 100644
--- a/libgimp/gimppaths_pdb.c
+++ b/libgimp/gimppaths_pdb.c
@@ -25,9 +25,6 @@
 #include <string.h>
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_PATHS_PDB_H__
-#include "gimppaths_pdb.h"
 
 
 /**
diff --git a/libgimp/gimppaths_pdb.h b/libgimp/gimppaths_pdb.h
index a70bc87..a28ee7b 100644
--- a/libgimp/gimppaths_pdb.h
+++ b/libgimp/gimppaths_pdb.h
@@ -32,41 +32,54 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_image_get_vectors)
 gchar**  gimp_path_list              (gint32           image_ID,
                                       gint            *num_paths);
+GIMP_DEPRECATED_FOR(gimp_image_get_active_vectors)
 gchar*   gimp_path_get_current       (gint32           image_ID);
+GIMP_DEPRECATED_FOR(gimp_image_set_active_vectors)
 gboolean gimp_path_set_current       (gint32           image_ID,
                                       const gchar     *name);
+GIMP_DEPRECATED_FOR(gimp_image_remove_vectors)
 gboolean gimp_path_delete            (gint32           image_ID,
                                       const gchar     *name);
+GIMP_DEPRECATED_FOR(gimp_vectors_stroke_get_points)
 gint     gimp_path_get_points        (gint32           image_ID,
                                       const gchar     *name,
                                       gint            *path_closed,
                                       gint            *num_path_point_details,
                                       gdouble        **points_pairs);
+GIMP_DEPRECATED_FOR(gimp_vectors_stroke_new_from_points)
 gboolean gimp_path_set_points        (gint32           image_ID,
                                       const gchar     *name,
                                       gint             ptype,
                                       gint             num_path_points,
                                       const gdouble   *points_pairs);
+GIMP_DEPRECATED_FOR(gimp_edit_stroke_vectors)
 gboolean gimp_path_stroke_current    (gint32           image_ID);
+GIMP_DEPRECATED_FOR(gimp_vectors_stroke_get_point_at_dist)
 gint     gimp_path_get_point_at_dist (gint32           image_ID,
                                       gdouble          distance,
                                       gint            *y_point,
                                       gdouble         *slope);
+GIMP_DEPRECATED_FOR(gimp_vectors_get_tattoo)
 gint     gimp_path_get_tattoo        (gint32           image_ID,
                                       const gchar     *name);
+GIMP_DEPRECATED_FOR(gimp_vectors_set_tattoo)
 gboolean gimp_path_set_tattoo        (gint32           image_ID,
                                       const gchar     *name,
                                       gint             tattovalue);
+GIMP_DEPRECATED_FOR(gimp_image_get_vectors_by_tattoo)
 gchar*   gimp_get_path_by_tattoo     (gint32           image_ID,
                                       gint             tattoo);
+GIMP_DEPRECATED_FOR(gimp_vectors_get_linked)
 gboolean gimp_path_get_locked        (gint32           image_ID,
                                       const gchar     *name);
+GIMP_DEPRECATED_FOR(gimp_vectors_set_linked)
 gboolean gimp_path_set_locked        (gint32           image_ID,
                                       const gchar     *name,
                                       gboolean         locked);
+GIMP_DEPRECATED_FOR(gimp_vectors_to_selection)
 gboolean gimp_path_to_selection      (gint32           image_ID,
                                       const gchar     *name,
                                       GimpChannelOps   op,
@@ -74,11 +87,11 @@ gboolean gimp_path_to_selection      (gint32           image_ID,
                                       gboolean         feather,
                                       gdouble          feather_radius_x,
                                       gdouble          feather_radius_y);
+GIMP_DEPRECATED_FOR(gimp_vectors_import_from_file)
 gboolean gimp_path_import            (gint32           image_ID,
                                       const gchar     *filename,
                                       gboolean         merge,
                                       gboolean         scale);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimppatterns_pdb.c b/libgimp/gimppatterns_pdb.c
index ffaee6d..cc817fb 100644
--- a/libgimp/gimppatterns_pdb.c
+++ b/libgimp/gimppatterns_pdb.c
@@ -25,9 +25,6 @@
 #include <string.h>
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_PATTERNS_PDB_H__
-#include "gimppatterns_pdb.h"
 
 
 /**
diff --git a/libgimp/gimppatterns_pdb.h b/libgimp/gimppatterns_pdb.h
index a1e878d..1945fbd 100644
--- a/libgimp/gimppatterns_pdb.h
+++ b/libgimp/gimppatterns_pdb.h
@@ -35,16 +35,16 @@ G_BEGIN_DECLS
 gboolean gimp_patterns_refresh          (void);
 gchar**  gimp_patterns_get_list         (const gchar  *filter,
                                          gint         *num_patterns);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_context_get_pattern)
 gchar*   gimp_patterns_get_pattern      (gint         *width,
                                          gint         *height);
+GIMP_DEPRECATED_FOR(gimp_pattern_get_pixels)
 gchar*   gimp_patterns_get_pattern_data (const gchar  *name,
                                          gint         *width,
                                          gint         *height,
                                          gint         *mask_bpp,
                                          gint         *length,
                                          guint8      **mask_data);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimpselection_pdb.c b/libgimp/gimpselection_pdb.c
index b9560b2..91fa432 100644
--- a/libgimp/gimpselection_pdb.c
+++ b/libgimp/gimpselection_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_SELECTION_PDB_H__
-#include "gimpselection_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpselection_pdb.h b/libgimp/gimpselection_pdb.h
index 00d154c..31a49e2 100644
--- a/libgimp/gimpselection_pdb.h
+++ b/libgimp/gimpselection_pdb.h
@@ -60,15 +60,14 @@ gboolean               gimp_selection_grow        (gint32          image_ID,
                                                    gint            steps);
 gboolean               gimp_selection_shrink      (gint32          image_ID,
                                                    gint            steps);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_image_select_item)
 gboolean               gimp_selection_layer_alpha (gint32          layer_ID);
+GIMP_DEPRECATED_FOR(gimp_image_select_item)
 gboolean               gimp_selection_load        (gint32          channel_ID);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gint32                 gimp_selection_save        (gint32          image_ID);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_image_select_item)
 gboolean               gimp_selection_combine     (gint32          channel_ID,
                                                    GimpChannelOps  operation);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimpselectiontools_pdb.c b/libgimp/gimpselectiontools_pdb.c
index 4c41cc6..68a0502 100644
--- a/libgimp/gimpselectiontools_pdb.c
+++ b/libgimp/gimpselectiontools_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_SELECTION_TOOLS_PDB_H__
-#include "gimpselectiontools_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpselectiontools_pdb.h b/libgimp/gimpselectiontools_pdb.h
index 73cd684..76edeb6 100644
--- a/libgimp/gimpselectiontools_pdb.h
+++ b/libgimp/gimpselectiontools_pdb.h
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_image_select_color)
 gboolean gimp_by_color_select      (gint32               drawable_ID,
                                     const GimpRGB       *color,
                                     gint                 threshold,
@@ -41,6 +41,7 @@ gboolean gimp_by_color_select      (gint32               drawable_ID,
                                     gboolean             feather,
                                     gdouble              feather_radius,
                                     gboolean             sample_merged);
+GIMP_DEPRECATED_FOR(gimp_image_select_color)
 gboolean gimp_by_color_select_full (gint32               drawable_ID,
                                     const GimpRGB       *color,
                                     gint                 threshold,
@@ -52,6 +53,7 @@ gboolean gimp_by_color_select_full (gint32               drawable_ID,
                                     gboolean             sample_merged,
                                     gboolean             select_transparent,
                                     GimpSelectCriterion  select_criterion);
+GIMP_DEPRECATED_FOR(gimp_image_select_ellipse)
 gboolean gimp_ellipse_select       (gint32               image_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -61,6 +63,7 @@ gboolean gimp_ellipse_select       (gint32               image_ID,
                                     gboolean             antialias,
                                     gboolean             feather,
                                     gdouble              feather_radius);
+GIMP_DEPRECATED_FOR(gimp_image_select_polygon)
 gboolean gimp_free_select          (gint32               image_ID,
                                     gint                 num_segs,
                                     const gdouble       *segs,
@@ -68,6 +71,7 @@ gboolean gimp_free_select          (gint32               image_ID,
                                     gboolean             antialias,
                                     gboolean             feather,
                                     gdouble              feather_radius);
+GIMP_DEPRECATED_FOR(gimp_image_select_contiguous_color)
 gboolean gimp_fuzzy_select         (gint32               drawable_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -77,6 +81,7 @@ gboolean gimp_fuzzy_select         (gint32               drawable_ID,
                                     gboolean             feather,
                                     gdouble              feather_radius,
                                     gboolean             sample_merged);
+GIMP_DEPRECATED_FOR(gimp_image_select_contiguous_color)
 gboolean gimp_fuzzy_select_full    (gint32               drawable_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -89,6 +94,7 @@ gboolean gimp_fuzzy_select_full    (gint32               drawable_ID,
                                     gboolean             sample_merged,
                                     gboolean             select_transparent,
                                     GimpSelectCriterion  select_criterion);
+GIMP_DEPRECATED_FOR(gimp_image_select_rectangle)
 gboolean gimp_rect_select          (gint32               image_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -97,6 +103,7 @@ gboolean gimp_rect_select          (gint32               image_ID,
                                     GimpChannelOps       operation,
                                     gboolean             feather,
                                     gdouble              feather_radius);
+GIMP_DEPRECATED_FOR(gimp_image_select_round_rectangle)
 gboolean gimp_round_rect_select    (gint32               image_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -109,7 +116,6 @@ gboolean gimp_round_rect_select    (gint32               image_ID,
                                     gboolean             feather,
                                     gdouble              feather_radius_x,
                                     gdouble              feather_radius_y);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimptextlayer_pdb.c b/libgimp/gimptextlayer_pdb.c
index 5ad295c..4f4cfa0 100644
--- a/libgimp/gimptextlayer_pdb.c
+++ b/libgimp/gimptextlayer_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_TEXT_LAYER_PDB_H__
-#include "gimptextlayer_pdb.h"
 
 
 /**
diff --git a/libgimp/gimptextlayer_pdb.h b/libgimp/gimptextlayer_pdb.h
index 031d361..639b752 100644
--- a/libgimp/gimptextlayer_pdb.h
+++ b/libgimp/gimptextlayer_pdb.h
@@ -83,13 +83,13 @@ gboolean              gimp_text_layer_set_letter_spacing (gint32
 gboolean              gimp_text_layer_resize             (gint32                 layer_ID,
                                                           gdouble                width,
                                                           gdouble                height);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_text_layer_get_hint_style)
 gboolean              gimp_text_layer_get_hinting        (gint32                 layer_ID,
                                                           gboolean              *autohint);
+GIMP_DEPRECATED_FOR(gimp_text_layer_set_hint_style)
 gboolean              gimp_text_layer_set_hinting        (gint32                 layer_ID,
                                                           gboolean               hinting,
                                                           gboolean               autohint);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimptexttool_pdb.c b/libgimp/gimptexttool_pdb.c
index 652b383..4051295 100644
--- a/libgimp/gimptexttool_pdb.c
+++ b/libgimp/gimptexttool_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_TEXT_TOOL_PDB_H__
-#include "gimptexttool_pdb.h"
 
 
 /**
diff --git a/libgimp/gimptexttool_pdb.h b/libgimp/gimptexttool_pdb.h
index 530c355..9745460 100644
--- a/libgimp/gimptexttool_pdb.h
+++ b/libgimp/gimptexttool_pdb.h
@@ -50,7 +50,7 @@ gboolean gimp_text_get_extents_fontname (const gchar  *text,
                                          gint         *height,
                                          gint         *ascent,
                                          gint         *descent);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_text_fontname)
 gint32   gimp_text                      (gint32        image_ID,
                                          gint32        drawable_ID,
                                          gdouble       x,
@@ -68,6 +68,7 @@ gint32   gimp_text                      (gint32        image_ID,
                                          const gchar  *spacing,
                                          const gchar  *registry,
                                          const gchar  *encoding);
+GIMP_DEPRECATED_FOR(gimp_text_get_extents_fontname)
 gboolean gimp_text_get_extents          (const gchar  *text,
                                          gdouble       size,
                                          GimpSizeType  size_type,
@@ -83,7 +84,6 @@ gboolean gimp_text_get_extents          (const gchar  *text,
                                          gint         *height,
                                          gint         *ascent,
                                          gint         *descent);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimptransformtools_pdb.c b/libgimp/gimptransformtools_pdb.c
index 7ca7f54..a838e62 100644
--- a/libgimp/gimptransformtools_pdb.c
+++ b/libgimp/gimptransformtools_pdb.c
@@ -23,9 +23,6 @@
 #include "config.h"
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_TRANSFORM_TOOLS_PDB_H__
-#include "gimptransformtools_pdb.h"
 
 
 /**
diff --git a/libgimp/gimptransformtools_pdb.h b/libgimp/gimptransformtools_pdb.h
index 294051f..44ecb6e 100644
--- a/libgimp/gimptransformtools_pdb.h
+++ b/libgimp/gimptransformtools_pdb.h
@@ -32,9 +32,10 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_item_transform_flip_simple)
 gint32 gimp_flip         (gint32              drawable_ID,
                           GimpOrientationType flip_type);
+GIMP_DEPRECATED_FOR(gimp_item_transform_perspective)
 gint32 gimp_perspective  (gint32              drawable_ID,
                           gboolean            interpolation,
                           gdouble             x0,
@@ -45,19 +46,23 @@ gint32 gimp_perspective  (gint32              drawable_ID,
                           gdouble             y2,
                           gdouble             x3,
                           gdouble             y3);
+GIMP_DEPRECATED_FOR(gimp_item_transform_rotate)
 gint32 gimp_rotate       (gint32              drawable_ID,
                           gboolean            interpolation,
                           gdouble             angle);
+GIMP_DEPRECATED_FOR(gimp_item_transform_scale)
 gint32 gimp_scale        (gint32              drawable_ID,
                           gboolean            interpolation,
                           gdouble             x0,
                           gdouble             y0,
                           gdouble             x1,
                           gdouble             y1);
+GIMP_DEPRECATED_FOR(gimp_item_transform_shear)
 gint32 gimp_shear        (gint32              drawable_ID,
                           gboolean            interpolation,
                           GimpOrientationType shear_type,
                           gdouble             magnitude);
+GIMP_DEPRECATED_FOR(gimp_item_transform_2d)
 gint32 gimp_transform_2d (gint32              drawable_ID,
                           gboolean            interpolation,
                           gdouble             source_x,
@@ -67,7 +72,6 @@ gint32 gimp_transform_2d (gint32              drawable_ID,
                           gdouble             angle,
                           gdouble             dest_x,
                           gdouble             dest_y);
-#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimpvectors_pdb.c b/libgimp/gimpvectors_pdb.c
index 47a7ae3..b25a7b5 100644
--- a/libgimp/gimpvectors_pdb.c
+++ b/libgimp/gimpvectors_pdb.c
@@ -25,9 +25,6 @@
 #include <string.h>
 
 #include "gimp.h"
-#undef GIMP_DISABLE_DEPRECATED
-#undef __GIMP_VECTORS_PDB_H__
-#include "gimpvectors_pdb.h"
 
 
 /**
diff --git a/libgimp/gimpvectors_pdb.h b/libgimp/gimpvectors_pdb.h
index c6dc3ac..8478534 100644
--- a/libgimp/gimpvectors_pdb.h
+++ b/libgimp/gimpvectors_pdb.h
@@ -119,14 +119,13 @@ gint                  gimp_vectors_bezier_stroke_new_ellipse (gint32
                                                               gdouble                 radius_x,
                                                               gdouble                 radius_y,
                                                               gdouble                 angle);
-#ifndef GIMP_DISABLE_DEPRECATED
+GIMP_DEPRECATED_FOR(gimp_image_select_item)
 gboolean              gimp_vectors_to_selection              (gint32                  vectors_ID,
                                                               GimpChannelOps          operation,
                                                               gboolean                antialias,
                                                               gboolean                feather,
                                                               gdouble                 feather_radius_x,
                                                               gdouble                 feather_radius_y);
-#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean              gimp_vectors_import_from_file          (gint32                  image_ID,
                                                               const gchar            *filename,
                                                               gboolean                merge,
diff --git a/tools/pdbgen/lib.pl b/tools/pdbgen/lib.pl
index 45f96c9..93df898 100644
--- a/tools/pdbgen/lib.pl
+++ b/tools/pdbgen/lib.pl
@@ -85,14 +85,16 @@ sub generate {
 	my %usednames;
 	my $retdesc = "";
 
-	if ($proc->{deprecated} && !$out->{deprecated}) {
-	    push @{$out->{protos}}, "#ifndef GIMP_DISABLE_DEPRECATED\n";
-	    $out->{deprecated} = 1;
-	    $out->{seen_deprecated} = 1;
-	}
-	elsif (!$proc->{deprecated} && $out->{deprecated}) {
-	    push @{$out->{protos}}, "#endif /* GIMP_DISABLE_DEPRECATED */\n";
-	    $out->{deprecated} = 0;
+	if ($proc->{deprecated}) {
+	    if ($proc->{deprecated} eq 'NONE') {
+		push @{$out->{protos}}, "GIMP_DEPRECATED\n";
+	    }
+	    else {
+		my $underscores = $proc->{deprecated};
+		$underscores =~ s/-/_/g;
+
+		push @{$out->{protos}}, "GIMP_DEPRECATED_FOR($underscores)\n";
+	    }
 	}
 
 	# Find the return argument (defaults to the first arg if not
@@ -474,11 +476,6 @@ $wrapped$funcname ($clist)
 CODE
     }
 
-    if ($out->{deprecated}) {
-        push @{$out->{protos}}, "#endif /* GIMP_DISABLE_DEPRECATED */\n";
-	$out->{deprecated} = 0;
-    }
-
     my $lgpl_top = <<'LGPL';
 /* LIBGIMP - The GIMP Library
  * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
@@ -547,7 +544,7 @@ LGPL
 	foreach (@{$out->{protos}}) {
 	    my $arglist;
 
-	    if (!/^#/) {
+	    if (!/^GIMP_DEPRECATED/) {
 		my $len;
 
 		$arglist = [ split(' ', $_, 3) ];
@@ -660,11 +657,6 @@ HEADER
         print CFILE qq/#include "config.h"\n\n/;
 	print CFILE $out->{headers}, "\n" if exists $out->{headers};
 	print CFILE qq/#include "gimp.h"\n/;
-	if ($out->{seen_deprecated}) {
-	    print CFILE "#undef GIMP_DISABLE_DEPRECATED\n";
-	    print CFILE "#undef __GIMP_\U$group\E_PDB_H__\n";
-	    print CFILE qq/#include "${hname}"\n/;
-	}
 	$long_desc = &desc_wrap($main::grp{$group}->{doc_long_desc});
 	print CFILE <<SECTION_DOCS;
 



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