[widget-viewer-dali] Change the license as Flora
[platform/core/uifw/widget-viewer-dali.git] / public_api / widget_view / widget_view.h
index 5a201a0..b6cbc51 100644 (file)
@@ -2,20 +2,20 @@
 #define __DALI_WIDGET_VIEW_WIDGET_VIEW_H__
 
 /*
+ * Samsung API
  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Flora License, Version 1.1 (the License);
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://floralicense.org/license/
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
+ * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- *
  */
 
 // EXTERNAL INCLUDES
@@ -57,10 +57,10 @@ public:
    * @param[in] contentInfo Contents that will be given to the widget instance.
    * @param[in] width The widget width.
    * @param[in] height The widget height.
-   * @param[in] period The period of updating contents of the widget.
+   * @param[in] updatePeriod The period of updating contents of the widget.
    * @return A handle to WidgetView.
    */
-  static WidgetView New( const std::string& widgetId, const std::string& contentInfo, int width, int height, double period );
+  static WidgetView New( const std::string& widgetId, const std::string& contentInfo, int width, int height, double updatePeriod );
 
   /**
    * @brief Downcast a handle to WidgetView handle.
@@ -106,6 +106,26 @@ public:
   ~WidgetView();
 
   /**
+   * @brief Pauses a given widget.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return true on success, false otherwise.
+   */
+  bool PauseWidget();
+
+  /**
+   * @brief Resume a given widget.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return true on success, false otherwise.
+   */
+  bool ResumeWidget();
+
+  /**
    * @brief Get the id of the widget.
    *
    * @since_tizen 3.0
@@ -148,14 +168,46 @@ public:
   const std::string& GetTitle();
 
   /**
-   * @brief Get the update period of the widget.
+   * @brief Get the update period of the widget content.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return The update period of the widget content.
+   */
+  double GetUpdatePeriod() const;
+
+  /**
+   * @brief Shows the widget.
    *
    * @since_tizen 3.0
    * @privlevel public
    * @privilege %http://tizen.org/privilege/widget.viewer
-   * @return The update period of the widget.
+   * @note Use this function instead of Dali::Actor::SetVisible() to restart updating widget content.
    */
-  double GetPeriod() const;
+  void Show();
+
+  /**
+   * @brief Hides the widget.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @note Use this function instead of Dali::Actor::SetVisible() to stop updating widget content.
+   */
+  void Hide();
+
+  /**
+   * @brief Cancels touch event procedure.
+   * If you call this function after feed the touch down event, the widget will get ON_HOLD events.
+   * If a widget gets ON_HOLD event, it will not do anything even if you feed touch up event.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return true on success, false otherwise.
+   */
+  bool CancelTouchEvent();
 
   /**
    * @brief Sets whether to enable or disable the preview of the widget
@@ -235,6 +287,8 @@ public: //Signals
    * @brief This signal is emitted when the widget is added.
    *
    * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
    * @return The signal to connect to.
    */
   WidgetViewSignalType& WidgetAddedSignal();
@@ -243,10 +297,72 @@ public: //Signals
    * @brief This signal is emitted when the widget is deleted.
    *
    * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
    * @return The signal to connect to.
    */
   WidgetViewSignalType& WidgetDeletedSignal();
 
+  /**
+   * @brief This signal is emitted when the widget creation is aborted.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return The signal to connect to.
+   */
+  WidgetViewSignalType& WidgetCreationAbortedSignal();
+
+  /**
+   * @brief This signal is emitted when the widget is resized.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return The signal to connect to.
+   */
+  WidgetViewSignalType& WidgetResizedSignal();
+
+  /**
+   * @brief This signal is emitted when the widget content is updated.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return The signal to connect to.
+   */
+  WidgetViewSignalType& WidgetContentUpdatedSignal();
+
+  /**
+   * @brief This signal is emitted when the widget extra info is updated.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return The signal to connect to.
+   */
+  WidgetViewSignalType& WidgetExtraInfoUpdatedSignal();
+
+  /**
+   * @brief This signal is emitted when the widget update period is changed.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return The signal to connect to.
+   */
+  WidgetViewSignalType& WidgetUpdatePeriodChangedSignal();
+
+  /**
+   * @brief This signal is emitted when the widget process is not running.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return The signal to connect to.
+   */
+  WidgetViewSignalType& WidgetFaultedSignal();
+
 public: // Not intended for application developers
 
   /**