[Cairo] cairo API suggestion

Carl Worth cworth at east.isi.edu
Mon Sep 15 13:43:56 PDT 2003


On Sep 13, James Henstridge wrote:
 > While going over the Cairo API, I found another area that would be good 
 > to change in order to make it more friendly for language bindings: it 
 > would be nice if the cairo_surface_create_for_image() took user data and 
 > destroy notify arguments (similar to APIs in GTK).

This one is a bit trickier than the simple reference count requested
earlier.

First, in keeping with the as-few-parameters-as-possible nature of the
Cairo API, this would need to be a separate function from
surface_create. Perhaps cairo_surface_set_destroy_notify.

But, the larger issue is that currently there is not yet a function in
the Cairo API that accepts a function pointer, (though there are other
ideas already that also want one). Before adding any callbacks we'll
need to think through the concurrency issues and ensure we have a
sane plan.

-Carl




More information about the cairo mailing list