1 #ifndef __DALI_WIDGET_VIEW_INTERNAL_WIDGET_VIEW_H__
2 #define __DALI_WIDGET_VIEW_INTERNAL_WIDGET_VIEW_H__
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <public_api/widget_view/widget_view.h>
25 #include <dali-toolkit/public-api/controls/control-impl.h>
26 #include <pepper-dali/public-api/object-view/object-view.h>
38 class WidgetView : public Toolkit::Internal::Control
43 * @copydoc Dali::WidgetView::WidgetView::New
45 static Dali::WidgetView::WidgetView New( const std::string& widgetId, const std::string& contentInfo, int width, int height, double period );
48 * @copydoc Dali::WidgetView::WidgetView::GetWidgetId
50 const std::string& GetWidgetId() const;
53 * @copydoc Dali::WidgetView::WidgetView::GetInstanceId
55 const std::string& GetInstanceId() const;
58 * @copydoc Dali::WidgetView::WidgetView::GetContentInfo
60 const std::string& GetContentInfo() const;
63 * @copydoc Dali::WidgetView::WidgetView::GetTitle
65 const std::string& GetTitle() const;
68 * @copydoc Dali::WidgetView::WidgetView::GetPeriod
70 double GetPeriod() const;
73 * @copydoc Dali::WidgetView::WidgetView::ActivateFaultedWidget
75 void ActivateFaultedWidget();
78 * @copydoc Dali::WidgetView::WidgetView::IsWidgetFaulted
80 bool IsWidgetFaulted();
83 * @copydoc Dali::WidgetView::WidgetView::SetPermanentDelete
85 void SetPermanentDelete( bool permanentDelete );
87 void AddObjectView( Pepper::ObjectView objectView );
88 void RemoveObjectView();
92 Dali::WidgetView::WidgetView::WidgetViewSignalType& WidgetAddedSignal();
93 Dali::WidgetView::WidgetView::WidgetViewSignalType& WidgetDeletedSignal();
98 * Construct a new WidgetView.
103 * Construct a new WidgetView.
105 WidgetView( const std::string& widgetId, const std::string& contentInfo, int width, int height, double period );
108 * A reference counted object may only be deleted by calling Unreference()
110 virtual ~WidgetView();
112 private: // From Control
115 * @copydoc Toolkit::Control::OnInitialize()
117 virtual void OnInitialize();
122 WidgetView( const WidgetView& );
125 WidgetView& operator= ( const WidgetView& );
129 Pepper::ObjectView mObjectView;
131 std::string mWidgetId;
132 std::string mInstanceId;
133 std::string mContentInfo;
143 bool mPermanentDelete;
146 Dali::WidgetView::WidgetView::WidgetViewSignalType mWidgetAddedSignal;
147 Dali::WidgetView::WidgetView::WidgetViewSignalType mWidgetDeletedSignal;
150 } // namespace Internal
152 // Helpers for public-api forwarding methods
154 inline Internal::WidgetView& GetImplementation( WidgetView& widgetView )
156 DALI_ASSERT_ALWAYS( widgetView );
158 Dali::RefObject& handle = widgetView.GetImplementation();
160 return static_cast<Internal::WidgetView&>( handle );
163 inline const Internal::WidgetView& GetImplementation( const WidgetView& widgetView )
165 DALI_ASSERT_ALWAYS( widgetView );
167 const Dali::RefObject& handle = widgetView.GetImplementation();
169 return static_cast<const Internal::WidgetView&>( handle );
172 } // namespace WidgetView
176 #endif // __DALI_WIDGET_VIEW_INTERNAL_WIDGET_VIEW_H__