From: Heeyong Song Date: Tue, 18 Aug 2020 08:54:01 +0000 (+0000) Subject: Merge "(Vector) Change event processing" into devel/master X-Git-Tag: dali_1.9.26~6 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=ef15505c94dffeb0639c91d9d3cd374918c21c4f;hp=f36f8f52fba9353136846f4bcabbbb7a9e0401e7 Merge "(Vector) Change event processing" into devel/master --- diff --git a/automated-tests/resources/selection_handle_drop_left.png b/automated-tests/resources/selection_handle_drop_left.png new file mode 100644 index 0000000..d9ed8b8 Binary files /dev/null and b/automated-tests/resources/selection_handle_drop_left.png differ diff --git a/automated-tests/resources/selection_handle_drop_right.png b/automated-tests/resources/selection_handle_drop_right.png new file mode 100644 index 0000000..f66b26b Binary files /dev/null and b/automated-tests/resources/selection_handle_drop_right.png differ diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp index 9f4656c..6b0c796 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 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. @@ -232,7 +232,6 @@ Impl::DummyControl::DummyControl() childRemoveCalled(false), sizeSetCalled(false), sizeAnimationCalled(false), - touchEventCalled(false), hoverEventCalled(false), wheelEventCalled(false), keyEventCalled(false), @@ -249,7 +248,7 @@ Impl::DummyControl::~DummyControl() void Impl::DummyControl::OnInitialize() { initializeCalled = true; } bool Impl::DummyControl::OnAccessibilityActivated() { activatedCalled = true; return true; } -bool Impl::DummyControl::OnAccessibilityTouch(const TouchEvent& touchEvent) { onAccTouchedCalled = true; return true; } +bool Impl::DummyControl::OnAccessibilityTouch(const TouchEvent& touch) { onAccTouchedCalled = true; return true; } bool Impl::DummyControl::OnAccessibilityValueChange( bool isIncrease ) { onAccValueChangeCalled = true; return true; @@ -270,7 +269,6 @@ void Impl::DummyControl::OnChildAdd(Actor& child) { childAddCalled = true; } void Impl::DummyControl::OnChildRemove(Actor& child) { childRemoveCalled = true; } void Impl::DummyControl::OnSizeSet(const Vector3& targetSize) { Control::OnSizeSet( targetSize ); sizeSetCalled = true; } void Impl::DummyControl::OnSizeAnimation(Animation& animation, const Vector3& targetSize) { Control::OnSizeAnimation( animation, targetSize ); sizeAnimationCalled = true; } -bool Impl::DummyControl::OnTouchEvent(const TouchEvent& event) { touchEventCalled = true; return false; } bool Impl::DummyControl::OnHoverEvent(const HoverEvent& event) { hoverEventCalled = true; return false; } bool Impl::DummyControl::OnWheelEvent(const WheelEvent& event) { wheelEventCalled = true; return false; } bool Impl::DummyControl::OnKeyEvent(const KeyEvent& event) { keyEventCalled = true; return false;} diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h index 87b9748..5d66239 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEST_DUMMY_CONTROL_H /* - * 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. @@ -154,7 +154,7 @@ private: // From Internal::Control virtual void OnInitialize(); virtual bool OnAccessibilityActivated(); - virtual bool OnAccessibilityTouch( const TouchEvent& touchEvent ); + virtual bool OnAccessibilityTouch( const TouchEvent& touch ); virtual bool OnAccessibilityValueChange( bool isIncrease ); virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ); @@ -172,7 +172,6 @@ private: // From CustomActorImpl virtual void OnChildRemove(Actor& child); virtual void OnSizeSet(const Vector3& targetSize); virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize); - virtual bool OnTouchEvent(const TouchEvent& event); virtual bool OnHoverEvent(const HoverEvent& event); virtual bool OnWheelEvent(const WheelEvent& event); virtual bool OnKeyEvent(const KeyEvent& event); @@ -201,7 +200,6 @@ public: bool childRemoveCalled; bool sizeSetCalled; bool sizeAnimationCalled; - bool touchEventCalled; bool hoverEventCalled; bool wheelEventCalled; bool keyEventCalled; diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-touch-utils.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-touch-utils.h deleted file mode 100644 index 3a623cb..0000000 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-touch-utils.h +++ /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 - -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 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.cpp index df3e5d5..9089fc5 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.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. @@ -20,6 +20,7 @@ #include #include #include +#include namespace Dali { @@ -240,9 +241,8 @@ bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsi { if( mActionHandler ) { - Dali::TouchEvent touchEvent; - touchEvent.points.push_back( point ); - return mActionHandler->AccessibilityActionScroll( touchEvent ); + Dali::TouchEvent touch = Integration::NewTouchEvent(timeStamp, point); + return mActionHandler->AccessibilityActionScroll( touch ); } return false; } @@ -251,9 +251,8 @@ bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsig { if( mActionHandler ) { - Dali::TouchEvent touchEvent; - touchEvent.points.push_back( point ); - return mActionHandler->AccessibilityActionTouch( touchEvent ); + Dali::TouchEvent touch = Integration::NewTouchEvent(timeStamp, point); + return mActionHandler->AccessibilityActionTouch( touch ); } return false; } diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp index 5840711..81b03dd 100755 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp @@ -526,7 +526,7 @@ void WebEngine::SetSize( int width, int height ) { } -bool WebEngine::SendTouchEvent( const TouchData& touch ) +bool WebEngine::SendTouchEvent( const TouchEvent& touch ) { return true; } diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h index b28f305..5deb7a6 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h @@ -32,7 +32,7 @@ class Actor; class Layer; class RenderSurfaceInterface; struct KeyEvent; -class TouchData; +class TouchEvent; struct WheelEvent; typedef Dali::Rect PositionSize; @@ -52,7 +52,7 @@ class Window : public BaseHandle { public: using KeyEventSignalType = Signal< void (const KeyEvent&) >; - using TouchSignalType = Signal< void (const TouchData&) >; + using TouchSignalType = Signal< void (const TouchEvent&) >; static Window New(PositionSize windowPosition, const std::string& name, bool isTransparent = false); static Window New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent = false); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp b/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp index 964a2c9..a354847 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp @@ -2221,7 +2221,8 @@ public: bool Callback( AccessibilityManager& accessibilityManager, const Dali::TouchEvent& touchEvent ) { mCalls++; - mTouchEvent = touchEvent; + Dali::TouchEvent handle(touchEvent); // Ensure it's ref-counted + mTouchEvent = handle; tet_infoline( "Signal called" ); return true; } @@ -2238,7 +2239,7 @@ public: private: unsigned int mCalls; ///< Keeps track of how many times the signal has been called. - Dali::TouchEvent mTouchEvent; ///< Stores the last touch event received. + Dali::TouchEvent mTouchEvent ; ///< Stores the last touch event received. }; int UtcDaliAccessibilityManagerActionScrollSignalP(void) @@ -2263,11 +2264,10 @@ int UtcDaliAccessibilityManagerActionScrollSignalP(void) const TouchEvent& signalTouchEvent = callback.GetTouchEvent(); DALI_TEST_EQUALS( signalTouchEvent.GetPointCount(), 1u, TEST_LOCATION ); - const TouchPoint& signalTouchPoint = signalTouchEvent.GetPoint( 0u ); - DALI_TEST_EQUALS( signalTouchPoint.state, TouchPoint::Started, TEST_LOCATION ); - DALI_TEST_EQUALS( signalTouchPoint.screen.x, 100.0f, TEST_LOCATION ); - DALI_TEST_EQUALS( signalTouchPoint.screen.y, 200.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( signalTouchEvent.GetState(0), PointState::STARTED, TEST_LOCATION ); + DALI_TEST_EQUALS( signalTouchEvent.GetScreenPosition(0).x, 100.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( signalTouchEvent.GetScreenPosition(0).y, 200.0f, TEST_LOCATION ); END_TEST; } diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp index c890366..6e262eb 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp @@ -955,7 +955,7 @@ int UtcDaliAlignmentSizeSetP(void) } /////////////////////////////////////////////////////////////////////////////// -static bool TouchCallback(Actor actor, const TouchData& event) +static bool TouchCallback(Actor actor, const TouchEvent& event) { return false; } diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp index bdd74f9..14686a7 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp @@ -465,62 +465,6 @@ int UtcDaliControlImplSizeAnimation(void) /////////////////////////////////////////////////////////////////////////////////////////////////// -int UtcDaliControlImplTouchEvent(void) -{ - ToolkitTestApplication application; - - { - DummyControl dummy = DummyControl::New( true ); - Impl::DummyControl& dummyImpl = static_cast(dummy.GetImplementation()); - - dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); - dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - application.GetScene().Add(dummy); - - application.Render(); - application.SendNotification(); - application.Render(); - application.SendNotification(); - - DALI_TEST_EQUALS( dummyImpl.touchEventCalled, false, TEST_LOCATION ); - Integration::TouchEvent touchEvent(1); - Integration::Point point; - point.SetDeviceId( 1 ); - point.SetState( PointState::DOWN ); - point.SetScreenPosition( Vector2( 20.0f, 20.0f ) ); - touchEvent.AddPoint(point); - application.ProcessEvent(touchEvent); - DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION ); - - application.GetScene().Remove(dummy); - } - - // Ensure full code coverage - { - DummyControl dummy = DummyControl::New(); - - dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); - dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - application.GetScene().Add(dummy); - - application.Render(); - application.SendNotification(); - application.Render(); - application.SendNotification(); - - Integration::TouchEvent touchEvent(1); - Integration::Point point; - point.SetDeviceId( 1 ); - point.SetState( PointState::DOWN ); - point.SetScreenPosition( Vector2( 20.0f, 20.0f ) ); - touchEvent.AddPoint(point); - application.ProcessEvent(touchEvent); - - application.GetScene().Remove(dummy); - } - END_TEST; -} - int UtcDaliControlImplHoverEvent(void) { ToolkitTestApplication application; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp index 1d82bd6..5390b5c 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp @@ -141,10 +141,6 @@ struct TestCustomControl : public Toolkit::Internal::ControlWrapper mTargetSize = targetSize; Control::OnSizeAnimation( animation, targetSize ); } - virtual bool OnTouchEvent( const TouchEvent& event ) - { - return true; - } virtual bool OnHoverEvent( const HoverEvent& event ) { return true; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp index f4a05e7..a7b87d4 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp @@ -123,6 +123,8 @@ const int KEY_SHIFT_MODIFIER = 257; const int KEY_CONTROL_MODIFIER = 258; const char* HANDLE_IMAGE_FILE_NAME = TEST_RESOURCE_DIR "/insertpoint-icon.png"; +const char* HANDLE_LEFT_SELECTION_FILE_NAME = TEST_RESOURCE_DIR "/selection_handle_drop_left.png"; +const char* HANDLE_RIGHT_SELECTION_FILE_NAME = TEST_RESOURCE_DIR "/selection_handle_drop_right.png"; const std::string DEFAULT_DEVICE_NAME("hwKeyboard"); @@ -2362,15 +2364,10 @@ int utcDaliTextEditorHandles(void) editor.SetProperty( TextEditor::Property::GRAB_HANDLE_IMAGE, HANDLE_IMAGE_FILE_NAME ); editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL, true ); - Property::Map imagePropertyMap; - imagePropertyMap["type"] = "BufferImage"; - imagePropertyMap["width"] = 40; - imagePropertyMap["height"] = 40; - - editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_IMAGE_LEFT, imagePropertyMap ); - editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_IMAGE_RIGHT, imagePropertyMap ); - editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT, imagePropertyMap ); - editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, imagePropertyMap ); + editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_IMAGE_LEFT, Property::Map{ {"filename", HANDLE_LEFT_SELECTION_FILE_NAME } } ); + editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_IMAGE_RIGHT, Property::Map{ {"filename", HANDLE_LEFT_SELECTION_FILE_NAME } } ); + editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT, Property::Map{ {"filename", HANDLE_RIGHT_SELECTION_FILE_NAME } } ); + editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, Property::Map{ {"filename", HANDLE_RIGHT_SELECTION_FILE_NAME } } ); editor.SetProperty( Actor::Property::SIZE, Vector2( 30.f, 500.f ) ); editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp index 781246e..8459195 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp @@ -75,7 +75,7 @@ static void OnEvaluateJavaScript( const std::string& result ) gEvaluateJavaScriptCallbackCalled++; } -static bool OnTouched( Actor actor, const Dali::TouchData& touch ) +static bool OnTouched( Actor actor, const Dali::TouchEvent& touch ) { gTouched = true; return true; diff --git a/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp b/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp index 6b4433d..5dfbbfd 100644 --- a/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp +++ b/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp @@ -963,12 +963,12 @@ bool AccessibilityManager::ClearAccessibilityFocus() } } -bool AccessibilityManager::AccessibilityActionScroll( Dali::TouchEvent& touchEvent ) +bool AccessibilityManager::AccessibilityActionScroll( Dali::TouchEvent& touch ) { Dali::Toolkit::AccessibilityManager handle( this ); if( !mActionScrollSignal.Empty() ) { - mActionScrollSignal.Emit( handle, touchEvent ); + mActionScrollSignal.Emit( handle, touch ); } return true; @@ -1302,7 +1302,7 @@ bool AccessibilityManager::AccessibilityActionStartStop() return mIsAccessibilityTtsEnabled; } -bool AccessibilityManager::AccessibilityActionTouch(const TouchEvent& touchEvent) +bool AccessibilityManager::AccessibilityActionTouch(const TouchEvent& touch) { bool handled = false; @@ -1311,7 +1311,7 @@ bool AccessibilityManager::AccessibilityActionTouch(const TouchEvent& touchEvent Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(GetCurrentFocusActor()); if(control) { - handled = GetImplementation( control ).OnAccessibilityTouch(touchEvent); + handled = GetImplementation( control ).OnAccessibilityTouch(touch); } return handled; diff --git a/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.h b/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.h index ac7a379..0efb565 100644 --- a/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.h +++ b/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.h @@ -506,10 +506,10 @@ private: /** * Perform the accessibility action associated with a scroll event. - * @param touchEvent The touch point (and time) of the event. + * @param touch The touch point (and time) of the event. * @return whether the focus is cleared or not. */ - virtual bool AccessibilityActionScroll( Dali::TouchEvent& touchEvent ); + virtual bool AccessibilityActionScroll( Dali::TouchEvent& touch ); /** * Perform the accessibility action to move focus to the previous focusable actor (by one finger flick up). @@ -659,10 +659,10 @@ private: /** * Perform the accessibility action to mouse move (by one finger tap & hold and move). - * @param touchEvent touch event structure + * @param touch touch point and time of the event * @return whether the accessibility action is performed or not. */ - virtual bool AccessibilityActionTouch(const TouchEvent& touchEvent); + virtual bool AccessibilityActionTouch(const TouchEvent& touch); /** * This function is connected to the TtsPlayer StateChangeSignal. diff --git a/dali-toolkit/internal/controls/buttons/button-impl.cpp b/dali-toolkit/internal/controls/buttons/button-impl.cpp index 4ebb40e..3bebcde 100644 --- a/dali-toolkit/internal/controls/buttons/button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/button-impl.cpp @@ -22,7 +22,7 @@ #include // for strcmp #include #include -#include +#include #include #include #include @@ -628,7 +628,7 @@ bool Button::OnAccessibilityActivated() return OnKeyboardEnter(); } -bool Button::OnTouch( Actor actor, const TouchData& touch ) +bool Button::OnTouch( Actor actor, const TouchEvent& touch ) { if( !IsDisabled() && (actor == touch.GetHitActor(0)) ) { diff --git a/dali-toolkit/internal/controls/buttons/button-impl.h b/dali-toolkit/internal/controls/buttons/button-impl.h index 655b309..e9c0f14 100644 --- a/dali-toolkit/internal/controls/buttons/button-impl.h +++ b/dali-toolkit/internal/controls/buttons/button-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_BUTTON_H /* - * 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. @@ -362,7 +362,7 @@ private: * @param[in] touch The touch info. * @return true, if consumed, false otherwise. */ - bool OnTouch( Actor actor, const TouchData& touch ); + bool OnTouch( Actor actor, const TouchEvent& touch ); /** * Handler for tap events. diff --git a/dali-toolkit/internal/controls/popup/popup-impl.cpp b/dali-toolkit/internal/controls/popup/popup-impl.cpp index f323bb6..0d7b93c 100644 --- a/dali-toolkit/internal/controls/popup/popup-impl.cpp +++ b/dali-toolkit/internal/controls/popup/popup-impl.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -1532,7 +1532,7 @@ bool Popup::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tra return connected; } -bool Popup::OnBackingTouched( Actor actor, const TouchData& touch ) +bool Popup::OnBackingTouched( Actor actor, const TouchEvent& touch ) { // Allow events to pass through if the backing isn't the hit-actor if( (touch.GetHitActor(0) == actor) && @@ -1559,7 +1559,7 @@ bool Popup::OnBackingWheelEvent( Actor actor, const WheelEvent& event ) return true; } -bool Popup::OnDialogTouched( Actor actor, const TouchData& touch ) +bool Popup::OnDialogTouched( Actor actor, const TouchEvent& touch ) { // Only connecting this so the backing does not become the default hit-actor and inadvertently closes the popup return false; diff --git a/dali-toolkit/internal/controls/popup/popup-impl.h b/dali-toolkit/internal/controls/popup/popup-impl.h index f449c8d..17217d6 100644 --- a/dali-toolkit/internal/controls/popup/popup-impl.h +++ b/dali-toolkit/internal/controls/popup/popup-impl.h @@ -404,7 +404,7 @@ private: * @param[in] touch The Touch Data. * @return Whether to consume event or not. */ - bool OnBackingTouched(Actor actor, const TouchData& touch); + bool OnBackingTouched(Actor actor, const TouchEvent& touch); /** * Signal occurs when a mouse wheel event occurs on the dimmed backing. @@ -420,7 +420,7 @@ private: * @param[in] touch The Touch Data. * @return Whether to consume event or not. */ - bool OnDialogTouched( Actor actor, const TouchData& touch ); + bool OnDialogTouched( Actor actor, const TouchEvent& touch ); /** * @copydoc Toolkit::Control::OnInitialize() diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index 0d40921..36d00d7 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -1114,7 +1114,7 @@ float ItemView::ClampFirstItemPosition( float targetPosition, const Vector3& tar return clamppedPosition; } -bool ItemView::OnTouch( Actor actor, const TouchData& touch ) +bool ItemView::OnTouch( Actor actor, const TouchEvent& touch ) { // Ignore events with multiple-touch points if (touch.GetPointCount() != 1) diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h index 9cb2df6..144951e 100755 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_ITEM_VIEW_H /* - * 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. @@ -512,7 +512,7 @@ private: * @param[in] touch The touch information. * @return True if the event should be consumed. */ - bool OnTouch( Actor actor, const TouchData& touch ); + bool OnTouch( Actor actor, const TouchEvent& touch ); /** * Called upon pan gesture event. diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp index b64915d..3e4039e 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -2059,7 +2059,7 @@ bool ScrollView::OnTouchDownTimeout() return false; } -bool ScrollView::OnTouch( Actor actor, const TouchData& touch ) +bool ScrollView::OnTouch( Actor actor, const TouchEvent& touch ) { if(!mSensitive) { diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h index 094c3b7..a8fcb39 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H /* - * 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. @@ -608,7 +608,7 @@ private: * @param[in] touch The touch information. * @return True if the event should be consumed. */ - bool OnTouch( Actor actor, const TouchData& touch ); + bool OnTouch( Actor actor, const TouchEvent& touch ); /** * Start a timer which calls OnTouchDownTimeout() diff --git a/dali-toolkit/internal/controls/slider/slider-impl.cpp b/dali-toolkit/internal/controls/slider/slider-impl.cpp index 7fa1551..757bef8 100644 --- a/dali-toolkit/internal/controls/slider/slider-impl.cpp +++ b/dali-toolkit/internal/controls/slider/slider-impl.cpp @@ -22,7 +22,7 @@ #include // for strcmp #include #include -#include +#include #include #include @@ -215,7 +215,7 @@ void Slider::OnRelayout( const Vector2& size, RelayoutContainer& container ) Control::OnRelayout( size, container ); } -bool Slider::OnTouch(Actor actor, const TouchData& touch) +bool Slider::OnTouch(Actor actor, const TouchEvent& touch) { if( mState != DISABLED ) { diff --git a/dali-toolkit/internal/controls/slider/slider-impl.h b/dali-toolkit/internal/controls/slider/slider-impl.h index bbae4d5..6092abd 100755 --- a/dali-toolkit/internal/controls/slider/slider-impl.h +++ b/dali-toolkit/internal/controls/slider/slider-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_SLIDER_H /* - * 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. @@ -331,7 +331,7 @@ private: * @param[in] touch The touch info * @return If touch is handled or not */ - bool OnTouch( Actor actor, const TouchData& touch ); + bool OnTouch( Actor actor, const TouchEvent& touch ); /** * Pan gesture event diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp index efcfe2c..b022757 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp @@ -1852,7 +1852,7 @@ void TextEditor::OnSceneConnection( int depth ) Control::OnSceneConnection( depth ); } -bool TextEditor::OnTouched( Actor actor, const TouchData& touch ) +bool TextEditor::OnTouched( Actor actor, const TouchEvent& touch ) { return false; } diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-impl.h b/dali-toolkit/internal/controls/text-controls/text-editor-impl.h index c8bae9c..413c069 100755 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H /* - * Copyright (c) 2017 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. @@ -243,7 +243,7 @@ private: // Implementation * @param[in] actor TextEditor touched * @param[in] touch Touch information */ - bool OnTouched( Actor actor, const TouchData& touch ); + bool OnTouched( Actor actor, const TouchEvent& touch ); /** * @brief Callbacks called on idle. diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp index 24772bc..c839ffd 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -1866,7 +1866,7 @@ void TextField::OnSceneConnection( int depth ) Control::OnSceneConnection( depth ); } -bool TextField::OnTouched( Actor actor, const TouchData& touch ) +bool TextField::OnTouched( Actor actor, const TouchEvent& touch ) { return false; } diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.h b/dali-toolkit/internal/controls/text-controls/text-field-impl.h index 2318865..b788d80 100755 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H /* - * Copyright (c) 2017 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. @@ -242,7 +242,7 @@ private: // Implementation * @param[in] actor TextField touched * @param[in] touch Touch information */ - bool OnTouched( Actor actor, const TouchData& touch ); + bool OnTouched( Actor actor, const TouchEvent& touch ); /** * @brief Callbacks called on idle. 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; } diff --git a/dali-toolkit/internal/controls/web-view/web-view-impl.cpp b/dali-toolkit/internal/controls/web-view/web-view-impl.cpp index dd8e990..80314dc 100644 --- a/dali-toolkit/internal/controls/web-view/web-view-impl.cpp +++ b/dali-toolkit/internal/controls/web-view/web-view-impl.cpp @@ -519,7 +519,7 @@ Property::Value WebView::GetProperty( BaseObject* object, Property::Index proper return value; } -bool WebView::OnTouchEvent( Actor actor, const Dali::TouchData& touch ) +bool WebView::OnTouchEvent( Actor actor, const Dali::TouchEvent& touch ) { bool result = false; diff --git a/dali-toolkit/internal/controls/web-view/web-view-impl.h b/dali-toolkit/internal/controls/web-view/web-view-impl.h index bce288d..11f7e1b 100644 --- a/dali-toolkit/internal/controls/web-view/web-view-impl.h +++ b/dali-toolkit/internal/controls/web-view/web-view-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_WEB_VIEW_H /* - * Copyright (c) 2018 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. @@ -34,7 +34,7 @@ namespace Toolkit { class KeyEvent; -class TouchData; +class TouchEvent; class WebView; namespace Internal @@ -206,7 +206,7 @@ private: // From Control * @param[in] touch The Touch Data. * @return Whether to consume event or not. */ - bool OnTouchEvent( Actor actor, const Dali::TouchData& touch ); + bool OnTouchEvent( Actor actor, const Dali::TouchEvent& touch ); /** * @copydoc Toolkit::Control::OnKeyEvent() diff --git a/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp b/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp index 34be65a..12d42fe 100644 --- a/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp +++ b/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include namespace Dali { @@ -160,7 +160,7 @@ void DragAndDropDetector::OnPan(Dali::Actor actor, const PanGesture& gesture) } } -bool DragAndDropDetector::OnDrag(Dali::Actor actor, const Dali::TouchData& data) +bool DragAndDropDetector::OnDrag(Dali::Actor actor, const Dali::TouchEvent& data) { Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor); PointState::Type type = data.GetState(0); diff --git a/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h b/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h index b83ea13..01ca57e 100755 --- a/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h +++ b/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_DRAG_AND_DROP_DETECTOR_H /* - * 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. @@ -194,7 +194,7 @@ public: // Signals } public: - bool OnDrag(Dali::Actor actor, const Dali::TouchData& data); + bool OnDrag(Dali::Actor actor, const Dali::TouchEvent& data); void OnPan(Dali::Actor actor, const PanGesture& gesture); private: diff --git a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp index 10bd6a2..1ee2266 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -965,7 +965,7 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event) } } -void KeyboardFocusManager::OnTouch(const TouchData& touch) +void KeyboardFocusManager::OnTouch(const TouchEvent& touch) { // if mIsFocusIndicatorShown is UNKNOWN, it means Configuration is not loaded. // Try to load configuration. diff --git a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h index 176bfce..4ab0ea3 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_KEYBOARD_FOCUS_MANAGER_H /* - * 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. @@ -287,7 +287,7 @@ private: * (i.e. the down & up touch events only). * @param[in] touch The touch information */ - void OnTouch( const TouchData& touch ); + void OnTouch( const TouchEvent& touch ); /** * Called when the window focus is changed. diff --git a/dali-toolkit/internal/text/decorator/text-decorator.cpp b/dali-toolkit/internal/text/decorator/text-decorator.cpp index 56948c5..e69ed20 100644 --- a/dali-toolkit/internal/text/decorator/text-decorator.cpp +++ b/dali-toolkit/internal/text/decorator/text-decorator.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -1363,7 +1363,7 @@ struct Decorator::Impl : public ConnectionTracker } } - bool OnGrabHandleTouched( Actor actor, const TouchData& touch ) + bool OnGrabHandleTouched( Actor actor, const TouchEvent& touch ) { HandleImpl& grabHandle = mHandle[GRAB_HANDLE]; @@ -1389,7 +1389,7 @@ struct Decorator::Impl : public ConnectionTracker return false; } - bool OnHandleOneTouched( Actor actor, const TouchData& touch ) + bool OnHandleOneTouched( Actor actor, const TouchEvent& touch ) { HandleImpl& primarySelectionHandle = mHandle[LEFT_SELECTION_HANDLE]; @@ -1419,7 +1419,7 @@ struct Decorator::Impl : public ConnectionTracker return false; } - bool OnHandleTwoTouched( Actor actor, const TouchData& touch ) + bool OnHandleTwoTouched( Actor actor, const TouchEvent& touch ) { HandleImpl& secondarySelectionHandle = mHandle[RIGHT_SELECTION_HANDLE]; diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index eec35fb..cac8894 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -386,7 +386,7 @@ bool Control::OnAccessibilityPan(PanGesture gesture) return false; // Accessibility pan gesture is not handled by default } -bool Control::OnAccessibilityTouch(const TouchEvent& touchEvent) +bool Control::OnAccessibilityTouch(const TouchEvent& touch) { return false; // Accessibility touch event is not handled by default } @@ -627,11 +627,6 @@ void Control::OnSizeAnimation(Animation& animation, const Vector3& targetSize) // @todo size negotiate background to new size, animate as well? } -bool Control::OnTouchEvent(const TouchEvent& event) -{ - return false; // Do not consume -} - bool Control::OnHoverEvent(const HoverEvent& event) { return false; // Do not consume diff --git a/dali-toolkit/public-api/controls/control-impl.h b/dali-toolkit/public-api/controls/control-impl.h index f127317..d0ca9f0 100644 --- a/dali-toolkit/public-api/controls/control-impl.h +++ b/dali-toolkit/public-api/controls/control-impl.h @@ -339,11 +339,6 @@ protected: // From CustomActorImpl virtual void OnSizeAnimation( Animation& animation, const Vector3& targetSize ) override; /** - * @copydoc CustomActorImpl::OnTouchEvent() - */ - virtual bool OnTouchEvent( const TouchEvent& event ) override; - - /** * @copydoc CustomActorImpl::OnHoverEvent() */ virtual bool OnHoverEvent( const HoverEvent& event ) override; @@ -487,10 +482,10 @@ public: // API for derived classes to override * touch event. * * @SINCE_1_0.0 - * @param[in] touchEvent The touch event + * @param[in] touch The touch event * @return true if the touch event has been consumed by this control */ - virtual bool OnAccessibilityTouch( const TouchEvent& touchEvent ); + virtual bool OnAccessibilityTouch( const TouchEvent& touch ); /** * @brief This method should be overridden by deriving classes when they wish to respond diff --git a/dali-toolkit/public-api/dali-toolkit-version.cpp b/dali-toolkit/public-api/dali-toolkit-version.cpp index dbb0f02..ca07989 100644 --- a/dali-toolkit/public-api/dali-toolkit-version.cpp +++ b/dali-toolkit/public-api/dali-toolkit-version.cpp @@ -31,7 +31,7 @@ namespace Toolkit const unsigned int TOOLKIT_MAJOR_VERSION = 1; const unsigned int TOOLKIT_MINOR_VERSION = 9; -const unsigned int TOOLKIT_MICRO_VERSION = 24; +const unsigned int TOOLKIT_MICRO_VERSION = 25; const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/docs/content/example-code/properties.cpp b/docs/content/example-code/properties.cpp index f421be2..e8f4d56 100644 --- a/docs/content/example-code/properties.cpp +++ b/docs/content/example-code/properties.cpp @@ -95,7 +95,7 @@ public: * param[in] touch The touch-event * return Set to true if the signal was consumed correctly */ - bool OnTouched( Actor actor, const TouchData& touch ) + bool OnTouched( Actor actor, const TouchEvent& touch ) { int touchedCount = 0; diff --git a/docs/content/programming-guide/event-system.h b/docs/content/programming-guide/event-system.h index 1498ed0..01df3ef 100644 --- a/docs/content/programming-guide/event-system.h +++ b/docs/content/programming-guide/event-system.h @@ -8,14 +8,14 @@ An application can be notified when a user interacts with the touch screen on th This signal will be emitted by DALi whenever the touch occurs within the connected actor's bounds. Each point on the screen that is currently being touched or where touch has stopped is represented by a point. -Dali::TouchData stores information about the state of each point (down, up, motion etc.) and the co-ordinates of the touch. +Dali::TouchEvent stores information about the state of each point (down, up, motion etc.) and the co-ordinates of the touch. When a multi-touch event occurs, each point represents the points that are currently being touched or the points where touch has stopped. The following example shows how a connection to a touch event signal can be established: @code -bool OnTouch( Dali::Actor actor, const Dali::TouchData& touch ) +bool OnTouch( Dali::Actor actor, const Dali::TouchEvent& touch ) { bool handled = false; diff --git a/docs/content/programming-guide/hello-world.h b/docs/content/programming-guide/hello-world.h index aa37687..22878bc 100644 --- a/docs/content/programming-guide/hello-world.h +++ b/docs/content/programming-guide/hello-world.h @@ -51,7 +51,7 @@ public: stage.GetRootLayer().TouchSignal().Connect( this, &HelloWorldController::OnTouch ); } - bool OnTouch( Actor actor, const TouchData& touch ) + bool OnTouch( Actor actor, const TouchEvent& touch ) { // quit the application mApplication.Quit(); diff --git a/docs/content/programming-guide/multi-touch-guide.md b/docs/content/programming-guide/multi-touch-guide.md index c31c495..ac37f58 100644 --- a/docs/content/programming-guide/multi-touch-guide.md +++ b/docs/content/programming-guide/multi-touch-guide.md @@ -113,7 +113,7 @@ Hit Priority of above Actor tree (all overlays): 1 - Lowest. 6 - Highest. IF ( TOUCH-SIGNAL-NOT-EMPTY ) { // Only do the emission if touch signal of actor has connections. - CONSUMED = TOUCH-SIGNAL( TOUCH-DATA ) + CONSUMED = TOUCH-SIGNAL( TOUCH-EVENT ) } IF ( NOT-CONSUMED ) diff --git a/docs/content/programming-guide/programming-languages.md b/docs/content/programming-guide/programming-languages.md index a17705c..4b1f327 100644 --- a/docs/content/programming-guide/programming-languages.md +++ b/docs/content/programming-guide/programming-languages.md @@ -13,7 +13,7 @@ actor.SetParentOrigin( Dali::ParentOrigin::CENTER ); actor.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::CENTER ); Dali::Stage::GetCurrent().Add( actor ); ... -bool OnPressed( Dali::Actor, const TouchData& touch ) +bool OnPressed( Dali::Actor, const TouchEvent& touch ) { Dali::Animation anim = Dali::Animation::New( 1.5f ); anim.AnimateTo( Property( actor, Actor::Property::POSITION ), Vector3( 200, -100, 0 ), AlphaFunctions::Bounce ); diff --git a/packaging/dali-toolkit.spec b/packaging/dali-toolkit.spec index 28c3d6f..047f9d0 100644 --- a/packaging/dali-toolkit.spec +++ b/packaging/dali-toolkit.spec @@ -1,6 +1,6 @@ Name: dali2-toolkit Summary: Dali 3D engine Toolkit -Version: 1.9.24 +Version: 1.9.25 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT