From c714563baa3d8c19bc7c2b7110acfb2b99c9678f Mon Sep 17 00:00:00 2001 From: "joogab.yun" Date: Fri, 11 Feb 2022 15:13:44 +0900 Subject: [PATCH] [Tizen] Add FeedKeyEvent, FeedTouchPoint and FeedWheelEvent Change-Id: Ib1868528abdcd292e86585b535efbbedafcce934 --- dali/devel-api/adaptor-framework/window-devel.cpp | 18 ++++++++++++++++++ dali/devel-api/adaptor-framework/window-devel.h | 22 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/dali/devel-api/adaptor-framework/window-devel.cpp b/dali/devel-api/adaptor-framework/window-devel.cpp index 67fafa3..559d91b 100644 --- a/dali/devel-api/adaptor-framework/window-devel.cpp +++ b/dali/devel-api/adaptor-framework/window-devel.cpp @@ -206,6 +206,24 @@ bool IsWindowRotating(Window window) return GetImplementation(window).IsWindowRotating(); } +void FeedTouchPoint(Window window, const Dali::TouchPoint& point, int32_t timeStamp) +{ + Integration::Point convertedPoint(point); + GetImplementation(window).FeedTouchPoint(convertedPoint, timeStamp); +} + +void FeedWheelEvent(Window window, const Dali::WheelEvent& wheelEvent) +{ + Integration::WheelEvent convertedEvent(static_cast(wheelEvent.GetType()), wheelEvent.GetDirection(), wheelEvent.GetModifiers(), wheelEvent.GetPoint(), wheelEvent.GetDelta(), wheelEvent.GetTime()); + GetImplementation(window).FeedWheelEvent(convertedEvent); +} + +void FeedKeyEvent(Window window, const Dali::KeyEvent& keyEvent) +{ + Integration::KeyEvent convertedEvent(keyEvent.GetKeyName(), keyEvent.GetLogicalKey(), keyEvent.GetKeyString(), keyEvent.GetKeyCode(), keyEvent.GetKeyModifier(), keyEvent.GetTime(), static_cast(keyEvent.GetState()), keyEvent.GetCompose(), keyEvent.GetDeviceName(), keyEvent.GetDeviceClass(), keyEvent.GetDeviceSubclass()); + GetImplementation(window).FeedKeyEvent(convertedEvent); +} + } // namespace DevelWindow } // namespace Dali diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index bb066c3..882ee12 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -32,6 +32,7 @@ class KeyEvent; class TouchEvent; class WheelEvent; class RenderTaskList; +struct TouchPoint; namespace DevelWindow { @@ -400,6 +401,27 @@ DALI_ADAPTOR_API void SendRotationCompletedAcknowledgement(Window window); */ DALI_ADAPTOR_API bool IsWindowRotating(Window window); +/** + * @brief Feed (Send) touch event to window + * @param[in] window The window instance + * @param[in] point The touch point + * @param[in] timeStamp The time stamp + */ +DALI_ADAPTOR_API void FeedTouchPoint(Window window, const Dali::TouchPoint& point, int32_t timeStamp); + +/** + * @brief Feed (Send) wheel event to window + * @param[in] window The window instance + * @param[in] wheelEvent The wheel event + */ +DALI_ADAPTOR_API void FeedWheelEvent(Window window, const Dali::WheelEvent& wheelEvent); + +/** + * @brief Feed (Send) key event to window + * @param[in] window The window instance + * @param[in] keyEvent The key event holding the key information. + */ +DALI_ADAPTOR_API void FeedKeyEvent(Window window, const Dali::KeyEvent& keyEvent); } // namespace DevelWindow -- 2.7.4