Callbacks¶
PixbufDestroyNotify (pixels, *data) |
|
PixbufSaveFunc (buf, *data) |
Details¶
-
GdkPixbuf.
PixbufDestroyNotify
(pixels, *data)¶ Parameters: A function of this type is responsible for freeing the pixel array of a pixbuf. The
GdkPixbuf.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 ofGdkPixbuf.PixbufDestroyNotify
so that the pixel data can be freed when the pixbuf is finalized.
-
GdkPixbuf.
PixbufSaveFunc
(buf, *data)¶ Parameters: Returns: True
if successful,False
(with error set) if failed.error: A location to return an error. Return type: (
bool
, error:GLib.Error
)Specifies the type of the function passed to gdk_pixbuf_save_to_callback(). It 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 set error and returnFalse
, in which case gdk_pixbuf_save_to_callback() will fail with the same error.New in version 2.4.