+static void on_signal (void *data, Evas_Object *o,
+ const char *emission, const char *src) {
+ rb_funcall ((VALUE) data, rb_intern ("call"), 1,
+ rb_str_new2 (emission), rb_str_new2 (src));
+}
+
+static VALUE c_on_signal (VALUE self, VALUE signal, VALUE src)
+{
+ GET_OBJ (self, Evas_Object, e, "Edje");
+
+ Check_Type (signal, T_STRING);
+ Check_Type (src, T_STRING);
+
+ if (!rb_block_given_p ())
+ return Qnil;
+
+ edje_object_signal_callback_add (*e, StringValuePtr (signal),
+ StringValuePtr (src), on_signal,
+ (void *) rb_block_proc ());
+
+ return Qnil;
+}
+