Apply deprecate macro and LOG 91/96791/13
authorsuhyung Eom <suhyung.eom@samsung.com>
Thu, 10 Nov 2016 07:51:50 +0000 (16:51 +0900)
committersu hyung Eom <suhyung.eom@samsung.com>
Tue, 13 Dec 2016 00:32:06 +0000 (16:32 -0800)
Signed-off-by: suhyung Eom <suhyung.eom@samsung.com>
Change-Id: If9e0583d52cab9a036da0a93dd924c8a02bec999

12 files changed:
dali/integration-api/debug.h
dali/internal/event/actors/actor-impl.cpp
dali/public-api/actors/actor.cpp
dali/public-api/actors/actor.h
dali/public-api/actors/custom-actor-impl.h
dali/public-api/common/dali-common.h
dali/public-api/common/stage.cpp
dali/public-api/common/stage.h
dali/public-api/events/touch-event.cpp
dali/public-api/events/touch-event.h
dali/public-api/object/property-map.cpp
dali/public-api/object/property-map.h

index 8b17e38..828aa3a 100644 (file)
@@ -90,6 +90,8 @@ DALI_IMPORT_API void UninstallLogFunction();
 
 #define DALI_LOG_ERROR_NOFN(format, args...)     Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugError, format, ## args)
 
+#define DALI_LOG_WARNING_NOFN(format, args...)     Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugWarning, format, ## args)
+
 /**
  * Provides unfiltered logging for fps monitor
  */
index 2e9add2..a3ca220 100644 (file)
@@ -1887,7 +1887,6 @@ bool Actor::EmitWheelEventSignal( const WheelEvent& event )
 
 Dali::Actor::TouchSignalType& Actor::TouchedSignal()
 {
-  DALI_LOG_WARNING( "Deprecated: Use TouchSignal() instead\n" );
   return mTouchedSignal;
 }
 
index 25628ee..b96283f 100644 (file)
@@ -247,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();
 }
 
@@ -536,6 +540,8 @@ int Actor::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();
 }
 
index 927b10e..0dc0876 100644 (file)
@@ -774,7 +774,7 @@ public:
    * @pre The Actor has been initialized.
    * @see PositionInheritanceMode
    */
-  void SetPositionInheritanceMode( PositionInheritanceMode mode );
+  void SetPositionInheritanceMode( PositionInheritanceMode mode ) DALI_DEPRECATED_API;
 
   /**
    * @brief Set whether a child actor inherits it's parent's position.
@@ -799,7 +799,7 @@ public:
    * @return Return the position inheritance mode.
    * @pre The Actor has been initialized.
    */
-  PositionInheritanceMode GetPositionInheritanceMode() const;
+  PositionInheritanceMode GetPositionInheritanceMode() const DALI_DEPRECATED_API;
 
   /**
    * @brief Returns whether the actor inherits its parent's position.
@@ -1452,7 +1452,7 @@ public: // Signals
    * @return The signal to connect to.
    * @pre The Actor has been initialized.
    */
-  TouchSignalType& TouchedSignal();
+  TouchSignalType& TouchedSignal() DALI_DEPRECATED_API;
 
   /**
    * @brief This signal is emitted when touch input is received.
index fadf9b5..b447244 100644 (file)
@@ -174,7 +174,7 @@ public:
    * @return True if the event should be consumed.
    * @note CustomActorImpl::REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
    */
-  virtual bool OnTouchEvent(const TouchEvent& event) = 0;
+  virtual bool OnTouchEvent(const TouchEvent& event) DALI_DEPRECATED_API = 0;
 
   /**
    * @brief Called after a hover-event is received by the owning actor.
index 88f035f..8c28b19 100644 (file)
 #  define DALI_INTERNAL
 #endif
 
+#ifdef DEPRECATION_WARNING
+#define DALI_DEPRECATED_API __attribute__((__visibility__("default"), deprecated))
+#else
+#define DALI_DEPRECATED_API
+#endif
+
 #if defined (__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
 // C++0x support
 #define _CPP11
index 3d809a0..13825ff 100644 (file)
@@ -146,6 +146,8 @@ Stage::EventProcessingFinishedSignalType& Stage::EventProcessingFinishedSignal()
 
 Stage::TouchedSignalType& Stage::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();
 }
 
index 66d86c9..1602cc6 100644 (file)
@@ -303,7 +303,7 @@ public:
    * @return The touch signal to connect to.
    * @note Motion events are not emitted.
    */
-  TouchedSignalType& TouchedSignal();
+  TouchedSignalType& TouchedSignal() DALI_DEPRECATED_API;
 
   /**
    * @brief This signal is emitted when the screen is touched and when the touch ends
index 8090d74..acb8496 100644 (file)
@@ -18,6 +18,9 @@
 // CLASS HEADER
 #include <dali/public-api/events/touch-event.h>
 
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 
@@ -27,24 +30,31 @@ namespace Dali
 TouchEvent::TouchEvent()
 : time(0)
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: TouchEvent() is deprecated and will be removed from next release. Use TouchData instead.\n" );
 }
 
 TouchEvent::TouchEvent(unsigned long time)
 : time(time)
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: TouchEvent() is deprecated and will be removed from next release. Use TouchData instead.\n" );
 }
 
 TouchEvent::~TouchEvent()
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ~TouchEvent() is deprecated and will be removed from next release. Use TouchData instead.\n" );
 }
 
 unsigned int TouchEvent::GetPointCount() const
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPointCount() is deprecated and will be removed from next release. Use TouchData instead.\n" );
+
   return points.size();
 }
 
 const TouchPoint& TouchEvent::GetPoint(unsigned int point) const
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPoint() is deprecated and will be removed from next release. Use TouchData instead.\n" );
+
   DALI_ASSERT_ALWAYS( point < points.size() && "No point at index" );
   return points[point];
 }
index 92b6988..45d6498 100644 (file)
@@ -47,7 +47,7 @@ struct DALI_IMPORT_API TouchEvent
    * @brief Default constructor
    * @SINCE_1_0.0
    */
-  TouchEvent();
+  TouchEvent() DALI_DEPRECATED_API;
 
   /**
    * @DEPRECATED_1_1.37
@@ -55,14 +55,14 @@ struct DALI_IMPORT_API TouchEvent
    * @SINCE_1_0.0
    * @param[in] time The time the event occurred
    */
-  TouchEvent(unsigned long time);
+  TouchEvent(unsigned long time) DALI_DEPRECATED_API;
 
   /**
    * @DEPRECATED_1_1.37
    * @brief Destructor
    * @SINCE_1_0.0
    */
-  ~TouchEvent();
+  ~TouchEvent() DALI_DEPRECATED_API;
 
   // Data
 
@@ -90,7 +90,7 @@ struct DALI_IMPORT_API TouchEvent
    * @SINCE_1_0.0
    * @return Total number of Points.
    */
-  unsigned int GetPointCount() const;
+  unsigned int GetPointCount() const DALI_DEPRECATED_API;
 
   /**
    * @DEPRECATED_1_1.37
@@ -104,7 +104,7 @@ struct DALI_IMPORT_API TouchEvent
    * @note "point" should be less than the value returned by GetPointCount().
    *       If out of range, then program asserts.
    */
-  const TouchPoint& GetPoint(unsigned int point) const;
+  const TouchPoint& GetPoint(unsigned int point) const DALI_DEPRECATED_API;
 };
 
 /**
index fddcaa4..ebd95a8 100644 (file)
@@ -18,6 +18,9 @@
 // CLASS HEADER
 #include <dali/public-api/object/property-map.h>
 
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
 // INTERNAL INCLUDES
 #include <dali/public-api/common/vector-wrapper.h>
 
@@ -100,6 +103,8 @@ Property::Value& Property::Map::GetValue( SizeType position ) const
 
 const std::string& Property::Map::GetKey( SizeType position ) const
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetKey() is deprecated and will be removed from next release.\n" );
+
   SizeType numStringKeys = mImpl->mStringValueContainer.size();
   DALI_ASSERT_ALWAYS( position < numStringKeys && "position out-of-bounds" );
 
@@ -126,6 +131,8 @@ Property::Key Property::Map::GetKeyAt( SizeType position ) const
 
 StringValuePair& Property::Map::GetPair( SizeType position ) const
 {
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPair() is deprecated and will be removed from next release.\n" );
+
   SizeType numStringKeys = mImpl->mStringValueContainer.size();
 
   DALI_ASSERT_ALWAYS( position < ( numStringKeys ) && "position out-of-bounds" );
index 307f31a..008c5aa 100644 (file)
@@ -183,7 +183,7 @@ public:
    *
    * @note Will assert if position >= Count()
    */
-  const std::string& GetKey( SizeType position ) const;
+  const std::string& GetKey( SizeType position ) const DALI_DEPRECATED_API;
 
   /**
    * @brief Retrieve the key at the specified position.
@@ -206,7 +206,7 @@ public:
    *
    * @note Will assert if position >= Count() or key at position is an index key.
    */
-  StringValuePair& GetPair( SizeType position ) const;
+  StringValuePair& GetPair( SizeType position ) const DALI_DEPRECATED_API;
 
   /**
    * @brief Retrieve the key & the value at the specified position.