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