00c292be84d4804ae61170e3cf2ffeb23fc32f85
[platform/core/uifw/widget-viewer-dali.git] / public_api / widget_view_manager / widget_view_manager.cpp
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <public_api/widget_view_manager/widget_view_manager.h>
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24 #include <internal/widget_view_manager/widget_view_manager_impl.h>
25
26 namespace Dali
27 {
28
29 namespace WidgetView
30 {
31
32 WidgetViewManager WidgetViewManager::New( Application application, const std::string& name )
33 {
34   Internal::WidgetViewManagerPtr internal = Internal::WidgetViewManager::New( application, name );
35
36   return WidgetViewManager( internal.Get() );
37 }
38
39 WidgetViewManager WidgetViewManager::DownCast( BaseHandle handle )
40 {
41   return WidgetViewManager( dynamic_cast< Internal::WidgetViewManager* >( handle.GetObjectPtr() ) );
42 }
43
44 WidgetViewManager::WidgetViewManager()
45 {
46 }
47
48 WidgetViewManager::WidgetViewManager( const WidgetViewManager& handle )
49 : BaseHandle(handle)
50 {
51 }
52
53 WidgetViewManager& WidgetViewManager::operator=( const WidgetViewManager& handle )
54 {
55   BaseHandle::operator=(handle);
56   return *this;
57 }
58
59 WidgetViewManager::~WidgetViewManager()
60 {
61 }
62
63 WidgetViewManager::WidgetViewManager( Internal::WidgetViewManager* implementation )
64 : BaseHandle( implementation )
65 {
66 }
67
68 WidgetView WidgetViewManager::AddWidget( const std::string& widgetId, const std::string& contentInfo, int width, int height, double updatePeriod )
69 {
70   return GetImplementation(*this).AddWidget( widgetId, contentInfo, width, height, updatePeriod );
71 }
72
73 } // namespace WidgetView
74
75 } // namespace Dali