PixbufAnimation

open class PixbufAnimation : GLibObject.Object, PixbufAnimationProtocol

An opaque object representing an animation.

The GdkPixBuf library provides a simple mechanism to load and represent animations. An animation is conceptually a series of frames to be displayed over time.

The animation may not be represented as a series of frames internally; for example, it may be stored as a sprite and instructions for moving the sprite around a background.

To display an animation you don’t need to understand its representation, however; you just ask GdkPixbuf what should be displayed at a given point in time.

The PixbufAnimation type acts as a reference-counted owner of an underlying GdkPixbufAnimation instance. It provides the methods that can operate on this data type through PixbufAnimationProtocol conformance. Use PixbufAnimation as a strong reference or owner of a GdkPixbufAnimation instance.

  • Designated initialiser from the underlying `C` data type.
    

    This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the PixbufAnimation instance.

    Declaration

    Swift

    @inlinable
    public init(_ op: UnsafeMutablePointer<GdkPixbufAnimation>)

    Parameters

    op

    pointer to the underlying object

  • Designated initialiser from a constant pointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the PixbufAnimation instance.

    Declaration

    Swift

    @inlinable
    public init(_ op: UnsafePointer<GdkPixbufAnimation>)

    Parameters

    op

    pointer to the underlying object

  • Optional initialiser from a non-mutating gpointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the PixbufAnimation instance.

    Declaration

    Swift

    @inlinable
    override public init!(gpointer op: gpointer?)

    Parameters

    op

    gpointer to the underlying object

  • Optional initialiser from a non-mutating gconstpointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the PixbufAnimation instance.

    Declaration

    Swift

    @inlinable
    override public init!(gconstpointer op: gconstpointer?)

    Parameters

    op

    pointer to the underlying object

  • Optional initialiser from a constant pointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the PixbufAnimation instance.

    Declaration

    Swift

    @inlinable
    public init!(_ op: UnsafePointer<GdkPixbufAnimation>?)

    Parameters

    op

    pointer to the underlying object

  • Optional initialiser from the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the PixbufAnimation instance.

    Declaration

    Swift

    @inlinable
    public init!(_ op: UnsafeMutablePointer<GdkPixbufAnimation>?)

    Parameters

    op

    pointer to the underlying object

  • Designated initialiser from the underlying C data type. Will retain GdkPixbufAnimation. i.e., ownership is transferred to the PixbufAnimation instance.

    Declaration

    Swift

    @inlinable
    public init(retaining op: UnsafeMutablePointer<GdkPixbufAnimation>)

    Parameters

    op

    pointer to the underlying object

  • Reference intialiser for a related type that implements PixbufAnimationProtocol Will retain GdkPixbufAnimation.

    Declaration

    Swift

    @inlinable
    public init<T>(pixbufAnimation other: T) where T : PixbufAnimationProtocol

    Parameters

    other

    an instance of a related type that implements PixbufAnimationProtocol

  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PixbufAnimationProtocol.

    Declaration

    Swift

    @inlinable
    override public init<T>(cPointer p: UnsafeMutablePointer<T>)

    Parameters

    cPointer

    pointer to the underlying object

  • Unsafe typed, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PixbufAnimationProtocol.

    Declaration

    Swift

    @inlinable
    override public init<T>(retainingCPointer cPointer: UnsafeMutablePointer<T>)

    Parameters

    cPointer

    pointer to the underlying object

  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PixbufAnimationProtocol.

    Declaration

    Swift

    @inlinable
    override public init(raw p: UnsafeRawPointer)

    Parameters

    p

    raw pointer to the underlying object

  • Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PixbufAnimationProtocol.

    Declaration

    Swift

    @inlinable
    override public init(retainingRaw raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PixbufAnimationProtocol.

    Declaration

    Swift

    @inlinable
    public required init(raw p: UnsafeMutableRawPointer)

    Parameters

    p

    mutable raw pointer to the underlying object

  • Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PixbufAnimationProtocol.

    Declaration

    Swift

    @inlinable
    required public init(retainingRaw raw: UnsafeMutableRawPointer)

    Parameters

    raw

    mutable raw pointer to the underlying object

  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PixbufAnimationProtocol.

    Declaration

    Swift

    @inlinable
    override public init(opaquePointer p: OpaquePointer)

    Parameters

    p

    opaque pointer to the underlying object

  • Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PixbufAnimationProtocol.

    Declaration

    Swift

    @inlinable
    override public init(retainingOpaquePointer p: OpaquePointer)

    Parameters

    p

    opaque pointer to the underlying object

  • Creates a new animation by loading it from a file.

    The file format is detected automatically.

    If the file’s format does not support multi-frame images, then an animation with a single frame will be created.

    Possible errors are in the GDK_PIXBUF_ERROR and G_FILE_ERROR domains.

    Declaration

    Swift

    @inlinable
    public init(file filename: UnsafePointer<CChar>!) throws
  • Creates a new pixbuf animation by loading an image from an resource.

    The file format is detected automatically. If NULL is returned, then error will be set.

    Declaration

    Swift

    @inlinable
    public init(resource resourcePath: UnsafePointer<CChar>!) throws
  • Creates a new animation by loading it from an input stream.

    The file format is detected automatically.

    If NULL is returned, then error will be set.

    The cancellable can be used to abort the operation from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. Other possible errors are in the GDK_PIXBUF_ERROR and G_IO_ERROR domains.

    The stream is not closed.

    Declaration

    Swift

    @inlinable
    public init<GioCancellableT, GioInputStreamT>(stream: GioInputStreamT, cancellable: GioCancellableT?) throws where GioCancellableT : CancellableProtocol, GioInputStreamT : InputStreamProtocol
  • Finishes an asynchronous pixbuf animation creation operation started with [funcGdkPixbuf.PixbufAnimation.new_from_stream_async].

    Declaration

    Swift

    @inlinable
    public init<GioAsyncResultT>(streamFinish asyncResult: GioAsyncResultT) throws where GioAsyncResultT : AsyncResultProtocol
  • Creates a new animation by loading it from a file.

    The file format is detected automatically.

    If the file’s format does not support multi-frame images, then an animation with a single frame will be created.

    Possible errors are in the GDK_PIXBUF_ERROR and G_FILE_ERROR domains.

    Declaration

    Swift

    @inlinable
    public static func newFrom(file filename: UnsafePointer<CChar>!) throws -> GdkPixBuf.PixbufAnimation!
  • Creates a new pixbuf animation by loading an image from an resource.

    The file format is detected automatically. If NULL is returned, then error will be set.

    Declaration

    Swift

    @inlinable
    public static func newFrom(resource resourcePath: UnsafePointer<CChar>!) throws -> GdkPixBuf.PixbufAnimation!
  • Creates a new animation by loading it from an input stream.

    The file format is detected automatically.

    If NULL is returned, then error will be set.

    The cancellable can be used to abort the operation from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. Other possible errors are in the GDK_PIXBUF_ERROR and G_IO_ERROR domains.

    The stream is not closed.

    Declaration

    Swift

    @inlinable
    public static func newFrom<GioCancellableT, GioInputStreamT>(stream: GioInputStreamT, cancellable: GioCancellableT?) throws -> GdkPixBuf.PixbufAnimation! where GioCancellableT : CancellableProtocol, GioInputStreamT : InputStreamProtocol
  • Finishes an asynchronous pixbuf animation creation operation started with [funcGdkPixbuf.PixbufAnimation.new_from_stream_async].

    Declaration

    Swift

    @inlinable
    public static func newFrom<GioAsyncResultT>(streamFinish asyncResult: GioAsyncResultT) throws -> GdkPixBuf.PixbufAnimation! where GioAsyncResultT : AsyncResultProtocol