(PropertyNotification) Added conditions to allow checking of a specific vector components
authorJulien Heanley <j.heanley@partner.samsung.com>
Tue, 25 Feb 2014 10:33:56 +0000 (10:33 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Mon, 3 Mar 2014 18:34:53 +0000 (18:34 +0000)
[Issue#]   N/A
[Problem]  N/A
[Cause]    N/A
[Solution] N/A

Change-Id: I468b57fb1deb46a711073d0d578c2da9f475f66a

automated-tests/dali-test-suite/property-notification/utc-Dali-PropertyNotification.cpp
capi/dali/public-api/object/handle.h
dali/internal/event/common/object-impl.h
dali/internal/event/common/property-notification-impl.cpp
dali/internal/event/common/property-notification-impl.h
dali/internal/event/common/proxy-object.cpp
dali/internal/event/common/proxy-object.h
dali/internal/update/common/scene-graph-property-notification.cpp
dali/internal/update/common/scene-graph-property-notification.h
dali/public-api/object/handle.cpp

index 74cb70e..127a123 100644 (file)
@@ -61,6 +61,10 @@ static void UtcDaliPropertyNotificationGreaterThan();
 static void UtcDaliPropertyNotificationLessThan();
 static void UtcDaliPropertyNotificationInside();
 static void UtcDaliPropertyNotificationOutside();
+static void UtcDaliPropertyNotificationVectorComponentGreaterThan();
+static void UtcDaliPropertyNotificationVectorComponentLessThan();
+static void UtcDaliPropertyNotificationVectorComponentInside();
+static void UtcDaliPropertyNotificationVectorComponentOutside();
 static void UtcDaliPropertyConditionGetArguments();
 static void UtcDaliPropertyConditionGetArgumentsConst();
 
@@ -85,6 +89,10 @@ extern "C" {
     { UtcDaliPropertyNotificationLessThan, POSITIVE_TC_IDX },
     { UtcDaliPropertyNotificationInside, POSITIVE_TC_IDX },
     { UtcDaliPropertyNotificationOutside, POSITIVE_TC_IDX },
+    { UtcDaliPropertyNotificationVectorComponentGreaterThan, POSITIVE_TC_IDX },
+    { UtcDaliPropertyNotificationVectorComponentLessThan, POSITIVE_TC_IDX },
+    { UtcDaliPropertyNotificationVectorComponentInside, POSITIVE_TC_IDX },
+    { UtcDaliPropertyNotificationVectorComponentOutside, POSITIVE_TC_IDX },
     { UtcDaliPropertyConditionGetArguments, POSITIVE_TC_IDX },
     { UtcDaliPropertyConditionGetArgumentsConst, POSITIVE_TC_IDX },
     { NULL, 0 }
@@ -525,6 +533,188 @@ static void UtcDaliPropertyNotificationOutside()
   DALI_TEST_CHECK( gCallBackCalled );
 }
 
+static void UtcDaliPropertyNotificationVectorComponentGreaterThan()
+{
+  TestApplication application;
+  tet_infoline(" UtcDaliPropertyNotificationGreaterThan");
+
+  Actor actor = Actor::New();
+  Stage::GetCurrent().Add(actor);
+
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 0, GreaterThanCondition(100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 1, GreaterThanCondition(100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 2, GreaterThanCondition(100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::COLOR, 3, GreaterThanCondition(0.5f) );
+  notification.NotifySignal().Connect( &TestCallback );
+
+  actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+  actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+
+  // Move right to satisfy XAxis condition
+  gCallBackCalled = false;
+  actor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Move down to satisfy YAxis condition
+  gCallBackCalled = false;
+  actor.SetPosition(Vector3(200.0f, 200.0f, 0.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Move forward to satisfy ZAxis
+  gCallBackCalled = false;
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  actor.SetPosition(Vector3(200.0f, 200.0f, 200.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Change alpha Colour to satisfy w/alpha component condition
+  gCallBackCalled = false;
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  actor.SetColor(Vector3(0.0f, 0.0f, 0.0f, 1.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+}
+
+static void UtcDaliPropertyNotificationVectorComponentLessThan()
+{
+  TestApplication application;
+  tet_infoline(" UtcDaliPropertyNotificationLessThan");
+
+  Actor actor = Actor::New();
+  Stage::GetCurrent().Add(actor);
+
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 0, LessThanCondition(-100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 1, LessThanCondition(-100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 2, LessThanCondition(-100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::COLOR, 3, LessThanCondition(0.5f) );
+  notification.NotifySignal().Connect( &TestCallback );
+
+  actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+  actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+
+  // Move left to satisfy XAxis condition
+  gCallBackCalled = false;
+  actor.SetPosition(Vector3(-200.0f, 0.0f, 0.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Move up to satisfy YAxis condition
+  gCallBackCalled = false;
+  actor.SetPosition(Vector3(-200.0f, -200.0f, 0.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Move back to satisfy ZAxis
+  gCallBackCalled = false;
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  actor.SetPosition(Vector3(-200.0f, -200.0f, -200.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Change alpha Colour to satisfy w/alpha component condition
+  gCallBackCalled = false;
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  actor.SetColor(Vector3(0.0f, 0.0f, 0.0f, 1.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+}
+
+static void UtcDaliPropertyNotificationVectorComponentInside()
+{
+  TestApplication application;
+  tet_infoline(" UtcDaliPropertyNotificationInside");
+
+  Actor actor = Actor::New();
+  Stage::GetCurrent().Add(actor);
+
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 0, InsideCondition(-100.0f, 100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 1, InsideCondition(-100.0f, 100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 2, InsideCondition(-100.0f, 100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::COLOR, 3, InsideCondition(0.25f, 0.75f) );
+  notification.NotifySignal().Connect( &TestCallback );
+
+  // set outside all conditions
+  actor.SetPosition(Vector3(200.0f, 200.0f, 200.0f));
+  actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+
+  // Move x to inside condition
+  gCallBackCalled = false;
+  actor.SetPosition(Vector3(0.0f, 200.0f, 200.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Move y to inside condition
+  gCallBackCalled = false;
+  actor.SetPosition(Vector3(0.0f, 0.0f, 200.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Move z to inside condition
+  gCallBackCalled = false;
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // change alpha to inside condition
+  gCallBackCalled = false;
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  actor.SetColor(Vector3(0.0f, 0.0f, 0.0f, 0.5f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+}
+
+static void UtcDaliPropertyNotificationVectorComponentOutside()
+{
+  TestApplication application;
+  tet_infoline(" UtcDaliPropertyNotificationOutside");
+
+  Actor actor = Actor::New();
+  Stage::GetCurrent().Add(actor);
+
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 0, OutsideCondition(-100.0f, 100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 1, OutsideCondition(-100.0f, 100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::POSITION, 2, OutsideCondition(-100.0f, 100.0f) );
+  PropertyNotification notification = actor.AddPropertyNotification( Actor::COLOR, 3, InsideCondition(0.25f, 0.75f) );
+  notification.NotifySignal().Connect( &TestCallback );
+
+  // set inside all conditions
+  actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+  actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.5f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+
+  // Move x to outside condition
+  gCallBackCalled = false;
+  actor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Move y to outside condition
+  gCallBackCalled = false;
+  actor.SetPosition(Vector3(200.0f, 200.0f, 0.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // Move z to outside condition
+  gCallBackCalled = false;
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  actor.SetPosition(Vector3(200.0f, 200.0f, 200.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+
+  // change alpha to outside condition
+  gCallBackCalled = false;
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  actor.SetColor(Vector3(0.0f, 0.0f, 0.0f, 1.0f));
+  Wait(application, DEFAULT_WAIT_PERIOD);
+  DALI_TEST_CHECK( gCallBackCalled );
+}
+
 static void UtcDaliPropertyConditionGetArguments()
 {
   TestApplication application;
index 387de48..8945ce5 100644 (file)
@@ -228,8 +228,23 @@ public:
    * @pre Property::INVALID_INDEX < index < GetPropertyCount().
    * @param [in] index The index of the property.
    * @param [in] condition The notification will be triggered when this condition is satisfied.
+   *
+   * @return A handle to the newly created PropertyNotification
+   */
+  PropertyNotification AddPropertyNotification(Property::Index index,
+                                               const PropertyCondition& condition);
+
+  /**
+   * Add a property notification to this object.
+   * @pre Property::INVALID_INDEX < index < GetPropertyCount().
+   * @param [in] index The index of the property.
+   * @param [in] componentIndex Index to the component of a complex property such as a Vector
+   * @param [in] condition The notification will be triggered when this condition is satisfied.
+   *
+   * @return A handle to the newly created PropertyNotification
    */
   PropertyNotification AddPropertyNotification(Property::Index index,
+                                               int componentIndex,
                                                const PropertyCondition& condition);
 
   /**
index d7ad8c6..d20342d 100644 (file)
@@ -103,16 +103,10 @@ public:
    * @copydoc Dali::Handle::AddPropertyNotification()
    */
   virtual Dali::PropertyNotification AddPropertyNotification(Property::Index index,
+                                                             int componentIndex,
                                                              const Dali::PropertyCondition& condition) = 0;
 
   /**
-   * @copydoc Dali::Handle::AddPropertyNotification(Property::Index index, const PropertyCondition& condition, PropertyNotifyCallbackType callback)
-   */
-  virtual Dali::PropertyNotification AddPropertyNotification(Property::Index index,
-                                                             const Dali::PropertyCondition& condition,
-                                                             PropertyNotifyCallbackType callback) = 0;
-
-  /**
    * @copydoc Dali::Handle::RemovePropertyNotification()
    */
   virtual void RemovePropertyNotification(Dali::PropertyNotification propertyNotification) = 0;
index 6c7d314..49f6b7b 100644 (file)
@@ -40,6 +40,7 @@ namespace Internal
 {
 
 PropertyNotificationPtr PropertyNotification::New(Property& target,
+                                                  int componentIndex,
                                                   const Dali::PropertyCondition& condition)
 {
   ThreadLocalStorage& tls = ThreadLocalStorage::Get();
@@ -51,6 +52,7 @@ PropertyNotificationPtr PropertyNotification::New(Property& target,
   PropertyNotificationPtr propertyNotification = new PropertyNotification(updateManager,
                                                                           propertyNotificationManager,
                                                                           target,
+                                                                          componentIndex,
                                                                           condition);
 
   return propertyNotification;
@@ -59,11 +61,14 @@ PropertyNotificationPtr PropertyNotification::New(Property& target,
 PropertyNotification::PropertyNotification(UpdateManager& updateManager,
                                            PropertyNotificationManager& propertyNotificationManager,
                                            Property& target,
+                                           int componentIndex,
                                            const Dali::PropertyCondition& condition)
 : mUpdateManager(updateManager),
   mPropertyNotification(NULL),
   mPropertyNotificationManager(propertyNotificationManager),
   mProxyPropertyIndex(target.propertyIndex),
+  mPropertyType(Property::NONE),
+  mComponentIndex(componentIndex),
   mCondition(condition),
   mNotifyMode(Dali::PropertyNotification::NotifyOnTrue),
   mNotifyResult(false)
@@ -84,6 +89,24 @@ PropertyNotification::PropertyNotification(UpdateManager& updateManager,
 
   // Observe target proxy and create/destroy notification scene object accordingly.
   mProxy = dynamic_cast<ProxyObject*>( &GetImplementation(target.object) );
+  mPropertyType = mProxy->GetPropertyType(mProxyPropertyIndex);
+
+  int internalComponentIndex = mProxy->GetPropertyComponentIndex(mProxyPropertyIndex);
+  if( internalComponentIndex != INVALID_PROPERTY_COMPONENT_INDEX )
+  {
+    // override the one passed in
+    mComponentIndex = internalComponentIndex;
+  }
+  if(mComponentIndex != INVALID_PROPERTY_COMPONENT_INDEX)
+  {
+    Property::Type type = mProxy->GetPropertyType(mProxyPropertyIndex);
+    if( type == Property::VECTOR2
+        || type == Property::VECTOR3
+        || type == Property::VECTOR4 )
+    {
+      mPropertyType = Property::FLOAT;
+    }
+  }
 
   // Check if target scene-object already present, and if so create our notification
   // scene-object
@@ -187,12 +210,11 @@ void PropertyNotification::CreateSceneObject()
 {
   DALI_ASSERT_DEBUG( mPropertyNotification == NULL );
 
-  Property::Type propertyType = mProxy->GetPropertyType(mProxyPropertyIndex);
-
   // Create a new PropertyNotification, temporarily owned
   SceneGraph::PropertyNotification* propertyNotification = SceneGraph::PropertyNotification::New( *mProxy,
                                                                                                   mProxyPropertyIndex,
-                                                                                                  propertyType,
+                                                                                                  mPropertyType,
+                                                                                                  mComponentIndex,
                                                                                                   GetImplementation(mCondition).type,
                                                                                                   mRawConditionArgs,
                                                                                                   mNotifyMode );
index 89a5e8a..a0f7767 100644 (file)
@@ -65,10 +65,12 @@ public:
   /**
    * Create a new PropertyNotification object.
    * @param[in] target The target object to inspect
+   * @param[in] componentIndex Index to the component of a complex property such as a Vector
    * @param[in] condition The condition for this notification.
    * @return A smart-pointer to the newly allocated PropertyNotification.
    */
   static PropertyNotificationPtr New(Property& target,
+                                     int componentIndex,
                                      const Dali::PropertyCondition& condition);
 
 public:
@@ -144,11 +146,13 @@ protected:
    * @param[in] updateManager The UpdateManager associated with this PropertyNotification.
    * @param[in] propertyNotificationManager The property notification manager object.
    * @param[in] target The target property.
+   * @param[in] componentIndex Index to the component of a complex property such as a Vector
    * @param[in] condition The condition for this notification.
    */
   PropertyNotification(SceneGraph::UpdateManager& updateManager,
                        PropertyNotificationManager& propertyNotificationManager,
                        Property& target,
+                       int componentIndex,
                        const Dali::PropertyCondition& condition);
 
   /**
@@ -184,12 +188,14 @@ protected:
 private:
 
   PropertyNotificationManager& mPropertyNotificationManager;  ///< Reference to the property notification manager
-  ProxyObject* mProxy;                                        ///< Target object, not owned by PropertyNotification.
-  Property::Index mProxyPropertyIndex;                        ///< Target object's property index of interest.
-  Dali::PropertyCondition mCondition;                         ///< The PropertyCondition handle.
-  RawArgumentContainer mRawConditionArgs;                     ///< The Raw Condition args. (float type)
-  NotifyMode mNotifyMode;                                     ///< The current notification mode.
-  bool       mNotifyResult;                                   ///< The result of the last condition check that caused a signal emit
+  ProxyObject*                 mProxy;                        ///< Target object, not owned by PropertyNotification.
+  Property::Index              mProxyPropertyIndex;           ///< Target object's property index of interest.
+  Property::Type               mPropertyType;                 ///< The type of property to evaluate
+  int                          mComponentIndex;               ///< Index to a specific component of a complex property such as a Vector
+  Dali::PropertyCondition      mCondition;                    ///< The PropertyCondition handle.
+  RawArgumentContainer         mRawConditionArgs;             ///< The Raw Condition args. (float type)
+  NotifyMode                   mNotifyMode;                   ///< The current notification mode.
+  bool                         mNotifyResult;                 ///< The result of the last condition check that caused a signal emit
 };
 
 } // namespace Internal
index 9e449a4..20fb1ba 100644 (file)
@@ -477,6 +477,7 @@ Property::Index ProxyObject::RegisterProperty( std::string name, const Property:
 }
 
 Dali::PropertyNotification ProxyObject::AddPropertyNotification(Property::Index index,
+                                                                int componentIndex,
                                                                 const Dali::PropertyCondition& condition)
 {
   if ( ( index >= DEFAULT_PROPERTY_MAX_COUNT )&&( mCustomProperties ) )
@@ -490,7 +491,7 @@ Dali::PropertyNotification ProxyObject::AddPropertyNotification(Property::Index
   Dali::Handle self(this);
   Property target( self, index );
 
-  PropertyNotificationPtr internal = PropertyNotification::New( target, condition );
+  PropertyNotificationPtr internal = PropertyNotification::New( target, componentIndex, condition );
   Dali::PropertyNotification propertyNotification(internal.Get());
 
   if( !mPropertyNotifications )
@@ -502,14 +503,6 @@ Dali::PropertyNotification ProxyObject::AddPropertyNotification(Property::Index
   return propertyNotification;
 }
 
-// deprecated
-Dali::PropertyNotification ProxyObject::AddPropertyNotification(Property::Index index,
-                                                                const Dali::PropertyCondition& condition,
-                                                                PropertyNotifyCallbackType callback)
-{
-  return AddPropertyNotification(index, condition);
-}
-
 void ProxyObject::RemovePropertyNotification(Dali::PropertyNotification propertyNotification)
 {
   if( mPropertyNotifications )
index 71ade3e..ef29a2c 100644 (file)
@@ -217,16 +217,10 @@ public: // Property system interface from Internal::Object
    * @copydoc Dali::Handle::AddPropertyNotification()
    */
   virtual Dali::PropertyNotification AddPropertyNotification(Property::Index index,
+                                                             int componentIndex,
                                                              const Dali::PropertyCondition& condition);
 
   /**
-   * @copydoc Dali::Handle::AddPropertyNotification(Property::Index index, const PropertyCondition& condition, PropertyNotifyCallbackType callback)
-   */
-  virtual Dali::PropertyNotification AddPropertyNotification(Property::Index index,
-                                                             const Dali::PropertyCondition& condition,
-                                                             PropertyNotifyCallbackType callback);
-
-  /**
    * @copydoc Dali::Handle::RemovePropertyNotification()
    */
   virtual void RemovePropertyNotification(Dali::PropertyNotification propertyNotification);
index 9d750ed..a89bfba 100644 (file)
@@ -37,17 +37,19 @@ namespace SceneGraph
 PropertyNotification* PropertyNotification::New(ProxyObject& proxy,
                                                 Property::Index propertyIndex,
                                                 Property::Type propertyType,
+                                                int componentIndex,
                                                 ConditionType condition,
                                                 const RawArgumentContainer& arguments,
                                                 NotifyMode notifyMode)
 {
-  return new PropertyNotification( proxy, propertyIndex, propertyType, condition, arguments, notifyMode );
+  return new PropertyNotification( proxy, propertyIndex, propertyType, componentIndex, condition, arguments, notifyMode );
 }
 
 
 PropertyNotification::PropertyNotification(ProxyObject& proxy,
                                            Property::Index propertyIndex,
                                            Property::Type propertyType,
+                                           int componentIndex,
                                            ConditionType condition,
                                            const RawArgumentContainer& arguments,
                                            NotifyMode notifyMode)
@@ -55,7 +57,7 @@ PropertyNotification::PropertyNotification(ProxyObject& proxy,
   mPropertyIndex(propertyIndex),
   mPropertyType(propertyType),
   mProperty(NULL),
-  mComponentIndex(INVALID_PROPERTY_COMPONENT_INDEX),
+  mComponentIndex(componentIndex),
   mConditionType(condition),
   mArguments(arguments),
   mValid(false)
@@ -97,7 +99,12 @@ PropertyNotification::PropertyNotification(ProxyObject& proxy,
   }
 
   mProperty = mProxy->GetSceneObjectInputProperty( mPropertyIndex );
-  mComponentIndex = mProxy->GetPropertyComponentIndex( mPropertyIndex );
+  int internalComponentIndex = mProxy->GetPropertyComponentIndex(mPropertyIndex);
+  if( internalComponentIndex != INVALID_PROPERTY_COMPONENT_INDEX )
+  {
+    // override the one passed in
+    mComponentIndex = internalComponentIndex;
+  }
 }
 
 PropertyNotification::~PropertyNotification()
index c187c1a..67e211f 100644 (file)
@@ -62,6 +62,7 @@ public:
    * @param[in] proxy The proxy for a scene-graph object to inspect.
    * @param[in] propertyIndex The index of a property provided by the object.
    * @param[in] propertyType The type of property we're inspecting.
+   * @param[in] componentIndex Index to the component of a complex property such as a Vector
    * @param[in] condition The condition type (e.g. LessThan, GreaterThan...)
    * @param[in] arguments The arguments which accompany the condition.
    * @param[in] notifyMode The notification mode setting
@@ -70,6 +71,7 @@ public:
   static PropertyNotification* New(ProxyObject& proxy,
                                    Property::Index propertyIndex,
                                    Property::Type propertyType,
+                                   int componentIndex,
                                    ConditionType condition,
                                    const RawArgumentContainer& arguments,
                                    NotifyMode notifyMode);
@@ -105,11 +107,19 @@ public:
 protected:
 
   /**
-   * Protected constructor. See New()
+   * Construct the PropertyNotification
+   * @param[in] proxy The proxy for a scene-graph object to inspect.
+   * @param[in] propertyIndex The index of a property provided by the object.
+   * @param[in] propertyType The type of property we're inspecting.
+   * @param[in] componentIndex Index to the component of a complex property such as a Vector
+   * @param[in] condition The condition type (e.g. LessThan, GreaterThan...)
+   * @param[in] arguments The arguments which accompany the condition.
+   * @param[in] notifyMode The notification mode setting
    */
   PropertyNotification(ProxyObject& proxy,
                        Property::Index propertyIndex,
                        Property::Type propertyType,
+                       int componentIndex,
                        ConditionType condition,
                        const RawArgumentContainer& arguments,
                        NotifyMode notifyMode);
index 341c291..ec74a82 100644 (file)
@@ -118,7 +118,14 @@ Property::Value Handle::GetProperty(Property::Index index) const
 Dali::PropertyNotification Handle::AddPropertyNotification(Property::Index index,
                                                            const PropertyCondition& condition)
 {
-  return GetImplementation(*this).AddPropertyNotification( index, condition );
+  return GetImplementation(*this).AddPropertyNotification( index, -1, condition );
+}
+
+Dali::PropertyNotification Handle::AddPropertyNotification(Property::Index index,
+                                                           int componentIndex,
+                                                           const PropertyCondition& condition)
+{
+  return GetImplementation(*this).AddPropertyNotification( index, componentIndex, condition );
 }
 
 void Handle::RemovePropertyNotification(Dali::PropertyNotification propertyNotification)