[3.0] Fix build error when using --enable-debug option
[platform/core/uifw/dali-adaptor.git] / adaptors / wayland / event-handler-wl.cpp
index 636de86..b6a604e 100644 (file)
@@ -53,6 +53,13 @@ namespace Internal
 namespace Adaptor
 {
 
+#if defined(DEBUG_ENABLED)
+namespace
+{
+  Integration::Log::Filter* gTouchEventLogFilter  = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_TOUCH");
+} // unnamed namespace
+#endif
+
 struct EventHandler::Impl : public WindowEventInterface
 {
   // Construction & Destruction
@@ -72,7 +79,7 @@ struct EventHandler::Impl : public WindowEventInterface
   {
   }
   // @todo Consider allowing the EventHandler class to inherit from WindowEventInterface directly
-  virtual void TouchEvent( Dali::TouchPoint& point, unsigned long timeStamp )
+  virtual void TouchEvent( Dali::Integration::Point& point, unsigned long timeStamp )
   {
     mHandler->SendEvent( point, timeStamp );
   }
@@ -114,7 +121,8 @@ EventHandler::EventHandler( RenderSurface* surface, CoreEventInterface& coreEven
   mDragAndDropDetector( dndDetector ),
   mClipboardEventNotifier( ClipboardEventNotifier::Get() ),
   mClipboard( Dali::Clipboard::Get()),
-  mImpl( NULL )
+  mImpl( NULL ),
+  mPaused( false )
 {
 
 
@@ -139,7 +147,7 @@ EventHandler::~EventHandler()
   mGestureManager.Stop();
 }
 
-void EventHandler::SendEvent(TouchPoint& point, unsigned long timeStamp)
+void EventHandler::SendEvent(Integration::Point& point, unsigned long timeStamp)
 {
 
   Integration::TouchEvent touchEvent;
@@ -147,7 +155,7 @@ void EventHandler::SendEvent(TouchPoint& point, unsigned long timeStamp)
   Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);
   if(type != Integration::TouchEventCombiner::DispatchNone )
   {
-    DALI_LOG_INFO(gTouchEventLogFilter, Debug::General, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.deviceId, point.state, point.local.x, point.local.y);
+    DALI_LOG_INFO(gTouchEventLogFilter, Debug::General, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.GetDeviceId(), point.GetState(), point.GetLocalPosition().x, point.GetLocalPosition().y);
 
     // First the touch and/or hover event & related gesture events are queued
     if(type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth)
@@ -221,7 +229,8 @@ void EventHandler::SendRotationRequestEvent( )
 
 void EventHandler::FeedTouchPoint( TouchPoint& point, int timeStamp)
 {
-  SendEvent(point, timeStamp);
+  Integration::Point convertedPoint( point );
+  SendEvent(convertedPoint, timeStamp);
 }
 
 void EventHandler::FeedWheelEvent( WheelEvent& wheelEvent )
@@ -246,7 +255,8 @@ void EventHandler::Reset()
 
   // Any touch listeners should be told of the interruption.
   Integration::TouchEvent event;
-  TouchPoint point(0, TouchPoint::Interrupted, 0, 0);
+  Integration::Point point;
+  point.SetState( PointState::INTERRUPTED );
   event.AddPoint( point );
 
   // First the touch event & related gesture events are queued