Merge "Added Scaling and cropping properties to the image visual mask" into devel...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / scripting / script-impl.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_SCRIPT_H__
2 #define __DALI_TOOLKIT_INTERNAL_SCRIPT_H__
3
4 /*
5  * Copyright (c) 2014 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 // EXTERNAL INCLUDES
21 #include <dali/public-api/object/base-object.h>
22
23 // INTERNAL INCLUDES
24 #include <dali-toolkit/devel-api/scripting/script.h>
25 #include <dali-toolkit/devel-api/scripting/script-plugin.h>
26
27
28 namespace Dali
29 {
30
31 namespace Toolkit
32 {
33
34 namespace Internal
35 {
36
37 class Script;
38
39 /**
40  * @copydoc Toolkit::Script
41  */
42 class Script : public Dali::BaseObject
43 {
44 public:
45
46   /**
47    * @brief Constructor
48    */
49   Script();
50
51   /**
52    * @copydoc Toolkit::Script::ExecuteFile
53    */
54   bool ExecuteFile( const std::string& filename );
55
56 protected:
57
58   /**
59    *  @brief virtual destructor
60    */
61   virtual ~Script();
62
63 private:
64
65   /**
66    * @brief Undefined copy  constructor
67    */
68   Script(const Script&);
69
70   /**
71    * @brief Undefined assignment operator
72    */
73   Script& operator=(const Script& rhs);
74
75 private: // data
76
77   ScriptPlugin* mPlugin;    ///< plugin
78
79 };
80
81 } // namespace Internal
82
83 inline Internal::Script& GetImpl(Dali::Toolkit::Script& obj)
84 {
85   DALI_ASSERT_ALWAYS(obj);
86
87   Dali::BaseObject& handle = obj.GetBaseObject();
88
89   return static_cast<Internal::Script&>(handle);
90 }
91
92 inline const Internal::Script& GetImpl(const Dali::Toolkit::Script& obj)
93 {
94   DALI_ASSERT_ALWAYS(obj);
95
96   const Dali::BaseObject& handle = obj.GetBaseObject();
97
98   return static_cast<const Internal::Script&>(handle);
99 }
100
101
102 } // namespace Toolkit
103
104 } // namespace Dali
105
106 #endif // __DALI_TOOLKIT_INTERNAL_SCRIPT_H__