X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Fwindow-devel.h;h=bbdac10d7c4af616a1041f56d0ff3f121ee10d29;hb=88b460eab34ce84f7e15c12ff3751356126041c1;hp=eec41b7afb7ec79f53ec5b363fd2140eeb548c68;hpb=eca7aed71a48957ba7b3bc9d64136b654feef362;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index eec41b7..bbdac10 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -23,10 +23,22 @@ namespace Dali { +class KeyEvent; +class TouchData; +class WheelEvent; +class RenderTaskList; namespace DevelWindow { +typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Processing finished signal type + +typedef Signal< void (const KeyEvent&) > KeyEventSignalType; ///< Key event signal type + +typedef Signal< void (const TouchData&) > TouchSignalType; ///< Touch signal type + +typedef Signal< void (const WheelEvent&) > WheelEventSignalType; ///< Touched signal type + /** * @brief Sets position and size of the window. This API guarantees that both moving and resizing of window will appear on the screen at once. * @@ -36,69 +48,70 @@ namespace DevelWindow DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize ); /** - * @brief Adds a child Actor to the Window. + * @brief Retrieves the list of render-tasks in the window. * - * The child will be referenced. * @param[in] window The window instance - * @param[in] actor The child - * @pre The actor has been initialized. - * @pre The actor does not have a parent. + * @return A valid handle to a RenderTaskList */ -DALI_ADAPTOR_API void Add( Window window, Dali::Actor actor ); +Dali::RenderTaskList GetRenderTaskList( Window window ); /** - * @brief Removes a child Actor from the Window. + * @brief Retrieve the window that the given actor is added to. * - * The child will be unreferenced. - * @param[in] window The window instance - * @param[in] actor The child - * @pre The actor has been added to the stage. + * @param[in] actor The actor + * @return The window the actor is added to or an empty handle if the actor is not added to any window. */ -DALI_ADAPTOR_API void Remove( Window window, Dali::Actor actor ); +DALI_ADAPTOR_API Window Get( Actor actor ); /** - * @brief Sets the background color of the window. + * @brief This signal is emitted just after the event processing is finished. * * @param[in] window The window instance - * @param[in] color The new background color + * @return The signal to connect to */ -DALI_ADAPTOR_API void SetBackgroundColor( Window window, Vector4 color ); +DALI_ADAPTOR_API EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window ); /** - * @brief Gets the background color of the surface. + * @brief This signal is emitted when key event is received. * + * A callback of the following type may be connected: + * @code + * void YourCallbackName(const KeyEvent& event); + * @endcode * @param[in] window The window instance - * @return The background color + * @return The signal to connect to */ -DALI_ADAPTOR_API Vector4 GetBackgroundColor( Window window ); +DALI_ADAPTOR_API KeyEventSignalType& KeyEventSignal( Window window ); /** - * @brief Returns the Scene's Root Layer. + * @brief This signal is emitted when the screen is touched and when the touch ends + * (i.e. the down & up touch events only). * - * @param[in] window The window instance - * @return The root layer - */ -DALI_ADAPTOR_API Dali::Layer GetRootLayer( Window window ); - -/** - * @brief Queries the number of on-stage layers. + * If there are multiple touch points, then this will be emitted when the first touch occurs and + * then when the last finger is lifted. + * An interrupted event will also be emitted (if it occurs). + * A callback of the following type may be connected: + * @code + * void YourCallbackName( TouchData event ); + * @endcode * - * Note that a default layer is always provided (count >= 1). * @param[in] window The window instance - * @return The number of layers + * @return The touch signal to connect to + * @note Motion events are not emitted. */ -DALI_ADAPTOR_API uint32_t GetLayerCount( Window window ); +DALI_ADAPTOR_API TouchSignalType& TouchSignal( Window window ); /** - * @brief Retrieves the layer at a specified depth. + * @brief This signal is emitted when wheel event is received. * + * A callback of the following type may be connected: + * @code + * void YourCallbackName(const WheelEvent& event); + * @endcode * @param[in] window The window instance - * @param[in] depth The depth - * @return The layer found at the given depth - * @pre Depth is less than layer count; see GetLayerCount(). + * @return The signal to connect to */ -DALI_ADAPTOR_API Dali::Layer GetLayer( Window window, uint32_t depth ); - +DALI_ADAPTOR_API WheelEventSignalType& WheelEventSignal( Window window ); } // namespace DevelWindow