Revert "Revert "KeyEvent class pimpling""
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / window.h
old mode 100755 (executable)
new mode 100644 (file)
index 421b65d..f53e6d0
@@ -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,12 +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
+  using TouchSignalType = Signal< void (const TouchEvent&) >;   ///< Touch signal type
 
-  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
@@ -204,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.
@@ -271,6 +293,14 @@ public:
   Layer GetLayer( uint32_t depth ) const;
 
   /**
+   * @brief Retrieves the DPI of the window.
+   *
+   * @SINCE_1_9.21
+   * @return The DPI of the window
+   */
+  Uint16Pair GetDpi() const;
+
+  /**
    * @brief Sets the window name and class string.
    * @SINCE_1_0.0
    * @param[in] name The name of the window
@@ -576,21 +606,15 @@ public:
    */
   void SetTransparency( bool transparent );
 
-public: // Signals
-
   /**
-   * @brief This signal is emitted when the window is resized.
+   * @brief Retrieves the list of render-tasks in the window.
    *
-   * A callback of the following type may be connected:
-   * @code
-   *   void YourCallbackName( int width, int height );
-   * @endcode
-   * The parameters are the resized width and height.
-   *
-   * @SINCE_1_2.60
-   * @return The signal to connect to
+   * @SINCE_1_9.21
+   * @return A valid handle to a RenderTaskList
    */
-  ResizedSignalType& ResizedSignal() DALI_DEPRECATED_API;
+  RenderTaskList GetRenderTaskList();
+
+public: // Signals
 
   /**
    * @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
@@ -622,6 +646,38 @@ public: // Signals
    */
   ResizeSignalType& ResizeSignal();
 
+  /**
+   * @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
+   *
+   * @SINCE_1_9.21
+   * @return The signal to connect to
+   */
+  KeyEventSignalType& KeyEventSignal();
+
+  /**
+   * @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(const TouchEvent& event);
+   * @endcode
+   *
+   * @SINCE_1_9.21
+   * @return The touch signal to connect to
+   *
+   * @note Motion events are not emitted.
+   */
+  TouchSignalType& TouchSignal();
+
 public: // Not intended for application developers
   /// @cond internal
   /**