int UtcDaliTouchEventIntegNewTouchEvent(void)
{
uint32_t timestamp = 92858u;
- TouchPoint tp(1, PointState::STARTED, 34.4f, 123.89f, 5.0f, 7.0f);
+ TouchPoint tp(1, TouchPoint::State::Started, 34.4f, 123.89f, 5.0f, 7.0f);
Dali::TouchEvent touchEvent = Integration::NewTouchEvent(timestamp, tp);
DALI_TEST_EQUALS(touchEvent.GetPointCount(), 1u, TEST_LOCATION);
- DALI_TEST_EQUALS(touchEvent.GetState(0), PointState::STARTED, TEST_LOCATION );
+ DALI_TEST_EQUALS(touchEvent.GetState(0), PointState::Type::STARTED, TEST_LOCATION );
DALI_TEST_EQUALS(touchEvent.GetLocalPosition(0), Vector2(5.0f, 7.0f), TEST_LOCATION );
DALI_TEST_EQUALS(touchEvent.GetScreenPosition(0), Vector2(34.4f, 123.89f), TEST_LOCATION );
${devel_api_src_dir}/events/hit-test-algorithm.cpp
${devel_api_src_dir}/events/long-press-gesture-detector-devel.cpp
${devel_api_src_dir}/events/key-event-devel.cpp
- ${devel_api_src_dir}/events/touch-point.cpp
${devel_api_src_dir}/events/wheel-event-devel.cpp
${devel_api_src_dir}/images/distance-field.cpp
${devel_api_src_dir}/images/pixel-data-devel.cpp
${devel_api_src_dir}/events/hit-test-algorithm.h
${devel_api_src_dir}/events/long-press-gesture-detector-devel.h
${devel_api_src_dir}/events/key-event-devel.h
- ${devel_api_src_dir}/events/touch-point.h
${devel_api_src_dir}/events/wheel-event-devel.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.
{
Point::Point()
-: mTouchPoint( 0, PointState::STARTED, 0.0f, 0.0f ),
+: mTouchPoint( 0, TouchPoint::Started, 0.0f, 0.0f ),
mEllipseRadius(),
mAngle( 0.0f ),
mDeviceClass( Device::Class::NONE ),
void Point::SetState( PointState::Type state )
{
- mTouchPoint.state = static_cast< PointState::Type >( state );
+ mTouchPoint.state = static_cast< TouchPoint::State >( state );
}
void Point::SetScreenPosition( const Vector2& screenPosition )
#define DALI_INTEGRATION_POINT_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.
#include <dali/public-api/events/point-state.h>
#include <dali/public-api/math/degree.h>
#include <dali/public-api/math/vector2.h>
-#include <dali/devel-api/events/touch-point.h>
+#include <dali/public-api/events/touch-point.h>
#include <dali/public-api/events/device.h>
#include <dali/public-api/events/mouse-button.h>
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/events/touch-event.h>
-#include <dali/devel-api/events/touch-point.h>
+#include <dali/public-api/events/touch-point.h>
namespace Dali
{
// INTERNAL INCLUDES
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/events/hover-event.h>
-#include <dali/devel-api/events/touch-point.h>
+#include <dali/public-api/events/touch-point.h>
#include <dali/public-api/object/base-object.h>
#include <dali/integration-api/events/point.h>
#if defined(DEBUG_ENABLED)
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_HOVER_PROCESSOR" );
-const char * TOUCH_POINT_STATE[PointState::INTERRUPTED + 1] =
+const char * TOUCH_POINT_STATE[TouchPoint::Last] =
{
- "STARTED",
- "FINISHED",
- "MOTION",
- "LEAVE",
- "STATIONARY",
- "INTERRUPTED",
+ "Started",
+ "Finished",
+ "Motion",
+ "Leave",
+ "Stationary",
+ "Interrupted",
};
#endif // defined(DEBUG_ENABLED)
DALI_LOG_TRACE_METHOD( gLogFilter );
DALI_ASSERT_ALWAYS( !event.points.empty() && "Empty HoverEvent sent from Integration\n" );
- PointState::Type state = static_cast< PointState::Type >( event.points[0].GetState() );
+ TouchPoint::State state = static_cast< TouchPoint::State >( event.points[0].GetState() );
PRINT_HIERARCHY(gLogFilter);
// 1) Check if it is an interrupted event - we should inform our last primary hit actor about this
// and emit the stage signal as well.
- if ( state == PointState::INTERRUPTED )
+ if ( state == TouchPoint::Interrupted )
{
Dali::Actor consumingActor;
Integration::Point currentPoint( event.points[0] );
// EXTERNAL INCLUDES
#include <cmath>
-#include <dali/devel-api/events/touch-point.h>
+#include <dali/public-api/events/touch-point.h>
#include <dali/public-api/math/vector2.h>
#include <dali/internal/event/common/thread-local-storage.h>
// EXTERNAL INCLUDES
#include <cmath>
-#include <dali/devel-api/events/touch-point.h>
+#include <dali/public-api/events/touch-point.h>
#include <dali/integration-api/events/touch-event-integ.h>
// EXTERNAL INCLUDES
#include <cmath>
-#include <dali/devel-api/events/touch-point.h>
+#include <dali/public-api/events/touch-point.h>
#include <dali/public-api/math/vector2.h>
#include <dali/internal/event/events/pinch-gesture/pinch-gesture-event.h>
#include <cmath>
// INTERNAL INCLUDES
-#include <dali/devel-api/events/touch-point.h>
+#include <dali/public-api/events/touch-point.h>
#include <dali/public-api/math/vector2.h>
#include <dali/integration-api/events/touch-event-integ.h>
#include <dali/internal/event/events/rotation-gesture/rotation-gesture-event.h>
#include <dali/public-api/events/tap-gesture-detector.h>
#include <dali/public-api/events/tap-gesture.h>
#include <dali/public-api/events/touch-event.h>
+#include <dali/public-api/events/touch-point.h>
#include <dali/public-api/images/native-image-interface.h>
#include <dali/public-api/images/pixel.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 HEADER
-#include <dali/devel-api/events/touch-point.h>
+#include <dali/public-api/events/touch-point.h>
namespace Dali
{
-TouchPoint::TouchPoint(int32_t id, PointState::Type state, float screenX, float screenY)
+TouchPoint::TouchPoint(int32_t id, State state, float screenX, float screenY)
: deviceId(id),
state(state),
local(screenX, screenY),
{
}
-TouchPoint::TouchPoint(int32_t id, PointState::Type state, float screenX, float screenY, float localX, float localY)
+TouchPoint::TouchPoint(int32_t id, State state, float screenX, float screenY, float localX, float localY)
: deviceId(id),
state(state),
local(localX, localY),
#define DALI_TOUCH_POINT_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.
// INTERNAL INCLUDES
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/actors/actor.h>
-#include <dali/public-api/events/point-state.h>
#include <dali/public-api/math/vector2.h>
namespace Dali
*/
struct DALI_CORE_API TouchPoint
{
+ // Enumerations
+
+ /**
+ * @brief Enumeration for Touch state.
+ * @SINCE_1_0.0
+ */
+ enum State
+ {
+ Started, /**< Touch or hover started */
+ Finished, /**< Touch or hover finished */
+ Down = Started, /**< Screen touched */
+ Up = Finished, /**< Touch stopped */
+ Motion, /**< Finger dragged or hovered */
+ Leave, /**< Leave the boundary of an actor */
+ Stationary, /**< No change from last event. Useful when a multi-point event occurs where
+ all points are sent but indicates that this particular point has not changed
+ since the last time */
+ Interrupted, /**< A system event has occurred which has interrupted the touch or hover event sequence. */
+ Last /**< Number of states. */
+ };
+
// Construction & Destruction
/**
* @brief Constructor.
*
- * @SINCE_1_9.28
+ * @SINCE_1_0.0
* @param[in] id The touch device ID
* @param[in] state The state
* @param[in] screenX The X co-ordinate relative to the screen's origin
* @param[in] screenY The Y co-ordinate relative to the screen's origin
*/
- TouchPoint(int32_t id, PointState::Type state, float screenX, float screenY);
+ TouchPoint(int32_t id, State state, float screenX, float screenY);
/**
* @brief Constructor.
*
- * @SINCE_1_9.28
+ * @SINCE_1_0.0
* @param[in] id The touch device ID
* @param[in] state The state
* @param[in] screenX The X co-ordinate relative to the screen's origin
* @param[in] localX The X co-ordinate relative to the top-left (0.0, 0.0, 0.5) of the actor
* @param[in] localY The Y co-ordinate relative to the top-left (0.0, 0.0, 0.5) of the actor
*/
- TouchPoint(int32_t id, PointState::Type state, float screenX, float screenY, float localX, float localY);
+ TouchPoint(int32_t id, State state, float screenX, float screenY, float localX, float localY);
/**
* @brief Destructor.
/**
* @brief State of the point.
*
- * @see Dali::PointState::Type
+ * @see State
*/
- PointState::Type state;
+ State state;
/**
* @brief The actor that was underneath the touch point.
${public_api_src_dir}/events/rotation-gesture-detector.cpp
${public_api_src_dir}/events/tap-gesture.cpp
${public_api_src_dir}/events/tap-gesture-detector.cpp
+ ${public_api_src_dir}/events/touch-point.cpp
${public_api_src_dir}/events/touch-event.cpp
${public_api_src_dir}/images/pixel.cpp
${public_api_src_dir}/images/pixel-data.cpp
${public_api_src_dir}/events/rotation-gesture-detector.h
${public_api_src_dir}/events/tap-gesture.h
${public_api_src_dir}/events/tap-gesture-detector.h
+ ${public_api_src_dir}/events/touch-point.h
${public_api_src_dir}/events/touch-event.h
${public_api_src_dir}/events/mouse-button.h
)