Size negotiation patch 1: Removed SetPreferred size
[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
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/public-api/scripting/script.h>
23 #include <dali-toolkit/public-api/scripting/script-plugin.h>
24
25
26 namespace Dali
27 {
28
29 namespace Toolkit
30 {
31
32 namespace Internal
33 {
34
35 class Script;
36
37 /**
38  * @copydoc Toolkit::Script
39  */
40 class Script : public Dali::BaseObject
41 {
42 public:
43
44   /**
45    * @brief Constructor
46    */
47   Script();
48
49   /**
50    * @copydoc Toolkit::Script::ExecuteFile
51    */
52   void ExecuteFile( const std::string& filename );
53
54 protected:
55
56   /**
57    *  @brief virtual destructor
58    */
59   virtual ~Script();
60
61 private:
62
63   /**
64    * @brief Undefined copy  constructor
65    */
66   Script(const Script&);
67
68   /**
69    * @brief Undefined assignment operator
70    */
71   Script& operator=(const Script& rhs);
72
73 private: // data
74
75   ScriptPlugin* mPlugin;    ///< plugin
76
77 };
78
79 } // namespace Internal
80
81 inline Internal::Script& GetImpl(Dali::Toolkit::Script& obj)
82 {
83   DALI_ASSERT_ALWAYS(obj);
84
85   Dali::BaseObject& handle = obj.GetBaseObject();
86
87   return static_cast<Internal::Script&>(handle);
88 }
89
90 inline const Internal::Script& GetImpl(const Dali::Toolkit::Script& obj)
91 {
92   DALI_ASSERT_ALWAYS(obj);
93
94   const Dali::BaseObject& handle = obj.GetBaseObject();
95
96   return static_cast<const Internal::Script&>(handle);
97 }
98
99
100 } // namespace Toolkit
101
102 } // namespace Dali
103
104 #endif // __DALI_TOOLKIT_INTERNAL_SCRIPT_H__