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.
19 using System.ComponentModel;
25 /// A set of key frames for a property that can be animated using DALi animation.<br />
26 /// This allows the generation of key frame objects from individual Property::Values.<br />
28 /// <since_tizen> 3 </since_tizen>
29 public class KeyFrames : BaseHandle
31 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
34 /// Creates an initialized KeyFrames handle.
36 /// <since_tizen> 3 </since_tizen>
37 public KeyFrames() : this(Interop.KeyFrames.KeyFrames_New(), true)
39 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
43 internal KeyFrames(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.KeyFrames.KeyFrames_SWIGUpcast(cPtr), cMemoryOwn)
45 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
51 /// <param name="progress">A progress value between 0.0 and 1.0.</param>
52 /// <param name="value">A value.</param>
53 /// <since_tizen> 3 </since_tizen>
54 public void Add(float progress, object value)
56 PropertyValue val = PropertyValue.CreateFromObject(value);
63 /// <param name="progress">A progress value between 0.0 and 1.0.</param>
64 /// <param name="value">A value</param>
65 /// <param name="alpha">The alpha function used to blend to the next keyframe.</param>
66 /// <since_tizen> 3 </since_tizen>
67 public void Add(float progress, object value, AlphaFunction alpha)
69 PropertyValue val = PropertyValue.CreateFromObject(value);
70 Add(progress, val, alpha);
74 /// Gets the type of the key frame.
76 /// <returns>The key frame property type</returns>
77 /// <since_tizen> 3 </since_tizen>
78 public new PropertyType GetType()
80 PropertyType ret = (PropertyType)Interop.KeyFrames.KeyFrames_GetType(swigCPtr);
81 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88 /// <param name="progress">A progress value between 0.0 and 1.0.</param>
89 /// <param name="value">A value.</param>
90 /// <since_tizen> 3 </since_tizen>
91 public void Add(float progress, PropertyValue value)
93 Interop.KeyFrames.KeyFrames_Add__SWIG_0(swigCPtr, progress, PropertyValue.getCPtr(value));
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 /// <param name="progress">A progress value between 0.0 and 1.0.</param>
101 /// <param name="value">A value.</param>
102 /// <param name="alpha">The alpha function used to blend to the next keyframe.</param>
103 /// <since_tizen> 3 </since_tizen>
104 public void Add(float progress, PropertyValue value, AlphaFunction alpha)
106 Interop.KeyFrames.KeyFrames_Add__SWIG_1(swigCPtr, progress, PropertyValue.getCPtr(value), AlphaFunction.getCPtr(alpha));
107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyFrames obj)
112 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
118 /// <since_tizen> 3 </since_tizen>
119 protected override void Dispose(DisposeTypes type)
126 if (type == DisposeTypes.Explicit)
129 //Release your own managed resources here.
130 //You should release all of your own disposable objects here.
133 //Release your own unmanaged resources here.
134 //You should not access any managed member here except static instance.
135 //because the execution order of Finalizes is non-deterministic.
137 if (swigCPtr.Handle != global::System.IntPtr.Zero)
142 Interop.KeyFrames.delete_KeyFrames(swigCPtr);
144 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);