/*
- * 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.
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;
#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.
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 );
/*
- * 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.
#include <dali/devel-api/adaptor-framework/accessibility-action-handler.h>
#include <dali/devel-api/adaptor-framework/accessibility-gesture-handler.h>
#include <dali/devel-api/adaptor-framework/accessibility-gesture-event.h>
-#include <dali/integration-api/events/touch-data-integ.h>
+#include <dali/integration-api/events/touch-integ.h>
namespace Dali
{
{
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;
}
{
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;
}
{
}
-bool WebEngine::SendTouchEvent( const TouchData& touch )
+bool WebEngine::SendTouchEvent( const TouchEvent& touch )
{
return true;
}
class Layer;
class RenderSurfaceInterface;
struct KeyEvent;
-class TouchData;
+class TouchEvent;
struct WheelEvent;
typedef Dali::Rect<int> PositionSize;
{
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);
{
}
- 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;
}
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)
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;
}
}
///////////////////////////////////////////////////////////////////////////////
-static bool TouchCallback(Actor actor, const TouchData& event)
+static bool TouchCallback(Actor actor, const TouchEvent& event)
{
return false;
}
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;
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");
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 );
gEvaluateJavaScriptCallbackCalled++;
}
-static bool OnTouched( Actor actor, const Dali::TouchData& touch )
+static bool OnTouched( Actor actor, const Dali::TouchEvent& touch )
{
gTouched = true;
return true;
* @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.
*
* 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
}
}
-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;
return mIsAccessibilityTtsEnabled;
}
-bool AccessibilityManager::AccessibilityActionTouch(const TouchData& touchData)
+bool AccessibilityManager::AccessibilityActionTouch(const TouchEvent& touch)
{
bool handled = false;
Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(GetCurrentFocusActor());
if(control)
{
- handled = GetImplementation( control ).OnAccessibilityTouch(touchData);
+ handled = GetImplementation( control ).OnAccessibilityTouch(touch);
}
return handled;
/**
* 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).
/**
* 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.
#include <cstring> // for strcmp
#include <dali/devel-api/scripting/enum-helper.h>
#include <dali/integration-api/debug.h>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/public-api/size-negotiation/relayout-container.h>
return OnKeyboardEnter();
}
-bool Button::OnTouch( Actor actor, const TouchData& touch )
+bool Button::OnTouch( Actor actor, const TouchEvent& touch )
{
if( !IsDisabled() && (actor == touch.GetHitActor(0)) )
{
#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.
* @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.
#include <dali/public-api/animation/constraints.h>
#include <dali/devel-api/common/stage.h>
#include <dali/public-api/events/key-event.h>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/devel-api/scripting/scripting.h>
#include <dali/devel-api/actors/actor-devel.h>
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) &&
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;
* @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.
* @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()
#include <dali/public-api/animation/constraints.h>
#include <dali/devel-api/common/stage.h>
#include <dali/public-api/events/wheel-event.h>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/devel-api/object/property-helper-devel.h>
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)
#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.
* @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.
#include <dali/public-api/animation/constraints.h>
#include <dali/devel-api/common/stage.h>
#include <dali/public-api/events/wheel-event.h>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/public-api/object/property-map.h>
return false;
}
-bool ScrollView::OnTouch( Actor actor, const TouchData& touch )
+bool ScrollView::OnTouch( Actor actor, const TouchEvent& touch )
{
if(!mSensitive)
{
#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.
* @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()
#include <cstring> // for strcmp
#include <sstream>
#include <limits>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/type-registry-helper.h>
Control::OnRelayout( size, container );
}
-bool Slider::OnTouch(Actor actor, const TouchData& touch)
+bool Slider::OnTouch(Actor actor, const TouchEvent& touch)
{
if( mState != DISABLED )
{
#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.
* @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
Control::OnSceneConnection( depth );
}
-bool TextEditor::OnTouched( Actor actor, const TouchData& touch )
+bool TextEditor::OnTouched( Actor actor, const TouchEvent& touch )
{
return false;
}
#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.
* @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.
Control::OnSceneConnection( depth );
}
-bool TextField::OnTouched( Actor actor, const TouchData& touch )
+bool TextField::OnTouched( Actor actor, const TouchEvent& touch )
{
return false;
}
#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.
* @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.
return value;
}
-bool WebView::OnTouchEvent( Actor actor, const Dali::TouchData& touch )
+bool WebView::OnTouchEvent( Actor actor, const Dali::TouchEvent& touch )
{
bool result = false;
#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.
{
class KeyEvent;
-class TouchData;
+class TouchEvent;
class WebView;
namespace Internal
* @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()
#include <dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h>
#include <dali/public-api/events/point-state.h>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
namespace Dali
{
}
}
-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);
#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.
}
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:
#include <dali/devel-api/adaptor-framework/lifecycle-controller.h>
#include <dali/public-api/animation/constraints.h>
#include <dali/public-api/events/key-event.h>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/public-api/object/property-map.h>
}
}
-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.
#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.
* (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.
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/adaptor-framework/timer.h>
#include <dali/devel-api/common/stage.h>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/events/pan-gesture.h>
#include <dali/public-api/object/property-notification.h>
#include <dali/public-api/rendering/geometry.h>
}
}
- bool OnGrabHandleTouched( Actor actor, const TouchData& touch )
+ bool OnGrabHandleTouched( Actor actor, const TouchEvent& touch )
{
HandleImpl& grabHandle = mHandle[GRAB_HANDLE];
return false;
}
- bool OnHandleOneTouched( Actor actor, const TouchData& touch )
+ bool OnHandleOneTouched( Actor actor, const TouchEvent& touch )
{
HandleImpl& primarySelectionHandle = mHandle[LEFT_SELECTION_HANDLE];
return false;
}
- bool OnHandleTwoTouched( Actor actor, const TouchData& touch )
+ bool OnHandleTwoTouched( Actor actor, const TouchEvent& touch )
{
HandleImpl& secondarySelectionHandle = mHandle[RIGHT_SELECTION_HANDLE];
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
}
* 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
* 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;
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;
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();
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 )
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 );