Mercurial > MadButterfly
annotate nodejs/mbfly_njs.m4 @ 1464:28769a82a72d
Raise a maningful exception for traits that is not ready
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 17 Apr 2011 21:34:49 +0800 |
parents | df6ee4568ca2 |
children |
rev | line source |
---|---|
673
f5d2ff34c6f6
Definition of binding for mblfy_njs.cc
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 dnl |
f5d2ff34c6f6
Definition of binding for mblfy_njs.cc
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
2 define([PROJ_PREFIX], [xnjsmb_auto_])dnl |
f5d2ff34c6f6
Definition of binding for mblfy_njs.cc
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 dnl |
f5d2ff34c6f6
Definition of binding for mblfy_njs.cc
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
4 STRUCT([mb_rt], [njs_runtime_t], [], |
f5d2ff34c6f6
Definition of binding for mblfy_njs.cc
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
5 [METHOD([coord_new], [xnjsmb_coord_new], |
f5d2ff34c6f6
Definition of binding for mblfy_njs.cc
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
6 (OBJ([parent], [coord], [coord_t]), ERR), 1, |
683
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
7 [OBJ([coord], [coord_t])], |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
8 (([MOD], [xnjsmb_mb_rt_objs_mod]))), |
673
f5d2ff34c6f6
Definition of binding for mblfy_njs.cc
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
9 METHOD([redraw_changed], [xnjsmb_redraw_changed], (), 0, []), |
683
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
10 METHOD([redraw_all], [xnjsmb_redraw_all], (), 0, []), |
1053
df6ee4568ca2
Rename X_njs_MB_* to njs_mb_* for nodejs plugin.
Thinker K.F. Li <thinker@codemud.net>
parents:
871
diff
changeset
|
11 METHOD([flush], [njs_mb_flush], (), 0, []), |
683
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
12 METHOD([path_new], [xnjsmb_path_new], (STR(txt)), 1, |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
13 [OBJ([path], [shape_t])], (([MOD], [xnjsmb_mb_rt_objs_mod]))), |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
14 METHOD([stext_new], [xnjsmb_stext_new], |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
15 (STR(txt), NUMBER(x), NUMBER(y)), 3, |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
16 [OBJ([stext], [shape_t])], |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
17 (([MOD], [xnjsmb_mb_rt_objs_mod]))), |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
18 METHOD([image_new], [xnjsmb_image_new], |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
19 (NUMBER(x), NUMBER(y), NUMBER(w), NUMBER(h)), 4, |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
676
diff
changeset
|
20 [OBJ([image], [shape_t])], |
687
da12923a789a
Migrate paints.cc to use gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
683
diff
changeset
|
21 (([MOD], [xnjsmb_mb_rt_objs_mod]))), |
690
86c6ebf1de25
Add JS binding for sh_rect_t
Thinker K.F. Li <thinker@branda.to>
parents:
687
diff
changeset
|
22 METHOD([rect_new], [xnjsmb_rect_new], |
86c6ebf1de25
Add JS binding for sh_rect_t
Thinker K.F. Li <thinker@branda.to>
parents:
687
diff
changeset
|
23 (NUMBER(x), NUMBER(y), NUMBER(w), NUMBER(h), |
86c6ebf1de25
Add JS binding for sh_rect_t
Thinker K.F. Li <thinker@branda.to>
parents:
687
diff
changeset
|
24 NUMBER(rx), NUMBER(ry), ERR), 6, |
86c6ebf1de25
Add JS binding for sh_rect_t
Thinker K.F. Li <thinker@branda.to>
parents:
687
diff
changeset
|
25 [OBJ([rect], [shape_t])], |
86c6ebf1de25
Add JS binding for sh_rect_t
Thinker K.F. Li <thinker@branda.to>
parents:
687
diff
changeset
|
26 (([MOD], [xnjsmb_mb_rt_objs_mod]))), |
687
da12923a789a
Migrate paints.cc to use gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
683
diff
changeset
|
27 METHOD([paint_color_new], [xnjsmb_paint_color_new], |
da12923a789a
Migrate paints.cc to use gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
683
diff
changeset
|
28 (NUMBER(r), NUMBER(g), NUMBER(b), NUMBER(a), ERR), 4, |
da12923a789a
Migrate paints.cc to use gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
683
diff
changeset
|
29 [OBJ([paint_color], [paint_t])], |
da12923a789a
Migrate paints.cc to use gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
683
diff
changeset
|
30 (([MOD], [xnjsmb_mb_rt_objs_mod]))), |
da12923a789a
Migrate paints.cc to use gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
683
diff
changeset
|
31 METHOD([paint_image_new], [xnjsmb_paint_image_new], |
da12923a789a
Migrate paints.cc to use gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
683
diff
changeset
|
32 (OBJ([img], [img_data], [mb_img_data_t]), ERR), 1, |
da12923a789a
Migrate paints.cc to use gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
683
diff
changeset
|
33 [OBJ([paint_image], [paint_t])], |
733
163f0d9e6382
Add binding for linear and radial paints for JS
Thinker K.F. Li <thinker@branda.to>
parents:
693
diff
changeset
|
34 (([MOD], [xnjsmb_mb_rt_objs_mod]))), |
163f0d9e6382
Add binding for linear and radial paints for JS
Thinker K.F. Li <thinker@branda.to>
parents:
693
diff
changeset
|
35 METHOD([paint_linear_new], [xnjsmb_paint_linear_new], |
163f0d9e6382
Add binding for linear and radial paints for JS
Thinker K.F. Li <thinker@branda.to>
parents:
693
diff
changeset
|
36 (NUMBER(x1), NUMBER(y1), NUMBER(x2), NUMBER(y2), ERR), 4, |
163f0d9e6382
Add binding for linear and radial paints for JS
Thinker K.F. Li <thinker@branda.to>
parents:
693
diff
changeset
|
37 [OBJ([paint_linear], [paint_t])], |
163f0d9e6382
Add binding for linear and radial paints for JS
Thinker K.F. Li <thinker@branda.to>
parents:
693
diff
changeset
|
38 (([MOD], [xnjsmb_mb_rt_objs_mod]))), |
163f0d9e6382
Add binding for linear and radial paints for JS
Thinker K.F. Li <thinker@branda.to>
parents:
693
diff
changeset
|
39 METHOD([paint_radial_new], [xnjsmb_paint_radial_new], |
163f0d9e6382
Add binding for linear and radial paints for JS
Thinker K.F. Li <thinker@branda.to>
parents:
693
diff
changeset
|
40 (NUMBER(cx), NUMBER(cy), NUMBER(r), ERR), 3, |
735
d0ee92a96c47
Fix typo and add initialize code for linear and radial
Thinker K.F. Li <thinker@branda.to>
parents:
733
diff
changeset
|
41 [OBJ([paint_radial], [paint_t])], |
869
c18058fb48ee
Export API for JS to feed X events.
Thinker K.F. Li <thinker@codemud.net>
parents:
735
diff
changeset
|
42 (([MOD], [xnjsmb_mb_rt_objs_mod]))), |
c18058fb48ee
Export API for JS to feed X events.
Thinker K.F. Li <thinker@codemud.net>
parents:
735
diff
changeset
|
43 METHOD([handle_single_event], [xnjsmb_handle_single_event], |
c18058fb48ee
Export API for JS to feed X events.
Thinker K.F. Li <thinker@codemud.net>
parents:
735
diff
changeset
|
44 (OBJ([evt], [event], [void])), 1, []), |
c18058fb48ee
Export API for JS to feed X events.
Thinker K.F. Li <thinker@codemud.net>
parents:
735
diff
changeset
|
45 METHOD([no_more_event], [xnjsmb_no_more_event], |
c18058fb48ee
Export API for JS to feed X events.
Thinker K.F. Li <thinker@codemud.net>
parents:
735
diff
changeset
|
46 (), 0, [])], |
1053
df6ee4568ca2
Rename X_njs_MB_* to njs_mb_* for nodejs plugin.
Thinker K.F. Li <thinker@codemud.net>
parents:
871
diff
changeset
|
47 ((CTOR, ([_njs_mb_new], (SELF, STR(display_name), INT(width), INT(height)), 3)))dnl |
673
f5d2ff34c6f6
Definition of binding for mblfy_njs.cc
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
48 ) |
871
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
49 dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
50 dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
51 dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
52 STRUCT([mb_rt_display], [void], [], |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
53 [], |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
54 ())dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
55 dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
56 dnl Function to create mb_rt for an existed window. |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
57 dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
58 STRUCT([mb_rt_with_win], [njs_runtime_t], [], |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
59 [], |
1053
df6ee4568ca2
Rename X_njs_MB_* to njs_mb_* for nodejs plugin.
Thinker K.F. Li <thinker@codemud.net>
parents:
871
diff
changeset
|
60 ((CTOR, ([_njs_mb_new_with_win],dnl |
871
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
61 (SELF, OBJ([display], [mb_rt_display], [void]),dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
62 INT([window])),dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
63 2)),dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
64 ([INHERIT], [mb_rt]))dnl |
67d0fed24120
Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents:
869
diff
changeset
|
65 ) |