Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
- data AnimView
- class ImageViewClass o => AnimViewClass o
- animViewNew :: IO AnimView
- animViewGetAnim :: AnimViewClass view => view -> IO PixbufAnimation
- animViewSetAnim :: AnimViewClass view => view -> Maybe PixbufAnimation -> IO ()
- animViewSetIsPlaying :: AnimViewClass view => view -> Bool -> IO ()
- animViewGetIsPlaying :: AnimViewClass view => view -> IO Bool
- animViewStep :: AnimViewClass view => view -> IO ()
- step :: AnimViewClass view => Signal view (IO ())
- toggleRunning :: AnimViewClass view => Signal view (IO ())
Details
AnimView
subclasses ImageView
. It has the same look and feel as its parent but is also capable
of displaying GIF animations.
Tyeps
class ImageViewClass o => AnimViewClass o Source
Methods
:: AnimViewClass view | |
=> view | |
-> IO PixbufAnimation | returns the current animation |
:: AnimViewClass view | |
=> view | |
-> Maybe PixbufAnimation |
|
-> 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
.
Sets whether the animation should play or not. If there is no current animation this method does not have any effect.
:: AnimViewClass view | |
=> view | |
-> IO Bool |
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.