[Tizen]Add KeyEventGeneratedSignal for Get KeyEvent normally
[platform/core/uifw/dali-core.git] / dali / integration-api / scene.h
old mode 100644 (file)
new mode 100755 (executable)
index 092b6c3..4e44caf
@@ -26,11 +26,11 @@ namespace Dali
 {
 
 class Actor;
-class KeyEvent;
+struct KeyEvent;
 class Layer;
 class RenderTaskList;
 class TouchData;
-class WheelEvent;
+struct WheelEvent;
 
 namespace Internal DALI_INTERNAL
 {
@@ -54,6 +54,7 @@ class DALI_CORE_API Scene : public BaseHandle
 public:
   typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Processing finished signal type
   typedef Signal< void (const Dali::KeyEvent&) > KeyEventSignalType; ///< Key event signal type
+  typedef Signal< bool (const Dali::KeyEvent&) > KeyEventGeneratedSignalType; ///< key event generated signal type
   typedef Signal< void (const Dali::TouchData&) > TouchSignalType; ///< Touch signal type
   typedef Signal< void (const Dali::WheelEvent&) > WheelEventSignalType; ///< Touched signal type
 
@@ -114,7 +115,7 @@ public:
    * @pre The actor has been initialized.
    * @pre The actor does not have a parent.
    */
-  void Add(Actor& actor);
+  void Add(Actor actor);
 
   /**
    * @brief Removes a child Actor from the Scene.
@@ -123,7 +124,7 @@ public:
    * @param[in] actor The child
    * @pre The actor has been added to the stage.
    */
-  void Remove(Actor& actor);
+  void Remove(Actor actor);
 
   /**
    * @brief Returns the size of the Scene in pixels as a Vector.
@@ -194,6 +195,12 @@ public:
   Integration::RenderSurface* GetSurface() const;
 
   /**
+   * @brief Retrieve the Scene that the given actor belongs to.
+   * @return The Scene.
+   */
+  static Integration::Scene Get( Actor actor );
+
+  /**
    * This function is called when an event is queued.
    * @param[in] event A event to queue.
    */
@@ -223,6 +230,13 @@ public:
   KeyEventSignalType& KeyEventSignal();
 
   /**
+   * @brief The user would connect to this signal to get a KeyEvent when KeyEvent is generated.
+   *
+   * @return The return is true if KeyEvent is consumed, otherwise false.
+   */
+  KeyEventGeneratedSignalType& KeyEventGeneratedSignal();
+
+  /**
    * @brief This signal is emitted when the screen is touched and when the touch ends
    * (i.e. the down & up touch events only).
    *