Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Animatable.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16
17 namespace Tizen.NUI
18 {
19
20     public class Animatable : BaseHandle
21     {
22         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
23
24         internal Animatable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Handle_SWIGUpcast(cPtr), cMemoryOwn)
25         {
26             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
27         }
28
29         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animatable obj)
30         {
31             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
32         }
33
34         protected override void Dispose(DisposeTypes type)
35         {
36             if (disposed)
37             {
38                 return;
39             }
40
41             if (type == DisposeTypes.Explicit)
42             {
43                 //Called by User
44                 //Release your own managed resources here.
45                 //You should release all of your own disposable objects here.
46
47             }
48
49             //Release your own unmanaged resources here.
50             //You should not access any managed member here except static instance.
51             //because the execution order of Finalizes is non-deterministic.
52
53             if (swigCPtr.Handle != global::System.IntPtr.Zero)
54             {
55                 if (swigCMemOwn)
56                 {
57                     swigCMemOwn = false;
58                     NDalicPINVOKE.delete_Handle(swigCPtr);
59                 }
60                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
61             }
62
63             base.Dispose(type);
64         }
65
66
67         public Animatable() : this(NDalicPINVOKE.Handle_New(), true)
68         {
69             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70
71         }
72
73         internal uint GetPropertyCount()
74         {
75             uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr);
76             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77             return ret;
78         }
79
80         public string GetPropertyName(int index)
81         {
82             string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index);
83             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84             return ret;
85         }
86
87         public int GetPropertyIndex(string name)
88         {
89             int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name);
90             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91             return ret;
92         }
93
94         public bool IsPropertyWritable(int index)
95         {
96             bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index);
97             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98             return ret;
99         }
100
101         public bool IsPropertyAnimatable(int index)
102         {
103             bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index);
104             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105             return ret;
106         }
107
108         public PropertyType GetPropertyType(int index)
109         {
110             PropertyType ret = (PropertyType)NDalicPINVOKE.Handle_GetPropertyType(swigCPtr, index);
111             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112             return ret;
113         }
114
115         public void SetProperty(int index, PropertyValue propertyValue)
116         {
117             Tizen.NUI.Object.SetProperty(swigCPtr, index, propertyValue);
118         }
119
120         public int RegisterProperty(string name, PropertyValue propertyValue)
121         {
122             int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_0(swigCPtr, name, PropertyValue.getCPtr(propertyValue));
123             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124             return ret;
125         }
126
127         public int RegisterProperty(string name, PropertyValue propertyValue, PropertyAccessMode accessMode)
128         {
129             int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_1(swigCPtr, name, PropertyValue.getCPtr(propertyValue), (int)accessMode);
130             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131             return ret;
132         }
133
134         public PropertyValue GetProperty(int index)
135         {
136             PropertyValue ret = Tizen.NUI.Object.GetProperty(swigCPtr, index);
137             return ret;
138         }
139
140         internal PropertyNotification AddPropertyNotification(int index, PropertyCondition condition)
141         {
142             PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_0(swigCPtr, index, PropertyCondition.getCPtr(condition)), true);
143             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144             return ret;
145         }
146
147         internal PropertyNotification AddPropertyNotification(int index, int componentIndex, PropertyCondition condition)
148         {
149             PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_1(swigCPtr, index, componentIndex, PropertyCondition.getCPtr(condition)), true);
150             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151             return ret;
152         }
153
154         internal void RemovePropertyNotification(PropertyNotification propertyNotification)
155         {
156             NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification));
157             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158         }
159
160         internal void RemovePropertyNotifications()
161         {
162             NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr);
163             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
164         }
165
166         internal void RemoveConstraints()
167         {
168             NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr);
169             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170         }
171
172         internal void RemoveConstraints(uint tag)
173         {
174             NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag);
175             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176         }
177
178         public enum Capability
179         {
180             DYNAMIC_PROPERTIES = 0x01
181         }
182
183     }
184
185 }