diff options
author | Carl Worth <cworth@cworth.org> | 2005-06-16 12:20:46 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-06-16 12:20:46 +0000 |
commit | d6eca5a45f220d806491af518ba8ce16b524e01d (patch) | |
tree | 93c8eb8369276a940b85eaf474120e705f7f7cce /src/cairo.h | |
parent | 18c2d12b9ed98aea7f8ebe2b97b9406a6acb4d29 (diff) |
Reorder fields of cairo_private_t to match initialization order.
Call error_notify callback if set. (cairo_create): Initialize error_notify callback to NULL. (cairo_set_error_notify): New function to allow the user to set an error notify callback.
New cairo_set_error_notify prototye.
New test for cairo_set_error_notify.
Diffstat (limited to 'src/cairo.h')
-rw-r--r-- | src/cairo.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cairo.h b/src/cairo.h index 0fcd85602..fe9b2e7e3 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -884,6 +884,20 @@ cairo_status (cairo_t *cr); const char * cairo_status_to_string (cairo_status_t status); +/** + * cairo_error_notify_func_t + * + * #cairo_error_notify_func_t the type of function which is called + * when an error is detected by cairo. It is passed a closure and the + * #cairo_status_t value of the error. + */ +typedef void (*cairo_error_notify_func_t) (void *closure, cairo_status_t status); + +void +cairo_set_error_notify (cairo_t *cr, + cairo_error_notify_func_t error_notify, + void *closure); + /* Surface manipulation */ /** |