Mercurial > MadButterfly
diff nodejs/shapes.cc @ 749:ed59e659a202
Implement binding for hide/show for shapes and coords
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 25 Aug 2010 19:37:52 +0800 |
parents | 56a5e08cd8af |
children | 194e24d8ecab |
line wrap: on
line diff
--- a/nodejs/shapes.cc Wed Aug 25 18:46:47 2010 +0800 +++ b/nodejs/shapes.cc Wed Aug 25 19:37:52 2010 +0800 @@ -129,6 +129,32 @@ } static void +xnjsmb_shape_show(shape_t *sh, Handle<Object> self) { + Handle<Object> js_rt; + redraw_man_t *rdman; + + js_rt = GET(self, "mbrt")->ToObject(); + ASSERT(js_rt != NULL); + rdman = xnjsmb_rt_rdman(js_rt); + + sh_show(sh); + rdman_shape_changed(rdman, sh); +} + +static void +xnjsmb_shape_hide(shape_t *sh, Handle<Object> self) { + Handle<Object> js_rt; + redraw_man_t *rdman; + + js_rt = GET(self, "mbrt")->ToObject(); + ASSERT(js_rt != NULL); + rdman = xnjsmb_rt_rdman(js_rt); + + sh_hide(sh); + rdman_shape_changed(rdman, sh); +} + +static void xnjsmb_shape_remove(shape_t *sh, Handle<Object> self) { Handle<Object> js_rt; redraw_man_t *rdman;