TRUE if the incremental load was successfulgdkpixbuf.types
D types for gdkpixbuf2 library
Types 19
Defines the type of the function used to fill a #GdkPixbufFormat structure with information about a module.
Parameters
info | a #GdkPixbufFormat. |
Defines the type of the function used to set the vtable of a #GdkPixbufModule when it is loaded.
Parameters
module_ | a #GdkPixbufModule. |
Incrementally loads a buffer into the image data.
Parameters
context | the state object created by [gdkpixbuf.types.PixbufModuleBeginLoadFunc] |
buf | the data to load |
Returns
Throws
Loads a file from a standard C file stream into a new [gdkpixbuf.pixbuf_animation.PixbufAnimation].
In case of error, this function should return NULL and set the error argument.
Parameters
f | the file stream from which the image should be loaded |
Returns
Throws
Loads a file from a standard C file stream into a new [gdkpixbuf.pixbuf.Pixbuf].
In case of error, this function should return NULL and set the error argument.
Parameters
f | the file stream from which the image should be loaded |
Returns
Throws
Loads XPM data into a new [gdkpixbuf.pixbuf.Pixbuf].
Parameters
data | the XPM data |
Returns
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.
Parameters
pixbuf | the #GdkPixbuf that is currently being loaded. |
anim | if an animation is being loaded, the #GdkPixbufAnimation, else null. |
Saves a [gdkpixbuf.pixbuf.Pixbuf] into a standard C file stream.
The optional param_keys and param_values arrays contain the keys and values (in the same order) for attributes to be saved alongside the image data.
Parameters
f | the file stream into which the image should be saved |
pixbuf | the image to save |
paramKeys | parameter keys to save |
paramValues | parameter values to save |
Returns
TRUE on success; in case of failure, FALSE is returned and
the error is set
Throws
Checks whether the given option_key is supported when saving.
Parameters
optionKey | the option key to check |
Returns
TRUE if the option is supportedDefines the type of the function that gets called once the size of the loaded image is known.
The function is expected to set width and height 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 or height 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 implement [gdkpixbuf.pixbuf.Pixbuf.getFileInfo] efficiently.
Parameters
width | pointer to a location containing the current image width |
height | pointer to a location containing the current image height |
Finalizes the image loading state.
This function is called on success and error states.
Parameters
context | the state object created by [gdkpixbuf.types.PixbufModuleBeginLoadFunc] |
Returns
TRUE if the loading operation was successfulThrows
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.
Parameters
pixbuf | the #GdkPixbuf that is currently being loaded. |
x | the X origin of the updated area. |
y | the Y origin of the updated area. |
width | the width of the updated area. |
height | the height of the updated area. |
Save functions used by [gdkpixbuf.pixbuf.Pixbuf.saveToCallback].
This function is called once for each block of bytes that is "written" by [gdkpixbuf.pixbuf.Pixbuf.saveToCallback].
If successful it should return TRUE; if an error occurs it should set error and return FALSE, in which case [gdkpixbuf.pixbuf.Pixbuf.saveToCallback] will fail with the same error.
Parameters
buf | bytes to be written. |
error | A location to return an error. |
Returns
TRUE if successful, FALSE otherwiseVariables 4
PIXBUF_MAJOR = 2Major version of gdk-pixbuf library, that is the "0" in "0.8.2" for example.
PIXBUF_MICRO = 10Micro version of gdk-pixbuf library, that is the "2" in "0.8.2" for example.
PIXBUF_MINOR = 42Minor version of gdk-pixbuf library, that is the "8" in "0.8.2" for example.
PIXBUF_VERSION = "2.42.10"Contains the full version of GdkPixbuf as a string.
This is the version being compiled against; contrast with gdk_pixbuf_version.