2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (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
9 // http://floralicense.org/license/
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.
18 * @file FUi_EcoreEvasMgr.cpp
19 * @brief This is the implementation file for the _EcoreEvasMgr class.
22 #include <FBaseErrors.h>
23 #include <FBaseSysLog.h>
24 #include "FUi_EcoreEvasMgr.h"
25 #include "FUi_EcoreEvas.h"
27 using namespace Tizen::Ui;
31 _EcoreEvasMgr* __pEcoreEvasMgr = null;
34 namespace Tizen { namespace Ui
37 _EcoreEvasMgr::_EcoreEvasMgr(void)
42 _EcoreEvasMgr::~_EcoreEvasMgr(void)
47 _EcoreEvasMgr::SetEcoreEvas(const _EcoreEvas& ecoreEvas)
49 __pEcoreEvas = &ecoreEvas;
53 _EcoreEvasMgr::GetEcoreEvas(void) const
55 return const_cast<_EcoreEvas*>(__pEcoreEvas);
59 _EcoreEvasMgr::BeginMainLoop(void)
61 ecore_main_loop_begin();
65 _EcoreEvasMgr::EndMainLoop(void)
67 ecore_main_loop_quit();
71 _EcoreEvasMgr::SetRenderBackend(int backend)
73 GetEcoreEvas()->SetRenderBackend((_RenderBackend)backend);
77 _EcoreEvasMgr::GetRenderBackend(void)
79 return GetEcoreEvas()->GetRenderBackend();
83 DestroyEcoreEvasMgr(void)
85 _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr();
89 _EcoreEvas* pEcoreEvas = pEcoreEvasMgr->GetEcoreEvas();
96 delete __pEcoreEvasMgr;
97 __pEcoreEvasMgr = null;
101 GetEcoreEvasMgr(void)
105 return __pEcoreEvasMgr;
108 __pEcoreEvasMgr = new (std::nothrow) _EcoreEvasMgr;
110 return __pEcoreEvasMgr;