goocanvas 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,88 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
20
+ */
21
+
22
+ #include "rbgoocanvasprivate.h"
23
+
24
+ #define RG_TARGET_NAMESPACE cCanvasPoints
25
+ #define _SELF(self) RVAL2GOOCANVASPOINTS(self)
26
+
27
+ static VALUE
28
+ rg_initialize(VALUE self, VALUE num_points)
29
+ {
30
+ G_INITIALIZE(self, goo_canvas_points_new(NUM2INT(num_points)));
31
+ return Qnil;
32
+ }
33
+
34
+ static VALUE
35
+ rg_operator_get(VALUE self, VALUE point)
36
+ {
37
+ int i;
38
+ GooCanvasPoints *points;
39
+
40
+ i = NUM2INT(point);
41
+ points = _SELF(self);
42
+ if ((i < 0) || (i >= points->num_points))
43
+ rb_raise(rb_eArgError, "invalid point number %d", i);
44
+ return rb_ary_new3(2,
45
+ rb_float_new(points->coords[i * 2]),
46
+ rb_float_new(points->coords[i * 2 + 1]));
47
+ }
48
+
49
+ static VALUE
50
+ rg_operator_set(VALUE self, VALUE point, VALUE new_coords)
51
+ {
52
+ int i;
53
+ GooCanvasPoints *points;
54
+
55
+ i = NUM2INT(point);
56
+ points = _SELF(self);
57
+ if ((i < 0) || (i >= points->num_points))
58
+ rb_raise(rb_eArgError, "invalid point number %d", i);
59
+ if (TYPE(new_coords) != T_ARRAY)
60
+ rb_raise(rb_eArgError, "rb_goo_canvas_points_set should be given an array as new value");
61
+ if (RARRAY_LEN(new_coords) != 2)
62
+ rb_raise(rb_eArgError, "rb_goo_canvas_points_set should be given an array of length 2 as new value");
63
+ points->coords[i*2] = NUM2DBL(RARRAY_PTR(new_coords)[0]);
64
+ points->coords[i*2+1] = NUM2DBL(RARRAY_PTR(new_coords)[1]);
65
+ return self;
66
+ }
67
+
68
+ static VALUE
69
+ rg_num_points(VALUE self)
70
+ {
71
+ GooCanvasPoints *points;
72
+
73
+ points = _SELF(self);
74
+ return INT2NUM(points->num_points);
75
+ }
76
+
77
+ void
78
+ Init_goocanvaspoints(VALUE mGoo)
79
+ {
80
+ VALUE RG_TARGET_NAMESPACE;
81
+
82
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(GOO_TYPE_CANVAS_POINTS, "CanvasPoints", mGoo);
83
+
84
+ RG_DEF_METHOD(initialize, 1);
85
+ RG_DEF_METHOD_OPERATOR("[]", get, 1);
86
+ RG_DEF_METHOD_OPERATOR("[]=", set, 2);
87
+ RG_DEF_METHOD(num_points, 0);
88
+ }
@@ -1,102 +1,45 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /* $Id: rbgoocanvaspolyline.c 3426 2008-11-01 14:20:52Z ktou $ */
3
- /* GooCanvasPolyline and GooCanvasPoints
4
- * Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
5
5
  *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License, or (at your option) any later version.
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
10
  *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
15
  *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
19
20
  */
20
21
 
21
- #include "rbgoocanvas.h"
22
+ #include "rbgoocanvasprivate.h"
23
+
24
+ #define RG_TARGET_NAMESPACE cCanvasPolyline
22
25
 
23
26
  static VALUE
24
- rb_goo_canvas_polyline_new(VALUE self, VALUE parent, VALUE close_path)
27
+ rg_initialize(VALUE self, VALUE parent, VALUE close_path)
25
28
  {
26
29
  GooCanvasItem *item;
27
- item = goo_canvas_polyline_new(RVAL2GCI(parent), RTEST(close_path), 0, NULL);
30
+ item = goo_canvas_polyline_new(RVAL2GOOCANVASITEM(parent), RTEST(close_path), 0, NULL);
28
31
  RB_GOO_CANVAS_ITEM_INITIALIZE(self, item);
29
32
  G_CHILD_ADD(parent, self);
30
33
  return Qnil;
31
34
  }
32
35
 
33
- static VALUE
34
- rb_goo_canvas_points_new(VALUE self, VALUE num_points)
35
- {
36
- G_INITIALIZE(self, goo_canvas_points_new(NUM2INT(num_points)));
37
- return Qnil;
38
- }
39
-
40
- static VALUE
41
- rb_goo_canvas_points_get(VALUE self, VALUE point)
42
- {
43
- int i;
44
- GooCanvasPoints *points;
45
-
46
- i = NUM2INT(point);
47
- points = RVAL2GCPOINTS(self);
48
- if ((i < 0) || (i >= points->num_points))
49
- rb_raise(rb_eArgError, "invalid point number %d", i);
50
- return rb_ary_new3(2,
51
- rb_float_new(points->coords[i * 2]),
52
- rb_float_new(points->coords[i * 2 + 1]));
53
- }
54
-
55
- static VALUE
56
- rb_goo_canvas_points_set(VALUE self, VALUE point, VALUE new_coords)
57
- {
58
- int i;
59
- GooCanvasPoints *points;
60
-
61
- i = NUM2INT(point);
62
- points = RVAL2GCPOINTS(self);
63
- if ((i < 0) || (i >= points->num_points))
64
- rb_raise(rb_eArgError, "invalid point number %d", i);
65
- if (TYPE(new_coords) != T_ARRAY)
66
- rb_raise(rb_eArgError, "rb_goo_canvas_points_set should be given an array as new value");
67
- if (RARRAY_LEN(new_coords) != 2)
68
- rb_raise(rb_eArgError, "rb_goo_canvas_points_set should be given an array of length 2 as new value");
69
- points->coords[i*2] = NUM2DBL(RARRAY_PTR(new_coords)[0]);
70
- points->coords[i*2+1] = NUM2DBL(RARRAY_PTR(new_coords)[1]);
71
- return self;
72
- }
73
-
74
- static VALUE
75
- rb_goo_canvas_points_get_num_points(VALUE self)
76
- {
77
- GooCanvasPoints *points;
78
-
79
- points = RVAL2GCPOINTS(self);
80
- return INT2NUM(points->num_points);
81
- }
82
-
83
36
  void
84
- Init_goocanvaspolyline(void)
37
+ Init_goocanvaspolyline(VALUE mGoo)
85
38
  {
86
- VALUE GooCanvasPolyline;
87
- VALUE GooCanvasPoints;
39
+ VALUE RG_TARGET_NAMESPACE;
88
40
 
89
- GooCanvasPolyline = G_DEF_CLASS(GOO_TYPE_CANVAS_POLYLINE,
41
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(GOO_TYPE_CANVAS_POLYLINE,
90
42
  "CanvasPolyline", mGoo);
91
43
 
92
- rb_define_method(GooCanvasPolyline, "initialize",
93
- rb_goo_canvas_polyline_new, 2);
94
-
95
- GooCanvasPoints = G_DEF_CLASS(GOO_TYPE_CANVAS_POINTS, "CanvasPoints", mGoo);
96
-
97
- rb_define_method(GooCanvasPoints, "initialize", rb_goo_canvas_points_new, 1);
98
- rb_define_method(GooCanvasPoints, "[]", rb_goo_canvas_points_get, 1);
99
- rb_define_method(GooCanvasPoints, "[]=", rb_goo_canvas_points_set, 2);
100
- rb_define_method(GooCanvasPoints, "num_points",
101
- rb_goo_canvas_points_get_num_points, 0);
44
+ RG_DEF_METHOD(initialize, 2);
102
45
  }
@@ -0,0 +1,43 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
+ * MA 02110-1301 USA
19
+ */
20
+
21
+ #ifndef __RBGOOCANVASPRIVATE_H__
22
+ #define __RBGOOCANVASPRIVATE_H__
23
+
24
+ #include <rbgdk-pixbuf.h>
25
+ #include "rbgoocanvas.h"
26
+
27
+ void Init_goocanvas(void); /* Goo::Canvas */
28
+ G_GNUC_INTERNAL void Init_goocanvasitem(VALUE mGoo); /* Goo::CanvasItem */
29
+ G_GNUC_INTERNAL void Init_goocanvastext(VALUE mGoo); /* Goo::CanvasText */
30
+ G_GNUC_INTERNAL void Init_goocanvasrect(VALUE mGoo); /* Goo::CanvasRect */
31
+ G_GNUC_INTERNAL void Init_goocanvasellipse(VALUE mGoo); /* Goo::CanvasEllipse */
32
+ G_GNUC_INTERNAL void Init_goocanvaspolyline(VALUE mGoo); /* Goo::CanvasPolyline */
33
+ G_GNUC_INTERNAL void Init_goocanvaspoints(VALUE mGoo); /* Goo::CanvasPoints */
34
+ G_GNUC_INTERNAL void Init_goocanvasimage(VALUE mGoo); /* Goo::CanvasImage */
35
+ G_GNUC_INTERNAL void Init_goocanvastable(VALUE mGoo); /* Goo::CanvasTable */
36
+ G_GNUC_INTERNAL void Init_goocanvaswidget(VALUE mGoo); /* Goo::CanvasWidget */
37
+ G_GNUC_INTERNAL void Init_goocanvasstyle(VALUE mGoo); /* Goo::CanvasStyle */
38
+ G_GNUC_INTERNAL void Init_goocanvasgroup(VALUE mGoo); /* Goo::CanvasGroup */
39
+ G_GNUC_INTERNAL void Init_goo(void);
40
+ G_GNUC_INTERNAL void Init_goocairopattern(VALUE mCairo);
41
+ G_GNUC_INTERNAL void Init_goocairomatrix(VALUE mCairo);
42
+
43
+ #endif /* __RBGOOCANVASPRIVATE_H__ */
@@ -1,31 +1,34 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /* $Id: rbgoocanvasrect.c 3288 2008-09-13 10:07:44Z ktou $ */
3
- /* GooCanvasRect
4
- * Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
5
5
  *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License, or (at your option) any later version.
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
10
  *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
15
  *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
19
20
  */
20
21
 
21
- #include "rbgoocanvas.h"
22
+ #include "rbgoocanvasprivate.h"
23
+
24
+ #define RG_TARGET_NAMESPACE cCanvasRect
22
25
 
23
26
  static VALUE
24
- rb_goo_canvas_rect_new(VALUE self, VALUE parent, VALUE x, VALUE y,
27
+ rg_initialize(VALUE self, VALUE parent, VALUE x, VALUE y,
25
28
  VALUE width, VALUE height)
26
29
  {
27
30
  GooCanvasItem *item;
28
- item = goo_canvas_rect_new(RVAL2GCI(parent),
31
+ item = goo_canvas_rect_new(RVAL2GOOCANVASITEM(parent),
29
32
  NUM2DBL(x),
30
33
  NUM2DBL(y),
31
34
  NUM2DBL(width),
@@ -37,11 +40,11 @@ rb_goo_canvas_rect_new(VALUE self, VALUE parent, VALUE x, VALUE y,
37
40
  }
38
41
 
39
42
  void
40
- Init_goocanvasrect(void)
43
+ Init_goocanvasrect(VALUE mGoo)
41
44
  {
42
- VALUE GooCanvasRect;
45
+ VALUE RG_TARGET_NAMESPACE;
43
46
 
44
- GooCanvasRect = G_DEF_CLASS(GOO_TYPE_CANVAS_RECT, "CanvasRect", mGoo);
47
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(GOO_TYPE_CANVAS_RECT, "CanvasRect", mGoo);
45
48
 
46
- rb_define_method(GooCanvasRect, "initialize", rb_goo_canvas_rect_new, 5);
49
+ RG_DEF_METHOD(initialize, 5);
47
50
  }
@@ -1,27 +1,31 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /* $Id: rbgoocanvasstyle.c 3288 2008-09-13 10:07:44Z ktou $ */
3
- /* GooCanvasStyle
4
- * Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
5
5
  *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License, or (at your option) any later version.
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
10
  *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
15
  *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
19
20
  */
20
21
 
21
- #include "rbgoocanvas.h"
22
+ #include "rbgoocanvasprivate.h"
23
+
24
+ #define RG_TARGET_NAMESPACE cCanvasStyle
25
+ #define _SELF(self) RVAL2GOOCANVASSTYLE(self)
22
26
 
23
27
  static VALUE
24
- rb_goo_canvas_style_new(VALUE self)
28
+ rg_initialize(VALUE self)
25
29
  {
26
30
  G_INITIALIZE(self, goo_canvas_style_new());
27
31
  return Qnil;
@@ -29,7 +33,7 @@ rb_goo_canvas_style_new(VALUE self)
29
33
 
30
34
  /* TODO: make it more generic, with maybe some part in Ruby */
31
35
  static VALUE
32
- rb_goo_canvas_style_set_fill_pattern(VALUE self, VALUE value)
36
+ rg_set_fill_pattern(VALUE self, VALUE value)
33
37
  {
34
38
  GValue gval = {0,};
35
39
  cairo_pattern_t *pattern;
@@ -37,7 +41,7 @@ rb_goo_canvas_style_set_fill_pattern(VALUE self, VALUE value)
37
41
  g_value_init(&gval, GOO_TYPE_CAIRO_PATTERN);
38
42
  pattern = RVAL2CRPATTERN(value);
39
43
  g_value_take_boxed(&gval, pattern);
40
- goo_canvas_style_set_property(RVAL2GCS(self),
44
+ goo_canvas_style_set_property(_SELF(self),
41
45
  goo_canvas_style_fill_pattern_id,
42
46
  &gval);
43
47
  g_value_unset(&gval);
@@ -47,15 +51,14 @@ rb_goo_canvas_style_set_fill_pattern(VALUE self, VALUE value)
47
51
  }
48
52
 
49
53
  void
50
- Init_goocanvasstyle(void)
54
+ Init_goocanvasstyle(VALUE mGoo)
51
55
  {
52
- VALUE GooCanvasStyle;
56
+ VALUE RG_TARGET_NAMESPACE;
57
+
58
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(GOO_TYPE_CANVAS_STYLE, "CanvasStyle", mGoo);
53
59
 
54
- GooCanvasStyle = G_DEF_CLASS(GOO_TYPE_CANVAS_STYLE, "CanvasStyle", mGoo);
60
+ RG_DEF_METHOD(initialize, 0);
61
+ RG_DEF_METHOD(set_fill_pattern, 1);
55
62
 
56
- rb_define_method(GooCanvasStyle, "initialize", rb_goo_canvas_style_new, 0);
57
- rb_define_method(GooCanvasStyle, "set_fill_pattern",
58
- rb_goo_canvas_style_set_fill_pattern, 1);
59
-
60
- G_DEF_SETTERS(GooCanvasStyle);
63
+ G_DEF_SETTERS(RG_TARGET_NAMESPACE);
61
64
  }
@@ -1,41 +1,44 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /* $Id: rbgoocanvastable.c 3288 2008-09-13 10:07:44Z ktou $ */
3
- /* GooCanvasTable
4
- * Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
5
5
  *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License, or (at your option) any later version.
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
10
  *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
15
  *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
19
20
  */
20
21
 
21
- #include "rbgoocanvas.h"
22
+ #include "rbgoocanvasprivate.h"
23
+
24
+ #define RG_TARGET_NAMESPACE cCanvasTable
22
25
 
23
26
  static VALUE
24
- rb_goo_canvas_table_new(VALUE self, VALUE parent)
27
+ rg_initialize(VALUE self, VALUE parent)
25
28
  {
26
29
  GooCanvasItem *item;
27
- item = goo_canvas_table_new(RVAL2GCI(parent), NULL);
30
+ item = goo_canvas_table_new(RVAL2GOOCANVASITEM(parent), NULL);
28
31
  RB_GOO_CANVAS_ITEM_INITIALIZE(self, item);
29
32
  G_CHILD_ADD(parent, self);
30
33
  return Qnil;
31
34
  }
32
35
 
33
36
  void
34
- Init_goocanvastable(void)
37
+ Init_goocanvastable(VALUE mGoo)
35
38
  {
36
- VALUE GooCanvasTable;
39
+ VALUE RG_TARGET_NAMESPACE;
37
40
 
38
- GooCanvasTable = G_DEF_CLASS(GOO_TYPE_CANVAS_TABLE, "CanvasTable", mGoo);
41
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(GOO_TYPE_CANVAS_TABLE, "CanvasTable", mGoo);
39
42
 
40
- rb_define_method(GooCanvasTable, "initialize", rb_goo_canvas_table_new, 1);
43
+ RG_DEF_METHOD(initialize, 1);
41
44
  }