[cairo] cairo 1.5.8 API Changes and bindings

Jonathon Jongsma jonathon at quotidian.org
Wed Jan 30 11:59:06 PST 2008

On 1/30/08, Carl Worth <cworth at cworth.org> wrote:

> API changes
> -----------
> Fix return types of cairo_surface_show_page and
> cairo_surface_copy_page. This is an API change to functions that are
> new in the 1.5 series, so not an API break compared to any stable
> cairo release, (1.0.x, 1.2.x, 1.4.x).
> Change the return type of cairo_get_current_point() from void to
> cairo_status_t. This allows the caller to receive a
> CAIRO_STATUS_NO_CURRENT_POINT value to distinguish the a current point
> at the origin from no current point existing.

I had a brief chat with Behdad about this on IRC and he suggested to
bring it up on the mailing list.  As far as I know, most bindings do
not actually expose the cairo_status_t data type: the manual
recommends that bindings check status and throw an exception of the
appropriate type.  In this case, if bindings followed this advice,
they'd be throwing exceptions on cases that previously didn't throw
exceptions, which could potentially break existing applications.
Behdad suggested possibly adding something like has_current_point() to
work around this.  Anybody have any other thoughts about how to handle
this in bindings?

More information about the cairo mailing list