1 #ifndef __DALI_WIDGET_VIEW_INTERNAL_WIDGET_VIEW_MANAGER_H__
2 #define __DALI_WIDGET_VIEW_INTERNAL_WIDGET_VIEW_MANAGER_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_manager/widget_view_manager.h>
25 #include <dali/public-api/object/base-object.h>
26 #include <pepper-dali/public-api/compositor/compositor.h>
38 class WidgetViewManager;
39 typedef IntrusivePtr<WidgetViewManager> WidgetViewManagerPtr;
41 class WidgetViewManager : public BaseObject, public ConnectionTracker
46 * @copydoc Dali::WidgetView::WidgetViewManager::New()
48 static WidgetViewManagerPtr New( Application application, const std::string& name );
51 * @copydoc Dali::WidgetView::WidgetViewManager::AddWidget()
53 Dali::WidgetView::WidgetView AddWidget( const std::string& widgetId, const std::string& contentInfo, int width, int height, double period );
58 * Construct a new WidgetViewManager.
63 * A reference counted object may only be deleted by calling Unreference()
65 virtual ~WidgetViewManager();
68 * Initialize the WidgetViewManager
70 int Initialize( Application application, const std::string& name );
72 void OnObjectViewAdded( Pepper::Compositor compositor, Pepper::ObjectView objectView );
73 void OnObjectViewDeleted( Pepper::Compositor compositor, Pepper::ObjectView objectView );
78 WidgetViewManager( const WidgetViewManager& );
81 WidgetViewManager& operator= ( const WidgetViewManager& );
85 Pepper::Compositor mCompositor;
87 typedef std::map<std::string, Dali::WidgetView::WidgetView> WidgetViewContainer;
88 typedef WidgetViewContainer::iterator WidgetViewIter;
90 WidgetViewContainer mWidgetViewContainer;
93 } // namespace Internal
95 // Helpers for public-api forwarding methods
97 inline Internal::WidgetViewManager& GetImplementation( WidgetViewManager& obj )
99 DALI_ASSERT_ALWAYS( obj );
101 Dali::BaseObject& handle = obj.GetBaseObject();
103 return static_cast<Internal::WidgetViewManager&>( handle );
106 inline const Internal::WidgetViewManager& GetImplementation( const WidgetViewManager& obj )
108 DALI_ASSERT_ALWAYS( obj );
110 const Dali::BaseObject& handle = obj.GetBaseObject();
112 return static_cast<const Internal::WidgetViewManager&>( handle );
115 } // namespace WidgetView
119 #endif // __DALI_WIDGET_VIEW_INTERNAL_WIDGET_VIEW_MANAGER_H__