From 00b3afbcb8e2468ae431abf9aab3fbb292315f54 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 29 Jul 2019 18:30:37 +0100 Subject: Disable deprecation warnings for GTimeVal GLib 2.62 deprecated GTimeVal and GTime because they are not Y2038-safe. Since we expose these types in our public API, we need to disable warnings to avoid projects breaking horribly just by importing gdk-pixbuf.h. Sadly, GdkPixbufAnimation public types not only require GTimeVal in virtual function signatures for loaders, but they also do not have any room left in the class vtable for adding int64 variants. --- gdk-pixbuf/gdk-pixbuf-animation.c | 1 + gdk-pixbuf/gdk-pixbuf-animation.h | 9 +++++++++ 2 files changed, 10 insertions(+) (limited to 'gdk-pixbuf') diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c index 3c1111a13..66a037c20 100644 --- a/gdk-pixbuf/gdk-pixbuf-animation.c +++ b/gdk-pixbuf/gdk-pixbuf-animation.c @@ -21,6 +21,7 @@ */ #include "config.h" +#define GLIB_DISABLE_DEPRECATION_WARNINGS #include #include "gdk-pixbuf-private.h" #include "gdk-pixbuf-animation.h" diff --git a/gdk-pixbuf/gdk-pixbuf-animation.h b/gdk-pixbuf/gdk-pixbuf-animation.h index 8691709f5..0aa788d79 100644 --- a/gdk-pixbuf/gdk-pixbuf-animation.h +++ b/gdk-pixbuf/gdk-pixbuf-animation.h @@ -106,9 +106,12 @@ gboolean gdk_pixbuf_animation_is_static_image (GdkPixbufAnimation *a GDK_PIXBUF_AVAILABLE_IN_ALL GdkPixbuf *gdk_pixbuf_animation_get_static_image (GdkPixbufAnimation *animation); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GDK_PIXBUF_AVAILABLE_IN_ALL GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter (GdkPixbufAnimation *animation, const GTimeVal *start_time); +G_GNUC_END_IGNORE_DEPRECATIONS + GDK_PIXBUF_AVAILABLE_IN_ALL GType gdk_pixbuf_animation_iter_get_type (void) G_GNUC_CONST; GDK_PIXBUF_AVAILABLE_IN_ALL @@ -117,9 +120,11 @@ GDK_PIXBUF_AVAILABLE_IN_ALL GdkPixbuf *gdk_pixbuf_animation_iter_get_pixbuf (GdkPixbufAnimationIter *iter); GDK_PIXBUF_AVAILABLE_IN_ALL gboolean gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GDK_PIXBUF_AVAILABLE_IN_ALL gboolean gdk_pixbuf_animation_iter_advance (GdkPixbufAnimationIter *iter, const GTimeVal *current_time); +G_GNUC_END_IGNORE_DEPRECATIONS #ifdef GDK_PIXBUF_ENABLE_BACKEND @@ -150,6 +155,7 @@ struct _GdkPixbufAnimation { }; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS struct _GdkPixbufAnimationClass { GObjectClass parent_class; @@ -167,6 +173,7 @@ struct _GdkPixbufAnimationClass { const GTimeVal *start_time); }; +G_GNUC_END_IGNORE_DEPRECATIONS @@ -196,6 +203,7 @@ struct _GdkPixbufAnimationIter { }; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS struct _GdkPixbufAnimationIterClass { GObjectClass parent_class; @@ -210,6 +218,7 @@ struct _GdkPixbufAnimationIterClass { gboolean (*advance) (GdkPixbufAnimationIter *iter, const GTimeVal *current_time); }; +G_GNUC_END_IGNORE_DEPRECATIONS GDK_PIXBUF_AVAILABLE_IN_ALL -- cgit v1.2.1