PixbufAnimationRef
public struct PixbufAnimationRef : PixbufAnimationProtocol, GWeakCapturing
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 PixbufAnimationRef type acts as a lightweight Swift reference to an underlying GdkPixbufAnimation instance.
It exposes methods that can operate on this data type through PixbufAnimationProtocol conformance.
Use PixbufAnimationRef only as an unowned reference to an existing GdkPixbufAnimation instance.
-
Untyped pointer to the underlying `GdkPixbufAnimation` instance.For type-safe access, use the generated, typed pointer
pixbuf_animation_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GdkPixbufAnimation>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GdkPixbufAnimation>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GdkPixbufAnimation>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GdkPixbufAnimation>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
PixbufAnimationProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : PixbufAnimationProtocol -
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> PixbufAnimationRef where T : PixbufAnimationProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PixbufAnimationProtocol.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>) -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PixbufAnimationProtocol.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PixbufAnimationProtocol.Declaration
Swift
@inlinable init(mutating 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 init(raw: UnsafeMutableRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PixbufAnimationProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer) -
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_ERRORandG_FILE_ERRORdomains.Declaration
Swift
@inlinable 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
NULLis returned, thenerrorwill be set.Declaration
Swift
@inlinable init(resource resourcePath: UnsafePointer<CChar>!) throws -
Creates a new animation by loading it from an input stream.
The file format is detected automatically.
If
NULLis returned, thenerrorwill be set.The
cancellablecan be used to abort the operation from another thread. If the operation was cancelled, the errorG_IO_ERROR_CANCELLEDwill be returned. Other possible errors are in theGDK_PIXBUF_ERRORandG_IO_ERRORdomains.The stream is not closed.
Declaration
Swift
@inlinable init<GioCancellableT, GioInputStreamT>(stream: GioInputStreamT, cancellable: GioCancellableT?) throws where GioCancellableT : CancellableProtocol, GioInputStreamT : InputStreamProtocol -
Finishes an asynchronous pixbuf animation creation operation started with [func
GdkPixbuf.PixbufAnimation.new_from_stream_async].Declaration
Swift
@inlinable 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_ERRORandG_FILE_ERRORdomains.Declaration
Swift
@inlinable static func newFrom(file filename: UnsafePointer<CChar>!) throws -> GdkPixBuf.PixbufAnimationRef! -
Creates a new pixbuf animation by loading an image from an resource.
The file format is detected automatically. If
NULLis returned, thenerrorwill be set.Declaration
Swift
@inlinable static func newFrom(resource resourcePath: UnsafePointer<CChar>!) throws -> GdkPixBuf.PixbufAnimationRef! -
Creates a new animation by loading it from an input stream.
The file format is detected automatically.
If
NULLis returned, thenerrorwill be set.The
cancellablecan be used to abort the operation from another thread. If the operation was cancelled, the errorG_IO_ERROR_CANCELLEDwill be returned. Other possible errors are in theGDK_PIXBUF_ERRORandG_IO_ERRORdomains.The stream is not closed.
Declaration
Swift
@inlinable static func newFrom<GioCancellableT, GioInputStreamT>(stream: GioInputStreamT, cancellable: GioCancellableT?) throws -> GdkPixBuf.PixbufAnimationRef! where GioCancellableT : CancellableProtocol, GioInputStreamT : InputStreamProtocol -
Finishes an asynchronous pixbuf animation creation operation started with [func
GdkPixbuf.PixbufAnimation.new_from_stream_async].Declaration
Swift
@inlinable static func newFrom<GioAsyncResultT>(streamFinish asyncResult: GioAsyncResultT) throws -> GdkPixBuf.PixbufAnimationRef! where GioAsyncResultT : AsyncResultProtocol
View on GitHub
Install in Dash
PixbufAnimationRef Structure Reference