diff nodejs/observer.m4 @ 648:e13dbfd37eab

JS binding generator and observer definition with the generator
author Thinker K.F. Li <thinker@branda.to>
date Thu, 29 Jul 2010 01:02:29 +0800
parents
children 2030e5d9f7f7
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nodejs/observer.m4	Thu Jul 29 01:02:29 2010 +0800
@@ -0,0 +1,12 @@
+STRUCT([event], [event_t],
+       [INT([event]), OBJ([tgt], [subject]),
+        OBJ([cur_tgt], [subject]), INT([flags])], [])
+
+STRUCT([observer], [observer_t],
+       [INT([type])], [])
+
+STRUCT([subject], [subject_t], [],
+       [METHOD([add_event_observer], [subject_add_event_observer],
+       	       (INT([type]), FUNC([handler])), 2),
+        METHOD([remove_observer], [subject_remove_observer],
+	       (OBJ([observer], [observer_t])), 1)])