-#define GET_OBJ(obj, type, o, desc) \
- type **(o) = NULL; \
-\
- Data_Get_Struct ((obj), type *, (o)); \
-\
- if (!*(o)) { \
- rb_raise (rb_eException, desc " destroyed already"); \
- return Qnil; \
- }
-
+static void c_free (Evas **e)
+{
+ /* do NOT call evas_free() here, since the Evas is freed
+ * by ecore_evas_free() eventually */
+ rb_hash_aset (parents, INT2NUM ((long) e), Qnil);
+
+ free (e);
+}
+
return INT2FIX (evas_font_cache_get (*e));
}
static VALUE c_font_cache_set (VALUE self, VALUE val)
{
return INT2FIX (evas_font_cache_get (*e));
}
static VALUE c_font_cache_set (VALUE self, VALUE val)
{
return INT2FIX (evas_image_cache_get (*e));
}
static VALUE c_image_cache_set (VALUE self, VALUE val)
{
return INT2FIX (evas_image_cache_get (*e));
}
static VALUE c_image_cache_set (VALUE self, VALUE val)
{
/* not publically instantiable yet */
rb_define_private_method (rb_singleton_class (cEvas),
"new", NULL, 0);
/* not publically instantiable yet */
rb_define_private_method (rb_singleton_class (cEvas),
"new", NULL, 0);
+ rb_define_method (cEvas, "inspect", c_inspect, 0);
+ rb_define_method (cEvas, "render", c_render, 0);
rb_define_method (cEvas, "font_path_clear", c_font_path_clear, 0);
rb_define_method (cEvas, "font_path_append", c_font_path_append, 1);
rb_define_method (cEvas, "font_path_prepend", c_font_path_prepend, 1);
rb_define_method (cEvas, "font_path_clear", c_font_path_clear, 0);
rb_define_method (cEvas, "font_path_append", c_font_path_append, 1);
rb_define_method (cEvas, "font_path_prepend", c_font_path_prepend, 1);