Removed RCS-style IDs.
[ruby-ecore.git] / src / ecore / rb_event_handler.h
index a0fa0e15eaf61c43d6f9fd90bb2a9cb3ecda7c4e..d9a7fd307124d9e52fac8fab70a8468b37703fab 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id: rb_event_handler.h 77 2004-08-19 17:39:29Z tilman $
- *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
  * This library is free software; you can redistribute it and/or
 #ifndef __RB_EVENT_HANDLER_H
 #define __RB_EVENT_HANDLER_H
 
-#define ADD_EVENT(mod, prefix, constname, clsname, obj) \
-       rb_define_const ((mod), #constname, \
-                        INT2FIX (prefix##constname)); \
-       ecore_event_handler_add (prefix##constname, on_ecore_event, \
-                                NULL); \
+#define ADD_EVENT(mod, constname, clsname, obj) \
+       rb_remove_method (rb_singleton_class (cEcoreEvent), "inherited"); \
 \
-       (obj) = rb_define_class_under ((mod), #clsname, cEcoreEvent); \
+       (obj) = rb_define_class_under ((mod), (clsname), cEcoreEvent); \
        rb_define_private_method (rb_singleton_class ((obj)), \
                                  "new", NULL, 0); \
 \
-       rb_hash_aset (event_classes, INT2FIX (prefix##constname), (obj));
+       rb_define_const ((obj), "TYPE", INT2FIX (constname)); \
+       rb_hash_aset (event_classes, INT2FIX (constname), (obj)); \
+       rb_define_singleton_method (cEcoreEvent, "inherited", c_ev_inherited, 1);
 
 void Init_EventHandler (void);
 
-int on_ecore_event (void *data, int type, void *event);
-VALUE c_ev_generic_init (VALUE self, VALUE event);
+VALUE c_ev_inherited (VALUE klass, VALUE child);
 
 #ifndef __RB_EVENT_HANDLER_C
 extern VALUE event_classes, cEcoreEvent;