[cairo-commit] cairo-5c ChangeLog, 1.24, 1.25 cairo-5c.h, 1.14, 1.15 cairo.c, 1.5, 1.6 gtk.c, 1.9, 1.10 init.c, 1.15, 1.16 pattern.c, 1.6, 1.7

Keith Packard commit at pdx.freedesktop.org
Thu Jul 7 01:09:23 PDT 2005


Committed by: keithp

Update of /cvs/cairo/cairo-5c
In directory gabe:/tmp/cvs-serv7650

Modified Files:
	ChangeLog cairo-5c.h cairo.c gtk.c init.c pattern.c 
Log Message:
2005-07-07  Keith Packard  <keithp at keithp.com>

	* cairo-5c.h:
	* cairo.c: (do_Cairo_status_to_string):
	* examples/fob.5c:
	* gtk.c: (create_gtk_global):
	* init.c: (nickle_init):
	* pattern.c: (do_Cairo_Pattern_add_color_stop_rgba),
	(do_Cairo_Pattern_add_color_stop_rgb),
	(do_Cairo_Pattern_set_matrix), (do_Cairo_Pattern_set_extend),
	(do_Cairo_Pattern_set_filter):
	Match current cairo API.
	Use XInitThreads, as it's necessary for stable operation.
	Requires at least one bug fix not yet in Xlib CVS to work


Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-5c/ChangeLog,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- ChangeLog	7 Jun 2005 05:12:17 -0000	1.24
+++ ChangeLog	7 Jul 2005 08:09:21 -0000	1.25
@@ -1,3 +1,18 @@
+2005-07-07  Keith Packard  <keithp at keithp.com>
+
+	* cairo-5c.h:
+	* cairo.c: (do_Cairo_status_to_string):
+	* examples/fob.5c:
+	* gtk.c: (create_gtk_global):
+	* init.c: (nickle_init):
+	* pattern.c: (do_Cairo_Pattern_add_color_stop_rgba),
+	(do_Cairo_Pattern_add_color_stop_rgb),
+	(do_Cairo_Pattern_set_matrix), (do_Cairo_Pattern_set_extend),
+	(do_Cairo_Pattern_set_filter):
+	Match current cairo API.
+	Use XInitThreads, as it's necessary for stable operation.
+	Requires at least one bug fix not yet in Xlib CVS to work
+
 2005-06-06  Bart Massey  <bart at cs.pdx.edu>
 	* examples/Makefile.am:
 	Add accumulated examples to the install list.

Index: cairo-5c.h
===================================================================
RCS file: /cvs/cairo/cairo-5c/cairo-5c.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cairo-5c.h	18 May 2005 06:21:15 -0000	1.14
+++ cairo-5c.h	7 Jul 2005 08:09:21 -0000	1.15
@@ -42,7 +42,6 @@
 #undef False
 #include <cairo.h>
 #include <cairo-xlib.h>
-#include <cairo-png.h>
 #include <cairo-pdf.h>
 #include <cairo-ft.h>
 #include <stdio.h>
@@ -154,7 +153,7 @@
 do_Cairo_status (Value cv);
 
 Value
-do_Cairo_status_string (Value cv);
+do_Cairo_status_to_string (Value sv);
 
 Value
 do_Cairo_enable (Value cv);

Index: cairo.c
===================================================================
RCS file: /cvs/cairo/cairo-5c/cairo.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cairo.c	18 May 2005 06:21:15 -0000	1.5
+++ cairo.c	7 Jul 2005 08:09:21 -0000	1.6
@@ -254,14 +254,14 @@
 }
 
 Value
-do_Cairo_status_string (Value cv)
+do_Cairo_status_to_string (Value sv)
 {
     ENTER ();
-    cairo_5c_t	*c5c = cairo_5c_get (cv);
+    cairo_status_t	status = EnumIntPart (sv, "invalid status_t");
 
     if (aborting)
 	return Void;
-    RETURN(NewStrString (cairo_status_string (c5c->cr)));
+    RETURN(NewStrString (cairo_status_to_string (status)));
 }
 
 Value

Index: gtk.c
===================================================================
RCS file: /cvs/cairo/cairo-5c/gtk.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- gtk.c	18 May 2005 06:21:15 -0000	1.9
+++ gtk.c	7 Jul 2005 08:09:21 -0000	1.10
@@ -300,7 +300,6 @@
 
     if (!been_here)
     {
-	/* trust to gdk to lock the display; Xlib is horribly broken */
 	XInitThreads ();
 	g_thread_init (NULL);
 	gdk_threads_init ();

Index: init.c
===================================================================
RCS file: /cvs/cairo/cairo-5c/init.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- init.c	7 Jun 2005 05:09:35 -0000	1.15
+++ init.c	7 Jul 2005 08:09:21 -0000	1.16
@@ -471,10 +471,10 @@
 	    " status_t status (cairo_t cr)\n"
 	    "\n"
 	    " Return the status of a cairo surface\n" },
-	{ do_Cairo_status_string, "status_string", "s", CAIRO_S, "\n"
-	    " string status_string (cairo_t cr)\n"
+	{ do_Cairo_status_to_string, "status_string", "s", STATUS_S, "\n"
+	    " string status_to_string (status_t status)\n"
 	    "\n"
-	    " Return the status string of a cairo surface\n" },
+	    " Return a string describing the status\n" },
 	{ do_Cairo_enable, "enable", "v", CAIRO_S, "\n"
 	    " void enable (cairo_t cr)\n"
 	    "\n"
@@ -897,16 +897,16 @@
     };
     
     static const struct fbuiltin_2 patfuncs_2[] = {
-	{ do_Cairo_Pattern_set_matrix, "set_matrix", STATUS_S, PATTERN_S MATRIX_S, "\n"
-	    " status_t set_matrix (pattern_t pattern, matrix_t matrix)\n"
+	{ do_Cairo_Pattern_set_matrix, "set_matrix", "v", PATTERN_S MATRIX_S, "\n"
+	    " void set_matrix (pattern_t pattern, matrix_t matrix)\n"
 	    "\n"
 	    " Set a transformation matrix for a pattern\n" },
-	{ do_Cairo_Pattern_set_extend, "set_extend", STATUS_S, PATTERN_S EXTEND_S, "\n"
-	    " status_t set_extend (pattern_t pattern, extend_t extend)\n"
+	{ do_Cairo_Pattern_set_extend, "set_extend", "v", PATTERN_S EXTEND_S, "\n"
+	    " void set_extend (pattern_t pattern, extend_t extend)\n"
 	    "\n"
 	    " Set a extend method for a pattern\n" },
-	{ do_Cairo_Pattern_set_filter, "set_filter", STATUS_S, PATTERN_S FILTER_S, "\n"
-	    " status_t set_filter (pattern_t pattern, filter_t filter)\n"
+	{ do_Cairo_Pattern_set_filter, "set_filter", "v", PATTERN_S FILTER_S, "\n"
+	    " void set_filter (pattern_t pattern, filter_t filter)\n"
 	    "\n"
 	    " Set a filter method for a pattern\n" },
 	{ 0 }
@@ -920,15 +920,23 @@
 	{ 0 }
     };
 
+    static const struct fbuiltin_5 patfuncs_5[] = {
+	{ do_Cairo_Pattern_add_color_stop_rgb, "add_color_stop_rgb", "v", PATTERN_S "nnnn", "\n"
+	    " void add_color_stop_rgba (pattern_t cr, real offset, real red, real green, real blue)\n"
+	    "\n"
+	    " Add a color stop in a gradient pattern.\n" },
+	{ 0 }
+    };
+    
     static const struct fbuiltin_6 patfuncs_6[] = {
 	{ do_Cairo_Pattern_create_radial, "create_radial", PATTERN_S, "nnnnnn", "\n"
 	    " pattern_t create_radial (real cx0, real cy0, real radius0, real cx1, real cy1, real radius1)\n"
 	    "\n"
 	    " Create a radial gradient pattern\n" },
-	{ do_Cairo_Pattern_add_color_stop_rgba, "add_color_stop", STATUS_S, PATTERN_S "nnnnn", "\n"
-	    " status_t add_color_stop_rgba (pattern_t cr, real offset, real red, real green, real blue, real alpha)\n"
+	{ do_Cairo_Pattern_add_color_stop_rgba, "add_color_stop_rgba", "v", PATTERN_S "nnnnn", "\n"
+	    " void add_color_stop_rgba (pattern_t cr, real offset, real red, real green, real blue, real alpha)\n"
 	    "\n"
-	    " Add a color stop in a gradient pattern.\n" },
+	    " Add a color and opacity stop in a gradient pattern.\n" },
 	{ 0 }
     };
 
@@ -981,6 +989,7 @@
     BuiltinFuncs1 (&CairoPatternNamespace, patfuncs_1);
     BuiltinFuncs2 (&CairoPatternNamespace, patfuncs_2);
     BuiltinFuncs4 (&CairoPatternNamespace, patfuncs_4);
+    BuiltinFuncs5 (&CairoPatternNamespace, patfuncs_5);
     BuiltinFuncs6 (&CairoPatternNamespace, patfuncs_6);
 
     BuiltinFuncs1 (&CairoImageNamespace, imgfuncs_1);

Index: pattern.c
===================================================================
RCS file: /cvs/cairo/cairo-5c/pattern.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pattern.c	18 May 2005 06:21:15 -0000	1.6
+++ pattern.c	7 Jul 2005 08:09:21 -0000	1.7
@@ -154,9 +154,8 @@
 
     if (aborting)
 	RETURN(Void);
-    RETURN (IntToEnum (typeCairoStatus,
-		       cairo_pattern_add_color_stop_rgba (pat, offset, red,
-							  green, blue, alpha)));
+    cairo_pattern_add_color_stop_rgba (pat, offset, red, green, blue, alpha);
+    RETURN (Void);
 }
 
 Value
@@ -172,9 +171,8 @@
 
     if (aborting)
 	RETURN(Void);
-    RETURN (IntToEnum (typeCairoStatus,
-		       cairo_pattern_add_color_stop_rgb (pat, offset, red,
-							 green, blue)));
+    cairo_pattern_add_color_stop_rgb (pat, offset, red, green, blue);
+    RETURN (Void);
 }
 
 Value
@@ -183,13 +181,12 @@
     ENTER ();
     cairo_pattern_t *pat = get_cairo_pattern (patv);
     cairo_matrix_t  matrix;
-    cairo_status_t  status;
 
     if (aborting)
 	RETURN(Void);
     cairo_matrix_part (mv, &matrix, "invalid pattern matrix");
-    status = cairo_pattern_set_matrix (pat, &matrix);
-    RETURN (IntToEnum (typeCairoStatus, status));
+    cairo_pattern_set_matrix (pat, &matrix);
+    RETURN (Void);
 }
 
 Value
@@ -213,12 +210,11 @@
     ENTER ();
     cairo_pattern_t *pat = get_cairo_pattern (patv);
     cairo_extend_t  extend = EnumIntPart (extendv, "invalid extend");
-    cairo_status_t  status;
 
     if (aborting)
 	RETURN(Void);
-    status = cairo_pattern_set_extend (pat, extend);
-    RETURN (IntToEnum (typeCairoStatus, status));
+    cairo_pattern_set_extend (pat, extend);
+    RETURN (Void);
 }
 
 Value
@@ -239,12 +235,11 @@
     ENTER ();
     cairo_pattern_t *pat = get_cairo_pattern (patv);
     cairo_filter_t  filter = EnumIntPart (filterv, "invalid filter");
-    cairo_status_t  status;
 
     if (aborting)
 	RETURN(Void);
-    status = cairo_pattern_set_filter (pat, filter);
-    RETURN (IntToEnum (typeCairoStatus, status));
+    cairo_pattern_set_filter (pat, filter);
+    RETURN (Void);
 }
 
 Value




More information about the cairo-commit mailing list