projects
/
ruby-edje.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
edje_init() and edje_shutdown() aren't exported anymore.
[ruby-edje.git]
/
src
/
rb_edje.c
diff --git
a/src/rb_edje.c
b/src/rb_edje.c
index 6e32bf669572afdf3dd88296b58709f2b509fe1e..34b6dc534ac7daf44b3a5eba48f0e28a2e3d6327 100644
(file)
--- a/
src/rb_edje.c
+++ b/
src/rb_edje.c
@@
-1,5
+1,5
@@
/*
/*
- * $Id: rb_edje.c 2
1 2004-06-25 17:41:17
Z tilman $
+ * $Id: rb_edje.c 2
8 2004-07-08 18:35:51
Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
@@
-44,17
+44,31
@@
return Qnil; \
}
return Qnil; \
}
-VALUE cEdje;
+static void c_free (Evas_Object **e)
+{
+ c_evas_object_free (e);
+
+ edje_shutdown ();
+}
static VALUE c_new (VALUE klass, VALUE evas)
{
VALUE self, argv[1];
Evas_Object **edje;
static VALUE c_new (VALUE klass, VALUE evas)
{
VALUE self, argv[1];
Evas_Object **edje;
+ if (!rb_obj_is_kind_of (evas, cEvas)) {
+ rb_raise (rb_eTypeError,
+ "wrong argument type %s (expected Evas)",
+ rb_obj_classname (evas));
+ return Qnil;
+ }
+
GET_OBJ (evas, Evas, e, "Evas");
GET_OBJ (evas, Evas, e, "Evas");
+ edje_init ();
+
self = Data_Make_Struct (klass, Evas_Object *, c_evas_object_mark,
self = Data_Make_Struct (klass, Evas_Object *, c_evas_object_mark,
- c_
evas_object_
free, edje);
+ c_free, edje);
*edje = edje_object_add (*e);
argv[0] = evas;
*edje = edje_object_add (*e);
argv[0] = evas;
@@
-291,7
+305,7
@@
static VALUE c_animation_set (VALUE self, VALUE val)
void Init_Edje (void)
{
void Init_Edje (void)
{
- cEdje = rb_define_class_under (mEdje, "Edje", cEvasObject);
+
VALUE
cEdje = rb_define_class_under (mEdje, "Edje", cEvasObject);
rb_define_singleton_method (cEdje, "new", c_new, 1);
rb_define_method (cEdje, "load", c_load, 2);
rb_define_singleton_method (cEdje, "new", c_new, 1);
rb_define_method (cEdje, "load", c_load, 2);
@@
-311,4
+325,3
@@
void Init_Edje (void)
rb_define_method (cEdje, "animation?", c_animation_get, 0);
rb_define_method (cEdje, "animation=", c_animation_set, 1);
}
rb_define_method (cEdje, "animation?", c_animation_get, 0);
rb_define_method (cEdje, "animation=", c_animation_set, 1);
}
-