diff nodejs/shapes.m4 @ 683:7685c57e29d0

Migrate JS shapes binding to gen_v8_binding.m4
author Thinker K.F. Li <thinker@branda.to>
date Sat, 07 Aug 2010 18:27:53 +0800
parents
children a05a4a27ff46
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nodejs/shapes.m4	Sat Aug 07 18:27:53 2010 +0800
@@ -0,0 +1,18 @@
+define([PROJ_PREFIX], [xnjsmb_auto_])dnl
+dnl
+STRUCT([shape], [shape_t],
+       [ACCESSOR([stroke_width],
+		 [xnjsmb_shape_stroke_width_get],
+		 [xnjsmb_shape_stroke_width_set])],
+       [METHOD([show], [sh_show], (), 0, []),
+        METHOD([hide], [sh_hide], (), 0, [])])
+
+STRUCT([path], [shape_t], [], [], (([INHERIT], [shape])))
+
+STRUCT([stext], [shape_t], [],
+       [METHOD([set_text], [sh_stext_set_text], (STR([txt])), 1, []),
+        METHOD([set_style], [xnjsmb_sh_stext_set_style],
+	       (ARRAY([blks]), ERR), 1, [])],
+       (([INHERIT], [shape])))
+
+STRUCT([image], [shape_t], [], [], (([INHERIT], [shape])))