projects
/
ruby-ecore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a configure task and extension tasks to build ruby-ecore.
[ruby-ecore.git]
/
src
/
ecore
/
rb_event_handler.h
diff --git
a/src/ecore/rb_event_handler.h
b/src/ecore/rb_event_handler.h
index 1c4015352aaa6b8bf9b5346d101fd37f0ac7d765..d9a7fd307124d9e52fac8fab70a8468b37703fab 100644
(file)
--- a/
src/ecore/rb_event_handler.h
+++ b/
src/ecore/rb_event_handler.h
@@
-1,6
+1,4
@@
/*
/*
- * $Id: rb_event_handler.h 343 2005-05-07 20:22:56Z tilman $
- *
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
* This library is free software; you can redistribute it and/or
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
* This library is free software; you can redistribute it and/or
@@
-21,19
+19,20
@@
#ifndef __RB_EVENT_HANDLER_H
#define __RB_EVENT_HANDLER_H
#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)); \
+#define ADD_EVENT(mod, constname, clsname, obj) \
+ rb_remove_method (rb_singleton_class (cEcoreEvent), "inherited"); \
\
(obj) = rb_define_class_under ((mod), (clsname), cEcoreEvent); \
rb_define_private_method (rb_singleton_class ((obj)), \
"new", NULL, 0); \
\
\
(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);
void Init_EventHandler (void);
-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;
#ifndef __RB_EVENT_HANDLER_C
extern VALUE event_classes, cEcoreEvent;