/*
- * $Id: rb_event_handler.c 77 2004-08-19 17:39:29Z tilman $
+ * $Id: rb_event_handler.c 343 2005-05-07 20:22:56Z tilman $
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
#include "rb_ecore.h"
#include "rb_event_handler.h"
+static int on_ecore_event (void *data, int type, void *event);
+
VALUE event_classes, cEcoreEvent;
static VALUE handlers;
rb_ary_push (handlers, self);
+ ecore_event_handler_add (t, on_ecore_event, NULL);
+
return self;
}
return Qnil;
}
-int on_ecore_event (void *data, int type, void *event)
+static int on_ecore_event (void *data, int type, void *event)
{
VALUE handler, klass, obj, argv[1], res;
int handler_type, len, i;
if (type == ECORE_EVENT_SIGNAL_EXIT && !called)
ecore_main_loop_quit ();
- return 0;
+ /* call other event handlers, too */
+ return 1;
}
VALUE c_ev_generic_init (VALUE self, VALUE event)