2 * Copyright (c) 2017 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>
33 WidgetPtr Widget::New()
45 if( mImpl != nullptr )
51 void Widget::OnCreate( const std::string& contentInfo, Dali::Window window )
55 void Widget::OnTerminate( const std::string& contentInfo, Dali::Widget::Termination type )
59 void Widget::OnPause()
63 void Widget::OnResume()
67 void Widget::OnResize( Dali::Window window )
71 void Widget::OnUpdate( const std::string& contentInfo, int force )
75 void Widget::SignalConnected( SlotObserver* slotObserver, CallbackBase* callback )
77 mImpl->SignalConnected( slotObserver, callback );
80 void Widget::SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback )
82 mImpl->SignalDisconnected( slotObserver, callback );
85 void Widget::SetContentInfo( const std::string& contentInfo )
87 if( mImpl != nullptr )
89 mImpl->SetContentInfo( contentInfo );
93 void Widget::SetImpl( Impl* impl )
98 Internal::Adaptor::Widget& GetImplementation(Dali::Widget& widget)
100 DALI_ASSERT_ALWAYS(widget && "widget handle is empty");
102 BaseObject& handle = widget.GetBaseObject();
104 return static_cast<Internal::Adaptor::Widget&>(handle);
107 const Internal::Adaptor::Widget& GetImplementation(const Dali::Widget& widget)
109 const BaseObject& handle = widget.GetBaseObject();
111 return static_cast<const Internal::Adaptor::Widget&>(handle);