package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gdkpixbuf/Ocgtk_gdkpixbuf/GdkPixbuf/Wrappers/Pixbuf_animation/index.html

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.