/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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 TouchEvent& touch) { onAccTouchedCalled = true; return true; }
+bool Impl::DummyControl::OnAccessibilityTouch(const TouchData& touchData) { onAccTouchedCalled = true; return true; }
bool Impl::DummyControl::OnAccessibilityValueChange( bool isIncrease )
{
onAccValueChangeCalled = true; return true;
#define DALI_TOOLKIT_TEST_DUMMY_CONTROL_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * 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.
virtual void OnInitialize();
virtual bool OnAccessibilityActivated();
- virtual bool OnAccessibilityTouch( const TouchEvent& touch );
+ virtual bool OnAccessibilityTouch( const TouchData& touchData );
virtual bool OnAccessibilityValueChange( bool isIncrease );
virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change );
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * 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.
#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-integ.h>
+#include <dali/integration-api/events/touch-data-integ.h>
namespace Dali
{
{
if( mActionHandler )
{
- Dali::TouchEvent touch = Integration::NewTouchEvent(timeStamp, point);
- return mActionHandler->AccessibilityActionScroll( touch );
+ Dali::TouchData touchData = Integration::NewTouchData(timeStamp, point);
+ return mActionHandler->AccessibilityActionScroll( touchData );
}
return false;
}
{
if( mActionHandler )
{
- Dali::TouchEvent touch = Integration::NewTouchEvent(timeStamp, point);
- return mActionHandler->AccessibilityActionTouch( touch );
+ Dali::TouchData touchData = Integration::NewTouchData(timeStamp, point);
+ return mActionHandler->AccessibilityActionTouch( touchData );
}
return false;
}
{
}
-bool WebEngine::SendTouchEvent( const TouchEvent& touch )
+bool WebEngine::SendTouchEvent( const TouchData& touch )
{
return true;
}
class Layer;
class RenderSurfaceInterface;
struct KeyEvent;
-class TouchEvent;
+class TouchData;
struct WheelEvent;
typedef Dali::Rect<int> PositionSize;
{
public:
using KeyEventSignalType = Signal< void (const KeyEvent&) >;
- using TouchSignalType = Signal< void (const TouchEvent&) >;
+ using TouchSignalType = Signal< void (const TouchData&) >;
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::TouchEvent& touchEvent )
+ bool Callback( AccessibilityManager& accessibilityManager, const Dali::TouchData& touchEvent )
{
mCalls++;
- Dali::TouchEvent handle(touchEvent); // Ensure it's ref-counted
- mTouchEvent = handle;
+ Dali::TouchData handle(touchEvent); // Ensure it's ref-counted
+ mTouchData = handle;
tet_infoline( "Signal called" );
return true;
}
return mCalls;
}
- const Dali::TouchEvent& GetTouchEvent() const
+ const Dali::TouchData& GetTouchData() const
{
- return mTouchEvent;
+ return mTouchData;
}
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::TouchData mTouchData ; ///< Stores the last touch event received.
};
int UtcDaliAccessibilityManagerActionScrollSignalP(void)
DALI_TEST_EQUALS( callback.GetCalls(), 1u, TEST_LOCATION );
- const TouchEvent& signalTouchEvent = callback.GetTouchEvent();
- DALI_TEST_EQUALS( signalTouchEvent.GetPointCount(), 1u, TEST_LOCATION );
+ const TouchData& signalTouchData = callback.GetTouchData();
+ DALI_TEST_EQUALS( signalTouchData.GetPointCount(), 1u, 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 );
+ 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 );
END_TEST;
}
}
///////////////////////////////////////////////////////////////////////////////
-static bool TouchCallback(Actor actor, const TouchEvent& event)
+static bool TouchCallback(Actor actor, const TouchData& event)
{
return false;
}
ToolkitTestApplication application;
Control dummy = Control::New();
Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
- TouchEvent touch;
+ TouchData 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 );
- 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 } } );
+ 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( 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::TouchEvent& touch )
+static bool OnTouched( Actor actor, const Dali::TouchData& 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::TouchEvent& )> AccessibilityActionScrollSignalType; ///< Scroll signal type @SINCE_1_0.0
+ typedef Signal< bool ( AccessibilityManager&, const Dali::TouchData& )> 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 TouchEvent& event );
+ * bool YourCallback( AccessibilityManager& manager, const TouchData& event );
* @endcode
* @SINCE_1_0.0
* @return The signal to connect to
}
}
-bool AccessibilityManager::AccessibilityActionScroll( Dali::TouchEvent& touch )
+bool AccessibilityManager::AccessibilityActionScroll( Dali::TouchData& touchData )
{
Dali::Toolkit::AccessibilityManager handle( this );
if( !mActionScrollSignal.Empty() )
{
- mActionScrollSignal.Emit( handle, touch );
+ mActionScrollSignal.Emit( handle, touchData );
}
return true;
return mIsAccessibilityTtsEnabled;
}
-bool AccessibilityManager::AccessibilityActionTouch(const TouchEvent& touch)
+bool AccessibilityManager::AccessibilityActionTouch(const TouchData& touchData)
{
bool handled = false;
Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(GetCurrentFocusActor());
if(control)
{
- handled = GetImplementation( control ).OnAccessibilityTouch(touch);
+ handled = GetImplementation( control ).OnAccessibilityTouch(touchData);
}
return handled;
/**
* Perform the accessibility action associated with a scroll event.
- * @param touch The touch point (and time) of the event.
+ * @param touchData The touch point (and time) of the event.
* @return whether the focus is cleared or not.
*/
- virtual bool AccessibilityActionScroll( Dali::TouchEvent& touch );
+ virtual bool AccessibilityActionScroll( Dali::TouchData& touchData );
/**
* 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 touch touch point and time of the event
+ * @param touchData touch point and time of the event
* @return whether the accessibility action is performed or not.
*/
- virtual bool AccessibilityActionTouch(const TouchEvent& touch);
+ virtual bool AccessibilityActionTouch(const TouchData& touchData);
/**
* 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-event.h>
+#include <dali/public-api/events/touch-data.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 TouchEvent& touch )
+bool Button::OnTouch( Actor actor, const TouchData& touch )
{
// Only events are processed when the button is not disabled
#define DALI_TOOLKIT_INTERNAL_BUTTON_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * 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.
* @param[in] touch The touch info.
* @return true, if consumed, false otherwise.
*/
- bool OnTouch( Actor actor, const TouchEvent& touch );
+ bool OnTouch( Actor actor, const TouchData& 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-event.h>
+#include <dali/public-api/events/touch-data.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 TouchEvent& touch )
+bool Popup::OnBackingTouched( Actor actor, const TouchData& touch )
{
// Allow events to pass through if touch transparency is enabled.
if( mTouchTransparent )
return true;
}
-bool Popup::OnDialogTouched( Actor actor, const TouchEvent& touch )
+bool Popup::OnDialogTouched( Actor actor, const TouchData& touch )
{
// Allow events to pass through if touch transparency is enabled.
if( mTouchTransparent )
* @param[in] touch The Touch Data.
* @return Whether to consume event or not.
*/
- bool OnBackingTouched(Actor actor, const TouchEvent& touch);
+ bool OnBackingTouched(Actor actor, const TouchData& 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 TouchEvent& touch );
+ bool OnDialogTouched( Actor actor, const TouchData& 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-event.h>
+#include <dali/public-api/events/touch-data.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 TouchEvent& touch )
+bool ItemView::OnTouch( Actor actor, const TouchData& touch )
{
// Ignore events with multiple-touch points
if (touch.GetPointCount() != 1)
#define DALI_TOOLKIT_INTERNAL_ITEM_VIEW_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * 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.
* @param[in] touch The touch information.
* @return True if the event should be consumed.
*/
- bool OnTouch( Actor actor, const TouchEvent& touch );
+ bool OnTouch( Actor actor, const TouchData& 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-event.h>
+#include <dali/public-api/events/touch-data.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 TouchEvent& touch )
+bool ScrollView::OnTouch( Actor actor, const TouchData& touch )
{
if(!mSensitive)
{
#define DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * 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.
* @param[in] touch The touch information.
* @return True if the event should be consumed.
*/
- bool OnTouch( Actor actor, const TouchEvent& touch );
+ bool OnTouch( Actor actor, const TouchData& touch );
/**
* Start a timer which calls OnTouchDownTimeout()
#include <cstring> // for strcmp
#include <sstream>
#include <limits>
-#include <dali/public-api/events/touch-event.h>
+#include <dali/public-api/events/touch-data.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 TouchEvent& touch)
+bool Slider::OnTouch(Actor actor, const TouchData& touch)
{
if( mState != DISABLED )
{
#define DALI_TOOLKIT_INTERNAL_SLIDER_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * 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.
* @param[in] touch The touch info
* @return If touch is handled or not
*/
- bool OnTouch( Actor actor, const TouchEvent& touch );
+ bool OnTouch( Actor actor, const TouchData& touch );
/**
* Pan gesture event
Control::OnSceneConnection( depth );
}
-bool TextEditor::OnTouched( Actor actor, const TouchEvent& touch )
+bool TextEditor::OnTouched( Actor actor, const TouchData& touch )
{
return true;
}
#define DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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 TouchEvent& touch );
+ bool OnTouched( Actor actor, const TouchData& touch );
/**
* @brief Callbacks called on idle.
Control::OnSceneConnection( depth );
}
-bool TextField::OnTouched( Actor actor, const TouchEvent& touch )
+bool TextField::OnTouched( Actor actor, const TouchData& touch )
{
return true;
}
#define DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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 TouchEvent& touch );
+ bool OnTouched( Actor actor, const TouchData& touch );
/**
* @brief Callbacks called on idle.
return value;
}
-bool WebView::OnTouchEvent( Actor actor, const Dali::TouchEvent& touch )
+bool WebView::OnTouchEvent( Actor actor, const Dali::TouchData& touch )
{
bool result = false;
#define DALI_TOOLKIT_INTERNAL_WEB_VIEW_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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 TouchEvent;
+class TouchData;
class WebView;
namespace Internal
* @param[in] touch The Touch Data.
* @return Whether to consume event or not.
*/
- bool OnTouchEvent( Actor actor, const Dali::TouchEvent& touch );
+ bool OnTouchEvent( Actor actor, const Dali::TouchData& 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-event.h>
+#include <dali/public-api/events/touch-data.h>
namespace Dali
{
}
}
-bool DragAndDropDetector::OnDrag(Dali::Actor actor, const Dali::TouchEvent& data)
+bool DragAndDropDetector::OnDrag(Dali::Actor actor, const Dali::TouchData& 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) 2020 Samsung Electronics Co., Ltd.
+ * 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.
}
public:
- bool OnDrag(Dali::Actor actor, const Dali::TouchEvent& data);
+ bool OnDrag(Dali::Actor actor, const Dali::TouchData& 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-event.h>
+#include <dali/public-api/events/touch-data.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 TouchEvent& touch)
+void KeyboardFocusManager::OnTouch(const TouchData& 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) 2020 Samsung Electronics Co., Ltd.
+ * 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.
* (i.e. the down & up touch events only).
* @param[in] touch The touch information
*/
- void OnTouch( const TouchEvent& touch );
+ void OnTouch( const TouchData& 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-event.h>
+#include <dali/public-api/events/touch-data.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 TouchEvent& touch )
+ bool OnGrabHandleTouched( Actor actor, const TouchData& touch )
{
HandleImpl& grabHandle = mHandle[GRAB_HANDLE];
return true;
}
- bool OnHandleOneTouched( Actor actor, const TouchEvent& touch )
+ bool OnHandleOneTouched( Actor actor, const TouchData& touch )
{
HandleImpl& primarySelectionHandle = mHandle[LEFT_SELECTION_HANDLE];
return true;
}
- bool OnHandleTwoTouched( Actor actor, const TouchEvent& touch )
+ bool OnHandleTwoTouched( Actor actor, const TouchData& touch )
{
HandleImpl& secondarySelectionHandle = mHandle[RIGHT_SELECTION_HANDLE];
return false; // Accessibility pan gesture is not handled by default
}
-bool Control::OnAccessibilityTouch(const TouchEvent& touch)
+bool Control::OnAccessibilityTouch(const TouchData& touchData)
{
return false; // Accessibility touch event is not handled by default
}
* touch event.
*
* @SINCE_1_0.0
- * @param[in] touch The touch event
+ * @param[in] touchData The touch event
* @return true if the touch event has been consumed by this control
*/
- virtual bool OnAccessibilityTouch( const TouchEvent& touch );
+ virtual bool OnAccessibilityTouch( const TouchData& touchData );
/**
* @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 TouchEvent& touch )
+ bool OnTouched( Actor actor, const TouchData& 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::TouchEvent stores information about the state of each point (down, up, motion etc.) and the co-ordinates of the touch.
+Dali::TouchData 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::TouchEvent& touch )
+bool OnTouch( Dali::Actor actor, const Dali::TouchData& touch )
{
bool handled = false;
stage.GetRootLayer().TouchSignal().Connect( this, &HelloWorldController::OnTouch );
}
- bool OnTouch( Actor actor, const TouchEvent& touch )
+ bool OnTouch( Actor actor, const TouchData& 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-EVENT )
+ CONSUMED = TOUCH-SIGNAL( TOUCH-DATA )
}
IF ( NOT-CONSUMED )
actor.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::CENTER );
Dali::Stage::GetCurrent().Add( actor );
...
-bool OnPressed( Dali::Actor, const TouchEvent& touch )
+bool OnPressed( Dali::Actor, const TouchData& touch )
{
Dali::Animation anim = Dali::Animation::New( 1.5f );
anim.AnimateTo( Property( actor, Actor::Property::POSITION ), Vector3( 200, -100, 0 ), AlphaFunctions::Bounce );