Type Aliases
The following type aliases are available globally.
-
A function of this type is responsible for freeing the pixel array of a pixbuf.
The
gdk_pixbuf_new_from_data()
function lets you pass in a pre-allocated pixel array so that a pixbuf can be created from it; in this case you will need to pass in a function of typeGdkPixbufDestroyNotify
so that the pixel data can be freed when the pixbuf is finalized.Declaration
Swift
public typealias PixbufDestroyNotify = GdkPixbufDestroyNotify
-
Sets up the image loading state.
The image loader is responsible for storing the given function pointers and user data, and call them when needed.
The image loader should set up an internal state object, and return it from this function; the state object will then be updated from the [callback
GdkPixbuf.PixbufModuleIncrementLoadFunc
] callback, and will be freed by [callbackGdkPixbuf.PixbufModuleStopLoadFunc
] callback.Declaration
Swift
public typealias PixbufModuleBeginLoadFunc = GdkPixbufModuleBeginLoadFunc
-
Defines the type of the function used to fill a
GdkPixbufFormat
structure with information about a module.Declaration
Swift
public typealias PixbufModuleFillInfoFunc = GdkPixbufModuleFillInfoFunc
-
Defines the type of the function used to set the vtable of a
GdkPixbufModule
when it is loaded.Declaration
Swift
public typealias PixbufModuleFillVtableFunc = GdkPixbufModuleFillVtableFunc
-
Incrementally loads a buffer into the image data.
Declaration
Swift
public typealias PixbufModuleIncrementLoadFunc = GdkPixbufModuleIncrementLoadFunc
-
Loads a file from a standard C file stream into a new
GdkPixbufAnimation
.In case of error, this function should return
NULL
and set theerror
argument.Declaration
Swift
public typealias PixbufModuleLoadAnimationFunc = GdkPixbufModuleLoadAnimationFunc
-
Loads a file from a standard C file stream into a new
GdkPixbuf
.In case of error, this function should return
NULL
and set theerror
argument.Declaration
Swift
public typealias PixbufModuleLoadFunc = GdkPixbufModuleLoadFunc
-
Loads XPM data into a new
GdkPixbuf
.Declaration
Swift
public typealias PixbufModuleLoadXpmDataFunc = GdkPixbufModuleLoadXpmDataFunc
-
Defines the type of the function that gets called once the initial setup of
pixbuf
is done.GdkPixbufLoader
uses a function of this type to emit the “<link linkend="GdkPixbufLoader-area-prepared”>area_prepared</link>“ signal.Declaration
Swift
public typealias PixbufModulePreparedFunc = GdkPixbufModulePreparedFunc
-
Saves a
GdkPixbuf
by calling the provided function.The optional
option_keys
andoption_values
arrays contain the keys and values (in the same order) for attributes to be saved alongside the image data.Declaration
Swift
public typealias PixbufModuleSaveCallbackFunc = GdkPixbufModuleSaveCallbackFunc
-
Saves a
GdkPixbuf
into a standard C file stream.The optional
param_keys
andparam_values
arrays contain the keys and values (in the same order) for attributes to be saved alongside the image data.Declaration
Swift
public typealias PixbufModuleSaveFunc = GdkPixbufModuleSaveFunc
-
Checks whether the given
option_key
is supported when saving.Declaration
Swift
public typealias PixbufModuleSaveOptionSupportedFunc = GdkPixbufModuleSaveOptionSupportedFunc
-
Defines the type of the function that gets called once the size of the loaded image is known.
The function is expected to set
width
andheight
to the desired size to which the image should be scaled. If a module has no efficient way to achieve the desired scaling during the loading of the image, it may either ignore the size request, or only approximate it - gdk-pixbuf will then perform the required scaling on the completely loaded image.If the function sets
width
orheight
to zero, the module should interpret this as a hint that it will be closed soon and shouldn’t allocate further resources. This convention is used to implementgdk_pixbuf_get_file_info()
efficiently.Declaration
Swift
public typealias PixbufModuleSizeFunc = GdkPixbufModuleSizeFunc
-
Finalizes the image loading state.
This function is called on success and error states.
Declaration
Swift
public typealias PixbufModuleStopLoadFunc = GdkPixbufModuleStopLoadFunc
-
Defines the type of the function that gets called every time a region of
pixbuf
is updated.GdkPixbufLoader
uses a function of this type to emit the “<link linkend="GdkPixbufLoader-area-updated”>area_updated</link>“ signal.Declaration
Swift
public typealias PixbufModuleUpdatedFunc = GdkPixbufModuleUpdatedFunc
-
Save functions used by [method
GdkPixbuf.Pixbuf.save_to_callback
].This function is called once for each block of bytes that is “written” by
gdk_pixbuf_save_to_callback()
.If successful it should return
TRUE
; if an error occurs it should seterror
and returnFALSE
, in which casegdk_pixbuf_save_to_callback()
will fail with the same error.Declaration
Swift
public typealias PixbufSaveFunc = GdkPixbufSaveFunc
-
This enumeration defines the color spaces that are supported by the gdk-pixbuf library.
Currently only RGB is supported.
Declaration
Swift
public typealias Colorspace = GdkColorspace
-
Interpolation modes for scaling functions.
The
GDK_INTERP_NEAREST
mode is the fastest scaling method, but has horrible quality when scaling down;GDK_INTERP_BILINEAR
is the best choice if you aren’t sure what to choose, it has a good speed/quality balance.Note: Cubic filtering is missing from the list; hyperbolic interpolation is just as fast and results in higher quality.
Declaration
Swift
public typealias InterpType = GdkInterpType
-
Control the alpha channel for drawables.
These values can be passed to
gdk_pixbuf_xlib_render_to_drawable_alpha()
in gdk-pixbuf-xlib to control how the alpha channel of an image should be handled.This function can create a bilevel clipping mask (black and white) and use it while painting the image.
In the future, when the X Window System gets an alpha channel extension, it will be possible to do full alpha compositing onto arbitrary drawables. For now both cases fall back to a bilevel clipping mask.
PixbufAlphaMode is deprecated: There is no user of GdkPixbufAlphaMode in GdkPixbuf, and the Xlib utility functions have been split out to their own library, gdk-pixbuf-xlib
Declaration
Swift
public typealias PixbufAlphaMode = GdkPixbufAlphaMode
-
An error code in the
GDK_PIXBUF_ERROR
domain.Many gdk-pixbuf operations can cause errors in this domain, or in the
G_FILE_ERROR
domain.Declaration
Swift
public typealias PixbufError = GdkPixbufError
-
The possible rotations which can be passed to
gdk_pixbuf_rotate_simple()
.To make them easier to use, their numerical values are the actual degrees.
Declaration
Swift
public typealias PixbufRotation = GdkPixbufRotation
-
A simple iterator over pixbuf animations
Declaration
Swift
public typealias GdkPixbufSimpleAnimIter = GdkPixbufAnimationIter