[cairo-commit] rcairo/packages/cairo/ext rb_cairo.c, 1.15, 1.16 rb_cairo.h, 1.15, 1.16 rb_cairo_context.c, 1.28, 1.29 rb_cairo_font_options.c, 1.5, 1.6 rb_cairo_glyph.c, 1.8, 1.9 rb_cairo_matrix.c, 1.16, 1.17 rb_cairo_pattern.c, 1.15, 1.16 rb_cairo_surface.c, 1.27, 1.28

Kouhei Sutou commit at pdx.freedesktop.org
Sun Oct 15 00:12:36 PDT 2006


Committed by: kou

Update of /cvs/cairo/rcairo/packages/cairo/ext
In directory kemper:/tmp/cvs-serv15502/packages/cairo/ext

Modified Files:
	rb_cairo.c rb_cairo.h rb_cairo_context.c 
	rb_cairo_font_options.c rb_cairo_glyph.c rb_cairo_matrix.c 
	rb_cairo_pattern.c rb_cairo_surface.c 
Log Message:
* packages/cairo/lib/cairo.rb: moved Cairo.__add_one_arg_setter
  call to ...
* packages/cairo/ext/rb_cairo.c, packages/cairo/ext/rb_cairo.h,
  packages/cairo/ext/rb_cairo_context.c,
  packages/cairo/ext/rb_cairo_font_options.c,
  packages/cairo/ext/rb_cairo_glyph.c,
  packages/cairo/ext/rb_cairo_matrix.c,
  packages/cairo/ext/rb_cairo_pattern.c,
  packages/cairo/ext/rb_cairo_surface.c: ... here.


Index: rb_cairo.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- rb_cairo.c	15 Oct 2006 06:54:07 -0000	1.15
+++ rb_cairo.c	15 Oct 2006 07:12:33 -0000	1.16
@@ -31,12 +31,21 @@
 extern void Init_cairo_pattern (void);
 extern void Init_cairo_glyph (void);
 
+static ID id__add_one_arg_setter;
+
+void
+rb_cairo_def_setters (VALUE klass)
+{
+  rb_funcall (rb_mCairo, id__add_one_arg_setter, 1, klass);
+}
 
 void
 Init_cairo ()
 {
   int major, minor, micro;
-  
+
+  id__add_one_arg_setter = rb_intern("__add_one_arg_setter");
+
   rb_mCairo = rb_define_module ("Cairo");
 
   rb_define_const (rb_mCairo, "BUILD_VERSION",

Index: rb_cairo.h
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- rb_cairo.h	1 Jul 2006 14:45:55 -0000	1.15
+++ rb_cairo.h	15 Oct 2006 07:12:33 -0000	1.16
@@ -167,4 +167,8 @@
 
 void rb_cairo_check_status (cairo_status_t status);
 
+
+#define RB_CAIRO_DEF_SETTERS(klass) rb_cairo_def_setters(klass);
+void rb_cairo_def_setters (VALUE klass);
+
 #endif

Index: rb_cairo_context.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo_context.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- rb_cairo_context.c	27 Jun 2006 14:29:45 -0000	1.28
+++ rb_cairo_context.c	15 Oct 2006 07:12:33 -0000	1.29
@@ -1229,4 +1229,6 @@
   rb_define_method (rb_cCairo_Context, "copy_path", cr_copy_path, 0);
   rb_define_method (rb_cCairo_Context, "copy_path_flat", cr_copy_path_flat, 0);
   rb_define_method (rb_cCairo_Context, "append_path", cr_copy_append_path, 1);
+
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_Context);
 }

Index: rb_cairo_font_options.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo_font_options.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rb_cairo_font_options.c	11 Oct 2005 13:23:49 -0000	1.5
+++ rb_cairo_font_options.c	15 Oct 2006 07:12:33 -0000	1.6
@@ -190,4 +190,6 @@
                     cr_options_set_hint_metrics, 1);
   rb_define_method (rb_cCairo_FontOptions, "hint_metrics",
                     cr_options_get_hint_metrics, 0);
+
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_FontOptions);
 }

Index: rb_cairo_glyph.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo_glyph.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- rb_cairo_glyph.c	10 Oct 2005 15:40:26 -0000	1.8
+++ rb_cairo_glyph.c	15 Oct 2006 07:12:33 -0000	1.9
@@ -153,4 +153,6 @@
   rb_define_method (rb_cCairo_Glyph, "set_y", cr_glyph_set_y, 1);
 
   rb_define_method (rb_cCairo_Glyph, "to_s", cr_glyph_to_s, 0);
+
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_Glyph);
 }

Index: rb_cairo_matrix.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo_matrix.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- rb_cairo_matrix.c	10 Oct 2005 15:40:26 -0000	1.16
+++ rb_cairo_matrix.c	15 Oct 2006 07:12:33 -0000	1.17
@@ -251,4 +251,7 @@
   rb_define_method (rb_cCairo_Matrix, "set", cr_matrix_set, 6);
   rb_define_method (rb_cCairo_Matrix, "to_a", cr_matrix_to_a, 0);
   rb_define_method (rb_cCairo_Matrix, "to_s", cr_matrix_to_s, 0);
+
+
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_Matrix);
 }

Index: rb_cairo_pattern.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo_pattern.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- rb_cairo_pattern.c	2 May 2006 05:37:02 -0000	1.15
+++ rb_cairo_pattern.c	15 Oct 2006 07:12:33 -0000	1.16
@@ -321,16 +321,20 @@
 
   rb_define_method (rb_cCairo_Pattern, "set_matrix", cr_pattern_set_matrix, 1);
   rb_define_method (rb_cCairo_Pattern, "matrix", cr_pattern_get_matrix, 0);
-  
+
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_Pattern);
+
   rb_cCairo_SolidPattern =
     rb_define_class_under (rb_mCairo, "SolidPattern", rb_cCairo_Pattern);
 
   rb_define_method (rb_cCairo_SolidPattern, "initialize",
                     cr_solid_pattern_initialize, -1);
 
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_SolidPattern);
+
   rb_cCairo_SurfacePattern =
     rb_define_class_under (rb_mCairo, "SurfacePattern", rb_cCairo_Pattern);
-  
+
   rb_define_method (rb_cCairo_SurfacePattern, "initialize",
                     cr_surface_pattern_initialize, 1);
 
@@ -343,6 +347,8 @@
   rb_define_method (rb_cCairo_SurfacePattern, "filter",
                     cr_surface_pattern_get_filter, 0);
 
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_SurfacePattern);
+
   rb_cCairo_GradientPattern =
     rb_define_class_under (rb_mCairo, "GradientPattern", rb_cCairo_Pattern);
 
@@ -353,6 +359,8 @@
   rb_define_alias (rb_cCairo_GradientPattern,
                    "add_color_stop", "add_color_stop_rgba");
 
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_GradientPattern);
+
   rb_cCairo_LinearPattern =
     rb_define_class_under (rb_mCairo, "LinearPattern",
                            rb_cCairo_GradientPattern);
@@ -360,10 +368,14 @@
   rb_define_method (rb_cCairo_LinearPattern, "initialize",
                     cr_linear_pattern_initialize, 4);
 
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_LinearPattern);
+
   rb_cCairo_RadialPattern =
     rb_define_class_under (rb_mCairo, "RadialPattern",
                            rb_cCairo_GradientPattern);
 
   rb_define_method (rb_cCairo_RadialPattern, "initialize",
                     cr_radial_pattern_initialize, 6);
+
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_RadialPattern);
 }

Index: rb_cairo_surface.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo_surface.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- rb_cairo_surface.c	1 Jul 2006 14:45:55 -0000	1.27
+++ rb_cairo_surface.c	15 Oct 2006 07:12:33 -0000	1.28
@@ -810,6 +810,8 @@
   rb_define_method (rb_cCairo_Surface, "set_fallback_resolution",
                     cr_surface_set_fallback_resolution, 2);
 
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_Surface);
+
   /* Image-surface */
   rb_cCairo_ImageSurface =
     rb_define_class_under (rb_mCairo, "ImageSurface", rb_cCairo_Surface);
@@ -861,6 +863,8 @@
                     cr_ps_surface_dsc_begin_setup, 0);
   rb_define_method (rb_cCairo_PSSurface, "dsc_begin_page_setup",
                     cr_ps_surface_dsc_begin_page_setup, 0);
+
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_PSSurface);
 #else
   rb_cCairo_PSSurface = Qnil;
 #endif
@@ -871,6 +875,8 @@
 
   rb_define_method (rb_cCairo_PDFSurface, "set_size",
                     cr_pdf_surface_set_size, 2);
+
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_PDFSurface);
 #else
   rb_cCairo_PDFSurface = Qnil;
 #endif
@@ -891,6 +897,8 @@
 
   rb_define_method (rb_cCairo_SVGSurface, "restrict_to_version",
                     cr_svg_surface_restrict_to_version, 1);
+
+  RB_CAIRO_DEF_SETTERS (rb_cCairo_SVGSurface);
 #else
   rb_cCairo_SVGSurface = Qnil;
 #endif



More information about the cairo-commit mailing list