[cairo-commit] cairo-perl Cairo.xs, 1.3, 1.4 CairoFont.xs, 1.1, 1.2 CairoMatrix.xs, 1.3, 1.4 CairoPattern.xs, 1.3, 1.4 CairoSurface.xs, 1.3, 1.4 ChangeLog, 1.2, 1.3 MANIFEST, 1.2, 1.3 MANIFEST.SKIP, 1.2, 1.3 TODO, 1.1, 1.2

Ross McFarland commit at pdx.freedesktop.org
Thu Nov 11 19:26:36 PST 2004


Committed by: rwmcfa1

Update of /cvs/cairo/cairo-perl
In directory gabe:/tmp/cvs-serv1512

Modified Files:
	Cairo.xs CairoFont.xs CairoMatrix.xs CairoPattern.xs 
	CairoSurface.xs ChangeLog MANIFEST MANIFEST.SKIP TODO 
Log Message:
	* t/CairoMatrix.t, t/CairoPattern.t, t/CairoSurface.t: initial import,
	95% complete tests

	* Cairo.xs, CairoMatrix.xs, CairoSurface.xs, CairoPattern.xs: no more
	new's, not really a good idea.
	
	* CairoFont.xs: all disabled for now

	* CairoMatrix.xs: copy, multiply, and transforms fixed while doing
	tests

	* CairoPattern.xs: get_matrix fixed whlie doing tests

	* CairoSurface.xs: cleaned up the namespace problems herein. fixed
	several output funcs.

	* MANIFEST: added TODO and new tests.

	* MANIFEST.SKIP: skip CairoEnums.xs

	* t/Cairo.t: no new test, change Surface stuff due to namespace above

Index: Cairo.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/Cairo.xs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Cairo.xs	11 Nov 2004 02:20:32 -0000	1.3
+++ Cairo.xs	12 Nov 2004 03:26:34 -0000	1.4
@@ -26,12 +26,8 @@
 	}
 
 cairo_t * cairo_create (class);
-    ALIAS:
-	Cairo::new = 1
     C_ARGS:
 	/* void */
-    CLEANUP:
-	CAIRO_PERL_UNUSED (ix);
 
 ## shouldn't have to deal with references from perl
 ##void cairo_reference (cairo_t * cr);

Index: CairoFont.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/CairoFont.xs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CairoFont.xs	5 Nov 2004 01:34:04 -0000	1.1
+++ CairoFont.xs	12 Nov 2004 03:26:34 -0000	1.2
@@ -12,11 +12,10 @@
 
 ## XXX: what about all of these
 
-void cairo_font_reference (cairo_font_t * font);
-
-void cairo_font_destroy (cairo_font_t * font);
+## void cairo_font_reference (cairo_font_t * font);
 
-void cairo_font_set_transform (cairo_font_t * font, cairo_matrix_t * matrix);
+## void cairo_font_destroy (cairo_font_t * font);
 
-void cairo_font_current_transform (cairo_font_t * font, cairo_matrix_t * matrix);
+## void cairo_font_set_transform (cairo_font_t * font, cairo_matrix_t * matrix);
 
+## void cairo_font_current_transform (cairo_font_t * font, cairo_matrix_t * matrix);

Index: CairoMatrix.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/CairoMatrix.xs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoMatrix.xs	11 Nov 2004 02:20:32 -0000	1.3
+++ CairoMatrix.xs	12 Nov 2004 03:26:34 -0000	1.4
@@ -11,12 +11,8 @@
 MODULE = Cairo::Matrix	PACKAGE = Cairo::Matrix PREFIX = cairo_matrix_
 
 cairo_matrix_t * cairo_matrix_create (class);
-    ALIAS:
-	Cairo::Matrix::new = 1
     C_ARGS:
 	/* void */
-    CLEANUP:
-	CAIRO_PERL_UNUSED (ix);
 
 ## destroy should happen auto-magically
 ##void cairo_matrix_destroy (cairo_matrix_t * matrix);
@@ -24,8 +20,14 @@
     CODE:
 	cairo_matrix_destroy (matrix);
 
+## XXX: status return type?
 ## XXX: cairo_status_t cairo_matrix_copy (cairo_matrix_t * matrix, const cairo_matrix_t * other);
-cairo_status_t cairo_matrix_copy (cairo_matrix_t * matrix, cairo_matrix_t * other);
+cairo_matrix_t * cairo_matrix_copy (cairo_matrix_t * matrix);
+    CODE:
+	RETVAL = cairo_matrix_create ();
+	cairo_matrix_copy (matrix, RETVAL);
+    OUTPUT:
+	RETVAL
 
 cairo_status_t cairo_matrix_set_identity (cairo_matrix_t * matrix);
 
@@ -43,13 +45,19 @@
 
 cairo_status_t cairo_matrix_invert (cairo_matrix_t * matrix);
 
-## XXX: 
+## XXX: status return type?
 ##cairo_status_t cairo_matrix_multiply (cairo_matrix_t * result, cairo_matrix_t * a, const cairo_matrix_t * b);
+cairo_matrix_t * cairo_matrix_multiply (cairo_matrix_t * a, cairo_matrix_t * b);
+    CODE:
+	RETVAL = cairo_matrix_create ();
+	cairo_matrix_multiply (RETVAL, a, b);
+    OUTPUT:
+	RETVAL
 
 ## XXX: status return type?
 ##cairo_status_t cairo_matrix_transform_distance (cairo_matrix_t * matrix, double * dx, double * dy);
-void cairo_matrix_transform_distance (cairo_matrix_t * matrix, OUTLIST double dx, OUTLIST double dy);
+void cairo_matrix_transform_distance (cairo_matrix_t * matrix, IN_OUTLIST double dx, IN_OUTLIST double dy);
 
 ## XXX: status return type?
 ##cairo_status_t cairo_matrix_transform_point (cairo_matrix_t * matrix, double * x, double * y);
-void cairo_matrix_transform_point (cairo_matrix_t * matrix, OUTLIST double x, OUTLIST double y);
+void cairo_matrix_transform_point (cairo_matrix_t * matrix, IN_OUTLIST double x, IN_OUTLIST double y);

Index: CairoPattern.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/CairoPattern.xs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoPattern.xs	11 Nov 2004 02:20:32 -0000	1.3
+++ CairoPattern.xs	12 Nov 2004 03:26:34 -0000	1.4
@@ -34,7 +34,14 @@
   
 cairo_status_t cairo_pattern_set_matrix (cairo_pattern_t * pattern, cairo_matrix_t * matrix);
 
-cairo_status_t cairo_pattern_get_matrix (cairo_pattern_t * pattern, cairo_matrix_t * matrix);
+## XXX: status return type?
+## cairo_status_t cairo_pattern_get_matrix (cairo_pattern_t * pattern, cairo_matrix_t * matrix);
+cairo_matrix_t * cairo_pattern_get_matrix (cairo_pattern_t * pattern);
+    CODE:
+	RETVAL = cairo_matrix_create ();
+	cairo_pattern_get_matrix (pattern, RETVAL);
+    OUTPUT:
+	RETVAL
 
 cairo_status_t cairo_pattern_set_extend (cairo_pattern_t * pattern, cairo_extend_t extend);
 

Index: CairoSurface.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/CairoSurface.xs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoSurface.xs	11 Nov 2004 02:20:32 -0000	1.3
+++ CairoSurface.xs	12 Nov 2004 03:26:34 -0000	1.4
@@ -14,84 +14,94 @@
  *	  don't want to put them in these pkgs, going to have to mangle somehow.
  */
 
-MODULE = Cairo::Surface	PACKAGE = Cairo::ImageSurface	PREFIX = cairo_image_surface_
-
-cairo_surface_t * cairo_image_surface_create (class, cairo_format_t format, int width, int height)
-    ALIAS:
-	Cairo::Surface::new = 1
-    C_ARGS:
-	format, width, height
-    CLEANUP:
-	CAIRO_PERL_UNUSED (ix);
-
 MODULE = Cairo::Surface	PACKAGE = Cairo::Surface PREFIX = cairo_surface_
 
-## destroy should happen auto-magically
-## void cairo_surface_destroy (cairo_surface_t * surface);
-void cairo_surface_DESTROY (cairo_surface_t * surface);
+cairo_surface_t * image_create (class, cairo_format_t format, int width, int height)
     CODE:
-	cairo_surface_destroy (surface);
-
-## XXX: this one is kinda odd, image data is the first param
-cairo_surface_t * cairo_surface_create_for_image (class, char * data, cairo_format_t format, int width, int height, int stride);
-    C_ARGS:
-	data, format, width, height, stride
-
-cairo_surface_t * cairo_surface_create_similar (cairo_surface_t * other, cairo_format_t format, int width, int height);
-
-void cairo_surface_reference (cairo_surface_t * surface);
-
-void cairo_surface_destroy (cairo_surface_t * surface);
-
-cairo_status_t cairo_surface_set_repeat (cairo_surface_t * surface, int repeat);
-
-cairo_status_t cairo_surface_set_matrix (cairo_surface_t * surface, cairo_matrix_t * matrix);
-
-cairo_status_t cairo_surface_get_matrix (cairo_surface_t * surface, cairo_matrix_t * matrix);
-
-cairo_status_t cairo_surface_set_filter (cairo_surface_t * surface, cairo_filter_t filter);
-
-cairo_filter_t cairo_surface_get_filter (cairo_surface_t * surface);
+	RETVAL = cairo_image_surface_create (format, width, height);
+    OUTPUT:
+	RETVAL
 
-cairo_surface_t * cairo_image_surface_create (class, cairo_format_t format, int width, int height);
-    C_ARGS:
-	format, width, height
+cairo_surface_t * image_create_for_data (class, char * data, cairo_format_t format, int width, int height, int stride);
+    CODE:
+	RETVAL = cairo_image_surface_create_for_data (data, format, width,
+						      height, stride);
+    OUTPUT:
+	RETVAL
 
-cairo_surface_t * cairo_image_surface_create_for_data (class, char * data, cairo_format_t format, int width, int height, int stride);
-    C_ARGS:
-	data, format, width, height, stride
+## XXX: duplicates the above, no need to bind
+##cairo_surface_t * cairo_surface_create_for_image (class, char * data, cairo_format_t format, int width, int height, int stride);
 
 #ifdef CAIRO_HAS_PS_SURFACE
 
-cairo_surface_t * cairo_ps_surface_create (class, FILE * file, double width_inches, double height_inches, double x_pixels_per_inch, double y_pixels_per_inch);
-   C_ARGS:
-	file, width_inches, height_inches, x_pixels_per_inch, y_pixels_per_inch
+cairo_surface_t * ps_create (class, FILE * file, double width_inches, double height_inches, double x_pixels_per_inch, double y_pixels_per_inch);
+   CODE:
+	RETVAL = cairo_ps_surface_create (file, width_inches, height_inches,
+					  x_pixels_per_inch, y_pixels_per_inch);
+    OUTPUT:
+	RETVAL
 
 #endif /* CAIRO_HAS_PS_SURFACE */
 
 #ifdef CAIRO_HAS_PNG_SURFACE
 
-cairo_surface_t * cairo_png_surface_create (class, FILE * file, cairo_format_t format, int width, int height);
-    C_ARGS:
-	file, format, width, height
+cairo_surface_t * png_create (class, FILE * file, cairo_format_t format, int width, int height);
+    CODE:
+	RETVAL = cairo_png_surface_create (file, format, width, height);
+    OUTPUT:
+	RETVAL
 
 #endif /* CAIRO_HAS_PNG_SURFACE */
 
 #ifdef CAIRO_HAS_XLIB_SURFACE
 
 ## XXX: Display, Drawable ...
-cairo_surface_t * cairo_xlib_surface_create (class, Display * dpy, Drawable drawable, Visual * visual, cairo_format_t format, Colormap colormap);
-    C_ARGS:
-	dpy, drawable, visual, format, colormap
+cairo_surface_t * xlib_create (class, Display * dpy, Drawable drawable, Visual * visual, cairo_format_t format, Colormap colormap);
+    CODE:
+	cairo_xlib_surface_create (dpy, drawable, visual, format, colormap);
+    OUTPUT:
+	RETVAL
 
 #endif /* CAIRO_HAS_XLIB_SURFACE */
 
 #ifdef CAIRO_HAS_GLITZ_SURFACE
 
 ## XXX: glitz_surface_t
-cairo_surface_t * cairo_glitz_surface_create (class, glitz_surface_t * surface);
-    C_ARGS:
-	surface
+cairo_surface_t * glitz_create (class, glitz_surface_t * surface);
+    CODE:
+	RETVAL = cairo_glitz_surface_create (surface);
+    OUTPUT:
+	RETVAL
 
 #endif /* CAIRO_HAS_GLITZ_SURFACE */
 
+## shouldn't have to deal with references from perl
+##void cairo_surface_reference (cairo_surface_t * surface);
+
+## destroy should happen auto-magically
+## void cairo_surface_destroy (cairo_surface_t * surface);
+void cairo_surface_DESTROY (cairo_surface_t * surface);
+    CODE:
+	cairo_surface_destroy (surface);
+
+cairo_surface_t * cairo_surface_create_similar (cairo_surface_t * other, cairo_format_t format, int width, int height);
+
+void cairo_surface_destroy (cairo_surface_t * surface);
+
+cairo_status_t cairo_surface_set_repeat (cairo_surface_t * surface, int repeat);
+
+cairo_status_t cairo_surface_set_matrix (cairo_surface_t * surface, cairo_matrix_t * matrix);
+
+## XXX: status return type?
+## cairo_status_t cairo_surface_get_matrix (cairo_surface_t * surface, cairo_matrix_t * matrix);
+cairo_matrix_t * cairo_surface_get_matrix (cairo_surface_t * surface);
+    CODE:
+	RETVAL = cairo_matrix_create ();
+	cairo_surface_get_matrix (surface, RETVAL);
+    OUTPUT:
+	RETVAL
+
+cairo_status_t cairo_surface_set_filter (cairo_surface_t * surface, cairo_filter_t filter);
+
+cairo_filter_t cairo_surface_get_filter (cairo_surface_t * surface);
+

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-perl/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ChangeLog	11 Nov 2004 02:24:34 -0000	1.2
+++ ChangeLog	12 Nov 2004 03:26:34 -0000	1.3
@@ -1,3 +1,27 @@
+2004/11/11 22:10 (-0500) rwmcfa1
+
+	* t/CairoMatrix.t, t/CairoPattern.t, t/CairoSurface.t: initial import,
+	95% complete tests
+
+	* Cairo.xs, CairoMatrix.xs, CairoSurface.xs, CairoPattern.xs: no more
+	new's, not really a good idea.
+	
+	* CairoFont.xs: all disabled for now
+
+	* CairoMatrix.xs: copy, multiply, and transforms fixed while doing
+	tests
+
+	* CairoPattern.xs: get_matrix fixed whlie doing tests
+
+	* CairoSurface.xs: cleaned up the namespace problems herein. fixed
+	several output funcs.
+
+	* MANIFEST: added TODO and new tests.
+
+	* MANIFEST.SKIP: skip CairoEnums.xs
+
+	* t/Cairo.t: no new test, change Surface stuff due to namespace above
+
 2004/11/10 21:08 (-0500) rwmcfa1
 
 	* TODO: initial import

Index: MANIFEST
===================================================================
RCS file: /cvs/cairo/cairo-perl/MANIFEST,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- MANIFEST	9 Nov 2004 02:59:43 -0000	1.2
+++ MANIFEST	12 Nov 2004 03:26:34 -0000	1.3
@@ -14,3 +14,7 @@
 META.yml
 README
 t/Cairo.t
+t/CairoMatrix.t
+t/CairoPattern.t
+t/CairoSurface.t
+TODO

Index: MANIFEST.SKIP
===================================================================
RCS file: /cvs/cairo/cairo-perl/MANIFEST.SKIP,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- MANIFEST.SKIP	9 Nov 2004 02:59:43 -0000	1.2
+++ MANIFEST.SKIP	12 Nov 2004 03:26:34 -0000	1.3
@@ -3,6 +3,7 @@
 .*\.bs
 build
 .*\.c
+CairoEnums.xs
 CVS
 Makefile$
 Makefile\.old

Index: TODO
===================================================================
RCS file: /cvs/cairo/cairo-perl/TODO,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- TODO	11 Nov 2004 02:20:32 -0000	1.1
+++ TODO	12 Nov 2004 03:26:34 -0000	1.2
@@ -1,2 +1,3 @@
 TODO's
  - creating/in/output/destroing structs (translate c <-> perl)
+ - xlib, xcb, glitz, types.




More information about the cairo-commit mailing list