Change property name from TouchDelegateArea to TouchArea. 91/246391/2
authorJoogab Yun <joogab.yun@samsung.com>
Thu, 29 Oct 2020 03:33:55 +0000 (12:33 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Thu, 29 Oct 2020 06:54:07 +0000 (15:54 +0900)
Change-Id: I6b2af477ffb8523d7e98ffbc250cbb2deb59c5cc

automated-tests/src/dali/utc-Dali-Actor.cpp
automated-tests/src/dali/utc-Dali-TouchProcessing.cpp
dali/devel-api/actors/actor-devel.h
dali/internal/event/actors/actor-impl.cpp
dali/internal/event/actors/actor-impl.h
dali/internal/event/actors/actor-property-handler.cpp
dali/internal/event/events/ray-test.cpp

index d161892..1093bf7 100755 (executable)
@@ -7926,20 +7926,20 @@ int UtcDaliActorCaptureAllTouchAfterStartPropertyN(void)
   END_TEST;
 }
 
-int UtcDaliActorTouchDelegateAreaPropertyP(void)
+int UtcDaliActorTouchAreaPropertyP(void)
 {
   TestApplication application;
 
   Actor actor = Actor::New();
-  Vector2 touchDelegateArea = actor.GetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA).Get<Vector2>();
-  DALI_TEST_EQUALS(touchDelegateArea, Vector2::ZERO, TEST_LOCATION);
-  actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, Vector2(10.f, 10.f));
-  touchDelegateArea = actor.GetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA).Get<Vector2>();
-  DALI_TEST_EQUALS(touchDelegateArea, Vector2(10.f, 10.f), TEST_LOCATION);
+  Vector2 touchArea = actor.GetProperty(DevelActor::Property::TOUCH_AREA).Get<Vector2>();
+  DALI_TEST_EQUALS(touchArea, Vector2::ZERO, TEST_LOCATION);
+  actor.SetProperty(DevelActor::Property::TOUCH_AREA, Vector2(10.f, 10.f));
+  touchArea = actor.GetProperty(DevelActor::Property::TOUCH_AREA).Get<Vector2>();
+  DALI_TEST_EQUALS(touchArea, Vector2(10.f, 10.f), TEST_LOCATION);
   END_TEST;
 }
 
-int UtcDaliActorTouchDelegateAreaPropertyN(void)
+int UtcDaliActorTouchAreaPropertyN(void)
 {
   TestApplication application;
 
@@ -7948,12 +7948,12 @@ int UtcDaliActorTouchDelegateAreaPropertyN(void)
   // Make sure setting invalid types does not cause a crash
   try
   {
-    actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, 1.0f);
-    actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, Vector2::ONE);
-    actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, Vector3::ONE);
-    actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, Vector4::ONE);
-    actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, Property::Map());
-    actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, Property::Array());
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA, 1.0f);
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA, Vector2::ONE);
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA, Vector3::ONE);
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA, Vector4::ONE);
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA, Property::Map());
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA, Property::Array());
     tet_result(TET_PASS);
   }
   catch(...)
index e0c7b80..275aa2a 100755 (executable)
@@ -2121,7 +2121,7 @@ int UtcDaliTouchEventIntercept(void)
   END_TEST;
 }
 
-int UtcDaliTouchDelegateArea(void)
+int UtcDaliTouchArea(void)
 {
   TestApplication application;
 
@@ -2146,8 +2146,8 @@ int UtcDaliTouchDelegateArea(void)
   DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
   data.Reset();
 
-  // set a bigger touch delegate area
-  actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, Vector2(200.0f, 200.0f));
+  // set a bigger touch area
+  actor.SetProperty(DevelActor::Property::TOUCH_AREA, Vector2(200.0f, 200.0f));
 
   // Render and notify
   application.SendNotification();
@@ -2155,14 +2155,14 @@ int UtcDaliTouchDelegateArea(void)
 
   // Emit a down signal
   application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(110.0f, 110.0f)));
-  // The actor touched signal is called because the touch area is inside touchDelegateArea.
+  // The actor touched signal is called because the touch area is inside touchArea.
   DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
   DALI_TEST_EQUALS(PointState::DOWN, data.receivedTouch.points[0].state, TEST_LOCATION);
   DALI_TEST_CHECK(actor == data.receivedTouch.points[0].hitActor);
   data.Reset();
 
-  // set a smaller touch delegate area
-  actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, Vector2(50.0f, 50.0f));
+  // set a smaller touch area
+  actor.SetProperty(DevelActor::Property::TOUCH_AREA, Vector2(50.0f, 50.0f));
 
   // Render and notify
   application.SendNotification();
@@ -2170,13 +2170,13 @@ int UtcDaliTouchDelegateArea(void)
 
   // Emit a down signal
   application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(80.0f, 80.0f)));
-  // The actor touched signal is not called because the touch area is outside touchDelegateArea.
+  // The actor touched signal is not called because the touch area is outside touchArea.
   DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
   data.Reset();
 
   // Emit a down signal
   application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(30.0f, 30.0f)));
-  // The actor touched signal is called because the touch area is inside touchDelegateArea.
+  // The actor touched signal is called because the touch area is inside touchArea.
   DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
   DALI_TEST_EQUALS(PointState::DOWN, data.receivedTouch.points[0].state, TEST_LOCATION);
   DALI_TEST_CHECK(actor == data.receivedTouch.points[0].hitActor);
index 7b1b7d1..6c9eba0 100755 (executable)
@@ -120,18 +120,18 @@ enum Type
   CAPTURE_ALL_TOUCH_AFTER_START,
 
   /**
-    * @brief If you set the TOUCH_DELEGATE_AREA on an actor, when you touch the actor, the delegate area is used rather than the size of the actor
-    * @details Name "touchDelegateArea", type Property::Vector2
+    * @brief If you set the TOUCH_AREA on an actor, when you touch the actor, the touch area is used rather than the size of the actor
+    * @details Name "touchArea", type Property::Vector2
     * @note Default is Vector2::ZERO.
     * @note for example
     *  Actor actor = Actor::New();
     *  actor.SetProperty(Actor::Property::SIZE, Vector2(10.0f, 10.0f));
-    *  actor.SetProperty(DevelActor::Property::TOUCH_DELEGATE_AREA, Vector2(200.0f, 200.0f));
+    *  actor.SetProperty(DevelActor::Property::TOUCH_AREA, Vector2(200.0f, 200.0f));
     *  actor.TouchedSignal().Connect(OnTouchCallback);
     *
-    *  If you want to reset the touch area to an area different with the size of the actor, you can set this TOUCH_DELEGATE_AREA property.
+    *  If you want to reset the touch area to an area different with the size of the actor, you can set this TOUCH_AREA property.
     */
-  TOUCH_DELEGATE_AREA
+  TOUCH_AREA
 };
 
 } // namespace Property
index d9ba8a1..f4a1067 100755 (executable)
@@ -143,7 +143,7 @@ DALI_PROPERTY( "keyboardFocusable",         BOOLEAN,  true,  false, false, Dali:
 DALI_PROPERTY( "siblingOrder",              INTEGER,  true,  false, false, Dali::DevelActor::Property::SIBLING_ORDER )
 DALI_PROPERTY( "updateSizeHint",            VECTOR2,  true,  false, false, Dali::DevelActor::Property::UPDATE_SIZE_HINT )
 DALI_PROPERTY( "captureAllTouchAfterStart", BOOLEAN,  true,  false, false, Dali::DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START )
-DALI_PROPERTY( "touchDelegateArea",         VECTOR2,  true,  false, false, Dali::DevelActor::Property::TOUCH_DELEGATE_AREA )
+DALI_PROPERTY( "touchArea",                 VECTOR2,  true,  false, false, Dali::DevelActor::Property::TOUCH_AREA )
 DALI_PROPERTY_TABLE_END( DEFAULT_ACTOR_PROPERTY_START_INDEX, ActorDefaultProperties )
 
 // Signals
@@ -1450,7 +1450,7 @@ Actor::Actor( DerivedType derivedType, const SceneGraph::Node& node )
   mTargetPosition( Vector3::ZERO ),
   mTargetScale( Vector3::ONE ),
   mAnimatedSize( Vector3::ZERO ),
-  mTouchDelegateArea( Vector2::ZERO ),
+  mTouchArea( Vector2::ZERO ),
   mName(),
   mSortedDepth( 0u ),
   mDepth( 0u ),
index 4404718..a3ad757 100755 (executable)
@@ -1383,21 +1383,21 @@ public:
   }
 
   /**
-   * Sets the touch delegate area of an actor.
+   * Sets the touch area of an actor.
    * @param [in] area The new area.
    */
-  void SetTouchDelegateArea(Vector2 area)
+  void SetTouchArea(Vector2 area)
   {
-    mTouchDelegateArea = area;
+    mTouchArea = area;
   }
 
   /**
-   * Retrieve the Actor's touch delegate area.
-   * @return The Actor's touch delegate area.
+   * Retrieve the Actor's touch area.
+   * @return The Actor's touch area.
    */
-  const Vector2& GetTouchDelegateArea() const
+  const Vector2& GetTouchArea() const
   {
-    return mTouchDelegateArea;
+    return mTouchArea;
   }
 
 
@@ -2045,7 +2045,7 @@ protected:
   Vector3         mTargetPosition;    ///< Event-side storage for position (not a pointer as most actors will have a position)
   Vector3         mTargetScale;       ///< Event-side storage for scale
   Vector3         mAnimatedSize;      ///< Event-side storage for size animation
-  Vector2         mTouchDelegateArea; ///< touch delegate area
+  Vector2         mTouchArea;         ///< touch area
 
   std::string     mName;              ///< Name of the actor
   uint32_t        mSortedDepth;       ///< The sorted depth index. A combination of tree traversal and sibling order.
index 415f637..3df53fc 100755 (executable)
@@ -574,12 +574,12 @@ void Actor::PropertyHandler::SetDefaultProperty( Internal::Actor& actor, Propert
       break;
     }
 
-    case Dali::DevelActor::Property::TOUCH_DELEGATE_AREA:
+    case Dali::DevelActor::Property::TOUCH_AREA:
     {
       Vector2 vec2Value;
       if( property.Get( vec2Value ) )
       {
-        actor.SetTouchDelegateArea( vec2Value );
+        actor.SetTouchArea( vec2Value );
       }
       break;
     }
@@ -1614,9 +1614,9 @@ bool Actor::PropertyHandler::GetCachedPropertyValue(const Internal::Actor& actor
       break;
     }
 
-    case Dali::DevelActor::Property::TOUCH_DELEGATE_AREA:
+    case Dali::DevelActor::Property::TOUCH_AREA:
     {
-      value = actor.GetTouchDelegateArea();
+      value = actor.GetTouchArea();
       break;
     }
 
index 112c03a..69a947a 100755 (executable)
@@ -156,7 +156,7 @@ bool RayTest::ActorTest(const Internal::Actor& actor, const Vector4& rayOrigin,
       // Ray travels distance * rayDirLocal to intersect with plane.
       distance = a / b;
 
-      const Vector2& size = actor.GetTouchDelegateArea() == Vector2::ZERO ? Vector2(node.GetSize(EventThreadServices::Get().GetEventBufferIndex())) : actor.GetTouchDelegateArea();
+      const Vector2& size = actor.GetTouchArea() == Vector2::ZERO ? Vector2(node.GetSize(EventThreadServices::Get().GetEventBufferIndex())) : actor.GetTouchArea();
       hitPointLocal.x = rayOriginLocal.x + rayDirLocal.x * distance + size.x * 0.5f;
       hitPointLocal.y = rayOriginLocal.y + rayDirLocal.y * distance + size.y * 0.5f;