2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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.
19 * @file FUi_EcoreEvasMgr.cpp
20 * @brief This is the implementation file for the _EcoreEvasMgr class.
24 #include <FBaseErrors.h>
25 #include <FBaseSysLog.h>
26 #include "FUi_EcoreEvasMgr.h"
27 #include "FUi_EcoreEvas.h"
29 using namespace Tizen::Ui;
33 _EcoreEvasMgr* __pEcoreEvasMgr = null;
36 namespace Tizen { namespace Ui
39 _EcoreEvasMgr::_EcoreEvasMgr(void)
44 _EcoreEvasMgr::~_EcoreEvasMgr(void)
49 _EcoreEvasMgr::SetEcoreEvas(const _EcoreEvas& ecoreEvas)
51 __pEcoreEvas = &ecoreEvas;
55 _EcoreEvasMgr::GetEcoreEvas(void) const
57 return const_cast<_EcoreEvas*>(__pEcoreEvas);
61 _EcoreEvasMgr::BeginMainLoop(void)
63 ecore_main_loop_begin();
67 _EcoreEvasMgr::EndMainLoop(void)
69 ecore_main_loop_quit();
73 _EcoreEvasMgr::SetRenderBackend(int backend)
75 GetEcoreEvas()->SetRenderBackend((_RenderBackend)backend);
79 _EcoreEvasMgr::GetRenderBackend(void)
81 return GetEcoreEvas()->GetRenderBackend();
85 DestroyEcoreEvasMgr(void)
87 _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr();
91 _EcoreEvas* pEcoreEvas = pEcoreEvasMgr->GetEcoreEvas();
98 delete __pEcoreEvasMgr;
99 __pEcoreEvasMgr = null;
103 GetEcoreEvasMgr(void)
107 return __pEcoreEvasMgr;
110 __pEcoreEvasMgr = new (std::nothrow) _EcoreEvasMgr;
112 return __pEcoreEvasMgr;