[cairo-commit] cairo/src cairo-private.h, 1.3, 1.4 cairo.c, 1.108, 1.109 cairo.h, 1.130, 1.131

Carl Worth commit at pdx.freedesktop.org
Mon Jun 20 09:59:26 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv27823/src

Modified Files:
	cairo-private.h cairo.c cairo.h 
Log Message:

        * src/cairo.h:
        * src/cairo-private.h:
        * src/cairo.c: (_cairo_error), (cairo_create): Rip out
        cairo_set_error_notfiy function as it is clear that it is not the
        right approach.

        * test/.cvsignore:
        * test/Makefile.am:
        * test/error-notify.c: Remove error-notify test.


Index: cairo-private.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-private.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cairo-private.h	16 Jun 2005 19:20:46 -0000	1.3
+++ cairo-private.h	20 Jun 2005 16:59:23 -0000	1.4
@@ -44,9 +44,6 @@
 
     cairo_status_t status;
 
-    cairo_error_notify_func_t error_notify;
-    void *error_notify_closure;
-
     cairo_path_fixed_t path;
 
     cairo_gstate_t *gstate;

Index: cairo.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- cairo.c	17 Jun 2005 18:24:24 -0000	1.108
+++ cairo.c	20 Jun 2005 16:59:23 -0000	1.109
@@ -46,8 +46,6 @@
 static const cairo_t cairo_nil = {
   (unsigned int)-1,		/* ref_count */
   CAIRO_STATUS_NO_MEMORY,	/* status */
-  NULL,				/* error_notify */
-  NULL,				/* error_notify_closure */
   { 				/* path */
     NULL, NULL,			/* op_buf_head, op_buf_tail */
     NULL, NULL,			/* arg_buf_head, arg_buf_tail */
@@ -92,9 +90,6 @@
 	    status <= CAIRO_STATUS_LAST_STATUS);
 
     cr->status = status;
-
-    if (cr->error_notify)
-	(cr->error_notify) (cr->error_notify_closure, status);
 }
 
 /**
@@ -143,9 +138,6 @@
 
     cr->status = CAIRO_STATUS_SUCCESS;
 
-    cr->error_notify = NULL;
-    cr->error_notify_closure = NULL;
-
     _cairo_path_fixed_init (&cr->path);
 
     if (target == NULL) {
@@ -2329,30 +2321,6 @@
     return "<unknown error status>";
 }
 
-/**
- * cairo_set_error_notify:
- * @cr: a cairo context
- * @error_notify: an function to be called when an error occurs
- * @closure: a closure argument to be passed to @error_notify
- * 
- * Installs an error notifier within @cr. If an error is set within
- * @cr, (eg. such that cairo_status(@cr) would return something other
- * than CAIRO_STATUS_SUCCESS), then @error_notify will be called with
- * the given @closure value as well as the #cairo_status_t value of
- * the error.
- *
- * An error notifier can be cleared by passing NULL for @error_notify
- * and for @closure.
- **/
-void
-cairo_set_error_notify (cairo_t			 *cr,
-			cairo_error_notify_func_t error_notify,
-			void			 *closure)
-{
-    cr->error_notify = error_notify;
-    cr->error_notify_closure = closure;
-}
-
 void
 _cairo_restrict_value (double *value, double min, double max)
 {

Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- cairo.h	16 Jun 2005 19:20:46 -0000	1.130
+++ cairo.h	20 Jun 2005 16:59:23 -0000	1.131
@@ -884,20 +884,6 @@
 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 */
 
 /**




More information about the cairo-commit mailing list