From: Adeel Kazmi Date: Fri, 14 Aug 2020 14:27:26 +0000 (+0100) Subject: Changes after TouchData renamed to TouchEvent X-Git-Tag: dali_1.9.26~7 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=bf58973c37b31d52707463a1e9cdecdbe91099f6 Changes after TouchData renamed to TouchEvent Change-Id: I981bd5c0296302b8cd798c96771ff8ef2a3581f9 --- 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 9f87146..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. @@ -248,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 TouchData& touchData) { 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; 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 c4b0257..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 TouchData& touchData ); + virtual bool OnAccessibilityTouch( const TouchEvent& touch ); virtual bool OnAccessibilityValueChange( bool isIncrease ); virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ); 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 8c37474..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,7 +20,7 @@ #include #include #include -#include +#include namespace Dali { @@ -241,8 +241,8 @@ bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsi { if( mActionHandler ) { - Dali::TouchData touchData = Integration::NewTouchData(timeStamp, point); - return mActionHandler->AccessibilityActionScroll( touchData ); + Dali::TouchEvent touch = Integration::NewTouchEvent(timeStamp, point); + return mActionHandler->AccessibilityActionScroll( touch ); } return false; } @@ -251,8 +251,8 @@ bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsig { if( mActionHandler ) { - Dali::TouchData touchData = Integration::NewTouchData(timeStamp, point); - return mActionHandler->AccessibilityActionTouch( touchData ); + 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 06cc50f..a354847 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp @@ -2218,11 +2218,11 @@ public: { } - bool Callback( AccessibilityManager& accessibilityManager, const Dali::TouchData& touchEvent ) + bool Callback( AccessibilityManager& accessibilityManager, const Dali::TouchEvent& touchEvent ) { mCalls++; - Dali::TouchData handle(touchEvent); // Ensure it's ref-counted - mTouchData = handle; + Dali::TouchEvent handle(touchEvent); // Ensure it's ref-counted + mTouchEvent = handle; tet_infoline( "Signal called" ); return true; } @@ -2232,14 +2232,14 @@ public: return mCalls; } - const Dali::TouchData& GetTouchData() const + const Dali::TouchEvent& GetTouchEvent() const { - return mTouchData; + return mTouchEvent; } private: unsigned int mCalls; ///< Keeps track of how many times the signal has been called. - Dali::TouchData mTouchData ; ///< Stores the last touch event received. + Dali::TouchEvent mTouchEvent ; ///< Stores the last touch event received. }; int UtcDaliAccessibilityManagerActionScrollSignalP(void) @@ -2261,13 +2261,13 @@ int UtcDaliAccessibilityManagerActionScrollSignalP(void) DALI_TEST_EQUALS( callback.GetCalls(), 1u, TEST_LOCATION ); - const TouchData& signalTouchData = callback.GetTouchData(); - DALI_TEST_EQUALS( signalTouchData.GetPointCount(), 1u, TEST_LOCATION ); + const TouchEvent& signalTouchEvent = callback.GetTouchEvent(); + DALI_TEST_EQUALS( signalTouchEvent.GetPointCount(), 1u, TEST_LOCATION ); - DALI_TEST_EQUALS( signalTouchData.GetState(0), PointState::STARTED, TEST_LOCATION ); - DALI_TEST_EQUALS( signalTouchData.GetScreenPosition(0).x, 100.0f, TEST_LOCATION ); - DALI_TEST_EQUALS( signalTouchData.GetScreenPosition(0).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 b1bbe19..14686a7 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp @@ -770,7 +770,7 @@ int UtcDaliControlImplOnAccessibilityTouchP(void) ToolkitTestApplication application; Control dummy = Control::New(); Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy ); - TouchData touch; + TouchEvent touch; DALI_TEST_EQUALS( false, controlImpl.OnAccessibilityTouch( touch ), TEST_LOCATION ); END_TEST; 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/devel-api/accessibility-manager/accessibility-manager.h b/dali-toolkit/devel-api/accessibility-manager/accessibility-manager.h index 878e4a6..87c5c5f 100755 --- a/dali-toolkit/devel-api/accessibility-manager/accessibility-manager.h +++ b/dali-toolkit/devel-api/accessibility-manager/accessibility-manager.h @@ -71,7 +71,7 @@ public: * @SINCE_1_0.0 */ typedef Signal< bool ( AccessibilityManager& ) > AccessibilityActionSignalType; ///< Generic signal type @SINCE_1_0.0 - typedef Signal< bool ( AccessibilityManager&, const Dali::TouchData& )> AccessibilityActionScrollSignalType; ///< Scroll signal type @SINCE_1_0.0 + typedef Signal< bool ( AccessibilityManager&, const Dali::TouchEvent& )> AccessibilityActionScrollSignalType; ///< Scroll signal type @SINCE_1_0.0 /** * @brief Enumeration for accessibility that needs four information which will be read by screen-reader. @@ -794,7 +794,7 @@ public: * * A callback of the following type may be connected: * @code - * bool YourCallback( AccessibilityManager& manager, const TouchData& event ); + * bool YourCallback( AccessibilityManager& manager, const TouchEvent& event ); * @endcode * @SINCE_1_0.0 * @return The signal to connect to diff --git a/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp b/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp index e67cb27..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::TouchData& touchData ) +bool AccessibilityManager::AccessibilityActionScroll( Dali::TouchEvent& touch ) { Dali::Toolkit::AccessibilityManager handle( this ); if( !mActionScrollSignal.Empty() ) { - mActionScrollSignal.Emit( handle, touchData ); + mActionScrollSignal.Emit( handle, touch ); } return true; @@ -1302,7 +1302,7 @@ bool AccessibilityManager::AccessibilityActionStartStop() return mIsAccessibilityTtsEnabled; } -bool AccessibilityManager::AccessibilityActionTouch(const TouchData& touchData) +bool AccessibilityManager::AccessibilityActionTouch(const TouchEvent& touch) { bool handled = false; @@ -1311,7 +1311,7 @@ bool AccessibilityManager::AccessibilityActionTouch(const TouchData& touchData) Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(GetCurrentFocusActor()); if(control) { - handled = GetImplementation( control ).OnAccessibilityTouch(touchData); + 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 76b34b3..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 touchData 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::TouchData& touchData ); + 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 touchData touch point and time of the event + * @param touch touch point and time of the event * @return whether the accessibility action is performed or not. */ - virtual bool AccessibilityActionTouch(const TouchData& touchData); + 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/web-view/web-view-impl.cpp b/dali-toolkit/internal/controls/web-view/web-view-impl.cpp index abc2970..f252318 100644 --- a/dali-toolkit/internal/controls/web-view/web-view-impl.cpp +++ b/dali-toolkit/internal/controls/web-view/web-view-impl.cpp @@ -518,7 +518,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 372cfdb..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 TouchData& touchData) +bool Control::OnAccessibilityTouch(const TouchEvent& touch) { return false; // Accessibility touch event is not handled by default } diff --git a/dali-toolkit/public-api/controls/control-impl.h b/dali-toolkit/public-api/controls/control-impl.h index 114f223..d0ca9f0 100644 --- a/dali-toolkit/public-api/controls/control-impl.h +++ b/dali-toolkit/public-api/controls/control-impl.h @@ -482,10 +482,10 @@ public: // API for derived classes to override * touch event. * * @SINCE_1_0.0 - * @param[in] touchData 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 TouchData& touchData ); + virtual bool OnAccessibilityTouch( const TouchEvent& touch ); /** * @brief This method should be overridden by deriving classes when they wish to respond 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 );