diff options
author | Alexander Larsson <alexl@redhat.com> | 2017-10-23 16:39:44 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2017-10-23 16:56:49 +0200 |
commit | 96b04836d81d855999abafdd6a2b7e0cdf0660cc (patch) | |
tree | eb1d46eb497c9db8fb7fa7426b55f4aded529a7b /gtk/gtkimagedefinition.c | |
parent | 3a8f2ae64f1f9a607c27511a7d6042cc995d14d4 (diff) | |
download | gtk+-96b04836d81d855999abafdd6a2b7e0cdf0660cc.tar.gz |
Drop all uses of GdkPixbufAnimation in the gtk APIs
These are basically animated gifs, and don't fit well in how
modern things animate.
Diffstat (limited to 'gtk/gtkimagedefinition.c')
-rw-r--r-- | gtk/gtkimagedefinition.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/gtk/gtkimagedefinition.c b/gtk/gtkimagedefinition.c index 4cef0d5ad0..f16006cb70 100644 --- a/gtk/gtkimagedefinition.c +++ b/gtk/gtkimagedefinition.c @@ -21,7 +21,6 @@ typedef struct _GtkImageDefinitionEmpty GtkImageDefinitionEmpty; typedef struct _GtkImageDefinitionStock GtkImageDefinitionStock; -typedef struct _GtkImageDefinitionAnimation GtkImageDefinitionAnimation; typedef struct _GtkImageDefinitionIconName GtkImageDefinitionIconName; typedef struct _GtkImageDefinitionGIcon GtkImageDefinitionGIcon; typedef struct _GtkImageDefinitionSurface GtkImageDefinitionSurface; @@ -38,14 +37,6 @@ struct _GtkImageDefinitionStock { char *id; }; -struct _GtkImageDefinitionAnimation { - GtkImageType type; - gint ref_count; - - GdkPixbufAnimation *animation; - int scale; -}; - struct _GtkImageDefinitionIconName { GtkImageType type; gint ref_count; @@ -72,7 +63,6 @@ union _GtkImageDefinition GtkImageType type; GtkImageDefinitionEmpty empty; GtkImageDefinitionStock stock; - GtkImageDefinitionAnimation animation; GtkImageDefinitionIconName icon_name; GtkImageDefinitionGIcon gicon; GtkImageDefinitionSurface surface; @@ -92,7 +82,6 @@ gtk_image_definition_alloc (GtkImageType type) static gsize sizes[] = { sizeof (GtkImageDefinitionEmpty), sizeof (GtkImageDefinitionStock), - sizeof (GtkImageDefinitionAnimation), sizeof (GtkImageDefinitionIconName), sizeof (GtkImageDefinitionGIcon), sizeof (GtkImageDefinitionSurface) @@ -109,22 +98,6 @@ gtk_image_definition_alloc (GtkImageType type) } GtkImageDefinition * -gtk_image_definition_new_animation (GdkPixbufAnimation *animation, - int scale) -{ - GtkImageDefinition *def; - - if (animation == NULL || scale <= 0) - return NULL; - - def = gtk_image_definition_alloc (GTK_IMAGE_ANIMATION); - def->animation.animation = g_object_ref (animation); - def->animation.scale = scale; - - return def; -} - -GtkImageDefinition * gtk_image_definition_new_icon_name (const char *icon_name) { GtkImageDefinition *def; @@ -188,9 +161,6 @@ gtk_image_definition_unref (GtkImageDefinition *def) case GTK_IMAGE_EMPTY: g_assert_not_reached (); break; - case GTK_IMAGE_ANIMATION: - g_object_unref (def->animation.animation); - break; case GTK_IMAGE_SURFACE: cairo_surface_destroy (def->surface.surface); break; @@ -223,20 +193,9 @@ gtk_image_definition_get_scale (const GtkImageDefinition *def) case GTK_IMAGE_ICON_NAME: case GTK_IMAGE_GICON: return 1; - case GTK_IMAGE_ANIMATION: - return def->animation.scale; } } -GdkPixbufAnimation * -gtk_image_definition_get_animation (const GtkImageDefinition *def) -{ - if (def->type != GTK_IMAGE_ANIMATION) - return NULL; - - return def->animation.animation; -} - const gchar * gtk_image_definition_get_icon_name (const GtkImageDefinition *def) { |