Mercurial > MadButterfly
comparison 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 |
comparison
equal
deleted
inserted
replaced
748:56a5e08cd8af | 749:ed59e659a202 |
---|---|
127 if(sh_get_coord(sh)) | 127 if(sh_get_coord(sh)) |
128 rdman_shape_changed(rdman, sh); | 128 rdman_shape_changed(rdman, sh); |
129 } | 129 } |
130 | 130 |
131 static void | 131 static void |
132 xnjsmb_shape_show(shape_t *sh, Handle<Object> self) { | |
133 Handle<Object> js_rt; | |
134 redraw_man_t *rdman; | |
135 | |
136 js_rt = GET(self, "mbrt")->ToObject(); | |
137 ASSERT(js_rt != NULL); | |
138 rdman = xnjsmb_rt_rdman(js_rt); | |
139 | |
140 sh_show(sh); | |
141 rdman_shape_changed(rdman, sh); | |
142 } | |
143 | |
144 static void | |
145 xnjsmb_shape_hide(shape_t *sh, Handle<Object> self) { | |
146 Handle<Object> js_rt; | |
147 redraw_man_t *rdman; | |
148 | |
149 js_rt = GET(self, "mbrt")->ToObject(); | |
150 ASSERT(js_rt != NULL); | |
151 rdman = xnjsmb_rt_rdman(js_rt); | |
152 | |
153 sh_hide(sh); | |
154 rdman_shape_changed(rdman, sh); | |
155 } | |
156 | |
157 static void | |
132 xnjsmb_shape_remove(shape_t *sh, Handle<Object> self) { | 158 xnjsmb_shape_remove(shape_t *sh, Handle<Object> self) { |
133 Handle<Object> js_rt; | 159 Handle<Object> js_rt; |
134 redraw_man_t *rdman; | 160 redraw_man_t *rdman; |
135 Persistent<Object> *self_hdl; | 161 Persistent<Object> *self_hdl; |
136 int r; | 162 int r; |