+ if (!rb_block_given_p ())
+ return Qnil;
+
+ cb = rb_block_proc ();
+
+ if (NIL_P (e->callbacks))
+ e->callbacks = rb_ary_new ();
+
+ rb_ary_push (e->callbacks, cb);
+
+ edje_object_signal_callback_add (e->real.real,
+ StringValuePtr (signal),
+ ssrc, on_signal, (void *) cb);
+
+ return Qnil;
+}
+
+/*
+ * call-seq:
+ * edje.play? => true or false
+ *
+ * Returns true if <i>edje</i> is in play mode, else returns false.
+ */
+static VALUE c_play_get (VALUE self)
+{
+ GET_OBJ (self, RbEdje, e);
+
+ return edje_object_play_get (e->real.real) ? Qtrue : Qfalse;
+}
+
+/*
+ * call-seq:
+ * edje.play(true or false)
+ *
+ * Sets <i>edje</i> to play resp. pause mode.
+ */
+static VALUE c_play_set (VALUE self, VALUE val)
+{
+ GET_OBJ (self, RbEdje, e);
+
+ CHECK_BOOL(val);
+
+ edje_object_play_set (e->real.real, val == Qtrue);
+
+ return Qnil;
+}
+
+/*
+ * call-seq:
+ * edje.animation? => true or false
+ *
+ * Returns the animation state of <i>edje</i>.
+ */
+static VALUE c_animation_get (VALUE self)
+{
+ GET_OBJ (self, RbEdje, e);
+
+ return edje_object_animation_get (e->real.real) ? Qtrue : Qfalse;
+}
+
+/*
+ * call-seq:
+ * edje.animation(true or false)
+ *
+ * Sets the animation state of <i>edje</i>.
+ */
+static VALUE c_animation_set (VALUE self, VALUE val)
+{
+ GET_OBJ (self, RbEdje, e);
+
+ CHECK_BOOL(val);
+
+ edje_object_animation_set (e->real.real, val == Qtrue);
+
+ 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;
+}
+
+static VALUE c_send_message (VALUE self, VALUE msg)
+{
+ VALUE m;
+ Edje_Message_Type type;
+ int id;
+
+ GET_OBJ (self, RbEdje, e);
+
+ CHECK_CLASS (msg, cMsg);
+
+ type = NUM2INT (rb_iv_get (msg, "@type"));
+ id = NUM2INT (rb_iv_get (msg, "@id"));
+ m = rb_funcall (msg, rb_intern ("serialize"), 0, NULL);
+
+ edje_object_message_send (e->real.real, type, id, (void *) m);
+
+ return Qnil;