package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Pixbuf_animation

type t = [ `pixbuf_animation | `object_ ] Gobject.obj
val new_from_file : string -> (t, GError.t) result

Create a new PixbufAnimation

val new_from_resource : string -> (t, GError.t) result

Create a new PixbufAnimation

Create a new PixbufAnimation

val new_from_stream_finish : Ocgtk_gio.Gio.Wrappers.Async_result.t -> (t, GError.t) result

Create a new PixbufAnimation

val is_static_image : t -> bool

Checks whether the animation is a static image.

If you load a file with gdk_pixbuf_animation_new_from_file() and it turns out to be a plain, unanimated image, then this function will return `TRUE`. Use gdk_pixbuf_animation_get_static_image() to retrieve the image.

val get_width : t -> int

Queries the width of the bounding box of a pixbuf animation.

val get_static_image : t -> [ `pixbuf | `object_ ] Gobject.obj

Retrieves a static image for the animation.

If an animation is really just a plain image (has only one frame), this function returns that image.

If the animation is an animation, this function returns a reasonable image to use as a static unanimated image, which might be the first frame, or something more sophisticated depending on the file format.

If an animation hasn't loaded any frames yet, this function will return `NULL`.

val get_height : t -> int

Queries the height of the bounding box of a pixbuf animation.