gtkimageview-0.12.0: Binding to the GtkImageView library.

Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net

Graphics.UI.Gtk.ImageView.AnimView

Contents

Description

 

Synopsis

Details

AnimView subclasses ImageView. It has the same look and feel as its parent but is also capable of displaying GIF animations.

Tyeps

Methods

animViewGetAnimSource

Arguments

:: AnimViewClass view 
=> view 
-> IO PixbufAnimation

returns the current animation

Creates a new AnimView with default values. The default values are:

Returns the current animation of the view.

animViewSetAnimSource

Arguments

:: AnimViewClass view 
=> view 
-> Maybe PixbufAnimation

anim A pixbuf animation to play.

-> IO () 

Sets the pixbuf animation to play, or Nothing to not play any animation.

If the animation is a static image or only has one frame, then the static image will be displayed instead. If more frames are loaded into the animation, then AnimView will automatically animate to those frames.

The effect of this method is analoguous to imageViewSetPixbuf. Fit mode is reset to FitSizeIfLarger so that the whole area of the animation fits in the view. Three signals are emitted, first the ImageView will emit zoomChanged and then pixbufChanged, second, AnimView itself will emit animChanged.

The default pixbuf animation is Nothing.

animViewSetIsPlayingSource

Arguments

:: AnimViewClass view 
=> view 
-> Bool

playing True to play the animation, False otherwise

-> IO () 

Sets whether the animation should play or not. If there is no current animation this method does not have any effect.

animViewGetIsPlayingSource

Arguments

:: AnimViewClass view 
=> view 
-> IO Bool

returns True if an animation is playing, False otherwise.

Returns whether the animation is playing or not. If there is no current animation, this method will always returns False.

animViewStep :: AnimViewClass view => view -> IO ()Source

Steps the animation one frame forward. If the animation is playing it will be stopped. Will it wrap around if the animation is at its last frame?

Signals

step :: AnimViewClass view => Signal view (IO ())Source

Steps the animation one frame forward. If the animation is playing it will first be stopped. step is a keybinding signal emitted when GDK_j is pressed on the widget and should not be used by clients of this library.

toggleRunning :: AnimViewClass view => Signal view (IO ())Source

Stops the animation if it was playing or resumes it, if it was playing. toggleRunning is a keybinding signal emitted when GDK_p is pressed on the widget and should not be used by clients of this library.