[cairo] destructor callback for image surfaces
cworth at cworth.org
Thu Apr 27 05:47:15 PDT 2006
On Thu, 27 Apr 2006 13:56:52 +0200 (CEST), Helge Bahmann wrote:
> > cairo_surface_set_user_data (image, &key, image, your_destructor)?
> okay, I missed that function... it allows to achieve what I want to do,
> may I suggest a doc reference from cairo_image_surface_create_for_data to
> cairo_surface_set_user_data, as this appears (to me at least) to be a very
> common use-case?
Seems reasonable enough. I just pushed what's below.
Thanks for the input! (and sorry you had to code/document that whole
function without it getting accepted).
Author: Carl Worth <cworth at cworth.org>
Date: Thu Apr 27 05:44:57 2006 -0700
Add reference to cairo_surface_set_user_data in docs. for cairo_image_surface_create_for_data
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index cef455b..adf2e7c 100644
@@ -271,6 +271,9 @@ _cairo_image_surface_create_with_content
* This function always returns a valid pointer, but it will return a
* pointer to a "nil" surface if an error such as out of memory
* occurs. You can use cairo_surface_status() to check for this.
+ * See cairo_surface_set_user_data() for a means of attaching a
+ * destroy-notification fallback to the surface if necessary.
cairo_image_surface_create_for_data (unsigned char *data,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060427/33e9f711/attachment.pgp
More information about the cairo