summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-animation.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-04-04 04:50:39 +0000
committerEttore Perazzoli <ettore@src.gnome.org>2000-04-04 04:50:39 +0000
commite9c20fac4c6a90a51cf7d97095e6d4d58c70bd98 (patch)
treeb49e995c88ad0b1c416e2c21cc437f5b71c32057 /gdk-pixbuf/gdk-pixbuf-animation.c
parent133ab96180c20e1d5c1556ccd4418e1cbb41dd95 (diff)
downloadgtk+-e9c20fac4c6a90a51cf7d97095e6d4d58c70bd98.tar.gz
Added GdkPixbufAnimation accessor functions, so that we don't have to
access the struct members directly.
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-animation.c')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-animation.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c
index 3d853954d7..09e21c4593 100644
--- a/gdk-pixbuf/gdk-pixbuf-animation.c
+++ b/gdk-pixbuf/gdk-pixbuf-animation.c
@@ -162,3 +162,64 @@ gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation)
g_free (animation);
}
}
+
+/**
+ * gdk_pixbuf_animation_get_width:
+ * @animation: An animation.
+ *
+ * Return the width of @animation.
+ **/
+int
+gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation)
+{
+ g_return_val_if_fail (animation != NULL, 0);
+ g_return_val_if_fail (animation->ref_count > 0, 0);
+
+ return animation->width;
+}
+
+/**
+ * gdk_pixbuf_animation_get_height:
+ * @animation: An animation.
+ *
+ * Return the height of @animation.
+ **/
+int
+gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation)
+{
+ g_return_val_if_fail (animation != NULL, 0);
+ g_return_val_if_fail (animation->ref_count > 0, 0);
+
+ return animation->height;
+}
+
+/**
+ * gdk_pixbuf_animation_get_num_frames:
+ * @animation: An animation.
+ *
+ * Return the number of frames in @animation.
+ **/
+int
+gdk_pixbuf_animation_get_num_frames (GdkPixbufAnimation *animation)
+{
+ g_return_val_if_fail (animation != NULL, 0);
+ g_return_val_if_fail (animation->ref_count > 0, 0);
+
+ return animation->n_frames;
+}
+
+/**
+ * gdk_pixbuf_animation_get_frames:
+ * @animation: An animation.
+ *
+ * Return the frames of @animation as a list of
+ * GdkPixbufAnimationFrame objects.
+ **/
+GList *
+gdk_pixbuf_animation_get_frames (GdkPixbufAnimation *animation)
+{
+ g_return_val_if_fail (animation != NULL, 0);
+ g_return_val_if_fail (animation->ref_count > 0, 0);
+
+ return animation->frames;
+}