Add to set Available Orientations
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / window-devel.h
index 53e06d6..9418282 100644 (file)
@@ -30,17 +30,38 @@ class RenderTaskList;
 
 namespace DevelWindow
 {
+/**
+ * @brief Enumeration for transition effect's state.
+ */
+enum class EffectState
+{
+  NONE = 0,    ///< None state
+  START,       ///< Transition effect is started.
+  END          ///< Transition effect is ended.
+};
+
+/**
+ * @brief Enumeration for transition effect's type.
+ */
+enum class  EffectType
+{
+  NONE = 0,    ///< None type
+  SHOW,        ///< Window show effect.
+  HIDE,        ///< Window hide effect.
+};
 
 typedef Signal< void () > EventProcessingFinishedSignalType;       ///< Event Processing finished signal type
 
 typedef Signal< void (const KeyEvent&) > KeyEventSignalType;       ///< Key event signal type
 
-typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType;       ///< Key event generated signal type
-
 typedef Signal< void (const TouchData&) > TouchSignalType;         ///< 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
+
 /**
  * @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.
  *
@@ -86,18 +107,6 @@ DALI_ADAPTOR_API EventProcessingFinishedSignalType& EventProcessingFinishedSigna
 DALI_ADAPTOR_API KeyEventSignalType& KeyEventSignal( Window window );
 
 /**
- * @brief This signal is emitted when key event is received.
- *
- * A callback of the following type may be connected:
- * @code
- *   bool YourCallbackName(const KeyEvent& event);
- * @endcode
- * @param[in] window The window instance
- * @return The signal to connect to
- */
-DALI_ADAPTOR_API KeyEventGeneratedSignalType& KeyEventGeneratedSignal( 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).
  *
@@ -128,9 +137,38 @@ DALI_ADAPTOR_API TouchSignalType& TouchSignal( Window window );
 DALI_ADAPTOR_API WheelEventSignalType& WheelEventSignal( Window window );
 
 /**
+ * @brief This signal is emitted when the window is shown or hidden.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Window window, bool visible );
+ * @endcode
+ * @param[in] window The window instance
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API VisibilityChangedSignalType& VisibilityChangedSignal( Window window );
+
+/**
+ * @brief This signal is emitted for transition effect.
+ *
+ * The transition animation is appeared when the window is shown/hidden.
+ * When the animation is started, START signal is emitted.
+ * Then the animation is ended, END signal is emitted, too.
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Window window, EffectState state, EffectType type );
+ * @endcode
+ * @param[in] window The window instance
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API TransitionEffectEventSignalType& TransitionEffectEventSignal( Window window );
+
+/**
  * @brief Sets parent window of the window.
  *
  * After setting that, these windows do together when raise-up, lower and iconified/deiconified.
+ * Initially, the window is located on top of the parent. The window can go below parent by calling Lower().
+ * If parent's window stack is changed by calling Raise() or Lower(), child windows are located on top of the parent again.
  *
  * @param[in] window The window instance
  * @param[in] parent The parent window instance
@@ -154,6 +192,32 @@ DALI_ADAPTOR_API void Unparent( Window window );
  */
 DALI_ADAPTOR_API Window GetParent( Window window );
 
+/**
+ * @brief Downcast sceneHolder to window
+ *
+ * @param[in] handle The handle need to downcast
+ * @return The window cast from SceneHolder
+ */
+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<Dali::Window::WindowOrientation>& orientations );
+
 } // namespace DevelWindow
 
 } // namespace Dali