Mercurial > MadButterfly
comparison nodejs/mbfly_njs.cc @ 571:13b15b7a463b Android_Skia
Redraw all and changed in Javascript
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 09 Jun 2010 15:39:24 +0800 |
parents | a12c3448afb6 |
children | 97159102f886 |
comparison
equal
deleted
inserted
replaced
570:49e79253b6d3 | 571:13b15b7a463b |
---|---|
59 | 59 |
60 static Handle<Value> | 60 static Handle<Value> |
61 xnjsmb_handle_connection(const Arguments &args) { | 61 xnjsmb_handle_connection(const Arguments &args) { |
62 } | 62 } |
63 | 63 |
64 static Handle<Value> | |
65 xnjsmb_rt_redraw_changed(const Arguments &args) { | |
66 Handle<Object> self = args.This(); | |
67 njs_runtime_t *rt; | |
68 redraw_man_t *rdman; | |
69 | |
70 rdman = xnjsmb_rt_rdman(self); | |
71 rdman_redraw_changed(rdman); | |
72 | |
73 rt = (njs_runtime_t *)UNWRAP(self); | |
74 X_njs_MB_flush(rt); | |
75 | |
76 return Null(); | |
77 } | |
78 | |
79 static Handle<Value> | |
80 xnjsmb_rt_redraw_all(const Arguments &args) { | |
81 Handle<Object> self = args.This(); | |
82 njs_runtime_t *rt; | |
83 redraw_man_t *rdman; | |
84 | |
85 rdman = xnjsmb_rt_rdman(self); | |
86 rdman_redraw_all(rdman); | |
87 | |
88 rt = (njs_runtime_t *)UNWRAP(self); | |
89 X_njs_MB_flush(rt); | |
90 | |
91 return Null(); | |
92 } | |
93 | |
64 /* @} */ | 94 /* @} */ |
65 | 95 |
66 /*! \brief Get rdman associated with the runtime. | 96 /*! \brief Get rdman associated with the runtime. |
67 */ | 97 */ |
68 redraw_man_t * | 98 redraw_man_t * |
104 | 134 |
105 rt_proto_temp = mb_rt_func->PrototypeTemplate(); | 135 rt_proto_temp = mb_rt_func->PrototypeTemplate(); |
106 func = FunctionTemplate::New(xnjsmb_coord_new); | 136 func = FunctionTemplate::New(xnjsmb_coord_new); |
107 SET(rt_proto_temp, "coord_new", func); | 137 SET(rt_proto_temp, "coord_new", func); |
108 | 138 |
139 func = FunctionTemplate::New(xnjsmb_rt_redraw_changed); | |
140 SET(rt_proto_temp, "redraw_changed", func); | |
141 | |
142 func = FunctionTemplate::New(xnjsmb_rt_redraw_all); | |
143 SET(rt_proto_temp, "redraw_all", func); | |
144 | |
109 /* | 145 /* |
110 * Add properties to mb_rt templates for other modules. | 146 * Add properties to mb_rt templates for other modules. |
111 */ | 147 */ |
112 xnjsmb_shapes_init_mb_rt_temp(mb_rt_func); | 148 xnjsmb_shapes_init_mb_rt_temp(mb_rt_func); |
113 xnjsmb_paints_init_mb_rt_temp(mb_rt_func); | 149 xnjsmb_paints_init_mb_rt_temp(mb_rt_func); |