Remove some public Setter/Getter APIs from Dali::Actor 41/233841/1
authorRichard Huang <r.huang@samsung.com>
Tue, 19 May 2020 12:46:03 +0000 (13:46 +0100)
committerRichard Huang <r.huang@samsung.com>
Tue, 19 May 2020 12:46:19 +0000 (13:46 +0100)
Change-Id: I0e4c42f7988b38b82956d628474103c90db0f407

automated-tests/src/dali-adaptor/utc-Dali-PixelBuffer.cpp
dali/internal/accessibility/tizen-wayland/atspi/accessibility-impl.cpp
dali/internal/network/common/automation.cpp
dali/internal/system/common/capture-impl.cpp

index 709b2c9..055d4be 100644 (file)
@@ -243,7 +243,7 @@ int UtcDaliPixelBufferConvert(void)
     Actor a = Actor::New();
     a.AddRenderer(r);
     a.SetSize(10, 10);
-    a.SetParentOrigin(ParentOrigin::CENTER);
+    a.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
     Stage::GetCurrent().Add(a);
 
     application.SendNotification();
index 30b9179..382e08b 100644 (file)
@@ -605,9 +605,9 @@ public:
   Dali::Rect<> GetExtents( Dali::Accessibility::CoordType ctype ) override
   {
     Vector2 screenPosition = actor.GetProperty( Dali::DevelActor::Property::SCREEN_POSITION ).Get< Vector2 >();
-    Vector3 size = actor.GetCurrentSize() * actor.GetCurrentWorldScale();
+    Vector3 size = actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE );
     bool positionUsesAnchorPoint = actor.GetProperty( Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >();
-    Vector3 anchorPointOffSet = size * ( positionUsesAnchorPoint ? actor.GetCurrentAnchorPoint() : AnchorPoint::TOP_LEFT );
+    Vector3 anchorPointOffSet = size * ( positionUsesAnchorPoint ? actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) : AnchorPoint::TOP_LEFT );
     Vector2 position = Vector2( screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y );
 
     return { position.x, position.y, size.x, size.y };
@@ -646,7 +646,7 @@ public:
   }
   std::string GetName() override
   {
-    return actor.GetName();
+    return actor.GetProperty< std::string >( Dali::Actor::Property::NAME );
   }
   std::string GetDescription() override
   {
index ce17605..7c5be2b 100644 (file)
@@ -334,8 +334,8 @@ std::string DumpJson( Dali::Actor actor, int level )
 {
   // All the information about this actor
   std::ostringstream msg;
-  msg << "{ " << Quote( "Name" ) << " : " << Quote( actor.GetName() ) << ", " << Quote( "level" ) << " : " << level << ", " << Quote( "id" ) << " : " << actor.GetId() << ", " << Quote( "IsVisible" )
-      << " : " << actor.IsVisible() << ", " << Quote( "IsSensitive" ) << " : " << actor.IsSensitive();
+  msg << "{ " << Quote( "Name" ) << " : " << Quote( actor.GetProperty< std::string >( Actor::Property::NAME ) ) << ", " << Quote( "level" ) << " : " << level << ", " << Quote( "id" ) << " : " << actor.GetId() << ", " << Quote( "IsVisible" )
+      << " : " << actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) << ", " << Quote( "IsSensitive" ) << " : " << actor.GetProperty< bool >( Actor::Property::SENSITIVE );
 
   msg << ", " << Quote( "properties" ) << ": [ ";
 
index 2724dd2..253a3fd 100644 (file)
@@ -188,8 +188,8 @@ void Capture::SetupRenderTask( Dali::Actor source, const Dali::Vector4& clearCol
   if( !mCameraActor )
   {
     mCameraActor = Dali::CameraActor::New( stageSize );
-    mCameraActor.SetParentOrigin( ParentOrigin::CENTER );
-    mCameraActor.SetAnchorPoint( AnchorPoint::CENTER );
+    mCameraActor.SetProperty( Dali::Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+    mCameraActor.SetProperty( Dali::Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
   }
 
   stage.Add( mCameraActor );