// EXTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
+#include <dali-toolkit/public-api/controls/control.h>
// INTERNAL INCLUDES
#include <actors/layer-api.h>
// ignore. GetCurrentAnchorPoint() use Actor.anchorPoint
// ignore. SetSize() use Actor.size
// ignore. GetCurrentSize() use Actor.size
+ { "GetNaturalSize", ActorApi::GetNaturalSize, ACTOR_API },
+ { "GetWidthForHeight",ActorApi::GetWidthForHeight, ACTOR_API },
+ { "GetHeightForWidth",ActorApi::GetHeightForWidth, ACTOR_API },
// ignore. SetPosition(....) use Actor.position
// ignore. SetX, SetY, SetZ, use Actor.position.x, Actor.position.y, Actor.position.z
{ "TranslateBy", ActorApi::TranslateBy, ACTOR_API },
{ "SetKeyboardFocusable", ActorApi::SetKeyboardFocusable, ACTOR_API }, //-- should this be a property???
{ "IsKeyboardFocusable" , ActorApi::IsKeyboardFocusable, ACTOR_API }, //-- should this be a property???
+ { "AddRenderer", ActorApi::AddRenderer, ACTOR_API },
+ { "GetRendererCount", ActorApi::GetRendererCount, ACTOR_API },
+ { "GetRendererAt" , ActorApi::GetRendererAt, ACTOR_API },
+ { "RemoveRenderer" , ActorApi::RemoveRenderer, ACTOR_API },
+
/**************************************
* Layer API (in order of layer.h)
**************************************/
// ignore GetNinePatchBorder use imageActor.border
{ "SetSortModifier", ImageActorApi::SetSortModifier, IMAGE_ACTOR_API },
{ "GetSortModifier", ImageActorApi::GetSortModifier, IMAGE_ACTOR_API },
- { "SetCullFace", ImageActorApi::SetCullFace, IMAGE_ACTOR_API },
- { "GetCullFace", ImageActorApi::GetCullFace, IMAGE_ACTOR_API },
{ "SetBlendMode", ImageActorApi::SetBlendMode, IMAGE_ACTOR_API },
{ "GetBlendMode", ImageActorApi::GetBlendMode, IMAGE_ACTOR_API },
{ "SetBlendFunc", ImageActorApi::SetBlendFunc, IMAGE_ACTOR_API },
v8::Handle<v8::Object> ActorWrapper::WrapActor(v8::Isolate* isolate, Actor actor )
{
v8::EscapableHandleScope handleScope( isolate );
- v8::Local<v8::Object> object = WrapActor( isolate, actor, GetActorType( actor.GetTypeName() ) );
+
+ // Check whether the actor is a Control
+ ActorWrapper::ActorType type = Toolkit::Control::DownCast(actor) ? ACTOR : GetActorType( actor.GetTypeName() );
+ v8::Local<v8::Object> object = WrapActor( isolate, actor, type );
return handleScope.Escape( object );
}