1 #ifndef __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__
2 #define __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__
6 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
12 * http://floralicense.org/license/
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.
22 #include <public_api/widget_view/widget_view.h>
25 #include <dali/public-api/object/base-handle.h>
26 #include <dali/public-api/adaptor-framework/application.h>
34 namespace Internal DALI_INTERNAL
36 class WidgetViewManager;
40 * @addtogroup dali_widget_view
45 * @brief WidgetViewManager manages addition of WidgetView controls.
47 * This class provides the functionality of adding the widget views and controlling the widgets.
51 class DALI_IMPORT_API WidgetViewManager : public BaseHandle
56 * @brief Create widget view manager.
60 * @privilege %http://tizen.org/privilege/widget.viewer
61 * @param[in] application Application class for the widget view manager.
62 * @param[in] name Widget view manager name. It is used for socket name internally.
63 * @return A handle to WidgetViewManager.
65 static WidgetViewManager New( Application application, const std::string& name );
68 * @brief Downcast a handle to WidgetViewManager handle.
70 * If the BaseHandle points is a WidgetViewManager the downcast returns a valid handle.
71 * If not the returned handle is left empty.
74 * @param[in] handle Handle to an object
75 * @return handle to a WidgetViewManager or an empty handle
77 static WidgetViewManager DownCast( BaseHandle handle );
80 * @brief Creates an WidgetViewManager handle.
82 * Calling member functions with an uninitialised handle is not allowed.
88 * @brief Copy constructor.
91 * @param[in] handle The handle to copy from.
93 WidgetViewManager( const WidgetViewManager& handle );
96 * @brief Assignment operator.
99 * @param[in] handle The handle to copy from.
100 * @return A reference to this.
102 WidgetViewManager& operator=( const WidgetViewManager& handle );
107 * This is non-virtual since derived Handle types must not contain data or virtual methods.
110 ~WidgetViewManager();
113 * @brief Creates a new widget view object
117 * @privilege %http://tizen.org/privilege/widget.viewer
118 * @param[in] widgetId The widget id.
119 * @param[in] contentInfo Contents that will be given to the widget instance.
120 * @param[in] width The widget width.
121 * @param[in] height The widget height.
122 * @param[in] updatePeriod The period of updating contents of the widget.
123 * @return A handle to WidgetView.
125 WidgetView AddWidget( const std::string& widgetId, const std::string& contentInfo, int width, int height, double updatePeriod );
127 public: // Not intended for application developers
130 * @brief Creates a handle using the WidgetView::Internal implementation.
133 * @param[in] implementation The WidgetViewManager implementation.
135 explicit DALI_INTERNAL WidgetViewManager( Internal::WidgetViewManager* implementation );
142 } // namespace WidgetView
146 #endif // __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__