mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Added GdkPixbufAnimation accessor functions, so that we don't have to
access the struct members directly.
This commit is contained in:
parent
133ab96180
commit
e9c20fac4c
@ -1,3 +1,11 @@
|
||||
2000-04-04 Ettore Perazzoli <ettore@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-animation.c
|
||||
(gdk_pixbuf_animation_get_width): New accessor function.
|
||||
(gdk_pixbuf_animation_get_height): New accessor function.
|
||||
(gdk_pixbuf_animation_get_num_frames): New accessor function.
|
||||
(gdk_pixbuf_animation_get_frames): New accessor function.
|
||||
|
||||
2000-04-01 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf.c: Reverted Mark's change. The refcount
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user