X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fevent-handler.cpp;h=911a3bdafcd3d34e2c6f14e15c1c235f5867b720;hb=389cecd224ef9c24793f78eb48af08e54b31e5c9;hp=99f1796ce6a4bd39756aa2b906e39b14dcf342d9;hpb=39aa1ca3375a2f47686bfe95523c51ca914bb310;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/common/event-handler.cpp b/dali/internal/window-system/common/event-handler.cpp index 99f1796..911a3bd 100755 --- a/dali/internal/window-system/common/event-handler.cpp +++ b/dali/internal/window-system/common/event-handler.cpp @@ -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 #include -#include +#include #include #include #include @@ -95,7 +95,7 @@ static uint32_t GetCurrentMilliSeconds(void) } // unnamed namespace #endif -EventHandler::EventHandler( WindowRenderSurface* surface, DamageObserver& damageObserver ) +EventHandler::EventHandler( WindowBase* windowBase, DamageObserver& damageObserver ) : mStyleMonitor( StyleMonitor::Get() ), mDamageObserver( damageObserver ), mAccessibilityAdaptor( AccessibilityAdaptor::Get() ), @@ -103,11 +103,9 @@ EventHandler::EventHandler( WindowRenderSurface* surface, DamageObserver& damage mClipboard( Clipboard::Get() ), mPaused( false ) { - if( surface ) + // Connect signals + if( windowBase ) { - WindowBase* windowBase = surface->GetWindowBase(); - - // Connect signals windowBase->WindowDamagedSignal().Connect( this, &EventHandler::OnWindowDamaged ); windowBase->FocusChangedSignal().Connect( this, &EventHandler::OnFocusChanged ); windowBase->RotationSignal().Connect( this, &EventHandler::OnRotation ); @@ -119,6 +117,10 @@ EventHandler::EventHandler( WindowRenderSurface* surface, DamageObserver& damage windowBase->StyleChangedSignal().Connect( this, &EventHandler::OnStyleChanged ); windowBase->AccessibilitySignal().Connect( this, &EventHandler::OnAccessibilityNotification ); } + else + { + DALI_LOG_ERROR("WindowBase is invalid!!!\n"); + } } EventHandler::~EventHandler() @@ -154,13 +156,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 +268,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.