X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fadaptor-framework%2Fwindow.h;h=ec618fb447e356655fda9979f68c15b88fe14f56;hb=5c7e16531bdda2b385a4a149999f5a9a9e0fd6c1;hp=c127f61794f6a276834812aa4e98f4643715b5e1;hpb=ad4fa5ecd30980755d71c8dc1e3f17e61fb14516;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/public-api/adaptor-framework/window.h b/dali/public-api/adaptor-framework/window.h old mode 100755 new mode 100644 index c127f61..ec618fb --- a/dali/public-api/adaptor-framework/window.h +++ b/dali/public-api/adaptor-framework/window.h @@ -2,7 +2,7 @@ #define DALI_WINDOW_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. @@ -55,6 +55,9 @@ class DragAndDropDetector; class Orientation; class Actor; class Layer; +class RenderTaskList; +class TouchEvent; +class KeyEvent; /** * @brief The window class is used internally for drawing. @@ -67,14 +70,14 @@ class DALI_ADAPTOR_API Window : public BaseHandle { public: - typedef Uint16Pair WindowSize; ///< Window size type @SINCE_1_2.60 - typedef Uint16Pair WindowPosition; ///< Window position type @SINCE_1_2.60 + using WindowSize = Uint16Pair ; ///< Window size type @SINCE_1_2.60 + using WindowPosition = Uint16Pair; ///< Window position type @SINCE_1_2.60 + + using FocusChangeSignalType = Signal< void (Window,bool) >; ///< Window focus signal type @SINCE_1_4.35 + using ResizeSignalType = Signal< void (Window,WindowSize) >; ///< Window resized signal type @SINCE_1_4.35 + using KeyEventSignalType = Signal< void (const KeyEvent&) >; ///< Key event signal type @SINCE_1_9.21 + using TouchEventSignalType = Signal< void (const TouchEvent&) >; ///< Touch signal type @SINCE_1_9.28 - typedef Signal< void (bool) > IndicatorSignalType; ///< @DEPRECATED_1_4.9 @brief Indicator state signal type @SINCE_1_0.0 - typedef Signal< void (bool) > FocusSignalType; ///< @DEPRECATED_1_4.35 @brief Window focus signal type @SINCE_1_2.60 - typedef Signal< void (WindowSize) > ResizedSignalType; ///< @DEPRECATED_1_4.35 @brief Window resized signal type @SINCE_1_2.60 - typedef Signal< void (Window,bool) > FocusChangeSignalType; ///< Window focus signal type @SINCE_1_4.35 - typedef Signal< void (Window,WindowSize) > ResizeSignalType; ///< Window resized signal type @SINCE_1_4.35 public: // Enumerations @@ -96,30 +99,6 @@ public: }; /** - * @DEPRECATED_1_4.9 - * @brief Enumeration for opacity of the indicator. - * @SINCE_1_0.0 - */ - enum IndicatorBgOpacity - { - OPAQUE = 100, ///< @DEPRECATED_1_4.9 @brief Fully opaque indicator Bg @SINCE_1_0.0 - TRANSLUCENT = 50, ///< @DEPRECATED_1_4.9 @brief Semi translucent indicator Bg @SINCE_1_0.0 - TRANSPARENT = 0 ///< @DEPRECATED_1_4.9 @brief Fully transparent indicator Bg @SINCE_1_0.0 - }; - - /** - * @DEPRECATED_1_4.9 - * @brief Enumeration for visible mode of the indicator. - * @SINCE_1_0.0 - */ - enum IndicatorVisibleMode - { - INVISIBLE = 0, ///< @DEPRECATED_1_4.9 @brief Hide indicator @SINCE_1_0.0 - VISIBLE = 1, ///< @DEPRECATED_1_4.9 @brief Show indicator @SINCE_1_0.0 - AUTO = 2 ///< @DEPRECATED_1_4.9 @brief Hide in default, will show when necessary @SINCE_1_0.0 - }; - - /** * @brief An enum of Window types. * @SINCE_1_2.60 */ @@ -230,6 +209,23 @@ public: Window& operator=(const Window& rhs); /** + * @brief Move constructor. + * + * @SINCE_1_9.24 + * @param[in] rhs A reference to the moved handle + */ + Window( Window&& rhs ); + + /** + * @brief Move assignment operator. + * + * @SINCE_1_9.24 + * @param[in] rhs A reference to the moved handle + * @return A reference to this handle + */ + Window& operator=( Window&& rhs ); + + /** * @brief Adds a child Actor to the Window. * * The child will be referenced. @@ -297,30 +293,12 @@ public: Layer GetLayer( uint32_t depth ) const; /** - * @DEPRECATED_1_4.9 - * @brief This sets whether the indicator bar should be shown or not. - * @SINCE_1_0.0 - * @param[in] visibleMode Visible mode for indicator bar, VISIBLE in default - */ - void ShowIndicator( IndicatorVisibleMode visibleMode ) DALI_DEPRECATED_API; - - /** - * @DEPRECATED_1_4.9 - * @brief This sets the opacity mode of indicator bar. - * @SINCE_1_0.0 - * @param[in] opacity The opacity mode - */ - void SetIndicatorBgOpacity( IndicatorBgOpacity opacity ) DALI_DEPRECATED_API; - - /** - * @DEPRECATED_1_4.9 - * @brief This sets the orientation of indicator bar. + * @brief Retrieves the DPI of the window. * - * It does not implicitly show the indicator if it is currently hidden. - * @SINCE_1_0.0 - * @param[in] orientation The orientation + * @SINCE_1_9.21 + * @return The DPI of the window */ - void RotateIndicator(WindowOrientation orientation) DALI_DEPRECATED_API; + Uint16Pair GetDpi() const; /** * @brief Sets the window name and class string. @@ -380,15 +358,6 @@ public: WindowOrientation GetPreferredOrientation(); /** - * @DEPRECATED_1_4.19 Was not intended for Application developers - * @brief Returns an empty handle. - * @note Not intended for application developers. - * @SINCE_1_0.0 - * @return An empty handle - */ - DragAndDropDetector GetDragAndDropDetector() const DALI_DEPRECATED_API; - - /** * @brief Gets the native handle of the window. * * When users call this function, it wraps the actual type used by the underlying window system. @@ -637,73 +606,77 @@ public: */ void SetTransparency( bool transparent ); -public: // Signals /** - * @DEPRECATED_1_4.9 - * @brief The user should connect to this signal to get a timing when indicator was shown / hidden. - * @SINCE_1_0.0 - * @return The signal to connect to + * @brief Retrieves the list of render-tasks in the window. + * + * @SINCE_1_9.21 + * @return A valid handle to a RenderTaskList */ - IndicatorSignalType& IndicatorVisibilityChangedSignal() DALI_DEPRECATED_API; + RenderTaskList GetRenderTaskList(); + +public: // Signals /** - * @DEPRECATED_1_4.35 * @brief The user should connect to this signal to get a timing when window gains focus or loses focus. * * A callback of the following type may be connected: * @code - * void YourCallbackName( bool focusIn ); + * void YourCallbackName( Window window, bool focusIn ); * @endcode * The parameter is true if window gains focus, otherwise false. + * and window means this signal was called from what window * - * @SINCE_1_2.60 + * @SINCE_1_4.35 * @return The signal to connect to */ - FocusSignalType& FocusChangedSignal() DALI_DEPRECATED_API; + FocusChangeSignalType& FocusChangeSignal(); /** * @brief This signal is emitted when the window is resized. * * A callback of the following type may be connected: * @code - * void YourCallbackName( int width, int height ); + * void YourCallbackName( Window window, int width, int height ); * @endcode * The parameters are the resized width and height. + * and window means this signal was called from what window * - * @SINCE_1_2.60 + * @SINCE_1_4.35 * @return The signal to connect to */ - ResizedSignalType& ResizedSignal() DALI_DEPRECATED_API; + ResizeSignalType& ResizeSignal(); /** - * @brief The user should connect to this signal to get a timing when window gains focus or loses focus. + * @brief This signal is emitted when key event is received. * * A callback of the following type may be connected: * @code - * void YourCallbackName( Window window, bool focusIn ); + * void YourCallbackName(const KeyEvent& event); * @endcode - * The parameter is true if window gains focus, otherwise false. - * and window means this signal was called from what window * - * @SINCE_1_4.35 + * @SINCE_1_9.21 * @return The signal to connect to */ - FocusChangeSignalType& FocusChangeSignal(); + KeyEventSignalType& KeyEventSignal(); /** - * @brief This signal is emitted when the window is resized. + * @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( Window window, int width, int height ); + * void YourCallbackName(const TouchEvent& event); * @endcode - * The parameters are the resized width and height. - * and window means this signal was called from what window * - * @SINCE_1_4.35 - * @return The signal to connect to + * @SINCE_1_9.28 + * @return The touch signal to connect to + * + * @note Motion events are not emitted. */ - ResizeSignalType& ResizeSignal(); + TouchEventSignalType& TouchedSignal(); public: // Not intended for application developers /// @cond internal