X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Fdali-script-v8%2Fsrc%2Factors%2Factor-wrapper.h;h=13cd8113baf64850678bd5e24c40ea6d41d8e2e8;hb=dc1e05d24ad5545247513cefe7c5c3290f1af7c2;hp=06b2e06d128821eba1b9b17b96c9262d994281b0;hpb=d04c5bdbb95cc98f90848c7a98b0b2804df6e5b8;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 06b2e06..13cd811 100644 --- a/plugins/dali-script-v8/src/actors/actor-wrapper.h +++ b/plugins/dali-script-v8/src/actors/actor-wrapper.h @@ -41,17 +41,17 @@ 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, - MESH_ACTOR =2, - LAYER_ACTOR =3, - CAMERA_ACTOR =4, - TEXT_LABEL =5 + ACTOR = 0, + IMAGE_ACTOR = 1, + LAYER_ACTOR = 2, + CAMERA_ACTOR = 3 }; /** @@ -77,6 +77,13 @@ public: 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,10 +96,8 @@ public: // The Actor ObjectTemplates. static v8::Persistent mActorTemplate; static v8::Persistent mImageActorTemplate; - static v8::Persistent mMeshActorTemplate; static v8::Persistent mCameraActorTemplate; static v8::Persistent mLayerActorTemplate; - static v8::Persistent mTextLabelTemplate; /** * @return the wrapped actor