5 * Copyright (c) 2015 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 <dali/dali.h>
23 #include <dali-toolkit/dali-toolkit.h>
26 * Example app that can load both JSON and JavaScript files from command line
27 * E.g. scripting.example my-first.js my-first.json
28 * See dali-demo/resources/scripts for example JSON and JavaScript files
30 class Launcher: public Dali::ConnectionTracker
36 * @param application application
37 * @param layoutFileName JSON file to run
38 * @param scriptFileName JavaScript file to run
40 Launcher( Dali::Application application, std::string layoutFileName, std::string scriptFileName );
50 void Create( Dali::Application& application );
53 * @brief run application MainLoop
59 Dali::Toolkit::Script mScript; ///< Used to load and execute JavaScript
60 Dali::Toolkit::Builder mBuilder; ///< Used to parse JSON
61 Dali::Application mApplication; ///< application
62 std::string mJSONFileName; ///< JSON filename
63 std::string mJavaScriptFileName; ///< JavaScript filename