Gtk.Image.new_from_animation
function new_from_animation(animation:GdkPixbuf.PixbufAnimation):Gtk.Widget {
// Gjs wrapper for gtk_image_new_from_animation()
}Creates a Gtk.Image displaying the given animation. The Gtk.Image does not assume a reference to the animation; you still need to unref it if you own references. Gtk.Image will add its own reference rather than adopting yours.
Note that the animation frames are shown using a timeout with #G_PRIORITY_DEFAULT. When using animations to indicate busyness, keep in mind that the animation will only be shown if the main loop is not busy with something that has a higher priority.
- animation
an animation
- Returns
a new Gtk.Image widget