X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Fwindow-devel.h;h=5803d328b8c41ec248107b5cdfd2c30707c5cbf6;hb=8ba78643344269b0a26806c10c215b5ceea5fee1;hp=da532d3b51d2fafc3ea7da40c9a475976f240260;hpb=4089a677183ea5ac630ac55a967c254109c2ea6c;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 da532d3..5803d32 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -2,7 +2,7 @@ #define DALI_WINDOW_DEVEL_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -18,13 +18,17 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES +#include #include namespace Dali { class KeyEvent; -class TouchData; +class TouchEvent; class WheelEvent; class RenderTaskList; @@ -54,27 +58,48 @@ typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Pr typedef Signal< void (const KeyEvent&) > KeyEventSignalType; ///< Key event signal type -typedef Signal< void (const TouchData&) > TouchSignalType; ///< Touch signal type +typedef Signal< void (const TouchEvent&) > TouchEventSignalType; ///< Touch signal type typedef Signal< void (const WheelEvent&) > WheelEventSignalType; ///< Touched signal type +typedef Signal< void ( Window, bool ) > VisibilityChangedSignalType; ///< Visibility changed signal type + typedef Signal< void (Window, EffectState, EffectType) > TransitionEffectEventSignalType; ///< Effect signal type and state +typedef Signal< void () > KeyboardRepeatSettingsChangedSignalType; ///< Keyboard repeat settings changed 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. + * @brief Creates an initialized handle to a new Window. * - * @param[in] window The window instance - * @param[in] positionSize The new window position and size + * @param[in] surface Can be a window or pixmap. + * @param[in] windowPosition The position and size of the Window + * @param[in] name The Window title + * @param[in] isTransparent Whether Window is transparent + * @return A new window + * @note This creates an extra window in addition to the default main window +*/ +DALI_ADAPTOR_API Window New(Any surface, PositionSize windowPosition, const std::string& name, bool isTransparent = false); + +/** + * @brief Creates an initialized handle to a new Window. + * + * @param[in] surface Can be a window or pixmap. + * @param[in] windowPosition The position and size of the Window + * @param[in] name The Window title + * @param[in] className The Window class name + * @param[in] isTransparent Whether Window is transparent + * @note This creates an extra window in addition to the default main window + * @return A new Window */ -DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize ); +DALI_ADAPTOR_API Window New(Any surface, PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent = false); /** - * @brief Retrieves the list of render-tasks in the window. + * @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. * * @param[in] window The window instance - * @return A valid handle to a RenderTaskList + * @param[in] positionSize The new window position and size */ -DALI_ADAPTOR_API Dali::RenderTaskList GetRenderTaskList( Window window ); +DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize ); /** * @brief Retrieve the window that the given actor is added to. @@ -93,46 +118,28 @@ DALI_ADAPTOR_API Window Get( Actor actor ); DALI_ADAPTOR_API EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window ); /** - * @brief This signal is emitted when key event is received. + * @brief This signal is emitted when wheel event is received. * * A callback of the following type may be connected: * @code - * void YourCallbackName(const KeyEvent& event); + * void YourCallbackName(const WheelEvent& event); * @endcode * @param[in] window The window instance * @return The signal to connect to */ -DALI_ADAPTOR_API KeyEventSignalType& KeyEventSignal( 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). - * - * 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 - * - * @param[in] window The window instance - * @return The touch signal to connect to - * @note Motion events are not emitted. - */ -DALI_ADAPTOR_API TouchSignalType& TouchSignal( Window window ); +DALI_ADAPTOR_API WheelEventSignalType& WheelEventSignal( Window window ); /** - * @brief This signal is emitted when wheel event is received. + * @brief This signal is emitted when the window is shown or hidden. * * A callback of the following type may be connected: * @code - * void YourCallbackName(const WheelEvent& event); + * void YourCallbackName( Window window, bool visible ); * @endcode * @param[in] window The window instance * @return The signal to connect to */ -DALI_ADAPTOR_API WheelEventSignalType& WheelEventSignal( Window window ); +DALI_ADAPTOR_API VisibilityChangedSignalType& VisibilityChangedSignal( Window window ); /** * @brief This signal is emitted for transition effect. @@ -150,6 +157,14 @@ DALI_ADAPTOR_API WheelEventSignalType& WheelEventSignal( Window window ); DALI_ADAPTOR_API TransitionEffectEventSignalType& TransitionEffectEventSignal( Window window ); /** + * @brief This signal is emitted just after the keyboard repeat setting is changed globally. + * + * @param[in] window The window instance + * @return The signal to connect to + */ +DALI_ADAPTOR_API KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal( Window window ); + +/** * @brief Sets parent window of the window. * * After setting that, these windows do together when raise-up, lower and iconified/deiconified. @@ -186,6 +201,75 @@ DALI_ADAPTOR_API Window GetParent( Window window ); */ DALI_ADAPTOR_API Window DownCast( BaseHandle handle ); +/** + * @brief Gets current orientation of the window. + * + * @param[in] window The window instance + * @return The current window orientation if previously set, or none + */ +DALI_ADAPTOR_API Dali::Window::WindowOrientation GetCurrentOrientation( Window window ); + +/** + * @brief Sets available orientations of the window. + * + * This API is for setting several orientations one time. + * + * @param[in] window The window instance + * @param[in] orientations The available orientation list to add + */ +DALI_ADAPTOR_API void SetAvailableOrientations( Window window, const Dali::Vector& orientations ); + +/** + * @brief Gets current window ID. + * + * @param[in] window The window instance + */ +DALI_ADAPTOR_API int32_t GetNativeId( Window window ); + +/** + * @brief Sets damaged areas of the window. + * + * This API is for setting static damaged areas of the window for partial update. + * + * @param[in] window The window instance + * @param[in] areas The damaged areas list to set + */ +DALI_ADAPTOR_API void SetDamagedAreas(Window window, std::vector>& areas); + +/** + * @brief Adds a callback that is called when the frame rendering is done by the graphics driver. + * + * @param[in] window The window instance + * @param[in] callback The function to call + * @param[in] frameId The Id to specify the frame. It will be passed when the callback is called. + * + * @note A callback of the following type may be used: + * @code + * void MyFunction( int frameId ); + * @endcode + * This callback will be deleted once it is called. + * + * @note Ownership of the callback is passed onto this class. + */ +DALI_ADAPTOR_API void AddFrameRenderedCallback( Window window, std::unique_ptr< CallbackBase > callback, int32_t frameId ); + +/** + * @brief Adds a callback that is called when the frame is displayed on the display. + * + * @param[in] window The window instance + * @param[in] callback The function to call + * @param[in] frameId The Id to specify the frame. It will be passed when the callback is called. + * + * @note A callback of the following type may be used: + * @code + * void MyFunction( int frameId ); + * @endcode + * This callback will be deleted once it is called. + * + * @note Ownership of the callback is passed onto this class. + */ +DALI_ADAPTOR_API void AddFramePresentedCallback( Window window, std::unique_ptr< CallbackBase > callback, int32_t frameId ); + } // namespace DevelWindow } // namespace Dali