Removing Dali::TouchEvent 09/240809/5
authorDavid Steele <david.steele@samsung.com>
Tue, 11 Aug 2020 15:23:49 +0000 (16:23 +0100)
committerDavid Steele <david.steele@samsung.com>
Thu, 13 Aug 2020 15:25:51 +0000 (16:25 +0100)
Change-Id: I5148d3bf8155da17889dffd8e809ec61c62d33e0

automated-tests/src/dali-adaptor/dali-test-suite-utils/test-touch-utils.h [deleted file]
dali/devel-api/adaptor-framework/accessibility-action-handler.h
dali/devel-api/adaptor-framework/accessibility-adaptor.h
dali/devel-api/adaptor-framework/window-devel.cpp
dali/integration-api/adaptor-framework/adaptor.h
dali/internal/accessibility/common/accessibility-adaptor-impl.cpp
dali/internal/accessibility/common/accessibility-gesture-detector.cpp
dali/internal/accessibility/common/accessibility-gesture-detector.h

diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-touch-utils.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-touch-utils.h
deleted file mode 100644 (file)
index 3a623cb..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef TEST_TOUCH_UTILS_H
-#define TEST_TOUCH_UTILS_H
-
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <dali/public-api/actors/actor.h>
-
-namespace Dali
-{
-
-// Data for touch events
-struct TouchEventData
-{
-  TouchEventData()
-  : functorCalled(false),
-    receivedTouch(),
-    touchActor()
-  {
-  }
-
-  void Reset()
-  {
-    functorCalled = false;
-
-    receivedTouch.points.clear();
-    receivedTouch.time = 0;
-
-    touchActor.Reset();
-  }
-
-  bool functorCalled;
-  TouchEvent receivedTouch;
-  Actor touchActor;
-};
-
-// Functor that sets the data when called
-struct TouchEventDataFunctor
-{
-  TouchEventDataFunctor(TouchEventData& data) : touchEventData(data) { }
-
-  bool operator()(Actor actor, const TouchEvent& touch)
-  {
-    touchEventData.functorCalled = true;
-    touchEventData.touchActor = actor;
-    touchEventData.receivedTouch = touch;
-    return false;
-  }
-
-  // Generate a touch-event
-  Integration::TouchEvent GenerateSingleTouch( PointState::Type state, const Vector2& screenPosition ) const
-  {
-    Integration::TouchEvent touchEvent;
-    Integration::Point point;
-    point.SetState( state );
-    point.SetScreenPosition( screenPosition );
-    touchEvent.points.push_back( point );
-    return touchEvent;
-  }
-
-  TouchEventData& touchEventData;
-};
-
-
-} // namespace Dali
-
-#endif // TEST_TOUCH_UTILS_H
index a23620d..b4eb77f 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/dali-adaptor-common.h>
-#include <dali/public-api/events/touch-event.h>
+#include <dali/public-api/events/touch-data.h>
 
 namespace Dali
 {
@@ -47,10 +47,10 @@ public:
 
   /**
    * Perform the accessibility action associated with a scroll event.
-   * @param touchEvent The touch point (and time) of the event.
+   * @param touchData The touch point (and time) of the event.
    * @return whether the focus is cleared or not.
    */
-  virtual bool AccessibilityActionScroll( Dali::TouchEvent& touchEvent ) = 0;
+  virtual bool AccessibilityActionScroll( Dali::TouchData& touchData ) = 0;
 
   /**
    * Perform the accessibility action to move focus to the previous focusable actor (by one finger flick up).
@@ -200,10 +200,10 @@ public:
 
   /**
    * Perform the accessibility action to mouse move (by one finger tap & hold and move).
-   * @param touchEvent touch event structure
+   * @param touchData touch data
    * @return whether the accessibility action is performed or not.
    */
-  virtual bool AccessibilityActionTouch(const Dali::TouchEvent& touchEvent) = 0;
+  virtual bool AccessibilityActionTouch(const Dali::TouchData& touchData) = 0;
 
 }; // class AccessibilityActionHandler
 
index 251f591..14b856b 100755 (executable)
@@ -20,7 +20,7 @@
 
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/events/touch-event.h>
+#include <dali/public-api/events/touch-point.h>
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/dali-adaptor-common.h>
 
index 3cd89e2..c3c8c18 100644 (file)
@@ -17,7 +17,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/events/key-event.h>
-#include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/events/wheel-event.h>
 
 // INTERNAL INCLUDES
index 4f708e4..94c5f81 100644 (file)
@@ -23,8 +23,8 @@
 #include <dali/public-api/signals/dali-signal.h>
 #include <dali/public-api/math/uint-16-pair.h>
 #include <dali/public-api/math/rect.h>
-#include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/object/any.h>
+#include <dali/public-api/events/touch-point.h>
 #include <dali/integration-api/processor-interface.h>
 
 // INTERNAL INCLUDES
index d3eb43b..4276737 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/object/type-registry.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/touch-data-integ.h>
 #include <dali/integration-api/events/hover-event-integ.h>
 
 // INTERNAL INCLUDES
@@ -249,9 +250,8 @@ bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, uint
   // so always send the action to the action handler.
   if( mActionHandler )
   {
-    Dali::TouchEvent event(timeStamp);
-    event.points.push_back(point);
-    ret = mActionHandler->AccessibilityActionScroll( event );
+    Dali::TouchData touchData = Integration::NewTouchData( timeStamp, point );
+    ret = mActionHandler->AccessibilityActionScroll( touchData );
   }
 
   Integration::TouchEvent touchEvent;
@@ -274,12 +274,11 @@ bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, uint3
 {
   bool ret = false;
 
-  Dali::TouchEvent touchEvent(timeStamp);
-  touchEvent.points.push_back(point);
+  Dali::TouchData touchData = Integration::NewTouchData( timeStamp, point );
 
   if( mActionHandler )
   {
-    ret = mActionHandler->AccessibilityActionTouch(touchEvent);
+    ret = mActionHandler->AccessibilityActionTouch( touchData );
   }
   return ret;
 }
index b872077..5a7fd8d 100644 (file)
@@ -20,9 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <cmath>
-
-#include <dali/public-api/events/touch-point.h>
-
 #include <dali/integration-api/events/touch-event-integ.h>
 
 
index 616d76e..520b3f6 100644 (file)
@@ -24,7 +24,6 @@
 #include <dali/devel-api/adaptor-framework/accessibility-gesture-handler.h>
 #include <dali/devel-api/adaptor-framework/accessibility-gesture-event.h>
 #include <dali/integration-api/scene.h>
-#include <dali/public-api/events/touch-event.h>
 
 namespace Dali
 {