Purge underscored header file barriers
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / scripting / script.h
1 #ifndef DALI_TOOLKIT_SCRIPT_H
2 #define DALI_TOOLKIT_SCRIPT_H
3
4 /*
5  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali-toolkit/public-api/dali-toolkit-common.h>
23 #include <dali/public-api/object/base-handle.h>
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 namespace Internal DALI_INTERNAL
32 {
33 class Script;
34 }
35
36 /**
37  * Script
38  * This class provides the ability to execute script in a supported language.
39  * Specific script language support is provided through plugins.
40  *
41  * For Example.
42  *
43  * @code
44  *
45  * Script script = Script::New();
46  *
47  * script.ExecuteFile("bump-map.js");
48  *
49  * @endcode
50  *
51  */
52 class DALI_TOOLKIT_API Script : public BaseHandle
53 {
54
55 public:
56
57   /**
58    * Create an Script handle; this can be initialised with Script::New()
59    * Calling member functions with an uninitialised handle is not allowed.
60    */
61   Script();
62
63   /**
64    * Creates an Script object.
65    * @return A handle to the Script control.
66    */
67   static Script New();
68
69   /**
70    * Virtual destructor.
71    */
72   ~Script();
73
74   /**
75    * Executes the contents of filename in a scripted environment.
76    * @pre A Dali Application object exists
77    * @param filename A filename of a script file to execute
78    * @return true on success, false on failure
79    *
80    */
81   bool ExecuteFile( const std::string& filename );
82
83 private:
84
85   Script(Internal::Script *impl);
86
87 }; // class Script
88
89 } // namespace Toolkit
90
91 } // namespace Dali
92
93 #endif // DALI_TOOLKIT_SCRIPT_H