Release 4.0.0-preview1-00301
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / TransitionData.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 namespace Tizen.NUI
19 {
20     /// <summary>
21     /// This object translates data from a property array of maps into an array of animators.
22     /// </summary>
23     public class TransitionData : BaseHandle
24     {
25         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26
27         internal TransitionData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TransitionData_SWIGUpcast(cPtr), cMemoryOwn)
28         {
29             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30         }
31
32         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TransitionData obj)
33         {
34             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35         }
36
37         /// <summary>
38         /// Dispose.
39         /// </summary>
40         /// <param name="type">The dispose type</param>
41         /// <since_tizen> 3 </since_tizen>
42         protected override void Dispose(DisposeTypes type)
43         {
44             if (disposed)
45             {
46                 return;
47             }
48
49             if (type == DisposeTypes.Explicit)
50             {
51                 //Called by User
52                 //Release your own managed resources here.
53                 //You should release all of your own disposable objects here.
54
55             }
56
57             //Release your own unmanaged resources here.
58             //You should not access any managed member here except static instance.
59             //because the execution order of Finalizes is non-deterministic.
60
61             if (swigCPtr.Handle != global::System.IntPtr.Zero)
62             {
63                 if (swigCMemOwn)
64                 {
65                     swigCMemOwn = false;
66                     NDalicPINVOKE.delete_TransitionData(swigCPtr);
67                 }
68                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69             }
70
71             base.Dispose(type);
72         }
73
74         /// <summary>
75         /// Create an instance of TransitionData.
76         /// </summary>
77         /// <param name="transition">The transition data to store (a single animator).</param>
78         /// <since_tizen> 3 </since_tizen>
79         public TransitionData(PropertyMap transition) : this(NDalicPINVOKE.TransitionData_New__SWIG_0(PropertyMap.getCPtr(transition)), true)
80         {
81             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82
83         }
84
85         /// <summary>
86         /// Create an instance of TransitionData.
87         /// </summary>
88         /// <param name="transition">The transition data to store (an array of maps of animators).</param>
89         /// <since_tizen> 3 </since_tizen>
90         public TransitionData(PropertyArray transition) : this(NDalicPINVOKE.TransitionData_New__SWIG_1(PropertyArray.getCPtr(transition)), true)
91         {
92             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93
94         }
95
96         /// <summary>
97         /// Create an instance of TransitionData by copy constructor.
98         /// </summary>
99         /// <param name="handle">Handle to an object.</param>
100         /// <since_tizen> 3 </since_tizen>
101         public TransitionData(TransitionData handle) : this(NDalicPINVOKE.new_TransitionData__SWIG_1(TransitionData.getCPtr(handle)), true)
102         {
103             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104         }
105
106         /// <summary>
107         /// returns the count of the individual property transitions stored within this handle.
108         /// </summary>
109         /// <returns>A handle to the image at the the specified position.</returns>
110         /// <since_tizen> 3 </since_tizen>
111         public uint Count()
112         {
113             uint ret = NDalicPINVOKE.TransitionData_Count(swigCPtr);
114             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115             return ret;
116         }
117
118         /// <summary>
119         /// returns the count of the individual property transitions stored within this handle.
120         /// </summary>
121         /// <param name="index">The index of the animator.</param>
122         /// <returns>A property map representing the animator.</returns>
123         /// <since_tizen> 3 </since_tizen>
124         public PropertyMap GetAnimatorAt(uint index)
125         {
126             PropertyMap ret = new PropertyMap(NDalicPINVOKE.TransitionData_GetAnimatorAt(swigCPtr, index), true);
127             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128             return ret;
129         }
130
131         internal TransitionData(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData impl) : this(NDalicPINVOKE.new_TransitionData__SWIG_2(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.getCPtr(impl)), true)
132         {
133             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134         }
135
136     }
137
138 }