gi-gdkpixbuf-2.0.32: GdkPixbuf bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.GdkPixbuf.Objects.PixbufSimpleAnim

Contents

- Exported types
- Methods
  - addFrame
  - getLoop
  - new
  - setLoop
- Properties
  - loop

Description

An opaque struct representing a simple animation.

Synopsis

- newtype PixbufSimpleAnim = PixbufSimpleAnim (ManagedPtr PixbufSimpleAnim)
- class (GObject o, IsDescendantOf PixbufSimpleAnim o) => IsPixbufSimpleAnim o
- toPixbufSimpleAnim :: (MonadIO m, IsPixbufSimpleAnim o) => o -> m PixbufSimpleAnim
- pixbufSimpleAnimAddFrame :: (HasCallStack, MonadIO m, IsPixbufSimpleAnim a, IsPixbuf b) => a -> b -> m ()
- pixbufSimpleAnimGetLoop :: (HasCallStack, MonadIO m, IsPixbufSimpleAnim a) => a -> m Bool
- pixbufSimpleAnimNew :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Float -> m PixbufSimpleAnim
- pixbufSimpleAnimSetLoop :: (HasCallStack, MonadIO m, IsPixbufSimpleAnim a) => a -> Bool -> m ()
- constructPixbufSimpleAnimLoop :: (IsPixbufSimpleAnim o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPixbufSimpleAnimLoop :: (MonadIO m, IsPixbufSimpleAnim o) => o -> m Bool
- setPixbufSimpleAnimLoop :: (MonadIO m, IsPixbufSimpleAnim o) => o -> Bool -> m ()

# Exported types

newtype PixbufSimpleAnim Source #

Memory-managed wrapper type.

Constructors

PixbufSimpleAnim (ManagedPtr PixbufSimpleAnim) |

#### Instances

Instances details

Eq PixbufSimpleAnim Source # |
Instance details Defined in GI.GdkPixbuf.Objects.PixbufSimpleAnim Methods (==) :: PixbufSimpleAnim -> PixbufSimpleAnim -> Bool Source # (/=) :: PixbufSimpleAnim -> PixbufSimpleAnim -> Bool Source #
GObject PixbufSimpleAnim Source # |
Instance details Defined in GI.GdkPixbuf.Objects.PixbufSimpleAnim
ManagedPtrNewtype PixbufSimpleAnim Source # |
Instance details Defined in GI.GdkPixbuf.Objects.PixbufSimpleAnim Methods toManagedPtr :: PixbufSimpleAnim -> ManagedPtr PixbufSimpleAnim Source #
TypedObject PixbufSimpleAnim Source # |
Instance details Defined in GI.GdkPixbuf.Objects.PixbufSimpleAnim Methods glibType :: IO GType Source #
HasParentTypes PixbufSimpleAnim Source # |
Instance details Defined in GI.GdkPixbuf.Objects.PixbufSimpleAnim
IsGValue (Maybe PixbufSimpleAnim) Source # | Convert `PixbufSimpleAnim` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.GdkPixbuf.Objects.PixbufSimpleAnim Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe PixbufSimpleAnim -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe PixbufSimpleAnim) Source #
type ParentTypes PixbufSimpleAnim Source # |
Instance details Defined in GI.GdkPixbuf.Objects.PixbufSimpleAnim type ParentTypes PixbufSimpleAnim = '[PixbufAnimation, Object]

class (GObject o, IsDescendantOf PixbufSimpleAnim o) => IsPixbufSimpleAnim o Source #

Type class for types which can be safely cast to `PixbufSimpleAnim`, for instance with `toPixbufSimpleAnim`.

#### Instances

Instances details

(GObject o, IsDescendantOf PixbufSimpleAnim o) => IsPixbufSimpleAnim o Source # |
Instance details Defined in GI.GdkPixbuf.Objects.PixbufSimpleAnim

toPixbufSimpleAnim :: (MonadIO m, IsPixbufSimpleAnim o) => o -> m PixbufSimpleAnim Source #

Cast to `PixbufSimpleAnim`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

addFrame, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, isStaticImage, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getHeight, getIter, getLoop, getProperty, getQdata, getStaticImage, getWidth.

#### Setters

setData, setDataFull, setLoop, setProperty.

## addFrame

pixbufSimpleAnimAddFrame Source #

Arguments

:: (HasCallStack, MonadIO m, IsPixbufSimpleAnim a, IsPixbuf b) |
=> a | `animation`: a `PixbufSimpleAnim`
-> b | `pixbuf`: the pixbuf to add
-> m () |

Deprecated: (Since version 2.44)Use a different image loading library for animatable assets

Adds a new frame to `animation`. The `pixbuf` must have the dimensions specified when the animation was constructed.

Since: 2.8

## getLoop

pixbufSimpleAnimGetLoop Source #

Arguments

:: (HasCallStack, MonadIO m, IsPixbufSimpleAnim a) |
=> a | `animation`: a `PixbufSimpleAnim`
-> m Bool | Returns: `True` if the animation loops forever, `False` otherwise

Deprecated: (Since version 2.44)Use a different image loading library for animatable assets

Gets whether `animation` should loop indefinitely when it reaches the end.

Since: 2.18

## new

pixbufSimpleAnimNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Int32 | `width`: the width of the animation
-> Int32 | `height`: the height of the animation
-> Float | `rate`: the speed of the animation, in frames per second
-> m PixbufSimpleAnim | Returns: a newly allocated `PixbufSimpleAnim`

Deprecated: (Since version 2.44)Use a different image loading library for animatable assets

Creates a new, empty animation.

Since: 2.8

## setLoop

pixbufSimpleAnimSetLoop Source #

Arguments

:: (HasCallStack, MonadIO m, IsPixbufSimpleAnim a) |
=> a | `animation`: a `PixbufSimpleAnim`
-> Bool | `loop`: whether to loop the animation
-> m () |

Deprecated: (Since version 2.44)Use a different image loading library for animatable assets

Sets whether `animation` should loop indefinitely when it reaches the end.

Since: 2.18

# Properties

## loop

Whether the animation should loop when it reaches the end.

Since: 2.18

constructPixbufSimpleAnimLoop :: (IsPixbufSimpleAnim o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`loop`” property. This is rarely needed directly, but it is used by `new`.

getPixbufSimpleAnimLoop :: (MonadIO m, IsPixbufSimpleAnim o) => o -> m Bool Source #

Get the value of the “`loop`” property. When overloading is enabled, this is equivalent to

    get pixbufSimpleAnim #loop

setPixbufSimpleAnimLoop :: (MonadIO m, IsPixbufSimpleAnim o) => o -> Bool -> m () Source #

Set the value of the “`loop`” property. When overloading is enabled, this is equivalent to

    set pixbufSimpleAnim [ #loop := value ]