goocanvas 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,41 @@
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 mGoo
25
+
26
+ VALUE RG_TARGET_NAMESPACE;
27
+
28
+ void
29
+ Init_goo(void)
30
+ {
31
+ RG_TARGET_NAMESPACE = rb_define_module("Goo");
32
+
33
+ G_DEF_CLASS(GOO_TYPE_CAIRO_MATRIX, "CairoMatrix", RG_TARGET_NAMESPACE);
34
+ G_DEF_CLASS(GOO_TYPE_CAIRO_PATTERN, "CairoPattern", RG_TARGET_NAMESPACE);
35
+ G_DEF_CLASS(GOO_TYPE_CAIRO_FILL_RULE, "CairoFillRule", RG_TARGET_NAMESPACE);
36
+ G_DEF_CLASS(GOO_TYPE_CAIRO_OPERATOR, "CairoOperator", RG_TARGET_NAMESPACE);
37
+ G_DEF_CLASS(GOO_TYPE_CAIRO_ANTIALIAS, "CairoAntiAlias", RG_TARGET_NAMESPACE);
38
+ G_DEF_CLASS(GOO_TYPE_CAIRO_LINE_CAP, "CairoLineCap", RG_TARGET_NAMESPACE);
39
+ G_DEF_CLASS(GOO_TYPE_CAIRO_LINE_JOIN, "CairoLineJoin", RG_TARGET_NAMESPACE);
40
+ G_DEF_CLASS(GOO_TYPE_CAIRO_HINT_METRICS, "CairoHintMetrics", RG_TARGET_NAMESPACE);
41
+ }
@@ -0,0 +1,47 @@
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 cMatrix
25
+
26
+ static VALUE
27
+ rg_to_goo(VALUE self)
28
+ {
29
+ GValue gval = {0,};
30
+ VALUE result;
31
+
32
+ g_value_init(&gval, GOO_TYPE_CAIRO_MATRIX);
33
+ g_value_set_boxed(&gval, RVAL2CRMATRIX(self));
34
+
35
+ result = rbgobj_gvalue_to_rvalue(&gval);
36
+ g_value_unset(&gval);
37
+
38
+ return result;
39
+ }
40
+
41
+ void
42
+ Init_goocairomatrix(VALUE mCairo)
43
+ {
44
+ VALUE RG_TARGET_NAMESPACE = rb_const_get(mCairo, rb_intern("Matrix"));
45
+
46
+ RG_DEF_METHOD(to_goo, 0);
47
+ }
@@ -0,0 +1,47 @@
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 cPattern
25
+
26
+ static VALUE
27
+ rg_to_goo(VALUE self)
28
+ {
29
+ GValue gval = {0,};
30
+ VALUE result;
31
+
32
+ g_value_init(&gval, GOO_TYPE_CAIRO_PATTERN);
33
+ g_value_set_boxed(&gval, RVAL2CRPATTERN(self));
34
+
35
+ result = rbgobj_gvalue_to_rvalue(&gval);
36
+ g_value_unset(&gval);
37
+
38
+ return result;
39
+ }
40
+
41
+ void
42
+ Init_goocairopattern(VALUE mCairo)
43
+ {
44
+ VALUE RG_TARGET_NAMESPACE = rb_const_get(mCairo, rb_intern("Pattern"));
45
+
46
+ RG_DEF_METHOD(to_goo, 0);
47
+ }
@@ -1,28 +1,28 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /* $Id: rbgoocanvas.c 3288 2008-09-13 10:07:44Z ktou $ */
3
- /* GooCanvas initialization
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"
22
23
 
23
- VALUE mGoo;
24
-
25
- #define SELF(self) RVAL2GC(self)
24
+ #define RG_TARGET_NAMESPACE cCanvas
25
+ #define SELF(self) RVAL2GOOCANVAS(self)
26
26
 
27
27
  void
28
28
  rb_goo_canvas_initialize_item_object(VALUE obj, GooCanvasItem *item)
@@ -32,14 +32,14 @@ rb_goo_canvas_initialize_item_object(VALUE obj, GooCanvasItem *item)
32
32
  }
33
33
 
34
34
  static VALUE
35
- rb_goo_canvas_new(VALUE self)
35
+ rg_initialize(VALUE self)
36
36
  {
37
37
  RBGTK_INITIALIZE(self, goo_canvas_new());
38
38
  return Qnil;
39
39
  }
40
40
 
41
41
  static VALUE
42
- rb_goo_canvas_set_bounds(VALUE self, VALUE left, VALUE top,
42
+ rg_set_bounds(VALUE self, VALUE left, VALUE top,
43
43
  VALUE right, VALUE bottom)
44
44
  {
45
45
  goo_canvas_set_bounds(SELF(self), NUM2DBL(left), NUM2DBL(top),
@@ -48,7 +48,7 @@ rb_goo_canvas_set_bounds(VALUE self, VALUE left, VALUE top,
48
48
  }
49
49
 
50
50
  static VALUE
51
- rb_goo_canvas_get_root_item(VALUE self)
51
+ rg_root_item(VALUE self)
52
52
  {
53
53
  VALUE root;
54
54
 
@@ -59,12 +59,12 @@ rb_goo_canvas_get_root_item(VALUE self)
59
59
  }
60
60
 
61
61
  static VALUE
62
- rb_goo_canvas_grab_focus(int argc, VALUE *argv, VALUE self)
62
+ rg_grab_focus(int argc, VALUE *argv, VALUE self)
63
63
  {
64
64
  VALUE item;
65
65
 
66
66
  if (rb_scan_args(argc, argv, "01", &item) == 1) {
67
- goo_canvas_grab_focus(SELF(self), RVAL2GCI(item));
67
+ goo_canvas_grab_focus(SELF(self), RVAL2GOOCANVASITEM(item));
68
68
  } else {
69
69
  rb_call_super(0, 0);
70
70
  }
@@ -73,10 +73,10 @@ rb_goo_canvas_grab_focus(int argc, VALUE *argv, VALUE self)
73
73
  }
74
74
 
75
75
  static VALUE
76
- rb_goo_canvas_pointer_grab(VALUE self, VALUE item, VALUE event_mask, VALUE cursor, VALUE etime)
76
+ rg_pointer_grab(VALUE self, VALUE item, VALUE event_mask, VALUE cursor, VALUE etime)
77
77
  {
78
78
  return GENUM2RVAL(
79
- goo_canvas_pointer_grab(SELF(self), RVAL2GCI(item),
79
+ goo_canvas_pointer_grab(SELF(self), RVAL2GOOCANVASITEM(item),
80
80
  NUM2INT(event_mask),
81
81
  (GdkCursor *)RVAL2BOXED(cursor, GDK_TYPE_CURSOR),
82
82
  NIL_P(etime) ? 0 : NUM2UINT(etime)),
@@ -84,15 +84,15 @@ rb_goo_canvas_pointer_grab(VALUE self, VALUE item, VALUE event_mask, VALUE curso
84
84
  }
85
85
 
86
86
  static VALUE
87
- rb_goo_canvas_pointer_ungrab(VALUE self, VALUE item, VALUE etime)
87
+ rg_pointer_ungrab(VALUE self, VALUE item, VALUE etime)
88
88
  {
89
- goo_canvas_pointer_ungrab(SELF(self), RVAL2GCI(item),
89
+ goo_canvas_pointer_ungrab(SELF(self), RVAL2GOOCANVASITEM(item),
90
90
  NIL_P(etime) ? 0 : NUM2UINT(etime));
91
91
  return self;
92
92
  }
93
93
 
94
94
  static VALUE
95
- rb_goo_canvas_render(VALUE self, VALUE cr, VALUE rb_bounds, VALUE scale)
95
+ rg_render(VALUE self, VALUE cr, VALUE rb_bounds, VALUE scale)
96
96
  {
97
97
  GooCanvasBounds bounds;
98
98
 
@@ -103,7 +103,7 @@ rb_goo_canvas_render(VALUE self, VALUE cr, VALUE rb_bounds, VALUE scale)
103
103
  }
104
104
 
105
105
  static VALUE
106
- rb_goo_canvas_scroll_to(VALUE self, VALUE left, VALUE top)
106
+ rg_scroll_to(VALUE self, VALUE left, VALUE top)
107
107
  {
108
108
  goo_canvas_scroll_to(SELF(self), NUM2DBL(left), NUM2DBL(top));
109
109
  return self;
@@ -112,125 +112,33 @@ rb_goo_canvas_scroll_to(VALUE self, VALUE left, VALUE top)
112
112
  void
113
113
  Init_goocanvas(void)
114
114
  {
115
- VALUE cGooCanvas;
116
-
117
- mGoo = rb_define_module("Goo");
118
- cGooCanvas = G_DEF_CLASS(GOO_TYPE_CANVAS, "Canvas", mGoo);
119
-
120
- rb_define_method(cGooCanvas, "initialize", rb_goo_canvas_new, 0);
121
- rb_define_method(cGooCanvas, "set_bounds", rb_goo_canvas_set_bounds, 4);
122
- rb_define_method(cGooCanvas, "root_item", rb_goo_canvas_get_root_item, 0);
123
- rb_define_method(cGooCanvas, "grab_focus", rb_goo_canvas_grab_focus, -1);
124
- rb_define_method(cGooCanvas, "pointer_grab", rb_goo_canvas_pointer_grab, 4);
125
- rb_define_method(cGooCanvas, "pointer_ungrab",
126
- rb_goo_canvas_pointer_ungrab, 2);
127
- rb_define_method(cGooCanvas, "render", rb_goo_canvas_render, 3);
128
- rb_define_method(cGooCanvas, "scroll_to", rb_goo_canvas_scroll_to, 2);
129
-
130
- Init_goocanvasitem(); /* Goo::CanvasItem */
131
- Init_goocanvastext(); /* Goo::CanvasText */
132
- Init_goocanvasrect(); /* Goo::CanvasRect */
133
- Init_goocanvasellipse(); /* Goo::CanvasEllipse */
134
- Init_goocanvaspolyline(); /* Goo::CanvasPolyline */
135
- Init_goocanvasimage(); /* Goo::CanvasImage */
136
- Init_goocanvastable(); /* Goo::CanvasTable */
137
- Init_goocanvaswidget(); /* Goo::CanvasWidget */
138
- Init_goocanvasstyle(); /* Goo::CanvasStyle */
139
- Init_goocanvasgroup(); /* Goo::CanvasGroup */
140
- Init_goocairo(); /* conversion from Cairo types to GooCairo types */
141
-
142
- #if 0
143
- GooCanvasItem* goo_canvas_get_root_item (GooCanvas *canvas);
144
- void goo_canvas_set_root_item (GooCanvas *canvas,
145
- GooCanvasItem *item);
146
-
147
- GooCanvasItemModel* goo_canvas_get_root_item_model (GooCanvas *canvas);
148
- void goo_canvas_set_root_item_model (GooCanvas *canvas,
149
- GooCanvasItemModel *model);
150
-
151
- GooCanvasItem* goo_canvas_get_item (GooCanvas *canvas,
152
- GooCanvasItemModel *model);
153
- GooCanvasItem* goo_canvas_get_item_at (GooCanvas *canvas,
154
- gdouble x,
155
- gdouble y,
156
- gboolean is_pointer_event);
157
-
158
- gdouble goo_canvas_get_scale (GooCanvas *canvas);
159
- void goo_canvas_set_scale (GooCanvas *canvas,
160
- gdouble scale);
161
-
162
- void goo_canvas_get_bounds (GooCanvas *canvas,
163
- gdouble *left,
164
- gdouble *top,
165
- gdouble *right,
166
- gdouble *bottom);
167
-
168
-
169
- void goo_canvas_grab_focus (GooCanvas *canvas,
170
- GooCanvasItem *item);
171
-
172
- void goo_canvas_render (GooCanvas *canvas,
173
- cairo_t *cr,
174
- GooCanvasBounds *bounds,
175
- gdouble scale);
176
-
177
- /*
178
- * Coordinate conversion.
179
- */
180
- void goo_canvas_convert_to_pixels (GooCanvas *canvas,
181
- gdouble *x,
182
- gdouble *y);
183
- void goo_canvas_convert_from_pixels (GooCanvas *canvas,
184
- gdouble *x,
185
- gdouble *y);
186
-
187
- void goo_canvas_convert_to_item_space (GooCanvas *canvas,
188
- GooCanvasItem *item,
189
- gdouble *x,
190
- gdouble *y);
191
- void goo_canvas_convert_from_item_space (GooCanvas *canvas,
192
- GooCanvasItem *item,
193
- gdouble *x,
194
- gdouble *y);
195
-
196
-
197
- /*
198
- * Pointer/keyboard grabbing & ungrabbing.
199
- */
200
- GdkGrabStatus goo_canvas_pointer_grab (GooCanvas *canvas,
201
- GooCanvasItem *item,
202
- GdkEventMask event_mask,
203
- GdkCursor *cursor,
204
- guint32 time);
205
- void goo_canvas_pointer_ungrab (GooCanvas *canvas,
206
- GooCanvasItem *item,
207
- guint32 time);
208
- GdkGrabStatus goo_canvas_keyboard_grab (GooCanvas *canvas,
209
- GooCanvasItem *item,
210
- gboolean owner_events,
211
- guint32 time);
212
- void goo_canvas_keyboard_ungrab (GooCanvas *canvas,
213
- GooCanvasItem *item,
214
- guint32 time);
215
-
216
-
217
- /*
218
- * Internal functions, mainly for canvas subclasses and item implementations.
219
- */
220
- GooCanvasItem* goo_canvas_create_item (GooCanvas *canvas,
221
- GooCanvasItemModel *model);
222
- void goo_canvas_unregister_item (GooCanvas *canvas,
223
- GooCanvasItemModel *model);
224
- void goo_canvas_update (GooCanvas *canvas);
225
- void goo_canvas_request_update (GooCanvas *canvas);
226
- void goo_canvas_request_redraw (GooCanvas *canvas,
227
- GooCanvasBounds *bounds);
228
- gdouble goo_canvas_get_default_line_width (GooCanvas *canvas);
229
-
230
-
231
- void goo_canvas_register_widget_item (GooCanvas *canvas,
232
- GooCanvasWidget *witem);
233
- void goo_canvas_unregister_widget_item (GooCanvas *canvas,
234
- GooCanvasWidget *witem);
235
- #endif
115
+ Init_goo();
116
+
117
+ VALUE RG_TARGET_NAMESPACE;
118
+
119
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(GOO_TYPE_CANVAS, "Canvas", mGoo);
120
+ VALUE mCairo = rb_const_get(rb_mKernel, rb_intern("Cairo"));
121
+
122
+ RG_DEF_METHOD(initialize, 0);
123
+ RG_DEF_METHOD(set_bounds, 4);
124
+ RG_DEF_METHOD(root_item, 0);
125
+ RG_DEF_METHOD(grab_focus, -1);
126
+ RG_DEF_METHOD(pointer_grab, 4);
127
+ RG_DEF_METHOD(pointer_ungrab, 2);
128
+ RG_DEF_METHOD(render, 3);
129
+ RG_DEF_METHOD(scroll_to, 2);
130
+
131
+ Init_goocanvasitem(mGoo); /* Goo::CanvasItem */
132
+ Init_goocanvastext(mGoo); /* Goo::CanvasText */
133
+ Init_goocanvasrect(mGoo); /* Goo::CanvasRect */
134
+ Init_goocanvasellipse(mGoo); /* Goo::CanvasEllipse */
135
+ Init_goocanvaspolyline(mGoo); /* Goo::CanvasPolyline */
136
+ Init_goocanvaspoints(mGoo); /* Goo::CanvasPoints */
137
+ Init_goocanvasimage(mGoo); /* Goo::CanvasImage */
138
+ Init_goocanvastable(mGoo); /* Goo::CanvasTable */
139
+ Init_goocanvaswidget(mGoo); /* Goo::CanvasWidget */
140
+ Init_goocanvasstyle(mGoo); /* Goo::CanvasStyle */
141
+ Init_goocanvasgroup(mGoo); /* Goo::CanvasGroup */
142
+ Init_goocairopattern(mCairo);
143
+ Init_goocairomatrix(mCairo);
236
144
  }
@@ -1,46 +1,38 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /* $Id: rbgoocanvas.h 3288 2008-09-13 10:07:44Z ktou $ */
3
- /* GooCanvas main header
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
- #ifndef _RBGOOCANVAS_H_included
22
- #define _RBGOOCANVAS_H_included
22
+ #ifndef __RBGOOCANVAS_H__
23
+ #define __RBGOOCANVAS_H__
23
24
 
24
25
  #include <rb_cairo.h>
25
26
  #include <rbgtk.h>
26
27
  #include <goocanvas.h>
27
28
 
28
29
  #include "rbgoo_canvasversion.h"
29
-
30
- #define RVAL2GC(obj) GOO_CANVAS(RVAL2GOBJ(obj))
31
- #define RVAL2GCI(obj) GOO_CANVAS_ITEM(RVAL2GOBJ(obj))
32
- #define RVAL2GCS(obj) GOO_CANVAS_STYLE(RVAL2GOBJ(obj))
33
-
34
- #define RVAL2GCPOINTS(obj) \
35
- ((GooCanvasPoints *)(RVAL2BOXED(obj, GOO_TYPE_CANVAS_POINTS)))
30
+ #include "rbgoocanvasconversions.h"
36
31
 
37
32
  #define RVAL2GCBOUNDS(obj, bounds) \
38
33
  (ruby_to_goo_canvas_bounds(obj, bounds))
39
34
 
40
- #define RVAL2GTK_WIDGET(obj) GTK_WIDGET(RVAL2GOBJ(obj))
41
-
42
- #define RVAL2GDK_PIXBUF(obj) GDK_PIXBUF(RVAL2GOBJ(obj))
43
-
35
+ #define RVAL2GTKWIDGET(obj) GTK_WIDGET(RVAL2GOBJ(obj))
44
36
 
45
37
  #define RB_GOO_CANVAS_ITEM_INITIALIZE(obj, item) \
46
38
  (rb_goo_canvas_initialize_item_object(obj, GOO_CANVAS_ITEM(item)))
@@ -48,19 +40,6 @@
48
40
  void rb_goo_canvas_initialize_item_object(VALUE obj, GooCanvasItem *item);
49
41
  GooCanvasBounds *ruby_to_goo_canvas_bounds(VALUE rb_bounds, GooCanvasBounds *dest_bounds);
50
42
 
51
- void Init_goocanvas(void); /* Goo::Canvas */
52
- void Init_goocanvasitem(void); /* Goo::CanvasItem */
53
- void Init_goocanvastext(void); /* Goo::CanvasText */
54
- void Init_goocanvasrect(void); /* Goo::CanvasRect */
55
- void Init_goocanvasellipse(void); /* Goo::CanvasEllipse */
56
- void Init_goocanvaspolyline(void); /* Goo::CanvasPolyline */
57
- void Init_goocanvasimage(void); /* Goo::CanvasImage */
58
- void Init_goocanvastable(void); /* Goo::CanvasTable */
59
- void Init_goocanvaswidget(void); /* Goo::CanvasWidget */
60
- void Init_goocanvasstyle(void); /* Goo::CanvasStyle */
61
- void Init_goocanvasgroup(void); /* Goo::CanvasGroup */
62
- void Init_goocairo(void); /* conversion from Cairo types to GooCairo types */
63
-
64
43
  extern VALUE mGoo;
65
44
 
66
- #endif /* ! _RBGOOCANVAS_H_included */
45
+ #endif /* __RBGOOCANVAS_H__ */