/*
- * $Id: rb_edje.c 96 2004-08-23 15:21:41Z tilman $
+ * $Id: rb_edje.c 129 2004-10-22 17:03:35Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
return Qnil;
}
+static VALUE c_data_get (VALUE self, VALUE key)
+{
+ const char *s;
+
+ GET_OBJ (self, RbEdje, e);
+
+ Check_Type (key, T_STRING);
+
+ s = edje_object_data_get (e->real.real, StringValuePtr (key));
+
+ return s ? rb_str_new2 (s) : Qnil;
+}
+
void Init_Edje (void)
{
cEdje = rb_define_class_under (mEdje, "Edje", cEvasObject);
rb_define_method (cEdje, "play=", c_play_set, 1);
rb_define_method (cEdje, "animation?", c_animation_get, 0);
rb_define_method (cEdje, "animation=", c_animation_set, 1);
+ rb_define_method (cEdje, "data", c_data_get, 1);
}