4327ace64d48c652744c8372ec491f17824180d6
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / VisualBase.cs
1 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
2 // PROPRIETARY/CONFIDENTIAL \r
3 // This software is the confidential and proprietary\r
4 // information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall\r
5 // not disclose such Confidential Information and shall use it only in\r
6 // accordance with the terms of the license agreement you entered into with\r
7 // SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the\r
8 // suitability of the software, either express or implied, including but not\r
9 // limited to the implied warranties of merchantability, fitness for a\r
10 // particular purpose, or non-infringement. SAMSUNG shall not be liable for any\r
11 // damages suffered by licensee as a result of using, modifying or distributing\r
12 // this software or its derivatives.\r
13 \r
14 // Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
15 //\r
16 // Licensed under the Apache License, Version 2.0 (the "License");\r
17 // you may not use this file except in compliance with the License.\r
18 // You may obtain a copy of the License at\r
19 //\r
20 // http://www.apache.org/licenses/LICENSE-2.0\r
21 //\r
22 // Unless required by applicable law or agreed to in writing, software\r
23 // distributed under the License is distributed on an "AS IS" BASIS,\r
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
25 // See the License for the specific language governing permissions and\r
26 // limitations under the License.\r
27 //\r
28 \r
29 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts\r
30 // Some have been manually changed\r
31 \r
32 \r
33 namespace Tizen.NUI\r
34 {\r
35 \r
36     public class VisualBase : BaseHandle\r
37     {\r
38 \r
39         private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
40 \r
41         internal VisualBase(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VisualBase_SWIGUpcast(cPtr), cMemoryOwn)\r
42         {\r
43             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
44         }\r
45 \r
46         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VisualBase obj)\r
47         {\r
48             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
49         }\r
50 \r
51         ~VisualBase()\r
52         {\r
53             Dispose();\r
54         }\r
55 \r
56         public override void Dispose()\r
57         {\r
58             lock (this)\r
59             {\r
60                 if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
61                 {\r
62                     if (swigCMemOwn)\r
63                     {\r
64                         swigCMemOwn = false;\r
65                         NDalicPINVOKE.delete_VisualBase(swigCPtr);\r
66                     }\r
67                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
68                 }\r
69                 global::System.GC.SuppressFinalize(this);\r
70                 base.Dispose();\r
71             }\r
72         }\r
73 \r
74         public VisualBase() : this(NDalicPINVOKE.new_VisualBase__SWIG_0(), true)\r
75         {\r
76             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
77         }\r
78 \r
79         internal VisualBase(VisualBase handle) : this(NDalicPINVOKE.new_VisualBase__SWIG_1(VisualBase.getCPtr(handle)), true)\r
80         {\r
81             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
82         }\r
83 \r
84         internal VisualBase Assign(VisualBase handle)\r
85         {\r
86             VisualBase ret = new VisualBase(NDalicPINVOKE.VisualBase_Assign(swigCPtr, VisualBase.getCPtr(handle)), false);\r
87             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
88             return ret;\r
89         }\r
90 \r
91         public string Name\r
92         {\r
93             set\r
94             {\r
95                 SetName(value);\r
96             }\r
97             get\r
98             {\r
99                 return GetName();\r
100             }\r
101         }\r
102 \r
103         internal void SetName(string name)\r
104         {\r
105             NDalicPINVOKE.VisualBase_SetName(swigCPtr, name);\r
106             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
107         }\r
108 \r
109         internal string GetName()\r
110         {\r
111             string ret = NDalicPINVOKE.VisualBase_GetName(swigCPtr);\r
112             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
113             return ret;\r
114         }\r
115 \r
116         public void SetTransformAndSize(PropertyMap transform, Vector2 controlSize)\r
117         {\r
118             NDalicPINVOKE.VisualBase_SetTransformAndSize(swigCPtr, PropertyMap.getCPtr(transform), Vector2.getCPtr(controlSize));\r
119             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
120         }\r
121 \r
122         public float GetHeightForWidth(float width)\r
123         {\r
124             float ret = NDalicPINVOKE.VisualBase_GetHeightForWidth(swigCPtr, width);\r
125             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
126             return ret;\r
127         }\r
128 \r
129         public float GetWidthForHeight(float height)\r
130         {\r
131             float ret = NDalicPINVOKE.VisualBase_GetWidthForHeight(swigCPtr, height);\r
132             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
133             return ret;\r
134         }\r
135 \r
136         public void GetNaturalSize(Size2D naturalSize)\r
137         {\r
138             NDalicPINVOKE.VisualBase_GetNaturalSize(swigCPtr, Size2D.getCPtr(naturalSize));\r
139             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
140         }\r
141 \r
142         public float DepthIndex\r
143         {\r
144             set\r
145             {\r
146                 SetDepthIndex(value);\r
147             }\r
148             get\r
149             {\r
150                 return GetDepthIndex();\r
151             }\r
152         }\r
153         internal void SetDepthIndex(float index)\r
154         {\r
155             NDalicPINVOKE.VisualBase_SetDepthIndex(swigCPtr, index);\r
156             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
157         }\r
158 \r
159         internal float GetDepthIndex()\r
160         {\r
161             float ret = NDalicPINVOKE.VisualBase_GetDepthIndex(swigCPtr);\r
162             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
163             return ret;\r
164         }\r
165 \r
166         public PropertyMap Creation\r
167         {\r
168             set\r
169             {\r
170                 CreatePropertyMap(value);\r
171             }\r
172         }\r
173         internal void CreatePropertyMap(PropertyMap map)\r
174         {\r
175             NDalicPINVOKE.VisualBase_CreatePropertyMap(swigCPtr, PropertyMap.getCPtr(map));\r
176             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
177         }\r
178 \r
179         internal VisualBase(SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base impl) : this(NDalicPINVOKE.new_VisualBase__SWIG_2(SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.getCPtr(impl)), true)\r
180         {\r
181             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
182         }\r
183 \r
184     }\r
185 \r
186 }\r