Mercurial > MadButterfly
comparison nodejs/coord.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 | be0e02948c1d |
comparison
equal
deleted
inserted
replaced
748:56a5e08cd8af | 749:ed59e659a202 |
---|---|
225 | 225 |
226 xnjsmb_coord_invalidate_subtree(coord); | 226 xnjsmb_coord_invalidate_subtree(coord); |
227 xnjsmb_coord_free_subtree(rdman, coord); | 227 xnjsmb_coord_free_subtree(rdman, coord); |
228 } | 228 } |
229 | 229 |
230 static void | |
231 xnjsmb_coord_show(coord_t *coord, Handle<Object> self) { | |
232 Handle<Object> js_rt; | |
233 redraw_man_t *rdman; | |
234 | |
235 js_rt = GET(self, "mbrt")->ToObject(); | |
236 ASSERT(js_rt != NULL); | |
237 rdman = xnjsmb_rt_rdman(js_rt); | |
238 | |
239 coord_show(coord); | |
240 rdman_coord_changed(rdman, coord); | |
241 } | |
242 | |
243 static void | |
244 xnjsmb_coord_hide(coord_t *coord, Handle<Object> self) { | |
245 Handle<Object> js_rt; | |
246 redraw_man_t *rdman; | |
247 | |
248 js_rt = GET(self, "mbrt")->ToObject(); | |
249 ASSERT(js_rt != NULL); | |
250 rdman = xnjsmb_rt_rdman(js_rt); | |
251 | |
252 coord_hide(coord); | |
253 rdman_coord_changed(rdman, coord); | |
254 } | |
255 | |
230 #include "coord-inc.h" | 256 #include "coord-inc.h" |
231 | 257 |
232 /*! \brief This function used by \ref xnjsmb_mb_rt to wrap coord object. | 258 /*! \brief This function used by \ref xnjsmb_mb_rt to wrap coord object. |
233 */ | 259 */ |
234 Handle<Value> export_xnjsmb_auto_coord_new(coord_t *coord) { | 260 Handle<Value> export_xnjsmb_auto_coord_new(coord_t *coord) { |