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=f7a48b3d64047e398f3f0b13d7355ecc205f0e88;hp=06b2e06d128821eba1b9b17b96c9262d994281b0;hb=b694e7e2ae624e206e1548b1a863c554eb9cd4d7;hpb=cd7d41bc8e0a0816da28401207091344fbbe0b2c diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.h b/plugins/dali-script-v8/src/actors/actor-wrapper.h index 06b2e06..f7a48b3 100644 --- a/plugins/dali-script-v8/src/actors/actor-wrapper.h +++ b/plugins/dali-script-v8/src/actors/actor-wrapper.h @@ -1,8 +1,8 @@ -#ifndef __DALI_V8PLUGIN_ACTOR_WRAPPER_H__ -#define __DALI_V8PLUGIN_ACTOR_WRAPPER_H__ +#ifndef DALI_V8PLUGIN_ACTOR_WRAPPER_H +#define DALI_V8PLUGIN_ACTOR_WRAPPER_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,17 +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, - MESH_ACTOR =2, - LAYER_ACTOR =3, - CAMERA_ACTOR =4, - TEXT_LABEL =5 + ACTOR = 0, + LAYER_ACTOR = 1, + CAMERA_ACTOR = 2 }; /** @@ -71,7 +70,7 @@ 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); @@ -88,11 +87,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 @@ -104,14 +100,16 @@ public: */ static ActorWrapper::ActorType GetActorType( const std::string& name ); -private: +protected: /** - * Helper to make the actor template + * @brief Helper to make the actor template * */ static v8::Handle MakeDaliActorTemplate( v8::Isolate* isolate, ActorType actorType ); +private: + /** * Helper, get an actor template given an actor type */ @@ -125,4 +123,4 @@ private: } // namespace Dali -#endif // header +#endif // DALI_V8PLUGIN_ACTOR_WRAPPER_H