/* * Copyright(c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System; using System.ComponentModel; namespace Tizen.NUI { /// /// A set of key frames for a property that can be animated using DALi animation.
/// This allows the generation of key frame objects from individual Property::Values.
///
/// 3 public class KeyFrames : BaseHandle { /// /// Creates an initialized KeyFrames handle. /// /// 3 public KeyFrames() : this(Interop.KeyFrames.New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal KeyFrames(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.KeyFrames.Upcast(cPtr), cMemoryOwn) { } /// /// Adds a key frame. /// /// A progress value between 0.0 and 1.0. /// A value. /// 3 public void Add(float progress, object value) { PropertyValue val = PropertyValue.CreateFromObject(value); Add(progress, val); } /// /// Adds a key frame. /// /// A progress value between 0.0 and 1.0. /// A value /// The alpha function used to blend to the next keyframe. /// 3 public void Add(float progress, object value, AlphaFunction alpha) { PropertyValue val = PropertyValue.CreateFromObject(value); Add(progress, val, alpha); } /// /// Gets the type of the key frame. /// /// The key frame property type /// 3 public new PropertyType GetType() { PropertyType ret = (PropertyType)Interop.KeyFrames.GetType(SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Adds a key frame. /// /// A progress value between 0.0 and 1.0. /// A value. /// 3 public void Add(float progress, PropertyValue value) { Interop.KeyFrames.Add(SwigCPtr, progress, PropertyValue.getCPtr(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Adds a key frame. /// /// A progress value between 0.0 and 1.0. /// A value. /// The alpha function used to blend to the next keyframe. /// 3 public void Add(float progress, PropertyValue value, AlphaFunction alpha) { Interop.KeyFrames.Add(SwigCPtr, progress, PropertyValue.getCPtr(value), AlphaFunction.getCPtr(alpha)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyFrames obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr; } /// This will not be public opened. [EditorBrowsable(EditorBrowsableState.Never)] protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.KeyFrames.DeleteKeyFrames(swigCPtr); } } }