2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #include "dali-script-v8.h"
22 #include <dali/integration-api/debug.h>
25 #include <dali-script-v8.h>
26 #include <dali-wrapper.h>
27 #include <utils/v8-utils.h>
29 // The plugin factories
30 extern "C" DALI_EXPORT_API Dali::Toolkit::ScriptPlugin* CreateScriptPlugin(void)
32 return new Dali::V8Plugin::DaliScriptV8;
35 extern "C" DALI_EXPORT_API void DestroyScriptPlugin(Dali::Toolkit::ScriptPlugin* plugin)
45 DaliScriptV8::DaliScriptV8()
49 DaliScriptV8::~DaliScriptV8()
51 DaliWrapper::Get().Shutdown();
54 void DaliScriptV8::SetFlags(const std::string& s)
56 DaliWrapper::Get().SetFlagsFromString(s);
59 void DaliScriptV8::ExecuteBuffer(const std::string& buffer, const std::string& filename)
61 DaliWrapper::Get().ExecuteBuffer(buffer, filename);
64 void DaliScriptV8::ExecuteFile(const std::string& filename)
68 DaliWrapper::Get().ExecuteFile( filename );
71 } // namespace V8Plugin