2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 /// A set of key frames for a property that can be animated using DALi animation.<br />
25 /// This allows the generation of key frame objects from individual Property::Values.<br />
27 public class KeyFrames : BaseHandle
29 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31 internal KeyFrames(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.KeyFrames_SWIGUpcast(cPtr), cMemoryOwn)
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyFrames obj)
38 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
44 /// <since_tizen> 3 </since_tizen>
45 protected override void Dispose(DisposeTypes type)
52 if(type == DisposeTypes.Explicit)
55 //Release your own managed resources here.
56 //You should release all of your own disposable objects here.
59 //Release your own unmanaged resources here.
60 //You should not access any managed member here except static instance.
61 //because the execution order of Finalizes is non-deterministic.
63 if (swigCPtr.Handle != global::System.IntPtr.Zero)
68 NDalicPINVOKE.delete_KeyFrames(swigCPtr);
70 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
81 /// <param name="progress">A progress value between 0.0 and 1.0.</param>
82 /// <param name="value">A value.</param>
83 /// <since_tizen> 3 </since_tizen>
84 public void Add(float progress, object value)
86 PropertyValue val = PropertyValue.CreateFromObject(value);
93 /// <param name="progress">A progress value between 0.0 and 1.0.</param>
94 /// <param name="value">A value</param>
95 /// <param name="alpha">The alpha function used to blend to the next keyframe.</param>
96 /// <since_tizen> 3 </since_tizen>
97 public void Add(float progress, object value, AlphaFunction alpha)
99 PropertyValue val = PropertyValue.CreateFromObject(value);
100 Add(progress, val, alpha);
104 /// Creates an initialized KeyFrames handle.
106 /// <since_tizen> 3 </since_tizen>
107 public KeyFrames() : this(NDalicPINVOKE.KeyFrames_New(), true)
109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 /// [Obsolete("Please do not use! this will be deprecated")]
116 /// <since_tizen> 3 </since_tizen>
117 [Obsolete("Please do not use! this will be deprecated")]
118 public static KeyFrames DownCast(BaseHandle handle)
120 KeyFrames ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as KeyFrames;
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126 /// Gets the type of the key frame.
128 /// <returns>The key frame property type</returns>
129 /// <since_tizen> 3 </since_tizen>
130 public new PropertyType GetType()
132 PropertyType ret = (PropertyType)NDalicPINVOKE.KeyFrames_GetType(swigCPtr);
133 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138 /// Adds a key frame.
140 /// <param name="progress">A progress value between 0.0 and 1.0.</param>
141 /// <param name="value">A value.</param>
142 /// <since_tizen> 3 </since_tizen>
143 public void Add(float progress, PropertyValue value)
145 NDalicPINVOKE.KeyFrames_Add__SWIG_0(swigCPtr, progress, PropertyValue.getCPtr(value));
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 /// Adds a key frame.
152 /// <param name="progress">A progress value between 0.0 and 1.0.</param>
153 /// <param name="value">A value.</param>
154 /// <param name="alpha">The alpha function used to blend to the next keyframe.</param>
155 /// <since_tizen> 3 </since_tizen>
156 public void Add(float progress, PropertyValue value, AlphaFunction alpha)
158 NDalicPINVOKE.KeyFrames_Add__SWIG_1(swigCPtr, progress, PropertyValue.getCPtr(value), AlphaFunction.getCPtr(alpha));
159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();