Add widget_viewer_dali
[platform/core/uifw/widget-viewer-dali.git] / public_api / widget_view_manager / widget_view_manager.h
1 #ifndef __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__
2 #define __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__
3
4 /*
5  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <public_api/widget_view/widget_view.h>
23
24 // EXTERNAL INCLUDES
25 #include <dali/public-api/object/base-handle.h>
26 #include <dali/public-api/adaptor-framework/application.h>
27
28 namespace Dali
29 {
30
31 namespace WidgetView
32 {
33
34 namespace Internal DALI_INTERNAL
35 {
36 class WidgetViewManager;
37 }
38
39 /**
40  * @addtogroup dali_widget_view
41  * @{
42  */
43
44 /**
45  * @brief WidgetViewManager manages addition of WidgetView controls.
46  *
47  * This class provides the functionality of adding the widget views and controlling the widgets.
48  *
49  * @since_tizen 3.0
50  */
51 class DALI_IMPORT_API WidgetViewManager : public BaseHandle
52 {
53 public:
54
55   /**
56    * @brief Create widget view manager.
57    *
58    * @since_tizen 3.0
59    * @param[in] application Application class for the widget view manager.
60    * @param[in] name Widget view manager name. It is used for socket name internally.
61    * @return A handle to WidgetViewManager.
62    */
63   static WidgetViewManager New( Application application, const std::string& name );
64
65   /**
66    * @brief Downcast a handle to WidgetViewManager handle.
67    *
68    * If the BaseHandle points is a WidgetViewManager the downcast returns a valid handle.
69    * If not the returned handle is left empty.
70    *
71    * @since_tizen 3.0
72    * @param[in] handle Handle to an object
73    * @return handle to a WidgetViewManager or an empty handle
74    */
75   static WidgetViewManager DownCast( BaseHandle handle );
76
77   /**
78    * @brief Creates an WidgetViewManager handle.
79    *
80    * Calling member functions with an uninitialised handle is not allowed.
81    * @since_tizen 3.0
82    */
83   WidgetViewManager();
84
85   /**
86    * @brief Copy constructor.
87    *
88    * @since_tizen 3.0
89    * @param[in] handle The handle to copy from.
90    */
91   WidgetViewManager( const WidgetViewManager& handle );
92
93   /**
94    * @brief Assignment operator.
95    *
96    * @since_tizen 3.0
97    * @param[in] handle The handle to copy from.
98    * @return A reference to this.
99    */
100   WidgetViewManager& operator=( const WidgetViewManager& handle );
101
102   /**
103    * @brief Destructor
104    *
105    * This is non-virtual since derived Handle types must not contain data or virtual methods.
106    * @since_tizen 3.0
107    */
108   ~WidgetViewManager();
109
110   /**
111    * @brief Creates a new widget view object
112    *
113    * @since_tizen 3.0
114    * @param[in] widgetId The widget id.
115    * @param[in] contentInfo Contents that will be given to the widget instance.
116    * @param[in] width The widget width.
117    * @param[in] height The widget height.
118    * @param[in] period The period of updating contents of the widget.
119    * @return A handle to WidgetView.
120    */
121   WidgetView AddWidget( const std::string& widgetId, const std::string& contentInfo, int width, int height, double period );
122
123 public: // Not intended for application developers
124
125   /**
126    * @brief Creates a handle using the WidgetView::Internal implementation.
127    *
128    * @since_tizen 3.0
129    * @param[in] implementation The WidgetViewManager implementation.
130    */
131   explicit DALI_INTERNAL WidgetViewManager( Internal::WidgetViewManager* implementation );
132 };
133
134 /**
135  * @}
136  */
137
138 } // namespace WidgetView
139
140 } // namespace Dali
141
142 #endif // __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__