libgimp: update non-generated API to allow old and new API.

Same as previous commit: by default the new API will be used. But if a
plug-in builds with GIMP_DEPRECATED_REPLACE_NEW_API macro, then the same
function names will call the old API with ids.
This commit is contained in:
Jehan 2019-08-13 00:42:10 +02:00
parent fec6034c7a
commit 09f0530dab
16 changed files with 1112 additions and 18 deletions

View file

@ -30,6 +30,8 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
GimpMetadata * gimp_image_metadata_load_prepare (GimpImage *image,
const gchar *mime_type,
GFile *file,
@ -54,7 +56,44 @@ gboolean gimp_image_metadata_save_finish (GimpImage *image,
/* this is experimental API, to be finished for 2.10 */
GimpImage * gimp_image_metadata_load_thumbnail (GFile *file,
GError **error);
GError **error);
#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
#define gimp_image_metadata_load_prepare gimp_image_metadata_load_prepare_deprecated
#define gimp_image_metadata_load_finish gimp_image_metadata_load_finish_deprecated
#define gimp_image_metadata_save_prepare gimp_image_metadata_save_prepare_deprecated
#define gimp_image_metadata_save_finish gimp_image_metadata_save_finish_deprecated
#define gimp_image_metadata_load_thumbnail gimp_image_metadata_load_thumbnail_deprecated
#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
GimpMetadata * gimp_image_metadata_load_prepare_deprecated (gint32 image_id,
const gchar *mime_type,
GFile *file,
GError **error);
void gimp_image_metadata_load_finish_deprecated (gint32 image_id,
const gchar *mime_type,
GimpMetadata *metadata,
GimpMetadataLoadFlags flags,
gboolean interactive);
GimpMetadata * gimp_image_metadata_save_prepare_deprecated (gint32 image_id,
const gchar *mime_type,
GimpMetadataSaveFlags *suggested_flags);
gboolean gimp_image_metadata_save_finish_deprecated (gint32 image_id,
const gchar *mime_type,
GimpMetadata *metadata,
GimpMetadataSaveFlags flags,
GFile *file,
GError **error);
/* this is experimental API, to be finished for 2.10 */
gint32 gimp_image_metadata_load_thumbnail_deprecated (GFile *file,
GError **error);
G_END_DECLS