Revert "Revert "Move TouchPoint to Devel API""
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / event-handler.cpp
index 99f1796..7a1d02b 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -22,7 +22,7 @@
 #include <cstring>
 #include <sys/time.h>
 
-#include <dali/public-api/events/touch-point.h>
+#include <dali/devel-api/events/touch-point.h>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/events/wheel-event.h>
 #include <dali/integration-api/debug.h>
@@ -154,13 +154,11 @@ void EventHandler::OnTouchEvent( Integration::Point& point, uint32_t timeStamp )
   }
 }
 
-void EventHandler::OnWheelEvent( WheelEvent& wheelEvent )
+void EventHandler::OnWheelEvent( Integration::WheelEvent& wheelEvent )
 {
-  Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp );
-
   for ( ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter )
   {
-    (*iter)->OnWheelEvent( event );
+    (*iter)->OnWheelEvent( wheelEvent );
   }
 }
 
@@ -268,22 +266,22 @@ void EventHandler::OnAccessibilityNotification( const WindowBase::AccessibilityI
   }
 
   // Create a touch point object.
-  TouchPoint::State touchPointState( TouchPoint::Down );
+  PointState::Type touchPointState( PointState::DOWN );
   if( info.state == 0 )
   {
-    touchPointState = TouchPoint::Down; // Mouse down.
+    touchPointState = PointState::DOWN; // Mouse down.
   }
   else if( info.state == 1 )
   {
-    touchPointState = TouchPoint::Motion; // Mouse move.
+    touchPointState = PointState::MOTION; // Mouse move.
   }
   else if( info.state == 2 )
   {
-    touchPointState = TouchPoint::Up; // Mouse up.
+    touchPointState = PointState::UP; // Mouse up.
   }
   else
   {
-    touchPointState = TouchPoint::Interrupted; // Error.
+    touchPointState = PointState::INTERRUPTED; // Error.
   }
 
   // Send touch event to accessibility adaptor.