Mercurial > MadButterfly
comparison nodejs/mbfly_njs.cc @ 561:a3c13c2a4792 Android_Skia
Function template on runtime object for xnjsmb_coord_new()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 07 Jun 2010 12:12:03 +0800 |
parents | ef078d7c57b4 |
children | 1b6402f07cd4 |
comparison
equal
deleted
inserted
replaced
560:ce7a35abcb0d | 561:a3c13c2a4792 |
---|---|
83 | 83 |
84 extern "C" void | 84 extern "C" void |
85 init(Handle<Object> target) { | 85 init(Handle<Object> target) { |
86 HandleScope scope; | 86 HandleScope scope; |
87 Handle<FunctionTemplate> func; | 87 Handle<FunctionTemplate> func; |
88 Handle<ObjectTemplate> rt_obj_temp; | |
88 | 89 |
89 func = FunctionTemplate::New(hello_func); | 90 func = FunctionTemplate::New(hello_func); |
90 target->Set(String::New("Hello"), func->GetFunction()); | 91 target->Set(String::New("Hello"), func->GetFunction()); |
91 | 92 |
92 func = FunctionTemplate::New(xnjsmb_new); | 93 func = FunctionTemplate::New(xnjsmb_new); |
93 target->Set(String::New("mb_rt"), func->GetFunction()); | 94 target->Set(String::New("mb_rt"), func->GetFunction()); |
94 func->PrototypeTemplate()->SetInternalFieldCount(1); | 95 rt_obj_temp = func->PrototypeTemplate(); |
96 rt_obj_temp->SetInternalFieldCount(1); | |
97 | |
98 func = FunctionTemplate::New(xnjsmb_coord_new); | |
99 SET(rt_obj_temp, "coord_new", func); | |
95 } | 100 } |