Revert "[Tizen] Support custom fonts registration"
[platform/core/uifw/dali-adaptor.git] / plugins / tizen-web-engine-lite.cpp
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 // CLASS HEADER
19 #include "tizen-web-engine-lite.h"
20
21 // The plugin factories
22 extern "C" DALI_EXPORT_API Dali::WebEngineLitePlugin* CreateWebEngineLitePlugin( void )
23 {
24   return new Dali::Plugin::TizenWebEngineLite;
25 }
26
27 extern "C" DALI_EXPORT_API void DestroyWebEngineLitePlugin( Dali::WebEngineLitePlugin* plugin )
28 {
29   if( plugin != NULL )
30   {
31     delete plugin;
32   }
33 }
34
35 namespace Dali
36 {
37
38 namespace Plugin
39 {
40
41 namespace
42 {
43 } // unnamed namespace
44
45 TizenWebEngineLite::TizenWebEngineLite()
46 : mWebEngineLiteInstance( NULL )
47 {
48 }
49
50 TizenWebEngineLite::~TizenWebEngineLite()
51 {
52 }
53
54 void TizenWebEngineLite::CreateInstance(int width, int height, int windowX, int windowY, const std::string& locale, const std::string& timezoneID)
55 {
56   mWebEngineLiteInstance = starfishCreate(NULL, width, height, windowX, windowY, locale.c_str(), timezoneID.c_str(), 1);
57 }
58
59 void TizenWebEngineLite::DestroyInstance()
60 {
61   starfishRemove(mWebEngineLiteInstance);
62 }
63
64 void TizenWebEngineLite::LoadHtml(const std::string& path)
65 {
66   starfishLoadHTMLDocument(mWebEngineLiteInstance, path.c_str());
67 }
68
69 Dali::WebEngineLitePlugin::WebEngineLiteSignalType& TizenWebEngineLite::FinishedSignal()
70 {
71   return mFinishedSignal;
72 }
73
74 } // namespace Plugin
75 } // namespace Dali;