2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include "widget-impl.h"
22 #include <dali/internal/system/common/widget-controller.h>
30 WidgetPtr Widget::New()
48 void Widget::OnCreate(const std::string& contentInfo, Dali::Window window)
52 void Widget::OnTerminate(const std::string& contentInfo, Dali::Widget::Termination type)
56 void Widget::OnPause()
60 void Widget::OnResume()
64 void Widget::OnResize(Dali::Window window)
68 void Widget::OnUpdate(const std::string& contentInfo, int force)
72 void Widget::SignalConnected(SlotObserver* slotObserver, CallbackBase* callback)
74 mImpl->SignalConnected(slotObserver, callback);
77 void Widget::SignalDisconnected(SlotObserver* slotObserver, CallbackBase* callback)
79 mImpl->SignalDisconnected(slotObserver, callback);
82 void Widget::SetContentInfo(const std::string& contentInfo)
86 mImpl->SetContentInfo(contentInfo);
90 void Widget::SetImpl(Impl* impl)
95 Internal::Adaptor::Widget& GetImplementation(Dali::Widget& widget)
97 DALI_ASSERT_ALWAYS(widget && "widget handle is empty");
99 BaseObject& handle = widget.GetBaseObject();
101 return static_cast<Internal::Adaptor::Widget&>(handle);
104 const Internal::Adaptor::Widget& GetImplementation(const Dali::Widget& widget)
106 const BaseObject& handle = widget.GetBaseObject();
108 return static_cast<const Internal::Adaptor::Widget&>(handle);
111 } // namespace Adaptor
113 } // namespace Internal