From: joogab.yun Date: Tue, 28 May 2024 07:12:46 +0000 (+0900) Subject: For Frame Event X-Git-Tag: dali_2.3.29~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b97714d463bcd59c77f2cd5a3ea6080a1eed72a3;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git For Frame Event When processing multiple multi-touches, they are grouped and processed. Group multi-touch events and process them when a frame event occurs. Change-Id: I1e3ac2a0026f3f95910b53521f3ddd8c6108de3c --- diff --git a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp index 011b87fd8..d5e1cf17c 100644 --- a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp +++ b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -49,6 +49,8 @@ namespace #if defined(DEBUG_ENABLED) Debug::Filter* gSceneHolderLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_SCENE_HOLDER"); #endif + +const uint32_t MAX_PRESSED_POINT_COUNT = 2; } // unnamed namespace uint32_t SceneHolder::mSceneHolderCounter = 0; @@ -93,7 +95,11 @@ SceneHolder::SceneHolder() mAdaptor(nullptr), mDpi(), mAdaptorStarted(false), - mVisible(true) + mVisible(true), + mHandledMultiTouch(false), + mPreviousTouchEvent(), + mPreviousHoverEvent(), + mPreviousType(Integration::TouchEventCombiner::DISPATCH_NONE) { } @@ -316,13 +322,12 @@ void SceneHolder::FeedTouchPoint(Dali::Integration::Point& point, int timeStamp) { timeStamp = TimeService::GetMilliSeconds(); } - Vector2 convertedPosition = RecalculatePosition(point.GetScreenPosition()); point.SetScreenPosition(convertedPosition); Integration::TouchEvent touchEvent; Integration::HoverEvent hoverEvent; - Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent); + Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent, mHandledMultiTouch); if(type != Integration::TouchEventCombiner::DISPATCH_NONE) { DALI_LOG_INFO(gSceneHolderLogFilter, Debug::Verbose, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.GetDeviceId(), point.GetState(), point.GetScreenPosition().x, point.GetScreenPosition().y); @@ -331,22 +336,78 @@ void SceneHolder::FeedTouchPoint(Dali::Integration::Point& point, int timeStamp) // Keep the handle alive until the core events are processed. Dali::BaseHandle sceneHolder(this); - // First the touch and/or hover event & related gesture events are queued + uint32_t pointCount = touchEvent.GetPointCount(); + if(pointCount > MAX_PRESSED_POINT_COUNT) + { + mPreviousTouchEvent = touchEvent; + mPreviousHoverEvent = hoverEvent; + if(mPreviousType == Integration::TouchEventCombiner::DISPATCH_NONE) + { + mPreviousType = type; + } + else if(mPreviousType != type) + { + mPreviousType = Integration::TouchEventCombiner::DISPATCH_BOTH; + } + mHandledMultiTouch = true; + } + if(type == Integration::TouchEventCombiner::DISPATCH_TOUCH || type == Integration::TouchEventCombiner::DISPATCH_BOTH) { mLastTouchEvent = Dali::Integration::NewTouchEvent(timeStamp, point); - mScene.QueueEvent(touchEvent); } if(type == Integration::TouchEventCombiner::DISPATCH_HOVER || type == Integration::TouchEventCombiner::DISPATCH_BOTH) { mLastHoverEvent = Dali::Integration::NewHoverEvent(timeStamp, point); - mScene.QueueEvent(hoverEvent); } // Next the events are processed with a single call into Core + if(pointCount <= MAX_PRESSED_POINT_COUNT || (point.GetState() != PointState::MOTION)) + { + mHandledMultiTouch = false; + mPreviousType = Integration::TouchEventCombiner::DISPATCH_NONE; + + // First the touch and/or hover event & related gesture events are queued + if(type == Integration::TouchEventCombiner::DISPATCH_TOUCH || type == Integration::TouchEventCombiner::DISPATCH_BOTH) + { + mScene.QueueEvent(touchEvent); + } + + if(type == Integration::TouchEventCombiner::DISPATCH_HOVER || type == Integration::TouchEventCombiner::DISPATCH_BOTH) + { + mScene.QueueEvent(hoverEvent); + } + mAdaptor->ProcessCoreEvents(); + } + } +} + +void SceneHolder::FeedMouseFrameEvent() +{ + if(DALI_UNLIKELY(!mAdaptorStarted)) + { + DALI_LOG_ERROR("Adaptor is stopped, or not be started yet. Ignore this feed.\n"); + return; + } + + if(mPreviousType == Integration::TouchEventCombiner::DISPATCH_TOUCH || mPreviousType == Integration::TouchEventCombiner::DISPATCH_BOTH) + { + mScene.QueueEvent(mPreviousTouchEvent); + } + + if(mPreviousType == Integration::TouchEventCombiner::DISPATCH_HOVER || mPreviousType == Integration::TouchEventCombiner::DISPATCH_BOTH) + { + mScene.QueueEvent(mPreviousHoverEvent); + } + + if(mPreviousType != Integration::TouchEventCombiner::DISPATCH_NONE) + { mAdaptor->ProcessCoreEvents(); } + + mHandledMultiTouch = false; + mPreviousType = Integration::TouchEventCombiner::DISPATCH_NONE; } const Dali::TouchEvent& SceneHolder::GetLastTouchEvent() const @@ -489,6 +550,8 @@ void SceneHolder::Reset() mScene.QueueEvent(event); // Next the events are processed with a single call into Core + mHandledMultiTouch = false; + mPreviousType = Integration::TouchEventCombiner::DISPATCH_NONE; mAdaptor->ProcessCoreEvents(); } diff --git a/dali/integration-api/adaptor-framework/scene-holder-impl.h b/dali/integration-api/adaptor-framework/scene-holder-impl.h index 144bc1347..0d984eccb 100644 --- a/dali/integration-api/adaptor-framework/scene-holder-impl.h +++ b/dali/integration-api/adaptor-framework/scene-holder-impl.h @@ -2,7 +2,7 @@ #define DALI_INTEGRATION_INTERNAL_SCENEHOLDER_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -181,6 +182,11 @@ public: */ void FeedTouchPoint(Dali::Integration::Point& point, int timeStamp); + /** + * @copydoc Dali::Integration::SceneHolder::FeedMouseFrameEvent + */ + void FeedMouseFrameEvent(); + /** * @brief Get the Last Touch Event * @@ -412,8 +418,12 @@ protected: Uint16Pair mDpi; ///< The DPI for this SceneHolder. - bool mAdaptorStarted; ///< Whether the adaptor has started or not - bool mVisible : 1; ///< Whether the scene is visible or not + bool mAdaptorStarted; ///< Whether the adaptor has started or not + bool mVisible : 1; ///< Whether the scene is visible or not + bool mHandledMultiTouch : 1; + Integration::TouchEvent mPreviousTouchEvent; + Integration::HoverEvent mPreviousHoverEvent; + Integration::TouchEventCombiner::EventDispatchType mPreviousType; }; } // namespace Adaptor diff --git a/dali/internal/window-system/common/event-handler.cpp b/dali/internal/window-system/common/event-handler.cpp index 66ee64aba..4d29e74c6 100644 --- a/dali/internal/window-system/common/event-handler.cpp +++ b/dali/internal/window-system/common/event-handler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -61,6 +61,7 @@ EventHandler::EventHandler(WindowBase* windowBase, DamageObserver& damageObserve windowBase->FocusChangedSignal().Connect(this, &EventHandler::OnFocusChanged); windowBase->RotationSignal().Connect(this, &EventHandler::OnRotation); windowBase->TouchEventSignal().Connect(this, &EventHandler::OnTouchEvent); + windowBase->MouseFrameEventSignal().Connect(this, &EventHandler::OnMouseFrameEvent); windowBase->WheelEventSignal().Connect(this, &EventHandler::OnWheelEvent); windowBase->KeyEventSignal().Connect(this, &EventHandler::OnKeyEvent); windowBase->SelectionDataSendSignal().Connect(this, &EventHandler::OnSelectionDataSend); @@ -106,6 +107,14 @@ void EventHandler::OnTouchEvent(Integration::Point& point, uint32_t timeStamp) } } +void EventHandler::OnMouseFrameEvent() +{ + for(ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter) + { + (*iter)->OnMouseFrameEvent(); + } +} + void EventHandler::OnWheelEvent(Integration::WheelEvent& wheelEvent) { for(ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter) diff --git a/dali/internal/window-system/common/event-handler.h b/dali/internal/window-system/common/event-handler.h index 98c868a27..70685f814 100644 --- a/dali/internal/window-system/common/event-handler.h +++ b/dali/internal/window-system/common/event-handler.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_EVENT_HANDLER_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -68,6 +68,11 @@ public: */ virtual void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) = 0; + /** + * @brief Deriving classes should override this to be notified when we receive a mouse frame event. + */ + virtual void OnMouseFrameEvent() = 0; + /** * Deriving classes should override this to be notified when we receive a wheel event. * @param[in] wheelEvent The wheel event @@ -156,6 +161,11 @@ private: */ void OnTouchEvent(Integration::Point& point, uint32_t timeStamp); + /** + * Called when a mouse frame event is received. + */ + void OnMouseFrameEvent(); + /** * Called when a mouse wheel is received. */ diff --git a/dali/internal/window-system/common/gl-window-impl.cpp b/dali/internal/window-system/common/gl-window-impl.cpp index 4e993e093..3f5ce843f 100644 --- a/dali/internal/window-system/common/gl-window-impl.cpp +++ b/dali/internal/window-system/common/gl-window-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -502,6 +502,10 @@ void GlWindow::OnTouchPoint(Dali::Integration::Point& point, int timeStamp) mTouchedSignal.Emit(touchEvent); } +void GlWindow::OnMouseFrameEvent() +{ +} + void GlWindow::OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) { // TODO: diff --git a/dali/internal/window-system/common/gl-window-impl.h b/dali/internal/window-system/common/gl-window-impl.h index 7df776cd4..46de8bb79 100644 --- a/dali/internal/window-system/common/gl-window-impl.h +++ b/dali/internal/window-system/common/gl-window-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_GL_WINDOW_IMPL_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -311,6 +311,11 @@ private: */ void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override; + /** + * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnMouseFrameEvent + */ + void OnMouseFrameEvent() override; + /** * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent */ diff --git a/dali/internal/window-system/common/window-base.cpp b/dali/internal/window-system/common/window-base.cpp index a2ff543b4..a067d9b7f 100644 --- a/dali/internal/window-system/common/window-base.cpp +++ b/dali/internal/window-system/common/window-base.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -33,6 +33,7 @@ WindowBase::WindowBase() mWindowDamagedSignal(), mRotationSignal(), mTouchEventSignal(), + mMouseFrameEventSignal(), mWheelEventSignal(), mKeyEventSignal(), mSelectionDataSendSignal(), @@ -95,6 +96,11 @@ WindowBase::TouchEventSignalType& WindowBase::TouchEventSignal() return mTouchEventSignal; } +WindowBase::MouseFrameEventSignalType& WindowBase::MouseFrameEventSignal() +{ + return mMouseFrameEventSignal; +} + WindowBase::WheelEventSignalType& WindowBase::WheelEventSignal() { return mWheelEventSignal; diff --git a/dali/internal/window-system/common/window-base.h b/dali/internal/window-system/common/window-base.h index 7774da31e..c46ff1749 100644 --- a/dali/internal/window-system/common/window-base.h +++ b/dali/internal/window-system/common/window-base.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -85,6 +85,7 @@ public: // Input events typedef Signal TouchEventSignalType; + typedef Signal MouseFrameEventSignalType; typedef Signal WheelEventSignalType; typedef Signal KeyEventSignalType; @@ -553,7 +554,7 @@ public: */ virtual void SetFrontBufferRendering(bool enable) = 0; - /** + /** * @brief Enables or disables front buffer rendering. * @return Returns whether front buffer rendering has been enabled or not. */ @@ -607,6 +608,11 @@ public: */ TouchEventSignalType& TouchEventSignal(); + /** + * @brief This signal is emitted when a mouse frame event is received. + */ + MouseFrameEventSignalType& MouseFrameEventSignal(); + /** * @brief This signal is emitted when a mouse wheel is received. */ @@ -708,6 +714,7 @@ protected: DamageSignalType mWindowDamagedSignal; RotationSignalType mRotationSignal; TouchEventSignalType mTouchEventSignal; + MouseFrameEventSignalType mMouseFrameEventSignal; WheelEventSignalType mWheelEventSignal; KeyEventSignalType mKeyEventSignal; SelectionSignalType mSelectionDataSendSignal; diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 8ea3b4788..69e365f76 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -1122,6 +1122,11 @@ void Window::OnTouchPoint(Dali::Integration::Point& point, int timeStamp) FeedTouchPoint(point, timeStamp); } +void Window::OnMouseFrameEvent() +{ + FeedMouseFrameEvent(); +} + void Window::OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) { FeedWheelEvent(wheelEvent); diff --git a/dali/internal/window-system/common/window-impl.h b/dali/internal/window-system/common/window-impl.h index 857bd4d3a..b0298a3a6 100644 --- a/dali/internal/window-system/common/window-impl.h +++ b/dali/internal/window-system/common/window-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -822,6 +822,11 @@ private: // Dali::Internal::Adaptor::EventHandler::Observer */ void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override; + /** + * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnMouseFrameEvent + */ + void OnMouseFrameEvent() override; + /** * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent */ @@ -1024,8 +1029,8 @@ private: bool mOpaqueState : 1; bool mWindowRotationAcknowledgement : 1; bool mFocused : 1; - bool mIsWindowRotating : 1; ///< The window rotating flag. - bool mIsEnabledUserGeometry : 1; ///< The user geometry enable flag. + bool mIsWindowRotating : 1; ///< The window rotating flag. + bool mIsEnabledUserGeometry : 1; ///< The user geometry enable flag. bool mIsEmittedWindowCreatedEvent : 1; ///< The Window Created Event emit flag for accessibility. bool mIsFrontBufferRendering : 1; ///< The Front Buffer Rendering state. }; diff --git a/dali/internal/window-system/macos/window-base-mac.mm b/dali/internal/window-system/macos/window-base-mac.mm index 674ef630e..1a1f24c5c 100644 --- a/dali/internal/window-system/macos/window-base-mac.mm +++ b/dali/internal/window-system/macos/window-base-mac.mm @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -231,6 +231,8 @@ void WindowBaseCocoa::Impl::OnMouse(NSEvent *event, PointState::Type state) // timestamp is given in seconds, the signal expects it in milliseconds mThis->mTouchEventSignal.Emit(point, event.timestamp * 1000); + + mThis->mMouseFrameEventSignal.Emit(); } } diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp index b39426090..a134bdc99 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp @@ -844,6 +844,8 @@ void WindowBaseEcoreWl::OnMouseButtonDown(void* data, int type, void* event) point.SetDeviceSubclass(deviceSubclass); mTouchEventSignal.Emit(point, touchEvent->timestamp); + + mMouseFrameEventSignal.Emit(); } } @@ -870,6 +872,8 @@ void WindowBaseEcoreWl::OnMouseButtonUp(void* data, int type, void* event) point.SetDeviceSubclass(deviceSubclass); mTouchEventSignal.Emit(point, touchEvent->timestamp); + + mMouseFrameEventSignal.Emit(); } } @@ -896,6 +900,8 @@ void WindowBaseEcoreWl::OnMouseButtonMove(void* data, int type, void* event) point.SetDeviceSubclass(deviceSubclass); mTouchEventSignal.Emit(point, touchEvent->timestamp); + + mMouseFrameEventSignal.Emit(); } } @@ -924,6 +930,8 @@ void WindowBaseEcoreWl::OnMouseButtonCancel(void* data, int type, void* event) mTouchEventSignal.Emit(point, touchEvent->timestamp); DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseButtonCancel\n"); + + mMouseFrameEventSignal.Emit(); } } diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index 7ebaa1d4f..cfa6b9d70 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -459,6 +459,19 @@ static Eina_Bool EcoreEventMouseButtonMove(void* data, int type, void* event) } #ifdef OVER_TIZEN_VERSION_8 +/** + * Called when a touch motion is received. + */ +static Eina_Bool EcoreEventMouseFrame(void* data, int type, void* event) +{ + WindowBaseEcoreWl2* windowBase = static_cast(data); + if(windowBase) + { + windowBase->OnMouseFrame(data, type, event); + } + return ECORE_CALLBACK_PASS_ON; +} + /** * Called when a touch motion is received. */ @@ -1019,6 +1032,9 @@ void WindowBaseEcoreWl2::Initialize(PositionSize positionSize, Any surface, bool // Register pointer lock/unlock event mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL2_EVENT_POINTER_CONSTRAINTS, EcoreEventPointerConstraints, this)); + + // Register mouse frame events + mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_FRAME, EcoreEventMouseFrame, this)); #endif // Register Mouse wheel events @@ -1313,6 +1329,10 @@ void WindowBaseEcoreWl2::OnMouseButtonDown(void* data, int type, void* event) point.SetMouseButton(static_cast(touchEvent->buttons)); mTouchEventSignal.Emit(point, touchEvent->timestamp); + +#ifndef OVER_TIZEN_VERSION_8 + mMouseFrameEventSignal.Emit(); +#endif } } @@ -1342,6 +1362,10 @@ void WindowBaseEcoreWl2::OnMouseButtonUp(void* data, int type, void* event) point.SetMouseButton(static_cast(touchEvent->buttons)); mTouchEventSignal.Emit(point, touchEvent->timestamp); + +#ifndef OVER_TIZEN_VERSION_8 + mMouseFrameEventSignal.Emit(); +#endif } } @@ -1370,10 +1394,25 @@ void WindowBaseEcoreWl2::OnMouseButtonMove(void* data, int type, void* event) point.SetDeviceSubclass(deviceSubclass); mTouchEventSignal.Emit(point, touchEvent->timestamp); + +#ifndef OVER_TIZEN_VERSION_8 + mMouseFrameEventSignal.Emit(); +#endif } } #ifdef OVER_TIZEN_VERSION_8 +void WindowBaseEcoreWl2::OnMouseFrame(void* data, int type, void* event) +{ + Ecore_Event_Mouse_Frame* MouseFrameEvent = static_cast(event); + + if(MouseFrameEvent->window == static_cast(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable()) + { + DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_FRAME"); + mMouseFrameEventSignal.Emit(); + } +} + void WindowBaseEcoreWl2::OnMouseButtonRelativeMove(void* data, int type, void* event) { Ecore_Event_Mouse_Relative_Move* relativeMoveEvent = static_cast(event); @@ -1421,6 +1460,10 @@ void WindowBaseEcoreWl2::OnMouseButtonCancel(void* data, int type, void* event) mTouchEventSignal.Emit(point, touchEvent->timestamp); +#ifndef OVER_TIZEN_VERSION_8 + mMouseFrameEventSignal.Emit(); +#endif + DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseButtonCancel\n"); } } diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h index 4ec38e072..1f0bbbacf 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_BASE_ECORE_WL2_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -105,6 +105,11 @@ public: */ void OnMouseButtonMove(void* data, int type, void* event); + /** + * @brief Called when a mouse frame is received. + */ + void OnMouseFrame(void* data, int type, void* event); + /** * @brief Called when a touch motion is received. */ diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp index fdcfa5677..c03087735 100644 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -475,6 +475,8 @@ void WindowBaseEcoreX::OnMouseButtonDown(void* data, int type, void* event) } mTouchEventSignal.Emit(point, touchEvent->timestamp); + + mMouseFrameEventSignal.Emit(); } } @@ -497,6 +499,8 @@ void WindowBaseEcoreX::OnMouseButtonUp(void* data, int type, void* event) } mTouchEventSignal.Emit(point, touchEvent->timestamp); + + mMouseFrameEventSignal.Emit(); } } @@ -515,6 +519,8 @@ void WindowBaseEcoreX::OnMouseButtonMove(void* data, int type, void* event) point.SetAngle(Degree(static_cast(touchEvent->multi.angle))); mTouchEventSignal.Emit(point, touchEvent->timestamp); + + mMouseFrameEventSignal.Emit(); } } diff --git a/dali/internal/window-system/windows/window-base-win.cpp b/dali/internal/window-system/windows/window-base-win.cpp index 28f67a183..19e9cea1e 100644 --- a/dali/internal/window-system/windows/window-base-win.cpp +++ b/dali/internal/window-system/windows/window-base-win.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -132,6 +132,8 @@ void WindowBaseWin::OnMouseButtonDown(int type, TWinEventInfo* event) point.SetAngle(Degree(touchEvent.multi.angle)); mTouchEventSignal.Emit(point, touchEvent.timestamp); + + mMouseFrameEventSignal.Emit(); } } @@ -156,6 +158,8 @@ void WindowBaseWin::OnMouseButtonUp(int type, TWinEventInfo* event) point.SetAngle(Degree(touchEvent.multi.angle)); mTouchEventSignal.Emit(point, touchEvent.timestamp); + + mMouseFrameEventSignal.Emit(); } } @@ -180,6 +184,8 @@ void WindowBaseWin::OnMouseButtonMove(int type, TWinEventInfo* event) point.SetAngle(Degree(touchEvent.multi.angle)); mTouchEventSignal.Emit(point, touchEvent.timestamp); + + mMouseFrameEventSignal.Emit(); } } diff --git a/dali/internal/window-system/x11/window-base-x.cpp b/dali/internal/window-system/x11/window-base-x.cpp index da239ee8b..e5fdce2c9 100644 --- a/dali/internal/window-system/x11/window-base-x.cpp +++ b/dali/internal/window-system/x11/window-base-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -480,6 +480,8 @@ void WindowBaseX::OnMouseButtonDown(void* data, WindowSystemBase::Event type, Wi } mTouchEventSignal.Emit(point, touchEvent->timestamp); + + mMouseFrameEventSignal.Emit(); } } @@ -503,6 +505,8 @@ void WindowBaseX::OnMouseButtonUp(void* data, WindowSystemBase::Event type, Wind } mTouchEventSignal.Emit(point, touchEvent->timestamp); + + mMouseFrameEventSignal.Emit(); } } @@ -521,6 +525,8 @@ void WindowBaseX::OnMouseButtonMove(void* data, WindowSystemBase::Event type, Wi point.SetAngle(Degree(static_cast(touchEvent->multi.angle))); mTouchEventSignal.Emit(point, touchEvent->timestamp); + + mMouseFrameEventSignal.Emit(); } }