Add widget_viewer_dali
[platform/core/uifw/widget-viewer-dali.git] / public_api / widget_view / widget_view.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/widget_view.h>
20
21 // INTERNAL INCLUDES
22 #include <internal/widget_view/widget_view_impl.h>
23
24 namespace Dali
25 {
26
27 namespace WidgetView
28 {
29
30 WidgetView WidgetView::New( const std::string& widgetId, const std::string& contentInfo, int width, int height, double period )
31 {
32   return Internal::WidgetView::New( widgetId, contentInfo, width, height, period );
33 }
34
35 WidgetView WidgetView::DownCast( BaseHandle handle )
36 {
37   return Toolkit::Control::DownCast<WidgetView, Internal::WidgetView>( handle );
38 }
39
40 WidgetView::WidgetView()
41 {
42 }
43
44 WidgetView::WidgetView( const WidgetView& handle )
45 : Toolkit::Control( handle )
46 {
47 }
48
49 WidgetView& WidgetView::operator=( const WidgetView& handle )
50 {
51   if( &handle != this )
52   {
53     Control::operator=( handle );
54   }
55   return *this;
56 }
57
58 WidgetView::~WidgetView()
59 {
60 }
61
62 const std::string& WidgetView::GetWidgetId() const
63 {
64   return Dali::WidgetView::GetImplementation( *this ).GetWidgetId();
65 }
66
67 const std::string& WidgetView::GetInstanceId() const
68 {
69   return Dali::WidgetView::GetImplementation( *this ).GetInstanceId();
70 }
71
72 const std::string& WidgetView::GetContentInfo() const
73 {
74   return Dali::WidgetView::GetImplementation( *this ).GetContentInfo();
75 }
76
77 const std::string& WidgetView::GetTitle() const
78 {
79   return Dali::WidgetView::GetImplementation( *this ).GetTitle();
80 }
81
82 double WidgetView::GetPeriod() const
83 {
84   return Dali::WidgetView::GetImplementation( *this ).GetPeriod();
85 }
86
87 void WidgetView::ActivateFaultedWidget()
88 {
89   return Dali::WidgetView::GetImplementation( *this ).ActivateFaultedWidget();
90 }
91
92 bool WidgetView::IsWidgetFaulted()
93 {
94   return Dali::WidgetView::GetImplementation( *this ).IsWidgetFaulted();
95 }
96
97 void WidgetView::SetPermanentDelete( bool permanentDelete )
98 {
99   return Dali::WidgetView::GetImplementation( *this ).SetPermanentDelete( permanentDelete );
100 }
101
102 WidgetView::WidgetViewSignalType& WidgetView::WidgetAddedSignal()
103 {
104   return Dali::WidgetView::GetImplementation(*this).WidgetAddedSignal();
105 }
106
107 WidgetView::WidgetViewSignalType& WidgetView::WidgetDeletedSignal()
108 {
109   return Dali::WidgetView::GetImplementation(*this).WidgetDeletedSignal();
110 }
111
112 WidgetView::WidgetView( Internal::WidgetView& implementation )
113 : Control( implementation )
114 {
115 }
116
117 WidgetView::WidgetView( Dali::Internal::CustomActor* internal )
118 : Control( internal )
119 {
120   VerifyCustomActorPointer<Internal::WidgetView>( internal );
121 }
122
123 } // namespace WidgetView
124
125 } // namespace Dali