X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=plugins%2Fdali-script-v8%2Fsrc%2Factors%2Factor-wrapper.h;h=fd121852389e659526c7c41ebc81248c32994167;hp=76eee4746ed1d7964f23e5a479110dd165bcd16c;hb=00a82ee18b8b96362eb83cd84141e02ab3221702;hpb=bf766e77d7d728e9ff60ba11f726f677369df416 diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.h b/plugins/dali-script-v8/src/actors/actor-wrapper.h index 76eee47..fd12185 100644 --- a/plugins/dali-script-v8/src/actors/actor-wrapper.h +++ b/plugins/dali-script-v8/src/actors/actor-wrapper.h @@ -41,18 +41,16 @@ class ActorWrapper : public HandleWrapper public: /** - * Actor type used an index + * Actor type used an index. + * These enums are used to index the ActorApiLookup table in actor-wrapper.cpp. + * Any changes made must be reflected in the ActorApiLookup otherwise it may segfault when creating an actor */ enum ActorType { UNKNOWN_ACTOR = -1, - ACTOR = 0, - IMAGE_ACTOR =1, - TEXT_ACTOR =2, - MESH_ACTOR =3, - LAYER_ACTOR =4, - CAMERA_ACTOR =5, - TEXT_VIEW =6 + ACTOR = 0, + LAYER_ACTOR = 1, + CAMERA_ACTOR = 2 }; /** @@ -72,12 +70,19 @@ public: /** * @brief Creates a new Actor wrapped inside a Javascript Object. - * @note: the actor type ie 'ImageActor' is expected to be the name of the callee function. + * @note: the actor type ie 'CameraActor' is expected to be the name of the callee function. * @param[in] args v8 function call arguments interpreted */ static void NewActor( const v8::FunctionCallbackInfo< v8::Value >& args); /** + * @brief Creates a new Control wrapped inside a Javascript Object. + * @note: the control type is passed as a parameter e.g. 'TextField' + * @param[in] args v8 function call arguments interpreted + */ + static void NewControl( const v8::FunctionCallbackInfo< v8::Value >& args); + + /** * @brief Wraps an actor of a given type */ static v8::Handle WrapActor(v8::Isolate* isolate, Dali::Actor actor,ActorType actorType); @@ -89,12 +94,8 @@ public: // The Actor ObjectTemplates. static v8::Persistent mActorTemplate; - static v8::Persistent mImageActorTemplate; - static v8::Persistent mTextActorTemplate; - static v8::Persistent mMeshActorTemplate; static v8::Persistent mCameraActorTemplate; static v8::Persistent mLayerActorTemplate; - static v8::Persistent mTextViewTemplate; /** * @return the wrapped actor