From: David Steele Date: Thu, 13 Aug 2020 16:59:34 +0000 (+0000) Subject: Merge "Removed TouchEvent from dali-core" into devel/master X-Git-Tag: dali_1.9.25~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=70162c49a1387daf074414b7c6223417fce53419;hp=6e1c172b801e44992f243e9ebf908ce3beeb6e84 Merge "Removed TouchEvent from dali-core" into devel/master --- diff --git a/README.md b/README.md index 2bd6dd8..e653068 100644 --- a/README.md +++ b/README.md @@ -21,15 +21,11 @@ ### Requirements - - Ubuntu 14.04 or later + - Ubuntu 16.04 or later - Environment created using dali_env script in dali-core repository - - GCC version 6 + - GCC version 9 -DALi requires a compiler supporting C++11 features. -Ubuntu 16.04 is the first version to offer this by default (GCC v5.4.0). - -GCC version 6 is recommended since it has fixes for issues in version 5 -e.g. it avoids spurious 'defined but not used' warnings in header files. +DALi requires a compiler supporting C++17 features. ### Building the Repository diff --git a/build/tizen/CMakeLists.txt b/build/tizen/CMakeLists.txt index e465353..3bedbd1 100644 --- a/build/tizen/CMakeLists.txt +++ b/build/tizen/CMakeLists.txt @@ -3,6 +3,7 @@ CMAKE_POLICY(SET CMP0012 NEW) # Prevent dereferencing of OFF/ON as variables SET(name "dali2-toolkit") +SET(CMAKE_C_STANDARD 99) PROJECT(${name}) SET(PKG_NAME ${name}) @@ -200,10 +201,11 @@ ENDIF() IF( WIN32 ) ADD_COMPILE_OPTIONS( /FIdali-windows-dependencies.h ) # Adds missing definitions. ADD_COMPILE_OPTIONS( /vmg ) # Avoids a 'reinterpret_cast' compile error while compiling signals and callbacks. + ADD_COMPILE_OPTIONS( /std:c++17 ) # c++17 support ADD_COMPILE_OPTIONS( /wd4251 ) # Ignores warning C4251: "'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'" ELSE() # Set up compiler flags and warnings - ADD_COMPILE_OPTIONS( -std=c++11 ) + ADD_COMPILE_OPTIONS( -std=c++17 ) ADD_COMPILE_OPTIONS( -Wno-ignored-qualifiers ) # TODO: Clang is a lot more strict with warnings, we should address diff --git a/dali-toolkit/internal/controls/tooltip/tooltip.cpp b/dali-toolkit/internal/controls/tooltip/tooltip.cpp index 012db24..80a558e 100644 --- a/dali-toolkit/internal/controls/tooltip/tooltip.cpp +++ b/dali-toolkit/internal/controls/tooltip/tooltip.cpp @@ -385,30 +385,30 @@ void Tooltip::SetTail( const Property::Value& value ) bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover ) { - const TouchPoint::State state = hover.points[0].state; + const PointState::Type state = hover.GetState( 0 ); switch( state ) { - case TouchPoint::Started: - case TouchPoint::Motion: + case PointState::STARTED: + case PointState::MOTION: { if( ! mPopup ) { if( ! mTooltipTimer ) { - mHoverPoint = hover.points[ 0 ].screen; + mHoverPoint = hover.GetScreenPosition( 0 ); mTooltipTimer = Timer::New( mWaitTime ); mTooltipTimer.TickSignal().Connect( this, &Tooltip::OnTimeout ); mTooltipTimer.Start(); } else { - Vector2 movement = mHoverPoint - hover.points[ 0 ].screen; + Vector2 movement = mHoverPoint - hover.GetScreenPosition( 0 ); if( std::abs( movement.Length() ) > mMovementThreshold ) { mTooltipTimer.Stop(); mTooltipTimer.Reset(); - mHoverPoint = hover.points[ 0 ].screen; + mHoverPoint = hover.GetScreenPosition( 0 ); mTooltipTimer = Timer::New( mWaitTime ); mTooltipTimer.TickSignal().Connect( this, &Tooltip::OnTimeout ); mTooltipTimer.Start(); @@ -419,7 +419,7 @@ bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover ) { // Popup is showing, and we're set to disappear on excessive movement so make sure we're still within the threshold. - Vector2 movement = mHoverPoint - hover.points[ 0 ].screen; + Vector2 movement = mHoverPoint - hover.GetScreenPosition( 0 ); if( std::abs( movement.Length() ) > mMovementThreshold ) { // Exceeding the threshold, hide the popup. @@ -438,9 +438,9 @@ bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover ) } break; } - case TouchPoint::Finished: - case TouchPoint::Leave: - case TouchPoint::Interrupted: + case PointState::FINISHED: + case PointState::LEAVE: + case PointState::INTERRUPTED: { if( mTooltipTimer ) { @@ -455,8 +455,7 @@ bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover ) break; } - case TouchPoint::Stationary: - case TouchPoint::Last: + case PointState::STATIONARY: { break; }