[gimp/wip/Jehan/classy-GIMP: 6/45] pdb: keep both the old and new API alive.



commit b71c54e093ea65f77bd28eda66d5a861926b2fe6
Author: Jehan <jehan girinstud io>
Date:   Mon Aug 12 18:00:44 2019 +0200

    pdb: keep both the old and new API alive.
    
    By default the new API will be used. But if we build with
    GIMP_DEPRECATED_REPLACE_NEW_API macro, then the same function names will
    call the old API with ids.
    
    This way, we don't have to update all our plug-ins at once (which I
    tried and is very tedious work).
    
    Note that bindings won't have access to the deprecated API at all.

 libgimp/gimp_pdb.h                  |  16 +
 libgimp/gimpbrush_pdb.h             |  16 +
 libgimp/gimpbrushes_pdb.h           |  16 +
 libgimp/gimpbrushselect_pdb.h       |  16 +
 libgimp/gimpbuffer_pdb.h            |  16 +
 libgimp/gimpchannel_pdb.h           |  86 ++--
 libgimp/gimpcontext_pdb.h           |  16 +
 libgimp/gimpdebug_pdb.h             |  16 +
 libgimp/gimpdisplay_pdb.h           |  38 +-
 libgimp/gimpdrawable_pdb.h          |  16 +
 libgimp/gimpdrawablecolor_pdb.h     |  16 +
 libgimp/gimpdrawableedit_pdb.h      |  16 +
 libgimp/gimpdynamics_pdb.h          |  16 +
 libgimp/gimpedit_pdb.h              |  64 +--
 libgimp/gimpfileops_pdb.h           |  92 ++--
 libgimp/gimpfloatingsel_pdb.h       |  16 +
 libgimp/gimpfonts_pdb.h             |  16 +
 libgimp/gimpfontselect_pdb.h        |  16 +
 libgimp/gimpgimprc_pdb.h            |  16 +
 libgimp/gimpgradient_pdb.h          |  16 +
 libgimp/gimpgradients_pdb.h         |  16 +
 libgimp/gimpgradientselect_pdb.h    |  16 +
 libgimp/gimphelp_pdb.h              |  16 +
 libgimp/gimpimage_pdb.h             | 810 ++++++++++++++++++------------------
 libgimp/gimpimagecolorprofile_pdb.h |  99 +++--
 libgimp/gimpimageconvert_pdb.h      |  74 ++--
 libgimp/gimpimagegrid_pdb.h         | 127 +++---
 libgimp/gimpimageguides_pdb.h       |  75 ++--
 libgimp/gimpimagesamplepoints_pdb.h |  63 +--
 libgimp/gimpimageselect_pdb.h       | 173 ++++----
 libgimp/gimpimagetransform_pdb.h    |  99 +++--
 libgimp/gimpimageundo_pdb.h         |  57 ++-
 libgimp/gimpitem_pdb.h              | 110 ++---
 libgimp/gimpitemtransform_pdb.h     |  16 +
 libgimp/gimplayer_pdb.h             | 180 ++++----
 libgimp/gimpmessage_pdb.h           |  16 +
 libgimp/gimppainttools_pdb.h        |  16 +
 libgimp/gimppalette_pdb.h           |  16 +
 libgimp/gimppalettes_pdb.h          |  16 +
 libgimp/gimppaletteselect_pdb.h     |  16 +
 libgimp/gimppattern_pdb.h           |  16 +
 libgimp/gimppatterns_pdb.h          |  16 +
 libgimp/gimppatternselect_pdb.h     |  16 +
 libgimp/gimppdb_pdb.h               |  16 +
 libgimp/gimpplugin_pdb.h            |  16 +
 libgimp/gimpprogress_pdb.h          |  16 +
 libgimp/gimpselection_pdb.h         | 156 +++----
 libgimp/gimptextlayer_pdb.h         | 128 +++---
 libgimp/gimptexttool_pdb.h          |  72 ++--
 libgimp/gimpunit_pdb.h              |  16 +
 libgimp/gimpvectors_pdb.h           | 280 +++++++------
 pdb/lib.pl                          | 254 ++++++-----
 52 files changed, 2190 insertions(+), 1359 deletions(-)
---
diff --git a/libgimp/gimp_pdb.h b/libgimp/gimp_pdb.h
index 25ef652825..df90de3c6b 100644
--- a/libgimp/gimp_pdb.h
+++ b/libgimp/gimp_pdb.h
@@ -40,6 +40,22 @@ GimpParasite* gimp_get_parasite      (const gchar        *name);
 gchar**       gimp_get_parasite_list (gint               *num_parasites);
 gchar*        gimp_temp_name         (const gchar        *extension);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpbrush_pdb.h b/libgimp/gimpbrush_pdb.h
index f56c5685b9..02e7bfc1c2 100644
--- a/libgimp/gimpbrush_pdb.h
+++ b/libgimp/gimpbrush_pdb.h
@@ -76,6 +76,22 @@ gdouble                 gimp_brush_get_angle        (const gchar              *n
 gdouble                 gimp_brush_set_angle        (const gchar              *name,
                                                      gdouble                   angle_in);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpbrushes_pdb.h b/libgimp/gimpbrushes_pdb.h
index d4f013a124..79a4ad0d70 100644
--- a/libgimp/gimpbrushes_pdb.h
+++ b/libgimp/gimpbrushes_pdb.h
@@ -36,6 +36,22 @@ gboolean gimp_brushes_refresh  (void);
 gchar**  gimp_brushes_get_list (const gchar *filter,
                                 gint        *num_brushes);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpbrushselect_pdb.h b/libgimp/gimpbrushselect_pdb.h
index ae401f2d59..5f65453308 100644
--- a/libgimp/gimpbrushselect_pdb.h
+++ b/libgimp/gimpbrushselect_pdb.h
@@ -45,6 +45,22 @@ gboolean gimp_brushes_set_popup   (const gchar   *brush_callback,
                                    gint           spacing,
                                    GimpLayerMode  paint_mode);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpbuffer_pdb.h b/libgimp/gimpbuffer_pdb.h
index 83b919664e..f559fe556d 100644
--- a/libgimp/gimpbuffer_pdb.h
+++ b/libgimp/gimpbuffer_pdb.h
@@ -42,6 +42,22 @@ gint              gimp_buffer_get_height     (const gchar *buffer_name);
 gint              gimp_buffer_get_bytes      (const gchar *buffer_name);
 GimpImageBaseType gimp_buffer_get_image_type (const gchar *buffer_name);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpchannel_pdb.h b/libgimp/gimpchannel_pdb.h
index 1aa515de72..f6ac448117 100644
--- a/libgimp/gimpchannel_pdb.h
+++ b/libgimp/gimpchannel_pdb.h
@@ -32,42 +32,56 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-G_GNUC_INTERNAL gint32 _gimp_channel_new                (GimpImage       *image,
-                                                         gint             width,
-                                                         gint             height,
-                                                         const gchar     *name,
-                                                         gdouble          opacity,
-                                                         const GimpRGB   *color);
-GIMP_DEPRECATED_FOR(_gimp_channel_new)
-G_GNUC_INTERNAL gint32 __gimp_channel_new               (gint32           image_ID,
-                                                         gint             width,
-                                                         gint             height,
-                                                         const gchar     *name,
-                                                         gdouble          opacity,
-                                                         const GimpRGB   *color);
-gint32                 gimp_channel_new_from_component  (GimpImage       *image,
-                                                         GimpChannelType  component,
-                                                         const gchar     *name);
-GIMP_DEPRECATED_FOR(gimp_channel_new_from_component)
-G_GNUC_INTERNAL gint32 _gimp_channel_new_from_component (gint32           image_ID,
-                                                         GimpChannelType  component,
-                                                         const gchar     *name);
-gint32                 gimp_channel_copy                (gint32           channel_ID);
-gboolean               gimp_channel_combine_masks       (gint32           channel1_ID,
-                                                         gint32           channel2_ID,
-                                                         GimpChannelOps   operation,
-                                                         gint             offx,
-                                                         gint             offy);
-gboolean               gimp_channel_get_show_masked     (gint32           channel_ID);
-gboolean               gimp_channel_set_show_masked     (gint32           channel_ID,
-                                                         gboolean         show_masked);
-gdouble                gimp_channel_get_opacity         (gint32           channel_ID);
-gboolean               gimp_channel_set_opacity         (gint32           channel_ID,
-                                                         gdouble          opacity);
-gboolean               gimp_channel_get_color           (gint32           channel_ID,
-                                                         GimpRGB         *color);
-gboolean               gimp_channel_set_color           (gint32           channel_ID,
-                                                         const GimpRGB   *color);
+gint32   gimp_channel_copy            (gint32          channel_ID);
+gboolean gimp_channel_combine_masks   (gint32          channel1_ID,
+                                       gint32          channel2_ID,
+                                       GimpChannelOps  operation,
+                                       gint            offx,
+                                       gint            offy);
+gboolean gimp_channel_get_show_masked (gint32          channel_ID);
+gboolean gimp_channel_set_show_masked (gint32          channel_ID,
+                                       gboolean        show_masked);
+gdouble  gimp_channel_get_opacity     (gint32          channel_ID);
+gboolean gimp_channel_set_opacity     (gint32          channel_ID,
+                                       gdouble         opacity);
+gboolean gimp_channel_get_color       (gint32          channel_ID,
+                                       GimpRGB        *color);
+gboolean gimp_channel_set_color       (gint32          channel_ID,
+                                       const GimpRGB  *color);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+G_GNUC_INTERNAL gint32 _gimp_channel_new               (GimpImage       *image,
+                                                        gint             width,
+                                                        gint             height,
+                                                        const gchar     *name,
+                                                        gdouble          opacity,
+                                                        const GimpRGB   *color);
+gint32                 gimp_channel_new_from_component (GimpImage       *image,
+                                                        GimpChannelType  component,
+                                                        const gchar     *name);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define _gimp_channel_new __gimp_channel_new
+#define gimp_channel_new_from_component _gimp_channel_new_from_component
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32 __gimp_channel_new               (gint32           image_ID,
+                                         gint             width,
+                                         gint             height,
+                                         const gchar     *name,
+                                         gdouble          opacity,
+                                         const GimpRGB   *color);
+gint32 _gimp_channel_new_from_component (gint32           image_ID,
+                                         GimpChannelType  component,
+                                         const gchar     *name);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpcontext_pdb.h b/libgimp/gimpcontext_pdb.h
index 743037e309..e03a0886c1 100644
--- a/libgimp/gimpcontext_pdb.h
+++ b/libgimp/gimpcontext_pdb.h
@@ -151,6 +151,22 @@ gboolean                    gimp_context_set_ink_blob_aspect_ratio      (gdouble
 gdouble                     gimp_context_get_ink_blob_angle             (void);
 gboolean                    gimp_context_set_ink_blob_angle             (gdouble                        
angle);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpdebug_pdb.h b/libgimp/gimpdebug_pdb.h
index 234dc18128..2508311b7b 100644
--- a/libgimp/gimpdebug_pdb.h
+++ b/libgimp/gimpdebug_pdb.h
@@ -35,6 +35,22 @@ G_BEGIN_DECLS
 gboolean gimp_debug_timer_start (void);
 gdouble  gimp_debug_timer_end   (void);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpdisplay_pdb.h b/libgimp/gimpdisplay_pdb.h
index 0feb8edd47..9df129fa59 100644
--- a/libgimp/gimpdisplay_pdb.h
+++ b/libgimp/gimpdisplay_pdb.h
@@ -32,18 +32,32 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean                 gimp_display_is_valid          (gint32     display_ID);
-gint32                   gimp_display_new               (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_display_new)
-G_GNUC_INTERNAL gint32   _gimp_display_new              (gint32     image_ID);
-gboolean                 gimp_display_delete            (gint32     display_ID);
-gint                     gimp_display_get_window_handle (gint32     display_ID);
-gboolean                 gimp_displays_flush            (void);
-gboolean                 gimp_displays_reconnect        (GimpImage *old_image,
-                                                         GimpImage *new_image);
-GIMP_DEPRECATED_FOR(gimp_displays_reconnect)
-G_GNUC_INTERNAL gboolean _gimp_displays_reconnect       (gint32     old_image_ID,
-                                                         gint32     new_image_ID);
+gboolean gimp_display_is_valid          (gint32 display_ID);
+gboolean gimp_display_delete            (gint32 display_ID);
+gint     gimp_display_get_window_handle (gint32 display_ID);
+gboolean gimp_displays_flush            (void);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gint32   gimp_display_new        (GimpImage *image);
+gboolean gimp_displays_reconnect (GimpImage *old_image,
+                                  GimpImage *new_image);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_display_new _gimp_display_new
+#define gimp_displays_reconnect _gimp_displays_reconnect
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32   _gimp_display_new        (gint32 image_ID);
+gboolean _gimp_displays_reconnect (gint32 old_image_ID,
+                                   gint32 new_image_ID);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpdrawable_pdb.h b/libgimp/gimpdrawable_pdb.h
index 9e69457d03..6916584eeb 100644
--- a/libgimp/gimpdrawable_pdb.h
+++ b/libgimp/gimpdrawable_pdb.h
@@ -104,6 +104,22 @@ gboolean                 gimp_drawable_foreground_extract    (gint32
                                                               GimpForegroundExtractMode   mode,
                                                               gint32                      mask_ID);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpdrawablecolor_pdb.h b/libgimp/gimpdrawablecolor_pdb.h
index 944d2fc3d4..3a7be30253 100644
--- a/libgimp/gimpdrawablecolor_pdb.h
+++ b/libgimp/gimpdrawablecolor_pdb.h
@@ -92,6 +92,22 @@ gboolean gimp_drawable_threshold           (gint32                drawable_ID,
                                             gdouble               low_threshold,
                                             gdouble               high_threshold);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpdrawableedit_pdb.h b/libgimp/gimpdrawableedit_pdb.h
index 5b63662bfa..d3f23aa42f 100644
--- a/libgimp/gimpdrawableedit_pdb.h
+++ b/libgimp/gimpdrawableedit_pdb.h
@@ -54,6 +54,22 @@ gboolean gimp_drawable_edit_stroke_selection (gint32           drawable_ID);
 gboolean gimp_drawable_edit_stroke_item      (gint32           drawable_ID,
                                               gint32           item_ID);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpdynamics_pdb.h b/libgimp/gimpdynamics_pdb.h
index 6623ffc01d..7983ccbcfa 100644
--- a/libgimp/gimpdynamics_pdb.h
+++ b/libgimp/gimpdynamics_pdb.h
@@ -36,6 +36,22 @@ gboolean gimp_dynamics_refresh  (void);
 gchar**  gimp_dynamics_get_list (const gchar *filter,
                                  gint        *num_dynamics);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpedit_pdb.h b/libgimp/gimpedit_pdb.h
index 5e986004ca..de5cfab9b7 100644
--- a/libgimp/gimpedit_pdb.h
+++ b/libgimp/gimpedit_pdb.h
@@ -32,31 +32,45 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean                 gimp_edit_cut                       (gint32       drawable_ID);
-gboolean                 gimp_edit_copy                      (gint32       drawable_ID);
-gboolean                 gimp_edit_copy_visible              (GimpImage   *image);
-GIMP_DEPRECATED_FOR(gimp_edit_copy_visible)
-G_GNUC_INTERNAL gboolean _gimp_edit_copy_visible             (gint32       image_ID);
-gint32                   gimp_edit_paste                     (gint32       drawable_ID,
-                                                              gboolean     paste_into);
-GimpImage*               gimp_edit_paste_as_new_image        (void);
-GIMP_DEPRECATED_FOR(gimp_edit_paste_as_new_image)
-G_GNUC_INTERNAL gint32   _gimp_edit_paste_as_new_image       (void);
-gchar*                   gimp_edit_named_cut                 (gint32       drawable_ID,
-                                                              const gchar *buffer_name);
-gchar*                   gimp_edit_named_copy                (gint32       drawable_ID,
-                                                              const gchar *buffer_name);
-gchar*                   gimp_edit_named_copy_visible        (GimpImage   *image,
-                                                              const gchar *buffer_name);
-GIMP_DEPRECATED_FOR(gimp_edit_named_copy_visible)
-G_GNUC_INTERNAL gchar*   _gimp_edit_named_copy_visible       (gint32       image_ID,
-                                                              const gchar *buffer_name);
-gint32                   gimp_edit_named_paste               (gint32       drawable_ID,
-                                                              const gchar *buffer_name,
-                                                              gboolean     paste_into);
-GimpImage*               gimp_edit_named_paste_as_new_image  (const gchar *buffer_name);
-GIMP_DEPRECATED_FOR(gimp_edit_named_paste_as_new_image)
-G_GNUC_INTERNAL gint32   _gimp_edit_named_paste_as_new_image (const gchar *buffer_name);
+gboolean gimp_edit_cut         (gint32       drawable_ID);
+gboolean gimp_edit_copy        (gint32       drawable_ID);
+gint32   gimp_edit_paste       (gint32       drawable_ID,
+                                gboolean     paste_into);
+gchar*   gimp_edit_named_cut   (gint32       drawable_ID,
+                                const gchar *buffer_name);
+gchar*   gimp_edit_named_copy  (gint32       drawable_ID,
+                                const gchar *buffer_name);
+gint32   gimp_edit_named_paste (gint32       drawable_ID,
+                                const gchar *buffer_name,
+                                gboolean     paste_into);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gboolean   gimp_edit_copy_visible             (GimpImage   *image);
+GimpImage* gimp_edit_paste_as_new_image       (void);
+gchar*     gimp_edit_named_copy_visible       (GimpImage   *image,
+                                               const gchar *buffer_name);
+GimpImage* gimp_edit_named_paste_as_new_image (const gchar *buffer_name);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_edit_copy_visible _gimp_edit_copy_visible
+#define gimp_edit_paste_as_new_image _gimp_edit_paste_as_new_image
+#define gimp_edit_named_copy_visible _gimp_edit_named_copy_visible
+#define gimp_edit_named_paste_as_new_image _gimp_edit_named_paste_as_new_image
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gboolean _gimp_edit_copy_visible             (gint32       image_ID);
+gint32   _gimp_edit_paste_as_new_image       (void);
+gchar*   _gimp_edit_named_copy_visible       (gint32       image_ID,
+                                              const gchar *buffer_name);
+gint32   _gimp_edit_named_paste_as_new_image (const gchar *buffer_name);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpfileops_pdb.h b/libgimp/gimpfileops_pdb.h
index 9163e638cc..9b7f17ac63 100644
--- a/libgimp/gimpfileops_pdb.h
+++ b/libgimp/gimpfileops_pdb.h
@@ -32,45 +32,6 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-GimpImage*               gimp_file_load                       (GimpRunMode  run_mode,
-                                                               const gchar *filename,
-                                                               const gchar *raw_filename);
-GIMP_DEPRECATED_FOR(gimp_file_load)
-G_GNUC_INTERNAL gint32   _gimp_file_load                      (GimpRunMode  run_mode,
-                                                               const gchar *filename,
-                                                               const gchar *raw_filename);
-gint32                   gimp_file_load_layer                 (GimpRunMode  run_mode,
-                                                               GimpImage   *image,
-                                                               const gchar *filename);
-GIMP_DEPRECATED_FOR(gimp_file_load_layer)
-G_GNUC_INTERNAL gint32   _gimp_file_load_layer                (GimpRunMode  run_mode,
-                                                               gint32       image_ID,
-                                                               const gchar *filename);
-gint*                    gimp_file_load_layers                (GimpRunMode  run_mode,
-                                                               GimpImage   *image,
-                                                               const gchar *filename,
-                                                               gint        *num_layers);
-GIMP_DEPRECATED_FOR(gimp_file_load_layers)
-G_GNUC_INTERNAL gint*    _gimp_file_load_layers               (GimpRunMode  run_mode,
-                                                               gint32       image_ID,
-                                                               const gchar *filename,
-                                                               gint        *num_layers);
-gboolean                 gimp_file_save                       (GimpRunMode  run_mode,
-                                                               GimpImage   *image,
-                                                               gint32       drawable_ID,
-                                                               const gchar *filename,
-                                                               const gchar *raw_filename);
-GIMP_DEPRECATED_FOR(gimp_file_save)
-G_GNUC_INTERNAL gboolean _gimp_file_save                      (GimpRunMode  run_mode,
-                                                               gint32       image_ID,
-                                                               gint32       drawable_ID,
-                                                               const gchar *filename,
-                                                               const gchar *raw_filename);
-gboolean                 gimp_file_save_thumbnail             (GimpImage   *image,
-                                                               const gchar *filename);
-GIMP_DEPRECATED_FOR(gimp_file_save_thumbnail)
-G_GNUC_INTERNAL gboolean _gimp_file_save_thumbnail            (gint32       image_ID,
-                                                               const gchar *filename);
 G_GNUC_INTERNAL gboolean _gimp_register_magic_load_handler    (const gchar *procedure_name,
                                                                const gchar *extensions,
                                                                const gchar *prefixes,
@@ -90,6 +51,59 @@ G_GNUC_INTERNAL gboolean _gimp_register_file_handler_raw      (const gchar *proc
 G_GNUC_INTERNAL gboolean _gimp_register_thumbnail_loader      (const gchar *load_proc,
                                                                const gchar *thumb_proc);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+GimpImage* gimp_file_load           (GimpRunMode  run_mode,
+                                     const gchar *filename,
+                                     const gchar *raw_filename);
+gint32     gimp_file_load_layer     (GimpRunMode  run_mode,
+                                     GimpImage   *image,
+                                     const gchar *filename);
+gint*      gimp_file_load_layers    (GimpRunMode  run_mode,
+                                     GimpImage   *image,
+                                     const gchar *filename,
+                                     gint        *num_layers);
+gboolean   gimp_file_save           (GimpRunMode  run_mode,
+                                     GimpImage   *image,
+                                     gint32       drawable_ID,
+                                     const gchar *filename,
+                                     const gchar *raw_filename);
+gboolean   gimp_file_save_thumbnail (GimpImage   *image,
+                                     const gchar *filename);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_file_load _gimp_file_load
+#define gimp_file_load_layer _gimp_file_load_layer
+#define gimp_file_load_layers _gimp_file_load_layers
+#define gimp_file_save _gimp_file_save
+#define gimp_file_save_thumbnail _gimp_file_save_thumbnail
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32   _gimp_file_load           (GimpRunMode  run_mode,
+                                    const gchar *filename,
+                                    const gchar *raw_filename);
+gint32   _gimp_file_load_layer     (GimpRunMode  run_mode,
+                                    gint32       image_ID,
+                                    const gchar *filename);
+gint*    _gimp_file_load_layers    (GimpRunMode  run_mode,
+                                    gint32       image_ID,
+                                    const gchar *filename,
+                                    gint        *num_layers);
+gboolean _gimp_file_save           (GimpRunMode  run_mode,
+                                    gint32       image_ID,
+                                    gint32       drawable_ID,
+                                    const gchar *filename,
+                                    const gchar *raw_filename);
+gboolean _gimp_file_save_thumbnail (gint32       image_ID,
+                                    const gchar *filename);
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpfloatingsel_pdb.h b/libgimp/gimpfloatingsel_pdb.h
index 8a3b3d2d7c..b8f9e631ae 100644
--- a/libgimp/gimpfloatingsel_pdb.h
+++ b/libgimp/gimpfloatingsel_pdb.h
@@ -38,6 +38,22 @@ gboolean gimp_floating_sel_to_layer (gint32 floating_sel_ID);
 gboolean gimp_floating_sel_attach   (gint32 layer_ID,
                                      gint32 drawable_ID);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpfonts_pdb.h b/libgimp/gimpfonts_pdb.h
index 8ef2a7b0ac..57ccbc8f34 100644
--- a/libgimp/gimpfonts_pdb.h
+++ b/libgimp/gimpfonts_pdb.h
@@ -36,6 +36,22 @@ gboolean gimp_fonts_refresh  (void);
 gchar**  gimp_fonts_get_list (const gchar *filter,
                               gint        *num_fonts);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpfontselect_pdb.h b/libgimp/gimpfontselect_pdb.h
index 1685e351a3..d053dcc0f5 100644
--- a/libgimp/gimpfontselect_pdb.h
+++ b/libgimp/gimpfontselect_pdb.h
@@ -39,6 +39,22 @@ gboolean gimp_fonts_close_popup (const gchar *font_callback);
 gboolean gimp_fonts_set_popup   (const gchar *font_callback,
                                  const gchar *font_name);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpgimprc_pdb.h b/libgimp/gimpgimprc_pdb.h
index 42d500a995..403cf9f41b 100644
--- a/libgimp/gimpgimprc_pdb.h
+++ b/libgimp/gimpgimprc_pdb.h
@@ -42,6 +42,22 @@ gboolean               gimp_get_monitor_resolution   (gdouble     *xres,
 G_GNUC_INTERNAL gchar* _gimp_get_color_configuration (void);
 gchar*                 gimp_get_module_load_inhibit  (void);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpgradient_pdb.h b/libgimp/gimpgradient_pdb.h
index e0ea6b3fe8..08a9d598f9 100644
--- a/libgimp/gimpgradient_pdb.h
+++ b/libgimp/gimpgradient_pdb.h
@@ -133,6 +133,22 @@ gdouble  gimp_gradient_segment_range_move                  (const gchar
                                                             gdouble                    delta,
                                                             gboolean                   control_compress);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpgradients_pdb.h b/libgimp/gimpgradients_pdb.h
index 218a7e11b6..a2950f156f 100644
--- a/libgimp/gimpgradients_pdb.h
+++ b/libgimp/gimpgradients_pdb.h
@@ -36,6 +36,22 @@ gboolean gimp_gradients_refresh  (void);
 gchar**  gimp_gradients_get_list (const gchar *filter,
                                   gint        *num_gradients);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpgradientselect_pdb.h b/libgimp/gimpgradientselect_pdb.h
index e3b85937d6..595f0892e1 100644
--- a/libgimp/gimpgradientselect_pdb.h
+++ b/libgimp/gimpgradientselect_pdb.h
@@ -40,6 +40,22 @@ gboolean gimp_gradients_close_popup (const gchar *gradient_callback);
 gboolean gimp_gradients_set_popup   (const gchar *gradient_callback,
                                      const gchar *gradient_name);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimphelp_pdb.h b/libgimp/gimphelp_pdb.h
index 850bab4706..d3aba8945a 100644
--- a/libgimp/gimphelp_pdb.h
+++ b/libgimp/gimphelp_pdb.h
@@ -35,6 +35,22 @@ G_BEGIN_DECLS
 gboolean gimp_help (const gchar *help_domain,
                     const gchar *help_id);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpimage_pdb.h b/libgimp/gimpimage_pdb.h
index c6a59a1aea..0e0f76a73f 100644
--- a/libgimp/gimpimage_pdb.h
+++ b/libgimp/gimpimage_pdb.h
@@ -32,404 +32,418 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean                          gimp_image_is_valid                    (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_is_valid)
-G_GNUC_INTERNAL gboolean          _gimp_image_is_valid                   (gint32               image_ID);
-gint*                             gimp_image_list                        (gint                *num_images);
-GimpImage*                        gimp_image_new                         (gint                 width,
-                                                                          gint                 height,
-                                                                          GimpImageBaseType    type);
-GIMP_DEPRECATED_FOR(gimp_image_new)
-G_GNUC_INTERNAL gint32            _gimp_image_new                        (gint                 width,
-                                                                          gint                 height,
-                                                                          GimpImageBaseType    type);
-GimpImage*                        gimp_image_new_with_precision          (gint                 width,
-                                                                          gint                 height,
-                                                                          GimpImageBaseType    type,
-                                                                          GimpPrecision        precision);
-GIMP_DEPRECATED_FOR(gimp_image_new_with_precision)
-G_GNUC_INTERNAL gint32            _gimp_image_new_with_precision         (gint                 width,
-                                                                          gint                 height,
-                                                                          GimpImageBaseType    type,
-                                                                          GimpPrecision        precision);
-GimpImage*                        gimp_image_duplicate                   (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_duplicate)
-G_GNUC_INTERNAL gint32            _gimp_image_duplicate                  (gint32               image_ID);
-gboolean                          gimp_image_delete                      (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_delete)
-G_GNUC_INTERNAL gboolean          _gimp_image_delete                     (gint32               image_ID);
-GimpImageBaseType                 gimp_image_base_type                   (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_base_type)
-G_GNUC_INTERNAL GimpImageBaseType _gimp_image_base_type                  (gint32               image_ID);
-GimpPrecision                     gimp_image_get_precision               (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_precision)
-G_GNUC_INTERNAL GimpPrecision     _gimp_image_get_precision              (gint32               image_ID);
-GimpLayerMode                     gimp_image_get_default_new_layer_mode  (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_default_new_layer_mode)
-G_GNUC_INTERNAL GimpLayerMode     _gimp_image_get_default_new_layer_mode (gint32               image_ID);
-gint                              gimp_image_width                       (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_width)
-G_GNUC_INTERNAL gint              _gimp_image_width                      (gint32               image_ID);
-gint                              gimp_image_height                      (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_height)
-G_GNUC_INTERNAL gint              _gimp_image_height                     (gint32               image_ID);
-gint*                             gimp_image_get_layers                  (GimpImage           *image,
-                                                                          gint                *num_layers);
-GIMP_DEPRECATED_FOR(gimp_image_get_layers)
-G_GNUC_INTERNAL gint*             _gimp_image_get_layers                 (gint32               image_ID,
-                                                                          gint                *num_layers);
-gint*                             gimp_image_get_channels                (GimpImage           *image,
-                                                                          gint                *num_channels);
-GIMP_DEPRECATED_FOR(gimp_image_get_channels)
-G_GNUC_INTERNAL gint*             _gimp_image_get_channels               (gint32               image_ID,
-                                                                          gint                *num_channels);
-gint*                             gimp_image_get_vectors                 (GimpImage           *image,
-                                                                          gint                *num_vectors);
-GIMP_DEPRECATED_FOR(gimp_image_get_vectors)
-G_GNUC_INTERNAL gint*             _gimp_image_get_vectors                (gint32               image_ID,
-                                                                          gint                *num_vectors);
-gint32                            gimp_image_get_active_drawable         (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_active_drawable)
-G_GNUC_INTERNAL gint32            _gimp_image_get_active_drawable        (gint32               image_ID);
-gboolean                          gimp_image_unset_active_channel        (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_unset_active_channel)
-G_GNUC_INTERNAL gboolean          _gimp_image_unset_active_channel       (gint32               image_ID);
-gint32                            gimp_image_get_floating_sel            (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_floating_sel)
-G_GNUC_INTERNAL gint32            _gimp_image_get_floating_sel           (gint32               image_ID);
-gint32                            gimp_image_floating_sel_attached_to    (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_floating_sel_attached_to)
-G_GNUC_INTERNAL gint32            _gimp_image_floating_sel_attached_to   (gint32               image_ID);
-gboolean                          gimp_image_pick_color                  (GimpImage           *image,
-                                                                          gint32               drawable_ID,
-                                                                          gdouble              x,
-                                                                          gdouble              y,
-                                                                          gboolean             sample_merged,
-                                                                          gboolean             
sample_average,
-                                                                          gdouble              
average_radius,
-                                                                          GimpRGB             *color);
-GIMP_DEPRECATED_FOR(gimp_image_pick_color)
-G_GNUC_INTERNAL gboolean          _gimp_image_pick_color                 (gint32               image_ID,
-                                                                          gint32               drawable_ID,
-                                                                          gdouble              x,
-                                                                          gdouble              y,
-                                                                          gboolean             sample_merged,
-                                                                          gboolean             
sample_average,
-                                                                          gdouble              
average_radius,
-                                                                          GimpRGB             *color);
-gint32                            gimp_image_pick_correlate_layer        (GimpImage           *image,
-                                                                          gint                 x,
-                                                                          gint                 y);
-GIMP_DEPRECATED_FOR(gimp_image_pick_correlate_layer)
-G_GNUC_INTERNAL gint32            _gimp_image_pick_correlate_layer       (gint32               image_ID,
-                                                                          gint                 x,
-                                                                          gint                 y);
-gboolean                          gimp_image_insert_layer                (GimpImage           *image,
-                                                                          gint32               layer_ID,
-                                                                          gint32               parent_ID,
-                                                                          gint                 position);
-GIMP_DEPRECATED_FOR(gimp_image_insert_layer)
-G_GNUC_INTERNAL gboolean          _gimp_image_insert_layer               (gint32               image_ID,
-                                                                          gint32               layer_ID,
-                                                                          gint32               parent_ID,
-                                                                          gint                 position);
-gboolean                          gimp_image_remove_layer                (GimpImage           *image,
-                                                                          gint32               layer_ID);
-GIMP_DEPRECATED_FOR(gimp_image_remove_layer)
-G_GNUC_INTERNAL gboolean          _gimp_image_remove_layer               (gint32               image_ID,
-                                                                          gint32               layer_ID);
-gboolean                          gimp_image_freeze_layers               (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_freeze_layers)
-G_GNUC_INTERNAL gboolean          _gimp_image_freeze_layers              (gint32               image_ID);
-gboolean                          gimp_image_thaw_layers                 (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_thaw_layers)
-G_GNUC_INTERNAL gboolean          _gimp_image_thaw_layers                (gint32               image_ID);
-gboolean                          gimp_image_insert_channel              (GimpImage           *image,
-                                                                          gint32               channel_ID,
-                                                                          gint32               parent_ID,
-                                                                          gint                 position);
-GIMP_DEPRECATED_FOR(gimp_image_insert_channel)
-G_GNUC_INTERNAL gboolean          _gimp_image_insert_channel             (gint32               image_ID,
-                                                                          gint32               channel_ID,
-                                                                          gint32               parent_ID,
-                                                                          gint                 position);
-gboolean                          gimp_image_remove_channel              (GimpImage           *image,
-                                                                          gint32               channel_ID);
-GIMP_DEPRECATED_FOR(gimp_image_remove_channel)
-G_GNUC_INTERNAL gboolean          _gimp_image_remove_channel             (gint32               image_ID,
-                                                                          gint32               channel_ID);
-gboolean                          gimp_image_freeze_channels             (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_freeze_channels)
-G_GNUC_INTERNAL gboolean          _gimp_image_freeze_channels            (gint32               image_ID);
-gboolean                          gimp_image_thaw_channels               (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_thaw_channels)
-G_GNUC_INTERNAL gboolean          _gimp_image_thaw_channels              (gint32               image_ID);
-gboolean                          gimp_image_insert_vectors              (GimpImage           *image,
-                                                                          gint32               vectors_ID,
-                                                                          gint32               parent_ID,
-                                                                          gint                 position);
-GIMP_DEPRECATED_FOR(gimp_image_insert_vectors)
-G_GNUC_INTERNAL gboolean          _gimp_image_insert_vectors             (gint32               image_ID,
-                                                                          gint32               vectors_ID,
-                                                                          gint32               parent_ID,
-                                                                          gint                 position);
-gboolean                          gimp_image_remove_vectors              (GimpImage           *image,
-                                                                          gint32               vectors_ID);
-GIMP_DEPRECATED_FOR(gimp_image_remove_vectors)
-G_GNUC_INTERNAL gboolean          _gimp_image_remove_vectors             (gint32               image_ID,
-                                                                          gint32               vectors_ID);
-gboolean                          gimp_image_freeze_vectors              (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_freeze_vectors)
-G_GNUC_INTERNAL gboolean          _gimp_image_freeze_vectors             (gint32               image_ID);
-gboolean                          gimp_image_thaw_vectors                (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_thaw_vectors)
-G_GNUC_INTERNAL gboolean          _gimp_image_thaw_vectors               (gint32               image_ID);
-gint                              gimp_image_get_item_position           (GimpImage           *image,
-                                                                          gint32               item_ID);
-GIMP_DEPRECATED_FOR(gimp_image_get_item_position)
-G_GNUC_INTERNAL gint              _gimp_image_get_item_position          (gint32               image_ID,
-                                                                          gint32               item_ID);
-gboolean                          gimp_image_raise_item                  (GimpImage           *image,
-                                                                          gint32               item_ID);
-GIMP_DEPRECATED_FOR(gimp_image_raise_item)
-G_GNUC_INTERNAL gboolean          _gimp_image_raise_item                 (gint32               image_ID,
-                                                                          gint32               item_ID);
-gboolean                          gimp_image_lower_item                  (GimpImage           *image,
-                                                                          gint32               item_ID);
-GIMP_DEPRECATED_FOR(gimp_image_lower_item)
-G_GNUC_INTERNAL gboolean          _gimp_image_lower_item                 (gint32               image_ID,
-                                                                          gint32               item_ID);
-gboolean                          gimp_image_raise_item_to_top           (GimpImage           *image,
-                                                                          gint32               item_ID);
-GIMP_DEPRECATED_FOR(gimp_image_raise_item_to_top)
-G_GNUC_INTERNAL gboolean          _gimp_image_raise_item_to_top          (gint32               image_ID,
-                                                                          gint32               item_ID);
-gboolean                          gimp_image_lower_item_to_bottom        (GimpImage           *image,
-                                                                          gint32               item_ID);
-GIMP_DEPRECATED_FOR(gimp_image_lower_item_to_bottom)
-G_GNUC_INTERNAL gboolean          _gimp_image_lower_item_to_bottom       (gint32               image_ID,
-                                                                          gint32               item_ID);
-gboolean                          gimp_image_reorder_item                (GimpImage           *image,
-                                                                          gint32               item_ID,
-                                                                          gint32               parent_ID,
-                                                                          gint                 position);
-GIMP_DEPRECATED_FOR(gimp_image_reorder_item)
-G_GNUC_INTERNAL gboolean          _gimp_image_reorder_item               (gint32               image_ID,
-                                                                          gint32               item_ID,
-                                                                          gint32               parent_ID,
-                                                                          gint                 position);
-gint32                            gimp_image_flatten                     (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_flatten)
-G_GNUC_INTERNAL gint32            _gimp_image_flatten                    (gint32               image_ID);
-gint32                            gimp_image_merge_visible_layers        (GimpImage           *image,
-                                                                          GimpMergeType        merge_type);
-GIMP_DEPRECATED_FOR(gimp_image_merge_visible_layers)
-G_GNUC_INTERNAL gint32            _gimp_image_merge_visible_layers       (gint32               image_ID,
-                                                                          GimpMergeType        merge_type);
-gint32                            gimp_image_merge_down                  (GimpImage           *image,
-                                                                          gint32               
merge_layer_ID,
-                                                                          GimpMergeType        merge_type);
-GIMP_DEPRECATED_FOR(gimp_image_merge_down)
-G_GNUC_INTERNAL gint32            _gimp_image_merge_down                 (gint32               image_ID,
-                                                                          gint32               
merge_layer_ID,
-                                                                          GimpMergeType        merge_type);
-G_GNUC_INTERNAL guint8*           _gimp_image_get_colormap               (GimpImage           *image,
-                                                                          gint                *num_bytes);
-GIMP_DEPRECATED_FOR(_gimp_image_get_colormap)
-G_GNUC_INTERNAL guint8*           __gimp_image_get_colormap              (gint32               image_ID,
-                                                                          gint                *num_bytes);
-G_GNUC_INTERNAL gboolean          _gimp_image_set_colormap               (GimpImage           *image,
-                                                                          gint                 num_bytes,
-                                                                          const guint8        *colormap);
-GIMP_DEPRECATED_FOR(_gimp_image_set_colormap)
-G_GNUC_INTERNAL gboolean          __gimp_image_set_colormap              (gint32               image_ID,
-                                                                          gint                 num_bytes,
-                                                                          const guint8        *colormap);
-G_GNUC_INTERNAL gchar*            _gimp_image_get_metadata               (GimpImage           *image);
-GIMP_DEPRECATED_FOR(_gimp_image_get_metadata)
-G_GNUC_INTERNAL gchar*            __gimp_image_get_metadata              (gint32               image_ID);
-G_GNUC_INTERNAL gboolean          _gimp_image_set_metadata               (GimpImage           *image,
-                                                                          const gchar         
*metadata_string);
-GIMP_DEPRECATED_FOR(_gimp_image_set_metadata)
-G_GNUC_INTERNAL gboolean          __gimp_image_set_metadata              (gint32               image_ID,
-                                                                          const gchar         
*metadata_string);
-gboolean                          gimp_image_clean_all                   (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_clean_all)
-G_GNUC_INTERNAL gboolean          _gimp_image_clean_all                  (gint32               image_ID);
-gboolean                          gimp_image_is_dirty                    (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_is_dirty)
-G_GNUC_INTERNAL gboolean          _gimp_image_is_dirty                   (gint32               image_ID);
-G_GNUC_INTERNAL gboolean          _gimp_image_thumbnail                  (GimpImage           *image,
-                                                                          gint                 width,
-                                                                          gint                 height,
-                                                                          gint                *actual_width,
-                                                                          gint                *actual_height,
-                                                                          gint                *bpp,
-                                                                          gint                
*thumbnail_data_count,
-                                                                          guint8             
**thumbnail_data);
-GIMP_DEPRECATED_FOR(_gimp_image_thumbnail)
-G_GNUC_INTERNAL gboolean          __gimp_image_thumbnail                 (gint32               image_ID,
-                                                                          gint                 width,
-                                                                          gint                 height,
-                                                                          gint                *actual_width,
-                                                                          gint                *actual_height,
-                                                                          gint                *bpp,
-                                                                          gint                
*thumbnail_data_count,
-                                                                          guint8             
**thumbnail_data);
-gint32                            gimp_image_get_active_layer            (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_active_layer)
-G_GNUC_INTERNAL gint32            _gimp_image_get_active_layer           (gint32               image_ID);
-gboolean                          gimp_image_set_active_layer            (GimpImage           *image,
-                                                                          gint32               
active_layer_ID);
-GIMP_DEPRECATED_FOR(gimp_image_set_active_layer)
-G_GNUC_INTERNAL gboolean          _gimp_image_set_active_layer           (gint32               image_ID,
-                                                                          gint32               
active_layer_ID);
-gint32                            gimp_image_get_active_channel          (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_active_channel)
-G_GNUC_INTERNAL gint32            _gimp_image_get_active_channel         (gint32               image_ID);
-gboolean                          gimp_image_set_active_channel          (GimpImage           *image,
-                                                                          gint32               
active_channel_ID);
-GIMP_DEPRECATED_FOR(gimp_image_set_active_channel)
-G_GNUC_INTERNAL gboolean          _gimp_image_set_active_channel         (gint32               image_ID,
-                                                                          gint32               
active_channel_ID);
-gint32                            gimp_image_get_active_vectors          (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_active_vectors)
-G_GNUC_INTERNAL gint32            _gimp_image_get_active_vectors         (gint32               image_ID);
-gboolean                          gimp_image_set_active_vectors          (GimpImage           *image,
-                                                                          gint32               
active_vectors_ID);
-GIMP_DEPRECATED_FOR(gimp_image_set_active_vectors)
-G_GNUC_INTERNAL gboolean          _gimp_image_set_active_vectors         (gint32               image_ID,
-                                                                          gint32               
active_vectors_ID);
-gint32                            gimp_image_get_selection               (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_selection)
-G_GNUC_INTERNAL gint32            _gimp_image_get_selection              (gint32               image_ID);
-gboolean                          gimp_image_get_component_active        (GimpImage           *image,
-                                                                          GimpChannelType      component);
-GIMP_DEPRECATED_FOR(gimp_image_get_component_active)
-G_GNUC_INTERNAL gboolean          _gimp_image_get_component_active       (gint32               image_ID,
-                                                                          GimpChannelType      component);
-gboolean                          gimp_image_set_component_active        (GimpImage           *image,
-                                                                          GimpChannelType      component,
-                                                                          gboolean             active);
-GIMP_DEPRECATED_FOR(gimp_image_set_component_active)
-G_GNUC_INTERNAL gboolean          _gimp_image_set_component_active       (gint32               image_ID,
-                                                                          GimpChannelType      component,
-                                                                          gboolean             active);
-gboolean                          gimp_image_get_component_visible       (GimpImage           *image,
-                                                                          GimpChannelType      component);
-GIMP_DEPRECATED_FOR(gimp_image_get_component_visible)
-G_GNUC_INTERNAL gboolean          _gimp_image_get_component_visible      (gint32               image_ID,
-                                                                          GimpChannelType      component);
-gboolean                          gimp_image_set_component_visible       (GimpImage           *image,
-                                                                          GimpChannelType      component,
-                                                                          gboolean             visible);
-GIMP_DEPRECATED_FOR(gimp_image_set_component_visible)
-G_GNUC_INTERNAL gboolean          _gimp_image_set_component_visible      (gint32               image_ID,
-                                                                          GimpChannelType      component,
-                                                                          gboolean             visible);
-gchar*                            gimp_image_get_filename                (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_filename)
-G_GNUC_INTERNAL gchar*            _gimp_image_get_filename               (gint32               image_ID);
-gboolean                          gimp_image_set_filename                (GimpImage           *image,
-                                                                          const gchar         *filename);
-GIMP_DEPRECATED_FOR(gimp_image_set_filename)
-G_GNUC_INTERNAL gboolean          _gimp_image_set_filename               (gint32               image_ID,
-                                                                          const gchar         *filename);
-gchar*                            gimp_image_get_uri                     (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_uri)
-G_GNUC_INTERNAL gchar*            _gimp_image_get_uri                    (gint32               image_ID);
-gchar*                            gimp_image_get_xcf_uri                 (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_xcf_uri)
-G_GNUC_INTERNAL gchar*            _gimp_image_get_xcf_uri                (gint32               image_ID);
-gchar*                            gimp_image_get_imported_uri            (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_imported_uri)
-G_GNUC_INTERNAL gchar*            _gimp_image_get_imported_uri           (gint32               image_ID);
-gchar*                            gimp_image_get_exported_uri            (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_exported_uri)
-G_GNUC_INTERNAL gchar*            _gimp_image_get_exported_uri           (gint32               image_ID);
-gchar*                            gimp_image_get_name                    (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_name)
-G_GNUC_INTERNAL gchar*            _gimp_image_get_name                   (gint32               image_ID);
-gboolean                          gimp_image_get_resolution              (GimpImage           *image,
-                                                                          gdouble             *xresolution,
-                                                                          gdouble             *yresolution);
-GIMP_DEPRECATED_FOR(gimp_image_get_resolution)
-G_GNUC_INTERNAL gboolean          _gimp_image_get_resolution             (gint32               image_ID,
-                                                                          gdouble             *xresolution,
-                                                                          gdouble             *yresolution);
-gboolean                          gimp_image_set_resolution              (GimpImage           *image,
-                                                                          gdouble              xresolution,
-                                                                          gdouble              yresolution);
-GIMP_DEPRECATED_FOR(gimp_image_set_resolution)
-G_GNUC_INTERNAL gboolean          _gimp_image_set_resolution             (gint32               image_ID,
-                                                                          gdouble              xresolution,
-                                                                          gdouble              yresolution);
-GimpUnit                          gimp_image_get_unit                    (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_unit)
-G_GNUC_INTERNAL GimpUnit          _gimp_image_get_unit                   (gint32               image_ID);
-gboolean                          gimp_image_set_unit                    (GimpImage           *image,
-                                                                          GimpUnit             unit);
-GIMP_DEPRECATED_FOR(gimp_image_set_unit)
-G_GNUC_INTERNAL gboolean          _gimp_image_set_unit                   (gint32               image_ID,
-                                                                          GimpUnit             unit);
-guint                             gimp_image_get_tattoo_state            (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_get_tattoo_state)
-G_GNUC_INTERNAL guint             _gimp_image_get_tattoo_state           (gint32               image_ID);
-gboolean                          gimp_image_set_tattoo_state            (GimpImage           *image,
-                                                                          guint                tattoo_state);
-GIMP_DEPRECATED_FOR(gimp_image_set_tattoo_state)
-G_GNUC_INTERNAL gboolean          _gimp_image_set_tattoo_state           (gint32               image_ID,
-                                                                          guint                tattoo_state);
-gint32                            gimp_image_get_layer_by_tattoo         (GimpImage           *image,
-                                                                          guint                tattoo);
-GIMP_DEPRECATED_FOR(gimp_image_get_layer_by_tattoo)
-G_GNUC_INTERNAL gint32            _gimp_image_get_layer_by_tattoo        (gint32               image_ID,
-                                                                          guint                tattoo);
-gint32                            gimp_image_get_channel_by_tattoo       (GimpImage           *image,
-                                                                          guint                tattoo);
-GIMP_DEPRECATED_FOR(gimp_image_get_channel_by_tattoo)
-G_GNUC_INTERNAL gint32            _gimp_image_get_channel_by_tattoo      (gint32               image_ID,
-                                                                          guint                tattoo);
-gint32                            gimp_image_get_vectors_by_tattoo       (GimpImage           *image,
-                                                                          guint                tattoo);
-GIMP_DEPRECATED_FOR(gimp_image_get_vectors_by_tattoo)
-G_GNUC_INTERNAL gint32            _gimp_image_get_vectors_by_tattoo      (gint32               image_ID,
-                                                                          guint                tattoo);
-gint32                            gimp_image_get_layer_by_name           (GimpImage           *image,
-                                                                          const gchar         *name);
-GIMP_DEPRECATED_FOR(gimp_image_get_layer_by_name)
-G_GNUC_INTERNAL gint32            _gimp_image_get_layer_by_name          (gint32               image_ID,
-                                                                          const gchar         *name);
-gint32                            gimp_image_get_channel_by_name         (GimpImage           *image,
-                                                                          const gchar         *name);
-GIMP_DEPRECATED_FOR(gimp_image_get_channel_by_name)
-G_GNUC_INTERNAL gint32            _gimp_image_get_channel_by_name        (gint32               image_ID,
-                                                                          const gchar         *name);
-gint32                            gimp_image_get_vectors_by_name         (GimpImage           *image,
-                                                                          const gchar         *name);
-GIMP_DEPRECATED_FOR(gimp_image_get_vectors_by_name)
-G_GNUC_INTERNAL gint32            _gimp_image_get_vectors_by_name        (gint32               image_ID,
-                                                                          const gchar         *name);
-gboolean                          gimp_image_attach_parasite             (GimpImage           *image,
-                                                                          const GimpParasite  *parasite);
-GIMP_DEPRECATED_FOR(gimp_image_attach_parasite)
-G_GNUC_INTERNAL gboolean          _gimp_image_attach_parasite            (gint32               image_ID,
-                                                                          const GimpParasite  *parasite);
-gboolean                          gimp_image_detach_parasite             (GimpImage           *image,
-                                                                          const gchar         *name);
-GIMP_DEPRECATED_FOR(gimp_image_detach_parasite)
-G_GNUC_INTERNAL gboolean          _gimp_image_detach_parasite            (gint32               image_ID,
-                                                                          const gchar         *name);
-GimpParasite*                     gimp_image_get_parasite                (GimpImage           *image,
-                                                                          const gchar         *name);
-GIMP_DEPRECATED_FOR(gimp_image_get_parasite)
-G_GNUC_INTERNAL GimpParasite*     _gimp_image_get_parasite               (gint32               image_ID,
-                                                                          const gchar         *name);
-gchar**                           gimp_image_get_parasite_list           (GimpImage           *image,
-                                                                          gint                
*num_parasites);
-GIMP_DEPRECATED_FOR(gimp_image_get_parasite_list)
-G_GNUC_INTERNAL gchar**           _gimp_image_get_parasite_list          (gint32               image_ID,
-                                                                          gint                
*num_parasites);
+gint* gimp_image_list (gint *num_images);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gboolean                 gimp_image_is_valid                   (GimpImage           *image);
+GimpImage*               gimp_image_new                        (gint                 width,
+                                                                gint                 height,
+                                                                GimpImageBaseType    type);
+GimpImage*               gimp_image_new_with_precision         (gint                 width,
+                                                                gint                 height,
+                                                                GimpImageBaseType    type,
+                                                                GimpPrecision        precision);
+GimpImage*               gimp_image_duplicate                  (GimpImage           *image);
+gboolean                 gimp_image_delete                     (GimpImage           *image);
+GimpImageBaseType        gimp_image_base_type                  (GimpImage           *image);
+GimpPrecision            gimp_image_get_precision              (GimpImage           *image);
+GimpLayerMode            gimp_image_get_default_new_layer_mode (GimpImage           *image);
+gint                     gimp_image_width                      (GimpImage           *image);
+gint                     gimp_image_height                     (GimpImage           *image);
+gint*                    gimp_image_get_layers                 (GimpImage           *image,
+                                                                gint                *num_layers);
+gint*                    gimp_image_get_channels               (GimpImage           *image,
+                                                                gint                *num_channels);
+gint*                    gimp_image_get_vectors                (GimpImage           *image,
+                                                                gint                *num_vectors);
+gint32                   gimp_image_get_active_drawable        (GimpImage           *image);
+gboolean                 gimp_image_unset_active_channel       (GimpImage           *image);
+gint32                   gimp_image_get_floating_sel           (GimpImage           *image);
+gint32                   gimp_image_floating_sel_attached_to   (GimpImage           *image);
+gboolean                 gimp_image_pick_color                 (GimpImage           *image,
+                                                                gint32               drawable_ID,
+                                                                gdouble              x,
+                                                                gdouble              y,
+                                                                gboolean             sample_merged,
+                                                                gboolean             sample_average,
+                                                                gdouble              average_radius,
+                                                                GimpRGB             *color);
+gint32                   gimp_image_pick_correlate_layer       (GimpImage           *image,
+                                                                gint                 x,
+                                                                gint                 y);
+gboolean                 gimp_image_insert_layer               (GimpImage           *image,
+                                                                gint32               layer_ID,
+                                                                gint32               parent_ID,
+                                                                gint                 position);
+gboolean                 gimp_image_remove_layer               (GimpImage           *image,
+                                                                gint32               layer_ID);
+gboolean                 gimp_image_freeze_layers              (GimpImage           *image);
+gboolean                 gimp_image_thaw_layers                (GimpImage           *image);
+gboolean                 gimp_image_insert_channel             (GimpImage           *image,
+                                                                gint32               channel_ID,
+                                                                gint32               parent_ID,
+                                                                gint                 position);
+gboolean                 gimp_image_remove_channel             (GimpImage           *image,
+                                                                gint32               channel_ID);
+gboolean                 gimp_image_freeze_channels            (GimpImage           *image);
+gboolean                 gimp_image_thaw_channels              (GimpImage           *image);
+gboolean                 gimp_image_insert_vectors             (GimpImage           *image,
+                                                                gint32               vectors_ID,
+                                                                gint32               parent_ID,
+                                                                gint                 position);
+gboolean                 gimp_image_remove_vectors             (GimpImage           *image,
+                                                                gint32               vectors_ID);
+gboolean                 gimp_image_freeze_vectors             (GimpImage           *image);
+gboolean                 gimp_image_thaw_vectors               (GimpImage           *image);
+gint                     gimp_image_get_item_position          (GimpImage           *image,
+                                                                gint32               item_ID);
+gboolean                 gimp_image_raise_item                 (GimpImage           *image,
+                                                                gint32               item_ID);
+gboolean                 gimp_image_lower_item                 (GimpImage           *image,
+                                                                gint32               item_ID);
+gboolean                 gimp_image_raise_item_to_top          (GimpImage           *image,
+                                                                gint32               item_ID);
+gboolean                 gimp_image_lower_item_to_bottom       (GimpImage           *image,
+                                                                gint32               item_ID);
+gboolean                 gimp_image_reorder_item               (GimpImage           *image,
+                                                                gint32               item_ID,
+                                                                gint32               parent_ID,
+                                                                gint                 position);
+gint32                   gimp_image_flatten                    (GimpImage           *image);
+gint32                   gimp_image_merge_visible_layers       (GimpImage           *image,
+                                                                GimpMergeType        merge_type);
+gint32                   gimp_image_merge_down                 (GimpImage           *image,
+                                                                gint32               merge_layer_ID,
+                                                                GimpMergeType        merge_type);
+G_GNUC_INTERNAL guint8*  _gimp_image_get_colormap              (GimpImage           *image,
+                                                                gint                *num_bytes);
+G_GNUC_INTERNAL gboolean _gimp_image_set_colormap              (GimpImage           *image,
+                                                                gint                 num_bytes,
+                                                                const guint8        *colormap);
+G_GNUC_INTERNAL gchar*   _gimp_image_get_metadata              (GimpImage           *image);
+G_GNUC_INTERNAL gboolean _gimp_image_set_metadata              (GimpImage           *image,
+                                                                const gchar         *metadata_string);
+gboolean                 gimp_image_clean_all                  (GimpImage           *image);
+gboolean                 gimp_image_is_dirty                   (GimpImage           *image);
+G_GNUC_INTERNAL gboolean _gimp_image_thumbnail                 (GimpImage           *image,
+                                                                gint                 width,
+                                                                gint                 height,
+                                                                gint                *actual_width,
+                                                                gint                *actual_height,
+                                                                gint                *bpp,
+                                                                gint                *thumbnail_data_count,
+                                                                guint8             **thumbnail_data);
+gint32                   gimp_image_get_active_layer           (GimpImage           *image);
+gboolean                 gimp_image_set_active_layer           (GimpImage           *image,
+                                                                gint32               active_layer_ID);
+gint32                   gimp_image_get_active_channel         (GimpImage           *image);
+gboolean                 gimp_image_set_active_channel         (GimpImage           *image,
+                                                                gint32               active_channel_ID);
+gint32                   gimp_image_get_active_vectors         (GimpImage           *image);
+gboolean                 gimp_image_set_active_vectors         (GimpImage           *image,
+                                                                gint32               active_vectors_ID);
+gint32                   gimp_image_get_selection              (GimpImage           *image);
+gboolean                 gimp_image_get_component_active       (GimpImage           *image,
+                                                                GimpChannelType      component);
+gboolean                 gimp_image_set_component_active       (GimpImage           *image,
+                                                                GimpChannelType      component,
+                                                                gboolean             active);
+gboolean                 gimp_image_get_component_visible      (GimpImage           *image,
+                                                                GimpChannelType      component);
+gboolean                 gimp_image_set_component_visible      (GimpImage           *image,
+                                                                GimpChannelType      component,
+                                                                gboolean             visible);
+gchar*                   gimp_image_get_filename               (GimpImage           *image);
+gboolean                 gimp_image_set_filename               (GimpImage           *image,
+                                                                const gchar         *filename);
+gchar*                   gimp_image_get_uri                    (GimpImage           *image);
+gchar*                   gimp_image_get_xcf_uri                (GimpImage           *image);
+gchar*                   gimp_image_get_imported_uri           (GimpImage           *image);
+gchar*                   gimp_image_get_exported_uri           (GimpImage           *image);
+gchar*                   gimp_image_get_name                   (GimpImage           *image);
+gboolean                 gimp_image_get_resolution             (GimpImage           *image,
+                                                                gdouble             *xresolution,
+                                                                gdouble             *yresolution);
+gboolean                 gimp_image_set_resolution             (GimpImage           *image,
+                                                                gdouble              xresolution,
+                                                                gdouble              yresolution);
+GimpUnit                 gimp_image_get_unit                   (GimpImage           *image);
+gboolean                 gimp_image_set_unit                   (GimpImage           *image,
+                                                                GimpUnit             unit);
+guint                    gimp_image_get_tattoo_state           (GimpImage           *image);
+gboolean                 gimp_image_set_tattoo_state           (GimpImage           *image,
+                                                                guint                tattoo_state);
+gint32                   gimp_image_get_layer_by_tattoo        (GimpImage           *image,
+                                                                guint                tattoo);
+gint32                   gimp_image_get_channel_by_tattoo      (GimpImage           *image,
+                                                                guint                tattoo);
+gint32                   gimp_image_get_vectors_by_tattoo      (GimpImage           *image,
+                                                                guint                tattoo);
+gint32                   gimp_image_get_layer_by_name          (GimpImage           *image,
+                                                                const gchar         *name);
+gint32                   gimp_image_get_channel_by_name        (GimpImage           *image,
+                                                                const gchar         *name);
+gint32                   gimp_image_get_vectors_by_name        (GimpImage           *image,
+                                                                const gchar         *name);
+gboolean                 gimp_image_attach_parasite            (GimpImage           *image,
+                                                                const GimpParasite  *parasite);
+gboolean                 gimp_image_detach_parasite            (GimpImage           *image,
+                                                                const gchar         *name);
+GimpParasite*            gimp_image_get_parasite               (GimpImage           *image,
+                                                                const gchar         *name);
+gchar**                  gimp_image_get_parasite_list          (GimpImage           *image,
+                                                                gint                *num_parasites);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_image_is_valid _gimp_image_is_valid
+#define gimp_image_new _gimp_image_new
+#define gimp_image_new_with_precision _gimp_image_new_with_precision
+#define gimp_image_duplicate _gimp_image_duplicate
+#define gimp_image_delete _gimp_image_delete
+#define gimp_image_base_type _gimp_image_base_type
+#define gimp_image_get_precision _gimp_image_get_precision
+#define gimp_image_get_default_new_layer_mode _gimp_image_get_default_new_layer_mode
+#define gimp_image_width _gimp_image_width
+#define gimp_image_height _gimp_image_height
+#define gimp_image_get_layers _gimp_image_get_layers
+#define gimp_image_get_channels _gimp_image_get_channels
+#define gimp_image_get_vectors _gimp_image_get_vectors
+#define gimp_image_get_active_drawable _gimp_image_get_active_drawable
+#define gimp_image_unset_active_channel _gimp_image_unset_active_channel
+#define gimp_image_get_floating_sel _gimp_image_get_floating_sel
+#define gimp_image_floating_sel_attached_to _gimp_image_floating_sel_attached_to
+#define gimp_image_pick_color _gimp_image_pick_color
+#define gimp_image_pick_correlate_layer _gimp_image_pick_correlate_layer
+#define gimp_image_insert_layer _gimp_image_insert_layer
+#define gimp_image_remove_layer _gimp_image_remove_layer
+#define gimp_image_freeze_layers _gimp_image_freeze_layers
+#define gimp_image_thaw_layers _gimp_image_thaw_layers
+#define gimp_image_insert_channel _gimp_image_insert_channel
+#define gimp_image_remove_channel _gimp_image_remove_channel
+#define gimp_image_freeze_channels _gimp_image_freeze_channels
+#define gimp_image_thaw_channels _gimp_image_thaw_channels
+#define gimp_image_insert_vectors _gimp_image_insert_vectors
+#define gimp_image_remove_vectors _gimp_image_remove_vectors
+#define gimp_image_freeze_vectors _gimp_image_freeze_vectors
+#define gimp_image_thaw_vectors _gimp_image_thaw_vectors
+#define gimp_image_get_item_position _gimp_image_get_item_position
+#define gimp_image_raise_item _gimp_image_raise_item
+#define gimp_image_lower_item _gimp_image_lower_item
+#define gimp_image_raise_item_to_top _gimp_image_raise_item_to_top
+#define gimp_image_lower_item_to_bottom _gimp_image_lower_item_to_bottom
+#define gimp_image_reorder_item _gimp_image_reorder_item
+#define gimp_image_flatten _gimp_image_flatten
+#define gimp_image_merge_visible_layers _gimp_image_merge_visible_layers
+#define gimp_image_merge_down _gimp_image_merge_down
+#define _gimp_image_get_colormap __gimp_image_get_colormap
+#define _gimp_image_set_colormap __gimp_image_set_colormap
+#define _gimp_image_get_metadata __gimp_image_get_metadata
+#define _gimp_image_set_metadata __gimp_image_set_metadata
+#define gimp_image_clean_all _gimp_image_clean_all
+#define gimp_image_is_dirty _gimp_image_is_dirty
+#define _gimp_image_thumbnail __gimp_image_thumbnail
+#define gimp_image_get_active_layer _gimp_image_get_active_layer
+#define gimp_image_set_active_layer _gimp_image_set_active_layer
+#define gimp_image_get_active_channel _gimp_image_get_active_channel
+#define gimp_image_set_active_channel _gimp_image_set_active_channel
+#define gimp_image_get_active_vectors _gimp_image_get_active_vectors
+#define gimp_image_set_active_vectors _gimp_image_set_active_vectors
+#define gimp_image_get_selection _gimp_image_get_selection
+#define gimp_image_get_component_active _gimp_image_get_component_active
+#define gimp_image_set_component_active _gimp_image_set_component_active
+#define gimp_image_get_component_visible _gimp_image_get_component_visible
+#define gimp_image_set_component_visible _gimp_image_set_component_visible
+#define gimp_image_get_filename _gimp_image_get_filename
+#define gimp_image_set_filename _gimp_image_set_filename
+#define gimp_image_get_uri _gimp_image_get_uri
+#define gimp_image_get_xcf_uri _gimp_image_get_xcf_uri
+#define gimp_image_get_imported_uri _gimp_image_get_imported_uri
+#define gimp_image_get_exported_uri _gimp_image_get_exported_uri
+#define gimp_image_get_name _gimp_image_get_name
+#define gimp_image_get_resolution _gimp_image_get_resolution
+#define gimp_image_set_resolution _gimp_image_set_resolution
+#define gimp_image_get_unit _gimp_image_get_unit
+#define gimp_image_set_unit _gimp_image_set_unit
+#define gimp_image_get_tattoo_state _gimp_image_get_tattoo_state
+#define gimp_image_set_tattoo_state _gimp_image_set_tattoo_state
+#define gimp_image_get_layer_by_tattoo _gimp_image_get_layer_by_tattoo
+#define gimp_image_get_channel_by_tattoo _gimp_image_get_channel_by_tattoo
+#define gimp_image_get_vectors_by_tattoo _gimp_image_get_vectors_by_tattoo
+#define gimp_image_get_layer_by_name _gimp_image_get_layer_by_name
+#define gimp_image_get_channel_by_name _gimp_image_get_channel_by_name
+#define gimp_image_get_vectors_by_name _gimp_image_get_vectors_by_name
+#define gimp_image_attach_parasite _gimp_image_attach_parasite
+#define gimp_image_detach_parasite _gimp_image_detach_parasite
+#define gimp_image_get_parasite _gimp_image_get_parasite
+#define gimp_image_get_parasite_list _gimp_image_get_parasite_list
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gboolean          _gimp_image_is_valid                   (gint32               image_ID);
+gint32            _gimp_image_new                        (gint                 width,
+                                                          gint                 height,
+                                                          GimpImageBaseType    type);
+gint32            _gimp_image_new_with_precision         (gint                 width,
+                                                          gint                 height,
+                                                          GimpImageBaseType    type,
+                                                          GimpPrecision        precision);
+gint32            _gimp_image_duplicate                  (gint32               image_ID);
+gboolean          _gimp_image_delete                     (gint32               image_ID);
+GimpImageBaseType _gimp_image_base_type                  (gint32               image_ID);
+GimpPrecision     _gimp_image_get_precision              (gint32               image_ID);
+GimpLayerMode     _gimp_image_get_default_new_layer_mode (gint32               image_ID);
+gint              _gimp_image_width                      (gint32               image_ID);
+gint              _gimp_image_height                     (gint32               image_ID);
+gint*             _gimp_image_get_layers                 (gint32               image_ID,
+                                                          gint                *num_layers);
+gint*             _gimp_image_get_channels               (gint32               image_ID,
+                                                          gint                *num_channels);
+gint*             _gimp_image_get_vectors                (gint32               image_ID,
+                                                          gint                *num_vectors);
+gint32            _gimp_image_get_active_drawable        (gint32               image_ID);
+gboolean          _gimp_image_unset_active_channel       (gint32               image_ID);
+gint32            _gimp_image_get_floating_sel           (gint32               image_ID);
+gint32            _gimp_image_floating_sel_attached_to   (gint32               image_ID);
+gboolean          _gimp_image_pick_color                 (gint32               image_ID,
+                                                          gint32               drawable_ID,
+                                                          gdouble              x,
+                                                          gdouble              y,
+                                                          gboolean             sample_merged,
+                                                          gboolean             sample_average,
+                                                          gdouble              average_radius,
+                                                          GimpRGB             *color);
+gint32            _gimp_image_pick_correlate_layer       (gint32               image_ID,
+                                                          gint                 x,
+                                                          gint                 y);
+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);
+gboolean          _gimp_image_freeze_layers              (gint32               image_ID);
+gboolean          _gimp_image_thaw_layers                (gint32               image_ID);
+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);
+gboolean          _gimp_image_freeze_channels            (gint32               image_ID);
+gboolean          _gimp_image_thaw_channels              (gint32               image_ID);
+gboolean          _gimp_image_insert_vectors             (gint32               image_ID,
+                                                          gint32               vectors_ID,
+                                                          gint32               parent_ID,
+                                                          gint                 position);
+gboolean          _gimp_image_remove_vectors             (gint32               image_ID,
+                                                          gint32               vectors_ID);
+gboolean          _gimp_image_freeze_vectors             (gint32               image_ID);
+gboolean          _gimp_image_thaw_vectors               (gint32               image_ID);
+gint              _gimp_image_get_item_position          (gint32               image_ID,
+                                                          gint32               item_ID);
+gboolean          _gimp_image_raise_item                 (gint32               image_ID,
+                                                          gint32               item_ID);
+gboolean          _gimp_image_lower_item                 (gint32               image_ID,
+                                                          gint32               item_ID);
+gboolean          _gimp_image_raise_item_to_top          (gint32               image_ID,
+                                                          gint32               item_ID);
+gboolean          _gimp_image_lower_item_to_bottom       (gint32               image_ID,
+                                                          gint32               item_ID);
+gboolean          _gimp_image_reorder_item               (gint32               image_ID,
+                                                          gint32               item_ID,
+                                                          gint32               parent_ID,
+                                                          gint                 position);
+gint32            _gimp_image_flatten                    (gint32               image_ID);
+gint32            _gimp_image_merge_visible_layers       (gint32               image_ID,
+                                                          GimpMergeType        merge_type);
+gint32            _gimp_image_merge_down                 (gint32               image_ID,
+                                                          gint32               merge_layer_ID,
+                                                          GimpMergeType        merge_type);
+guint8*           __gimp_image_get_colormap              (gint32               image_ID,
+                                                          gint                *num_bytes);
+gboolean          __gimp_image_set_colormap              (gint32               image_ID,
+                                                          gint                 num_bytes,
+                                                          const guint8        *colormap);
+gchar*            __gimp_image_get_metadata              (gint32               image_ID);
+gboolean          __gimp_image_set_metadata              (gint32               image_ID,
+                                                          const gchar         *metadata_string);
+gboolean          _gimp_image_clean_all                  (gint32               image_ID);
+gboolean          _gimp_image_is_dirty                   (gint32               image_ID);
+gboolean          __gimp_image_thumbnail                 (gint32               image_ID,
+                                                          gint                 width,
+                                                          gint                 height,
+                                                          gint                *actual_width,
+                                                          gint                *actual_height,
+                                                          gint                *bpp,
+                                                          gint                *thumbnail_data_count,
+                                                          guint8             **thumbnail_data);
+gint32            _gimp_image_get_active_layer           (gint32               image_ID);
+gboolean          _gimp_image_set_active_layer           (gint32               image_ID,
+                                                          gint32               active_layer_ID);
+gint32            _gimp_image_get_active_channel         (gint32               image_ID);
+gboolean          _gimp_image_set_active_channel         (gint32               image_ID,
+                                                          gint32               active_channel_ID);
+gint32            _gimp_image_get_active_vectors         (gint32               image_ID);
+gboolean          _gimp_image_set_active_vectors         (gint32               image_ID,
+                                                          gint32               active_vectors_ID);
+gint32            _gimp_image_get_selection              (gint32               image_ID);
+gboolean          _gimp_image_get_component_active       (gint32               image_ID,
+                                                          GimpChannelType      component);
+gboolean          _gimp_image_set_component_active       (gint32               image_ID,
+                                                          GimpChannelType      component,
+                                                          gboolean             active);
+gboolean          _gimp_image_get_component_visible      (gint32               image_ID,
+                                                          GimpChannelType      component);
+gboolean          _gimp_image_set_component_visible      (gint32               image_ID,
+                                                          GimpChannelType      component,
+                                                          gboolean             visible);
+gchar*            _gimp_image_get_filename               (gint32               image_ID);
+gboolean          _gimp_image_set_filename               (gint32               image_ID,
+                                                          const gchar         *filename);
+gchar*            _gimp_image_get_uri                    (gint32               image_ID);
+gchar*            _gimp_image_get_xcf_uri                (gint32               image_ID);
+gchar*            _gimp_image_get_imported_uri           (gint32               image_ID);
+gchar*            _gimp_image_get_exported_uri           (gint32               image_ID);
+gchar*            _gimp_image_get_name                   (gint32               image_ID);
+gboolean          _gimp_image_get_resolution             (gint32               image_ID,
+                                                          gdouble             *xresolution,
+                                                          gdouble             *yresolution);
+gboolean          _gimp_image_set_resolution             (gint32               image_ID,
+                                                          gdouble              xresolution,
+                                                          gdouble              yresolution);
+GimpUnit          _gimp_image_get_unit                   (gint32               image_ID);
+gboolean          _gimp_image_set_unit                   (gint32               image_ID,
+                                                          GimpUnit             unit);
+guint             _gimp_image_get_tattoo_state           (gint32               image_ID);
+gboolean          _gimp_image_set_tattoo_state           (gint32               image_ID,
+                                                          guint                tattoo_state);
+gint32            _gimp_image_get_layer_by_tattoo        (gint32               image_ID,
+                                                          guint                tattoo);
+gint32            _gimp_image_get_channel_by_tattoo      (gint32               image_ID,
+                                                          guint                tattoo);
+gint32            _gimp_image_get_vectors_by_tattoo      (gint32               image_ID,
+                                                          guint                tattoo);
+gint32            _gimp_image_get_layer_by_name          (gint32               image_ID,
+                                                          const gchar         *name);
+gint32            _gimp_image_get_channel_by_name        (gint32               image_ID,
+                                                          const gchar         *name);
+gint32            _gimp_image_get_vectors_by_name        (gint32               image_ID,
+                                                          const gchar         *name);
+gboolean          _gimp_image_attach_parasite            (gint32               image_ID,
+                                                          const GimpParasite  *parasite);
+gboolean          _gimp_image_detach_parasite            (gint32               image_ID,
+                                                          const gchar         *name);
+GimpParasite*     _gimp_image_get_parasite               (gint32               image_ID,
+                                                          const gchar         *name);
+gchar**           _gimp_image_get_parasite_list          (gint32               image_ID,
+                                                          gint                *num_parasites);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimagecolorprofile_pdb.h b/libgimp/gimpimagecolorprofile_pdb.h
index ded795b2e4..601769a53b 100644
--- a/libgimp/gimpimagecolorprofile_pdb.h
+++ b/libgimp/gimpimagecolorprofile_pdb.h
@@ -32,48 +32,63 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-G_GNUC_INTERNAL guint8*  _gimp_image_get_color_profile               (GimpImage                *image,
-                                                                      gint                     *num_bytes);
-GIMP_DEPRECATED_FOR(_gimp_image_get_color_profile)
-G_GNUC_INTERNAL guint8*  __gimp_image_get_color_profile              (gint32                    image_ID,
-                                                                      gint                     *num_bytes);
-G_GNUC_INTERNAL guint8*  _gimp_image_get_effective_color_profile     (GimpImage                *image,
-                                                                      gint                     *num_bytes);
-GIMP_DEPRECATED_FOR(_gimp_image_get_effective_color_profile)
-G_GNUC_INTERNAL guint8*  __gimp_image_get_effective_color_profile    (gint32                    image_ID,
-                                                                      gint                     *num_bytes);
-G_GNUC_INTERNAL gboolean _gimp_image_set_color_profile               (GimpImage                *image,
-                                                                      gint                      num_bytes,
-                                                                      const guint8             
*color_profile);
-GIMP_DEPRECATED_FOR(_gimp_image_set_color_profile)
-G_GNUC_INTERNAL gboolean __gimp_image_set_color_profile              (gint32                    image_ID,
-                                                                      gint                      num_bytes,
-                                                                      const guint8             
*color_profile);
-gboolean                 gimp_image_set_color_profile_from_file      (GimpImage                *image,
-                                                                      const gchar              *uri);
-GIMP_DEPRECATED_FOR(gimp_image_set_color_profile_from_file)
-G_GNUC_INTERNAL gboolean _gimp_image_set_color_profile_from_file     (gint32                    image_ID,
-                                                                      const gchar              *uri);
-G_GNUC_INTERNAL gboolean _gimp_image_convert_color_profile           (GimpImage                *image,
-                                                                      gint                      num_bytes,
-                                                                      const guint8             
*color_profile,
-                                                                      GimpColorRenderingIntent  intent,
-                                                                      gboolean                  bpc);
-GIMP_DEPRECATED_FOR(_gimp_image_convert_color_profile)
-G_GNUC_INTERNAL gboolean __gimp_image_convert_color_profile          (gint32                    image_ID,
-                                                                      gint                      num_bytes,
-                                                                      const guint8             
*color_profile,
-                                                                      GimpColorRenderingIntent  intent,
-                                                                      gboolean                  bpc);
-gboolean                 gimp_image_convert_color_profile_from_file  (GimpImage                *image,
-                                                                      const gchar              *uri,
-                                                                      GimpColorRenderingIntent  intent,
-                                                                      gboolean                  bpc);
-GIMP_DEPRECATED_FOR(gimp_image_convert_color_profile_from_file)
-G_GNUC_INTERNAL gboolean _gimp_image_convert_color_profile_from_file (gint32                    image_ID,
-                                                                      const gchar              *uri,
-                                                                      GimpColorRenderingIntent  intent,
-                                                                      gboolean                  bpc);
+
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+G_GNUC_INTERNAL guint8*  _gimp_image_get_color_profile              (GimpImage                *image,
+                                                                     gint                     *num_bytes);
+G_GNUC_INTERNAL guint8*  _gimp_image_get_effective_color_profile    (GimpImage                *image,
+                                                                     gint                     *num_bytes);
+G_GNUC_INTERNAL gboolean _gimp_image_set_color_profile              (GimpImage                *image,
+                                                                     gint                      num_bytes,
+                                                                     const guint8             
*color_profile);
+gboolean                 gimp_image_set_color_profile_from_file     (GimpImage                *image,
+                                                                     const gchar              *uri);
+G_GNUC_INTERNAL gboolean _gimp_image_convert_color_profile          (GimpImage                *image,
+                                                                     gint                      num_bytes,
+                                                                     const guint8             *color_profile,
+                                                                     GimpColorRenderingIntent  intent,
+                                                                     gboolean                  bpc);
+gboolean                 gimp_image_convert_color_profile_from_file (GimpImage                *image,
+                                                                     const gchar              *uri,
+                                                                     GimpColorRenderingIntent  intent,
+                                                                     gboolean                  bpc);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define _gimp_image_get_color_profile __gimp_image_get_color_profile
+#define _gimp_image_get_effective_color_profile __gimp_image_get_effective_color_profile
+#define _gimp_image_set_color_profile __gimp_image_set_color_profile
+#define gimp_image_set_color_profile_from_file _gimp_image_set_color_profile_from_file
+#define _gimp_image_convert_color_profile __gimp_image_convert_color_profile
+#define gimp_image_convert_color_profile_from_file _gimp_image_convert_color_profile_from_file
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+guint8*  __gimp_image_get_color_profile              (gint32                    image_ID,
+                                                      gint                     *num_bytes);
+guint8*  __gimp_image_get_effective_color_profile    (gint32                    image_ID,
+                                                      gint                     *num_bytes);
+gboolean __gimp_image_set_color_profile              (gint32                    image_ID,
+                                                      gint                      num_bytes,
+                                                      const guint8             *color_profile);
+gboolean _gimp_image_set_color_profile_from_file     (gint32                    image_ID,
+                                                      const gchar              *uri);
+gboolean __gimp_image_convert_color_profile          (gint32                    image_ID,
+                                                      gint                      num_bytes,
+                                                      const guint8             *color_profile,
+                                                      GimpColorRenderingIntent  intent,
+                                                      gboolean                  bpc);
+gboolean _gimp_image_convert_color_profile_from_file (gint32                    image_ID,
+                                                      const gchar              *uri,
+                                                      GimpColorRenderingIntent  intent,
+                                                      gboolean                  bpc);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimageconvert_pdb.h b/libgimp/gimpimageconvert_pdb.h
index a319d6470d..ec91cc6b36 100644
--- a/libgimp/gimpimageconvert_pdb.h
+++ b/libgimp/gimpimageconvert_pdb.h
@@ -32,36 +32,50 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean                 gimp_image_convert_rgb               (GimpImage              *image);
-GIMP_DEPRECATED_FOR(gimp_image_convert_rgb)
-G_GNUC_INTERNAL gboolean _gimp_image_convert_rgb              (gint32                  image_ID);
-gboolean                 gimp_image_convert_grayscale         (GimpImage              *image);
-GIMP_DEPRECATED_FOR(gimp_image_convert_grayscale)
-G_GNUC_INTERNAL gboolean _gimp_image_convert_grayscale        (gint32                  image_ID);
-gboolean                 gimp_image_convert_indexed           (GimpImage              *image,
-                                                               GimpConvertDitherType   dither_type,
-                                                               GimpConvertPaletteType  palette_type,
-                                                               gint                    num_cols,
-                                                               gboolean                alpha_dither,
-                                                               gboolean                remove_unused,
-                                                               const gchar            *palette);
-GIMP_DEPRECATED_FOR(gimp_image_convert_indexed)
-G_GNUC_INTERNAL gboolean _gimp_image_convert_indexed          (gint32                  image_ID,
-                                                               GimpConvertDitherType   dither_type,
-                                                               GimpConvertPaletteType  palette_type,
-                                                               gint                    num_cols,
-                                                               gboolean                alpha_dither,
-                                                               gboolean                remove_unused,
-                                                               const gchar            *palette);
-gboolean                 gimp_image_convert_set_dither_matrix (gint                    width,
-                                                               gint                    height,
-                                                               gint                    matrix_length,
-                                                               const guint8           *matrix);
-gboolean                 gimp_image_convert_precision         (GimpImage              *image,
-                                                               GimpPrecision           precision);
-GIMP_DEPRECATED_FOR(gimp_image_convert_precision)
-G_GNUC_INTERNAL gboolean _gimp_image_convert_precision        (gint32                  image_ID,
-                                                               GimpPrecision           precision);
+gboolean gimp_image_convert_set_dither_matrix (gint          width,
+                                               gint          height,
+                                               gint          matrix_length,
+                                               const guint8 *matrix);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gboolean gimp_image_convert_rgb       (GimpImage              *image);
+gboolean gimp_image_convert_grayscale (GimpImage              *image);
+gboolean gimp_image_convert_indexed   (GimpImage              *image,
+                                       GimpConvertDitherType   dither_type,
+                                       GimpConvertPaletteType  palette_type,
+                                       gint                    num_cols,
+                                       gboolean                alpha_dither,
+                                       gboolean                remove_unused,
+                                       const gchar            *palette);
+gboolean gimp_image_convert_precision (GimpImage              *image,
+                                       GimpPrecision           precision);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_image_convert_rgb _gimp_image_convert_rgb
+#define gimp_image_convert_grayscale _gimp_image_convert_grayscale
+#define gimp_image_convert_indexed _gimp_image_convert_indexed
+#define gimp_image_convert_precision _gimp_image_convert_precision
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gboolean _gimp_image_convert_rgb       (gint32                  image_ID);
+gboolean _gimp_image_convert_grayscale (gint32                  image_ID);
+gboolean _gimp_image_convert_indexed   (gint32                  image_ID,
+                                        GimpConvertDitherType   dither_type,
+                                        GimpConvertPaletteType  palette_type,
+                                        gint                    num_cols,
+                                        gboolean                alpha_dither,
+                                        gboolean                remove_unused,
+                                        const gchar            *palette);
+gboolean _gimp_image_convert_precision (gint32                  image_ID,
+                                        GimpPrecision           precision);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimagegrid_pdb.h b/libgimp/gimpimagegrid_pdb.h
index 204e37585c..79374c9c6b 100644
--- a/libgimp/gimpimagegrid_pdb.h
+++ b/libgimp/gimpimagegrid_pdb.h
@@ -32,62 +32,77 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean                      gimp_image_grid_get_spacing           (GimpImage     *image,
-                                                                     gdouble       *xspacing,
-                                                                     gdouble       *yspacing);
-GIMP_DEPRECATED_FOR(gimp_image_grid_get_spacing)
-G_GNUC_INTERNAL gboolean      _gimp_image_grid_get_spacing          (gint32         image_ID,
-                                                                     gdouble       *xspacing,
-                                                                     gdouble       *yspacing);
-gboolean                      gimp_image_grid_set_spacing           (GimpImage     *image,
-                                                                     gdouble        xspacing,
-                                                                     gdouble        yspacing);
-GIMP_DEPRECATED_FOR(gimp_image_grid_set_spacing)
-G_GNUC_INTERNAL gboolean      _gimp_image_grid_set_spacing          (gint32         image_ID,
-                                                                     gdouble        xspacing,
-                                                                     gdouble        yspacing);
-gboolean                      gimp_image_grid_get_offset            (GimpImage     *image,
-                                                                     gdouble       *xoffset,
-                                                                     gdouble       *yoffset);
-GIMP_DEPRECATED_FOR(gimp_image_grid_get_offset)
-G_GNUC_INTERNAL gboolean      _gimp_image_grid_get_offset           (gint32         image_ID,
-                                                                     gdouble       *xoffset,
-                                                                     gdouble       *yoffset);
-gboolean                      gimp_image_grid_set_offset            (GimpImage     *image,
-                                                                     gdouble        xoffset,
-                                                                     gdouble        yoffset);
-GIMP_DEPRECATED_FOR(gimp_image_grid_set_offset)
-G_GNUC_INTERNAL gboolean      _gimp_image_grid_set_offset           (gint32         image_ID,
-                                                                     gdouble        xoffset,
-                                                                     gdouble        yoffset);
-gboolean                      gimp_image_grid_get_foreground_color  (GimpImage     *image,
-                                                                     GimpRGB       *fgcolor);
-GIMP_DEPRECATED_FOR(gimp_image_grid_get_foreground_color)
-G_GNUC_INTERNAL gboolean      _gimp_image_grid_get_foreground_color (gint32         image_ID,
-                                                                     GimpRGB       *fgcolor);
-gboolean                      gimp_image_grid_set_foreground_color  (GimpImage     *image,
-                                                                     const GimpRGB *fgcolor);
-GIMP_DEPRECATED_FOR(gimp_image_grid_set_foreground_color)
-G_GNUC_INTERNAL gboolean      _gimp_image_grid_set_foreground_color (gint32         image_ID,
-                                                                     const GimpRGB *fgcolor);
-gboolean                      gimp_image_grid_get_background_color  (GimpImage     *image,
-                                                                     GimpRGB       *bgcolor);
-GIMP_DEPRECATED_FOR(gimp_image_grid_get_background_color)
-G_GNUC_INTERNAL gboolean      _gimp_image_grid_get_background_color (gint32         image_ID,
-                                                                     GimpRGB       *bgcolor);
-gboolean                      gimp_image_grid_set_background_color  (GimpImage     *image,
-                                                                     const GimpRGB *bgcolor);
-GIMP_DEPRECATED_FOR(gimp_image_grid_set_background_color)
-G_GNUC_INTERNAL gboolean      _gimp_image_grid_set_background_color (gint32         image_ID,
-                                                                     const GimpRGB *bgcolor);
-GimpGridStyle                 gimp_image_grid_get_style             (GimpImage     *image);
-GIMP_DEPRECATED_FOR(gimp_image_grid_get_style)
-G_GNUC_INTERNAL GimpGridStyle _gimp_image_grid_get_style            (gint32         image_ID);
-gboolean                      gimp_image_grid_set_style             (GimpImage     *image,
-                                                                     GimpGridStyle  style);
-GIMP_DEPRECATED_FOR(gimp_image_grid_set_style)
-G_GNUC_INTERNAL gboolean      _gimp_image_grid_set_style            (gint32         image_ID,
-                                                                     GimpGridStyle  style);
+
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gboolean      gimp_image_grid_get_spacing          (GimpImage     *image,
+                                                    gdouble       *xspacing,
+                                                    gdouble       *yspacing);
+gboolean      gimp_image_grid_set_spacing          (GimpImage     *image,
+                                                    gdouble        xspacing,
+                                                    gdouble        yspacing);
+gboolean      gimp_image_grid_get_offset           (GimpImage     *image,
+                                                    gdouble       *xoffset,
+                                                    gdouble       *yoffset);
+gboolean      gimp_image_grid_set_offset           (GimpImage     *image,
+                                                    gdouble        xoffset,
+                                                    gdouble        yoffset);
+gboolean      gimp_image_grid_get_foreground_color (GimpImage     *image,
+                                                    GimpRGB       *fgcolor);
+gboolean      gimp_image_grid_set_foreground_color (GimpImage     *image,
+                                                    const GimpRGB *fgcolor);
+gboolean      gimp_image_grid_get_background_color (GimpImage     *image,
+                                                    GimpRGB       *bgcolor);
+gboolean      gimp_image_grid_set_background_color (GimpImage     *image,
+                                                    const GimpRGB *bgcolor);
+GimpGridStyle gimp_image_grid_get_style            (GimpImage     *image);
+gboolean      gimp_image_grid_set_style            (GimpImage     *image,
+                                                    GimpGridStyle  style);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_image_grid_get_spacing _gimp_image_grid_get_spacing
+#define gimp_image_grid_set_spacing _gimp_image_grid_set_spacing
+#define gimp_image_grid_get_offset _gimp_image_grid_get_offset
+#define gimp_image_grid_set_offset _gimp_image_grid_set_offset
+#define gimp_image_grid_get_foreground_color _gimp_image_grid_get_foreground_color
+#define gimp_image_grid_set_foreground_color _gimp_image_grid_set_foreground_color
+#define gimp_image_grid_get_background_color _gimp_image_grid_get_background_color
+#define gimp_image_grid_set_background_color _gimp_image_grid_set_background_color
+#define gimp_image_grid_get_style _gimp_image_grid_get_style
+#define gimp_image_grid_set_style _gimp_image_grid_set_style
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gboolean      _gimp_image_grid_get_spacing          (gint32         image_ID,
+                                                     gdouble       *xspacing,
+                                                     gdouble       *yspacing);
+gboolean      _gimp_image_grid_set_spacing          (gint32         image_ID,
+                                                     gdouble        xspacing,
+                                                     gdouble        yspacing);
+gboolean      _gimp_image_grid_get_offset           (gint32         image_ID,
+                                                     gdouble       *xoffset,
+                                                     gdouble       *yoffset);
+gboolean      _gimp_image_grid_set_offset           (gint32         image_ID,
+                                                     gdouble        xoffset,
+                                                     gdouble        yoffset);
+gboolean      _gimp_image_grid_get_foreground_color (gint32         image_ID,
+                                                     GimpRGB       *fgcolor);
+gboolean      _gimp_image_grid_set_foreground_color (gint32         image_ID,
+                                                     const GimpRGB *fgcolor);
+gboolean      _gimp_image_grid_get_background_color (gint32         image_ID,
+                                                     GimpRGB       *bgcolor);
+gboolean      _gimp_image_grid_set_background_color (gint32         image_ID,
+                                                     const GimpRGB *bgcolor);
+GimpGridStyle _gimp_image_grid_get_style            (gint32         image_ID);
+gboolean      _gimp_image_grid_set_style            (gint32         image_ID,
+                                                     GimpGridStyle  style);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimageguides_pdb.h b/libgimp/gimpimageguides_pdb.h
index c510c8c046..c566bd7b04 100644
--- a/libgimp/gimpimageguides_pdb.h
+++ b/libgimp/gimpimageguides_pdb.h
@@ -32,36 +32,51 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gint32                              gimp_image_add_hguide             (GimpImage *image,
-                                                                       gint       yposition);
-GIMP_DEPRECATED_FOR(gimp_image_add_hguide)
-G_GNUC_INTERNAL gint32              _gimp_image_add_hguide            (gint32     image_ID,
-                                                                       gint       yposition);
-gint32                              gimp_image_add_vguide             (GimpImage *image,
-                                                                       gint       xposition);
-GIMP_DEPRECATED_FOR(gimp_image_add_vguide)
-G_GNUC_INTERNAL gint32              _gimp_image_add_vguide            (gint32     image_ID,
-                                                                       gint       xposition);
-gboolean                            gimp_image_delete_guide           (GimpImage *image,
-                                                                       gint32     guide_ID);
-GIMP_DEPRECATED_FOR(gimp_image_delete_guide)
-G_GNUC_INTERNAL gboolean            _gimp_image_delete_guide          (gint32     image_ID,
-                                                                       gint32     guide_ID);
-gint32                              gimp_image_find_next_guide        (GimpImage *image,
-                                                                       gint32     guide_ID);
-GIMP_DEPRECATED_FOR(gimp_image_find_next_guide)
-G_GNUC_INTERNAL gint32              _gimp_image_find_next_guide       (gint32     image_ID,
-                                                                       gint32     guide_ID);
-GimpOrientationType                 gimp_image_get_guide_orientation  (GimpImage *image,
-                                                                       gint32     guide_ID);
-GIMP_DEPRECATED_FOR(gimp_image_get_guide_orientation)
-G_GNUC_INTERNAL GimpOrientationType _gimp_image_get_guide_orientation (gint32     image_ID,
-                                                                       gint32     guide_ID);
-gint                                gimp_image_get_guide_position     (GimpImage *image,
-                                                                       gint32     guide_ID);
-GIMP_DEPRECATED_FOR(gimp_image_get_guide_position)
-G_GNUC_INTERNAL gint                _gimp_image_get_guide_position    (gint32     image_ID,
-                                                                       gint32     guide_ID);
+
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gint32              gimp_image_add_hguide            (GimpImage *image,
+                                                      gint       yposition);
+gint32              gimp_image_add_vguide            (GimpImage *image,
+                                                      gint       xposition);
+gboolean            gimp_image_delete_guide          (GimpImage *image,
+                                                      gint32     guide_ID);
+gint32              gimp_image_find_next_guide       (GimpImage *image,
+                                                      gint32     guide_ID);
+GimpOrientationType gimp_image_get_guide_orientation (GimpImage *image,
+                                                      gint32     guide_ID);
+gint                gimp_image_get_guide_position    (GimpImage *image,
+                                                      gint32     guide_ID);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_image_add_hguide _gimp_image_add_hguide
+#define gimp_image_add_vguide _gimp_image_add_vguide
+#define gimp_image_delete_guide _gimp_image_delete_guide
+#define gimp_image_find_next_guide _gimp_image_find_next_guide
+#define gimp_image_get_guide_orientation _gimp_image_get_guide_orientation
+#define gimp_image_get_guide_position _gimp_image_get_guide_position
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32              _gimp_image_add_hguide            (gint32 image_ID,
+                                                       gint   yposition);
+gint32              _gimp_image_add_vguide            (gint32 image_ID,
+                                                       gint   xposition);
+gboolean            _gimp_image_delete_guide          (gint32 image_ID,
+                                                       gint32 guide_ID);
+gint32              _gimp_image_find_next_guide       (gint32 image_ID,
+                                                       gint32 guide_ID);
+GimpOrientationType _gimp_image_get_guide_orientation (gint32 image_ID,
+                                                       gint32 guide_ID);
+gint                _gimp_image_get_guide_position    (gint32 image_ID,
+                                                       gint32 guide_ID);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimagesamplepoints_pdb.h b/libgimp/gimpimagesamplepoints_pdb.h
index f0d56994f9..3dd6252f5f 100644
--- a/libgimp/gimpimagesamplepoints_pdb.h
+++ b/libgimp/gimpimagesamplepoints_pdb.h
@@ -32,30 +32,45 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gint32                   gimp_image_add_sample_point           (GimpImage *image,
-                                                                gint       position_x,
-                                                                gint       position_y);
-GIMP_DEPRECATED_FOR(gimp_image_add_sample_point)
-G_GNUC_INTERNAL gint32   _gimp_image_add_sample_point          (gint32     image_ID,
-                                                                gint       position_x,
-                                                                gint       position_y);
-gboolean                 gimp_image_delete_sample_point        (GimpImage *image,
-                                                                gint32     sample_point_ID);
-GIMP_DEPRECATED_FOR(gimp_image_delete_sample_point)
-G_GNUC_INTERNAL gboolean _gimp_image_delete_sample_point       (gint32     image_ID,
-                                                                gint32     sample_point_ID);
-gint32                   gimp_image_find_next_sample_point     (GimpImage *image,
-                                                                gint32     sample_point_ID);
-GIMP_DEPRECATED_FOR(gimp_image_find_next_sample_point)
-G_GNUC_INTERNAL gint32   _gimp_image_find_next_sample_point    (gint32     image_ID,
-                                                                gint32     sample_point_ID);
-gint                     gimp_image_get_sample_point_position  (GimpImage *image,
-                                                                gint32     sample_point_ID,
-                                                                gint      *position_y);
-GIMP_DEPRECATED_FOR(gimp_image_get_sample_point_position)
-G_GNUC_INTERNAL gint     _gimp_image_get_sample_point_position (gint32     image_ID,
-                                                                gint32     sample_point_ID,
-                                                                gint      *position_y);
+
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gint32   gimp_image_add_sample_point          (GimpImage *image,
+                                               gint       position_x,
+                                               gint       position_y);
+gboolean gimp_image_delete_sample_point       (GimpImage *image,
+                                               gint32     sample_point_ID);
+gint32   gimp_image_find_next_sample_point    (GimpImage *image,
+                                               gint32     sample_point_ID);
+gint     gimp_image_get_sample_point_position (GimpImage *image,
+                                               gint32     sample_point_ID,
+                                               gint      *position_y);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_image_add_sample_point _gimp_image_add_sample_point
+#define gimp_image_delete_sample_point _gimp_image_delete_sample_point
+#define gimp_image_find_next_sample_point _gimp_image_find_next_sample_point
+#define gimp_image_get_sample_point_position _gimp_image_get_sample_point_position
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32   _gimp_image_add_sample_point          (gint32  image_ID,
+                                                gint    position_x,
+                                                gint    position_y);
+gboolean _gimp_image_delete_sample_point       (gint32  image_ID,
+                                                gint32  sample_point_ID);
+gint32   _gimp_image_find_next_sample_point    (gint32  image_ID,
+                                                gint32  sample_point_ID);
+gint     _gimp_image_get_sample_point_position (gint32  image_ID,
+                                                gint32  sample_point_ID,
+                                                gint   *position_y);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimageselect_pdb.h b/libgimp/gimpimageselect_pdb.h
index 01ae0f879b..5388112b4d 100644
--- a/libgimp/gimpimageselect_pdb.h
+++ b/libgimp/gimpimageselect_pdb.h
@@ -32,85 +32,100 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean                 gimp_image_select_color             (GimpImage      *image,
-                                                              GimpChannelOps  operation,
-                                                              gint32          drawable_ID,
-                                                              const GimpRGB  *color);
-GIMP_DEPRECATED_FOR(gimp_image_select_color)
-G_GNUC_INTERNAL gboolean _gimp_image_select_color            (gint32          image_ID,
-                                                              GimpChannelOps  operation,
-                                                              gint32          drawable_ID,
-                                                              const GimpRGB  *color);
-gboolean                 gimp_image_select_contiguous_color  (GimpImage      *image,
-                                                              GimpChannelOps  operation,
-                                                              gint32          drawable_ID,
-                                                              gdouble         x,
-                                                              gdouble         y);
-GIMP_DEPRECATED_FOR(gimp_image_select_contiguous_color)
-G_GNUC_INTERNAL gboolean _gimp_image_select_contiguous_color (gint32          image_ID,
-                                                              GimpChannelOps  operation,
-                                                              gint32          drawable_ID,
-                                                              gdouble         x,
-                                                              gdouble         y);
-gboolean                 gimp_image_select_rectangle         (GimpImage      *image,
-                                                              GimpChannelOps  operation,
-                                                              gdouble         x,
-                                                              gdouble         y,
-                                                              gdouble         width,
-                                                              gdouble         height);
-GIMP_DEPRECATED_FOR(gimp_image_select_rectangle)
-G_GNUC_INTERNAL gboolean _gimp_image_select_rectangle        (gint32          image_ID,
-                                                              GimpChannelOps  operation,
-                                                              gdouble         x,
-                                                              gdouble         y,
-                                                              gdouble         width,
-                                                              gdouble         height);
-gboolean                 gimp_image_select_round_rectangle   (GimpImage      *image,
-                                                              GimpChannelOps  operation,
-                                                              gdouble         x,
-                                                              gdouble         y,
-                                                              gdouble         width,
-                                                              gdouble         height,
-                                                              gdouble         corner_radius_x,
-                                                              gdouble         corner_radius_y);
-GIMP_DEPRECATED_FOR(gimp_image_select_round_rectangle)
-G_GNUC_INTERNAL 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);
-gboolean                 gimp_image_select_ellipse           (GimpImage      *image,
-                                                              GimpChannelOps  operation,
-                                                              gdouble         x,
-                                                              gdouble         y,
-                                                              gdouble         width,
-                                                              gdouble         height);
-GIMP_DEPRECATED_FOR(gimp_image_select_ellipse)
-G_GNUC_INTERNAL gboolean _gimp_image_select_ellipse          (gint32          image_ID,
-                                                              GimpChannelOps  operation,
-                                                              gdouble         x,
-                                                              gdouble         y,
-                                                              gdouble         width,
-                                                              gdouble         height);
-gboolean                 gimp_image_select_polygon           (GimpImage      *image,
-                                                              GimpChannelOps  operation,
-                                                              gint            num_segs,
-                                                              const gdouble  *segs);
-GIMP_DEPRECATED_FOR(gimp_image_select_polygon)
-G_GNUC_INTERNAL gboolean _gimp_image_select_polygon          (gint32          image_ID,
-                                                              GimpChannelOps  operation,
-                                                              gint            num_segs,
-                                                              const gdouble  *segs);
-gboolean                 gimp_image_select_item              (GimpImage      *image,
-                                                              GimpChannelOps  operation,
-                                                              gint32          item_ID);
-GIMP_DEPRECATED_FOR(gimp_image_select_item)
-G_GNUC_INTERNAL gboolean _gimp_image_select_item             (gint32          image_ID,
-                                                              GimpChannelOps  operation,
-                                                              gint32          item_ID);
+
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gboolean gimp_image_select_color            (GimpImage      *image,
+                                             GimpChannelOps  operation,
+                                             gint32          drawable_ID,
+                                             const GimpRGB  *color);
+gboolean gimp_image_select_contiguous_color (GimpImage      *image,
+                                             GimpChannelOps  operation,
+                                             gint32          drawable_ID,
+                                             gdouble         x,
+                                             gdouble         y);
+gboolean gimp_image_select_rectangle        (GimpImage      *image,
+                                             GimpChannelOps  operation,
+                                             gdouble         x,
+                                             gdouble         y,
+                                             gdouble         width,
+                                             gdouble         height);
+gboolean gimp_image_select_round_rectangle  (GimpImage      *image,
+                                             GimpChannelOps  operation,
+                                             gdouble         x,
+                                             gdouble         y,
+                                             gdouble         width,
+                                             gdouble         height,
+                                             gdouble         corner_radius_x,
+                                             gdouble         corner_radius_y);
+gboolean gimp_image_select_ellipse          (GimpImage      *image,
+                                             GimpChannelOps  operation,
+                                             gdouble         x,
+                                             gdouble         y,
+                                             gdouble         width,
+                                             gdouble         height);
+gboolean gimp_image_select_polygon          (GimpImage      *image,
+                                             GimpChannelOps  operation,
+                                             gint            num_segs,
+                                             const gdouble  *segs);
+gboolean gimp_image_select_item             (GimpImage      *image,
+                                             GimpChannelOps  operation,
+                                             gint32          item_ID);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_image_select_color _gimp_image_select_color
+#define gimp_image_select_contiguous_color _gimp_image_select_contiguous_color
+#define gimp_image_select_rectangle _gimp_image_select_rectangle
+#define gimp_image_select_round_rectangle _gimp_image_select_round_rectangle
+#define gimp_image_select_ellipse _gimp_image_select_ellipse
+#define gimp_image_select_polygon _gimp_image_select_polygon
+#define gimp_image_select_item _gimp_image_select_item
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gboolean _gimp_image_select_color            (gint32          image_ID,
+                                              GimpChannelOps  operation,
+                                              gint32          drawable_ID,
+                                              const GimpRGB  *color);
+gboolean _gimp_image_select_contiguous_color (gint32          image_ID,
+                                              GimpChannelOps  operation,
+                                              gint32          drawable_ID,
+                                              gdouble         x,
+                                              gdouble         y);
+gboolean _gimp_image_select_rectangle        (gint32          image_ID,
+                                              GimpChannelOps  operation,
+                                              gdouble         x,
+                                              gdouble         y,
+                                              gdouble         width,
+                                              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);
+gboolean _gimp_image_select_ellipse          (gint32          image_ID,
+                                              GimpChannelOps  operation,
+                                              gdouble         x,
+                                              gdouble         y,
+                                              gdouble         width,
+                                              gdouble         height);
+gboolean _gimp_image_select_polygon          (gint32          image_ID,
+                                              GimpChannelOps  operation,
+                                              gint            num_segs,
+                                              const gdouble  *segs);
+gboolean _gimp_image_select_item             (gint32          image_ID,
+                                              GimpChannelOps  operation,
+                                              gint32          item_ID);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimagetransform_pdb.h b/libgimp/gimpimagetransform_pdb.h
index bee76b6852..34caacb0c9 100644
--- a/libgimp/gimpimagetransform_pdb.h
+++ b/libgimp/gimpimagetransform_pdb.h
@@ -32,48 +32,63 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean                 gimp_image_resize            (GimpImage           *image,
-                                                       gint                 new_width,
-                                                       gint                 new_height,
-                                                       gint                 offx,
-                                                       gint                 offy);
-GIMP_DEPRECATED_FOR(gimp_image_resize)
-G_GNUC_INTERNAL gboolean _gimp_image_resize           (gint32               image_ID,
-                                                       gint                 new_width,
-                                                       gint                 new_height,
-                                                       gint                 offx,
-                                                       gint                 offy);
-gboolean                 gimp_image_resize_to_layers  (GimpImage           *image);
-GIMP_DEPRECATED_FOR(gimp_image_resize_to_layers)
-G_GNUC_INTERNAL gboolean _gimp_image_resize_to_layers (gint32               image_ID);
-gboolean                 gimp_image_scale             (GimpImage           *image,
-                                                       gint                 new_width,
-                                                       gint                 new_height);
-GIMP_DEPRECATED_FOR(gimp_image_scale)
-G_GNUC_INTERNAL gboolean _gimp_image_scale            (gint32               image_ID,
-                                                       gint                 new_width,
-                                                       gint                 new_height);
-gboolean                 gimp_image_crop              (GimpImage           *image,
-                                                       gint                 new_width,
-                                                       gint                 new_height,
-                                                       gint                 offx,
-                                                       gint                 offy);
-GIMP_DEPRECATED_FOR(gimp_image_crop)
-G_GNUC_INTERNAL gboolean _gimp_image_crop             (gint32               image_ID,
-                                                       gint                 new_width,
-                                                       gint                 new_height,
-                                                       gint                 offx,
-                                                       gint                 offy);
-gboolean                 gimp_image_flip              (GimpImage           *image,
-                                                       GimpOrientationType  flip_type);
-GIMP_DEPRECATED_FOR(gimp_image_flip)
-G_GNUC_INTERNAL gboolean _gimp_image_flip             (gint32               image_ID,
-                                                       GimpOrientationType  flip_type);
-gboolean                 gimp_image_rotate            (GimpImage           *image,
-                                                       GimpRotationType     rotate_type);
-GIMP_DEPRECATED_FOR(gimp_image_rotate)
-G_GNUC_INTERNAL gboolean _gimp_image_rotate           (gint32               image_ID,
-                                                       GimpRotationType     rotate_type);
+
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gboolean gimp_image_resize           (GimpImage           *image,
+                                      gint                 new_width,
+                                      gint                 new_height,
+                                      gint                 offx,
+                                      gint                 offy);
+gboolean gimp_image_resize_to_layers (GimpImage           *image);
+gboolean gimp_image_scale            (GimpImage           *image,
+                                      gint                 new_width,
+                                      gint                 new_height);
+gboolean gimp_image_crop             (GimpImage           *image,
+                                      gint                 new_width,
+                                      gint                 new_height,
+                                      gint                 offx,
+                                      gint                 offy);
+gboolean gimp_image_flip             (GimpImage           *image,
+                                      GimpOrientationType  flip_type);
+gboolean gimp_image_rotate           (GimpImage           *image,
+                                      GimpRotationType     rotate_type);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_image_resize _gimp_image_resize
+#define gimp_image_resize_to_layers _gimp_image_resize_to_layers
+#define gimp_image_scale _gimp_image_scale
+#define gimp_image_crop _gimp_image_crop
+#define gimp_image_flip _gimp_image_flip
+#define gimp_image_rotate _gimp_image_rotate
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gboolean _gimp_image_resize           (gint32              image_ID,
+                                       gint                new_width,
+                                       gint                new_height,
+                                       gint                offx,
+                                       gint                offy);
+gboolean _gimp_image_resize_to_layers (gint32              image_ID);
+gboolean _gimp_image_scale            (gint32              image_ID,
+                                       gint                new_width,
+                                       gint                new_height);
+gboolean _gimp_image_crop             (gint32              image_ID,
+                                       gint                new_width,
+                                       gint                new_height,
+                                       gint                offx,
+                                       gint                offy);
+gboolean _gimp_image_flip             (gint32              image_ID,
+                                       GimpOrientationType flip_type);
+gboolean _gimp_image_rotate           (gint32              image_ID,
+                                       GimpRotationType    rotate_type);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimageundo_pdb.h b/libgimp/gimpimageundo_pdb.h
index 947e11604a..9a59b7622f 100644
--- a/libgimp/gimpimageundo_pdb.h
+++ b/libgimp/gimpimageundo_pdb.h
@@ -32,27 +32,42 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean                 gimp_image_undo_group_start  (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_image_undo_group_start)
-G_GNUC_INTERNAL gboolean _gimp_image_undo_group_start (gint32     image_ID);
-gboolean                 gimp_image_undo_group_end    (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_image_undo_group_end)
-G_GNUC_INTERNAL gboolean _gimp_image_undo_group_end   (gint32     image_ID);
-gboolean                 gimp_image_undo_is_enabled   (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_image_undo_is_enabled)
-G_GNUC_INTERNAL gboolean _gimp_image_undo_is_enabled  (gint32     image_ID);
-gboolean                 gimp_image_undo_disable      (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_image_undo_disable)
-G_GNUC_INTERNAL gboolean _gimp_image_undo_disable     (gint32     image_ID);
-gboolean                 gimp_image_undo_enable       (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_image_undo_enable)
-G_GNUC_INTERNAL gboolean _gimp_image_undo_enable      (gint32     image_ID);
-gboolean                 gimp_image_undo_freeze       (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_image_undo_freeze)
-G_GNUC_INTERNAL gboolean _gimp_image_undo_freeze      (gint32     image_ID);
-gboolean                 gimp_image_undo_thaw         (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_image_undo_thaw)
-G_GNUC_INTERNAL gboolean _gimp_image_undo_thaw        (gint32     image_ID);
+
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gboolean gimp_image_undo_group_start (GimpImage *image);
+gboolean gimp_image_undo_group_end   (GimpImage *image);
+gboolean gimp_image_undo_is_enabled  (GimpImage *image);
+gboolean gimp_image_undo_disable     (GimpImage *image);
+gboolean gimp_image_undo_enable      (GimpImage *image);
+gboolean gimp_image_undo_freeze      (GimpImage *image);
+gboolean gimp_image_undo_thaw        (GimpImage *image);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_image_undo_group_start _gimp_image_undo_group_start
+#define gimp_image_undo_group_end _gimp_image_undo_group_end
+#define gimp_image_undo_is_enabled _gimp_image_undo_is_enabled
+#define gimp_image_undo_disable _gimp_image_undo_disable
+#define gimp_image_undo_enable _gimp_image_undo_enable
+#define gimp_image_undo_freeze _gimp_image_undo_freeze
+#define gimp_image_undo_thaw _gimp_image_undo_thaw
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gboolean _gimp_image_undo_group_start (gint32 image_ID);
+gboolean _gimp_image_undo_group_end   (gint32 image_ID);
+gboolean _gimp_image_undo_is_enabled  (gint32 image_ID);
+gboolean _gimp_image_undo_disable     (gint32 image_ID);
+gboolean _gimp_image_undo_enable      (gint32 image_ID);
+gboolean _gimp_image_undo_freeze      (gint32 image_ID);
+gboolean _gimp_image_undo_thaw        (gint32 image_ID);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpitem_pdb.h b/libgimp/gimpitem_pdb.h
index 43f961e39f..9298f6ff88 100644
--- a/libgimp/gimpitem_pdb.h
+++ b/libgimp/gimpitem_pdb.h
@@ -32,54 +32,68 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean               gimp_item_is_valid          (gint32              item_ID);
-GimpImage*             gimp_item_get_image         (gint32              item_ID);
-GIMP_DEPRECATED_FOR(gimp_item_get_image)
-G_GNUC_INTERNAL gint32 _gimp_item_get_image        (gint32              item_ID);
-gboolean               gimp_item_delete            (gint32              item_ID);
-gboolean               gimp_item_is_drawable       (gint32              item_ID);
-gboolean               gimp_item_is_layer          (gint32              item_ID);
-gboolean               gimp_item_is_text_layer     (gint32              item_ID);
-gboolean               gimp_item_is_channel        (gint32              item_ID);
-gboolean               gimp_item_is_layer_mask     (gint32              item_ID);
-gboolean               gimp_item_is_selection      (gint32              item_ID);
-gboolean               gimp_item_is_vectors        (gint32              item_ID);
-gboolean               gimp_item_is_group          (gint32              item_ID);
-gint32                 gimp_item_get_parent        (gint32              item_ID);
-gint*                  gimp_item_get_children      (gint32              item_ID,
-                                                    gint               *num_children);
-gboolean               gimp_item_get_expanded      (gint32              item_ID);
-gboolean               gimp_item_set_expanded      (gint32              item_ID,
-                                                    gboolean            expanded);
-gchar*                 gimp_item_get_name          (gint32              item_ID);
-gboolean               gimp_item_set_name          (gint32              item_ID,
-                                                    const gchar        *name);
-gboolean               gimp_item_get_visible       (gint32              item_ID);
-gboolean               gimp_item_set_visible       (gint32              item_ID,
-                                                    gboolean            visible);
-gboolean               gimp_item_get_linked        (gint32              item_ID);
-gboolean               gimp_item_set_linked        (gint32              item_ID,
-                                                    gboolean            linked);
-gboolean               gimp_item_get_lock_content  (gint32              item_ID);
-gboolean               gimp_item_set_lock_content  (gint32              item_ID,
-                                                    gboolean            lock_content);
-gboolean               gimp_item_get_lock_position (gint32              item_ID);
-gboolean               gimp_item_set_lock_position (gint32              item_ID,
-                                                    gboolean            lock_position);
-GimpColorTag           gimp_item_get_color_tag     (gint32              item_ID);
-gboolean               gimp_item_set_color_tag     (gint32              item_ID,
-                                                    GimpColorTag        color_tag);
-guint                  gimp_item_get_tattoo        (gint32              item_ID);
-gboolean               gimp_item_set_tattoo        (gint32              item_ID,
-                                                    guint               tattoo);
-gboolean               gimp_item_attach_parasite   (gint32              item_ID,
-                                                    const GimpParasite *parasite);
-gboolean               gimp_item_detach_parasite   (gint32              item_ID,
-                                                    const gchar        *name);
-GimpParasite*          gimp_item_get_parasite      (gint32              item_ID,
-                                                    const gchar        *name);
-gchar**                gimp_item_get_parasite_list (gint32              item_ID,
-                                                    gint               *num_parasites);
+gboolean      gimp_item_is_valid          (gint32              item_ID);
+gboolean      gimp_item_delete            (gint32              item_ID);
+gboolean      gimp_item_is_drawable       (gint32              item_ID);
+gboolean      gimp_item_is_layer          (gint32              item_ID);
+gboolean      gimp_item_is_text_layer     (gint32              item_ID);
+gboolean      gimp_item_is_channel        (gint32              item_ID);
+gboolean      gimp_item_is_layer_mask     (gint32              item_ID);
+gboolean      gimp_item_is_selection      (gint32              item_ID);
+gboolean      gimp_item_is_vectors        (gint32              item_ID);
+gboolean      gimp_item_is_group          (gint32              item_ID);
+gint32        gimp_item_get_parent        (gint32              item_ID);
+gint*         gimp_item_get_children      (gint32              item_ID,
+                                           gint               *num_children);
+gboolean      gimp_item_get_expanded      (gint32              item_ID);
+gboolean      gimp_item_set_expanded      (gint32              item_ID,
+                                           gboolean            expanded);
+gchar*        gimp_item_get_name          (gint32              item_ID);
+gboolean      gimp_item_set_name          (gint32              item_ID,
+                                           const gchar        *name);
+gboolean      gimp_item_get_visible       (gint32              item_ID);
+gboolean      gimp_item_set_visible       (gint32              item_ID,
+                                           gboolean            visible);
+gboolean      gimp_item_get_linked        (gint32              item_ID);
+gboolean      gimp_item_set_linked        (gint32              item_ID,
+                                           gboolean            linked);
+gboolean      gimp_item_get_lock_content  (gint32              item_ID);
+gboolean      gimp_item_set_lock_content  (gint32              item_ID,
+                                           gboolean            lock_content);
+gboolean      gimp_item_get_lock_position (gint32              item_ID);
+gboolean      gimp_item_set_lock_position (gint32              item_ID,
+                                           gboolean            lock_position);
+GimpColorTag  gimp_item_get_color_tag     (gint32              item_ID);
+gboolean      gimp_item_set_color_tag     (gint32              item_ID,
+                                           GimpColorTag        color_tag);
+guint         gimp_item_get_tattoo        (gint32              item_ID);
+gboolean      gimp_item_set_tattoo        (gint32              item_ID,
+                                           guint               tattoo);
+gboolean      gimp_item_attach_parasite   (gint32              item_ID,
+                                           const GimpParasite *parasite);
+gboolean      gimp_item_detach_parasite   (gint32              item_ID,
+                                           const gchar        *name);
+GimpParasite* gimp_item_get_parasite      (gint32              item_ID,
+                                           const gchar        *name);
+gchar**       gimp_item_get_parasite_list (gint32              item_ID,
+                                           gint               *num_parasites);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+GimpImage* gimp_item_get_image (gint32 item_ID);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_item_get_image _gimp_item_get_image
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32 _gimp_item_get_image (gint32 item_ID);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpitemtransform_pdb.h b/libgimp/gimpitemtransform_pdb.h
index 18cb9edd9d..0d89bf58c2 100644
--- a/libgimp/gimpitemtransform_pdb.h
+++ b/libgimp/gimpitemtransform_pdb.h
@@ -90,6 +90,22 @@ gint32 gimp_item_transform_matrix        (gint32              item_ID,
                                           gdouble             coeff_2_1,
                                           gdouble             coeff_2_2);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimplayer_pdb.h b/libgimp/gimplayer_pdb.h
index aad5f578fd..453b6f177f 100644
--- a/libgimp/gimplayer_pdb.h
+++ b/libgimp/gimplayer_pdb.h
@@ -32,89 +32,103 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-G_GNUC_INTERNAL gint32 _gimp_layer_new                 (GimpImage              *image,
-                                                        gint                    width,
-                                                        gint                    height,
-                                                        GimpImageType           type,
-                                                        const gchar            *name,
-                                                        gdouble                 opacity,
-                                                        GimpLayerMode           mode);
-GIMP_DEPRECATED_FOR(_gimp_layer_new)
-G_GNUC_INTERNAL gint32 __gimp_layer_new                (gint32                  image_ID,
-                                                        gint                    width,
-                                                        gint                    height,
-                                                        GimpImageType           type,
-                                                        const gchar            *name,
-                                                        gdouble                 opacity,
-                                                        GimpLayerMode           mode);
-gint32                 gimp_layer_new_from_visible     (GimpImage              *image,
-                                                        GimpImage              *dest_image,
-                                                        const gchar            *name);
-GIMP_DEPRECATED_FOR(gimp_layer_new_from_visible)
-G_GNUC_INTERNAL gint32 _gimp_layer_new_from_visible    (gint32                  image_ID,
-                                                        gint32                  dest_image_ID,
-                                                        const gchar            *name);
-gint32                 gimp_layer_new_from_drawable    (gint32                  drawable_ID,
-                                                        GimpImage              *dest_image);
-GIMP_DEPRECATED_FOR(gimp_layer_new_from_drawable)
-G_GNUC_INTERNAL gint32 _gimp_layer_new_from_drawable   (gint32                  drawable_ID,
-                                                        gint32                  dest_image_ID);
-gint32                 gimp_layer_group_new            (GimpImage              *image);
-GIMP_DEPRECATED_FOR(gimp_layer_group_new)
-G_GNUC_INTERNAL gint32 _gimp_layer_group_new           (gint32                  image_ID);
-G_GNUC_INTERNAL gint32 _gimp_layer_copy                (gint32                  layer_ID,
-                                                        gboolean                add_alpha);
-gboolean               gimp_layer_add_alpha            (gint32                  layer_ID);
-gboolean               gimp_layer_flatten              (gint32                  layer_ID);
-gboolean               gimp_layer_scale                (gint32                  layer_ID,
-                                                        gint                    new_width,
-                                                        gint                    new_height,
-                                                        gboolean                local_origin);
-gboolean               gimp_layer_resize               (gint32                  layer_ID,
-                                                        gint                    new_width,
-                                                        gint                    new_height,
-                                                        gint                    offx,
-                                                        gint                    offy);
-gboolean               gimp_layer_resize_to_image_size (gint32                  layer_ID);
-gboolean               gimp_layer_set_offsets          (gint32                  layer_ID,
-                                                        gint                    offx,
-                                                        gint                    offy);
-gint32                 gimp_layer_create_mask          (gint32                  layer_ID,
-                                                        GimpAddMaskType         mask_type);
-gint32                 gimp_layer_get_mask             (gint32                  layer_ID);
-gint32                 gimp_layer_from_mask            (gint32                  mask_ID);
-gboolean               gimp_layer_add_mask             (gint32                  layer_ID,
-                                                        gint32                  mask_ID);
-gboolean               gimp_layer_remove_mask          (gint32                  layer_ID,
-                                                        GimpMaskApplyMode       mode);
-gboolean               gimp_layer_is_floating_sel      (gint32                  layer_ID);
-gboolean               gimp_layer_get_lock_alpha       (gint32                  layer_ID);
-gboolean               gimp_layer_set_lock_alpha       (gint32                  layer_ID,
-                                                        gboolean                lock_alpha);
-gboolean               gimp_layer_get_apply_mask       (gint32                  layer_ID);
-gboolean               gimp_layer_set_apply_mask       (gint32                  layer_ID,
-                                                        gboolean                apply_mask);
-gboolean               gimp_layer_get_show_mask        (gint32                  layer_ID);
-gboolean               gimp_layer_set_show_mask        (gint32                  layer_ID,
-                                                        gboolean                show_mask);
-gboolean               gimp_layer_get_edit_mask        (gint32                  layer_ID);
-gboolean               gimp_layer_set_edit_mask        (gint32                  layer_ID,
-                                                        gboolean                edit_mask);
-gdouble                gimp_layer_get_opacity          (gint32                  layer_ID);
-gboolean               gimp_layer_set_opacity          (gint32                  layer_ID,
-                                                        gdouble                 opacity);
-GimpLayerMode          gimp_layer_get_mode             (gint32                  layer_ID);
-gboolean               gimp_layer_set_mode             (gint32                  layer_ID,
-                                                        GimpLayerMode           mode);
-GimpLayerColorSpace    gimp_layer_get_blend_space      (gint32                  layer_ID);
-gboolean               gimp_layer_set_blend_space      (gint32                  layer_ID,
-                                                        GimpLayerColorSpace     blend_space);
-GimpLayerColorSpace    gimp_layer_get_composite_space  (gint32                  layer_ID);
-gboolean               gimp_layer_set_composite_space  (gint32                  layer_ID,
-                                                        GimpLayerColorSpace     composite_space);
-GimpLayerCompositeMode gimp_layer_get_composite_mode   (gint32                  layer_ID);
-gboolean               gimp_layer_set_composite_mode   (gint32                  layer_ID,
-                                                        GimpLayerCompositeMode  composite_mode);
+G_GNUC_INTERNAL gint32 _gimp_layer_copy                (gint32                 layer_ID,
+                                                        gboolean               add_alpha);
+gboolean               gimp_layer_add_alpha            (gint32                 layer_ID);
+gboolean               gimp_layer_flatten              (gint32                 layer_ID);
+gboolean               gimp_layer_scale                (gint32                 layer_ID,
+                                                        gint                   new_width,
+                                                        gint                   new_height,
+                                                        gboolean               local_origin);
+gboolean               gimp_layer_resize               (gint32                 layer_ID,
+                                                        gint                   new_width,
+                                                        gint                   new_height,
+                                                        gint                   offx,
+                                                        gint                   offy);
+gboolean               gimp_layer_resize_to_image_size (gint32                 layer_ID);
+gboolean               gimp_layer_set_offsets          (gint32                 layer_ID,
+                                                        gint                   offx,
+                                                        gint                   offy);
+gint32                 gimp_layer_create_mask          (gint32                 layer_ID,
+                                                        GimpAddMaskType        mask_type);
+gint32                 gimp_layer_get_mask             (gint32                 layer_ID);
+gint32                 gimp_layer_from_mask            (gint32                 mask_ID);
+gboolean               gimp_layer_add_mask             (gint32                 layer_ID,
+                                                        gint32                 mask_ID);
+gboolean               gimp_layer_remove_mask          (gint32                 layer_ID,
+                                                        GimpMaskApplyMode      mode);
+gboolean               gimp_layer_is_floating_sel      (gint32                 layer_ID);
+gboolean               gimp_layer_get_lock_alpha       (gint32                 layer_ID);
+gboolean               gimp_layer_set_lock_alpha       (gint32                 layer_ID,
+                                                        gboolean               lock_alpha);
+gboolean               gimp_layer_get_apply_mask       (gint32                 layer_ID);
+gboolean               gimp_layer_set_apply_mask       (gint32                 layer_ID,
+                                                        gboolean               apply_mask);
+gboolean               gimp_layer_get_show_mask        (gint32                 layer_ID);
+gboolean               gimp_layer_set_show_mask        (gint32                 layer_ID,
+                                                        gboolean               show_mask);
+gboolean               gimp_layer_get_edit_mask        (gint32                 layer_ID);
+gboolean               gimp_layer_set_edit_mask        (gint32                 layer_ID,
+                                                        gboolean               edit_mask);
+gdouble                gimp_layer_get_opacity          (gint32                 layer_ID);
+gboolean               gimp_layer_set_opacity          (gint32                 layer_ID,
+                                                        gdouble                opacity);
+GimpLayerMode          gimp_layer_get_mode             (gint32                 layer_ID);
+gboolean               gimp_layer_set_mode             (gint32                 layer_ID,
+                                                        GimpLayerMode          mode);
+GimpLayerColorSpace    gimp_layer_get_blend_space      (gint32                 layer_ID);
+gboolean               gimp_layer_set_blend_space      (gint32                 layer_ID,
+                                                        GimpLayerColorSpace    blend_space);
+GimpLayerColorSpace    gimp_layer_get_composite_space  (gint32                 layer_ID);
+gboolean               gimp_layer_set_composite_space  (gint32                 layer_ID,
+                                                        GimpLayerColorSpace    composite_space);
+GimpLayerCompositeMode gimp_layer_get_composite_mode   (gint32                 layer_ID);
+gboolean               gimp_layer_set_composite_mode   (gint32                 layer_ID,
+                                                        GimpLayerCompositeMode composite_mode);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+G_GNUC_INTERNAL gint32 _gimp_layer_new              (GimpImage     *image,
+                                                     gint           width,
+                                                     gint           height,
+                                                     GimpImageType  type,
+                                                     const gchar   *name,
+                                                     gdouble        opacity,
+                                                     GimpLayerMode  mode);
+gint32                 gimp_layer_new_from_visible  (GimpImage     *image,
+                                                     GimpImage     *dest_image,
+                                                     const gchar   *name);
+gint32                 gimp_layer_new_from_drawable (gint32         drawable_ID,
+                                                     GimpImage     *dest_image);
+gint32                 gimp_layer_group_new         (GimpImage     *image);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define _gimp_layer_new __gimp_layer_new
+#define gimp_layer_new_from_visible _gimp_layer_new_from_visible
+#define gimp_layer_new_from_drawable _gimp_layer_new_from_drawable
+#define gimp_layer_group_new _gimp_layer_group_new
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32 __gimp_layer_new              (gint32         image_ID,
+                                      gint           width,
+                                      gint           height,
+                                      GimpImageType  type,
+                                      const gchar   *name,
+                                      gdouble        opacity,
+                                      GimpLayerMode  mode);
+gint32 _gimp_layer_new_from_visible  (gint32         image_ID,
+                                      gint32         dest_image_ID,
+                                      const gchar   *name);
+gint32 _gimp_layer_new_from_drawable (gint32         drawable_ID,
+                                      gint32         dest_image_ID);
+gint32 _gimp_layer_group_new         (gint32         image_ID);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpmessage_pdb.h b/libgimp/gimpmessage_pdb.h
index a23fe59ce1..eec8adc71b 100644
--- a/libgimp/gimpmessage_pdb.h
+++ b/libgimp/gimpmessage_pdb.h
@@ -36,6 +36,22 @@ gboolean               gimp_message             (const gchar            *message
 GimpMessageHandlerType gimp_message_get_handler (void);
 gboolean               gimp_message_set_handler (GimpMessageHandlerType  handler);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimppainttools_pdb.h b/libgimp/gimppainttools_pdb.h
index 3782fbd605..b2c1d9b17b 100644
--- a/libgimp/gimppainttools_pdb.h
+++ b/libgimp/gimppainttools_pdb.h
@@ -103,6 +103,22 @@ gboolean gimp_smudge_default     (gint32                    drawable_ID,
                                   gint                      num_strokes,
                                   const gdouble            *strokes);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimppalette_pdb.h b/libgimp/gimppalette_pdb.h
index d9dd379e29..093dc5b296 100644
--- a/libgimp/gimppalette_pdb.h
+++ b/libgimp/gimppalette_pdb.h
@@ -64,6 +64,22 @@ gboolean gimp_palette_entry_set_name  (const gchar    *name,
                                        gint            entry_num,
                                        const gchar    *entry_name);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimppalettes_pdb.h b/libgimp/gimppalettes_pdb.h
index 3b65fe22c5..f1ad8fd214 100644
--- a/libgimp/gimppalettes_pdb.h
+++ b/libgimp/gimppalettes_pdb.h
@@ -36,6 +36,22 @@ gboolean gimp_palettes_refresh  (void);
 gchar**  gimp_palettes_get_list (const gchar *filter,
                                  gint        *num_palettes);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimppaletteselect_pdb.h b/libgimp/gimppaletteselect_pdb.h
index 221ec4b7b3..129f68fc22 100644
--- a/libgimp/gimppaletteselect_pdb.h
+++ b/libgimp/gimppaletteselect_pdb.h
@@ -39,6 +39,22 @@ gboolean gimp_palettes_close_popup (const gchar *palette_callback);
 gboolean gimp_palettes_set_popup   (const gchar *palette_callback,
                                     const gchar *palette_name);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimppattern_pdb.h b/libgimp/gimppattern_pdb.h
index 71457982c0..20ff52fc8e 100644
--- a/libgimp/gimppattern_pdb.h
+++ b/libgimp/gimppattern_pdb.h
@@ -43,6 +43,22 @@ gboolean gimp_pattern_get_pixels (const gchar  *name,
                                   gint         *num_color_bytes,
                                   guint8      **color_bytes);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimppatterns_pdb.h b/libgimp/gimppatterns_pdb.h
index 066d460e3e..4af62fe321 100644
--- a/libgimp/gimppatterns_pdb.h
+++ b/libgimp/gimppatterns_pdb.h
@@ -36,6 +36,22 @@ gboolean gimp_patterns_refresh  (void);
 gchar**  gimp_patterns_get_list (const gchar *filter,
                                  gint        *num_patterns);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimppatternselect_pdb.h b/libgimp/gimppatternselect_pdb.h
index 50a04287b4..7ccb2f42bc 100644
--- a/libgimp/gimppatternselect_pdb.h
+++ b/libgimp/gimppatternselect_pdb.h
@@ -39,6 +39,22 @@ gboolean gimp_patterns_close_popup (const gchar *pattern_callback);
 gboolean gimp_patterns_set_popup   (const gchar *pattern_callback,
                                     const gchar *pattern_name);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimppdb_pdb.h b/libgimp/gimppdb_pdb.h
index 78e1b8cf20..68f07caa21 100644
--- a/libgimp/gimppdb_pdb.h
+++ b/libgimp/gimppdb_pdb.h
@@ -65,6 +65,22 @@ G_GNUC_INTERNAL gboolean    _gimp_pdb_set_data          (const gchar       *iden
                                                          gint               bytes,
                                                          const guint8      *data);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpplugin_pdb.h b/libgimp/gimpplugin_pdb.h
index 1d515a9f02..324112b02a 100644
--- a/libgimp/gimpplugin_pdb.h
+++ b/libgimp/gimpplugin_pdb.h
@@ -47,6 +47,22 @@ G_GNUC_INTERNAL gboolean            _gimp_plugin_icon_register         (const gc
 G_GNUC_INTERNAL gboolean            _gimp_plugin_set_pdb_error_handler (GimpPDBErrorHandler  handler);
 G_GNUC_INTERNAL GimpPDBErrorHandler _gimp_plugin_get_pdb_error_handler (void);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpprogress_pdb.h b/libgimp/gimpprogress_pdb.h
index 010533aeda..c06908f64a 100644
--- a/libgimp/gimpprogress_pdb.h
+++ b/libgimp/gimpprogress_pdb.h
@@ -43,6 +43,22 @@ G_GNUC_INTERNAL gboolean _gimp_progress_install          (const gchar *progress_
 G_GNUC_INTERNAL gboolean _gimp_progress_uninstall        (const gchar *progress_callback);
 gboolean                 gimp_progress_cancel            (const gchar *progress_callback);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpselection_pdb.h b/libgimp/gimpselection_pdb.h
index c42ac1cbaa..387952d365 100644
--- a/libgimp/gimpselection_pdb.h
+++ b/libgimp/gimpselection_pdb.h
@@ -32,77 +32,91 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gboolean                 gimp_selection_bounds     (GimpImage *image,
-                                                    gboolean  *non_empty,
-                                                    gint      *x1,
-                                                    gint      *y1,
-                                                    gint      *x2,
-                                                    gint      *y2);
-GIMP_DEPRECATED_FOR(gimp_selection_bounds)
-G_GNUC_INTERNAL gboolean _gimp_selection_bounds    (gint32     image_ID,
-                                                    gboolean  *non_empty,
-                                                    gint      *x1,
-                                                    gint      *y1,
-                                                    gint      *x2,
-                                                    gint      *y2);
-gint                     gimp_selection_value      (GimpImage *image,
-                                                    gint       x,
-                                                    gint       y);
-GIMP_DEPRECATED_FOR(gimp_selection_value)
-G_GNUC_INTERNAL gint     _gimp_selection_value     (gint32     image_ID,
-                                                    gint       x,
-                                                    gint       y);
-gboolean                 gimp_selection_is_empty   (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_selection_is_empty)
-G_GNUC_INTERNAL gboolean _gimp_selection_is_empty  (gint32     image_ID);
-gboolean                 gimp_selection_translate  (GimpImage *image,
-                                                    gint       offx,
-                                                    gint       offy);
-GIMP_DEPRECATED_FOR(gimp_selection_translate)
-G_GNUC_INTERNAL gboolean _gimp_selection_translate (gint32     image_ID,
-                                                    gint       offx,
-                                                    gint       offy);
-G_GNUC_INTERNAL gint32   _gimp_selection_float     (gint32     drawable_ID,
-                                                    gint       offx,
-                                                    gint       offy);
-gboolean                 gimp_selection_invert     (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_selection_invert)
-G_GNUC_INTERNAL gboolean _gimp_selection_invert    (gint32     image_ID);
-gboolean                 gimp_selection_sharpen    (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_selection_sharpen)
-G_GNUC_INTERNAL gboolean _gimp_selection_sharpen   (gint32     image_ID);
-gboolean                 gimp_selection_all        (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_selection_all)
-G_GNUC_INTERNAL gboolean _gimp_selection_all       (gint32     image_ID);
-gboolean                 gimp_selection_none       (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_selection_none)
-G_GNUC_INTERNAL gboolean _gimp_selection_none      (gint32     image_ID);
-gboolean                 gimp_selection_feather    (GimpImage *image,
-                                                    gdouble    radius);
-GIMP_DEPRECATED_FOR(gimp_selection_feather)
-G_GNUC_INTERNAL gboolean _gimp_selection_feather   (gint32     image_ID,
-                                                    gdouble    radius);
-gboolean                 gimp_selection_border     (GimpImage *image,
-                                                    gint       radius);
-GIMP_DEPRECATED_FOR(gimp_selection_border)
-G_GNUC_INTERNAL gboolean _gimp_selection_border    (gint32     image_ID,
-                                                    gint       radius);
-gboolean                 gimp_selection_grow       (GimpImage *image,
-                                                    gint       steps);
-GIMP_DEPRECATED_FOR(gimp_selection_grow)
-G_GNUC_INTERNAL gboolean _gimp_selection_grow      (gint32     image_ID,
-                                                    gint       steps);
-gboolean                 gimp_selection_shrink     (GimpImage *image,
-                                                    gint       steps);
-GIMP_DEPRECATED_FOR(gimp_selection_shrink)
-G_GNUC_INTERNAL gboolean _gimp_selection_shrink    (gint32     image_ID,
-                                                    gint       steps);
-gboolean                 gimp_selection_flood      (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_selection_flood)
-G_GNUC_INTERNAL gboolean _gimp_selection_flood     (gint32     image_ID);
-gint32                   gimp_selection_save       (GimpImage *image);
-GIMP_DEPRECATED_FOR(gimp_selection_save)
-G_GNUC_INTERNAL gint32   _gimp_selection_save      (gint32     image_ID);
+G_GNUC_INTERNAL gint32 _gimp_selection_float (gint32 drawable_ID,
+                                              gint   offx,
+                                              gint   offy);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gboolean gimp_selection_bounds    (GimpImage *image,
+                                   gboolean  *non_empty,
+                                   gint      *x1,
+                                   gint      *y1,
+                                   gint      *x2,
+                                   gint      *y2);
+gint     gimp_selection_value     (GimpImage *image,
+                                   gint       x,
+                                   gint       y);
+gboolean gimp_selection_is_empty  (GimpImage *image);
+gboolean gimp_selection_translate (GimpImage *image,
+                                   gint       offx,
+                                   gint       offy);
+gboolean gimp_selection_invert    (GimpImage *image);
+gboolean gimp_selection_sharpen   (GimpImage *image);
+gboolean gimp_selection_all       (GimpImage *image);
+gboolean gimp_selection_none      (GimpImage *image);
+gboolean gimp_selection_feather   (GimpImage *image,
+                                   gdouble    radius);
+gboolean gimp_selection_border    (GimpImage *image,
+                                   gint       radius);
+gboolean gimp_selection_grow      (GimpImage *image,
+                                   gint       steps);
+gboolean gimp_selection_shrink    (GimpImage *image,
+                                   gint       steps);
+gboolean gimp_selection_flood     (GimpImage *image);
+gint32   gimp_selection_save      (GimpImage *image);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_selection_bounds _gimp_selection_bounds
+#define gimp_selection_value _gimp_selection_value
+#define gimp_selection_is_empty _gimp_selection_is_empty
+#define gimp_selection_translate _gimp_selection_translate
+#define gimp_selection_invert _gimp_selection_invert
+#define gimp_selection_sharpen _gimp_selection_sharpen
+#define gimp_selection_all _gimp_selection_all
+#define gimp_selection_none _gimp_selection_none
+#define gimp_selection_feather _gimp_selection_feather
+#define gimp_selection_border _gimp_selection_border
+#define gimp_selection_grow _gimp_selection_grow
+#define gimp_selection_shrink _gimp_selection_shrink
+#define gimp_selection_flood _gimp_selection_flood
+#define gimp_selection_save _gimp_selection_save
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gboolean _gimp_selection_bounds    (gint32    image_ID,
+                                    gboolean *non_empty,
+                                    gint     *x1,
+                                    gint     *y1,
+                                    gint     *x2,
+                                    gint     *y2);
+gint     _gimp_selection_value     (gint32    image_ID,
+                                    gint      x,
+                                    gint      y);
+gboolean _gimp_selection_is_empty  (gint32    image_ID);
+gboolean _gimp_selection_translate (gint32    image_ID,
+                                    gint      offx,
+                                    gint      offy);
+gboolean _gimp_selection_invert    (gint32    image_ID);
+gboolean _gimp_selection_sharpen   (gint32    image_ID);
+gboolean _gimp_selection_all       (gint32    image_ID);
+gboolean _gimp_selection_none      (gint32    image_ID);
+gboolean _gimp_selection_feather   (gint32    image_ID,
+                                    gdouble   radius);
+gboolean _gimp_selection_border    (gint32    image_ID,
+                                    gint      radius);
+gboolean _gimp_selection_grow      (gint32    image_ID,
+                                    gint      steps);
+gboolean _gimp_selection_shrink    (gint32    image_ID,
+                                    gint      steps);
+gboolean _gimp_selection_flood     (gint32    image_ID);
+gint32   _gimp_selection_save      (gint32    image_ID);
 
 
 G_END_DECLS
diff --git a/libgimp/gimptextlayer_pdb.h b/libgimp/gimptextlayer_pdb.h
index 2ef1b94d2a..d409cfca1c 100644
--- a/libgimp/gimptextlayer_pdb.h
+++ b/libgimp/gimptextlayer_pdb.h
@@ -32,63 +32,77 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gint32                 gimp_text_layer_new                (GimpImage             *image,
-                                                           const gchar           *text,
-                                                           const gchar           *fontname,
-                                                           gdouble                size,
-                                                           GimpUnit               unit);
-GIMP_DEPRECATED_FOR(gimp_text_layer_new)
-G_GNUC_INTERNAL gint32 _gimp_text_layer_new               (gint32                 image_ID,
-                                                           const gchar           *text,
-                                                           const gchar           *fontname,
-                                                           gdouble                size,
-                                                           GimpUnit               unit);
-gchar*                 gimp_text_layer_get_text           (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_text           (gint32                 layer_ID,
-                                                           const gchar           *text);
-gchar*                 gimp_text_layer_get_markup         (gint32                 layer_ID);
-gchar*                 gimp_text_layer_get_font           (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_font           (gint32                 layer_ID,
-                                                           const gchar           *font);
-gdouble                gimp_text_layer_get_font_size      (gint32                 layer_ID,
-                                                           GimpUnit              *unit);
-gboolean               gimp_text_layer_set_font_size      (gint32                 layer_ID,
-                                                           gdouble                font_size,
-                                                           GimpUnit               unit);
-gboolean               gimp_text_layer_get_antialias      (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_antialias      (gint32                 layer_ID,
-                                                           gboolean               antialias);
-GimpTextHintStyle      gimp_text_layer_get_hint_style     (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_hint_style     (gint32                 layer_ID,
-                                                           GimpTextHintStyle      style);
-gboolean               gimp_text_layer_get_kerning        (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_kerning        (gint32                 layer_ID,
-                                                           gboolean               kerning);
-gchar*                 gimp_text_layer_get_language       (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_language       (gint32                 layer_ID,
-                                                           const gchar           *language);
-GimpTextDirection      gimp_text_layer_get_base_direction (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_base_direction (gint32                 layer_ID,
-                                                           GimpTextDirection      direction);
-GimpTextJustification  gimp_text_layer_get_justification  (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_justification  (gint32                 layer_ID,
-                                                           GimpTextJustification  justify);
-gboolean               gimp_text_layer_get_color          (gint32                 layer_ID,
-                                                           GimpRGB               *color);
-gboolean               gimp_text_layer_set_color          (gint32                 layer_ID,
-                                                           const GimpRGB         *color);
-gdouble                gimp_text_layer_get_indent         (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_indent         (gint32                 layer_ID,
-                                                           gdouble                indent);
-gdouble                gimp_text_layer_get_line_spacing   (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_line_spacing   (gint32                 layer_ID,
-                                                           gdouble                line_spacing);
-gdouble                gimp_text_layer_get_letter_spacing (gint32                 layer_ID);
-gboolean               gimp_text_layer_set_letter_spacing (gint32                 layer_ID,
-                                                           gdouble                letter_spacing);
-gboolean               gimp_text_layer_resize             (gint32                 layer_ID,
-                                                           gdouble                width,
-                                                           gdouble                height);
+gchar*                gimp_text_layer_get_text           (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_text           (gint32                 layer_ID,
+                                                          const gchar           *text);
+gchar*                gimp_text_layer_get_markup         (gint32                 layer_ID);
+gchar*                gimp_text_layer_get_font           (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_font           (gint32                 layer_ID,
+                                                          const gchar           *font);
+gdouble               gimp_text_layer_get_font_size      (gint32                 layer_ID,
+                                                          GimpUnit              *unit);
+gboolean              gimp_text_layer_set_font_size      (gint32                 layer_ID,
+                                                          gdouble                font_size,
+                                                          GimpUnit               unit);
+gboolean              gimp_text_layer_get_antialias      (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_antialias      (gint32                 layer_ID,
+                                                          gboolean               antialias);
+GimpTextHintStyle     gimp_text_layer_get_hint_style     (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_hint_style     (gint32                 layer_ID,
+                                                          GimpTextHintStyle      style);
+gboolean              gimp_text_layer_get_kerning        (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_kerning        (gint32                 layer_ID,
+                                                          gboolean               kerning);
+gchar*                gimp_text_layer_get_language       (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_language       (gint32                 layer_ID,
+                                                          const gchar           *language);
+GimpTextDirection     gimp_text_layer_get_base_direction (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_base_direction (gint32                 layer_ID,
+                                                          GimpTextDirection      direction);
+GimpTextJustification gimp_text_layer_get_justification  (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_justification  (gint32                 layer_ID,
+                                                          GimpTextJustification  justify);
+gboolean              gimp_text_layer_get_color          (gint32                 layer_ID,
+                                                          GimpRGB               *color);
+gboolean              gimp_text_layer_set_color          (gint32                 layer_ID,
+                                                          const GimpRGB         *color);
+gdouble               gimp_text_layer_get_indent         (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_indent         (gint32                 layer_ID,
+                                                          gdouble                indent);
+gdouble               gimp_text_layer_get_line_spacing   (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_line_spacing   (gint32                 layer_ID,
+                                                          gdouble                line_spacing);
+gdouble               gimp_text_layer_get_letter_spacing (gint32                 layer_ID);
+gboolean              gimp_text_layer_set_letter_spacing (gint32                 layer_ID,
+                                                          gdouble                letter_spacing);
+gboolean              gimp_text_layer_resize             (gint32                 layer_ID,
+                                                          gdouble                width,
+                                                          gdouble                height);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gint32 gimp_text_layer_new (GimpImage   *image,
+                            const gchar *text,
+                            const gchar *fontname,
+                            gdouble      size,
+                            GimpUnit     unit);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_text_layer_new _gimp_text_layer_new
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32 _gimp_text_layer_new (gint32       image_ID,
+                             const gchar *text,
+                             const gchar *fontname,
+                             gdouble      size,
+                             GimpUnit     unit);
 
 
 G_END_DECLS
diff --git a/libgimp/gimptexttool_pdb.h b/libgimp/gimptexttool_pdb.h
index 46a8fdc2ea..3d9b1c03b2 100644
--- a/libgimp/gimptexttool_pdb.h
+++ b/libgimp/gimptexttool_pdb.h
@@ -32,35 +32,49 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gint32                 gimp_text_fontname             (GimpImage    *image,
-                                                       gint32        drawable_ID,
-                                                       gdouble       x,
-                                                       gdouble       y,
-                                                       const gchar  *text,
-                                                       gint          border,
-                                                       gboolean      antialias,
-                                                       gdouble       size,
-                                                       GimpSizeType  size_type,
-                                                       const gchar  *fontname);
-GIMP_DEPRECATED_FOR(gimp_text_fontname)
-G_GNUC_INTERNAL gint32 _gimp_text_fontname            (gint32        image_ID,
-                                                       gint32        drawable_ID,
-                                                       gdouble       x,
-                                                       gdouble       y,
-                                                       const gchar  *text,
-                                                       gint          border,
-                                                       gboolean      antialias,
-                                                       gdouble       size,
-                                                       GimpSizeType  size_type,
-                                                       const gchar  *fontname);
-gboolean               gimp_text_get_extents_fontname (const gchar  *text,
-                                                       gdouble       size,
-                                                       GimpSizeType  size_type,
-                                                       const gchar  *fontname,
-                                                       gint         *width,
-                                                       gint         *height,
-                                                       gint         *ascent,
-                                                       gint         *descent);
+gboolean gimp_text_get_extents_fontname (const gchar  *text,
+                                         gdouble       size,
+                                         GimpSizeType  size_type,
+                                         const gchar  *fontname,
+                                         gint         *width,
+                                         gint         *height,
+                                         gint         *ascent,
+                                         gint         *descent);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gint32 gimp_text_fontname (GimpImage    *image,
+                           gint32        drawable_ID,
+                           gdouble       x,
+                           gdouble       y,
+                           const gchar  *text,
+                           gint          border,
+                           gboolean      antialias,
+                           gdouble       size,
+                           GimpSizeType  size_type,
+                           const gchar  *fontname);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_text_fontname _gimp_text_fontname
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32 _gimp_text_fontname (gint32        image_ID,
+                            gint32        drawable_ID,
+                            gdouble       x,
+                            gdouble       y,
+                            const gchar  *text,
+                            gint          border,
+                            gboolean      antialias,
+                            gdouble       size,
+                            GimpSizeType  size_type,
+                            const gchar  *fontname);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpunit_pdb.h b/libgimp/gimpunit_pdb.h
index 3481649149..c5f2cfd8a1 100644
--- a/libgimp/gimpunit_pdb.h
+++ b/libgimp/gimpunit_pdb.h
@@ -52,6 +52,22 @@ G_GNUC_INTERNAL gchar*   _gimp_unit_get_abbreviation             (GimpUnit     u
 G_GNUC_INTERNAL gchar*   _gimp_unit_get_singular                 (GimpUnit     unit_id);
 G_GNUC_INTERNAL gchar*   _gimp_unit_get_plural                   (GimpUnit     unit_id);
 
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+
+
 
 G_END_DECLS
 
diff --git a/libgimp/gimpvectors_pdb.h b/libgimp/gimpvectors_pdb.h
index 18cfc9fc73..62126fc6cf 100644
--- a/libgimp/gimpvectors_pdb.h
+++ b/libgimp/gimpvectors_pdb.h
@@ -32,139 +32,153 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gint32                   gimp_vectors_new                       (GimpImage              *image,
-                                                                 const gchar            *name);
-GIMP_DEPRECATED_FOR(gimp_vectors_new)
-G_GNUC_INTERNAL gint32   _gimp_vectors_new                      (gint32                  image_ID,
-                                                                 const gchar            *name);
-gint32                   gimp_vectors_new_from_text_layer       (GimpImage              *image,
-                                                                 gint32                  layer_ID);
-GIMP_DEPRECATED_FOR(gimp_vectors_new_from_text_layer)
-G_GNUC_INTERNAL gint32   _gimp_vectors_new_from_text_layer      (gint32                  image_ID,
-                                                                 gint32                  layer_ID);
-gint32                   gimp_vectors_copy                      (gint32                  vectors_ID);
-gint*                    gimp_vectors_get_strokes               (gint32                  vectors_ID,
-                                                                 gint                   *num_strokes);
-gdouble                  gimp_vectors_stroke_get_length         (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gdouble                 precision);
-gboolean                 gimp_vectors_stroke_get_point_at_dist  (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gdouble                 dist,
-                                                                 gdouble                 precision,
-                                                                 gdouble                *x_point,
-                                                                 gdouble                *y_point,
-                                                                 gdouble                *slope,
-                                                                 gboolean               *valid);
-gboolean                 gimp_vectors_remove_stroke             (gint32                  vectors_ID,
-                                                                 gint                    stroke_id);
-gboolean                 gimp_vectors_stroke_close              (gint32                  vectors_ID,
-                                                                 gint                    stroke_id);
-gboolean                 gimp_vectors_stroke_translate          (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gint                    off_x,
-                                                                 gint                    off_y);
-gboolean                 gimp_vectors_stroke_scale              (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gdouble                 scale_x,
-                                                                 gdouble                 scale_y);
-gboolean                 gimp_vectors_stroke_rotate             (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gdouble                 center_x,
-                                                                 gdouble                 center_y,
-                                                                 gdouble                 angle);
-gboolean                 gimp_vectors_stroke_flip               (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 GimpOrientationType     flip_type,
-                                                                 gdouble                 axis);
-gboolean                 gimp_vectors_stroke_flip_free          (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gdouble                 x1,
-                                                                 gdouble                 y1,
-                                                                 gdouble                 x2,
-                                                                 gdouble                 y2);
-GimpVectorsStrokeType    gimp_vectors_stroke_get_points         (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gint                   *num_points,
-                                                                 gdouble               **controlpoints,
-                                                                 gboolean               *closed);
-gint                     gimp_vectors_stroke_new_from_points    (gint32                  vectors_ID,
-                                                                 GimpVectorsStrokeType   type,
-                                                                 gint                    num_points,
-                                                                 const gdouble          *controlpoints,
-                                                                 gboolean                closed);
-gdouble*                 gimp_vectors_stroke_interpolate        (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gdouble                 precision,
-                                                                 gint                   *num_coords,
-                                                                 gboolean               *closed);
-gint                     gimp_vectors_bezier_stroke_new_moveto  (gint32                  vectors_ID,
-                                                                 gdouble                 x0,
-                                                                 gdouble                 y0);
-gboolean                 gimp_vectors_bezier_stroke_lineto      (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gdouble                 x0,
-                                                                 gdouble                 y0);
-gboolean                 gimp_vectors_bezier_stroke_conicto     (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gdouble                 x0,
-                                                                 gdouble                 y0,
-                                                                 gdouble                 x1,
-                                                                 gdouble                 y1);
-gboolean                 gimp_vectors_bezier_stroke_cubicto     (gint32                  vectors_ID,
-                                                                 gint                    stroke_id,
-                                                                 gdouble                 x0,
-                                                                 gdouble                 y0,
-                                                                 gdouble                 x1,
-                                                                 gdouble                 y1,
-                                                                 gdouble                 x2,
-                                                                 gdouble                 y2);
-gint                     gimp_vectors_bezier_stroke_new_ellipse (gint32                  vectors_ID,
-                                                                 gdouble                 x0,
-                                                                 gdouble                 y0,
-                                                                 gdouble                 radius_x,
-                                                                 gdouble                 radius_y,
-                                                                 gdouble                 angle);
-gboolean                 gimp_vectors_import_from_file          (GimpImage              *image,
-                                                                 const gchar            *filename,
-                                                                 gboolean                merge,
-                                                                 gboolean                scale,
-                                                                 gint                   *num_vectors,
-                                                                 gint                  **vectors_ids);
-GIMP_DEPRECATED_FOR(gimp_vectors_import_from_file)
-G_GNUC_INTERNAL gboolean _gimp_vectors_import_from_file         (gint32                  image_ID,
-                                                                 const gchar            *filename,
-                                                                 gboolean                merge,
-                                                                 gboolean                scale,
-                                                                 gint                   *num_vectors,
-                                                                 gint                  **vectors_ids);
-gboolean                 gimp_vectors_import_from_string        (GimpImage              *image,
-                                                                 const gchar            *string,
-                                                                 gint                    length,
-                                                                 gboolean                merge,
-                                                                 gboolean                scale,
-                                                                 gint                   *num_vectors,
-                                                                 gint                  **vectors_ids);
-GIMP_DEPRECATED_FOR(gimp_vectors_import_from_string)
-G_GNUC_INTERNAL gboolean _gimp_vectors_import_from_string       (gint32                  image_ID,
-                                                                 const gchar            *string,
-                                                                 gint                    length,
-                                                                 gboolean                merge,
-                                                                 gboolean                scale,
-                                                                 gint                   *num_vectors,
-                                                                 gint                  **vectors_ids);
-gboolean                 gimp_vectors_export_to_file            (GimpImage              *image,
-                                                                 const gchar            *filename,
-                                                                 gint32                  vectors_ID);
-GIMP_DEPRECATED_FOR(gimp_vectors_export_to_file)
-G_GNUC_INTERNAL gboolean _gimp_vectors_export_to_file           (gint32                  image_ID,
-                                                                 const gchar            *filename,
-                                                                 gint32                  vectors_ID);
-gchar*                   gimp_vectors_export_to_string          (GimpImage              *image,
-                                                                 gint32                  vectors_ID);
-GIMP_DEPRECATED_FOR(gimp_vectors_export_to_string)
-G_GNUC_INTERNAL gchar*   _gimp_vectors_export_to_string         (gint32                  image_ID,
-                                                                 gint32                  vectors_ID);
+gint32                gimp_vectors_copy                      (gint32                  vectors_ID);
+gint*                 gimp_vectors_get_strokes               (gint32                  vectors_ID,
+                                                              gint                   *num_strokes);
+gdouble               gimp_vectors_stroke_get_length         (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gdouble                 precision);
+gboolean              gimp_vectors_stroke_get_point_at_dist  (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gdouble                 dist,
+                                                              gdouble                 precision,
+                                                              gdouble                *x_point,
+                                                              gdouble                *y_point,
+                                                              gdouble                *slope,
+                                                              gboolean               *valid);
+gboolean              gimp_vectors_remove_stroke             (gint32                  vectors_ID,
+                                                              gint                    stroke_id);
+gboolean              gimp_vectors_stroke_close              (gint32                  vectors_ID,
+                                                              gint                    stroke_id);
+gboolean              gimp_vectors_stroke_translate          (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gint                    off_x,
+                                                              gint                    off_y);
+gboolean              gimp_vectors_stroke_scale              (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gdouble                 scale_x,
+                                                              gdouble                 scale_y);
+gboolean              gimp_vectors_stroke_rotate             (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gdouble                 center_x,
+                                                              gdouble                 center_y,
+                                                              gdouble                 angle);
+gboolean              gimp_vectors_stroke_flip               (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              GimpOrientationType     flip_type,
+                                                              gdouble                 axis);
+gboolean              gimp_vectors_stroke_flip_free          (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gdouble                 x1,
+                                                              gdouble                 y1,
+                                                              gdouble                 x2,
+                                                              gdouble                 y2);
+GimpVectorsStrokeType gimp_vectors_stroke_get_points         (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gint                   *num_points,
+                                                              gdouble               **controlpoints,
+                                                              gboolean               *closed);
+gint                  gimp_vectors_stroke_new_from_points    (gint32                  vectors_ID,
+                                                              GimpVectorsStrokeType   type,
+                                                              gint                    num_points,
+                                                              const gdouble          *controlpoints,
+                                                              gboolean                closed);
+gdouble*              gimp_vectors_stroke_interpolate        (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gdouble                 precision,
+                                                              gint                   *num_coords,
+                                                              gboolean               *closed);
+gint                  gimp_vectors_bezier_stroke_new_moveto  (gint32                  vectors_ID,
+                                                              gdouble                 x0,
+                                                              gdouble                 y0);
+gboolean              gimp_vectors_bezier_stroke_lineto      (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gdouble                 x0,
+                                                              gdouble                 y0);
+gboolean              gimp_vectors_bezier_stroke_conicto     (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gdouble                 x0,
+                                                              gdouble                 y0,
+                                                              gdouble                 x1,
+                                                              gdouble                 y1);
+gboolean              gimp_vectors_bezier_stroke_cubicto     (gint32                  vectors_ID,
+                                                              gint                    stroke_id,
+                                                              gdouble                 x0,
+                                                              gdouble                 y0,
+                                                              gdouble                 x1,
+                                                              gdouble                 y1,
+                                                              gdouble                 x2,
+                                                              gdouble                 y2);
+gint                  gimp_vectors_bezier_stroke_new_ellipse (gint32                  vectors_ID,
+                                                              gdouble                 x0,
+                                                              gdouble                 y0,
+                                                              gdouble                 radius_x,
+                                                              gdouble                 radius_y,
+                                                              gdouble                 angle);
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
+gint32   gimp_vectors_new                 (GimpImage    *image,
+                                           const gchar  *name);
+gint32   gimp_vectors_new_from_text_layer (GimpImage    *image,
+                                           gint32        layer_ID);
+gboolean gimp_vectors_import_from_file    (GimpImage    *image,
+                                           const gchar  *filename,
+                                           gboolean      merge,
+                                           gboolean      scale,
+                                           gint         *num_vectors,
+                                           gint        **vectors_ids);
+gboolean gimp_vectors_import_from_string  (GimpImage    *image,
+                                           const gchar  *string,
+                                           gint          length,
+                                           gboolean      merge,
+                                           gboolean      scale,
+                                           gint         *num_vectors,
+                                           gint        **vectors_ids);
+gboolean gimp_vectors_export_to_file      (GimpImage    *image,
+                                           const gchar  *filename,
+                                           gint32        vectors_ID);
+gchar*   gimp_vectors_export_to_string    (GimpImage    *image,
+                                           gint32        vectors_ID);
+
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+#define gimp_vectors_new _gimp_vectors_new
+#define gimp_vectors_new_from_text_layer _gimp_vectors_new_from_text_layer
+#define gimp_vectors_import_from_file _gimp_vectors_import_from_file
+#define gimp_vectors_import_from_string _gimp_vectors_import_from_string
+#define gimp_vectors_export_to_file _gimp_vectors_export_to_file
+#define gimp_vectors_export_to_string _gimp_vectors_export_to_string
+
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+gint32   _gimp_vectors_new                 (gint32        image_ID,
+                                            const gchar  *name);
+gint32   _gimp_vectors_new_from_text_layer (gint32        image_ID,
+                                            gint32        layer_ID);
+gboolean _gimp_vectors_import_from_file    (gint32        image_ID,
+                                            const gchar  *filename,
+                                            gboolean      merge,
+                                            gboolean      scale,
+                                            gint         *num_vectors,
+                                            gint        **vectors_ids);
+gboolean _gimp_vectors_import_from_string  (gint32        image_ID,
+                                            const gchar  *string,
+                                            gint          length,
+                                            gboolean      merge,
+                                            gboolean      scale,
+                                            gint         *num_vectors,
+                                            gint        **vectors_ids);
+gboolean _gimp_vectors_export_to_file      (gint32        image_ID,
+                                            const gchar  *filename,
+                                            gint32        vectors_ID);
+gchar*   _gimp_vectors_export_to_string    (gint32        image_ID,
+                                            gint32        vectors_ID);
 
 
 G_END_DECLS
diff --git a/pdb/lib.pl b/pdb/lib.pl
index c76b7c8c87..74efcbdb3e 100644
--- a/pdb/lib.pl
+++ b/pdb/lib.pl
@@ -46,7 +46,7 @@ sub desc_wrap {
 }
 
 sub generate_fun {
-    my ($proc, $out, $api_deprecated) = @_;
+    my ($proc, $out, $api_deprecated, $has_image_arg) = @_;
     my @inargs = @{$proc->{inargs}} if (defined $proc->{inargs});
     my @outargs = @{$proc->{outargs}} if (defined $proc->{outargs});
 
@@ -87,6 +87,7 @@ sub generate_fun {
 
     my $funcname = "gimp_$name";
     my $wrapped = "";
+    my $new_funcname = $funcname;
     my %usednames;
     my $retdesc = " * Returns:";
     my $func_annotations = "";
@@ -96,7 +97,8 @@ sub generate_fun {
     }
 
     if ($api_deprecated) {
-        push @{$out->{protos}}, "GIMP_DEPRECATED_FOR($wrapped$funcname)\n";
+        $new_funcname = "$wrapped$funcname";
+        #push @{$out->{protos_deprecated}}, "GIMP_DEPRECATED_FOR($new_funcname)\n";
         $func_annotations .= " (skip)";
     }
     elsif ($proc->{deprecated}) {
@@ -514,7 +516,17 @@ CODE
     my $proto = "$hrettype $wrapped$funcname ($arglist);\n";
     $proto =~ s/ +/ /g;
 
-    push @{$out->{protos}}, $proto;
+    if ($api_deprecated) {
+        my $define_dep = "#define $new_funcname $wrapped$funcname";
+        push @{$out->{protos_deprecated}}, $proto;
+        push @{$out->{defines_deprecated}}, $define_dep;
+    }
+    elsif (! $has_image_arg){
+        push @{$out->{protos_no_alt}}, $proto;
+    }
+    else {
+        push @{$out->{protos}}, $proto;
+    }
 
     my $clist = $arglist;
     my $padlen = length($wrapped) + length($funcname) + 2;
@@ -589,6 +601,113 @@ $arg_array
 CODE
 }
 
+sub generate_hbody {
+    my ($out, $extra, $protoname) = @_;
+
+    if (exists $extra->{${protoname}}) {
+        my $proto = "";
+        foreach (split(/\n/, $extra->{${protoname}})) {
+            next if /^\s*$/;
+
+            if (/^\t/ && length($proto)) {
+                s/\s+/ /g; s/ $//; s/^ /\t/;
+                $proto .= $_ . "\n";
+            }
+            else {
+                push @{$out->{${protoname}}}, $proto if length($proto);
+
+                s/\s+/ /g; s/^ //; s/ $//;
+                $proto = $_ . "\n";
+            }
+        }
+    }
+
+    my @longest = (0, 0, 0); my @arglist = (); my $seen = 0;
+    foreach (@{$out->{${protoname}}}) {
+        my $arglist;
+
+        if (!/^GIMP_DEPRECATED/) {
+            my $len;
+
+            $arglist = [ split(' ', $_, 3) ];
+
+            if ($arglist->[1] =~ /^_/ && $protoname ne 'protos_deprecated') {
+                $arglist->[0] = "G_GNUC_INTERNAL ".$arglist->[0];
+            }
+
+            for (0..1) {
+                $len = length($arglist->[$_]);
+                $longest[$_] = $len if $longest[$_] < $len;
+            }
+
+            foreach (split(/,/, $arglist->[2])) {
+                next unless /(const \w+) \S+/ || /(\w+) \S+/;
+                $len = length($1) + 1;
+                my $num = scalar @{[ /\*/g ]};
+                $seen = $num if $seen < $num;
+                $longest[2] = $len if $longest[2] < $len;
+            }
+        }
+        else {
+            $arglist = $_;
+        }
+
+        push @arglist, $arglist;
+    }
+
+    $longest[2] += $seen;
+
+    @{$out->{${protoname}}} = ();
+    foreach (@arglist) {
+        my $arg;
+
+        if (ref) {
+            my ($type, $func, $arglist) = @$_;
+
+            my @args = split(/,/, $arglist); $arglist = "";
+
+            foreach (@args) {
+                $space = rindex($_, ' ');
+                if ($space > 0 && substr($_, $space - 1, 1) eq ')') {
+                    $space = rindex($_, ' ', $space - 1)
+                }
+                my $len = $longest[2] - $space + 1;
+
+                $len -= scalar @{[ /\*/g ]};
+                $len++ if /\t/;
+
+                if ($space != -1 && $len > 1) {
+                    substr($_, $space, 1) = ' ' x $len;
+                }
+
+                $arglist .= $_;
+                $arglist .= "," if !/;\n$/;
+            }
+
+            $arg = $type;
+            $arg .= ' ' x ($longest[0] - length($type) + 1) . $func;
+            $arg .= ' ' x ($longest[1] - length($func) + 1) . $arglist;
+            $arg =~ s/\t/' ' x ($longest[0] + $longest[1] + 3)/eg;
+        }
+        else {
+            $arg = $_;
+        }
+
+        push @{$out->{${protoname}}}, $arg;
+    }
+
+    my $body = '';
+    $body = $extra->{decls} if exists $extra->{decls};
+    foreach (@{$out->{${protoname}}}) { $body .= $_ }
+    if ($out->{deprecated}) {
+        $body .= "#endif /* GIMP_DISABLE_DEPRECATED */\n";
+    }
+    chomp $body;
+
+    return $body;
+}
+
+
 sub generate {
     my @procs = @{(shift)};
     my %out;
@@ -620,9 +739,9 @@ sub generate {
                 }
             }
         }
-        $out->{code} .= generate_fun($proc, $out, 0);
+        $out->{code} .= generate_fun($proc, $out, 0, $has_image_arg);
         if ($has_image_arg) {
-            $out->{code} .= generate_fun($proc, $out, 1);
+            $out->{code} .= generate_fun($proc, $out, 1, $has_image_arg);
         }
     }
 
@@ -666,111 +785,22 @@ LGPL
         $cname =~ s/_//g; $cname =~ s/pdb\./_pdb./;
        my $hfile = "$builddir/$hname$FILE_EXT";
        my $cfile = "$builddir/$cname$FILE_EXT";
+        my $body;
+        my $body_deprecated;
+        my $body_no_alt;
+        my $defines_deprecated = '';
 
        my $extra = {};
        if (exists $main::grp{$group}->{extra}->{lib}) {
            $extra = $main::grp{$group}->{extra}->{lib}
        }
 
-       if (exists $extra->{protos}) {
-           my $proto = "";
-           foreach (split(/\n/, $extra->{protos})) {
-               next if /^\s*$/;
-
-               if (/^\t/ && length($proto)) {
-                   s/\s+/ /g; s/ $//; s/^ /\t/;
-                   $proto .= $_ . "\n";
-               }
-               else {
-                   push @{$out->{protos}}, $proto if length($proto);
-
-                   s/\s+/ /g; s/^ //; s/ $//;
-                   $proto = $_ . "\n";
-               }
-           }
-       }
-
-       my @longest = (0, 0, 0); my @arglist = (); my $seen = 0;
-       foreach (@{$out->{protos}}) {
-           my $arglist;
-
-           if (!/^GIMP_DEPRECATED/) {
-               my $len;
-
-               $arglist = [ split(' ', $_, 3) ];
-
-               if ($arglist->[1] =~ /^_/) {
-                   $arglist->[0] = "G_GNUC_INTERNAL ".$arglist->[0];
-               }
-
-               for (0..1) {
-                   $len = length($arglist->[$_]);
-                   $longest[$_] = $len if $longest[$_] < $len;
-               }
-
-               foreach (split(/,/, $arglist->[2])) {
-                   next unless /(const \w+) \S+/ || /(\w+) \S+/;
-                   $len = length($1) + 1;
-                   my $num = scalar @{[ /\*/g ]};
-                   $seen = $num if $seen < $num;
-                   $longest[2] = $len if $longest[2] < $len;
-               }
-           }
-           else {
-               $arglist = $_;
-           }
-
-           push @arglist, $arglist;
-       }
-
-       $longest[2] += $seen;
-
-       @{$out->{protos}} = ();
-       foreach (@arglist) {
-           my $arg;
-
-           if (ref) {
-               my ($type, $func, $arglist) = @$_;
-
-               my @args = split(/,/, $arglist); $arglist = "";
-
-               foreach (@args) {
-                   $space = rindex($_, ' ');
-                    if ($space > 0 && substr($_, $space - 1, 1) eq ')') {
-                        $space = rindex($_, ' ', $space - 1)
-                    }
-                   my $len = $longest[2] - $space + 1;
-
-                   $len -= scalar @{[ /\*/g ]};
-                   $len++ if /\t/;
-
-                   if ($space != -1 && $len > 1) {
-                       substr($_, $space, 1) = ' ' x $len;
-                   }
-
-                   $arglist .= $_;
-                   $arglist .= "," if !/;\n$/;
-               }
-
-               $arg = $type;
-               $arg .= ' ' x ($longest[0] - length($type) + 1) . $func;
-               $arg .= ' ' x ($longest[1] - length($func) + 1) . $arglist;
-               $arg =~ s/\t/' ' x ($longest[0] + $longest[1] + 3)/eg;
-           }
-           else {
-               $arg = $_;
-           }
-
-           push @{$out->{protos}}, $arg;
-       }
-
-       my $body;
-       $body = $extra->{decls} if exists $extra->{decls};
-       foreach (@{$out->{protos}}) { $body .= $_ }
-        if ($out->{deprecated}) {
-           $body .= "#endif /* GIMP_DISABLE_DEPRECATED */\n";
-       }
-       chomp $body;
+        $body = generate_hbody($out, $extra, "protos");
+        $body_deprecated = generate_hbody($out, $extra, "protos_deprecated");
+        $body_no_alt = generate_hbody($out, $extra, "protos_no_alt");
+        foreach (@{$out->{defines_deprecated}}) {
+            $defines_deprecated .= "$_" . "\n";
+        }
 
        open HFILE, "> $hfile" or die "Can't open $hfile: $!\n";
         print HFILE $lgpl_top;
@@ -790,8 +820,24 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
+$body_no_alt
+
+#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
+
 $body
 
+#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+$defines_deprecated
+
+#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
+
+/* Below API are deprecated and should not be used by new plug-ins.
+ * They are not marked internal as a trick to keep the old API alive for now.
+ */
+
+$body_deprecated
+
 
 G_END_DECLS
 



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