[cairo] Cairo 1.9.6: missing functions (?) for cairo_device_t + minor typo errors in cairo.h

Anne et Damien Carbonne aetdcarbonne at free.fr
Mon Mar 22 15:39:29 PDT 2010


Hi,

I'm currently preparing the Ada binding to a future Cairo-1.10 by using 
the 1.9.6 snapshot.
I tried to mimic what I did previously with 1.8, without success in the 
case of cairo_device_t, because I'm lacking the following functions:
- cairo_device_set_user_data
- cairo_device_get_user_data
- cairo_device_get_reference_count

For other ref counted types, the *_get_reference_count function is 
usually provided. Shouldn't it be provided too in that case?

What about user data? Is there one attached to cairo_device_t? If not, 
is it planned to add it?

Notice that if those functions are not provided, it is always possible 
to create a binding! One simply needs to duplicate certain objects on 
the binding side.

During this process I also noticed some minor errors in cairo.h:

1)
/**
* cairo_device_t:
*
* A #cairo_device_t represents the driver interface for drawing
* operations to a #cairo_surface_t.  There are different subtypes of
* #cairo_device_t for different drawing backends; for example,
* cairo_xcb_device_create() creates a device that wraps the connection
* to an X Windows System using the XCB library.
*
* The type of a surface can be queried with cairo_device_get_type().     
==> Should be: The type of a device ...
*
* Memory management of #cairo_device_t is done with
* cairo_device_reference() and cairo_device_destroy().
**/
typedef struct _cairo_device cairo_device_t;

2)
cairo_public cairo_region_t *
cairo_region_reference (cairo_region_t *);   ==> Should be: 
cairo_region_reference (cairo_region_t *region);


Thanks for your great job on cairo.

Regards,
Damien Carbonne










More information about the cairo mailing list