X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Fdali-script-v8%2Fsrc%2Factors%2Factor-wrapper.h;h=fd121852389e659526c7c41ebc81248c32994167;hb=538dde4e25666ad8658201f1dd3d6b6d226013cc;hp=79381ba0f6a4b338b05d204b487303b3b207c41e;hpb=928136dbb9e23970f3894eabc7c8b224003b77be;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.h b/plugins/dali-script-v8/src/actors/actor-wrapper.h index 79381ba..fd12185 100644 --- a/plugins/dali-script-v8/src/actors/actor-wrapper.h +++ b/plugins/dali-script-v8/src/actors/actor-wrapper.h @@ -41,19 +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, - LIGHT_ACTOR =6, - TEXT_VIEW =7 + ACTOR = 0, + LAYER_ACTOR = 1, + CAMERA_ACTOR = 2 }; /** @@ -73,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); @@ -90,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