From: Sunghyun kim Date: Thu, 13 Jun 2019 10:13:47 +0000 (+0900) Subject: [Tizen]Add KeyEventGeneratedSignal for Get KeyEvent normally X-Git-Tag: accepted/tizen/unified/20190618.045952~13^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3965f6e768fa75655906eee954e8292935a2259e;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen]Add KeyEventGeneratedSignal for Get KeyEvent normally Window can get KeyEvent even if control already use it. Change-Id: I20e69ad3838640de7da309bc6ad2d1b37e51cbfc --- diff --git a/dali/devel-api/adaptor-framework/window-devel.cpp b/dali/devel-api/adaptor-framework/window-devel.cpp index 17a2993..dd28579 100644 --- a/dali/devel-api/adaptor-framework/window-devel.cpp +++ b/dali/devel-api/adaptor-framework/window-devel.cpp @@ -55,6 +55,11 @@ KeyEventSignalType& KeyEventSignal( Window window ) return GetImplementation( window ).KeyEventSignal(); } +KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window ) +{ + return GetImplementation( window ).KeyEventGeneratedSignal(); +} + TouchSignalType& TouchSignal( Window window ) { return GetImplementation( window ).TouchSignal(); diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index 3da549e..e61381e 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -35,6 +35,8 @@ typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Pr typedef Signal< void (const KeyEvent&) > KeyEventSignalType; ///< Key event signal type +typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType; ///< Key event generated signal type + typedef Signal< void (const TouchData&) > TouchSignalType; ///< Touch signal type typedef Signal< void (const WheelEvent&) > WheelEventSignalType; ///< Touched signal type @@ -84,6 +86,18 @@ DALI_ADAPTOR_API EventProcessingFinishedSignalType& EventProcessingFinishedSigna DALI_ADAPTOR_API KeyEventSignalType& KeyEventSignal( Window window ); /** + * @brief This signal is emitted when key event is received. + * + * A callback of the following type may be connected: + * @code + * bool YourCallbackName(const KeyEvent& event); + * @endcode + * @param[in] window The window instance + * @return The signal to connect to + */ +DALI_ADAPTOR_API KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window ); + +/** * @brief This signal is emitted when the screen is touched and when the touch ends * (i.e. the down & up touch events only). * diff --git a/dali/internal/window-system/common/window-impl.h b/dali/internal/window-system/common/window-impl.h index 7fd04f9..97fc575 100644 --- a/dali/internal/window-system/common/window-impl.h +++ b/dali/internal/window-system/common/window-impl.h @@ -464,6 +464,11 @@ public: // Signals */ Dali::DevelWindow::KeyEventSignalType& KeyEventSignal() { return mScene.KeyEventSignal(); }; + /** + * @copydoc Dali::Window::KeyEventGeneratedSignal() + */ + Dali::DevelWindow::KeyEventGeneratedSignalType& KeyEventGeneratedSignal() { return mScene.KeyEventGeneratedSignal(); }; + /** * @copydoc Dali::Window::TouchSignal() */