[widget-viewer-dali] Change the license as Flora
[platform/core/uifw/widget-viewer-dali.git] / public_api / widget_view / widget_view.cpp
1 /*
2  * Samsung API
3  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Flora License, Version 1.1 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://floralicense.org/license/
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
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 updatePeriod )
31 {
32   return Internal::WidgetView::New( widgetId, contentInfo, width, height, updatePeriod );
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 bool WidgetView::PauseWidget()
63 {
64   return Dali::WidgetView::GetImplementation( *this ).PauseWidget();
65 }
66
67 bool WidgetView::ResumeWidget()
68 {
69   return Dali::WidgetView::GetImplementation( *this ).ResumeWidget();
70 }
71
72 const std::string& WidgetView::GetWidgetId() const
73 {
74   return Dali::WidgetView::GetImplementation( *this ).GetWidgetId();
75 }
76
77 const std::string& WidgetView::GetInstanceId() const
78 {
79   return Dali::WidgetView::GetImplementation( *this ).GetInstanceId();
80 }
81
82 const std::string& WidgetView::GetContentInfo()
83 {
84   return Dali::WidgetView::GetImplementation( *this ).GetContentInfo();
85 }
86
87 const std::string& WidgetView::GetTitle()
88 {
89   return Dali::WidgetView::GetImplementation( *this ).GetTitle();
90 }
91
92 double WidgetView::GetUpdatePeriod() const
93 {
94   return Dali::WidgetView::GetImplementation( *this ).GetUpdatePeriod();
95 }
96
97 void WidgetView::Show()
98 {
99   Dali::WidgetView::GetImplementation( *this ).Show();
100 }
101
102 void WidgetView::Hide()
103 {
104   Dali::WidgetView::GetImplementation( *this ).Hide();
105 }
106
107 bool WidgetView::CancelTouchEvent()
108 {
109   return Dali::WidgetView::GetImplementation( *this ).CancelTouchEvent();
110 }
111
112 void WidgetView::SetPreviewEnabled( bool enabled )
113 {
114   Dali::WidgetView::GetImplementation( *this ).SetPreviewEnabled( enabled );
115 }
116
117 bool WidgetView::GetPreviewEnabled() const
118 {
119   return Dali::WidgetView::GetImplementation( *this ).GetPreviewEnabled();
120 }
121
122 void WidgetView::SetStateTextEnabled( bool enabled )
123 {
124   Dali::WidgetView::GetImplementation( *this ).SetStateTextEnabled( enabled );
125 }
126
127 bool WidgetView::GetStateTextEnabled() const
128 {
129   return Dali::WidgetView::GetImplementation( *this ).GetStateTextEnabled();
130 }
131
132 void WidgetView::ActivateFaultedWidget()
133 {
134   return Dali::WidgetView::GetImplementation( *this ).ActivateFaultedWidget();
135 }
136
137 bool WidgetView::IsWidgetFaulted()
138 {
139   return Dali::WidgetView::GetImplementation( *this ).IsWidgetFaulted();
140 }
141
142 void WidgetView::SetPermanentDelete( bool permanentDelete )
143 {
144   return Dali::WidgetView::GetImplementation( *this ).SetPermanentDelete( permanentDelete );
145 }
146
147 WidgetView::WidgetViewSignalType& WidgetView::WidgetAddedSignal()
148 {
149   return Dali::WidgetView::GetImplementation(*this).WidgetAddedSignal();
150 }
151
152 WidgetView::WidgetViewSignalType& WidgetView::WidgetDeletedSignal()
153 {
154   return Dali::WidgetView::GetImplementation(*this).WidgetDeletedSignal();
155 }
156
157 WidgetView::WidgetViewSignalType& WidgetView::WidgetCreationAbortedSignal()
158 {
159   return Dali::WidgetView::GetImplementation(*this).WidgetCreationAbortedSignal();
160 }
161
162 WidgetView::WidgetViewSignalType& WidgetView::WidgetResizedSignal()
163 {
164   return Dali::WidgetView::GetImplementation(*this).WidgetResizedSignal();
165 }
166
167 WidgetView::WidgetViewSignalType& WidgetView::WidgetContentUpdatedSignal()
168 {
169   return Dali::WidgetView::GetImplementation(*this).WidgetContentUpdatedSignal();
170 }
171
172 WidgetView::WidgetViewSignalType& WidgetView::WidgetExtraInfoUpdatedSignal()
173 {
174   return Dali::WidgetView::GetImplementation(*this).WidgetExtraInfoUpdatedSignal();
175 }
176
177 WidgetView::WidgetViewSignalType& WidgetView::WidgetUpdatePeriodChangedSignal()
178 {
179   return Dali::WidgetView::GetImplementation(*this).WidgetUpdatePeriodChangedSignal();
180 }
181
182 WidgetView::WidgetViewSignalType& WidgetView::WidgetFaultedSignal()
183 {
184   return Dali::WidgetView::GetImplementation(*this).WidgetFaultedSignal();
185 }
186
187 WidgetView::WidgetView( Internal::WidgetView& implementation )
188 : Control( implementation )
189 {
190 }
191
192 WidgetView::WidgetView( Dali::Internal::CustomActor* internal )
193 : Control( internal )
194 {
195   VerifyCustomActorPointer<Internal::WidgetView>( internal );
196 }
197
198 } // namespace WidgetView
199
200 } // namespace Dali