Apply deprecate macro and LOG
[platform/core/uifw/dali-core.git] / dali / public-api / actors / actor.cpp
index 3518833..b96283f 100644 (file)
@@ -27,8 +27,7 @@
 
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/actors/layer-impl.h>
-#include <dali/internal/event/actors/renderer-impl.h>
-#include <dali/internal/event/actor-attachments/actor-attachment-impl.h>
+#include <dali/internal/event/rendering/renderer-impl.h>
 #include <dali/internal/event/animation/constraint-impl.h>
 #include <dali/internal/event/size-negotiation/relayout-controller-impl.h>
 
@@ -106,11 +105,6 @@ void Actor::Add(Actor actor)
   GetImplementation(*this).Add(GetImplementation(actor));
 }
 
-void Actor::Insert(unsigned int index, Actor actor)
-{
-  GetImplementation(*this).Insert(index, GetImplementation(actor));
-}
-
 void Actor::Remove(Actor actor)
 {
   GetImplementation(*this).Remove(GetImplementation(actor));
@@ -128,19 +122,20 @@ unsigned int Actor::GetChildCount() const
 
 Actor Actor::GetChildAt(unsigned int index) const
 {
-  return GetImplementation(*this).GetChildAt(index);
+  Internal::ActorPtr child = GetImplementation(*this).GetChildAt( index );
+  return Actor( child.Get() );
 }
 
 Actor Actor::FindChildByName(const std::string& actorName)
 {
-  Internal::ActorPtr child = GetImplementation(*this).FindChildByName(actorName);
-  return Actor(child.Get());
+  Internal::ActorPtr child = GetImplementation(*this).FindChildByName( actorName );
+  return Actor( child.Get() );
 }
 
 Actor Actor::FindChildById(const unsigned int id)
 {
-  Internal::ActorPtr child = GetImplementation(*this).FindChildById(id);
-  return Actor(child.Get());
+  Internal::ActorPtr child = GetImplementation(*this).FindChildById( id );
+  return Actor( child.Get() );
 }
 
 Actor Actor::GetParent() const
@@ -252,11 +247,15 @@ Vector3 Actor::GetCurrentWorldPosition() const
 
 void Actor::SetPositionInheritanceMode( PositionInheritanceMode mode )
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetPositionInheritanceMode() is deprecated and will be removed from next release. Use SetInheritPosition() instead.\n" );
+
   GetImplementation(*this).SetPositionInheritanceMode( mode );
 }
 
 PositionInheritanceMode Actor::GetPositionInheritanceMode() const
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPositionInheritanceMode() is deprecated and will be removed from next release. Use IsPositionInherited() instead.\n" );
+
   return GetImplementation(*this).GetPositionInheritanceMode();
 }
 
@@ -480,11 +479,6 @@ float Actor::GetRelayoutSize( Dimension::Type dimension ) const
   return GetImplementation(*this).GetRelayoutSize( dimension );
 }
 
-void Actor::PropagateRelayoutFlags()
-{
-  GetImplementation(*this).PropagateRelayoutFlags();
-}
-
 void Actor::SetPadding( const Padding& padding )
 {
   Internal::Actor& impl = GetImplementation(*this);
@@ -539,19 +533,31 @@ Vector2 Actor::GetMaximumSize()
   return Vector2( impl.GetMaximumSize( Dimension::WIDTH ), impl.GetMaximumSize( Dimension::HEIGHT ) );
 }
 
+int Actor::GetHierarchyDepth()
+{
+  return GetImplementation(*this).GetHierarchyDepth();
+}
+
 Actor::TouchSignalType& Actor::TouchedSignal()
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: TouchedSignal() is deprecated and will be removed from next release. Use TouchSignal() instead.\n" );
+
   return GetImplementation(*this).TouchedSignal();
 }
 
+Actor::TouchDataSignalType& Actor::TouchSignal()
+{
+  return GetImplementation( *this ).TouchSignal();
+}
+
 Actor::HoverSignalType& Actor::HoveredSignal()
 {
   return GetImplementation(*this).HoveredSignal();
 }
 
-Actor::MouseWheelEventSignalType& Actor::MouseWheelEventSignal()
+Actor::WheelEventSignalType& Actor::WheelEventSignal()
 {
-  return GetImplementation(*this).MouseWheelEventSignal();
+  return GetImplementation(*this).WheelEventSignal();
 }
 
 Actor::OnStageSignalType& Actor::OnStageSignal()
@@ -576,7 +582,8 @@ unsigned int Actor::GetRendererCount() const
 
 Renderer Actor::GetRendererAt( unsigned int index )
 {
-  return Renderer( &GetImplementation(*this).GetRendererAt( index ) );
+  Internal::RendererPtr renderer = GetImplementation(*this).GetRendererAt( index );
+  return Renderer( renderer.Get() );
 }
 
 void Actor::RemoveRenderer( Renderer& renderer )
@@ -599,13 +606,4 @@ Actor::Actor(Internal::Actor* internal)
 {
 }
 
-void UnparentAndReset( Actor& actor )
-{
-  if( actor )
-  {
-    actor.Unparent();
-    actor.Reset();
-  }
-}
-
 } // namespace Dali